From a66050d7f4f3936f7da86e73f833f8e5a91f5ce6 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Mon, 10 Dec 2012 22:34:47 +0100 Subject: [PATCH] build: Do not install libbluetooth by default --- Makefile.am | 7 ++++++- configure.ac | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 1f9b9fe4e..c17638e71 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 01bd249a2..608e6b826 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") -- 2.47.3