FIXED CHR: remove optimizations for previous term_hash/2 implementation
[chr.git] / configure.in
blobe0030b894c5f11db917c047dce45f8f95c8c0240
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(CC)
8 AC_SUBST(PLLIBS)
9 AC_SUBST(PLBASE)
10 AC_SUBST(PLARCH)
11 AC_SUBST(PLINCL)
12 AC_SUBST(COFLAGS)
13 AC_SUBST(CWFLAGS)
14 AC_SUBST(CMFLAGS)
15 AC_SUBST(LD)
16 AC_SUBST(SO)
17 AC_SUBST(LDSOFLAGS)
18 AC_SUBST(TARGETS)
20 # Do not cache this, it changes too often in many configurations
21 unset ac_cv_prog_PL
23 if test -z "$PLINCL"; then
24 plcandidates="pl swipl swi-prolog"
25 AC_CHECK_PROGS(PL, $plcandidates, "none")
26 AC_CHECK_PROGS(PLLD, plld, "none")
27 if test $PLLD = "none"; then
28    AC_ERROR("Cannot find SWI-Prolog plld utility. SWI-Prolog must be installed first")
30 if test $PL = "none"; then
31    AC_ERROR("Cannot find SWI-Prolog. SWI-Prolog must be installed first")
32 else
33    AC_CHECKING("Running $PL -dump-runtime-variables")
34    eval `$PL -dump-runtime-variables`
36 PLINCL=$PLBASE/include
37 AC_MSG_RESULT("         PLBASE=$PLBASE")
38 AC_MSG_RESULT("         PLARCH=$PLARCH")
39 AC_MSG_RESULT("         PLLIBS=$PLLIBS")
40 AC_MSG_RESULT("         PLLDFLAGS=$PLLDFLAGS")
41 AC_MSG_RESULT("         PLSHARED=$PLSHARED")
42 AC_MSG_RESULT("         PLSOEXT=$PLSOEXT")
45 PLLD=../plld.sh
46 PL=../pl.sh
48 CC=$PLLD
49 LD=$PLLD
50 LDSOFLAGS=-shared
51 CMFLAGS=-fpic
53 SO="$PLSOEXT"
55 TARGETS="chr_support.$SO"
56 AC_CHECK_PROGS(MAKE, gmake make, "make")
57 AC_PROG_INSTALL
58 if test ! -z "$GCC"; then
59     COFLAGS="${COFLAGS--O2 -fno-strict-aliasing}"
60     CWFLAGS="${CWFLAGS--Wall}"
61 else
62     COFLAGS="${COFLAGS--O}"
65 AC_OUTPUT(Makefile)