Refine ax_pthread

This commit is contained in:
Max Lv
2015-12-21 12:01:56 +08:00
parent f3117e24af
commit 5ddf786c19
2 changed files with 2 additions and 12 deletions
Vendored
+1 -5
View File
@@ -15550,16 +15550,12 @@ test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
if test x"$ax_pthread_ok" = xyes; then
$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
CC="$PTHREAD_CC"
:
else
ax_pthread_ok=no
as_fn_error $? "No pthread support on this machine" "$LINENO" 5
as_fn_error $? "Can not find pthreads. This is required." "$LINENO" 5
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
+1 -7
View File
@@ -267,13 +267,7 @@ AC_CHECK_LIB(socket, connect)
dnl Checks for library functions.
AC_CHECK_FUNCS([malloc memset socket])
AX_PTHREAD([
AC_DEFINE(HAVE_PTHREAD, 1,
[Define if you have POSIX threads libraries and header files.])
LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
CC="$PTHREAD_CC"],
AC_MSG_ERROR([No pthread support on this machine]))
AX_PTHREAD(, AC_MSG_ERROR(Can not find pthreads. This is required.))
AM_COND_IF([USE_SYSTEM_SHARED_LIB],
[],