X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=acinclude.m4;h=8228d392f3d7a0da00bab86ec8c689faef302ecf;hb=a7e88b8b38cf2fb2db322c0ab89438b141f888d0;hp=3cff28226989e6287a97b19fe7ec74249b6a7767;hpb=4eb08e662ae5077202899aff6dc94e37cd7646b6;p=rrdtool.git diff --git a/acinclude.m4 b/acinclude.m4 index 3cff282..8228d39 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -19,7 +19,7 @@ AC_DEFUN([EX_CHECK_ALL], EX_CHECK_STATE=NO ex_check_save_LIBS=${LIBS} ex_check_save_CPPFLAGS=${CPPFLAGS} - ex_check_save_LDFLAGS=${LDPFLAGS} + ex_check_save_LDFLAGS=${LDFLAGS} if test "x$7" != "x"; then CPPFLAGS="$CPPFLAGS -I$7" fi @@ -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