[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CXXLINK in generated Makefiles
From: |
Dale E. Martin |
Subject: |
Re: CXXLINK in generated Makefiles |
Date: |
Mon, 6 Dec 2004 10:08:14 -0500 |
User-agent: |
Mutt/1.5.4i |
On Sun, Dec 05, 2004 at 06:55:23AM +0100, Alexandre Duret-Lutz wrote:
> Dale> AC_SUBST(CXX)
>
> This is superfluous if you already call AC_PROG_CXX.
OK, I've wondered about that.
> Dale> AC_SUBST(CXXLINK)
>
> This will override the Automake definition of this variable with
> the configure definition of it (which is empty, unless you set
> the variable explicitly).
I see.
> Dale> Any package including C++ code must define the output variable `CXX' in
> Dale> `configure.ac'; the simplest way to do this is to use the `AC_PROG_CXX'
> Dale> macro (*note Particular Program Checks: (autoconf)Particular
> Programs.).
> This means that CXX is not defined by Automake.
OK, after digesting this email thread I can see how it could mean that.
> Dale> A few additional variables are defined when a C++ source file is
> Dale> seen:
>
> Dale> [snip]
>
> Dale> `CXXLINK'
> Dale> The command used to actually link a C++ program.
>
> This means that CXXLINK is defined by Automake in Makefiles with
> C++ source files. It does not means that CXXLINK is defined at
> configure time. Automake just defines the variable in the
> Makefile.ins it outputs.
Perhaps that part of the documentation could be more explicit. "Automake
does not define CXX - that must be defined externally. To have autoconf
define it, many applications use AC_PROG_CXX. The following are defined by
automake in generated Makefiles" or something like that.
> I can't think of any clean way to obtain the Automake definition of
> CXXLINK for a non-Automake Makefile. (One idea would be to generate your
> Makefile.common.in by extracting the interesting bits of an
> automake-generated Makefile.in.)
I'll mull that one over.
> I believe the simplest solution is to call libtool as you always did, and
> simply add the missing --tag=CXX option.
The problem with that is that libtool < 1.5 does not support that option
and dies an ugly death when it's present. I guess I need to figure out how
to write an autoconf test to figure out the libtool version. Any
suggestions welcome - I'm certainly no autoconf wizard!
Thanks,
Dale
--
Dale E. Martin, Clifton Labs, Inc.
Senior Computer Engineer
address@hidden
http://www.cliftonlabs.com
pgp key available