From 6719586d7564da542e602f98a9131b2762193661 Mon Sep 17 00:00:00 2001 From: Patrick Venture Date: Wed, 13 Feb 2019 08:24:00 -0800 Subject: build: pkg anti-pattern: use defaults Use the defaults in the pkg check where the default error message is sufficient to identify which package is missing. Change-Id: Iaa5325492d937899c06a5aecad9b6d1beaa81897 Signed-off-by: Patrick Venture --- configure.ac | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 471a7be..4f96c96 100644 --- a/configure.ac +++ b/configure.ac @@ -30,15 +30,13 @@ AC_CHECK_LIB([pam], [pam_start], [], [AC_MSG_ERROR([libpam not found])]) AC_CHECK_LIB([mapper], [mapper_get_service], ,[AC_MSG_ERROR([Could not find libmapper...openbmc/phosphor-objmgr package required])]) PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 221], [], [AC_MSG_ERROR(["systemd required and not found"])]) PKG_CHECK_MODULES([CRYPTO], [libcrypto >= 1.0.2g], ,[AC_MSG_ERROR([can't find openssl libcrypto])]) -PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging],, [AC_MSG_ERROR([Could not find phosphor-logging...openbmc/phosphor-logging package required])]) -PKG_CHECK_MODULES([PHOSPHOR_DBUS_INTERFACES], [phosphor-dbus-interfaces],, [AC_MSG_ERROR([Could not find phosphor-dbus-interfaces...openbmc/phosphor-dbus-interfaces package required])]) -PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus],,\ - AC_MSG_ERROR(["Requires sdbusplus package."])) +PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging]) +PKG_CHECK_MODULES([PHOSPHOR_DBUS_INTERFACES], [phosphor-dbus-interfaces]) +PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus]) AC_CHECK_HEADER(nlohmann/json.hpp, [], [AC_MSG_ERROR([Could not find nlohmann/json.hpp])]) AS_IF([test "x$enable_softoff" != "xno"], [ - PKG_CHECK_MODULES([SDEVENTPLUS], [sdeventplus],,\ - AC_MSG_ERROR(["Requires sdeventplus package."])) + PKG_CHECK_MODULES([SDEVENTPLUS], [sdeventplus]) # Check for sdbus++ tool AC_PATH_PROG([SDBUSPLUSPLUS], [sdbus++]) -- cgit v1.2.1