1 /******************************************************************************
3 * Copyright (C) 2012 Icinga Development Team (http://www.icinga.org/) *
5 * This program is free software; you can redistribute it and/or *
6 * modify it under the terms of the GNU General Public License *
7 * as published by the Free Software Foundation; either version 2 *
8 * of the License, or (at your option) any later version. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the Free Software Foundation *
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
18 ******************************************************************************/
21 AX_SPEC_FILE([icinga2.spec])
24 AC_CONFIG_AUX_DIR([m4])
25 AC_CONFIG_HEADERS([config.h])
26 AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
27 m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])])
28 AM_SILENT_RULES([yes])
38 LT_INIT([dlopen disable-static win32-dll])
39 LT_CONFIG_LTDL_DIR([third-party/ltdl])
50 DX_INIT_DOXYGEN([icinga], [docs/Doxyfile], [docs/dev])
51 AD_INIT_ASCIIDOC([icinga], [docs])
53 AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
59 AX_CXX_GCC_ABI_DEMANGLE
60 AX_BOOST_BASE([1.41], [], [AC_MSG_ERROR([You need the Boost headers and libraries in order to build this application])])
64 AX_BOOST_UNIT_TEST_FRAMEWORK
65 AX_BOOST_PROGRAM_OPTIONS
66 AX_CHECK_OPENSSL([], [AC_MSG_ERROR([You need the OpenSSL headers and libraries in order to build this application])])
67 AC_CHECK_LIB(ssl, SSL_new)
68 AC_CHECK_LIB(crypto, X509_NAME_oneline)
69 AC_CHECK_LIB(eay32, X509_NAME_oneline)
70 AC_CHECK_LIB(m, floor)
71 AC_CHECK_LIB(socket, getsockname)
72 AC_CHECK_LIB(ws2_32, getsockname)
73 AC_CHECK_LIB(shlwapi, PathRemoveFileSpecA)
74 AC_CHECK_FUNCS([backtrace_symbols execvpe pipe2])
76 CFLAGS="$CFLAGS -Wall -Wextra"
77 CXXFLAGS="$CXXFLAGS -Wall -Wextra"
79 AC_MSG_CHECKING(whether to enable debugging)
80 AC_ARG_ENABLE(debug, [ --enable-debug=[no/yes] turn on debugging (default=no)],, enable_debug=no)
81 if test "x$enable_debug" = "xyes"; then
82 CFLAGS="$CFLAGS -g -O0 -D_DEBUG"
83 CXXFLAGS="$CXXFLAGS -g -O0 -D_DEBUG"
85 CFLAGS="$CFLAGS -DNDEBUG"
86 CXXFLAGS="$CXXFLAGS -DNDEBUG"
88 AC_MSG_RESULT($enable_debug)
90 AC_MSG_CHECKING(whether to enable coverage)
91 AC_ARG_ENABLE(coverage, [ --enable-coverage=[no/yes] turn on profiling (default=no)],, enable_coverage=no)
92 if test "x$enable_coverage" = "xyes"; then
93 CFLAGS="$CFLAGS -g -O0 -DNDEBUG -fprofile-arcs -ftest-coverage -lgcov"
94 CXXFLAGS="$CXXFLAGS -g -O0 -DNDEBUG -fprofile-arcs -ftest-coverage -lgcov"
96 AC_MSG_RESULT($enable_coverage)
100 AX_PYTHON_VERSION_ENSURE([2.5])
104 AS_AC_EXPAND([ICINGA_PREFIX], $prefix)
105 AC_DEFINE_UNQUOTED([ICINGA_PREFIX], "$ICINGA_PREFIX", [The installation prefix.])
107 AS_AC_EXPAND([ICINGA_LOCALSTATEDIR], $localstatedir)
108 AC_DEFINE_UNQUOTED([ICINGA_LOCALSTATEDIR], "$ICINGA_LOCALSTATEDIR", [The local state dir.])
110 AS_AC_EXPAND([ICINGA_PKGLIBDIR], $libdir/$PACKAGE)
111 AC_DEFINE_UNQUOTED([ICINGA_PKGLIBDIR], "$ICINGA_PKGLIBDIR", [The package lib dir.])
113 AS_AC_EXPAND([ICINGA_PKGDATADIR], $datadir/$PACKAGE)
114 AC_DEFINE_UNQUOTED([ICINGA_PKGDATADIR], "$ICINGA_PKGDATADIR", [The package data dir.])
119 components/checker/Makefile
120 components/compat/Makefile
121 components/delegation/Makefile
122 components/demo/Makefile
123 components/livestatus/Makefile
124 components/notification/Makefile
125 components/replication/Makefile
138 lib/remoting/Makefile
141 third-party/cJSON/Makefile
142 third-party/execvpe/Makefile
143 third-party/mmatch/Makefile
150 if ! test -z "$LTDLDEPS"; then
153 ltdl_msg="system-provided"
160 *** Please note that at this point Icinga 2 is highly experimental software
161 *** and is missing a significant portion of the planned features. This
162 *** is merely a technology preview and if you're planning to set up
163 *** a production environment for Icinga you should use Icinga 1.x instead.