From: Dmitry Eremin-Solenikov <dmitry.ereminsoleni...@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.ereminsoleni...@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: c7d08f738718f049cece37227820be39f1274875
 **/
 configure.ac                           | 12 +++---------
 platform/linux-generic/m4/configure.m4 |  2 ++
 2 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/configure.ac b/configure.ac
index 442c85db4..c419df0f6 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
 

Reply via email to