diff options
author | Brad Bishop <bradleyb@us.ibm.com> | 2017-02-02 19:07:15 -0500 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2017-02-09 11:45:22 +0000 |
commit | 243cd14fec622459822dc4e62b367ebe1a3a09c8 (patch) | |
tree | 08ab667796ba2786e9680fc61ce0f6a920591621 /configure.ac | |
parent | d6f8a360fa246c65149e3b249158cb2ee68bfa32 (diff) | |
download | phosphor-dbus-interfaces-243cd14fec622459822dc4e62b367ebe1a3a09c8.tar.gz phosphor-dbus-interfaces-243cd14fec622459822dc4e62b367ebe1a3a09c8.zip |
build: Add option to disable libphosphor_dbus
Add an option to disable libphosphor_dbus (YAML only).
Change-Id: I94107e4fede2668c29ce101d339b0488e92cefca
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 45 |
1 files changed, 26 insertions, 19 deletions
diff --git a/configure.ac b/configure.ac index 2618cdb..64c28bc 100644 --- a/configure.ac +++ b/configure.ac @@ -17,32 +17,39 @@ AC_CHECK_PROG([FIND], find, find) AC_CHECK_PROG([BASENAME], basename, basename) AC_CHECK_PROG([DIRNAME], dirname, dirname) -AC_PATH_PROG([SDBUSPLUSPLUS], [sdbus++]) -AS_IF([test "x$SDBUSPLUSPLUS" == "x"], - AC_MSG_ERROR([Cannot find sdbus++])) +AC_ARG_ENABLE([libphosphor_dbus], + AS_HELP_STRING([--disable-libphosphor_dbus], [Disable libphosphor_dbus])) -# Checks for libraries. -PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 221],, - [AC_MSG_ERROR(["systemd required and not found."])]) +AM_CONDITIONAL([WANT_LIBPHOSPHOR_DBUS], [test "x$enable_libphosphor_dbus" != "xno"]) -# Checks for typedefs, structures, and compiler characteristics. -AX_CXX_COMPILE_STDCXX_14([noext]) -AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CFLAGS]) -AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS]) +AS_IF([test "x$enable_libphosphor_dbus" != "xno"], [ + AC_PATH_PROG([SDBUSPLUSPLUS], [sdbus++]) + AS_IF([test "x$SDBUSPLUSPLUS" == "x"], + AC_MSG_ERROR([Cannot find sdbus++])) -# Checks for header files. -AC_CHECK_HEADER(sdbusplus/server.hpp, ,[AC_MSG_ERROR([Could not find sdbusplus/server.hpp...sdbusplus package required])]) + # Checks for libraries. + PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 221],, + [AC_MSG_ERROR(["systemd required and not found."])]) -# Checks for library functions. -LT_INIT([dlopen disable-static shared]) -LT_LIB_DLLOAD + # Checks for typedefs, structures, and compiler characteristics. + AX_CXX_COMPILE_STDCXX_14([noext]) + AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CFLAGS]) + AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS]) -# Create configured output -AC_CONFIG_FILES([Makefile.interfaces], - [${srcdir}/generate_makefile.sh ${srcdir} > Makefile.interfaces]) + # Checks for header files. + AC_CHECK_HEADER(sdbusplus/server.hpp, ,[AC_MSG_ERROR([Could not find sdbusplus/server.hpp...sdbusplus package required])]) + + # Checks for library functions. + LT_INIT([dlopen disable-static shared]) + LT_LIB_DLLOAD + + # Create configured output + AC_CONFIG_FILES([Makefile.interfaces], + [${srcdir}/generate_makefile.sh ${srcdir} > Makefile.interfaces]) + AC_CONFIG_FILES([phosphor-dbus-interfaces.pc]) +]) AC_CONFIG_FILES([Makefile.yaml], [${srcdir}/generate_yaml_makefile.sh ${srcdir} > Makefile.yaml]) AC_CONFIG_FILES([Makefile]) -AC_CONFIG_FILES([phosphor-dbus-interfaces.pc]) AC_OUTPUT |