Commit 36d8e168 authored by Shane Snyder's avatar Shane Snyder
Browse files

add autoconf test for fscanf redirect

parent 733cac5d
......@@ -4832,6 +4832,38 @@ fi
# End of MPI-only checks
#
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fscanf redirect" >&5
$as_echo_n "checking for fscanf redirect... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
int
main ()
{
int fscanf(FILE *stream, const char *format, ...) {return(0);}
int __isoc99_fscanf(FILE *stream, const char *format, ...) {return(0);}
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
$as_echo "#define HAVE_FSCANF_REDIRECT 1" >>confdefs.h
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
DARSHAN_VERSION="3.2.0-pre1"
......
......@@ -481,6 +481,21 @@ AS_IF([$CC -show foo.c -o foo >& /dev/null],
# End of MPI-only checks
#
AC_MSG_CHECKING(for fscanf redirect)
AC_TRY_COMPILE(
[
#include <stdio.h>
],
[
int fscanf(FILE *stream, const char *format, ...) {return(0);}
int __isoc99_fscanf(FILE *stream, const char *format, ...) {return(0);}
],
AC_MSG_RESULT(no),
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_FSCANF_REDIRECT, 1, Define if fscanf is redirected to another function)
)
DARSHAN_VERSION="AC_PACKAGE_VERSION"
AC_SUBST(darshan_lib_path)
AC_SUBST(darshan_share_path)
......
......@@ -6,6 +6,9 @@
/* Define if struct aiocb64 type is defined */
#undef HAVE_AIOCB64
/* Define if fscanf is redirected to another function */
#undef HAVE_FSCANF_REDIRECT
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
......
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