Diff between df13abbc7f8328a0ca42110a8328575c26efadbe and d4a93caffe79cb5506c25b78995f0327179a903e

Changed Files

File Additions Deletions Status
Makefile.tools +6 -6 modified
configure.ac +7 -10 modified

Full Patch

diff --git a/Makefile.tools b/Makefile.tools
index df728e7..ef58588 100644
--- a/Makefile.tools
+++ b/Makefile.tools
@@ -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 \
diff --git a/configure.ac b/configure.ac
index 203d647..e8a389d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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}])