$NetBSD: patch-aa,v 1.1.1.1 2008/01/12 14:09:35 dillo Exp $ $FreeBSD$ Check for -lbluetooth in addition to -lbluez, to make this compile on BSD. --- configure.ac.orig 2007-10-16 14:42:45.000000000 +0200 +++ configure.ac @@ -78,20 +78,27 @@ AC_ARG_ENABLE(bluetooth, AS_HELP_STRING([--enable-bluetooth], [enable obex over bluetooth transports]), WANT_BLUETOOTH=$enableval) -PKG_CHECK_MODULES(LIBBLUETOOTH, bluez, HAVE_BLUETOOTH=yes, HAVE_BLUETOOTH=no) +PKG_CHECK_MODULES(LIBBLUETOOTH, bluez, + [HAVE_BLUETOOTH=yes + AC_DEFINE(HAVE_BLUETOOTH_BLUETOOTH_H, 1, [Define to 1 if you have the header file.])], + [AC_CHECK_LIB(bluetooth, bt_gethostbyname, + [HAVE_BLUETOOTH=yes + LIBBLUETOOTH_LIBS=-lbluetooth], + HAVE_BLUETOOTH=no)]) if test "x${HAVE_BLUETOOTH}" = "xyes"; then if test "x${WANT_BLUETOOTH}" = "xno"; then ENABLE_BLUETOOTH=no else AC_SUBST(LIBBLUETOOTH_CFLAGS) AC_SUBST(LIBBLUETOOTH_LIBS) + AC_SUBST(HAVE_BLUETOOTH_BLUETOOTH_H) ENABLE_BLUETOOTH=yes AC_SUBST(ENABLE_BLUETOOTH) AC_DEFINE(ENABLE_BLUETOOTH,1,[Bluetooth Transport]) fi else if test "x${WANT_BLUETOOTH}" = "xyes"; then - AC_MSG_ERROR("Bluez not found") + AC_MSG_ERROR("Bluetooth libraries not found") else ENABLE_BLUETOOTH=no fi