diff mbox series

[v3,2/8] configure: rework with-testdir check

Message ID 1504098014-29411-3-git-send-email-odpbot@yandex.ru
State Superseded
Headers show
Series [v3,1/8] configure: enable all tests by default | expand

Commit Message

Github ODP bot Aug. 30, 2017, 1 p.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


Rework with-testdir option handling to follow the rest of configure
options.

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

---
/** Email created from pull request 155 (lumag:improve-build-2)
 ** https://github.com/Linaro/odp/pull/155
 ** Patch: https://github.com/Linaro/odp/pull/155.patch
 ** Base sha: 7508c5ac906bb7cb1d339b4c5e924f3a18e504ca
 ** Merge commit sha: 1488a0e31aecd1fa958bf32f1c0ca0b0e0f56409
 **/
 configure.ac | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/configure.ac b/configure.ac
index c076b4cc..dcf14629 100644
--- a/configure.ac
+++ b/configure.ac
@@ -200,19 +200,18 @@  AC_SUBST(SDK_INSTALL_PATH)
 # Set the install directory for test binaries/scripts
 ##########################################################################
 AC_ARG_WITH([testdir],
-    AC_HELP_STRING([--with-testdir=DIR installation directory for tests]),
-	[if test "$withval" = "yes"; then
-	     testdir=$libdir/odp/tests
-	 else
-	     testdir=$withval
-	 fi], [])
+    [AC_HELP_STRING([--with-testdir=DIR], [installation directory for tests])],
+	[testdir=$withval],
+	[testdir=no])
+AS_IF([test "x$testdir" = "xyes"], [testdir=$libdir/odp/tests],
+      [test "x$testdir" = "xno"], [testdir=])
 AC_SUBST([testdir])
+AM_CONDITIONAL([test_installdir], [test "x$testdir" != "xno"])
 
 ##########################################################################
 # Set conditionals as computed within platform specific files
 ##########################################################################
 AM_CONDITIONAL([SDK_INSTALL_PATH_], [test "x${SDK_INSTALL_PATH_}" = "x1"])
-AM_CONDITIONAL([test_installdir], [test "$testdir" != ""])
 AM_CONDITIONAL([cunit_support], [test x$cunit_support = xyes ])
 AM_CONDITIONAL([HAVE_DOXYGEN], [test "x${DOXYGEN}" = "xdoxygen"])
 AM_CONDITIONAL([user_guide], [test "x${user_guides}" = "xyes" ])