]> git.ipfire.org Git - people/ms/suricata.git/commitdiff
configure: use pkg_config for libhtp
authorEric Leblond <eric@regit.org>
Mon, 14 Sep 2015 08:55:04 +0000 (10:55 +0200)
committerEric Leblond <eric@regit.org>
Mon, 14 Sep 2015 11:11:27 +0000 (13:11 +0200)
It was not possible to simply specify PKG_CONFIG_PATH to build
with an non bundled libhtp. With this patch we don't need anymore
the htp lib and include configure options.

configure.ac

index ea819f4a80323d7fe8180612f0a43e3717efd761..ab2df12bc6422907d3ebe034f5b90ce42d9f3e22 100644 (file)
     AC_ARG_ENABLE(non-bundled-htp,
            AS_HELP_STRING([--enable-non-bundled-htp], [Enable the use of an already installed version of htp]),,[enable_non_bundled_htp=no])
     AS_IF([test "x$enable_non_bundled_htp" = "xyes"], [
+        PKG_CHECK_MODULES([libhtp], htp,, [with_pkgconfig_htp=no])
+        if test "$with_pkgconfig_htp" != "no"; then
+            CPPFLAGS="${CPPFLAGS} ${libhtp_CFLAGS}"
+            LIBS="${LIBS} ${libhtp_LIBS}"
+        fi
+
         AC_ARG_WITH(libhtp_includes,
                 [  --with-libhtp-includes=DIR  libhtp include directory],
                 [with_libhtp_includes="$withval"],[with_libhtp_includes=no])