我需要鏈接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的, 任何想法得到些什麼?