aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher R. Nelson <christopher.nelson@languidnights.com>2024-01-21 10:45:30 -0500
committerChristopher R. Nelson <christopher.nelson@languidnights.com>2024-01-21 10:45:30 -0500
commit0f6b17150c24dd8c4d1eb26df118439088846b9b (patch)
tree4ac728012a201faea80a3ace2603fa8427d4f652
parentb2c4d5b69d64bde980b7b318ef992524921c603b (diff)
feat: build script updates to check for tooling
autogen.sh: warn if the user doesn't have at least autotools, guile, and make installed, and if they have hall run it first
-rwxr-xr-xautogen.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/autogen.sh b/autogen.sh
index bbb4008..9b13ad9 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,3 +1,31 @@
#!/bin/sh
+if command -v hall &>/dev/null; then
+ hall build -x
+fi
+
+command -v autoreconf &>/dev/null
+HAS_AUTORECONF=$?
+command -v autoconf &>/dev/null
+HAS_AUTOCONF=$?
+command -v automake &>/dev/null
+HAS_AUTOMAKE=$?
+command -v make &>/dev/null
+HAS_MAKE=$?
+command -v guile &>/dev/null
+HAS_GUILE=$?
+
+if ! [ $HAS_AUTORECONF = 0 \
+ -a $HAS_AUTOCONF = 0 \
+ -a $HAS_AUTOMAKE = 0 \
+ -a $HAS_MAKE = 0 \
+ -a $HAS_GUILE = 0 ]
+then
+ echo "A build system consisting at least of GNU Autotools,"
+ echo "guile 3, and make is required for building reading-heap."
+ echo ""
+ echo "Please install these and try again."
+ exit 1;
+fi
+
autoreconf --install || exit 1