libtool-patches
[Top][All Lists]
Advanced

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

RE: PATCH: Don't add tags for languages not used or found


From: Bob Friesenhahn
Subject: RE: PATCH: Don't add tags for languages not used or found
Date: Thu, 20 Mar 2003 16:58:06 -0600 (CST)

On Thu, 20 Mar 2003, Boehne, Robert wrote:

> I think the fundamental problem is that AC_PROG_F77 is setting $F77=""
> rather than $F77="no" like we'd like.  I propose we make a new macro,
> _LT_PROG_F77_NO
> that calls AC_PROG_F77 and sets F77 to "no" if it is empty on exit.
> Then we replace any calls to AC_PROG_F77 with it.
>
> Agree?

This seems feasable and a reasonable approach.  However it still
doesn't satisfy my desire to not run any checks for F77 at all. :-)

Configure spends quite a bit of time doing libtool-related checking.
It doesn't make sense to spend time checking for languages that the
package doesn't use.

Using the scheme you describe above, can it easily be extended to
avoid executing AC_PROG_F77 at all if F77 is already set to 'no'?

For example, we could add a macro which allows the package developer
to set the desired languages like:

AC_LIBTOOL_TAGS(c cxx)

which sets all of the language compiler names to 'no' except for the
languages listed.  If F77 is already set to 'no' then AC_PROG_F77
should be skipped.

If the desired tags are not set, then configure should attempt to
configure all of the tags where a compiler can be found.

Bob

> -----Original Message-----
> From: Bob Friesenhahn [mailto:address@hidden
> Sent: Thursday, March 20, 2003 4:07 PM
> To: Boehne, Robert
> Cc: address@hidden
> Subject: Re: PATCH: Don't add tags for languages not used or found
>
>
> I had not noticed it via the first cursory inspection, however, there
> is a flaw in this approach in that it is incomplete.  The check for
> F77 is in libtool's *own* configure.ac file.  This does no good for
> the many packages which implicitly invoke AC_PROG_F77 via
> AC_PROG_LIBTOOL.
>
> It seems that any place in libtool.m4 which may invoke AC_PROG_F77
> would need the special treatment.
>
> What happens if F77 is left empty, and the tests are changed from
>
>   if test "X$F77" != "Xno"; then
>
> to
>
>   if test "X$F77" != "X"; then
>
> ?
>
> Will that still work?
>
> Bob
>
> On Wed, 19 Mar 2003, Robert Boehne x238 wrote:
>
> > Hello,
> >
> > Finally, you've all been waiting for this, here is a patch to Libtool
> > that keeps the extra tags from being added even when the language
> > is not wanted or needed.
> >
> > ChangeLog entry:
> > 2003-03-19  Robert Boehne  <address@hidden>
> >
> >     * libtool.m4 (_LT_AC_TAGCONFIG): Add test around the macro that
> >     adds tags to the libtool script so that they won't run when not
> >     needed.
> >     * configure.ac: Set F77 to no when no Fortran compiler is found.
> >
> > Any gurus care to look this over?  It seems too simple to work
> > but it does.  In configure.ac, I set F77 to "no" if it isn't
> > set after AC_PROG_F77 (which probably should do this itself).
> > Then in _LT_AC_TAGCONFIG I skip over the tag creation macro if
> > the language in question is set to "no", then set tagname to null
> > so it won't be added to the list of available tags.  It is so simple,
> > it must be the right solution. ;)
> >
> > Approval anyone?
> >
> > Robert
> >
> > --
> > Robert Boehne             Software Engineer
> > Ricardo Software   Chicago Technical Center
> > TEL: (630)789-0003 x. 238
> > FAX: (630)789-0127
> > email:  rboehne AT ricardo-us DOT com
>
> ======================================
> Bob Friesenhahn
> address@hidden
> http://www.simplesystems.org/users/bfriesen
>
>

======================================
Bob Friesenhahn
address@hidden
http://www.simplesystems.org/users/bfriesen





reply via email to

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