Deepak Kodihalli | 2bba75d | 2016-11-30 00:46:49 -0600 | [diff] [blame] | 1 | AC_PREREQ([2.69]) |
| 2 | AC_INIT([openpower-vpd-parser], [1.0], [https://github.com/openbmc/openpower-vpd-parser/issues]) |
| 3 | |
| 4 | AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign dist-xz]) |
| 5 | AM_SILENT_RULES([yes]) |
| 6 | |
| 7 | # Checks for programs |
| 8 | AC_PROG_CXX |
| 9 | AM_PROG_AR |
| 10 | AC_PROG_INSTALL |
| 11 | AC_PROG_MAKE_SET |
| 12 | AM_PATH_PYTHON([2.7], |
| 13 | [AC_SUBST([PYTHON], [echo "$PYTHON"])], |
| 14 | [AC_MSG_ERROR([Could not find python-2.7 installed...python-2.7 is required])]) |
| 15 | |
| 16 | # Surpress the --with-libtool-sysroot error |
| 17 | LT_INIT |
| 18 | |
| 19 | # Checks for typedefs, structures, and compiler characteristics. |
| 20 | AX_CXX_COMPILE_STDCXX_14([noext]) |
| 21 | AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS]) |
| 22 | |
| 23 | # Test cases require SDK so only build if we're told to (and SDK is available) |
| 24 | AC_ARG_ENABLE([oe-sdk], |
| 25 | AS_HELP_STRING([--enable-oe-sdk], [Link testcases absolutely against OE SDK so they can be ran within it.]) |
| 26 | ) |
| 27 | AC_ARG_VAR(OECORE_TARGET_SYSROOT, |
| 28 | [Path to the OE SDK SYSROOT]) |
| 29 | AS_IF([test "x$enable_oe_sdk" == "xyes"], |
| 30 | AS_IF([test "x$OECORE_TARGET_SYSROOT" == "x"], |
| 31 | AC_MSG_ERROR([OECORE_TARGET_SYSROOT must be set with --enable-oe-sdk]) |
| 32 | ) |
| 33 | AC_MSG_NOTICE([Enabling OE-SDK at $OECORE_TARGET_SYSROOT]) |
| 34 | [ |
| 35 | testcase_flags="-Wl,-rpath,\${OECORE_TARGET_SYSROOT}/lib" |
| 36 | testcase_flags="${testcase_flags} -Wl,-rpath,\${OECORE_TARGET_SYSROOT}/usr/lib" |
| 37 | testcase_flags="${testcase_flags} -Wl,-dynamic-linker,`find \${OECORE_TARGET_SYSROOT}/lib/ld-*.so | sort -r -n | head -n1`" |
| 38 | ] |
| 39 | AC_SUBST([OESDK_TESTCASE_FLAGS], [$testcase_flags]) |
| 40 | ) |
| 41 | |
| 42 | AC_CONFIG_HEADERS([config.h]) |
Deepak Kodihalli | 901c5d9 | 2016-11-30 05:19:45 -0600 | [diff] [blame] | 43 | AC_CONFIG_FILES([Makefile test/Makefile]) |
Deepak Kodihalli | 2bba75d | 2016-11-30 00:46:49 -0600 | [diff] [blame] | 44 | AC_OUTPUT |