pkgsrc/comms/obexftp/patches/patch-aa

69 lines
1.9 KiB
Text

$NetBSD: patch-aa,v 1.5 2009/07/20 05:56:03 hasso Exp $
--- 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__) || defined(__DragonFly__)
+ #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__) || defined(__DragonFly__)
+ 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( [
+ #if defined(__NetBSD__) || defined(__DragonFly__)
+ #include <bluetooth.h>
+ #include <sdp.h>
+ #else
#include <bluetooth/sdp.h>
+ #endif
],[
+ #if defined(__NetBSD__) || defined(__DragonFly__)
+ 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( [
+ #if defined(__NetBSD__) || defined(__DragonFly__)
+ #include <bluetooth.h>
+ #else
+ #include <bluetooth/bluetooth.h>
+ #endif
+
#include <openobex/obex.h>
#include <openobex/obex_const.h>
],[