I need to link libmagic to my project which is built with autotools.
my current solution is: LIBS+="-lmagic"
in configure.ac
but I think that a more proper way to achieve this would be using PKG_CHECK_MODULES
macro in configure.ac
and LDADD = @MAGIC_LIBS@
in Makefile.am, unfortunately this isn't working.
here is what i'm getting from ./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.
I think this has something to do with the absence of libmagic in pkg-config, any ideas?