From 33d5f5d1e8f66b9ed6112744c03d546e95fb3022 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 13 Aug 2013 12:53:23 -0500 Subject: [svn-r24004] HDFFV-8319 and -8321: Cleanup autotools code. Also remove GetConsoleScreenInfo check from cygwin configure. Tested: h5committest --- configure | 91 +++++++++++++++++-------------------------- configure.ac | 27 +++++-------- fortran/src/h5fc.in | 24 ++++++------ release_docs/INSTALL | 4 +- release_docs/INSTALL_parallel | 6 +-- 5 files changed, 63 insertions(+), 89 deletions(-) diff --git a/configure b/configure index c987d69..c552f84 100755 --- a/configure +++ b/configure @@ -5243,14 +5243,6 @@ if test "X$HDF_FORTRAN" = "Xyes"; then ## -------------------------------------------------------------------- - ## General Fortran flags - ## Only add FFLAGS to FCFLAGS if it's set. - if test "x$FFLAGS" != "x" ; then - AM_FCFLAGS="${AM_FCFLAGS} ${FFLAGS}" - FCFLAGS="${FCFLAGS} ${FFLAGS}" - fi - - ## -------------------------------------------------------------------- ## Fortran source extention ## ac_ext=${ac_fc_srcext-f} @@ -26922,7 +26914,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ## ---------------------------------------------------------------------- ## How do we figure out the width of a tty in characters? ## -for ac_func in _getvideoconfig gettextinfo GetConsoleScreenBufferInfo +for ac_func in _getvideoconfig gettextinfo do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -26934,6 +26926,23 @@ _ACEOF fi done +case "`uname`" in + CYGWIN*) + ;; + *) + for ac_func in GetConsoleScreenBufferInfo +do : + ac_fn_c_check_func "$LINENO" "GetConsoleScreenBufferInfo" "ac_cv_func_GetConsoleScreenBufferInfo" +if test "x$ac_cv_func_GetConsoleScreenBufferInfo" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETCONSOLESCREENBUFFERINFO 1 +_ACEOF + +fi +done + + ;; +esac for ac_func in _scrsize ioctl do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` @@ -28361,44 +28370,30 @@ _ACEOF if ac_fn_fc_try_link "$LINENO"; then : else - as_ac_Lib=`$as_echo "ac_cv_lib_mpi_ - include 'mpif.h' - integer:: ierr - call mpi_file_open( ierr )" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for - include 'mpif.h' - integer:: ierr - call mpi_file_open( ierr ) in -lmpi" >&5 -$as_echo_n "checking for - include 'mpif.h' - integer:: ierr - call mpi_file_open( ierr ) in -lmpi... " >&6; } -if eval \${$as_ac_Lib+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpi_file_open in -lmpi" >&5 +$as_echo_n "checking for mpi_file_open in -lmpi... " >&6; } +if ${ac_cv_lib_mpi_mpi_file_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpi $LIBS" cat > conftest.$ac_ext <<_ACEOF program main - call - include 'mpif.h' - integer:: ierr - call mpi_file_open( ierr ) + call mpi_file_open end _ACEOF if ac_fn_fc_try_link "$LINENO"; then : - eval "$as_ac_Lib=yes" + ac_cv_lib_mpi_mpi_file_open=yes else - eval "$as_ac_Lib=no" + ac_cv_lib_mpi_mpi_file_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpi_mpi_file_open" >&5 +$as_echo "$ac_cv_lib_mpi_mpi_file_open" >&6; } +if test "x$ac_cv_lib_mpi_mpi_file_open" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBMPI 1 _ACEOF @@ -28427,44 +28422,30 @@ _ACEOF if ac_fn_fc_try_link "$LINENO"; then : else - as_ac_Lib=`$as_echo "ac_cv_lib_mpio_ - include 'mpif.h' - integer:: ierr - call mpi_file_open( ierr )" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for - include 'mpif.h' - integer:: ierr - call mpi_file_open( ierr ) in -lmpio" >&5 -$as_echo_n "checking for - include 'mpif.h' - integer:: ierr - call mpi_file_open( ierr ) in -lmpio... " >&6; } -if eval \${$as_ac_Lib+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpi_file_open in -lmpio" >&5 +$as_echo_n "checking for mpi_file_open in -lmpio... " >&6; } +if ${ac_cv_lib_mpio_mpi_file_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpio $LIBS" cat > conftest.$ac_ext <<_ACEOF program main - call - include 'mpif.h' - integer:: ierr - call mpi_file_open( ierr ) + call mpi_file_open end _ACEOF if ac_fn_fc_try_link "$LINENO"; then : - eval "$as_ac_Lib=yes" + ac_cv_lib_mpio_mpi_file_open=yes else - eval "$as_ac_Lib=no" + ac_cv_lib_mpio_mpi_file_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpio_mpi_file_open" >&5 +$as_echo "$ac_cv_lib_mpio_mpi_file_open" >&6; } +if test "x$ac_cv_lib_mpio_mpi_file_open" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBMPIO 1 _ACEOF diff --git a/configure.ac b/configure.ac index 0142353..7cfb3ff 100644 --- a/configure.ac +++ b/configure.ac @@ -433,14 +433,6 @@ if test "X$HDF_FORTRAN" = "Xyes"; then AC_SUBST([OBJECT_NAMELEN_DEFAULT_F]) ## -------------------------------------------------------------------- - ## General Fortran flags - ## Only add FFLAGS to FCFLAGS if it's set. - if test "x$FFLAGS" != "x" ; then - AM_FCFLAGS="${AM_FCFLAGS} ${FFLAGS}" - FCFLAGS="${FCFLAGS} ${FFLAGS}" - fi - - ## -------------------------------------------------------------------- ## Fortran source extention ## AC_FC_SRCEXT([f90]) @@ -2156,7 +2148,14 @@ AC_TRY_COMPILE([ ## ---------------------------------------------------------------------- ## How do we figure out the width of a tty in characters? ## -AC_CHECK_FUNCS([_getvideoconfig gettextinfo GetConsoleScreenBufferInfo]) +AC_CHECK_FUNCS([_getvideoconfig gettextinfo]) +case "`uname`" in + CYGWIN*) + ;; + *) + AC_CHECK_FUNCS([GetConsoleScreenBufferInfo]) + ;; +esac AC_CHECK_FUNCS([_scrsize ioctl]) AC_MSG_CHECKING([for struct videoconfig]) @@ -2716,10 +2715,7 @@ case "X-$enable_parallel" in integer:: ierr call mpi_file_open( ierr ) end],, - [AC_CHECK_LIB([mpi], [ - include 'mpif.h' - integer:: ierr - call mpi_file_open( ierr )],, [PARALLEL=no])]) + [AC_CHECK_LIB([mpi], [mpi_file_open],, [PARALLEL=no])]) ## Then try link a simple MPI-IO program. If fail, try again with ## -lmpio. @@ -2730,10 +2726,7 @@ case "X-$enable_parallel" in integer:: ierr call mpi_file_open( ierr ) end],, - [AC_CHECK_LIB([mpio], [ - include 'mpif.h' - integer:: ierr - call mpi_file_open( ierr )],, [PARALLEL=no])]) + [AC_CHECK_LIB([mpio], [mpi_file_open],, [PARALLEL=no])]) fi ## Change to the C language diff --git a/fortran/src/h5fc.in b/fortran/src/h5fc.in index d052046..1285541 100644 --- a/fortran/src/h5fc.in +++ b/fortran/src/h5fc.in @@ -36,15 +36,15 @@ HL="@HL@" ## ## ## (Advanced usage - know what you're doing - you're on your own here.) ## ## The three variables below can be used to insert paths and flags in ## -## FFLAGS, LDFLAGS, or LIBS in the h5fc compile line: ## -## $FLINKER $FFLAGS $H5BLD_FFLAGS $F9XSUFFIXFLAG $LDFLAGS $LIBS ## +## FCFLAGS, LDFLAGS, or LIBS in the h5fc compile line: ## +## $FLINKER $FCFLAGS $H5BLD_FCFLAGS $F9XSUFFIXFLAG $LDFLAGS $LIBS ## ## $fmodules $link_objs $link_args $shared_link ## ## ## -## These settings can be overriden by setting HDF5_FFLAGS, ## +## These settings can be overriden by setting HDF5_FCFLAGS, ## ## HDF5_LDFLAGS, or HDF5_LIBS in the environment. ## ## ## ############################################################################ -FFLAGSBASE="" +FCFLAGSBASE="" LDFLAGSBASE="" LIBSBASE="" @@ -77,15 +77,15 @@ SHOW="eval" FCBASE="@FC@" FLINKERBASE="@FC@" -# FFLAGS and LDFLAGS are reserved for use by the script user. +# FCFLAGS and LDFLAGS are reserved for use by the script user. # FLAGS brought from the hdf5 build are put in H5BLD_*FLAGS. -# User's FFLAGS come after their H5BLD counterparts. User's LDFLAGS come just +# User's FCFLAGS come after their H5BLD counterparts. User's LDFLAGS come just # before clibpath, user's LIBS come after $link_objs and before the hdf5 # libraries in $link_args, followed by any external library paths and libraries # from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in from the hdf5 build. # The order of the flags is intended to give precedence to the user's flags. -H5BLD_FFLAGS="@AM_FCFLAGS@ @FCFLAGS@" +H5BLD_FCFLAGS="@AM_FCFLAGS@ @FCFLAGS@" F9XMODFLAG="@F9XMODFLAG@" F9XSUFFIXFLAG="@F9XSUFFIXFLAG@" H5BLD_LDFLAGS="@AM_LDFLAGS@ @LDFLAGS@" @@ -93,7 +93,7 @@ H5BLD_LIBS="@LIBS@" FC="${HDF5_FC:-$FCBASE}" FLINKER="${HDF5_FLINKER:-$FLINKERBASE}" -FFLAGS="${HDF5_FFLAGS:-$FFLAGSBASE}" +FCFLAGS="${HDF5_FCFLAGS:-$FCFLAGSBASE}" LDFLAGS="${HDF5_LDFLAGS:-$LDFLAGSBASE}" LIBS="${HDF5_LIBS:-$LIBSBASE}" @@ -140,7 +140,7 @@ usage() { echo " in the 'Things You Can Modify to Override...'" section of $prog_name echo " " echo " Variable Current value to be replaced" - echo " HDF5_FFLAGS \"$CFLAGSBASE\"" + echo " HDF5_FCFLAGS \"$CFLAGSBASE\"" echo " HDF5_LDFLAGS \"$LDFLAGSBASE\"" echo " HDF5_LIBS \"$LIBSBASE\"" echo " " @@ -287,7 +287,7 @@ if test "x$do_compile" = "xyes"; then fi - $SHOW $FC $H5BLD_FFLAGS $FFLAGS ${F9XSUFFIXFLAG} ${fmodules} $compile_args + $SHOW $FC $H5BLD_FCFLAGS $FCFLAGS ${F9XSUFFIXFLAG} ${fmodules} $compile_args status=$? if test "$status" != "0"; then @@ -358,12 +358,12 @@ if test "x$do_link" = "xyes"; then # module. It's okay if they're included twice in the compile line. link_args="$link_args $H5BLD_LDFLAGS $H5BLD_LIBS" - # User's FFLAGS come after their H5BLD counterparts. User's LDFLAGS come just + # User's FCFLAGS come after their H5BLD counterparts. User's LDFLAGS come just # before clibpath, user's LIBS come after $link_objs and before the hdf5 # libraries in $link_args, followed by any external library paths and libraries # from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in from the hdf5 build. # The order of the flags is intended to give precedence to the user's flags. - $SHOW $FLINKER $FFLAGS $H5BLD_FFLAGS $F9XSUFFIXFLAG $LDFLAGS $fmodules $link_objs $LIBS $link_args $shared_link + $SHOW $FLINKER $FCFLAGS $H5BLD_FCFLAGS $F9XSUFFIXFLAG $LDFLAGS $fmodules $link_objs $LIBS $link_args $shared_link status=$? fi diff --git a/release_docs/INSTALL b/release_docs/INSTALL index c1c7df6..96f4f6e 100644 --- a/release_docs/INSTALL +++ b/release_docs/INSTALL @@ -289,10 +289,10 @@ CONTENTS To configure AIX 64-bit support including the Fortran and C++ APIs, (Note: need to set $AR to 'ar -X 64'.) Serial: - $ CFLAGS=-q64 FFLAGS=-q64 CXXFLAGS=-q64 AR='ar -X 64'\ + $ CFLAGS=-q64 FCFLAGS=-q64 CXXFLAGS=-q64 AR='ar -X 64'\ ./configure --enable-fortran Parallel: (C++ not supported with parallel) - $ CFLAGS=-q64 FFLAGS=-q64 AR='ar -X 64'\ + $ CFLAGS=-q64 FCFLAGS=-q64 AR='ar -X 64'\ ./configure --enable-fortran 4.3.4. Additional compilation flags diff --git a/release_docs/INSTALL_parallel b/release_docs/INSTALL_parallel index 03b3ecf..6f60165 100644 --- a/release_docs/INSTALL_parallel +++ b/release_docs/INSTALL_parallel @@ -86,12 +86,12 @@ Then do the following steps: # Read the Details section about parallel tests. $ make install -We also suggest that you add "-qxlf90=autodealloc" to FFLAGS when building +We also suggest that you add "-qxlf90=autodealloc" to FCFLAGS when building parallel with fortran enabled. This can be done by invoking: - setenv FFLAGS -qxlf90=autodealloc # 32 bit build + setenv FCFLAGS -qxlf90=autodealloc # 32 bit build or - setenv FFLAGS "-q64 -qxlf90=autodealloc" # 64 bit build + setenv FCFLAGS "-q64 -qxlf90=autodealloc" # 64 bit build prior to running configure. Recall that the "-q64" is necessary for 64 bit builds. -- cgit v0.12