OSDN Git Service

build: Support building client without tools enabled
authorMarcel Holtmann <marcel@holtmann.org>
Tue, 11 Dec 2012 21:19:13 +0000 (22:19 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 11 Dec 2012 21:19:13 +0000 (22:19 +0100)
Makefile.tools
configure.ac

index df728e7..ef58588 100644 (file)
@@ -1,4 +1,10 @@
 
+if CLIENT
+noinst_PROGRAMS += client/bluetoothctl
+client_bluetoothctl_SOURCES = client/main.c
+client_bluetoothctl_LDADD = @GLIB_LIBS@ @DBUS_LIBS@ -lreadline
+endif
+
 if TOOLS
 bin_PROGRAMS += tools/rfcomm tools/l2ping tools/l2test tools/rctest \
                                tools/hciattach tools/hciconfig \
@@ -71,12 +77,6 @@ emulator_btvirt_SOURCES = emulator/main.c monitor/bt.h \
 emulator_b1ee_SOURCES = emulator/b1ee.c monitor/mainloop.h monitor/mainloop.c
 
 if READLINE
-if CLIENT
-noinst_PROGRAMS += client/bluetoothctl
-client_bluetoothctl_SOURCES = client/main.c
-client_bluetoothctl_LDADD = @GLIB_LIBS@ @DBUS_LIBS@ -lreadline
-endif
-
 bin_PROGRAMS += attrib/gatttool
 attrib_gatttool_SOURCES = attrib/gatttool.c attrib/att.c attrib/gatt.c \
                                attrib/gattrib.c btio/btio.c \
index 203d647..e8a389d 100644 (file)
@@ -99,14 +99,6 @@ AC_ARG_ENABLE(tools, AC_HELP_STRING([--disable-tools],
                [disable Bluetooth tools]), [enable_tools=${enableval}])
 AM_CONDITIONAL(TOOLS, test "${enable_tools}" != "no")
 
-AC_ARG_ENABLE(readline, AC_HELP_STRING([--disable-readline],
-               [disable readline support]), [enable_readline=${enableval}])
-if (test "${enable_tools}" != "no" && test "${enable_readline}" != "no"  ); then
-       AC_CHECK_HEADERS(readline/readline.h, dummy=yes,
-               AC_MSG_ERROR(readline header files are required))
-fi
-AM_CONDITIONAL(READLINE, test "${enable_readline}" != "no")
-
 AC_ARG_ENABLE(usb, AC_HELP_STRING([--disable-usb],
                        [disable USB support]), [enable_usb=${enableval}])
 if (test "${enable_tools}" != "no" && test "${enable_usb}" != "no"  ); then
@@ -170,8 +162,13 @@ AM_CONDITIONAL(OBEX, test "${enable_obex}" != "no")
 
 AC_ARG_ENABLE(client, AC_HELP_STRING([--disable-client],
                [disable command line client]), [enable_client=${enableval}])
-AM_CONDITIONAL(CLIENT, test "${enable_client}" != "no" &&
-                                       test "${enable_readline}" != "no")
+AM_CONDITIONAL(CLIENT, test "${enable_client}" != "no")
+
+if (test "${enable_client}" != "no"); then
+        AC_CHECK_HEADERS(readline/readline.h, enable_readline=yes,
+                AC_MSG_ERROR(readline header files are required))
+fi
+AM_CONDITIONAL(READLINE, test "${enable_readline}" = "yes")
 
 AC_ARG_ENABLE(systemd, AC_HELP_STRING([--disable-systemd],
                [disable systemd integration]), [enable_systemd=${enableval}])