[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [hivex][PATCH v2] OS X, bootstrap: Locate pkg.m4

Ah ha.

Sorry for going quiet on the pkgconfig issue, but I got flustered when I tried in a Lion VM a day or two later and things just worked, no ACLOCAL_PATH twiddling necessary.  Things did not just work in my laptop.  I scratched my head and let it sit until I would have access to a fuller test environment.

Today I found out why my laptop couldn't pick up pkg-config: MacPorts in Snow Leopard was where the problem I was describing last manifested.  aclocal isn't even in a port; I think it comes in with XCode.

So, aclocal and pkgconfig were a mess in that OS X version, and my laptop carried the mess forward when I upgraded to Lion.  Jim's suggestion works well after installing the pkgconfig port, so there is a sufficient workaround.

I don't think there's a more graceful, automatic approach for an OS soon to be 2 versions behind; though, I'm not sure how MacPorts deals with old OS ports.  I have notes in a README for now that cover this packaging glitch.  Thanks, guys!


On Tue, Jun 12, 2012 at 9:46 AM, Jim Meyering <jim meyering net> wrote:
Richard W.M. Jones wrote:
> On Mon, Jun 11, 2012 at 11:54:14AM -0700, Alex Nelson wrote:
>> OS X does not include pkg-config by default.  This causes ./configure
>> to fail when invoking PKG_CHECK_MODULES for libxml2.
>> This change autodetects the path for aclocal, c/o RWMJ noting the real
>> problem is a deficiency in aclocal on OS X.
>> Signed-off-by: Alex Nelson <ajnelson cs ucsc edu>
>> ---
>>  bootstrap |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>> diff --git a/bootstrap b/bootstrap
>> index b2960c1..52c05d5 100755
>> --- a/bootstrap
>> +++ b/bootstrap
>> @@ -86,4 +86,4 @@ $gnulib_tool                       \
>>    --import $modules
>>  # Disable autopoint and libtoolize, since they were already done above.
>> -AUTOPOINT=true LIBTOOLIZE=true autoreconf --verbose --install
>> +AUTOPOINT=true LIBTOOLIZE=true ACLOCAL_PATH=$(aclocal --print-ac-dir) autoreconf --verbose --install
> I don't understand why this would be necessary.
> Your aclocal has the ac-dir configured to /opt/local/share/aclocal
> already, which means it should already be searching that directory for
> pkg.m4.  If it's not, then it either a bug in aclocal or (more likely)
> a bug in the MacPorts version of aclocal.
> In either case, I suggest just adding ACLOCAL_PATH to your own
> environment, or fixing MacPorts to not be broken.

I agree.

I've noticed that when installing my own versions of autoconf and automake,
part of the manual post-installation procedure must include running a command
like this (adapted assuming you've installed with --prefix=/opt/local):

   printf '%s/share/aclocal\n' /opt/local /usr
     >> $(aclocal --print-ac-dir)/dirlist

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]