[PATCHv12,1/5] configure.ac: include configure.m4 if platform explicitly selected

Message ID 1428494416-20152-2-git-send-email-maxim.uvarov@linaro.org
State New
Headers show

Commit Message

Maxim Uvarov April 8, 2015, noon
configure script selects linux-generic as default platform and includes
platfrom specific configure scripts: ./platform/linux-generic/m4/configure.m4
In case if --with-platfrom=linux-generic was provided to configure platform
specific file is not included and that branch of code does not run.
This change has to be done for each platform since we have there pktio_env
scripts but m4_include macro does not recognize bash variables. So that there
is if check.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
---
 configure.ac | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Patch

diff --git a/configure.ac b/configure.ac
index 57054c5..7db2186 100644
--- a/configure.ac
+++ b/configure.ac
@@ -58,11 +58,18 @@  AC_ARG_WITH([platform],
         [select platform to be used, default linux-generic])],
     [],
     [with_platform=linux-generic
-     m4_include([./platform/linux-generic/m4/configure.m4])
     ])
 
 AC_SUBST([with_platform])
 
+if test  "${with_platform}" == "linux-generic";
+then
+	m4_include([./platform/linux-generic/m4/configure.m4])
+else
+	echo "UNSUPPORTED PLATFORM: ${with_platform}"
+	exit 1
+fi
+
 AC_ARG_WITH([sdk-install-path],
 AC_HELP_STRING([--with-sdk-install-path=DIR path to external libs and headers],
              [(or in the default path if not specified).]),