Skip to content

Commit

Permalink
Adds code to configure.ac to find and link in Caliper
Browse files Browse the repository at this point in the history
  • Loading branch information
ilumsden committed Jul 28, 2023
1 parent 5ca0060 commit b1a1394
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ AC_ARG_ENABLE([perfflow],
[enable_perfflow=$enableval],
[enable_perfflow=no]
)
AC_ARG_ENABLE(caliper,
[AS_HELP_STRING([--enable-caliper[=OPTS]],
[Use caliper for profiling. [default=no] [OPTS=no/yes]])],
,
[enable_caliper="no"]
)
# TODO Add support for libb64 back once base64 encoding/decoding is fully complete
# AC_ARG_VAR([LIBB64_DIR], [root directory for libb64])

Expand Down Expand Up @@ -134,6 +140,13 @@ AX_PERFFLOW_ASPECT([PERFFLOW],
if test "x$enable_perfflow" = "xyes" && test "x$pkg_check_perfflow_found" = "xno"; then
AC_MSG_ERROR([requested PerfFlow Aspect support, but cannot find PerfFlow Aspect with pkg-config])
fi
if test "$enable_caliper" = "yes"; then
PKG_CHECK_MODULES([CALIPER], [caliper], [], [])
CFLAGS="${CFLAGS} ${CALIPER_CFLAGS} "
# Do not use CALIPER_LIBS, only link to libcaliper-stub
LIBS="${LIBS} ${CALIPER_LIBS} -lrt "
AC_DEFINE([HAVE_CALIPER], [1], [Define if you have libcaliper])
fi
AM_CONDITIONAL([PERFFLOW], [test "x$enable_perfflow" = "xyes"])

###########################
Expand Down

0 comments on commit b1a1394

Please sign in to comment.