Don't unnecessarily link match_regex against libpcre.
authorSebastian Harl <sh@tokkee.org>
Wed, 18 Feb 2009 11:06:18 +0000 (12:06 +0100)
committerSebastian Harl <sh@tokkee.org>
Wed, 18 Feb 2009 11:06:18 +0000 (12:06 +0100)
Since no plugin currently uses libpcre, configure no longer checks for it and
it has been removed from README.

README
configure.in
src/Makefile.am

diff --git a/README b/README
index a6879f0..a6a5354 100644 (file)
--- a/README
+++ b/README
@@ -454,10 +454,6 @@ Prerequisites
     Used to capture packets by the `dns' plugin.
     <http://www.tcpdump.org/>
 
-  * libpcre (optional)
-    Used by the `filter_pcre' plugin.
-    <http://www.pcre.org/>
-
   * libperl (optional)
     Obviously used by the `perl' plugin. The library has to be compiled with
     ithread support (introduced in Perl 5.6.0).
index 9a467d8..e2d4f8c 100644 (file)
@@ -1763,78 +1763,6 @@ AC_DEFINE_UNQUOTED(COLLECT_LIBPCAP, [$collect_libpcap],
 AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes")
 # }}}
 
-# --with-libpcre {{{
-with_pcre_config="pcre-config"
-with_pcre_cflags=""
-with_pcre_libs=""
-AC_ARG_WITH(libpcre, [AS_HELP_STRING([--with-libpcre@<:@=PREFIX@:>@],
-       [Path to libpcre.])],
-       [
-               if test "x$withval" = "xno"
-               then
-                       with_libpcre="no"
-               else if test "x$withval" = "xyes"
-               then
-                       with_libpcre="yes"
-               else
-                       if test -f "$withval" && test -x "$withval"
-                       then
-                               with_pcre_config="$withval"
-                       else if test -x "$withval/bin/pcre-config"
-                       then
-                               with_pcre_config="$withval/bin/pcre-config"
-                       fi; fi
-                       with_libpcre="yes"
-               fi; fi
-       ],
-       [
-               with_libpcre="yes"
-       ])
-
-if test "x$with_libpcre" = "xyes"
-then
-       with_pcre_cflags=`$with_pcre_config --cflags 2>/dev/null`
-       pcre_config_status=$?
-
-       if test $pcre_config_status -ne 0
-       then
-               with_libpcre="no ($with_pcre_config failed)"
-       else
-               SAVE_CPPFLAGS="$CPPFLAGS"
-               CPPFLAGS="$CPPFLAGS $with_pcre_cflags"
-
-               AC_CHECK_HEADERS(pcre.h, [], [with_libpcre="no (pcre.h not found)"], [])
-
-               CPPFLAGS="$SAVE_CPPFLAGS"
-       fi
-fi
-
-if test "x$with_libpcre" = "xyes"
-then
-       with_pcre_libs=`$with_pcre_config --libs 2>/dev/null`
-       pcre_config_status=$?
-
-       if test $pcre_config_status -ne 0
-       then
-               with_libpcre="no ($with_pcre_config failed)"
-       else
-               AC_CHECK_LIB(pcre, pcre_compile,
-                       [with_libpcre="yes"],
-                       [with_libpcre="no (symbol 'pcre_compile' not found)"],
-                       [$with_pcre_libs])
-       fi
-fi
-
-if test "x$with_libpcre" = "xyes"
-then
-       BUILD_WITH_LIBPCRE_CFLAGS="$with_pcre_cflags"
-       BUILD_WITH_LIBPCRE_LIBS="$with_pcre_libs"
-       AC_SUBST(BUILD_WITH_LIBPCRE_CFLAGS)
-       AC_SUBST(BUILD_WITH_LIBPCRE_LIBS)
-fi
-AM_CONDITIONAL(BUILD_WITH_LIBPCRE, test "x$with_libpcre" = "xyes")
-# }}}
-
 # --with-libperl {{{
 perl_interpreter="perl"
 AC_ARG_WITH(libperl, [AS_HELP_STRING([--with-libperl@<:@=PREFIX@:>@], [Path to libperl.])],
@@ -3289,7 +3217,6 @@ Configuration:
     libopenipmi . . . . . $with_libopenipmipthread
     liboping  . . . . . . $with_liboping
     libpcap . . . . . . . $with_libpcap
-    libpcre . . . . . . . $with_libpcre
     libperl . . . . . . . $with_libperl
     libpq . . . . . . . . $with_libpq
     libpthread  . . . . . $with_libpthread
index 39e0c41..f81fbbd 100644 (file)
@@ -414,9 +414,7 @@ endif
 if BUILD_PLUGIN_MATCH_REGEX
 pkglib_LTLIBRARIES += match_regex.la
 match_regex_la_SOURCES = match_regex.c
-match_regex_la_CPPFLAGS = $(BUILD_WITH_LIBPCRE_CFLAGS)
-match_regex_la_LDFLAGS = -module -avoid-version \
-               $(BUILD_WITH_LIBPCRE_LIBS)
+match_regex_la_LDFLAGS = -module -avoid-version
 collectd_LDADD += "-dlopen" match_regex.la
 collectd_DEPENDENCIES += match_regex.la
 endif