summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac6
-rw-r--r--user_channel/Makefile.am9
3 files changed, 16 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index e7a35a8..dc3e91e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -123,6 +123,7 @@ libipmi20_la_LDFLAGS = \
-version-info 0:0:0 -shared
libipmi20_la_CXXFLAGS = $(COMMON_CXX)
+if FEATURE_LIBUSERLAYER
providers_LTLIBRARIES += libusercmds.la
libusercmds_la_LIBADD = \
libipmid/libipmid.la \
@@ -135,6 +136,7 @@ libusercmds_la_LDFLAGS = \
$(libmapper_LIBS) \
-version-info 0:0:0 -shared
libusercmds_la_CXXFLAGS = $(COMMON_CXX)
+endif
providers_LTLIBRARIES += libsysintfcmds.la
libsysintfcmds_la_LIBADD = \
diff --git a/configure.ac b/configure.ac
index e13f5e8..869c53d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -192,6 +192,12 @@ AC_ARG_VAR(HOST_IPMI_LIB_PATH, [The file path to search for libraries.])
AS_IF([test "x$HOST_IPMI_LIB_PATH" == "x"], [HOST_IPMI_LIB_PATH="/usr/lib/ipmid-providers/"])
AC_DEFINE_UNQUOTED([HOST_IPMI_LIB_PATH], ["$HOST_IPMI_LIB_PATH"], [The file path to search for libraries.])
+# When disable-libuserlayer flag is set, libuserlayer won't be included in the build.
+AC_ARG_ENABLE([libuserlayer],
+ AS_HELP_STRING([--disable-libuserlayer], [Set a flag to exclude libuserlayer])
+)
+AM_CONDITIONAL(FEATURE_LIBUSERLAYER, [test "x$enable_libuserlayer" != "xno"])
+
# Create configured output
AC_CONFIG_FILES([
Makefile
diff --git a/user_channel/Makefile.am b/user_channel/Makefile.am
index 3860a39..747c4c8 100644
--- a/user_channel/Makefile.am
+++ b/user_channel/Makefile.am
@@ -12,7 +12,12 @@ COMMON_CXX = \
-DBOOST_ASIO_DISABLE_THREADS \
-DBOOST_ALL_NO_LIB
-lib_LTLIBRARIES = libuserlayer.la libchannellayer.la
+
+lib_LTLIBRARIES =
+
+if FEATURE_LIBUSERLAYER
+
+lib_LTLIBRARIES += libuserlayer.la
libuserlayer_la_SOURCES = \
user_layer.cpp \
user_mgmt.cpp \
@@ -29,7 +34,9 @@ libuserlayer_la_LDFLAGS = \
libuserlayer_la_CXXFLAGS = \
-I$(top_srcdir) \
$(COMMON_CXX)
+endif
+lib_LTLIBRARIES += libchannellayer.la
libchannellayer_la_SOURCES = \
channel_mgmt.cpp \
channel_layer.cpp
OpenPOWER on IntegriCloud