bug-autoconf
[Top][All Lists]
Advanced

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

Re: Why my AC_CHECK_LIB can not work?


From: Mike Frysinger
Subject: Re: Why my AC_CHECK_LIB can not work?
Date: Thu, 21 Feb 2013 17:53:34 -0500
User-agent: KMail/1.13.7 (Linux/3.7.6; KDE/4.6.5; x86_64; ; )

On Wednesday 20 February 2013 00:09:31 Wang Sen wrote:
> I'm trying to build our project by autotools. When I was checking whether
> glib exists or not by the macro AC_CHECK_LIB, it always said no even if I
> have inst- alled glib-2.0 in my computer, which has Linux Mint 13
> installed.
> 
> The macro AC_CHECK_LIB in configure.ac:
> AC_CHECK_LIB([glib-2.0])
> 
> Here's information of glib-2.0 in my system:
> $ pkg-config --libs --cflags glib-2.0
> -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include 
> -lglib-2.0

don't use AC_CHECK_LIB if a package provides a pkg-config file.  use 
PKG_CHECK_MODULES instead:

        PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.12])

this will create $GLIB_CFLAGS and $GLIB_LIBS for you to use when 
compiling/linking.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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