summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorcmiller@zippy.(none) <>2006-07-07 16:47:57 -0400
committercmiller@zippy.(none) <>2006-07-07 16:47:57 -0400
commit8ea01fbca805a48f6d69d5022fe885359c294fd2 (patch)
treefbd2f7b7506917dcc4b233ad4afa3ff48456d4d7 /configure.in
parent5039184e83047a7fa531ea627c4910912645bc7e (diff)
downloadmariadb-git-8ea01fbca805a48f6d69d5022fe885359c294fd2.tar.gz
Add a more reliable "getconf" test for Linuxthreads. The later trees should already
have a better test (and so this should be null-merged there). ALSO! Make it so that it accepts NPTL as a valid _equivalent_ implementation.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in21
1 files changed, 15 insertions, 6 deletions
diff --git a/configure.in b/configure.in
index 8dd224d0a87..376cf48c476 100644
--- a/configure.in
+++ b/configure.in
@@ -1241,8 +1241,9 @@ if test "$with_named_thread" = "no" -a "$with_mit_threads" = "no"
then
# Look for LinuxThreads.
AC_MSG_CHECKING("LinuxThreads")
- res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
- if test "$res" -gt 0
+ grepres=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
+ getconfres=`which getconf >/dev/null && getconf GNU_LIBPTHREAD_VERSION | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ |grep LINUXTHREADS | wc -l || echo 0`
+ if test "$grepres" -gt 0 -o "$getconfres" -gt 0
then
AC_MSG_RESULT("Found")
AC_DEFINE(HAVE_LINUXTHREADS)
@@ -1255,12 +1256,20 @@ then
else
AC_MSG_RESULT("Not found")
# If this is a linux machine we should barf
+ AC_MSG_CHECKING("NPTL")
if test "$IS_LINUX" = "true"
then
- AC_MSG_ERROR([This is a linux system and Linuxthreads was not
-found. On linux Linuxthreads should be used. Please install Linuxthreads
-(or a new glibc) and try again. See the Installation chapter in the
-Reference Manual for more information.])
+ getconfres=`which getconf >/dev/null && getconf GNU_LIBPTHREAD_VERSION | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ |grep NPTL | wc -l || echo 0`
+ if test "$getconfres" -gt 0
+ then
+ AC_DEFINE(HAVE_LINUXTHREADS) dnl All this code predates NPTL, so "have linuxthreads" is a poor name.
+ with_named_thread="-lpthread"
+ else
+ AC_MSG_ERROR([This is a Linux system and neither Linuxthreads nor NPTL were
+found. Please install Linuxthreads or a new glibc and try
+again. See the Installation chapter in the Reference Manual for
+more information.])
+ fi
else
AC_MSG_CHECKING("DEC threads")
if test -f /usr/shlib/libpthread.so -a -f /usr/lib/libmach.a -a -f /usr/ccs/lib/cmplrs/cc/libexc.a