dnl
dnl Copyright (C) 2001-2025 Zabbix SIA
dnl
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
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
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
dnl Process this file with autoconf to produce a configure script.
AC_INIT([Zabbix],[7.0.10])
AC_CONFIG_SRCDIR(src/zabbix_server/server.c)
AM_INIT_AUTOMAKE([subdir-objects tar-pax])
AC_MSG_NOTICE([Configuring $PACKAGE_NAME $PACKAGE_VERSION])
AC_PROG_MAKE_SET
AC_CONFIG_HEADERS(include/common/config.h)
AC_SUBST(DEFAULT_INCLUDES, ['-I$(top_srcdir)/include/common -I$(top_srcdir)/include'])
AC_CANONICAL_HOST
dnl *****************************************************************
dnl * *
dnl * Checks for programs *
dnl * *
dnl *****************************************************************
AC_PROG_CC([cc c99 gcc clang])
AM_PROG_CC_C_O
dnl *****************************************************************
dnl * *
dnl * Checks for header files *
dnl * *
dnl *****************************************************************
AC_PROG_EGREP
AC_CHECK_HEADERS(stdio.h stdlib.h string.h unistd.h netdb.h signal.h malloc.h \
syslog.h time.h errno.h sys/types.h sys/stat.h netinet/in.h \
math.h sys/socket.h dirent.h ctype.h \
fcntl.h sys/param.h arpa/inet.h \
sys/vfs.h sys/pstat.h sys/sysinfo.h sys/statvfs.h sys/statfs.h \
sys/loadavg.h sys/vmmeter.h strings.h vm/vm_param.h \
sys/time.h kstat.h sys/syscall.h sys/sysmacros.h \
stdint.h mach/host_info.h mach/mach_host.h pwd.h \
sys/var.h arpa/nameser.h assert.h sys/dkstat.h sys/disk.h sys/sched.h \
zone.h nlist.h kvm.h linux/version.h procinfo.h sys/dk.h \
sys/resource.h pthread.h windows.h process.h conio.h sys/wait.h \
stdarg.h winsock2.h pdh.h psapi.h sys/sem.h sys/ipc.h sys/shm.h Winldap.h \
Winber.h lber.h ws2tcpip.h inttypes.h sys/file.h grp.h \
execinfo.h sys/systemcfg.h sys/mnttab.h mntent.h sys/times.h \
dlfcn.h sys/utsname.h sys/un.h sys/protosw.h stddef.h limits.h float.h poll.h \
libgen.h)
AC_CHECK_HEADERS(resolv.h, [], [], [
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_NAMESER_H
# include <arpa/nameser.h>
#endif
#ifdef HAVE_NETDB_H
#if defined(_AIX) /* AIX 5.1 needs this to get hstrerror() declaration */
#define _USE_IRS
#endif
# include <netdb.h>
#endif
])
AC_CHECK_HEADERS(net/if.h net/if_mib.h, [], [], [
#include <stdio.h>
#ifdef STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#else
# ifdef HAVE_STDLIB_H
# include <stdlib.h>
# endif
#endif
#ifdef HAVE_SYS_TYPES_H