From 6986aa1d0a352d8d02eed4896034631fffd25a27 Mon Sep 17 00:00:00 2001 From: Gerhard Lausser Date: Tue, 1 Oct 2013 08:57:10 +0200 Subject: Don't let check_disk hang on hanging file systems --- configure.ac | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 59875e5a..6dacd4f4 100644 --- a/configure.ac +++ b/configure.ac @@ -544,6 +544,18 @@ else with_gnutls="no" fi +dnl Check for POSIX thread libraries +AC_CHECK_HEADERS(pthread.h) +case $host in + *sun* | *solaris*) + AC_CHECK_LIB(pthread,pthread_create,THRLIBS="-lpthread -lrt") + ;; + *) + AC_CHECK_LIB(pthread,pthread_create,THRLIBS="-lpthread") + ;; +esac +AC_SUBST(THRLIBS) + dnl dnl Checks for header files. dnl -- cgit v1.2.3 From 7b5d1c00e8782106b11cb1723a76fec9ed46f56f Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Tue, 2 Dec 2014 01:03:57 +0100 Subject: configure.ac: Don't let pthread check depend on OS Don't check the operating system environment to detect the correct linker flags for using the POSIX thread library. --- configure.ac | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 6dacd4f4..a90a9d45 100644 --- a/configure.ac +++ b/configure.ac @@ -156,6 +156,12 @@ AC_CHECK_LIB(socket,socket,SOCKETLIBS="$SOCKETLIBS -lsocket") AC_CHECK_LIB(resolv,main,SOCKETLIBS="$SOCKETLIBS -lresolv") AC_SUBST(SOCKETLIBS) +dnl Check for POSIX thread libraries +AC_CHECK_HEADERS(pthread.h) +AC_CHECK_LIB(pthread,pthread_create,THRLIBS="-lpthread", + AC_CHECK_LIB(pthread,pthread_create,THRLIBS="-lpthread -lrt",-lrt)) +AC_SUBST(THRLIBS) + dnl dnl check for math-related functions needing -lm AC_CHECK_HEADERS(math.h) @@ -544,18 +550,6 @@ else with_gnutls="no" fi -dnl Check for POSIX thread libraries -AC_CHECK_HEADERS(pthread.h) -case $host in - *sun* | *solaris*) - AC_CHECK_LIB(pthread,pthread_create,THRLIBS="-lpthread -lrt") - ;; - *) - AC_CHECK_LIB(pthread,pthread_create,THRLIBS="-lpthread") - ;; -esac -AC_SUBST(THRLIBS) - dnl dnl Checks for header files. dnl -- cgit v1.2.3 From cf3d149652a163a0bd1c1e72d1b0e2a3c5ddb610 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Tue, 2 Dec 2014 12:37:59 +0100 Subject: Cosmetic change: s/THRLIBS/THREADLIBS/ Use a more intuitive variable name. --- configure.ac | 6 +++--- plugins/Makefile.am | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index a90a9d45..3cc3d03d 100644 --- a/configure.ac +++ b/configure.ac @@ -158,9 +158,9 @@ AC_SUBST(SOCKETLIBS) dnl Check for POSIX thread libraries AC_CHECK_HEADERS(pthread.h) -AC_CHECK_LIB(pthread,pthread_create,THRLIBS="-lpthread", - AC_CHECK_LIB(pthread,pthread_create,THRLIBS="-lpthread -lrt",-lrt)) -AC_SUBST(THRLIBS) +AC_CHECK_LIB(pthread,pthread_create,THREADLIBS="-lpthread", + AC_CHECK_LIB(pthread,pthread_create,THREADLIBS="-lpthread -lrt",-lrt)) +AC_SUBST(THREADLIBS) dnl dnl check for math-related functions needing -lm diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 26183940..41906c53 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -71,7 +71,7 @@ check_apt_LDADD = $(BASEOBJS) check_cluster_LDADD = $(BASEOBJS) check_dbi_LDADD = $(NETLIBS) $(DBILIBS) check_dig_LDADD = $(NETLIBS) -check_disk_LDADD = $(BASEOBJS) $(THRLIBS) +check_disk_LDADD = $(BASEOBJS) $(THREADLIBS) check_dns_LDADD = $(NETLIBS) check_dummy_LDADD = $(BASEOBJS) check_fping_LDADD = $(NETLIBS) -- cgit v1.2.3