diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2004-12-23 09:30:55 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2004-12-23 09:30:55 +0000 |
commit | 71eefcd38e76a7e57e1430c45324816de6bde9f0 (patch) | |
tree | 073588bbcb71dae5cb2c86d21fbfe6be4917997d /configure.in | |
parent | 5315de2b9ebb1e8d5dc63da3280ee7990d152a47 (diff) | |
download | monitoring-plugins-71eefcd38e76a7e57e1430c45324816de6bde9f0.tar.gz |
Another attempt at fixing check_http compile on Redhat EL3. Fixed check_icmp
compile (Lynne Lawrence - 1087171) - still some code changes to check_icmp
outstanding. Fixed compile of check_dhcp (complaining about socklen_t).
Added acknowledgements for Coreutils and curl
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1054 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 166 |
1 files changed, 84 insertions, 82 deletions
diff --git a/configure.in b/configure.in index 0cced597..30e42611 100644 --- a/configure.in +++ b/configure.in | |||
@@ -255,87 +255,6 @@ fi | |||
255 | CPPFLAGS="$_SAVEDCPPFLAGS $MYSQLINCLUDE" | 255 | CPPFLAGS="$_SAVEDCPPFLAGS $MYSQLINCLUDE" |
256 | LIBS="$_SAVEDLIBS" | 256 | LIBS="$_SAVEDLIBS" |
257 | 257 | ||
258 | dnl Check for OpenSSL location | ||
259 | AC_PATH_PROG(OPENSSL,openssl) | ||
260 | if test "$OPENSSL" = "/usr/bin/openssl"; then | ||
261 | OPENSSL=/usr | ||
262 | elif test "$OPENSSL" = "/usr/sbin/openssl"; then | ||
263 | OPENSSL=/usr | ||
264 | elif test "$OPENSSL" = "/opt/bin/openssl"; then | ||
265 | OPENSSL=/opt | ||
266 | elif test "$OPENSSL" = "/opt/openssl/bin/openssl"; then | ||
267 | OPENSSL=/opt/openssl | ||
268 | elif test "$OPENSSL" = "/usr/slocal/bin/openssl"; then | ||
269 | OPENSSL=/usr/slocal | ||
270 | elif test "$OPENSSL" = "/usr/local/bin/openssl"; then | ||
271 | OPENSSL=/usr/local | ||
272 | elif test "$OPENSSL" = "/usr/local/ssl/bin/openssl"; then | ||
273 | OPENSSL=/usr/local/ssl | ||
274 | fi | ||
275 | AC_ARG_WITH(openssl, | ||
276 | AC_HELP_STRING([--with-openssl=DIR], [sets path to openssl installation]) | ||
277 | AC_HELP_STRING([--without-openssl], [disable openssl]), | ||
278 | OPENSSL=$withval) | ||
279 | |||
280 | if test X"$OPENSSL" = "Xno"; then | ||
281 | AC_MSG_WARN([openssl disabled, you will not be able to use ssl options in some plugins]) | ||
282 | FOUNDSSL="dontbother" | ||
283 | else | ||
284 | dnl Check for OpenSSL header files | ||
285 | unset FOUNDINCLUDE | ||
286 | _SAVEDCPPFLAGS="$CPPFLAGS" | ||
287 | if test "$OPENSSL" != "/usr"; then | ||
288 | CPPFLAGS="$CPPFLAGS -I$OPENSSL/include" | ||
289 | fi | ||
290 | AC_CHECK_HEADERS(openssl/ssl.h openssl/x509.h openssl/rsa.h openssl/pem.h openssl/crypto.h openssl/err.h, | ||
291 | SSLINCLUDE="-I$OPENSSL/include" | ||
292 | FOUNDINCLUDE=yes, | ||
293 | FOUNDINCLUDE=no) | ||
294 | if test "$FOUNDINCLUDE" = "no"; then | ||
295 | AC_CHECK_HEADERS(ssl.h x509.h rsa.h pem.h crypto.h err.h, | ||
296 | SSLINCLUDE="-I$OPENSSL/include" | ||
297 | FOUNDINCLUDE=yes, | ||
298 | FOUNDINCLUDE=no) | ||
299 | fi | ||
300 | AC_SUBST(SSLINCLUDE) | ||
301 | if test "$FOUNDINCLUDE" = "no"; then | ||
302 | CPPFLAGS="$_SAVEDCPPFLAGS" | ||
303 | fi | ||
304 | |||
305 | dnl Check for crypto lib | ||
306 | _SAVEDLIBS="$LIBS" | ||
307 | AC_CHECK_LIB(crypto,CRYPTO_lock,,,-L$OPENSSL/lib) | ||
308 | if test "$ac_cv_lib_crypto_CRYPTO_lock" = "yes"; then | ||
309 | dnl Check for SSL lib | ||
310 | AC_CHECK_LIB(ssl,main,LDFLAGS="$LDFLAGS -L$OPENSSL/lib" SSLLIBS="-lssl -lcrypto",AC_CHECK_LIB(ssl,main,LDFLAGS="$LDFLAGS -L$OPENSSL/lib" SSLLIBS="-lssl -lcrypto"),-L$OPENSSL/lib -lcrypto) | ||
311 | fi | ||
312 | LIBS="$_SAVEDLIBS" | ||
313 | |||
314 | FOUNDSSL="no" | ||
315 | dnl test headers and libs to decide whether check_http should use SSL | ||
316 | if test "$ac_cv_lib_crypto_CRYPTO_lock" = "yes"; then | ||
317 | if test "$ac_cv_lib_ssl_main" = "yes"; then | ||
318 | if test "$FOUNDINCLUDE" = "yes"; then | ||
319 | FOUNDSSL="yes" | ||
320 | fi | ||
321 | fi | ||
322 | fi | ||
323 | fi | ||
324 | |||
325 | if test "$FOUNDSSL" = "yes"; then | ||
326 | check_tcp_ssl="check_simap check_spop check_jabber check_nntps" | ||
327 | AC_SUBST(check_tcp_ssl) | ||
328 | AC_SUBST(SSLLIBS) | ||
329 | AC_DEFINE(HAVE_SSL,1,[Define if SSL libraries are found]) | ||
330 | with_openssl="yes" | ||
331 | elif test "$FOUNDSSL" = "no"; then | ||
332 | AC_MSG_WARN([OpenSSL libs could not be found]) | ||
333 | with_openssl="no" | ||
334 | else | ||
335 | with_openssl="no" | ||
336 | fi | ||
337 | CPPFLAGS="$_SAVEDCPPFLAGS" | ||
338 | |||
339 | AC_CHECK_HEADERS(unistd.h) | 258 | AC_CHECK_HEADERS(unistd.h) |
340 | 259 | ||
341 | dnl Check for AF_INET6 support - unistd.h required for Darwin | 260 | dnl Check for AF_INET6 support - unistd.h required for Darwin |
@@ -462,6 +381,7 @@ if test x"$enable_emulate_getaddrinfo" != xno ; then | |||
462 | 381 | ||
463 | fi | 382 | fi |
464 | 383 | ||
384 | dnl Checks for Kerberos. Must come before openssl checks for Redhat EL 3 | ||
465 | AC_CHECK_HEADERS(krb5.h,FOUNDINCLUDE=yes,FOUNDINCLUDE=no) | 385 | AC_CHECK_HEADERS(krb5.h,FOUNDINCLUDE=yes,FOUNDINCLUDE=no) |
466 | if test "$FOUNDINCLUDE" = "no"; then | 386 | if test "$FOUNDINCLUDE" = "no"; then |
467 | _SAVEDCPPFLAGS="$CPPFLAGS" | 387 | _SAVEDCPPFLAGS="$CPPFLAGS" |
@@ -477,6 +397,87 @@ if test "$FOUNDINCLUDE" = "no"; then | |||
477 | CPPFLAGS="$_SAVEDCPPFLAGS" | 397 | CPPFLAGS="$_SAVEDCPPFLAGS" |
478 | fi | 398 | fi |
479 | 399 | ||
400 | dnl Check for OpenSSL location | ||
401 | AC_PATH_PROG(OPENSSL,openssl) | ||
402 | if test "$OPENSSL" = "/usr/bin/openssl"; then | ||
403 | OPENSSL=/usr | ||
404 | elif test "$OPENSSL" = "/usr/sbin/openssl"; then | ||
405 | OPENSSL=/usr | ||
406 | elif test "$OPENSSL" = "/opt/bin/openssl"; then | ||
407 | OPENSSL=/opt | ||
408 | elif test "$OPENSSL" = "/opt/openssl/bin/openssl"; then | ||
409 | OPENSSL=/opt/openssl | ||
410 | elif test "$OPENSSL" = "/usr/slocal/bin/openssl"; then | ||
411 | OPENSSL=/usr/slocal | ||
412 | elif test "$OPENSSL" = "/usr/local/bin/openssl"; then | ||
413 | OPENSSL=/usr/local | ||
414 | elif test "$OPENSSL" = "/usr/local/ssl/bin/openssl"; then | ||
415 | OPENSSL=/usr/local/ssl | ||
416 | fi | ||
417 | AC_ARG_WITH(openssl, | ||
418 | AC_HELP_STRING([--with-openssl=DIR], [sets path to openssl installation]) | ||
419 | AC_HELP_STRING([--without-openssl], [disable openssl]), | ||
420 | OPENSSL=$withval) | ||
421 | |||
422 | if test X"$OPENSSL" = "Xno"; then | ||
423 | AC_MSG_WARN([openssl disabled, you will not be able to use ssl options in some plugins]) | ||
424 | FOUNDSSL="dontbother" | ||
425 | else | ||
426 | dnl Check for OpenSSL header files | ||
427 | unset FOUNDINCLUDE | ||
428 | _SAVEDCPPFLAGS="$CPPFLAGS" | ||
429 | if test "$OPENSSL" != "/usr"; then | ||
430 | CPPFLAGS="$CPPFLAGS -I$OPENSSL/include" | ||
431 | fi | ||
432 | AC_CHECK_HEADERS(openssl/ssl.h openssl/x509.h openssl/rsa.h openssl/pem.h openssl/crypto.h openssl/err.h, | ||
433 | SSLINCLUDE="-I$OPENSSL/include" | ||
434 | FOUNDINCLUDE=yes, | ||
435 | FOUNDINCLUDE=no) | ||
436 | if test "$FOUNDINCLUDE" = "no"; then | ||
437 | AC_CHECK_HEADERS(ssl.h x509.h rsa.h pem.h crypto.h err.h, | ||
438 | SSLINCLUDE="-I$OPENSSL/include" | ||
439 | FOUNDINCLUDE=yes, | ||
440 | FOUNDINCLUDE=no) | ||
441 | fi | ||
442 | AC_SUBST(SSLINCLUDE) | ||
443 | if test "$FOUNDINCLUDE" = "no"; then | ||
444 | CPPFLAGS="$_SAVEDCPPFLAGS" | ||
445 | fi | ||
446 | |||
447 | dnl Check for crypto lib | ||
448 | _SAVEDLIBS="$LIBS" | ||
449 | AC_CHECK_LIB(crypto,CRYPTO_lock,,,-L$OPENSSL/lib) | ||
450 | if test "$ac_cv_lib_crypto_CRYPTO_lock" = "yes"; then | ||
451 | dnl Check for SSL lib | ||
452 | AC_CHECK_LIB(ssl,main,LDFLAGS="$LDFLAGS -L$OPENSSL/lib" SSLLIBS="-lssl -lcrypto",AC_CHECK_LIB(ssl,main,LDFLAGS="$LDFLAGS -L$OPENSSL/lib" SSLLIBS="-lssl -lcrypto"),-L$OPENSSL/lib -lcrypto) | ||
453 | fi | ||
454 | LIBS="$_SAVEDLIBS" | ||
455 | |||
456 | FOUNDSSL="no" | ||
457 | dnl test headers and libs to decide whether check_http should use SSL | ||
458 | if test "$ac_cv_lib_crypto_CRYPTO_lock" = "yes"; then | ||
459 | if test "$ac_cv_lib_ssl_main" = "yes"; then | ||
460 | if test "$FOUNDINCLUDE" = "yes"; then | ||
461 | FOUNDSSL="yes" | ||
462 | fi | ||
463 | fi | ||
464 | fi | ||
465 | fi | ||
466 | |||
467 | if test "$FOUNDSSL" = "yes"; then | ||
468 | check_tcp_ssl="check_simap check_spop check_jabber check_nntps" | ||
469 | AC_SUBST(check_tcp_ssl) | ||
470 | AC_SUBST(SSLLIBS) | ||
471 | AC_DEFINE(HAVE_SSL,1,[Define if SSL libraries are found]) | ||
472 | with_openssl="yes" | ||
473 | elif test "$FOUNDSSL" = "no"; then | ||
474 | AC_MSG_WARN([OpenSSL libs could not be found]) | ||
475 | with_openssl="no" | ||
476 | else | ||
477 | with_openssl="no" | ||
478 | fi | ||
479 | CPPFLAGS="$_SAVEDCPPFLAGS" | ||
480 | |||
480 | dnl | 481 | dnl |
481 | dnl Checks for header files. | 482 | dnl Checks for header files. |
482 | dnl | 483 | dnl |
@@ -1455,8 +1456,9 @@ AC_SUBST(DEPLIBS) | |||
1455 | AM_GNU_GETTEXT([no-libtool], [need-ngettext]) | 1456 | AM_GNU_GETTEXT([no-libtool], [need-ngettext]) |
1456 | AM_GNU_GETTEXT_VERSION(0.11.5) | 1457 | AM_GNU_GETTEXT_VERSION(0.11.5) |
1457 | 1458 | ||
1458 | dnl External libraries | 1459 | dnl External libraries - see ACKNOWLEDGEMENTS |
1459 | np_COREUTILS | 1460 | np_COREUTILS |
1461 | np_CURL | ||
1460 | 1462 | ||
1461 | AC_OUTPUT( | 1463 | AC_OUTPUT( |
1462 | Makefile | 1464 | Makefile |