From 3954a7ee3e37cc270df867a19b1e3fb65ecc6386 Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Sun, 23 Mar 2008 21:07:39 +0100 Subject: [PATCH] 2008-03-23 Tollef Fog Heen * 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. --- ChangeLog | 7 +++++++ check/check-cflags | 6 +++--- check/check-define-variable | 6 +++--- check/check-includedir | 6 +++--- check/check-libs | 6 +++--- check/check-libs-private | 6 +++--- check/check-requires-private | 7 +++---- 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 + * 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 -- 2.39.5