Alex Nelson
2012-Jun-11 17:55 UTC
[Libguestfs] [hivex][PATCH] OS X, bootstrap: Locate pkg.m4
OS X does not include pkg-config by default. When installed, pkg.m4 tends to end up in some place that is not the autotool-expected /usr/share/aclocal/. Add to bootstrap a path check so pkg.m4 can be found, so ./configure does not fail invoking PKG_CHECK_MODULES. Signed-off-by: Alex Nelson <ajnelson at cs.ucsc.edu> --- bootstrap | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/bootstrap b/bootstrap index b2960c1..8e4cb86 100755 --- a/bootstrap +++ b/bootstrap @@ -85,5 +85,10 @@ $gnulib_tool \ --tests-base=gnulib/tests \ --import $modules +# Locate pkg.m4 (installed in non-default location in OS X) +# (Passing non-existent paths with -I causes aclocal, invoked by autoreconf, to die.) +pkgm4dir=$(test -f /opt/local/share/aclocal/pkg.m4 && dirname /opt/local/share/aclocal/pkg.m4) || \ + $(test -f /usr/local/share/aclocal/pkg.m4 && dirname /usr/local/share/aclocal/pkg.m4) || \ + $(test -f /usr/share/aclocal/pkg.m4 && dirname /usr/share/aclocal/pkg.m4) + # Disable autopoint and libtoolize, since they were already done above. -AUTOPOINT=true LIBTOOLIZE=true autoreconf --verbose --install +AUTOPOINT=true LIBTOOLIZE=true autoreconf --verbose -I $pkgm4dir --install -- 1.7.3.1
Richard W.M. Jones
2012-Jun-11 18:22 UTC
[Libguestfs] [hivex][PATCH] OS X, bootstrap: Locate pkg.m4
On Mon, Jun 11, 2012 at 10:55:46AM -0700, Alex Nelson wrote:> OS X does not include pkg-config by default. When installed, pkg.m4 tends > to end up in some place that is not the autotool-expected /usr/share/aclocal/. > Add to bootstrap a path check so pkg.m4 can be found, so ./configure does > not fail invoking PKG_CHECK_MODULES. > > Signed-off-by: Alex Nelson <ajnelson at cs.ucsc.edu> > --- > bootstrap | 7 ++++++- > 1 files changed, 6 insertions(+), 1 deletions(-) > > diff --git a/bootstrap b/bootstrap > index b2960c1..8e4cb86 100755 > --- a/bootstrap > +++ b/bootstrap > @@ -85,5 +85,10 @@ $gnulib_tool \ > --tests-base=gnulib/tests \ > --import $modules > > +# Locate pkg.m4 (installed in non-default location in OS X) > +# (Passing non-existent paths with -I causes aclocal, invoked by autoreconf, to die.) > +pkgm4dir=$(test -f /opt/local/share/aclocal/pkg.m4 && dirname /opt/local/share/aclocal/pkg.m4) || \ > + $(test -f /usr/local/share/aclocal/pkg.m4 && dirname /usr/local/share/aclocal/pkg.m4) || \ > + $(test -f /usr/share/aclocal/pkg.m4 && dirname /usr/share/aclocal/pkg.m4) > + > # Disable autopoint and libtoolize, since they were already done above. > -AUTOPOINT=true LIBTOOLIZE=true autoreconf --verbose --install > +AUTOPOINT=true LIBTOOLIZE=true autoreconf --verbose -I $pkgm4dir --installNo -- the problem here is that aclocal on Mac OS X is broken. It hasn't been configured with the correct ac-dir: $ aclocal --print-ac-dir /usr/share/aclocal Anyway, try setting ACLOCAL_PATH to the /opt/local/share/aclocal directory, as described in the aclocal documentation. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top
Possibly Parallel Threads
- [hivex][PATCH v2] OS X, bootstrap: Locate pkg.m4
- [hivex] OS X: Augment pkg-config search path
- [PATCH 3/3] Mac OS X: Run glibtoolize in absence of libtoolize
- [PATCH libguestfs] avoid build-from-scratch failure due to missing daemon/configure
- [PATCH] Remove ocaml/.depend from git