summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorJames Laird <jlaird@hdfgroup.org>2005-03-07 17:57:27 (GMT)
committerJames Laird <jlaird@hdfgroup.org>2005-03-07 17:57:27 (GMT)
commit25df1908bc0430994cecc9f1415838f42fe0c816 (patch)
treebce2777e087cc7d547e7b644f908eff72282bb53 /configure.in
parent630b2901c53c66c837e39babe9da0c20020e5d4d (diff)
downloadhdf5-25df1908bc0430994cecc9f1415838f42fe0c816.zip
hdf5-25df1908bc0430994cecc9f1415838f42fe0c816.tar.gz
hdf5-25df1908bc0430994cecc9f1415838f42fe0c816.tar.bz2
[svn-r10158] Purpose:
Automake version upgrade Description: Upgraded automake version from 1.6.2 to 1.9.5. Changed bin/reconfigure script to use automake 1.9.5. Changed configure.in and Makefiles to use new FCFLAGS and FC variables instead of FFLAGS and F9X. Automake and configure should now do the lion's share of the work supporting Fortran 9X; macros in acsite.m4 are now mostly unused (will be cleaned later). Altered how configure handles pmake; now root-level Makefile.in is processed by bin/reconfigure to have a .MAKEFLAGS target, since automake no longer allows us to define unused variables. Configure now always checks for C++ compiler even if it is not used, since automake thinks this is the Right Thing To Do and will break otherwise. Platforms tested: Sol, copper, heping, mir, sleipnir, eirene, pommier, kelgia, modi4.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in60
1 files changed, 32 insertions, 28 deletions
diff --git a/configure.in b/configure.in
index 87fcd78..ecbdcdf 100644
--- a/configure.in
+++ b/configure.in
@@ -272,23 +272,21 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
dnl --------------------------------------------------------------------
dnl General Fortran flags
dnl
- AC_SUBST([FFLAGS])
+ FCFLAGS="${FCFLAGS} ${FFLAGS}"
+ FC=${F9X}
AC_SUBST([F9XSUFFIXFLAG])
AC_SUBST([FSEARCH_DIRS])
dnl --------------------------------------------------------------------
dnl Check for a Fortran 9X compiler and how to include modules.
dnl
- AC_PROG_F9X
+ AC_PROG_FC([f90 pgf90 slf90 f95 g95 xlf95 efc],)
AC_F9X_MODS
- dnl Tell automake to use the F9X compiler
- AC_SUBST(FC) FC=$F9X
- AC_SUBST(F77) F77=$F9X
-
- dnl Automake wants to build in F77 instead of F9X. Kludge around this
- dnl by telling it to use the same fortran compiler for both.
- dnl AC_PROG_F77($FC)
+ dnl It seems that libtool (as of Libtool 1.5.14) is trying to
+ dnl configure itself for Fortran 77.
+ dnl Tell it that our F77 compiler is $FC (actually a F9X compiler)
+ F77=$FC
dnl Change to the Fortran 90 language
AC_LANG_FORTRAN9X
@@ -296,8 +294,8 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
dnl --------------------------------------------------------------------
dnl See if the compiler will support the "-I." option
dnl
- FFLAGS_saved=$FFLAGS
- FFLAGS="$FFLAGS -I."
+ FCFLAGS_saved=$FCFLAGS
+ FCFLAGS="${FCFLAGS} -I."
AC_MSG_CHECKING(if compiler supports -I. option)
AC_TRY_FCOMPILE([
@@ -305,7 +303,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
end
], AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
- FFLAGS="$FFLAGS_saved")
+ FCFLAGS="$FCFLAGS_saved")
dnl Change to the C language
AC_LANG_C
@@ -317,6 +315,13 @@ dnl ----------------------------------------------------------------------
dnl Check if they would like the C++ interface compiled
dnl
AC_MSG_CHECKING([if c++ interface enabled])
+
+dnl We need to check for a C++ compiler unconditionally, since
+dnl AC_PROG_CXX defines some macros that Automake 1.9.x uses and will
+dnl miss even if c++ is not enabled.
+ AC_PROG_CXX
+ AC_PROG_CXXCPP dnl this is checked for when AC_HEADER_STDC is done
+
AC_ARG_ENABLE([cxx],
[AC_HELP_STRING([--enable-cxx],
[Compile the C++ interface [default=no]])],
@@ -325,8 +330,6 @@ AC_ARG_ENABLE([cxx],
if test "X$HDF_CXX" = "Xyes"; then
echo "yes"
HDF5_INTERFACES="$HDF5_INTERFACES c++"
- AC_PROG_CXX
- AC_PROG_CXXCPP dnl this is checked for when AC_HEADER_STDC is done
dnl Change to the C++ language
AC_LANG_CPLUSPLUS
@@ -441,6 +444,7 @@ if test "X$GCC" = "Xyes"; then
AC_CHECK_PROGS([PERL], [perl],, [$PATH])
fi
+
dnl ----------------------------------------------------------------------
dnl Check which archiving tool to use. This needs to be done before
dnl the AM_PROG_LIBTOOL macro.
@@ -637,21 +641,21 @@ case "X-$enable_production" in
CXXFLAGS=$CXXFLAGS_temp
fi
- FFLAGS_temp=""
- if test -n "$FFLAGS"; then
- for d in $FFLAGS ; do
+ FCFLAGS_temp=""
+ if test -n "$FCFLAGS"; then
+ for d in $FCFLAGS ; do
if test "X$d" != "X-g"; then
- FFLAGS_temp="$FFLAGS_temp $d"
+ FCFLAGS_temp="$FCFLAGS_temp $d"
fi
done
- FFLAGS=$FFLAGS_temp
+ FCFLAGS=$FCFLAGS_temp
fi
CONFIG_MODE=production
CFLAGS="$CFLAGS $PROD_CFLAGS"
CPPFLAGS="$CPPFLAGS $PROD_CPPFLAGS"
CXXFLAGS="$CXXFLAGS $PROD_CXXFLAGS"
- FFLAGS="$FFLAGS $PROD_FFLAGS"
+ FCFLAGS="$FCFLAGS $PROD_FCFLAGS"
;;
X-|X-no)
enable_production="no"
@@ -660,7 +664,7 @@ case "X-$enable_production" in
CFLAGS="$CFLAGS $DEBUG_CFLAGS"
CPPFLAGS="$CPPFLAGS $DEBUG_CPPFLAGS"
CXXFLAGS="$CXXFLAGS $DEBUG_CXXFLAGS"
- FFLAGS="$FFLAGS $DEBUG_FFLAGS"
+ FCFLAGS="$FCFLAGS $DEBUG_FCFLAGS"
;;
X-pg|X-profile)
enable_production="profile"
@@ -669,7 +673,7 @@ case "X-$enable_production" in
CFLAGS="$CFLAGS $PROFILE_CFLAGS"
CPPFLAGS="$CPPFLAGS $PROFILE_CPPFLAGS"
CXXFLAGS="$CXXFLAGS $PROFILE_CXXFLAGS"
- FFLAGS="$FFLAGS $PROFILE_FFLAGS"
+ FCFLAGS="$FCFLAGS $PROFILE_FCFLAGS"
;;
*)
enable_production="user-defined"
@@ -1984,7 +1988,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
dnl Change to the Fortran 90 language
AC_LANG_FORTRAN9X
- case "$F9X" in
+ case "$FC" in
*mpif90*)
dnl The Fortran mpich compiler. Use mpirun from the same directory
dnl if it exists.
@@ -1992,7 +1996,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
AC_MSG_CHECKING([for mpirun])
dnl Find the path where mpif90 is located.
- cmd=`echo $F9X |cut -f1 -d' '`
+ cmd=`echo $FC |cut -f1 -d' '`
if (echo $cmd |grep / >/dev/null); then
path="`echo $cmd |sed 's/\(.*\)\/.*$/\1/'`"
else
@@ -2018,7 +2022,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
*mpxlf* | *mpxlf_r* | *mpxlf90* | *mpxlf90_r* | *mpxlf95* | *mpxlf95_r*)
dnl The IBM compiler
- PARALLEL="$F9X"
+ PARALLEL="$FC"
;;
*)
@@ -3135,10 +3139,10 @@ PRINT_N " Fortran"
IF_YES_NO "$HDF_FORTRAN"
if test X$HDF_FORTRAN = Xyes; then
PRINT_N " Fortran Compiler"
- PRINT "$F9X"
+ PRINT "$FC"
- PRINT_N " FFLAGS"
- PRINT "$FFLAGS"
+ PRINT_N " FCFLAGS"
+ PRINT "$FCFLAGS"
fi
PRINT "Features:"