1 dnl Process this file with autoconf to produce a configure script.
3 AC_CONFIG_SRCDIR([C/gdome_xslt/gdome_xslt.h])
7 VERSION_INFO=`echo $VERSION | awk -F. '{ printf "%d:%d:%d", $1+$2, $3, $2 }'`
14 AM_CONFIG_HEADER(config.h)
15 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
18 PKG_CHECK_MODULES(GDOME, gdome2 >= 0.7.0,, AC_MSG_ERROR(could not find Gdome2))
19 AC_SUBST(GDOME_CFLAGS)
22 PKG_CHECK_MODULES(GMETADOM, gdome2-cpp-smart >= 0.1.8,, AC_MSG_ERROR(could not find GMetaDOM))
23 AC_SUBST(GMETADOM_CFLAGS)
24 AC_SUBST(GMETADOM_LIBS)
26 PKG_CHECK_MODULES(LIBXSLT, libxslt,, AC_MSG_ERROR(could not find libxslt))
27 AC_SUBST(LIBXSLT_CFLAGS)
28 AC_SUBST(LIBXSLT_LIBS)
30 AC_CHECK_PROG(HAVE_OCAMLC, ocamlc, yes, no)
31 if test $HAVE_OCAMLC = "no"; then
32 AC_MSG_ERROR(could not find ocamlc in PATH, please make sure ocaml is installed)
35 OCAMLSTDLIBDIR="`ocamlc -where`"
36 OCAMLSTUBDIR="`ocamlc -where`/stublibs"
38 AC_SUBST(OCAMLSTDLIBDIR)
39 AC_SUBST(OCAMLSTUBDIR)
42 AC_CHECK_PROG(HAVE_OCAMLOPT, ocamlopt, yes, no)
43 if test $HAVE_OCAMLOPT = "no"; then
44 AC_MSG_WARN(ocaml native libraries won't be compiled since ocamlopt was not found)
49 AM_CONDITIONAL(HAVE_OCAMLOPT_COND, test x$HAVE_OCAMLOPT = xyes)
51 AC_CHECK_PROG(HAVE_OCAMLFIND, ocamlfind, yes, no)
52 if test $HAVE_OCAMLFIND = "no"; then
53 AC_MSG_ERROR(could not find ocamlfind in PATH, please make sure findlib is installed)
59 AC_CHECK_PROG(HAVE_OCAMLDEP, ocamldep, yes, no)
60 if test $HAVE_OCAMLDEP = "yes"; then
65 AC_CHECK_PROG(HAVE_OCAMLMKLIB, ocamlmklib, yes, no)
66 if test $HAVE_OCAMLMKLIB = "no"; then
67 AC_MSG_ERROR(could not find ocamlmklib in PATH, please make sure ocamlmklib is installed)
73 AC_MSG_CHECKING(for gdome2 ocaml binding)
74 ocamlfind query gdome2 ||
75 AC_MSG_ERROR(gdome2 not installed (according to findlib))
76 MLGDOME_CFLAGS="`$OCAMLFIND query -i-format gdome2`"
77 AC_SUBST(MLGDOME_CFLAGS)
79 AC_MSG_CHECKING(for the ocaml library dir)
80 OCAML_LIB_DIR=`ocamlc -where`
81 AC_MSG_RESULT($OCAML_LIB_DIR)
83 AC_CHECK_FILE(/usr/include/caml/mlvalues.h,
84 OCAML_INCLUDE_DIR=/usr/include/caml,
85 OCAML_INCLUDE_DIR=$OCAML_LIB_DIR/caml
90 AC_SUBST(OCAML_INCLUDE_DIR)
97 C++/gdome_xslt/Makefile
101 ocaml/gdome_xslt/Makefile
102 ocaml/gdome_xslt/META
105 gdome2-xslt-cpp-smart.pc
106 test_files/Makefile])