From: Akim Demaille Date: Fri, 19 May 2000 12:41:56 +0000 (+0000) Subject: Fix Autoconf/FIXME. X-Git-Tag: autoconf-2.50~905 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64830defc53e2a1eda87e9a5b217a833eb851685;p=thirdparty%2Fautoconf.git Fix Autoconf/FIXME. * aclang.m4 (AC_PROG_F77): Follow strictly the same scheme as AC_PROG_CC to compute the default FFLAGS. --- diff --git a/ChangeLog b/ChangeLog index c9a6e7b98..32a037962 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2000-05-19 Akim Demaille + + Fix Autoconf/FIXME. + + * aclang.m4 (AC_PROG_F77): Follow strictly the same scheme as + AC_PROG_CC to compute the default FFLAGS. + 2000-05-19 Akim Demaille Either we cross-compile the whole package, or we don't. diff --git a/aclang.m4 b/aclang.m4 index 998031b67..45e6ca3a7 100644 --- a/aclang.m4 +++ b/aclang.m4 @@ -707,23 +707,31 @@ AC_PROG_F77_GNU if test $ac_cv_prog_g77 = yes; then G77=yes +else + G77= +fi + dnl Check whether -g works, even if FFLAGS is set, in case the package dnl plays around with FFLAGS (such as to build both debugging and dnl normal versions of a library), tasteless as that idea is. - ac_test_FFLAGS=${FFLAGS+set} - ac_save_FFLAGS=$FFLAGS - FFLAGS= - AC_PROG_F77_G - if test "$ac_test_FFLAGS" = set; then - FFLAGS=$ac_save_FFLAGS - elif test $ac_cv_prog_f77_g = yes; then +ac_test_FFLAGS=${FFLAGS+set} +ac_save_FFLAGS=$FFLAGS +FFLAGS= +AC_PROG_F77_G +if test "$ac_test_FFLAGS" = set; then + FFLAGS=$ac_save_FFLAGS +elif test $ac_cv_prog_f77_g = yes; then + if test "$G77" = yes; then FFLAGS="-g -O2" else - FFLAGS="-O2" + FFLAGS="-g" fi else - G77= - test "${FFLAGS+set}" = set || FFLAGS="-g" + if test "$G77" = yes; then + FFLAGS="-O2" + else + FFLAGS= + fi fi ])# AC_PROG_F77 diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4 index 998031b67..45e6ca3a7 100644 --- a/lib/autoconf/c.m4 +++ b/lib/autoconf/c.m4 @@ -707,23 +707,31 @@ AC_PROG_F77_GNU if test $ac_cv_prog_g77 = yes; then G77=yes +else + G77= +fi + dnl Check whether -g works, even if FFLAGS is set, in case the package dnl plays around with FFLAGS (such as to build both debugging and dnl normal versions of a library), tasteless as that idea is. - ac_test_FFLAGS=${FFLAGS+set} - ac_save_FFLAGS=$FFLAGS - FFLAGS= - AC_PROG_F77_G - if test "$ac_test_FFLAGS" = set; then - FFLAGS=$ac_save_FFLAGS - elif test $ac_cv_prog_f77_g = yes; then +ac_test_FFLAGS=${FFLAGS+set} +ac_save_FFLAGS=$FFLAGS +FFLAGS= +AC_PROG_F77_G +if test "$ac_test_FFLAGS" = set; then + FFLAGS=$ac_save_FFLAGS +elif test $ac_cv_prog_f77_g = yes; then + if test "$G77" = yes; then FFLAGS="-g -O2" else - FFLAGS="-O2" + FFLAGS="-g" fi else - G77= - test "${FFLAGS+set}" = set || FFLAGS="-g" + if test "$G77" = yes; then + FFLAGS="-O2" + else + FFLAGS= + fi fi ])# AC_PROG_F77 diff --git a/lib/autoconf/fortran.m4 b/lib/autoconf/fortran.m4 index 998031b67..45e6ca3a7 100644 --- a/lib/autoconf/fortran.m4 +++ b/lib/autoconf/fortran.m4 @@ -707,23 +707,31 @@ AC_PROG_F77_GNU if test $ac_cv_prog_g77 = yes; then G77=yes +else + G77= +fi + dnl Check whether -g works, even if FFLAGS is set, in case the package dnl plays around with FFLAGS (such as to build both debugging and dnl normal versions of a library), tasteless as that idea is. - ac_test_FFLAGS=${FFLAGS+set} - ac_save_FFLAGS=$FFLAGS - FFLAGS= - AC_PROG_F77_G - if test "$ac_test_FFLAGS" = set; then - FFLAGS=$ac_save_FFLAGS - elif test $ac_cv_prog_f77_g = yes; then +ac_test_FFLAGS=${FFLAGS+set} +ac_save_FFLAGS=$FFLAGS +FFLAGS= +AC_PROG_F77_G +if test "$ac_test_FFLAGS" = set; then + FFLAGS=$ac_save_FFLAGS +elif test $ac_cv_prog_f77_g = yes; then + if test "$G77" = yes; then FFLAGS="-g -O2" else - FFLAGS="-O2" + FFLAGS="-g" fi else - G77= - test "${FFLAGS+set}" = set || FFLAGS="-g" + if test "$G77" = yes; then + FFLAGS="-O2" + else + FFLAGS= + fi fi ])# AC_PROG_F77 diff --git a/lib/autoconf/lang.m4 b/lib/autoconf/lang.m4 index 998031b67..45e6ca3a7 100644 --- a/lib/autoconf/lang.m4 +++ b/lib/autoconf/lang.m4 @@ -707,23 +707,31 @@ AC_PROG_F77_GNU if test $ac_cv_prog_g77 = yes; then G77=yes +else + G77= +fi + dnl Check whether -g works, even if FFLAGS is set, in case the package dnl plays around with FFLAGS (such as to build both debugging and dnl normal versions of a library), tasteless as that idea is. - ac_test_FFLAGS=${FFLAGS+set} - ac_save_FFLAGS=$FFLAGS - FFLAGS= - AC_PROG_F77_G - if test "$ac_test_FFLAGS" = set; then - FFLAGS=$ac_save_FFLAGS - elif test $ac_cv_prog_f77_g = yes; then +ac_test_FFLAGS=${FFLAGS+set} +ac_save_FFLAGS=$FFLAGS +FFLAGS= +AC_PROG_F77_G +if test "$ac_test_FFLAGS" = set; then + FFLAGS=$ac_save_FFLAGS +elif test $ac_cv_prog_f77_g = yes; then + if test "$G77" = yes; then FFLAGS="-g -O2" else - FFLAGS="-O2" + FFLAGS="-g" fi else - G77= - test "${FFLAGS+set}" = set || FFLAGS="-g" + if test "$G77" = yes; then + FFLAGS="-O2" + else + FFLAGS= + fi fi ])# AC_PROG_F77