summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--check/Makefile.am2
-rwxr-xr-xcheck/check-cflags5
-rwxr-xr-xcheck/check-cmd-options5
-rwxr-xr-xcheck/check-conflicts5
-rwxr-xr-xcheck/check-define-variable5
-rwxr-xr-xcheck/check-idirafter5
-rwxr-xr-xcheck/check-includedir5
-rwxr-xr-xcheck/check-libs5
-rwxr-xr-xcheck/check-libs-private5
-rwxr-xr-xcheck/check-missing5
-rwxr-xr-xcheck/check-requires-private4
-rwxr-xr-xcheck/check-version5
-rwxr-xr-xcheck/check-whitespace5
-rw-r--r--configure.ac7
14 files changed, 9 insertions, 59 deletions
diff --git a/check/Makefile.am b/check/Makefile.am
index fd9cd98..4aa9a62 100644
--- a/check/Makefile.am
+++ b/check/Makefile.am
@@ -1,3 +1,5 @@
+TESTS_ENVIRONMENT = $(TESTS_SHELL)
+
TESTS = \
check-cflags \
check-libs \
diff --git a/check/check-cflags b/check/check-cflags
index eb2d6bc..f662687 100755
--- a/check/check-cflags
+++ b/check/check-cflags
@@ -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
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
diff --git a/check/check-conflicts b/check/check-conflicts
index 8092ba9..7f160db 100755
--- a/check/check-conflicts
+++ b/check/check-conflicts
@@ -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
diff --git a/check/check-define-variable b/check/check-define-variable
index d35e445..b0aaabd 100755
--- a/check/check-define-variable
+++ b/check/check-define-variable
@@ -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
diff --git a/check/check-idirafter b/check/check-idirafter
index 7abd2dc..439d799 100755
--- a/check/check-idirafter
+++ b/check/check-idirafter
@@ -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
diff --git a/check/check-includedir b/check/check-includedir
index d78ec24..26d8ab5 100755
--- a/check/check-includedir
+++ b/check/check-includedir
@@ -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
diff --git a/check/check-libs b/check/check-libs
index 9b1b495..372314d 100755
--- a/check/check-libs
+++ b/check/check-libs
@@ -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
diff --git a/check/check-libs-private b/check/check-libs-private
index 961962b..0678fd7 100755
--- a/check/check-libs-private
+++ b/check/check-libs-private
@@ -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
diff --git a/check/check-missing b/check/check-missing
index 93c2267..5616945 100755
--- a/check/check-missing
+++ b/check/check-missing
@@ -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
diff --git a/check/check-requires-private b/check/check-requires-private
index 45115ee..e9ef2f2 100755
--- a/check/check-requires-private
+++ b/check/check-requires-private
@@ -1,9 +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
diff --git a/check/check-version b/check/check-version
index 6e92077..4254d65 100755
--- a/check/check-version
+++ b/check/check-version
@@ -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
diff --git a/check/check-whitespace b/check/check-whitespace
index c328f74..b26ec3d 100755
--- a/check/check-whitespace
+++ b/check/check-whitespace
@@ -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
diff --git a/configure.ac b/configure.ac
index 4788ee5..37fe831 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,6 +23,13 @@ AC_PROG_CC
dnl Check for headers
AC_CHECK_HEADERS([dirent.h unistd.h sys/wait.h malloc.h])
+dnl A POSIX shell is required for the tests. If TEST_SHELL hasn't been
+dnl set on the command line then we try to find bash or ksh or sh from
+dnl the path. If none of those are available, we just use whatever
+dnl autoconf detected for configure.
+AC_ARG_VAR([TESTS_SHELL], [Path to a POSIX shell to be used for testing])
+conf_path="$PATH:`getconf PATH 2>/dev/null`"
+AC_PATH_PROGS([TESTS_SHELL], [bash ksh sh], [$CONFIG_SHELL], [$conf_path])
dnl
dnl Default pkg-config search path