[libvirt] [PATCH] autogen: allow aclocal to receive arguments via an environment variable

Justin Clift jclift at redhat.com
Sun Sep 19 07:21:38 UTC 2010


On Mac OS X, the "Homebrew" build system (one of the three main ones)
has its m4 macro directory placed in a user configurable location.

This patch adds a simple way to pass this configuration information to
aclocal, using an environment variable called ACLOCAL_FLAGS. This allows
the packaging of libvirt into the Homebrew build system.

ie:
    $ export ACLOCAL_FLAGS="-I /path/to/m4/macro/dir/"
---

Although this patch works, I'm kind of expecting Eric will have a better way
of achieving what this is trying to do, so this will get NACKed.  No stress. :)

 README-hacking |    6 ++++++
 bootstrap      |    2 +-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/README-hacking b/README-hacking
index 80b022c..74f3bed 100644
--- a/README-hacking
+++ b/README-hacking
@@ -33,6 +33,12 @@ reduce download time and disk space requirements:
 
         $ export GNULIB_SRCDIR=/path/to/gnulib
 
+Also, if you have M4 macro files (.m4) in a non-standard location,
+you can include them in the build process with the ACLOCAL_FLAGS
+environment variable:
+
+        $ export ACLOCAL_FLAGS="-I /path/to/extra/macro/dir"
+
 The next step is to get all required pieces from gnulib,
 to run autoreconf, and to invoke ./configure:
 
diff --git a/bootstrap b/bootstrap
index 2422549..593e0b2 100755
--- a/bootstrap
+++ b/bootstrap
@@ -775,7 +775,7 @@ grep -E '^[	 ]*AC_CONFIG_HEADERS?\>' configure.ac >/dev/null ||
 
 for command in \
   libtool \
-  "${ACLOCAL-aclocal} --force -I m4" \
+  "${ACLOCAL-aclocal} --force -I m4 ${ACLOCAL_FLAGS}" \
   "${AUTOCONF-autoconf} --force" \
   "${AUTOHEADER-autoheader} --force" \
   "${AUTOMAKE-automake} --add-missing --copy --force-missing"
-- 
1.7.2.1




More information about the libvir-list mailing list