dnl Copyright (C) 2001-2024 Zabbix SIA
dnl This program is free software: you can redistribute it and/or modify it under the terms of
dnl the GNU Affero General Public License as published by the Free Software Foundation, version 3.
dnl This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
dnl without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
dnl See the GNU Affero General Public License for more details.
dnl You should have received a copy of the GNU Affero General Public License along with this program.
dnl If not, see <https://www.gnu.org/licenses/>.
dnl Process this file with autoconf to produce a configure script.
AC_INIT([Zabbix], [7.4.0alpha1])
AC_MSG_NOTICE([Configuring $PACKAGE_NAME $PACKAGE_VERSION])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([src/zabbix_server/server.c])
AC_CONFIG_HEADERS([include/common/config.h])
AC_SUBST(DEFAULT_INCLUDES, ['-I$(top_srcdir)/include/common -I$(top_srcdir)/include'])
AM_INIT_AUTOMAKE([subdir-objects tar-pax])
dnl *****************************************************************
dnl * Checks for programs *
dnl *****************************************************************
dnl * Program capability tests
AC_MSG_CHECKING(whether compiler continues when given unrecognized flags)
cc_rejects_unknown_flags=
dnl Be mindful of the flag you're passing.
dnl Depending on the compiler's argument parsing, this may be interpreted
dnl as another flag. Be very explicit.
CFLAGS="--ThisFlagShouldCauseACompilerInvocationFailure"
dnl The program should be legal C99 to avoid unrelated failures.
dnl As the test harness wraps the body in a main() with a
dnl successful return, we don't need to provide any code
dnl for the compiler to succeed at the test.
cc_rejects_unknown_flags="no"
cc_rejects_unknown_flags="yes"
dnl The -Werror flag is _not_ supported by compilers such as
dnl xlc (IBM's C/C++ compiler suite on AIX), where the flag
dnl `-qhalt` enables the same behavior.
AC_MSG_CHECKING(whether compiler supports -Werror)
dnl XXX: The flag to be tested gets _appended_ in case the
dnl user has provided CFLAGS containing -Wno-error, which would
dnl negate the effect of -Werror.
dnl The program should be legal C99 to avoid unrelated failures.
dnl As the test harness wraps the body in a main() with a
dnl successful return, we don't really need to provide
dnl any code to get the compiler to succeed at the test.
dnl The expectation is when the compiler will not recognize