From e76c030a9675b6bd3d1825e3bc6ab95716a917f7 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Wed, 18 Feb 2009 12:06:18 +0100 Subject: [PATCH] Don't unnecessarily link match_regex against libpcre. Since no plugin currently uses libpcre, configure no longer checks for it and it has been removed from README. --- README | 4 ---- configure.in | 73 --------------------------------------------------------- src/Makefile.am | 4 +--- 3 files changed, 1 insertion(+), 80 deletions(-) diff --git a/README b/README index a6879f05..a6a53544 100644 --- a/README +++ b/README @@ -454,10 +454,6 @@ Prerequisites Used to capture packets by the `dns' plugin. - * libpcre (optional) - Used by the `filter_pcre' plugin. - - * libperl (optional) Obviously used by the `perl' plugin. The library has to be compiled with ithread support (introduced in Perl 5.6.0). diff --git a/configure.in b/configure.in index 9a467d8f..e2d4f8ce 100644 --- a/configure.in +++ b/configure.in @@ -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 diff --git a/src/Makefile.am b/src/Makefile.am index 39e0c416..f81fbbde 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 -- 2.11.0