summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@colm.net>2019-12-18 15:55:51 +0200
committerAdrian Thurston <thurston@colm.net>2019-12-18 15:55:51 +0200
commitbbc59ba03d04a133e4b0c84470568fb7c338ada5 (patch)
tree5460a0eec31798cc9893ce820032e7792963b3bd /configure.ac
parent83d5809041629de39d86ba5f2eb4afbbd7e07ea8 (diff)
downloadcolm-bbc59ba03d04a133e4b0c84470568fb7c338ada5.tar.gz
configure: verify that julia is able to run programs
Julia requires a large virtual address space and if a system limits address space size with ulimit then julia will abort. Catch it in configure, rather than resulting in failed tests.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac14
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 06423420..2f6cc116 100644
--- a/configure.ac
+++ b/configure.ac
@@ -261,6 +261,20 @@ AC_PATH_PROG([OCAML_BIN], [ocaml])
AC_PATH_PROG([RUST_BIN], [rustc])
AC_PATH_PROG([JULIA_BIN], [julia])
+echo -n "checking if julia is able to run programs ... "
+
+if test "x$JULIA_BIN" != x; then
+ echo 'println( "can run julia programs" );' > conftest.jl
+ if sh -c "$JULIA_BIN conftest.jl" >>config.log 2>&1; then
+ echo "yes"
+ else
+ echo "FAILED to run julia program" >> config.log
+ echo "no"
+ JULIA_BIN=""
+ fi
+ rm -f conftest.jl
+fi
+
SED_SUBST="$SED_SUBST -e 's|@D_BIN@|${D_BIN}|g'"
SED_SUBST="$SED_SUBST -e 's|@JAVAC_BIN@|${JAVAC_BIN}|g'"
SED_SUBST="$SED_SUBST -e 's|@RUBY_BIN@|${RUBY_BIN}|g'"