autoconf check bfd library from binutils
on linux, autoconf 2.65, binutils 2.20.0. I need to do something like this:
AC_CHECK_HEADER([bfd.h],
[AC_DEFINE([HAVE_BFD_H])],
[AC_MSG_WARN([Header "bfd.h" from the binutils not found!])],
[[#ifdef HAVE_BFD_H
#include <bfd.h>
#endif]]
)
AC_SEARCH_LIBS([bfd_openr], [bfd],
[AC_MSG_RESULT([OK, found libbfd])],
[AC_MSG_ERROR([BFD library from the binutils package not found!])])
The second check fa开发者_StackOverflowiled, probably due to dependence to -lintl.
Can anybody here show me how to correct it? Thanks a lot!
Crack
The 5th argument to AC_SEARCH_LIBS is a list of libraries to use. Try:
AC_SEARCH_LIBS([bfd_openr], [bfd], [], [], [-lintl])
(I left the 3rd and 4th arguments empty for clarity, not as a recommendation to change.)
精彩评论