automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 27/32] configure: testsuite shell can return early from "dot-sour


From: Stefano Lattarini
Subject: [PATCH 27/32] configure: testsuite shell can return early from "dot-sourced" files
Date: Thu, 26 Jul 2012 14:04:53 +0200

* configure.ac: Check that the shell selected to run the test
scripts can call 'return' form within a file being sourced
with the '.' built-in.

Signed-off-by: Stefano Lattarini <address@hidden>
---
 configure.ac | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/configure.ac b/configure.ac
index 45143c0..d54cae0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -328,6 +328,14 @@ AC_DEFUN([_AM_CHECK_CANDIDATE_SHELL],
       [(set -x; P=1 true 2>&3) 3>&1 2>/dev/null | grep P=1],
       [am_score=9], [])
 
+    echo 'return 34' > conftest-return.sh
+    echo 'ok=no' >> conftest-return.sh
+    _AM_CHECK_SHELL_FEATURE([$1],
+      [can return early from "dot-sourced" files],
+      [ok=yes; . ./conftest-return.sh; test $? -eq 34 && test $ok = yes],
+      [rm -f conftest-return.sh],
+      [rm -f conftest-return.sh; am_score=1; break])
+
     echo 'alias false=echo' > conftest-alias.sh
     echo 'false && test "$(false 97)" = 97' >> conftest-alias.sh
     _AM_CHECK_SHELL_FEATURE([$1],
-- 
1.7.12.rc0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]