summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorSven Nierlein <sven@nierlein.de>2018-10-23 09:35:51 +0200
committerSven Nierlein <sven@nierlein.de>2018-10-23 09:35:51 +0200
commitac45ad31c6b45a64bc8592c8e049bab1ff47bd1a (patch)
tree141ab9ad718becfc2cf75fc2198f592cd06bdac3 /configure.ac
parent0958ce4b829652e5b5c74f0496507ec7ec48014b (diff)
downloadmonitoring-plugins-ac45ad31c6b45a64bc8592c8e049bab1ff47bd1a.tar.gz
check_curl: enable by default if all requirements are met
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac40
1 files changed, 15 insertions, 25 deletions
diff --git a/configure.ac b/configure.ac
index 9ac09951..1fccf53d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -385,16 +385,9 @@ if test "$ac_cv_header_wtsapi32_h" = "yes"; then
385 AC_SUBST(WTSAPI32LIBS) 385 AC_SUBST(WTSAPI32LIBS)
386fi 386fi
387 387
388AC_ARG_ENABLE(check-curl, 388_can_enable_check_curl=no
389 AC_HELP_STRING([--enable-check-curl], 389dnl Check for cURL library
390 [Enables compilation of check_curl (default: no)]), 390LIBCURL_CHECK_CONFIG(yes, 7.15.2, [
391 [enable_check_curl=$enableval],
392 [enable_check_curl=no])
393if test "$enable_check_curl" = "yes" ; then
394 _can_enable_check_curl=no
395
396 dnl Check for cURL library
397 LIBCURL_CHECK_CONFIG(yes, 7.15.2, [
398 _can_enable_check_curl=yes 391 _can_enable_check_curl=yes
399 LIBCURLINCLUDE="$LIBCURL_CPPFLAGS" 392 LIBCURLINCLUDE="$LIBCURL_CPPFLAGS"
400 LIBCURLLIBS="$LIBCURL" 393 LIBCURLLIBS="$LIBCURL"
@@ -406,10 +399,10 @@ if test "$enable_check_curl" = "yes" ; then
406 _can_enable_check_curl=no 399 _can_enable_check_curl=no
407 AC_MSG_WARN([Skipping curl plugin]) 400 AC_MSG_WARN([Skipping curl plugin])
408 AC_MSG_WARN([install libcurl libs to compile this plugin (see REQUIREMENTS).]) 401 AC_MSG_WARN([install libcurl libs to compile this plugin (see REQUIREMENTS).])
409 ]) 402])
410 403
411 dnl Check for uriparser library 404dnl Check for uriparser library
412 URIPARSER_CHECK(yes, 0.7.5, [ 405URIPARSER_CHECK(yes, 0.7.5, [
413 _can_enable_check_curl=yes 406 _can_enable_check_curl=yes
414 URIPARSERINCLUDE="$URIPARSER_CPPFLAGS" 407 URIPARSERINCLUDE="$URIPARSER_CPPFLAGS"
415 URIPARSERLIBS="$URIPARSER" 408 URIPARSERLIBS="$URIPARSER"
@@ -421,18 +414,17 @@ if test "$enable_check_curl" = "yes" ; then
421 _can_enable_check_curl=no 414 _can_enable_check_curl=no
422 AC_MSG_WARN([Skipping curl plugin]) 415 AC_MSG_WARN([Skipping curl plugin])
423 AC_MSG_WARN([install the uriparser library to compile this plugin (see REQUIREMENTS).]) 416 AC_MSG_WARN([install the uriparser library to compile this plugin (see REQUIREMENTS).])
424 ]) 417])
425 418
426 dnl prerequisites met, enable the plugin 419dnl prerequisites met, enable the plugin
427 if test x$_can_enable_check_curl = xyes; then 420if test x$_can_enable_check_curl = xyes; then
428 EXTRAS="$EXTRAS check_curl\$(EXEEXT)" 421EXTRAS="$EXTRAS check_curl\$(EXEEXT)"
429 422
430 dnl Enable bundled picohttpparser library (for now) 423dnl Enable bundled picohttpparser library (for now)
431 AC_SUBST(PICOHTTPPARSER_DIR, picohttpparser) 424AC_SUBST(PICOHTTPPARSER_DIR, picohttpparser)
432 fi
433fi 425fi
434AM_CONDITIONAL([WITH_CHECK_CURL], [test "$enable_check_curl" = "yes"]) 426AM_CONDITIONAL([WITH_CHECK_CURL], [test "$_can_enable_check_curl" = "yes"])
435AM_COND_IF([WITH_CHECK_CURL], 427AM_COND_IF([WITH_CHECK_CURL],
436 [AC_CONFIG_FILES([plugins/picohttpparser/Makefile])]) 428 [AC_CONFIG_FILES([plugins/picohttpparser/Makefile])])
437 429
438dnl Fallback to who(1) if the system doesn't provide an utmpx(5) interface 430dnl Fallback to who(1) if the system doesn't provide an utmpx(5) interface
@@ -1932,7 +1924,5 @@ ACX_FEATURE([enable],[perl-modules])
1932ACX_FEATURE([with],[cgiurl]) 1924ACX_FEATURE([with],[cgiurl])
1933ACX_FEATURE([with],[trusted-path]) 1925ACX_FEATURE([with],[trusted-path])
1934ACX_FEATURE([enable],[libtap]) 1926ACX_FEATURE([enable],[libtap])
1935ACX_FEATURE([enable],[check-curl])
1936ACX_FEATURE([with],[libcurl]) 1927ACX_FEATURE([with],[libcurl])
1937ACX_FEATURE([with],[uriparser]) 1928ACX_FEATURE([with],[uriparser])
1938