Commit 89c7db0c authored by unknown's avatar unknown

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.

parent 861096a5
...@@ -1241,8 +1241,9 @@ if test "$with_named_thread" = "no" -a "$with_mit_threads" = "no" ...@@ -1241,8 +1241,9 @@ if test "$with_named_thread" = "no" -a "$with_mit_threads" = "no"
then then
# Look for LinuxThreads. # Look for LinuxThreads.
AC_MSG_CHECKING("LinuxThreads") AC_MSG_CHECKING("LinuxThreads")
res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l` grepres=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
if test "$res" -gt 0 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 then
AC_MSG_RESULT("Found") AC_MSG_RESULT("Found")
AC_DEFINE(HAVE_LINUXTHREADS) AC_DEFINE(HAVE_LINUXTHREADS)
...@@ -1255,12 +1256,20 @@ then ...@@ -1255,12 +1256,20 @@ then
else else
AC_MSG_RESULT("Not found") AC_MSG_RESULT("Not found")
# If this is a linux machine we should barf # If this is a linux machine we should barf
AC_MSG_CHECKING("NPTL")
if test "$IS_LINUX" = "true" if test "$IS_LINUX" = "true"
then then
AC_MSG_ERROR([This is a linux system and Linuxthreads was not getconfres=`which getconf >/dev/null && getconf GNU_LIBPTHREAD_VERSION | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ |grep NPTL | wc -l || echo 0`
found. On linux Linuxthreads should be used. Please install Linuxthreads if test "$getconfres" -gt 0
(or a new glibc) and try again. See the Installation chapter in the then
Reference Manual for more information.]) 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 else
AC_MSG_CHECKING("DEC threads") 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 if test -f /usr/shlib/libpthread.so -a -f /usr/lib/libmach.a -a -f /usr/ccs/lib/cmplrs/cc/libexc.a
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment