From 53c872512f27bfa786f713fdf858724d6a32feeb Mon Sep 17 00:00:00 2001 From: oetiker Date: Sat, 11 Jun 2005 05:29:45 +0000 Subject: [PATCH] Make sure librrd_th properly depends on libpthread. -- Peter Breitenlohner git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@625 a5681a0c-68f1-0310-ab6d-d61299d08faa --- acinclude.m4 | 6 ++++++ configure.ac | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/acinclude.m4 b/acinclude.m4 index 3cff282..9e02d6d 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -289,6 +289,12 @@ if test "x$acx_pthread_ok" = xyes; then case "${host_cpu}-${host_os}" in *-aix* | *-freebsd* | *-darwin*) x_rflag="-D_THREAD_SAFE";; *solaris* | *-osf* | *-hpux*) x_rflag="-D_REENTRANT";; + *-linux*) + if test x"$PTHREAD_CFLAGS" = "x-pthread"; then + # For Linux/gcc "-pthread" implies "-lpthread". We need, however, to make this explicit + # in PTHREAD_LIBS such that a shared library to be built properly depends on libpthread. + PTHREAD_LIBS="-lpthread $PTHREAD_LIBS" + fi;; esac AC_MSG_RESULT(${x_rflag}) if test "x$x_rflag" != xno; then diff --git a/configure.ac b/configure.ac index bf2ae7e..3ebfa15 100644 --- a/configure.ac +++ b/configure.ac @@ -265,7 +265,7 @@ AC_LINK_IFELSE( [[#include ]], [[ctime_r(NULL,NULL)]] ), - [AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no)], [AC_MSG_ERROR([Can't figure how to compile ctime_r])] ) ] -- 2.11.0