[Top][All Lists]

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

Passing modified options to nested configure

From: Christian Rössel
Subject: Passing modified options to nested configure
Date: Thu, 07 May 2009 15:08:24 +0200
User-agent: Thunderbird (X11/20060911)

Consider following cross-compile scenario where I want to build programs
and libraries for the host (backend) as well as for the build
(frontend). There are programs/libraries that should be build for the
frontend only, for the backend only and for the frontend as well as for
the backend. I issue following configure command

./configure --build=powerpc64-unknown-linux-gnu
--host=powerpc-bgp-linux-gnu CC=bgxlc CC_FOR_BUILD=xlc

which calls two configures in specific subdirs defined via

if test "x${cross_compiling}" = xyes; then
   AC_CONFIG_SUBDIRS([build-cross-frontend build-cross-backend])
   SUBDIRS_TO_USE="build-cross-frontend build-cross-backend"

Let's concentrate on the frontend case. I put following commands into
build-cross-frontend/ in order to use the correct compiler
and to disable cross-compiling mode.


So far, this works (BTW if there are other/better ways to accomplish
this, please tell me). Now there is a new requirement. We need to
incorporate a third party autotools-enabled project that should be build
only for the frontend. If I add


to build-cross-frontend/, then the third-party configure is
called with all the options build-cross-frontend/configure was called,
especially --build=powerpc64-unknown-linux-gnu
--host=powerpc-bgp-linux-gnu CC=bgxlc CC_FOR_BUILD=xlc.

The third-party configure switches to cross-compiling mode and uses the
wrong compiler, hm, that's not good.

The question is, is there a way to override/modify the options that
build-cross-frontend/configure passes to
new-third-party-project/configure? In particular I need to override CC
and --host. Can this be done without modifying the third-party


Forschungszentrum Jülich GmbH
52425 Jülich

Sitz der Gesellschaft: Jülich
Eingetragen im Handelsregister des Amtsgerichts Düren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Bärbel Brumme-Bothe
Geschäftsführung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt

reply via email to

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