Build system: Fix the CPP flags for the vmware plugin.
authorFlorian Forster <octo@collectd.org>
Fri, 12 Apr 2013 07:17:45 +0000 (09:17 +0200)
committerFlorian Forster <octo@collectd.org>
Fri, 12 Apr 2013 07:17:45 +0000 (09:17 +0200)
configure.in
src/Makefile.am

index a540399..7fe8af8 100644 (file)
@@ -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")
index 72a71fb..175d645 100644 (file)
@@ -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