summaryrefslogtreecommitdiff
path: root/comms/obexftp/patches/patch-aa
blob: c4403a21c6329b364a74a48495824d64655f33d4 (plain)
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
$NetBSD: patch-aa,v 1.2 2006/07/17 12:29:57 xtraeme Exp $

--- aclocal.m4.orig	2006-05-16 15:50:36.000000000 +0100
+++ aclocal.m4
@@ -56,6 +56,9 @@ if test "$ac_bluetooth_enabled" = yes; t
 				#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 @@ if test "$ac_bluetooth_enabled" = yes; t
 				#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 @@ if test "$ac_bluetooth_enabled" = yes; t
 		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_DEFUN([SDPLIB_CHECK],[
 	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])