From d842176ec218c4417321b22a87fa33d037c84795 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 10 Feb 2008 05:27:22 +0000 Subject: Add option for installing generic tools --- acinclude.m4 | 16 ++++++++++++---- rfcomm/Makefile.am | 5 +++++ tools/Makefile.am | 14 ++++++++++++-- 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index c154d9b8..b0292eb7 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -195,15 +195,16 @@ AC_DEFUN([AC_ARG_BLUEZ], [ hidd_enable=no pand_enable=no dund_enable=no - test_enable=no cups_enable=no + test_enable=no manpages_enable=yes configfiles_enable=yes initscripts_enable=no pcmciarules_enable=no + tools_enable=yes bccmd_enable=no avctrl_enable=no - hid2hci_enable=${usb_found} + hid2hci_enable=no dfutool_enable=no dfubabel_enable=no @@ -228,12 +229,13 @@ AC_DEFUN([AC_ARG_BLUEZ], [ hidd_enable=${enableval} pand_enable=${enableval} dund_enable=${enableval} - test_enable=${enableval} cups_enable=${enableval} + test_enable=${enableval} manpages_enable=${enableval} configfiles_enable=${enableval} initscripts_enable=${enableval} pcmciarules_enable=${enableval} + tools_enable=${enableval} bccmd_enable=${enableval} avctrl_enable=${enableval} hid2hci_enable=${enableval} @@ -317,6 +319,7 @@ AC_DEFUN([AC_ARG_BLUEZ], [ dund_enable=${enableval} ]) + AC_ARG_ENABLE(test, AC_HELP_STRING([--enable-test], [install test programs]), [ test_enable=${enableval} ]) @@ -341,6 +344,10 @@ AC_DEFUN([AC_ARG_BLUEZ], [ pcmciarules_enable=${enableval} ]) + AC_ARG_ENABLE(tools, AC_HELP_STRING([--enable-tools], [install Bluetooth utilities]), [ + tools_enable=${enableval} + ]) + AC_ARG_ENABLE(bccmd, AC_HELP_STRING([--enable-bccmd], [install BCCMD interface utility]), [ bccmd_enable=${enableval} ]) @@ -417,12 +424,13 @@ AC_DEFUN([AC_ARG_BLUEZ], [ AM_CONDITIONAL(HIDD, test "${hidd_enable}" = "yes") AM_CONDITIONAL(PAND, test "${pand_enable}" = "yes") AM_CONDITIONAL(DUND, test "${dund_enable}" = "yes") - AM_CONDITIONAL(TEST, test "${test_enable}" = "yes") AM_CONDITIONAL(CUPS, test "${cups_enable}" = "yes") + AM_CONDITIONAL(TEST, test "${test_enable}" = "yes") AM_CONDITIONAL(MANPAGES, test "${manpages_enable}" = "yes") AM_CONDITIONAL(CONFIGFILES, test "${configfiles_enable}" = "yes") AM_CONDITIONAL(INITSCRIPTS, test "${initscripts_enable}" = "yes") AM_CONDITIONAL(PCMCIARULES, test "${pcmciarules_enable}" = "yes") + AM_CONDITIONAL(TOOLS, test "${tools_enable}" = "yes") AM_CONDITIONAL(BCCMD, test "${bccmd_enable}" = "yes") AM_CONDITIONAL(AVCTRL, test "${avctrl_enable}" = "yes" && test "${usb_found}" = "yes") AM_CONDITIONAL(HID2HCI, test "${hid2hci_enable}" = "yes" && test "${usb_found}" = "yes") diff --git a/rfcomm/Makefile.am b/rfcomm/Makefile.am index 5eec05e8..9baa8e67 100644 --- a/rfcomm/Makefile.am +++ b/rfcomm/Makefile.am @@ -1,4 +1,5 @@ +if TOOLS if CONFIGFILES confdir = $(sysconfdir)/bluetooth @@ -8,7 +9,9 @@ endif bin_PROGRAMS = rfcomm rfcomm_SOURCES = main.c parser.h parser.y lexer.l kword.h kword.c + rfcomm_LDADD = @BLUEZ_LIBS@ +endif AM_CFLAGS = @BLUEZ_CFLAGS@ @@ -16,9 +19,11 @@ INCLUDES = -I$(top_srcdir)/common BUILT_SOURCES = parser.h +if TOOLS if MANPAGES man_MANS = rfcomm.1 endif +endif AM_YFLAGS = -d diff --git a/tools/Makefile.am b/tools/Makefile.am index 2e5ecd68..5d677380 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,4 +1,12 @@ +if TOOLS +tools_programs = hcitool l2ping sdptool ciptool +tools_manfiles = hcitool.1 l2ping.1 sdptool.1 ciptool.1 +else +tools_programs = +tools_manfiles = +endif + if BCCMD bccmd_programs = bccmd bccmd_manfiles = bccmd.8 @@ -41,7 +49,7 @@ endif sbin_PROGRAMS = hciattach hciconfig $(bccmd_programs) $(avctrl_programs) $(hid2hci_programs) -bin_PROGRAMS = hcitool l2ping sdptool ciptool $(dfutool_programs) $(dfubabel_programs) +bin_PROGRAMS = $(tools_programs) $(dfutool_programs) $(dfubabel_programs) noinst_PROGRAMS = hcisecfilter ppporc @@ -51,6 +59,7 @@ hciattach_LDADD = @BLUEZ_LIBS@ hciconfig_SOURCES = hciconfig.c csr.h csr.c hciconfig_LDADD = @BLUEZ_LIBS@ $(top_builddir)/common/libhelper.a +if TOOLS hcitool_SOURCES = hcitool.c hcitool_LDADD = @BLUEZ_LIBS@ $(top_builddir)/common/libhelper.a @@ -59,6 +68,7 @@ l2ping_LDADD = @BLUEZ_LIBS@ sdptool_LDADD = @BLUEZ_LIBS@ $(top_builddir)/common/libhelper.a ciptool_LDADD = @BLUEZ_LIBS@ +endif ppporc_LDADD = @BLUEZ_LIBS@ @@ -94,7 +104,7 @@ AM_CFLAGS = @BLUEZ_CFLAGS@ @USB_CFLAGS@ INCLUDES = -I$(top_srcdir)/common if MANPAGES -man_MANS = hciattach.8 hciconfig.8 hcitool.1 l2ping.1 sdptool.1 ciptool.1 \ +man_MANS = hciattach.8 hciconfig.8 $(tools_manfiles) \ $(bccmd_manfiles) $(avctrl_manfiles) $(hid2hci_manfiles) \ $(dfutool_manfiles) $(dfubabel_manfiles) endif -- cgit