[Top][All Lists]

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

Re: CXXLINK in generated Makefiles

From: Alexandre Duret-Lutz
Subject: Re: CXXLINK in generated Makefiles
Date: Sun, 05 Dec 2004 06:55:23 +0100
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

>>> "Dale" == Dale E Martin <address@hidden> writes:


 Dale> In my I have:

This is superfluous if you already call AC_PROG_CXX.


This will override the Automake definition of this variable with
the configure definition of it (which is empty, unless you set
the variable explicitly).


 Dale> And in fact, in all of the generated Makefiles CXXLINK is
 Dale> now undefined and therefore even scram won't build.  I
 Dale> find this somewhat perplexing, as the documentation
 Dale> implies that CXXLINK is available:

 Dale> Any package including C++ code must define the output variable `CXX' in
 Dale> `'; 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.

 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.

If you set CXXLINK yourself in, or AC_SUBST it from, Automake assumes you want to override its default
definition of CXXLINK.  Hence in your case CXXLINK gets your
empty definition and this breaks the build.

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 by extracting the interesting
bits of an automake-generated  I believe the simplest
solution is to call libtool as you always did, and simply add the
missing --tag=CXX option.


Alexandre Duret-Lutz

reply via email to

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