[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,
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
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