[Top][All Lists]

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

Re: conftest files

From: Ralf Wildenhues
Subject: Re: conftest files
Date: Sat, 26 Aug 2006 03:07:11 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

* Christopher Hulbert wrote on Fri, Aug 25, 2006 at 03:59:12PM CEST:
> On 8/25/06, Ralf Wildenhues <address@hidden> wrote:
> >
> >Christopher, please check whether the patch by Stepan:
> >
> >fixes your issue.

> Ok, I checked out autoconf and applied the patch and all is well.

Paul, is Stepan's patch still ok at this point?  (Should we consider
using dnl instead of `#' as the macro gets expanded very often in a
typical configure script?)

> I did however apply another patch of mine which fixes some problems
> with getting the fortran library flags (See attached patch). This
> problem arises with the PGI compiler using single-quoted arguments in
> the compile/link stage (e.g. '.... -lm') and autoconf picks up -lm' as
> a library and causes link problems later.

Yes, I've seen the problem before.  FWIW, I don't like the proposed
patch though; PGI uses both single and double quotes, and some of the
quoted stuff is interesting, some isn't.  I think a better change, i.e.,
one leading to more stable Autoconf code in the long term, would be to
eval some of the caught output for the Fortran link flags.  But a change
like this requires some testing to stabilize.  Also note that some other
Fortran drivers tend to write `-l foo' for linking with libfoo, and we
would not want to throw that away.

A safer short-term change would be to amend this part of
_AC_PROG_FC_V_OUTPUT with the bits that your link flags are causing:

|   # Portland Group compiler has singly- or doubly-quoted -cmdline argument
|   # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4.
|   # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2".
|   *-cmdline\ * | *-ignore\ * | *-def\ *)
|     ac_[]_AC_LANG_ABBREV[]_v_output=`echo $ac_[]_AC_LANG_ABBREV[]_v_output | 
sed "\
|         s/-cmdline  *'[[^']]*'/ /g; s/-cmdline  *\"[[^\"]]*\"/ /g
|         s/-ignore  *'[[^']]*'/ /g; s/-ignore  *\"[[^\"]]*\"/ /g
|         s/-def  *'[[^']]*'/ /g; s/-def  *\"[[^\"]]*\"/ /g"` ;;

Of course, pre-seeding the output variable can always serve as a


reply via email to

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