summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rwxr-xr-xcheck/check-cflags6
-rwxr-xr-xcheck/check-define-variable6
-rwxr-xr-xcheck/check-includedir6
-rwxr-xr-xcheck/check-libs6
-rwxr-xr-xcheck/check-libs-private6
-rwxr-xr-xcheck/check-requires-private7
7 files changed, 25 insertions, 19 deletions
diff --git a/ChangeLog b/ChangeLog
index ab22df0..18d3f6a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2008-03-23 Tollef Fog Heen <tfheen@err.no>
+ * check/check-cflags, check/check-define-variable,
+ check/check-includedir, check/check-libs,
+ check/check-libs-private, check/check-requires-private: Replace
+ the crazy -d ~root check with a more proper way to just make sure
+ we are running under a POSIX shell. Thanks to Kjetil Torgrim
+ Homme for the tip about using getconf PATH.
+
* main.c (main): Add logging support from NetBSD. Thanks to Julio
M. Merino Vidal for forwarding the patch from ages ago.
diff --git a/check/check-cflags b/check/check-cflags
index d561b92..9d517c8 100755
--- a/check/check-cflags
+++ b/check/check-cflags
@@ -1,8 +1,8 @@
#! /bin/sh
-# Do the Solaris Dance:
-if [ ! -d ~root ] ; then
- exec /usr/xpg4/bin/sh $0 "$@"
+# 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
diff --git a/check/check-define-variable b/check/check-define-variable
index dd7f323..bf8aebe 100755
--- a/check/check-define-variable
+++ b/check/check-define-variable
@@ -1,8 +1,8 @@
#! /bin/sh
-# Do the Solaris Dance:
-if [ ! -d ~root ] ; then
- exec /usr/xpg4/bin/sh $0 "$@"
+# 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
diff --git a/check/check-includedir b/check/check-includedir
index e4c234c..d78ec24 100755
--- a/check/check-includedir
+++ b/check/check-includedir
@@ -1,8 +1,8 @@
#! /bin/sh
-# Do the Solaris Dance:
-if [ ! -d ~root ] ; then
- exec /usr/xpg4/bin/sh $0 "$@"
+# 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
diff --git a/check/check-libs b/check/check-libs
index ce878a6..32366a1 100755
--- a/check/check-libs
+++ b/check/check-libs
@@ -1,8 +1,8 @@
#! /bin/sh
-# Do the Solaris Dance:
-if [ ! -d ~root ] ; then
- exec /usr/xpg4/bin/sh $0 "$@"
+# 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
diff --git a/check/check-libs-private b/check/check-libs-private
index 4e83c85..961962b 100755
--- a/check/check-libs-private
+++ b/check/check-libs-private
@@ -1,8 +1,8 @@
#! /bin/sh
-# Do the Solaris Dance:
-if [ ! -d ~root ] ; then
- exec /usr/xpg4/bin/sh $0 "$@"
+# 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
diff --git a/check/check-requires-private b/check/check-requires-private
index 7d0f9a9..0f02fb4 100755
--- a/check/check-requires-private
+++ b/check/check-requires-private
@@ -1,10 +1,9 @@
#! /bin/sh
-# Do the Solaris Dance:
-if [ ! -d ~root ] ; then
- exec /usr/xpg4/bin/sh $0 "$@"
+# 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