diff --git a/configure.in b/configure.in
index d0bd0efc6e7dfef6e5b16afd36e8cd5a83526e13..17fd14c4f2be18f0f2c22e7500dcf54ae6b5e034 100644 (file)
--- a/configure.in
+++ b/configure.in
dnl Process this file with autoconf to produce a configure script.
AC_REVISION ($Revision$)
AC_PREREQ(2.59)
-AC_INIT(nagios-plugins,1.4.11)
+AC_INIT(nagios-plugins,1.4.13)
AC_CONFIG_SRCDIR(NPTest.pm)
AC_CONFIG_FILES(gl/Makefile)
AC_CONFIG_AUX_DIR(build-aux)
AC_CHECK_LIB(m,floor,MATHLIBS="-lm")
AC_SUBST(MATHLIBS)
-dnl Check for libtap, to run perl-like tests
-AC_CHECK_LIB(tap, plan_tests,
+dnl Add libtap for tests
+AC_ARG_ENABLE(libtap,
+ AC_HELP_STRING([--enable-libtap],
+ [Enables configuring of libtap in external/tap/. Run "make tap" to compile (default: no)]),
+ [enable_libtap=$enableval],
+ [enable_libtap=no])
+dnl Have to define TAP_DIR so that Makefile can pull it as an extra dist
+TAP_DIR=external/tap-1.01
+AC_SUBST(TAP_DIR)
+if test "$enable_libtap" = yes; then
+ dnl Have to have AC_CONFIG_SUBDIRS as a literal
+ AC_CONFIG_SUBDIRS([external/tap-1.01])
EXTRA_TEST="test_utils test_disk test_tcp test_cmd test_base64"
AC_SUBST(EXTRA_TEST)
- )
+fi
+
+dnl INI Parsing
+AC_ARG_ENABLE(extra-opts,
+ AC_HELP_STRING([--enable-extra-opts],
+ [Enables parsing of plugins ini config files for extra options (default: no)]),
+ [enable_extra_opts=$enableval],
+ [enable_extra_opts=no])
+AM_CONDITIONAL([USE_PARSE_INI],[test "$enable_extra_opts" = "yes"])
+if test "$enable_extra_opts" = "yes" ; then
+ AC_DEFINE(NP_EXTRA_OPTS,[1],[Enable INI file parsing.])
+ if test "$enable_libtap" = yes; then
+ EXTRA_TEST="$EXTRA_TEST test_ini test_opts"
+ AC_SUBST(EXTRA_TEST)
+ fi
+fi
dnl Check for PostgreSQL libraries
_SAVEDLIBS="$LIBS"
[sets path to pgsql installation]),
PGSQL=$withval,)
AC_CHECK_LIB(crypt,main)
-if test "$ac_cv_lib_crypt_main" = "yes"; then
+if test "$ac_cv_lib_crypt_main" = "yes" -a "x$PGSQL" != "xno"; then
if test -n "$PGSQL"; then
LDFLAGS="$LDFLAGS -L$PGSQL/lib"
CPPFLAGS="$CPPFLAGS -I$PGSQL/include"
CPPFLAGS="$_SAVEDCPPFLAGS"
fi
+dnl *** The following block comes from wget configure.ac ***
+dnl Unfortunately, as of this writing (OpenSSL 0.9.6), the libcrypto
+dnl shared library doesn't record its dependency on libdl, so we
+dnl need to check for it ourselves so we won't fail to link due to a
+dnl lack of -ldl. Most OSes use dlopen(), but HP-UX uses
+dnl shl_load().
+AC_CHECK_LIB(dl,dlopen)
+AC_CHECK_LIB(dl,shl_load)
dnl openssl detection/configuration
if ! test x"$with_openssl" = x"no"; then
AC_DEFINE(__bsd__,1,[bsd specific code in check_dhcp.c])
;;
*linux*)
- AC_DEFINE(__linux__,1,[sun specific code in check_dhcp.c])
+ AC_DEFINE(__linux__,1,[linux specific code in check_dhcp.c])
;;
- *sun* | solaris*)
+ *sun* | *solaris*)
AC_DEFINE(__sun__,1,[sun specific code in check_dhcp.c])
;;
*hpux*)
ACX_FEATURE([with],[mysql])
ACX_FEATURE([with],[openssl])
ACX_FEATURE([with],[gnutls])
+ACX_FEATURE([enable],[extra-opts])
ACX_FEATURE([with],[perl])
ACX_FEATURE([enable],[perl-modules])
ACX_FEATURE([with],[cgiurl])