diff --git a/configure b/configure index ec60e5f..2250d0e 100755 --- a/configure +++ b/configure @@ -625,6 +625,7 @@ LTLIBOBJS LIBOBJS PMPMEAS_CPP_SOURCE PMPMEAS_C_SOURCE +ADDITIONAL_DEFS USER_INC USER_LIBS PAPICNTMAX @@ -4203,9 +4204,8 @@ done $as_echo "#define _COLLECT_METRICS /**/" >>confdefs.h - -$as_echo "#define PMPMEAS_USERTRACE /**/" >>confdefs.h - + #AC_DEFINE(PMPMEAS_USERTRACE, [], [Tell pmpmeas to compile in R compatible way]) + ADDITIONAL_DEFS="-DPMPMEAS_USERTRACE $ADDITIONAL_DEFS" #Tell pmpmeas to file in R compatible way fi USER_LIBS="$user_libs" @@ -4213,6 +4213,7 @@ USER_INC="$user_inc" + ## PMPMEAS OBJECTS # Dynamically generate list of sources from subdirectories via shell diff --git a/configure.ac b/configure.ac index ece9d36..a0a3dd4 100644 --- a/configure.ac +++ b/configure.ac @@ -115,13 +115,15 @@ if test "X$enable_metrics" != "Xno"; then fi AC_DEFINE(_COLLECT_METRICS, [], [Enable rTrace metric collection]) - AC_DEFINE(PMPMEAS_USERTRACE, [], [Tell pmpmeas to compile in R compatible way]) + #AC_DEFINE(PMPMEAS_USERTRACE, [], [Tell pmpmeas to compile in R compatible way]) + ADDITIONAL_DEFS="-DPMPMEAS_USERTRACE $ADDITIONAL_DEFS" #Tell pmpmeas to file in R compatible way fi USER_LIBS="$user_libs" USER_INC="$user_inc" AC_SUBST(USER_LIBS) AC_SUBST(USER_INC) +AC_SUBST(ADDITIONAL_DEFS) ## PMPMEAS OBJECTS diff --git a/src/Makevars.am b/src/Makevars.am index aff4e72..46ae5a7 100644 --- a/src/Makevars.am +++ b/src/Makevars.am @@ -6,9 +6,10 @@ PAPICNTMAX = @PAPICNTMAX@ PMPMEAS_PKG_CPPFLAGS = -DPAPICNTMAX=${PAPICNTMAX} USER_LIBS = @USER_LIBS@ USER_INC = @USER_INC@ +ADDITIONAL_DEFS = @ADDITIONAL_DEFS@ # Flags for headers and libraries when compiling R packages -PKG_CPPFLAGS= ${DEFS} ${DEFAULT_INCLUDES} ${INCLUDES} ${AM_CPPFLAGS} \ +PKG_CPPFLAGS= ${DEFS} ${ADDITIONAL_DEFS} ${DEFAULT_INCLUDES} ${INCLUDES} ${AM_CPPFLAGS} \ ${CPPFLAGS} ${AM_CFLAGS} ${CFLAGS} \ ${PMPMEAS_PKG_CPPFLAGS} ${USER_INC} PKG_LIBS = @LIBS@ ${AM_LIBS} ${USER_LIBS} diff --git a/src/Makevars.in b/src/Makevars.in index c423831..6e8fb3e 100644 --- a/src/Makevars.in +++ b/src/Makevars.in @@ -176,6 +176,7 @@ am__relativize = \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ +ADDITIONAL_DEFS = @ADDITIONAL_DEFS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ @@ -277,7 +278,7 @@ AM_LIBS = -L. -L$(srcdir)/pmpmeas/src/lib/ PMPMEAS_PKG_CPPFLAGS = -DPAPICNTMAX=${PAPICNTMAX} # Flags for headers and libraries when compiling R packages -PKG_CPPFLAGS = ${DEFS} ${DEFAULT_INCLUDES} ${INCLUDES} ${AM_CPPFLAGS} \ +PKG_CPPFLAGS = ${DEFS} ${ADDITIONAL_DEFS} ${DEFAULT_INCLUDES} ${INCLUDES} ${AM_CPPFLAGS} \ ${CPPFLAGS} ${AM_CFLAGS} ${CFLAGS} \ ${PMPMEAS_PKG_CPPFLAGS} ${USER_INC} diff --git a/src/config.h.in b/src/config.h.in index a4d64ad..4e7fa97 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -66,9 +66,6 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION -/* Tell pmpmeas to compile in R compatible way */ -#undef PMPMEAS_USERTRACE - /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS