summaryrefslogtreecommitdiffstats
path: root/admin/acinclude.m4.in
diff options
context:
space:
mode:
Diffstat (limited to 'admin/acinclude.m4.in')
-rw-r--r--admin/acinclude.m4.in103
1 files changed, 28 insertions, 75 deletions
diff --git a/admin/acinclude.m4.in b/admin/acinclude.m4.in
index 7ebc1eb..3c91617 100644
--- a/admin/acinclude.m4.in
+++ b/admin/acinclude.m4.in
@@ -1181,84 +1181,37 @@ dnl ############################################################################
AC_DEFUN([AC_SS_CHECK_THREAD_STUFF],
[
- SS_THREAD_LIBLINK=""
+ SS_THREAD_LIBLINK="-lpthread"
- AC_MSG_CHECKING([if you want to use the solaris lthread])
+ AC_MSG_CHECKING([if your pthread implementation works])
SS_DO_IT="false"
- AC_ARG_WITH(solaris-lthread, [ --with-solaris-lthread Use the Solaris native libthread],SS_DO_IT="true")
- if test "$SS_DO_IT" = "true"; then
- AC_MSG_RESULT(yes)
- SS_THREAD_LIBLINK="-lthread"
- AC_DEFINE([COMPILE_THREADS_USE_SOLARIS_LIBTHREAD], 1, [define if you want to use the solaris libthread])
- else
- AC_MSG_RESULT(no)
-
- AC_MSG_CHECKING([if you want to use freebsd native pthread support])
- SS_DO_IT="false"
-
- AC_ARG_WITH(freebsd-pthread, [ --with-freebsd-pthread Use the FreeBSD native libc_r for threading],SS_DO_IT="true")
- if test "$SS_DO_IT" = "true"; then
- AC_MSG_RESULT(yes)
- SS_THREAD_LIBLINK="-pthread"
- AC_DEFINE([COMPILE_THREADS_USE_POSIX], 1, [define if you want to use the pthreads library])
- else
- AC_MSG_RESULT(no..using lpthread)
- SS_THREAD_LIBLINK="-lpthread"
- AC_DEFINE([COMPILE_THREADS_USE_POSIX], 1, [define if you want to use the pthreads library])
- fi
-
- AC_MSG_CHECKING([if your pthread implementation works])
- SS_DO_IT="false"
- AC_ARG_WITH(no-pthread-check, [ --with-no-pthread-check Do not check if pthreads stuff compiles],SS_DO_IT="true")
-
- if test "$SS_DO_IT" = "true"; then
- AC_MSG_RESULT(yes, trusting you)
- else
- SS_SAVE_LIBS="$LIBS"
- LIBS="$SS_THREAD_LIBLINK"
- AC_TRY_LINK([
- #include <pthread.h>
- ],[
- pthread_mutex_lock(0);
- ],
- eval "SS_PTHREAD_OK=yes"
- ,
- eval "SS_PTHREAD_OK=no"
- )
- LIBS="$SS_SAVE_LIBS"
+ SS_SAVE_LIBS="$LIBS"
+ LIBS="$SS_THREAD_LIBLINK"
+ AC_TRY_LINK([
+ #include <pthread.h>
+ ],[
+ pthread_mutex_lock(0);
+ ],
+ eval "SS_PTHREAD_OK=yes"
+ ,
+ eval "SS_PTHREAD_OK=no"
+ )
+ LIBS="$SS_SAVE_LIBS"
- if test "$SS_PTHREAD_OK" = "yes"; then
- AC_MSG_RESULT(yes, it seems to)
- else
- AC_MSG_RESULT(["FAILED"])
- AC_SS_SET_REDINK
- if test "$SS_THREAD_LIBLINK" = "-pthread"; then
- echo "################################################################################"
- echo "### CONFIGURE ERROR:"
- echo "### Failed to compile the pthread test program."
- echo "### You have specified to use the native FreeBSD libc_r for threading"
- echo "### but it looks that this does not work."
- echo "### Make sure that you have libc_r floating around your system"
- echo "### and that the -pthread special gcc flag works."
- echo "### (You need to use the native FreeBSD gcc compiler for this to work)"
- echo "################################################################################"
- else
- echo "################################################################################"
- echo "### CONFIGURE ERROR:"
- echo "### Failed to compile the pthread test program."
- echo "### It looks that you either don't have libpthread installed or"
- echo "### it is not reachable by the linker."
- echo "### Make sure that libpthread is in /lib or /usr/lib."
- echo "### If you're on solaris you might try the --with-solaris-lthread"
- echo "### configure option. If you're on FreeBSD you should use"
- echo "### --with-freebsd-pthread."
- echo "### Good luck :)"
- echo "################################################################################"
- fi
- AC_SS_SET_NORMALINK
- AC_MSG_ERROR(["This was fatal...aborting"])
- fi
- fi
+ if test "$SS_PTHREAD_OK" = "yes"; then
+ AC_MSG_RESULT(yes, it seems to)
+ else
+ AC_MSG_RESULT(["FAILED"])
+ AC_SS_SET_REDINK
+ echo "################################################################################"
+ echo "### CONFIGURE ERROR:"
+ echo "### Failed to compile the pthread test program."
+ echo "### It looks that you either don't have libpthread installed or"
+ echo "### it is not reachable by the linker."
+ echo "### Make sure that libpthread is in /lib or /usr/lib."
+ echo "################################################################################"
+ AC_SS_SET_NORMALINK
+ AC_MSG_ERROR(["This was fatal...aborting"])
fi
])