diff options
author | M. Sean Finney <seanius@users.sourceforge.net> | 2005-10-18 22:35:29 +0000 |
---|---|---|
committer | M. Sean Finney <seanius@users.sourceforge.net> | 2005-10-18 22:35:29 +0000 |
commit | 8611341fb989382545c0c934c700e027d9bbab15 (patch) | |
tree | f80a127bde75a42f3ba8071702bac6005b9ae2ef /configure.in | |
parent | f4a198463ced6bb3ad8779a10146c88b91385fd2 (diff) | |
download | monitoring-plugins-8611341fb989382545c0c934c700e027d9bbab15.tar.gz |
initial "experimental" support for gnutls. by default openssl is still
used if available, and gnutls is only used if openssl is not available
or explicitly disabled (--without-openssl). currently the only plugin
i've verified to work is check_tcp, but i had to disable cert checking.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1254 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/configure.in b/configure.in index 86cb99fa..7ae486ce 100644 --- a/configure.in +++ b/configure.in | |||
@@ -103,6 +103,7 @@ dnl Checks for programs. | |||
103 | AC_PATH_PROG(PYTHON,python) | 103 | AC_PATH_PROG(PYTHON,python) |
104 | AC_PATH_PROG(SH,sh) | 104 | AC_PATH_PROG(SH,sh) |
105 | AC_PATH_PROG(PERL,perl) | 105 | AC_PATH_PROG(PERL,perl) |
106 | AC_PATH_PROG(LIBGNUTLS_CONFIG,libgnutls-config) | ||
106 | 107 | ||
107 | dnl allow them to override the path of perl | 108 | dnl allow them to override the path of perl |
108 | AC_ARG_WITH(perl, | 109 | AC_ARG_WITH(perl, |
@@ -111,6 +112,12 @@ AC_ARG_WITH(perl, | |||
111 | with_perl=$withval,with_perl=$PERL) | 112 | with_perl=$withval,with_perl=$PERL) |
112 | AC_SUBST(PERL, $with_perl) | 113 | AC_SUBST(PERL, $with_perl) |
113 | 114 | ||
115 | dnl allow for gnutls, if it exists, instead of openssl | ||
116 | AC_ARG_WITH(gnutls, | ||
117 | ACX_HELP_STRING([--with-gnutls=PATH], | ||
118 | [path to gnutls installation root]), | ||
119 | GNUTLS=$withval) | ||
120 | |||
114 | AC_PATH_PROG(HOSTNAME,hostname) | 121 | AC_PATH_PROG(HOSTNAME,hostname) |
115 | AC_PATH_PROG(BASENAME,basename) | 122 | AC_PATH_PROG(BASENAME,basename) |
116 | 123 | ||
@@ -409,6 +416,7 @@ if test "$FOUNDINCLUDE" = "no"; then | |||
409 | CPPFLAGS="$_SAVEDCPPFLAGS" | 416 | CPPFLAGS="$_SAVEDCPPFLAGS" |
410 | fi | 417 | fi |
411 | 418 | ||
419 | |||
412 | dnl Check for OpenSSL location | 420 | dnl Check for OpenSSL location |
413 | AC_PATH_PROG(OPENSSL,openssl) | 421 | AC_PATH_PROG(OPENSSL,openssl) |
414 | if test "$OPENSSL" = "/usr/bin/openssl"; then | 422 | if test "$OPENSSL" = "/usr/bin/openssl"; then |
@@ -478,18 +486,43 @@ else | |||
478 | fi | 486 | fi |
479 | fi | 487 | fi |
480 | 488 | ||
489 | dnl check for gnutls if openssl isn't found (or is disabled) | ||
490 | FOUNDGNUTLS="no" | ||
491 | if ! test "$FOUNDSSL" = "yes"; then | ||
492 | if test "$GNUTLS" = ""; then | ||
493 | CPPFLAGS="$CPPFLAGS -I$GNUTLS" | ||
494 | elif ! test "$LIBGNUTLS_CONFIG" = ""; then | ||
495 | CPPFLAGS="$CPPFLAGS -I`$LIBGNUTLS_CONFIG --prefix`" | ||
496 | fi | ||
497 | AC_CHECK_HEADERS([gnutls/openssl.h],FOUNDGNUTLS="yes",) | ||
498 | if test "$FOUNDGNUTLS" = "yes"; then | ||
499 | AC_CHECK_LIB(gnutls-openssl,main,SSLLIBS="-lgnutls-openssl") | ||
500 | FOUNDSSL="yes" | ||
501 | fi | ||
502 | fi | ||
503 | dnl end check for gnutls | ||
504 | |||
481 | if test "$FOUNDSSL" = "yes"; then | 505 | if test "$FOUNDSSL" = "yes"; then |
482 | check_tcp_ssl="check_simap check_spop check_jabber check_nntps check_ssmtp" | 506 | check_tcp_ssl="check_simap check_spop check_jabber check_nntps check_ssmtp" |
483 | AC_SUBST(check_tcp_ssl) | 507 | AC_SUBST(check_tcp_ssl) |
484 | AC_SUBST(SSLLIBS) | 508 | AC_SUBST(SSLLIBS) |
485 | AC_DEFINE(HAVE_SSL,1,[Define if SSL libraries are found]) | 509 | AC_DEFINE(HAVE_SSL,1,[Define if SSL libraries are found]) |
486 | with_openssl="yes" | 510 | if test "$FOUNDGNUTLS" = "no"; then |
511 | AC_DEFINE(USE_OPENSSL,1,[Define if using OpenSSL libraries]) | ||
512 | with_openssl="yes" | ||
513 | with_gnutls="no" | ||
514 | else | ||
515 | AC_DEFINE(USE_GNUTLS,1,[Define if using gnutls libraries]) | ||
516 | with_gnutls="yes" | ||
517 | with_openssl="no" | ||
518 | fi | ||
487 | else | 519 | else |
488 | if test "$FOUNDSSL" = "no"; then | 520 | if test "$FOUNDSSL" = "no"; then |
489 | AC_MSG_WARN([OpenSSL libs could not be found]) | 521 | AC_MSG_WARN([OpenSSL libs could not be found]) |
490 | dnl else deliberately disabled | 522 | dnl else deliberately disabled |
491 | fi | 523 | fi |
492 | with_openssl="no" | 524 | with_openssl="no" |
525 | with_gnutls="no" | ||
493 | CPPFLAGS="$_SAVEDCPPFLAGS" | 526 | CPPFLAGS="$_SAVEDCPPFLAGS" |
494 | LDFLAGS="$_SAVEDLDFLAGS" | 527 | LDFLAGS="$_SAVEDLDFLAGS" |
495 | fi | 528 | fi |
@@ -1597,4 +1630,5 @@ ACX_FEATURE([with],[ping6-command]) | |||
1597 | ACX_FEATURE([with],[lwres]) | 1630 | ACX_FEATURE([with],[lwres]) |
1598 | ACX_FEATURE([with],[ipv6]) | 1631 | ACX_FEATURE([with],[ipv6]) |
1599 | ACX_FEATURE([with],[openssl]) | 1632 | ACX_FEATURE([with],[openssl]) |
1633 | ACX_FEATURE([with],[gnutls]) | ||
1600 | ACX_FEATURE([enable],[emulate-getaddrinfo]) | 1634 | ACX_FEATURE([enable],[emulate-getaddrinfo]) |