Browse Source

Refine ax_pthread

pull/498/head
Max Lv 9 years ago
parent
commit
5ddf786c19
2 changed files with 2 additions and 12 deletions
  1. 6
      configure
  2. 8
      configure.ac

6
configure

@ -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'

8
configure.ac

@ -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],
[],

Loading…
Cancel
Save