git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@625
a5681a0c-68f1-0310-ab6d-
d61299d08faa
case "${host_cpu}-${host_os}" in
*-aix* | *-freebsd* | *-darwin*) x_rflag="-D_THREAD_SAFE";;
*solaris* | *-osf* | *-hpux*) x_rflag="-D_REENTRANT";;
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
esac
AC_MSG_RESULT(${x_rflag})
if test "x$x_rflag" != xno; then
[[#include <time.h>]],
[[ctime_r(NULL,NULL)]]
),
[[#include <time.h>]],
[[ctime_r(NULL,NULL)]]
),
[AC_MSG_ERROR([Can't figure how to compile ctime_r])]
)
]
[AC_MSG_ERROR([Can't figure how to compile ctime_r])]
)
]