automake
[Top][All Lists]
Advanced

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

Need help with aclocal parsing


From: Tamara L Dahlgren
Subject: Need help with aclocal parsing
Date: Wed, 09 Oct 2002 17:29:33 -0700

I'm working on a project that depends upon automake (1.6.x) and autoconf
(2.53) on a linux box for our build system.  We already support F77 and
are trying to simultaneously support F90/F95.  We would prefer to use
released versions of the tools rather than hacking our own so I would
appreciate any suggestions on how best to resolve the following
difficulty.

In trying to integrate F90/F95 macros into our acinclude.m4 file, I've
encountered problems with aclocal's parsing.  In particular aclocal does
not parse the F90 or F95 preprocessor or compiler macros (i.e.,
AC_LANG_PREPROC(Fortran 90), AC_LANG_COMPILER(Fortran 90),
AC_LANG_PREPROC(Fortran 95), AC_LANG_COMPILER(Fortran 95)).  

I've traced my problem to the regular expression that matches the
AC_DEFUN macro
definition.  The searching function generated by the second for loop in
the subroutine "scan_m4_files" reveals that the lack of the closing
paren is leading to the following error:

  internal error: Unmatched ( before HERE mark in regex
m/\bAC_LANG_PREPROC( << HERE Fortran 95\b/ at (eval 7) line 129.

If the regular expression is changed to accept the closing paren, I then
encounter the following:

  Number found where operator expected at (eval 7) line 129, near
"Fortran 95"
        (Do you need to predeclare Fortran?)
  Number found where operator expected at (eval 7) line 130, near
"Fortran 90"
        (Do you need to predeclare Fortran?)
  Number found where operator expected at (eval 7) line 131, near
"Fortran 95"
        (Do you need to predeclare Fortran?)
  Number found where operator expected at (eval 7) line 132, near
"Fortran 90"
        (Do you need to predeclare Fortran?)
  internal error: syntax error at (eval 7) line 129, near "Fortran 95"
  syntax error at (eval 7) line 130, near "Fortran 90"
  syntax error at (eval 7) line 131, near "Fortran 95"
  syntax error at (eval 7) line 132, near "Fortran 90"


When I remove the blank between "Fortran 9", I then get the following:

aclocal: macro `AC_LANG_COMPILER(Fortran95)' defined in acinclude.m4 but
never used
aclocal: macro `AC_LANG_PREPROC(Fortran95)' defined in acinclude.m4 but
never used
aclocal: macro `AC_LANG_COMPILER(Fortran90)' defined in acinclude.m4 but
never used
aclocal: macro `AC_LANG_PREPROC(Fortran90)' defined in acinclude.m4 but
never used


My concern, besides the fact that we don't want to be maintaining our
own version of your tool, is that this is probably _not_ the best way to
handle the situation.  Any help or advice you can provide would be
_greatly_ appreciated.

  Tammy




reply via email to

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