[Top][All Lists]

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

Re: Autoconf and nested projects

From: Guido Draheim
Subject: Re: Autoconf and nested projects
Date: Sat, 28 Dec 2002 19:07:38 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826

? wrote:

so here are ?y 2 questions:
1) how can i pass the --disable-shared option to the library ./configure
   during th ebuild process of my  project
2) how to avoid the library o be installed during my project installation

thanks for your solutions

Frankly, I would bind the secondary "manually", i.e. not as subconfigure,
so that somewhere in the toplevel configure it would be something like
(cd subdir && sh configure $theoptionsthatiwant). That's not particularly
nice since quite some "precious" variables migth be lost. However, it
makes handling of the rest a bit easier.

Perhaps someone with experience could join in, personally I do always cut
such a setup into pieces - that is, lib A and lib B are going into their
own parts, and a super-project C is made up that configures/makes both
A and B in the correct order. That's what some gnome build scripts are

Even without real experience, I'd like to point you to the following:
(1) AC_DISABLE_SHARED ... make the disable-shared the default, that
    might go per-sub-configure
(2) without modifications? errrrm, not quite. Again, cut it out of
    SUBDIRs and bind that one manually without install being up, otherwise
    change that ones automake file to noinst_LTLIBRARIES

Speaking of a realworld example, here is some real automake code that
I am using:

DIST_SUBDIRS = zzip zzipwrap bins test docs  SDL  zziplib
SUBDIRS =      zzip zzipwrap bins test docs @SDL@

That will ensure that the normal build/install targets of the toplevel
makefile will not recurse into SDL and zziplib by default but automake
itself can see them. In some of the subdirs, I can express library
dependencies, like

other_LIBADD = ../sub/

../sub/ : $(top_srcdir)/sub/*.c
    (cd ../sub && make `basename address@hidden)

That will ensure it is build/linked even when not being auto-recursed
from the toplevel-makefile.

Does that solve your problem?
-- cheers, guido                       

reply via email to

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