[eggheads-patches] PATCH: tcl-pthreads-part2.diff

Tothwolf tothwolf at concentric.net
Tue Oct 19 19:38:27 CST 1999


tcl-pthreads-part2.diff:
  Tcl threads test needed -lpthread and $LIBS for unshared Tcl lib
  Removed unused var 'ac_cv_var_pthread'

-Toth

-------------- next part --------------
diff -urNPX ../exclude ../eggdrop1.3.tmp/configure ./configure
--- ../eggdrop1.3.tmp/configure	Tue Oct 19 14:07:58 1999
+++ ./configure	Tue Oct 19 14:59:31 1999
@@ -1747,10 +1747,10 @@
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  ac_cv_var_pthread=yes
+  ac_cv_lib_pthread_pthread_create=yes
 else
   echo "$ac_t""no" 1>&6
-ac_cv_var_pthread=no
+ac_cv_lib_pthread_pthread_create=no
 fi
 
   if test "$SUNOS" = "yes"
@@ -3176,15 +3176,19 @@
     echo $ac_n "(cached) $ac_c" 1>&6
   else
     ac_save_LIBS="$LIBS"
+    if test "x${ac_cv_lib_pthread_pthread_create}" = "xyes"
+    then
+      LIBS="-lpthread $LIBS"
+    fi
     if test ! "x${TCLLIBEXT}" = "x.a"
     then
-      LIBS="-L$TCLLIB -l$TCLLIBFNS -lm"
+      LIBS="-L$TCLLIB -l$TCLLIBFNS -lm $LIBS"
     else
       if test ! "x${tcllibname}" = "x"
       then
-	LIBS="$TCLLIB/lib$TCLLIBFN -lm"
+	LIBS="$TCLLIB/lib$TCLLIBFN -lm $LIBS"
       else
-	LIBS="-L$TCLLIB -l$TCLLIBFNS -lm"
+	LIBS="-L$TCLLIB -l$TCLLIBFNS -lm $LIBS"
       fi
     fi
     cat > conftest.$ac_ext << EOF
@@ -3215,7 +3219,7 @@
 then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for Tcl threads bug""... $ac_c" 1>&6
-echo "configure:3219: checking for Tcl threads bug" >&5
+echo "configure:3223: checking for Tcl threads bug" >&5
   TCL_VER_IS81=`echo $TCL_VERSION | $AWK '{split($1, i, "."); if ((i[1] == 8) && (i[2] == 1)) print "yes"; else print "no"}'`
   if test "x$TCL_VER_IS81" = "xyes"
   then
@@ -3265,7 +3269,7 @@
 fi
 
 # add -lpthread to $LIBS if we need it
-if test "x${ac_cv_var_tcl_threads}" = "xyes" && test "x${ac_cv_var_pthread}" = "xyes"
+if test "x${ac_cv_var_tcl_threads}" = "xyes" && test "x${ac_cv_lib_pthread_pthread_create}" = "xyes"
 then
   LIBS="-lpthread $LIBS"
 fi
diff -urNPX ../exclude ../eggdrop1.3.tmp/configure.in ./configure.in
--- ../eggdrop1.3.tmp/configure.in	Tue Oct 19 14:07:48 1999
+++ ./configure.in	Tue Oct 19 14:54:16 1999
@@ -273,7 +273,7 @@
   AC_CHECK_LIB(dns,gethostbyname)
   AC_CHECK_LIB(dl,dlopen)
 dnl this is needed for Tcl compiled with thread support
-  AC_CHECK_LIB(pthread,pthread_create,ac_cv_var_pthread=yes,ac_cv_var_pthread=no)
+  AC_CHECK_LIB(pthread,pthread_create,ac_cv_lib_pthread_pthread_create=yes,ac_cv_lib_pthread_pthread_create=no)
   if test "$SUNOS" = "yes"
   then
     dnl for suns without yp or something like that
@@ -729,15 +729,19 @@
     echo $ac_n "(cached) $ac_c" 1>&6
   else
     ac_save_LIBS="$LIBS"
+    if test "x${ac_cv_lib_pthread_pthread_create}" = "xyes"
+    then
+      LIBS="-lpthread $LIBS"
+    fi
     if test ! "x${TCLLIBEXT}" = "x.a"
     then
-      LIBS="-L$TCLLIB -l$TCLLIBFNS -lm"
+      LIBS="-L$TCLLIB -l$TCLLIBFNS -lm $LIBS"
     else
       if test ! "x${tcllibname}" = "x"
       then
-	LIBS="$TCLLIB/lib$TCLLIBFN -lm"
+	LIBS="$TCLLIB/lib$TCLLIBFN -lm $LIBS"
       else
-	LIBS="-L$TCLLIB -l$TCLLIBFNS -lm"
+	LIBS="-L$TCLLIB -l$TCLLIBFNS -lm $LIBS"
       fi
     fi
     cat > conftest.$ac_ext << EOF
@@ -818,7 +822,7 @@
 fi
 
 # add -lpthread to $LIBS if we need it
-if test "x${ac_cv_var_tcl_threads}" = "xyes" && test "x${ac_cv_var_pthread}" = "xyes"
+if test "x${ac_cv_var_tcl_threads}" = "xyes" && test "x${ac_cv_lib_pthread_pthread_create}" = "xyes"
 then
   LIBS="-lpthread $LIBS"
 fi


More information about the Patches mailing list