aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-08-15 23:36:33 +0000
committerdos-reis <gdr@axiomatics.org>2010-08-15 23:36:33 +0000
commit42c00eb3fd18295be5da760d2ed8e6dece2c91bc (patch)
tree1a6c07fbceef2ede3aeb3092a1a507f1302f3807 /config
parent5c06c1ef151286264a095cdea1a5e0de3e6321fd (diff)
downloadopen-axiom-42c00eb3fd18295be5da760d2ed8e6dece2c91bc.tar.gz
* config/open-axiom.m4 (OPENAXIOM_BUILD_TOOLS): New. Abstract
over build tool requirements. * configure.ac.pamphlet: Use it.
Diffstat (limited to 'config')
-rw-r--r--config/open-axiom.m445
1 files changed, 45 insertions, 0 deletions
diff --git a/config/open-axiom.m4 b/config/open-axiom.m4
index 34338aaa..65d03ab3 100644
--- a/config/open-axiom.m4
+++ b/config/open-axiom.m4
@@ -477,3 +477,48 @@ case $host in
;;
esac
])
+
+
+dnl ---------------------------
+dnl -- OPENAXIOM_BUILD_TOOLS --
+dnl ---------------------------
+dnl Check for utilities we need for building the system.
+AC_DEFUN([OPENAXIOM_BUILD_TOOLS],[
+AC_CHECK_PROG([TOUCH], [touch],
+ [touch], [AC_MSG_ERROR(['touch' program is missing.])])
+AC_PROG_INSTALL
+AC_CHECK_PROGS([MKTEMP], [mktemp])
+AC_PROG_AWK
+
+## Find GNU Make
+case $build in
+ *linux*)
+ # GNU/Linux systems come equipped with GNU Make, called `make'
+ AC_CHECK_PROGS([MAKE], [make],
+ [AC_MSG_ERROR([Make utility missing.])])
+ ;;
+ *)
+ # Other systems tend to spell it `gmake' and such
+ AC_CHECK_PROGS([MAKE], [gmake make],
+ [AC_MSG_ERROR([Make utility missing.])])
+ if ! $MAKE --version | grep 'GNU' 2>/dev/null; then
+ AC_MSG_ERROR([OpenAxiom build system needs GNU Make.])
+ fi
+ ;;
+esac
+
+## Make sure noweb executable is available
+AC_CHECK_PROGS([NOTANGLE], [notangle])
+AC_CHECK_PROGS([NOWEAVE], [noweave])
+## In case noweb is missing we need to build our own.
+if test -z $NOTANGLE -o -z $NOWEAVE ; then
+ ## Yes, but do we have the source files to build from?
+ if test ! -d ${srcdir}/noweb; then
+ AC_MSG_NOTICE([OpenAxiom requires noweb utilties])
+ AC_MSG_ERROR([Please get the tarball of dependencies and reconfigure])
+ fi
+ NOTANGLE='$(axiom_build_bindir)/notangle'
+ NOWEAVE='$(axiom_build_bindir)/noweave'
+ axiom_all_prerequisites="$axiom_all_prerequisites all-noweb"
+fi
+])