lpereira / lwan

Experimental, scalable, high performance HTTP server
https://lwan.ws
GNU General Public License v2.0
5.92k stars 549 forks source link

Usage of pkg-config to find lualib #70

Closed rafaelmartins closed 9 years ago

rafaelmartins commented 9 years ago

Hello,

people usually does not rely on pkg-config for lua because the .pc file isn't installed by default by the Makefile, and the name may change between distributions. E.g. the original name of the file in upstream tarball is lua.pc, while your cmake setup is looking for lua5.1.pc

[]'s

craigbarnes commented 9 years ago

You can just call pkg-config --exists on each possible name until you find one. For example:

lpereira commented 9 years ago

I followed @craigbarnes' suggestion and committed a possible fix. Should you encounter trouble finding Lua libraries after that commit, please reopen the issue.

rafaelmartins commented 9 years ago

This is still wrong, unfortunatelly. The lua=5.1 bit isn't valid, because the lua.pc file includes the micro version, then this will never match what you want it to match.

rafaelmartins commented 9 years ago

P.S.: don't know how to reopen the issue

lpereira commented 9 years ago

Would lua>=5.1 work?

rafaelmartins commented 9 years ago

Maybe, but lua 5.2 will satify the dependency too. lwan is supposed to work with lua-5.2?

rafaelmartins commented 9 years ago

lua>=5.1,lua<5.2 works fine