diff --git a/configure.ac b/configure.ac index a29c8c3c0ee90a83b49612e45a1278e3fed18839..3ec882f4fa47ec97df0dc8bde9ead840ea98e246 100755 --- a/configure.ac +++ b/configure.ac @@ -97,7 +97,7 @@ if test "x${with_darshan}" != "x" ; then AC_CHECK_FILE([$darshan_headers/darshan-io-events.h], AM_CONDITIONAL(USE_DARSHAN, true), AC_MSG_ERROR(Could not find darshan-io-events.h at: $darshan_headers)) - DARSHAN_CPPFLAGS="-I${with_darshan}/include" + DARSHAN_CPPFLAGS="-DUSE_DARSHAN=1 -I${with_darshan}/include" AC_SUBST(DARSHAN_CPPFLAGS) else AM_CONDITIONAL(USE_DARSHAN, false) diff --git a/src/workload/codes-workload.c b/src/workload/codes-workload.c index e400d2424c992c934bb4992df1bdbd9251095206..e8a776d517ef44225f41e8c30850ce6c45fde2d4 100644 --- a/src/workload/codes-workload.c +++ b/src/workload/codes-workload.c @@ -15,10 +15,17 @@ */ extern struct codes_workload_method test_workload_method; extern struct codes_workload_method bgp_io_workload_method; +#ifdef USE_DARSHAN extern struct codes_workload_method darshan_io_workload_method; - +#endif static struct codes_workload_method *method_array[] = - {&test_workload_method, &bgp_io_workload_method, &darshan_io_workload_method, NULL}; +{ + &test_workload_method, + &bgp_io_workload_method, +#ifdef USE_DARSHAN + &darshan_io_workload_method, +#endif + NULL}; /* This shim layer is responsible for queueing up reversed operations and * re-issuing them so that the underlying workload generator method doesn't