我需要链接libmagic到我的项目,它是用autotools构建的。链接图书馆和自动工具的正确方法
我目前的解决办法是:LIBS+="-lmagic"
在configure.ac
,但我认为更合适的方式,这将使用在Makefile.am configure.ac
和LDADD = @[email protected]
PKG_CHECK_MODULES
宏,不幸的是这是行不通的实现。
这里就是我从./configure
configure: error: Package requirements (magic) were not met:
No package 'magic' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
我觉得这事做在pkg-config中没有libmagic的, 任何想法得到些什么?