Commit 2c85e0a4 authored by Ryan Schmidt's avatar Ryan Schmidt

Use "command -v" instead of "which"

The behavior of "which" is not standardized by POSIX. Some old
implementations print their error messages to stdout instead of stderr,
and don't return a nonzero exit code when they fail to find the given
program. "command -v" on the other hand is in POSIX (optional in 2004
and required as of 2008).

Remove otherwise-unused variables AUTORECONF and GTKDOCIZE.
parent c138b98e
......@@ -7,8 +7,7 @@ test -n "$srcdir" || srcdir=.
cd "$srcdir"
GTKDOCIZE=$(which gtkdocize 2>/dev/null)
if test -z $GTKDOCIZE; then
if ! command -v gtkdocize >/dev/null 2>&1; then
echo "You don't have gtk-doc installed, and thus won't be able to generate the documentation."
rm -f gtk-doc.make
cat > gtk-doc.make <<EOF
......@@ -19,8 +18,7 @@ else
gtkdocize || exit $?
AUTORECONF=`which autoreconf`
if test -z $AUTORECONF; then
if ! command -v autoreconf >/dev/null 2>&1; then
echo "*** No autoreconf found, please install it ***"
exit 1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment