From ce1846a5733c8571fe6b0d3d75352d995d7e2a72 Mon Sep 17 00:00:00 2001 From: Love Hornquist Astrand Date: Thu, 17 Dec 2009 10:43:49 +0100 Subject: [PATCH] its really just LIBADD more most of them --- cf/pthreads.m4 | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/cf/pthreads.m4 b/cf/pthreads.m4 index f6c530daf..3b36047b5 100644 --- a/cf/pthreads.m4 +++ b/cf/pthreads.m4 @@ -13,21 +13,22 @@ case "$host" in native_pthread_support=yes if test "$GCC" = yes; then PTHREADS_CFLAGS=-pthreads - PTHREADS_LIBS=-pthreads + PTHREAD_LIBADD=-pthreads else PTHREADS_CFLAGS=-mt - PTHREADS_LIBS=-mt + PTHREAD_LDADD=-mt + PTHREAD_LIBADD=-mt fi ;; *-*-netbsd[[12]]*) native_pthread_support="if running netbsd 1.6T or newer" dnl heim_threads.h knows this - PTHREADS_LIBS="-lpthread" + PTHREAD_LIBADD="-lpthread" ;; *-*-netbsd[[3456789]]*) native_pthread_support="netbsd 3 uses explict pthread" dnl heim_threads.h knows this - PTHREADS_LIBS="-lpthread" + PTHREAD_LIBADD="-lpthread" ;; *-*-freebsd[[56]]*) native_pthread_support=yes @@ -39,21 +40,21 @@ case "$host" in *-*-openbsd*) native_pthread_support=yes PTHREADS_CFLAGS=-pthread - PTHREADS_LIBS=-pthread + PTHREAD_LIBADD=-pthread ;; *-*-linux* | *-*-linux-gnu) case `uname -r` in 2.*) native_pthread_support=yes PTHREADS_CFLAGS=-pthread - PTHREADS_LIBS=-pthread + PTHREAD_LIBADD=-pthread ;; esac ;; *-*-kfreebsd*-gnu*) native_pthread_support=yes PTHREADS_CFLAGS=-pthread - PTHREADS_LIBS=-pthread + PTHREAD_LIBADD=-pthread ;; *-*-aix*) dnl AIX is disabled since we don't handle the utmp/utmpx @@ -62,7 +63,7 @@ case "$host" in ;; mips-sgi-irix6.[[5-9]]) # maybe works for earlier versions too native_pthread_support=yes - PTHREADS_LIBS="-lpthread" + PTHREAD_LIBADD="-lpthread" ;; *-*-darwin*) native_pthread_support=yes @@ -81,15 +82,15 @@ if test "$enable_pthread_support" != no; then [Define if you want have a thread safe libraries]) dnl This sucks, but libtool doesn't save the depenecy on -pthread dnl for libraries. - LIBS="$PTHREADS_LIBS $LIBS" + LIBS="$PTHREAD_LIBADD $LIBS" else PTHREADS_CFLAGS="" - PTHREADS_LIBS="" + PTHREAD_LIBADD="" PTHREADS_LIBADD="" fi AC_SUBST(PTHREADS_CFLAGS) -AC_SUBST(PTHREADS_LIBS) +AC_SUBST(PTHREAD_LDADD) AC_SUBST(PTHREADS_LIBADD) AC_MSG_RESULT($enable_pthread_support)