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 > > AC_DEFUN( [EG_MY_MACRO], > [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 pkg.m4. > > 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: https://www.gnu.org/software/automake/manual/automake.html#Macro-Search-Path echo /usr/local/share/aclocal >> /usr/share/aclocal/dirlist -- Eric Blake eblake@xxxxxxxxxx +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf