5260e85b63dd8899ce0c8d54e755d413243ae630
[platform/upstream/libxml++.git] / configure.ac
1 AC_INIT([libxml++], [2.35.3],
2         [https://bugzilla.gnome.org/enter_bug.cgi?product=libxml%2B%2B],
3         [libxml++], [http://libxmlplusplus.sourceforge.net/])
4 AC_PREREQ([2.59])
5
6 AC_CONFIG_SRCDIR([libxml++/libxml++.h])
7 AC_CONFIG_AUX_DIR([macros])
8 AC_CONFIG_MACRO_DIR([macros])
9 AC_CONFIG_HEADERS([config.h libxml++config.h])
10
11 AM_INIT_AUTOMAKE([1.9 -Wno-portability dist-bzip2 no-define nostdinc subdir-objects])
12 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
13 AM_MAINTAINER_MODE([disable])
14 AC_ARG_VAR([ACLOCAL_FLAGS], [aclocal flags, e.g. -I <macro dir>])
15
16 MM_PREREQ([0.9.3])
17 MM_INIT_MODULE([libxml++-2.6])
18
19 # Copy the mm-common .pl scripts into docs/,
20 # and use them from there,
21 # so we can dist them to avoid a tarball-build dependency.
22 MM_CONFIG_DOCTOOL_DIR([docs])
23
24 # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
25 AC_SUBST([LIBXMLXX_SO_VERSION], [2:7:0])
26
27 AC_PROG_CXX
28 LT_PREREQ([2.2.6])
29 LT_INIT([dlopen win32-dll disable-static])
30
31 AC_SUBST([LIBXMLXX_MODULES], ['libxml-2.0 >= 2.6.1 glibmm-2.4 >= 2.4.0'])
32 PKG_CHECK_MODULES([LIBXMLXX], [$LIBXMLXX_MODULES])
33
34 AC_LANG([C++])
35 AC_CHECK_HEADERS([string list map], [], [AC_MSG_ERROR([required headers not found])])
36
37
38 MM_ARG_ENABLE_DOCUMENTATION
39 MM_ARG_WITH_TAGFILE_DOC([glibmm-2.4.tag], [glibmm-2.4])
40
41 MM_ARG_ENABLE_WARNINGS([LIBXMLXX_WXXFLAGS],
42         [-Wall],
43         [-pedantic -Wall -Wextra -Wno-long-long])
44
45 AC_PATH_PROG([XMLLINT], [xmllint], [xmllint])
46 AC_ARG_VAR([XMLLINT], [path to xmllint utility])
47 AC_PATH_PROGS([DB2LATEX], [db2latex docbook2latex], [db2latex])
48 AC_ARG_VAR([DB2LATEX], [path to db2latex utility])
49 MM_CHECK_PERL()
50
51 # This is just defined to avoid breaking old code:
52 AC_DEFINE([LIBXMLCPP_EXCEPTIONS_ENABLED],[1], [This is always set. This is only for backwards compatibility.])
53
54 AC_CONFIG_FILES([Makefile
55         examples/Makefile
56         docs/reference/Doxyfile
57         MSVC_Net2005/libxml++/libxml++.rc
58         MSVC_Net2008/libxml++/libxml++.rc
59         MSVC_Net2010/libxml++/libxml++.rc
60         libxml++-2.6.pc])
61
62 AC_CONFIG_COMMANDS([MSVC_Net2005/libxml++/libxml++config.h],
63         [cp -f libxml++config.h MSVC_Net2005/libxml++/libxml++config.h])
64 AC_CONFIG_COMMANDS([MSVC_Net2008/libxml++/libxml++config.h],
65         [cp -f libxml++config.h MSVC_Net2008/libxml++/libxml++config.h])
66 AC_CONFIG_COMMANDS([MSVC_Net2010/libxml++/libxml++config.h],
67         [cp -f libxml++config.h MSVC_Net2010/libxml++/libxml++config.h])
68
69 AC_OUTPUT