|
Packit |
c22fc9 |
#
|
|
Packit |
c22fc9 |
# Keepalived OpenSource project.
|
|
Packit |
c22fc9 |
#
|
|
Packit |
c22fc9 |
# Configuration template file for keepalived.
|
|
Packit |
c22fc9 |
# autoconf will generate & check deps for proper compilation
|
|
Packit |
c22fc9 |
#
|
|
Packit |
c22fc9 |
# Copyright (C) 2001-2018 Alexandre Cassen, <acassen@linux-vs.org>
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
AC_DEFUN([add_to_var], [$1="$$1 $2"])
|
|
Packit |
c22fc9 |
AC_DEFUN([add_to_var_ind], [eval $1=\"\$$1 $2\"]) dnl "
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
AC_DEFUN([add_to_var_ind_unique],
|
|
Packit |
c22fc9 |
ADD_NEW=
|
|
Packit |
c22fc9 |
[ eval var=\$$1
|
|
Packit |
c22fc9 |
for item in $2; do
|
|
Packit |
c22fc9 |
echo " $var " | $GREP -q " $item "
|
|
Packit |
c22fc9 |
if test $? -ne 0; then
|
|
Packit |
c22fc9 |
add_to_var([ADD_NEW], [$item])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
done
|
|
Packit |
c22fc9 |
add_to_var_ind([$1], [$ADD_NEW])
|
|
Packit |
c22fc9 |
])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
AC_DEFUN([add_pkg_config],
|
|
Packit |
c22fc9 |
[ if test -n "$2"; then
|
|
Packit |
c22fc9 |
KA_PKG_PFX=$2
|
|
Packit |
c22fc9 |
else
|
|
Packit |
c22fc9 |
KA_PKG_PFX=KA
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
add_to_var_ind_unique([${KA_PKG_PFX}_CPPFLAGS], [`$PKG_CONFIG --cflags-only-I $1`])
|
|
Packit |
c22fc9 |
add_to_var_ind_unique([${KA_PKG_PFX}_CFLAGS], [`$PKG_CONFIG --cflags-only-other $1`])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
if test .$3 = .remove-requires; then
|
|
Packit |
c22fc9 |
REQUIRES=`$PKG_CONFIG --print-requires $1`
|
|
Packit |
c22fc9 |
var=`$PKG_CONFIG --libs-only-l $1`
|
|
Packit |
c22fc9 |
for r in $REQUIRES; do
|
|
Packit |
c22fc9 |
REQ_LIBS=`$PKG_CONFIG --libs-only-l $r`
|
|
Packit |
c22fc9 |
for l in $REQ_LIBS; do
|
|
Packit |
c22fc9 |
var=`echo " $var " | sed -e "s: $l : :g"`
|
|
Packit |
c22fc9 |
done
|
|
Packit |
c22fc9 |
done
|
|
Packit |
c22fc9 |
var=`echo $var | sed -e "s:^ *::" -e "s: *$::"`
|
|
Packit |
c22fc9 |
eval ${KA_PKG_PFX}_LIBS="\"$var\""
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
var=`echo $var | sed -e "s/-l//g"`
|
|
Packit |
c22fc9 |
eval ${KA_PKG_PFX}_LIB_NAMES="\"$var\""
|
|
Packit |
c22fc9 |
else
|
|
Packit |
c22fc9 |
add_to_var_ind_unique([${KA_PKG_PFX}_LIBS], [`$PKG_CONFIG --libs $1`])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
AC_DEFUN([add_pkg_config_without_libs],
|
|
Packit |
c22fc9 |
[ if test -n "$2"; then
|
|
Packit |
c22fc9 |
KA_PKG_PFX=$2
|
|
Packit |
c22fc9 |
else
|
|
Packit |
c22fc9 |
KA_PKG_PFX=KA
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
add_to_var_ind_unique([${KA_PKG_PFX}_CPPFLAGS], [$($PKG_CONFIG --cflags-only-I $1)])
|
|
Packit |
c22fc9 |
add_to_var_ind_unique([${KA_PKG_PFX}_CFLAGS], [$($PKG_CONFIG --cflags-only-other $1)])
|
|
Packit |
c22fc9 |
])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
AC_DEFUN([add_config_opt], [add_to_var([CONFIG_OPTIONS], [$1])])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
AC_DEFUN([add_system_opt], [add_to_var([SYSTEM_OPTIONS], [$1])])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
AC_DEFUN([get_lib_name],
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
if test $LDD = :; then
|
|
Packit |
c22fc9 |
AC_MSG_ERROR([ldd is required for dynamic run-time linking support])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
SAV_LIBS="$LIBS"
|
|
Packit Service |
dfccb1 |
LIBS="$LIBS -l$1"
|
|
Packit |
c22fc9 |
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
|
Packit |
c22fc9 |
extern void $2(void);
|
|
Packit |
c22fc9 |
int main(void)
|
|
Packit |
c22fc9 |
{
|
|
Packit |
c22fc9 |
$2();
|
|
Packit |
c22fc9 |
return 0;
|
|
Packit |
c22fc9 |
}
|
|
Packit |
c22fc9 |
]])], [
|
|
Packit |
c22fc9 |
LIB_DETAILS=`$LDD ./conftest$EXEEXT | grep $1.so | sed -e "s/^[[ \t]]*//"`
|
|
Packit |
c22fc9 |
LIB_NAME=`echo $LIB_DETAILS | sed -e "s/ .*//"`
|
|
Packit |
c22fc9 |
],[
|
|
Packit |
c22fc9 |
])
|
|
Packit |
c22fc9 |
LIBS="$SAV_LIBS"
|
|
Packit |
c22fc9 |
])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
# AS_VAR_COPY was introduced in autoconf 2.63b.
|
|
Packit |
c22fc9 |
# Remove the following definition once require autoconf >= 2.64.
|
|
Packit |
c22fc9 |
m4_ifndef([AS_VAR_COPY],
|
|
Packit |
c22fc9 |
[m4_define([AS_VAR_COPY],
|
|
Packit |
c22fc9 |
[AS_LITERAL_IF([$1[]$2], [$1=$$2], [eval $1=\$$2])])])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ Process this file with autoconf to produce a configure script ]----
|
|
Packit |
c22fc9 |
AC_PREREQ([2.63])
|
|
Packit Service |
dfccb1 |
AC_INIT([Keepalived], [2.1.5], [keepalived-users@groups.io], [], [http://www.keepalived.org/])
|
|
Packit Service |
dfccb1 |
AC_CONFIG_AUX_DIR([build-aux])
|
|
Packit Service |
dfccb1 |
AC_CONFIG_MACRO_DIR([m4])
|
|
Packit |
c22fc9 |
AM_INIT_AUTOMAKE([-Wall -Werror -Woverride foreign])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
AC_CONFIG_SRCDIR([keepalived/core/main.c])
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
AC_CONFIG_HEADERS([lib/config.h lib/config_warnings.h])
|
|
Packit Service |
dfccb1 |
|
|
Packit |
c22fc9 |
AH_TOP(
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
#ifndef _CONFIG_H
|
|
Packit |
c22fc9 |
#define _CONFIG_H
|
|
Packit |
c22fc9 |
])
|
|
Packit |
c22fc9 |
AH_BOTTOM(
|
|
Packit |
c22fc9 |
[
|
|
Packit Service |
dfccb1 |
#include "config_warnings.h"
|
|
Packit Service |
dfccb1 |
|
|
Packit |
c22fc9 |
#ifndef _GNU_SOURCE
|
|
Packit |
c22fc9 |
#define _GNU_SOURCE
|
|
Packit |
c22fc9 |
#endif
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
#endif])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
AC_CONFIG_FILES([Makefile keepalived/Makefile lib/Makefile keepalived/core/Makefile keepalived.spec \
|
|
Packit |
c22fc9 |
genhash/Makefile keepalived/check/Makefile keepalived/vrrp/Makefile \
|
|
Packit |
c22fc9 |
keepalived/bfd/Makefile doc/Makefile bin_install/Makefile keepalived/dbus/Makefile \
|
|
Packit |
c22fc9 |
keepalived/etc/Makefile keepalived/etc/init/Makefile keepalived/etc/init.d/Makefile \
|
|
Packit Service |
dfccb1 |
keepalived/trackers/Makefile \
|
|
Packit |
c22fc9 |
doc/man/man8/Makefile])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
MAINTAINERCLEANFILES="*~ *.orig *.rej core core.*"
|
|
Packit |
c22fc9 |
AC_SUBST(MAINTAINERCLEANFILES)
|
|
Packit |
c22fc9 |
CONFIG_OPTIONS=
|
|
Packit |
c22fc9 |
SYSTEM_OPTIONS=
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
AM_SILENT_RULES([yes])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
PKG_PROG_PKG_CONFIG
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ Keepalived specific configure options ]----
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(lvs-syncd,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--disable-lvs-syncd], [do not use LVS synchronization daemon])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(lvs,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--disable-lvs], [do not use the LVS framework])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(lvs-64bit-stats,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--disable-lvs-64bit-stats], [do not use the LVS 64-bit stats])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(vrrp,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--disable-vrrp], [do not use the VRRP framework])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(bfd,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--enable-bfd], [use the BFD framework])])
|
|
Packit |
c22fc9 |
AC_ARG_WITH(kernel-dir,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--with-kernel-dir=DIR], [path to linux kernel source directory])],
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([kernel_src_path="$withval"],], [[kernel_src_path=""])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(fwmark,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--disable-fwmark], [compile without SO_MARK support])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(snmp,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--enable-snmp], [compile with SNMP support])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(snmp-vrrp,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--enable-snmp-vrrp], [compile with SNMP vrrp support])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(snmp-keepalived,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--enable-snmp-keepalived], [obsolete - use --enable-snmp-vrrp])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(snmp-checker,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--enable-snmp-checker], [compile with SNMP checker support])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(snmp-rfc,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--enable-snmp-rfc], [compile with SNMP RFC2787 (VRRPv2) and SNMP RFC6527 (VRRPv3) support])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(snmp-rfcv2,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--enable-snmp-rfcv2], [compile with SNMP RFC2787 (VRRPv2) support])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(snmp-rfcv3,
|
|
Packit Service |
dfccb1 |
[AS_HELP_STRING([--enable-snmp-rfcv3], [compile with SNMP RFC6527 (VRRPv3) support])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(snmp-reply-v3-for-v2,
|
|
Packit Service |
dfccb1 |
[AS_HELP_STRING([--disable-snmp-reply-v3-for-v2], [disable RFC6527 responses for VRRPv2 instances])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(dbus,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--enable-dbus], [compile with dbus support])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(dbus-create-instance,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--enable-dbus-create-instance], [compile with dbus support for creating instances])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(sha1,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--enable-sha1], [compile with SHA1 support])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(regex,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--enable-regex], [build with HTTP_GET regex checking])])
|
|
Packit Service |
dfccb1 |
AC_ARG_ENABLE(vmac,
|
|
Packit Service |
dfccb1 |
[AS_HELP_STRING([--disable-vmac], [build without VMAC support])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(regex-timers,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--enable-regex-timers], [build with HTTP_GET regex timers])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(json,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--enable-json], [compile with signal to dump configuration and stats as json])])
|
|
Packit |
c22fc9 |
AC_ARG_WITH(init,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--with-init=(upstart|systemd|SYSV|SUSE|openrc)], [specify init type])],
|
|
Packit |
c22fc9 |
[init_type="$withval"], [init_type=""])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(vrrp-auth,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--disable-vrrp-auth], [compile without VRRP authentication])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(checksum_compat,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--disable-checksum-compat], [compile without v1.3.6 and earlier VRRPv3 unicast checksum compatibility])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(routes,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--disable-routes], [compile without ip rules/routes])])
|
|
Packit Service |
dfccb1 |
AC_ARG_ENABLE(linkbeat,
|
|
Packit Service |
dfccb1 |
[AS_HELP_STRING([--disable-linkbeat], [build without linkbeat support])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(gnu-std-paths,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--enable-gnu-std-paths], [use GNU standard paths for pid files etc])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(dynamic-linking,
|
|
Packit Service |
dfccb1 |
[AS_HELP_STRING([--enable-dynamic-linking], [compile with/without dynamically linked libiptc/libipset/libnl])])
|
|
Packit Service |
dfccb1 |
AC_ARG_ENABLE(iptables,
|
|
Packit Service |
dfccb1 |
[AS_HELP_STRING([--disable-iptables], [compile without iptables support])],
|
|
Packit Service |
dfccb1 |
[], [IPTABLES_SILENT=Yes])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(libiptc-dynamic,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--enable-libiptc-dynamic], [compile with libiptc dynamically linked])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(libipset-dynamic,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--disable-libipset-dynamic], [compile with libipset statically linked])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(libnl-dynamic,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--enable-libnl-dynamic], [compile with libnl dynamically linked])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(libipset,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--disable-libipset], [compile without libipset])])
|
|
Packit Service |
dfccb1 |
AC_ARG_ENABLE(nftables,
|
|
Packit Service |
dfccb1 |
[AS_HELP_STRING([--disable-nftables], [build without nftables support])],
|
|
Packit Service |
dfccb1 |
[], [NFTABLES_SILENT=Yes])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(libnl,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--disable-libnl], [compile without libnl])])
|
|
Packit Service |
dfccb1 |
AC_ARG_ENABLE(track-process,
|
|
Packit Service |
dfccb1 |
[AS_HELP_STRING([--disable-track-process], [build without track-process functionality])])
|
|
Packit Service |
dfccb1 |
AC_ARG_WITH(run-dir,
|
|
Packit Service |
dfccb1 |
[AS_HELP_STRING([--with-run-dir=PATH_TO_RUN], [specify directory where /run is located])],
|
|
Packit Service |
dfccb1 |
[RUN_DIR_SPECIFIED=Y], [RUN_DIR_SPECIFIED=N])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(strict-config-checks,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--enable-strict-config-checks], [build with strict configuration checking])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(hardening,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--disable-hardening], [do not build with security hardening])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(optimise,
|
|
Packit Service |
dfccb1 |
[AS_HELP_STRING([--enable-optimise], [compiler optimisation level])], [], [enable_optimise=not-specified])
|
|
Packit Service |
dfccb1 |
AC_ARG_ENABLE(warnings,
|
|
Packit Service |
dfccb1 |
[AS_HELP_STRING([--enable-warnings[[=WARNINGS]]], [additional compiler warnings, disable for reduced set])], [], [enable_warnings=yes])
|
|
Packit Service |
dfccb1 |
AC_ARG_ENABLE(extra-warnings,
|
|
Packit Service |
dfccb1 |
[AS_HELP_STRING([--enable-extra-warnings], [extra compiler warnings that will probably produce many warnings])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(mem-check,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--enable-mem-check], [compile with memory alloc checking])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(mem-check-log,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--enable-mem-check-log], [compile with memory alloc checking writing to syslog])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(timer-check,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--enable-timer-check], [compile with set time logging])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(debug,
|
|
Packit Service |
dfccb1 |
[AS_HELP_STRING([--enable-debug], [compile with most debugging options])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(netlink-timers,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--enable-netlink-timers], [compile with netlink command timers])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(smtp-alert-debug,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--enable-smtp-alert-debug], [compile with smtp-alert debugging])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(stacktrace,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--enable-stacktrace], [compile with stacktrace support])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(perf,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--enable-perf], [compile with perf performance data recording support for vrrp process])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(log-file,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--enable-log-file], [enable logging to file (-g)])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(dump-threads,
|
|
Packit Service |
dfccb1 |
[AS_HELP_STRING([--enable-dump-threads], [compile with thread dumping support])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(epoll-debug,
|
|
Packit Service |
dfccb1 |
[AS_HELP_STRING([--enable-epoll-debug], [compile with epoll_wait() debugging support])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(epoll-thread-dump,
|
|
Packit Service |
dfccb1 |
[AS_HELP_STRING([--enable-epoll-thread-dump], [compile with epoll thread dumping support])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(regex-debug,
|
|
Packit Service |
dfccb1 |
[AS_HELP_STRING([--enable-regex-debug], [compile with regex debugging support])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(tsm-debug,
|
|
Packit Service |
dfccb1 |
[AS_HELP_STRING([--enable-tsm-debug], [compile with TSM debugging support])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(vrrp-fd-debug,
|
|
Packit Service |
dfccb1 |
[AS_HELP_STRING([--enable-vrrp-fd-debug], [compile with vrrp fd debugging support])])
|
|
Packit Service |
dfccb1 |
AC_ARG_ENABLE(eintr-debug,
|
|
Packit Service |
dfccb1 |
[AS_HELP_STRING([--enable-eintr-debug], [compile with EINTR debugging support, set to check/not check for EINTR])])
|
|
Packit Service |
dfccb1 |
AC_ARG_ENABLE(track-process-debug,
|
|
Packit Service |
dfccb1 |
[AS_HELP_STRING([--enable-track-process-debug], [compile with track process debugging support, set to log all process connector events])])
|
|
Packit Service |
dfccb1 |
AC_ARG_ENABLE(parser-debug,
|
|
Packit Service |
dfccb1 |
[AS_HELP_STRING([--enable-parser-debug], [compile with parser debugging support])])
|
|
Packit Service |
dfccb1 |
AC_ARG_ENABLE(checksum-debug,
|
|
Packit Service |
dfccb1 |
[AS_HELP_STRING([--enable-checksum-debug], [compile with checksum debugging support])])
|
|
Packit Service |
dfccb1 |
AC_ARG_ENABLE(genhash-debug,
|
|
Packit Service |
dfccb1 |
[AS_HELP_STRING([--enable-genhash-debug], [compile with genhash debugging support])])
|
|
Packit Service |
dfccb1 |
AC_ARG_ENABLE(checker-debug,
|
|
Packit Service |
dfccb1 |
[AS_HELP_STRING([--enable-checker-debug], [compile with checker debugging support])])
|
|
Packit Service |
dfccb1 |
AC_ARG_ENABLE(smtp-connect-debug,
|
|
Packit Service |
dfccb1 |
[AS_HELP_STRING([--enable-smtp-connect-debug], [compile with smtp connect debugging support])])
|
|
Packit Service |
dfccb1 |
AC_ARG_ENABLE(mem-err-debug,
|
|
Packit Service |
dfccb1 |
[AS_HELP_STRING([--enable-mem-err-debug], [compile with MALLOC/FREE error debugging support])])
|
|
Packit Service |
dfccb1 |
AC_ARG_ENABLE(script-debug,
|
|
Packit Service |
dfccb1 |
[AS_HELP_STRING([--enable-script-debug], [compile with script termination debugging support])])
|
|
Packit Service |
dfccb1 |
AC_ARG_ENABLE(one-process-debug,
|
|
Packit Service |
dfccb1 |
[AS_HELP_STRING([--enable-one-process-debug], [compile with all functionality running in a single process])])
|
|
Packit Service |
dfccb1 |
AC_ARG_ENABLE(dump-keywords,
|
|
Packit Service |
dfccb1 |
[AS_HELP_STRING([--enable-dump-keywords], [compile with keyword dumping support])])
|
|
Packit Service |
dfccb1 |
AC_ARG_ENABLE(network-timestamp,
|
|
Packit Service |
dfccb1 |
[AS_HELP_STRING([--enable-network-timestamp], [compile with network timestamp debugging support])])
|
|
Packit Service |
dfccb1 |
AC_ARG_ENABLE(asserts,
|
|
Packit Service |
dfccb1 |
[AS_HELP_STRING([--enable-asserts], [compile with assert() enabled])])
|
|
Packit |
c22fc9 |
AC_ARG_WITH(fixed-if-type,
|
|
Packit Service |
dfccb1 |
[AS_HELP_STRING([--with-fixed-if-type=TYPE], [treat interface type TYPE as unchangeable])])
|
|
Packit |
c22fc9 |
AC_ARG_WITH(default-config-file,
|
|
Packit |
c22fc9 |
AS_HELP_STRING([--with-default-config-file=FILE], [Default configuration file]),
|
|
Packit |
c22fc9 |
[default_config_file="$withval"], [default_config_file=""])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(profile,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--enable-profile], [compile with profiling flags])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(conversion-checks,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--enable-conversion-checks], [compile with conversion warnings if sensible])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(force-conversion-checks,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--enable-force-conversion-checks], [compile with conversion warnings])])
|
|
Packit |
c22fc9 |
AC_ARG_ENABLE(Werror,
|
|
Packit |
c22fc9 |
[AS_HELP_STRING([--enable-Werror], [compile with warnings being errors])])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
AC_ARG_WITH([systemdsystemunitdir],
|
|
Packit Service |
dfccb1 |
AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files])])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
# Set the kernel headers path
|
|
Packit |
c22fc9 |
if test -n "$kernel_src_path"; then
|
|
Packit Service |
dfccb1 |
if test ! -d $kernel_src_path/include; then
|
|
Packit Service |
dfccb1 |
AC_MSG_ERROR([kernel source path $kernel_src_path/include does not exist])
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit Service |
dfccb1 |
if test ! -d $kernel_src_path/include/linux; then
|
|
Packit Service |
dfccb1 |
AC_MSG_ERROR([kernel source path $kernel_src_path/include does not appear to include linux header files])
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit Service |
dfccb1 |
if test -d $kernel_src_path/include/uapi/linux; then
|
|
Packit Service |
dfccb1 |
AC_MSG_ERROR([kernel source path $kernel_src_path appears to be an unprocessed kernel source tree])
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit Service |
dfccb1 |
kernelinc="-isystem $kernel_src_path/include"
|
|
Packit |
c22fc9 |
elif test ! -d /usr/include/linux -a \
|
|
Packit |
c22fc9 |
-d /usr/src/linux/include; then
|
|
Packit Service |
dfccb1 |
kernelinc="-isystem /usr/src/linux/include"
|
|
Packit |
c22fc9 |
else
|
|
Packit |
c22fc9 |
kernelinc=
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
CPPFLAGS="$kernelinc $CPPFLAGS"
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
# Checks for programs.
|
|
Packit |
c22fc9 |
AC_PROG_CC
|
|
Packit |
c22fc9 |
AC_PROG_MAKE_SET
|
|
Packit |
c22fc9 |
AC_PROG_INSTALL
|
|
Packit |
c22fc9 |
AC_PROG_RANLIB
|
|
Packit |
c22fc9 |
AC_PROG_GREP
|
|
Packit |
c22fc9 |
AC_PROG_LN_S
|
|
Packit |
c22fc9 |
AC_PROG_SED
|
|
Packit |
c22fc9 |
AC_CHECK_TOOL(STRIP,strip)
|
|
Packit |
c22fc9 |
AC_CHECK_TOOL(LDD,ldd)
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
|
|
Packit |
c22fc9 |
ARFLAGS=cr
|
|
Packit |
c22fc9 |
AC_SUBST(ARFLAGS)
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
# Default settings
|
|
Packit |
c22fc9 |
ENABLE_LOG_FILE_APPEND=No
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
# AC_PROG_LIBTOOL
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
#
|
|
Packit |
c22fc9 |
# save the configure arguments
|
|
Packit |
c22fc9 |
#
|
|
Packit |
c22fc9 |
args=`echo $ac_configure_args | $SED -e "s/'//g"`
|
|
Packit |
c22fc9 |
AC_DEFINE_UNQUOTED(KEEPALIVED_CONFIGURE_OPTIONS,"$args", [configure options specified])
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
# Save the CPPFLAGS, CFLAGS, LDFLAGS and LDLIBS settings for make time
|
|
Packit Service |
dfccb1 |
KA_CPPFLAGS="$kernelinc -D_GNU_SOURCE $CPPFLAGS"
|
|
Packit Service |
dfccb1 |
KA_CFLAGS="-g $CFLAGS"
|
|
Packit Service |
dfccb1 |
KA_LDFLAGS=$LDFLAGS
|
|
Packit Service |
dfccb1 |
KA_LIBS=$LDLIBS
|
|
Packit Service |
dfccb1 |
|
|
Packit |
c22fc9 |
NEED_LIBDL=No
|
|
Packit |
c22fc9 |
#KA_LIBTOOLFLAGS =
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
# Set up the compiler warnings we want
|
|
Packit Service |
dfccb1 |
dnl -- Unused warnings - traditional
|
|
Packit Service |
dfccb1 |
MAX_FRAME_SIZE=5120
|
|
Packit Service |
dfccb1 |
WARNINGS_BASIC="all extra unused strict-prototypes"
|
|
Packit Service |
dfccb1 |
WARNINGS_STD="absolute-value address-of-packed-member alloca alloc-zero array-bounds=2 attribute-alias bad-function-cast cast-align cast-qual chkp date-time disabled-optimization double-promotion duplicated-branches duplicated-cond float-conversion float-equal format-overflow format-security format-signedness format-truncation frame-larger-than=$MAX_FRAME_SIZE implicit-fallthrough=3 init-self inline jump-misses-init logical-op missing-declarations missing-field-initializers missing-prototypes nested-externs normalized null-dereference old-style-definition overlength-strings pointer-arith redundant-decls shadow shift-overflow=2 stack-protector strict-overflow=4 strict-prototypes stringop-overflow=2 suggest-attribute=cold suggest-attribute=const suggest-attribute=format suggest-attribute=malloc suggest-attribute=noreturn suggest-attribute=pure sync-nand trampolines undef uninitialized unknown-pragmas unsuffixed-float-constants unused-const-variable=2 unused-macros variadic-macros write-strings"
|
|
Packit Service |
dfccb1 |
WARNINGS_EXTRA="aggregate-return cast-align= strict conversion format-nonliteral format-overflow=2 format-truncation=2 padded pedantic sign-conversion stack-usage=$MAX_FRAME_SIZE strict-overflow=5 stringop-overflow=3 stringop-overflow=4 switch-enum system-headers traditional-conversion"
|
|
Packit Service |
dfccb1 |
|
|
Packit |
c22fc9 |
# We want _GNU_SOURCE defined always
|
|
Packit Service |
dfccb1 |
add_to_var([CPPFLAGS], [-D_GNU_SOURCE])
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
# fpclassify() needs -lm
|
|
Packit Service |
dfccb1 |
add_to_var([KA_LIBS], [-lm])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
# Some sanity checks on configure options
|
|
Packit |
c22fc9 |
AS_IF([test .$enable_vrrp = .no],
|
|
Packit Service |
dfccb1 |
AS_IF([test .$IPTABLES_SILENT == .Yes], [enable_iptables=no])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$NFTABLES_SILENT == .Yes], [enable_nftables=no])
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_perf != .], [AC_MSG_ERROR([enable-perf requires vrrp])])
|
|
Packit |
c22fc9 |
AS_IF([test $with_fixed_if_type], [AC_MSG_ERROR([with-fixed-if-type requires vrrp])])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_vrrp_fd_debug != .], [AC_MSG_ERROR([enable-vrrp-fd-debug requires vrrp])])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_tsm_debug != .], [AC_MSG_ERROR([enable-tsm-debug requires vrrp])])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_json != .], [AC_MSG_ERROR([enable-json requires vrrp])])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_snmp_vrrp != .], [AC_MSG_ERROR([enable-snmp-vrrp requires vrrp])])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_snmp_keepalived != .], [AC_MSG_ERROR([enable-snmp-keepalived requires vrrp])])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_snmp_rfc != .], [AC_MSG_ERROR([enable-snmp-rfc requires vrrp])])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_snmp_rfcv2 != .], [AC_MSG_ERROR([enable-snmp-rfcv2 requires vrrp])])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_snmp_rfcv3 != .], [AC_MSG_ERROR([enable-snmp-rfcv3 requires vrrp])])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_dbus != .], [AC_MSG_ERROR([enable-dbus requires vrrp])])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_vrrp_auth != .], [AC_MSG_ERROR([disable-vrrp-auth requires vrrp])])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_checksum_compat != .], [AC_MSG_ERROR([disable-checksum-compat requires vrrp])])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_routes != .], [AC_MSG_ERROR([disable-routes requires vrrp])])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_linkbeat != .], [AC_MSG_ERROR([disable-linkbeat requires vrrp])])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_bfd != .], [AC_MSG_ERROR([enable-bfd requires vrrp])])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_iptables != .no], [AC_MSG_ERROR([enable-iptables requires vrrp])])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_nftables != .no], [AC_MSG_ERROR([enable-nftables requires vrrp])])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_track_process != .], [AC_MSG_ERROR([enable-track-process requires vrrp])])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_network_timestamp != .], [AC_MSG_ERROR([enable-network-timestamp requires vrrp])])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_netlink_timers != .], [AC_MSG_ERROR([enable-netlink-timers requires vrrp])])
|
|
Packit Service |
dfccb1 |
)
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_iptables = .no],
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_libipset != .], [AC_MSG_ERROR([disable-libipset requires vrrp and iptables])])
|
|
Packit Service |
dfccb1 |
)
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_libipset = .no],
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_libipset_dynamic != .], [AC_MSG_ERROR([disable-libipset-dynamic requires ipsets])])
|
|
Packit Service |
dfccb1 |
)
|
|
Packit |
c22fc9 |
AS_IF([test .$enable_snmp_rfc != .yes -a .$enable_snmp_rfcv3 != yes],
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_snmp_reply_v3_for_v2 != .], [AC_MSG_ERROR([enable-snmp-reply-v3-for-v2 requires enable-snmp-rfcv3 or enable-snmp-rfc])])
|
|
Packit Service |
dfccb1 |
)
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_dbus != .yes],
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_dbus_create_instance != .], [AC_MSG_ERROR([enable-dbus-create-instance requires enable-dbus])])
|
|
Packit Service |
dfccb1 |
)
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_lvs = .no],
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_regex != .], [AC_MSG_ERROR([enable-regex requires lvs])])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_libnl != .], [AC_MSG_ERROR([disable-libnl requires lvs])])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_lvs_syncd != .], [AC_MSG_ERROR([disable-lvs-syncd requires lvs])])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_lvs_64bit_stats != .], [AC_MSG_ERROR([disable-lvs-64bit-stats requires lvs])])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_fwmark != .], [AC_MSG_ERROR([enable-fwmark requires lvs])])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_checker_debug != .], [AC_MSG_ERROR([enable-checker-debug requires lvs])])
|
|
Packit Service |
dfccb1 |
)
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_libnl = .no],
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_libnl_dynamic != .], [AC_MSG_ERROR([enable-libnl-dynamic requires lvs and libnl])])
|
|
Packit Service |
dfccb1 |
)
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_regex != .yes],
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_regex_timers != .], [AC_MSG_ERROR([enable-regex-timers requires enable-regex])])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_regex_debug != .], [AC_MSG_ERROR([enable-regex-debug requires enable-regex])])
|
|
Packit Service |
dfccb1 |
)
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_track_process = .no],
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_track_process_debug != .], [AC_MSG_ERROR([enable-track-process-debug incompatible with disable-track-process])])
|
|
Packit Service |
dfccb1 |
)
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_mem_check != .yes],
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_mem_err_debug != .], [AC_MSG_ERROR([enable-mem-err-debug requires --enable-mem-check])])
|
|
Packit Service |
dfccb1 |
)
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
# --enable-debug enables most debugging if not explicitly disabled, but NOT one-process-debug or genhash-debug
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_debug = .yes],
|
|
Packit |
c22fc9 |
[
|
|
Packit Service |
dfccb1 |
# If we are debugging, we want to be able to write logs to files
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_log_file = .], [enable_log_file=yes])
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_asserts = .], [enable_asserts=yes])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_epoll_debug = .], [enable_epoll_debug=yes])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_epoll_thread_dump = .], [enable_epoll_thread_dump=yes])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_eintr_debug = .], [enable_eintr_debug=yes])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_parser_debug = .], [enable_parser_debug=yes])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_timer_check = .], [enable_timer_check=yes])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_smtp_alert_debug = .], [enable_smtp_alert_debug=yes])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_smtp_connect_debug = .], [enable_smtp_connect_debug=yes])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_dump_keywords = .], [enable_dump_keywords=yes])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_script_debug = .], [enable_script_debug=yes])
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_vrrp != .no],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_vrrp_fd_debug = .], [enable_vrrp_fd_debug=yes])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_tsm_debug = .], [enable_tsm_debug=yes])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_track_process_debug = .], [enable_track_process_debug=yes])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_checksum_debug = .], [enable_checksum_debug=yes])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_netlink_timers = .], [enable_netlink_timers=yes])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_network_timestamp = .], [enable_network_timestamp=yes])
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_lvs != .no],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_checker_debug = .], [enable_checker_debug=yes])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_regex = .yes],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_regex_timers = .], [enable_regex_timers=yes])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_regex_debug = .], [enable_regex_debug=yes])
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_mem_check = .yes],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_mem_err_debug = .], [enable_mem_err_debug=yes])
|
|
Packit Service |
dfccb1 |
])
|
|
Packit |
c22fc9 |
])
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
dnl -- ulibc/glibc differences
|
|
Packit Service |
dfccb1 |
AC_MSG_CHECKING([msghdr.msg_controllen is size_t])
|
|
Packit Service |
dfccb1 |
SAV_CFLAGS=$CFLAGS
|
|
Packit Service |
dfccb1 |
CFLAGS="$CFLAGS -Werror"
|
|
Packit Service |
dfccb1 |
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
Packit Service |
dfccb1 |
#include <sys/socket.h>
|
|
Packit Service |
dfccb1 |
#include <stdio.h>
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
int main(int argc, char**argv)
|
|
Packit Service |
dfccb1 |
{
|
|
Packit Service |
dfccb1 |
struct msghdr msgh = { .msg_controllen = 0 };
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
printf("%zu", msgh.msg_controllen);
|
|
Packit Service |
dfccb1 |
}
|
|
Packit Service |
dfccb1 |
]])],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_MSG_RESULT([yes])
|
|
Packit Service |
dfccb1 |
AC_DEFINE([PRI_MSG_CONTROLLEN], [ "zu" ], [Define to zu if msghdr.msg_controllen is size_t, else u])
|
|
Packit Service |
dfccb1 |
],
|
|
Packit |
c22fc9 |
[
|
|
Packit Service |
dfccb1 |
AC_MSG_RESULT([no])
|
|
Packit Service |
dfccb1 |
AC_DEFINE([PRI_MSG_CONTROLLEN], [ "u" ], [Define to zu if msghdr.msg_controllen is size_t, else u])
|
|
Packit |
c22fc9 |
])
|
|
Packit Service |
dfccb1 |
CFLAGS=$SAV_CFLAGS
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
dnl -- Check for diagnostic pragmas in functions - GCC 4.6.0
|
|
Packit Service |
dfccb1 |
AC_MSG_CHECKING([diagnostic pragmas in functions])
|
|
Packit Service |
dfccb1 |
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
Packit Service |
dfccb1 |
int main(int argc, char**argv)
|
|
Packit Service |
dfccb1 |
{
|
|
Packit Service |
dfccb1 |
_Pragma("GCC diagnostic warning \"-Wall\"")
|
|
Packit Service |
dfccb1 |
}
|
|
Packit Service |
dfccb1 |
]])],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_MSG_RESULT([yes])
|
|
Packit Service |
dfccb1 |
AC_DEFINE([_HAVE_FUNCTION_DIAGNOSTIC_PRAGMAS_], [ 1 ], [Define to 1 if can have _Pragma GCC diagnostic in functions])
|
|
Packit Service |
dfccb1 |
],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_MSG_RESULT([no])
|
|
Packit |
c22fc9 |
])
|
|
Packit Service |
dfccb1 |
AM_CONDITIONAL([DEBUG], [test .$enable_debug = .yes])
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
dnl -- Check for diagnostic push/pop pragmas - GCC 4.6.0
|
|
Packit Service |
dfccb1 |
AC_MSG_CHECKING([diagnostic push/pop pragmas])
|
|
Packit Service |
dfccb1 |
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
Packit Service |
dfccb1 |
int main(int argc, char**argv)
|
|
Packit Service |
dfccb1 |
{
|
|
Packit Service |
dfccb1 |
_Pragma("GCC diagnostic push")
|
|
Packit Service |
dfccb1 |
}
|
|
Packit Service |
dfccb1 |
]])],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_MSG_RESULT([yes])
|
|
Packit Service |
dfccb1 |
AC_DEFINE([_HAVE_DIAGNOSTIC_PUSH_POP_PRAGMAS_], [ 1 ], [Define to 1 if can have _Pragma GCC diagnostic push/pop])
|
|
Packit Service |
dfccb1 |
],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_MSG_RESULT([no])
|
|
Packit |
c22fc9 |
])
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
dnl - Set up warnings list
|
|
Packit Service |
dfccb1 |
AS_IF([test ".$enable_warnings" = .no],
|
|
Packit Service |
dfccb1 |
[WARNINGS_ENABLED=$WARNINGS_BASIC],
|
|
Packit Service |
dfccb1 |
[WARNINGS_ENABLED="$WARNINGS_BASIC $WARNINGS_STD"
|
|
Packit Service |
dfccb1 |
AS_IF([test ".$enable_warnings" != .yes],
|
|
Packit Service |
dfccb1 |
[WARN_LIST=`echo $enable_warnings | sed -e "s/-W//g"`
|
|
Packit Service |
dfccb1 |
add_to_var([WARNINGS_ENABLED], ["$WARN_LIST"])
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
]
|
|
Packit Service |
dfccb1 |
)
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_extra_warnings = .yes],
|
|
Packit Service |
dfccb1 |
[add_to_var([WARNINGS_ENABLED], ["$WARNINGS_EXTRA"])])
|
|
Packit Service |
dfccb1 |
|
|
Packit |
c22fc9 |
if test "$enable_conversion_checks" = yes; then
|
|
Packit |
c22fc9 |
# Check if we can sensibly enable -Wconversion
|
|
Packit |
c22fc9 |
AC_MSG_CHECKING([for usable -Wconversion])
|
|
Packit |
c22fc9 |
SAV_CFLAGS="$CFLAGS"
|
|
Packit Service |
dfccb1 |
CFLAGS="$CFLAGS -Wconversion -O2 -Wp,-D_FORTIFY_SOURCE=2 -Werror"
|
|
Packit |
c22fc9 |
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
Packit |
c22fc9 |
#include <sys/types.h>
|
|
Packit |
c22fc9 |
#include <sys/select.h>
|
|
Packit |
c22fc9 |
#include <stdint.h>
|
|
Packit |
c22fc9 |
#include <stdbool.h>
|
|
Packit |
c22fc9 |
#include <sys/socket.h>
|
|
Packit |
c22fc9 |
#include <linux/rtnetlink.h>
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
#define VAL 255
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
static void
|
|
Packit |
c22fc9 |
fun(uint8_t val)
|
|
Packit |
c22fc9 |
{
|
|
Packit |
c22fc9 |
}
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
int main(int argc, char**argv)
|
|
Packit |
c22fc9 |
{
|
|
Packit |
c22fc9 |
fd_set set;
|
|
Packit |
c22fc9 |
uint8_t val = 42;
|
|
Packit |
c22fc9 |
unsigned u;
|
|
Packit |
c22fc9 |
bool b;
|
|
Packit |
c22fc9 |
size_t size = 17;
|
|
Packit |
c22fc9 |
char c[2];
|
|
Packit |
c22fc9 |
char *c_ptr = c;
|
|
Packit |
c22fc9 |
struct rtattr rta;
|
|
Packit |
c22fc9 |
struct rtattr *rta_p = &rta;
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
FD_SET(argc+1, &set);
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
fun(argc == VAL ? VAL : val);
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
// vrrp->lower_prio_no_advert = vrrp->strict_mode ? true : global_data->vrrp_lower_prio_no_advert;
|
|
Packit |
c22fc9 |
u = u ? true : b;
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
size = RTA_LENGTH(size);
|
|
Packit |
c22fc9 |
c_ptr = RTA_DATA(c_ptr);
|
|
Packit |
c22fc9 |
rta_p = RTA_NEXT(rta_p, size);
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
val = (u < 256 ) ? u & 0xff : 0;
|
|
Packit |
c22fc9 |
}
|
|
Packit |
c22fc9 |
]])],
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
AC_MSG_RESULT([yes])
|
|
Packit Service |
dfccb1 |
add_to_var([WARNINGS_ENABLED], [conversion])
|
|
Packit |
c22fc9 |
],
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
AC_MSG_RESULT([no])
|
|
Packit |
c22fc9 |
AC_MSG_WARN([-Wconversion is not sensible with this compiler. Use --enable-force-conversion-checks to override.])
|
|
Packit |
c22fc9 |
])
|
|
Packit |
c22fc9 |
CFLAGS="$SAV_CFLAGS"
|
|
Packit |
c22fc9 |
elif test "$enable_force_conversion_checks" = yes; then
|
|
Packit Service |
dfccb1 |
add_to_var([WARNINGS_ENABLED], [conversion])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
if test "$enable_Werror" = yes; then
|
|
Packit Service |
dfccb1 |
add_to_var([WARNINGS_ENABLED], [error])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
CONFIG_WARNINGS=lib/config_warnings.h.in
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
# Save (or restore) lib/config_warnings.h.in
|
|
Packit Service |
dfccb1 |
AS_IF([test ! -f ${CONFIG_WARNINGS}.sav],
|
|
Packit Service |
dfccb1 |
[cp -p ${CONFIG_WARNINGS} ${CONFIG_WARNINGS}.sav],
|
|
Packit Service |
dfccb1 |
[cp -p ${CONFIG_WARNINGS}.sav ${CONFIG_WARNINGS}])
|
|
Packit Service |
dfccb1 |
|
|
Packit |
c22fc9 |
SAV_CFLAGS="$CFLAGS"
|
|
Packit Service |
dfccb1 |
for WARN in $WARNINGS_ENABLED
|
|
Packit Service |
dfccb1 |
do
|
|
Packit Service |
dfccb1 |
AC_MSG_CHECKING([for -W$WARN])
|
|
Packit Service |
dfccb1 |
CFLAGS="$SAV_CFLAGS -W$WARN"
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
WARN_VAR=_HAVE_WARNING_`echo $WARN | tr "a-z=-" "A-Z__"`_
|
|
Packit Service |
dfccb1 |
LOCAL_WARN_VAR=HAVE_WARNING_`echo $WARN | sed -e "s/=.*//" | tr "a-z-" "A-Z_"`
|
|
Packit Service |
dfccb1 |
grep -q "^#undef $WARN_VAR$" $CONFIG_WARNINGS
|
|
Packit Service |
dfccb1 |
AS_IF([test $? -ne 0],
|
|
Packit Service |
dfccb1 |
[echo -e "\n/* Define to 1 if -W$WARN in use */\n#undef $WARN_VAR" >>$CONFIG_WARNINGS]
|
|
Packit Service |
dfccb1 |
)
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
test `echo $WARN | grep "=[[0-9]][[0-9]]*$"`
|
|
Packit Service |
dfccb1 |
AS_IF([test $? -eq 0],
|
|
Packit Service |
dfccb1 |
[ WARN_SHORT=`echo $WARN | sed -e 's/=[[0-9]][[0-9]]*$//'`
|
|
Packit Service |
dfccb1 |
WARN_VAR_SHORT=_HAVE_WARNING_`echo $WARN_SHORT | tr "a-z=-" "A-Z__"`_
|
|
Packit Service |
dfccb1 |
grep -q "^#undef $WARN_VAR_SHORT$" $CONFIG_WARNINGS
|
|
Packit Service |
dfccb1 |
AS_IF([test $? -ne 0],
|
|
Packit Service |
dfccb1 |
[echo -e "\n/* Define to 1 if -W$WARN_SHORT in use */\n#undef $WARN_VAR_SHORT" >>$CONFIG_WARNINGS]
|
|
Packit Service |
dfccb1 |
)
|
|
Packit Service |
dfccb1 |
],
|
|
Packit Service |
dfccb1 |
[ unset WARN_VAR_SHORT ]
|
|
Packit Service |
dfccb1 |
)
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
Packit Service |
dfccb1 |
int main(int argc, char**argv)
|
|
Packit Service |
dfccb1 |
{
|
|
Packit Service |
dfccb1 |
}
|
|
Packit Service |
dfccb1 |
]])],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
# gcc 9 removed -Wchkp and doesn't error if it is specified,
|
|
Packit Service |
dfccb1 |
# but rather outputs:
|
|
Packit Service |
dfccb1 |
# warning: switch '-Wchkp' is no longer supported
|
|
Packit Service |
dfccb1 |
# so check for the warning.
|
|
Packit Service |
dfccb1 |
touch conftest.err
|
|
Packit Service |
dfccb1 |
grep -q "is no longer supported" conftest.err
|
|
Packit Service |
dfccb1 |
AS_IF([test $? -ne 0],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_MSG_RESULT([yes])
|
|
Packit Service |
dfccb1 |
eval $LOCAL_WARN_VAR=yes
|
|
Packit Service |
dfccb1 |
add_to_var([KA_CFLAGS], [-W$WARN])
|
|
Packit Service |
dfccb1 |
AC_DEFINE_UNQUOTED([$WARN_VAR], [ 1 ])
|
|
Packit Service |
dfccb1 |
AS_IF([test -z "$WARN_VAR_SHORT"], [],
|
|
Packit Service |
dfccb1 |
[AC_DEFINE_UNQUOTED([$WARN_VAR_SHORT], [ 1 ])]
|
|
Packit Service |
dfccb1 |
)
|
|
Packit Service |
dfccb1 |
],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_MSG_RESULT([no])
|
|
Packit Service |
dfccb1 |
eval $LOCAL_WARN_VAR=no
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_MSG_RESULT([no])
|
|
Packit Service |
dfccb1 |
eval $LOCAL_WARN_VAR=no
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
done
|
|
Packit Service |
dfccb1 |
AS_IF([test .$HAVE_WARNING_STRICT_OVERFLOW = .yes],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
# The following is not supported in gcc 5.4.0
|
|
Packit Service |
dfccb1 |
CFLAGS="$CFLAGS -Werror"
|
|
Packit Service |
dfccb1 |
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
Packit Service |
dfccb1 |
_Pragma("GCC diagnostic warning \"-Wstrict-overflow=1\"")
|
|
Packit Service |
dfccb1 |
int main(int argc, char**argv)
|
|
Packit Service |
dfccb1 |
{
|
|
Packit Service |
dfccb1 |
}
|
|
Packit Service |
dfccb1 |
]])],
|
|
Packit Service |
dfccb1 |
[AC_DEFINE([_HAVE_PRAGMA_WARN_STRICT_OVERFLOW_1_], [ 1 ], [Define to 1 if _Pragma("GCC diagnostic warning \"-Wstrict-overflow=1\"") supported])
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
]
|
|
Packit Service |
dfccb1 |
)
|
|
Packit |
c22fc9 |
CFLAGS="$SAV_CFLAGS"
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ---- [ Do we want stricter configuration checking? ] ----
|
|
Packit |
c22fc9 |
STRICT_CONFIG=No
|
|
Packit |
c22fc9 |
if test "$enable_strict_config_checks" = yes; then
|
|
Packit |
c22fc9 |
AC_DEFINE([_STRICT_CONFIG_], [ 1 ], [Define to 1 if want stricter configuration checking])
|
|
Packit |
c22fc9 |
STRICT_CONFIG=Yes
|
|
Packit |
c22fc9 |
add_config_opt([STRICT_CONFIG])
|
|
Packit |
c22fc9 |
fi
|
|
Packit Service |
dfccb1 |
AM_CONDITIONAL([WITH_STRICT_CONFIG_CHECKS], [test $STRICT_CONFIG = Yes])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
if test "$enable_hardening" != no; then
|
|
Packit |
c22fc9 |
AC_MSG_CHECKING([for PIE support])
|
|
Packit |
c22fc9 |
SAV_CFLAGS="$CFLAGS"
|
|
Packit |
c22fc9 |
SAV_LDFLAGS="$LDFLAGS"
|
|
Packit |
c22fc9 |
CFLAGS="$CFLAGS -fPIE"
|
|
Packit Service |
dfccb1 |
if test "${enable_profile}" = yes; then
|
|
Packit Service |
dfccb1 |
# RHEL 7 and others have a problem with profiling with PIE
|
|
Packit Service |
dfccb1 |
CFLAGS="$CFLAGS -pg"
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit |
c22fc9 |
LDFLAGS="$LDFLAGS -pie"
|
|
Packit |
c22fc9 |
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
|
Packit |
c22fc9 |
int main(int argc, char **argv)
|
|
Packit |
c22fc9 |
{
|
|
Packit |
c22fc9 |
int i = 0;
|
|
Packit |
c22fc9 |
}
|
|
Packit |
c22fc9 |
]])],
|
|
Packit |
c22fc9 |
AC_MSG_RESULT([yes])
|
|
Packit |
c22fc9 |
add_to_var([KA_CFLAGS], [-fPIE])
|
|
Packit |
c22fc9 |
add_to_var([KA_LDFLAGS], [-pie]),
|
|
Packit |
c22fc9 |
AC_MSG_RESULT([no]))
|
|
Packit |
c22fc9 |
CFLAGS=$SAV_CFLAGS
|
|
Packit |
c22fc9 |
LDFLAGS=$SAV_LDFLAGS
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
for FLAG in \
|
|
Packit |
c22fc9 |
"-Wformat -Werror=format-security" \
|
|
Packit |
c22fc9 |
"-Wp,-D_FORTIFY_SOURCE=2" \
|
|
Packit |
c22fc9 |
"-fexceptions" \
|
|
Packit |
c22fc9 |
"-fstack-protector-strong" \
|
|
Packit |
c22fc9 |
"--param=ssp-buffer-size=4" \
|
|
Packit |
c22fc9 |
"-grecord-gcc-switches"
|
|
Packit |
c22fc9 |
do
|
|
Packit |
c22fc9 |
AC_MSG_CHECKING([for $FLAG support])
|
|
Packit |
c22fc9 |
CFLAGS="$CFLAGS $FLAG"
|
|
Packit |
c22fc9 |
AC_COMPILE_IFELSE(
|
|
Packit |
c22fc9 |
[AC_LANG_SOURCE([[ ]])],
|
|
Packit |
c22fc9 |
[AC_MSG_RESULT([yes])]
|
|
Packit |
c22fc9 |
add_to_var([KA_CFLAGS], [$FLAG]),
|
|
Packit |
c22fc9 |
[AC_MSG_RESULT([no])])
|
|
Packit |
c22fc9 |
CFLAGS=$SAV_CFLAGS
|
|
Packit |
c22fc9 |
done
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
WL_FLAGS=
|
|
Packit |
c22fc9 |
for FLAG in \
|
|
Packit |
c22fc9 |
"-z,relro" \
|
|
Packit |
c22fc9 |
"-z,now"
|
|
Packit |
c22fc9 |
do
|
|
Packit |
c22fc9 |
AC_MSG_CHECKING([for -Wl,$FLAG support])
|
|
Packit |
c22fc9 |
LDFLAGS="$LDFLAGS -Wl,$FLAG"
|
|
Packit |
c22fc9 |
AC_LINK_IFELSE(
|
|
Packit |
c22fc9 |
[AC_LANG_SOURCE([[
|
|
Packit |
c22fc9 |
int main(int argc, char **argv)
|
|
Packit |
c22fc9 |
{
|
|
Packit |
c22fc9 |
int i = 0;
|
|
Packit |
c22fc9 |
}
|
|
Packit |
c22fc9 |
]])],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit |
c22fc9 |
AC_MSG_RESULT([yes])
|
|
Packit Service |
dfccb1 |
WL_FLAGS="$WL_FLAGS -Wl,$FLAG"
|
|
Packit Service |
dfccb1 |
],
|
|
Packit Service |
dfccb1 |
[AC_MSG_RESULT([no])]
|
|
Packit |
c22fc9 |
)
|
|
Packit |
c22fc9 |
CFLAGS=$SAV_CFLAGS
|
|
Packit Service |
dfccb1 |
LDFLAGS=$SAV_LDFLAGS
|
|
Packit |
c22fc9 |
done
|
|
Packit |
c22fc9 |
if test -n "$WL_FLAGS"; then
|
|
Packit Service |
dfccb1 |
add_to_var([KA_LDFLAGS], [$WL_FLAGS])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
# enable-optimise
|
|
Packit |
c22fc9 |
AS_IF([test "$enable_optimise" = yes -o "$enable_optimise" = not-specified], [optimise_level=2], [optimise_level=$enable_optimise])
|
|
Packit |
c22fc9 |
AS_IF([test "$enable_optimise" = no], [optimise_level=0])
|
|
Packit |
c22fc9 |
AS_IF([test "$optimise_level" -eq 0],
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
echo $KA_CFLAGS | $GREP -q -- "-D_FORTIFY_SOURCE=[[^0]]"
|
|
Packit Service |
dfccb1 |
AS_IF([test $? -eq 0], [AC_MSG_WARN([--disable-optimise requires --disable-hardening])])
|
|
Packit |
c22fc9 |
])
|
|
Packit |
c22fc9 |
FLAG="-O$optimise_level"
|
|
Packit |
c22fc9 |
AC_MSG_CHECKING([for $FLAG support])
|
|
Packit |
c22fc9 |
SAV_CFLAGS=$CFLAGS
|
|
Packit |
c22fc9 |
CFLAGS="$CFLAGS $FLAG"
|
|
Packit |
c22fc9 |
AC_COMPILE_IFELSE(
|
|
Packit |
c22fc9 |
[AC_LANG_SOURCE([[ ]])],
|
|
Packit |
c22fc9 |
[AC_MSG_RESULT([yes])]
|
|
Packit |
c22fc9 |
add_to_var([KA_CFLAGS], [$FLAG]),
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
AC_MSG_RESULT([no])
|
|
Packit |
c22fc9 |
AS_IF([test "$enable_optimise" != not-specified], [AC_MSG_ERROR([Invalid optimisation level specified])])
|
|
Packit |
c22fc9 |
])
|
|
Packit |
c22fc9 |
CFLAGS=$SAV_CFLAGS
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
AC_SUBST(KA_CPPFLAGS)
|
|
Packit |
c22fc9 |
AC_SUBST(KA_CFLAGS)
|
|
Packit |
c22fc9 |
AC_SUBST(KA_LDFLAGS)
|
|
Packit |
c22fc9 |
AC_SUBST(KA_LIBS)
|
|
Packit |
c22fc9 |
# AC_SUBST(KA_LIBTOOLFLAGS)
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
# Check if unaligned memory access is supported (for ARM not supported prior to ARMv6 processors)
|
|
Packit Service |
dfccb1 |
AC_MSG_CHECKING([for unaligned memory access])
|
|
Packit Service |
dfccb1 |
AC_RUN_IFELSE(
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_LANG_PROGRAM(
|
|
Packit Service |
dfccb1 |
[[
|
|
Packit Service |
dfccb1 |
#include <limits.h>
|
|
Packit Service |
dfccb1 |
#include <endian.h>
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
#if __BYTE_ORDER == __BIG_ENDIAN
|
|
Packit Service |
dfccb1 |
#if ULONG_MAX == 0xffffffffffffffffUL
|
|
Packit Service |
dfccb1 |
#define CHK_VAL 0x1234567890abcdefUL
|
|
Packit Service |
dfccb1 |
#elif ULONG_MAX == 0xffffffffUL
|
|
Packit Service |
dfccb1 |
#define CHK_VAL 0x12345678UL
|
|
Packit Service |
dfccb1 |
#else
|
|
Packit Service |
dfccb1 |
#define CHK_VAL 0x1234UL
|
|
Packit Service |
dfccb1 |
#endif
|
|
Packit Service |
dfccb1 |
#elif __BYTE_ORDER == __LITTLE_ENDIAN
|
|
Packit Service |
dfccb1 |
#if ULONG_MAX == 0xffffffffffffffffUL
|
|
Packit Service |
dfccb1 |
#define CHK_VAL 0xefcdab9078563412UL
|
|
Packit Service |
dfccb1 |
#elif ULONG_MAX == 0xffffffffUL
|
|
Packit Service |
dfccb1 |
#define CHK_VAL 0x78563412UL
|
|
Packit Service |
dfccb1 |
#else
|
|
Packit Service |
dfccb1 |
#define CHK_VAL 0x3412UL
|
|
Packit Service |
dfccb1 |
#endif
|
|
Packit Service |
dfccb1 |
#else
|
|
Packit Service |
dfccb1 |
#error Neither big nor little endian - unsupported
|
|
Packit Service |
dfccb1 |
#endif
|
|
Packit Service |
dfccb1 |
]],
|
|
Packit Service |
dfccb1 |
[[
|
|
Packit Service |
dfccb1 |
unsigned long arr[2] = { 0, 0 };
|
|
Packit Service |
dfccb1 |
unsigned char *p = (unsigned char *)arr + 1;
|
|
Packit Service |
dfccb1 |
unsigned i;
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
*(unsigned long *)p = CHK_VAL;
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
return !!(arr[0] == CHK_VAL || p[0] != 0x12 || p[1] != 0x34 || p[2] != 0x56);
|
|
Packit Service |
dfccb1 |
]]
|
|
Packit Service |
dfccb1 |
)
|
|
Packit Service |
dfccb1 |
],
|
|
Packit Service |
dfccb1 |
[AC_MSG_RESULT([yes])],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_MSG_RESULT([no])
|
|
Packit Service |
dfccb1 |
AC_DEFINE([_NO_UNALIGNED_ACCESS_], [ 1 ], [Define to 1 if unaligned memory access not supported])
|
|
Packit Service |
dfccb1 |
],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_MSG_RESULT([unknown])
|
|
Packit Service |
dfccb1 |
AC_MSG_WARN([Cannot determine if unaligned access supported. Assuming yes.])
|
|
Packit Service |
dfccb1 |
]
|
|
Packit Service |
dfccb1 |
)
|
|
Packit Service |
dfccb1 |
|
|
Packit |
c22fc9 |
# Checks for libraries.
|
|
Packit |
c22fc9 |
dnl clock_gettime() required -lt before glibc 2.17
|
|
Packit |
c22fc9 |
AC_MSG_CHECKING([for clock_gettime() requires -lrt])
|
|
Packit |
c22fc9 |
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
|
Packit |
c22fc9 |
#include <time.h>
|
|
Packit |
c22fc9 |
int main(int argc, char **argv)
|
|
Packit |
c22fc9 |
{
|
|
Packit |
c22fc9 |
int i;
|
|
Packit |
c22fc9 |
struct timespec ts;
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
i = clock_gettime(CLOCK_MONOTONIC, &ts);
|
|
Packit |
c22fc9 |
}
|
|
Packit |
c22fc9 |
]])],
|
|
Packit |
c22fc9 |
[AC_MSG_RESULT([no])],
|
|
Packit |
c22fc9 |
[
|
|
Packit Service |
dfccb1 |
SAV_LIBS="$LIBS"
|
|
Packit Service |
dfccb1 |
LIBS="$LIBS -lrt"
|
|
Packit |
c22fc9 |
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
|
Packit |
c22fc9 |
#include <time.h>
|
|
Packit |
c22fc9 |
int main(int argc, char **argv)
|
|
Packit |
c22fc9 |
{
|
|
Packit Service |
dfccb1 |
int i;
|
|
Packit Service |
dfccb1 |
struct timespec ts;
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
i = clock_gettime(CLOCK_MONOTONIC, &ts);
|
|
Packit |
c22fc9 |
}
|
|
Packit |
c22fc9 |
]])],
|
|
Packit |
c22fc9 |
[AC_MSG_RESULT([yes])]
|
|
Packit Service |
dfccb1 |
add_to_var([KA_LIBS], [-lrt]),
|
|
Packit |
c22fc9 |
[AC_MSG_ERROR([clock_gettime() not supported])])
|
|
Packit Service |
dfccb1 |
LIBS=$SAV_LIBS
|
|
Packit |
c22fc9 |
])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
# Checks for header files.
|
|
Packit |
c22fc9 |
AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h netdb.h netinet/in.h stdint.h stdlib.h string.h sys/ioctl.h sys/param.h sys/prctl.h sys/socket.h sys/time.h syslog.h unistd.h],
|
|
Packit |
c22fc9 |
[], [AC_MSG_ERROR([Missing/unusable system header file <$ac_header>])])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
# check for kernel headers
|
|
Packit |
c22fc9 |
SAV_CPPFLAGS="$CPPFLAGS"
|
|
Packit |
c22fc9 |
CPPFLAGS="$CPPFLAGS $kernelinc"
|
|
Packit |
c22fc9 |
dnl -- <linux/netlink.h> needed <sys/socket.h> until Linux 3.1
|
|
Packit |
c22fc9 |
dnl -- using AC_CHECK_HEADER causes a horrible error message for the user
|
|
Packit |
c22fc9 |
NETLINK_EXTRA_INCLUDE=
|
|
Packit |
c22fc9 |
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
Packit |
c22fc9 |
#include <linux/netlink.h>
|
|
Packit |
c22fc9 |
]])], [],
|
|
Packit |
c22fc9 |
[AC_CHECK_HEADER([linux/netlink.h],
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
AC_DEFINE([NETLINK_H_NEEDS_SYS_SOCKET_H], [ 1 ], [Define to 1 if <linux/netlink.h> needs <sys/socket.h>])
|
|
Packit |
c22fc9 |
NETLINK_EXTRA_INCLUDE="#include <sys/socket.h>"
|
|
Packit |
c22fc9 |
], [AC_MSG_ERROR([Missing/unusable kernel header file <linux/netlink.h>])],
|
|
Packit |
c22fc9 |
[[#include <sys/socket.h>]])])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl -- <linux/rtnetlink.h> needed <sys/socket.h> until ? Linux 3.1
|
|
Packit |
c22fc9 |
dnl -- using AC_CHECK_HEADER causes a horrible error message for the user
|
|
Packit |
c22fc9 |
RTNETLINK_EXTRA_INCLUDE=
|
|
Packit |
c22fc9 |
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
Packit |
c22fc9 |
#include <linux/rtnetlink.h>
|
|
Packit |
c22fc9 |
]])], [],
|
|
Packit |
c22fc9 |
[AC_CHECK_HEADER([linux/rtnetlink.h],
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
AC_DEFINE([RTNETLINK_H_NEEDS_SYS_SOCKET_H], [ 1 ], [Define to 1 if <linux/rtnetlink.h> needs <sys/socket.h>])
|
|
Packit |
c22fc9 |
RTNETLINK_EXTRA_INCLUDE="#include <sys/socket.h>"
|
|
Packit |
c22fc9 |
], [AC_MSG_ERROR([Missing/unusable kernel header file <linux/rtnetlink.h>])],
|
|
Packit |
c22fc9 |
[[#include <sys/socket.h>]])])
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
dnl -- Does linux/errqueue.h need sys/time.h?
|
|
Packit Service |
dfccb1 |
AC_MSG_CHECKING([linux/errqueue.h needs sys/time.h])
|
|
Packit Service |
dfccb1 |
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
Packit Service |
dfccb1 |
#include <fcntl.h>
|
|
Packit Service |
dfccb1 |
#include <linux/errqueue.h>
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
int main(int argc, char**argv)
|
|
Packit Service |
dfccb1 |
{
|
|
Packit Service |
dfccb1 |
}
|
|
Packit Service |
dfccb1 |
]])],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_MSG_RESULT([no])
|
|
Packit Service |
dfccb1 |
],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_MSG_RESULT([yes])
|
|
Packit Service |
dfccb1 |
AC_DEFINE([ERRQUEUE_NEEDS_SYS_TIME], [ 1 ], [Define to 1 if linux/errqueue.h needs sys/time.h])
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
|
|
Packit |
c22fc9 |
AC_CHECK_HEADERS([asm/types.h linux/ethtool.h linux/icmpv6.h linux/if_ether.h linux/if_packet.h linux/ip.h linux/sockios.h linux/types.h],
|
|
Packit |
c22fc9 |
[], [AC_MSG_ERROR([Missing/unusable kernel header file <$ac_header>])])
|
|
Packit |
c22fc9 |
AC_CHECK_HEADERS([linux/fib_rules.h linux/if_addr.h linux/if_link.h],
|
|
Packit |
c22fc9 |
[], [AC_MSG_ERROR([Missing/unusable kernel header file <$ac_header>])],
|
|
Packit |
c22fc9 |
[[$NETLINK_EXTRA_INCLUDE]])
|
|
Packit |
c22fc9 |
AC_CHECK_HEADERS([linux/if_arp.h],
|
|
Packit |
c22fc9 |
[], [AC_MSG_ERROR([Missing/unusable <$ac_header>])],
|
|
Packit |
c22fc9 |
[[#include <sys/socket.h>]])
|
|
Packit |
c22fc9 |
CPPFLAGS="$SAV_CPPFLAGS"
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
# Checks for typedefs, structures, and compiler characteristics.
|
|
Packit |
c22fc9 |
AC_HEADER_STDBOOL
|
|
Packit |
c22fc9 |
AC_C_INLINE
|
|
Packit |
c22fc9 |
AC_TYPE_INT64_T
|
|
Packit |
c22fc9 |
AC_TYPE_PID_T
|
|
Packit |
c22fc9 |
AC_TYPE_SIZE_T
|
|
Packit |
c22fc9 |
AC_TYPE_UINT16_T
|
|
Packit |
c22fc9 |
AC_TYPE_UINT32_T
|
|
Packit |
c22fc9 |
AC_TYPE_UINT64_T
|
|
Packit |
c22fc9 |
AC_TYPE_UINT8_T
|
|
Packit |
c22fc9 |
AC_C_CONST
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
# Checks for library functions.
|
|
Packit |
c22fc9 |
AC_FUNC_FORK
|
|
Packit Service |
dfccb1 |
# We don't want the following two, since autoconf, if malloc(0) returns NULL, refines malloc as rpl_malloc
|
|
Packit Service |
dfccb1 |
# and we have to provide our own rpl_malloc() and likewise rpl_realloc() functions.
|
|
Packit Service |
dfccb1 |
# keepalived doesn't do 0 length malloc()s so it is not an issue.
|
|
Packit Service |
dfccb1 |
# We add malloc and realloc to AC_CHECK_FUNCS instead.
|
|
Packit Service |
dfccb1 |
#AC_FUNC_MALLOC
|
|
Packit Service |
dfccb1 |
#AC_FUNC_REALLOC
|
|
Packit Service |
dfccb1 |
AC_CHECK_FUNCS([dup2 getcwd gettimeofday malloc memmove memset realloc select setenv socket strcasecmp strchr strdup strerror strpbrk strstr strtol strtoul uname])
|
|
Packit |
c22fc9 |
dnl - pipe2() since Linux 2.6.27 and glibc 2.9.
|
|
Packit |
c22fc9 |
AC_CHECK_FUNCS([pipe2], [add_system_opt([PIPE2])])
|
|
Packit |
c22fc9 |
dnl - signalfd() since Linux 2.6.22 and glibc 2.8
|
|
Packit |
c22fc9 |
AC_CHECK_FUNCS([signalfd], [add_system_opt([SIGNALFD])])
|
|
Packit |
c22fc9 |
dnl - inotify_init1() since Linux 2.6.27
|
|
Packit |
c22fc9 |
AC_CHECK_FUNCS([inotify_init1], [add_system_opt([INOTIFY_INIT1])])
|
|
Packit |
c22fc9 |
dnl - vsyslog() Not defined by Posix, but available in glibc and musl
|
|
Packit |
c22fc9 |
AC_CHECK_FUNCS([vsyslog], [add_system_opt([VSYSLOG])])
|
|
Packit |
c22fc9 |
dnl - epoll_create1() since Linux 2.6.27 and glibc 2.9
|
|
Packit |
c22fc9 |
AC_CHECK_FUNCS([epoll_create1], [add_system_opt([EPOLL_CREATE1])])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
# glibc uses unsigned int as 3rd parameter to __assert_fail(), musl uses int.
|
|
Packit |
c22fc9 |
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
Packit |
c22fc9 |
#include <assert.h>
|
|
Packit |
c22fc9 |
#include <stdlib.h>
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
void __assert_fail(const char * a, const char *b, unsigned int l, const char *c)
|
|
Packit |
c22fc9 |
{
|
|
Packit |
c22fc9 |
exit(a[0] + b[0] + c[0] + l == 0);
|
|
Packit |
c22fc9 |
}
|
|
Packit |
c22fc9 |
]])],
|
|
Packit |
c22fc9 |
[LINE_type="unsigned int"], [LINE_type="int"])
|
|
Packit |
c22fc9 |
AC_DEFINE_UNQUOTED([LINE_type], [ $LINE_type ], [The type of parameter __line passed to __assert_fail()])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl Check if libc supports __always_inline
|
|
Packit |
c22fc9 |
dnl See glibc sys/cdefs.h definition of __always_inline and comment
|
|
Packit |
c22fc9 |
SAV_CFLAGS="$CFLAGS"
|
|
Packit |
c22fc9 |
CFLAGS="$CFLAGS -Wattributes -Werror"
|
|
Packit |
c22fc9 |
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
Packit |
c22fc9 |
#include <stdlib.h>
|
|
Packit |
c22fc9 |
static __always_inline int
|
|
Packit |
c22fc9 |
test_func(int val)
|
|
Packit |
c22fc9 |
{
|
|
Packit |
c22fc9 |
return val;
|
|
Packit |
c22fc9 |
}
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
int
|
|
Packit |
c22fc9 |
main(int argc, char **argv)
|
|
Packit |
c22fc9 |
{
|
|
Packit |
c22fc9 |
int val = test_func(3);
|
|
Packit Service |
dfccb1 |
return val;
|
|
Packit |
c22fc9 |
}
|
|
Packit |
c22fc9 |
]])],
|
|
Packit |
c22fc9 |
[],
|
|
Packit |
c22fc9 |
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
Packit |
c22fc9 |
static __inline __attribute__ ((__always_inline__)) int
|
|
Packit |
c22fc9 |
test_func(int val)
|
|
Packit |
c22fc9 |
{
|
|
Packit |
c22fc9 |
return val;
|
|
Packit |
c22fc9 |
}
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
int
|
|
Packit |
c22fc9 |
main(int argc, char **argv)
|
|
Packit |
c22fc9 |
{
|
|
Packit |
c22fc9 |
int val = test_func(3);
|
|
Packit Service |
dfccb1 |
return val;
|
|
Packit |
c22fc9 |
}
|
|
Packit |
c22fc9 |
]])],
|
|
Packit |
c22fc9 |
[AC_DEFINE([__always_inline], [__inline __attribute__ ((__always_inline__))], [Define __always_inline if libc does not define it])],
|
|
Packit |
c22fc9 |
[AC_DEFINE([__always_inline], [inline], [Define __always_inline if libc does not define it])]
|
|
Packit |
c22fc9 |
)])
|
|
Packit |
c22fc9 |
CFLAGS="$SAV_CFLAGS"
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl - Do we want to override dynamic/static linking?
|
|
Packit |
c22fc9 |
AS_IF([test "$enable_dynamic_linking"],
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
AS_IF([test .$enable_vrrp != .no],
|
|
Packit |
c22fc9 |
[
|
|
Packit Service |
dfccb1 |
enable_libiptc_dynamic=$enable_dynamic_linking
|
|
Packit Service |
dfccb1 |
enable_libipset_dynamic=$enable_dynamic_linking
|
|
Packit |
c22fc9 |
])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_lvs != .no],
|
|
Packit |
c22fc9 |
[
|
|
Packit Service |
dfccb1 |
enable_libnl_dynamic=$enable_dynamic_linking
|
|
Packit |
c22fc9 |
])
|
|
Packit |
c22fc9 |
])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
# check for missing definition - added in glibc 2.8
|
|
Packit |
c22fc9 |
AC_CHECK_DECLS([ETHERTYPE_IPV6], [],
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
AC_DEFINE([ETHERTYPE_IPV6], [0x86dd], [Defined here if not found in <net/ethernet.h>.])
|
|
Packit |
c22fc9 |
],
|
|
Packit |
c22fc9 |
[[#include <net/ethernet.h>]])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
BUILD_GENHASH=Yes
|
|
Packit |
c22fc9 |
dnl ----[ Checks for openssl ]----
|
|
Packit |
c22fc9 |
# check for openssl headers
|
|
Packit |
c22fc9 |
NEED_MD5=no
|
|
Packit |
c22fc9 |
NEED_SSL=no
|
|
Packit |
c22fc9 |
if test "$enable_vrrp" != no -a \
|
|
Packit |
c22fc9 |
"$enable_vrrp_auth" != no; then
|
|
Packit |
c22fc9 |
NEED_MD5=yes
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
if test "$enable_lvs" != no; then
|
|
Packit |
c22fc9 |
NEED_MD5=yes
|
|
Packit |
c22fc9 |
NEED_SSL=yes
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
AC_CHECK_HEADERS([openssl/ssl.h openssl/err.h], [],
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
if test $NEED_SSL = yes; then
|
|
Packit |
c22fc9 |
AC_MSG_ERROR([
|
|
Packit |
c22fc9 |
!!! OpenSSL is not properly installed on your system. !!!
|
|
Packit |
c22fc9 |
!!! Can not include OpenSSL headers files. !!!])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
BUILD_GENHASH=No
|
|
Packit |
c22fc9 |
NEED_SSL=no
|
|
Packit |
c22fc9 |
break
|
|
Packit |
c22fc9 |
])
|
|
Packit |
c22fc9 |
AC_CHECK_HEADERS([openssl/md5.h], [],
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
if test $NEED_MD5 = yes; then
|
|
Packit |
c22fc9 |
AC_MSG_ERROR([
|
|
Packit |
c22fc9 |
!!! OpenSSL is not properly installed on your system. !!!
|
|
Packit |
c22fc9 |
!!! Can not include OpenSSL MD5 headers files. !!!])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
BUILD_GENHASH=No
|
|
Packit |
c22fc9 |
NEED_MD5=no
|
|
Packit |
c22fc9 |
break
|
|
Packit |
c22fc9 |
])
|
|
Packit |
c22fc9 |
unset LIBS
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
$PKG_CONFIG --exists openssl
|
|
Packit |
c22fc9 |
if test $? -eq 0; then
|
|
Packit |
c22fc9 |
add_pkg_config([openssl], [OPENSSL])
|
|
Packit |
c22fc9 |
else
|
|
Packit |
c22fc9 |
OPENSSL_LIBS="-lssl -lcrypto"
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
EXTRA_LIBS=`echo $OPENSSL_LIBS | sed -e "s/-lcrypto//"`
|
|
Packit |
c22fc9 |
AC_CHECK_LIB(crypto, MD5_Init, [],
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
if test $NEED_MD5 = yes; then
|
|
Packit |
c22fc9 |
AC_MSG_ERROR([OpenSSL MD5 libraries are required])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
BUILD_GENHASH=No
|
|
Packit |
c22fc9 |
], [$EXTRA_LIBS])
|
|
Packit |
c22fc9 |
if test $NEED_MD5 = yes; then
|
|
Packit |
c22fc9 |
add_to_var([KA_LIBS], [$LIBS])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
add_to_var([GENHASH_LIBS], [$LIBS])
|
|
Packit |
c22fc9 |
unset LIBS
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
EXTRA_LIBS=`echo $OPENSSL_LIBS | sed -e "s/-lssl//"`
|
|
Packit |
c22fc9 |
AC_CHECK_LIB(ssl, SSL_CTX_new, [],
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
if test $NEED_SSL = yes; then
|
|
Packit |
c22fc9 |
AC_MSG_ERROR([OpenSSL libraries are required])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
BUILD_GENHASH=No
|
|
Packit |
c22fc9 |
], [$EXTRA_LIBS])
|
|
Packit |
c22fc9 |
if test $NEED_SSL = yes; then
|
|
Packit |
c22fc9 |
add_to_var([KA_LIBS], [$LIBS])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
add_to_var([GENHASH_LIBS], [$LIBS])
|
|
Packit Service |
dfccb1 |
unset LIBS
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
# Introduced in OpenSSL ver 0.9.9
|
|
Packit |
c22fc9 |
LIBS=$OPENSSL_LIBS
|
|
Packit |
c22fc9 |
AC_MSG_CHECKING([SSL_set_tlsext_host_name() - may be a definition])
|
|
Packit |
c22fc9 |
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
Packit |
c22fc9 |
#include <openssl/ssl.h>
|
|
Packit |
c22fc9 |
int main(void)
|
|
Packit |
c22fc9 |
{
|
|
Packit |
c22fc9 |
request_t req;
|
|
Packit |
c22fc9 |
SSL_set_tlsext_host_name(req.ssl, "SSL");
|
|
Packit |
c22fc9 |
}
|
|
Packit |
c22fc9 |
]])], [
|
|
Packit |
c22fc9 |
AC_MSG_RESULT([no])
|
|
Packit |
c22fc9 |
], [
|
|
Packit |
c22fc9 |
AC_MSG_RESULT([yes])
|
|
Packit |
c22fc9 |
AC_DEFINE([_HAVE_SSL_SET_TLSEXT_HOST_NAME_], [ 1 ], [Define to 1 if have SSL_set_tlsext_host_name()])
|
|
Packit |
c22fc9 |
])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
# SSL_CTX_set_verify_depth() introduced OpenSSL v0.9.5a
|
|
Packit |
c22fc9 |
AC_CHECK_FUNCS([SSL_CTX_set_verify_depth])
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
# SSL_set0_rbio(), SSL_set0_wbio() OPENSSL_init_crypto() and TLS_method() introduced OpenSSL v1.1.0
|
|
Packit Service |
dfccb1 |
AC_CHECK_FUNCS([SSL_set0_rbio OPENSSL_init_crypto TLS_method])
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
# In OpenSSL v1.1.1 the call to SSL_CTX_new() fails if OPENSSL_init_crypto() has been called with
|
|
Packit Service |
dfccb1 |
# OPENSSL_INIT_NO_LOAD_CONFIG. It does not fail in v1.1.0h and v1.1.1b.
|
|
Packit Service |
dfccb1 |
AS_IF([test .$ac_cv_func_OPENSSL_init_crypto = .yes],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AS_IF([test .$ac_cv_func_TLS_method = .yes], [method_func=TLS_method], [method_func=SSLv23_method])
|
|
Packit Service |
dfccb1 |
AC_RUN_IFELSE(
|
|
Packit Service |
dfccb1 |
[AC_LANG_PROGRAM(
|
|
Packit Service |
dfccb1 |
[[#include <openssl/ssl.h>]],
|
|
Packit Service |
dfccb1 |
[[
|
|
Packit Service |
dfccb1 |
const SSL_METHOD *meth;
|
|
Packit Service |
dfccb1 |
SSL_CTX *ctx;
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
if (!OPENSSL_init_crypto(OPENSSL_INIT_NO_LOAD_CONFIG, NULL))
|
|
Packit Service |
dfccb1 |
return 1;
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
/* Initialize SSL context */
|
|
Packit Service |
dfccb1 |
meth = $method_func();
|
|
Packit Service |
dfccb1 |
if (!(ctx = SSL_CTX_new(meth)))
|
|
Packit Service |
dfccb1 |
return 1;
|
|
Packit Service |
dfccb1 |
return 0;
|
|
Packit Service |
dfccb1 |
]])],
|
|
Packit Service |
dfccb1 |
[openssl_init_no_load_bug=0],
|
|
Packit Service |
dfccb1 |
[openssl_init_no_load_bug=1],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_MSG_WARN([Cannot determine if need to OPENSSL_init_crypto() problem. Assuming yes for safety.])
|
|
Packit Service |
dfccb1 |
openssl_init_no_load_bug=1
|
|
Packit Service |
dfccb1 |
]
|
|
Packit Service |
dfccb1 |
)
|
|
Packit Service |
dfccb1 |
AS_IF([test $openssl_init_no_load_bug -eq 1],
|
|
Packit Service |
dfccb1 |
[AC_DEFINE([HAVE_OPENSSL_INIT_NO_LOAD_CONFIG_BUG], [ 1 ], [Define to 1 if OPENSSL_init_crypto(OPENSSL_INIT_NO_LOAD_CONFIG) bug)])])
|
|
Packit Service |
dfccb1 |
])
|
|
Packit |
c22fc9 |
unset LIBS
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
if test $BUILD_GENHASH = No; then
|
|
Packit |
c22fc9 |
AC_MSG_NOTICE([Unable to build genhash due to missing openssl headers/libraries])
|
|
Packit |
c22fc9 |
GENHASH_LIBS=
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
AC_SUBST([GENHASH_LIBS])
|
|
Packit |
c22fc9 |
AM_CONDITIONAL([BUILD_GENHASH], [test $BUILD_GENHASH = Yes])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ Check for IPv4 devconf netlink support ]----
|
|
Packit |
c22fc9 |
IPV4_DEVCONF=No
|
|
Packit |
c22fc9 |
if test .$enable_vrrp != .no; then
|
|
Packit |
c22fc9 |
dnl ----[Check have IPV4_DEVCONF defines - since Linux 3.11]----
|
|
Packit |
c22fc9 |
SAV_CPPFLAGS="$CPPFLAGS"
|
|
Packit Service |
dfccb1 |
CPPFLAGS="$CPPFLAGS $kernelinc"
|
|
Packit |
c22fc9 |
IPV4_DEVCONF=Yes
|
|
Packit |
c22fc9 |
AC_CHECK_DECLS([
|
|
Packit |
c22fc9 |
IPV4_DEVCONF_ARP_IGNORE,
|
|
Packit |
c22fc9 |
IPV4_DEVCONF_ACCEPT_LOCAL,
|
|
Packit |
c22fc9 |
IPV4_DEVCONF_RP_FILTER,
|
|
Packit |
c22fc9 |
IPV4_DEVCONF_ARPFILTER],
|
|
Packit |
c22fc9 |
[],
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
IPV4_DEVCONF=No
|
|
Packit |
c22fc9 |
break
|
|
Packit |
c22fc9 |
],
|
|
Packit |
c22fc9 |
[[#include <linux/ip.h>]])
|
|
Packit |
c22fc9 |
if test $IPV4_DEVCONF = Yes; then
|
|
Packit |
c22fc9 |
AC_DEFINE([_HAVE_IPV4_DEVCONF_], [ 1 ], [Define to 1 if have IPv4 netlink device configuration])
|
|
Packit |
c22fc9 |
add_system_opt([IPV4_DEVCONF])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
AC_CHECK_HEADERS([linux/rtnetlink.h], [], [AC_MSG_ERROR([Unusable linux/rtnetlink.h])], [$RTNETLINK_EXTRA_INCLUDE])
|
|
Packit |
c22fc9 |
CPPFLAGS="$SAV_CPPFLAGS"
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
dnl ----[ Check for IPv6 Advanced API (RFC3542) - since Linux 2.6.14 ]----
|
|
Packit Service |
dfccb1 |
IPV6_ADVANCED_API=No
|
|
Packit Service |
dfccb1 |
AC_CHECK_DECLS([
|
|
Packit Service |
dfccb1 |
IPV6_RECVHOPLIMIT,
|
|
Packit Service |
dfccb1 |
IPV6_RECVPKTINFO],
|
|
Packit Service |
dfccb1 |
[IPV6_ADVANCED_API=Yes],
|
|
Packit Service |
dfccb1 |
[],
|
|
Packit Service |
dfccb1 |
[[#include <netinet/ip6.h>]])
|
|
Packit Service |
dfccb1 |
AS_IF([test $IPV6_ADVANCED_API = Yes], [add_system_opt([IPV6_ADVANCED_API])])
|
|
Packit Service |
dfccb1 |
|
|
Packit |
c22fc9 |
dnl ----[ Checks for libraries ]----
|
|
Packit |
c22fc9 |
NETLINK_VER=0
|
|
Packit |
c22fc9 |
IPVS_USE_NL=No
|
|
Packit |
c22fc9 |
if test .$enable_lvs != .no -a .${enable_libnl} != .no; then
|
|
Packit |
c22fc9 |
$PKG_CONFIG --exists libnl-3.0
|
|
Packit |
c22fc9 |
if test $? -eq 0; then
|
|
Packit |
c22fc9 |
add_pkg_config([libnl-3.0], [NL3], [remove-requires])
|
|
Packit |
c22fc9 |
AC_CHECK_LIB($NL3_LIB_NAMES, nl_socket_alloc,
|
|
Packit |
c22fc9 |
[
|
|
Packit Service |
dfccb1 |
NETLINK_VER=3
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
AC_DEFINE([_HAVE_LIBNL3_], [ 1 ], [Define to 1 if using libnl-3])
|
|
Packit Service |
dfccb1 |
add_system_opt([LIBNL3])
|
|
Packit Service |
dfccb1 |
if test .$enable_libnl_dynamic = .yes; then
|
|
Packit Service |
dfccb1 |
add_system_opt([LIBNL_DYNAMIC])
|
|
Packit Service |
dfccb1 |
add_pkg_config_without_libs([libnl-3.0])
|
|
Packit Service |
dfccb1 |
AC_DEFINE([_LIBNL_DYNAMIC_], [ 1 ], [Define to 1 if building with libnl dynamic linking])
|
|
Packit Service |
dfccb1 |
NEED_LIBDL=Yes
|
|
Packit Service |
dfccb1 |
get_lib_name([$NL3_LIB_NAMES], [nl_socket_alloc])
|
|
Packit Service |
dfccb1 |
AC_DEFINE_UNQUOTED([NL3_LIB_NAME], [ "$LIB_NAME" ], [Define the nl-3 library name])
|
|
Packit Service |
dfccb1 |
else
|
|
Packit Service |
dfccb1 |
add_pkg_config([libnl-3.0])
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
add_pkg_config([libnl-genl-3.0], [GENL], [remove-requires])
|
|
Packit |
c22fc9 |
AC_CHECK_LIB($GENL_LIB_NAMES, genl_connect, [],
|
|
Packit Service |
dfccb1 |
[AC_MSG_ERROR([libnl-3 is installed but not libnl-gen-3. Please, install libnl-gen-3/libnl-genl-3.])],
|
|
Packit Service |
dfccb1 |
[$NL3_LIBS])
|
|
Packit |
c22fc9 |
IPVS_USE_NL=Yes
|
|
Packit |
c22fc9 |
if test .$enable_libnl_dynamic = .yes; then
|
|
Packit |
c22fc9 |
add_pkg_config_without_libs([libnl-genl-3.0])
|
|
Packit |
c22fc9 |
get_lib_name([$GENL_LIB_NAMES], [genl_connect])
|
|
Packit |
c22fc9 |
AC_DEFINE_UNQUOTED([NL3_GENL_LIB_NAME], [ "$LIB_NAME" ], [Define the nl-genl-3.0 library name])
|
|
Packit |
c22fc9 |
else
|
|
Packit |
c22fc9 |
add_pkg_config([libnl-genl-3.0])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
], [])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
if test $NETLINK_VER -eq 0; then
|
|
Packit |
c22fc9 |
AC_CHECK_LIB(nl, nl_socket_modify_cb,
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
IPVS_USE_NL=Yes
|
|
Packit |
c22fc9 |
NETLINK_VER=1
|
|
Packit |
c22fc9 |
AC_DEFINE([_HAVE_LIBNL1_], [ 1 ], [Define to 1 if using libnl-1])
|
|
Packit |
c22fc9 |
add_system_opt([LIBNL1])
|
|
Packit |
c22fc9 |
if test .$enable_libnl_dynamic = .yes; then
|
|
Packit |
c22fc9 |
add_pkg_config_without_libs([libnl-1])
|
|
Packit |
c22fc9 |
add_config_opt([LIBNL_DYNAMIC])
|
|
Packit |
c22fc9 |
AC_DEFINE([_LIBNL_DYNAMIC_], [ 1 ], [Define to 1 if building with libnl dynamic linking])
|
|
Packit |
c22fc9 |
NEED_LIBDL=Yes
|
|
Packit |
c22fc9 |
get_lib_name([nl], [nl_socket_modify_cb])
|
|
Packit |
c22fc9 |
AC_DEFINE_UNQUOTED([NL_LIB_NAME], [ "$LIB_NAME" ], [Define the nl library name])
|
|
Packit |
c22fc9 |
else
|
|
Packit |
c22fc9 |
add_pkg_config([libnl-1])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
],
|
|
Packit |
c22fc9 |
[AC_MSG_WARN([keepalived will be built without libnl support.])
|
|
Packit |
c22fc9 |
])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
if test $NETLINK_VER -ne 0; then
|
|
Packit |
c22fc9 |
SAV_CPPFLAGS="$CPPFLAGS"
|
|
Packit Service |
dfccb1 |
CPPFLAGS="$CPPFLAGS $kernel_inc $NL3_CPPFLAGS"
|
|
Packit |
c22fc9 |
AC_CHECK_HEADERS([netlink/netlink.h], [], [AC_MSG_ERROR([netlink headers missing])])
|
|
Packit |
c22fc9 |
AC_CHECK_HEADERS([netlink/genl/ctrl.h netlink/genl/genl.h], [], [AC_MSG_ERROR([netlink genl headers missing])])
|
|
Packit |
c22fc9 |
CPPFLAGS="$SAV_CPPFLAGS"
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
AM_CONDITIONAL([LIBNL1], [test $NETLINK_VER -eq 1])
|
|
Packit |
c22fc9 |
AM_CONDITIONAL([LIBNL3], [test $NETLINK_VER -eq 3])
|
|
Packit |
c22fc9 |
AM_CONDITIONAL([LIBNL_DYNAMIC], [test .$enable_lvs != .no -a .$enable_libnl_dynamic = .yes -a $NETLINK_VER -ne 0])
|
|
Packit Service |
dfccb1 |
unset LIBS
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
AC_CHECK_LIB(magic, magic_open,
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
AC_DEFINE([_HAVE_LIBMAGIC_], [ 1 ], [Define to 1 if have magic library])
|
|
Packit |
c22fc9 |
add_to_var([KA_LIBS], [-lmagic])
|
|
Packit |
c22fc9 |
])
|
|
Packit |
c22fc9 |
unset LIBS
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl -- Check for the following variables introduced at various times into Linux
|
|
Packit |
c22fc9 |
dnl --FRA_OIFNAME dnl -- Linux 2.6.33
|
|
Packit |
c22fc9 |
dnl --RTAX_QUICKACK dnl -- Linux 3.11
|
|
Packit |
c22fc9 |
dnl --FRA_SUPPRESS_PREFIXLEN dnl -- Linux 3.12
|
|
Packit |
c22fc9 |
dnl --FRA_SUPPRESS_IFGROUP dnl -- Linux 3.12
|
|
Packit |
c22fc9 |
dnl --RTAX_CC_ALGO dnl -- Linux 4.0
|
|
Packit |
c22fc9 |
dnl --RTA_VIA dnl -- Linux 4.1
|
|
Packit |
c22fc9 |
dnl --RTA_NEWDST dnl -- Linux 4.1
|
|
Packit |
c22fc9 |
dnl --RTA_PREF dnl -- Linux 4.1
|
|
Packit |
c22fc9 |
dnl --FRA_TUN_ID dnl -- Linux 4.3
|
|
Packit |
c22fc9 |
dnl --RTA_ENCAP dnl -- Linux 4.3
|
|
Packit |
c22fc9 |
dnl --RTEXT_FILTER_SKIP_STATS dnl -- Linux 4.4
|
|
Packit |
c22fc9 |
dnl --RTA_EXPIRES dnl -- Linux 4.5
|
|
Packit |
c22fc9 |
dnl --FRA_L3MDEV dnl -- Linux 4.8
|
|
Packit |
c22fc9 |
dnl --FRA_UID_RANGE dnl -- Linux 4.10
|
|
Packit |
c22fc9 |
dnl --RTAX_FASTOPEN_NO_COOKIE dnl -- Linux 4.15
|
|
Packit |
c22fc9 |
dnl --FRA_PROTOCOL dnl -- Linux 4.17
|
|
Packit |
c22fc9 |
dnl --FRA_IP_PROTO dnl -- Linux 4.17
|
|
Packit |
c22fc9 |
dnl --FRA_SPORT_RANGE dnl -- Linux 4.17
|
|
Packit |
c22fc9 |
dnl --FRA_DPORT_RANGE dnl -- Linux 4.17
|
|
Packit |
c22fc9 |
dnl --RTA_TTL_PROPAGATE dnl -- Linux 4.12
|
|
Packit |
c22fc9 |
AC_CHECK_DECLS([RTA_ENCAP, RTA_EXPIRES, RTA_NEWDST, RTA_PREF, FRA_SUPPRESS_PREFIXLEN, FRA_SUPPRESS_IFGROUP, FRA_TUN_ID, RTAX_CC_ALGO, RTAX_QUICKACK, RTEXT_FILTER_SKIP_STATS, FRA_L3MDEV, FRA_UID_RANGE, RTAX_FASTOPEN_NO_COOKIE, RTA_VIA, FRA_OIFNAME, FRA_PROTOCOL, FRA_IP_PROTO, FRA_SPORT_RANGE, FRA_DPORT_RANGE, RTA_TTL_PROPAGATE], [], [],
|
|
Packit |
c22fc9 |
[[$RTNETLINK_EXTRA_INCLUDES
|
|
Packit |
c22fc9 |
#include <linux/rtnetlink.h>
|
|
Packit |
c22fc9 |
#include <sys/socket.h>
|
|
Packit |
c22fc9 |
#include <linux/fib_rules.h>]])
|
|
Packit |
c22fc9 |
for flag in RTA_ENCAP RTA_EXPIRES RTA_NEWDST RTA_PREF FRA_SUPPRESS_PREFIXLEN FRA_SUPPRESS_IFGROUP FRA_TUN_ID RTAX_CC_ALGO RTAX_QUICKACK RTEXT_FILTER_SKIP_STATS FRA_L3MDEV FRA_UID_RANGE RTAX_FASTOPEN_NO_COOKIE RTA_VIA FRA_OIFNAME FRA_PROTOCOL FRA_IP_PROTO FRA_SPORT_RANGE FRA_DPORT_RANGE RTA_TTL_PROPAGATE; do
|
|
Packit |
c22fc9 |
AS_VAR_COPY([decl_var], [ac_cv_have_decl_$flag])
|
|
Packit |
c22fc9 |
if test ${decl_var} = yes; then
|
|
Packit |
c22fc9 |
add_system_opt[${flag}]
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
done
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl - Introduced in Linux 3.14
|
|
Packit |
c22fc9 |
AC_CHECK_DECLS([IFA_FLAGS], [], [], [[#include <linux/if_addr.h>]])
|
|
Packit |
c22fc9 |
for flag in IFA_FLAGS; do
|
|
Packit |
c22fc9 |
AS_VAR_COPY([decl_var], [ac_cv_have_decl_$flag])
|
|
Packit |
c22fc9 |
if test ${decl_var} = yes; then
|
|
Packit |
c22fc9 |
add_system_opt[${flag}]
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
done
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl - Introduced in Linux 2.6.31, but not until glibc 2.17
|
|
Packit |
c22fc9 |
AC_CHECK_DECLS([IP_MULTICAST_ALL],
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
add_system_opt[IP_MULTICAST_ALL]
|
|
Packit |
c22fc9 |
# Check if definition is in netinet/in.h, since we can't include linux/in.h
|
|
Packit |
c22fc9 |
# due to conflicting definitions
|
|
Packit |
c22fc9 |
AC_LINK_IFELSE(
|
|
Packit |
c22fc9 |
[
|
|
Packit Service |
dfccb1 |
AC_LANG_SOURCE(
|
|
Packit |
c22fc9 |
[[
|
|
Packit |
c22fc9 |
#include <netinet/in.h>
|
|
Packit |
c22fc9 |
int main(int argc, char **argv)
|
|
Packit |
c22fc9 |
{
|
|
Packit |
c22fc9 |
int i = IP_MULTICAST_ALL;
|
|
Packit |
c22fc9 |
}
|
|
Packit |
c22fc9 |
]])
|
|
Packit |
c22fc9 |
],
|
|
Packit |
c22fc9 |
[],
|
|
Packit |
c22fc9 |
[
|
|
Packit Service |
dfccb1 |
# No - netinet/in.h doesn't have IP_MULTICAST_ALL
|
|
Packit |
c22fc9 |
# Build a program that will output the value of the kernel's IP_MULTICAST_ALL
|
|
Packit Service |
dfccb1 |
AC_LINK_IFELSE(
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
AC_LANG_SOURCE(
|
|
Packit |
c22fc9 |
[[
|
|
Packit Service |
dfccb1 |
#include <sys/socket.h>
|
|
Packit Service |
dfccb1 |
#include <linux/in.h>
|
|
Packit Service |
dfccb1 |
#include <stdio.h>
|
|
Packit Service |
dfccb1 |
int main(int argc, char **argv)
|
|
Packit Service |
dfccb1 |
{
|
|
Packit Service |
dfccb1 |
printf("%d\n", IP_MULTICAST_ALL);
|
|
Packit Service |
dfccb1 |
}
|
|
Packit |
c22fc9 |
]])
|
|
Packit |
c22fc9 |
],
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
# Create local definition of IP_MULTICAST_ALL
|
|
Packit |
c22fc9 |
IMA=$(./conftest$EXEEXT)
|
|
Packit |
c22fc9 |
AC_DEFINE_UNQUOTED([IP_MULTICAST_ALL], [ $IMA ], [Defined to value in <linux/in.h> if not in <netinet/in.h>])
|
|
Packit |
c22fc9 |
])
|
|
Packit |
c22fc9 |
]
|
|
Packit |
c22fc9 |
)
|
|
Packit |
c22fc9 |
],
|
|
Packit |
c22fc9 |
[],
|
|
Packit |
c22fc9 |
[[
|
|
Packit |
c22fc9 |
#include <sys/socket.h>
|
|
Packit |
c22fc9 |
#include <linux/in.h>
|
|
Packit |
c22fc9 |
]])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl -- RedHat backported ENCAP_IP and ENCAP_IP6 without MPLS and ILA
|
|
Packit Service |
dfccb1 |
AS_IF([test $ac_cv_have_decl_RTA_ENCAP = yes],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_CHECK_DECLS([LWTUNNEL_ENCAP_MPLS, LWTUNNEL_ENCAP_ILA], [], [],
|
|
Packit Service |
dfccb1 |
[[#include <linux/lwtunnel.h>]])
|
|
Packit Service |
dfccb1 |
for flag in LWTUNNEL_ENCAP_MPLS LWTUNNEL_ENCAP_ILA; do
|
|
Packit Service |
dfccb1 |
AS_VAR_COPY([decl_var], [ac_cv_have_decl_$flag])
|
|
Packit Service |
dfccb1 |
if test ${decl_var} = yes; then
|
|
Packit Service |
dfccb1 |
add_system_opt([${flag}])
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit Service |
dfccb1 |
done
|
|
Packit Service |
dfccb1 |
])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[Check for iptables libraries]----
|
|
Packit Service |
dfccb1 |
USE_IPTABLES=No
|
|
Packit |
c22fc9 |
USE_LIBIPSET=No
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_iptables != .no],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
USE_IPTABLES=Yes
|
|
Packit Service |
dfccb1 |
dnl -- linux/netfilter/x_tables.h since Linux 2.6.16
|
|
Packit |
c22fc9 |
SAV_CPPFLAGS="$CPPFLAGS"
|
|
Packit |
c22fc9 |
CPPFLAGS="$CPPFLAGS $kernelinc"
|
|
Packit Service |
dfccb1 |
AC_CHECK_HEADERS([linux/netfilter/x_tables.h libiptc/libip6tc.h libiptc/libiptc.h libiptc/libxtc.h], [],
|
|
Packit |
c22fc9 |
[
|
|
Packit Service |
dfccb1 |
USE_IPTABLES=No
|
|
Packit Service |
dfccb1 |
break
|
|
Packit Service |
dfccb1 |
])
|
|
Packit |
c22fc9 |
CPPFLAGS="$SAV_CPPFLAGS"
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
if test $USE_IPTABLES = Yes; then
|
|
Packit Service |
dfccb1 |
PKG_CONFIG_IP4TC=Yes
|
|
Packit Service |
dfccb1 |
$PKG_CONFIG --exists libip4tc
|
|
Packit Service |
dfccb1 |
AS_IF([test $? -eq 0],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
add_pkg_config([--static libip4tc], [IP4TC], [remove-requires])
|
|
Packit Service |
dfccb1 |
add_pkg_config([--static libip6tc], [IP6TC], [remove-requires])
|
|
Packit Service |
dfccb1 |
IPTC_LIBS="$IP4TC_LIBS $IP6TC_LIBS"
|
|
Packit Service |
dfccb1 |
IPTC_LIB_NAMES="$IP4TC_LIB_NAMES $IP6TC_LIB_NAMES"
|
|
Packit Service |
dfccb1 |
],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
PKG_CONFIG_IP4TC=No
|
|
Packit Service |
dfccb1 |
add_pkg_config([--static libiptc], [IPTC], [remove-requires])
|
|
Packit Service |
dfccb1 |
])
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
SAV_CPPFLAGS="$CPPFLAGS"
|
|
Packit Service |
dfccb1 |
CPPFLAGS="$CPPFLAGS $kernelinc"
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
AC_SEARCH_LIBS(iptc_init, $IPTC_LIB_NAMES,
|
|
Packit |
c22fc9 |
[
|
|
Packit Service |
dfccb1 |
if test .${enable_libiptc_dynamic} != .yes; then
|
|
Packit Service |
dfccb1 |
AS_IF([test $PKG_CONFIG_IP4TC = Yes],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
add_pkg_config([--static libip4tc])
|
|
Packit Service |
dfccb1 |
add_pkg_config([--static libip6tc])
|
|
Packit Service |
dfccb1 |
],
|
|
Packit Service |
dfccb1 |
[add_pkg_config([--static libiptc])])
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
dnl - Older versions of libiptc produced a requirement for -liptc, but we don't need it
|
|
Packit Service |
dfccb1 |
KA_LIBS=`echo $KA_LIBS | sed -e "s/ -liptc//"`
|
|
Packit Service |
dfccb1 |
dnl - Even older versions of libiptc don't produce any requirement other than -liptc
|
|
Packit Service |
dfccb1 |
IPTC_LIBS=`echo $IPTC_LIBS | sed -e "s/ *-L[[^ ]]* */ /" -e "s/ *-liptc */ /" -e "s/^ *$//"`
|
|
Packit Service |
dfccb1 |
if test ".$IPTC_LIBS" = .; then
|
|
Packit Service |
dfccb1 |
KA_LIBS="$KA_LIBS -lip4tc -lip6tc"
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit Service |
dfccb1 |
else
|
|
Packit Service |
dfccb1 |
AS_IF([test $PKG_CONFIG_IP4TC = Yes],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
add_pkg_config_without_libs([libip4tc])
|
|
Packit Service |
dfccb1 |
add_pkg_config_without_libs([libip6tc])
|
|
Packit Service |
dfccb1 |
],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
add_pkg_config_without_libs([libiptc])
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
add_config_opt([LIBIPTC_DYNAMIC])
|
|
Packit Service |
dfccb1 |
AC_DEFINE([_LIBIPTC_DYNAMIC_], [ 1 ], [Define to 1 if building with libiptc dynamic linking])
|
|
Packit Service |
dfccb1 |
NEED_LIBDL=Yes
|
|
Packit Service |
dfccb1 |
AC_SEARCH_LIBS(ip6tc_init, $IPTC_LIB_NAMES)
|
|
Packit Service |
dfccb1 |
IP4TC_NAME=`echo $ac_cv_search_iptc_init | sed -e "s/-l//"`
|
|
Packit Service |
dfccb1 |
IP6TC_NAME=`echo $ac_cv_search_ip6tc_init | sed -e "s/-l//"`
|
|
Packit Service |
dfccb1 |
get_lib_name([$IP4TC_NAME], [iptc_init])
|
|
Packit Service |
dfccb1 |
AC_DEFINE_UNQUOTED([IP4TC_LIB_NAME], [ "$LIB_NAME" ], [Define the ip4tc library name])
|
|
Packit Service |
dfccb1 |
get_lib_name([$IP6TC_NAME], [ip6tc_init])
|
|
Packit Service |
dfccb1 |
AC_DEFINE_UNQUOTED([IP6TC_LIB_NAME], [ "$LIB_NAME" ], [Define the ip6tc library name])
|
|
Packit Service |
dfccb1 |
LIBIPTC_DYNAMIC=Yes
|
|
Packit |
c22fc9 |
fi
|
|
Packit Service |
dfccb1 |
],
|
|
Packit Service |
dfccb1 |
[USE_IPTABLES=No])
|
|
Packit Service |
dfccb1 |
CPPFLAGS="$SAV_CPPFLAGS"
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
if test $USE_IPTABLES = Yes; then
|
|
Packit Service |
dfccb1 |
dnl ----[Check for ipset libraries]----
|
|
Packit Service |
dfccb1 |
SAV_CPPFLAGS="$CPPFLAGS"
|
|
Packit Service |
dfccb1 |
CPPFLAGS="$CPPFLAGS $kernelinc"
|
|
Packit Service |
dfccb1 |
if test "${enable_libipset}" != no; then
|
|
Packit Service |
dfccb1 |
$PKG_CONFIG --exists libipset
|
|
Packit Service |
dfccb1 |
if test $? -eq 0; then
|
|
Packit Service |
dfccb1 |
add_pkg_config([libipset], [IPSET], [remove-requires])
|
|
Packit Service |
dfccb1 |
else
|
|
Packit Service |
dfccb1 |
IPSET_LIBS="-lipset"
|
|
Packit Service |
dfccb1 |
IPSET_LIB_NAMES=ipset
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit Service |
dfccb1 |
SAV_LIBS=$LIBS
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
AC_SEARCH_LIBS(ipset_session_init, $IPSET_LIB_NAMES,
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
USE_LIBIPSET=Yes
|
|
Packit Service |
dfccb1 |
AC_CHECK_HEADERS([libipset/data.h libipset/linux_ip_set.h libipset/session.h libipset/types.h], [],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
USE_LIBIPSET=No
|
|
Packit Service |
dfccb1 |
break
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
if test $USE_LIBIPSET = Yes; then
|
|
Packit Service |
dfccb1 |
dnl -- Need to use <libipset/linux_ip_set.h> for <linux/netfilter/xt_set.h> prior to Linux 3.4
|
|
Packit Service |
dfccb1 |
EXTRA_INCLUDE=
|
|
Packit Service |
dfccb1 |
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
Packit Service |
dfccb1 |
#include <linux/netfilter/xt_set.h>
|
|
Packit Service |
dfccb1 |
]])],
|
|
Packit Service |
dfccb1 |
[AC_CHECK_HEADERS([linux/netfilter/xt_set.h], [], [USE_LIBIPSET=No], [])],
|
|
Packit Service |
dfccb1 |
[AC_CHECK_HEADER([linux/netfilter/xt_set.h],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_DEFINE([USE_LIBIPSET_LINUX_IP_SET_H], [ 1 ], [Define to 1 if <linux/netfilter/xt_set.h> needs <libipset/linux_ip_set.h>])
|
|
Packit Service |
dfccb1 |
EXTRA_INCLUDE="#include <libipset/linux_ip_set.h>"
|
|
Packit Service |
dfccb1 |
], [USE_LIBIPSET=No],
|
|
Packit Service |
dfccb1 |
[[#include <libipset/linux_ip_set.h>]])
|
|
Packit Service |
dfccb1 |
]
|
|
Packit Service |
dfccb1 |
)
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
if test $USE_LIBIPSET = Yes; then
|
|
Packit Service |
dfccb1 |
AC_DEFINE([_HAVE_LIBIPSET_], [ 1 ], [Define to 1 if have ipset library])
|
|
Packit Service |
dfccb1 |
$PKG_CONFIG --exists libipset
|
|
Packit Service |
dfccb1 |
if test $? -eq 0; then
|
|
Packit Service |
dfccb1 |
if test .${enable_libipset_dynamic} = .no; then
|
|
Packit Service |
dfccb1 |
add_pkg_config([libipset])
|
|
Packit Service |
dfccb1 |
else
|
|
Packit Service |
dfccb1 |
add_pkg_config_without_libs([libipset])
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit Service |
dfccb1 |
elif test .${enable_libipset_dynamic} = .no; then
|
|
Packit Service |
dfccb1 |
add_to_var([KA_LIBS], [$ac_cv_search_ipset_session_init])
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit Service |
dfccb1 |
if test .${enable_libipset_dynamic} != .no; then
|
|
Packit Service |
dfccb1 |
AC_DEFINE([_LIBIPSET_DYNAMIC_], [ 1 ], [Define to 1 if building with libipset dynamic linking])
|
|
Packit Service |
dfccb1 |
add_config_opt([LIBIPSET_DYNAMIC])
|
|
Packit Service |
dfccb1 |
NEED_LIBDL=Yes
|
|
Packit Service |
dfccb1 |
LIBIPSET_NAME=`echo $ac_cv_search_ipset_session_init | sed -e "s/-l//"`
|
|
Packit Service |
dfccb1 |
get_lib_name([$LIBIPSET_NAME], [ipset_session_init])
|
|
Packit Service |
dfccb1 |
AC_DEFINE_UNQUOTED([IPSET_LIB_NAME], [ "$LIB_NAME" ], [Define the ipset library name])
|
|
Packit |
c22fc9 |
else
|
|
Packit Service |
dfccb1 |
add_config_opt([LIBIPSET])
|
|
Packit |
c22fc9 |
fi
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
dnl -- xt_set_info_match first introduced in Linux 2.6.39 (initial implementation of ipsets)
|
|
Packit Service |
dfccb1 |
dnl -- xt_set_info_match_v1 declared since Linux 3.1
|
|
Packit Service |
dfccb1 |
AC_CHECK_MEMBER([struct xt_set_info_match_v1.match_set.index], [AC_DEFINE([HAVE_XT_SET_INFO_MATCH_V1], [ 1 ], [Define to 1 if have struct xt_set_info_match_v1])], [],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
$EXTRA_INCLUDE
|
|
Packit Service |
dfccb1 |
#include <linux/netfilter/xt_set.h>
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
dnl -- xt_set_info_match_v3 declared since Linux 3.10
|
|
Packit Service |
dfccb1 |
AC_CHECK_MEMBER([struct xt_set_info_match_v3.match_set.index], [AC_DEFINE([HAVE_XT_SET_INFO_MATCH_V3], [ 1 ], [Define to 1 if have struct xt_set_info_match_v3])], [],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
$EXTRA_INCLUDE
|
|
Packit Service |
dfccb1 |
#include <linux/netfilter/xt_set.h>
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
dnl -- xt_set_info_match_v4 declared since Linux 3.19
|
|
Packit Service |
dfccb1 |
AC_CHECK_MEMBER([struct xt_set_info_match_v4.match_set.index], [AC_DEFINE([HAVE_XT_SET_INFO_MATCH_V4], [ 1 ], [Define to 1 if have struct xt_set_info_match_v4])], [],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
$EXTRA_INCLUDE
|
|
Packit Service |
dfccb1 |
#include <linux/netfilter/xt_set.h>
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
dnl - ipset type iface introduced in Linux 3.1
|
|
Packit Service |
dfccb1 |
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
Packit Service |
dfccb1 |
#include <linux/netfilter/ipset/ip_set.h>
|
|
Packit Service |
dfccb1 |
int main(void) { int var = IPSET_ATTR_IFACE; }
|
|
Packit Service |
dfccb1 |
]])],
|
|
Packit Service |
dfccb1 |
[AC_DEFINE([HAVE_IPSET_ATTR_IFACE], [ 1 ], [Define to 1 if ipset supports iface type])])
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
dnl - The include guard for <linux/netfilter/ipset/ip_set.h> has the leading _UAPI remove when
|
|
Packit Service |
dfccb1 |
dnl - the source code is processed to produce the actual header files.
|
|
Packit Service |
dfccb1 |
dnl - Unfortunately libipset provides a copy of the kernel headers, as <libipset/linux_ip_set*.h>,
|
|
Packit Service |
dfccb1 |
dnl - but it doesn't remove the _UAPI from the header files when installing them.
|
|
Packit Service |
dfccb1 |
dnl - Unfortunately we need to include some libipset header files, which include the
|
|
Packit Service |
dfccb1 |
dnl - libipset version, and also <linux/netfilter/xt_set.h> which includes the kernel version.
|
|
Packit Service |
dfccb1 |
dnl - To get around this problem, after include one of these we need to define the header guard
|
|
Packit Service |
dfccb1 |
dnl - for the other, to stop it being included as well.
|
|
Packit Service |
dfccb1 |
dnl - This is reported as a bug against ipset at https://bugzilla.netfilter.org/show_bug.cgi?id=1139
|
|
Packit Service |
dfccb1 |
dnl - We will take the kernel version if there is an inclusion collision.
|
|
Packit Service |
dfccb1 |
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
Packit Service |
dfccb1 |
#include <linux/netfilter/ipset/ip_set.h>
|
|
Packit Service |
dfccb1 |
#include <libipset/linux_ip_set.h>
|
|
Packit Service |
dfccb1 |
int main(void) {}
|
|
Packit Service |
dfccb1 |
]])], [],
|
|
Packit Service |
dfccb1 |
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
Packit Service |
dfccb1 |
#include <linux/netfilter/ipset/ip_set.h>
|
|
Packit Service |
dfccb1 |
#ifdef _UAPI_IP_SET_H
|
|
Packit Service |
dfccb1 |
#error _UAPI_IP_SET_H defined
|
|
Packit Service |
dfccb1 |
#endif
|
|
Packit Service |
dfccb1 |
int main(void) {}
|
|
Packit Service |
dfccb1 |
]])],
|
|
Packit Service |
dfccb1 |
[AC_DEFINE([LIBIPSET_H_ADD_UAPI_IP_SET_H_GUARD], [1], [Define to add guard _UAPI_IP_SET_H before including <libipset/linux_ip_set.h>])],
|
|
Packit Service |
dfccb1 |
[AC_DEFINE([LIBIPSET_H_ADD_IP_SET_H_GUARD], [1], [Define to add guard _IP_SET_H before including <libipset/linux_ip_set.h>])])
|
|
Packit Service |
dfccb1 |
])
|
|
Packit |
c22fc9 |
fi
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
if test $USE_LIBIPSET = Yes; then
|
|
Packit Service |
dfccb1 |
AC_MSG_CHECKING([for libipset version 7 or later])
|
|
Packit Service |
dfccb1 |
AC_COMPILE_IFELSE([AC_LANG_SOURCE(
|
|
Packit Service |
dfccb1 |
[[
|
|
Packit Service |
dfccb1 |
#include <libipset/session.h>
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
void test_func(void)
|
|
Packit Service |
dfccb1 |
{
|
|
Packit Service |
dfccb1 |
ipset_session_init(NULL, NULL);
|
|
Packit Service |
dfccb1 |
}
|
|
Packit Service |
dfccb1 |
]])],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_MSG_RESULT([yes])
|
|
Packit Service |
dfccb1 |
],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_MSG_RESULT([no])
|
|
Packit Service |
dfccb1 |
AC_DEFINE([LIBIPSET_PRE_V7_COMPAT], [ 1 ], [Define to 1 if libipset library version prior to v7])
|
|
Packit Service |
dfccb1 |
add_system_opt[LIBIPSET_PRE_V7]
|
|
Packit Service |
dfccb1 |
])
|
|
Packit |
c22fc9 |
fi
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
LIBS="$SAV_LIBS"
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
dnl -- XT_EXTENSION_MAXNAMELEN not defined until Linux 2.6.35
|
|
Packit Service |
dfccb1 |
AC_CHECK_DECL([XT_EXTENSION_MAXNAMELEN], [],
|
|
Packit Service |
dfccb1 |
[AC_DEFINE([XT_EXTENSION_MAXNAMELEN], [ (XT_FUNCTION_MAXNAMELEN - 1) ], [Define if <linux/netfilter/x_tables.h> doesnt define it])],
|
|
Packit Service |
dfccb1 |
[#include <linux/netfilter/x_tables.h>])
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
CPPFLAGS="$SAV_CPPFLAGS"
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit Service |
dfccb1 |
if test $USE_IPTABLES = Yes; then
|
|
Packit Service |
dfccb1 |
AC_DEFINE([_WITH_IPTABLES_], [ 1 ], [Define to 1 if want iptables support])
|
|
Packit Service |
dfccb1 |
add_system_opt([IPTABLES])
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
AM_CONDITIONAL([LIBIPSET], [test $USE_LIBIPSET = Yes])
|
|
Packit Service |
dfccb1 |
AM_CONDITIONAL([IPTABLES], [test $USE_IPTABLES = Yes])
|
|
Packit Service |
dfccb1 |
AM_CONDITIONAL([LIBIPTC_DYNAMIC], [test $USE_IPTABLES = Yes -a .$LIBIPTC_DYNAMIC = .Yes])
|
|
Packit Service |
dfccb1 |
AM_CONDITIONAL([LIBIPSET_DYNAMIC], [test $USE_LIBIPSET = Yes -a .${enable_libipset_dynamic} != .no])
|
|
Packit Service |
dfccb1 |
unset LIBS
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
dnl ----[Check for nftables libraries]----
|
|
Packit Service |
dfccb1 |
USE_NFTABLES=No
|
|
Packit Service |
dfccb1 |
if test .${enable_nftables} != .no; then
|
|
Packit Service |
dfccb1 |
USE_NFTABLES=Yes
|
|
Packit Service |
dfccb1 |
dnl -- linux/netfilter/nf_tables.h since Linux 3.13
|
|
Packit Service |
dfccb1 |
SAV_CPPFLAGS="$CPPFLAGS"
|
|
Packit Service |
dfccb1 |
CPPFLAGS="$CPPFLAGS $kernelinc"
|
|
Packit Service |
dfccb1 |
AC_CHECK_DECL([NFTA_TABLE_MAX], [],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AS_IF([test .${enable_nftables} = .yes], [AC_MSG_ERROR([nftables header files missing/not useable])])
|
|
Packit Service |
dfccb1 |
USE_NFTABLES=No
|
|
Packit Service |
dfccb1 |
],
|
|
Packit Service |
dfccb1 |
[#include <linux/netfilter/nf_tables.h>])
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
if test $USE_NFTABLES = Yes; then
|
|
Packit Service |
dfccb1 |
$PKG_CONFIG --exists libnftnl
|
|
Packit Service |
dfccb1 |
if test $? -ne 0; then
|
|
Packit Service |
dfccb1 |
USE_NFTABLES=No
|
|
Packit Service |
dfccb1 |
AC_MSG_WARN([libnftnl missing])
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit Service |
dfccb1 |
$PKG_CONFIG --exists libmnl
|
|
Packit Service |
dfccb1 |
if test $? -ne 0; then
|
|
Packit Service |
dfccb1 |
USE_NFTABLES=No
|
|
Packit Service |
dfccb1 |
AC_MSG_WARN([libmnl missing])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
if test $USE_NFTABLES = Yes; then
|
|
Packit Service |
dfccb1 |
# nft prior to version 0.8.3 does not support type ifname in sets. We can't check the version of
|
|
Packit Service |
dfccb1 |
# nft, but we can check the version of libnftnl. nft v0.8.3 required libnftnl v1.0.9, but so did
|
|
Packit Service |
dfccb1 |
# nft v0.8.2. So play safe, and require the next version.
|
|
Packit Service |
dfccb1 |
LIBNFTNL_VERSION=`printf "0x%2.2x%2.2x%2.2xU" \`pkg-config --modversion libnftnl | sed -e "s/\./ /g"\``
|
|
Packit Service |
dfccb1 |
AC_DEFINE_UNQUOTED([LIBNFTNL_VERSION], [ $LIBNFTNL_VERSION ], [libnftnl version in hex])
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
add_pkg_config([libnftnl])
|
|
Packit Service |
dfccb1 |
add_pkg_config([libmnl])
|
|
Packit Service |
dfccb1 |
AC_DEFINE([_WITH_NFTABLES_], [ 1 ], [Define to 1 if want nftables support])
|
|
Packit Service |
dfccb1 |
add_config_opt([NFTABLES])
|
|
Packit Service |
dfccb1 |
AC_MSG_CHECKING([whether NFTNL_EXPR_LOOKUP_FLAGS and NFT_LOOKUP_F_INV are defined])
|
|
Packit Service |
dfccb1 |
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
|
Packit Service |
dfccb1 |
#include <stdio.h> // libnftnl/expr.h requires this
|
|
Packit Service |
dfccb1 |
#include <libnftnl/expr.h>
|
|
Packit Service |
dfccb1 |
#include <linux/netfilter/nf_tables.h>
|
|
Packit Service |
dfccb1 |
int main(void)
|
|
Packit Service |
dfccb1 |
{
|
|
Packit Service |
dfccb1 |
int i = NFTNL_EXPR_LOOKUP_FLAGS | NFT_LOOKUP_F_INV;
|
|
Packit Service |
dfccb1 |
return 0;
|
|
Packit Service |
dfccb1 |
}
|
|
Packit Service |
dfccb1 |
]])], [
|
|
Packit Service |
dfccb1 |
AC_MSG_RESULT(yes)
|
|
Packit Service |
dfccb1 |
AC_DEFINE([HAVE_NFTNL_EXPR_LOOKUP_FLAG_INV], [ 1 ], [Define to 1 if NFTNL_EXPR_LOOKUP_FLAGS and NFT_LOOKUP_F_INV defined])
|
|
Packit Service |
dfccb1 |
],[
|
|
Packit Service |
dfccb1 |
AC_MSG_RESULT(no)
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
# nft dup from Linux 4.3
|
|
Packit Service |
dfccb1 |
AC_CHECK_DECLS([NFTA_DUP_MAX], [], [],
|
|
Packit Service |
dfccb1 |
[#include <linux/netfilter/nf_tables.h>])
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
# NFT_USERDATA_MAXLEN since Linux 3.15. Check nftnl_udata_buf_alloc for libnftnl support of userdata
|
|
Packit Service |
dfccb1 |
USE_NFT_USERDATA=Yes
|
|
Packit Service |
dfccb1 |
AC_CHECK_DECLS([NFT_USERDATA_MAXLEN, nftnl_udata_buf_alloc],
|
|
Packit Service |
dfccb1 |
[], [USE_NFT_USERDATA=No],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
#include <linux/netfilter/nf_tables.h>
|
|
Packit Service |
dfccb1 |
#include <libnftnl/udata.h>
|
|
Packit Service |
dfccb1 |
]
|
|
Packit Service |
dfccb1 |
)
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
AS_IF([test $USE_NFT_USERDATA = Yes],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_DEFINE([HAVE_NFTNL_UDATA], [ 1 ], [Define to 1 if have nftnl udata support])
|
|
Packit Service |
dfccb1 |
AC_CHECK_DECLS([nftnl_udata_put_u32],
|
|
Packit Service |
dfccb1 |
[], [],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
#include <linux/netfilter/nf_tables.h>
|
|
Packit Service |
dfccb1 |
#include <libnftnl/udata.h>
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit |
c22fc9 |
fi
|
|
Packit Service |
dfccb1 |
CPPFLAGS="$SAV_CPPFLAGS"
|
|
Packit |
c22fc9 |
fi
|
|
Packit Service |
dfccb1 |
AM_CONDITIONAL([NFTABLES], [test $USE_NFTABLES = Yes])
|
|
Packit |
c22fc9 |
unset LIBS
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
AS_IF([test $USE_IPTABLES = Yes -o $USE_NFTABLES = Yes], [AC_DEFINE([_WITH_FIREWALL_], [ 1 ], [Define to 1 if using iptables or nftables])])
|
|
Packit Service |
dfccb1 |
AM_CONDITIONAL([FIREWALL], [test $USE_IPTABLES = Yes -o $USE_NFTABLES = Yes])
|
|
Packit Service |
dfccb1 |
|
|
Packit |
c22fc9 |
dnl ----[Check if have linux/if.h and net/if.h namespace collision]----
|
|
Packit |
c22fc9 |
# Including <linux/if.h> and <net/if.h> can cause a namespace collision.
|
|
Packit |
c22fc9 |
# Later versions of the headers are OK if linux/if.h is included second
|
|
Packit |
c22fc9 |
AC_MSG_CHECKING([for linux/if.h and net/if.h namespace collision])
|
|
Packit |
c22fc9 |
SAV_CPPFLAGS="$CPPFLAGS"
|
|
Packit |
c22fc9 |
CPPFLAGS="$CPPFLAGS $kernelinc"
|
|
Packit |
c22fc9 |
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
Packit |
c22fc9 |
#include <linux/if.h>
|
|
Packit Service |
dfccb1 |
#include <net/if.h>
|
|
Packit |
c22fc9 |
]])],
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
AC_MSG_RESULT([no])
|
|
Packit |
c22fc9 |
],
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
AC_MSG_RESULT([yes])
|
|
Packit |
c22fc9 |
AC_DEFINE([_HAVE_NET_LINUX_IF_H_COLLISION_], [ 1 ], [Define to 1 if have linux/if.h followed by net/if.h namespace collision])
|
|
Packit |
c22fc9 |
add_system_opt([NET_LINUX_IF_H_COLLISION])
|
|
Packit |
c22fc9 |
])
|
|
Packit |
c22fc9 |
CPPFLAGS="$SAV_CPPFLAGS"
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
dnl ----[Check if linux/if_ether.h then netinet/in.h then linux/if.h namespace collision]----
|
|
Packit Service |
dfccb1 |
# This issue was resolved in Linux 4.15.7/4.16
|
|
Packit Service |
dfccb1 |
AC_MSG_CHECKING([for linux/if_ether.h then netinet/in.h then linux/if.h namespace collision])
|
|
Packit Service |
dfccb1 |
SAV_CPPFLAGS="$CPPFLAGS"
|
|
Packit Service |
dfccb1 |
CPPFLAGS="$CPPFLAGS $kernelinc"
|
|
Packit Service |
dfccb1 |
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
Packit Service |
dfccb1 |
#include <linux/if_ether.h>
|
|
Packit Service |
dfccb1 |
#include <netinet/in.h>
|
|
Packit Service |
dfccb1 |
#include <linux/in.h>
|
|
Packit Service |
dfccb1 |
]])],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_MSG_RESULT([no])
|
|
Packit Service |
dfccb1 |
],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_MSG_RESULT([yes])
|
|
Packit Service |
dfccb1 |
AC_DEFINE([_HAVE_LINUX_IF_ETHER_H_COLLISION_], [ 1 ], [Define to 1 if have linux/if_ether.h then netinet/in.h then linux/in.h namespace collision])
|
|
Packit Service |
dfccb1 |
add_system_opt([NET_LINUX_IF_ETHER_H_COLLISION])
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
CPPFLAGS="$SAV_CPPFLAGS"
|
|
Packit Service |
dfccb1 |
|
|
Packit |
c22fc9 |
dnl ----[Check if have linux/if_ether.h and netinet/if_ether.h namespace collision]----
|
|
Packit |
c22fc9 |
# Including <linux/if_ether.h> and <netinet/if_ether.h> causes a namespace collision
|
|
Packit |
c22fc9 |
# with musl libc, but the collision only occurs if linux/ip_ether.h is included
|
|
Packit |
c22fc9 |
# before netinet/if_ether.h. The problem is that we want to include them in that
|
|
Packit |
c22fc9 |
# order.
|
|
Packit |
c22fc9 |
AC_MSG_CHECKING([for linux/if_ether.h then netinet/if_ether.h namespace collision])
|
|
Packit |
c22fc9 |
SAV_CPPFLAGS="$CPPFLAGS"
|
|
Packit |
c22fc9 |
CPPFLAGS="$CPPFLAGS $kernelinc"
|
|
Packit |
c22fc9 |
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
Packit |
c22fc9 |
#include <linux/if_ether.h>
|
|
Packit |
c22fc9 |
#include <netinet/if_ether.h>
|
|
Packit |
c22fc9 |
]])],
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
AC_MSG_RESULT([no])
|
|
Packit |
c22fc9 |
],
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
AC_MSG_RESULT([yes])
|
|
Packit |
c22fc9 |
AC_DEFINE([_HAVE_NETINET_LINUX_IF_ETHER_H_COLLISION_], [ 1 ], [Define to 1 if have linux/if_ether.h then netinet/if_ether.h namespace collision])
|
|
Packit |
c22fc9 |
add_system_opt([NETINET_LINUX_IF_ETHER_H_COLLISION])
|
|
Packit |
c22fc9 |
])
|
|
Packit |
c22fc9 |
CPPFLAGS="$SAV_CPPFLAGS"
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
# Linux 4.5 to 4.5.4 has <libiptc/libiptc.h> indirectly including <net/if.h>
|
|
Packit |
c22fc9 |
# and <linux/if.h> which causes a namespace collision.
|
|
Packit |
c22fc9 |
AC_MSG_CHECKING([for libiptc/libiptc.h linux/if.h and net/if.h namespace collision])
|
|
Packit |
c22fc9 |
SAV_CPPFLAGS="$CPPFLAGS"
|
|
Packit |
c22fc9 |
CPPFLAGS="$CPPFLAGS $kernelinc"
|
|
Packit |
c22fc9 |
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
Packit |
c22fc9 |
#include <libiptc/libiptc.h>
|
|
Packit |
c22fc9 |
]])],
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
AC_MSG_RESULT([no])
|
|
Packit |
c22fc9 |
],
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
AC_MSG_RESULT([yes])
|
|
Packit |
c22fc9 |
AC_DEFINE([_HAVE_LIBIPTC_LINUX_NET_IF_H_COLLISION_], [ 1 ], [Define to 1 if have libiptc/libiptc.h linux/if.h and net/if.h namespace collision])
|
|
Packit |
c22fc9 |
add_system_opt([LIBIPTC_LINUX_NET_IF_H_COLLISION])
|
|
Packit |
c22fc9 |
])
|
|
Packit |
c22fc9 |
CPPFLAGS="$SAV_CPPFLAGS"
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ Checks for LVS, VRRP and BFD support ]----
|
|
Packit |
c22fc9 |
IPVS_SYNCD_ATTRIBUTES=No
|
|
Packit |
c22fc9 |
IPVS_64BIT_STATS=No
|
|
Packit |
c22fc9 |
WITH_REGEX=No
|
|
Packit |
c22fc9 |
ENABLE_REGEX_DEBUG=No
|
|
Packit |
c22fc9 |
if test "$enable_lvs" != no; then
|
|
Packit |
c22fc9 |
IPVS_SUPPORT=Yes
|
|
Packit |
c22fc9 |
add_config_opt([LVS])
|
|
Packit |
c22fc9 |
AC_DEFINE([_WITH_LVS_], [ 1 ], [Define to 1 if have IPVS support])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl -- <linux/ip_vs.h> exists from Linux 2.6.27; prior to that <net/ip_vs.h> is used
|
|
Packit |
c22fc9 |
AC_CHECK_HEADERS([linux/ip_vs.h],
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
dnl -- From Linux 2.6.35 (but CentOS has it in 2.6.32)
|
|
Packit |
c22fc9 |
AC_CHECK_DECLS([IP_VS_SVC_F_ONEPACKET], [], [],
|
|
Packit |
c22fc9 |
[[#include <linux/ip_vs.h>]])
|
|
Packit |
c22fc9 |
])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
if test $IPVS_USE_NL = Yes; then
|
|
Packit |
c22fc9 |
AC_DEFINE([LIBIPVS_USE_NL], [ 1 ], [Define to 1 if libipvs can use netlink])
|
|
Packit |
c22fc9 |
add_system_opt([LIBIPVS_NETLINK])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ IPVS syncd options ]---
|
|
Packit |
c22fc9 |
SAV_CPPFLAGS="$CPPFLAGS"
|
|
Packit |
c22fc9 |
CPPFLAGS="$CPPFLAGS $kernelinc"
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl -- Since Linux 3.18
|
|
Packit |
c22fc9 |
AC_CHECK_DECLS([IPVS_DEST_ATTR_ADDR_FAMILY], [add_system_opt([IPVS_DEST_ATTR_ADDR_FAMILY])], [], [#include <linux/ip_vs.h>])
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
dnl -- Since Linux 4.3
|
|
Packit |
c22fc9 |
IPVS_SYNCD_ATTRIBUTES=Yes
|
|
Packit |
c22fc9 |
AC_CHECK_DECLS([
|
|
Packit |
c22fc9 |
IPVS_DAEMON_ATTR_SYNC_MAXLEN,
|
|
Packit |
c22fc9 |
IPVS_DAEMON_ATTR_MCAST_GROUP,
|
|
Packit |
c22fc9 |
IPVS_DAEMON_ATTR_MCAST_GROUP6,
|
|
Packit |
c22fc9 |
IPVS_DAEMON_ATTR_MCAST_PORT,
|
|
Packit |
c22fc9 |
IPVS_DAEMON_ATTR_MCAST_TTL], [],
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
IPVS_SYNCD_ATTRIBUTES=No
|
|
Packit |
c22fc9 |
break
|
|
Packit |
c22fc9 |
],
|
|
Packit |
c22fc9 |
[[#include <linux/ip_vs.h>]])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
if test $IPVS_SYNCD_ATTRIBUTES = Yes; then
|
|
Packit |
c22fc9 |
AC_DEFINE([_HAVE_IPVS_SYNCD_ATTRIBUTES_], [ 1 ], [Define to 1 if have IPVS syncd attributes])
|
|
Packit |
c22fc9 |
add_system_opt([IPVS_SYNCD_ATTRIBUTES])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ IPVS 64-bit stats ]----
|
|
Packit |
c22fc9 |
dnl -- Since Linux 4.1
|
|
Packit |
c22fc9 |
if test "$enable_lvs_64bit_stats" != "no"; then
|
|
Packit |
c22fc9 |
IPVS_64BIT_STATS=Yes
|
|
Packit |
c22fc9 |
AC_CHECK_DECLS([
|
|
Packit |
c22fc9 |
IPVS_SVC_ATTR_STATS64,
|
|
Packit |
c22fc9 |
IPVS_DEST_ATTR_STATS64], [],
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
IPVS_64BIT_STATS=No
|
|
Packit |
c22fc9 |
break
|
|
Packit |
c22fc9 |
],
|
|
Packit |
c22fc9 |
[[#include <linux/ip_vs.h>]])
|
|
Packit |
c22fc9 |
if test $IPVS_64BIT_STATS = Yes; then
|
|
Packit |
c22fc9 |
AC_DEFINE([_WITH_LVS_64BIT_STATS_], [ 1 ], [Define to 1 if have IPVS 64 bit stats])
|
|
Packit |
c22fc9 |
add_system_opt([IPVS_64BIT_STATS])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
fi
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
dnl ----[ IPVS tunnel type ]----
|
|
Packit Service |
dfccb1 |
dnl -- Since Linux 5.2
|
|
Packit Service |
dfccb1 |
AC_CHECK_DECLS([IPVS_DEST_ATTR_TUN_TYPE],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_DEFINE([_HAVE_IPVS_TUN_TYPE_], [ 1 ], [Define to 1 if have IPVS tunnel type])
|
|
Packit Service |
dfccb1 |
add_system_opt([IPVS_TUN_TYPE])
|
|
Packit Service |
dfccb1 |
], [],
|
|
Packit Service |
dfccb1 |
[[#include <linux/ip_vs.h>]])
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
dnl -- Since Linux 5.3
|
|
Packit Service |
dfccb1 |
AC_CHECK_DECLS([IP_VS_TUNNEL_ENCAP_FLAG_NOCSUM],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_DEFINE([_HAVE_IPVS_TUN_CSUM_], [ 1 ], [Define to 1 if have IPVS tunnel checksum options])
|
|
Packit Service |
dfccb1 |
add_system_opt([IPVS_TUN_CSUM])
|
|
Packit Service |
dfccb1 |
], [],
|
|
Packit Service |
dfccb1 |
[[#include <linux/ip_vs.h>]])
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
dnl -- Since Linux 5.3
|
|
Packit Service |
dfccb1 |
AC_CHECK_DECLS([IP_VS_CONN_F_TUNNEL_TYPE_GRE],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_DEFINE([_HAVE_IPVS_TUN_GRE_], [ 1 ], [Define to 1 if have IPVS gre tunnel])
|
|
Packit Service |
dfccb1 |
add_system_opt([IPVS_TUN_GRE])
|
|
Packit Service |
dfccb1 |
], [],
|
|
Packit Service |
dfccb1 |
[[#include <linux/ip_vs.h>]])
|
|
Packit Service |
dfccb1 |
|
|
Packit |
c22fc9 |
CPPFLAGS="$SAV_CPPFLAGS"
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ Is HTTP_GET regex checking wanted? ]----
|
|
Packit |
c22fc9 |
AS_IF([test "$enable_regex" = yes],
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
$PKG_CONFIG --exists libpcre2-8
|
|
Packit |
c22fc9 |
HAVE_PCRE2=$?
|
|
Packit |
c22fc9 |
AS_IF([test $HAVE_PCRE2 -ne 0], [AC_MSG_ERROR([cannot find pcre library])])
|
|
Packit |
c22fc9 |
AC_MSG_CHECKING([for pcre.h])
|
|
Packit |
c22fc9 |
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
Packit Service |
dfccb1 |
#define PCRE2_CODE_UNIT_WIDTH 8
|
|
Packit Service |
dfccb1 |
#include <pcre2.h>
|
|
Packit Service |
dfccb1 |
]])],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit |
c22fc9 |
AC_MSG_RESULT([yes])
|
|
Packit Service |
dfccb1 |
WITH_REGEX=Yes
|
|
Packit |
c22fc9 |
add_pkg_config([libpcre2-8])
|
|
Packit Service |
dfccb1 |
AC_DEFINE([_WITH_REGEX_CHECK_], [ 1 ], [Define to 1 to build with HTTP_GET regex checking])
|
|
Packit |
c22fc9 |
add_config_opt([REGEX])
|
|
Packit Service |
dfccb1 |
],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_MSG_RESULT([no])
|
|
Packit |
c22fc9 |
AC_MSG_ERROR([pcre2.h is missing])
|
|
Packit Service |
dfccb1 |
])
|
|
Packit |
c22fc9 |
if test "$enable_regex_timers" = yes; then
|
|
Packit |
c22fc9 |
AC_DEFINE([_WITH_REGEX_TIMERS_], [ 1 ], [Define to 1 to include regex timers])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
if test "${enable_regex_debug}" = yes; then
|
|
Packit Service |
dfccb1 |
AC_DEFINE([_REGEX_DEBUG_], [ 1 ], [Define to 1 to build with regex debugging support])
|
|
Packit Service |
dfccb1 |
ENABLE_REGEX_DEBUG=Yes
|
|
Packit Service |
dfccb1 |
add_config_opt([REGEX_DEBUG])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
])
|
|
Packit |
c22fc9 |
else
|
|
Packit |
c22fc9 |
IPVS_SUPPORT=No
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
AM_CONDITIONAL([WITH_IPVS], [test $IPVS_SUPPORT = Yes])
|
|
Packit |
c22fc9 |
AM_CONDITIONAL([WITH_REGEX], [test $WITH_REGEX = Yes])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ Checks for kernel netlink support ]----
|
|
Packit |
c22fc9 |
VRRP_SUPPORT=No
|
|
Packit |
c22fc9 |
VRRP_AUTH_SUPPORT=No
|
|
Packit |
c22fc9 |
MACVLAN_SUPPORT=No
|
|
Packit |
c22fc9 |
ENABLE_JSON=No
|
|
Packit |
c22fc9 |
BFD_SUPPORT=No
|
|
Packit Service |
dfccb1 |
HAVE_CN_PROC=No
|
|
Packit |
c22fc9 |
if test "$enable_vrrp" != no; then
|
|
Packit |
c22fc9 |
VRRP_SUPPORT=Yes
|
|
Packit |
c22fc9 |
AC_DEFINE([_WITH_VRRP_], [ 1 ], [Define to 1 if have VRRP support])
|
|
Packit |
c22fc9 |
add_config_opt([VRRP])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ check for VRRP authentication support ]----
|
|
Packit |
c22fc9 |
if test "${enable_vrrp_auth}" != no; then
|
|
Packit |
c22fc9 |
VRRP_AUTH_SUPPORT=Yes
|
|
Packit |
c22fc9 |
AC_DEFINE([_WITH_VRRP_AUTH_], [ 1 ], [Define to 1 if want ARRP authentication support])
|
|
Packit |
c22fc9 |
add_config_opt([VRRP_AUTH])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ Checks for kernel VMAC support ]----
|
|
Packit |
c22fc9 |
SAV_CPPFLAGS="$CPPFLAGS"
|
|
Packit |
c22fc9 |
CPPFLAGS="$CPPFLAGS $kernelinc"
|
|
Packit Service |
dfccb1 |
MACVLAN_SUPPORT=No
|
|
Packit Service |
dfccb1 |
if test "${enable_vmac}" != no; then
|
|
Packit Service |
dfccb1 |
MACVLAN_SUPPORT=Yes
|
|
Packit Service |
dfccb1 |
dnl -- Since Linux 2.6.33
|
|
Packit Service |
dfccb1 |
AC_CHECK_DECLS([
|
|
Packit Service |
dfccb1 |
IFLA_MACVLAN_MODE,
|
|
Packit Service |
dfccb1 |
MACVLAN_MODE_PRIVATE], [],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
MACVLAN_SUPPORT=No
|
|
Packit Service |
dfccb1 |
break
|
|
Packit Service |
dfccb1 |
], [[
|
|
Packit Service |
dfccb1 |
#include <sys/socket.h>
|
|
Packit Service |
dfccb1 |
#include <linux/if_link.h>
|
|
Packit Service |
dfccb1 |
]])
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit |
c22fc9 |
if test $MACVLAN_SUPPORT = Yes; then
|
|
Packit |
c22fc9 |
AC_DEFINE([_HAVE_VRRP_VMAC_], [ 1 ], [Define to 1 if have MAC VLAN support])
|
|
Packit |
c22fc9 |
add_system_opt([VRRP_VMAC])
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
dnl ----[ Checks for kernel IPVLAN support ]----
|
|
Packit Service |
dfccb1 |
IPVLAN_SUPPORT=Yes
|
|
Packit Service |
dfccb1 |
dnl -- Since Linux 3.19
|
|
Packit Service |
dfccb1 |
AC_CHECK_DECLS([IFLA_IPVLAN_MODE], [],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
IPVLAN_SUPPORT=No
|
|
Packit Service |
dfccb1 |
break
|
|
Packit Service |
dfccb1 |
], [[
|
|
Packit Service |
dfccb1 |
#include <sys/socket.h>
|
|
Packit Service |
dfccb1 |
#include <linux/if_link.h>
|
|
Packit Service |
dfccb1 |
]])
|
|
Packit Service |
dfccb1 |
if test $IPVLAN_SUPPORT = Yes; then
|
|
Packit Service |
dfccb1 |
AC_DEFINE([_HAVE_VRRP_IPVLAN_], [ 1 ], [Define to 1 if have IP VLAN support])
|
|
Packit Service |
dfccb1 |
add_system_opt([VRRP_IPVLAN])
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
dnl ----[ Check for IFLA_LINK_NETNSID support ]---- since Linux v4.0
|
|
Packit Service |
dfccb1 |
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
Packit Service |
dfccb1 |
#include <linux/if_link.h>
|
|
Packit Service |
dfccb1 |
int main(void) { int var = IFLA_LINK_NETNSID; }
|
|
Packit Service |
dfccb1 |
]])],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_DEFINE([HAVE_IFLA_LINK_NETNSID], [ 1 ], [Define to 1 if IFLA_LINK_NETNSID supported])
|
|
Packit Service |
dfccb1 |
add_system_opt([IFLA_LINK_NETNSID])
|
|
Packit Service |
dfccb1 |
])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
CPPFLAGS="$SAV_CPPFLAGS"
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
dnl ----[ JSON output or not ? ]----
|
|
Packit |
c22fc9 |
if test "${enable_json}" = yes; then
|
|
Packit |
c22fc9 |
ENABLE_JSON=Yes
|
|
Packit Service |
dfccb1 |
AC_DEFINE([_WITH_JSON_], [ 1 ], [Define to 1 to build with JSON output support])
|
|
Packit |
c22fc9 |
add_config_opt([JSON])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ BFD support ? ]----
|
|
Packit |
c22fc9 |
if test "${enable_bfd}" = yes; then
|
|
Packit |
c22fc9 |
BFD_SUPPORT=Yes
|
|
Packit |
c22fc9 |
AC_DEFINE([_WITH_BFD_], [ 1 ], [Define to 1 if have BFD support])
|
|
Packit |
c22fc9 |
add_config_opt([BFD])
|
|
Packit |
c22fc9 |
fi
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
dnl -- Check for process events connector - Linux v2.6.15
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_track_process != .no],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
add_system_opt([CN_PROC])
|
|
Packit Service |
dfccb1 |
HAVE_CN_PROC=Yes
|
|
Packit Service |
dfccb1 |
AC_DEFINE([_WITH_CN_PROC_], [ 1 ], [Define to 1 if have linux/cn_proc.h and track-process not disabled])
|
|
Packit Service |
dfccb1 |
dnl -- PROC_EVENT_SID since Linux v2.6.32
|
|
Packit Service |
dfccb1 |
dnl -- PROC_EVENT_PTRACE since Linux v3.1
|
|
Packit Service |
dfccb1 |
dnl -- PROC_EVENT_COMM since Linux v3.2
|
|
Packit Service |
dfccb1 |
dnl -- PROC_EVENT_COREDUMP since Linux v3.10
|
|
Packit Service |
dfccb1 |
AC_CHECK_DECLS([PROC_EVENT_SID, PROC_EVENT_PTRACE, PROC_EVENT_COMM, PROC_EVENT_COREDUMP], [], [], [[#include <linux/cn_proc.h>]])
|
|
Packit Service |
dfccb1 |
],
|
|
Packit Service |
dfccb1 |
[add_config_opt([DISABLE_TRACK_PROCESS])])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
AM_CONDITIONAL([WITH_VRRP], [test $VRRP_SUPPORT = Yes])
|
|
Packit |
c22fc9 |
AM_CONDITIONAL([VRRP_AUTH], [test $VRRP_AUTH_SUPPORT = Yes])
|
|
Packit |
c22fc9 |
AM_CONDITIONAL([VMAC], [test $MACVLAN_SUPPORT = Yes])
|
|
Packit |
c22fc9 |
AM_CONDITIONAL([WITH_JSON], [test $ENABLE_JSON = Yes])
|
|
Packit |
c22fc9 |
AM_CONDITIONAL([WITH_BFD], [test $BFD_SUPPORT = Yes])
|
|
Packit Service |
dfccb1 |
AM_CONDITIONAL([CN_PROC], [test $HAVE_CN_PROC = Yes])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
if test ${IPVS_SUPPORT} = No -a ${VRRP_SUPPORT} = No; then
|
|
Packit |
c22fc9 |
AC_MSG_ERROR([keepalived MUST be compiled with at least one of LVS or VRRP framework])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ Checks for glibc SOCK_NONBLOCK support ]----
|
|
Packit |
c22fc9 |
# Introduced in Linux 2.6.27 and glibc 2.9
|
|
Packit |
c22fc9 |
AC_CHECK_DECLS([SOCK_NONBLOCK], [add_system_opt([SOCK_NONBLOCK])], [],[[#include <sys/socket.h>]])
|
|
Packit |
c22fc9 |
AM_CONDITIONAL([SOCK_NONBLOCK], [test $ac_cv_have_decl_SOCK_NONBLOCK = yes])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ Checks for glibc SOCK_CLOEXEC support ]----
|
|
Packit |
c22fc9 |
# Introduced in Linux 2.6.27 and glibc 2.9
|
|
Packit |
c22fc9 |
AC_CHECK_DECLS([SOCK_CLOEXEC], [add_system_opt([SOCK_CLOEXEC])], [],[[#include <sys/socket.h>]])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ Checks for pe support ]----
|
|
Packit |
c22fc9 |
# Introduced in Linux 2.6.37
|
|
Packit |
c22fc9 |
AC_CHECK_DECL([IPVS_SVC_ATTR_PE_NAME],
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
AC_DEFINE([_HAVE_PE_NAME_], [ 1 ], [Define to 1 if have pe selection support])
|
|
Packit |
c22fc9 |
],
|
|
Packit |
c22fc9 |
[], [[#include <linux/ip_vs.h>]])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ Checks for O_PATH support ]----
|
|
Packit |
c22fc9 |
# Introduced in Linux 2.6.39
|
|
Packit Service |
dfccb1 |
SAV_CPPFLAGS="$CPPFLAGS"
|
|
Packit Service |
dfccb1 |
CPPFLAGS="$CPPFLAGS $kernel_inc -D_GNU_SOURCE"
|
|
Packit |
c22fc9 |
AC_CHECK_DECLS([O_PATH],
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
add_system_opt([O_PATH])
|
|
Packit |
c22fc9 |
], [],[[#include <fcntl.h>]])
|
|
Packit Service |
dfccb1 |
CPPFLAGS="$SAV_CPPFLAGS"
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ Check for GLOB_BRACE support ]----
|
|
Packit |
c22fc9 |
AC_CHECK_DECLS([GLOB_BRACE], [add_system_opt([GLOB_BRACE])], [], [[#include <glob.h>]])
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
dnl ----[ Check for timegm() support ]----
|
|
Packit Service |
dfccb1 |
AC_MSG_CHECKING([for timegm()])
|
|
Packit Service |
dfccb1 |
SAV_CPPFLAGS="$CPPFLAGS"
|
|
Packit Service |
dfccb1 |
CPPFLAGS="$KA_CPPFLAGS $kernel_inc"
|
|
Packit Service |
dfccb1 |
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
|
Packit Service |
dfccb1 |
#include <time.h>
|
|
Packit Service |
dfccb1 |
int main(void)
|
|
Packit Service |
dfccb1 |
{
|
|
Packit Service |
dfccb1 |
timegm(NULL);
|
|
Packit Service |
dfccb1 |
return 0;
|
|
Packit Service |
dfccb1 |
}
|
|
Packit Service |
dfccb1 |
]])], [
|
|
Packit Service |
dfccb1 |
AC_MSG_RESULT(yes)
|
|
Packit Service |
dfccb1 |
AC_DEFINE([HAVE_TIMEGM], [ 1 ], [Define to 1 if have timegm()])
|
|
Packit Service |
dfccb1 |
],[
|
|
Packit Service |
dfccb1 |
AC_MSG_RESULT(no)
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
CPPFLAGS="$SAV_CPPFLAGS"
|
|
Packit Service |
dfccb1 |
|
|
Packit |
c22fc9 |
dnl ----[ Do we want v1.3.6 and earlier VRRPv3 unicast checksum compatibility support ]----
|
|
Packit |
c22fc9 |
UNICAST_CHKSUM_COMPAT_SUPPORT=No
|
|
Packit |
c22fc9 |
if test .$enable_checksum_compat != .no; then
|
|
Packit |
c22fc9 |
UNICAST_CHKSUM_COMPAT_SUPPORT=Yes
|
|
Packit |
c22fc9 |
AC_DEFINE([_WITH_UNICAST_CHKSUM_COMPAT_], [ 1 ], [Define to 1 to enable v1.3.6 and earlier VRRPv3 unicast checksum compatibility])
|
|
Packit |
c22fc9 |
add_config_opt([OLD_CHKSUM_COMPAT])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ Checks for FIB routing support ]----
|
|
Packit |
c22fc9 |
FIB_ROUTING_SUPPORT=No
|
|
Packit |
c22fc9 |
if test .$enable_vrrp != .no -a .$enable_routes != .no; then
|
|
Packit |
c22fc9 |
# Introduced in Linux 2.6.19
|
|
Packit |
c22fc9 |
SAV_CPPFLAGS="$CPPFLAGS"
|
|
Packit |
c22fc9 |
CPPFLAGS="$CPPFLAGS $kernelinc"
|
|
Packit |
c22fc9 |
AC_CHECK_DECL([FRA_SRC],
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
FIB_ROUTING_SUPPORT=Yes
|
|
Packit |
c22fc9 |
AC_DEFINE([_HAVE_FIB_ROUTING_], [ 1 ], [Define to 1 if have FIB routing support])
|
|
Packit |
c22fc9 |
add_config_opt([FIB_ROUTING])
|
|
Packit |
c22fc9 |
], [],
|
|
Packit |
c22fc9 |
[[#include <sys/socket.h>
|
|
Packit |
c22fc9 |
#include <linux/fib_rules.h>]])
|
|
Packit |
c22fc9 |
CPPFLAGS="$SAV_CPPFLAGS"
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
AM_CONDITIONAL([FIB_ROUTING], [test $FIB_ROUTING_SUPPORT = Yes])
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
dnl ----[ Check if linkbeat wanted ]----
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_linkbeat = .no],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
LINKBEAT_SUPPORT=No
|
|
Packit Service |
dfccb1 |
add_config_opt([NO_LINKBEAT])
|
|
Packit Service |
dfccb1 |
],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
LINKBEAT_SUPPORT=Yes
|
|
Packit Service |
dfccb1 |
AC_DEFINE([_WITH_LINKBEAT_], [ 1 ], [Define to 1 if have linkbeat support])
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
|
|
Packit |
c22fc9 |
dnl ----[ Checks for kernel IFLA_INET6_ADDR_GEN_MODE support ]----
|
|
Packit |
c22fc9 |
SAV_CPPFLAGS="$CPPFLAGS"
|
|
Packit |
c22fc9 |
CPPFLAGS="$CPPFLAGS $kernelinc"
|
|
Packit |
c22fc9 |
if test ${MACVLAN_SUPPORT} = Yes; then
|
|
Packit |
c22fc9 |
# Introduced in Linux 3.17
|
|
Packit |
c22fc9 |
AC_CHECK_DECLS([IFLA_INET6_ADDR_GEN_MODE],
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
add_system_opt([INET6_ADDR_GEN_MODE])
|
|
Packit |
c22fc9 |
], [], [[
|
|
Packit |
c22fc9 |
#include <linux/if_link.h>
|
|
Packit |
c22fc9 |
]])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
CPPFLAGS="$SAV_CPPFLAGS"
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ Checks for kernel IFLA_VRF_... support ]----
|
|
Packit |
c22fc9 |
if test ${MACVLAN_SUPPORT} = Yes; then
|
|
Packit Service |
dfccb1 |
SAV_CPPFLAGS="$CPPFLAGS"
|
|
Packit Service |
dfccb1 |
CPPFLAGS="$CPPFLAGS $kernelinc"
|
|
Packit Service |
dfccb1 |
|
|
Packit |
c22fc9 |
# Introduced in Linux 4.3
|
|
Packit |
c22fc9 |
AC_CHECK_DECLS([IFLA_VRF_MAX],
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
add_system_opt([VRF])
|
|
Packit |
c22fc9 |
AC_DEFINE([_HAVE_VRF_], [ 1 ], [Define to 1 if have kernel VRF support])
|
|
Packit |
c22fc9 |
], [], [[
|
|
Packit |
c22fc9 |
#include <linux/if_link.h>
|
|
Packit |
c22fc9 |
]])
|
|
Packit Service |
dfccb1 |
CPPFLAGS="$SAV_CPPFLAGS"
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ Checks for SNMP support ]----
|
|
Packit |
c22fc9 |
SNMP_SUPPORT=No
|
|
Packit |
c22fc9 |
SNMP_KEEPALIVED_SUPPORT=No
|
|
Packit |
c22fc9 |
SNMP_VRRP_SUPPORT=No
|
|
Packit |
c22fc9 |
SNMP_RFC_SUPPORT=No
|
|
Packit |
c22fc9 |
SNMP_RFCV2_SUPPORT=No
|
|
Packit |
c22fc9 |
SNMP_RFCV3_SUPPORT=No
|
|
Packit |
c22fc9 |
SNMP_CHECKER_SUPPORT=No
|
|
Packit |
c22fc9 |
SNMP_V3_FOR_V2=No
|
|
Packit |
c22fc9 |
if test "$enable_snmp_keepalived" = yes; then
|
|
Packit |
c22fc9 |
AC_MSG_WARN([--enable-snmp-keepalived is obsolete. Use --enable-snmp-vrrp.])
|
|
Packit |
c22fc9 |
enable_snmp_vrrp=$enable_snmp_keepalived
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
if test "$enable_snmp" = yes -o \
|
|
Packit |
c22fc9 |
"$enable_snmp_vrrp" = yes -o \
|
|
Packit |
c22fc9 |
"$enable_snmp_checker" = yes -o \
|
|
Packit |
c22fc9 |
"$enable_snmp_rfc" = yes -o \
|
|
Packit |
c22fc9 |
"$enable_snmp_rfcv2" = yes -o \
|
|
Packit |
c22fc9 |
"$enable_snmp_rfcv3" = yes; then
|
|
Packit |
c22fc9 |
AC_PATH_TOOL([NETSNMP_CONFIG], [net-snmp-config], [no])
|
|
Packit |
c22fc9 |
if test "$NETSNMP_CONFIG" = no; then
|
|
Packit |
c22fc9 |
AC_MSG_ERROR([*** unable to find net-snmp-config])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
NETSNMP_LIBS_AGENT=`${NETSNMP_CONFIG} --netsnmp-agent-libs`
|
|
Packit |
c22fc9 |
NETSNMP_LIBS_EXT=`${NETSNMP_CONFIG} --external-libs`
|
|
Packit |
c22fc9 |
NETSNMP_LIBS="$NETSNMP_LIBS_AGENT $NETSNMP_LIBS_EXT"
|
|
Packit Service |
dfccb1 |
NETSNMP_CFLAGS="`${NETSNMP_CONFIG} --base-cflags`"
|
|
Packit Service |
dfccb1 |
NETSNMP_CPPFLAGS="-DNETSNMP_NO_INLINE"
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
# net-snmp-config can add -I/usr/include, so remove it
|
|
Packit Service |
dfccb1 |
NETSNMP_CFLAGS=`echo $NETSNMP_CFLAGS " " | sed -e "s:-I */usr/include ::"`
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
# net-snmp-config adds compiler and linker options that were set at the time
|
|
Packit |
c22fc9 |
# net-snmp was built, and this can include spec files that may not exist
|
|
Packit |
c22fc9 |
# on the system building keepalived. We need to check if any spec files
|
|
Packit |
c22fc9 |
# are specified, and if they do not exist on this system, then remove them
|
|
Packit |
c22fc9 |
# from NETSNMP_LIBS or NETSNMP_CFLAGS.
|
|
Packit |
c22fc9 |
# For further information, see https://bugzilla.redhat.com/show_bug.cgi?id=1544527
|
|
Packit |
c22fc9 |
# and the other bugs referred to in it.
|
|
Packit |
c22fc9 |
for spec in `echo $NETSNMP_LIBS | sed -e "s? ?\n?g" | grep "^-specs="`; do
|
|
Packit Service |
dfccb1 |
SPEC_FILE=`echo $spec | sed -e "s?^-specs=??"`
|
|
Packit |
c22fc9 |
if test ! -f $SPEC_FILE; then
|
|
Packit |
c22fc9 |
NETSNMP_LIBS=`echo $NETSNMP_LIBS | sed -e "s? *$spec *? ?"`
|
|
Packit |
c22fc9 |
AC_MSG_WARN([Removing $spec from NETSNMP_LIBS since spec file not installed])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
done
|
|
Packit |
c22fc9 |
for spec in `echo $NETSNMP_CFLAGS | sed -e "s? ?\n?g" | grep "^-specs="`; do
|
|
Packit Service |
dfccb1 |
SPEC_FILE=`echo $spec | sed -e "s?^-specs=??"`
|
|
Packit |
c22fc9 |
if test ! -f $SPEC_FILE; then
|
|
Packit |
c22fc9 |
NETSNMP_CFLAGS=`echo $NETSNMP_CFLAGS | sed -e "s? *$spec *? ?"`
|
|
Packit |
c22fc9 |
AC_MSG_WARN([Removing $spec from NETSNMP_CFLAGS since spec file not installed])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
done
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
SAV_CFLAGS="$CFLAGS"
|
|
Packit |
c22fc9 |
CFLAGS="$CFLAGS ${NETSNMP_CFLAGS}"
|
|
Packit |
c22fc9 |
SAV_LIBS="$LIBS"
|
|
Packit |
c22fc9 |
LIBS="$LIBS ${NETSNMP_LIBS}"
|
|
Packit |
c22fc9 |
AC_MSG_CHECKING([whether C compiler supports flag "${NETSNMP_CFLAGS} ${NETSNMP_LIBS}" from Net-SNMP])
|
|
Packit |
c22fc9 |
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
|
Packit |
c22fc9 |
int main(void)
|
|
Packit |
c22fc9 |
{
|
|
Packit |
c22fc9 |
return 0;
|
|
Packit |
c22fc9 |
}
|
|
Packit |
c22fc9 |
]])], [
|
|
Packit |
c22fc9 |
AC_MSG_RESULT(yes)
|
|
Packit |
c22fc9 |
],[
|
|
Packit |
c22fc9 |
AC_MSG_RESULT(no)
|
|
Packit |
c22fc9 |
AC_MSG_ERROR([*** incorrect CFLAGS from net-snmp-config])
|
|
Packit |
c22fc9 |
])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
# Do we have subagent support?
|
|
Packit |
c22fc9 |
AC_CHECK_FUNCS([netsnmp_enable_subagent], [],
|
|
Packit |
c22fc9 |
[AC_MSG_ERROR([*** no subagent support in net-snmp])])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
# check for net-snmp headers
|
|
Packit |
c22fc9 |
# Some ancient distributions may miss <net-snmp/agent/util_funcs.h> header
|
|
Packit |
c22fc9 |
SAV_CPPFLAGS="$CPPFLAGS"
|
|
Packit Service |
dfccb1 |
CPPFLAGS="$CPPFLAGS $kernel_inc $NETSNMP_CFLAGS"
|
|
Packit |
c22fc9 |
AC_CHECK_HEADERS(net-snmp/agent/agent_sysORTable.h net-snmp/agent/snmp_vars.h net-snmp/agent/util_funcs.h,[],
|
|
Packit |
c22fc9 |
[AC_MSG_ERROR([missing net-snmp headers])],[[
|
|
Packit |
c22fc9 |
#include <net-snmp/net-snmp-config.h>
|
|
Packit |
c22fc9 |
#include <net-snmp/net-snmp-includes.h>
|
|
Packit |
c22fc9 |
#include <net-snmp/agent/net-snmp-agent-includes.h>
|
|
Packit |
c22fc9 |
]])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
SNMP_SUPPORT=Yes
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
# NETSNMP_CFLAGS can have CPPFLAGS options, so separate them
|
|
Packit Service |
dfccb1 |
NETSNMP_CPPFLAGS_XTRA=`echo " $NETSNMP_CFLAGS " | sed -e "s/ / /g" -e "s/ -[[^IDU]] *-/ -/g" -e "s/ -[[^IDU]] *[[^-]][[^ ]]* / /g" -e "s/ */ /g"`
|
|
Packit Service |
dfccb1 |
NETSNMP_CFLAGS=`echo " $NETSNMP_CFLAGS " | sed -e "s/ / /g" -e "s/ -[[IDU]] *[[^ ]]* / /g" -e "s/ */ /g"`
|
|
Packit |
c22fc9 |
add_to_var([KA_CFLAGS], [$NETSNMP_CFLAGS])
|
|
Packit Service |
dfccb1 |
add_to_var([KA_CPPFLAGS], [$NETSNMP_CPPFLAGS $NETSNMP_CPPFLAGS_XTRA])
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
# NETSNMP_LIBS may have some LDFLAGS options, so separate them
|
|
Packit Service |
dfccb1 |
NETSNMP_LDFLAGS_XTRA=`echo " $NETSNMP_LIBS " | sed -e "s/ / /g" -e "s/ -l *[[^ ]]* / /g" -e "s/ */ /g" -e "s/ -/ @-/g" | tr "@" "\n" | sed -e "s/^ *//" -e "s/ *$//" | sort -u | tr "\n" " "`
|
|
Packit Service |
dfccb1 |
NETSNMP_LIBS=`echo " $NETSNMP_LIBS " | sed -e "s/ / /g" -e "s/ \(-l *[[^ ]]*\) /@\1@/g" | tr "@" "\n" | grep "^-l" | tr "\n" " " | sed -e "s/ */ /g"`
|
|
Packit Service |
dfccb1 |
add_to_var([KA_LDFLAGS], [$NETSNMP_LDFLAGS $NETSNMP_LDFLAGS_XTRA])
|
|
Packit |
c22fc9 |
add_to_var([KA_LIBS], [$NETSNMP_LIBS])
|
|
Packit Service |
dfccb1 |
|
|
Packit |
c22fc9 |
if test "$enable_snmp_rfc" = yes; then
|
|
Packit |
c22fc9 |
SNMP_RFCV2_SUPPORT=Yes
|
|
Packit |
c22fc9 |
SNMP_RFCV3_SUPPORT=Yes
|
|
Packit |
c22fc9 |
else
|
|
Packit |
c22fc9 |
if test "$enable_snmp_rfcv2" = yes; then
|
|
Packit |
c22fc9 |
SNMP_RFCV2_SUPPORT=Yes
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
if test "$enable_snmp_rfcv3" = yes; then
|
|
Packit |
c22fc9 |
SNMP_RFCV3_SUPPORT=Yes
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
if test ${SNMP_RFCV2_SUPPORT} = Yes -o \
|
|
Packit |
c22fc9 |
${SNMP_RFCV3_SUPPORT} = Yes; then
|
|
Packit |
c22fc9 |
if test ${VRRP_SUPPORT} != Yes; then
|
|
Packit |
c22fc9 |
AC_MSG_ERROR([RFC SNMP support requires VRRP])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
SNMP_RFC_SUPPORT=Yes
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
if test ${SNMP_RFCV3_SUPPORT} = Yes -a \
|
|
Packit |
c22fc9 |
"$enable_snmp_reply_v3_for_v2" != no; then
|
|
Packit Service |
dfccb1 |
AC_DEFINE([_SNMP_REPLY_V3_FOR_V2_], [ 1 ], [Define to 1 to have keepalived send RFC6527 SNMP responses for VRRPv2 instances])
|
|
Packit |
c22fc9 |
SNMP_V3_FOR_V2=Yes
|
|
Packit |
c22fc9 |
add_config_opt([SNMP_V3_FOR_V2])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
if test "$enable_snmp" = yes; then
|
|
Packit Service |
dfccb1 |
if test ${VRRP_SUPPORT} = Yes; then
|
|
Packit Service |
dfccb1 |
SNMP_VRRP_SUPPORT=Yes
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit Service |
dfccb1 |
if test ${IPVS_SUPPORT} = Yes; then
|
|
Packit Service |
dfccb1 |
SNMP_CHECKER_SUPPORT=Yes
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit |
c22fc9 |
else
|
|
Packit |
c22fc9 |
if test "$enable_snmp_vrrp" = yes; then
|
|
Packit |
c22fc9 |
SNMP_VRRP_SUPPORT=Yes
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
if test "$enable_snmp_checker" = yes; then
|
|
Packit |
c22fc9 |
SNMP_CHECKER_SUPPORT=Yes
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
if test ${VRRP_SUPPORT} != Yes -a \
|
|
Packit |
c22fc9 |
${SNMP_VRRP_SUPPORT} = Yes; then
|
|
Packit |
c22fc9 |
AC_MSG_ERROR([VRRP SNMP support requires VRRP])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
if test ${IPVS_SUPPORT} = No -a \
|
|
Packit |
c22fc9 |
${SNMP_CHECKER_SUPPORT} = Yes; then
|
|
Packit |
c22fc9 |
AC_MSG_ERROR([CHECKER SNMP support requires checker])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
if test ${SNMP_VRRP_SUPPORT} = Yes -o \
|
|
Packit |
c22fc9 |
${SNMP_CHECKER_SUPPORT} = Yes; then
|
|
Packit |
c22fc9 |
SNMP_KEEPALIVED_SUPPORT=Yes
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
CPPFLAGS="$SAV_CPPFLAGS"
|
|
Packit |
c22fc9 |
CFLAGS="$SAV_CFLAGS"
|
|
Packit |
c22fc9 |
LIBS="$SAV_LIBS"
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[What SNMP support is required]----
|
|
Packit |
c22fc9 |
if test $SNMP_SUPPORT = Yes; then
|
|
Packit |
c22fc9 |
AC_DEFINE([_WITH_SNMP_], [ 1 ], [Define to 1 to have SNMP support])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
if test $SNMP_KEEPALIVED_SUPPORT = Yes; then
|
|
Packit |
c22fc9 |
AC_DEFINE([_WITH_SNMP_KEEPALIVED_], [ 1 ], [Define to 1 to have keepalived SNMP support])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
if test $SNMP_VRRP_SUPPORT = Yes; then
|
|
Packit |
c22fc9 |
AC_DEFINE([_WITH_SNMP_VRRP_], [ 1 ], [Define to 1 to have keepalived SNMP VRRP support])
|
|
Packit |
c22fc9 |
add_config_opt([SNMP_VRRP])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
if test $SNMP_CHECKER_SUPPORT = Yes; then
|
|
Packit |
c22fc9 |
AC_DEFINE([_WITH_SNMP_CHECKER_], [ 1 ], [Define to 1 to have keepalived SNMP checker support])
|
|
Packit |
c22fc9 |
add_config_opt([SNMP_CHECKER])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
if test $SNMP_RFC_SUPPORT = Yes; then
|
|
Packit |
c22fc9 |
AC_DEFINE([_WITH_SNMP_RFC_], [ 1 ], [Define to 1 to have RFC SNMP support])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
if test $SNMP_RFCV2_SUPPORT = Yes; then
|
|
Packit |
c22fc9 |
AC_DEFINE([_WITH_SNMP_RFCV2_], [ 1 ], [Define to 1 to have RFCv2 SNMP support])
|
|
Packit |
c22fc9 |
add_config_opt([SNMP_RFCV2])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
if test $SNMP_RFCV3_SUPPORT = Yes; then
|
|
Packit |
c22fc9 |
AC_DEFINE([_WITH_SNMP_RFCV3_], [ 1 ], [Define to 1 to have RFCv3 SNMP support])
|
|
Packit |
c22fc9 |
add_config_opt([SNMP_RFCV3])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
AM_CONDITIONAL([SNMP], [test $SNMP_SUPPORT = Yes])
|
|
Packit |
c22fc9 |
AM_CONDITIONAL([SNMP_KEEPALIVED], [test $SNMP_KEEPALIVED_SUPPORT = Yes])
|
|
Packit |
c22fc9 |
AM_CONDITIONAL([SNMP_VRRP], [test $SNMP_VRRP_SUPPORT = Yes -o $SNMP_RFC_SUPPORT = Yes])
|
|
Packit |
c22fc9 |
AM_CONDITIONAL([SNMP_CHECKER], [test $SNMP_CHECKER_SUPPORT = Yes])
|
|
Packit |
c22fc9 |
AM_CONDITIONAL([SNMP_RFC], [test $SNMP_RFCV2_SUPPORT = Yes -o $SNMP_RFCV3_SUPPORT = Yes])
|
|
Packit |
c22fc9 |
AM_CONDITIONAL([SNMP_RFCV2], [test $SNMP_RFCV2_SUPPORT = Yes])
|
|
Packit |
c22fc9 |
AM_CONDITIONAL([SNMP_RFCV3], [test $SNMP_RFCV3_SUPPORT = Yes])
|
|
Packit |
c22fc9 |
AM_CONDITIONAL([SNMP_REPLY_V3_FOR_V2], [test $SNMP_V3_FOR_V2 = Yes])
|
|
Packit Service |
dfccb1 |
AS_IF([test $SNMP_SUPPORT = Yes], [SNMP_SERVICE=snmpd.service], [SNMP_SERVICE=])
|
|
Packit Service |
dfccb1 |
AC_SUBST([SNMP_SERVICE])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ Check for Dbus support ]----
|
|
Packit |
c22fc9 |
DBUS_SUPPORT=No
|
|
Packit |
c22fc9 |
DBUS_CREATE_INSTANCE=No
|
|
Packit |
c22fc9 |
if test "$enable_dbus" = yes; then
|
|
Packit |
c22fc9 |
AC_CHECK_LIB(gio-2.0, g_bus_own_name,
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
add_pkg_config([gio-2.0])
|
|
Packit |
c22fc9 |
DBUS_SUPPORT=Yes
|
|
Packit |
c22fc9 |
AC_DEFINE([_WITH_DBUS_], [ 1 ], [Define to 1 to have DBUS support])
|
|
Packit |
c22fc9 |
add_config_opt([DBUS])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl -- g_type_init() not needed and deprecated since glib 2.36
|
|
Packit Service |
dfccb1 |
SAV_CFLAGS=$CFLAGS
|
|
Packit |
c22fc9 |
CFLAGS="$($PKG_CONFIG --cflags gio-2.0)"
|
|
Packit Service |
dfccb1 |
SAV_LIBS=$LIBS
|
|
Packit |
c22fc9 |
LIBS="$($PKG_CONFIG --libs gio-2.0)"
|
|
Packit |
c22fc9 |
AC_RUN_IFELSE(
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
AC_LANG_PROGRAM(
|
|
Packit |
c22fc9 |
[[#include <gio/gio.h>]],
|
|
Packit |
c22fc9 |
[[return !g_thread_functions_for_glib_use.mutex_lock;]])],
|
|
Packit |
c22fc9 |
[need_g_type_init=0],
|
|
Packit |
c22fc9 |
[need_g_type_init=1],
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
AC_MSG_WARN([Cannot determine if need to call g_type_init(). Assuming yes for safety.])
|
|
Packit |
c22fc9 |
need_g_type_init=1
|
|
Packit |
c22fc9 |
])
|
|
Packit |
c22fc9 |
if test $need_g_type_init -eq 1; then
|
|
Packit |
c22fc9 |
AC_DEFINE([DBUS_NEED_G_TYPE_INIT], [ 1 ], [Define to 1 if need to call g_type_init()])
|
|
Packit |
c22fc9 |
fi
|
|
Packit Service |
dfccb1 |
LIBS=$SAV_LIBS
|
|
Packit Service |
dfccb1 |
CFLAGS=$SAV_CFLAGS
|
|
Packit |
c22fc9 |
if test "$enable_dbus_create_instance" = yes; then
|
|
Packit |
c22fc9 |
AC_DEFINE([_WITH_DBUS_CREATE_INSTANCE_], [ 1 ], [Define to 1 to have DBus create instance support])
|
|
Packit |
c22fc9 |
DBUS_CREATE_INSTANCE=Yes
|
|
Packit |
c22fc9 |
add_config_opt([DBUS_CREATE_INSTANCE])
|
|
Packit |
c22fc9 |
AC_MSG_WARN([DBus create instance functionality is dangerous - why do you want it?])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
],
|
|
Packit |
c22fc9 |
[AC_MSG_ERROR([DBUS support requested but libgio-2.0 not found.])])
|
|
Packit Service |
dfccb1 |
unset LIBS
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
AM_CONDITIONAL([WITH_DBUS], [test $DBUS_SUPPORT = Yes])
|
|
Packit |
c22fc9 |
AM_CONDITIONAL([DBUS_CREATE_INSTANCE], [test $DBUS_CREATE_INSTANCE = Yes])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ SHA1 or not ? ]----
|
|
Packit |
c22fc9 |
SHA1_SUPPORT=No
|
|
Packit |
c22fc9 |
if test "${enable_sha1}" = yes; then
|
|
Packit |
c22fc9 |
AC_CHECK_HEADERS(openssl/sha.h,,AC_MSG_ERROR([unable to find openssl/sha.h]))
|
|
Packit |
c22fc9 |
AC_CHECK_LIB(crypto, SHA1_Init,,
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
dnl libcrypto can require -fpic
|
|
Packit |
c22fc9 |
AS_UNSET([ac_cv_lib_crypto_SHA1_Init])
|
|
Packit |
c22fc9 |
SAV_CFLAGS=$CFLAGS
|
|
Packit Service |
dfccb1 |
CFLAGS="$CFLAGS -fpic"
|
|
Packit |
c22fc9 |
AC_CHECK_LIB(crypto, SHA1_Init,,AC_MSG_ERROR([SHA1 in OpenSSL required]))
|
|
Packit |
c22fc9 |
CFLAGS=$SAV_CFLAGS
|
|
Packit |
c22fc9 |
add_to_var([KA_CFLAGS],[-fpic])
|
|
Packit |
c22fc9 |
])
|
|
Packit |
c22fc9 |
SHA1_SUPPORT=Yes
|
|
Packit |
c22fc9 |
AC_DEFINE([_WITH_SHA1_], [ 1 ], [Define to 1 to have SHA1 support])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
AM_CONDITIONAL([WITH_SHA1], [test $SHA1_SUPPORT = Yes])
|
|
Packit Service |
dfccb1 |
unset LIBS
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ check for SO_MARK support ]----
|
|
Packit Service |
dfccb1 |
dnl -- Since Linux 2.6.25
|
|
Packit |
c22fc9 |
SO_MARK_SUPPORT=No
|
|
Packit |
c22fc9 |
if test "${enable_fwmark}" != no; then
|
|
Packit |
c22fc9 |
AC_CHECK_DECLS([SO_MARK],
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
SO_MARK_SUPPORT=Yes
|
|
Packit |
c22fc9 |
AC_DEFINE([_WITH_SO_MARK_], [ 1 ], [Define to 1 if have SO_MARK])
|
|
Packit |
c22fc9 |
add_system_opt([SO_MARK])
|
|
Packit |
c22fc9 |
], [],
|
|
Packit |
c22fc9 |
[[#include <sys/socket.h>]])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ---[ check for setns() ]----
|
|
Packit |
c22fc9 |
dnl -- CLONE_NEWNET defined from Linux 3.0
|
|
Packit |
c22fc9 |
SAV_CFLAGS="$CFLAGS"
|
|
Packit |
c22fc9 |
AC_CHECK_DECLS([CLONE_NEWNET], [], [], [[#include <sched.h>]])
|
|
Packit |
c22fc9 |
dnl -- From glibc 2.14. Otherwise use setns syscall, since Linux 2.4.x
|
|
Packit |
c22fc9 |
AC_CHECK_FUNCS([setns])
|
|
Packit Service |
dfccb1 |
dnl -- When building a RedHat RPM with hardening enabled, -pie is specified,
|
|
Packit Service |
dfccb1 |
dnl -- and for setns this requires -fPIC
|
|
Packit Service |
dfccb1 |
AS_IF([test $ac_cv_func_setns = no],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AS_UNSET([ac_cv_func_setns])
|
|
Packit Service |
dfccb1 |
CFLAGS="$CFLAGS -fPIC"
|
|
Packit Service |
dfccb1 |
AC_CHECK_FUNCS([setns])
|
|
Packit Service |
dfccb1 |
])
|
|
Packit |
c22fc9 |
CFLAGS="$SAV_CFLAGS"
|
|
Packit |
c22fc9 |
AM_CONDITIONAL([WITH_NAMESPACES], [test $ac_cv_have_decl_CLONE_NEWNET = yes])
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
dnl -- RLIMIT_RTTIME since Linux 2.6.25 - not supported with musl libc
|
|
Packit Service |
dfccb1 |
AC_CHECK_DECLS([RLIMIT_RTTIME], [], [], [[#include <sys/resource.h>]])
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
dnl -- SCHED_RESET_ON_FORK since Linux 2.6.32
|
|
Packit Service |
dfccb1 |
AC_CHECK_DECLS([SCHED_RESET_ON_FORK],
|
|
Packit Service |
dfccb1 |
[add_system_opt([SCHED_RESET_ON_FORK])],
|
|
Packit Service |
dfccb1 |
[AC_DEFINE([SCHED_RESET_ON_FORK], [ 0 ], [Dummy definition if not defined in system headers])],
|
|
Packit Service |
dfccb1 |
[[#include <sched.h>]])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl -- Do we want GNU standard paths (moves .pid files)
|
|
Packit |
c22fc9 |
GNU_STD_PATHS=No
|
|
Packit |
c22fc9 |
if test "${enable_gnu_std_paths}" = "yes"; then
|
|
Packit |
c22fc9 |
AC_DEFINE([GNU_STD_PATHS], [ 1 ], [set to enforce GNU standard paths, for .pid files etc])
|
|
Packit Service |
dfccb1 |
RUN_DIR=$localstatedir
|
|
Packit Service |
dfccb1 |
elif test $RUN_DIR_SPECIFIED = Y -a .${with_run_dir} != .no; then
|
|
Packit Service |
dfccb1 |
RUN_DIR=`echo ${with_run_dir} | sed -e "s:/run/*$::"` # Remove a trailing /run - somewill will include it sometime
|
|
Packit Service |
dfccb1 |
elif test -d /run; then
|
|
Packit Service |
dfccb1 |
RUN_DIR=
|
|
Packit |
c22fc9 |
else
|
|
Packit Service |
dfccb1 |
RUN_DIR=/var
|
|
Packit |
c22fc9 |
fi
|
|
Packit Service |
dfccb1 |
AC_DEFINE_UNQUOTED([RUN_DIR_ROOT], [ "${RUN_DIR}" ], [Parent directory of /run])
|
|
Packit Service |
dfccb1 |
AC_SUBST([RUN_DIR])
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
dnl - Check type of rlim_t for printf() - this check needs to be late on
|
|
Packit Service |
dfccb1 |
dnl - since _FILE_OFFSET_BITS (set when using netsnmp) alters sizeof(rlim_t)
|
|
Packit Service |
dfccb1 |
SAV_CFLAGS="$CFLAGS"
|
|
Packit Service |
dfccb1 |
CFLAGS="-Wformat -Werror=format $SAV_CPPFLAGS $KA_CPPFLAGS"
|
|
Packit Service |
dfccb1 |
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
Packit Service |
dfccb1 |
#include <stdio.h>
|
|
Packit Service |
dfccb1 |
#include <sys/resource.h>
|
|
Packit Service |
dfccb1 |
int
|
|
Packit Service |
dfccb1 |
main(int argc, char **argv)
|
|
Packit Service |
dfccb1 |
{
|
|
Packit Service |
dfccb1 |
rlim_t val = 23U;
|
|
Packit Service |
dfccb1 |
printf("%lu %d %p", val, argc, argv);
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
return 0;
|
|
Packit Service |
dfccb1 |
}
|
|
Packit Service |
dfccb1 |
]])],
|
|
Packit Service |
dfccb1 |
[AC_DEFINE([PRI_rlim_t], ["lu"], [Define printf format specifier for rlim_t])],
|
|
Packit Service |
dfccb1 |
[AC_DEFINE([PRI_rlim_t], ["llu"], [Define printf format specifier for rlim_t])],
|
|
Packit Service |
dfccb1 |
)
|
|
Packit Service |
dfccb1 |
CFLAGS="$SAV_CFLAGS"
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ---[ check for sphinx-build executable ]----
|
|
Packit |
c22fc9 |
if test -z "$SPHINXBUILD"; then
|
|
Packit |
c22fc9 |
SPHINXBUILDNAME=sphinx-build
|
|
Packit |
c22fc9 |
else
|
|
Packit |
c22fc9 |
SPHINXBUILDNAME=${SPHINXBUILD}
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
AC_SUBST(SPHINXBUILDNAME)
|
|
Packit |
c22fc9 |
AC_CHECK_PROG([HAVE_SPHINX_BUILD], [$SPHINXBUILDNAME], [Yes], [No])
|
|
Packit |
c22fc9 |
AM_CONDITIONAL([BUILD_DOCS], [test $HAVE_SPHINX_BUILD = Yes])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ Memory alloc check or not ? ]----
|
|
Packit |
c22fc9 |
MEM_CHECK=No
|
|
Packit |
c22fc9 |
MEM_CHECK_LOG=No
|
|
Packit |
c22fc9 |
if test "${enable_mem_check}" = "yes"; then
|
|
Packit |
c22fc9 |
MEM_CHECK=Yes
|
|
Packit |
c22fc9 |
AC_DEFINE([_MEM_CHECK_], [ 1 ], [Define to 1 to build with malloc/free checks])
|
|
Packit |
c22fc9 |
add_config_opt([MEM_CHECK])
|
|
Packit |
c22fc9 |
if test "${enable_mem_check_log}" = "yes"; then
|
|
Packit |
c22fc9 |
MEM_CHECK_LOG=Yes
|
|
Packit |
c22fc9 |
AC_DEFINE([_MEM_CHECK_LOG_], [ 1 ], [Define to 1 to log malloc/free checks to syslog])
|
|
Packit |
c22fc9 |
add_config_opt([MEM_CHECK_LOG])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
dnl ----[ Log calls to set_time or not ? ]----
|
|
Packit |
c22fc9 |
TIMER_CHECK=No
|
|
Packit |
c22fc9 |
if test "${enable_timer_check}" = "yes"; then
|
|
Packit |
c22fc9 |
TIMER_CHECK=Yes
|
|
Packit |
c22fc9 |
AC_DEFINE([_TIMER_CHECK_], [ 1 ], [Define to 1 to build with set time logging])
|
|
Packit |
c22fc9 |
add_config_opt([TIMER_CHECK])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
dnl ----[ Debug in one process or not ? ]----
|
|
Packit Service |
dfccb1 |
if test "${enable_one_process_debug}" = yes; then
|
|
Packit Service |
dfccb1 |
AC_DEFINE([_ONE_PROCESS_DEBUG_], [ 1 ], [Define to 1 to build with debugging support])
|
|
Packit Service |
dfccb1 |
ENABLE_ONE_PROCESS_DEBUG=Yes
|
|
Packit Service |
dfccb1 |
add_config_opt([ONE_PROCESS_DEBUG])
|
|
Packit |
c22fc9 |
else
|
|
Packit Service |
dfccb1 |
ENABLE_ONE_PROCESS_DEBUG=No
|
|
Packit |
c22fc9 |
fi
|
|
Packit Service |
dfccb1 |
AM_CONDITIONAL([ONE_PROCESS_DEBUG], [test $ENABLE_ONE_PROCESS_DEBUG = Yes])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ Netlink command timers or not ? ]----
|
|
Packit |
c22fc9 |
if test "${enable_netlink_timers}" = yes; then
|
|
Packit |
c22fc9 |
AC_DEFINE([_NETLINK_TIMERS_], [ 1 ], [Define to 1 to build with netlink command timers support])
|
|
Packit |
c22fc9 |
ENABLE_NETLINK_TIMERS=Yes
|
|
Packit |
c22fc9 |
add_config_opt([NETLINK_TIMERS])
|
|
Packit |
c22fc9 |
else
|
|
Packit |
c22fc9 |
ENABLE_NETLINK_TIMERS=No
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ smtp-alert debugging or not ? ]----
|
|
Packit |
c22fc9 |
if test "${enable_smtp_alert_debug}" = yes; then
|
|
Packit |
c22fc9 |
AC_DEFINE([_SMTP_ALERT_DEBUG_], [ 1 ], [Define to 1 to build with smtp-alert debugging support])
|
|
Packit |
c22fc9 |
ENABLE_SMTP_ALERT_DEBUG=Yes
|
|
Packit |
c22fc9 |
add_config_opt([SMTP_ALERT_DEBUG])
|
|
Packit |
c22fc9 |
ENABLE_LOG_FILE_APPEND=Yes
|
|
Packit |
c22fc9 |
else
|
|
Packit |
c22fc9 |
ENABLE_SMTP_ALERT_DEBUG=No
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ Stacktrace support or not ? ]----
|
|
Packit |
c22fc9 |
if test "${enable_stacktrace}" = yes; then
|
|
Packit |
c22fc9 |
AC_DEFINE([_WITH_STACKTRACE_], [ 1 ], [Define to 1 to build with stacktrace support])
|
|
Packit |
c22fc9 |
ENABLE_STACKTRACE=Yes
|
|
Packit |
c22fc9 |
add_config_opt([STACKTRACE])
|
|
Packit |
c22fc9 |
add_to_var([KA_LDFLAGS], [-rdynamic])
|
|
Packit |
c22fc9 |
else
|
|
Packit |
c22fc9 |
ENABLE_STACKTRACE=No
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ Thread dumping support or not ? ]----
|
|
Packit |
c22fc9 |
if test "${enable_dump_threads}" = yes; then
|
|
Packit |
c22fc9 |
AC_DEFINE([_WITH_DUMP_THREADS_], [ 1 ], [Define to 1 to build with thread dumping support])
|
|
Packit |
c22fc9 |
ENABLE_DUMP_THREADS=Yes
|
|
Packit |
c22fc9 |
add_config_opt([DUMP_THREADS])
|
|
Packit |
c22fc9 |
else
|
|
Packit |
c22fc9 |
ENABLE_DUMP_THREADS=No
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ epoll() debugging support or not ? ]----
|
|
Packit |
c22fc9 |
if test "${enable_epoll_debug}" = yes; then
|
|
Packit |
c22fc9 |
AC_DEFINE([_EPOLL_DEBUG_], [ 1 ], [Define to 1 to build with epoll_wait() debugging support])
|
|
Packit |
c22fc9 |
ENABLE_EPOLL_DEBUG=Yes
|
|
Packit |
c22fc9 |
add_config_opt([EPOLL_DEBUG])
|
|
Packit |
c22fc9 |
else
|
|
Packit |
c22fc9 |
ENABLE_EPOLL_DEBUG=No
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ epoll() thread dumping support or not ? ]----
|
|
Packit |
c22fc9 |
if test "${enable_epoll_thread_dump}" = yes; then
|
|
Packit |
c22fc9 |
AC_DEFINE([_EPOLL_THREAD_DUMP_], [ 1 ], [Define to 1 to build with epoll thread dumping support])
|
|
Packit |
c22fc9 |
ENABLE_EPOLL_THREAD_DUMP=Yes
|
|
Packit |
c22fc9 |
add_config_opt([EPOLL_THREAD_DUMP])
|
|
Packit |
c22fc9 |
else
|
|
Packit |
c22fc9 |
ENABLE_EPOLL_THREAD_DUMP=No
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
if test $ENABLE_EPOLL_THREAD_DUMP = Yes -o $ENABLE_DUMP_THREADS = Yes -o $ENABLE_EPOLL_DEBUG = Yes; then
|
|
Packit |
c22fc9 |
AC_DEFINE([THREAD_DUMP], [ 1 ], [Define to 1 to build with thread dumping support])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ TSM debugging support or not ? ]----
|
|
Packit |
c22fc9 |
if test "${enable_tsm_debug}" = yes; then
|
|
Packit |
c22fc9 |
AC_DEFINE([_TSM_DEBUG_], [ 1 ], [Define to 1 to build with TSM debugging support])
|
|
Packit |
c22fc9 |
ENABLE_TSM_DEBUG=Yes
|
|
Packit |
c22fc9 |
add_config_opt([TSM_DEBUG])
|
|
Packit |
c22fc9 |
else
|
|
Packit |
c22fc9 |
ENABLE_TSM_DEBUG=No
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ VRRP FD debugging support or not ? ]----
|
|
Packit |
c22fc9 |
if test "${enable_vrrp_fd_debug}" = yes; then
|
|
Packit |
c22fc9 |
AC_DEFINE([_VRRP_FD_DEBUG_], [ 1 ], [Define to 1 to build with vrrp fd debugging support])
|
|
Packit |
c22fc9 |
ENABLE_VRRP_FD_DEBUG=Yes
|
|
Packit |
c22fc9 |
add_config_opt([VRRP_FD_DEBUG])
|
|
Packit |
c22fc9 |
else
|
|
Packit |
c22fc9 |
ENABLE_VRRP_FD_DEBUG=No
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
dnl ----[ network timestamp support or not ? ]----
|
|
Packit Service |
dfccb1 |
if test "${enable_network_timestamp}" = yes; then
|
|
Packit Service |
dfccb1 |
AC_DEFINE([_NETWORK_TIMESTAMP_], [ 1 ], [Define to 1 to build with network timestamp support])
|
|
Packit Service |
dfccb1 |
ENABLE_NETWORK_TIMESTAMP=Yes
|
|
Packit Service |
dfccb1 |
add_config_opt([NETWORK_TIMESTAMP])
|
|
Packit Service |
dfccb1 |
else
|
|
Packit Service |
dfccb1 |
ENABLE_NETWORK_TIMESTAMP=No
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
dnl ----[ asserts enabled or not ? ]----
|
|
Packit Service |
dfccb1 |
if test "${enable_asserts}" = yes; then
|
|
Packit Service |
dfccb1 |
AC_DEFINE([_ENABLE_ASSERT_], [ 1 ], [Define to 1 to enable asserts])
|
|
Packit Service |
dfccb1 |
ENABLE_ASSERT=Yes
|
|
Packit Service |
dfccb1 |
add_config_opt([ASSERT])
|
|
Packit Service |
dfccb1 |
else
|
|
Packit Service |
dfccb1 |
ENABLE_ASSERT=No
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit Service |
dfccb1 |
AM_CONDITIONAL([ASSERTS], [test $ENABLE_ASSERT = Yes])
|
|
Packit Service |
dfccb1 |
|
|
Packit |
c22fc9 |
dnl ----[ Specify interface type to be unchangeable ]----
|
|
Packit |
c22fc9 |
if test "${with_fixed_if_type}"; then
|
|
Packit |
c22fc9 |
if test "${with_fixed_if_type}" = yes -o ${with_fixed_if_type} = no; then
|
|
Packit |
c22fc9 |
AC_MSG_ERROR([An interface type must be specified with --with-fixed-if-type])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
AC_DEFINE_UNQUOTED([_FIXED_IF_TYPE_], [ "${with_fixed_if_type}" ], [Consider ${with_fixed_if_type} interfaces to be unchangeable])
|
|
Packit |
c22fc9 |
FIXED_IF_TYPE=${with_fixed_if_type}
|
|
Packit |
c22fc9 |
add_config_opt([FIXED_IF_TYPE=${with_fixed_if_type}])
|
|
Packit |
c22fc9 |
else
|
|
Packit |
c22fc9 |
FIXED_IF_TYPE=
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ Profiling or not ? ]----
|
|
Packit |
c22fc9 |
WITH_PROFILING=No
|
|
Packit |
c22fc9 |
if test "${enable_profile}" = yes; then
|
|
Packit |
c22fc9 |
WITH_PROFILING=Yes
|
|
Packit |
c22fc9 |
add_config_opt([PROFILING])
|
|
Packit |
c22fc9 |
add_to_var([KA_CFLAGS], [-pg])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
AM_CONDITIONAL([PROFILE], [test $WITH_PROFILING = Yes])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ perf support or not? keepalived provides runtime options ]----
|
|
Packit |
c22fc9 |
if test "${enable_perf}" = yes; then
|
|
Packit |
c22fc9 |
AC_DEFINE([_WITH_PERF_], [ 1 ], [Define to 1 to build with perf support])
|
|
Packit |
c22fc9 |
ENABLE_PERF=Yes
|
|
Packit |
c22fc9 |
add_config_opt([PERF])
|
|
Packit |
c22fc9 |
add_to_var([KA_CFLAGS], [-pg])
|
|
Packit |
c22fc9 |
else
|
|
Packit |
c22fc9 |
ENABLE_PERF=No
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
if test "${enable_log_file}" = yes; then
|
|
Packit |
c22fc9 |
AC_DEFINE([ENABLE_LOG_TO_FILE], [ 1 ], [Define if enabling logging to files])
|
|
Packit |
c22fc9 |
ENABLE_LOG_FILE_APPEND=Yes
|
|
Packit |
c22fc9 |
add_config_opt([FILE_LOGGING])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
if test "${ENABLE_LOG_FILE_APPEND}" = Yes; then
|
|
Packit |
c22fc9 |
AC_DEFINE([ENABLE_LOG_FILE_APPEND], [ 1 ], [Define if appending to log files is allowed])
|
|
Packit |
c22fc9 |
add_config_opt([LOG_FILE_APPEND])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
dnl ----[ Do we need to check for EINTR, or enable EINTR debugging code]----
|
|
Packit Service |
dfccb1 |
ENABLE_EINTR_DEBUG=No
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_eintr_debug = .yes],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_DEFINE([_EINTR_DEBUG_], [ 1 ], [Define to test for and log errno == EINTR when no asynchronous signal handlers])
|
|
Packit Service |
dfccb1 |
add_config_opt([EINTR_DEBUG])
|
|
Packit Service |
dfccb1 |
ENABLE_EINTR_DEBUG=Yes
|
|
Packit Service |
dfccb1 |
],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
dnl --- We need to check for EINTR if we are not using signalfd
|
|
Packit Service |
dfccb1 |
AS_IF([test .$ac_cv_func_signalfd != .yes -o .$enable_eintr_debug = .check],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_DEFINE([CHECK_EINTR], [ 1 ], [Define if need to check for EINTR errno])
|
|
Packit Service |
dfccb1 |
AS_IF([test .$ac_cv_func_signalfd = .yes], [add_config_opt([EINTR_CHECK])])
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
dnl ----[ Do we enable script debugging code]----
|
|
Packit Service |
dfccb1 |
ENABLE_SCRIPT_DEBUG=No
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_script_debug = .yes],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_DEFINE([_SCRIPT_DEBUG_], [ 1 ], [Define to enable script debugging support])
|
|
Packit Service |
dfccb1 |
add_config_opt([SCRIPT_DEBUG])
|
|
Packit Service |
dfccb1 |
ENABLE_SCRIPT_DEBUG=Yes
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
dnl ----[ Do we want to enable track process debugging code]----
|
|
Packit Service |
dfccb1 |
ENABLE_TRACK_PROCESS_DEBUG=No
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_track_process_debug = .yes],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_DEFINE([_TRACK_PROCESS_DEBUG_], [ 1 ], [Define to enable logging all process connector events])
|
|
Packit Service |
dfccb1 |
add_config_opt([TRACK_PROCESS_DEBUG])
|
|
Packit Service |
dfccb1 |
ENABLE_TRACK_PROCESS_DEBUG=Yes
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
dnl ----[ Do we want to enable parser debugging code]----
|
|
Packit Service |
dfccb1 |
ENABLE_PARSER_DEBUG=No
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_parser_debug = .yes],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_DEFINE([_PARSER_DEBUG_], [ 1 ], [Define to enable parser debugging])
|
|
Packit Service |
dfccb1 |
add_config_opt([PARSER_DEBUG])
|
|
Packit Service |
dfccb1 |
ENABLE_PARSER_DEBUG=Yes
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
dnl ----[ Do we want to enable checksum debugging code]----
|
|
Packit Service |
dfccb1 |
ENABLE_CHECKSUM_DEBUG=No
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_checksum_debug = .yes],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_DEFINE([_CHECKSUM_DEBUG_], [ 1 ], [Define to enable checksum debugging])
|
|
Packit Service |
dfccb1 |
add_config_opt([CHECKSUM_DEBUG])
|
|
Packit Service |
dfccb1 |
ENABLE_CHECKSUM_DEBUG=Yes
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
dnl ----[ Do we want to enable genhash debugging code]----
|
|
Packit Service |
dfccb1 |
ENABLE_GENHASH_DEBUG=No
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_genhash_debug = .yes],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_DEFINE([_GENHASH_DEBUG_], [ 1 ], [Define to enable genhash debugging])
|
|
Packit Service |
dfccb1 |
add_config_opt([GENHASH_DEBUG])
|
|
Packit Service |
dfccb1 |
ENABLE_GENHASH_DEBUG=Yes
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
dnl ----[ Do we want to enable checker debugging code]----
|
|
Packit Service |
dfccb1 |
ENABLE_CHECKER_DEBUG=No
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_checker_debug = .yes],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_DEFINE([_CHECKER_DEBUG_], [ 1 ], [Define to enable checker debugging])
|
|
Packit Service |
dfccb1 |
add_config_opt([CHECKER_DEBUG])
|
|
Packit Service |
dfccb1 |
ENABLE_CHECKER_DEBUG=Yes
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
dnl ----[ Do we want to enable SMTP connect debugging code]----
|
|
Packit Service |
dfccb1 |
ENABLE_SMTP_CONNECT_DEBUG=No
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_smtp_connect_debug = .yes],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_DEFINE([_SMTP_CONNECT_DEBUG_], [ 1 ], [Define to enable SMTP connection debugging])
|
|
Packit Service |
dfccb1 |
add_config_opt([SMTP_CONNECT_DEBUG])
|
|
Packit Service |
dfccb1 |
ENABLE_SMTP_CONNECT_DEBUG=Yes
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
dnl ----[ Do we want to enable memory alloc/free error debugging code]----
|
|
Packit Service |
dfccb1 |
ENABLE_MEM_ERR_DEBUG=No
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_mem_err_debug = .yes],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_DEFINE([_MEM_ERR_DEBUG_], [ 1 ], [Define to enable memory alloc/free error debugging])
|
|
Packit Service |
dfccb1 |
add_config_opt([MEM_ERR_DEBUG])
|
|
Packit Service |
dfccb1 |
ENABLE_MEM_ERR_DEBUG=Yes
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
dnl ----[ Do we want to enable dump keywords code]----
|
|
Packit Service |
dfccb1 |
AS_IF([test .$enable_dump_keywords = .yes],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
AC_DEFINE([_DUMP_KEYWORDS_], [ 1 ], [Define to enable keyword dumping])
|
|
Packit Service |
dfccb1 |
add_config_opt([DUMP_KEYWORDS])
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
if test "${NEED_LIBDL}" = Yes; then
|
|
Packit |
c22fc9 |
add_to_var([KA_LIBS], [-ldl])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ Determine if we are using pthreads ]----
|
|
Packit |
c22fc9 |
echo " $KA_LIBS" | grep -qE -- " -l?pthread "
|
|
Packit |
c22fc9 |
if test $? -eq 0 ;then
|
|
Packit |
c22fc9 |
AC_DEFINE([_WITH_PTHREADS_], [ 1 ], [Define to 1 if using pthreads])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ Check if rpmbuild supports --build-in-place ]----
|
|
Packit |
c22fc9 |
RPM_NO_BIP=1
|
|
Packit |
c22fc9 |
AC_CHECK_PROG([HAVE_RPM], [rpm], [Yes], [No])
|
|
Packit |
c22fc9 |
if test $HAVE_RPM = Yes; then
|
|
Packit |
c22fc9 |
AC_CHECK_PROG([HAVE_RPMBUILD], [rpmbuild], [Yes], [No])
|
|
Packit |
c22fc9 |
RPM_SRC_DIR=`rpm --eval "%{_sourcedir}"`
|
|
Packit |
c22fc9 |
if ! test -d $RPM_SRC_DIR; then
|
|
Packit |
c22fc9 |
HAVE_RPMBUILD=No
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
if test $HAVE_RPMBUILD = Yes; then
|
|
Packit |
c22fc9 |
rpmbuild --help | grep -q -- --build-in-place
|
|
Packit |
c22fc9 |
RPM_NO_BIP=$?
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
AM_CONDITIONAL([RPM], [test $HAVE_RPM = Yes])
|
|
Packit |
c22fc9 |
AM_CONDITIONAL([RPM_BIP], [test $RPM_NO_BIP -eq 0])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ Determine system init type]----
|
|
Packit |
c22fc9 |
INIT_TYPE=
|
|
Packit Service |
dfccb1 |
AS_IF(
|
|
Packit Service |
dfccb1 |
[test -n "$init_type"], [INIT_TYPE=$init_type],
|
|
Packit Service |
dfccb1 |
[test -n "$with_systemdsystemunitdir"], [INIT_TYPE=systemd],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
/sbin/init --version 2>/dev/null | grep -q upstart
|
|
Packit Service |
dfccb1 |
AS_IF(
|
|
Packit Service |
dfccb1 |
[test $? -eq 0], [INIT_TYPE=upstart],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
init_path=`which systemctl 2>/dev/null`
|
|
Packit Service |
dfccb1 |
AS_IF([test \( $? -eq 0 -a -x "$init_path" \)],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
systemctl | grep -q -- "-\.mount"
|
|
Packit Service |
dfccb1 |
AS_IF([test $? -eq 0], [INIT_TYPE=systemd])
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
AS_IF([test \( -z "$INIT_TYPE" -a -f /etc/init.d/networking \)],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
init_path=`which openrc-run 2>/dev/null`
|
|
Packit Service |
dfccb1 |
AS_IF([test \( $? -eq 0 -a -x "$init_path" \)],
|
|
Packit Service |
dfccb1 |
[
|
|
Packit Service |
dfccb1 |
head -1 /etc/init.d/networking | grep -q "^#! */.*/openrc-run$"
|
|
Packit Service |
dfccb1 |
AS_IF([test $? -eq 0], [INIT_TYPE=openrc])
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
AS_IF([test \( -z "$INIT_TYPE" -a -f /etc/init.d/cron -a ! -h /etc/init.d/cron \)], [INIT_TYPE=SYSV])
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
])
|
|
Packit Service |
dfccb1 |
AS_IF([test \( .$INIT_TYPE = .systemd -a -z "$with_systemdsystemunitdir" \)], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[Default keepalived configuration file]----
|
|
Packit |
c22fc9 |
AS_IF([test $default_config_file],
|
|
Packit |
c22fc9 |
[
|
|
Packit |
c22fc9 |
AS_IF([test $default_config_file = yes -o $default_config_file = no],
|
|
Packit Service |
dfccb1 |
[AC_MSG_ERROR([A filename must be specified for default-config-file])])
|
|
Packit |
c22fc9 |
CONFIG_FILE=$default_config_file
|
|
Packit |
c22fc9 |
add_config_opt([DEFAULT_CONFIG_FILE=${default_config_file}])
|
|
Packit |
c22fc9 |
],
|
|
Packit |
c22fc9 |
[default_config_file="/etc/$PACKAGE/$PACKAGE.conf"])
|
|
Packit |
c22fc9 |
AC_DEFINE_UNQUOTED([DEFAULT_CONFIG_FILE], ["$default_config_file"], [The default configuration file])
|
|
Packit |
c22fc9 |
AC_SUBST([DEFAULT_CONFIG_FILE], [$default_config_file])
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
if test -z "$INIT_TYPE"; then
|
|
Packit |
c22fc9 |
INIT_TYPE=undetected
|
|
Packit |
c22fc9 |
elif test $INIT_TYPE = systemd; then
|
|
Packit |
c22fc9 |
AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
AM_CONDITIONAL([INIT_UPSTART], [test $INIT_TYPE = upstart])
|
|
Packit |
c22fc9 |
AM_CONDITIONAL([INIT_SYSTEMD], [test $INIT_TYPE = systemd])
|
|
Packit |
c22fc9 |
AM_CONDITIONAL([INIT_SYSV], [test $INIT_TYPE = SYSV])
|
|
Packit |
c22fc9 |
AM_CONDITIONAL([INIT_OPENRC], [test $INIT_TYPE = openrc])
|
|
Packit |
c22fc9 |
AM_CONDITIONAL([INIT_SUSE], [test $INIT_TYPE = SUSE])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
AC_DEFINE_UNQUOTED([CONFIGURATION_OPTIONS], ["$CONFIG_OPTIONS"], [The configuration options from which the package is built])
|
|
Packit |
c22fc9 |
AC_DEFINE_UNQUOTED([SYSTEM_OPTIONS], ["$SYSTEM_OPTIONS"], [The system options from which the package is built])
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
if test $NETLINK_VER -eq 0; then
|
|
Packit |
c22fc9 |
NETLINK_VER=None
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ Process output target ]----
|
|
Packit |
c22fc9 |
echo
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
# Tidy up some strings
|
|
Packit Service |
dfccb1 |
KA_CPPFLAGS=`echo $KA_CPPFLAGS | sed -e "s/ */ /g" -e "s/^ //" -e "s/ $//"`
|
|
Packit Service |
dfccb1 |
KA_CFLAGS=`echo $KA_CFLAGS | sed -e "s/ */ /g" -e "s/^ //" -e "s/ $//"`
|
|
Packit Service |
dfccb1 |
KA_LDFLAGS=`echo $KA_LDFLAGS | sed -e "s/ */ /g" -e "s/^ //" -e "s/ $//"`
|
|
Packit Service |
dfccb1 |
KA_LIBS=`echo $KA_LIBS | sed -e "s/ */ /g" -e "s/^ //" -e "s/ $//"`
|
|
Packit Service |
dfccb1 |
|
|
Packit Service |
dfccb1 |
# Tidy up some strings
|
|
Packit Service |
dfccb1 |
KA_CPPFLAGS=`echo $KA_CPPFLAGS | sed -e "s/ */ /g" -e "s/^ //" -e "s/ $//"`
|
|
Packit Service |
dfccb1 |
KA_CFLAGS=`echo $KA_CFLAGS | sed -e "s/ */ /g" -e "s/^ //" -e "s/ $//"`
|
|
Packit Service |
dfccb1 |
KA_LDFLAGS=`echo $KA_LDFLAGS | sed -e "s/ */ /g" -e "s/^ //" -e "s/ $//"`
|
|
Packit Service |
dfccb1 |
KA_LIBS=`echo $KA_LIBS | sed -e "s/ */ /g" -e "s/^ //" -e "s/ $//"`
|
|
Packit Service |
dfccb1 |
|
|
Packit |
c22fc9 |
AC_OUTPUT
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
# Restore lib/config_warnings.h.in
|
|
Packit Service |
dfccb1 |
mv ${CONFIG_WARNINGS}.sav ${CONFIG_WARNINGS}
|
|
Packit Service |
dfccb1 |
|
|
Packit |
c22fc9 |
dnl ----[ Display current configuration ]----
|
|
Packit |
c22fc9 |
cat <
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
Keepalived configuration
|
|
Packit |
c22fc9 |
------------------------
|
|
Packit |
c22fc9 |
Keepalived version : ${VERSION}
|
|
Packit |
c22fc9 |
Compiler : ${CC}
|
|
Packit |
c22fc9 |
Preprocessor flags : ${KA_CPPFLAGS}
|
|
Packit |
c22fc9 |
Compiler flags : ${KA_CFLAGS}
|
|
Packit |
c22fc9 |
EOF
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ display optional vars ]----
|
|
Packit |
c22fc9 |
if test -n "$KA_LDFLAGS$KA_LIBS"; then
|
|
Packit |
c22fc9 |
echo "Linker flags : $KA_LDFLAGS"
|
|
Packit |
c22fc9 |
echo "Extra Lib : $KA_LIBS"
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
echo "Use IPVS Framework : ${IPVS_SUPPORT}"
|
|
Packit |
c22fc9 |
if test ${IPVS_SUPPORT} = Yes; then
|
|
Packit |
c22fc9 |
echo "IPVS use libnl : ${IPVS_USE_NL}"
|
|
Packit |
c22fc9 |
echo "IPVS syncd attributes : ${IPVS_SYNCD_ATTRIBUTES}"
|
|
Packit |
c22fc9 |
echo "IPVS 64 bit stats : ${IPVS_64BIT_STATS}"
|
|
Packit |
c22fc9 |
echo "HTTP_GET regex support : ${WITH_REGEX}"
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
echo "fwmark socket support : ${SO_MARK_SUPPORT}"
|
|
Packit |
c22fc9 |
echo "Use VRRP Framework : ${VRRP_SUPPORT}"
|
|
Packit |
c22fc9 |
if test ${VRRP_SUPPORT} = Yes; then
|
|
Packit |
c22fc9 |
echo "Use VRRP VMAC : ${MACVLAN_SUPPORT}"
|
|
Packit |
c22fc9 |
echo "Use VRRP authentication : ${VRRP_AUTH_SUPPORT}"
|
|
Packit |
c22fc9 |
echo "With ip rules/routes : ${FIB_ROUTING_SUPPORT}"
|
|
Packit Service |
dfccb1 |
echo "With track_process : ${HAVE_CN_PROC}"
|
|
Packit Service |
dfccb1 |
echo "With linkbeat : ${LINKBEAT_SUPPORT}"
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
echo "Use BFD Framework : ${BFD_SUPPORT}"
|
|
Packit |
c22fc9 |
echo "SNMP vrrp support : ${SNMP_VRRP_SUPPORT}"
|
|
Packit |
c22fc9 |
echo "SNMP checker support : ${SNMP_CHECKER_SUPPORT}"
|
|
Packit |
c22fc9 |
echo "SNMP RFCv2 support : ${SNMP_RFCV2_SUPPORT}"
|
|
Packit |
c22fc9 |
echo "SNMP RFCv3 support : ${SNMP_RFCV3_SUPPORT}"
|
|
Packit |
c22fc9 |
if test ${SNMP_RFCV3_SUPPORT} = Yes; then
|
|
Packit |
c22fc9 |
echo "SNMP send V3 for V2 : ${SNMP_V3_FOR_V2}"
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
echo "DBUS support : ${DBUS_SUPPORT}"
|
|
Packit |
c22fc9 |
if test ${DBUS_SUPPORT} = Yes; then
|
|
Packit |
c22fc9 |
echo "DBUS create instance : ${DBUS_CREATE_INSTANCE}"
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
echo "SHA1 support : ${SHA1_SUPPORT}"
|
|
Packit Service |
dfccb1 |
echo "Use JSON output : ${ENABLE_JSON}"
|
|
Packit |
c22fc9 |
echo "libnl version : ${NETLINK_VER}"
|
|
Packit |
c22fc9 |
echo "Use IPv4 devconf : ${IPV4_DEVCONF}"
|
|
Packit Service |
dfccb1 |
echo "Use iptables : ${USE_IPTABLES}"
|
|
Packit Service |
dfccb1 |
if test .$USE_IPTABLES = .Yes; then
|
|
Packit Service |
dfccb1 |
echo "Use libipset : ${USE_LIBIPSET}"
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit Service |
dfccb1 |
echo "Use nftables : ${USE_NFTABLES}"
|
|
Packit |
c22fc9 |
echo "init type : ${INIT_TYPE}"
|
|
Packit |
c22fc9 |
echo "Strict config checks : ${STRICT_CONFIG}"
|
|
Packit |
c22fc9 |
echo "Build genhash : ${BUILD_GENHASH}"
|
|
Packit |
c22fc9 |
echo "Build documentation : ${HAVE_SPHINX_BUILD}"
|
|
Packit |
c22fc9 |
if test ${ENABLE_STACKTRACE} = Yes; then
|
|
Packit Service |
dfccb1 |
echo "Stacktrace support : Yes"
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
if test ${ENABLE_PERF} = Yes; then
|
|
Packit Service |
dfccb1 |
echo "Perf support : Yes"
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
if test ${MEM_CHECK} = Yes; then
|
|
Packit Service |
dfccb1 |
echo "Memory alloc check : Yes"
|
|
Packit |
c22fc9 |
echo "Memory alloc check log : ${MEM_CHECK_LOG}"
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
if test ${TIMER_CHECK} = Yes; then
|
|
Packit Service |
dfccb1 |
echo "Set time logging : Yes"
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
if test ${ENABLE_DUMP_THREADS} = Yes; then
|
|
Packit Service |
dfccb1 |
echo "Thread debugging : Yes"
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
if test ${ENABLE_EPOLL_DEBUG} = Yes; then
|
|
Packit Service |
dfccb1 |
echo "epoll_wait() debugging : Yes"
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
if test ${ENABLE_EPOLL_THREAD_DUMP} = Yes; then
|
|
Packit Service |
dfccb1 |
echo "epoll thread dumping : Yes"
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
if test ${ENABLE_REGEX_DEBUG} = Yes; then
|
|
Packit Service |
dfccb1 |
echo "regex debugging : Yes"
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
if test ${ENABLE_TSM_DEBUG} = Yes; then
|
|
Packit Service |
dfccb1 |
echo "TSM debugging : Yes"
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
if test ${ENABLE_VRRP_FD_DEBUG} = Yes; then
|
|
Packit Service |
dfccb1 |
echo "VRRP_FD debugging : Yes"
|
|
Packit |
c22fc9 |
fi
|
|
Packit Service |
dfccb1 |
if test ${ENABLE_NETWORK_TIMESTAMP} = Yes; then
|
|
Packit Service |
dfccb1 |
echo "network timestamping : Yes"
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit Service |
dfccb1 |
if test ${ENABLE_ASSERT} = Yes; then
|
|
Packit Service |
dfccb1 |
echo "asserts enabled : Yes"
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit Service |
dfccb1 |
if test ${ENABLE_ONE_PROCESS_DEBUG} = Yes; then
|
|
Packit Service |
dfccb1 |
echo "Use one process debuging : Yes"
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
if test ${ENABLE_NETLINK_TIMERS} = Yes; then
|
|
Packit Service |
dfccb1 |
echo "Netlink command timers : Yes"
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
if test ${ENABLE_SMTP_ALERT_DEBUG} = Yes; then
|
|
Packit Service |
dfccb1 |
echo "smtp-alert debugging : Yes"
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit Service |
dfccb1 |
if test ${ENABLE_EINTR_DEBUG} = Yes; then
|
|
Packit Service |
dfccb1 |
echo "EINTR debugging : Yes"
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit Service |
dfccb1 |
if test ${ENABLE_SCRIPT_DEBUG} = Yes; then
|
|
Packit Service |
dfccb1 |
echo "Script debugging : Yes"
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit Service |
dfccb1 |
if test ${ENABLE_TRACK_PROCESS_DEBUG} = Yes; then
|
|
Packit Service |
dfccb1 |
echo "track process debugging : Yes"
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit Service |
dfccb1 |
if test ${ENABLE_PARSER_DEBUG} = Yes; then
|
|
Packit Service |
dfccb1 |
echo "Parser debugging : Yes"
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit Service |
dfccb1 |
if test ${ENABLE_CHECKSUM_DEBUG} = Yes; then
|
|
Packit Service |
dfccb1 |
echo "Checksum debugging : Yes"
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit Service |
dfccb1 |
if test ${ENABLE_GENHASH_DEBUG} = Yes; then
|
|
Packit Service |
dfccb1 |
echo "genhash debugging : Yes"
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit Service |
dfccb1 |
if test ${ENABLE_CHECKER_DEBUG} = Yes; then
|
|
Packit Service |
dfccb1 |
echo "checker debugging : Yes"
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit Service |
dfccb1 |
if test ${ENABLE_SMTP_CONNECT_DEBUG} = Yes; then
|
|
Packit Service |
dfccb1 |
echo "SMTP connect debugging : Yes"
|
|
Packit Service |
dfccb1 |
fi
|
|
Packit Service |
dfccb1 |
if test ${ENABLE_MEM_ERR_DEBUG} = Yes; then
|
|
Packit Service |
dfccb1 |
echo "memory alloc error debug : Yes"
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
if test "${FIXED_IF_TYPE}"; then
|
|
Packit |
c22fc9 |
echo "Fixed interface type : ${FIXED_IF_TYPE}"
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
if test "${CONFIG_FILE}"; then
|
|
Packit |
c22fc9 |
echo "Default config file : ${CONFIG_FILE}"
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
dnl ----[ end configure ]---
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
if test ${IPVS_SUPPORT} = Yes -a ${IPVS_USE_NL} = No; then
|
|
Packit |
c22fc9 |
echo
|
|
Packit |
c22fc9 |
echo "*** WARNING - this build will not support IPVS with IPv6. Please install libnl/libnl-3 dev libraries to support IPv6 with IPVS."
|
|
Packit |
c22fc9 |
echo
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit Service |
dfccb1 |
if test ${ENABLE_ONE_PROCESS_DEBUG} = Yes; then
|
|
Packit |
c22fc9 |
echo
|
|
Packit Service |
dfccb1 |
echo "*** WARNING --enable-one-process-debug is only for debugging purposes and isn't expected to work properly"
|
|
Packit |
c22fc9 |
echo
|
|
Packit |
c22fc9 |
fi
|