[eggheads-patches] PATCH: configure_tcl-morestuff.diff

Tothwolf tothwolf at concentric.net
Thu Oct 7 16:22:47 CST 1999


configure_tcl-morestuff.diff - Shesh...I hope I'm done with all this tcl
                               checking for awhile....

-Toth
-------------- next part --------------
Index: Makefile.in
===================================================================
RCS file: /usr/local/cvsroot/eggdrop1.3/Makefile.in,v
retrieving revision 1.13
diff -u -r1.13 Makefile.in
--- Makefile.in	1999/10/07 17:34:03	1.13
+++ Makefile.in	1999/10/07 20:50:57
@@ -5,7 +5,7 @@
 
 prefix = @prefix@
 DEST=@DEST@
-NEWVERSION=`grep 'char egg_version' src/main.c | awk '{print $4}' | sed s/\"//g | sed s/\;// | sed s/.\*=\ //`
+NEWVERSION=`grep 'char egg_version' src/main.c | awk '{gsub(/\"|\;/, "", $4); print $4}'`
 
 SHELL=/bin/sh
 
@@ -71,7 +71,6 @@
  
 distclean: clean
 	@rm -f Makefile config.cache config.log config.status config.h lush.h
-	@rm -f basename.tmp dirname.tmp
 	@rm -f `find . \( -name '*~' -o -name '*#' -o -name '*.orig' \
 		-o -name '*.rej' -o -name '*.bak' \) -print`
  
Index: configure
===================================================================
RCS file: /usr/local/cvsroot/eggdrop1.3/configure,v
retrieving revision 1.19
diff -u -r1.19 configure
--- configure	1999/10/07 17:34:04	1.19
+++ configure	1999/10/07 20:51:09
@@ -932,17 +932,8 @@
 fi
 
 
-if ! test "x${cross_compiling}" = "xno"
-then
-  echo ""
-  echo "This system does not appear to have a working C compiler."
-  echo "A working C compiler is required to compile eggdrop."
-  echo ""
-  exit
-fi
-
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:946: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:937: checking whether ${MAKE-make} sets \${MAKE}" >&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -968,10 +959,40 @@
   SET_MAKE="MAKE=${MAKE-make}"
 fi
 
+# 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:966: 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
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_RANLIB="ranlib"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+  echo "$ac_t""$RANLIB" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
 # Extract the first word of "strip", so it can be a program name with args.
 set dummy strip; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:975: checking for $ac_word" >&5
+echo "configure:996: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1000,7 +1021,7 @@
 # Extract the first word of "uname", so it can be a program name with args.
 set dummy uname; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1004: checking for $ac_word" >&5
+echo "configure:1025: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_UNAME'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1026,38 +1047,74 @@
   echo "$ac_t""no" 1>&6
 fi
 
+# Extract the first word of "basename", so it can be a program name with args.
+set dummy basename; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1054: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_BASENAME'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$BASENAME"; then
+  ac_cv_prog_BASENAME="$BASENAME" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_BASENAME="basename"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+BASENAME="$ac_cv_prog_BASENAME"
+if test -n "$BASENAME"; then
+  echo "$ac_t""$BASENAME" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
 
-# Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
+# Extract the first word of "dirname", so it can be a program name with args.
+set dummy dirname; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1034: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+echo "configure:1083: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_DIRNAME'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+  if test -n "$DIRNAME"; then
+  ac_cv_prog_DIRNAME="$DIRNAME" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
+      ac_cv_prog_DIRNAME="dirname"
       break
     fi
   done
   IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
 fi
 fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
+DIRNAME="$ac_cv_prog_DIRNAME"
+if test -n "$DIRNAME"; then
+  echo "$ac_t""$DIRNAME" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 
 
+if ! test "x${cross_compiling}" = "xno"
+then
+  echo ""
+  echo "This system does not appear to have a working C compiler."
+  echo "A working C compiler is required to compile eggdrop."
+  echo ""
+  exit
+fi
+
 if test "x${CFLAGS}" = "x"
 then
   CFLAGS="-O"
@@ -1070,7 +1127,7 @@
 fi
 
 echo $ac_n "checking whether cp takes -f""... $ac_c" 1>&6
-echo "configure:1074: checking whether cp takes -f" >&5
+echo "configure:1131: checking whether cp takes -f" >&5
 ac_file1=beldin1
 ac_file2=beldin2
 ac_cp="cp -f $ac_file1 $ac_file2"
@@ -1109,7 +1166,7 @@
 SHLIB_LD="${CC}"
 SHLIB_STRIP="${STRIP}"
 echo $ac_n "checking your OS""... $ac_c" 1>&6
-echo "configure:1113: checking your OS" >&5
+echo "configure:1170: checking your OS" >&5
 system=`${UNAME}`
 case $system in
   Linux)
@@ -1125,7 +1182,7 @@
     DEFAULT_MAKE=debugmem
     ;;
   BSD/OS)
-    if test "x`uname -r | cut -d . -f 1`" = "x2"
+    if test "x`${UNAME} -r | cut -d . -f 1`" = "x2"
     then
       echo "$ac_t""BSD/OS 2! statically linked modules are the only choice" 1>&6
       need_dl=0
@@ -1145,7 +1202,7 @@
     # Extract the first word of "gmake", so it can be a program name with args.
 set dummy gmake; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1149: checking for $ac_word" >&5
+echo "configure:1206: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_GMAKE'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1189,7 +1246,7 @@
 
     ;;
   SunOS)
-    if test "x`uname -r | cut -d . -f 1`" = "x5"
+    if test "x`${UNAME} -r | cut -d . -f 1`" = "x5"
     then
       echo "$ac_t""Solaris!" 1>&6
       SHLIB_LD="/usr/ccs/bin/ld -G -z text"
@@ -1207,7 +1264,7 @@
     ;;
   OSF1)
     echo "$ac_t""OSF..." 1>&6
-    case `uname -r | cut -d . -f 1` in
+    case `${UNAME} -r | cut -d . -f 1` in
       V*)
 	echo "$ac_t""Digital OSF" 1>&6
 	SHLIB_LD="ld -shared -expect_unresolved '*'"
@@ -1256,7 +1313,7 @@
   HP-UX)
     echo "$ac_t""HP-UX, just shoot yourself now" 1>&6
     echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:1260: checking for shl_load in -ldld" >&5
+echo "configure:1317: 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
@@ -1264,7 +1321,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldld  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1268 "configure"
+#line 1325 "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
@@ -1275,7 +1332,7 @@
 shl_load()
 ; return 0; }
 EOF
-if { (eval echo configure:1279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1336: \"$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
@@ -1310,7 +1367,7 @@
 #define HPUX_HACKS 1
 EOF
 
-    if test "x`uname -r | cut -d . -f 2`" = "x10"
+    if test "x`${UNAME} -r | cut -d . -f 2`" = "x10"
     then
        cat >> confdefs.h <<\EOF
 #define HPUX10_HACKS 1
@@ -1353,7 +1410,7 @@
   echo "Skipping library tests because they CONFUSE Irix."
 else
   echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
-echo "configure:1357: checking for socket in -lsocket" >&5
+echo "configure:1414: checking for socket in -lsocket" >&5
 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1361,7 +1418,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1365 "configure"
+#line 1422 "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
@@ -1372,7 +1429,7 @@
 socket()
 ; return 0; }
 EOF
-if { (eval echo configure:1376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1433: \"$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
@@ -1400,7 +1457,7 @@
 fi
 
   echo $ac_n "checking for connect in -lnsl""... $ac_c" 1>&6
-echo "configure:1404: checking for connect in -lnsl" >&5
+echo "configure:1461: checking for connect in -lnsl" >&5
 ac_lib_var=`echo nsl'_'connect | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1408,7 +1465,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1412 "configure"
+#line 1469 "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
@@ -1419,7 +1476,7 @@
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:1423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1480: \"$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
@@ -1447,7 +1504,7 @@
 fi
 
   echo $ac_n "checking for gethostbyname in -ldns""... $ac_c" 1>&6
-echo "configure:1451: checking for gethostbyname in -ldns" >&5
+echo "configure:1508: checking for gethostbyname in -ldns" >&5
 ac_lib_var=`echo dns'_'gethostbyname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1455,7 +1512,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldns  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1459 "configure"
+#line 1516 "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
@@ -1466,7 +1523,7 @@
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:1470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1527: \"$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
@@ -1494,7 +1551,7 @@
 fi
 
   echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:1498: checking for dlopen in -ldl" >&5
+echo "configure:1555: checking for dlopen in -ldl" >&5
 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1502,7 +1559,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1506 "configure"
+#line 1563 "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
@@ -1513,7 +1570,7 @@
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:1517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1574: \"$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
@@ -1543,14 +1600,14 @@
   if test "x`${UNAME}`" = "xSunOS"
   then
     echo $ac_n "checking for SunOS 4""... $ac_c" 1>&6
-echo "configure:1547: checking for SunOS 4" >&5
-    if test "x`uname -r | cut -d . -f 1`" = "x5"
+echo "configure:1604: checking for SunOS 4" >&5
+    if test "x`${UNAME} -r | cut -d . -f 1`" = "x5"
     then
       echo "$ac_t""Solaris -- "*bollocks*" zarni " 1>&6
     else
       echo "$ac_t""SunOS -- sigh" 1>&6
             echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
-echo "configure:1554: checking for main in -ldl" >&5
+echo "configure:1611: checking for main in -ldl" >&5
 ac_lib_var=`echo dl'_'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
@@ -1558,14 +1615,14 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1562 "configure"
+#line 1619 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:1569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1626: \"$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
@@ -1597,14 +1654,14 @@
 fi
 
 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:1601: checking whether byte ordering is bigendian" >&5
+echo "configure:1658: 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 1608 "configure"
+#line 1665 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -1615,11 +1672,11 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:1619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1676: \"$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 1623 "configure"
+#line 1680 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -1630,7 +1687,7 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:1634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_bigendian=yes
 else
@@ -1650,7 +1707,7 @@
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 1654 "configure"
+#line 1711 "configure"
 #include "confdefs.h"
 main () {
   /* Are we little or big endian?  From Harbison&Steele.  */
@@ -1663,7 +1720,7 @@
   exit (u.c[sizeof (long) - 1] == 1);
 }
 EOF
-if { (eval echo configure:1667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1724: \"$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
@@ -1687,7 +1744,7 @@
 fi
 
 echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:1691: checking size of long" >&5
+echo "configure:1748: checking size of long" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1695,7 +1752,7 @@
   ac_cv_sizeof_long=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1699 "configure"
+#line 1756 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -1706,7 +1763,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:1710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_long=`cat conftestval`
 else
@@ -1726,7 +1783,7 @@
 
 
 echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:1730: checking size of int" >&5
+echo "configure:1787: checking size of int" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1734,7 +1791,7 @@
   ac_cv_sizeof_int=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1738 "configure"
+#line 1795 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -1745,7 +1802,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:1749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_int=`cat conftestval`
 else
@@ -1770,12 +1827,12 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:1774: checking for $ac_hdr that defines DIR" >&5
+echo "configure:1831: checking for $ac_hdr that defines DIR" >&5
 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1779 "configure"
+#line 1836 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_hdr>
@@ -1783,7 +1840,7 @@
 DIR *dirp = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:1787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval "ac_cv_header_dirent_$ac_safe=yes"
 else
@@ -1808,7 +1865,7 @@
 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
 if test $ac_header_dirent = dirent.h; then
 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:1812: checking for opendir in -ldir" >&5
+echo "configure:1869: checking for opendir in -ldir" >&5
 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1816,7 +1873,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldir  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1820 "configure"
+#line 1877 "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
@@ -1827,7 +1884,7 @@
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:1831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1888: \"$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
@@ -1849,7 +1906,7 @@
 
 else
 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:1853: checking for opendir in -lx" >&5
+echo "configure:1910: checking for opendir in -lx" >&5
 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1857,7 +1914,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1861 "configure"
+#line 1918 "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
@@ -1868,7 +1925,7 @@
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:1872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1929: \"$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
@@ -1891,12 +1948,12 @@
 fi
 
 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:1895: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:1952: 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 1900 "configure"
+#line 1957 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -1912,7 +1969,7 @@
 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
 ; return 0; }
 EOF
-if { (eval echo configure:1916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_sys_wait_h=yes
 else
@@ -1936,17 +1993,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1940: checking for $ac_hdr" >&5
+echo "configure:1997: 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 1945 "configure"
+#line 2002 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2007: \"$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*
@@ -1974,12 +2031,12 @@
 
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1978: checking for ANSI C header files" >&5
+echo "configure:2035: 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 1983 "configure"
+#line 2040 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1987,7 +2044,7 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2048: \"$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*
@@ -2004,7 +2061,7 @@
 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 2008 "configure"
+#line 2065 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -2022,7 +2079,7 @@
 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 2026 "configure"
+#line 2083 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -2043,7 +2100,7 @@
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 2047 "configure"
+#line 2104 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2054,7 +2111,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:2058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -2078,12 +2135,12 @@
 fi
 
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:2082: checking for pid_t" >&5
+echo "configure:2139: 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 2087 "configure"
+#line 2144 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -2111,12 +2168,12 @@
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:2115: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:2172: 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 2120 "configure"
+#line 2177 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -2125,7 +2182,7 @@
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:2129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2186: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -2149,12 +2206,12 @@
 for ac_func in rename getrusage getdtablesize srandom random sigaction
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2153: checking for $ac_func" >&5
+echo "configure:2210: 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 2158 "configure"
+#line 2215 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2177,7 +2234,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2238: \"$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
@@ -2204,12 +2261,12 @@
 for ac_func in sigemptyset vsprintf strcasecmp setpgid clock dlopen
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2208: checking for $ac_func" >&5
+echo "configure:2265: 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 2213 "configure"
+#line 2270 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2232,7 +2289,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2293: \"$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
@@ -2259,12 +2316,12 @@
 for ac_func in dprintf bzero uname vsnprintf
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2263: checking for $ac_func" >&5
+echo "configure:2320: 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 2268 "configure"
+#line 2325 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2287,7 +2344,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2348: \"$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
@@ -2330,7 +2387,7 @@
 fi
 
 echo $ac_n "checking space left in file database struct""... $ac_c" 1>&6
-echo "configure:2334: checking space left in file database struct" >&5
+echo "configure:2391: checking space left in file database struct" >&5
 cat >abacab.c <<'EOF'
 #include <stdio.h>
 #include <sys/time.h>
@@ -2348,15 +2405,11 @@
 # ---------- begin robey's tcl thingies
 # (well, what used to be robey's tcl thingies...)
 
-
 tclnames="tcl tcl8.3 tcl83 tcl8.2 tcl82 tcl8.1 tcl81 \
 	tcl8.0 tcl80 tcl7.6 tcl76 tcl7.5 tcl75"
 
 tcllibextensions=".so .so.1 .so.1.0 .so.1.2 .a"
 
-tclshpaths="/usr/local/bin /usr/local/pkgs/tcl/bin \
-	/usr/bin /bin $HOME/bin $HOME/tcl/bin $HOME"
-
 tcllibpaths="/usr/local/lib /usr/local/pkgs/tcl/lib \
 	/usr/lib /lib /usr/i486-linuxaout/lib \
 	$HOME/lib $HOME/tcl/lib $HOME"
@@ -2377,114 +2430,12 @@
 fi
 
 
-# Extract the first word of "basename", so it can be a program name with args.
-set dummy basename; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2384: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_BASENAME'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$BASENAME"; then
-  ac_cv_prog_BASENAME="$BASENAME" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_BASENAME="basename"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-BASENAME="$ac_cv_prog_BASENAME"
-if test -n "$BASENAME"; then
-  echo "$ac_t""$BASENAME" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-# Extract the first word of "dirname", so it can be a program name with args.
-set dummy dirname; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2413: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DIRNAME'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$DIRNAME"; then
-  ac_cv_prog_DIRNAME="$DIRNAME" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_DIRNAME="dirname"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-DIRNAME="$ac_cv_prog_DIRNAME"
-if test -n "$DIRNAME"; then
-  echo "$ac_t""$DIRNAME" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-# workaround if we don't have a basename or dirname command, but have tclsh
-if test "x${BASENAME}" = "x" || test "x${DIRNAME}" = "x"
-then
-  for i in $tclshpaths
-  do
-    for j in $tclnames
-    do
-      k=`echo $j | sed s/tcl/tclsh/`
-      if test -x "$i/$k"
-      then
-	if test "x${BASENAME}" = "x"
-	then
-	  echo "No 'basename' command, using a workaround..."
-	  cat > basename.tmp <<EOF
-#!$i/$k
-puts file tail [lindex \$argv 0]
-exit 0
-EOF
-	  chmod 755 basename.tmp
-	  BASENAME=./basename.tmp
-	fi
-	if test "x${DIRNAME}" = "x"
-	then
-	  echo "No 'dirname' command, using a workaround..."
-	  cat > dirname.tmp <<EOF
-#!$i/$k
-puts file dirname [lindex \$argv 0]
-exit 0
-EOF
-	  chmod 755 dirname.tmp
-	  DIRNAME=./dirname.tmp
-	fi
-	break 2
-      fi
-    done
-  done
-  if test "x${BASENAME}" = "x" || test "x${DIRNAME}" = "x"
-  then
-    echo "ack...no basename or dirname, we can't configure Tcl without them."
-    exit 1
-  fi
-fi
-
 if test -r "$tcllibname"
 then
   TCLLIB=`$DIRNAME $tcllibname`
-  TCLLIBFN=`$BASENAME $tcllibname | cut -c4-`
-  TCLLIBEXT=""
-  echo "Using Tcl library: $TCLLIB/lib$TCLLIBFN"
+  TCLLIBFN=`$BASENAME $tcllibname | awk '{j=split($1, i, "."); k=i[j-1]; sub(/lib/, "", k); print k}'`
+  TCLLIBEXT=".`echo $tcllibname | awk '{j=split($1, i, "."); k=i[j]; print k}'`"
+  echo "Using Tcl library: $TCLLIB/lib$TCLLIBFN$TCLLIBEXT"
 else
 
   # look for libtcl: if TCLLIB is set, check there first
@@ -2514,7 +2465,7 @@
 
   # check in common places now
   echo $ac_n "checking for libtcl""... $ac_c" 1>&6
-echo "configure:2518: checking for libtcl" >&5
+echo "configure:2469: checking for libtcl" >&5
   if test ! "x${TCLLIB}" = "x"
   then
     echo "$ac_t""found in $TCLLIB/lib$TCLLIBFN$TCLLIBEXT" 1>&6
@@ -2570,7 +2521,7 @@
 
   # check in common places now
   echo $ac_n "checking for $TCLINCFN""... $ac_c" 1>&6
-echo "configure:2574: checking for $TCLINCFN" >&5
+echo "configure:2525: checking for $TCLINCFN" >&5
   if test ! "x${TCLINC}" = "x"
   then
     echo "$ac_t""found in $TCLINC/$TCLINCFN" 1>&6
@@ -2633,7 +2584,7 @@
   exit 1
 else
   echo $ac_n "checking for Tcl version""... $ac_c" 1>&6
-echo "configure:2637: checking for Tcl version" >&5
+echo "configure:2588: checking for Tcl version" >&5
 
   for ver in $tclnames
   do
@@ -2882,12 +2833,12 @@
 s%@CC@%$CC%g
 s%@CPP@%$CPP%g
 s%@SET_MAKE@%$SET_MAKE%g
+s%@RANLIB@%$RANLIB%g
 s%@STRIP@%$STRIP%g
 s%@UNAME@%$UNAME%g
-s%@RANLIB@%$RANLIB%g
-s%@GMAKE@%$GMAKE%g
 s%@BASENAME@%$BASENAME%g
 s%@DIRNAME@%$DIRNAME%g
+s%@GMAKE@%$GMAKE%g
 s%@TCLINC@%$TCLINC%g
 s%@TCLLIB@%$TCLLIB%g
 s%@TCLINCFN@%$TCLINCFN%g
Index: configure.in
===================================================================
RCS file: /usr/local/cvsroot/eggdrop1.3/configure.in,v
retrieving revision 1.19
diff -u -r1.19 configure.in
--- configure.in	1999/10/07 17:34:04	1.19
+++ configure.in	1999/10/07 20:51:10
@@ -15,8 +15,16 @@
 AC_AIX
 AC_ISC_POSIX
 AC_MINIX
-dnl no cross-compiling!
 
+dnl Checks for programs.
+AC_PROG_MAKE_SET
+AC_PROG_RANLIB
+AC_CHECK_PROG(STRIP,strip,strip)
+AC_CHECK_PROG(UNAME,uname,uname)
+AC_CHECK_PROG(BASENAME,basename,basename)
+AC_CHECK_PROG(DIRNAME,dirname,dirname)
+
+dnl no cross-compiling!
 if ! test "x${cross_compiling}" = "xno"
 then
   echo ""
@@ -26,13 +34,6 @@
   exit
 fi
 
-dnl Checks for programs.
-AC_PROG_MAKE_SET
-AC_CHECK_PROG(STRIP,strip,strip)
-AC_CHECK_PROG(UNAME,uname,uname)
-
-AC_PROG_RANLIB
-
 dnl stop putting -g in there!  @#$!#$%!
 if test "x${CFLAGS}" = "x"
 then
@@ -98,7 +99,7 @@
     DEFAULT_MAKE=debugmem
     ;;
   BSD/OS)
-    if test "x`uname -r | cut -d . -f 1`" = "x2"
+    if test "x`${UNAME} -r | cut -d . -f 1`" = "x2"
     then
       AC_MSG_RESULT(BSD/OS 2! statically linked modules are the only choice)
       need_dl=0
@@ -128,7 +129,7 @@
     AC_DEFINE(MODULES_OK)
     ;;
   SunOS)
-    if test "x`uname -r | cut -d . -f 1`" = "x5"
+    if test "x`${UNAME} -r | cut -d . -f 1`" = "x5"
     then
       AC_MSG_RESULT(Solaris!)
       SHLIB_LD="/usr/ccs/bin/ld -G -z text"
@@ -143,7 +144,7 @@
     ;;
   OSF1)
     AC_MSG_RESULT(OSF...)
-    case `uname -r | cut -d . -f 1` in
+    case `${UNAME} -r | cut -d . -f 1` in
       V*)
 	AC_MSG_RESULT(Digital OSF)
 	SHLIB_LD="ld -shared -expect_unresolved '*'"
@@ -176,7 +177,7 @@
     AC_CHECK_LIB(dld,shl_load)
     AC_DEFINE(MODULES_OK)
     AC_DEFINE(HPUX_HACKS)
-    if test "x`uname -r | cut -d . -f 2`" = "x10"
+    if test "x`${UNAME} -r | cut -d . -f 2`" = "x10"
     then
        AC_DEFINE(HPUX10_HACKS)
     fi
@@ -220,7 +221,7 @@
   if test "x`${UNAME}`" = "xSunOS"
   then
     AC_MSG_CHECKING(for SunOS 4)
-    if test "x`uname -r | cut -d . -f 1`" = "x5"
+    if test "x`${UNAME} -r | cut -d . -f 1`" = "x5"
     then
       AC_MSG_RESULT(Solaris -- "*bollocks*" zarni )
     else
@@ -286,15 +287,11 @@
 # ---------- begin robey's tcl thingies
 # (well, what used to be robey's tcl thingies...)
 
-
 tclnames="tcl tcl8.3 tcl83 tcl8.2 tcl82 tcl8.1 tcl81 \
 	tcl8.0 tcl80 tcl7.6 tcl76 tcl7.5 tcl75"
 
 tcllibextensions=".so .so.1 .so.1.0 .so.1.2 .a"
 
-tclshpaths="/usr/local/bin /usr/local/pkgs/tcl/bin \
-	/usr/bin /bin $HOME/bin $HOME/tcl/bin $HOME"
-
 tcllibpaths="/usr/local/lib /usr/local/pkgs/tcl/lib \
 	/usr/lib /lib /usr/i486-linuxaout/lib \
 	$HOME/lib $HOME/tcl/lib $HOME"
@@ -306,59 +303,12 @@
 AC_ARG_WITH(tcllib, [  --with-tcllib=PATH      full path to tcl library], tcllibname=$withval)
 AC_ARG_WITH(tclinc, [  --with-tclinc=PATH      full path to tcl header], tclincname=$withval)
 
-AC_CHECK_PROG(BASENAME,basename,basename)
-AC_CHECK_PROG(DIRNAME,dirname,dirname)
-
-# workaround if we don't have a basename or dirname command, but have tclsh
-if test "x${BASENAME}" = "x" || test "x${DIRNAME}" = "x"
-then
-  for i in $tclshpaths
-  do
-    for j in $tclnames
-    do
-      k=`echo $j | sed s/tcl/tclsh/`
-      if test -x "$i/$k"
-      then
-	if test "x${BASENAME}" = "x"
-	then
-	  echo "No 'basename' command, using a workaround..."
-	  cat > basename.tmp <<EOF
-#!$i/$k
-puts [file tail [lindex \$argv 0]]
-exit 0
-EOF
-	  chmod 755 basename.tmp
-	  BASENAME=./basename.tmp
-	fi
-	if test "x${DIRNAME}" = "x"
-	then
-	  echo "No 'dirname' command, using a workaround..."
-	  cat > dirname.tmp <<EOF
-#!$i/$k
-puts [file dirname [lindex \$argv 0]]
-exit 0
-EOF
-	  chmod 755 dirname.tmp
-	  DIRNAME=./dirname.tmp
-	fi
-	break 2
-      fi
-    done
-  done
-  if test "x${BASENAME}" = "x" || test "x${DIRNAME}" = "x"
-  then
-    echo "ack...no basename or dirname, we can't configure Tcl without them."
-    exit 1
-  fi
-fi
-
 if test -r "$tcllibname"
 then
   TCLLIB=`$DIRNAME $tcllibname`
-  TCLLIBFN=`$BASENAME $tcllibname | cut -c4-`
-dnl FIXME
-  TCLLIBEXT=""
-  echo "Using Tcl library: $TCLLIB/lib$TCLLIBFN"
+  TCLLIBFN=`$BASENAME $tcllibname | awk '{j=split($1, i, "."); k=i[[j-1]]; sub(/lib/, "", k); print k}'`
+  TCLLIBEXT=".`echo $tcllibname | awk '{j=split($1, i, "."); k=i[[j]]; print k}'`"
+  echo "Using Tcl library: $TCLLIB/lib$TCLLIBFN$TCLLIBEXT"
 else
 
   # look for libtcl: if TCLLIB is set, check there first
@@ -554,8 +504,6 @@
 AC_SUBST(TCLINC)
 AC_SUBST(TCLLIB)
 AC_SUBST(TCLINCFN)
-dnl AC_SUBST(TCLLIBFN)
-dnl AC_SUBST(TCLLIBEXT)
 AC_SUBST(TCL_REQS)
 AC_SUBST(TCL_LIBS)
 


More information about the Patches mailing list