aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorGravatar Andreas Baumann <mail@andreasbaumann.cc> 2017-05-06 16:36:16 +0200
committerGravatar Sven Nierlein <sven@nierlein.de> 2018-10-22 16:30:31 +0200
commita739a5614834178ba88d04972b4f4ba9c560e1df (patch)
treee9ebee27575d064000e9e210dba2b36c914e8544 /configure.ac
parent28a4c7076a3115d30aeb3b3b5e5bde715692e4a7 (diff)
downloadmonitoring-plugins-a739a5614834178ba88d04972b4f4ba9c560e1df.tar.gz
some rework:
- added old style 'redir' function and options along to a new libcurl internal 'follow' parameter 'curl' - moved picohttpparser to it's own subdirectory - added uriparser to be used instead of the home-grown parser in 'redir'
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac38
1 files changed, 25 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac
index 04ec5bde..c56163c1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -385,19 +385,31 @@ if test "$ac_cv_header_wtsapi32_h" = "yes"; then
AC_SUBST(WTSAPI32LIBS)
fi
-dnl Check for cURL library
-LIBCURL_CHECK_CONFIG(yes, 7.15.2, [
- EXTRAS="$EXTRAS check_curl\$(EXEEXT)"
- LIBCURLINCLUDE="$LIBCURL_CPPFLAGS"
- LIBCURLLIBS="$LIBCURL"
- LIBCURLCFLAGS="$LIBCURL_CPPFLAGS"
- AC_SUBST(LIBCURLINCLUDE)
- AC_SUBST(LIBCURLLIBS)
- AC_SUBST(LIBCURLCFLAGS)
-], [
- AC_MSG_WARN([Skipping curl plugin])
- AC_MSG_WARN([install libcurl libs to compile this plugin (see REQUIREMENTS).])
-])
+AC_ARG_ENABLE(check-curl,
+ AC_HELP_STRING([--enable-check-curl],
+ [Enables compilation of check_curl (default: no)]),
+ [enable_check_curl=$enableval],
+ [enable_check_curl=no])
+if test "$enable_check_curl" = "yes" ; then
+ dnl Check for cURL library
+ LIBCURL_CHECK_CONFIG(yes, 7.15.2, [
+ EXTRAS="$EXTRAS check_curl\$(EXEEXT)"
+ 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_MSG_WARN([Skipping curl plugin])
+ AC_MSG_WARN([install libcurl libs to compile this plugin (see REQUIREMENTS).])
+ ])
+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])])
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"