AC_PROG_CXX
AC_PROG_INSTALL
-AC_CONFIG_HEADER([config.h])
+AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
AM_PROG_LIBTOOL
AC_CHECK_PROG(HAVE_OCAMLC, ocamlc, yes, no)
if test $HAVE_OCAMLC = "no"; then
AC_MSG_ERROR(could not find ocamlc in PATH, please make sure ocaml is installed)
+else
+ OCAMLC=ocamlc
+ OCAMLSTDLIBDIR="`ocamlc -where`"
+ OCAMLSTUBDIR="`ocamlc -where`/stublibs"
+ AC_SUBST(OCAMLC)
+ AC_SUBST(OCAMLSTDLIBDIR)
+ AC_SUBST(OCAMLSTUBDIR)
+fi
+
+AC_CHECK_PROG(HAVE_OCAMLOPT, ocamlopt, yes, no)
+if test $HAVE_OCAMLOPT = "no"; then
+ AC_MSG_WARN(ocaml native libraries won't be compiled since ocamlopt was not found)
+else
+ OCAMLOPT=ocamlopt
+ AC_SUBST(OCAMLOPT)
fi
+AM_CONDITIONAL(HAVE_OCAMLOPT_COND, test x$HAVE_OCAMLOPT = xyes)
AC_CHECK_PROG(HAVE_OCAMLFIND, ocamlfind, yes, no)
if test $HAVE_OCAMLFIND = "no"; then
AC_MSG_ERROR(could not find ocamlfind in PATH, please make sure findlib is installed)
+else
+ OCAMLFIND=ocamlfind
+ AC_SUBST(OCAMLFIND)
+fi
+
+AC_CHECK_PROG(HAVE_OCAMLDEP, ocamldep, yes, no)
+if test $HAVE_OCAMLDEP = "yes"; then
+ OCAMLDEP=ocamldep
+ AC_SUBST(OCAMLDEP)
+fi
+
+AC_CHECK_PROG(HAVE_OCAMLMKLIB, ocamlmklib, yes, no)
+if test $HAVE_OCAMLMKLIB = "no"; then
+ AC_MSG_ERROR(could not find ocamlmklib in PATH, please make sure ocamlmklib is installed)
+else
+ OCAMLMKLIB=ocamlmklib
+ AC_SUBST(OCAMLMKLIB)
fi
AC_MSG_CHECKING(for gdome2 ocaml binding)
ocamlfind query gdome2 ||
AC_MSG_ERROR(gdome2 not installed (according to findlib))
+MLGDOME_CFLAGS="`$OCAMLFIND query -i-format gdome2`"
+AC_SUBST(MLGDOME_CFLAGS)
AC_MSG_CHECKING(for the ocaml library dir)
OCAML_LIB_DIR=`ocamlc -where`
C++/test/Makefile
C++/Makefile
ocaml/Makefile
- ocaml/gdome_xslt/META
ocaml/gdome_xslt/Makefile
+ ocaml/gdome_xslt/META
ocaml/test/Makefile
gdome_xslt_cpp_smart-config
test_files/Makefile])