aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac28
1 files changed, 28 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..f186a1d
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,28 @@
+AC_INIT([lambda], [0.0.0], [dan@rostovtsev.org])
+
+# COQC search borrowed from the gappa project
+# https://gitlab.inria.fr/gappa/coq.git
+
+AC_DEFUN([AX_VERSION_GE], [AS_VERSION_COMPARE([$1],[$2],[$4],[$3],[$3])])
+
+AC_SUBST(COQVERSION)
+AC_ARG_VAR(COQC, [Coq compiler command [coqc]])
+AC_MSG_CHECKING([for coqc >= 8.12.0])
+COQC=`which coqc`
+COQVERSION=[`$COQC -v | sed -n -e 's/^.*version \([0-9][0-9.]*\).*$/\1/p' | awk -F. '{ printf("%d%02d%02d\n", $1,$2,$3); }'`]
+AX_VERSION_GE([$COQVERSION], [81200],
+ [ AC_MSG_RESULT([$COQC]) ],
+ [ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([ *** Unable to find Coq (https://gitlab.inria.fr/gappa/coq.git)]) ])
+
+AC_SUBST(COQBIN)
+COQBIN=$(dirname $COQC)/
+
+echo
+echo "=== Summary ==="
+echo "Coq Compiler: $COQC"
+echo "Coq Binary Dir: $COQBIN"
+echo
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT