summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac43
1 files changed, 22 insertions, 21 deletions
diff --git a/configure.ac b/configure.ac
index ce1728e..367e82a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
1dnl Process this file with autoconf to produce a configure script. 1dnl Process this file with autoconf to produce a configure script.
2AC_PREREQ(2.59) 2AC_PREREQ(2.59)
3AC_INIT(monitoring-plugins,2.1.1) 3AC_INIT(monitoring-plugins,2.1.2)
4AC_CONFIG_SRCDIR(NPTest.pm) 4AC_CONFIG_SRCDIR(NPTest.pm)
5AC_CONFIG_FILES([gl/Makefile]) 5AC_CONFIG_FILES([gl/Makefile])
6AC_CONFIG_AUX_DIR(build-aux) 6AC_CONFIG_AUX_DIR(build-aux)
@@ -156,12 +156,6 @@ AC_CHECK_LIB(socket,socket,SOCKETLIBS="$SOCKETLIBS -lsocket")
156AC_CHECK_LIB(resolv,main,SOCKETLIBS="$SOCKETLIBS -lresolv") 156AC_CHECK_LIB(resolv,main,SOCKETLIBS="$SOCKETLIBS -lresolv")
157AC_SUBST(SOCKETLIBS) 157AC_SUBST(SOCKETLIBS)
158 158
159dnl Check for POSIX thread libraries
160AC_CHECK_HEADERS(pthread.h)
161AC_CHECK_LIB(pthread,pthread_create,THREADLIBS="-lpthread",
162 AC_CHECK_LIB(pthread,pthread_create,THREADLIBS="-lpthread -lrt",-lrt))
163AC_SUBST(THREADLIBS)
164
165dnl 159dnl
166dnl check for math-related functions needing -lm 160dnl check for math-related functions needing -lm
167AC_CHECK_HEADERS(math.h) 161AC_CHECK_HEADERS(math.h)
@@ -279,26 +273,33 @@ AC_ARG_WITH([radius], [AS_HELP_STRING([--without-radius], [Skips the radius plug
279dnl Check for radius libraries 273dnl Check for radius libraries
280AS_IF([test "x$with_radius" != "xno"], [ 274AS_IF([test "x$with_radius" != "xno"], [
281 _SAVEDLIBS="$LIBS" 275 _SAVEDLIBS="$LIBS"
282 AC_CHECK_LIB(freeradius-client,rc_read_config) 276 AC_CHECK_LIB(radcli,rc_read_config)
283 if test "$ac_cv_lib_freeradius_client_rc_read_config" = "yes"; then 277 if test "$ac_cv_lib_radcli_rc_read_config" = "yes"; then
284 EXTRAS="$EXTRAS check_radius\$(EXEEXT)" 278 EXTRAS="$EXTRAS check_radius\$(EXEEXT)"
285 RADIUSLIBS="-lfreeradius-client" 279 RADIUSLIBS="-lradcli"
286 AC_SUBST(RADIUSLIBS) 280 AC_SUBST(RADIUSLIBS)
287 else 281 else
288 AC_CHECK_LIB(radiusclient-ng,rc_read_config) 282 AC_CHECK_LIB(freeradius-client,rc_read_config)
289 if test "$ac_cv_lib_radiusclient_ng_rc_read_config" = "yes"; then 283 if test "$ac_cv_lib_freeradius_client_rc_read_config" = "yes"; then
290 EXTRAS="$EXTRAS check_radius\$(EXEEXT)" 284 EXTRAS="$EXTRAS check_radius\$(EXEEXT)"
291 RADIUSLIBS="-lradiusclient-ng" 285 RADIUSLIBS="-lfreeradius-client"
292 AC_SUBST(RADIUSLIBS) 286 AC_SUBST(RADIUSLIBS)
293 else 287 else
294 AC_CHECK_LIB(radiusclient,rc_read_config) 288 AC_CHECK_LIB(radiusclient-ng,rc_read_config)
295 if test "$ac_cv_lib_radiusclient_rc_read_config" = "yes"; then 289 if test "$ac_cv_lib_radiusclient_ng_rc_read_config" = "yes"; then
296 EXTRAS="$EXTRAS check_radius\$(EXEEXT)" 290 EXTRAS="$EXTRAS check_radius\$(EXEEXT)"
297 RADIUSLIBS="-lradiusclient" 291 RADIUSLIBS="-lradiusclient-ng"
298 AC_SUBST(RADIUSLIBS) 292 AC_SUBST(RADIUSLIBS)
299 else 293 else
300 AC_MSG_WARN([Skipping radius plugin]) 294 AC_CHECK_LIB(radiusclient,rc_read_config)
301 AC_MSG_WARN([install radius libs to compile this plugin (see REQUIREMENTS).]) 295 if test "$ac_cv_lib_radiusclient_rc_read_config" = "yes"; then
296 EXTRAS="$EXTRAS check_radius\$(EXEEXT)"
297 RADIUSLIBS="-lradiusclient"
298 AC_SUBST(RADIUSLIBS)
299 else
300 AC_MSG_WARN([Skipping radius plugin])
301 AC_MSG_WARN([install radius libs to compile this plugin (see REQUIREMENTS).])
302 fi
302 fi 303 fi
303 fi 304 fi
304 fi 305 fi
@@ -499,15 +500,15 @@ if ! test x"$with_openssl" = x"no"; then
499 dnl Check for crypto lib 500 dnl Check for crypto lib
500 _SAVEDLIBS="$LIBS" 501 _SAVEDLIBS="$LIBS"
501 LIBS="-L${with_openssl}/lib" 502 LIBS="-L${with_openssl}/lib"
502 AC_CHECK_LIB(crypto,CRYPTO_lock) 503 AC_CHECK_LIB(crypto,CRYPTO_new_ex_data)
503 if test "$ac_cv_lib_crypto_CRYPTO_lock" = "yes"; then 504 if test "$ac_cv_lib_crypto_CRYPTO_new_ex_data" = "yes"; then
504 dnl Check for SSL lib 505 dnl Check for SSL lib
505 AC_CHECK_LIB(ssl,main, SSLLIBS="-lssl -lcrypto",,-lcrypto) 506 AC_CHECK_LIB(ssl,main, SSLLIBS="-lssl -lcrypto",,-lcrypto)
506 fi 507 fi
507 LIBS="$_SAVEDLIBS" 508 LIBS="$_SAVEDLIBS"
508 509
509 dnl test headers and libs to decide whether check_http should use SSL 510 dnl test headers and libs to decide whether check_http should use SSL
510 if test "$ac_cv_lib_crypto_CRYPTO_lock" = "yes"; then 511 if test "$ac_cv_lib_crypto_CRYPTO_new_ex_data" = "yes"; then
511 if test "$ac_cv_lib_ssl_main" = "yes"; then 512 if test "$ac_cv_lib_ssl_main" = "yes"; then
512 if test "$FOUNDINCLUDE" = "yes"; then 513 if test "$FOUNDINCLUDE" = "yes"; then
513 FOUNDOPENSSL="yes" 514 FOUNDOPENSSL="yes"