Re: trouble adding new macros to my configure.ac

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

 



On 4/22/2009 2:52 AM, Nina Nordstrom wrote:
Hello,
I have an autoconf problem I am trying to solve: Basically I need to add new
macros and use them in configure.ac... specifically, I would like to add a
macro called AX_GCC_ARCHFLAG found in the autoconf macro archive somewhere
in my package and then it in my configure.ac

Problem is, how do I do that? I tried to add this macro (and the
prerequisites) inside aclocal.m4, but it seems aclocal.m4 gets autogenerated
by aclocal whenever autoconf makes the configure script.

Is there a way to keep the macro in a separate file (eg ax_gcc_archflag) in
the same directory as configure.ac and tell that to configure.ac?

Nina,

If you use Autoconf alone, then aclocal.m4 is the place to put extra macro definitions. However, when you use it with Automake, then the aclocal utility gathers macro definitions from multiple locations and overwrites aclocal.m4 with these various extra sources. In this case, use acinclude.m4, as that's one of the places that aclocal gathers from to build the new aclocal.m4 file.

The newer approach is to use an m4 directory, as mentioned in another response. Either approach will work fine, but using an m4 directory is a bit more work.

John


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux