2013-09-26 17:14:40 +02:00

37 lines
1.2 KiB
Plaintext

$NetBSD: patch-aa,v 1.2 2013/03/15 08:25:15 plunky Exp $
Check for -lbluetooth in addition to -lbluez, to make this compile on BSD.
--- configure.ac.orig 2007-10-16 12:42:45.000000000 +0000
+++ 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 <bluetooth/bluetooth.h> 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