autoconf
[Top][All Lists]
Advanced

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

Re: AC_CONFIG_SUBDIRS Question


From: Ralf Wildenhues
Subject: Re: AC_CONFIG_SUBDIRS Question
Date: Sun, 23 May 2010 09:42:15 +0200
User-agent: Mutt/1.5.20 (2009-10-28)

Hello Paul,

* Paul Dugas wrote on Tue, May 11, 2010 at 04:49:28AM CEST:
> I have a project that's using AC_CONFIG_SUBDIRS to configure a separately
> maintained library.  The library is a C++ wrapper for another C library.
> Linking against the C++ wrapper library requires also linking against the C
> library.  i.e. "prog" has "libfooxx" in a subdir and linking with -lfooxx
> requires -lfoo.  The autoconf script for libfooxx adds -lfoo to LIBS so the
> test and example programs in the source package can link properly.
> 
> Is there a way for the additions to LIBS and CXXFLAGS made in the subpackage
> to be propagated up to the parent?

Not easily.

> Another route...  I'm using AX_CREATE_PKGCONFIG_INFO to create libfooxx.pc
> (and libfooxx-uninstalled) as part of the subpackage.  Should I just use
> that from the parent?  Suggestions how?

A common approach for this is to either use a pkgconfig file or to
provide a public Autoconf macro in a separate m4 file to be installed in
/usr/share/aclocal.  That macro then encapsulates the logic to link
against your library for third-party software.  This macro could provide
a --with-included-libFOO switch for such embedded cases.

Hope that helps.

Cheers,
Ralf



reply via email to

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