Commit e208b6e7 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Fix incorrect Fortran preprocessing candidates.

* This partially reverts "added support for C89/90 preprocessor" which only
  covered up an already bad situation.

Using the C preprocessor on Fortran sources does ultimately not work
since it doesn't know about Fortran-specific features like the _OPENMP
macro and is chronically likely to pick up the cpp belonging to
another compiler (e.g. to system gcc when compiling with xlf on Linux/ppc).
parent e8966bb3
......@@ -15594,14 +15594,9 @@ fi
`cd $srcdir ; pwd`/util/xlfpreproc-wrapper \
`cd $srcdir ; pwd`/util/sunf95preproc-wrapper \
`cd $srcdir ; pwd`/util/crayftnpreproc-wrapper \
"$FC -F" "$FC -F -fpp" "$FC -E" "$FC -E" "$FC -E -cpp" \
"$FC -F" "$FC -F -fpp" "$FC -E" "$FC -E -cpp" \
"$FC $FCFLAGS -F" "$FC $FCFLAGS -E" "$FC $FCFLAGS -E" \
"$FC $FCFLAGS -E -cpp" "$FC $FCFLAGS -x f95-cpp-input -E -P" \
"${F77-f77} -F" "${F77-f77} -E" 'fpp' \
"$CPP -std=c89" "$CPP -x c -std=c89" 'cpp -std=c89' '/lib/cpp - std=c89' \
'/usr/ccs/lib/cpp -std=c89' 'g77 -E -std=c89' '${CC-cc} -E -std=c89' \
"$CPP" "$CPP -x c" 'cpp' '/lib/cpp' \
'/usr/ccs/lib/cpp' 'g77 -E' '${CC-cc} -E'
"$FC $FCFLAGS -E -cpp" "$FC $FCFLAGS -x f95-cpp-input -E -P"
do
rm -f conftest*
 
......@@ -15692,7 +15687,7 @@ $as_echo "$ac_try_echo"; } >&5
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
 
FPP="$ac_fpp -P"
FPP="$ac_fpp -P"
break
else
$as_echo "$as_me: failed program was:" >&5
......
......@@ -293,7 +293,7 @@ dnl preprocessing failed. So this command doesn't work.
# _ACX_SL_PROG_FPP([SUFFIX], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# ------------
# Try to figure out how to preprocess files with the given suffix
# for use with the selected Fortran compiler
# just like the selected Fortran compiler does
#
# Must be run after _ACX_SL_PROG_FC_CPP
AC_DEFUN([_ACX_SL_PROG_FPP],dnl
......@@ -314,18 +314,13 @@ AC_DEFUN([_ACX_SL_PROG_FPP],dnl
`cd $srcdir ; pwd`/util/xlfpreproc-wrapper \
`cd $srcdir ; pwd`/util/sunf95preproc-wrapper \
`cd $srcdir ; pwd`/util/crayftnpreproc-wrapper \
"$FC -F" "$FC -F -fpp" "$FC -E" "$FC -E" "$FC -E -cpp" \
"$FC -F" "$FC -F -fpp" "$FC -E" "$FC -E -cpp" \
"$FC $FCFLAGS -F" "$FC $FCFLAGS -E" "$FC $FCFLAGS -E" \
"$FC $FCFLAGS -E -cpp" "$FC $FCFLAGS -x f95-cpp-input -E -P" \
"${F77-f77} -F" "${F77-f77} -E" 'fpp' \
"$CPP -std=c89" "$CPP -x c -std=c89" 'cpp -std=c89' '/lib/cpp - std=c89' \
'/usr/ccs/lib/cpp -std=c89' 'g77 -E -std=c89' '${CC-cc} -E -std=c89' \
"$CPP" "$CPP -x c" 'cpp' '/lib/cpp' \
'/usr/ccs/lib/cpp' 'g77 -E' '${CC-cc} -E'
"$FC $FCFLAGS -E -cpp" "$FC $FCFLAGS -x f95-cpp-input -E -P"
do
_ACX_SL_TEST_FPP([$ac_fpp],[$acx_sl_fpp_srcext],[FPP="$ac_fpp"
break])
_ACX_SL_TEST_FPP([$ac_fpp -P],[$acx_sl_fpp_srcext],dnl
_ACX_SL_TEST_FPP([$ac_fpp -P],[$acx_sl_fpp_srcext],
[FPP="$ac_fpp -P"
break])
done
......
Supports Markdown
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