Diff between 652229d7709b29432f9fdf9a36999a713b1600ed and 9de5c526eb7e925d52b43e7a43acfd9a76bfa39c

Changed Files

File Additions Deletions Status
.gitignore +1 -0 modified
Makefile.tools +4 -1 modified
client/main.c +31 -0 added
configure.ac +5 -0 modified

Full Patch

diff --git a/.gitignore b/.gitignore
index 33f8ea3..a182a45 100644
--- a/.gitignore
+++ b/.gitignore
@@ -66,6 +66,7 @@ tools/btsnoop
 monitor/btmon
 emulator/btvirt
 emulator/b1ee
+client/bluetoothctl
 
 doc/*.bak
 doc/*.stamp
diff --git a/Makefile.tools b/Makefile.tools
index 84213aa..9c23b99 100644
--- a/Makefile.tools
+++ b/Makefile.tools
@@ -71,8 +71,11 @@ emulator_btvirt_SOURCES = emulator/main.c monitor/bt.h \
 emulator_b1ee_SOURCES = emulator/b1ee.c monitor/mainloop.h monitor/mainloop.c
 
 if READLINE
-bin_PROGRAMS += attrib/gatttool
+noinst_PROGRAMS += client/bluetoothctl
+client_bluetoothctl_SOURCES = client/main.c
+client_bluetoothctl_LDADD = @GLIB_LIBS@ @DBUS_LIBS@ -lreadline
 
+bin_PROGRAMS += attrib/gatttool
 attrib_gatttool_SOURCES = attrib/gatttool.c attrib/att.c attrib/gatt.c \
 				attrib/gattrib.c btio/btio.c \
 				attrib/gatttool.h attrib/interactive.c \
diff --git a/client/main.c b/client/main.c
new file mode 100644
index 0000000..b38861a
--- /dev/null
+++ b/client/main.c
@@ -0,0 +1,31 @@
+/*
+ *
+ *  BlueZ - Bluetooth protocol stack for Linux
+ *
+ *  Copyright (C) 2012  Intel Corporation. All rights reserved.
+ *
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+int main(int argc, char *argv[])
+{
+	return 0;
+}
diff --git a/configure.ac b/configure.ac
index 0ae5c2c..cfead7f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -167,6 +167,11 @@ AC_SUBST(ICAL_CFLAGS)
 AC_SUBST(ICAL_LIBS)
 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")
+
 AC_ARG_ENABLE(datafiles, AC_HELP_STRING([--disable-datafiles],
 			[do not install configuration and data files]),
 					[enable_datafiles=${enableval}])