autoconf
[Top][All Lists]
Advanced

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

warning from AC_LANG_PROGRAM(Fortran 77)


From: John W. Eaton
Subject: warning from AC_LANG_PROGRAM(Fortran 77)
Date: Wed, 2 Mar 2005 00:41:51 -0500

On 11-Nov-2004, I wrote:

| I'm using Autoconf 2.59:
| 
| devzero:450> autoconf --version
| autoconf (GNU Autoconf) 2.59
| Written by David J. MacKenzie and Akim Demaille.
| 
| Copyright (C) 2003 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.
| 
| Given the following input file
| 
| AC_INIT
| AC_PREREQ(2.50)
| AC_LANG_PUSH(Fortran 77)
| AC_TRY_LINK([],[],[])
| AC_LANG_POP(Fortran 77)
| 
| Autoconf emits the following warning:
| 
| devzero:449> autoconf foo.in > foo.out
| foo.in:4: warning: AC_LANG_PROGRAM(Fortran): ignoring PROLOGUE: []
| autoconf/lang.m4:224: AC_LANG_SOURCE is expanded from...
| autoconf/lang.m4:234: AC_LANG_PROGRAM is expanded from...
| autoconf/general.m4:2215: AC_LINK_IFELSE is expanded from...
| autoconf/general.m4:2223: AC_TRY_LINK is expanded from...
| foo.in:4: the top level
| 
| The INCLUDES argument ($1) of AC_TRY_LINK is empty, so I don't think I
| should see a warning about ignoring that as there is nothing to
| ignore.  Is there any way to avoid this warning?
| 
| Thanks,
| 
| jwe
| 
| -- 
| www.octave.org | www.che.wisc.edu/~jwe | Peace would shock and awe me.


I just checked again with the latest CVS sources and this bug is still
present.  The following simple change avoids the warning and doesn't
seem to break anything, but I'm not sure whether it is correct.  M4
quoting makes my head spin.  Can someone who knows more about m4 and
autoconf please take a look and see if there is a better solution?

Thanks,

jwe


ChangeLog:

2005-03-02  John W. Eaton  <address@hidden>

        * lib/autoconf/fortran.m4 (AC_LANG_PROGRAM(Fortran 77)):
        Don't quote first arg in call to m4_ifval.
        AC_LANG_PROGRAM(Fortran): Likewise.


Index: lib/autoconf/fortran.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/fortran.m4,v
retrieving revision 1.188
diff -u -r1.188 fortran.m4
--- lib/autoconf/fortran.m4     23 Feb 2005 23:24:49 -0000      1.188
+++ lib/autoconf/fortran.m4     2 Mar 2005 05:34:13 -0000
@@ -221,7 +221,7 @@
 # -----------------------------------------------
 # Yes, we discard the PROLOGUE.
 m4_define([AC_LANG_PROGRAM(Fortran 77)],
-[m4_ifval([$1],
+[m4_ifval($1,
        [m4_warn([syntax], [$0: ignoring PROLOGUE: $1])])dnl
       program main
 $2
@@ -232,7 +232,7 @@
 # -----------------------------------------------
 # FIXME: can the PROLOGUE be used?
 m4_define([AC_LANG_PROGRAM(Fortran)],
-[m4_ifval([$1],
+[m4_ifval($1,
        [m4_warn([syntax], [$0: ignoring PROLOGUE: $1])])dnl
       program main
 $2





reply via email to

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