[eggheads-patches] PATCH: configure_tcl-more-changes.diff

Tothwolf tothwolf at concentric.net
Thu Oct 7 14:36:24 CST 1999


configure_tcl-more-changes.diff - More configure fixes, --with-tcllib is
                                  still not working completely, this
                                  should fix the rest tho.

-Toth
-------------- next part --------------
Index: Makefile.in
===================================================================
RCS file: /usr/local/cvsroot/eggdrop1.3/Makefile.in,v
retrieving revision 1.12
diff -u -r1.12 Makefile.in
--- Makefile.in	1999/10/06 19:45:58	1.12
+++ Makefile.in	1999/10/07 13:51:23
@@ -71,6 +71,7 @@
  
 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.18
diff -u -r1.18 configure
--- configure	1999/10/06 22:53:37	1.18
+++ configure	1999/10/07 13:51:31
@@ -1061,7 +1061,7 @@
 if test "x${CFLAGS}" = "x"
 then
   CFLAGS="-O"
-  if test "x$CC" = "xgcc"
+  if test "x${CC}" = "xgcc"
   then
     CFLAGS="-O2"
   fi
@@ -1093,15 +1093,14 @@
 fi
 rm -f $ac_file1 $ac_file2
 
-if test "x$STRIP" = "x"
+if test "x${STRIP}" = "x"
 then
   STRIP="touch"
 fi
 IRIX=no
-NT=no
-EGGEXEC=eggdrop
 LINUX=no
 need_dl=1
+EGGEXEC=eggdrop
 DEFAULT_MAKE=eggdrop
 BEL_MOD_CC="${CC}"
 BEL_MOD_LD="${CC}"
@@ -1110,9 +1109,8 @@
 SHLIB_LD="${CC}"
 SHLIB_STRIP="${STRIP}"
 echo $ac_n "checking your OS""... $ac_c" 1>&6
-echo "configure:1114: checking your OS" >&5
-system=`$UNAME`
-DLOPEN_1=1
+echo "configure:1113: checking your OS" >&5
+system=`${UNAME}`
 case $system in
   Linux)
     CFLAGS="$CFLAGS -Wall"
@@ -1125,7 +1123,6 @@
 
     LINUX=yes
     DEFAULT_MAKE=debugmem
-    DLOPEN_1=
     ;;
   BSD/OS)
     if test "x`uname -r | cut -d . -f 1`" = "x2"
@@ -1148,7 +1145,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:1152: checking for $ac_word" >&5
+echo "configure:1149: 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
@@ -1174,7 +1171,7 @@
   echo "$ac_t""no" 1>&6
 fi
 
-    if test "x$GMAKE" = "x"
+    if test "x${GMAKE}" = "x"
     then
       echo ""
       echo "Yoicks! you have BSD/OS & you dont have 'gmake', you may"
@@ -1184,13 +1181,12 @@
     ;;
   *BSD)
     echo "$ac_t""FreeBSD/NetBSD/OpenBSD - choose your poison" 1>&6
-    SHLIB_CC="$CC -fpic"
+    SHLIB_CC="${CC} -fpic"
     SHLIB_LD="ld -Bshareable -x"
     cat >> confdefs.h <<\EOF
 #define MODULES_OK 1
 EOF
 
-    DLOPEN_1=
     ;;
   SunOS)
     if test "x`uname -r | cut -d . -f 1`" = "x5"
@@ -1235,7 +1231,7 @@
 	;;
       1.*)
 	echo "$ac_t""1.3+" 1>&6
-	SHLIB_CFL="$CC -fpic"
+	SHLIB_CFL="${CC} -fpic"
 	SHLIB_LD='ld -shared'
 	cat >> confdefs.h <<\EOF
 #define OSF1_HACKS 1
@@ -1260,7 +1256,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:1264: checking for shl_load in -ldld" >&5
+echo "configure:1260: 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
@@ -1268,7 +1264,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldld  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1272 "configure"
+#line 1268 "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
@@ -1279,7 +1275,7 @@
 shl_load()
 ; return 0; }
 EOF
-if { (eval echo configure:1283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1279: \"$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
@@ -1352,12 +1348,12 @@
     ;;
 esac
 
-if test "${IRIX}" = "yes"
+if test "$IRIX" = "yes"
 then
-  echo Skipping library tests because they CONFUSE Irix.
+  echo "Skipping library tests because they CONFUSE Irix."
 else
   echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
-echo "configure:1361: checking for socket in -lsocket" >&5
+echo "configure:1357: 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
@@ -1365,7 +1361,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1369 "configure"
+#line 1365 "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
@@ -1376,7 +1372,7 @@
 socket()
 ; return 0; }
 EOF
-if { (eval echo configure:1380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1376: \"$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
@@ -1404,7 +1400,7 @@
 fi
 
   echo $ac_n "checking for connect in -lnsl""... $ac_c" 1>&6
-echo "configure:1408: checking for connect in -lnsl" >&5
+echo "configure:1404: 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
@@ -1412,7 +1408,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1416 "configure"
+#line 1412 "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
@@ -1423,7 +1419,7 @@
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:1427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1423: \"$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
@@ -1451,7 +1447,7 @@
 fi
 
   echo $ac_n "checking for gethostbyname in -ldns""... $ac_c" 1>&6
-echo "configure:1455: checking for gethostbyname in -ldns" >&5
+echo "configure:1451: 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
@@ -1459,7 +1455,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldns  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1463 "configure"
+#line 1459 "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
@@ -1470,7 +1466,7 @@
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:1474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1470: \"$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
@@ -1498,7 +1494,7 @@
 fi
 
   echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:1502: checking for dlopen in -ldl" >&5
+echo "configure:1498: 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
@@ -1506,7 +1502,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1510 "configure"
+#line 1506 "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
@@ -1517,7 +1513,7 @@
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:1521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1517: \"$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
@@ -1547,14 +1543,14 @@
   if test "x`${UNAME}`" = "xSunOS"
   then
     echo $ac_n "checking for SunOS 4""... $ac_c" 1>&6
-echo "configure:1551: checking for SunOS 4" >&5
+echo "configure:1547: 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:1558: checking for main in -ldl" >&5
+echo "configure:1554: 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
@@ -1562,14 +1558,14 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1566 "configure"
+#line 1562 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:1573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1569: \"$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
@@ -1601,14 +1597,14 @@
 fi
 
 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:1605: checking whether byte ordering is bigendian" >&5
+echo "configure:1601: 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 1612 "configure"
+#line 1608 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -1619,11 +1615,11 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:1623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1619: \"$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 1627 "configure"
+#line 1623 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -1634,7 +1630,7 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:1638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_bigendian=yes
 else
@@ -1654,7 +1650,7 @@
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 1658 "configure"
+#line 1654 "configure"
 #include "confdefs.h"
 main () {
   /* Are we little or big endian?  From Harbison&Steele.  */
@@ -1667,7 +1663,7 @@
   exit (u.c[sizeof (long) - 1] == 1);
 }
 EOF
-if { (eval echo configure:1671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1667: \"$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
@@ -1691,7 +1687,7 @@
 fi
 
 echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:1695: checking size of long" >&5
+echo "configure:1691: 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
@@ -1699,7 +1695,7 @@
   ac_cv_sizeof_long=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1703 "configure"
+#line 1699 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -1710,7 +1706,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:1714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1710: \"$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
@@ -1730,7 +1726,7 @@
 
 
 echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:1734: checking size of int" >&5
+echo "configure:1730: 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
@@ -1738,7 +1734,7 @@
   ac_cv_sizeof_int=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1742 "configure"
+#line 1738 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -1749,7 +1745,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:1753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1749: \"$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
@@ -1774,12 +1770,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:1778: checking for $ac_hdr that defines DIR" >&5
+echo "configure:1774: 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 1783 "configure"
+#line 1779 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_hdr>
@@ -1787,7 +1783,7 @@
 DIR *dirp = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:1791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval "ac_cv_header_dirent_$ac_safe=yes"
 else
@@ -1812,7 +1808,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:1816: checking for opendir in -ldir" >&5
+echo "configure:1812: 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
@@ -1820,7 +1816,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldir  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1824 "configure"
+#line 1820 "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
@@ -1831,7 +1827,7 @@
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:1835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1831: \"$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
@@ -1853,7 +1849,7 @@
 
 else
 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:1857: checking for opendir in -lx" >&5
+echo "configure:1853: 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
@@ -1861,7 +1857,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1865 "configure"
+#line 1861 "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
@@ -1872,7 +1868,7 @@
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:1876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1872: \"$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
@@ -1895,12 +1891,12 @@
 fi
 
 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:1899: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:1895: 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 1904 "configure"
+#line 1900 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -1916,7 +1912,7 @@
 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
 ; return 0; }
 EOF
-if { (eval echo configure:1920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_sys_wait_h=yes
 else
@@ -1940,17 +1936,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1944: checking for $ac_hdr" >&5
+echo "configure:1940: 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 1949 "configure"
+#line 1945 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1950: \"$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*
@@ -1978,12 +1974,12 @@
 
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1982: checking for ANSI C header files" >&5
+echo "configure:1978: 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 1987 "configure"
+#line 1983 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1991,7 +1987,7 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1995: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1991: \"$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*
@@ -2008,7 +2004,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 2012 "configure"
+#line 2008 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -2026,7 +2022,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 2030 "configure"
+#line 2026 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -2047,7 +2043,7 @@
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 2051 "configure"
+#line 2047 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2058,7 +2054,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:2062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -2082,12 +2078,12 @@
 fi
 
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:2086: checking for pid_t" >&5
+echo "configure:2082: 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 2091 "configure"
+#line 2087 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -2115,12 +2111,12 @@
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:2119: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:2115: 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 2124 "configure"
+#line 2120 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -2129,7 +2125,7 @@
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:2133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -2153,12 +2149,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:2157: checking for $ac_func" >&5
+echo "configure:2153: 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 2162 "configure"
+#line 2158 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2181,7 +2177,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2181: \"$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
@@ -2208,12 +2204,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:2212: checking for $ac_func" >&5
+echo "configure:2208: 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 2217 "configure"
+#line 2213 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2236,7 +2232,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2236: \"$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
@@ -2263,12 +2259,12 @@
 for ac_func in dprintf bzero uname vsnprintf
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2267: checking for $ac_func" >&5
+echo "configure:2263: 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 2272 "configure"
+#line 2268 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2291,7 +2287,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2291: \"$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
@@ -2316,7 +2312,7 @@
 done
 
 
-if test "${ac_cv_func_vsprintf}" = "no"
+if test "x${ac_cv_func_vsprintf}" = "xno"
 then
   echo ""
   echo "Your system does not have the sprintf/vsprintf libraries."
@@ -2325,7 +2321,7 @@
   exit
 fi
 
-if test "${ac_cv_header_stdc}" = "no"
+if test "x${ac_cv_header_stdc}" = "xno"
 then
   echo ""
   echo "Your system must support ANSI C Header files."
@@ -2334,7 +2330,7 @@
 fi
 
 echo $ac_n "checking space left in file database struct""... $ac_c" 1>&6
-echo "configure:2338: checking space left in file database struct" >&5
+echo "configure:2334: checking space left in file database struct" >&5
 cat >abacab.c <<'EOF'
 #include <stdio.h>
 #include <sys/time.h>
@@ -2352,6 +2348,22 @@
 # ---------- 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"
+
+tclheaderpaths="/usr/local/include /usr/local/pkgs/tcl/include \
+	/usr/include $HOME/include $HOME/tcl/include $HOME"
+
 # Check whether --with-tcllib or --without-tcllib was given.
 if test "${with_tcllib+set}" = set; then
   withval="$with_tcllib"
@@ -2368,7 +2380,7 @@
 # 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:2372: checking for $ac_word" >&5
+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
@@ -2397,7 +2409,7 @@
 # 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:2401: checking for $ac_word" >&5
+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
@@ -2423,50 +2435,77 @@
   echo "$ac_t""no" 1>&6
 fi
 
-if test "$BASENAME" = "" || test "$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
-  echo "ack...no basename or dirname, we can't configure Tcl without them."
-  exit 1
+  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
 
-tcllibnames="tcl 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"
-
-tcllibpaths="/usr/local/lib /usr/local/pkgs/tcl/lib \
-	/usr/lib /lib /usr/i486-linuxaout/lib \
-	$HOME/lib $HOME/tcl/lib $HOME"
-
-tclheaderpaths="/usr/local/include /usr/local/pkgs/tcl/include \
-	/usr/include $HOME/include $HOME/tcl/include $HOME"
 if test -r "$tcllibname"
 then
   TCLLIB=`$DIRNAME $tcllibname`
   TCLLIBFN=`$BASENAME $tcllibname | cut -c4-`
-  echo "using tcllib $TCLLIB/lib$TCLLIBFN"
+  TCLLIBEXT=""
+  echo "Using Tcl library: $TCLLIB/lib$TCLLIBFN"
 else
 
   # look for libtcl: if TCLLIB is set, check there first
-  if test ! "$TCLLIB" = ""
+  if test ! "x${TCLLIB}" = "x"
   then
-    for tcllibfn in $tcllibnames
+    for tcllibfn in $tclnames
     do
       for tcllibext in $tcllibextensions
       do
 	if test -r "$TCLLIB/lib$tcllibfn$tcllibext"
 	then
-	  if test "$TCLLIBFN" = ""
+	  if test "x${TCLLIBFN}" = "x"
 	  then
-	    TCLLIBFN=$libtclfn$tcllibext
+	    TCLLIBFN=$libtclfn
 	    TCLLIBEXT=$tcllibext
-	    TCLLIBVER=`echo $tcllibfn | cut -c4-`
 	    break 2
 	  fi
 	fi
       done
     done
-    if test "$TCLLIBFN" = ""
+    if test "x${TCLLIBFN}" = "x"
     then
       echo "Environment variable TCLLIB is set, but incorrect."
       unset TCLLIB
@@ -2475,12 +2514,12 @@
 
   # check in common places now
   echo $ac_n "checking for libtcl""... $ac_c" 1>&6
-echo "configure:2479: checking for libtcl" >&5
-  if test ! "$TCLLIB" = ""
+echo "configure:2518: checking for libtcl" >&5
+  if test ! "x${TCLLIB}" = "x"
   then
-    echo "$ac_t""found in $TCLLIB/lib$TCLLIBFN" 1>&6
+    echo "$ac_t""found in $TCLLIB/lib$TCLLIBFN$TCLLIBEXT" 1>&6
   else
-    for tcllibfn in $tcllibnames
+    for tcllibfn in $tclnames
     do
       for tcllibext in $tcllibextensions
       do
@@ -2488,13 +2527,12 @@
 	do
 	  if test -r "$tcllibpath/lib$tcllibfn$tcllibext"
 	  then
-	    if test "$TCLLIB" = ""
+	    if test "x${TCLLIB}" = "x"
 	    then
 	      echo "$ac_t""found in $tcllibpath/lib$tcllibfn$tcllibext" 1>&6
 	      TCLLIB=$tcllibpath
-	      TCLLIBFN=$tcllibfn$tcllibext
+	      TCLLIBFN=$tcllibfn
 	      TCLLIBEXT=$tcllibext
-	      TCLLIBVER=`echo $tcllibfn | cut -c4-`
 	      break 3
 	    fi
 	  fi
@@ -2506,7 +2544,7 @@
 fi # test tcllibname
 
 # give up if they don't even have that
-if test "$TCLLIB" = ""
+if test "x${TCLLIB}" = "x"
 then
   echo "$ac_t""not found" 1>&6
 fi
@@ -2516,12 +2554,12 @@
 then
   TCLINC=`$DIRNAME $tclincname`
   TCLINCFN=`$BASENAME $tclincname`
-  echo "using TCL header $TCLINC/$TCLINCFN"
+  echo "Using Tcl header: $TCLINC/$TCLINCFN"
 else
 
   TCLINCFN=tcl.h
 
-  if test ! "$TCLINC" = ""
+  if test ! "x${TCLINC}" = "x"
   then
     if test ! -r "$TCLINC/$TCLINCFN"
     then
@@ -2532,8 +2570,8 @@
 
   # check in common places now
   echo $ac_n "checking for $TCLINCFN""... $ac_c" 1>&6
-echo "configure:2536: checking for $TCLINCFN" >&5
-  if test ! "$TCLINC" = ""
+echo "configure:2574: checking for $TCLINCFN" >&5
+  if test ! "x${TCLINC}" = "x"
   then
     echo "$ac_t""found in $TCLINC/$TCLINCFN" 1>&6
   else
@@ -2541,7 +2579,7 @@
     do
       if test -r "$headerpath/$TCLINCFN"
       then
-	if test "$TCLINC" = ""
+	if test "x${TCLINC}" = "x"
 	then
 	  echo "$ac_t""found in $headerpath/$TCLINCFN" 1>&6
 	  TCLINC=$headerpath
@@ -2549,16 +2587,16 @@
 	fi
       fi
     done
-    if test "$TCLINC" = ""
+    if test "x${TCLINC}" = "x"
     then
-      for tcllibfn in $tcllibnames
+      for tcllibfn in $tclnames
       do
 	for headerpath in $tclheaderpaths
 	do
 	  if test -r "$headerpath/$tcllibfn/$TCLINCFN"
 	  then
 	    echo "$ac_t""found in $headerpath/$TCLINCFN" 1>&6
-	    TCLINC=$headerpath
+	    TCLINC=$headerpath/$tcllibfn
 	    break 2
 	  fi
 	done
@@ -2567,20 +2605,18 @@
   fi
 
   # had TCLLIB but not TCLINC?  so close... :(
-  if test "$TCLINC" = ""
+  if test "x${TCLINC}" = "x"
   then
     echo "$ac_t""not found" 1>&6
     unset TCLLIB
     unset TCLLIBFN
     unset TCLLIBEXT
-    unset TCLLIBVER
   fi
 
 fi # test tclincname
 
 # done looking, now either TCLLIB & TCLINC are both set, or neither is set
-
-if test "$TCLLIB" = ""
+if test "x${TCLLIB}" = "x"
 then
   echo ""
   echo "I can't find Tcl on this system."
@@ -2588,7 +2624,7 @@
   echo "Eggdrop now requires Tcl to compile.  If you already have Tcl"
   echo "installed on this system, and I just wasn't looking in the right"
   echo "place for it, set the environment variables TCLLIB and TCLINC so"
-  echo "I will know where to find 'libtcl.a' (or 'libtcl.so') and '$TCLINCFN'"
+  echo "I will know where to find 'libtcl.a' (or 'libtcl.so') and 'tcl.h'"
   echo "(respectively).  Then run 'configure' again."
   echo ""
   echo "Read the README file if you don't know what Tcl is or how to get"
@@ -2597,12 +2633,12 @@
   exit 1
 else
   echo $ac_n "checking for Tcl version""... $ac_c" 1>&6
-echo "configure:2601: checking for Tcl version" >&5
+echo "configure:2637: checking for Tcl version" >&5
 
-  for ver in $tcllibnames
+  for ver in $tclnames
   do
     ver=`echo $ver | cut -c4-`
-    if test ! "$ver" = ""
+    if test ! "x${ver}" = "x"
     then
       TCLVERFOUND=`grep TCL_VERSION $TCLINC/$TCLINCFN | grep $ver | wc -l`
       if test ! $TCLVERFOUND = 0
@@ -2613,7 +2649,7 @@
     fi
   done
 
-  if test ! "$TCLVER" = ""
+  if test ! "x${TCLVER}" = "x"
   then
     echo "$ac_t""$TCLVER found" 1>&6
   else
@@ -2622,21 +2658,22 @@
 
   if test $TCLVERFOUND = 1
   then
-    TCL_REQS="$TCLLIB/lib$TCLLIBFN"
-    TCL_LIBS="-L$TCLLIB -ltcl$TCLLIBVER -lm"
+    TCL_REQS="$TCLLIB/lib$TCLLIBFN$TCLLIBEXT"
+    TCL_LIBS="-L$TCLLIB -l$TCLLIBFN -lm"
   else
     echo ""
-    echo "Your tcl version is too old - version 7.4 or earlier"
-    echo "I suggest you download and complie a more recent version"
+    echo "Your tcl version is much too old for eggdrop to use."
+    echo "I suggest you download and complie a more recent version."
     echo "The most reliable current version is 8.2.1"
     echo ""
     exit 1
   fi
 
-  if test "$TCLLIBEXT" = ".a"
+  if test "x${TCLLIBEXT}" = "x.a"
   then
     echo ""
-    echo "Your libtcl is not a shared library, eggdrop will build static."
+    echo "Your libtcl is not a shared library."
+    echo "Eggdrop will build static."
     echo ""
     DEFAULT_MAKE=static
   fi
@@ -2649,10 +2686,9 @@
 
 
 
-
 # ---------- end of robey's tcl thingies
 
-if test $need_dl = 1 && test "${ac_cv_func_dlopen}" = "no"
+if test $need_dl = 1 && test "x${ac_cv_func_dlopen}" = "xno"
 then
   if test "$LINUX" = "yes"
   then
@@ -2687,7 +2723,7 @@
   fi
 fi
 
-if test ! "x$GMAKE" = "x"
+if test ! "x${GMAKE}" = "x"
 then
   SET_MAKE="MAKE=gmake"
 fi
@@ -2855,7 +2891,6 @@
 s%@TCLINC@%$TCLINC%g
 s%@TCLLIB@%$TCLLIB%g
 s%@TCLINCFN@%$TCLINCFN%g
-s%@TCLLIBFN@%$TCLLIBFN%g
 s%@TCL_REQS@%$TCL_REQS%g
 s%@TCL_LIBS@%$TCL_LIBS%g
 s%@DEST@%$DEST%g
@@ -3087,7 +3122,7 @@
 
 
 # make sure we start with a clean build tree
-if test -r "eggdrop"
+if test -r "./eggdrop"
 then
   make clean
 fi
Index: configure.in
===================================================================
RCS file: /usr/local/cvsroot/eggdrop1.3/configure.in,v
retrieving revision 1.18
diff -u -r1.18 configure.in
--- configure.in	1999/10/06 23:54:38	1.18
+++ configure.in	1999/10/07 13:51:32
@@ -37,7 +37,7 @@
 if test "x${CFLAGS}" = "x"
 then
   CFLAGS="-O"
-  if test "x$CC" = "xgcc"
+  if test "x${CC}" = "xgcc"
   then
     CFLAGS="-O2"
   fi
@@ -70,15 +70,14 @@
 rm -f $ac_file1 $ac_file2
 
 dnl test the os and set the module linking settings
-if test "x$STRIP" = "x"
+if test "x${STRIP}" = "x"
 then
   STRIP="touch"
 fi
 IRIX=no
-NT=no
-EGGEXEC=eggdrop
 LINUX=no
 need_dl=1
+EGGEXEC=eggdrop
 DEFAULT_MAKE=eggdrop
 BEL_MOD_CC="${CC}"
 BEL_MOD_LD="${CC}"
@@ -87,8 +86,7 @@
 SHLIB_LD="${CC}"
 SHLIB_STRIP="${STRIP}"
 AC_MSG_CHECKING(your OS)
-system=`$UNAME`
-DLOPEN_1=1
+system=`${UNAME}`
 case $system in
   Linux)
     CFLAGS="$CFLAGS -Wall"
@@ -98,7 +96,6 @@
     AC_DEFINE(MODULES_OK)
     LINUX=yes
     DEFAULT_MAKE=debugmem
-    DLOPEN_1=
     ;;
   BSD/OS)
     if test "x`uname -r | cut -d . -f 1`" = "x2"
@@ -116,7 +113,7 @@
       AC_DEFINE(MODULES_OK)
     fi
     AC_CHECK_PROG(GMAKE,gmake,gmake)
-    if test "x$GMAKE" = "x"
+    if test "x${GMAKE}" = "x"
     then
       echo ""
       echo "Yoicks! you have BSD/OS & you dont have 'gmake', you may"
@@ -126,10 +123,9 @@
     ;;
   *BSD)
     AC_MSG_RESULT(FreeBSD/NetBSD/OpenBSD - choose your poison)
-    SHLIB_CC="$CC -fpic"
+    SHLIB_CC="${CC} -fpic"
     SHLIB_LD="ld -Bshareable -x"
     AC_DEFINE(MODULES_OK)
-    DLOPEN_1=
     ;;
   SunOS)
     if test "x`uname -r | cut -d . -f 1`" = "x5"
@@ -162,7 +158,7 @@
 	;;
       1.*)
 	AC_MSG_RESULT(1.3+)
-	SHLIB_CFL="$CC -fpic"
+	SHLIB_CFL="${CC} -fpic"
 	SHLIB_LD='ld -shared'
 	AC_DEFINE(OSF1_HACKS)
 	AC_DEFINE(MODULES_OK)
@@ -213,9 +209,9 @@
 esac
 
 dnl Check for Sun libraries.
-if test "${IRIX}" = "yes"
+if test "$IRIX" = "yes"
 then
-  echo Skipping library tests because they CONFUSE Irix.
+  echo "Skipping library tests because they CONFUSE Irix."
 else
   AC_CHECK_LIB(socket,socket)
   AC_CHECK_LIB(nsl,connect)
@@ -253,7 +249,7 @@
 AC_CHECK_FUNCS(sigemptyset vsprintf strcasecmp setpgid clock dlopen)
 AC_CHECK_FUNCS(dprintf bzero uname vsnprintf)
 
-if test "${ac_cv_func_vsprintf}" = "no"
+if test "x${ac_cv_func_vsprintf}" = "xno"
 then
   echo ""
   echo "Your system does not have the sprintf/vsprintf libraries."
@@ -262,7 +258,7 @@
   exit
 fi
 
-if test "${ac_cv_header_stdc}" = "no"
+if test "x${ac_cv_header_stdc}" = "xno"
 then
   echo ""
   echo "Your system must support ANSI C Header files."
@@ -290,56 +286,100 @@
 # ---------- begin robey's tcl thingies
 # (well, what used to be robey's tcl thingies...)
 
-dnl oohh new configure --variables for those with multiple tcl libs
-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)
-if test "$BASENAME" = "" || test "$DIRNAME" = ""
-then
-  echo "ack...no basename or dirname, we can't configure Tcl without them."
-  exit 1
-fi
 
-tcllibnames="tcl tcl8.2 tcl82 tcl8.1 tcl81 \
+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"
 
 tclheaderpaths="/usr/local/include /usr/local/pkgs/tcl/include \
 	/usr/include $HOME/include $HOME/tcl/include $HOME"
+
+dnl oohh new configure --variables for those with multiple tcl libs
+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-`
-  echo "using tcllib $TCLLIB/lib$TCLLIBFN"
+dnl FIXME
+  TCLLIBEXT=""
+  echo "Using Tcl library: $TCLLIB/lib$TCLLIBFN"
 else
 
   # look for libtcl: if TCLLIB is set, check there first
-  if test ! "$TCLLIB" = ""
+  if test ! "x${TCLLIB}" = "x"
   then
-    for tcllibfn in $tcllibnames
+    for tcllibfn in $tclnames
     do
       for tcllibext in $tcllibextensions
       do
 	if test -r "$TCLLIB/lib$tcllibfn$tcllibext"
 	then
-	  if test "$TCLLIBFN" = ""
+	  if test "x${TCLLIBFN}" = "x"
 	  then
-	    TCLLIBFN=$libtclfn$tcllibext
+	    TCLLIBFN=$libtclfn
 	    TCLLIBEXT=$tcllibext
-	    TCLLIBVER=`echo $tcllibfn | cut -c4-`
 	    break 2
 	  fi
 	fi
       done
     done
-    if test "$TCLLIBFN" = ""
+    if test "x${TCLLIBFN}" = "x"
     then
       echo "Environment variable TCLLIB is set, but incorrect."
       unset TCLLIB
@@ -348,11 +388,11 @@
 
   # check in common places now
   AC_MSG_CHECKING(for libtcl)
-  if test ! "$TCLLIB" = ""
+  if test ! "x${TCLLIB}" = "x"
   then
-    AC_MSG_RESULT(found in $TCLLIB/lib$TCLLIBFN)
+    AC_MSG_RESULT(found in $TCLLIB/lib$TCLLIBFN$TCLLIBEXT)
   else
-    for tcllibfn in $tcllibnames
+    for tcllibfn in $tclnames
     do
       for tcllibext in $tcllibextensions
       do
@@ -360,13 +400,12 @@
 	do
 	  if test -r "$tcllibpath/lib$tcllibfn$tcllibext"
 	  then
-	    if test "$TCLLIB" = ""
+	    if test "x${TCLLIB}" = "x"
 	    then
 	      AC_MSG_RESULT(found in $tcllibpath/lib$tcllibfn$tcllibext)
 	      TCLLIB=$tcllibpath
-	      TCLLIBFN=$tcllibfn$tcllibext
+	      TCLLIBFN=$tcllibfn
 	      TCLLIBEXT=$tcllibext
-	      TCLLIBVER=`echo $tcllibfn | cut -c4-`
 	      break 3
 	    fi
 	  fi
@@ -378,7 +417,7 @@
 fi # test tcllibname
 
 # give up if they don't even have that
-if test "$TCLLIB" = ""
+if test "x${TCLLIB}" = "x"
 then
   AC_MSG_RESULT(not found)
 fi
@@ -388,12 +427,12 @@
 then
   TCLINC=`$DIRNAME $tclincname`
   TCLINCFN=`$BASENAME $tclincname`
-  echo "using TCL header $TCLINC/$TCLINCFN"
+  echo "Using Tcl header: $TCLINC/$TCLINCFN"
 else
 
   TCLINCFN=tcl.h
 
-  if test ! "$TCLINC" = ""
+  if test ! "x${TCLINC}" = "x"
   then
     if test ! -r "$TCLINC/$TCLINCFN"
     then
@@ -404,7 +443,7 @@
 
   # check in common places now
   AC_MSG_CHECKING(for $TCLINCFN)
-  if test ! "$TCLINC" = ""
+  if test ! "x${TCLINC}" = "x"
   then
     AC_MSG_RESULT(found in $TCLINC/$TCLINCFN)
   else
@@ -412,7 +451,7 @@
     do
       if test -r "$headerpath/$TCLINCFN"
       then
-	if test "$TCLINC" = ""
+	if test "x${TCLINC}" = "x"
 	then
 	  AC_MSG_RESULT(found in $headerpath/$TCLINCFN)
 	  TCLINC=$headerpath
@@ -420,16 +459,16 @@
 	fi
       fi
     done
-    if test "$TCLINC" = ""
+    if test "x${TCLINC}" = "x"
     then
-      for tcllibfn in $tcllibnames
+      for tcllibfn in $tclnames
       do
 	for headerpath in $tclheaderpaths
 	do
 	  if test -r "$headerpath/$tcllibfn/$TCLINCFN"
 	  then
 	    AC_MSG_RESULT(found in $headerpath/$TCLINCFN)
-	    TCLINC=$headerpath
+	    TCLINC=$headerpath/$tcllibfn
 	    break 2
 	  fi
 	done
@@ -438,20 +477,18 @@
   fi
 
   # had TCLLIB but not TCLINC?  so close... :(
-  if test "$TCLINC" = ""
+  if test "x${TCLINC}" = "x"
   then
     AC_MSG_RESULT(not found)
     unset TCLLIB
     unset TCLLIBFN
     unset TCLLIBEXT
-    unset TCLLIBVER
   fi
 
 fi # test tclincname
 
 # done looking, now either TCLLIB & TCLINC are both set, or neither is set
-
-if test "$TCLLIB" = ""
+if test "x${TCLLIB}" = "x"
 then
   echo ""
   echo "I can't find Tcl on this system."
@@ -469,10 +506,10 @@
 else
   AC_MSG_CHECKING(for Tcl version)
 
-  for ver in $tcllibnames
+  for ver in $tclnames
   do
     ver=`echo $ver | cut -c4-`
-    if test ! "$ver" = ""
+    if test ! "x${ver}" = "x"
     then
       TCLVERFOUND=`grep TCL_VERSION $TCLINC/$TCLINCFN | grep $ver | wc -l`
       if test ! $TCLVERFOUND = 0
@@ -483,7 +520,7 @@
     fi
   done
 
-  if test ! "$TCLVER" = ""
+  if test ! "x${TCLVER}" = "x"
   then
     AC_MSG_RESULT($TCLVER found)
   else
@@ -492,21 +529,22 @@
 
   if test $TCLVERFOUND = 1
   then
-    TCL_REQS="$TCLLIB/lib$TCLLIBFN"
-    TCL_LIBS="-L$TCLLIB -ltcl$TCLLIBVER -lm"
+    TCL_REQS="$TCLLIB/lib$TCLLIBFN$TCLLIBEXT"
+    TCL_LIBS="-L$TCLLIB -l$TCLLIBFN -lm"
   else
     echo ""
-    echo "Your tcl version is too old - version 7.4 or earlier"
-    echo "I suggest you download and complie a more recent version"
+    echo "Your tcl version is much too old for eggdrop to use."
+    echo "I suggest you download and complie a more recent version."
     echo "The most reliable current version is 8.2.1"
     echo ""
     exit 1
   fi
 
-  if test "$TCLLIBEXT" = ".a"
+  if test "x${TCLLIBEXT}" = "x.a"
   then
     echo ""
-    echo "Your libtcl is not a shared library, eggdrop will build static."
+    echo "Your libtcl is not a shared library."
+    echo "Eggdrop will build static."
     echo ""
     DEFAULT_MAKE=static
   fi
@@ -516,13 +554,14 @@
 AC_SUBST(TCLINC)
 AC_SUBST(TCLLIB)
 AC_SUBST(TCLINCFN)
-AC_SUBST(TCLLIBFN)
+dnl AC_SUBST(TCLLIBFN)
+dnl AC_SUBST(TCLLIBEXT)
 AC_SUBST(TCL_REQS)
 AC_SUBST(TCL_LIBS)
 
 # ---------- end of robey's tcl thingies
 
-if test $need_dl = 1 && test "${ac_cv_func_dlopen}" = "no"
+if test $need_dl = 1 && test "x${ac_cv_func_dlopen}" = "xno"
 then
   if test "$LINUX" = "yes"
   then
@@ -554,7 +593,7 @@
   fi
 fi
 
-if test ! "x$GMAKE" = "x"
+if test ! "x${GMAKE}" = "x"
 then
   SET_MAKE="MAKE=gmake"
 fi
@@ -581,7 +620,7 @@
 AC_OUTPUT(Makefile lush.h)
 
 # make sure we start with a clean build tree
-if test -r "eggdrop"
+if test -r "./eggdrop"
 then
   make clean
 fi


More information about the Patches mailing list