[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Getting AC_CONFIG_SUBDIRS output before AC_OUTPUT
From: |
Rhys Ulerich |
Subject: |
Getting AC_CONFIG_SUBDIRS output before AC_OUTPUT |
Date: |
Fri, 10 Jan 2014 11:45:40 -0600 |
Hi all,
I've got an autoconfiscated project and two subprojects where I'd like
to use AC_CONFIG_SUBDIRS. The subprojects configure scripts perform
some nontrivial checks, and dump their results into pkg-config files
sub1.pc and sub2.pc. The usual,
wait-until-AC_OUTPUT-to-invoke-subconfigure behavior won't generate
sub1.pc from sub1.pc.in until well after I need to snarf those
results.
I've done some reading on how Audacity tried doing this in the past
[1] but I'm unsure if a better pattern has arisen since then. In
particular, I notice that the hack [2] discussed in [1] doesn't cause
autoreconf to run on the subdirectories. This makes me think it is
broken.
I have tried issuing
AC_CONFIG_SUBDIRS([sub1])
AC_CONFIG_SUBDIRS([sub2])
_AC_OUTPUT_SUBDIRS
well before AC_OUTPUT in my configure.ac, which seems to solve the
autoreconf issue but it has the side-effect of configure being run
twice. First when _AC_OUTPUT_SUBDIRS is run and second when AC_OUTPUT
is encountered.
Is there some way to tell AC_OUTPUT that _AC_OUTPUT_SUBDIRS has
already been run? Possibly by redefining it to be empty?
I am way of manipulating $subdirs directly as [3] comments that
Makefiles can use $(subdirs).
The Audacity-related messages are quite old. Has a better pattern for
accomplishing this arisen in the meantime?
- Rhys
[1] http://lists.gnu.org/archive/html/autoconf/2008-05/msg00067.html
[2] http://audacity.googlecode.com/svn/audacity-src/trunk/m4/ax_config_dir.m4
[3] http://www.gnu.org/software/autoconf/manual/autoconf.html#Subdirectories
- Getting AC_CONFIG_SUBDIRS output before AC_OUTPUT,
Rhys Ulerich <=