Skip to content

Commit

Permalink
Ensuring #define passed correctly to preprocessor for pmpmeas
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanKierans committed Jul 23, 2024
1 parent 4e85df8 commit beb0069
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
7 changes: 4 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,7 @@ LTLIBOBJS
LIBOBJS
PMPMEAS_CPP_SOURCE
PMPMEAS_C_SOURCE
ADDITIONAL_DEFS
USER_INC
USER_LIBS
PAPICNTMAX
Expand Down Expand Up @@ -4203,16 +4204,16 @@ 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"
USER_INC="$user_inc"
## PMPMEAS OBJECTS
# Dynamically generate list of sources from subdirectories via shell
Expand Down
4 changes: 3 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion src/Makevars.am
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
3 changes: 2 additions & 1 deletion src/Makevars.in
Original file line number Diff line number Diff line change
Expand Up @@ -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@
Expand Down Expand Up @@ -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}

Expand Down
3 changes: 0 additions & 3 deletions src/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit beb0069

Please sign in to comment.