Commit 9a410d55 authored by Shane Snyder's avatar Shane Snyder

Darshan workload configure using pkg-config

parent 1925ef59
......@@ -36,12 +36,10 @@ include $(top_srcdir)/src/Makefile.subdir
include $(top_srcdir)/tests/Makefile.subdir
if USE_DARSHAN
AM_CPPFLAGS += ${DARSHAN_CPPFLAGS}
AM_CPPFLAGS += ${DARSHAN_CFLAGS}
src_libcodes_base_a_SOURCES += src/workload/codes-darshan-io-wrkld.c
tests_workload_codes_workload_test_LDADD += ${DARSHAN_LIBS}
tests_workload_codes_workload_test_LDFLAGS += ${DARSHAN_LDFLAGS}
tests_workload_codes_workload_mpi_replay_LDADD += ${DARSHAN_LIBS}
tests_workload_codes_workload_mpi_replay_LDFLAGS += ${DARSHAN_LDFLAGS}
endif
if USE_RECORDER
......
......@@ -93,16 +93,23 @@ fi
AC_ARG_WITH([darshan],[AS_HELP_STRING([--with-darshan@<:@=DIR@:>@],
[location of Darshan installation])])
if test "x${with_darshan}" != "x" ; then
darshan_headers="${with_darshan}/include"
AC_CHECK_FILE([$darshan_headers/darshan-logutils.h],
AC_CHECK_FILE([${with_darshan}/lib/pkgconfig/darshan-util.pc],
AM_CONDITIONAL(USE_DARSHAN, true),
AC_MSG_ERROR(Could not find darshan-logutils.h at: $darshan_headers))
DARSHAN_CPPFLAGS="-DUSE_DARSHAN=1 -DDARSHAN_CONFIG_H=\\\"${with_darshan}/include/darshan-util-config.h\\\" -I${with_darshan}/include"
DARSHAN_LDFLAGS="-L${with_darshan}/lib"
DARSHAN_LIBS="-ldarshan-util -lz"
AC_SUBST(DARSHAN_CPPFLAGS)
AC_SUBST(DARSHAN_LDFLAGS)
AC_MSG_ERROR(Could not find darshan-util.pc))
DARSHAN_LIBS=`PKG_CONFIG_PATH=${with_darshan}/lib/pkgconfig pkg-config darshan-util --libs`
DARSHAN_CFLAGS=`PKG_CONFIG_PATH=${with_darshan}/lib/pkgconfig pkg-config darshan-util --cflags`
AC_SUBST(DARSHAN_LIBS)
AC_SUBST(DARSHAN_CFLAGS)
# darshan_headers="${with_darshan}/include"
# AC_CHECK_FILE([$darshan_headers/darshan-logutils.h],
# AM_CONDITIONAL(USE_DARSHAN, true),
# AC_MSG_ERROR(Could not find darshan-logutils.h at: $darshan_headers))
# DARSHAN_CPPFLAGS="-DUSE_DARSHAN=1 -DDARSHAN_CONFIG_H=\\\"${with_darshan}/include/darshan-util-config.h\\\" -I${with_darshan}/include"
# DARSHAN_LDFLAGS="-L${with_darshan}/lib"
# DARSHAN_LIBS="-ldarshan-util -lz"
# AC_SUBST(DARSHAN_CPPFLAGS)
# AC_SUBST(DARSHAN_LDFLAGS)
# AC_SUBST(DARSHAN_LIBS)
else
AM_CONDITIONAL(USE_DARSHAN, false)
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment