Diff between bde025b912950450f6e3595a29154f0afb18aa6b and a66050d7f4f3936f7da86e73f833f8e5a91f5ce6

Changed Files

File Additions Deletions Status
Makefile.am +6 -1 modified
configure.ac +4 -0 modified

Full Patch

diff --git a/Makefile.am b/Makefile.am
index 1f9b9fe..c17638e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -72,6 +72,7 @@ local_headers = $(foreach file,$(lib_headers), lib/bluetooth/$(notdir $(file)))
 
 BUILT_SOURCES = $(local_headers) src/builtin.h
 
+if LIBRARY
 include_HEADERS += $(lib_headers)
 
 lib_LTLIBRARIES += lib/libbluetooth.la
@@ -80,10 +81,12 @@ lib_libbluetooth_la_SOURCES = $(lib_headers) \
 				lib/bluetooth.c lib/hci.c lib/sdp.c lib/uuid.c
 lib_libbluetooth_la_LDFLAGS = $(AM_LDFLAGS) -version-info 16:0:13
 lib_libbluetooth_la_DEPENDENCIES = $(local_headers)
+endif
 
 noinst_LTLIBRARIES += lib/libbluetooth-private.la
 
-lib_libbluetooth_private_la_SOURCES = $(lib_libbluetooth_la_SOURCES)
+lib_libbluetooth_private_la_SOURCES = $(lib_headers) \
+				lib/bluetooth.c lib/hci.c lib/sdp.c lib/uuid.c
 
 attrib_sources = attrib/att.h attrib/att-database.h attrib/att.c \
 		attrib/gatt.h attrib/gatt.c \
@@ -258,7 +261,9 @@ TESTS = $(unit_tests)
 
 pkgconfigdir = $(libdir)/pkgconfig
 
+if LIBRARY
 pkgconfig_DATA = bluez.pc
+endif
 
 DISTCHECK_CONFIGURE_FLAGS = --disable-datafiles --disable-udev
 
diff --git a/configure.ac b/configure.ac
index 01bd249..608e6b8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -89,6 +89,10 @@ if (test -n "${path_systemdunit}"); then
 fi
 AM_CONDITIONAL(SYSTEMD, test -n "${path_systemdunit}")
 
+AC_ARG_ENABLE(library, AC_HELP_STRING([--enable-library],
+		[install Bluetooth library]), [enable_library=${enableval}])
+AM_CONDITIONAL(LIBRARY, test "${enable_library}" = "yes")
+
 AC_ARG_ENABLE(test, AC_HELP_STRING([--enable-test],
 		[enable test/example scripts]), [enable_test=${enableval}])
 AM_CONDITIONAL(TEST, test "${enable_test}" = "yes")