Source

mpi3-fortran / ompi / contrib / vt / vt / config / m4 / acinclude.iowrap.m4

AC_DEFUN([ACVT_IOWRAP],
[
	iowrap_error="no"
	check_iowrap="yes"
	have_iowrap="no"

	AC_ARG_ENABLE(iotrace,
		AC_HELP_STRING([--enable-iotrace],
		[enable support for tracing LIBC I/O functions (e.g. fopen,fclose,fread,fwrite) via library wrapping, default: enable]),
	[AS_IF([test x"$enableval" = "xyes"], [force_iowrap="yes"], [check_iowrap="no"])])


	AS_IF([test "$check_iowrap" = "yes"],
	[
		AS_IF([test x"$shlibc_pathname" = x],
		[
			AC_MSG_NOTICE([error: pathname of shared LIBC required for LIBC-I/O tracing; please specify it by --with-shlibc])
			iowrap_error="yes"
		])

		AS_IF([test x"$iowrap_error" = "xno"],
		[
			sav_CPPFLAGS=$CPPFLAGS
			CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE -D_LARGEFILE64_SOURCE"

			AC_CHECK_FUNCS([ \
				creat64 \
				fopen64 \
				fseeko \
				fseeko64 \
				lseek64 \
				fsetpos64 \
				open64 \
				pread64 \
				pwrite64 \
				flockfile \
				ftrylockfile \
				funlockfile \
				sync \
				fflush \
				fsync \
				fdatasync \
				lockf])

			AC_CHECK_FUNCS([__fprintf_chk],
			[
dnl				Check whether <stdio.h> declares __vfprintf_chk. This should be the case if
dnl				_FORTIFY_SOURCE is defined (default when using the GNU compiler).
dnl				Otherwise, we have to declare this function to avoid compiler warnings.
				AC_CHECK_DECLS([__vfprintf_chk], [], [], [#include <stdio.h>])
			])

			CPPFLAGS=$sav_CPPFLAGS

			have_iowrap="yes"
		])
	])
])
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.