1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
$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
|