@@ -20,7 +20,7 @@ AX_PROG_CC_MPI
2020# Checks for libraries.
2121
2222# Checks for header files.
23- AC_CHECK_HEADERS ( [ fcntl.h libintl.h stdlib.h string.h strings.h sys/ioctl.h sys/param.h sys/statfs.h sys/statvfs.h sys/time.h unistd.h wchar.h gpfs.h gpfs_fcntl.h plfs.h hdfs.h] )
23+ AC_CHECK_HEADERS ( [ fcntl.h libintl.h stdlib.h string.h strings.h sys/ioctl.h sys/param.h sys/statfs.h sys/statvfs.h sys/time.h unistd.h wchar.h plfs.h hdfs.h] )
2424
2525# Checks for typedefs, structures, and compiler characteristics.
2626AC_TYPE_SIZE_T
@@ -30,9 +30,23 @@ AC_CHECK_FUNCS([getpagesize gettimeofday memset mkdir pow putenv realpath regcom
3030AC_SEARCH_LIBS ( [ sqrt] , [ m] , [ ] ,
3131 [ AC_MSG_ERROR ( [ Math library not found] ) ] )
3232
33+ # Check for gpfs availability
34+ AC_ARG_WITH ( [ gpfs] ,
35+ [ AS_HELP_STRING ( [ --with-gpfs] ,
36+ [ support configurable GPFS @<:@ default=check@:>@ ] ) ] ,
37+ [ ] , [ with_gpfs=check] )
38+
39+ AS_IF ( [ test "x$with_gpfs" != xno] , [
40+ AC_CHECK_HEADERS ( [ gpfs.h gpfs_fcntl.h] , [ ] , [
41+ if test "x$with_gpfs" != xcheck; then
42+ AC_MSG_FAILURE ( [ --with-gpfs was given, <gpfs.h> and <gpfs_fcntl.h> not found] )
43+ fi
44+ ] )
3345AS_IF ( [ test "$ac_cv_header_gpfs_h" = "yes" -o "$ac_cv_header_gpfs_fcntl_h" = "yes"] , [
34- AC_SEARCH_LIBS ( [ gpfs_fcntl] , [ gpfs] , [ ] ,
35- [ AC_MSG_ERROR ( [ Library containing gpfs_fcntl symbols not found] ) ] )
46+ AC_SEARCH_LIBS ( [ gpfs_fcntl] , [ gpfs] , [ ] ,
47+ [ AC_MSG_ERROR ( [ Library containing gpfs_fcntl symbols not found] )
48+ ] )
49+ ] )
3650] )
3751
3852# Check for system capabilities
0 commit comments