* Fix running Prolog inside the build environment
[chr.git] / configure.in
blob1a86370c0b22ca6bf8eee349bd86ddc955f60792
1 dnl Process this file with autoconf to produce a configure script.
3 AC_INIT(install-sh)
4 AC_CONFIG_HEADER(config.h)
6 AC_SUBST(PL)
7 AC_SUBST(PLBASE)
8 AC_SUBST(PLARCH)
10 # Do not cache this, it changes too often in many configurations
11 unset ac_cv_prog_PL
13 if test -z "$PLINCL"; then
14 plcandidates="pl swipl swi-prolog"
15 AC_CHECK_PROGS(PL, $plcandidates, "none")
16 if test $PL = "none"; then
17    AC_ERROR("Cannot find SWI-Prolog. SWI-Prolog must be installed first")
18 else
19    AC_CHECKING("Running $PL -dump-runtime-variables")
20    eval `$PL -dump-runtime-variables`
22 AC_MSG_RESULT("         PLBASE=$PLBASE")
23 AC_MSG_RESULT("         PLARCH=$PLARCH")
24 else
25 PL=../pl.sh
28 AC_CHECK_PROGS(MAKE, gmake make, "make")
29 AC_PROG_INSTALL
31 AC_OUTPUT(Makefile)