diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2014-12-02 00:03:57 (GMT) |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2014-12-02 00:03:57 (GMT) |
commit | 7b5d1c00e8782106b11cb1723a76fec9ed46f56f (patch) | |
tree | e939690d1d9f3a7919c0be8a9b2d8092178999bc /configure.ac | |
parent | 0d14645cb059ce0e4154482b38b16341ba8ddaa3 (diff) | |
download | monitoring-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.ac | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac index 6dacd4f..a90a9d4 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -156,6 +156,12 @@ AC_CHECK_LIB(socket,socket,SOCKETLIBS="$SOCKETLIBS -lsocket") | |||
156 | AC_CHECK_LIB(resolv,main,SOCKETLIBS="$SOCKETLIBS -lresolv") | 156 | AC_CHECK_LIB(resolv,main,SOCKETLIBS="$SOCKETLIBS -lresolv") |
157 | AC_SUBST(SOCKETLIBS) | 157 | AC_SUBST(SOCKETLIBS) |
158 | 158 | ||
159 | dnl Check for POSIX thread libraries | ||
160 | AC_CHECK_HEADERS(pthread.h) | ||
161 | AC_CHECK_LIB(pthread,pthread_create,THRLIBS="-lpthread", | ||
162 | AC_CHECK_LIB(pthread,pthread_create,THRLIBS="-lpthread -lrt",-lrt)) | ||
163 | AC_SUBST(THRLIBS) | ||
164 | |||
159 | dnl | 165 | dnl |
160 | dnl check for math-related functions needing -lm | 166 | dnl check for math-related functions needing -lm |
161 | AC_CHECK_HEADERS(math.h) | 167 | AC_CHECK_HEADERS(math.h) |
@@ -544,18 +550,6 @@ else | |||
544 | with_gnutls="no" | 550 | with_gnutls="no" |
545 | fi | 551 | fi |
546 | 552 | ||
547 | dnl Check for POSIX thread libraries | ||
548 | AC_CHECK_HEADERS(pthread.h) | ||
549 | case $host in | ||
550 | *sun* | *solaris*) | ||
551 | AC_CHECK_LIB(pthread,pthread_create,THRLIBS="-lpthread -lrt") | ||
552 | ;; | ||
553 | *) | ||
554 | AC_CHECK_LIB(pthread,pthread_create,THRLIBS="-lpthread") | ||
555 | ;; | ||
556 | esac | ||
557 | AC_SUBST(THRLIBS) | ||
558 | |||
559 | dnl | 553 | dnl |
560 | dnl Checks for header files. | 554 | dnl Checks for header files. |
561 | dnl | 555 | dnl |