Paolo Bonzini wrote:
On 11/18/2009 05:26 AM, Mark Heily wrote:
I believe that libkqueue r101 solves this problem by changing the output of `pkg-config --libs` from this:
-L${libdir} -lkqueue
to this:
${libdir}/libkqueue.la
Does it actually make a difference? libtool should look for the .la file anyway, and now you've forced every libkqueue.pc client to use libtool... :-)
Paolo
Good question. The description of PKG_CHECK_MODULES Autoconf macro in the pkg-config manpage doesn't say anything about libtool [1]. Likewise, the libtool documentation doesn't say anything about pkg-config. I assumed that adding the .la file to the .pc file was the only way to get them to work together. However, you are correct that Libtool is smart enough to look for the .la file and use it instead of the output of `pkg-config --libs`. Thanks for pointing this out, and I have committed r102 that sets the pkg-config Libs variable to: Libs: -L${libdir} -lpthread -lrt -lkqueue Regards, - Mark [1] From pkg-config(1): PKG_CHECK_MODULES(VARIABLE-PREFIX,MODULES[,ACTION-IF-FOUND,[ACTION-IF- NOT-FOUND]]) The macro PKG_CHECK_MODULES can be used in configure.ac to check whether modules exist. A typical usage would be: PKG_CHECK_MODULES([MYSTUFF], [gtk+-2.0 >= 1.3.5 libxml = 1.8.4]) This would result in MYSTUFF_LIBS and MYSTUFF_CFLAGS substitu- tion variables, set to the libs and cflags for the given module list.