diff options
| author | Brad Bishop <bradleyb@us.ibm.com> | 2016-11-10 16:24:48 -0500 |
|---|---|---|
| committer | Brad Bishop <bradleyb@us.ibm.com> | 2016-11-16 23:17:08 -0500 |
| commit | 14275cfd5c9e1ef4dc47a0fb66b654dbe3e48700 (patch) | |
| tree | 8a23916b697977f6d6fb4c0ccde44f71c70d60c8 | |
| parent | de32f577aa5d8840135cf6e20aa1ca88d3d030a1 (diff) | |
| download | sdbusplus-14275cfd5c9e1ef4dc47a0fb66b654dbe3e48700.tar.gz sdbusplus-14275cfd5c9e1ef4dc47a0fb66b654dbe3e48700.zip | |
Enable configure of just sdbus++
Change-Id: I9910ef3c8d632ea4ed71dbf49c48c0cd798441f7
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
| -rw-r--r-- | Makefile.am | 3 | ||||
| -rw-r--r-- | configure.ac | 17 | ||||
| -rw-r--r-- | test/Makefile.am | 3 |
3 files changed, 19 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am index 5b39bc1..c60ff10 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,5 @@ +if WANT_LIBSDBUSPLUS + nobase_include_HEADERS = \ mapbox/recursive_wrapper.hpp \ mapbox/variant.hpp \ @@ -16,4 +18,5 @@ nobase_include_HEADERS = \ sdbusplus/utility/type_traits.hpp \ sdbusplus/vtable.hpp +endif SUBDIRS = test tools diff --git a/configure.ac b/configure.ac index 35fde11..cb613b8 100644 --- a/configure.ac +++ b/configure.ac @@ -25,14 +25,23 @@ AS_IF([test "x$enable_sdbuspp" != "xno"], AM_CONDITIONAL([WANT_SDBUSPP], [test "x$enable_sdbuspp" != "xno"]) -# Checks for libraries. -PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 221]) +# setup libsdbusplus +PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 221], [have_systemd=yes], [have_systemd=no]) +AC_ARG_ENABLE([libsdbusplus], + AS_HELP_STRING([--disable-libsdbusplus], [Disable libsdbusplus])) + +AS_IF([test "x$enable_libsdbusplus" != "xno"], + [AS_IF([test "x$have_systemd" = "xno"], [AC_MSG_ERROR([libsdbusplus requires systemd])])]) + +AM_CONDITIONAL([WANT_LIBSDBUSPLUS], [test "x$enable_libsdbusplus" != "xno"]) # Checks for header files. -AC_CHECK_HEADER(systemd/sd-bus.h, ,[AC_MSG_ERROR([Could not find systemd/sd-bus.h...systemd developement package required])]) +AS_IF([test "x$enable_libsdbusplus" = "xyes"], + [AC_CHECK_HEADER(systemd/sd-bus.h, ,[AC_MSG_ERROR([Could not find systemd/sd-bus.h...systemd developement package required])])]) # Checks for typedefs, structures, and compiler characteristics. -AX_CXX_COMPILE_STDCXX_14([noext]) +AS_IF([test "x$enable_libsdbusplus" = "xyes"], + [AX_CXX_COMPILE_STDCXX_14([noext])]) AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CFLAGS]) AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS]) diff --git a/test/Makefile.am b/test/Makefile.am index 15e8f72..e89fea1 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,3 +1,5 @@ +if WANT_LIBSDBUSPLUS + AM_CPPFLAGS = -I$(top_srcdir) check_PROGRAMS = @@ -25,3 +27,4 @@ utility_type_traits_SOURCES = utility/type_traits.cpp check_PROGRAMS += vtable_vtable vtable_vtable_SOURCES = vtable/vtable.cpp vtable/vtable_c.c +endif |

