BLT_PATCHES -   11/22/1999

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

*** bltpatch.orig	Mon Nov 22 00:34:46 1999
--- bltpatch	Mon Nov 22 00:34:33 1999
***************
*** 0 ****
--- 1,47 ----
+ #!/bin/sh
+ # The next line restarts using tclsh8.2 \
+ exec tclsh8.2 $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.4m. It should be
+ applied by running the \"patch\" program in the top-level
+ directory of a clean Blt2.4m 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	Sun Nov 21 16:34:23 1999
--- configure.in	Sun Nov 21 19:17:50 1999
***************
*** 28,39 ****
  
  AC_ARG_WITH(tcl, [  --with-tcl=DIR          find Tcl headers and libraries in DIR],
    blt_with_tcl=$withval)
! AC_ARG_WITH(tk, [  --with-tk=DIR          find Tk headers and libraries in DIR],
    blt_with_tk=$withval)
! AC_ARG_ENABLE(jpeg, [  --enable-jpeg=DIR          find JPEG headers and libraries in DIR], [
    unset ac_cv_header_jpeglib_h
    unset ac_cv_lib_jpeg ac_cv_lib_jpeg_jpeg_read_header
    blt_enable_jpeg=$enableval ])
  AC_ARG_WITH(cc, [  --with-cc=CC		  set C compiler to CC], [
    blt_with_cc=$with_cc 
    unset ac_cv_prog_CC
--- 28,41 ----
  
  AC_ARG_WITH(tcl, [  --with-tcl=DIR          find Tcl headers and libraries in DIR],
    blt_with_tcl=$withval)
! AC_ARG_WITH(tk, [  --with-tk=DIR           find Tk headers and libraries in DIR],
    blt_with_tk=$withval)
! AC_ARG_ENABLE(jpeg, [  --enable-jpeg=DIR       find JPEG headers and libraries in DIR], [
    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
***************
*** 556,564 ****
  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}"
--- 558,569 ----
  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}"
***************
*** 583,590 ****
--- 588,597 ----
  
  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}"
***************
*** 593,598 ****
--- 600,610 ----
    fi
  fi
  
+ if test "${blt_enable_stubs}" = "no" ; then
+   STUB_LIB_SPECS="${LIB_SPECS}"
+ fi
+ AC_SUBST(STUB_LIB_SPECS)
+ 
  # -----------------------------------------------------------------------
  # 
  # -lX11
***************
*** 999,1004 ****
--- 1011,1020 ----
    SHLIB_CFLAGS="-fPIC"
  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)
***************
*** 1023,1028 ****
--- 1039,1049 ----
  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	Sun Nov 21 16:34:28 1999
--- configure	Sun Nov 21 19:17:58 1999
***************
*** 14,22 ****
  ac_help="$ac_help
    --with-tcl=DIR          find Tcl headers and libraries in DIR"
  ac_help="$ac_help
!   --with-tk=DIR          find Tk headers and libraries in DIR"
  ac_help="$ac_help
!   --enable-jpeg=DIR          find JPEG headers and libraries in DIR"
  ac_help="$ac_help
    --with-cc=CC		  set C compiler to CC"
  ac_help="$ac_help
--- 14,24 ----
  ac_help="$ac_help
    --with-tcl=DIR          find Tcl headers and libraries in DIR"
  ac_help="$ac_help
!   --with-tk=DIR           find Tk headers and libraries in DIR"
  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
***************
*** 574,580 ****
  
  blt_with_tcl=""
  blt_with_tk=""
! blt_with_jpeg="no"
  blt_with_cc=""
  blt_with_cflags="$CFLAGS"
  
--- 576,582 ----
  
  blt_with_tcl=""
  blt_with_tk=""
! blt_enable_jpeg="no"
  blt_with_cc=""
  blt_with_cflags="$CFLAGS"
  
***************
*** 596,602 ****
    
    unset ac_cv_header_jpeglib_h
    unset ac_cv_lib_jpeg ac_cv_lib_jpeg_jpeg_read_header
!   blt_with_jpeg=$enableval 
  fi
  
  # Check whether --with-cc or --without-cc was given.
--- 598,611 ----
    
    unset ac_cv_header_jpeglib_h
    unset ac_cv_lib_jpeg ac_cv_lib_jpeg_jpeg_read_header
!   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.
***************
*** 643,649 ****
  fi
  
  echo $ac_n "checking host system type""... $ac_c" 1>&6
! echo "configure:647: checking host system type" >&5
  
  host_alias=$host
  case "$host_alias" in
--- 652,658 ----
  fi
  
  echo $ac_n "checking host system type""... $ac_c" 1>&6
! echo "configure:656: checking host system type" >&5
  
  host_alias=$host
  case "$host_alias" in
***************
*** 664,670 ****
  echo "$ac_t""$host" 1>&6
  
  echo $ac_n "checking target system type""... $ac_c" 1>&6
! echo "configure:668: checking target system type" >&5
  
  target_alias=$target
  case "$target_alias" in
--- 673,679 ----
  echo "$ac_t""$host" 1>&6
  
  echo $ac_n "checking target system type""... $ac_c" 1>&6
! echo "configure:677: checking target system type" >&5
  
  target_alias=$target
  case "$target_alias" in
***************
*** 682,688 ****
  echo "$ac_t""$target" 1>&6
  
  echo $ac_n "checking build system type""... $ac_c" 1>&6
! echo "configure:686: checking build system type" >&5
  
  build_alias=$build
  case "$build_alias" in
--- 691,697 ----
  echo "$ac_t""$target" 1>&6
  
  echo $ac_n "checking build system type""... $ac_c" 1>&6
! echo "configure:695: checking build system type" >&5
  
  build_alias=$build
  case "$build_alias" in
***************
*** 733,739 ****
  #
  
  echo $ac_n "checking which C compiler""... $ac_c" 1>&6
! echo "configure:737: checking which C compiler" >&5
  if test "x${blt_with_cc}" != "x" ; then 
    CC=${blt_with_cc}
    unset ac_cv_prog_CPP
--- 742,748 ----
  #
  
  echo $ac_n "checking which C compiler""... $ac_c" 1>&6
! echo "configure:746: checking which C compiler" >&5
  if test "x${blt_with_cc}" != "x" ; then 
    CC=${blt_with_cc}
    unset ac_cv_prog_CPP
***************
*** 748,754 ****
    # 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:752: 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
--- 757,763 ----
    # 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:761: 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
***************
*** 778,784 ****
    # 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:782: 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
--- 787,793 ----
    # 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:791: 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
***************
*** 829,835 ****
        # 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:833: 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
--- 838,844 ----
        # 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:842: 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
***************
*** 861,867 ****
  fi
  
  echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
! echo "configure:865: 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.
--- 870,876 ----
  fi
  
  echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
! echo "configure:874: 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.
***************
*** 872,883 ****
  
  cat > conftest.$ac_ext << EOF
  
! #line 876 "configure"
  #include "confdefs.h"
  
  main(){return(0);}
  EOF
! if { (eval echo configure:881: \"$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
--- 881,892 ----
  
  cat > conftest.$ac_ext << EOF
  
! #line 885 "configure"
  #include "confdefs.h"
  
  main(){return(0);}
  EOF
! if { (eval echo configure:890: \"$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
***************
*** 903,914 ****
    { 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:907: 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:912: 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
--- 912,923 ----
    { 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:916: 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:921: 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
***************
*** 917,923 ****
    yes;
  #endif
  EOF
! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:921: \"$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
--- 926,932 ----
    yes;
  #endif
  EOF
! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:930: \"$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 ****
  ac_save_CFLAGS="$CFLAGS"
  CFLAGS=
  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
! echo "configure:940: 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
--- 945,951 ----
  ac_save_CFLAGS="$CFLAGS"
  CFLAGS=
  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
! echo "configure:949: 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
***************
*** 982,988 ****
  
  
  echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
! echo "configure:986: checking how to run the C preprocessor" >&5
  # On Suns, sometimes $CPP names a directory.
  if test -n "$CPP" && test -d "$CPP"; then
    CPP=
--- 991,997 ----
  
  
  echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
! echo "configure:995: checking how to run the C preprocessor" >&5
  # On Suns, sometimes $CPP names a directory.
  if test -n "$CPP" && test -d "$CPP"; then
    CPP=
***************
*** 997,1009 ****
    # On the NeXT, cc -E runs the code through the compiler's parser,
    # not just through cpp.
    cat > conftest.$ac_ext <<EOF
! #line 1001 "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:1007: \"$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
    :
--- 1006,1018 ----
    # On the NeXT, cc -E runs the code through the compiler's parser,
    # not just through cpp.
    cat > conftest.$ac_ext <<EOF
! #line 1010 "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:1016: \"$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
    :
***************
*** 1014,1026 ****
    rm -rf conftest*
    CPP="${CC-cc} -E -traditional-cpp"
    cat > conftest.$ac_ext <<EOF
! #line 1018 "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:1024: \"$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
    :
--- 1023,1035 ----
    rm -rf conftest*
    CPP="${CC-cc} -E -traditional-cpp"
    cat > conftest.$ac_ext <<EOF
! #line 1027 "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:1033: \"$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
    :
***************
*** 1031,1043 ****
    rm -rf conftest*
    CPP="${CC-cc} -nologo -E"
    cat > conftest.$ac_ext <<EOF
! #line 1035 "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:1041: \"$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
    :
--- 1040,1052 ----
    rm -rf conftest*
    CPP="${CC-cc} -nologo -E"
    cat > conftest.$ac_ext <<EOF
! #line 1044 "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:1050: \"$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
    :
***************
*** 1065,1073 ****
    BLT_HAVE_GCC="yes"
  else
    echo $ac_n "checking if C compiler is really gcc""... $ac_c" 1>&6
! echo "configure:1069: checking if C compiler is really gcc" >&5
      cat > conftest.$ac_ext <<EOF
! #line 1071 "configure"
  #include "confdefs.h"
  
  #ifdef __GNUC__
--- 1074,1082 ----
    BLT_HAVE_GCC="yes"
  else
    echo $ac_n "checking if C compiler is really gcc""... $ac_c" 1>&6
! echo "configure:1078: checking if C compiler is really gcc" >&5
      cat > conftest.$ac_ext <<EOF
! #line 1080 "configure"
  #include "confdefs.h"
  
  #ifdef __GNUC__
***************
*** 1097,1103 ****
  #  4. otherwise, default to "-O"
  #
  echo $ac_n "checking default compiler flags""... $ac_c" 1>&6
! echo "configure:1101: 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
--- 1106,1112 ----
  #  4. otherwise, default to "-O"
  #
  echo $ac_n "checking default compiler flags""... $ac_c" 1>&6
! echo "configure:1110: 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
***************
*** 1146,1152 ****
  # 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:1150: 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
--- 1155,1161 ----
  # 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:1159: 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
***************
*** 1201,1207 ****
  # 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:1205: 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
--- 1210,1216 ----
  # 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:1214: 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
***************
*** 1229,1235 ****
  fi
  
  echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
! echo "configure:1233: 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
--- 1238,1244 ----
  fi
  
  echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
! echo "configure:1242: 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
***************
*** 1257,1268 ****
  # -----------------------------------------------------------------------
  
  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
! echo "configure:1261: 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 1266 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  #include <stdarg.h>
--- 1266,1277 ----
  # -----------------------------------------------------------------------
  
  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
! echo "configure:1270: 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 1275 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  #include <stdarg.h>
***************
*** 1270,1276 ****
  #include <float.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1274: \"$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*
--- 1279,1285 ----
  #include <float.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1283: \"$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*
***************
*** 1287,1293 ****
  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 1291 "configure"
  #include "confdefs.h"
  #include <string.h>
  EOF
--- 1296,1302 ----
  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 1300 "configure"
  #include "confdefs.h"
  #include <string.h>
  EOF
***************
*** 1305,1311 ****
  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 1309 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  EOF
--- 1314,1320 ----
  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 1318 "configure"
  #include "confdefs.h"
  #include <stdlib.h>
  EOF
***************
*** 1326,1332 ****
    :
  else
    cat > conftest.$ac_ext <<EOF
! #line 1330 "configure"
  #include "confdefs.h"
  #include <ctype.h>
  #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
--- 1335,1341 ----
    :
  else
    cat > conftest.$ac_ext <<EOF
! #line 1339 "configure"
  #include "confdefs.h"
  #include <ctype.h>
  #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
***************
*** 1337,1343 ****
  exit (0); }
  
  EOF
! if { (eval echo configure:1341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    :
  else
--- 1346,1352 ----
  exit (0); }
  
  EOF
! if { (eval echo configure:1350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    :
  else
***************
*** 1361,1372 ****
  fi
  
  echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
! echo "configure:1365: 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 1370 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/wait.h>
--- 1370,1381 ----
  fi
  
  echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
! echo "configure:1374: 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 1379 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/wait.h>
***************
*** 1382,1388 ****
  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
  ; return 0; }
  EOF
! if { (eval echo configure:1386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_header_sys_wait_h=yes
  else
--- 1391,1397 ----
  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
  ; return 0; }
  EOF
! if { (eval echo configure:1395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_header_sys_wait_h=yes
  else
***************
*** 1403,1414 ****
  fi
  
  echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
! echo "configure:1407: 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 1412 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/time.h>
--- 1412,1423 ----
  fi
  
  echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
! echo "configure:1416: 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 1421 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/time.h>
***************
*** 1417,1423 ****
  struct tm *tp;
  ; return 0; }
  EOF
! if { (eval echo configure:1421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_header_time=yes
  else
--- 1426,1432 ----
  struct tm *tp;
  ; return 0; }
  EOF
! if { (eval echo configure:1430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_header_time=yes
  else
***************
*** 1441,1457 ****
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1445: 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 1450 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1455: \"$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*
--- 1450,1466 ----
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1454: 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 1459 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1464: \"$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*
***************
*** 1481,1497 ****
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1485: 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 1490 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1495: \"$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*
--- 1490,1506 ----
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1494: 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 1499 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1504: \"$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*
***************
*** 1521,1537 ****
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1525: 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 1530 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1535: \"$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*
--- 1530,1546 ----
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1534: 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 1539 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1544: \"$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*
***************
*** 1561,1577 ****
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1565: 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 1570 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1575: \"$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*
--- 1570,1586 ----
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1574: 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 1579 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1584: \"$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*
***************
*** 1598,1624 ****
  done
  
  
! if test "${blt_with_jpeg}" != "no" ; then
    jpeg_save_CPPFLAGS=${CPPFLAGS}
    CPPFLAGS=""
!   if test "${blt_with_jpeg}" != "yes" ; then
!     CPPFLAGS="-I${blt_with_jpeg}/include"
    fi
    for ac_hdr in jpeglib.h
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1612: 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 1617 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1622: \"$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*
--- 1607,1633 ----
  done
  
  
! if test "${blt_enable_jpeg}" != "no" ; then
    jpeg_save_CPPFLAGS=${CPPFLAGS}
    CPPFLAGS=""
!   if test "${blt_enable_jpeg}" != "yes" ; then
!     CPPFLAGS="-I${blt_enable_jpeg}/include"
    fi
    for ac_hdr in jpeglib.h
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1621: 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 1626 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1631: \"$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*
***************
*** 1653,1669 ****
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1657: 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 1662 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1667: \"$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*
--- 1662,1678 ----
  do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1666: 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 1671 "configure"
  #include "confdefs.h"
  #include <$ac_hdr>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1676: \"$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*
***************
*** 1691,1702 ****
  
  
  echo $ac_n "checking whether strdup is declared in header files""... $ac_c" 1>&6
! echo "configure:1695: 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 1700 "configure"
  #include "confdefs.h"
  
  #ifdef HAVE_STDLIB_H
--- 1700,1711 ----
  
  
  echo $ac_n "checking whether strdup is declared in header files""... $ac_c" 1>&6
! echo "configure:1704: 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 1709 "configure"
  #include "confdefs.h"
  
  #ifdef HAVE_STDLIB_H
***************
*** 1732,1743 ****
  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:1736: 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 1741 "configure"
  #include "confdefs.h"
  
  #ifdef HAVE_STDLIB_H
--- 1741,1752 ----
  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:1745: 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 1750 "configure"
  #include "confdefs.h"
  
  #ifdef HAVE_STDLIB_H
***************
*** 1781,1792 ****
  for ac_func in strdup drand48 srand48
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:1785: 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 1790 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
--- 1790,1801 ----
  for ac_func in strdup drand48 srand48
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:1794: 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 1799 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
***************
*** 1809,1815 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:1813: \"$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
--- 1818,1824 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:1822: \"$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
***************
*** 1841,1852 ****
  # -----------------------------------------------------------------------
  
  echo $ac_n "checking for size_t""... $ac_c" 1>&6
! echo "configure:1845: 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 1850 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
--- 1850,1861 ----
  # -----------------------------------------------------------------------
  
  echo $ac_n "checking for size_t""... $ac_c" 1>&6
! echo "configure:1854: 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 1859 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
***************
*** 1874,1885 ****
  fi
  
  echo $ac_n "checking for pid_t""... $ac_c" 1>&6
! echo "configure:1878: 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 1883 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
--- 1883,1894 ----
  fi
  
  echo $ac_n "checking for pid_t""... $ac_c" 1>&6
! echo "configure:1887: 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 1892 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #if STDC_HEADERS
***************
*** 1907,1920 ****
  fi
  
  echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
! echo "configure:1911: 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 1918 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/param.h>
--- 1916,1929 ----
  fi
  
  echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
! echo "configure:1920: 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 1927 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/param.h>
***************
*** 1925,1935 ****
  #endif
  ; return 0; }
  EOF
! if { (eval echo configure:1929: \"$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 1933 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/param.h>
--- 1934,1944 ----
  #endif
  ; return 0; }
  EOF
! if { (eval echo configure:1938: \"$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 1942 "configure"
  #include "confdefs.h"
  #include <sys/types.h>
  #include <sys/param.h>
***************
*** 1940,1946 ****
  #endif
  ; return 0; }
  EOF
! if { (eval echo configure:1944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_c_bigendian=yes
  else
--- 1949,1955 ----
  #endif
  ; return 0; }
  EOF
! if { (eval echo configure:1953: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    ac_cv_c_bigendian=yes
  else
***************
*** 1960,1966 ****
      { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  else
    cat > conftest.$ac_ext <<EOF
! #line 1964 "configure"
  #include "confdefs.h"
  main () {
    /* Are we little or big endian?  From Harbison&Steele.  */
--- 1969,1975 ----
      { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  else
    cat > conftest.$ac_ext <<EOF
! #line 1973 "configure"
  #include "confdefs.h"
  main () {
    /* Are we little or big endian?  From Harbison&Steele.  */
***************
*** 1973,1979 ****
    exit (u.c[sizeof (long) - 1] == 1);
  }
  EOF
! if { (eval echo configure:1977: \"$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
--- 1982,1988 ----
    exit (u.c[sizeof (long) - 1] == 1);
  }
  EOF
! if { (eval echo configure:1986: \"$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
***************
*** 2007,2018 ****
  # -----------------------------------------------------------------------
  
  echo $ac_n "checking whether union wait is defined correctly""... $ac_c" 1>&6
! echo "configure:2011: 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 2016 "configure"
  #include "confdefs.h"
  #include <sys/types.h> 
  #include <sys/wait.h>
--- 2016,2027 ----
  # -----------------------------------------------------------------------
  
  echo $ac_n "checking whether union wait is defined correctly""... $ac_c" 1>&6
! echo "configure:2020: 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 2025 "configure"
  #include "confdefs.h"
  #include <sys/types.h> 
  #include <sys/wait.h>
***************
*** 2024,2030 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:2028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    blt_cv_struct_wait_works="yes"
  else
--- 2033,2039 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:2037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    blt_cv_struct_wait_works="yes"
  else
***************
*** 2053,2064 ****
  #--------------------------------------------------------------------
  
  echo $ac_n "checking whether DBL_EPSILON is defined in float.h""... $ac_c" 1>&6
! echo "configure:2057: 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 2062 "configure"
  #include "confdefs.h"
  
  #ifdef HAVE_FLOAT_H
--- 2062,2073 ----
  #--------------------------------------------------------------------
  
  echo $ac_n "checking whether DBL_EPSILON is defined in float.h""... $ac_c" 1>&6
! echo "configure:2066: 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 2071 "configure"
  #include "confdefs.h"
  
  #ifdef HAVE_FLOAT_H
***************
*** 2091,2102 ****
    oldFlags="$CFLAGS"
    CFLAGS="-g -lm"
    echo $ac_n "checking whether DBL_EPSILON can be computed""... $ac_c" 1>&6
! echo "configure:2095: 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 2100 "configure"
  #include "confdefs.h"
  
  main () {
--- 2100,2111 ----
    oldFlags="$CFLAGS"
    CFLAGS="-g -lm"
    echo $ac_n "checking whether DBL_EPSILON can be computed""... $ac_c" 1>&6
! echo "configure:2104: 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 2109 "configure"
  #include "confdefs.h"
  
  main () {
***************
*** 2137,2143 ****
  # 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:2141: checking for X" >&5
  
  # Check whether --with-x or --without-x was given.
  if test "${with_x+set}" = set; then
--- 2146,2152 ----
  # 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:2150: checking for X" >&5
  
  # Check whether --with-x or --without-x was given.
  if test "${with_x+set}" = set; then
***************
*** 2199,2210 ****
  
    # First, try using that file with no special directory specified.
  cat > conftest.$ac_ext <<EOF
! #line 2203 "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:2208: \"$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*
--- 2208,2219 ----
  
    # First, try using that file with no special directory specified.
  cat > conftest.$ac_ext <<EOF
! #line 2212 "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:2217: \"$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*
***************
*** 2273,2286 ****
    ac_save_LIBS="$LIBS"
    LIBS="-l$x_direct_test_library $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2277 "configure"
  #include "confdefs.h"
  
  int main() {
  ${x_direct_test_function}()
  ; return 0; }
  EOF
! if { (eval echo configure:2284: \"$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.
--- 2282,2295 ----
    ac_save_LIBS="$LIBS"
    LIBS="-l$x_direct_test_library $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2286 "configure"
  #include "confdefs.h"
  
  int main() {
  ${x_direct_test_function}()
  ; return 0; }
  EOF
! if { (eval echo configure:2293: \"$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,2380 ****
  # -----------------------------------------------------------------------
  
  echo $ac_n "checking for tclConfig.sh""... $ac_c" 1>&6
! echo "configure:2378: checking for tclConfig.sh" >&5
  tclConfigFile=""
  if test "x$blt_with_tcl" != "x" ; then
    #
--- 2383,2389 ----
  # -----------------------------------------------------------------------
  
  echo $ac_n "checking for tclConfig.sh""... $ac_c" 1>&6
! echo "configure:2387: checking for tclConfig.sh" >&5
  tclConfigFile=""
  if test "x$blt_with_tcl" != "x" ; then
    #
***************
*** 2472,2478 ****
  # -----------------------------------------------------------------------
  
  echo $ac_n "checking for tkConfig.sh""... $ac_c" 1>&6
! echo "configure:2476: checking for tkConfig.sh" >&5
  tkConfigFile=""
  if test "x$blt_with_tk" != "x" -o "x$blt_with_tcl" != "x"; then
    #
--- 2481,2487 ----
  # -----------------------------------------------------------------------
  
  echo $ac_n "checking for tkConfig.sh""... $ac_c" 1>&6
! echo "configure:2485: checking for tkConfig.sh" >&5
  tkConfigFile=""
  if test "x$blt_with_tk" != "x" -o "x$blt_with_tcl" != "x"; then
    #
***************
*** 2620,2628 ****
  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}"
--- 2629,2640 ----
  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}"
***************
*** 2647,2654 ****
--- 2659,2668 ----
  
  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}"
***************
*** 2657,2662 ****
--- 2671,2681 ----
    fi
  fi
  
+ if test "${blt_enable_stubs}" = "no" ; then
+   STUB_LIB_SPECS="${LIB_SPECS}"
+ fi
+ 
+ 
  # -----------------------------------------------------------------------
  # 
  # -lX11
***************
*** 2685,2748 ****
    fi
  fi
  
- echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
- echo "configure:2690: checking for XOpenDisplay in -lX11" >&5
- ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   ac_save_LIBS="$LIBS"
- LIBS="-lX11  $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 2698 "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
-     builtin and then its argument prototype would still apply.  */
- char XOpenDisplay();
- 
- int main() {
- XOpenDisplay()
- ; return 0; }
- EOF
- if { (eval echo configure:2709: \"$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
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
-   eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- 
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-   echo "$ac_t""yes" 1>&6
-     ac_tr_lib=HAVE_LIB`echo X11 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-   cat >> confdefs.h <<EOF
- #define $ac_tr_lib 1
- EOF
- 
-   LIBS="-lX11 $LIBS"
- 
- else
-   echo "$ac_t""no" 1>&6
- fi
- 
  OLDLIBS=$LIBS
  LIBS=$LIB_SPECS
  for ac_func in XExtendedMaxRequestSize
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:2741: 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 2746 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
--- 2704,2720 ----
    fi
  fi
  
  OLDLIBS=$LIBS
  LIBS=$LIB_SPECS
  for ac_func in XExtendedMaxRequestSize
  do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:2713: 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 2718 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func(); below.  */
***************
*** 2765,2771 ****
  
  ; return 0; }
  EOF
! if { (eval echo configure:2769: \"$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
--- 2737,2743 ----
  
  ; return 0; }
  EOF
! if { (eval echo configure:2741: \"$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
***************
*** 2797,2803 ****
  #
  # -----------------------------------------------------------------------
  echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
! echo "configure:2801: 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
--- 2769,2775 ----
  #
  # -----------------------------------------------------------------------
  echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
! echo "configure:2773: 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
***************
*** 2805,2818 ****
    ac_save_LIBS="$LIBS"
  LIBS="-lsocket  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2809 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:2816: \"$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
--- 2777,2790 ----
    ac_save_LIBS="$LIBS"
  LIBS="-lsocket  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2781 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:2788: \"$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
***************
*** 2846,2852 ****
  #
  # -----------------------------------------------------------------------
  echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
! echo "configure:2850: 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
--- 2818,2824 ----
  #
  # -----------------------------------------------------------------------
  echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
! echo "configure:2822: 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
***************
*** 2854,2867 ****
    ac_save_LIBS="$LIBS"
  LIBS="-lnsl  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2858 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:2865: \"$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
--- 2826,2839 ----
    ac_save_LIBS="$LIBS"
  LIBS="-lnsl  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2830 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:2837: \"$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
***************
*** 2895,2901 ****
  #
  # -----------------------------------------------------------------------
  echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
! echo "configure:2899: 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
--- 2867,2873 ----
  #
  # -----------------------------------------------------------------------
  echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
! echo "configure:2871: 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
***************
*** 2903,2916 ****
    ac_save_LIBS="$LIBS"
  LIBS="-lm  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2907 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:2914: \"$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
--- 2875,2888 ----
    ac_save_LIBS="$LIBS"
  LIBS="-lm  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2879 "configure"
  #include "confdefs.h"
  
  int main() {
  main()
  ; return 0; }
  EOF
! if { (eval echo configure:2886: \"$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
***************
*** 2943,2959 ****
  # JPEG library
  #
  # -----------------------------------------------------------------------
! if test "${blt_with_jpeg}" != "no" ; then
    jpeg_save_LDFlags="${LDFLAGS}"
    JPEG_LIB_SPEC="-ljpeg"
    JPEG_LIB_DIR=""
!   if test "${blt_with_jpeg}" != "yes" ; then
!     JPEG_LIB_DIR="${blt_with_jpeg}/lib"
      JPEG_LIB_SPEC="-L${JPEG_LIB_DIR} ${JPEG_LIB_SPEC}"
      LDFLAGS="-L${JPEG_LIB_DIR} ${LDFLAGS}"
    fi
    echo $ac_n "checking for jpeg_read_header in -ljpeg""... $ac_c" 1>&6
! echo "configure:2957: 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
--- 2915,2931 ----
  # JPEG library
  #
  # -----------------------------------------------------------------------
! if test "${blt_enable_jpeg}" != "no" ; then
    jpeg_save_LDFlags="${LDFLAGS}"
    JPEG_LIB_SPEC="-ljpeg"
    JPEG_LIB_DIR=""
!   if test "${blt_enable_jpeg}" != "yes" ; then
!     JPEG_LIB_DIR="${blt_enable_jpeg}/lib"
      JPEG_LIB_SPEC="-L${JPEG_LIB_DIR} ${JPEG_LIB_SPEC}"
      LDFLAGS="-L${JPEG_LIB_DIR} ${LDFLAGS}"
    fi
    echo $ac_n "checking for jpeg_read_header in -ljpeg""... $ac_c" 1>&6
! echo "configure:2929: 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
***************
*** 2961,2967 ****
    ac_save_LIBS="$LIBS"
  LIBS="-ljpeg  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2965 "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
--- 2933,2939 ----
    ac_save_LIBS="$LIBS"
  LIBS="-ljpeg  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2937 "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
***************
*** 2972,2978 ****
  jpeg_read_header()
  ; return 0; }
  EOF
! if { (eval echo configure:2976: \"$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
--- 2944,2950 ----
  jpeg_read_header()
  ; return 0; }
  EOF
! if { (eval echo configure:2948: \"$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 ****
  # 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:3040: 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
--- 3008,3014 ----
  # 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:3012: 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
***************
*** 3066,3072 ****
  done
  
  echo $ac_n "checking BLT major version number""... $ac_c" 1>&6
! echo "configure:3070: 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
--- 3038,3044 ----
  done
  
  echo $ac_n "checking BLT major version number""... $ac_c" 1>&6
! echo "configure:3042: 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
***************
*** 3082,3088 ****
  echo "$ac_t""$blt_cv_major_version" 1>&6
  
  echo $ac_n "checking BLT minor version number""... $ac_c" 1>&6
! echo "configure:3086: 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
--- 3054,3060 ----
  echo "$ac_t""$blt_cv_major_version" 1>&6
  
  echo $ac_n "checking BLT minor version number""... $ac_c" 1>&6
! echo "configure:3058: 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
***************
*** 3199,3205 ****
        DEFINES="$DEFINES -D_HPUX_SOURCE"
      fi
      echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
! echo "configure:3203: 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
--- 3171,3177 ----
        DEFINES="$DEFINES -D_HPUX_SOURCE"
      fi
      echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
! echo "configure:3175: 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
***************
*** 3207,3213 ****
    ac_save_LIBS="$LIBS"
  LIBS="-ldld  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 3211 "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
--- 3179,3185 ----
    ac_save_LIBS="$LIBS"
  LIBS="-ldld  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 3183 "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
***************
*** 3218,3224 ****
  shl_load()
  ; return 0; }
  EOF
! if { (eval echo configure:3222: \"$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
--- 3190,3196 ----
  shl_load()
  ; return 0; }
  EOF
! if { (eval echo configure:3194: \"$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
***************
*** 3313,3329 ****
      # 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:3317: 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 3322 "configure"
  #include "confdefs.h"
  #include <dlfcn.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:3327: \"$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*
--- 3285,3301 ----
      # 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:3289: 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 3294 "configure"
  #include "confdefs.h"
  #include <dlfcn.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:3299: \"$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*
***************
*** 3454,3459 ****
--- 3426,3435 ----
    SHLIB_CFLAGS="-fPIC"
  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"
    
***************
*** 3479,3484 ****
--- 3455,3465 ----
  
  
  
+ 
+ 
+ 
+ 
+ 
  #--------------------------------------------------------------------
  #	Propagate prefix argument as installation directory.
  #--------------------------------------------------------------------
***************
*** 3678,3683 ****
--- 3659,3665 ----
  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
***************
*** 3693,3698 ****
--- 3675,3685 ----
  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	Sun Nov 21 17:48:17 1999
--- src/Makefile.in	Sun Nov 21 17:48:33 1999
***************
*** 9,15 ****
  BLT_LIBRARY =	@BLT_LIBRARY@
  CC =		@CC@
  CFLAGS =	@CFLAGS@ 
! DEFINES =	@DEFINES@
  DEF_BLTINIT =	-DBLT_LIBRARY=\"$(BLT_LIBRARY)\"
  EXTRA_CFLAGS =	@GCCFLAGS@
  LDFLAGS =	@LDFLAGS@
--- 9,15 ----
  BLT_LIBRARY =	@BLT_LIBRARY@
  CC =		@CC@
  CFLAGS =	@CFLAGS@ 
! DEFINES =	@DEFINES@ @TCL_DEFS@
  DEF_BLTINIT =	-DBLT_LIBRARY=\"$(BLT_LIBRARY)\"
  EXTRA_CFLAGS =	@GCCFLAGS@
  LDFLAGS =	@LDFLAGS@
*** src/bltBitmap.c.orig	Sun Nov 21 17:51:11 1999
--- src/bltBitmap.c	Sun Nov 21 17:53:54 1999
***************
*** 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	Sun Nov 21 16:57:43 1999
--- src/bltCanvEps.c	Sun Nov 21 17:03:14 1999
***************
*** 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	Sun Nov 21 18:28:17 1999
--- src/bltColor.c	Sun Nov 21 18:29:32 1999
***************
*** 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	Sun Nov 21 17:59:35 1999
--- src/bltGrLine.c	Sun Nov 21 18:02:19 1999
***************
*** 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 maxPoints, nPoints;
      register int i;
      int start, extra;
--- 3595,3601 ----
      LinePen *penPtr;
  {
      Blt_ChainLink *linkPtr;
!     TraceStruct *tracePtr;
      int maxPoints, nPoints;
      register int i;
      int start, extra;
***************
*** 3604,3610 ****
  	((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
--- 3604,3610 ----
  	((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
***************
*** 3982,3993 ****
      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);
      }
  }
--- 3982,3993 ----
      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/bltInit.c.orig	Thu Oct 28 00:11:13 1999
--- src/bltInit.c	Sun Nov 21 16:10:56 1999
***************
*** 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
***************
*** 250,280 ****
  {
      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);
--- 260,272 ----
  {
      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	Sun Nov 21 17:23:48 1999
--- src/bltInt.h	Sun Nov 21 18:24:17 1999
***************
*** 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>
***************
*** 885,890 ****
--- 892,899 ----
  #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,
***************
*** 912,921 ****
  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));
--- 921,932 ----
  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	Sun Nov 21 18:32:08 1999
--- src/bltNsUtil.c	Sun Nov 21 18:35:25 1999
***************
*** 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	Sun Nov 21 18:38:14 1999
--- src/bltParse.c	Sun Nov 21 18:39:35 1999
***************
*** 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	Sun Nov 21 18:50:37 1999
--- src/bltPs.c	Sun Nov 21 18:54:43 1999
***************
*** 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	Sun Nov 21 18:55:29 1999
--- src/bltText.c	Sun Nov 21 18:56:52 1999
***************
*** 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;
  
***************
*** 1276,1282 ****
  	TkBorder *borderPtr = (TkBorder *) stylePtr->border;
  	XColor *color1, *color2;
  
! 	color1 = borderPtr->lightColor, color2 = borderPtr->darkColor;
  	if (stylePtr->state & STATE_EMPHASIS) {
  	    XColor *hold;
  
--- 1280,1286 ----
  	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	Sun Nov 21 18:48:58 1999
--- src/bltTkInt.h	Sun Nov 21 18:49:23 1999
***************
*** 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	Fri Oct  8 08:40:46 1999
--- src/bltUnixMain.c	Sun Nov 21 16:00:49 1999
***************
*** 45,50 ****
--- 45,53 ----
   * software.
   */
  
+ #undef USE_TCL_STUBS
+ #undef USE_TK_STUBS
+ 
  #include <tcl.h>
  #include <tk.h>
  
*** src/bltVector.c.orig	Sun Nov 21 18:09:21 1999
--- src/bltVector.c	Sun Nov 21 18:24:51 1999
***************
*** 344,349 ****
--- 344,350 ----
   *	space runs out.
   */
  
+ #ifndef USE_TCL_STUBS
  typedef struct ParseValue {
      char *buffer;		/* Address of first character in
  				 * output buffer. */
***************
*** 357,362 ****
--- 358,364 ----
      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 Nov 21 16:00:49 1999
***************
*** 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	Sun Nov 21 18:57:58 1999
--- src/bltWindow.c	Sun Nov 21 18:59:39 1999
***************
*** 37,42 ****
--- 37,43 ----
  struct TkSelectionInfo;
  struct TkClipboardTarget;
  
+ #ifndef USE_TCL_STUBS
  typedef struct TkWindow TkWindow;
  typedef struct TkMainInfo TkMainInfo;
  typedef struct TkEventHandler TkEventHandler;
***************
*** 755,760 ****
--- 756,763 ----
  #endif
      TkWindowPrivate *privatePtr;
  };
+ 
+ #endif /* !USE_TCL_STUBS */
  
  #ifdef WIN32
  /*
*** src/tkButton.c.orig	Sun Nov 21 19:02:42 1999
--- src/tkButton.c	Sun Nov 21 19:02:58 1999
***************
*** 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	Sun Nov 21 19:03:42 1999
--- src/tkFrame.c	Sun Nov 21 19:10:57 1999
***************
*** 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	Sun Nov 21 17:11:19 1999
--- src/shared/Makefile.in	Sun Nov 21 17:48:48 1999
***************
*** 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@
  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@
***************
*** 54,60 ****
  		bltUnixPipe.o bltUtil.o bltWindow.o \
  		$(TK_OBJS) $(N_OBJS) 
  
! INCLUDES =	-I.. -I$(srcdir) -I$(srcdir)/.. @INCLUDES@
  CC_SWITCHES =	$(EXTRA_CFLAGS) $(CFLAGS) $(DEFINES) $(INCLUDES)
  INSTALL =	@INSTALL@
  INSTALL_DATA =	@INSTALL_DATA@
--- 56,62 ----
  		bltUnixPipe.o bltUtil.o bltWindow.o \
  		$(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@
