[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: building static libraries for modules
From: |
Tommi Mäkitalo |
Subject: |
Re: building static libraries for modules |
Date: |
Tue, 5 Sep 2006 00:51:55 +0200 |
User-agent: |
KMail/1.9.1 |
Hi,
Am Montag, 4. September 2006 22:31 schrieb Ralf Wildenhues:
> Hello Tommi,
>
> * Tommi Mäkitalo wrote on Mon, Sep 04, 2006 at 10:19:28PM CEST:
> > When I try to put into my CXXFLAGS -DPKGLIBDIR=\"@address@hidden", I have a
> > proper string PKGLIBDIR in my source, but -DPKGLIBDIR=\"@address@hidden" is
> > not substituted. I tried to add AC_SUBST(pkglibdir) to my configure.in,
> > but it does not help.
>
> Is this different from this?
> http://lists.gnu.org/archive/html/automake/2006-08/msg00100.html
>
I don't want to define a new variable, but use this pkglibdir. I think, my
problem is different from that.
> If yes, please print
> grep pkglibdir Makefile.in Makefile
>
> If you reran autoconf and automake after adding the AC_SUBST, there
> should be a line
> pkglibdir = @pkglibdir@
>
with AC_SUBST in place I get:
$ grep pkglibdir Makefile.in Makefile
Makefile.in:pkglibdir = @pkglibdir@
Makefile.in:libtntdb_la_CXXFLAGS = -DPKGLIBDIR=\"@address@hidden"
Makefile:pkglibdir =
without AC_SUBST I get:
$ grep pkglibdir Makefile.in Makefile
Makefile.in:pkglibdir = $(libdir)/@PACKAGE@
Makefile.in:libtntdb_la_CXXFLAGS = -DPKGLIBDIR=\"@address@hidden"
Makefile:pkglibdir = $(libdir)/tntdb
Makefile:libtntdb_la_CXXFLAGS = -DPKGLIBDIR=\"@address@hidden"
> in Makefile.in, and a corresponding one with the substitution in
> Makefile. You can also peek at the new config.status file (after
> rebuilding) what it sets pkglibdir to. Maybe that helps you find
> the issue.
>
> If not, please show some preferably small reproducible example.
>
> Cheers,
> Ralf
When I put AC_SUBST(pkglibdir) into configure.in, Makefile.in does not define
pkglibdir any more. If I don't put this AC_SUBST in configure.in, Makefile.in
does define pkglibdir, but @pkglibdir@ is not expanded.
Because pkglibdir is a automake-variable, configure does not handle it. There
is a "./configure --libdir=..." but no "./configure --pkglibidr=...". I think
I either need to code it into configure with AC_ARG_WITH or just set my
CXXFLAGS to -D\"$(pkglibdir)\". But this way, it cannot be changed at
configure-time. pkglibdir just has not the same status as libdir.
I think pkglibdir should be defined by autoconf. I looked at the
directory-variables, which autoconf provides, but none of them is suitable
for these modules. They are comparable to plugins. Looks really like it is
best to use $(pkglibdir) and accept, that it is a shorthand for
$(libdir)/@PACKAGE.
Thank you for your help
Tommi