autoconf
[Top][All Lists]
Advanced

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

Re: Using config binaries to find libraries and include dirs


From: Guillaume Rousse
Subject: Re: Using config binaries to find libraries and include dirs
Date: Thu, 01 Jun 2006 09:37:28 +0200
User-agent: Thunderbird 1.5.0.2 (X11/20060425)

Paulo J. Matos wrote:
> Hi all,
> 
> Some libraries include a xxx-config which accepts --libs or --includes
> and report the flags and the include dirs the compiler should use. How
> can one use this information in the context of autotools?
Usually something as:
AC_PATH_PROG(FOO_CONFIG, foo-config)
if test -n "$FOO_CONFIG"; then
    AC_DEFINE(HAVE_FOO)
    FOO_LIBS=`$FOO_CONFIG --libs`
    FOO_CFLAGS=`$FOO_CONFIG --cflags`   
fi

> Is there a
> way to tell autoconf which config-binary to use to a given lib?
You mean encapsulating the previous logic ? You may define it as a m4
macro, as some libs already do for instance.




reply via email to

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