[Top][All Lists]

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

Re: Multiple subdirectories with non-similar configure needs

From: Christian Rössel
Subject: Re: Multiple subdirectories with non-similar configure needs
Date: Fri, 1 Apr 2011 16:56:28 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20110223 Thunderbird/3.1.8

Hi Jim, hi Ralf, hi all,

On 03/29/2011 08:35 AM, Ralf Wildenhues wrote:
> Hello Jim,
> * Jim Galarowicz wrote on Mon, Mar 28, 2011 at 09:08:02PM CEST:
>> I was wondering if anyone can point me to any information on how to
>> configure from a top-level directory multiple sub-directories with
>> different configure requirements.
> Well, you can just write code yourself that calls the sub configure
> scripts with the arguments you intend for it.  Basically your own
> version of AC_CONFIG_SUBDIRS, if you like.

I wrote a macro (AC_CONFIG_SUBDIR_CUSTOM, patch applied) to pass
different arguments to different sub-configures. Like AC_CONFIG_SUBDIRS
it preserves
 * --cache-file
 * --silent
and passes always
 * --srcdir
 * --prefix
 * --disable-option-checking

AC_CONFIG_SUBDIR_CUSTOM takes at least two arguments, the directory
where the sub-configure resides and the additional arguments to be
passed to this specific sub-configure. An optional third parameter
controls if the sub-configure is recognized by a configure --help=recursive.

> GCC does this in its own tree (except the code is partly in the
> makefile, not only the toplevel configure script).
> For simple things, it often suffices to adjust $ac_configure_args during
> configure (beware of the eval quoting though!).
> However, you haven't written what kind of adjustments you need at all,
> so it's not clear how to help more.
>> My subdirectories are: libcbtf, libcbtf-xml, libcbtf-mrnet.  Each
>> subdirectory has different package requirements and has been set up
>> to use autoconf, automake, libtool, m4, etc..

Jim, you would use it like this in your toplevel

AC_CONFIG_SUBDIR_CUSTOM([libcbtf], [$arguments_to_libcbtf])
AC_CONFIG_SUBDIR_CUSTOM([libcbtf-xml], [$arguments_to_libcbtf-xml])
AC_CONFIG_SUBDIR_CUSTOM([libcbtf-mrnet], [$arguments_to_libcbtf-mrnet])


Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDirig Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt

Besuchen Sie uns auf unserem neuen Webauftritt unter

Description: Text Data

reply via email to

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