summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure423
1 files changed, 255 insertions, 168 deletions
diff --git a/configure b/configure
index 16bb8a738..c521b9375 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.in 8801585.
+# From configure.in 7ed8f70.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69.
#
@@ -3433,7 +3433,6 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
-
#
# Memory managers
#
@@ -3686,19 +3685,19 @@ fi
if test "${with_maxconn+set}" = set; then :
withval=$with_maxconn;
if test "$withval" == "no"; then
- CFLAGS="$CFLAGS -DMAXCONN=16384"
+ CPPFLAGS="$CPPFLAGS -DMAXCONN=16384"
else
if ! test "$withval" -ge 0 -o "$withval" -lt 0 2>&- ; then
as_fn_error $? "Invalid argument --with-maxconn=$withval ... stopping" "$LINENO" 5
else
- CFLAGS="$CFLAGS -DMAXCONN=$withval"
+ CPPFLAGS="$CPPFLAGS -DMAXCONN=$withval"
fi
fi
else
- CFLAGS="$CFLAGS -DMAXCONN=16384"
+ CPPFLAGS="$CPPFLAGS -DMAXCONN=16384"
fi
@@ -4945,7 +4944,7 @@ if ac_fn_c_try_run "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- CFLAGS="$CFLAGS -DHAS_TLS"
+ CPPFLAGS="$CPPFLAGS -DHAS_TLS"
else
@@ -6144,7 +6143,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
#
ac_fn_c_check_func "$LINENO" "setrlimit" "ac_cv_func_setrlimit"
if test "x$ac_cv_func_setrlimit" = xyes; then :
- CFLAGS="$CFLAGS -DHAVE_SETRLIMIT"
+ CPPFLAGS="$CPPFLAGS -DHAVE_SETRLIMIT"
fi
@@ -6154,7 +6153,7 @@ fi
#
ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
if test "x$ac_cv_func_strnlen" = xyes; then :
- CFLAGS="$CFLAGS -DHAVE_STRNLEN"
+ CPPFLAGS="$CPPFLAGS -DHAVE_STRNLEN"
fi
@@ -6210,13 +6209,13 @@ done
#
case $enable_manager in
"no")
- CFLAGS="$CFLAGS -DNO_MEMMGR"
+ CPPFLAGS="$CPPFLAGS -DNO_MEMMGR"
;;
"builtin")
# enabled by default
;;
"memwatch")
- CFLAGS="$CFLAGS -DMEMWATCH"
+ CPPFLAGS="$CPPFLAGS -DMEMWATCH"
ac_fn_c_check_header_mongrel "$LINENO" "memwatch.h" "ac_cv_header_memwatch_h" "$ac_includes_default"
if test "x$ac_cv_header_memwatch_h" = xyes; then :
@@ -6227,7 +6226,7 @@ fi
;;
"dmalloc")
- CFLAGS="$CFLAGS -DDMALLOC -DDMALLOC_FUNC_CHECK"
+ CPPFLAGS="$CPPFLAGS -DDMALLOC -DDMALLOC_FUNC_CHECK"
LIBS="$LIBS -ldmalloc"
ac_fn_c_check_header_mongrel "$LINENO" "dmalloc.h" "ac_cv_header_dmalloc_h" "$ac_includes_default"
if test "x$ac_cv_header_dmalloc_h" = xyes; then :
@@ -6239,7 +6238,7 @@ fi
;;
"gcollect")
- CFLAGS="$CFLAGS -DGCOLLECT"
+ CPPFLAGS="$CPPFLAGS -DGCOLLECT"
LIBS="$LIBS -lgc"
ac_fn_c_check_header_mongrel "$LINENO" "gc.h" "ac_cv_header_gc_h" "$ac_includes_default"
if test "x$ac_cv_header_gc_h" = xyes; then :
@@ -6251,7 +6250,7 @@ fi
;;
"bcheck")
- CFLAGS="$CFLAGS -DBCHECK"
+ CPPFLAGS="$CPPFLAGS -DBCHECK"
;;
esac
@@ -6260,7 +6259,7 @@ esac
# Packetver
#
if test -n "$enable_packetver" ; then
- CFLAGS="$CFLAGS -DPACKETVER=$enable_packetver"
+ CPPFLAGS="$CPPFLAGS -DPACKETVER=$enable_packetver"
fi
#
@@ -6268,7 +6267,7 @@ fi
#
case $enable_packetver_re in
"yes")
- CFLAGS="$CFLAGS -DENABLE_PACKETVER_RE"
+ CPPFLAGS="$CPPFLAGS -DENABLE_PACKETVER_RE"
;;
"no")
# default value
@@ -6279,7 +6278,7 @@ esac
# Obfuscation keys
#
if test -n "$obfuscationkey1" -a -n "$obfuscationkey2" -a -n "$obfuscationkey3"; then
- CFLAGS="$CFLAGS -DOBFUSCATIONKEY1=$obfuscationkey1 -DOBFUSCATIONKEY2=$obfuscationkey2 -DOBFUSCATIONKEY3=$obfuscationkey3"
+ CPPFLAGS="$CPPFLAGS -DOBFUSCATIONKEY1=$obfuscationkey1 -DOBFUSCATIONKEY2=$obfuscationkey2 -DOBFUSCATIONKEY3=$obfuscationkey3"
fi
#
@@ -6291,10 +6290,12 @@ case $enable_debug in
# CFLAGS="$CFLAGS -Wno-unused -Wno-parentheses"
;;
"yes")
- CFLAGS="$CFLAGS -g -DDEBUG"
+ CFLAGS="$CFLAGS -g"
+ CPPFLAGS="$CPPFLAGS -DDEBUG"
;;
"gdb")
- CFLAGS="$CFLAGS -ggdb -DDEBUG"
+ CFLAGS="$CFLAGS -ggdb"
+ CPPFLAGS="$CPPFLAGS -DDEBUG"
;;
esac
@@ -6306,7 +6307,7 @@ case $enable_buildbot in
# default value
;;
"yes")
- CFLAGS="$CFLAGS -DBUILDBOT"
+ CPPFLAGS="$CPPFLAGS -DBUILDBOT"
;;
esac
@@ -6318,7 +6319,7 @@ case $enable_rdtsc in
#default value
;;
1)
- CFLAGS="$CFLAGS -DENABLE_RDTSC"
+ CPPFLAGS="$CPPFLAGS -DENABLE_RDTSC"
;;
esac
@@ -6341,7 +6342,7 @@ esac
#
case $enable_renewal in
"no")
- CFLAGS="$CFLAGS -DDISABLE_RENEWAL"
+ CPPFLAGS="$CPPFLAGS -DDISABLE_RENEWAL"
;;
"yes")
# default value
@@ -6355,13 +6356,12 @@ if test -n "${ZLIB_HOME}" ; then
LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib"
CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateEnd in -lz" >&5
-$as_echo_n "checking for inflateEnd in -lz... " >&6; }
-if ${ac_cv_lib_z_inflateEnd+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inflateEnd" >&5
+$as_echo_n "checking for library containing inflateEnd... " >&6; }
+if ${ac_cv_search_inflateEnd+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz $LIBS"
+ ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6380,23 +6380,35 @@ return inflateEnd ();
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_z_inflateEnd=yes
-else
- ac_cv_lib_z_inflateEnd=no
+for ac_lib in '' z; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_inflateEnd=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ conftest$ac_exeext
+ if ${ac_cv_search_inflateEnd+:} false; then :
+ break
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateEnd" >&5
-$as_echo "$ac_cv_lib_z_inflateEnd" >&6; }
-if test "x$ac_cv_lib_z_inflateEnd" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBZ 1
-_ACEOF
+done
+if ${ac_cv_search_inflateEnd+:} false; then :
- LIBS="-lz $LIBS"
+else
+ ac_cv_search_inflateEnd=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inflateEnd" >&5
+$as_echo "$ac_cv_search_inflateEnd" >&6; }
+ac_res=$ac_cv_search_inflateEnd
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
else
as_fn_error $? "zlib library not found or incompatible, please specify the correct path with --with-zlib=DIR... stopping" "$LINENO" 5
@@ -6572,7 +6584,7 @@ if ac_fn_c_try_run "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- CFLAGS="$CFLAGS -DHAVE_MONOTONIC_CLOCK"
+ CPPFLAGS="$CPPFLAGS -DHAVE_MONOTONIC_CLOCK"
else
@@ -6592,13 +6604,12 @@ fi
#
# pthread
#
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
-$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
-if ${ac_cv_lib_pthread_pthread_create+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_create" >&5
+$as_echo_n "checking for library containing pthread_create... " >&6; }
+if ${ac_cv_search_pthread_create+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread $LIBS"
+ ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6617,35 +6628,46 @@ return pthread_create ();
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_pthread_pthread_create=yes
-else
- ac_cv_lib_pthread_pthread_create=no
+for ac_lib in '' pthread; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_pthread_create=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ conftest$ac_exeext
+ if ${ac_cv_search_pthread_create+:} false; then :
+ break
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
-$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
-if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBPTHREAD 1
-_ACEOF
+done
+if ${ac_cv_search_pthread_create+:} false; then :
- LIBS="-lpthread $LIBS"
+else
+ ac_cv_search_pthread_create=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_create" >&5
+$as_echo "$ac_cv_search_pthread_create" >&6; }
+ac_res=$ac_cv_search_pthread_create
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
else
as_fn_error $? "pthread library not found or incompatible" "$LINENO" 5
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_sigmask in -lpthread" >&5
-$as_echo_n "checking for pthread_sigmask in -lpthread... " >&6; }
-if ${ac_cv_lib_pthread_pthread_sigmask+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_sigmask" >&5
+$as_echo_n "checking for library containing pthread_sigmask... " >&6; }
+if ${ac_cv_search_pthread_sigmask+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread $LIBS"
+ ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6664,35 +6686,46 @@ return pthread_sigmask ();
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_pthread_pthread_sigmask=yes
-else
- ac_cv_lib_pthread_pthread_sigmask=no
+for ac_lib in '' pthread; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_pthread_sigmask=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ conftest$ac_exeext
+ if ${ac_cv_search_pthread_sigmask+:} false; then :
+ break
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_sigmask" >&5
-$as_echo "$ac_cv_lib_pthread_pthread_sigmask" >&6; }
-if test "x$ac_cv_lib_pthread_pthread_sigmask" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBPTHREAD 1
-_ACEOF
+done
+if ${ac_cv_search_pthread_sigmask+:} false; then :
- LIBS="-lpthread $LIBS"
+else
+ ac_cv_search_pthread_sigmask=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_sigmask" >&5
+$as_echo "$ac_cv_search_pthread_sigmask" >&6; }
+ac_res=$ac_cv_search_pthread_sigmask
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
else
as_fn_error $? "pthread library not found or incompatible" "$LINENO" 5
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_attr_init in -lpthread" >&5
-$as_echo_n "checking for pthread_attr_init in -lpthread... " >&6; }
-if ${ac_cv_lib_pthread_pthread_attr_init+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_attr_init" >&5
+$as_echo_n "checking for library containing pthread_attr_init... " >&6; }
+if ${ac_cv_search_pthread_attr_init+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread $LIBS"
+ ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6711,35 +6744,46 @@ return pthread_attr_init ();
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_pthread_pthread_attr_init=yes
-else
- ac_cv_lib_pthread_pthread_attr_init=no
+for ac_lib in '' pthread; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_pthread_attr_init=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ conftest$ac_exeext
+ if ${ac_cv_search_pthread_attr_init+:} false; then :
+ break
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_attr_init" >&5
-$as_echo "$ac_cv_lib_pthread_pthread_attr_init" >&6; }
-if test "x$ac_cv_lib_pthread_pthread_attr_init" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBPTHREAD 1
-_ACEOF
+done
+if ${ac_cv_search_pthread_attr_init+:} false; then :
- LIBS="-lpthread $LIBS"
+else
+ ac_cv_search_pthread_attr_init=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_attr_init" >&5
+$as_echo "$ac_cv_search_pthread_attr_init" >&6; }
+ac_res=$ac_cv_search_pthread_attr_init
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
else
as_fn_error $? "pthread library not found or incompatible" "$LINENO" 5
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_attr_setstacksize in -lpthread" >&5
-$as_echo_n "checking for pthread_attr_setstacksize in -lpthread... " >&6; }
-if ${ac_cv_lib_pthread_pthread_attr_setstacksize+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_attr_setstacksize" >&5
+$as_echo_n "checking for library containing pthread_attr_setstacksize... " >&6; }
+if ${ac_cv_search_pthread_attr_setstacksize+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread $LIBS"
+ ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6758,35 +6802,46 @@ return pthread_attr_setstacksize ();
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_pthread_pthread_attr_setstacksize=yes
-else
- ac_cv_lib_pthread_pthread_attr_setstacksize=no
+for ac_lib in '' pthread; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_pthread_attr_setstacksize=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ conftest$ac_exeext
+ if ${ac_cv_search_pthread_attr_setstacksize+:} false; then :
+ break
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_attr_setstacksize" >&5
-$as_echo "$ac_cv_lib_pthread_pthread_attr_setstacksize" >&6; }
-if test "x$ac_cv_lib_pthread_pthread_attr_setstacksize" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBPTHREAD 1
-_ACEOF
+done
+if ${ac_cv_search_pthread_attr_setstacksize+:} false; then :
- LIBS="-lpthread $LIBS"
+else
+ ac_cv_search_pthread_attr_setstacksize=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_attr_setstacksize" >&5
+$as_echo "$ac_cv_search_pthread_attr_setstacksize" >&6; }
+ac_res=$ac_cv_search_pthread_attr_setstacksize
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
else
as_fn_error $? "pthread library not found or incompatible" "$LINENO" 5
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_attr_destroy in -lpthread" >&5
-$as_echo_n "checking for pthread_attr_destroy in -lpthread... " >&6; }
-if ${ac_cv_lib_pthread_pthread_attr_destroy+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_attr_destroy" >&5
+$as_echo_n "checking for library containing pthread_attr_destroy... " >&6; }
+if ${ac_cv_search_pthread_attr_destroy+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread $LIBS"
+ ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6805,35 +6860,46 @@ return pthread_attr_destroy ();
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_pthread_pthread_attr_destroy=yes
-else
- ac_cv_lib_pthread_pthread_attr_destroy=no
+for ac_lib in '' pthread; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_pthread_attr_destroy=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ conftest$ac_exeext
+ if ${ac_cv_search_pthread_attr_destroy+:} false; then :
+ break
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_attr_destroy" >&5
-$as_echo "$ac_cv_lib_pthread_pthread_attr_destroy" >&6; }
-if test "x$ac_cv_lib_pthread_pthread_attr_destroy" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBPTHREAD 1
-_ACEOF
+done
+if ${ac_cv_search_pthread_attr_destroy+:} false; then :
- LIBS="-lpthread $LIBS"
+else
+ ac_cv_search_pthread_attr_destroy=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_attr_destroy" >&5
+$as_echo "$ac_cv_search_pthread_attr_destroy" >&6; }
+ac_res=$ac_cv_search_pthread_attr_destroy
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
else
as_fn_error $? "pthread library not found or incompatible" "$LINENO" 5
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_cancel in -lpthread" >&5
-$as_echo_n "checking for pthread_cancel in -lpthread... " >&6; }
-if ${ac_cv_lib_pthread_pthread_cancel+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_cancel" >&5
+$as_echo_n "checking for library containing pthread_cancel... " >&6; }
+if ${ac_cv_search_pthread_cancel+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread $LIBS"
+ ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6852,35 +6918,46 @@ return pthread_cancel ();
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_pthread_pthread_cancel=yes
-else
- ac_cv_lib_pthread_pthread_cancel=no
+for ac_lib in '' pthread; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_pthread_cancel=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ conftest$ac_exeext
+ if ${ac_cv_search_pthread_cancel+:} false; then :
+ break
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_cancel" >&5
-$as_echo "$ac_cv_lib_pthread_pthread_cancel" >&6; }
-if test "x$ac_cv_lib_pthread_pthread_cancel" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBPTHREAD 1
-_ACEOF
+done
+if ${ac_cv_search_pthread_cancel+:} false; then :
- LIBS="-lpthread $LIBS"
+else
+ ac_cv_search_pthread_cancel=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_cancel" >&5
+$as_echo "$ac_cv_search_pthread_cancel" >&6; }
+ac_res=$ac_cv_search_pthread_cancel
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
else
as_fn_error $? "pthread library not found or incompatible" "$LINENO" 5
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in -lpthread" >&5
-$as_echo_n "checking for pthread_join in -lpthread... " >&6; }
-if ${ac_cv_lib_pthread_pthread_join+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_join" >&5
+$as_echo_n "checking for library containing pthread_join... " >&6; }
+if ${ac_cv_search_pthread_join+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread $LIBS"
+ ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6899,31 +6976,41 @@ return pthread_join ();
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_pthread_pthread_join=yes
-else
- ac_cv_lib_pthread_pthread_join=no
+for ac_lib in '' pthread; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_pthread_join=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ conftest$ac_exeext
+ if ${ac_cv_search_pthread_join+:} false; then :
+ break
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_join" >&5
-$as_echo "$ac_cv_lib_pthread_pthread_join" >&6; }
-if test "x$ac_cv_lib_pthread_pthread_join" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBPTHREAD 1
-_ACEOF
+done
+if ${ac_cv_search_pthread_join+:} false; then :
- LIBS="-lpthread $LIBS"
+else
+ ac_cv_search_pthread_join=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_join" >&5
+$as_echo "$ac_cv_search_pthread_join" >&6; }
+ac_res=$ac_cv_search_pthread_join
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
else
as_fn_error $? "pthread library not found or incompatible" "$LINENO" 5
fi
-LDFLAGS="$LDFLAGS -lpthread"
-
#
# MySQL library