diff options
Diffstat (limited to 'TSRM/threads.m4')
-rw-r--r-- | TSRM/threads.m4 | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/TSRM/threads.m4 b/TSRM/threads.m4 index 55864c8982..dde7f17257 100644 --- a/TSRM/threads.m4 +++ b/TSRM/threads.m4 @@ -28,7 +28,7 @@ dnl OF THE POSSIBILITY OF SUCH DAMAGE. dnl dnl PTHREADS_FLAGS dnl -dnl Set some magic defines to achieve POSIX threads conformance +dnl Set some magic defines to achieve POSIX threads conformance. dnl AC_DEFUN([PTHREADS_FLAGS],[ if test -z "$host_alias" && test -n "$host"; then @@ -52,18 +52,17 @@ AC_DEFUN([PTHREADS_FLAGS],[ PTHREAD_FLAGS=-D_REENTRANT;; *sco*) PTHREAD_FLAGS=-D_REENTRANT;; -dnl Solves sigwait() problem, creates problems with u_long etc. -dnl PTHREAD_FLAGS="-D_REENTRANT -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=199506 -D_XOPEN_SOURCE_EXTENDED=1";; esac if test -n "$PTHREAD_FLAGS"; then CPPFLAGS="$CPPFLAGS $PTHREAD_FLAGS" fi -])dnl +]) + dnl dnl PTHREADS_CHECK_COMPILE dnl -dnl Check whether the current setup can use POSIX threads calls +dnl Check whether the current setup can use POSIX threads calls. dnl AC_DEFUN([PTHREADS_CHECK_COMPILE], [ AC_LINK_IFELSE([ AC_LANG_SOURCE([ @@ -85,11 +84,12 @@ int main() { ], [ pthreads_checked=no ] -) ] )dnl +) ] ) + dnl -dnl PTHREADS_CHECK() +dnl PTHREADS_CHECK dnl -dnl Try to find a way to enable POSIX threads +dnl Try to find a way to enable POSIX threads. dnl dnl Magic flags dnl -kthread gcc (FreeBSD) @@ -102,7 +102,6 @@ dnl -qthreaded AIX cc V5 dnl -threads gcc (HP-UX) dnl AC_DEFUN([PTHREADS_CHECK],[ - save_CFLAGS=$CFLAGS save_LIBS=$LIBS PTHREADS_ASSIGN_VARS @@ -151,8 +150,12 @@ if test "$pthreads_working" = "yes"; then else threads_result="POSIX-Threads not found" fi -])dnl +]) + dnl +dnl PTHREADS_ASSIGN_VARS +dnl +dnl Adds pthreads linker and compiler flags. dnl AC_DEFUN([PTHREADS_ASSIGN_VARS],[ if test -n "$ac_cv_pthreads_lib"; then @@ -162,4 +165,4 @@ fi if test -n "$ac_cv_pthreads_cflags"; then CFLAGS="$CFLAGS $ac_cv_pthreads_cflags" fi -])dnl +]) |