$OpenBSD: patch-configure_ac,v 1.4 2013/05/07 10:48:24 ajacoutot Exp $

https://bugzilla.gnome.org/show_bug.cgi?id=601890

--- configure.ac.orig	Mon Mar 25 12:33:35 2013
+++ configure.ac	Tue May  7 12:34:38 2013
@@ -54,10 +54,19 @@ fi
 
 AC_SUBST(HTTPD)
 
-PKG_CHECK_MODULES(USER_SHARE, glib-2.0 >= 2.28 gio-2.0 >= 2.26 gtk+-3.0 dbus-1 >= 1.1.1 dbus-glib-1 libnotify libcanberra-gtk3 gnome-bluetooth-1.0 >= 2.91.5)
+PKG_CHECK_MODULES(USER_SHARE, glib-2.0 >= 2.28 gio-2.0 >= 2.26 gtk+-3.0 dbus-1 >= 1.1.1 dbus-glib-1 libnotify libcanberra-gtk3)
 AC_SUBST(USER_SHARE_CFLAGS)
 AC_SUBST(USER_SHARE_LIBS)
 
+AC_ARG_ENABLE(bluetooth, AS_HELP_STRING([--disable-bluetooth],[compile without bluetooth support]),,enable_bluetooth=yes)
+if test "x$enable_bluetooth" = "xyes"; then
+  PKG_CHECK_MODULES(BLUETOOTH, gnome-bluetooth-1.0 >= 2.91.5)
+  AC_DEFINE(HAVE_BLUETOOTH, 1, [Set to true if gnome-bluetooth support is available])
+else
+  AC_MSG_WARN([Bluetooth support is disabled.])
+fi
+AM_CONDITIONAL(USE_BLUETOOTH, [test "$enable_bluetooth" = "yes"])
+
 AC_CHECK_LIB(socket, socket)
 
 have_socket=no
@@ -124,7 +133,7 @@ AC_ARG_WITH(nautilusdir,
 	    [ac_with_nautilusdir=""])
 
 PKG_CHECK_MODULES(EXTENSION,
-		   libnautilus-extension >= 2.91.7 gnome-bluetooth-1.0)
+		   libnautilus-extension >= 2.91.7)
 if test "${ac_with_nautilusdir}" = ""; then
 	ac_with_nautilusdir=`pkg-config --variable=extensiondir libnautilus-extension`
 fi
