2012-05-26 14:40:15 +02:00
|
|
|
/******************************************************************************
|
|
|
|
* Icinga 2 *
|
2013-09-25 07:43:57 +02:00
|
|
|
* Copyright (C) 2012-2013 Icinga Development Team (http://www.icinga.org/) *
|
2012-05-26 14:40:15 +02:00
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or *
|
|
|
|
* modify it under the terms of the GNU General Public License *
|
|
|
|
* as published by the Free Software Foundation; either version 2 *
|
|
|
|
* of the License, or (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
* GNU General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU General Public License *
|
|
|
|
* along with this program; if not, write to the Free Software Foundation *
|
|
|
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
|
|
|
******************************************************************************/
|
2012-03-28 13:24:49 +02:00
|
|
|
|
2013-09-30 13:28:57 +02:00
|
|
|
AC_INIT([icinga2], [0.0.3])
|
2012-09-07 10:27:31 +02:00
|
|
|
AC_CONFIG_AUX_DIR([m4])
|
2012-03-28 13:24:49 +02:00
|
|
|
AC_CONFIG_HEADERS([config.h])
|
2013-09-27 14:12:43 +02:00
|
|
|
AM_INIT_AUTOMAKE([subdir-objects])
|
2013-09-30 13:39:45 +02:00
|
|
|
AX_SET_VERSION_INFO
|
2013-09-27 14:40:35 +02:00
|
|
|
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
2012-05-29 11:38:51 +02:00
|
|
|
|
2012-05-27 16:21:50 +02:00
|
|
|
AC_PROG_CXX
|
|
|
|
AC_LANG_CPLUSPLUS
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_LANG_C
|
2013-03-12 09:58:27 +01:00
|
|
|
AC_PROG_MKDIR_P
|
2012-05-27 16:21:50 +02:00
|
|
|
|
2013-02-09 23:02:33 +01:00
|
|
|
AC_FUNC_VFORK
|
|
|
|
|
2013-09-27 19:41:08 +02:00
|
|
|
AC_ARG_WITH([icinga_user],
|
|
|
|
AC_HELP_STRING([--with-icinga-user=<user>],[sets user name to run icinga2]),
|
|
|
|
icinga_user=$withval,
|
|
|
|
icinga_user=icinga
|
|
|
|
)
|
|
|
|
ACICINGA_CHECK_USER([$icinga_user], run)
|
|
|
|
AC_SUBST(icinga_user)
|
|
|
|
|
|
|
|
AC_ARG_WITH(icinga_group,
|
|
|
|
AC_HELP_STRING([--with-icinga-group=<group>],[sets group name to run icinga2]),
|
|
|
|
icinga_group=$withval,
|
|
|
|
icinga_group=icinga
|
|
|
|
)
|
|
|
|
ACICINGA_CHECK_GROUP([$icinga_group], run)
|
|
|
|
AC_SUBST(icinga_group)
|
|
|
|
|
2013-10-02 14:50:32 +02:00
|
|
|
INSTALL_OPTS="-o $icinga_user -g $icinga_group"
|
2013-09-27 19:41:08 +02:00
|
|
|
AC_SUBST(INSTALL_OPTS)
|
|
|
|
|
|
|
|
AC_ARG_WITH(icingacmd_user,
|
|
|
|
AC_HELP_STRING([--with-icingacmd-user=<user>],[sets user name for icinga2 command access]),
|
|
|
|
icingacmd_user=$withval,
|
|
|
|
icingacmd_user=icinga
|
|
|
|
)
|
|
|
|
ACICINGA_CHECK_USER([$icingacmd_user], cmd)
|
|
|
|
AC_SUBST(icingacmd_user)
|
|
|
|
|
|
|
|
AC_ARG_WITH(icingacmd_group,
|
|
|
|
AC_HELP_STRING([--with-icingacmd-group=<group>] ,[sets group name for icinga2 command access]),
|
|
|
|
icingacmd_group=$withval,
|
|
|
|
icingacmd_group=icingacmd
|
|
|
|
)
|
|
|
|
ACICINGA_CHECK_GROUP([$icingacmd_group], cmd)
|
|
|
|
AC_SUBST(icingacmd_group)
|
|
|
|
|
|
|
|
COMMAND_OPTS="-o $icingacmd_user -g $icingacmd_group"
|
|
|
|
AC_SUBST(COMMAND_OPTS)
|
|
|
|
|
|
|
|
|
2013-09-21 20:04:46 +02:00
|
|
|
CFLAGS="$CFLAGS -D_GNU_SOURCE -pthread"
|
|
|
|
CXXFLAGS="$CXXFLAGS -D_GNU_SOURCE -pthread"
|
|
|
|
|
|
|
|
CFLAGS="$CFLAGS -I/opt/local/include"
|
|
|
|
CXXFLAGS="$CXXFLAGS -I/opt/local/include"
|
|
|
|
LDFLAGS="$LDFLAGS -L/opt/local/lib"
|
|
|
|
|
2012-05-29 16:24:55 +02:00
|
|
|
LT_INIT([dlopen disable-static win32-dll])
|
2012-05-29 11:38:51 +02:00
|
|
|
LT_CONFIG_LTDL_DIR([third-party/ltdl])
|
2012-05-25 14:40:10 +02:00
|
|
|
LTDL_INIT
|
|
|
|
|
2012-05-18 11:31:55 +02:00
|
|
|
DX_HTML_FEATURE(ON)
|
|
|
|
DX_CHM_FEATURE(OFF)
|
|
|
|
DX_CHI_FEATURE(OFF)
|
|
|
|
DX_MAN_FEATURE(OFF)
|
|
|
|
DX_RTF_FEATURE(OFF)
|
|
|
|
DX_XML_FEATURE(OFF)
|
|
|
|
DX_PDF_FEATURE(OFF)
|
|
|
|
DX_PS_FEATURE(OFF)
|
2013-09-30 12:57:08 +02:00
|
|
|
DX_INIT_DOXYGEN([icinga], [doc/Doxyfile], [doc/dev])
|
2012-05-18 11:31:55 +02:00
|
|
|
|
2012-05-25 13:51:05 +02:00
|
|
|
AC_PROG_INSTALL
|
2012-09-26 09:54:11 +02:00
|
|
|
AC_PROG_LEX
|
2012-05-31 08:45:02 +02:00
|
|
|
AC_PROG_YACC
|
2012-05-25 13:51:05 +02:00
|
|
|
AC_PROG_LIBTOOL
|
2012-04-03 13:38:30 +02:00
|
|
|
AX_CXX_GCC_ABI_DEMANGLE
|
2012-09-18 12:38:08 +02:00
|
|
|
AX_BOOST_BASE([1.41], [], [AC_MSG_ERROR([You need the Boost headers and libraries in order to build this application])])
|
2012-06-14 15:16:41 +02:00
|
|
|
AX_BOOST_SIGNALS
|
2012-06-17 20:35:56 +02:00
|
|
|
AX_BOOST_THREAD
|
2012-08-14 10:53:04 +02:00
|
|
|
AX_BOOST_SYSTEM
|
2012-05-29 11:38:51 +02:00
|
|
|
AX_BOOST_UNIT_TEST_FRAMEWORK
|
2013-02-02 23:22:27 +01:00
|
|
|
AX_BOOST_PROGRAM_OPTIONS
|
2012-05-29 16:24:55 +02:00
|
|
|
AX_CHECK_OPENSSL([], [AC_MSG_ERROR([You need the OpenSSL headers and libraries in order to build this application])])
|
2012-04-24 14:04:51 +02:00
|
|
|
AC_CHECK_LIB(ssl, SSL_new)
|
|
|
|
AC_CHECK_LIB(crypto, X509_NAME_oneline)
|
|
|
|
AC_CHECK_LIB(eay32, X509_NAME_oneline)
|
2012-05-09 12:10:07 +02:00
|
|
|
AC_CHECK_LIB(m, floor)
|
2012-05-26 13:53:24 +02:00
|
|
|
AC_CHECK_LIB(socket, getsockname)
|
2012-05-28 10:41:21 +02:00
|
|
|
AC_CHECK_LIB(ws2_32, getsockname)
|
|
|
|
AC_CHECK_LIB(shlwapi, PathRemoveFileSpecA)
|
2013-09-08 13:13:37 +02:00
|
|
|
AC_CHECK_FUNCS([backtrace_symbols execvpe pipe2 pthread_set_name_np pthread_setname_np])
|
2012-04-24 14:04:51 +02:00
|
|
|
|
2013-04-19 13:23:25 +02:00
|
|
|
CFLAGS="$CFLAGS -Wall -Wextra"
|
2013-04-19 13:25:55 +02:00
|
|
|
CXXFLAGS="$CXXFLAGS -Wall -Wextra"
|
2013-04-18 16:40:09 +02:00
|
|
|
|
2013-02-25 08:58:44 +01:00
|
|
|
AC_MSG_CHECKING(whether to enable debugging)
|
|
|
|
AC_ARG_ENABLE(debug, [ --enable-debug=[no/yes] turn on debugging (default=no)],, enable_debug=no)
|
|
|
|
if test "x$enable_debug" = "xyes"; then
|
2013-04-18 16:40:09 +02:00
|
|
|
CFLAGS="$CFLAGS -g -O0 -D_DEBUG"
|
|
|
|
CXXFLAGS="$CXXFLAGS -g -O0 -D_DEBUG"
|
2013-02-26 10:13:54 +01:00
|
|
|
else
|
|
|
|
CFLAGS="$CFLAGS -DNDEBUG"
|
|
|
|
CXXFLAGS="$CXXFLAGS -DNDEBUG"
|
2013-02-25 08:58:44 +01:00
|
|
|
fi
|
|
|
|
AC_MSG_RESULT($enable_debug)
|
|
|
|
|
2013-04-18 16:40:09 +02:00
|
|
|
AC_MSG_CHECKING(whether to enable coverage)
|
|
|
|
AC_ARG_ENABLE(coverage, [ --enable-coverage=[no/yes] turn on profiling (default=no)],, enable_coverage=no)
|
|
|
|
if test "x$enable_coverage" = "xyes"; then
|
2013-04-19 11:27:18 +02:00
|
|
|
CFLAGS="$CFLAGS -g -O0 -DNDEBUG -fprofile-arcs -ftest-coverage -lgcov"
|
|
|
|
CXXFLAGS="$CXXFLAGS -g -O0 -DNDEBUG -fprofile-arcs -ftest-coverage -lgcov"
|
2013-04-18 16:40:09 +02:00
|
|
|
fi
|
|
|
|
AC_MSG_RESULT($enable_coverage)
|
|
|
|
|
2013-08-08 16:44:16 +02:00
|
|
|
AX_LIB_MYSQL([5.0])
|
|
|
|
AC_CHECK_HEADERS([mysql/mysql.h], [mysql_use=true], [AC_MSG_WARN([mysql.h not found. Will not build mysql related libs/components.])])
|
|
|
|
AM_CONDITIONAL(MYSQL_USE, test x"$mysql_use" = x"true")
|
|
|
|
|
2013-02-14 14:58:26 +01:00
|
|
|
AX_PYTHON_DEFAULT
|
|
|
|
AX_PYTHON_ENABLE
|
|
|
|
AX_PYTHON_VERSION_ENSURE([2.5])
|
|
|
|
AX_PYTHON_CSPEC
|
|
|
|
AX_PYTHON_LSPEC
|
|
|
|
|
2013-04-22 11:31:15 +02:00
|
|
|
AM_COND_IF([PYTHON_USE], [AX_PYTHON_DEVEL([>= 2.5])])
|
|
|
|
|
2012-09-28 13:16:08 +02:00
|
|
|
AS_AC_EXPAND([ICINGA_PREFIX], $prefix)
|
|
|
|
AC_DEFINE_UNQUOTED([ICINGA_PREFIX], "$ICINGA_PREFIX", [The installation prefix.])
|
|
|
|
|
|
|
|
AS_AC_EXPAND([ICINGA_LOCALSTATEDIR], $localstatedir)
|
|
|
|
AC_DEFINE_UNQUOTED([ICINGA_LOCALSTATEDIR], "$ICINGA_LOCALSTATEDIR", [The local state dir.])
|
|
|
|
|
2012-10-04 08:55:05 +02:00
|
|
|
AS_AC_EXPAND([ICINGA_PKGLIBDIR], $libdir/$PACKAGE)
|
2012-10-02 09:26:17 +02:00
|
|
|
AC_DEFINE_UNQUOTED([ICINGA_PKGLIBDIR], "$ICINGA_PKGLIBDIR", [The package lib dir.])
|
|
|
|
|
2013-02-01 22:44:58 +01:00
|
|
|
AS_AC_EXPAND([ICINGA_PKGDATADIR], $datadir/$PACKAGE)
|
|
|
|
AC_DEFINE_UNQUOTED([ICINGA_PKGDATADIR], "$ICINGA_PKGDATADIR", [The package data dir.])
|
|
|
|
|
2012-05-29 16:14:49 +02:00
|
|
|
AC_CONFIG_FILES([
|
2013-09-30 13:28:57 +02:00
|
|
|
icinga2.spec
|
2012-03-28 13:24:49 +02:00
|
|
|
Makefile
|
2012-04-13 13:16:54 +02:00
|
|
|
components/Makefile
|
2012-06-14 11:18:20 +02:00
|
|
|
components/checker/Makefile
|
2013-08-27 12:21:41 +02:00
|
|
|
components/cluster/Makefile
|
2012-06-27 18:43:34 +02:00
|
|
|
components/compat/Makefile
|
2012-04-23 13:45:41 +02:00
|
|
|
components/demo/Makefile
|
2013-09-25 10:30:47 +02:00
|
|
|
components/db_ido_mysql/Makefile
|
2013-10-11 15:05:20 +02:00
|
|
|
components/db_ido_mysql/schema/Makefile
|
|
|
|
components/db_ido_mysql/schema/upgrade/Makefile
|
2013-03-10 03:09:01 +01:00
|
|
|
components/livestatus/Makefile
|
2013-02-07 21:08:16 +01:00
|
|
|
components/notification/Makefile
|
2013-09-30 12:57:08 +02:00
|
|
|
doc/Doxyfile
|
|
|
|
doc/Makefile
|
2013-10-11 09:40:51 +02:00
|
|
|
doc/strapdownjs/Makefile
|
|
|
|
doc/strapdownjs/themes/Makefile
|
2013-02-04 12:43:16 +01:00
|
|
|
etc/Makefile
|
2013-10-10 15:12:56 +02:00
|
|
|
etc/icinga/Makefile
|
2013-02-04 12:43:16 +01:00
|
|
|
etc/icinga2/Makefile
|
2013-09-27 10:44:24 +02:00
|
|
|
etc/icinga2/conf.d/Makefile
|
2013-09-27 11:16:35 +02:00
|
|
|
etc/icinga2/features-available/Makefile
|
2013-02-04 12:43:16 +01:00
|
|
|
etc/init.d/Makefile
|
2012-04-13 11:45:09 +02:00
|
|
|
icinga-app/Makefile
|
2013-02-01 11:39:06 +01:00
|
|
|
itl/Makefile
|
2012-09-07 10:27:31 +02:00
|
|
|
lib/Makefile
|
|
|
|
lib/base/Makefile
|
|
|
|
lib/config/Makefile
|
|
|
|
lib/icinga/Makefile
|
2013-09-25 10:30:47 +02:00
|
|
|
lib/db_ido/Makefile
|
2013-02-14 14:58:26 +01:00
|
|
|
lib/python/Makefile
|
2012-05-28 11:53:51 +02:00
|
|
|
test/Makefile
|
2012-05-29 11:38:51 +02:00
|
|
|
third-party/Makefile
|
|
|
|
third-party/cJSON/Makefile
|
2013-02-10 17:15:18 +01:00
|
|
|
third-party/execvpe/Makefile
|
2012-05-29 11:38:51 +02:00
|
|
|
third-party/mmatch/Makefile
|
2013-03-12 13:45:54 +01:00
|
|
|
tools/Makefile
|
2013-10-10 20:47:53 +02:00
|
|
|
tools/migration/Makefile
|
2013-09-27 11:16:35 +02:00
|
|
|
tools/i2enfeature
|
2013-06-24 15:57:11 +02:00
|
|
|
tools/mkembedconfig/Makefile
|
2012-03-28 13:24:49 +02:00
|
|
|
])
|
2013-10-02 13:28:02 +02:00
|
|
|
|
2013-02-04 12:43:16 +01:00
|
|
|
AC_OUTPUT([
|
|
|
|
etc/init.d/icinga2
|
|
|
|
])
|
2012-05-29 16:14:49 +02:00
|
|
|
|
2013-10-02 13:28:02 +02:00
|
|
|
# Fix -rpath problem (https://wiki.debian.org/RpathIssue)
|
|
|
|
case ${host} in
|
|
|
|
*-linux-gnu)
|
2013-10-03 23:31:17 +02:00
|
|
|
sed 's|^sys_lib_dlsearch_path_spec=.*|sys_lib_dlsearch_path_spec="/lib64 /lib /usr/lib64 /usr/lib /usr/lib/x86_64-linux-gnu /usr/lib/i686-linux-gnu /usr/local/lib64 /usr/local/lib"|g' libtool >libtool.new
|
2013-10-02 13:28:02 +02:00
|
|
|
mv libtool.new libtool
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2012-05-29 16:14:49 +02:00
|
|
|
if ! test -z "$LTDLDEPS"; then
|
|
|
|
ltdl_msg="bundled"
|
|
|
|
else
|
|
|
|
ltdl_msg="system-provided"
|
|
|
|
fi
|
|
|
|
|
2013-09-27 14:51:29 +02:00
|
|
|
AM_COND_IF([MYSQL_USE], [mysql_msg="enabled"], [mysql_msg="disabled"])
|
|
|
|
AM_COND_IF([PYTHON_USE], [python_msg="enabled"], [python_msg="disabled"])
|
|
|
|
|
2012-05-29 16:14:49 +02:00
|
|
|
echo "
|
|
|
|
Libraries:
|
|
|
|
ltdl: $ltdl_msg
|
2012-10-16 09:54:06 +02:00
|
|
|
|
2013-09-27 14:51:29 +02:00
|
|
|
Features:
|
|
|
|
MySQL: $mysql_msg
|
|
|
|
Python: $python_msg
|
|
|
|
|
2013-09-30 09:14:21 +02:00
|
|
|
Users:
|
|
|
|
User: $icinga_user
|
|
|
|
Group: $icinga_group
|
|
|
|
Command User: $icingacmd_user
|
|
|
|
Command Group: $icingacmd_group
|
|
|
|
|
2012-10-16 09:54:06 +02:00
|
|
|
*** Please note that at this point Icinga 2 is highly experimental software
|
|
|
|
*** and is missing a significant portion of the planned features. This
|
|
|
|
*** is merely a technology preview and if you're planning to set up
|
|
|
|
*** a production environment for Icinga you should use Icinga 1.x instead.
|
2012-05-29 16:14:49 +02:00
|
|
|
"
|