diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2018-06-01 11:14:05 +0200 |
---|---|---|
committer | Sven Nierlein <sven@nierlein.de> | 2018-10-22 16:30:31 +0200 |
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 2291c51b..9ac09951 100644 --- a/configure.ac +++ b/configure.ac @@ -391,25 +391,49 @@ AC_ARG_ENABLE(check-curl, [enable_check_curl=$enableval], [enable_check_curl=no]) if test "$enable_check_curl" = "yes" ; then + _can_enable_check_curl=no + dnl Check for cURL library LIBCURL_CHECK_CONFIG(yes, 7.15.2, [ - EXTRAS="$EXTRAS check_curl\$(EXEEXT)" + _can_enable_check_curl=yes LIBCURLINCLUDE="$LIBCURL_CPPFLAGS" LIBCURLLIBS="$LIBCURL" LIBCURLCFLAGS="$LIBCURL_CPPFLAGS" AC_SUBST(LIBCURLINCLUDE) AC_SUBST(LIBCURLLIBS) - AC_SUBST(LIBCURLCFLAGS) - AC_SUBST(PICOHTTPPARSER_DIR, picohttpparser) - AC_SUBST(URIPARSER_DIR, uriparser) + AC_SUBST(LIBCURLCFLAGS) ], [ + _can_enable_check_curl=no AC_MSG_WARN([Skipping curl plugin]) AC_MSG_WARN([install libcurl libs to compile this plugin (see REQUIREMENTS).]) ]) + + dnl Check for uriparser library + URIPARSER_CHECK(yes, 0.7.5, [ + _can_enable_check_curl=yes + URIPARSERINCLUDE="$URIPARSER_CPPFLAGS" + URIPARSERLIBS="$URIPARSER" + URIPARSERCFLAGS="$URIPARSER_CPPFLAGS" + AC_SUBST(URIPARSERINCLUDE) + AC_SUBST(URIPARSERLIBS) + AC_SUBST(URIPARSERCFLAGS) + ], [ + _can_enable_check_curl=no + AC_MSG_WARN([Skipping curl plugin]) + AC_MSG_WARN([install the uriparser library to compile this plugin (see REQUIREMENTS).]) + ]) + + dnl prerequisites met, enable the plugin + if test x$_can_enable_check_curl = xyes; then + EXTRAS="$EXTRAS check_curl\$(EXEEXT)" + + dnl Enable bundled picohttpparser library (for now) + AC_SUBST(PICOHTTPPARSER_DIR, picohttpparser) + fi fi AM_CONDITIONAL([WITH_CHECK_CURL], [test "$enable_check_curl" = "yes"]) AM_COND_IF([WITH_CHECK_CURL], - [AC_CONFIG_FILES([plugins/picohttpparser/Makefile plugins/uriparser/Makefile])]) + [AC_CONFIG_FILES([plugins/picohttpparser/Makefile])]) dnl Fallback to who(1) if the system doesn't provide an utmpx(5) interface if test "$ac_cv_header_utmpx_h" = "no" -a "$ac_cv_header_wtsapi32_h" = "no" @@ -1910,4 +1934,5 @@ ACX_FEATURE([with],[trusted-path]) ACX_FEATURE([enable],[libtap]) ACX_FEATURE([enable],[check-curl]) ACX_FEATURE([with],[libcurl]) +ACX_FEATURE([with],[uriparser]) |