diff options
-rw-r--r-- | acinclude.m4 | 24 | ||||
-rwxr-xr-x | bootstrap-configure | 6 | ||||
-rw-r--r-- | scripts/Makefile.am | 24 | ||||
-rw-r--r-- | scripts/bluetooth.rules | 3 |
4 files changed, 26 insertions, 31 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index e8626ff8d..9cbcfd237 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -196,12 +196,12 @@ AC_DEFUN([AC_ARG_BLUEZ], [ cups_enable=no test_enable=no bccmd_enable=no + pcmcia_enable=no hid2hci_enable=no dfutool_enable=no manpages_enable=yes + udevrules_enable=yes configfiles_enable=yes - initscripts_enable=no - pcmciarules_enable=no telephony_driver=dummy AC_ARG_ENABLE(fortify, AC_HELP_STRING([--disable-fortify], [disable compile time buffer checks]), [ @@ -256,6 +256,10 @@ AC_DEFUN([AC_ARG_BLUEZ], [ bccmd_enable=${enableval} ]) + AC_ARG_ENABLE(pcmcia, AC_HELP_STRING([--enable-pcmcia], [install PCMCIA script and udev rules]), [ + pcmcia_enable=${enableval} + ]) + AC_ARG_ENABLE(hid2hci, AC_HELP_STRING([--enable-hid2hci], [install HID mode switching utility]), [ hid2hci_enable=${enableval} ]) @@ -288,16 +292,12 @@ AC_DEFUN([AC_ARG_BLUEZ], [ manpages_enable=${enableval} ]) - AC_ARG_ENABLE(configfiles, AC_HELP_STRING([--enable-configfiles], [install Bluetooth config files]), [ - configfiles_enable=${enableval} - ]) - - AC_ARG_ENABLE(initscripts, AC_HELP_STRING([--enable-initscripts], [install Bluetooth boot scripts]), [ - initscripts_enable=${enableval} + AC_ARG_ENABLE(udevrules, AC_HELP_STRING([--enable-udevrules], [install Bluetooth on-demand udev rules]), [ + udevrules_enable=${enableval} ]) - AC_ARG_ENABLE(pcmciarules, AC_HELP_STRING([--enable-pcmciarules], [install PCMCIA udev rules]), [ - pcmciarules_enable=${enableval} + AC_ARG_ENABLE(configfiles, AC_HELP_STRING([--enable-configfiles], [install Bluetooth configuration files]), [ + configfiles_enable=${enableval} ]) AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [enable compiling with debugging information]), [ @@ -354,10 +354,10 @@ AC_DEFUN([AC_ARG_BLUEZ], [ AM_CONDITIONAL(TEST, test "${test_enable}" = "yes") AM_CONDITIONAL(TOOLS, test "${tools_enable}" = "yes") AM_CONDITIONAL(BCCMD, test "${bccmd_enable}" = "yes") + AM_CONDITIONAL(PCMCIA, test "${pcmcia_enable}" = "yes") AM_CONDITIONAL(HID2HCI, test "${hid2hci_enable}" = "yes" && test "${usb_found}" = "yes") AM_CONDITIONAL(DFUTOOL, test "${dfutool_enable}" = "yes" && test "${usb_found}" = "yes") AM_CONDITIONAL(MANPAGES, test "${manpages_enable}" = "yes") + AM_CONDITIONAL(UDEVRULES, test "${udevrules_enable}" = "yes") AM_CONDITIONAL(CONFIGFILES, test "${configfiles_enable}" = "yes") - AM_CONDITIONAL(INITSCRIPTS, test "${initscripts_enable}" = "yes") - AM_CONDITIONAL(PCMCIARULES, test "${pcmciarules_enable}" = "yes") ]) diff --git a/bootstrap-configure b/bootstrap-configure index 5ec8e4cfd..15b3ba7dc 100755 --- a/bootstrap-configure +++ b/bootstrap-configure @@ -26,7 +26,7 @@ fi --enable-dund \ --enable-test \ --enable-cups \ + --disable-pcmcia \ --disable-manpages \ - --disable-configfiles \ - --disable-initscripts \ - --disable-pcmciarules $* + --disable-udevrules \ + --disable-configfiles $* diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 494a9c2d4..df950f8ef 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -8,30 +8,22 @@ if HID2HCI rules_DATA += bluetooth-hid2hci.rules endif -if PCMCIARULES +if PCMCIA rules_DATA += bluetooth-serial.rules endif + +if UDEVRULES +rules_DATA += bluetooth.rules +endif endif -if PCMCIARULES +if PCMCIA udevdir = $(libexecdir)/udev udev_SCRIPTS = bluetooth_serial endif -EXTRA_DIST = bluetooth.init bluetooth.default bluetooth-hid2hci.rules \ - bluetooth-serial.rules bluetooth_serial +EXTRA_DIST = bluetooth.init bluetooth.default bluetooth.rules \ + bluetooth-hid2hci.rules bluetooth-serial.rules bluetooth_serial MAINTAINERCLEANFILES = Makefile.in - -if INITSCRIPTS -install-data-local: - $(INSTALL) -D -m 755 $(srcdir)/bluetooth.init $(DESTDIR)$(sysconfdir)/init.d/bluetooth - $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/default - [ -f $(DESTDIR)$(sysconfdir)/default/bluetooth ] || \ - $(INSTALL_DATA) $(srcdir)/bluetooth.default $(DESTDIR)$(sysconfdir)/default/bluetooth - -uninstall-local: - @rm -f $(DESTDIR)$(sysconfdir)/init.d/bluetooth - @rm -f $(DESTDIR)$(sysconfdir)/default/bluetooth -endif diff --git a/scripts/bluetooth.rules b/scripts/bluetooth.rules new file mode 100644 index 000000000..2a836050e --- /dev/null +++ b/scripts/bluetooth.rules @@ -0,0 +1,3 @@ +# Run helper every time a Bluetooth device appears +# On remove actions, bluetoothd should go away by itself +ACTION=="add", SUBSYSTEM=="bluetooth", RUN+="/usr/sbin/bluetoothd --udev" |