[monitoring-plugins] check_curl: do not use pkg-config if ...

Sven Nierlein git at monitoring-plugins.org
Tue Oct 23 11:10:17 CEST 2018


 Module: monitoring-plugins
 Branch: feature_check_curl
 Commit: 70888d0f880362a8c8671df93d55428b144dbce1
 Author: Sven Nierlein <sven at nierlein.de>
   Date: Tue Oct 23 10:56:05 2018 +0200
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=70888d0

check_curl: do not use pkg-config if --with-uriparser was supplied by commandline

if we run configure with --with-uriparser=... it should use that path or fail.

---

 m4/uriparser.m4 | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/m4/uriparser.m4 b/m4/uriparser.m4
index dc40473..c77f764 100644
--- a/m4/uriparser.m4
+++ b/m4/uriparser.m4
@@ -29,14 +29,13 @@ AC_DEFUN([URIPARSER_CHECK],
 
      _uriparser_try_link=yes
 
+     AC_CHECK_PROG(PKGCONFIG,pkg-config,pkg-config,no)
+
      if test -d "$_uriparser_with" ; then
         URIPARSER_CPPFLAGS="-I$withval/include"
         _uriparser_ldflags="-L$withval/lib"
-     fi
 
-     AC_CHECK_PROG(PKGCONFIG,pkg-config,pkg-config,no)
-
-     if test x$PKGCONFIG != xno; then
+     elif test x$PKGCONFIG != xno; then
 
         AC_CACHE_CHECK([for the version of uriparser],
            [uriparser_cv_uriparser_version],
@@ -83,7 +82,7 @@ AC_DEFUN([URIPARSER_CHECK],
 
         # we didn't find curl-config, so let's see if the user-supplied
         # link line (or failing that, "-luriparser") is enough.
-        URIPARSERLIBS=${URIPARSERLIBS-"$_uriparser_ldflags -luriparser"}
+        URIPARSER=${URIPARSER-"$_uriparser_ldflags -luriparser"}
 
         AC_CACHE_CHECK([whether uriparser is usable],
            [uriparser_cv_lib_uriparser_usable],
@@ -137,5 +136,3 @@ if (x == URI_SUCCESS) {;}
 
   unset _uriparser_with
 ])dnl
-
-



More information about the Commits mailing list