Matt Spinler | f716f32 | 2017-02-28 09:37:38 -0600 | [diff] [blame] | 1 | AC_PREREQ([2.69]) |
| 2 | AC_INIT([openpower-proc-control], [1.0], [https://github.com/openbmc/openpower-proc-control/issues]) |
| 3 | AC_LANG([C++]) |
| 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 | AC_PROG_INSTALL #Checks/sets the install variable to be used |
| 10 | AC_PROG_MAKE_SET |
| 11 | |
| 12 | # Checks for typedefs, structures, and compiler characteristics. |
Vernon Mauery | b3d7131 | 2018-10-04 10:09:58 -0700 | [diff] [blame] | 13 | AX_CXX_COMPILE_STDCXX_17([noext]) |
Matt Spinler | f716f32 | 2017-02-28 09:37:38 -0600 | [diff] [blame] | 14 | AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS]) |
| 15 | |
| 16 | # Checks for library functions |
| 17 | LT_INIT |
| 18 | |
Matt Spinler | 597e05c | 2017-02-28 09:59:53 -0600 | [diff] [blame] | 19 | # Check/set gtest specific functions. |
| 20 | AX_PTHREAD([GTEST_CPPFLAGS="-DGTEST_HAS_PTHREAD=1"],[GTEST_CPPFLAGS="-DGTEST_HAS_PTHREAD=0"]) |
| 21 | AC_SUBST(GTEST_CPPFLAGS) |
| 22 | AC_ARG_ENABLE([oe-sdk], |
| 23 | AS_HELP_STRING([--enable-oe-sdk], [Link testcases absolutely against OE SDK so they can be ran within it.]) |
| 24 | ) |
| 25 | AC_ARG_VAR(OECORE_TARGET_SYSROOT, |
| 26 | [Path to the OE SDK SYSROOT]) |
| 27 | AS_IF([test "x$enable_oe_sdk" == "xyes"], |
| 28 | AS_IF([test "x$OECORE_TARGET_SYSROOT" == "x"], |
| 29 | AC_MSG_ERROR([OECORE_TARGET_SYSROOT must be set with --enable-oe-sdk]) |
| 30 | ) |
| 31 | AC_MSG_NOTICE([Enabling OE-SDK at $OECORE_TARGET_SYSROOT]) |
| 32 | [ |
| 33 | testcase_flags="-Wl,-rpath,\${OECORE_TARGET_SYSROOT}/lib" |
| 34 | testcase_flags="${testcase_flags} -Wl,-rpath,\${OECORE_TARGET_SYSROOT}/usr/lib" |
| 35 | testcase_flags="${testcase_flags} -Wl,-dynamic-linker,`find \${OECORE_TARGET_SYSROOT}/lib/ld-*.so | sort -r -n | head -n1`" |
| 36 | ] |
| 37 | AC_SUBST([OESDK_TESTCASE_FLAGS], [$testcase_flags]) |
| 38 | ) |
| 39 | |
Matt Spinler | ee401e9 | 2017-09-18 14:15:31 -0500 | [diff] [blame] | 40 | #CHIPS can be passed in a from a recipe, or it will default to P9 and openfsi |
Matt Spinler | 12bdf05 | 2017-03-09 16:01:39 -0600 | [diff] [blame] | 41 | AC_ARG_VAR(CHIPS, [The list of chips to build the procedures for]) |
Matt Spinler | ee401e9 | 2017-09-18 14:15:31 -0500 | [diff] [blame] | 42 | AS_IF([test "x$CHIPS" == "x"], [CHIPS="p9 openfsi"]) |
Matt Spinler | 12bdf05 | 2017-03-09 16:01:39 -0600 | [diff] [blame] | 43 | |
| 44 | AC_CONFIG_FILES([Makefile.generated], |
Matt Spinler | cc2403c | 2017-03-17 11:07:06 -0500 | [diff] [blame] | 45 | [${srcdir}/gen_makefile.sh ${srcdir} "$myChips" > Makefile.generated], |
Matt Spinler | 12bdf05 | 2017-03-09 16:01:39 -0600 | [diff] [blame] | 46 | [myChips="$CHIPS"]) |
| 47 | |
Matt Spinler | f716f32 | 2017-02-28 09:37:38 -0600 | [diff] [blame] | 48 | PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging],, [AC_MSG_ERROR([Could not find phosphor-logging...openbmc/phosphor-logging package required])]) |
Dhruvaraj Subhashchandran | 7ce535c | 2017-05-15 05:06:36 -0500 | [diff] [blame] | 49 | PKG_CHECK_MODULES([PHOSPHOR_DBUS_INTERFACES], [phosphor-dbus-interfaces], [], [AC_MSG_ERROR(["phosphor-dbus-interfaces required and not found."])]) |
Matt Spinler | ee401e9 | 2017-09-18 14:15:31 -0500 | [diff] [blame] | 50 | PKG_CHECK_MODULES([OPENPOWER_DBUS_INTERFACES], [openpower-dbus-interfaces], [], [AC_MSG_ERROR(["openpower-dbus-interfaces required and not found."])]) |
| 51 | |
Matt Spinler | 597e05c | 2017-02-28 09:59:53 -0600 | [diff] [blame] | 52 | AC_CONFIG_FILES([Makefile test/Makefile]) |
Matt Spinler | f716f32 | 2017-02-28 09:37:38 -0600 | [diff] [blame] | 53 | AC_OUTPUT |