bug-libtool
[Top][All Lists]
Advanced

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

Re: bug relating to func_infer_tag


From: Ralf Wildenhues
Subject: Re: bug relating to func_infer_tag
Date: Sun, 2 May 2010 18:33:16 +0200
User-agent: Mutt/1.5.20 (2009-10-28)

* Bruno Haible wrote on Sun, May 02, 2010 at 04:01:39PM CEST:
> > I think things would work if you used AC_PROG_CXX instead of
> > hand-written similar functionality for setting CXX.  Automake and
> > Libtool specifically discover this macro as a sign for use of C++
> 
> This is exactly the problem. It looks for AC_PROG_CXX and nothing else.
> It does not give me the freedom to use an alternative for AC_PROG_CXX.

You are right about this limitation in the current code.

> In my case, I don't want to use AC_PROG_CXX because it aborts the entire
> configure script if it does not find a C++ compiler. Other people may
> want to use a different macro is they prefer some vendor compiler instead
> of g++.

AC_PROG_CXX does not abort the configure script if it not expanded
before, say, AC_PROG_CC, as I wrote before.  AC_PROG_CXX allows you, the
configure.ac author, as well as you, the user invoking configure, to
specify alternate compilers other than g++.

If there is some freedom still lacking, then it is probably easier if we
put it in Autoconf's AC_PROG_CXX, than letting users use alternate ways
to enable C++.  But really, changing anything about the compiler macros
without breaking other stuff is difficult because so much third-party
code depends upon it.  I tend to be very cautious about that, we've been
burned there before.

> > may tack code onto the end of it.
> 
> Automake and Libtool modify the code of AC_PROG_CXX. Can't you come up
> with a better design than this?

Maybe.  But this has been in there for a very long time.

> > Using AC_PROG_CXX should enable you to drop use of internal
> > _AM_DEPENDENCIES([CXX]).
> 
> No, this is not an option for me.

See above; please explain why it else is not an option.

> Look at this: Automake apparently defines
>   CXXLINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) ...
> by default, and
>   CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) ...
> if it has spotted an LT_LANG([CXX]) invocation.
> 
> Why does is not define
>   CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) ...
> unconditionally?

I haven't doug that out yet, sorry.

Cheers,
Ralf




reply via email to

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