Imported Upstream version 2.91.1
[platform/upstream/libxml++.git] / configure.ac
1 ## This file is part of libxml++.
2
3 AC_INIT([libxml++], [2.91.1],
4         [https://bugzilla.gnome.org/enter_bug.cgi?product=libxml%2B%2B],
5         [libxml++], [http://libxmlplusplus.sourceforge.net/])
6 AC_PREREQ([2.59])
7
8 AC_CONFIG_SRCDIR([libxml++/libxml++.h])
9 AC_CONFIG_AUX_DIR([macros])
10 AC_CONFIG_MACRO_DIR([macros])
11 AC_CONFIG_HEADERS([config.h libxml++config.h])
12
13 AM_INIT_AUTOMAKE([1.9 -Wno-portability dist-bzip2 no-define nostdinc subdir-objects])
14 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
15 AM_MAINTAINER_MODE([disable])
16 AC_ARG_VAR([ACLOCAL_FLAGS], [aclocal flags, e.g. -I <macro dir>])
17
18 MM_PREREQ([0.9.8])
19 MM_INIT_MODULE([libxml++-3.0])
20
21 # Tell mm-common-prepare to copy the mm-common .pl scripts
22 # and some other files into docs/, and use them from there,
23 # so we can dist them to avoid a tarball-build dependency.
24 MM_CONFIG_DOCTOOL_DIR([docs])
25
26 # libxml++ does not use libtool's versioning system.
27 # Let LIBXMLXX_SO_VERSION remain equal to 0:0:0.
28 # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
29 AC_SUBST([LIBXMLXX_SO_VERSION], [0:0:0])
30
31 AC_PROG_CXX
32 MM_AX_CXX_COMPILE_STDCXX_11([noext],[mandatory])
33
34 LT_PREREQ([2.2.6])
35 LT_INIT([dlopen win32-dll disable-static])
36
37 AC_SUBST([LIBXMLXX_MODULES], ['libxml-2.0 >= 2.7.7 glibmm-2.4 >= 2.32.0'])
38 PKG_CHECK_MODULES([LIBXMLXX], [$LIBXMLXX_MODULES])
39
40 AC_LANG([C++])
41 AC_CHECK_HEADERS([string list map], [], [AC_MSG_ERROR([required headers not found])])
42
43 MM_ARG_ENABLE_DOCUMENTATION
44 MM_ARG_WITH_TAGFILE_DOC([libstdc++.tag], [mm-common-libstdc++])
45 MM_ARG_WITH_TAGFILE_DOC([libsigc++-2.0.tag], [sigc++-2.0])
46 MM_ARG_WITH_TAGFILE_DOC([glibmm-2.4.tag], [glibmm-2.4])
47
48 # Evaluate the --enable-warnings=level option.
49 MM_ARG_ENABLE_WARNINGS([LIBXMLXX_WXXFLAGS],
50         [-Wall],
51         [-pedantic -Wall -Wextra -Wformat-security -Wshadow -Wno-long-long],
52         [G GLIBMM SIGCXX])
53
54 # Offer the ability to omit some API from the library.
55 MM_ARG_DISABLE_DEPRECATED_API([LIBXMLXX])
56
57 AC_PATH_PROG([XMLLINT], [xmllint], [xmllint])
58 AC_ARG_VAR([XMLLINT], [path to xmllint utility])
59 AC_PATH_PROGS([DB2LATEX], [db2latex docbook2latex], [db2latex])
60 AC_ARG_VAR([DB2LATEX], [path to db2latex utility])
61 MM_CHECK_PERL()
62
63 # This is just defined to avoid breaking old code:
64 AC_DEFINE([LIBXMLCPP_EXCEPTIONS_ENABLED],[1], [This is always set. This is only for backwards compatibility.])
65
66 AC_CONFIG_FILES([Makefile
67         libxml++/Makefile
68         examples/Makefile
69         tests/Makefile
70         docs/Makefile
71         docs/reference/Doxyfile
72         MSVC_Net2010/libxml++/libxml++.rc
73         ${LIBXMLXX_MODULE_NAME}.pc:libxml++.pc.in])
74
75 # Copy the generated configuration headers into the MSVC project directories.
76 AC_CONFIG_COMMANDS([MSVC_Net2010/libxml++/libxml++config.h],
77         [cp -f libxml++config.h MSVC_Net2010/libxml++/libxml++config.h])
78
79 AC_OUTPUT