diff options
| author | Patrick Williams <patrick@stwcx.xyz> | 2016-11-04 16:45:33 -0500 |
|---|---|---|
| committer | Patrick Williams <patrick@stwcx.xyz> | 2016-11-04 16:45:33 -0500 |
| commit | 5e0b68172395c45d8eb8fcc6756201cb061bd2c9 (patch) | |
| tree | b776ff0f831eca332b41edc0f59b061767c04382 | |
| parent | ac521135d0abc95ecb2b56caf4363ff36dae5a76 (diff) | |
| download | sdbusplus-5e0b68172395c45d8eb8fcc6756201cb061bd2c9.tar.gz sdbusplus-5e0b68172395c45d8eb8fcc6756201cb061bd2c9.zip | |
build: autotools-based install of headers
Change-Id: Ie54f22002bc4fb382770c8cab606642f6072ffae
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
| -rw-r--r-- | Makefile.am | 16 | ||||
| -rwxr-xr-x | bootstrap.sh | 18 | ||||
| -rw-r--r-- | configure.ac | 50 |
3 files changed, 84 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..07076d7 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,16 @@ +nobase_include_HEADERS = \ + mapbox/recursive_wrapper.hpp \ + mapbox/variant.hpp \ + sdbusplus/bus.hpp \ + sdbusplus/message.hpp \ + sdbusplus/message/append.hpp \ + sdbusplus/message/read.hpp \ + sdbusplus/server.hpp \ + sdbusplus/server/interface.hpp \ + sdbusplus/server/manager.hpp \ + sdbusplus/server/match.hpp \ + sdbusplus/server/object.hpp \ + sdbusplus/slot.hpp \ + sdbusplus/utility/tuple_to_array.hpp \ + sdbusplus/utility/type_traits.hpp \ + sdbusplus/vtable.hpp diff --git a/bootstrap.sh b/bootstrap.sh new file mode 100755 index 0000000..50b75b7 --- /dev/null +++ b/bootstrap.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +AUTOCONF_FILES="Makefile.in aclocal.m4 ar-lib autom4te.cache compile \ + config.guess config.h.in config.sub configure depcomp install-sh \ + ltmain.sh missing *libtool test-driver" + +case $1 in + clean) + test -f Makefile && make maintainer-clean + for file in ${AUTOCONF_FILES}; do + find -name "$file" | xargs -r rm -rf + done + exit 0 + ;; +esac + +autoreconf -i +echo 'Run "./configure ${CONFIGURE_FLAGS} && make"' diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..cc8de8a --- /dev/null +++ b/configure.ac @@ -0,0 +1,50 @@ +# Initialization +AC_PREREQ([2.69]) +AC_INIT([sdbusplus], [1.0], [https://github.com/openbmc/sdbusplus/issues]) +AC_CONFIG_HEADERS([config.h]) +AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign dist-xz]) +AM_SILENT_RULES([yes]) + +# Checks for programs. +AC_PROG_CC +AM_PROG_AR +AC_PROG_INSTALL +AC_PROG_MAKE_SET + +# Checks for libraries. +PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 221]) + +# 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])]) + +# Checks for typedefs, structures, and compiler characteristics. +AX_APPEND_COMPILE_FLAGS([-fpic -Wall -Werror], [CFLAGS]) + +# Checks for library functions. +LT_INIT # Removes 'unrecognized options: --with-libtool-sysroot' + +# Check/set gtest specific functions. +AX_PTHREAD([GTEST_CPPFLAGS="-DGTEST_HAS_PTHREAD=1"],[GTEST_CPPFLAGS="-DGTEST_HAS_PTHREAD=0"]) +AC_SUBST(GTEST_CPPFLAGS) + +AC_ARG_ENABLE([oe-sdk], + AS_HELP_STRING([--enable-oe-sdk], [Link testcases absolutely against OE SDK so they can be ran within it.]) +) +AC_ARG_VAR(OECORE_TARGET_SYSROOT, + [Path to the OE SDK SYSROOT]) +AS_IF([test "x$enable_oe_sdk" == "xyes"], + AS_IF([test "x$OECORE_TARGET_SYSROOT" == "x"], + AC_MSG_ERROR([OECORE_TARGET_SYSROOT must be set with --enable-oe-sdk]) + ) + AC_MSG_NOTICE([Enabling OE-SDK at $OECORE_TARGET_SYSROOT]) + [ + testcase_flags="-Wl,-rpath,\${OECORE_TARGET_SYSROOT}/lib" + testcase_flags="${testcase_flags} -Wl,-rpath,\${OECORE_TARGET_SYSROOT}/usr/lib" + testcase_flags="${testcase_flags} -Wl,-dynamic-linker,`find \${OECORE_TARGET_SYSROOT}/lib/ld-*.so | sort -r -n | head -n1`" + ] + AC_SUBST([OESDK_TESTCASE_FLAGS], [$testcase_flags]) +) + +# Create configured output +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT |

