Merge branch 'collectd-4.8'
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Thu, 17 Sep 2009 06:53:05 +0000 (08:53 +0200)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Thu, 17 Sep 2009 06:53:05 +0000 (08:53 +0200)
1  2 
configure.in
src/Makefile.am

diff --combined configure.in
@@@ -1448,8 -1448,8 +1448,8 @@@ AC_ARG_WITH(libiptc, [AS_HELP_STRING([-
                with_libiptc="yes"
        else if test "x$withval" != "xno" && test "x$withval" != "xyes"
        then
-               LDFLAGS="$LDFLAGS -L$withval/lib"
-               CPPFLAGS="$CPPFLAGS -I$withval/include"
+               LIBIPTC_CPPFLAGS="$LIBIPTC_CPPFLAGS -I$withval/include"
+               LIBIPTC_LDFLAGS="$LIBIPTC_LDFLAGS -L$withval/lib"
                with_libiptc="yes"
        else
                with_libiptc="$withval"
@@@ -1487,8 -1487,8 +1487,8 @@@ the
  fi
  if test "x$with_libiptc" = "xyes"
  then
-       SAVE_CFLAGS="$CFLAGS"
-       CFLAGS="$CFLAGS $KERNEL_CFLAGS"
+       SAVE_CPPFLAGS="$CPPFLAGS"
+       CPPFLAGS="$CPPFLAGS $LIBIPTC_CPPFLAGS"
  
        AC_CHECK_HEADERS(linux/netfilter_ipv4/ip_tables.h linux/netfilter_ipv6/ip6_tables.h, [],
        [
  #include "$srcdir/src/owniptc/ipt_kernel_headers.h"
        ])
  
-       CFLAGS="$SAVE_CFLAGS"
- fi
- AM_CONDITIONAL(BUILD_WITH_LIBIPTC, test "x$with_libiptc" = "xyes")
- AM_CONDITIONAL(BUILD_WITH_OWN_LIBIPTC, test "x$with_own_libiptc" = "xyes")
- if test "x$with_own_libiptc" = "xyes"
- then
-       AC_DEFINE(OWN_LIBIPTC, 1, [Define to 1 if we use the shipped iptc library.])
+       CPPFLAGS="$SAVE_CPPFLAGS"
  fi
  if test "x$with_libiptc" = "xyes"
  then
-       SAVE_CFLAGS="$CFLAGS"
-       CFLAGS="$CFLAGS $KERNEL_CFLAGS"
+       SAVE_CPPFLAGS="$CPPFLAGS"
+       CPPFLAGS="$CPPFLAGS $LIBIPTC_CPPFLAGS"
  
        AC_CHECK_TYPES([iptc_handle_t, ip6tc_handle_t], [], [],
        [
  #endif
        ])
  
-       CFLAGS="$SAVE_CFLAGS"
+       CPPFLAGS="$SAVE_CPPFLAGS"
+ fi
+ AM_CONDITIONAL(BUILD_WITH_LIBIPTC, test "x$with_libiptc" = "xyes")
+ AM_CONDITIONAL(BUILD_WITH_OWN_LIBIPTC, test "x$with_own_libiptc" = "xyes")
+ if test "x$with_libiptc" = "xyes"
+ then
+       BUILD_WITH_LIBIPTC_CPPFLAGS="$LIBIPTC_CPPFLAGS"
+       BUILD_WITH_LIBIPTC_LDFLAGS="$LIBIPTC_LDFLAGS"
+       AC_SUBST(BUILD_WITH_LIBIPTC_CPPFLAGS)
+       AC_SUBST(BUILD_WITH_LIBIPTC_LDFLAGS)
+ fi
+ if test "x$with_own_libiptc" = "xyes"
+ then
+       AC_DEFINE(OWN_LIBIPTC, 1, [Define to 1 if we use the shipped iptc library.])
  fi
  # }}}
  
@@@ -3796,7 -3803,6 +3803,7 @@@ AC_PLUGIN([tail],        [yes]
  AC_PLUGIN([tape],        [$plugin_tape],       [Tape drive statistics])
  AC_PLUGIN([target_notification], [yes],        [The notification target])
  AC_PLUGIN([target_replace], [yes],             [The replace target])
 +AC_PLUGIN([target_scale],[yes],                [The scale target])
  AC_PLUGIN([target_set],  [yes],                [The set target])
  AC_PLUGIN([tcpconns],    [$plugin_tcpconns],   [TCP connection statistics])
  AC_PLUGIN([teamspeak2],  [yes],                [TeamSpeak2 server statistics])
@@@ -4097,7 -4103,6 +4104,7 @@@ Configuration
      tape  . . . . . . . . $enable_tape
      target_notification . $enable_target_notification
      target_replace  . . . $enable_target_replace
 +    target_scale  . . . . $enable_target_scale
      target_set  . . . . . $enable_target_set
      tcpconns  . . . . . . $enable_tcpconns
      teamspeak2  . . . . . $enable_teamspeak2
diff --combined src/Makefile.am
@@@ -371,7 -371,8 +371,8 @@@ endif # BUILD_PLUGIN_INTERFAC
  if BUILD_PLUGIN_IPTABLES
  pkglib_LTLIBRARIES += iptables.la
  iptables_la_SOURCES = iptables.c
- iptables_la_LDFLAGS = -module -avoid-version
+ iptables_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBIPTC_CPPFLAGS)
+ iptables_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBIPTC_LDFLAGS)
  if BUILD_WITH_OWN_LIBIPTC
  iptables_la_LIBADD  = owniptc/libiptc.la
  iptables_la_DEPENDENCIES = owniptc/libiptc.la
@@@ -910,14 -911,6 +911,14 @@@ collectd_LDADD += "-dlopen" target_repl
  collectd_DEPENDENCIES += target_replace.la
  endif
  
 +if BUILD_PLUGIN_TARGET_SCALE
 +pkglib_LTLIBRARIES += target_scale.la
 +target_scale_la_SOURCES = target_scale.c
 +target_scale_la_LDFLAGS = -module -avoid-version
 +collectd_LDADD += "-dlopen" target_scale.la
 +collectd_DEPENDENCIES += target_scale.la
 +endif
 +
  if BUILD_PLUGIN_TARGET_SET
  pkglib_LTLIBRARIES += target_set.la
  target_set_la_SOURCES = target_set.c