diff --git a/Makefile.tools b/Makefile.tools
index df728e7..ef58588 100644
--- a/Makefile.tools
+++ b/Makefile.tools
+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 \
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
[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
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}])