bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

checking whether accepts -g... no


From: Akim Demaille
Subject: checking whether accepts -g... no
Date: Wed, 21 Mar 2007 23:39:46 +0100

On the following input, configure tries to run the f77 compiler
that it did not find.  This is something I actually noticed in
during the configuration of packages using libtool, for which
several languages are tried including Fortran.

(The last line is the one to look at).

address@hidden /tmp $ cat configure.ac 23:24:18
AC_INIT
AC_PROG_CC
AC_PROG_F77
address@hidden /tmp $ autoconf -- version 23:26:11
autoconf (GNU Autoconf) 2.60
Written by David J. MacKenzie and Akim Demaille.

Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. address@hidden /tmp $ autoconf 23:26:14 address@hidden /tmp $ ./ configure 23:26:18
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... no
checking for g95... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifort... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for ftn... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
address@hidden /tmp $ 23:26:25

(I checked with 2.61 too).


Also, a minor comment: I see that fortran.m4 has

# _AC_FORTRAN_ASSERT
# ------------------
# Current language must be Fortran or Fortran 77.
m4_defun([_AC_FORTRAN_ASSERT],
[m4_if(_AC_LANG, [Fortran], [],
       [m4_if(_AC_LANG, [Fortran 77], [],
[m4_fatal([$0: current language is not Fortran: ] _AC_LANG)])])])

the two if can be reduced to a single one.  But maybe the right
approach would rather be to include AC_LANG_ASSERT to use
bmatch:

# AC_LANG_ASSERT(LANG)
# --------------------
# Current language must be LANG.
m4_defun([AC_LANG_ASSERT],
[m4_bmatch(m4_defn([_AC_LANG]), [^\($1\)$], [],
[m4_fatal([$0: current language does not match $1: ] _AC_LANG)])])

and then to define _AC_FORTRAN_ASSERT as follows.

# _AC_FORTRAN_ASSERT
# ------------------
# Current language must be Fortran or Fortran 77.
m4_define([_AC_FORTRAN_ASSERT],
[AC_LANG_ASSERT([Fortran\( 77\)?])dnl
])

(m4_define seems more suitable than m4_defun here).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]