|
From: | John Calcote |
Subject: | Re: trouble adding new macros to my configure.ac |
Date: | Wed, 22 Apr 2009 17:09:36 -0600 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b3pre) Gecko/20090223 Thunderbird/3.0b2 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |