autoconf-patches
[Top][All Lists]
Advanced

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

Re: Fortran 90/95 support (autoconf)


From: marq
Subject: Re: Fortran 90/95 support (autoconf)
Date: Fri, 6 Jul 2001 01:55:02 +0200 (CEST)

Hi AKim, and hello to all the other autoconf experts,

sorry that this took so long...

>From a mail from Akim about a month ago:

> | solution by Martin Wilck for autoconf; but his macros ceased to work
> | as the autoconf development is *so* rapid. 
> 
> Used to be.

Still is...

But then, from Akim's mail two days ago:

> And anyway, before applying your changes, I think we ought to split
> aclang into aclang, aclang-c (C, C 89, C++), and aclang-fortran.  We
> can debate about the names.

Really, I don't care - whatever you suggest. I have attached a file
aclang.fortran.m4, containing the (somewhat changed, see below)
Fortran90/95 things. I have not included the Fortran 77 stuff, since you
once wrote:

> I would like to suggest that you submit something like acfortran.m4
> instead.  Do not import the Fortran 77 stuff, I will, but I think we
> should split aclang.m4.

As my earlier one, the patch defines the following macros (with similar
meanings like their Fortran 77 counterparts):

  AC_LANG(Fortran 90)

  AC_LANG_SOURCE(Fortran 90)(BODY)
  AC_LANG_CALL(Fortran 90)(PROLOGUE, FUNCTION)   *not* discarding the prologue

  AC_LANG_PREPROC(Fortran 90)                    doing nothing, actually...
  AC_LANG_COMPILER(Fortran 90)
  AC_PROG_F90([COMPILERS])

  AC_F90_LIBRARY_LDFLAGS
  AC_F90_WRAPPERS
  AC_F90_FUNC(NAME, [SHELLVAR = NAME])

plus the corresponding Fortran 95 macros (s/90/95/ in the above
list). Also, the following shell variables are defined (and later on
substituted):

  F90
  F90FLAGS
  F90LIBS

while the shell variable

  LD90FLAGS

is honored if set (the idea is that a user might want to link specific
libraries when linking a Fortran 90 program). The corresponding F95*
versions also exist. Essentially, all macros are plain copies of the
Fortran 77 versions, edited manually to avoid unwanted interactions
between them, and to adjust default settings.

You had a number of remarks; like these:

> | +# AC_LANG_FORTRAN90
> | +# -----------------
> | +AU_DEFUN([AC_LANG_FORTRAN90], [AC_LANG(Fortran 90)])
> 
> Don't.  AU_DEFUN is for compatibility with old stuff.  This is new,
> just don't define it at all.

Removed. Also removed AC_LANG_FORTRAN95, ac_cv_prog_g90, ac_cv_prog_g95,
as you suggested.

> | +AC_DEFUN([AC_PROG_F90],
> 
> Make it private.  I.e. _AC_PROG_F90.

Hm. There's an AC_PROG_CC, AC_PROG_CPP, AC_PROG_CXX, AC_PROG_CXXCPP,
AC_PROG_F77 - it's used to set a default compiler in configure.ac.
What's wrong with it? Likewise with AC_PROG_F95  - I've kept them both.

> | +# _AC_PROG_F90_G
> Do you think this is needed?

Actually, no. Removed. Likewise for _AC_PROG_F95_G.

> | +# AC_PROG_F90_C_O
> | +# ---------------
> If you are not sure it is useful, don't include it at all.

Actually, I also copied the comments from the Fortran 77 version...
Don't know what this macro is really good for -> removed. Likewise for
the F95 version.

> Groumph.  I don't like this.  We have to look for a means to share
> this across all the languages.  There is too much, way too much, code
> duplication.

Definitely. The problem is, my understanding of m4 programming is rather
poor, so I essentially don't know how to write real 'functions' with
it...

> You should submit some form of documentation too, and a NEWS snippet.

I'll over the next few days.

Regards,

  Chris.


Here's the patch:

------------------------------------------

 Index: aclang-fortran.m4, autoconf.m4, Makefile.am

 2001-07-05  Christian Marquardt  <address@hidden>

        * aclang-fortran.m4: added basic Fortran 90/95 support
             (AC_LANG(Fortran 90), AC_LANG_SOURCE(Fortran 90),
              AC_LANG_CALL(Fortran 90), AC_LANG_PREPROC(Fortran 90),
              AC_LANG_COMPILER(Fortran 90), AC_PROG_F90,
              AC_F90_LIBRARY_LDFLAGS, AC_F90_WRAPPERS, AC_F90_FUNC,
              *F95*)
        * autoconf.m4: Now includes aclang-fortran.m4.
        * Makefile.am: likewise.
        

-- 

  Christian Marquardt

  GFZ Potsdam, Div. 1             |       Tel.: (+49) 331-288-1168
  Am Telegrafenberg               |       Fax:  (+49) 331-288-1732
  D-14473 Potsdam                 |       Email: address@hidden

Attachment: fortran_90_autoconf_patch.diff
Description: Text document

Attachment: aclang-fortran.m4
Description: Text document


reply via email to

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