[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


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,
> > but it does not help.
> Is this different from this?
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

> 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 = @pkglibdir@ = -DPKGLIBDIR=\"@address@hidden"
        Makefile:pkglibdir =

without AC_SUBST I get:
        $ grep pkglibdir Makefile = $(libdir)/@PACKAGE@ = -DPKGLIBDIR=\"@address@hidden"
        Makefile:pkglibdir = $(libdir)/tntdb
        Makefile:libtntdb_la_CXXFLAGS = -DPKGLIBDIR=\"@address@hidden"

> 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, does not define 
pkglibdir any more. If I don't put this AC_SUBST 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 

Thank you for your help


reply via email to

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