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"
cf_cv_pthread_flag=no
fi
rm -f conftest*
- CPPFLAGS=$save_CPPFLAGS
+ LIBS="$save_LIBS"
fi
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