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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
--- aclocal.m4.orig 2006-05-16 16:50:36.000000000 +0200
+++ aclocal.m4 2006-10-22 10:07:38.000000000 +0200
@@ -56,6 +56,9 @@
#ifdef __FreeBSD__
#include <sys/types.h>
#include <bluetooth.h>
+ #elif defined(__NetBSD__)
+ #include <bluetooth.h>
+ #include <netbt/rfcomm.h>
#else /* Linux */
#include <sys/socket.h>
#include <bluetooth/bluetooth.h>
@@ -65,6 +68,9 @@
#ifdef __FreeBSD__
bdaddr_t bdaddr;
struct sockaddr_rfcomm addr;
+ #elif defined(__NetBSD__)
+ bdaddr_t bdaddr;
+ struct sockaddr_bt addr;
#else /* Linux */
bdaddr_t bdaddr;
struct sockaddr_rc addr;
@@ -76,6 +82,7 @@
AC_DEFINE([HAVE_BLUETOOTH], [1], [Define if system supports Bluetooth and it's enabled])
BLUETOOTH_CFLAGS=""
BLUETOOTH_LIBS="-lbluetooth"
+ AC_CHECK_LIB(sdp, sdp_open, BLUETOOTH_LIBS="$BLUETOOTH_LIBS -lsdp")
fi
AC_SUBST(BLUETOOTH_CFLAGS)
AC_SUBST(BLUETOOTH_LIBS)
@@ -92,14 +99,22 @@
AC_MSG_CHECKING(for Bluetooth SDP support)
AC_TRY_COMPILE( [
+ #ifdef __NetBSD__
+ #include <bluetooth.h>
+ #include <sdp.h>
+ #else
#include <bluetooth/sdp.h>
+ #endif
],[
+ #ifdef __NetBSD__
+ sdp_attr_t attr;
+ #else
sdp_list_t sdplist;
+ #endif
],
am_cv_sdplib_found=yes,
am_cv_sdplib_found=no
)
-
if test $am_cv_sdplib_found = yes; then
AC_DEFINE(HAVE_SDPLIB,1,[Define if system supports Bluetooth SDP])
@@ -118,6 +133,12 @@
AC_MSG_CHECKING(for USB support)
AC_TRY_COMPILE( [
+ #ifdef __NetBSD__
+ #include <bluetooth.h>
+ #else
+ #include <bluetooth/bluetooth.h>
+ #endif
+
#include <openobex/obex.h>
#include <openobex/obex_const.h>
],[
|