Re: Automatic rebuilds, LIBS, and autoheader

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

 



I accidentally sent the following to Stepan only.

On Thu, Jun 08, 2006 at 09:01:38PM +0200, Stepan Kasal wrote:
> Hello,
> 
> On Tue, Jun 06, 2006 at 08:23:26PM -0700, Micah J. Cowan wrote:
> >   AC_CHECK_LIB(readline, readline,
> >         [AC_DEFINE(HAVE_LIBREADLINE, 1,
> >           [Define to 1 if you have the `readline' library (libreadline).])],
> >         [AC_MSG_WARN([Won't build pitchcalc])])
> 
> well, I wouldn't hesitate to use the above.
> 
> But if you don't like it, you can separate the declaration from
> AC_DEFINE, using AH_TEMPLATE:
> 
> AH_TEMPLATE([HAVE_LIBREADLINE], [Define to 1 if you have the
> 	`readline' library (libreadline).]
> ...
> 
> Or you can use undocumented macro AH_CHECK_LIB:
> 
> AH_CHECK_LIB([readline])
> AH_CHECK_LIB([check])
> AH_CHECK_LIB([m])
> 
> Or, if you want to make in in one go for all three:
> 
> m4_foreach([A_LIB], [readline, check, m], [AH_CHECK_LIB(A_LIB)])

Thank you, this is /exactly/ what I needed.

I had looked at the source for AC_CHECK_LIB, but apparently I had glossed
over the first line of its code:

  m4_ifval([$3], , [AH_CHECK_LIB([$1])])dnl

...although, if I'm reading correctly, I'll need to still AC_DEFINE() in
/addition/ to AH_CHECK_LIB().

This probably warrants my own wrapper around both of those.

Thanks so much for your help!

-- 
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer...
http://micah.cowan.name/


_______________________________________________
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