Code

here's some bits to fix CFLAGS to CPPFLAGS
authorDavid Brown <david.brown@pnl.gov>
Mon, 6 May 2013 23:02:19 +0000 (16:02 -0700)
committerFlorian Forster <octo@collectd.org>
Sat, 11 May 2013 07:14:22 +0000 (09:14 +0200)
configure.in
src/Makefile.am

index b7ff84981d73f89860f80983f3148e874af7e6b3..2c9ee3974f44a254f1bf03ce1117185df39a864e 100644 (file)
@@ -4178,17 +4178,17 @@ AC_ARG_WITH(mic,[AS_HELP_STRING([--with-mic@<:@=PREFIX@:>@], [Path to Intel MIC
 [with_mic="yes"])
 if test "x$with_mic" = "xyes"
 then
-       SAVE_CFLAGS="$CFLAGS"
-       CFLAGS="$CFLAGS $with_mic_cflags"
+       SAVE_CPPFLAGS="$CPPFLAGS"
+       CPPFLAGS="$CPPFLAGS $with_mic_cflags"
        AC_CHECK_HEADERS(MicAccessApi.h,[],[with_mic="no (MicAccessApi not found)"])
-       CFLAGS="$SAVE_CFLAGS"
+       CPPFLAGS="$SAVE_CPPFLAGS"
 fi
 if test "x$with_mic" = "xyes"
 then
-       SAVE_CFLAGS="$CFLAGS"
+       SAVE_CPPFLAGS="$CPPFLAGS"
        SAVE_LDFLAGS="$LDFLAGS"
 
-       CFLAGS="$CFLAGS $with_mic_cflags"
+       CPPFLAGS="$CPPFLAGS $with_mic_cflags"
        LDFLAGS="$LDFLAGS $with_mic_ldpath"
 
        AC_CHECK_LIB(MicAccessSDK, MicInitAPI,
@@ -4196,16 +4196,16 @@ then
                          with_mic_libs="-lMicAccessSDK -lscif -lpthread"],
                     [with_mic="no (symbol MicInitAPI not found)"],[-lscif -lpthread])
 
-       CFLAGS="$SAVE_CFLAGS"
+       CPPFLAGS="$SAVE_CPPFLAGS"
        LDFLAGS="$SAVE_LDFLAGS"
 fi
 
 if test "x$with_mic" = "xyes"
 then
-       BUILD_WITH_MIC_CFLAGS="$with_mic_cflags"
+       BUILD_WITH_MIC_CPPFLAGS="$with_mic_cflags"
        BUILD_WITH_MIC_LIBPATH="$with_mic_ldpath"
        BUILD_WITH_MIC_LDADD="$with_mic_libs"
-       AC_SUBST(BUILD_WITH_MIC_CFLAGS)
+       AC_SUBST(BUILD_WITH_MIC_CPPFLAGS)
        AC_SUBST(BUILD_WITH_MIC_LIBPATH)
        AC_SUBST(BUILD_WITH_MIC_LDADD)
 fi
index e0c1929c5517a29c7f7455cc9355abdcf3d29d06..5030267070156cda6c35f1aef64001690df2e2aa 100644 (file)
@@ -1275,7 +1275,7 @@ if BUILD_PLUGIN_MIC
 pkglib_LTLIBRARIES += mic.la
 mic_la_SOURCES = mic.c
 mic_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_MIC_LIBPATH)
-mic_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_MIC_CFLAGS)
+mic_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_MIC_CPPFLAGS)
 mic_la_LIBADD = $(BUILD_WITH_MIC_LDADD)
 collectd_LDADD += "-dlopen" mic.la
 collectd_DEPENDENCIES += mic.la