From: Florian Forster Date: Fri, 12 Apr 2013 07:17:45 +0000 (+0200) Subject: Build system: Fix the CPP flags for the vmware plugin. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=a3ee06fc3901b5f3a440e96690078119ee2bb142;p=collectd.git Build system: Fix the CPP flags for the vmware plugin. --- diff --git a/configure.in b/configure.in index a5403990..7fe8af84 100644 --- a/configure.in +++ b/configure.in @@ -4244,12 +4244,12 @@ fi # }}} # --with-libvmware {{{ -with_libvmware_cflags="" +with_libvmware_cppflags="" AC_ARG_WITH(libvmware, [AS_HELP_STRING([--with-libvmware@<:@=PREFIX@:>@], [Path to libvmware.])], [ if test "x$withval" != "xno" && test "x$withval" != "xyes" then - with_libvmware_cflags="-I$withval" + with_libvmware_cppflags="-I$withval" with_libvmware="yes" else with_libvmware="$withval" @@ -4260,17 +4260,17 @@ AC_ARG_WITH(libvmware, [AS_HELP_STRING([--with-libvmware@<:@=PREFIX@:>@], [Path ]) if test "x$with_libvmware" = "xyes" then - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $with_libvmware_cflags" + SAVE_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $with_libvmware_cppflags" AC_CHECK_HEADERS(vmGuestLib.h, [with_libvmware="yes"], [with_libvmware="no (vmGuestLib.h not found)"]) - CFLAGS="$SAVE_CFLAGS" + CPPFLAGS="$SAVE_CPPFLAGS" fi if test "x$with_libvmware" = "xyes" then - BUILD_WITH_LIBVMWARE_CFLAGS="$with_libvmware_cflags" - AC_SUBST(BUILD_WITH_LIBVMWARE_CFLAGS) + BUILD_WITH_LIBVMWARE_CPPFLAGS="$with_libvmware_cppflags" + AC_SUBST(BUILD_WITH_LIBVMWARE_CPPFLAGS) #AC_DEFINE(HAVE_LIBVMWARE, 1, [Define if libvmware is present and usable.]) fi AM_CONDITIONAL(BUILD_WITH_LIBVMWARE, test "x$with_libvmware" = "xyes") diff --git a/src/Makefile.am b/src/Makefile.am index 72a71fbc..175d6459 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1293,8 +1293,7 @@ if BUILD_PLUGIN_VMWARE pkglib_LTLIBRARIES += vmware.la vmware_la_SOURCES = vmware.c vmware_la_LDFLAGS = -module -avoid-version -vmware_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS) -I/usr/lib/vmware-tools/GuestSDK -vmware_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS) +vmware_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBVMWARE_CPPFLAGS) collectd_LDADD += "-dlopen" vmware.la collectd_DEPENDENCIES += vmware.la endif