Vishwanatha Subbanna | 8a89b53 | 2017-09-06 11:29:37 +0530 | [diff] [blame] | 1 | # Initialization |
| 2 | AC_PREREQ([2.69]) |
| 3 | AC_INIT([phosphor-user-manager], [1.0], [https://github.com/openbmc/phosphor-user-manager/issues]) |
| 4 | AC_LANG([C++]) |
| 5 | AC_CONFIG_HEADERS([config.h]) |
| 6 | AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign dist-xz]) |
| 7 | AM_SILENT_RULES([yes]) |
| 8 | |
| 9 | # Checks for programs. |
| 10 | AC_PROG_CXX |
| 11 | AC_PROG_INSTALL |
| 12 | AC_PROG_MAKE_SET |
| 13 | |
Vishwanatha Subbanna | d20225f | 2017-09-06 11:36:04 +0530 | [diff] [blame] | 14 | # Checks for libraries. |
| 15 | PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus],, [AC_MSG_ERROR([Could not find sdbusplus...openbmc/sdbusplus package required])]) |
| 16 | PKG_CHECK_MODULES([PHOSPHOR_DBUS_INTERFACES], [phosphor-dbus-interfaces],, [AC_MSG_ERROR([Could not find phosphor-dbus-interfaces...openbmc/phosphor-dbus-interfaces package required])]) |
Vishwanatha Subbanna | 070a3e4 | 2017-09-06 11:40:45 +0530 | [diff] [blame] | 17 | PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging],, [AC_MSG_ERROR([Could not find phosphor-logging...openbmc/phosphor-logging package required])]) |
Vishwanatha Subbanna | d20225f | 2017-09-06 11:36:04 +0530 | [diff] [blame] | 18 | |
| 19 | AC_ARG_VAR(USER_MANAGER_BUSNAME, [The Dbus busname to own]) |
| 20 | AS_IF([test "x$USER_MANAGER_BUSNAME" == "x"], [USER_MANAGER_BUSNAME="xyz.openbmc_project.User.Manager"]) |
| 21 | AC_DEFINE_UNQUOTED([USER_MANAGER_BUSNAME], ["$USER_MANAGER_BUSNAME"], [The DBus busname to own]) |
Vishwanatha Subbanna | 8a89b53 | 2017-09-06 11:29:37 +0530 | [diff] [blame] | 22 | |
Tom Joseph | 536ea32 | 2018-09-14 10:02:20 +0530 | [diff] [blame^] | 23 | AC_ARG_VAR(LDAP_MAPPER_MANAGER_BUSNAME, [The Dbus busname LDAP privilege mapper application]) |
| 24 | AS_IF([test "x$LDAP_MAPPER_MANAGER_BUSNAME" == "x"], [LDAP_MAPPER_MANAGER_BUSNAME="xyz.openbmc_project.LDAP.PrivilegeMapper"]) |
| 25 | AC_DEFINE_UNQUOTED([LDAP_MAPPER_MANAGER_BUSNAME], ["$LDAP_MAPPER_MANAGER_BUSNAME"], [The Dbus busname LDAP privilege mapper application]) |
| 26 | |
Vishwanatha Subbanna | 070a3e4 | 2017-09-06 11:40:45 +0530 | [diff] [blame] | 27 | # Default crypt algorithm to choose if one not found in shadow file |
| 28 | # Per crypt(3), 1 is for MD5 |
| 29 | AC_ARG_VAR(DEFAULT_CRYPT_ALGO, [The default crypt algorithm if one not found in shadow]) |
| 30 | AS_IF([test "x$DEFAULT_CRYPT_ALGO" == "x"], [DEFAULT_CRYPT_ALGO="1"]) |
| 31 | AC_DEFINE_UNQUOTED([DEFAULT_CRYPT_ALGO], ["$DEFAULT_CRYPT_ALGO"], [The default crypt algorithm if one not found in shadow]) |
| 32 | |
Vishwanatha Subbanna | 035a969 | 2017-09-15 18:50:43 +0530 | [diff] [blame] | 33 | # Check/set gtest specific functions. |
| 34 | AX_PTHREAD([GTEST_CPPFLAGS="-DGTEST_HAS_PTHREAD=1"],[GTEST_CPPFLAGS="-DGTEST_HAS_PTHREAD=0"]) |
| 35 | AC_SUBST(GTEST_CPPFLAGS) |
| 36 | |
| 37 | # Test cases require SDK so only build if we're told to (and SDK is available) |
| 38 | AC_ARG_ENABLE([oe-sdk], |
| 39 | AS_HELP_STRING([--enable-oe-sdk], [Link testcases absolutely against OE SDK so they can be ran within it.]) |
| 40 | ) |
| 41 | AC_ARG_VAR(OECORE_TARGET_SYSROOT, |
| 42 | [Path to the OE SDK SYSROOT]) |
| 43 | AS_IF([test "x$enable_oe_sdk" == "xyes"], |
| 44 | AS_IF([test "x$OECORE_TARGET_SYSROOT" == "x"], |
| 45 | AC_MSG_ERROR([OECORE_TARGET_SYSROOT must be set with --enable-oe-sdk]) |
| 46 | ) |
| 47 | AC_MSG_NOTICE([Enabling OE-SDK at $OECORE_TARGET_SYSROOT]) |
| 48 | [ |
| 49 | testcase_flags="-Wl,-rpath,\${OECORE_TARGET_SYSROOT}/lib" |
| 50 | testcase_flags="${testcase_flags} -Wl,-rpath,\${OECORE_TARGET_SYSROOT}/usr/lib" |
| 51 | testcase_flags="${testcase_flags} -Wl,-dynamic-linker,`find \${OECORE_TARGET_SYSROOT}/lib/ld-*.so | sort -r -n | head -n1`" |
| 52 | ] |
| 53 | AC_SUBST([OESDK_TESTCASE_FLAGS], [$testcase_flags]) |
| 54 | ) |
| 55 | |
Vishwanatha Subbanna | 8a89b53 | 2017-09-06 11:29:37 +0530 | [diff] [blame] | 56 | # Checks for typedefs, structures, and compiler characteristics. |
Vernon Mauery | 3618f44 | 2018-10-04 10:23:01 -0700 | [diff] [blame] | 57 | AX_CXX_COMPILE_STDCXX_17([noext]) |
Vishwanatha Subbanna | 8a89b53 | 2017-09-06 11:29:37 +0530 | [diff] [blame] | 58 | AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS]) |
| 59 | |
| 60 | # For libtools |
| 61 | LT_INIT |
| 62 | |
| 63 | # Create configured output |
Tom Joseph | 536ea32 | 2018-09-14 10:02:20 +0530 | [diff] [blame^] | 64 | AC_CONFIG_FILES([Makefile test/Makefile phosphor-ldap-mapper/Makefile]) |
Vishwanatha Subbanna | 8a89b53 | 2017-09-06 11:29:37 +0530 | [diff] [blame] | 65 | AC_OUTPUT |