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])
37 LT_INIT([dlopen disable-static win32-dll])
38 LT_CONFIG_LTDL_DIR([third-party/ltdl])
49 DX_INIT_DOXYGEN([icinga], [docs/Doxyfile], [docs/dev])
50 AD_INIT_ASCIIDOC([icinga], [docs])
52 AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
58 AX_CXX_GCC_ABI_DEMANGLE
59 AX_BOOST_BASE([1.41], [], [AC_MSG_ERROR([You need the Boost headers and libraries in order to build this application])])
63 AX_BOOST_UNIT_TEST_FRAMEWORK
64 AX_BOOST_PROGRAM_OPTIONS
65 AX_CHECK_OPENSSL([], [AC_MSG_ERROR([You need the OpenSSL headers and libraries in order to build this application])])
66 AC_CHECK_LIB(ssl, SSL_new)
67 AC_CHECK_LIB(crypto, X509_NAME_oneline)
68 AC_CHECK_LIB(eay32, X509_NAME_oneline)
69 AC_CHECK_LIB(m, floor)
70 AC_CHECK_LIB(socket, getsockname)
71 AC_CHECK_LIB(ws2_32, getsockname)
72 AC_CHECK_LIB(shlwapi, PathRemoveFileSpecA)
73 AC_CHECK_FUNCS([backtrace_symbols execvpe pipe2])
75 AC_MSG_CHECKING(whether to enable debugging)
76 AC_ARG_ENABLE(debug, [ --enable-debug=[no/yes] turn on debugging (default=no)],, enable_debug=no)
77 if test "x$enable_debug" = "xyes"; then
78 CFLAGS="$CFLAGS -g -O0 -D_DEBUG -Wall -Wextra"
79 CXXFLAGS="$CXXFLAGS -g -O0 -D_DEBUG -Wall -Wextra"
81 CFLAGS="$CFLAGS -DNDEBUG"
82 CXXFLAGS="$CXXFLAGS -DNDEBUG"
84 AC_MSG_RESULT($enable_debug)
87 if test "$ax_cv___attribute__" = "yes" && test "x$enable_debug" = "xno"; then
88 CFLAGS="$CFLAGS -fvisibility=hidden"
89 CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
94 AX_PYTHON_VERSION_ENSURE([2.5])
98 AS_AC_EXPAND([ICINGA_PREFIX], $prefix)
99 AC_DEFINE_UNQUOTED([ICINGA_PREFIX], "$ICINGA_PREFIX", [The installation prefix.])
101 AS_AC_EXPAND([ICINGA_LOCALSTATEDIR], $localstatedir)
102 AC_DEFINE_UNQUOTED([ICINGA_LOCALSTATEDIR], "$ICINGA_LOCALSTATEDIR", [The local state dir.])
104 AS_AC_EXPAND([ICINGA_PKGLIBDIR], $libdir/$PACKAGE)
105 AC_DEFINE_UNQUOTED([ICINGA_PKGLIBDIR], "$ICINGA_PKGLIBDIR", [The package lib dir.])
107 AS_AC_EXPAND([ICINGA_PKGDATADIR], $datadir/$PACKAGE)
108 AC_DEFINE_UNQUOTED([ICINGA_PKGDATADIR], "$ICINGA_PKGDATADIR", [The package data dir.])
113 components/checker/Makefile
114 components/compat/Makefile
115 components/delegation/Makefile
116 components/demo/Makefile
117 components/notification/Makefile
118 components/replication/Makefile
131 lib/remoting/Makefile
134 third-party/cJSON/Makefile
135 third-party/execvpe/Makefile
136 third-party/mmatch/Makefile
137 third-party/popen-noshell/Makefile
143 if ! test -z "$LTDLDEPS"; then
146 ltdl_msg="system-provided"
153 *** Please note that at this point Icinga 2 is highly experimental software
154 *** and is missing a significant portion of the planned features. This
155 *** is merely a technology preview and if you're planning to set up
156 *** a production environment for Icinga you should use Icinga 1.x instead.