aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorGravatar Holger Weiss <holger@zedat.fu-berlin.de> 2014-12-02 01:03:57 +0100
committerGravatar Holger Weiss <holger@zedat.fu-berlin.de> 2014-12-02 01:03:57 +0100
commit7b5d1c00e8782106b11cb1723a76fec9ed46f56f (patch)
treee939690d1d9f3a7919c0be8a9b2d8092178999bc /configure.ac
parent0d14645cb059ce0e4154482b38b16341ba8ddaa3 (diff)
downloadmonitoring-plugins-7b5d1c00e8782106b11cb1723a76fec9ed46f56f.tar.gz
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.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 6 insertions, 12 deletions
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