Dear All, I have a (probably often heard) question.
My scenario is the following.
I have 3 packages. Let us call them A, B, and C.
A is installed somewhere with an A_config program that can tell me various configurations options about A. Eg A_config --ldflags can return as a string the LDFLAGS needed to link with A.
B is my main bundle
C is an extra library I distribute as a subdirectory of B and is optional.
I would like to use AC_CONFIG_SUBDIRS(C) to configure C.
However, the autoconf script for C has various enable switches that can be learned from the A_config script and are not really relevant for B.
My problem is the following.
AC_CONFIG_SUBDIRS(C) will run configure with the same command line switches as I ran configure with in B, but I want to turn on some extra --enable switches for configuring in C.
Any ideas as to how to do this?
I currently try and set various environment variables in the configure script for B. The env vars get their value from A using A_config. I then export them, and then when performing AC_CONFIG_SUBDIRS they pass on their values. So far so good.
The difficulty is when sometimes, during the post configure make,
configure is sometimes re-run just at the level of C, rather than
always in B -- some dependency tracking feature. In this case the environment variables made by B are not known as the configure for C is not run from
within the configure for B
There must be a simple solution to this. Sure I could use AC_CONFIG_COMMANDS but that just seems wrong really.
Any better ideas?
Balint
-- ------------------------------------------------------------------- Dr Balint Joo Post Doctoral Research Fellow School of Physics University of Edinburgh Mayfield Road, Edinburgh EH9 3JZ Scotland UK Tel: 0131 650 6469 (from UK) +44-131-650-6469 (from outwith UK) Fax: 0131 650 5902 (from UK) +44-131-650-5902 (from outwith UK) email: bj@xxxxxxxxxxx bj@xxxxxxxxxxxxxxxxx WWW : http://www.ph.ed.ac.uk/~bj -------------------------------------------------------------------