Hello Giulio, * Giulio Paci wrote on Wed, Dec 01, 2010 at 03:02:05PM CET: > Here is a patch to fix the issue in fortran.m4. > I hope you'll find it useful.
Thanks for the patch. I have a nit, see the inline comment below. Can you run the Autoconf test suite with and without this patch applied? Like this: env F77=fort77 make check There should be a decrease in failed tests. Also, it would be nice to have a ChangeLog entry. Thanks, Ralf > *** fortran.m4 2010-12-01 14:51:32.000000000 +0100 > --- fortran.m4 2010-12-01 14:40:29.000000000 +0100 > *************** case $ac_[]_AC_LANG_ABBREV[]_v_output in > *** 541,546 **** > --- 541,550 ---- > s/-ignore *'[[^']]*'/ /g; s/-ignore *\"[[^\"]]*\"/ /g > s/-def *'[[^']]*'/ /g; s/-def *\"[[^\"]]*\"/ /g"` ;; > > + # If we are using fort77 (the f2c wrapper) then filter output and delete > quotes. > + *fort77*gcc*) > + ac_[]_AC_LANG_ABBREV[]_v_output=`echo > "$ac_[]_AC_LANG_ABBREV[]_v_output" | grep '"gcc"' | sed '/"-c"/d; > s/^.*"gcc"/"gcc"/; s/"//g' ;; What if the user builds in a directory name containing "gcc" or TMPDIR contains that? Can we tighten the regex a bit? Also, 'grep | sed' is often superflous grep and can be replaced with sed -n '/regex/{ ... }' but replacing semi-colons with newlines in the ... part. > + > # If we are using Cray Fortran then delete quotes. > *cft90*) > ac_[]_AC_LANG_ABBREV[]_v_output=`echo $ac_[]_AC_LANG_ABBREV[]_v_output > | sed 's/"//g'` ;;