Imported Upstream version 2.4.1
[platform/upstream/libsigc++.git] / configure.ac
1 ## Copyright (c) 2009  Openismus GmbH  <http://www.openismus.com/>
2 ##
3 ## This file is part of libsigc++.
4 ##
5 ## libsigc++ is free software: you can redistribute it and/or modify it
6 ## under the terms of the GNU Lesser General Public License as published
7 ## by the Free Software Foundation, either version 2.1 of the License,
8 ## or (at your option) any later version.
9 ##
10 ## libsigc++ is distributed in the hope that it will be useful, but
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 ## See the GNU Lesser General Public License for more details.
14 ##
15 ## You should have received a copy of the GNU Lesser General Public License
16 ## along with this library.  If not, see <http://www.gnu.org/licenses/>.
17
18 AC_INIT([libsigc++], [2.4.1],
19         [http://bugzilla.gnome.org/enter_bug.cgi?product=libsigc%2B%2B],
20         [libsigc++], [http://libsigc.sourceforge.net/])
21 AC_PREREQ([2.59])
22
23 AC_CONFIG_SRCDIR([sigc++/sigc++.h])
24 AC_CONFIG_AUX_DIR([build])
25 AC_CONFIG_MACRO_DIR([build])
26 AC_CONFIG_HEADERS([config.h sigc++config.h])
27
28 AM_INIT_AUTOMAKE([1.9 -Wno-portability check-news dist-bzip2 no-define nostdinc tar-ustar])
29 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
30 AM_MAINTAINER_MODE
31 AC_ARG_VAR([ACLOCAL_FLAGS], [aclocal flags, e.g. -I <macro dir>])
32
33 MM_PREREQ([0.9.7])
34 MM_INIT_MODULE([sigc++-2.0])
35 MM_CONFIG_DOCTOOL_DIR([docs])
36
37 AC_PROG_CXX
38 AC_DISABLE_STATIC
39 LT_INIT([win32-dll])
40
41 AC_ARG_VAR([M4], [M4 macro processor command])
42 AC_CHECK_PROGS([M4], [gm4 m4])
43
44 AS_IF([test "x$M4" = x],
45       [AC_MSG_FAILURE([[The GNU M4 macro processor is required for building libsigc++.]])])
46
47 MM_ARG_ENABLE_DOCUMENTATION
48 MM_ARG_WITH_TAGFILE_DOC([libstdc++.tag], [mm-common-libstdc++])
49
50 AC_LANG([C++])
51 SIGC_CXX_GCC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
52 SIGC_CXX_MSVC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
53 SIGC_CXX_SELF_REFERENCE_IN_MEMBER_INITIALIZATION
54 SIGC_CXX_HAS_NAMESPACE_STD
55 SIGC_CXX_HAS_SUN_REVERSE_ITERATOR
56
57 AS_IF([test "x$config_error" = xyes],
58       [AC_MSG_FAILURE([[One or more of the required C++ compiler features is missing.]])])
59
60 # Evaluate the --enable-warnings=level option.
61 MM_ARG_ENABLE_WARNINGS([SIGC_WXXFLAGS],
62                        [-Wall],
63                        [-pedantic -Wall -Wextra])
64
65 # Offer the ability to omit some API from the library.
66 MM_ARG_DISABLE_DEPRECATED_API([SIGCXX])
67
68 AC_CONFIG_FILES([Makefile
69                  ${SIGCXX_MODULE_NAME}.pc:sigc++.pc.in
70                  ${SIGCXX_MODULE_NAME}-uninstalled.pc:sigc++-uninstalled.pc.in
71                  sigc++/Makefile
72                  examples/Makefile
73                  tests/Makefile
74                  docs/Makefile
75                  docs/reference/Doxyfile
76                  MSVC_Net2005/sigc.rc
77                  MSVC_Net2008/sigc.rc
78                  MSVC_Net2010/sigc.rc])
79
80 # Copy the generated configuration headers into the MSVC project directories.
81 AC_CONFIG_COMMANDS([MSVC_Net2005/sigc++config.h],
82                    [cp -f sigc++config.h MSVC_Net2005/sigc++config.h])
83 AC_CONFIG_COMMANDS([MSVC_Net2008/sigc++config.h],
84                    [cp -f sigc++config.h MSVC_Net2008/sigc++config.h])
85 AC_CONFIG_COMMANDS([MSVC_Net2010/sigc++config.h],
86                    [cp -f sigc++config.h MSVC_Net2010/sigc++config.h])
87 AC_OUTPUT