On Fri, Jun 08, 2012 at 03:20:28PM -0700, Alex Nelson wrote:
Hello all,
I found OS X still has one remaining issue in the autotools. OS X does not include
pkg-config by default, and whatever mechanism installs it places pkg.m4 in some location
among:
/opt/local/share/aclocal/pkg.m4
/usr/local/share/aclocal/pkg.m4
PKG_CHECK_MODULES isn't defined if pkg.m4 isn't in /usr/share/aclocal, so
./configure dies without augmenting aclocal's search path.
My question: What is the proper way to augment this path? I see two options available,
one at the top of hivex/Makefile.am:
ACLOCAL_AMFLAGS = -I m4 -I /opt/local/share/aclocal
If that works, then how about either:
aclocal -I /opt/local/share/aclocal
or:
make ACLOCAL_AMFLAGS="-I /opt/local/share/aclocal"
And one at the bottom of hivex/bootstrap:
AUTOPOINT=true LIBTOOLIZE=true autoreconf --verbose -I /opt/local/share/aclocal
--install
I just hard-coded one path into those example lines, as I'm simply not sure what the
PATH variable I should use is. aclocal dies if a non-existent path component is passed
with -I. If I understand correctly, PKG_CONFIG_PATH doesn't appear to be used for
finding the base pkg-config macros.
I can somewhat find the path in bootstrap with this clunky line:
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)
But I suspect there's a better way. Can someone help with what this would be?
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