[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why my AC_CHECK_LIB can not work?
From: |
Wang Sen |
Subject: |
Re: Why my AC_CHECK_LIB can not work? |
Date: |
Fri, 22 Feb 2013 18:11:39 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Feb 21, 2013 at 05:53:34PM -0500, Mike Frysinger wrote:
> 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])
Okay, thanks. But I still cannot check libraries without a pkg-config file such
as libjvm.so by AC_CHECK_LIB. Do you know the reason?
>
> this will create $GLIB_CFLAGS and $GLIB_LIBS for you to use when
> compiling/linking.
> -mike