It is possible for libbsd to not be usable due to the use of
"-isystem". See for example:
http://autobuild.buildroot.net/results/c8a/
c8a6001f437701ecc75f6c9252935645bda8a8c8/lldpd-0.9.4/config.log
In this case, just don't use it.
CFLAGS="$CFLAGS $libbsd_CFLAGS"
LIBS="$LIBS $libbsd_LIBS"
AC_MSG_CHECKING([if libbsd can be linked correctly])
- AC_LINK_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])],
+ AC_TRY_LINK([
+@%:@include <sys/time.h>
+@%:@include <sys/types.h>
+],[],
[
AC_MSG_RESULT(yes)
LLDP_CFLAGS="$LLDP_CFLAGS $libbsd_CFLAGS"