configure.ac 2.5 KB
Newer Older
Murray Cumming's avatar
Murray Cumming committed
1
AC_INIT([libxml++], [2.39.2],
David King's avatar
David King committed
2 3 4 5 6 7 8 9 10 11 12
        [https://bugzilla.gnome.org/enter_bug.cgi?product=libxml%2B%2B],
        [libxml++], [http://libxmlplusplus.sourceforge.net/])
AC_PREREQ([2.59])

AC_CONFIG_SRCDIR([libxml++/libxml++.h])
AC_CONFIG_AUX_DIR([macros])
AC_CONFIG_MACRO_DIR([macros])
AC_CONFIG_HEADERS([config.h libxml++config.h])

AM_INIT_AUTOMAKE([1.9 -Wno-portability dist-bzip2 no-define nostdinc subdir-objects])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
13
AM_MAINTAINER_MODE([disable])
David King's avatar
David King committed
14 15
AC_ARG_VAR([ACLOCAL_FLAGS], [aclocal flags, e.g. -I <macro dir>])

Kjell Ahlstedt's avatar
Kjell Ahlstedt committed
16
MM_PREREQ([0.9.8])
David King's avatar
David King committed
17 18
MM_INIT_MODULE([libxml++-2.6])

19 20 21 22 23
# Copy the mm-common .pl scripts into docs/,
# and use them from there,
# so we can dist them to avoid a tarball-build dependency.
MM_CONFIG_DOCTOOL_DIR([docs])

David King's avatar
David King committed
24 25 26 27
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
AC_SUBST([LIBXMLXX_SO_VERSION], [2:7:0])

AC_PROG_CXX
Kjell Ahlstedt's avatar
Kjell Ahlstedt committed
28 29
MM_AX_CXX_COMPILE_STDCXX_11([noext],[mandatory])

David King's avatar
David King committed
30 31 32
LT_PREREQ([2.2.6])
LT_INIT([dlopen win32-dll disable-static])

33
AC_SUBST([LIBXMLXX_MODULES], ['libxml-2.0 >= 2.7.7 glibmm-2.4 >= 2.32.0'])
David King's avatar
David King committed
34
PKG_CHECK_MODULES([LIBXMLXX], [$LIBXMLXX_MODULES])
David King's avatar
David King committed
35 36 37 38

AC_LANG([C++])
AC_CHECK_HEADERS([string list map], [], [AC_MSG_ERROR([required headers not found])])

39
MM_ARG_ENABLE_DOCUMENTATION
40 41
MM_ARG_WITH_TAGFILE_DOC([libstdc++.tag], [mm-common-libstdc++])
MM_ARG_WITH_TAGFILE_DOC([libsigc++-2.0.tag], [sigc++-2.0])
42
MM_ARG_WITH_TAGFILE_DOC([glibmm-2.4.tag], [glibmm-2.4])
David King's avatar
David King committed
43

44
# Evaluate the --enable-warnings=level option.
David King's avatar
David King committed
45 46
MM_ARG_ENABLE_WARNINGS([LIBXMLXX_WXXFLAGS],
        [-Wall],
47
        [-pedantic -Wall -Wextra -Wformat-security -Wshadow -Wno-long-long],
48
        [G GLIBMM SIGCXX])
David King's avatar
David King committed
49

50 51 52
# Offer the ability to omit some API from the library.
MM_ARG_DISABLE_DEPRECATED_API([LIBXMLXX])

53 54 55 56
AC_PATH_PROG([XMLLINT], [xmllint], [xmllint])
AC_ARG_VAR([XMLLINT], [path to xmllint utility])
AC_PATH_PROGS([DB2LATEX], [db2latex docbook2latex], [db2latex])
AC_ARG_VAR([DB2LATEX], [path to db2latex utility])
David King's avatar
David King committed
57 58
MM_CHECK_PERL()

59 60 61
# This is just defined to avoid breaking old code:
AC_DEFINE([LIBXMLCPP_EXCEPTIONS_ENABLED],[1], [This is always set. This is only for backwards compatibility.])

62
AC_CONFIG_FILES([Makefile
63
        examples/Makefile
64
        tests/Makefile
65
        docs/reference/Doxyfile
66
        MSVC_Net2010/libxml++/libxml++.rc
67
        libxml++-2.6.pc])
David King's avatar
David King committed
68

69
# Copy the generated configuration headers into the MSVC project directories.
70 71
AC_CONFIG_COMMANDS([MSVC_Net2010/libxml++/libxml++config.h],
        [cp -f libxml++config.h MSVC_Net2010/libxml++/libxml++config.h])
David King's avatar
David King committed
72 73

AC_OUTPUT