add -pthread to LIBS since libtool doesn't preserve it for us when
adding is as a dependency on libs git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14036 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -3,8 +3,8 @@ dnl $Id$
|
|||||||
AC_DEFUN([KRB_PTHREADS], [
|
AC_DEFUN([KRB_PTHREADS], [
|
||||||
AC_MSG_CHECKING(if compiling threadsafe libraries)
|
AC_MSG_CHECKING(if compiling threadsafe libraries)
|
||||||
|
|
||||||
if test "$PTHREADS_LDFLAGS" = "" ; then
|
if test "$PTHREADS_LIBS" = "" ; then
|
||||||
PTHREADS_LDFLAGS="-pthread"
|
PTHREADS_LIBS="-pthread"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_ARG_ENABLE(pthread-support,
|
AC_ARG_ENABLE(pthread-support,
|
||||||
@@ -19,6 +19,7 @@ case "$host" in
|
|||||||
*-*-netbsd*)
|
*-*-netbsd*)
|
||||||
enable_pthread_support="if running netbsd 1.6T or newer"
|
enable_pthread_support="if running netbsd 1.6T or newer"
|
||||||
dnl heim_threads.h knows this
|
dnl heim_threads.h knows this
|
||||||
|
PTHREADS_LIBS=""
|
||||||
;;
|
;;
|
||||||
*-*-freebsd5*)
|
*-*-freebsd5*)
|
||||||
enable_pthread_support=yes
|
enable_pthread_support=yes
|
||||||
@@ -37,13 +38,16 @@ fi
|
|||||||
if test "$enable_pthread_support" != no; then
|
if test "$enable_pthread_support" != no; then
|
||||||
AC_DEFINE(ENABLE_PTHREAD_SUPPORT, 1,
|
AC_DEFINE(ENABLE_PTHREAD_SUPPORT, 1,
|
||||||
[Define if you want have a thread safe libraries])
|
[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"
|
||||||
else
|
else
|
||||||
PTHREADS_CFLAGS=""
|
PTHREADS_CFLAGS=""
|
||||||
PTHREADS_LDFLAGS=""
|
PTHREADS_LIBS=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_SUBST(PTHREADS_CFLAGS)
|
AC_SUBST(PTHREADS_CFLAGS)
|
||||||
AC_SUBST(PTHREADS_LDFLAGS)
|
AC_SUBST(PTHREADS_LIBS)
|
||||||
|
|
||||||
AC_MSG_RESULT($enable_pthread_support)
|
AC_MSG_RESULT($enable_pthread_support)
|
||||||
])
|
])
|
||||||
|
Reference in New Issue
Block a user