From: David Brown Date: Mon, 6 May 2013 23:02:19 +0000 (-0700) Subject: here's some bits to fix CFLAGS to CPPFLAGS X-Git-Tag: collectd-5.4.0~42^2~17 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8284de77836c9fb039cbea6060f516c36c13b5dd;p=collectd.git here's some bits to fix CFLAGS to CPPFLAGS --- diff --git a/configure.in b/configure.in index b7ff8498..2c9ee397 100644 --- a/configure.in +++ b/configure.in @@ -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 diff --git a/src/Makefile.am b/src/Makefile.am index e0c1929c..50302670 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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