Commit 62cb95f6 authored by Philip Carns's avatar Philip Carns

add --disable-cuserid configure argument, fixes #72


git-svn-id: https://svn.mcs.anl.gov/repos/darshan/trunk@546 3b7491f3-a168-0410-bf4b-c445ed680a29
parent 7a01614c
......@@ -663,6 +663,7 @@ ac_user_opts='
enable_option_checking
with_zlib_for_mpi
with_zlib
enable_cuserid
enable_ld_preload
with_mem_align
with_log_path_by_env
......@@ -1290,6 +1291,7 @@ Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-cuserid Disables attempted use of cuserid() at run time
--disable-ld-preload Disables support for LD_PRELOAD library
Optional Packages:
......@@ -3598,6 +3600,17 @@ fi
# Check whether --enable-cuserid was given.
if test "${enable_cuserid+set}" = set; then :
enableval=$enable_cuserid; if test "x$enableval" = "xno" ; then
$as_echo "#define DARSHAN_DISABLE_CUSERID 1" >>confdefs.h
,
fi
fi
# Check whether --enable-ld-preload was given.
if test "${enable_ld_preload+set}" = set; then :
enableval=$enable_ld_preload; if test "x$enableval" = "xno" ; then
......
......@@ -29,6 +29,13 @@ AC_ARG_WITH(zlib-for-mpi,,
dnl runtime libraries require zlib
CHECK_ZLIB
AC_ARG_ENABLE(cuserid,
[ --disable-cuserid Disables attempted use of cuserid() at run time],
[if test "x$enableval" = "xno" ; then
AC_DEFINE(DARSHAN_DISABLE_CUSERID, 1, Define if cuserid() should be disabled),
fi]
,)
AC_ARG_ENABLE(ld-preload,
[ --disable-ld-preload Disables support for LD_PRELOAD library],
[if test "x$enableval" = "xno" ; then
......
......@@ -6,6 +6,9 @@
/* Name of the environment variable that stores the jobid */
#undef CP_JOBID
/* Define if cuserid() should be disabled */
#undef DARSHAN_DISABLE_CUSERID
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
......
......@@ -448,7 +448,9 @@ void darshan_shutdown(int timing_flag)
* work in statically compiled binaries.
*/
#ifndef DARSHAN_DISABLE_CUSERID
cuserid(cuser);
#endif
/* if cuserid() didn't work, then check the environment */
if (strcmp(cuser, "") == 0)
......
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