BLT_PATCHES -   02/20/2000

This patch file fixes stub support in Blt 2.4o. It should be
applied by running the "patch" program in the top-level
directory of a clean Blt2.4o release, using the command
"patch -p0 <BLT_PATCHES".

*** bltpatch.orig	Sun Feb 20 14:21:02 2000
--- bltpatch	Sun Feb 20 14:20:49 2000
***************
*** 0 ****
--- 1,47 ----
+ #!/bin/sh
+ # The next line restarts using tclsh8.3 \
+ exec tclsh8.3 $0 ${1+"$@"}
+ 
+ set dirs ". ./src ./src/shared"
+ set date [clock format [clock seconds] -format "%m/%d/%Y"]
+ 
+ #
+ # This is a tcl-script that will search a list of directories
+ # for ".orig"-files. For all of these it will make a "diff",
+ # and create a patch-file.
+ #
+ #	Written by:	Jan Nijtmans
+ #			CMG (Computer Management Group) Arnhem B.V.
+ #			email: j.nijtmans@chello.nl (private)
+ #			       jan.nijtmans@cmg.nl (work)
+ #			url:   http://purl.oclc.org/net/nijtmans/
+ 
+ set file [open bltpatch.orig w]
+ close $file
+ 
+ puts stdout "creating BLT_PATCHES"
+ set file [open BLT_PATCHES w]
+ puts $file "BLT_PATCHES -   $date
+ 
+ This patch file fixes stub support in Blt 2.4o. It should be
+ applied by running the \"patch\" program in the top-level
+ directory of a clean Blt2.4o release, using the command
+ \"patch -p0 <BLT_PATCHES\".
+ "
+ 
+ close $file
+ set filelist {}
+ foreach dir $dirs {
+     set files [eval exec ls $dir]
+     foreach file $files {
+ 	if {[regexp ".*\.orig" $file]} {
+ 	    set file [file join $dir [file rootname $file]]
+ 	    set file [string range $file 2 [string length $file]]
+ 	    lappend filelist $file
+ 	    puts stdout "diff -c $file.orig and $file"
+ 	    catch [list exec diff -c $file.orig $file >>BLT_PATCHES]
+ 	}
+     }
+ }
+ 
+ file delete bltpatch.orig
*** configure.in.orig	Wed Jan 12 21:15:36 2000
--- configure.in	Sun Feb 20 12:48:31 2000
***************
*** 36,41 ****
--- 36,43 ----
    unset ac_cv_header_jpeglib_h
    unset ac_cv_lib_jpeg ac_cv_lib_jpeg_jpeg_read_header
    blt_enable_jpeg=$enableval ])
+ AC_ARG_ENABLE(stubs, [  --enable-stubs          use stubs], [
+   blt_enable_stubs=$enableval ])
  AC_ARG_WITH(cc, [  --with-cc=CC		  set C compiler to CC], [
    blt_with_cc=$with_cc 
    unset ac_cv_prog_CC
***************
*** 598,606 ****
  if test "${TK_INC_DIR}" != "/usr/include" ; then
    INC_SPECS="${INC_SPECS} -I${TK_INC_DIR}"
  fi
  if test "${TK_LIB_DIR}" = "/usr/lib" ; then
    LIB_SPECS="${LIB_SPECS} ${TK_LIB_SPEC}"
! else
    LIB_SPECS="${LIB_SPECS} -L${TK_LIB_DIR} ${TK_LIB_SPEC}"
    if test "x${LD_RUN_PATH}" = "x" ; then
      LD_RUN_PATH="${TK_LIB_DIR}"
--- 600,611 ----
  if test "${TK_INC_DIR}" != "/usr/include" ; then
    INC_SPECS="${INC_SPECS} -I${TK_INC_DIR}"
  fi
+ 
  if test "${TK_LIB_DIR}" = "/usr/lib" ; then
+   STUB_LIB_SPECS="${LIB_SPECS} ${TK_STUB_LIB_SPEC}"
    LIB_SPECS="${LIB_SPECS} ${TK_LIB_SPEC}"
!  else
!   STUB_LIB_SPECS="${LIB_SPECS} -L${TK_LIB_DIR} ${TK_STUB_LIB_SPEC}"
    LIB_SPECS="${LIB_SPECS} -L${TK_LIB_DIR} ${TK_LIB_SPEC}"
    if test "x${LD_RUN_PATH}" = "x" ; then
      LD_RUN_PATH="${TK_LIB_DIR}"
***************
*** 625,632 ****
--- 630,639 ----
  
  if test "${TCL_LIB_DIR}" = "/usr/lib" -o \
  	"${TCL_LIB_DIR}" = "${TK_LIB_DIR}" ; then
+   STUB_LIB_SPECS="${STUB_LIB_SPECS} ${TCL_STUB_LIB_SPEC}"
    LIB_SPECS="${LIB_SPECS} ${TCL_LIB_SPEC}"
  else
+   STUB_LIB_SPECS="${STUB_LIB_SPECS} -L${TCL_LIB_DIR} ${TCL_STUB_LIB_SPEC}"
    LIB_SPECS="${LIB_SPECS} -L${TCL_LIB_DIR} ${TCL_LIB_SPEC}"
    if test "x${LD_RUN_PATH}" = "x" ; then
      LD_RUN_PATH="${TCL_LIB_DIR}"
***************
*** 635,640 ****
--- 642,652 ----
    fi
  fi
  
+ if test "${blt_enable_stubs}" = "no" ; then
+   STUB_LIB_SPECS="${LIB_SPECS}"
+ fi
+ AC_SUBST(STUB_LIB_SPECS)
+ 
  # -----------------------------------------------------------------------
  # 
  # -lX11
***************
*** 1055,1060 ****
--- 1067,1076 ----
    SHLIB_LD_LIBS=""
  fi
  
+ if test "${blt_enable_stubs}" != "no" ; then
+   SHLIB_CFLAGS="${SHLIB_CFLAGS} -DUSE_TCL_STUBS -DUSE_TK_STUBS"
+ fi
+ 
  if test "${buildShared}" = "yes" ; then
    SHLIB_TARGET="build_shared"
    AC_SUBST(SHLIB_CFLAGS)
***************
*** 1079,1084 ****
--- 1095,1105 ----
  AC_SUBST(BLT_MINOR_VERSION)
  AC_SUBST(BLT_VERSION)
  AC_SUBST(AUX_LIBS)
+ AC_SUBST(TCL_VERSION)
+ AC_SUBST(TCL_PATCH_LEVEL)
+ AC_SUBST(TK_VERSION)
+ AC_SUBST(TK_PATCH_LEVEL)
+ AC_SUBST(TCL_DEFS)
  
  #--------------------------------------------------------------------
  #	Propagate prefix argument as installation directory.
*** configure.orig	Wed Jan 12 21:15:36 2000
--- configure	Sun Feb 20 13:23:00 2000
***************
*** 18,23 ****
--- 18,25 ----
  ac_help="$ac_help
    --enable-jpeg=DIR       find JPEG headers and libraries in DIR"
  ac_help="$ac_help
+   --enable-stubs          use stubs"
+ ac_help="$ac_help
    --with-cc=CC		  set C compiler to CC"
  ac_help="$ac_help
    --with-cflags=FLAGS  	  set compiler flags to FLAGS"
***************
*** 603,608 ****
--- 605,617 ----
    blt_enable_jpeg=$enableval 
  fi
  
+ # Check whether --enable-stubs or --disable-stubs was given.
+ if test "${enable_stubs+set}" = set; then
+   enableval="$enable_stubs"
+   
+   blt_enable_stubs=$enableval 
+ fi
+ 
  # Check whether --with-cc or --without-cc was given.
  if test "${with_cc+set}" = set; then
    withval="$with_cc"
***************
*** 653,659 ****
  fi
  
  echo $ac_n "checking host system type""... $ac_c" 1>&6
! echo "configure:657: checking host system type" >&5
  
  host_alias=$host
  case "$host_alias" in
--- 662,668 ----
  fi
  
  echo $ac_n "checking host system type""... $ac_c" 1>&6
! echo "configure:666: checking host system type" >&5
  
  host_alias=$host
  case "$host_alias" in
***************
*** 674,680 ****
  echo "$ac_t""$host" 1>&6
  
  echo $ac_n "checking target system type""... $ac_c" 1>&6
! echo "configure:678: checking target system type" >&5
  
  target_alias=$target
  case "$target_alias" in
--- 683,689 ----
  echo "$ac_t""$host" 1>&6
  
  echo $ac_n "checking target system type""... $ac_c" 1>&6
! echo "configure:687: checking target system type" >&5
  
  target_alias=$target
  case "$target_alias" in
***************
*** 692,698 ****
  echo "$ac_t""$target" 1>&6
  
  echo $ac_n "checking build system type""... $ac_c" 1>&6
! echo "configure:696: checking build system type" >&5
  
  build_alias=$build
  case "$build_alias" in
--- 701,707 ----
  echo "$ac_t""$target" 1>&6
  
  echo $ac_n "checking build system type""... $ac_c" 1>&6
! echo "configure:705: checking build system type" >&5
  
  build_alias=$build
  case "$build_alias" in
***************
*** 743,749 ****
  #
  
  echo $ac_n "checking which C compiler""... $ac_c" 1>&6
! echo "configure:747: checking which C compiler" >&5
  if test "x${blt_with_cc}" != "x" ; then 
    CC=${blt_with_cc}
    unset ac_cv_prog_CPP
--- 752,758 ----
  #
  
  echo $ac_n "checking which C compiler""... $ac_c" 1>&6
! echo "configure:756: checking which C compiler" >&5
  if test "x${blt_with_cc}" != "x" ; then 
    CC=${blt_with_cc}
    unset ac_cv_prog_CPP
***************
*** 758,764 ****
    # Extract the first word of "gcc", so it can be a program name with args.
  set dummy gcc; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:762: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 767,773 ----
    # Extract the first word of "gcc", so it can be a program name with args.
  set dummy gcc; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:771: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 788,794 ****
    # Extract the first word of "cc", so it can be a program name with args.
  set dummy cc; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:792: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 797,803 ----
    # Extract the first word of "cc", so it can be a program name with args.
  set dummy cc; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:801: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 839,845 ****
        # Extract the first word of "cl", so it can be a program name with args.
  set dummy cl; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:843: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 848,854 ----
        # Extract the first word of "cl", so it can be a program name with args.
  set dummy cl; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:852: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 871,877 ****
  fi
  
  echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
! echo "configure:875: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  
  ac_ext=c
  # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
--- 880,886 ----
  fi
  
  echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
! echo "configure:884: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  
  ac_ext=c
  # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
***************
*** 882,893 ****
  
  cat > conftest.$ac_ext << EOF
  
! #line 886 "configure"
  #include "confdefs.h"
  
  main(){return(0);}
  EOF
! if { (eval echo configure:891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    ac_cv_prog_cc_works=yes
    # If we can't run a trivial program, we are probably using a cross compiler.
    if (./conftest; exit) 2>/dev/null; then
--- 891,902 ----
  
  cat > conftest.$ac_ext << EOF
  
! #line 895 "configure"
  #include "confdefs.h"
  
  main(){return(0);}
  EOF
! if { (eval echo configure:900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    ac_cv_prog_cc_works=yes
    # If we can't run a trivial program, we are probably using a cross compiler.
    if (./conftest; exit) 2>/dev/null; then
***************
*** 913,924 ****
    { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  fi
  echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
! echo "configure:917: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  cross_compiling=$ac_cv_prog_cc_cross
  
  echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
! echo "configure:922: checking whether we are using GNU C" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 922,933 ----
    { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  fi
  echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
! echo "configure:926: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  cross_compiling=$ac_cv_prog_cc_cross
  
  echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
! echo "configure:931: checking whether we are using GNU C" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 927,933 ****
    yes;
  #endif
  EOF
! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
    ac_cv_prog_gcc=yes
  else
    ac_cv_prog_gcc=no
--- 936,942 ----
    yes;
  #endif
  EOF
! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
    ac_cv_prog_gcc=yes
  else
    ac_cv_prog_gcc=no
***************
*** 946,952 ****
  ac_save_CFLAGS="$CFLAGS"
  CFLAGS=
  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
! echo "configure:950: checking whether ${CC-cc} accepts -g" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 955,961 ----
  ac_save_CFLAGS="$CFLAGS"
  CFLAGS=
  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
! echo "configure:959: checking whether ${CC-cc} accepts -g" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 992,998 ****
  
  
  echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
! echo "configure:996: checking how to run the C preprocessor" >&5
  # On Suns, sometimes $CPP names a directory.
  if test -n "$CPP" && test -d "$CPP"; then
    CPP=
--- 1001,1007 ----
  
  
  echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
! echo "configure:1005: checking how to run the C preprocessor" >&5
  # On Suns, sometimes $CPP names a directory.
  if test -n "$CPP" && test -d "$CPP"; then
    CPP=
***************
*** 1007,1019 ****
    # On the NeXT, cc -E runs the code through the compiler's parser,
    # not just through cpp.
    cat > conftest.$ac_ext <<EOF
! #line 1011 "configure"
  #include "confdefs.h"
  #include <assert.h>
  Syntax Error
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1017: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    :
--- 1016,1028 ----
    # On the NeXT, cc -E runs the code through the compiler's parser,
    # not just through cpp.
    cat > conftest.$ac_ext <<EOF
! #line 1020 "configure"
  #include "confdefs.h"
  #include <assert.h>
  Syntax Error
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    :
***************
*** 1024,1036 ****
    rm -rf conftest*
    CPP="${CC-cc} -E -traditional-cpp"
    cat > conftest.$ac_ext <<EOF
! #line 1028 "configure"
  #include "confdefs.h"
  #include <assert.h>
  Syntax Error
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1034: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    :
--- 1033,1045 ----
    rm -rf conftest*
    CPP="${CC-cc} -E -traditional-cpp"
    cat > conftest.$ac_ext <<EOF
! #line 1037 "configure"
  #include "confdefs.h"
  #include <assert.h>
  Syntax Error
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1043: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    :
***************
*** 1041,1053 ****
    rm -rf conftest*
    CPP="${CC-cc} -nologo -E"
    cat > conftest.$ac_ext <<EOF
! #line 1045 "configure"
  #include "confdefs.h"
  #include <assert.h>
  Syntax Error
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1051: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    :
--- 1050,1062 ----
    rm -rf conftest*
    CPP="${CC-cc} -nologo -E"
    cat > conftest.$ac_ext <<EOF
! #line 1054 "configure"
  #include "confdefs.h"
  #include <assert.h>
  Syntax Error
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    :
***************
*** 1075,1083 ****
    BLT_HAVE_GCC="yes"
  else
    echo $ac_n "checking if C compiler is really gcc""... $ac_c" 1>&6
! echo "configure:1079: checking if C compiler is really gcc" >&5
      cat > conftest.$ac_ext <<EOF
! #line 1081 "configure"
  #include "confdefs.h"
  
  #ifdef __GNUC__
--- 1084,1092 ----
    BLT_HAVE_GCC="yes"
  else
    echo $ac_n "checking if C compiler is really gcc""... $ac_c" 1>&6
! echo "configure:1088: checking if C compiler is really gcc" >&5
      cat > conftest.$ac_ext <<EOF
! #line 1090 "configure"
  #include "confdefs.h"
  
  #ifdef __GNUC__
***************
*** 1107,1113 ****
  #  4. otherwise, default to "-O"
  #
  echo $ac_n "checking default compiler flags""... $ac_c" 1>&6
! echo "configure:1111: checking default compiler flags" >&5
  if test  "x${blt_with_cflags}" != "x" ; then 
    CFLAGS=${blt_with_cflags}
  elif test "x${blt_cv_prog_cflags}" != "x" ; then
--- 1116,1122 ----
  #  4. otherwise, default to "-O"
  #
  echo $ac_n "checking default compiler flags""... $ac_c" 1>&6
! echo "configure:1120: checking default compiler flags" >&5
  if test  "x${blt_with_cflags}" != "x" ; then 
    CFLAGS=${blt_with_cflags}
  elif test "x${blt_cv_prog_cflags}" != "x" ; then
***************
*** 1156,1162 ****
  # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  # ./install, which can be erroneously created by make from ./install.sh.
  echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
! echo "configure:1160: checking for a BSD compatible install" >&5
  if test -z "$INSTALL"; then
  if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 1165,1171 ----
  # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  # ./install, which can be erroneously created by make from ./install.sh.
  echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
! echo "configure:1169: checking for a BSD compatible install" >&5
  if test -z "$INSTALL"; then
  if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 1211,1217 ****
  # Extract the first word of "ranlib", so it can be a program name with args.
  set dummy ranlib; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:1215: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 1220,1226 ----
  # Extract the first word of "ranlib", so it can be a program name with args.
  set dummy ranlib; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:1224: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 1239,1245 ****
  fi
  
  echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
! echo "configure:1243: checking whether ln -s works" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 1248,1254 ----
  fi
  
  echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
! echo "configure:1252: checking whether ln -s works" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 1267,1278 ****
  # -----------------------------------------------------------------------
  
  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
! echo "configure:1271: checking for ANSI C header files" >&5
  if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1276 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  #include <stdarg.h>
--- 1276,1287 ----
  # -----------------------------------------------------------------------
  
  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
! echo "configure:1280: checking for ANSI C header files" >&5
  if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1285 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  #include <stdarg.h>
***************
*** 1280,1286 ****
  #include <float.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 1289,1295 ----
  #include <float.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 1297,1303 ****
  if test $ac_cv_header_stdc = yes; then
    # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  cat > conftest.$ac_ext <<EOF
! #line 1301 "configure"
  #include "confdefs.h"
  #include <string.h>
  EOF
--- 1306,1312 ----
  if test $ac_cv_header_stdc = yes; then
    # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  cat > conftest.$ac_ext <<EOF
! #line 1310 "configure"
  #include "confdefs.h"
  #include <string.h>
  EOF
***************
*** 1315,1321 ****
  if test $ac_cv_header_stdc = yes; then
    # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  cat > conftest.$ac_ext <<EOF
! #line 1319 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  EOF
--- 1324,1330 ----
  if test $ac_cv_header_stdc = yes; then
    # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  cat > conftest.$ac_ext <<EOF
! #line 1328 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  EOF
***************
*** 1336,1342 ****
    :
  else
    cat > conftest.$ac_ext <<EOF
! #line 1340 "configure"
  #include "confdefs.h"
  #include <ctype.h>
  #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
--- 1345,1351 ----
    :
  else
    cat > conftest.$ac_ext <<EOF
! #line 1349 "configure"
  #include "confdefs.h"
  #include <ctype.h>
  #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
***************
*** 1347,1353 ****
  exit (0); }
  
  EOF
! if { (eval echo configure:1351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    :
  else
--- 1356,1362 ----
  exit (0); }
  
  EOF
! if { (eval echo configure:1360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    :
  else
***************
*** 1371,1382 ****
  fi
  
  echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
! echo "configure:1375: checking for sys/wait.h that is POSIX.1 compatible" >&5
  if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1380 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/wait.h>
--- 1380,1391 ----
  fi
  
  echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
! echo "configure:1384: checking for sys/wait.h that is POSIX.1 compatible" >&5
  if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1389 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/wait.h>
***************
*** 1392,1398 ****
  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
  ; return 0; }
  EOF
! if { (eval echo configure:1396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_header_sys_wait_h=yes
  else
--- 1401,1407 ----
  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
  ; return 0; }
  EOF
! if { (eval echo configure:1405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_header_sys_wait_h=yes
  else
***************
*** 1413,1424 ****
  fi
  
  echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
! echo "configure:1417: checking whether time.h and sys/time.h may both be included" >&5
  if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1422 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/time.h>
--- 1422,1433 ----
  fi
  
  echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
! echo "configure:1426: checking whether time.h and sys/time.h may both be included" >&5
  if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1431 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/time.h>
***************
*** 1427,1433 ****
  struct tm *tp;
  ; return 0; }
  EOF
! if { (eval echo configure:1431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_header_time=yes
  else
--- 1436,1442 ----
  struct tm *tp;
  ; return 0; }
  EOF
! if { (eval echo configure:1440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_header_time=yes
  else
***************
*** 1451,1467 ****
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1455: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1460 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 1460,1476 ----
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1464: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1469 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 1491,1507 ****
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1495: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1500 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1505: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 1500,1516 ----
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1504: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1509 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 1531,1547 ****
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1535: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1540 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 1540,1556 ----
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1544: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1549 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 1571,1587 ****
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1575: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1580 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 1580,1596 ----
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1584: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1589 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1594: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 1618,1634 ****
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1622: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1627 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 1627,1643 ----
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1631: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1636 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1641: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 1663,1679 ****
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1667: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1672 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1677: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 1672,1688 ----
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1676: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1681 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 1701,1712 ****
  
  
  echo $ac_n "checking whether strdup is declared in header files""... $ac_c" 1>&6
! echo "configure:1705: checking whether strdup is declared in header files" >&5
  if eval "test \"`echo '$''{'blt_cv_decl_strdup'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1710 "configure"
  #include "confdefs.h"
  
  #ifdef HAVE_STDLIB_H
--- 1710,1721 ----
  
  
  echo $ac_n "checking whether strdup is declared in header files""... $ac_c" 1>&6
! echo "configure:1714: checking whether strdup is declared in header files" >&5
  if eval "test \"`echo '$''{'blt_cv_decl_strdup'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1719 "configure"
  #include "confdefs.h"
  
  #ifdef HAVE_STDLIB_H
***************
*** 1742,1753 ****
  echo "$ac_t""$blt_cv_decl_strdup" 1>&6
  
  echo $ac_n "checking whether drand48 is declared in header files""... $ac_c" 1>&6
! echo "configure:1746: checking whether drand48 is declared in header files" >&5
  if eval "test \"`echo '$''{'blt_cv_decl_drand48'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1751 "configure"
  #include "confdefs.h"
  
  #ifdef HAVE_STDLIB_H
--- 1751,1762 ----
  echo "$ac_t""$blt_cv_decl_strdup" 1>&6
  
  echo $ac_n "checking whether drand48 is declared in header files""... $ac_c" 1>&6
! echo "configure:1755: checking whether drand48 is declared in header files" >&5
  if eval "test \"`echo '$''{'blt_cv_decl_drand48'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1760 "configure"
  #include "confdefs.h"
  
  #ifdef HAVE_STDLIB_H
***************
*** 1783,1794 ****
  echo "$ac_t""$blt_cv_decl_drand48" 1>&6
  
  echo $ac_n "checking whether srand48 is declared in header files""... $ac_c" 1>&6
! echo "configure:1787: checking whether srand48 is declared in header files" >&5
  if eval "test \"`echo '$''{'blt_cv_decl_srand48'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1792 "configure"
  #include "confdefs.h"
  
  #ifdef HAVE_STDLIB_H
--- 1792,1803 ----
  echo "$ac_t""$blt_cv_decl_drand48" 1>&6
  
  echo $ac_n "checking whether srand48 is declared in header files""... $ac_c" 1>&6
! echo "configure:1796: checking whether srand48 is declared in header files" >&5
  if eval "test \"`echo '$''{'blt_cv_decl_srand48'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1801 "configure"
  #include "confdefs.h"
  
  #ifdef HAVE_STDLIB_H
***************
*** 1824,1835 ****
  echo "$ac_t""$blt_cv_decl_srand48" 1>&6
  
  echo $ac_n "checking whether j1 is declared in header files""... $ac_c" 1>&6
! echo "configure:1828: checking whether j1 is declared in header files" >&5
  if eval "test \"`echo '$''{'blt_cv_decl_j1'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1833 "configure"
  #include "confdefs.h"
  
  #ifdef HAVE_STDLIB_H
--- 1833,1844 ----
  echo "$ac_t""$blt_cv_decl_srand48" 1>&6
  
  echo $ac_n "checking whether j1 is declared in header files""... $ac_c" 1>&6
! echo "configure:1837: checking whether j1 is declared in header files" >&5
  if eval "test \"`echo '$''{'blt_cv_decl_j1'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1842 "configure"
  #include "confdefs.h"
  
  #ifdef HAVE_STDLIB_H
***************
*** 1873,1884 ****
  for ac_func in strdup drand48 srand48
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:1877: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1882 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
--- 1882,1893 ----
  for ac_func in strdup drand48 srand48
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:1886: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1891 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
***************
*** 1901,1907 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:1905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
--- 1910,1916 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:1914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
***************
*** 1933,1944 ****
  # -----------------------------------------------------------------------
  
  echo $ac_n "checking for size_t""... $ac_c" 1>&6
! echo "configure:1937: checking for size_t" >&5
  if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1942 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
--- 1942,1953 ----
  # -----------------------------------------------------------------------
  
  echo $ac_n "checking for size_t""... $ac_c" 1>&6
! echo "configure:1946: checking for size_t" >&5
  if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1951 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
***************
*** 1966,1977 ****
  fi
  
  echo $ac_n "checking for pid_t""... $ac_c" 1>&6
! echo "configure:1970: checking for pid_t" >&5
  if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1975 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
--- 1975,1986 ----
  fi
  
  echo $ac_n "checking for pid_t""... $ac_c" 1>&6
! echo "configure:1979: checking for pid_t" >&5
  if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 1984 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
***************
*** 1999,2012 ****
  fi
  
  echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
! echo "configure:2003: checking whether byte ordering is bigendian" >&5
  if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_cv_c_bigendian=unknown
  # See if sys/param.h defines the BYTE_ORDER macro.
  cat > conftest.$ac_ext <<EOF
! #line 2010 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/param.h>
--- 2008,2021 ----
  fi
  
  echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
! echo "configure:2012: checking whether byte ordering is bigendian" >&5
  if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_cv_c_bigendian=unknown
  # See if sys/param.h defines the BYTE_ORDER macro.
  cat > conftest.$ac_ext <<EOF
! #line 2019 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/param.h>
***************
*** 2017,2027 ****
  #endif
  ; return 0; }
  EOF
! if { (eval echo configure:2021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    # It does; now see whether it defined to BIG_ENDIAN or not.
  cat > conftest.$ac_ext <<EOF
! #line 2025 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/param.h>
--- 2026,2036 ----
  #endif
  ; return 0; }
  EOF
! if { (eval echo configure:2030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    # It does; now see whether it defined to BIG_ENDIAN or not.
  cat > conftest.$ac_ext <<EOF
! #line 2034 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/param.h>
***************
*** 2032,2038 ****
  #endif
  ; return 0; }
  EOF
! if { (eval echo configure:2036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_c_bigendian=yes
  else
--- 2041,2047 ----
  #endif
  ; return 0; }
  EOF
! if { (eval echo configure:2045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_c_bigendian=yes
  else
***************
*** 2052,2058 ****
      { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  else
    cat > conftest.$ac_ext <<EOF
! #line 2056 "configure"
  #include "confdefs.h"
  main () {
    /* Are we little or big endian?  From Harbison&Steele.  */
--- 2061,2067 ----
      { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  else
    cat > conftest.$ac_ext <<EOF
! #line 2065 "configure"
  #include "confdefs.h"
  main () {
    /* Are we little or big endian?  From Harbison&Steele.  */
***************
*** 2065,2071 ****
    exit (u.c[sizeof (long) - 1] == 1);
  }
  EOF
! if { (eval echo configure:2069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    ac_cv_c_bigendian=no
  else
--- 2074,2080 ----
    exit (u.c[sizeof (long) - 1] == 1);
  }
  EOF
! if { (eval echo configure:2078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    ac_cv_c_bigendian=no
  else
***************
*** 2099,2110 ****
  # -----------------------------------------------------------------------
  
  echo $ac_n "checking whether union wait is defined correctly""... $ac_c" 1>&6
! echo "configure:2103: checking whether union wait is defined correctly" >&5
  if eval "test \"`echo '$''{'blt_cv_struct_wait_works'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2108 "configure"
  #include "confdefs.h"
  #include <sys/types.h> 
  #include <sys/wait.h>
--- 2108,2119 ----
  # -----------------------------------------------------------------------
  
  echo $ac_n "checking whether union wait is defined correctly""... $ac_c" 1>&6
! echo "configure:2112: checking whether union wait is defined correctly" >&5
  if eval "test \"`echo '$''{'blt_cv_struct_wait_works'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2117 "configure"
  #include "confdefs.h"
  #include <sys/types.h> 
  #include <sys/wait.h>
***************
*** 2116,2122 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:2120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    blt_cv_struct_wait_works="yes"
  else
--- 2125,2131 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:2129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    blt_cv_struct_wait_works="yes"
  else
***************
*** 2145,2156 ****
  #--------------------------------------------------------------------
  
  echo $ac_n "checking whether DBL_EPSILON is defined in float.h""... $ac_c" 1>&6
! echo "configure:2149: checking whether DBL_EPSILON is defined in float.h" >&5
  if eval "test \"`echo '$''{'blt_cv_found_dbl_epsilon'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2154 "configure"
  #include "confdefs.h"
  
  #ifdef HAVE_FLOAT_H
--- 2154,2165 ----
  #--------------------------------------------------------------------
  
  echo $ac_n "checking whether DBL_EPSILON is defined in float.h""... $ac_c" 1>&6
! echo "configure:2158: checking whether DBL_EPSILON is defined in float.h" >&5
  if eval "test \"`echo '$''{'blt_cv_found_dbl_epsilon'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2163 "configure"
  #include "confdefs.h"
  
  #ifdef HAVE_FLOAT_H
***************
*** 2183,2194 ****
    oldFlags="$CFLAGS"
    CFLAGS="-g -lm"
    echo $ac_n "checking whether DBL_EPSILON can be computed""... $ac_c" 1>&6
! echo "configure:2187: checking whether DBL_EPSILON can be computed" >&5
    if test "$cross_compiling" = yes; then
      { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  else
  cat > conftest.$ac_ext <<EOF
! #line 2192 "configure"
  #include "confdefs.h"
  
  main () {
--- 2192,2203 ----
    oldFlags="$CFLAGS"
    CFLAGS="-g -lm"
    echo $ac_n "checking whether DBL_EPSILON can be computed""... $ac_c" 1>&6
! echo "configure:2196: checking whether DBL_EPSILON can be computed" >&5
    if test "$cross_compiling" = yes; then
      { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  else
  cat > conftest.$ac_ext <<EOF
! #line 2201 "configure"
  #include "confdefs.h"
  
  main () {
***************
*** 2229,2235 ****
  # Uses ac_ vars as temps to allow command line to override cache and checks.
  # --without-x overrides everything else, but does not touch the cache.
  echo $ac_n "checking for X""... $ac_c" 1>&6
! echo "configure:2233: checking for X" >&5
  
  # Check whether --with-x or --without-x was given.
  if test "${with_x+set}" = set; then
--- 2238,2244 ----
  # Uses ac_ vars as temps to allow command line to override cache and checks.
  # --without-x overrides everything else, but does not touch the cache.
  echo $ac_n "checking for X""... $ac_c" 1>&6
! echo "configure:2242: checking for X" >&5
  
  # Check whether --with-x or --without-x was given.
  if test "${with_x+set}" = set; then
***************
*** 2291,2302 ****
  
    # First, try using that file with no special directory specified.
  cat > conftest.$ac_ext <<EOF
! #line 2295 "configure"
  #include "confdefs.h"
  #include <$x_direct_test_include>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 2300,2311 ----
  
    # First, try using that file with no special directory specified.
  cat > conftest.$ac_ext <<EOF
! #line 2304 "configure"
  #include "confdefs.h"
  #include <$x_direct_test_include>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 2365,2378 ****
    ac_save_LIBS="$LIBS"
    LIBS="-l$x_direct_test_library $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2369 "configure"
  #include "confdefs.h"
  
  int main() {
  ${x_direct_test_function}()
  ; return 0; }
  EOF
! if { (eval echo configure:2376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    LIBS="$ac_save_LIBS"
  # We can link X programs with no special library path.
--- 2374,2387 ----
    ac_save_LIBS="$LIBS"
    LIBS="-l$x_direct_test_library $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2378 "configure"
  #include "confdefs.h"
  
  int main() {
  ${x_direct_test_function}()
  ; return 0; }
  EOF
! if { (eval echo configure:2385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    LIBS="$ac_save_LIBS"
  # We can link X programs with no special library path.
***************
*** 2466,2472 ****
  # -----------------------------------------------------------------------
  
  echo $ac_n "checking for tclConfig.sh""... $ac_c" 1>&6
! echo "configure:2470: checking for tclConfig.sh" >&5
  tclConfigFile=""
  if test "x$blt_with_tcl" != "x" ; then
    #
--- 2475,2481 ----
  # -----------------------------------------------------------------------
  
  echo $ac_n "checking for tclConfig.sh""... $ac_c" 1>&6
! echo "configure:2479: checking for tclConfig.sh" >&5
  tclConfigFile=""
  if test "x$blt_with_tcl" != "x" ; then
    #
***************
*** 2564,2570 ****
  # -----------------------------------------------------------------------
  
  echo $ac_n "checking for tkConfig.sh""... $ac_c" 1>&6
! echo "configure:2568: checking for tkConfig.sh" >&5
  tkConfigFile=""
  if test "x$blt_with_tk" != "x" -o "x$blt_with_tcl" != "x"; then
    #
--- 2573,2579 ----
  # -----------------------------------------------------------------------
  
  echo $ac_n "checking for tkConfig.sh""... $ac_c" 1>&6
! echo "configure:2577: checking for tkConfig.sh" >&5
  tkConfigFile=""
  if test "x$blt_with_tk" != "x" -o "x$blt_with_tcl" != "x"; then
    #
***************
*** 2712,2720 ****
  if test "${TK_INC_DIR}" != "/usr/include" ; then
    INC_SPECS="${INC_SPECS} -I${TK_INC_DIR}"
  fi
  if test "${TK_LIB_DIR}" = "/usr/lib" ; then
    LIB_SPECS="${LIB_SPECS} ${TK_LIB_SPEC}"
! else
    LIB_SPECS="${LIB_SPECS} -L${TK_LIB_DIR} ${TK_LIB_SPEC}"
    if test "x${LD_RUN_PATH}" = "x" ; then
      LD_RUN_PATH="${TK_LIB_DIR}"
--- 2721,2732 ----
  if test "${TK_INC_DIR}" != "/usr/include" ; then
    INC_SPECS="${INC_SPECS} -I${TK_INC_DIR}"
  fi
+ 
  if test "${TK_LIB_DIR}" = "/usr/lib" ; then
+   STUB_LIB_SPECS="${LIB_SPECS} ${TK_STUB_LIB_SPEC}"
    LIB_SPECS="${LIB_SPECS} ${TK_LIB_SPEC}"
!  else
!   STUB_LIB_SPECS="${LIB_SPECS} -L${TK_LIB_DIR} ${TK_STUB_LIB_SPEC}"
    LIB_SPECS="${LIB_SPECS} -L${TK_LIB_DIR} ${TK_LIB_SPEC}"
    if test "x${LD_RUN_PATH}" = "x" ; then
      LD_RUN_PATH="${TK_LIB_DIR}"
***************
*** 2739,2746 ****
--- 2751,2760 ----
  
  if test "${TCL_LIB_DIR}" = "/usr/lib" -o \
  	"${TCL_LIB_DIR}" = "${TK_LIB_DIR}" ; then
+   STUB_LIB_SPECS="${STUB_LIB_SPECS} ${TCL_STUB_LIB_SPEC}"
    LIB_SPECS="${LIB_SPECS} ${TCL_LIB_SPEC}"
  else
+   STUB_LIB_SPECS="${STUB_LIB_SPECS} -L${TCL_LIB_DIR} ${TCL_STUB_LIB_SPEC}"
    LIB_SPECS="${LIB_SPECS} -L${TCL_LIB_DIR} ${TCL_LIB_SPEC}"
    if test "x${LD_RUN_PATH}" = "x" ; then
      LD_RUN_PATH="${TCL_LIB_DIR}"
***************
*** 2749,2754 ****
--- 2763,2773 ----
    fi
  fi
  
+ if test "${blt_enable_stubs}" = "no" ; then
+   STUB_LIB_SPECS="${LIB_SPECS}"
+ fi
+ 
+ 
  # -----------------------------------------------------------------------
  # 
  # -lX11
***************
*** 2782,2793 ****
  for ac_func in XExtendedMaxRequestSize
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:2786: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2791 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
--- 2801,2812 ----
  for ac_func in XExtendedMaxRequestSize
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:2805: checking for $ac_func" >&5
  if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2810 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
***************
*** 2810,2816 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:2814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
--- 2829,2835 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:2833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_$ac_func=yes"
  else
***************
*** 2842,2848 ****
  #
  # -----------------------------------------------------------------------
  echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
! echo "configure:2846: checking for main in -lsocket" >&5
  ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 2861,2867 ----
  #
  # -----------------------------------------------------------------------
  echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
! echo "configure:2865: checking for main in -lsocket" >&5
  ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 2850,2863 ****
    ac_save_LIBS="$LIBS"
  LIBS="-lsocket  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2854 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:2861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 2869,2882 ----
    ac_save_LIBS="$LIBS"
  LIBS="-lsocket  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2873 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:2880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 2891,2897 ****
  #
  # -----------------------------------------------------------------------
  echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
! echo "configure:2895: checking for main in -lnsl" >&5
  ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 2910,2916 ----
  #
  # -----------------------------------------------------------------------
  echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
! echo "configure:2914: checking for main in -lnsl" >&5
  ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 2899,2912 ****
    ac_save_LIBS="$LIBS"
  LIBS="-lnsl  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2903 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:2910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 2918,2931 ----
    ac_save_LIBS="$LIBS"
  LIBS="-lnsl  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2922 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:2929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 2940,2946 ****
  #
  # -----------------------------------------------------------------------
  echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
! echo "configure:2944: checking for main in -lm" >&5
  ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 2959,2965 ----
  #
  # -----------------------------------------------------------------------
  echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
! echo "configure:2963: checking for main in -lm" >&5
  ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 2948,2961 ****
    ac_save_LIBS="$LIBS"
  LIBS="-lm  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2952 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:2959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 2967,2980 ----
    ac_save_LIBS="$LIBS"
  LIBS="-lm  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2971 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:2978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 2998,3004 ****
      LDFLAGS="-L${JPEG_LIB_DIR} ${LDFLAGS}"
    fi
    echo $ac_n "checking for jpeg_read_header in -ljpeg""... $ac_c" 1>&6
! echo "configure:3002: checking for jpeg_read_header in -ljpeg" >&5
  ac_lib_var=`echo jpeg'_'jpeg_read_header | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 3017,3023 ----
      LDFLAGS="-L${JPEG_LIB_DIR} ${LDFLAGS}"
    fi
    echo $ac_n "checking for jpeg_read_header in -ljpeg""... $ac_c" 1>&6
! echo "configure:3021: checking for jpeg_read_header in -ljpeg" >&5
  ac_lib_var=`echo jpeg'_'jpeg_read_header | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 3006,3012 ****
    ac_save_LIBS="$LIBS"
  LIBS="-ljpeg  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 3010 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
--- 3025,3031 ----
    ac_save_LIBS="$LIBS"
  LIBS="-ljpeg  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 3029 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
***************
*** 3017,3023 ****
  jpeg_read_header()
  ; return 0; }
  EOF
! if { (eval echo configure:3021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 3036,3042 ----
  jpeg_read_header()
  ; return 0; }
  EOF
! if { (eval echo configure:3040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 3081,3087 ****
  # Extract the first word of "$ac_prog", so it can be a program name with args.
  set dummy $ac_prog; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:3085: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 3100,3106 ----
  # Extract the first word of "$ac_prog", so it can be a program name with args.
  set dummy $ac_prog; ac_word=$2
  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:3104: checking for $ac_word" >&5
  if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 3111,3117 ****
  done
  
  echo $ac_n "checking BLT major version number""... $ac_c" 1>&6
! echo "configure:3115: checking BLT major version number" >&5
  if eval "test \"`echo '$''{'blt_cv_major_version'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 3130,3136 ----
  done
  
  echo $ac_n "checking BLT major version number""... $ac_c" 1>&6
! echo "configure:3134: checking BLT major version number" >&5
  if eval "test \"`echo '$''{'blt_cv_major_version'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 3127,3133 ****
  echo "$ac_t""$blt_cv_major_version" 1>&6
  
  echo $ac_n "checking BLT minor version number""... $ac_c" 1>&6
! echo "configure:3131: checking BLT minor version number" >&5
  if eval "test \"`echo '$''{'blt_cv_minor_version'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 3146,3152 ----
  echo "$ac_t""$blt_cv_major_version" 1>&6
  
  echo $ac_n "checking BLT minor version number""... $ac_c" 1>&6
! echo "configure:3150: checking BLT minor version number" >&5
  if eval "test \"`echo '$''{'blt_cv_minor_version'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 3244,3250 ****
        DEFINES="$DEFINES -D_HPUX_SOURCE"
      fi
      echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
! echo "configure:3248: checking for shl_load in -ldld" >&5
  ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 3263,3269 ----
        DEFINES="$DEFINES -D_HPUX_SOURCE"
      fi
      echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
! echo "configure:3267: checking for shl_load in -ldld" >&5
  ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 3252,3258 ****
    ac_save_LIBS="$LIBS"
  LIBS="-ldld  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 3256 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
--- 3271,3277 ----
    ac_save_LIBS="$LIBS"
  LIBS="-ldld  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 3275 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
***************
*** 3263,3269 ****
  shl_load()
  ; return 0; }
  EOF
! if { (eval echo configure:3267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 3282,3288 ----
  shl_load()
  ; return 0; }
  EOF
! if { (eval echo configure:3286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 3358,3374 ****
      # Not available on all versions:  check for include file.
      ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
! echo "configure:3362: checking for dlfcn.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3367 "configure"
  #include "confdefs.h"
  #include <dlfcn.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:3372: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 3377,3393 ----
      # Not available on all versions:  check for include file.
      ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
! echo "configure:3381: checking for dlfcn.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3386 "configure"
  #include "confdefs.h"
  #include <dlfcn.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:3391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 3513,3518 ****
--- 3532,3541 ----
    SHLIB_LD_LIBS=""
  fi
  
+ if test "${blt_enable_stubs}" != "no" ; then
+   SHLIB_CFLAGS="${SHLIB_CFLAGS} -DUSE_TCL_STUBS -DUSE_TK_STUBS"
+ fi
+ 
  if test "${buildShared}" = "yes" ; then
    SHLIB_TARGET="build_shared"
    
***************
*** 3538,3543 ****
--- 3561,3571 ----
  
  
  
+ 
+ 
+ 
+ 
+ 
  #--------------------------------------------------------------------
  #	Propagate prefix argument as installation directory.
  #--------------------------------------------------------------------
***************
*** 3737,3742 ****
--- 3765,3771 ----
  s%@INSTALL_DATA@%$INSTALL_DATA%g
  s%@RANLIB@%$RANLIB%g
  s%@LN_S@%$LN_S%g
+ s%@STUB_LIB_SPECS@%$STUB_LIB_SPECS%g
  s%@AWK@%$AWK%g
  s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
  s%@SHLIB_TARGET@%$SHLIB_TARGET%g
***************
*** 3752,3757 ****
--- 3781,3791 ----
  s%@BLT_MINOR_VERSION@%$BLT_MINOR_VERSION%g
  s%@BLT_VERSION@%$BLT_VERSION%g
  s%@AUX_LIBS@%$AUX_LIBS%g
+ s%@TCL_VERSION@%$TCL_VERSION%g
+ s%@TCL_PATCH_LEVEL@%$TCL_PATCH_LEVEL%g
+ s%@TK_VERSION@%$TK_VERSION%g
+ s%@TK_PATCH_LEVEL@%$TK_PATCH_LEVEL%g
+ s%@TCL_DEFS@%$TCL_DEFS%g
  s%@BLT_LIBRARY@%$BLT_LIBRARY%g
  
  CEOF
*** src/Makefile.in.orig	Tue Feb  8 22:40:26 2000
--- src/Makefile.in	Sun Feb 20 13:22:43 2000
***************
*** 8,15 ****
  
  BLT_LIBRARY =	@BLT_LIBRARY@
  CC =		@CC@
! CFLAGS =	@CFLAGS@ 
! DEFINES =	@DEFINES@
  DEF_BLTINIT =	-DBLT_LIBRARY=\"$(BLT_LIBRARY)\"
  EXTRA_CFLAGS =	@GCCFLAGS@
  LDFLAGS =	@LDFLAGS@
--- 8,15 ----
  
  BLT_LIBRARY =	@BLT_LIBRARY@
  CC =		@CC@
! CFLAGS =	@CFLAGS@
! DEFINES =	@DEFINES@ @TCL_DEFS@ -DUSE_OLD_CANVAS
  DEF_BLTINIT =	-DBLT_LIBRARY=\"$(BLT_LIBRARY)\"
  EXTRA_CFLAGS =	@GCCFLAGS@
  LDFLAGS =	@LDFLAGS@
*** src/bltBitmap.c.orig	Mon Jan 24 19:52:30 2000
--- src/bltBitmap.c	Sun Feb 20 12:45:02 2000
***************
*** 569,575 ****
      char *line, *nextline;
      register char *p;
      Tcl_RegExp re;
!     char *name, *value, *data;
      int len;
      int arraySize;
  
--- 569,575 ----
      char *line, *nextline;
      register char *p;
      Tcl_RegExp re;
!     char *name, *value, *data = NULL;
      int len;
      int arraySize;
  
*** src/bltCanvEps.c.orig	Tue Oct 26 06:29:46 1999
--- src/bltCanvEps.c	Sun Feb 20 12:45:03 2000
***************
*** 1737,1746 ****
  {
      "eps",			/* name */
      sizeof(EpsItem),		/* itemSize */
!     CreateEps,			/* createProc */
      configSpecs,		/* configSpecs */
!     ConfigureEps,		/* configureProc */
!     EpsCoords,			/* coordProc */
      DeleteEps,			/* deleteProc */
      DisplayEps,			/* displayProc */
      0,				/* alwaysRedraw */
--- 1737,1746 ----
  {
      "eps",			/* name */
      sizeof(EpsItem),		/* itemSize */
!     (Tk_ItemCreateProc *) CreateEps, /* createProc */
      configSpecs,		/* configSpecs */
!     (Tk_ItemConfigureProc *) ConfigureEps, /* configureProc */
!     (Tk_ItemCoordProc *) EpsCoords, /* coordProc */
      DeleteEps,			/* deleteProc */
      DisplayEps,			/* displayProc */
      0,				/* alwaysRedraw */
*** src/bltColor.c.orig	Thu Dec 16 22:51:30 1999
--- src/bltColor.c	Sun Feb 20 12:45:03 2000
***************
*** 432,438 ****
   *----------------------------------------------------------------------
   */
  static float
! Var(cubePtr, statsPtr)
      struct box *cubePtr;
      ColorStats *statsPtr;
  {
--- 432,438 ----
   *----------------------------------------------------------------------
   */
  static float
! Variance(cubePtr, statsPtr)
      struct box *cubePtr;
      ColorStats *statsPtr;
  {
***************
*** 897,905 ****
  		 * Volume test ensures we won't try to cut one-cell box
  		 */
  		vv[next] = (cubeArr[next].vol > 1) ?
! 		    Var(cubeArr + next, statsPtr) : 0.0;
  		vv[i] = (cubeArr[i].vol > 1) ?
! 		    Var(cubeArr + i, statsPtr) : 0.0;
  	    } else {
  		vv[next] = 0.0;	/* don't try to split this box again */
  		i--;		/* didn't create box i */
--- 897,905 ----
  		 * Volume test ensures we won't try to cut one-cell box
  		 */
  		vv[next] = (cubeArr[next].vol > 1) ?
! 		    Variance(cubeArr + next, statsPtr) : 0.0;
  		vv[i] = (cubeArr[i].vol > 1) ?
! 		    Variance(cubeArr + i, statsPtr) : 0.0;
  	    } else {
  		vv[next] = 0.0;	/* don't try to split this box again */
  		i--;		/* didn't create box i */
***************
*** 1092,1100 ****
  	     * Volume test ensures we won't try to cut one-cell box
  	     */
  	    vv[next] = (cubeArr[next].vol > 1) ?
! 		Var(cubeArr + next, statsPtr) : 0.0;
  	    vv[i] = (cubeArr[i].vol > 1) ?
! 		Var(cubeArr + i, statsPtr) : 0.0;
  	} else {
  	    vv[next] = 0.0;	/* don't try to split this box again */
  	    i--;		/* didn't create box i */
--- 1092,1100 ----
  	     * Volume test ensures we won't try to cut one-cell box
  	     */
  	    vv[next] = (cubeArr[next].vol > 1) ?
! 		Variance(cubeArr + next, statsPtr) : 0.0;
  	    vv[i] = (cubeArr[i].vol > 1) ?
! 		Variance(cubeArr + i, statsPtr) : 0.0;
  	} else {
  	    vv[next] = 0.0;	/* don't try to split this box again */
  	    i--;		/* didn't create box i */
*** src/bltGrLine.c.orig	Wed Jan 12 21:16:26 2000
--- src/bltGrLine.c	Sun Feb 20 12:46:26 2000
***************
*** 163,169 ****
      int *indexArr;		/* Reverse mapping of screen
  				 * coordinate indices back to their
  				 * data coordinates */
! } Trace;
  
  typedef struct LinePen {
      char *name;			/* Pen style identifier.  Statically allocated
--- 163,169 ----
      int *indexArr;		/* Reverse mapping of screen
  				 * coordinate indices back to their
  				 * data coordinates */
! } TraceStruct;
  
  typedef struct LinePen {
      char *name;			/* Pen style identifier.  Statically allocated
***************
*** 2207,2218 ****
      int length;			/* Number of points forming the trace */
      MapInfo *tmpPtr;
  {
!     Trace *tracePtr;
      XPoint *pointArr;
      int *indexArr;
      register int i, j;
  
!     tracePtr = (Trace *)malloc(sizeof(Trace));
      assert(tracePtr);
      pointArr = (XPoint *)malloc(sizeof(XPoint) * length);
      assert(pointArr);
--- 2207,2218 ----
      int length;			/* Number of points forming the trace */
      MapInfo *tmpPtr;
  {
!     TraceStruct *tracePtr;
      XPoint *pointArr;
      int *indexArr;
      register int i, j;
  
!     tracePtr = (TraceStruct *)malloc(sizeof(TraceStruct));
      assert(tracePtr);
      pointArr = (XPoint *)malloc(sizeof(XPoint) * length);
      assert(pointArr);
***************
*** 2261,2271 ****
      Line *linePtr;
  {
      Blt_ChainLink *linkPtr;
!     Trace *tracePtr;
  
      for (linkPtr = Blt_ChainFirstLink(linePtr->chainPtr); linkPtr != NULL;
  	linkPtr = Blt_ChainNextLink(linkPtr)) {
! 	tracePtr = (Trace *)Blt_ChainGetValue(linkPtr);
  	free((char *)tracePtr->indexArr);
  	free((char *)tracePtr->pointArr);
  	free((char *)tracePtr);
--- 2261,2271 ----
      Line *linePtr;
  {
      Blt_ChainLink *linkPtr;
!     TraceStruct *tracePtr;
  
      for (linkPtr = Blt_ChainFirstLink(linePtr->chainPtr); linkPtr != NULL;
  	linkPtr = Blt_ChainNextLink(linkPtr)) {
! 	tracePtr = (TraceStruct *)Blt_ChainGetValue(linkPtr);
  	free((char *)tracePtr->indexArr);
  	free((char *)tracePtr->pointArr);
  	free((char *)tracePtr);
***************
*** 2610,2622 ****
      XPoint *p, *q;
      register int i;
      int isearch = 0;
!     Trace *tracePtr;
      Blt_ChainLink *linkPtr;
  
      minDist = searchPtr->dist;
      for (linkPtr = Blt_ChainFirstLink(linePtr->chainPtr); linkPtr != NULL;
  	linkPtr = Blt_ChainNextLink(linkPtr)) {
! 	tracePtr = (Trace *)Blt_ChainGetValue(linkPtr);
  	p = tracePtr->pointArr, q = p + 1;
  	for (i = 0; i < (tracePtr->nPoints - 1); i++, p++, q++) {
  	    dist = (*distProc)(searchPtr->x, searchPtr->y, 
--- 2610,2622 ----
      XPoint *p, *q;
      register int i;
      int isearch = 0;
!     TraceStruct *tracePtr;
      Blt_ChainLink *linkPtr;
  
      minDist = searchPtr->dist;
      for (linkPtr = Blt_ChainFirstLink(linePtr->chainPtr); linkPtr != NULL;
  	linkPtr = Blt_ChainNextLink(linkPtr)) {
! 	tracePtr = (TraceStruct *)Blt_ChainGetValue(linkPtr);
  	p = tracePtr->pointArr, q = p + 1;
  	for (i = 0; i < (tracePtr->nPoints - 1); i++, p++, q++) {
  	    dist = (*distProc)(searchPtr->x, searchPtr->y, 
***************
*** 3595,3601 ****
      LinePen *penPtr;
  {
      Blt_ChainLink *linkPtr;
!     Trace *tracePtr;
      int size, n;
      register int i;
      int start, extra;
--- 3595,3601 ----
      LinePen *penPtr;
  {
      Blt_ChainLink *linkPtr;
!     TraceStruct *tracePtr;
      int size, n;
      register int i;
      int start, extra;
***************
*** 3603,3609 ****
      size = ((Blt_MaxRequestSize(graphPtr->display) * 4) / sizeof(XPoint)) - 2;
      for (linkPtr = Blt_ChainFirstLink(linePtr->chainPtr); linkPtr != NULL;
  	linkPtr = Blt_ChainNextLink(linkPtr)) {
! 	tracePtr = (Trace *)Blt_ChainGetValue(linkPtr);
  
  	/*
  	 * If the trace has to be split into separate XDrawLines
--- 3603,3609 ----
      size = ((Blt_MaxRequestSize(graphPtr->display) * 4) / sizeof(XPoint)) - 2;
      for (linkPtr = Blt_ChainFirstLink(linePtr->chainPtr); linkPtr != NULL;
  	linkPtr = Blt_ChainNextLink(linkPtr)) {
! 	tracePtr = (TraceStruct *)Blt_ChainGetValue(linkPtr);
  
  	/*
  	 * If the trace has to be split into separate XDrawLines
***************
*** 3993,4004 ****
      LinePen *penPtr;
  {
      Blt_ChainLink *linkPtr;
!     Trace *tracePtr;
  
      SetLineAttributes(printable, penPtr);
      for (linkPtr = Blt_ChainFirstLink(linePtr->chainPtr); linkPtr != NULL;
  	linkPtr = Blt_ChainNextLink(linkPtr)) {
! 	tracePtr = (Trace *)Blt_ChainGetValue(linkPtr);
  	Blt_PrintLine(printable, tracePtr->pointArr, tracePtr->nPoints);
      }
  }
--- 3993,4004 ----
      LinePen *penPtr;
  {
      Blt_ChainLink *linkPtr;
!     TraceStruct *tracePtr;
  
      SetLineAttributes(printable, penPtr);
      for (linkPtr = Blt_ChainFirstLink(linePtr->chainPtr); linkPtr != NULL;
  	linkPtr = Blt_ChainNextLink(linkPtr)) {
! 	tracePtr = (TraceStruct *)Blt_ChainGetValue(linkPtr);
  	Blt_PrintLine(printable, tracePtr->pointArr, tracePtr->nPoints);
      }
  }
*** src/bltImage.c.orig	Sun Feb 20 14:10:22 2000
--- src/bltImage.c	Sun Feb 20 14:15:19 2000
***************
*** 278,283 ****
--- 278,286 ----
      height = ColorimageHeight(image);
  
      Tk_PhotoGetImage(photo, &dest);
+     if (dest.pixelSize > 3) {
+ 	dest.offset[3] = 0;
+     }
      dest.pixelSize = sizeof(Pix32);
      dest.pitch = sizeof(Pix32) * width;
      dest.width = width;
***************
*** 315,320 ****
--- 318,326 ----
      register int x, y;
  
      Tk_PhotoGetImage(photo, &src);
+     if (src.pixelSize > 3) {
+ 	src.offset[3] = 0;
+     }
      if (regionPtr->width < 1) {
  	regionPtr->width = src.width;
      }
***************
*** 1380,1385 ****
--- 1386,1397 ----
  
      Tk_PhotoGetImage(srcPhoto, &src);
      Tk_PhotoGetImage(destPhoto, &dest);
+     if (src.pixelSize > 3) {
+ 	src.offset[3] = 0;
+     }
+     if (dest.pixelSize > 3) {
+ 	dest.offset[3] = 0;
+     }
  
      if (srcRegionPtr->width < 1) {
  	srcRegionPtr->width = src.width;
***************
*** 1441,1446 ****
--- 1453,1464 ----
  
      Tk_PhotoGetImage(srcPhoto, &src);
      Tk_PhotoGetImage(destPhoto, &dest);
+     if (src.pixelSize > 3) {
+ 	src.offset[3] = 0;
+     }
+     if (dest.pixelSize > 3) {
+ 	dest.offset[3] = 0;
+     }
  
      if (srcRegionPtr->width < 1) {
  	srcRegionPtr->width = src.width;
*** src/bltInit.c.orig	Wed Jan 12 21:16:27 2000
--- src/bltInit.c	Sun Feb 20 12:45:03 2000
***************
*** 27,32 ****
--- 27,42 ----
  
  #include <bltInt.h>
  
+ #ifndef USE_TCL_STUBS
+ #undef Tcl_InitStubs
+ #define Tcl_InitStubs(a,b,c) Tcl_PkgRequire(a,"Tcl",TCL_VERSION,1)
+ #endif
+ 
+ #ifndef USE_TK_STUBS
+ #undef Tk_InitStubs
+ #define Tk_InitStubs(a,b,c) Tcl_PkgRequire(a,"Tk",TK_VERSION,1)
+ #endif
+ 
  #ifdef __STDC__
  static Tcl_MathProc MinMathProc, MaxMathProc;
  #endif
***************
*** 253,283 ****
  {
      Tcl_DString ds;
      char *value;
- #define EXACT 1
  
!     /*
!      * Check that the versions of Tcl/Tk that have been loaded are the 
!      * same ones that BLT was compiled against.
!      */
! #ifdef USE_TCL_STUBS
!      if (Tcl_InitStubs(interp, TCL_VERSION, EXACT) == NULL) {
  	 return TCL_ERROR;
       }
! #else 
!     if (Tcl_PkgRequire(interp, "Tcl", TCL_VERSION, EXACT) == NULL) {
! 	return TCL_ERROR;
!     }
! #endif /* USE_TCL_STUBS */
! 
! #ifdef USE_TK_STUBS
!      if (Tk_InitStubs(interp, TK_VERSION, EXACT) == NULL) {
  	 return TCL_ERROR;
       }
- #else
-     if (Tcl_PkgRequire(interp, "Tk", TK_VERSION, EXACT) == NULL) {
- 	return TCL_ERROR;
-     }
- #endif /* USE_TK_STUBS */
  
      /* Set the version variable. We'll use it in the following script. */
      value = Tcl_SetVar(interp, "blt_version", BLT_VERSION, TCL_GLOBAL_ONLY);
--- 263,275 ----
  {
      Tcl_DString ds;
      char *value;
  
!      if (Tcl_InitStubs(interp, "8.1", 0) == NULL) {
  	 return TCL_ERROR;
       }
!      if (Tk_InitStubs(interp, "8.1", 0) == NULL) {
  	 return TCL_ERROR;
       }
  
      /* Set the version variable. We'll use it in the following script. */
      value = Tcl_SetVar(interp, "blt_version", BLT_VERSION, TCL_GLOBAL_ONLY);
*** src/bltInt.h.orig	Mon Jan 24 19:52:31 2000
--- src/bltInt.h	Sun Feb 20 12:45:03 2000
***************
*** 34,47 ****
--- 34,54 ----
  #include <windowsx.h>
  #endif /* WIN32 */
  
+ #ifdef USE_TCL_STUBS
+ #include "tclInt.h"
+ #include "tkInt.h"
+ #else
  #include <tcl.h>
  #include <tk.h>
+ #endif
  
  #define _VERSION(a,b,c)	    (((a) << 16) + ((b) << 8) + (c))
  #define TCL_VERSION_NUMBER _VERSION(TCL_MAJOR_VERSION, TCL_MINOR_VERSION, TCL_RELEASE_SERIAL)
  #define TK_VERSION_NUMBER _VERSION(TK_MAJOR_VERSION, TK_MINOR_VERSION, TK_RELEASE_SERIAL)
  
+ #ifndef USE_TCL_STUBS
  #include "bltTkInt.h"
+ #endif
  
  #include <stdio.h>
  #include <assert.h>
***************
*** 889,894 ****
--- 896,903 ----
  #define TCL_NAMESPACE_ONLY TCL_GLOBAL_ONLY
  #endif
  
+ #if !defined(USE_TCL_STUBS)
+ 
  EXTERN Tcl_Namespace *Tcl_GetCurrentNamespace _ANSI_ARGS_((Tcl_Interp *interp));
  EXTERN Tcl_Namespace *Tcl_GetGlobalNamespace _ANSI_ARGS_((Tcl_Interp *interp));
  EXTERN Tcl_Command Tcl_FindCommand _ANSI_ARGS_((Tcl_Interp *interp,
***************
*** 916,925 ****
  EXTERN int Tcl_PushCallFrame _ANSI_ARGS_((Tcl_Interp *interp,
  	Tcl_CallFrame * framePtr, Tcl_Namespace *nsPtr, int isProcCallFrame));
  
  extern Tcl_HashTable *Blt_GetArrayVariableTable _ANSI_ARGS_((
  	Tcl_Interp *interp, char *varName, int flags));
- 
- #endif /* TCL_MAJOR_VERSION >= 8 */
  
  extern Tcl_Namespace *Blt_NamespaceOfVariable _ANSI_ARGS_((Tcl_Interp *interp,
  	char *varName));
--- 925,936 ----
  EXTERN int Tcl_PushCallFrame _ANSI_ARGS_((Tcl_Interp *interp,
  	Tcl_CallFrame * framePtr, Tcl_Namespace *nsPtr, int isProcCallFrame));
  
+ #endif /* TCL_MAJOR_VERSION >= 8 */
+ 
+ #endif /* USE_TCL_STUBS */
+ 
  extern Tcl_HashTable *Blt_GetArrayVariableTable _ANSI_ARGS_((
  	Tcl_Interp *interp, char *varName, int flags));
  
  extern Tcl_Namespace *Blt_NamespaceOfVariable _ANSI_ARGS_((Tcl_Interp *interp,
  	char *varName));
*** src/bltNsUtil.c.orig	Fri Oct  8 08:40:46 1999
--- src/bltNsUtil.c	Sun Feb 20 12:45:03 2000
***************
*** 215,220 ****
--- 215,221 ----
  struct VarTrace;
  struct ArraySearch;
  
+ #ifndef USE_TCL_STUBS
  typedef struct Var {
      union {
  	Tcl_Obj *objPtr;
***************
*** 232,237 ****
--- 233,239 ----
  
  extern Var *TclLookupVar _ANSI_ARGS_((Tcl_Interp *interp, char *part1, char *part2,
  	int flags, char *mesg, int p1Flags, int p2Flags, Var ** varPtrPtr));
+ #endif
  
  #define VAR_SCALAR		0x1
  #define VAR_ARRAY		0x2
***************
*** 275,281 ****
      if (varPtr == NULL) {
  	return NULL;
      }
!     return varPtr->nsPtr;
  }
  
  Tcl_CallFrame *
--- 277,283 ----
      if (varPtr == NULL) {
  	return NULL;
      }
!     return (Tcl_Namespace *) varPtr->nsPtr;
  }
  
  Tcl_CallFrame *
*** src/bltParse.c.orig	Wed Oct 27 02:05:48 1999
--- src/bltParse.c	Sun Feb 20 12:45:03 2000
***************
*** 20,26 ****
--- 20,29 ----
  #include <bltInt.h>
  
  #if (TCL_VERSION_NUMBER >= _VERSION(8,1,0))
+ 
+ #ifndef USE_TCL_STUBS
  #include "bltInterp.h"
+ #endif
  
  /*
   * A table used to classify input characters to assist in parsing
*** src/bltPs.c.orig	Wed Oct 27 03:38:11 1999
--- src/bltPs.c	Sun Feb 20 12:45:03 2000
***************
*** 28,33 ****
--- 28,38 ----
  #include "bltInt.h"
  #include "bltPs.h"
  
+ #ifdef USE_TCL_STUBS
+ #include "tk3d.h"
+ #include "tkFont.h"
+ #endif
+ 
  #include <X11/Xutil.h>
  #include <X11/Xatom.h>
  #if defined(__STDC__)
***************
*** 835,841 ****
  	return;
      }
      if ((relief == TK_RELIEF_SOLID) ||
! 	(borderPtr->lightColor == NULL) || (borderPtr->darkColor == NULL)) {
  	if (relief == TK_RELIEF_SOLID) {
  	    darkColor.red = darkColor.blue = darkColor.green = 0x00;
  	    lightColor.red = lightColor.blue = lightColor.green = 0x00;
--- 840,846 ----
  	return;
      }
      if ((relief == TK_RELIEF_SOLID) ||
! 	(borderPtr->lightColorPtr == NULL) || (borderPtr->darkColorPtr == NULL)) {
  	if (relief == TK_RELIEF_SOLID) {
  	    darkColor.red = darkColor.blue = darkColor.green = 0x00;
  	    lightColor.red = lightColor.blue = lightColor.green = 0x00;
***************
*** 843,849 ****
  	} else {
  	    Screen *screenPtr;
  
! 	    lightColor = *borderPtr->bgColor;
  	    screenPtr = Tk_Screen(printable->tkwin);
  	    if (lightColor.pixel == WhitePixelOfScreen(screenPtr)) {
  		darkColor.red = darkColor.blue = darkColor.green = 0x00;
--- 848,854 ----
  	} else {
  	    Screen *screenPtr;
  
! 	    lightColor = *borderPtr->bgColorPtr;
  	    screenPtr = Tk_Screen(printable->tkwin);
  	    if (lightColor.pixel == WhitePixelOfScreen(screenPtr)) {
  		darkColor.red = darkColor.blue = darkColor.green = 0x00;
***************
*** 854,861 ****
  	lightColorPtr = &lightColor;
  	darkColorPtr = &darkColor;
      } else {
! 	lightColorPtr = borderPtr->lightColor;
! 	darkColorPtr = borderPtr->darkColor;
      }
  
  
--- 859,866 ----
  	lightColorPtr = &lightColor;
  	darkColorPtr = &darkColor;
      } else {
! 	lightColorPtr = borderPtr->lightColorPtr;
! 	darkColorPtr = borderPtr->darkColorPtr;
      }
  
  
***************
*** 885,891 ****
  	topColor = darkColorPtr;
  	bottomColor = lightColorPtr;
      } else {
! 	topColor = bottomColor = borderPtr->bgColor;
      }
      Blt_BackgroundToPostScript(printable, bottomColor);
      Blt_RectangleToPostScript(printable, x, y + height - borderWidth, width,
--- 890,896 ----
  	topColor = darkColorPtr;
  	bottomColor = lightColorPtr;
      } else {
! 	topColor = bottomColor = borderPtr->bgColorPtr;
      }
      Blt_BackgroundToPostScript(printable, bottomColor);
      Blt_RectangleToPostScript(printable, x, y + height - borderWidth, width,
***************
*** 925,931 ****
       * Setting the pen color as foreground or background only affects
       * the plot when the colormode option is "monochrome".
       */
!     Blt_BackgroundToPostScript(printable, borderPtr->bgColor);
      Blt_RectangleToPostScript(printable, x, y, width, height);
      Blt_Draw3DRectangleToPostScript(printable, border, x, y, width, height,
  	borderWidth, relief);
--- 930,936 ----
       * Setting the pen color as foreground or background only affects
       * the plot when the colormode option is "monochrome".
       */
!     Blt_BackgroundToPostScript(printable, borderPtr->bgColorPtr);
      Blt_RectangleToPostScript(printable, x, y, width, height);
      Blt_Draw3DRectangleToPostScript(printable, border, x, y, width, height,
  	borderWidth, relief);
*** src/bltText.c.orig	Mon Jan 24 19:52:31 2000
--- src/bltText.c	Sun Feb 20 12:45:03 2000
***************
*** 28,33 ****
--- 28,37 ----
  #include "bltInt.h"
  #include <X11/Xutil.h>
  
+ #ifdef USE_TCL_STUBS
+ #include "tk3d.h"
+ #endif
+ 
  #define WINDEBUG	0
  
  
***************
*** 1213,1219 ****
  	    TkBorder *borderPtr = (TkBorder *) stylePtr->border;
  	    XColor *color1, *color2;
  
! 	    color1 = borderPtr->lightColor, color2 = borderPtr->darkColor;
  	    if (stylePtr->state & STATE_EMPHASIS) {
  		XColor *hold;
  
--- 1217,1223 ----
  	    TkBorder *borderPtr = (TkBorder *) stylePtr->border;
  	    XColor *color1, *color2;
  
! 	    color1 = borderPtr->lightColorPtr, color2 = borderPtr->darkColorPtr;
  	    if (stylePtr->state & STATE_EMPHASIS) {
  		XColor *hold;
  
***************
*** 1278,1284 ****
  	TkBorder *borderPtr = (TkBorder *) stylePtr->border;
  	XColor *color1, *color2;
  
! 	color1 = borderPtr->lightColor, color2 = borderPtr->darkColor;
  	if (stylePtr->state & STATE_EMPHASIS) {
  	    XColor *hold;
  
--- 1282,1288 ----
  	TkBorder *borderPtr = (TkBorder *) stylePtr->border;
  	XColor *color1, *color2;
  
! 	color1 = borderPtr->lightColorPtr, color2 = borderPtr->darkColorPtr;
  	if (stylePtr->state & STATE_EMPHASIS) {
  	    XColor *hold;
  
*** src/bltTkInt.h.orig	Fri Oct  8 08:40:46 1999
--- src/bltTkInt.h	Sun Feb 20 12:45:03 2000
***************
*** 203,214 ****
      int objRefCount;		/* The number of Tcl objects that reference
  				 * this structure. */
  #endif /* TK_VERSION_NUMBER >= 8.1.0 */
!     XColor *bgColor;		/* Background color (intensity between 
  				 * lightColorPtr and darkColorPtr). */
!     XColor *darkColor;		/* Color for darker areas (must free when
  				 * deleting structure). NULL means shadows
  				 * haven't been allocated yet.*/
!     XColor *lightColor;		/* Color used for lighter areas of border
  				 * (must free this when deleting structure).
  				 * NULL means shadows haven't been allocated
  				 * yet. */
--- 203,214 ----
      int objRefCount;		/* The number of Tcl objects that reference
  				 * this structure. */
  #endif /* TK_VERSION_NUMBER >= 8.1.0 */
!     XColor *bgColorPtr;		/* Background color (intensity between 
  				 * lightColorPtr and darkColorPtr). */
!     XColor *darkColorPtr;	/* Color for darker areas (must free when
  				 * deleting structure). NULL means shadows
  				 * haven't been allocated yet.*/
!     XColor *lightColorPtr;	/* Color used for lighter areas of border
  				 * (must free this when deleting structure).
  				 * NULL means shadows haven't been allocated
  				 * yet. */
*** src/bltUnixMain.c.orig	Thu Dec 16 22:51:30 1999
--- src/bltUnixMain.c	Sun Feb 20 12:45:03 2000
***************
*** 45,50 ****
--- 45,53 ----
   * software.
   */
  
+ #undef USE_TCL_STUBS
+ #undef USE_TK_STUBS
+ 
  #include <tcl.h>
  #include <tk.h>
  
*** src/bltVector.c.orig	Mon Jan 24 19:52:31 2000
--- src/bltVector.c	Sun Feb 20 12:45:04 2000
***************
*** 348,353 ****
--- 348,354 ----
   *	space runs out.
   */
  
+ #ifndef USE_TCL_STUBS
  typedef struct ParseValue {
      char *buffer;		/* Address of first character in
  				 * output buffer. */
***************
*** 361,366 ****
--- 362,368 ----
      ClientData clientData;	/* Arbitrary information for use of
  				 * expandProc. */
  } ParseValue;
+ #endif
  
  typedef struct {
      Vector *vPtr;
*** src/bltWinMain.c.orig	Fri Oct  8 08:40:46 1999
--- src/bltWinMain.c	Sun Feb 20 12:45:04 2000
***************
*** 11,16 ****
--- 11,19 ----
   * SCCS: @(#) winMain.c 1.37 98/01/20 22:47:06
   */
  
+ #undef USE_TCL_STUBS
+ #undef USE_TK_STUBS
+ 
  #include "bltInt.h"
  #include <locale.h>
  
*** src/bltWindow.c.orig	Mon Jan 24 19:52:32 2000
--- src/bltWindow.c	Sun Feb 20 12:45:04 2000
***************
*** 37,42 ****
--- 37,43 ----
  struct TkSelectionInfo;
  struct TkClipboardTarget;
  
+ #ifndef USE_TCL_STUBS
  typedef struct TkWindow TkWindow;
  typedef struct TkMainInfo TkMainInfo;
  typedef struct TkEventHandler TkEventHandler;
***************
*** 757,762 ****
--- 758,765 ----
  #endif
      TkWindowPrivate *privatePtr;
  };
+ 
+ #endif /* !USE_TCL_STUBS */
  
  #ifdef WIN32
  /*
*** src/bltWinop.c.orig	Sun Feb 20 14:08:36 2000
--- src/bltWinop.c	Sun Feb 20 14:20:00 2000
***************
*** 546,551 ****
--- 546,554 ----
  	dest.offset[0] = src.offset[0];
  	dest.offset[1] = src.offset[1];
  	dest.offset[2] = src.offset[2];
+ 	if (src.pixelSize > 3) {
+ 	    dest.offset[3] = src.offset[3];
+ 	}
  	Tk_PhotoPutBlock(destPhoto, &dest, 0, 0, dest.width, dest.height);
  	return TCL_OK;
      }
*** src/tkButton.c.orig	Tue Oct 12 02:19:27 1999
--- src/tkButton.c	Sun Feb 20 12:45:04 2000
***************
*** 502,513 ****
--- 502,517 ----
  static Tcl_CmdProc ButtonCmd, LabelCmd, CheckbuttonCmd, RadiobuttonCmd;
  #endif
  
+ #ifndef USE_TCL_STUBS
+ 
  EXTERN int TkCopyAndGlobalEval _ANSI_ARGS_((Tcl_Interp *interp, char *script));
  
  #if (TK_MAJOR_VERSION > 4)
  EXTERN void TkComputeAnchor _ANSI_ARGS_((Tk_Anchor anchor, Tk_Window tkwin, 
  	int padX, int padY, int innerWidth, int innerHeight, int *xPtr, 
  	int *yPtr));
+ #endif
+ 
  #endif
  
  #if (TK_MAJOR_VERSION == 4)
*** src/tkFrame.c.orig	Tue Oct 12 02:19:27 1999
--- src/tkFrame.c	Sun Feb 20 12:45:04 2000
***************
*** 227,232 ****
--- 227,236 ----
  static Tcl_CmdProc FrameCmd, ToplevelCmd;
  #endif
  
+ #ifdef USE_TCL_STUBS
+ #undef TkCreateFrame
+ #endif
+ 
  #ifdef TILE_MAINWINDOW
  EXTERN
  #else
***************
*** 236,241 ****
--- 240,247 ----
  	Tcl_Interp *interp, int argc, char **argv,
  	int toplevel, char *appName));
  
+ #ifndef USE_TCL_STUBS
+ 
  EXTERN void TkSetWindowMenuBar _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window tkwin,
          char *oldMenuName, char *menuName));
  
***************
*** 248,253 ****
--- 254,262 ----
  EXTERN int TkpUseWindow _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, 
  	char * string));
  EXTERN void TkpMakeContainer _ANSI_ARGS_((Tk_Window tkwin));
+ 
+ #endif
+ 
  
  
  /*
*** src/shared/Makefile.in.orig	Tue Feb  8 22:40:26 2000
--- src/shared/Makefile.in	Sun Feb 20 13:25:07 2000
***************
*** 11,24 ****
  # ------------------------------------------------------------------------
  
  CC =		@CC@
! CFLAGS =	@CFLAGS@ 
  EXTRA_CFLAGS =	@GCCFLAGS@ @SHLIB_CFLAGS@
! DEFINES =	@DEFINES@
  DEF_BLTINIT =	-DBLT_LIBRARY=\"$(scriptdir)\"
  SHLIB_LD_FLAGS = @SHLIB_LD_FLAGS@ 
! SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ 
  SHLIB_LD =	@SHLIB_LD@
  LDFLAGS =	@LDFLAGS@
  
  prefix =	@prefix@
  exec_prefix =	@exec_prefix@
--- 11,26 ----
  # ------------------------------------------------------------------------
  
  CC =		@CC@
! CFLAGS =	@CFLAGS@
  EXTRA_CFLAGS =	@GCCFLAGS@ @SHLIB_CFLAGS@
! DEFINES =	@DEFINES@ @TCL_DEFS@ -DUSE_OLD_CANVAS
  DEF_BLTINIT =	-DBLT_LIBRARY=\"$(scriptdir)\"
  SHLIB_LD_FLAGS = @SHLIB_LD_FLAGS@ 
! SHLIB_LD_LIBS = @STUB_LIB_SPECS@ 
  SHLIB_LD =	@SHLIB_LD@
  LDFLAGS =	@LDFLAGS@
+ TCL_INCLUDES =	-I$(srcdir)/../../tcl@TCL_VERSION@@TCL_PATCH_LEVEL@/generic
+ TK_INCLUDES =	-I$(srcdir)/../../tk@TK_VERSION@@TK_PATCH_LEVEL@/generic
  
  prefix =	@prefix@
  exec_prefix =	@exec_prefix@
***************
*** 55,61 ****
  		bltUnixPipe.o bltUtil.o bltWindow.o \
  		$(TREE_OBJS) $(TK_OBJS) $(N_OBJS) 
  
! INCLUDES =	-I.. -I$(srcdir) -I$(srcdir)/.. @INCLUDES@
  CC_SWITCHES =	$(EXTRA_CFLAGS) $(CFLAGS) $(DEFINES) $(INCLUDES)
  INSTALL =	@INSTALL@
  INSTALL_DATA =	@INSTALL_DATA@
--- 57,63 ----
  		bltUnixPipe.o bltUtil.o bltWindow.o \
  		$(TREE_OBJS) $(TK_OBJS) $(N_OBJS) 
  
! INCLUDES =	-I.. -I$(srcdir) -I$(srcdir)/.. @INCLUDES@ ${TCL_INCLUDES} ${TK_INCLUDES}
  CC_SWITCHES =	$(EXTRA_CFLAGS) $(CFLAGS) $(DEFINES) $(INCLUDES)
  INSTALL =	@INSTALL@
  INSTALL_DATA =	@INSTALL_DATA@
