aboutsummaryrefslogtreecommitdiff
path: root/contrib/bind9/config.threads.in
diff options
context:
space:
mode:
authorDoug Barton <dougb@FreeBSD.org>2006-12-10 07:09:56 +0000
committerDoug Barton <dougb@FreeBSD.org>2006-12-10 07:09:56 +0000
commite99fbbb680307fe016c8db7d6611f1a3249761fb (patch)
treed7fa0e61cadfdb3b3752a55401049f2294a7cfaf /contrib/bind9/config.threads.in
parenta02f92e875d0d48c46103eef0fbea835048a278b (diff)
downloadsrc-e99fbbb680307fe016c8db7d6611f1a3249761fb.tar.gz
src-e99fbbb680307fe016c8db7d6611f1a3249761fb.zip
Vendor import of BIND 9.3.3
Notes
Notes: svn path=/vendor/bind9/dist/; revision=165071
Diffstat (limited to 'contrib/bind9/config.threads.in')
-rw-r--r--contrib/bind9/config.threads.in25
1 files changed, 25 insertions, 0 deletions
diff --git a/contrib/bind9/config.threads.in b/contrib/bind9/config.threads.in
index f2816c447fb2..c1c113b93726 100644
--- a/contrib/bind9/config.threads.in
+++ b/contrib/bind9/config.threads.in
@@ -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,,