summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2022-01-21 09:56:32 +0000
committerAlexander Larsson <alexander.larsson@gmail.com>2022-01-25 10:07:03 +0100
commitdc8227ea8b5368429e6b99d71055c8b895951964 (patch)
treeb8966f28ff95468aa21ccc9c4860a6b3a845288c /autogen.sh
parent994accceb7ad2b296aaf5de5468eec1a2cae1380 (diff)
downloadflatpak-dc8227ea8b5368429e6b99d71055c8b895951964.tar.gz
autogen.sh: Use command -v to check whether commands exist
which(1) is not standardized by POSIX, and has different implementations and behaviour on different distributions. The behaviour and exit status of command -v is standardized by POSIX. Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh6
1 files changed, 2 insertions, 4 deletions
diff --git a/autogen.sh b/autogen.sh
index ac0d408b..25c1455e 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -7,8 +7,7 @@ test -n "$srcdir" || srcdir=.
olddir=$(pwd)
cd "$srcdir"
-AUTORECONF=$(which autoreconf)
-if test -z "$AUTORECONF"; then
+if ! command -v autoreconf >/dev/null; then
echo "*** No autoreconf found, please install it ***"
exit 1
fi
@@ -25,8 +24,7 @@ fi
sed -e 's,$(libglnx_srcpath),subprojects/libglnx,g' < subprojects/libglnx/Makefile-libglnx.am > subprojects/Makefile-libglnx.am.inc
sed -e 's,$(bwrap_srcpath),subprojects/bubblewrap,g' < subprojects/bubblewrap/Makefile-bwrap.am > subprojects/Makefile-bwrap.am.inc
-GTKDOCIZE=$(which gtkdocize 2>/dev/null)
-if test -z "$GTKDOCIZE"; then
+if ! command -v gtkdocize >/dev/null; 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