From cf40356535007234c9395134ade1f5fb7ebee0c6 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Sat, 17 May 2003 14:38:50 -0500 Subject: [svn-r6886] Purpose: Update Description: GPFS should only be checked for if the --enable-gpfs flag is used. Otherwise, it shouldn't. Platforms tested: Linux (Configure only fix so only needed to test it to make sure the configure does the right thing and that the build won't break. I need to test it on a machine that has GPFS to make sure it works there...) --- configure | 38 +++++++++++++++++++++++++++++--------- configure.in | 38 ++++++++++++++++++++++++++------------ fortran/configure | 41 ++++++++++++++++++++++++++++++----------- fortran/configure.in | 49 +++++++++++++++++++++++++++++++------------------ 4 files changed, 116 insertions(+), 50 deletions(-) diff --git a/configure b/configure index 9e514d0..787df24 100755 --- a/configure +++ b/configure @@ -1012,6 +1012,8 @@ Optional Features: --enable-hdf5v1_4 Compile the HDF5 v1.4 compatibility interface [default=no] --enable-stream-vfd Build the Stream Virtual File Driver [default=no] + --enable-gpfs Enable GPFS hints for the MPI/POSIX file driver. + [default=no] --enable-debug=all Turn on debugging in all packages. One may also specify a comma-separated list of package names without the leading H5 or the word no. The default @@ -4110,7 +4112,7 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 4113 "configure"' > conftest.$ac_ext + echo '#line 4115 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -4651,7 +4653,7 @@ chmod -w . save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no -if { (eval echo configure:4654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then +if { (eval echo configure:4656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s out/conftest.err; then @@ -6462,7 +6464,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&6 fi +# Check whether --enable-gpfs or --disable-gpfs was given. +if test "${enable_gpfs+set}" = set; then + enableval="$enable_gpfs" + +else + enableval=no +fi; + +case "X-$enableval" in + X-yes) for ac_header in gpfs.h do @@ -30125,7 +30137,7 @@ if test `eval echo '${'$as_ac_Header'}'` = yes; then _ACEOF echo "$as_me:$LINENO: checking for GPFS support" >&5 echo $ECHO_N "checking for GPFS support... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #include @@ -30160,22 +30172,30 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_GPFS 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - LIBS="$LIBS -lgpfs" - GPFS="yes" + LIBS="$LIBS -lgpfs" + GPFS="yes" else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - GPFS="no" + GPFS="no" fi rm -f conftest.$ac_objext conftest.$ac_ext fi done + ;; + X-no|*) + echo "$as_me:$LINENO: checking for gpfs" >&5 +echo $ECHO_N "checking for gpfs... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: suppressed" >&5 +echo "${ECHO_T}suppressed" >&6 + ;; +esac echo "$as_me:$LINENO: checking for debug flags" >&5 echo $ECHO_N "checking for debug flags... $ECHO_C" >&6 diff --git a/configure.in b/configure.in index 8b3e57c..d01a45e 100644 --- a/configure.in +++ b/configure.in @@ -1610,17 +1610,31 @@ fi dnl ---------------------------------------------------------------------- dnl Checking to see if GPFS is available on this filesystem dnl -AC_CHECK_HEADERS([gpfs.h], - AC_MSG_CHECKING([for GPFS support]) - AC_TRY_COMPILE([#include ], - [int fd = 0; gpfs_fcntl(fd, (void *)0);], - AC_DEFINE(HAVE_GPFS, 1, - [Define if we have GPFS support]) - AC_MSG_RESULT(yes) - LIBS="$LIBS -lgpfs" - GPFS="yes", - AC_MSG_RESULT(no) - GPFS="no")) +AC_ARG_ENABLE([gpfs], + [AC_HELP_STRING([--enable-gpfs], + [Enable GPFS hints for the MPI/POSIX file + driver. [default=no]])],, + [enableval=no]) + +case "X-$enableval" in + X-yes) + AC_CHECK_HEADERS([gpfs.h], + AC_MSG_CHECKING([for GPFS support]) + AC_TRY_COMPILE([#include ], + [int fd = 0; gpfs_fcntl(fd, (void *)0);], + AC_DEFINE(HAVE_GPFS, 1, + [Define if we have GPFS support]) + AC_MSG_RESULT(yes) + LIBS="$LIBS -lgpfs" + GPFS="yes", + AC_MSG_RESULT(no) + GPFS="no")) + ;; + X-no|*) + AC_MSG_CHECKING([for gpfs]) + AC_MSG_RESULT([suppressed]) + ;; +esac dnl ---------------------------------------------------------------------- dnl Turn on debugging by setting compiler flags @@ -1972,7 +1986,7 @@ AC_SUBST(MPE) MPE=yes AC_ARG_ENABLE([mpe], [AC_HELP_STRING([--enable-mpe], [Enable MPE instrumentation [default=no]])],, - enableval=no) + [enableval=no]) AC_MSG_CHECKING([for MPE instrumentation]) case "X-$enableval" in diff --git a/fortran/configure b/fortran/configure index 12d8247..50ad400 100755 --- a/fortran/configure +++ b/fortran/configure @@ -1003,6 +1003,8 @@ Optional Features: specify a comma-separated list of filters or the word no. The default is all internal I/O filters. --enable-parallel Search for MPI-IO and MPI support files + --enable-gpfs Enable GPFS hints for the MPI/POSIX file driver. + [default=no] Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -3892,7 +3894,7 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 3895 "configure"' > conftest.$ac_ext + echo '#line 3897 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -4433,7 +4435,7 @@ chmod -w . save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no -if { (eval echo configure:4436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then +if { (eval echo configure:4438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s out/conftest.err; then @@ -6244,7 +6246,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&6 rm makeinc maketest fi +# Check whether --enable-gpfs or --disable-gpfs was given. +if test "${enable_gpfs+set}" = set; then + enableval="$enable_gpfs" -ac_ext=c +else + enableval=no +fi; + +case "X-$enableval" in + X-yes) + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -9756,7 +9767,7 @@ if test `eval echo '${'$as_ac_Header'}'` = yes; then _ACEOF echo "$as_me:$LINENO: checking for GPFS support" >&5 echo $ECHO_N "checking for GPFS support... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" #include @@ -9791,16 +9802,16 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_GPFS 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - LIBS="$LIBS -lgpfs" - GPFS="yes" + LIBS="$LIBS -lgpfs" + GPFS="yes" else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - GPFS="no" + GPFS="no" fi rm -f conftest.$ac_objext conftest.$ac_ext fi @@ -9808,11 +9819,19 @@ fi done -ac_ext=f90 + ac_ext=f90 ac_compile='${F9X-f90} -c $FFLAGS conftest.$ac_ext 1>&5' ac_link='${F9X-f90} -o conftest${ac_exeext} $FFLAGS conftest.$ac_ext $LDFLAGS $LIBS 1>&5' cross_compiling=$ac_cv_prog_f9x_cross + ;; + X-no|*) + echo "$as_me:$LINENO: checking for gpfs" >&5 +echo $ECHO_N "checking for gpfs... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: suppressed" >&5 +echo "${ECHO_T}suppressed" >&6 + ;; +esac rm -f conftest core core.* *.core conftest.o conftest.c dummy.o $ac_clean_files diff --git a/fortran/configure.in b/fortran/configure.in index 25a01b8..306d9b3 100644 --- a/fortran/configure.in +++ b/fortran/configure.in @@ -960,25 +960,38 @@ fi dnl ---------------------------------------------------------------------- dnl Checking to see if GPFS is available on this filesystem dnl +AC_ARG_ENABLE([gpfs], + [AC_HELP_STRING([--enable-gpfs], + [Enable GPFS hints for the MPI/POSIX file + driver. [default=no]])],, + [enableval=no]) -dnl Change to the C language -AC_LANG_C - -AC_CHECK_HEADERS([gpfs.h], - AC_MSG_CHECKING([for GPFS support]) - AC_TRY_COMPILE([#include ], - [int fd = 0; gpfs_fcntl(fd, (void *)0);], - AC_DEFINE(HAVE_GPFS, 1, - [Define if we have GPFS support]) - AC_MSG_RESULT(yes) - LIBS="$LIBS -lgpfs" - GPFS="yes", - AC_MSG_RESULT(no) - GPFS="no")) - -dnl Change back to the Fortran 90 language -AC_LANG_FORTRAN9X - +case "X-$enableval" in + X-yes) + dnl Change to the C language + AC_LANG_C + + AC_CHECK_HEADERS([gpfs.h], + AC_MSG_CHECKING([for GPFS support]) + AC_TRY_COMPILE([#include ], + [int fd = 0; gpfs_fcntl(fd, (void *)0);], + AC_DEFINE(HAVE_GPFS, 1, + [Define if we have GPFS support]) + AC_MSG_RESULT(yes) + LIBS="$LIBS -lgpfs" + GPFS="yes", + AC_MSG_RESULT(no) + GPFS="no")) + + dnl Change back to the Fortran 90 language + AC_LANG_FORTRAN9X + ;; + X-no|*) + AC_MSG_CHECKING([for gpfs]) + AC_MSG_RESULT([suppressed]) + ;; +esac + dnl Some cleanup stuff rm -f conftest core core.* *.core conftest.o conftest.c dummy.o $ac_clean_files -- cgit v0.12