Below is the file 'configure.ac' from this revision. You can also download the file.
AC_INIT(monotone-viz, 1.0.1)
AC_PROG_OCAML
AC_PROG_OCAML_TOOLS
AC_PROG_CAMLP4
if test -z "$CAMLP4O" ; then
AC_MSG_ERROR([
Could not find camlp4o. Camlp4 is required to build monotone-viz.])
fi
AC_ARG_PROGRAM
# Check LablGTK
AC_ARG_VAR(LABLGTK_DIR,[LablGTK location])
AC_ARG_WITH([lablgtk-dir],
AS_HELP_STRING([--with-lablgtk-dir=],
[specify location of lablgtk library]),
LABLGTK_DIR=$withval)
AC_ARG_WITH([local-lablgtk],
AS_HELP_STRING([--without-local-lablgtk],
[do not use the local copy of lablgtk]),
LOCAL_LABLGTK=$withval,
LOCAL_LABLGTK=maybe)
AC_SUBST(LOCAL_LABLGTK)
# Check if the local lablgtk is present and wether to use it
if test "$LOCAL_LABLGTK" = "yes" ; then
if ! test -d "lablgtk" ; then
AC_MSG_ERROR([
Could not find the local LablGTK tree.])
fi
elif test "$LOCAL_LABLGTK" = "maybe" ; then
if test -d "lablgtk" ; then
LOCAL_LABLGTK=yes
else
LOCAL_LABLGTK=no
fi
else
LOCAL_LABLGTK=no
fi
if test "$LOCAL_LABLGTK" = "no" ; then
FINDLIB_LABLGTK="$(ocamlfind query lablgtk2 2> /dev/null)"
AC_CHECK_OCAML_MODULE(lablgtk, LABLGTK_DIR, GFile, +lablgtk2 +lablgtk ${FINDLIB_LABLGTK})
# Stop if LablGTK is not found
if test -z "$LABLGTK_DIR" ; then
AC_MSG_ERROR([
Could not find LablGTK. Make sure LablGTK >= 2.4.0 is installed and
specify its location to configure with the `--with-lablgtk-dir='
option or the LABLGTK_DIR environment variable.])
fi
LABLGTK_DIR="$(echo $LABLGTK_DIR | sed "s@^+@$OCAMLLIB/@")"
# Check if LablGTK was compiled with libgnomecanvas support
AC_MSG_CHECKING([GnomeCanvas support])
if test -r "$LABLGTK_DIR/lablgnomecanvas.cma" ; then
AC_MSG_RESULT(found)
else
AC_MSG_ERROR([
libgnomecanvas support not found.
LablGTK need to be built with GnomeCanvas support.])
fi
# Check if LablGTK is natively compiled
if test -r "$LABLGTK_DIR/lablgtk.cmxa" -a -r "$LABLGTK_DIR/lablgnomecanvas.cmxa"; then
echo [Using the native code compiler]
else
echo [Using the byte code compiler]
OCAMLBEST=byte
fi
else
echo
echo
echo [CONFIGURING LOCAL LABLGTK]
echo
echo
cd lablgtk
./configure --without-gl --without-glade --without-rsvg --with-gnomecanvas --without-gnomeui --without-panel --without-gtkspell
cd ..
echo
echo
echo [DONE CONFIGURING LOCAL LABLGTK]
echo
echo
fi
# Keep CPPFLAGS around, can be useful if caml headers are in a
# non-standard location.
AC_SUBST(CPPFLAGS)
AC_OUTPUT(config.make)