diff options
author | Marri Devender Rao <devenrao@in.ibm.com> | 2017-09-20 04:17:58 -0500 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2017-10-11 17:14:08 +0000 |
commit | dd50846bed41a8f8c3197df3d863ed502279a426 (patch) | |
tree | 6f5dc69dd72c327df1487bef80f5a8f3db47e82a /configure.ac | |
parent | 37af9bacea7847f8990a93fc600fad19b3194751 (diff) | |
download | phosphor-logging-dd50846bed41a8f8c3197df3d863ed502279a426.tar.gz phosphor-logging-dd50846bed41a8f8c3197df3d863ed502279a426.zip |
Install elog parser and mako script for native processing
Installed elog parser and mako scripts are used by repositories
to build elog-errors.hpp for local application specific errors
Change-Id: I2353185d28db59b052d2167d6f37f1b385978bb3
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 49 |
1 files changed, 30 insertions, 19 deletions
diff --git a/configure.ac b/configure.ac index f912e14..b8af0cc 100644 --- a/configure.ac +++ b/configure.ac @@ -5,10 +5,6 @@ AC_LANG([C++]) AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign dist-xz]) AM_SILENT_RULES([yes]) -# Checks for typedefs, structures, and compiler characteristics. -AX_CXX_COMPILE_STDCXX_14([noext]) -AX_APPEND_COMPILE_FLAGS([-fpic -Wall -Werror], [CXXFLAGS]) - # Checks for programs AC_PROG_CXX AM_PROG_AR @@ -16,25 +12,40 @@ AC_PROG_INSTALL #Checks/sets the install variable to be used AC_PROG_MAKE_SET AC_PROG_MKDIR_P AC_CHECK_PROG([DIRNAME], dirname, dirname) -# Python -AM_PATH_PYTHON([2.7], [AC_SUBST([PYTHON], [echo "$PYTHON"])], [AC_MSG_ERROR( - [Could not find python-2.7 installed...python-2.7 is required])]) -# Surpress the --with-libtool-sysroot error -LT_INIT +# Check for compiler, packages only during target build. +# As the packages are not available on the host do not +# perform checks during native build. +AC_ARG_ENABLE([install_scripts], + AS_HELP_STRING([--enable-install_scripts], + [Enable installing parser and mako script]), + [], [install_scripts=yes]) +AM_CONDITIONAL([INSTALL_SCRIPTS], [test "x$enable_install_scripts" != "xno"]) +AS_IF([test "x$enable_install_scripts" != "xyes"], [ + # Checks for typedefs, structures, and compiler characteristics. + AX_CXX_COMPILE_STDCXX_14([noext]) + AX_APPEND_COMPILE_FLAGS([-fpic -Wall -Werror], [CXXFLAGS]) + + # Python + AM_PATH_PYTHON([2.7], [AC_SUBST([PYTHON], [echo "$PYTHON"])], [AC_MSG_ERROR( + [Could not find python-2.7 installed...python-2.7 is required])]) + + # Surpress the --with-libtool-sysroot error + LT_INIT -# Checks for libraries. -AX_PKG_CHECK_MODULES([SYSTEMD], [], [libsystemd >= 221], [], [AC_MSG_ERROR(["systemd required and not found."])]) + # Checks for libraries. + AX_PKG_CHECK_MODULES([SYSTEMD], [], [libsystemd >= 221], [], [AC_MSG_ERROR(["systemd required and not found."])]) -# sdbusplus is non-private because we have no library to link. -# If we ever have a library, move this to private. -AX_PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus], [], [], [AC_MSG_ERROR(["sdbusplus required and not found."])]) -AX_PKG_CHECK_MODULES([PHOSPHOR_DBUS_INTERFACES], [], [phosphor-dbus-interfaces], [], [AC_MSG_ERROR(["phosphor-dbus-interfaces required and not found."])]) + # sdbusplus is non-private because we have no library to link. + # If we ever have a library, move this to private. + AX_PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus], [], [], [AC_MSG_ERROR(["sdbusplus required and not found."])]) + AX_PKG_CHECK_MODULES([PHOSPHOR_DBUS_INTERFACES], [], [phosphor-dbus-interfaces], [], [AC_MSG_ERROR(["phosphor-dbus-interfaces required and not found."])]) -# Check for sdbus++ -AC_PATH_PROG([SDBUSPLUSPLUS], [sdbus++]) -AS_IF([test "x$SDBUSPLUSPLUS" == "x"], - AC_MSG_ERROR(["Requires sdbus++"])) + # Check for sdbus++ + AC_PATH_PROG([SDBUSPLUSPLUS], [sdbus++]) + AS_IF([test "x$SDBUSPLUSPLUS" == "x"], + AC_MSG_ERROR(["Requires sdbus++"])) +]) # Check/set gtest specific functions. AX_PTHREAD([GTEST_CPPFLAGS="-DGTEST_HAS_PTHREAD=1"],[GTEST_CPPFLAGS="-DGTEST_HAS_PTHREAD=0"]) |