]> git.tdb.fi Git - ext/sigc++-2.0.git/blob - configure.ac
Adjust the name of the library to match upstream
[ext/sigc++-2.0.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.10.8],
19         [https://github.com/libsigcplusplus/libsigcplusplus/issues/],
20         [libsigc++], [https://libsigcplusplus.github.io/libsigcplusplus/])
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 no-dist-gzip dist-xz tar-ustar no-define nostdinc])
29 # Support silent build rules.
30 # Disable by either passing --disable-silent-rules to configure or passing V=1 to make.
31 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
32 AM_MAINTAINER_MODE
33 AC_ARG_VAR([ACLOCAL_FLAGS], [aclocal flags, e.g. -I <macro dir>])
34
35 MM_PREREQ([0.9.10])
36 MM_INIT_MODULE([sigc++-2.0])
37 MM_CONFIG_DOCTOOL_DIR([docs])
38
39 AC_PROG_CXX
40 MM_AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory])
41
42 AC_DISABLE_STATIC
43 LT_INIT([win32-dll])
44
45 AC_ARG_VAR([M4], [M4 macro processor command])
46 AC_CHECK_PROGS([M4], [gm4 m4])
47
48 AS_IF([test "x$M4" = x],
49       [AC_MSG_FAILURE([[The GNU M4 macro processor is required for building libsigc++.]])])
50
51 MM_ARG_ENABLE_DOCUMENTATION
52 MM_ARG_WITH_TAGFILE_DOC([libstdc++.tag], [mm-common-libstdc++])
53
54 AC_LANG([C++])
55 SIGC_CXX_GCC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
56 SIGC_CXX_MSVC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
57 SIGC_CXX_PRAGMA_PUSH_POP_MACRO
58 SIGC_CXX_HAS_SUN_REVERSE_ITERATOR
59
60 AS_IF([test "x$config_error" = xyes],
61       [AC_MSG_FAILURE([[One or more of the required C++ compiler features is missing.]])])
62
63 # Evaluate the --enable-warnings=level option.
64 MM_ARG_ENABLE_WARNINGS([SIGC_WXXFLAGS],
65                        [-Wall],
66                        [-pedantic -Wall -Wextra -Wsuggest-override -Wshadow -Wzero-as-null-pointer-constant -Wformat-security])
67
68 # Offer the ability to omit some API from the library.
69 MM_ARG_DISABLE_DEPRECATED_API([SIGCXX])
70
71 AC_ARG_ENABLE(benchmark,
72   AS_HELP_STRING([--enable-benchmark=yes|no])
73 )
74
75 AM_CONDITIONAL([SIGC_BUILD_BENCHMARK], [test "x$enable_benchmark" = xyes])
76
77 AS_IF([test "x$enable_benchmark" = xyes],[
78   #Use boost::timer for our benchmark, if it's available.
79   # See http://www.gnu.org/software/autoconf-archive/ax_boost_base.html
80   # Boost System is needed by Boost Timer
81   AX_BOOST_BASE
82   AX_BOOST_SYSTEM
83   AX_BOOST_TIMER
84 ])
85
86 AC_CONFIG_FILES([Makefile
87                  ${SIGCXX_MODULE_NAME}.pc:sigc++.pc.in
88                  ${SIGCXX_MODULE_NAME}-uninstalled.pc:sigc++-uninstalled.pc.in
89                  sigc++/Makefile
90                  examples/Makefile
91                  tests/Makefile
92                  docs/Makefile
93                  docs/reference/Doxyfile
94                  MSVC_NMake/sigc.rc])
95
96 # Copy the generated configuration headers into the MSVC project directories.
97 AC_CONFIG_COMMANDS([MSVC_NMake/sigc++config.h],
98                    [cp -f sigc++config.h MSVC_NMake/sigc++config.h])
99 AC_OUTPUT