Commit c081209f authored by Anthony Chan's avatar Anthony Chan
Browse files

[svn-r6855] fixed merging error of aclocal_util.m4 when creating r6852. Fixed some old F77 macro.

parent 4ae780a1
......@@ -10,6 +10,7 @@ dnl too old to be useful, 07/14/2010.
dnl builtin(include,aclocal_cross.m4)
builtin(include,aclocal_cxx.m4)
builtin(include,aclocal_f77.m4)
builtin(include,aclocal_f77new.m4)
builtin(include,aclocal_util.m4)
builtin(include,aclocal_subcfg.m4)
builtin(include,aclocal_make.m4)
......
dnl /*D
dnl PAC_F77_WORKS_WITH_CPP
dnl
dnl Checks if Fortran 77 compiler works with C preprocessor
dnl
dnl Most systems allow the Fortran compiler to process .F and .F90 files
dnl using the C preprocessor. However, some systems either do not
dnl allow this or have serious bugs (OSF Fortran compilers have a bug
dnl that generates an error message from cpp). The following test
dnl checks to see if .F works, and if not, whether "cpp -P -C" can be used
dnl D*/
AC_DEFUN([PAC_F77_WORKS_WITH_CPP],[
AC_REQUIRE([AC_PROG_CPP])
AC_MSG_CHECKING([whether Fortran 77 compiler processes .F files with C preprocessor])
AC_LANG_PUSH([Fortran 77])
saved_f77_ext=${ac_ext}
ac_ext="F"
saved_FFLAGS="$FFLAGS"
FFLAGS="$FFLAGS $CPPFLAGS"
AC_LANG_CONFTEST([
AC_LANG_SOURCE([
program main
#define ASIZE 10
integer a(ASIZE)
end
])
])
AC_COMPILE_IFELSE([],[
pac_cv_f77_accepts_F=yes
ifelse([$1],[],[],[$1=""])
],[
pac_cv_f77_accepts_F=no
ifelse([$1],[],[:],[$1="false"])
])
# Restore Fortran 77's ac_ext but not FFLAGS
ac_ext="$saved_f77_ext"
if test "$pac_cv_f77_accepts_F" != "yes" ; then
pac_cpp_f77="$ac_cpp -C -P conftest.F > conftest.$ac_ext"
PAC_RUNLOG_IFELSE([$pac_cpp_f77],[
if test -s conftest.${ac_ext} ; then
AC_COMPILE_IFELSE([],[
pac_cv_f77_accepts_F="no, use cpp"
ifelse([$1],[],[],[$1="$CPP -C -P"])
],[])
rm -f conftest.${ac_ext}
fi
],[])
fi
FFLAGS="$saved_FFLAGS"
rm -f conftest.F
AC_LANG_POP([Fortran 77])
AC_MSG_RESULT([$pac_cv_f77_accepts_F])
])
......@@ -17,24 +17,24 @@ AC_DEFUN([PAC_POP_FLAG],[
dnl Usage: PAC_PUSH_ALL_FLAGS
AC_DEFUN([PAC_PUSH_ALL_FLAGS],[
PAC_PUSH_VAR(CFLAGS)
PAC_PUSH_VAR(CPPFLAGS)
PAC_PUSH_VAR(CXXFLAGS)
PAC_PUSH_VAR(FFLAGS)
PAC_PUSH_VAR(FCFLAGS)
PAC_PUSH_VAR(LDFLAGS)
PAC_PUSH_VAR(LIBS)
PAC_PUSH_FLAG(CFLAGS)
PAC_PUSH_FLAG(CPPFLAGS)
PAC_PUSH_FLAG(CXXFLAGS)
PAC_PUSH_FLAG(FFLAGS)
PAC_PUSH_FLAG(FCFLAGS)
PAC_PUSH_FLAG(LDFLAGS)
PAC_PUSH_FLAG(LIBS)
])
dnl Usage: PAC_POP_ALL_FLAGS
AC_DEFUN([PAC_POP_ALL_FLAGS],[
PAC_POP_VAR(CFLAGS)
PAC_POP_VAR(CPPFLAGS)
PAC_POP_VAR(CXXFLAGS)
PAC_POP_VAR(FFLAGS)
PAC_POP_VAR(FCFLAGS)
PAC_POP_VAR(LDFLAGS)
PAC_POP_VAR(LIBS)
PAC_POP_FLAG(CFLAGS)
PAC_POP_FLAG(CPPFLAGS)
PAC_POP_FLAG(CXXFLAGS)
PAC_POP_FLAG(FFLAGS)
PAC_POP_FLAG(FCFLAGS)
PAC_POP_FLAG(LDFLAGS)
PAC_POP_FLAG(LIBS)
])
dnl PAC_PREFIX_FLAG - Save flag with a prefix
......
......@@ -2047,47 +2047,7 @@ EOF
# that generates an error message from cpp). The following test
# checks to see if .F works, and if not, whether "cpp -P -C" can be used
# This is needed for Mac OSX 10.5
#
dnl # FIXME: this test should be replaced by PAC_F77_WORKS_WITH_CPP([F77CPP])
dnl # which should be similar to PAC_FC_WORKS_WITH_CPP([FCCPP])
#
rm -rf conftest.dSYM
rm -f conftest*
AC_MSG_CHECKING([whether Fortran compiler processes .F files with C preprocessor])
cat >conftest.F <<EOF
program main
#define SIZE 10
integer a(SIZE)
end
EOF
pac_cv_fort_accepts_F=no
pac_Fcompile='${F77} -c $FFLAGS $CPPFLAGS conftest.F 1>&AC_FD_CC'
if AC_TRY_EVAL(pac_Fcompile) && test -s conftest.o ; then
pac_cv_fort_accepts_F=yes
else
# Can we use cpp?
pac_Fcpp='${CPP} -C -P $CPPFLAGS conftest.F >conftest.f 2>&AC_FD_CC'
if AC_TRY_EVAL(pac_Fcpp) && test -s conftest.f ; then
pac_fFcompile='${F77} -c $FFLAGS $CPPFLAGS conftest.f 1>&AC_FD_CC'
if AC_TRY_EVAL(pac_fFcompile) && test -s conftest.o ; then
pac_cv_fort_accepts_F="no, use cpp"
fi
fi
fi
rm -f conftest.*
AC_MSG_RESULT($pac_cv_fort_accepts_F)
case "$pac_cv_fort_accepts_F" in
yes)
F77CPP=""
;;
"no, use cpp")
F77CPP="$CPP -C -P"
;;
no)
F77CPP="false"
;;
esac
PAC_F77_WORKS_WITH_CPP([F77CPP])
AC_SUBST(F77CPP)
bindings="$bindings f77"
......
......@@ -10,6 +10,7 @@ dnl too old to be useful, 07/14/2010.
dnl builtin(include,aclocal_cross.m4)
builtin(include,aclocal_cxx.m4)
builtin(include,aclocal_f77.m4)
builtin(include,aclocal_f77new.m4)
builtin(include,aclocal_util.m4)
builtin(include,aclocal_subcfg.m4)
builtin(include,aclocal_make.m4)
......
dnl /*D
dnl PAC_F77_WORKS_WITH_CPP
dnl
dnl Checks if Fortran 77 compiler works with C preprocessor
dnl
dnl Most systems allow the Fortran compiler to process .F and .F90 files
dnl using the C preprocessor. However, some systems either do not
dnl allow this or have serious bugs (OSF Fortran compilers have a bug
dnl that generates an error message from cpp). The following test
dnl checks to see if .F works, and if not, whether "cpp -P -C" can be used
dnl D*/
AC_DEFUN([PAC_F77_WORKS_WITH_CPP],[
AC_REQUIRE([AC_PROG_CPP])
AC_MSG_CHECKING([whether Fortran 77 compiler processes .F files with C preprocessor])
AC_LANG_PUSH([Fortran 77])
saved_f77_ext=${ac_ext}
ac_ext="F"
saved_FFLAGS="$FFLAGS"
FFLAGS="$FFLAGS $CPPFLAGS"
AC_LANG_CONFTEST([
AC_LANG_SOURCE([
program main
#define ASIZE 10
integer a(ASIZE)
end
])
])
AC_COMPILE_IFELSE([],[
pac_cv_f77_accepts_F=yes
ifelse([$1],[],[],[$1=""])
],[
pac_cv_f77_accepts_F=no
ifelse([$1],[],[:],[$1="false"])
])
# Restore Fortran 77's ac_ext but not FFLAGS
ac_ext="$saved_f77_ext"
if test "$pac_cv_f77_accepts_F" != "yes" ; then
pac_cpp_f77="$ac_cpp -C -P conftest.F > conftest.$ac_ext"
PAC_RUNLOG_IFELSE([$pac_cpp_f77],[
if test -s conftest.${ac_ext} ; then
AC_COMPILE_IFELSE([],[
pac_cv_f77_accepts_F="no, use cpp"
ifelse([$1],[],[],[$1="$CPP -C -P"])
],[])
rm -f conftest.${ac_ext}
fi
],[])
fi
FFLAGS="$saved_FFLAGS"
rm -f conftest.F
AC_LANG_POP([Fortran 77])
AC_MSG_RESULT([$pac_cv_f77_accepts_F])
])
......@@ -17,24 +17,24 @@ AC_DEFUN([PAC_POP_FLAG],[
dnl Usage: PAC_PUSH_ALL_FLAGS
AC_DEFUN([PAC_PUSH_ALL_FLAGS],[
PAC_PUSH_VAR(CFLAGS)
PAC_PUSH_VAR(CPPFLAGS)
PAC_PUSH_VAR(CXXFLAGS)
PAC_PUSH_VAR(FFLAGS)
PAC_PUSH_VAR(FCFLAGS)
PAC_PUSH_VAR(LDFLAGS)
PAC_PUSH_VAR(LIBS)
PAC_PUSH_FLAG(CFLAGS)
PAC_PUSH_FLAG(CPPFLAGS)
PAC_PUSH_FLAG(CXXFLAGS)
PAC_PUSH_FLAG(FFLAGS)
PAC_PUSH_FLAG(FCFLAGS)
PAC_PUSH_FLAG(LDFLAGS)
PAC_PUSH_FLAG(LIBS)
])
dnl Usage: PAC_POP_ALL_FLAGS
AC_DEFUN([PAC_POP_ALL_FLAGS],[
PAC_POP_VAR(CFLAGS)
PAC_POP_VAR(CPPFLAGS)
PAC_POP_VAR(CXXFLAGS)
PAC_POP_VAR(FFLAGS)
PAC_POP_VAR(FCFLAGS)
PAC_POP_VAR(LDFLAGS)
PAC_POP_VAR(LIBS)
PAC_POP_FLAG(CFLAGS)
PAC_POP_FLAG(CPPFLAGS)
PAC_POP_FLAG(CXXFLAGS)
PAC_POP_FLAG(FFLAGS)
PAC_POP_FLAG(FCFLAGS)
PAC_POP_FLAG(LDFLAGS)
PAC_POP_FLAG(LIBS)
])
dnl PAC_PREFIX_FLAG - Save flag with a prefix
......
......@@ -10,6 +10,7 @@ dnl too old to be useful, 07/14/2010.
dnl builtin(include,aclocal_cross.m4)
builtin(include,aclocal_cxx.m4)
builtin(include,aclocal_f77.m4)
builtin(include,aclocal_f77new.m4)
builtin(include,aclocal_util.m4)
builtin(include,aclocal_subcfg.m4)
builtin(include,aclocal_make.m4)
......
dnl /*D
dnl PAC_F77_WORKS_WITH_CPP
dnl
dnl Checks if Fortran 77 compiler works with C preprocessor
dnl
dnl Most systems allow the Fortran compiler to process .F and .F90 files
dnl using the C preprocessor. However, some systems either do not
dnl allow this or have serious bugs (OSF Fortran compilers have a bug
dnl that generates an error message from cpp). The following test
dnl checks to see if .F works, and if not, whether "cpp -P -C" can be used
dnl D*/
AC_DEFUN([PAC_F77_WORKS_WITH_CPP],[
AC_REQUIRE([AC_PROG_CPP])
AC_MSG_CHECKING([whether Fortran 77 compiler processes .F files with C preprocessor])
AC_LANG_PUSH([Fortran 77])
saved_f77_ext=${ac_ext}
ac_ext="F"
saved_FFLAGS="$FFLAGS"
FFLAGS="$FFLAGS $CPPFLAGS"
AC_LANG_CONFTEST([
AC_LANG_SOURCE([
program main
#define ASIZE 10
integer a(ASIZE)
end
])
])
AC_COMPILE_IFELSE([],[
pac_cv_f77_accepts_F=yes
ifelse([$1],[],[],[$1=""])
],[
pac_cv_f77_accepts_F=no
ifelse([$1],[],[:],[$1="false"])
])
# Restore Fortran 77's ac_ext but not FFLAGS
ac_ext="$saved_f77_ext"
if test "$pac_cv_f77_accepts_F" != "yes" ; then
pac_cpp_f77="$ac_cpp -C -P conftest.F > conftest.$ac_ext"
PAC_RUNLOG_IFELSE([$pac_cpp_f77],[
if test -s conftest.${ac_ext} ; then
AC_COMPILE_IFELSE([],[
pac_cv_f77_accepts_F="no, use cpp"
ifelse([$1],[],[],[$1="$CPP -C -P"])
],[])
rm -f conftest.${ac_ext}
fi
],[])
fi
FFLAGS="$saved_FFLAGS"
rm -f conftest.F
AC_LANG_POP([Fortran 77])
AC_MSG_RESULT([$pac_cv_f77_accepts_F])
])
......@@ -17,24 +17,24 @@ AC_DEFUN([PAC_POP_FLAG],[
dnl Usage: PAC_PUSH_ALL_FLAGS
AC_DEFUN([PAC_PUSH_ALL_FLAGS],[
PAC_PUSH_VAR(CFLAGS)
PAC_PUSH_VAR(CPPFLAGS)
PAC_PUSH_VAR(CXXFLAGS)
PAC_PUSH_VAR(FFLAGS)
PAC_PUSH_VAR(FCFLAGS)
PAC_PUSH_VAR(LDFLAGS)
PAC_PUSH_VAR(LIBS)
PAC_PUSH_FLAG(CFLAGS)
PAC_PUSH_FLAG(CPPFLAGS)
PAC_PUSH_FLAG(CXXFLAGS)
PAC_PUSH_FLAG(FFLAGS)
PAC_PUSH_FLAG(FCFLAGS)
PAC_PUSH_FLAG(LDFLAGS)
PAC_PUSH_FLAG(LIBS)
])
dnl Usage: PAC_POP_ALL_FLAGS
AC_DEFUN([PAC_POP_ALL_FLAGS],[
PAC_POP_VAR(CFLAGS)
PAC_POP_VAR(CPPFLAGS)
PAC_POP_VAR(CXXFLAGS)
PAC_POP_VAR(FFLAGS)
PAC_POP_VAR(FCFLAGS)
PAC_POP_VAR(LDFLAGS)
PAC_POP_VAR(LIBS)
PAC_POP_FLAG(CFLAGS)
PAC_POP_FLAG(CPPFLAGS)
PAC_POP_FLAG(CXXFLAGS)
PAC_POP_FLAG(FFLAGS)
PAC_POP_FLAG(FCFLAGS)
PAC_POP_FLAG(LDFLAGS)
PAC_POP_FLAG(LIBS)
])
dnl PAC_PREFIX_FLAG - Save flag with a prefix
......
......@@ -10,6 +10,7 @@ dnl too old to be useful, 07/14/2010.
dnl builtin(include,aclocal_cross.m4)
builtin(include,aclocal_cxx.m4)
builtin(include,aclocal_f77.m4)
builtin(include,aclocal_f77new.m4)
builtin(include,aclocal_util.m4)
builtin(include,aclocal_subcfg.m4)
builtin(include,aclocal_make.m4)
......
dnl /*D
dnl PAC_F77_WORKS_WITH_CPP
dnl
dnl Checks if Fortran 77 compiler works with C preprocessor
dnl
dnl Most systems allow the Fortran compiler to process .F and .F90 files
dnl using the C preprocessor. However, some systems either do not
dnl allow this or have serious bugs (OSF Fortran compilers have a bug
dnl that generates an error message from cpp). The following test
dnl checks to see if .F works, and if not, whether "cpp -P -C" can be used
dnl D*/
AC_DEFUN([PAC_F77_WORKS_WITH_CPP],[
AC_REQUIRE([AC_PROG_CPP])
AC_MSG_CHECKING([whether Fortran 77 compiler processes .F files with C preprocessor])
AC_LANG_PUSH([Fortran 77])
saved_f77_ext=${ac_ext}
ac_ext="F"
saved_FFLAGS="$FFLAGS"
FFLAGS="$FFLAGS $CPPFLAGS"
AC_LANG_CONFTEST([
AC_LANG_SOURCE([
program main
#define ASIZE 10
integer a(ASIZE)
end
])
])
AC_COMPILE_IFELSE([],[
pac_cv_f77_accepts_F=yes
ifelse([$1],[],[],[$1=""])
],[
pac_cv_f77_accepts_F=no
ifelse([$1],[],[:],[$1="false"])
])
# Restore Fortran 77's ac_ext but not FFLAGS
ac_ext="$saved_f77_ext"
if test "$pac_cv_f77_accepts_F" != "yes" ; then
pac_cpp_f77="$ac_cpp -C -P conftest.F > conftest.$ac_ext"
PAC_RUNLOG_IFELSE([$pac_cpp_f77],[
if test -s conftest.${ac_ext} ; then
AC_COMPILE_IFELSE([],[
pac_cv_f77_accepts_F="no, use cpp"
ifelse([$1],[],[],[$1="$CPP -C -P"])
],[])
rm -f conftest.${ac_ext}
fi
],[])
fi
FFLAGS="$saved_FFLAGS"
rm -f conftest.F
AC_LANG_POP([Fortran 77])
AC_MSG_RESULT([$pac_cv_f77_accepts_F])
])
......@@ -17,24 +17,24 @@ AC_DEFUN([PAC_POP_FLAG],[
dnl Usage: PAC_PUSH_ALL_FLAGS
AC_DEFUN([PAC_PUSH_ALL_FLAGS],[
PAC_PUSH_VAR(CFLAGS)
PAC_PUSH_VAR(CPPFLAGS)
PAC_PUSH_VAR(CXXFLAGS)
PAC_PUSH_VAR(FFLAGS)
PAC_PUSH_VAR(FCFLAGS)
PAC_PUSH_VAR(LDFLAGS)
PAC_PUSH_VAR(LIBS)
PAC_PUSH_FLAG(CFLAGS)
PAC_PUSH_FLAG(CPPFLAGS)
PAC_PUSH_FLAG(CXXFLAGS)
PAC_PUSH_FLAG(FFLAGS)
PAC_PUSH_FLAG(FCFLAGS)
PAC_PUSH_FLAG(LDFLAGS)
PAC_PUSH_FLAG(LIBS)
])
dnl Usage: PAC_POP_ALL_FLAGS
AC_DEFUN([PAC_POP_ALL_FLAGS],[
PAC_POP_VAR(CFLAGS)
PAC_POP_VAR(CPPFLAGS)
PAC_POP_VAR(CXXFLAGS)
PAC_POP_VAR(FFLAGS)
PAC_POP_VAR(FCFLAGS)
PAC_POP_VAR(LDFLAGS)
PAC_POP_VAR(LIBS)
PAC_POP_FLAG(CFLAGS)
PAC_POP_FLAG(CPPFLAGS)
PAC_POP_FLAG(CXXFLAGS)
PAC_POP_FLAG(FFLAGS)
PAC_POP_FLAG(FCFLAGS)
PAC_POP_FLAG(LDFLAGS)
PAC_POP_FLAG(LIBS)
])
dnl PAC_PREFIX_FLAG - Save flag with a prefix
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment