heptagon/configure.in

75 lines
1.7 KiB
Text
Raw Normal View History

AC_INIT(heptagon,1.0)
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_ARG_ENABLE(simulator,
[ --enable-simulator enable the graphical simulator],,
enable_simulator=yes)
AC_ARG_ENABLE(local_stdlib,
[ --enable-local-stdlib use the in-sources standard library],,
enable_local_stdlib=no)
AC_PROG_OCAML
if test "$OCAMLC" = "no"; then
AC_MSG_ERROR([Please install the OCaml compiler])
fi
case "$OCAMLVERSION" in
0.*|1.*|2.*|3.0*)
AC_MSG_ERROR(You need Objective Caml 3.10 or higher);;
esac
AC_PROG_CAMLP4
if test "$CAMLP4OF" = "no"; then
AC_MSG_ERROR([Please install Camlp4 with extensions (camlp4of command)])
fi
AC_PROG_FINDLIB
if test "$OCAMLFIND" = "no"; then
AC_MSG_ERROR([Please install OCaml findlib (the ocamlfind command)])
fi
OCAMLC_STDLIB=`$OCAMLFIND ocamlc -where`
OCAMLFIND_STDLIB=`$OCAMLFIND printconf stdlib`
if test "$OCAMLC_STDLIB" != "$OCAMLFIND_STDLIB"; then
AC_MSG_ERROR([OCaml and OCamlfind make different assumptions about the standard library directory])
fi
AC_CHECK_PROG(MENHIR,menhir,menhir,no)
if test "$MENHIR" = no ; then
AC_MSG_ERROR(Please install menhir.)
fi
AC_CHECK_OCAML_PKG([menhirLib])
if test "$OCAML_PKG_menhirLib" = "no"; then
AC_MSG_ERROR([Please install menhirLib package.])
fi
AC_CHECK_OCAML_PKG([ocamlgraph])
if test "$OCAML_PKG_ocamlgraph" = "no"; then
AC_MSG_ERROR([Please install ocamlgraph package.])
fi
AC_CHECK_OCAML_PKG([lablgtk2])
if test "$OCAML_PKG_lablgtk2" = "no"; then
2011-10-20 18:12:06 +02:00
enable_simulator=no
AC_MSG_WARN([Could not find 'lablgtk2'. The simulator will not be built])
fi
if test "$enable_local_stdlib" = "yes"; then
2011-11-16 16:07:59 +01:00
stdlib_dir=$PWD/lib
else
stdlib_dir=$libdir/heptagon
fi
AC_SUBST(INSTALL)
AC_SUBST(stdlib_dir)
AC_SUBST(enable_simulator)
AC_OUTPUT(config)