]> git.sur5r.net Git - openldap/commitdiff
-pthread test should have mangled LIBS not CPPFLAGS
authorKurt Zeilenga <kurt@openldap.org>
Sat, 19 Sep 1998 04:57:41 +0000 (04:57 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sat, 19 Sep 1998 04:57:41 +0000 (04:57 +0000)
configure
configure.in

index 9f0e2fb0d1af694b0c3fc0b386408fffdce24a22..f0de599955f57fceb0672013d23e123831dfeb22 100755 (executable)
--- a/configure
+++ b/configure
@@ -1751,8 +1751,8 @@ if eval "test \"`echo '$''{'cf_cv_pthread_flag'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
-                                                               save_CPPFLAGS=$CPPFLAGS
-                               CPPFLAGS="-pthread $CPPFLAGS"
+                                                               save_LIBS="$LIBS"
+                               LIBS="-pthread $LIBS"
                                cat > conftest.$ac_ext <<EOF
 #line 1758 "configure"
 #include "confdefs.h"
@@ -1774,7 +1774,7 @@ else
   cf_cv_pthread_flag=no
 fi
 rm -f conftest*
-                                                               CPPFLAGS=$save_CPPFLAGS
+                                                               LIBS="$save_LIBS"
                        
 fi
 
index f1dd41b9091b36e1810698626ef1000c218621fa..6b5abd5d29bd05d8430efd0bf3805ec8723b28bf 100644 (file)
@@ -263,14 +263,14 @@ dnl                       AC_DEFINE(HAVE_LINUX_THREADS,1)
                        AC_CACHE_CHECK([for pthread_create with -pthread],
                                cf_cv_pthread_flag, [
                                dnl save the CPPFLAGS
-                               save_CPPFLAGS=$CPPFLAGS
-                               CPPFLAGS="-pthread $CPPFLAGS"
+                               save_LIBS="$LIBS"
+                               LIBS="-pthread $LIBS"
                                AC_TRY_LINK([#include <pthread.h>],[
                                        if(0) pthread_create((pthread_t*) 0,
                                                (pthread_attr_t*) 0, 0, 0);
                                        ], cf_cv_pthread_flag=yes, cf_cv_pthread_flag=no)
-                               dnl restore the CPPFLAGS
-                               CPPFLAGS=$save_CPPFLAGS
+                               dnl restore the LIBS
+                               LIBS="$save_LIBS"
                        ])
 
                        if test $cf_cv_pthread_flag = yes ; then