summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorAndrew Geissler <andrewg@us.ibm.com>2016-10-10 12:43:48 -0500
committerAndrew Geissler <andrewg@us.ibm.com>2016-10-31 13:20:30 -0500
commit328889d5a6d0926f4876f3692713a759185812e1 (patch)
tree57b0a6b443e5c2809fbac3094494e6573a85919b /configure.ac
parentf855c3e54f2c06da0649a7dfc31f60d7a36bcd6f (diff)
downloadphosphor-logging-328889d5a6d0926f4876f3692713a759185812e1.tar.gz
phosphor-logging-328889d5a6d0926f4876f3692713a759185812e1.zip
Add in test case which validates elog client interface
Change-Id: I5c5f7a550a8f272251893ff616408c41d32281f9 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac25
1 files changed, 24 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 3f01c2e..7f8a446 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,6 +20,29 @@ PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 221])
AC_CHECK_HEADER(systemd/sd-journal.h, ,[AC_MSG_ERROR([Could not find \
systemd/sd-journal.h...systemd developement package required])])
+# Check/set gtest specific functions.
+AX_PTHREAD([GTEST_CPPFLAGS="-DGTEST_HAS_PTHREAD=1"],[GTEST_CPPFLAGS="-DGTEST_HAS_PTHREAD=0"])
+AC_SUBST(GTEST_CPPFLAGS)
+
+# Test cases require SDK so only build if we're told to (and SDK is available)
+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])
+)
+
AC_CONFIG_HEADERS([config.h])
-AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([Makefile test/Makefile])
AC_OUTPUT \ No newline at end of file
OpenPOWER on IntegriCloud