[Top][All Lists]

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

Re: simple autoconf question

From: Eric Blake
Subject: Re: simple autoconf question
Date: Tue, 20 Dec 2011 13:55:25 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0

On 12/20/2011 01:35 PM, Eric Gorr wrote:

[Your mailer produces long lines, which can be a problem when they
exceed 999 bytes; consider turn line-wrapping or format-flowed on]

> Ok. I have changed my code to
>   [m4_warn( [obsolete], [hello world] )]

That trailing space is _still_ part of your warning.  That is, you
effectively wrote:

[m4_warn( [obsolete], [hello world ])]

If you don't want the trailing space, then get used to putting ) right
after ].

> However, running this configure script does not result in "hello world" being 
> printed.

Of course not.  m4_warn is a warning _at autoconf_ time.  If you want a
warning _at configure_ time, then you have to use AC_WARNING.  In
general, m4_* macros are acted on at autoconf time when doing m4
processing to create configure, while AC_* macros cause actions when
running the generated configure.

>> The problem here is that the PKG_CHECK_MODULES macro is not defined at
>> autoconf time.  Perhaps aclocal needs to be run with an appropriate -I
>> option to find the macro (maybe it's installed in a nonstandard path, or
>> not installed at all?).
> I had considered this, but wasn't quite sure what do to about it.
> I did see 
>     /usr/local/share/aclocal/pkg.m4
> If I do 
>     aclocal --print-ac-dir
> I get:
>     /usr/bin/../share/aclocal
> What appears to work is the
>  following...
>     aclocal -I /usr/local/share/aclocal
>     autoconf
> What I am not sure of is how to confirm just what directories will be 
> searched for autoconf macros...? 'aclocal --print-ac-dir' still only outputs 
> '/usr/bin/../share/aclocal'

That's correct - your default installation of aclocal only searches
/usr/share/aclocal, and not also /usr/local/share/aclocal, which is why
you have to add the -I option to get it to expand its search and find

> What is the appropriate way to make my additional search location perminant?

That's a question for the automake list (since aclocal is an executable
from the automake package), but I'll answer it anyways:

echo /usr/local/share/aclocal >> /usr/share/aclocal/dirlist

Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]