]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2054. [port] freebsd: do not explicitly link against -lpthread.
authorMark Andrews <marka@isc.org>
Thu, 20 Jul 2006 06:08:30 +0000 (06:08 +0000)
committerMark Andrews <marka@isc.org>
Thu, 20 Jul 2006 06:08:30 +0000 (06:08 +0000)
                        [RT #16170]

bin/tests/Makefile.in
config.threads.in
configure
configure.in
lib/bind/configure
lib/bind/configure.in
ltmain.sh

index 73ab2cd723df2fe9caa615be621a3428fc557d70..8ff7cad31f9eac46fc52977ad89a57e4adca634c 100644 (file)
@@ -13,7 +13,7 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: Makefile.in,v 1.113.2.4 2004/07/20 07:00:12 marka Exp $
+# $Id: Makefile.in,v 1.113.2.5 2006/07/20 06:06:39 marka Exp $
 
 srcdir =       @srcdir@
 VPATH =                @srcdir@
@@ -133,7 +133,7 @@ SRCS =              adb_test.c \
 all_tests: ${XTARGETS}
 
 genrandom: genrandom.@O@
-       ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ genrandom.@O@
+       ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ genrandom.@O@ ${LIBS}
 
 adb_test: adb_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
        ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ adb_test.@O@ \
index f2816c447fb207a9dc1f5aac50c0d5f0ab2b8473..c1c113b937267f9341d0e5c1d12e4556cc78f5d4 100644 (file)
@@ -140,6 +140,31 @@ then
                        fi
                fi
                ;;
+               *-freebsd*)
+                       # We don't want to set -lpthread as that break
+                       # the ability to choose threads library at final
+                       # link time and is not valid for all architectures.
+                       
+                       PTHREAD=
+                       if test "X$GCC" = "Xyes"; then
+                               saved_cc="$CC"
+                               CC="$CC -pthread"
+                               AC_MSG_CHECKING(for gcc -pthread support);
+                               AC_TRY_LINK([#include <pthread.h>],
+                                           [printf("%x\n", pthread_create);],
+                                           PTHREAD="yes"
+                                           AC_MSG_RESULT(yes),
+                                           AC_MSG_RESULT(no))
+                               CC="$saved_cc"
+                       fi
+                       if test "X$PTHREAD" != "Xyes"; then
+                               AC_CHECK_LIB(pthread, pthread_create,,
+                               AC_CHECK_LIB(thr, thread_create,,
+                               AC_CHECK_LIB(c_r, pthread_create,,
+                               AC_CHECK_LIB(c, pthread_create,,
+                               AC_MSG_ERROR("could not find thread libraries")))))
+                       fi
+                       ;;
                *)
                        AC_CHECK_LIB(pthread, pthread_create,,
                                AC_CHECK_LIB(pthread, __pthread_create,,
index 468f253fbf01d24d11a7879e88c075a75bb7a99a..d75da9cf86b8f2cb3dbf4e1779748b2b9ca7f944 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 1.294.2.63 .
+# From configure.in Revision: 1.294.2.64 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.59.
 #
@@ -5807,6 +5807,374 @@ echo "${ECHO_T}mit-pthreads/unproven-pthreads" >&6
                        fi
                fi
                ;;
+               *-freebsd*)
+                       # We don't want to set -lpthread as that break
+                       # the ability to choose threads library at final
+                       # link time and is not valid for all architectures.
+
+                       PTHREAD=
+                       if test "X$GCC" = "Xyes"; then
+                               saved_cc="$CC"
+                               CC="$CC -pthread"
+                               echo "$as_me:$LINENO: checking for gcc -pthread support" >&5
+echo $ECHO_N "checking for gcc -pthread support... $ECHO_C" >&6;
+                               cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <pthread.h>
+int
+main ()
+{
+printf("%x\n", pthread_create);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  PTHREAD="yes"
+                                           echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+                               CC="$saved_cc"
+                       fi
+                       if test "X$PTHREAD" != "Xyes"; then
+
+echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
+echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
+if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char pthread_create ();
+int
+main ()
+{
+pthread_create ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_pthread_pthread_create=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_pthread_pthread_create=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
+echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
+if test $ac_cv_lib_pthread_pthread_create = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBPTHREAD 1
+_ACEOF
+
+  LIBS="-lpthread $LIBS"
+
+else
+
+echo "$as_me:$LINENO: checking for thread_create in -lthr" >&5
+echo $ECHO_N "checking for thread_create in -lthr... $ECHO_C" >&6
+if test "${ac_cv_lib_thr_thread_create+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lthr  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char thread_create ();
+int
+main ()
+{
+thread_create ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_thr_thread_create=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_thr_thread_create=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_thr_thread_create" >&5
+echo "${ECHO_T}$ac_cv_lib_thr_thread_create" >&6
+if test $ac_cv_lib_thr_thread_create = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBTHR 1
+_ACEOF
+
+  LIBS="-lthr $LIBS"
+
+else
+
+echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
+echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
+if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc_r  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char pthread_create ();
+int
+main ()
+{
+pthread_create ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_c_r_pthread_create=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_c_r_pthread_create=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
+echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
+if test $ac_cv_lib_c_r_pthread_create = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBC_R 1
+_ACEOF
+
+  LIBS="-lc_r $LIBS"
+
+else
+
+echo "$as_me:$LINENO: checking for pthread_create in -lc" >&5
+echo $ECHO_N "checking for pthread_create in -lc... $ECHO_C" >&6
+if test "${ac_cv_lib_c_pthread_create+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char pthread_create ();
+int
+main ()
+{
+pthread_create ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_c_pthread_create=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_c_pthread_create=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_create" >&5
+echo "${ECHO_T}$ac_cv_lib_c_pthread_create" >&6
+if test $ac_cv_lib_c_pthread_create = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBC 1
+_ACEOF
+
+  LIBS="-lc $LIBS"
+
+else
+  { { echo "$as_me:$LINENO: error: \"could not find thread libraries\"" >&5
+echo "$as_me: error: \"could not find thread libraries\"" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+fi
+
+fi
+
+fi
+
+                       fi
+                       ;;
                *)
 
 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
 
 if $use_threads
 then
+       if test "X$GCC" = "Xyes"; then
+               case "$host" in
+               *-freebsd*)
+                       CC="$CC -pthread"
+                       CCOPT="$CCOPT -pthread"
+                       STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
+                       ;;
+               *-openbsd*)
+                       CC="$CC -pthread"
+                       CCOPT="$CCOPT -pthread"
+                       ;;
+               *-solaris*)
+                       LIBS="$LIBS -lthread"
+                       ;;
+               *-ibm-aix*)
+                       STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
+                       ;;
+               esac
+       else
+               case $host in
+               *-dec-osf*)
+                       CC="$CC -pthread"
+                       CCOPT="$CCOPT -pthread"
+                       ;;
+               *-solaris*)
+                       CC="$CC -mt"
+                       CCOPT="$CCOPT -mt"
+                       ;;
+               *-ibm-aix*)
+                       STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
+                       ;;
+               *-sco-sysv*uw*)
+                       CC="$CC -Kthread"
+                       CCOPT="$CCOPT -Kthread"
+                       ;;
+               esac
+       fi
+       ALWAYS_DEFINES="-D_REENTRANT"
+       ISC_PLATFORM_USETHREADS="#define ISC_PLATFORM_USETHREADS 1"
+       thread_dir=pthreads
        #
        # We'd like to use sigwait() too
        #
-       echo "$as_me:$LINENO: checking for sigwait in -lc" >&5
+       echo "$as_me:$LINENO: checking for sigwait" >&5
+echo $ECHO_N "checking for sigwait... $ECHO_C" >&6
+if test "${ac_cv_func_sigwait+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define sigwait to an innocuous variant, in case <limits.h> declares sigwait.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define sigwait innocuous_sigwait
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char sigwait (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef sigwait
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char sigwait ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_sigwait) || defined (__stub___sigwait)
+choke me
+#else
+char (*f) () = sigwait;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != sigwait;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_sigwait=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_sigwait=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_sigwait" >&5
+echo "${ECHO_T}$ac_cv_func_sigwait" >&6
+if test $ac_cv_func_sigwait = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define HAVE_SIGWAIT 1
+_ACEOF
+
+else
+  echo "$as_me:$LINENO: checking for sigwait in -lc" >&5
 echo $ECHO_N "checking for sigwait in -lc... $ECHO_C" >&6
 if test "${ac_cv_lib_c_sigwait+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -6408,6 +6912,7 @@ fi
 
 fi
 
+fi
 
 fi
 
@@ -6943,46 +7448,6 @@ _ACEOF
 fi
 
 
-       if test "X$GCC" = "Xyes"; then
-               case "$host" in
-               *-freebsd*)
-                       CC="$CC -pthread"
-                       CCOPT="$CCOPT -pthread"
-                       STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
-                       ;;
-               *-openbsd*)
-                       CC="$CC -pthread"
-                       CCOPT="$CCOPT -pthread"
-                       ;;
-               *-solaris*)
-                       LIBS="$LIBS -lthread"
-                       ;;
-               *-ibm-aix*)
-                       STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
-                       ;;
-               esac
-       else
-               case $host in
-               *-dec-osf*)
-                       CC="$CC -pthread"
-                       CCOPT="$CCOPT -pthread"
-                       ;;
-               *-solaris*)
-                       CC="$CC -mt"
-                       CCOPT="$CCOPT -mt"
-                       ;;
-               *-ibm-aix*)
-                       STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
-                       ;;
-               *-sco-sysv*uw*)
-                       CC="$CC -Kthread"
-                       CCOPT="$CCOPT -Kthread"
-                       ;;
-               esac
-       fi
-       ALWAYS_DEFINES="-D_REENTRANT"
-       ISC_PLATFORM_USETHREADS="#define ISC_PLATFORM_USETHREADS 1"
-       thread_dir=pthreads
 else
        ISC_PLATFORM_USETHREADS="#undef ISC_PLATFORM_USETHREADS"
        thread_dir=nothreads
@@ -8267,7 +8732,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 8270 "configure"' > conftest.$ac_ext
+  echo '#line 8735 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -9264,7 +9729,7 @@ fi
 
 
 # Provide some information about the compiler.
-echo "$as_me:9267:" \
+echo "$as_me:9732:" \
      "checking for Fortran 77 compiler version" >&5
 ac_compiler=`set X $ac_compile; echo $2`
 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@@ -10325,11 +10790,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:10328: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:10793: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:10332: \$? = $ac_status" >&5
+   echo "$as_me:10797: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
@@ -10568,11 +11033,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:10571: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:11036: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:10575: \$? = $ac_status" >&5
+   echo "$as_me:11040: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
@@ -10628,11 +11093,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:10631: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:11096: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:10635: \$? = $ac_status" >&5
+   echo "$as_me:11100: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -12813,7 +13278,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 12816 "configure"
+#line 13281 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12911,7 +13376,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 12914 "configure"
+#line 13379 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -15108,11 +15573,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:15111: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:15576: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:15115: \$? = $ac_status" >&5
+   echo "$as_me:15580: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
@@ -15168,11 +15633,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:15171: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:15636: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:15175: \$? = $ac_status" >&5
+   echo "$as_me:15640: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -16529,7 +16994,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 16532 "configure"
+#line 16997 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -16627,7 +17092,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 16630 "configure"
+#line 17095 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -17464,11 +17929,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17467: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17932: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:17471: \$? = $ac_status" >&5
+   echo "$as_me:17936: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
@@ -17524,11 +17989,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17527: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17992: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:17531: \$? = $ac_status" >&5
+   echo "$as_me:17996: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -19563,11 +20028,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:19566: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:20031: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:19570: \$? = $ac_status" >&5
+   echo "$as_me:20035: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
@@ -19806,11 +20271,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:19809: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:20274: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:19813: \$? = $ac_status" >&5
+   echo "$as_me:20278: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
@@ -19866,11 +20331,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:19869: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:20334: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:19873: \$? = $ac_status" >&5
+   echo "$as_me:20338: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -22051,7 +22516,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 22054 "configure"
+#line 22519 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -22149,7 +22614,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 22152 "configure"
+#line 22617 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index 1c3947f016f56785eee9bdf0e76cd189014d1669..e9dbaff449d03c02e43f75ad8f52efbac2065bc3 100644 (file)
@@ -13,7 +13,7 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-AC_REVISION($Revision: 1.294.2.63 $)
+AC_REVISION($Revision: 1.294.2.64 $)
 
 AC_INIT(lib/dns/name.c)
 AC_PREREQ(2.13)
@@ -558,16 +558,57 @@ sinclude(config.threads.in)dnl
 
 if $use_threads
 then
+       if test "X$GCC" = "Xyes"; then
+               case "$host" in
+               *-freebsd*)
+                       CC="$CC -pthread"
+                       CCOPT="$CCOPT -pthread"
+                       STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
+                       ;;
+               *-openbsd*)
+                       CC="$CC -pthread"
+                       CCOPT="$CCOPT -pthread"
+                       ;;
+               *-solaris*)
+                       LIBS="$LIBS -lthread"
+                       ;;
+               *-ibm-aix*)
+                       STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
+                       ;;
+               esac
+       else
+               case $host in
+               *-dec-osf*)
+                       CC="$CC -pthread"
+                       CCOPT="$CCOPT -pthread"
+                       ;;
+               *-solaris*)
+                       CC="$CC -mt"
+                       CCOPT="$CCOPT -mt"
+                       ;;
+               *-ibm-aix*)
+                       STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
+                       ;;
+               *-sco-sysv*uw*)
+                       CC="$CC -Kthread"
+                       CCOPT="$CCOPT -Kthread"
+                       ;;
+               esac
+       fi
+       ALWAYS_DEFINES="-D_REENTRANT"
+       ISC_PLATFORM_USETHREADS="#define ISC_PLATFORM_USETHREADS 1"
+       thread_dir=pthreads
        #
        # We'd like to use sigwait() too
        #
-       AC_CHECK_LIB(c, sigwait,
-                    AC_DEFINE(HAVE_SIGWAIT),
-                    AC_CHECK_LIB(pthread, sigwait,
-                                 AC_DEFINE(HAVE_SIGWAIT),
-                                 AC_CHECK_LIB(pthread, _Psigwait,
-                                              AC_DEFINE(HAVE_SIGWAIT),))
-       )
+       AC_CHECK_FUNC(sigwait,
+                     AC_DEFINE(HAVE_SIGWAIT),
+                     AC_CHECK_LIB(c, sigwait,
+                     AC_DEFINE(HAVE_SIGWAIT),
+                     AC_CHECK_LIB(pthread, sigwait,
+                                  AC_DEFINE(HAVE_SIGWAIT),
+                                  AC_CHECK_LIB(pthread, _Psigwait,
+                                               AC_DEFINE(HAVE_SIGWAIT),))))
 
        AC_CHECK_FUNC(pthread_attr_getstacksize,
                      AC_DEFINE(HAVE_PTHREAD_ATTR_GETSTACKSIZE),)
@@ -631,46 +672,6 @@ then
        #
        AC_CHECK_FUNC(sysconf, AC_DEFINE(HAVE_SYSCONF),)
 
-       if test "X$GCC" = "Xyes"; then
-               case "$host" in
-               *-freebsd*)
-                       CC="$CC -pthread"
-                       CCOPT="$CCOPT -pthread"
-                       STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
-                       ;;
-               *-openbsd*)
-                       CC="$CC -pthread"
-                       CCOPT="$CCOPT -pthread"
-                       ;;
-               *-solaris*)
-                       LIBS="$LIBS -lthread"
-                       ;;
-               *-ibm-aix*)
-                       STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
-                       ;;
-               esac
-       else
-               case $host in
-               *-dec-osf*)
-                       CC="$CC -pthread"
-                       CCOPT="$CCOPT -pthread"
-                       ;;
-               *-solaris*)
-                       CC="$CC -mt"
-                       CCOPT="$CCOPT -mt"
-                       ;;
-               *-ibm-aix*)
-                       STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
-                       ;;
-               *-sco-sysv*uw*)
-                       CC="$CC -Kthread"
-                       CCOPT="$CCOPT -Kthread"
-                       ;;
-               esac
-       fi
-       ALWAYS_DEFINES="-D_REENTRANT"
-       ISC_PLATFORM_USETHREADS="#define ISC_PLATFORM_USETHREADS 1"
-       thread_dir=pthreads
 else
        ISC_PLATFORM_USETHREADS="#undef ISC_PLATFORM_USETHREADS"
        thread_dir=nothreads
index 7ef365944224e5319ac13551cd7e25950732bbeb..0cce9be05f29c000ab448bf2a914ae9e0cb6ea1e 100644 (file)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 1.83.2.31 .
+# From configure.in Revision: 1.83.2.32 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.59.
 #
@@ -4658,6 +4658,374 @@ echo "${ECHO_T}mit-pthreads/unproven-pthreads" >&6
                        fi
                fi
                ;;
+               *-freebsd*)
+                       # We don't want to set -lpthread as that break
+                       # the ability to choose threads library at final
+                       # link time and is not valid for all architectures.
+
+                       PTHREAD=
+                       if test "X$GCC" = "Xyes"; then
+                               saved_cc="$CC"
+                               CC="$CC -pthread"
+                               echo "$as_me:$LINENO: checking for gcc -pthread support" >&5
+echo $ECHO_N "checking for gcc -pthread support... $ECHO_C" >&6;
+                               cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <pthread.h>
+int
+main ()
+{
+printf("%x\n", pthread_create);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  PTHREAD="yes"
+                                           echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+                               CC="$saved_cc"
+                       fi
+                       if test "X$PTHREAD" != "Xyes"; then
+
+echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
+echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
+if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char pthread_create ();
+int
+main ()
+{
+pthread_create ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_pthread_pthread_create=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_pthread_pthread_create=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
+echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
+if test $ac_cv_lib_pthread_pthread_create = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBPTHREAD 1
+_ACEOF
+
+  LIBS="-lpthread $LIBS"
+
+else
+
+echo "$as_me:$LINENO: checking for thread_create in -lthr" >&5
+echo $ECHO_N "checking for thread_create in -lthr... $ECHO_C" >&6
+if test "${ac_cv_lib_thr_thread_create+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lthr  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char thread_create ();
+int
+main ()
+{
+thread_create ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_thr_thread_create=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_thr_thread_create=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_thr_thread_create" >&5
+echo "${ECHO_T}$ac_cv_lib_thr_thread_create" >&6
+if test $ac_cv_lib_thr_thread_create = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBTHR 1
+_ACEOF
+
+  LIBS="-lthr $LIBS"
+
+else
+
+echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
+echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
+if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc_r  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char pthread_create ();
+int
+main ()
+{
+pthread_create ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_c_r_pthread_create=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_c_r_pthread_create=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
+echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
+if test $ac_cv_lib_c_r_pthread_create = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBC_R 1
+_ACEOF
+
+  LIBS="-lc_r $LIBS"
+
+else
+
+echo "$as_me:$LINENO: checking for pthread_create in -lc" >&5
+echo $ECHO_N "checking for pthread_create in -lc... $ECHO_C" >&6
+if test "${ac_cv_lib_c_pthread_create+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char pthread_create ();
+int
+main ()
+{
+pthread_create ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_c_pthread_create=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_c_pthread_create=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_create" >&5
+echo "${ECHO_T}$ac_cv_lib_c_pthread_create" >&6
+if test $ac_cv_lib_c_pthread_create = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBC 1
+_ACEOF
+
+  LIBS="-lc $LIBS"
+
+else
+  { { echo "$as_me:$LINENO: error: \"could not find thread libraries\"" >&5
+echo "$as_me: error: \"could not find thread libraries\"" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+fi
+
+fi
+
+fi
+
+                       fi
+                       ;;
                *)
 
 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
 
 if $use_threads
 then
+       if test "X$GCC" = "Xyes"; then
+               case "$host" in
+               *-freebsd*)
+                       CC="$CC -pthread"
+                       CCOPT="$CCOPT -pthread"
+                       STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
+                       ;;
+               *-openbsd*)
+                       CC="$CC -pthread"
+                       CCOPT="$CCOPT -pthread"
+                       ;;
+               *-solaris*)
+                       LIBS="$LIBS -lthread"
+                       ;;
+               *-ibm-aix*)
+                       STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
+                       ;;
+               esac
+       else
+               case $host in
+               *-dec-osf*)
+                       CC="$CC -pthread"
+                       CCOPT="$CCOPT -pthread"
+                       ;;
+               *-solaris*)
+                       CC="$CC -mt"
+                       CCOPT="$CCOPT -mt"
+                       ;;
+               *-ibm-aix*)
+                       STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
+                       ;;
+               *-UnixWare*)
+                       CC="$CC -Kthread"
+                       CCOPT="$CCOPT -Kthread"
+                       ;;
+               esac
+       fi
+       cat >>confdefs.h <<\_ACEOF
+#define _REENTRANT 1
+_ACEOF
+
+       ALWAYS_DEFINES="-D_REENTRANT"
+       DO_PTHREADS="#define DO_PTHREADS 1"
+       WANT_IRS_THREADSGR_OBJS="\${WANT_IRS_THREADSGR_OBJS}"
+       WANT_IRS_THREADSPW_OBJS="\${WANT_IRS_THREADSPW_OBJS}"
+       case $host in
+       ia64-hp-hpux11.*)
+               WANT_IRS_THREADS_OBJS="";;
+       *)
+               WANT_IRS_THREADS_OBJS="\${WANT_IRS_THREADS_OBJS}";;
+       esac
+       WANT_THREADS_OBJS="\${WANT_THREADS_OBJS}"
+       thread_dir=pthreads
+
        #
        # We'd like to use sigwait() too
        #
-       echo "$as_me:$LINENO: checking for sigwait in -lc" >&5
+       echo "$as_me:$LINENO: checking for sigwait" >&5
+echo $ECHO_N "checking for sigwait... $ECHO_C" >&6
+if test "${ac_cv_func_sigwait+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define sigwait to an innocuous variant, in case <limits.h> declares sigwait.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define sigwait innocuous_sigwait
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char sigwait (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef sigwait
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char sigwait ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_sigwait) || defined (__stub___sigwait)
+choke me
+#else
+char (*f) () = sigwait;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != sigwait;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_sigwait=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_sigwait=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_sigwait" >&5
+echo "${ECHO_T}$ac_cv_func_sigwait" >&6
+if test $ac_cv_func_sigwait = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define HAVE_SIGWAIT 1
+_ACEOF
+
+else
+  echo "$as_me:$LINENO: checking for sigwait in -lc" >&5
 echo $ECHO_N "checking for sigwait in -lc... $ECHO_C" >&6
 if test "${ac_cv_lib_c_sigwait+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5259,6 +5777,7 @@ fi
 
 fi
 
+fi
 
 fi
 
@@ -5707,59 +6226,6 @@ _ACEOF
 fi
 
 
-       if test "X$GCC" = "Xyes"; then
-               case "$host" in
-               *-freebsd*)
-                       CC="$CC -pthread"
-                       CCOPT="$CCOPT -pthread"
-                       STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
-                       ;;
-               *-openbsd*)
-                       CC="$CC -pthread"
-                       CCOPT="$CCOPT -pthread"
-                       ;;
-               *-solaris*)
-                       LIBS="$LIBS -lthread"
-                       ;;
-               *-ibm-aix*)
-                       STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
-                       ;;
-               esac
-       else
-               case $host in
-               *-dec-osf*)
-                       CC="$CC -pthread"
-                       CCOPT="$CCOPT -pthread"
-                       ;;
-               *-solaris*)
-                       CC="$CC -mt"
-                       CCOPT="$CCOPT -mt"
-                       ;;
-               *-ibm-aix*)
-                       STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
-                       ;;
-               *-UnixWare*)
-                       CC="$CC -Kthread"
-                       CCOPT="$CCOPT -Kthread"
-                       ;;
-               esac
-       fi
-       cat >>confdefs.h <<\_ACEOF
-#define _REENTRANT 1
-_ACEOF
-
-       ALWAYS_DEFINES="-D_REENTRANT"
-       DO_PTHREADS="#define DO_PTHREADS 1"
-       WANT_IRS_THREADSGR_OBJS="\${WANT_IRS_THREADSGR_OBJS}"
-       WANT_IRS_THREADSPW_OBJS="\${WANT_IRS_THREADSPW_OBJS}"
-       case $host in
-       ia64-hp-hpux11.*)
-               WANT_IRS_THREADS_OBJS="";;
-       *)
-               WANT_IRS_THREADS_OBJS="\${WANT_IRS_THREADS_OBJS}";;
-       esac
-       WANT_THREADS_OBJS="\${WANT_THREADS_OBJS}"
-       thread_dir=pthreads
 else
        ALWAYS_DEFINES=""
        DO_PTHREADS="#undef DO_PTHREADS"
@@ -7602,7 +8068,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 7605 "configure"' > conftest.$ac_ext
+  echo '#line 8071 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -8599,7 +9065,7 @@ fi
 
 
 # Provide some information about the compiler.
-echo "$as_me:8602:" \
+echo "$as_me:9068:" \
      "checking for Fortran 77 compiler version" >&5
 ac_compiler=`set X $ac_compile; echo $2`
 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@@ -9660,11 +10126,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:9663: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:10129: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:9667: \$? = $ac_status" >&5
+   echo "$as_me:10133: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
@@ -9903,11 +10369,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:9906: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:10372: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:9910: \$? = $ac_status" >&5
+   echo "$as_me:10376: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
@@ -9963,11 +10429,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:9966: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:10432: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:9970: \$? = $ac_status" >&5
+   echo "$as_me:10436: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -12148,7 +12614,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 12151 "configure"
+#line 12617 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12246,7 +12712,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 12249 "configure"
+#line 12715 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -14443,11 +14909,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14446: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14912: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:14450: \$? = $ac_status" >&5
+   echo "$as_me:14916: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
@@ -14503,11 +14969,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14506: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14972: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:14510: \$? = $ac_status" >&5
+   echo "$as_me:14976: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -15864,7 +16330,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 15867 "configure"
+#line 16333 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -15962,7 +16428,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 15965 "configure"
+#line 16431 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -16799,11 +17265,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16802: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17268: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:16806: \$? = $ac_status" >&5
+   echo "$as_me:17272: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
@@ -16859,11 +17325,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16862: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17328: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:16866: \$? = $ac_status" >&5
+   echo "$as_me:17332: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -18898,11 +19364,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:18901: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:19367: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:18905: \$? = $ac_status" >&5
+   echo "$as_me:19371: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
@@ -19141,11 +19607,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:19144: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:19610: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:19148: \$? = $ac_status" >&5
+   echo "$as_me:19614: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
@@ -19201,11 +19667,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:19204: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:19670: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:19208: \$? = $ac_status" >&5
+   echo "$as_me:19674: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -21386,7 +21852,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 21389 "configure"
+#line 21855 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -21484,7 +21950,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 21487 "configure"
+#line 21953 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -31000,7 +31466,8 @@ esac
 
 case "$hack_shutup_in6addr_init_macros" in
        yes)
-               cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define BROKEN_IN6ADDR_INIT_MACROS 1
 _ACEOF
 
index 4797d191e024c5a396b91b46cbcf2050c8d08b09..ad52d16ae978ec84b1b5d327a69fa8ec233bcbc2 100644 (file)
@@ -13,7 +13,7 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-AC_REVISION($Revision: 1.83.2.31 $)
+AC_REVISION($Revision: 1.83.2.32 $)
 
 AC_INIT(resolv/herror.c)
 AC_PREREQ(2.13)
@@ -319,16 +319,68 @@ sinclude(../../config.threads.in)dnl
 
 if $use_threads
 then
+       if test "X$GCC" = "Xyes"; then
+               case "$host" in
+               *-freebsd*)
+                       CC="$CC -pthread"
+                       CCOPT="$CCOPT -pthread"
+                       STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
+                       ;;
+               *-openbsd*)
+                       CC="$CC -pthread"
+                       CCOPT="$CCOPT -pthread"
+                       ;;
+               *-solaris*)
+                       LIBS="$LIBS -lthread"
+                       ;;
+               *-ibm-aix*)
+                       STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
+                       ;;
+               esac
+       else
+               case $host in
+               *-dec-osf*)
+                       CC="$CC -pthread"
+                       CCOPT="$CCOPT -pthread"
+                       ;;
+               *-solaris*)
+                       CC="$CC -mt"
+                       CCOPT="$CCOPT -mt"
+                       ;;
+               *-ibm-aix*)
+                       STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
+                       ;;
+               *-UnixWare*)
+                       CC="$CC -Kthread"
+                       CCOPT="$CCOPT -Kthread"
+                       ;;
+               esac
+       fi
+       AC_DEFINE(_REENTRANT)
+       ALWAYS_DEFINES="-D_REENTRANT"
+       DO_PTHREADS="#define DO_PTHREADS 1"
+       WANT_IRS_THREADSGR_OBJS="\${WANT_IRS_THREADSGR_OBJS}"
+       WANT_IRS_THREADSPW_OBJS="\${WANT_IRS_THREADSPW_OBJS}"
+       case $host in
+       ia64-hp-hpux11.*)
+               WANT_IRS_THREADS_OBJS="";;
+       *)
+               WANT_IRS_THREADS_OBJS="\${WANT_IRS_THREADS_OBJS}";;
+       esac
+       WANT_THREADS_OBJS="\${WANT_THREADS_OBJS}"
+       thread_dir=pthreads
+
        #
        # We'd like to use sigwait() too
        #
-       AC_CHECK_LIB(c, sigwait,
-                    AC_DEFINE(HAVE_SIGWAIT),
-                    AC_CHECK_LIB(pthread, sigwait,
-                                 AC_DEFINE(HAVE_SIGWAIT),
-                                 AC_CHECK_LIB(pthread, _Psigwait,
-                                              AC_DEFINE(HAVE_SIGWAIT),))
-       )
+       AC_CHECK_FUNC(sigwait,
+                     AC_DEFINE(HAVE_SIGWAIT),
+                     AC_CHECK_LIB(c, sigwait,
+                     AC_DEFINE(HAVE_SIGWAIT),
+                     AC_CHECK_LIB(pthread, sigwait,
+                                  AC_DEFINE(HAVE_SIGWAIT),
+                                  AC_CHECK_LIB(pthread, _Psigwait,
+                                               AC_DEFINE(HAVE_SIGWAIT),))))
 
        AC_CHECK_FUNC(pthread_attr_getstacksize,
                      AC_DEFINE(HAVE_PTHREAD_ATTR_GETSTACKSIZE),)
@@ -388,56 +440,6 @@ then
        #
        AC_CHECK_FUNC(sysconf, AC_DEFINE(HAVE_SYSCONF),)
 
-       if test "X$GCC" = "Xyes"; then
-               case "$host" in
-               *-freebsd*)
-                       CC="$CC -pthread"
-                       CCOPT="$CCOPT -pthread"
-                       STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
-                       ;;
-               *-openbsd*)
-                       CC="$CC -pthread"
-                       CCOPT="$CCOPT -pthread"
-                       ;;
-               *-solaris*)
-                       LIBS="$LIBS -lthread"
-                       ;;
-               *-ibm-aix*)
-                       STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
-                       ;;
-               esac
-       else
-               case $host in
-               *-dec-osf*)
-                       CC="$CC -pthread"
-                       CCOPT="$CCOPT -pthread"
-                       ;;
-               *-solaris*)
-                       CC="$CC -mt"
-                       CCOPT="$CCOPT -mt"
-                       ;;
-               *-ibm-aix*)
-                       STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
-                       ;;
-               *-UnixWare*)
-                       CC="$CC -Kthread"
-                       CCOPT="$CCOPT -Kthread"
-                       ;;
-               esac
-       fi
-       AC_DEFINE(_REENTRANT)
-       ALWAYS_DEFINES="-D_REENTRANT"
-       DO_PTHREADS="#define DO_PTHREADS 1"
-       WANT_IRS_THREADSGR_OBJS="\${WANT_IRS_THREADSGR_OBJS}"
-       WANT_IRS_THREADSPW_OBJS="\${WANT_IRS_THREADSPW_OBJS}"
-       case $host in
-       ia64-hp-hpux11.*)
-               WANT_IRS_THREADS_OBJS="";;
-       *)
-               WANT_IRS_THREADS_OBJS="\${WANT_IRS_THREADS_OBJS}";;
-       esac
-       WANT_THREADS_OBJS="\${WANT_THREADS_OBJS}"
-       thread_dir=pthreads
 else
        ALWAYS_DEFINES=""
        DO_PTHREADS="#undef DO_PTHREADS"
@@ -2412,7 +2414,7 @@ esac
 
 case "$hack_shutup_in6addr_init_macros" in
        yes)
-               AC_DEFINE(BROKEN_IN6ADDR_INIT_MACROS)
+               AC_DEFINE(BROKEN_IN6ADDR_INIT_MACROS, 1, [Defined if IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT need to be redefined.] )
                ;;
 esac
 
index 718b2103b41233de42ffd9f152c8b90fb78b593a..48f55455cfb4095186d088cc6d2919d3de0728cc 100644 (file)
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -1488,9 +1488,17 @@ EOF
        ;;
 
      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
-       case "$archive_cmds" in
-         *"\$LD"*) ;;
-         *) deplibs="$deplibs $arg";;
+        case $host in
+        *-*-freebsd*)
+           compile_command="$compile_command $arg"
+           finalize_command="$finalize_command $arg"
+           ;;
+        *)  
+           case "$archive_cmds" in
+             *"\$LD"*) ;;  
+             *) deplibs="$deplibs $arg";;
+           esac
+           ;;
        esac
        continue
        ;;