summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2022-04-24 13:28:11 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2022-04-24 13:28:11 +0200
commite2786de8c6c82d00b450faecff662d585f932286 (patch)
tree863f111657f711989c86d04ca341098cc761396a
parent994c4de26637204ff14fe4be7f5cc051a04573fe (diff)
Add check to autogen.sh for required tools
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
-rwxr-xr-xautogen.sh47
1 files changed, 47 insertions, 0 deletions
diff --git a/autogen.sh b/autogen.sh
index c08fadf..34b6978 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,3 +1,50 @@
#!/bin/sh
+DIE=0
+
+(autoreconf --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "You must have autoconf installed to compile this package."
+ echo "Download the appropriate package for your distribution,"
+ echo "or see http://www.gnu.org/software/autoconf"
+ DIE=1
+}
+
+(libtoolize --version) < /dev/null > /dev/null 2>&1 ||
+(glibtoolize --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "You must have libtool installed to compile this package."
+ echo "Download the appropriate package for your distribution,"
+ echo "or see http://www.gnu.org/software/libtool"
+ DIE=1
+}
+
+(automake --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "You must have automake installed to compile this package."
+ echo "Download the appropriate package for your distribution,"
+ echo "or see http://www.gnu.org/software/automake"
+ DIE=1
+}
+
+if ! test -f "$(aclocal --print-ac-dir)"/pkg.m4; then
+ echo
+ echo "You must have pkg-config installed to compile this package."
+ echo "Download the appropriate package for your distribution,"
+ echo "or see https://www.freedesktop.org/wiki/Software/pkg-config/"
+ DIE=1
+fi
+
+if test "$DIE" -eq 1; then
+ exit 1
+fi
+
autoreconf --force --install --symlink
+
+if ! grep -q pkg.m4 aclocal.m4; then
+ cat <<EOF
+Couldn't find pkg.m4 from pkg-config. Install the appropriate package for
+your distribution or set ACLOCAL_PATH to the directory containing pkg.m4.
+EOF
+ exit 1
+fi