summaryrefslogtreecommitdiff
path: root/check/check-cmd-options
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2012-08-19 07:36:36 -0700
committerDan Nicholson <dbn.lists@gmail.com>2012-08-19 08:03:00 -0700
commit305913a6b182dd57d185420b7eb4a71185dcf6ae (patch)
treeabaf36bb3c0d7e5eb32cdf9c62af99d2239f60f0 /check/check-cmd-options
parent4bce8b46b2835b43367467ef97e20ea47a1d8c83 (diff)
Handle POSIX shell for tests in configure and Makefile
Although the trick of finding a POSIX shell in the system PATH works fine most of the time, it has some drawbacks. * The commands must be copied into every test script. * The scripts are always forced to re-execute themselves. * There's no guarantee the sh found in `getconf PATH` is a POSIX shell and there's no way to override it. Move the handling of this shell to configure where we can detect it once. This gives preference to bash and ksh since they're typically POSIX compatible. It also uses the current PATH with the getconf PATH at the end which should allow things to work on platforms where getconf might not be available like mingw/msys. By specifying the shell in TESTS_ENVIRONMENT, automake will run each script with this shell and we can drop the re-exec dance.
Diffstat (limited to 'check/check-cmd-options')
-rwxr-xr-xcheck/check-cmd-options5
1 files changed, 0 insertions, 5 deletions
diff --git a/check/check-cmd-options b/check/check-cmd-options
index cd22f17..8b5ef4c 100755
--- a/check/check-cmd-options
+++ b/check/check-cmd-options
@@ -1,10 +1,5 @@
#! /bin/sh
-# Make sure we're POSIX
-if [ "$PKG_CONFIG_SHELL_IS_POSIX" != "1" ]; then
- PKG_CONFIG_SHELL_IS_POSIX=1 PATH=`getconf PATH` exec sh $0 "$@"
-fi
-
set -e
. ${srcdir}/common