mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-23 16:13:46 +00:00
Refine ax_pthread
This commit is contained in:
@@ -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
@@ -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],
|
||||
[],
|
||||
|
||||
Reference in New Issue
Block a user