Diff between 9b92507843dcaca2b15579553ae1b812e5ecff17 and 2cbd0d69eb0cffe672c3f94c7b4bf135de54c4fe

Changed Files

File Additions Deletions Status
.gitignore +1 -0 modified
Makefile.tools +23 -0 modified
bootstrap-configure +1 -0 modified
configure.ac +12 -1 modified

Full Patch

diff --git a/.gitignore b/.gitignore
index 2eb2c16..af205ec 100644
--- a/.gitignore
+++ b/.gitignore
@@ -122,6 +122,7 @@ emulator/btvirt
 emulator/b1ee
 emulator/hfp
 client/bluetoothctl
+mesh/meshctl
 
 src/bluetoothd.8
 src/bluetooth.service
diff --git a/Makefile.tools b/Makefile.tools
index 15858c0..8528439 100644
--- a/Makefile.tools
+++ b/Makefile.tools
@@ -13,6 +13,29 @@ client_bluetoothctl_LDADD = gdbus/libgdbus-internal.la src/libshared-glib.la \
 				@GLIB_LIBS@ @DBUS_LIBS@ -lreadline
 endif
 
+if MESH
+bin_PROGRAMS += mesh/meshctl
+
+mesh_meshctl_SOURCES = mesh/main.c \
+				mesh/node.h mesh/node.c \
+				mesh/gatt.h mesh/gatt.c \
+				mesh/crypto.h mesh/crypto.c \
+				mesh/keys.h \
+				mesh/net.h mesh/net.c \
+				mesh/prov.h mesh/prov.c \
+				mesh/util.h mesh/util.c \
+				mesh/agent.h mesh/agent.c \
+				mesh/prov-db.h mesh/prov-db.c \
+				mesh/config-model.h mesh/config-client.c \
+				mesh/config-server.c \
+				mesh/onoff-model.h mesh/onoff-model.c \
+				client/display.h client/display.c \
+				monitor/uuid.h monitor/uuid.c
+mesh_meshctl_LDADD = gdbus/libgdbus-internal.la src/libshared-glib.la \
+				lib/libbluetooth-internal.la \
+				@GLIB_LIBS@ @DBUS_LIBS@ -ljson-c -lreadline
+endif
+
 if MONITOR
 bin_PROGRAMS += monitor/btmon
 
diff --git a/bootstrap-configure b/bootstrap-configure
index 47926fc..658eef2 100755
--- a/bootstrap-configure
+++ b/bootstrap-configure
@@ -23,4 +23,5 @@ fi
 		--enable-android \
 		--enable-sixaxis \
 		--enable-midi \
+		--enable-mesh \
 		--disable-datafiles $*
diff --git a/configure.ac b/configure.ac
index 89b164b..6640351 100644
--- a/configure.ac
+++ b/configure.ac
@@ -212,6 +212,17 @@ AC_ARG_ENABLE(cups, AC_HELP_STRING([--disable-cups],
                 [disable CUPS printer support]), [enable_cups=${enableval}])
 AM_CONDITIONAL(CUPS, test "${enable_cups}" != "no")
 
+AC_ARG_ENABLE(mesh, AC_HELP_STRING([--enable-mesh],
+		[enable Mesh profile support]), [enable_mesh=${enableval}])
+AM_CONDITIONAL(MESH, test "${enable_mesh}" = "yes")
+
+if (test "${enable_mesh}" == "yes"); then
+	PKG_CHECK_MODULES(JSONC, json-c, dummy=yes,
+				AC_MSG_ERROR(json-c is required))
+	AC_SUBST(JSON_CFLAGS)
+	AC_SUBST(JSON_LIBS)
+fi
+
 AC_ARG_ENABLE(midi, AC_HELP_STRING([--enable-midi],
                 [enable MIDI support]), [enable_midi=${enableval}])
 AM_CONDITIONAL(MIDI, test "${enable_midi}" = "yes")
@@ -237,7 +248,7 @@ AC_ARG_ENABLE(client, AC_HELP_STRING([--disable-client],
 		[disable command line client]), [enable_client=${enableval}])
 AM_CONDITIONAL(CLIENT, test "${enable_client}" != "no")
 
-if (test "${enable_client}" != "no"); then
+if (test "${enable_client}" != "no" || test "${enable_mesh}" == "yes"); then
         AC_CHECK_HEADERS(readline/readline.h, enable_readline=yes,
                 AC_MSG_ERROR(readline header files are required))
 fi