diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2018-06-01 09:14:05 (GMT) |
---|---|---|
committer | Sven Nierlein <sven@nierlein.de> | 2018-10-22 14:30:31 (GMT) |
commit | d6491ba403d37abf54e56c96fb5c7b808943b5d3 (patch) | |
tree | ab7f5da00831e146ef71b55a47b14ba43cdcec6b /configure.ac | |
parent | 46c5b54254026a170006cdcdbe1ffe38771274cb (diff) | |
download | monitoring-plugins-d6491ba403d37abf54e56c96fb5c7b808943b5d3.tar.gz |
removed embedded uriparser library, added --with-uriparser configure option
to use uriparser library from the system
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index 2291c51..9ac0995 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -391,25 +391,49 @@ AC_ARG_ENABLE(check-curl, | |||
391 | [enable_check_curl=$enableval], | 391 | [enable_check_curl=$enableval], |
392 | [enable_check_curl=no]) | 392 | [enable_check_curl=no]) |
393 | if test "$enable_check_curl" = "yes" ; then | 393 | if test "$enable_check_curl" = "yes" ; then |
394 | _can_enable_check_curl=no | ||
395 | |||
394 | dnl Check for cURL library | 396 | dnl Check for cURL library |
395 | LIBCURL_CHECK_CONFIG(yes, 7.15.2, [ | 397 | LIBCURL_CHECK_CONFIG(yes, 7.15.2, [ |
396 | EXTRAS="$EXTRAS check_curl\$(EXEEXT)" | 398 | _can_enable_check_curl=yes |
397 | LIBCURLINCLUDE="$LIBCURL_CPPFLAGS" | 399 | LIBCURLINCLUDE="$LIBCURL_CPPFLAGS" |
398 | LIBCURLLIBS="$LIBCURL" | 400 | LIBCURLLIBS="$LIBCURL" |
399 | LIBCURLCFLAGS="$LIBCURL_CPPFLAGS" | 401 | LIBCURLCFLAGS="$LIBCURL_CPPFLAGS" |
400 | AC_SUBST(LIBCURLINCLUDE) | 402 | AC_SUBST(LIBCURLINCLUDE) |
401 | AC_SUBST(LIBCURLLIBS) | 403 | AC_SUBST(LIBCURLLIBS) |
402 | AC_SUBST(LIBCURLCFLAGS) | 404 | AC_SUBST(LIBCURLCFLAGS) |
403 | AC_SUBST(PICOHTTPPARSER_DIR, picohttpparser) | ||
404 | AC_SUBST(URIPARSER_DIR, uriparser) | ||
405 | ], [ | 405 | ], [ |
406 | _can_enable_check_curl=no | ||
406 | AC_MSG_WARN([Skipping curl plugin]) | 407 | AC_MSG_WARN([Skipping curl plugin]) |
407 | AC_MSG_WARN([install libcurl libs to compile this plugin (see REQUIREMENTS).]) | 408 | AC_MSG_WARN([install libcurl libs to compile this plugin (see REQUIREMENTS).]) |
408 | ]) | 409 | ]) |
410 | |||
411 | dnl Check for uriparser library | ||
412 | URIPARSER_CHECK(yes, 0.7.5, [ | ||
413 | _can_enable_check_curl=yes | ||
414 | URIPARSERINCLUDE="$URIPARSER_CPPFLAGS" | ||
415 | URIPARSERLIBS="$URIPARSER" | ||
416 | URIPARSERCFLAGS="$URIPARSER_CPPFLAGS" | ||
417 | AC_SUBST(URIPARSERINCLUDE) | ||
418 | AC_SUBST(URIPARSERLIBS) | ||
419 | AC_SUBST(URIPARSERCFLAGS) | ||
420 | ], [ | ||
421 | _can_enable_check_curl=no | ||
422 | AC_MSG_WARN([Skipping curl plugin]) | ||
423 | AC_MSG_WARN([install the uriparser library to compile this plugin (see REQUIREMENTS).]) | ||
424 | ]) | ||
425 | |||
426 | dnl prerequisites met, enable the plugin | ||
427 | if test x$_can_enable_check_curl = xyes; then | ||
428 | EXTRAS="$EXTRAS check_curl\$(EXEEXT)" | ||
429 | |||
430 | dnl Enable bundled picohttpparser library (for now) | ||
431 | AC_SUBST(PICOHTTPPARSER_DIR, picohttpparser) | ||
432 | fi | ||
409 | fi | 433 | fi |
410 | AM_CONDITIONAL([WITH_CHECK_CURL], [test "$enable_check_curl" = "yes"]) | 434 | AM_CONDITIONAL([WITH_CHECK_CURL], [test "$enable_check_curl" = "yes"]) |
411 | AM_COND_IF([WITH_CHECK_CURL], | 435 | AM_COND_IF([WITH_CHECK_CURL], |
412 | [AC_CONFIG_FILES([plugins/picohttpparser/Makefile plugins/uriparser/Makefile])]) | 436 | [AC_CONFIG_FILES([plugins/picohttpparser/Makefile])]) |
413 | 437 | ||
414 | dnl Fallback to who(1) if the system doesn't provide an utmpx(5) interface | 438 | dnl Fallback to who(1) if the system doesn't provide an utmpx(5) interface |
415 | if test "$ac_cv_header_utmpx_h" = "no" -a "$ac_cv_header_wtsapi32_h" = "no" | 439 | if test "$ac_cv_header_utmpx_h" = "no" -a "$ac_cv_header_wtsapi32_h" = "no" |
@@ -1910,4 +1934,5 @@ ACX_FEATURE([with],[trusted-path]) | |||
1910 | ACX_FEATURE([enable],[libtap]) | 1934 | ACX_FEATURE([enable],[libtap]) |
1911 | ACX_FEATURE([enable],[check-curl]) | 1935 | ACX_FEATURE([enable],[check-curl]) |
1912 | ACX_FEATURE([with],[libcurl]) | 1936 | ACX_FEATURE([with],[libcurl]) |
1937 | ACX_FEATURE([with],[uriparser]) | ||
1913 | 1938 | ||