diff mbox series

[v4,4/10] configure: cleanup per-platform if

Message ID 1508317209-23610-5-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [v4,1/10] configure: use AS_HELP_STRING instead of AC_HELP_STRING | expand

Commit Message

Github ODP bot Oct. 18, 2017, 9 a.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


Move setting IMPLEMENTATION_NAME to platform configure.m4. Use AS_IF
instead of handcoded if. Use AC_MSG_ERROR instead of echo & exit.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 235 (lumag:plat-def-2)
 ** https://github.com/Linaro/odp/pull/235
 ** Patch: https://github.com/Linaro/odp/pull/235.patch
 ** Base sha: ec0c3145fcafa09ae3a79875e7e07dd4794583cc
 ** Merge commit sha: 3ecb623742a4220d83aa8929d5eef60c1abdeb45
 **/
 configure.ac                           | 12 +++---------
 platform/linux-generic/m4/configure.m4 |  2 ++
 2 files changed, 5 insertions(+), 9 deletions(-)
diff mbox series

Patch

diff --git a/configure.ac b/configure.ac
index 89ff486ff..4bce0534b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -165,15 +165,9 @@  AC_SUBST([with_platform])
 ##########################################################################
 # Run platform specific checks and settings
 ##########################################################################
-IMPLEMENTATION_NAME=""
-if test "${with_platform}" = "linux-generic";
-then
-    m4_include([./platform/linux-generic/m4/configure.m4])
-    IMPLEMENTATION_NAME="odp-linux"
-else
-    echo "UNSUPPORTED PLATFORM: ${with_platform}"
-    exit 1
-fi
+AS_IF([test "${with_platform}" = "linux-generic"],
+      [m4_include([./platform/linux-generic/m4/configure.m4])],
+      [AC_MSG_ERROR([UNSUPPORTED PLATFORM: ${with_platform}])])
 
 AC_DEFINE_UNQUOTED([IMPLEMENTATION_NAME], ["$IMPLEMENTATION_NAME"],
 		   [Define to the name of the implementation])
diff --git a/platform/linux-generic/m4/configure.m4 b/platform/linux-generic/m4/configure.m4
index 68a270d89..5d7ad35a1 100644
--- a/platform/linux-generic/m4/configure.m4
+++ b/platform/linux-generic/m4/configure.m4
@@ -1,3 +1,5 @@ 
+IMPLEMENTATION_NAME="odp-linux"
+
 ODP_VISIBILITY
 ODP_ATOMIC