autoconf
[Top][All Lists]
Advanced

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

AC_F77_WRAPPERS cannot be AC_DEFUN'ed


From: Denis Barbier
Subject: AC_F77_WRAPPERS cannot be AC_DEFUN'ed
Date: Sun, 10 Aug 2003 22:22:16 +0200
User-agent: Mutt/1.3.28i

Hi,

consider this simple test:
============ configure.ac ============
AC_INIT([foo], [1.0])
AC_DEFUN([FORTRAN_CHECK], [
AC_PROG_CC
AC_PROG_F77
AC_F77_WRAPPERS
])
FORTRAN_CHECK
AC_OUTPUT
======== End of configure.ac =========

With autoconf 2.57 and current CVS snapshot, here is what happens:
  $ ./configure
  checking how to get verbose linking output from ... configure: WARNING: 
compilation failed

  checking for Fortran 77 libraries... 
  checking for dummy main to link with Fortran 77 libraries... unknown
  configure: error: linking to Fortran libraries from C fails
  See `config.log' for more details.

But if AC_DEFUN is replaced by m4_define, then everything goes fine:
  $ ./configure
  checking for gcc... gcc
  checking for C compiler default output... 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 ANSI C... none needed
  checking for g77... g77
  checking whether we are using the GNU Fortran 77 compiler... yes
  checking whether g77 accepts -g... yes
  checking how to get verbose linking output from g77... -v
  checking for Fortran 77 libraries...  -L/usr/lib/gcc-lib/i386-linux/3.3.1 
-L/usr/lib/gcc-lib/i386-linux/3.3.1/../../.. -lfrtbegin -lg2c -lm -lgcc_s
  checking for dummy main to link with Fortran 77 libraries... none
  checking for Fortran 77 name-mangling scheme... lower case, underscore, extra 
underscore
  configure: creating ./config.status

Is there a bug in Autoconf, or am I supposed not to define my own macros
with AC_DEFUN?

Denis




reply via email to

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