]> matita.cs.unibo.it Git - helm.git/blob - DEVEL/gdome_xslt/configure.ac
Set of Set of uri added.
[helm.git] / DEVEL / gdome_xslt / configure.ac
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT
3 AC_CONFIG_SRCDIR([C/gdome_xslt/gdome_xslt.h])
4
5 PACKAGE=gdome2-xslt
6 VERSION=0.0.7
7 VERSION_INFO=`echo $VERSION | awk -F. '{ printf "%d:%d:%d", $1+$2, $3, $2 }'`
8 AC_SUBST(VERSION_INFO)
9
10 AC_PROG_CC
11 AC_PROG_CXX
12 AC_PROG_INSTALL
13
14 AM_CONFIG_HEADER(config.h)
15 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
16 AM_PROG_LIBTOOL
17
18 PKG_CHECK_MODULES(GDOME, gdome2 >= 0.7.0,, AC_MSG_ERROR(could not find Gdome2))
19 AC_SUBST(GDOME_CFLAGS)
20 AC_SUBST(GDOME_LIBS)
21
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)
25
26 PKG_CHECK_MODULES(LIBXSLT, libxslt,, AC_MSG_ERROR(could not find libxslt))
27 AC_SUBST(LIBXSLT_CFLAGS)
28 AC_SUBST(LIBXSLT_LIBS)
29
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)
33 else
34   OCAMLC=ocamlc
35   OCAMLSTDLIBDIR="`ocamlc -where`"
36   OCAMLSTUBDIR="`ocamlc -where`/stublibs"
37   AC_SUBST(OCAMLC)
38   AC_SUBST(OCAMLSTDLIBDIR)
39   AC_SUBST(OCAMLSTUBDIR)
40 fi
41
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)
45 else
46   OCAMLOPT=ocamlopt
47   AC_SUBST(OCAMLOPT)
48 fi
49 AM_CONDITIONAL(HAVE_OCAMLOPT_COND, test x$HAVE_OCAMLOPT = xyes)
50
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)
54 else
55   OCAMLFIND=ocamlfind
56   AC_SUBST(OCAMLFIND)
57 fi
58
59 AC_CHECK_PROG(HAVE_OCAMLDEP, ocamldep, yes, no)
60 if test $HAVE_OCAMLDEP = "yes"; then
61   OCAMLDEP=ocamldep
62   AC_SUBST(OCAMLDEP)
63 fi
64
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)
68 else
69   OCAMLMKLIB=ocamlmklib
70   AC_SUBST(OCAMLMKLIB)
71 fi
72
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)
78
79 AC_MSG_CHECKING(for the ocaml library dir)
80 OCAML_LIB_DIR=`ocamlc -where`
81 AC_MSG_RESULT($OCAML_LIB_DIR)
82
83 AC_CHECK_FILE(/usr/include/caml/mlvalues.h,
84         OCAML_INCLUDE_DIR=/usr/include/caml,
85         OCAML_INCLUDE_DIR=$OCAML_LIB_DIR/caml
86 )
87
88 AC_SUBST(PACKAGE)
89 AC_SUBST(VERSION)
90 AC_SUBST(OCAML_INCLUDE_DIR)
91
92 AC_CONFIG_FILES([
93   Makefile
94   C/Makefile
95   C/gdome_xslt/Makefile
96   C/test/Makefile
97   C++/gdome_xslt/Makefile
98   C++/test/Makefile
99   C++/Makefile
100   ocaml/Makefile
101   ocaml/gdome_xslt/Makefile
102   ocaml/gdome_xslt/META
103   ocaml/test/Makefile
104   gdome2-xslt.pc
105   gdome2-xslt-cpp-smart.pc
106   test_files/Makefile])
107 AC_OUTPUT