dhodovsk / source-git / pacemaker

Forked from source-git/pacemaker 3 years ago
Clone

Blame configure.ac

rpm-build 3ee90c
dnl
rpm-build 3ee90c
dnl autoconf for Pacemaker
rpm-build 3ee90c
dnl
rpm-build 3ee90c
dnl Copyright 2009-2019 the Pacemaker project contributors
rpm-build 3ee90c
dnl
rpm-build 3ee90c
dnl The version control history for this file may have further details.
rpm-build 3ee90c
dnl
rpm-build 3ee90c
dnl This source code is licensed under the GNU General Public License version 2
rpm-build 3ee90c
dnl or later (GPLv2+) WITHOUT ANY WARRANTY.
rpm-build 3ee90c
rpm-build 3ee90c
dnl ===============================================
rpm-build 3ee90c
dnl Bootstrap
rpm-build 3ee90c
dnl ===============================================
rpm-build 3ee90c
AC_PREREQ(2.64)
rpm-build 3ee90c
rpm-build 3ee90c
AC_CONFIG_MACRO_DIR([m4])
rpm-build 3ee90c
AC_DEFUN([AC_DATAROOTDIR_CHECKED])
rpm-build 3ee90c
rpm-build 3ee90c
dnl Suggested structure:
rpm-build 3ee90c
dnl     information on the package
rpm-build 3ee90c
dnl     checks for programs
rpm-build 3ee90c
dnl     checks for libraries
rpm-build 3ee90c
dnl     checks for header files
rpm-build 3ee90c
dnl     checks for types
rpm-build 3ee90c
dnl     checks for structures
rpm-build 3ee90c
dnl     checks for compiler characteristics
rpm-build 3ee90c
dnl     checks for library functions
rpm-build 3ee90c
dnl     checks for system services
rpm-build 3ee90c
rpm-build 3ee90c
m4_include([version.m4])
rpm-build 3ee90c
AC_INIT([pacemaker], VERSION_NUMBER, [users@clusterlabs.org], [pacemaker],
rpm-build 3ee90c
        PCMK_URL)
rpm-build 3ee90c
rpm-build 3ee90c
PCMK_FEATURES=""
rpm-build 3ee90c
rpm-build 3ee90c
AC_CONFIG_AUX_DIR(.)
rpm-build 3ee90c
AC_CANONICAL_HOST
rpm-build 3ee90c
rpm-build 3ee90c
dnl Where #defines go (e.g. `AC_CHECK_HEADERS' below)
rpm-build 3ee90c
dnl
rpm-build 3ee90c
dnl Internal header: include/config.h
rpm-build 3ee90c
dnl   - Contains ALL defines
rpm-build 3ee90c
dnl   - include/config.h.in is generated automatically by autoheader
rpm-build 3ee90c
dnl   - NOT to be included in any header files except crm_internal.h
rpm-build 3ee90c
dnl     (which is also not to be included in any other header files)
rpm-build 3ee90c
dnl
rpm-build 3ee90c
dnl External header: include/crm_config.h
rpm-build 3ee90c
dnl   - Contains a subset of defines checked here
rpm-build 3ee90c
dnl   - Manually edit include/crm_config.h.in to have configure include
rpm-build 3ee90c
dnl     new defines
rpm-build 3ee90c
dnl   - Should not include HAVE_* defines
rpm-build 3ee90c
dnl   - Safe to include anywhere
rpm-build 3ee90c
AC_CONFIG_HEADERS([include/config.h include/crm_config.h])
rpm-build 3ee90c
rpm-build 3ee90c
dnl 1.11:           minimum automake version required
rpm-build 3ee90c
dnl foreign:        don't require GNU-standard top-level files
rpm-build 3ee90c
dnl tar-ustar:      use (older) POSIX variant of generated tar rather than v7
rpm-build 3ee90c
dnl silent-rules:   allow "--enable-silent-rules" (no-op in 1.13+)
rpm-build 3ee90c
dnl subdir-objects: keep .o's with their .c's (no-op in 2.0+)
rpm-build 3ee90c
AM_INIT_AUTOMAKE([1.11 foreign tar-ustar silent-rules subdir-objects])
rpm-build 3ee90c
rpm-build 3ee90c
dnl Example 2.4. Silent Custom Rule to Generate a File
rpm-build 3ee90c
dnl %-bar.pc: %.pc
rpm-build 3ee90c
dnl	$(AM_V_GEN)$(LN_S) $(notdir $^) $@
rpm-build 3ee90c
rpm-build 3ee90c
dnl Versioned attributes implementation is not yet production-ready
rpm-build 3ee90c
AC_DEFINE_UNQUOTED(ENABLE_VERSIONED_ATTRS, 0, [Enable versioned attributes])
rpm-build 3ee90c
rpm-build 3ee90c
CC_IN_CONFIGURE=yes
rpm-build 3ee90c
export CC_IN_CONFIGURE
rpm-build 3ee90c
rpm-build 3ee90c
LDD=ldd
rpm-build 3ee90c
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
dnl Compiler characteristics
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
rpm-build 3ee90c
AC_PROG_CC dnl Can force other with environment variable "CC".
rpm-build 3ee90c
AC_PROG_CC_STDC
rpm-build 3ee90c
AC_PROG_CXX dnl C++ is not needed for build, just maintainer utilities
rpm-build 3ee90c
rpm-build 3ee90c
gl_EARLY
rpm-build 3ee90c
# We expressly don't want to introduce OpenSSL dependency by default.
rpm-build 3ee90c
gl_SET_CRYPTO_CHECK_DEFAULT([no])
rpm-build 3ee90c
gl_INIT
rpm-build 3ee90c
rpm-build 3ee90c
LT_INIT([dlopen])
rpm-build 3ee90c
LTDL_INIT([convenience])
rpm-build 3ee90c
rpm-build 3ee90c
AC_TYPE_SIZE_T
rpm-build 3ee90c
AC_CHECK_SIZEOF(char)
rpm-build 3ee90c
AC_CHECK_SIZEOF(short)
rpm-build 3ee90c
AC_CHECK_SIZEOF(int)
rpm-build 3ee90c
AC_CHECK_SIZEOF(long)
rpm-build 3ee90c
AC_CHECK_SIZEOF(long long)
rpm-build 3ee90c
rpm-build 3ee90c
dnl ===============================================
rpm-build 3ee90c
dnl Helpers
rpm-build 3ee90c
dnl ===============================================
rpm-build 3ee90c
cc_supports_flag() {
rpm-build 3ee90c
    local CFLAGS="-Werror $@"
rpm-build 3ee90c
    AC_MSG_CHECKING(whether $CC supports "$@")
rpm-build 3ee90c
    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[ ]])],
rpm-build 3ee90c
                      [RC=0; AC_MSG_RESULT(yes)],
rpm-build 3ee90c
                      [RC=1; AC_MSG_RESULT(no)])
rpm-build 3ee90c
    return $RC
rpm-build 3ee90c
}
rpm-build 3ee90c
rpm-build 3ee90c
# Some tests need to use their own CFLAGS
rpm-build 3ee90c
rpm-build 3ee90c
cc_temp_flags() {
rpm-build 3ee90c
    ac_save_CFLAGS="$CFLAGS"
rpm-build 3ee90c
    CFLAGS="$*"
rpm-build 3ee90c
}
rpm-build 3ee90c
rpm-build 3ee90c
cc_restore_flags() {
rpm-build 3ee90c
    CFLAGS=$ac_save_CFLAGS
rpm-build 3ee90c
}
rpm-build 3ee90c
rpm-build 3ee90c
dnl ===============================================
rpm-build 3ee90c
dnl Configure Options
rpm-build 3ee90c
dnl ===============================================
rpm-build 3ee90c
rpm-build 3ee90c
rpm-build 3ee90c
dnl --enable-* options
rpm-build 3ee90c
rpm-build 3ee90c
AC_ARG_ENABLE([ansi],
rpm-build 3ee90c
    [AS_HELP_STRING([--enable-ansi],
rpm-build 3ee90c
        [force GCC to compile to ANSI standard for older compilers. @<:@no@:>@])],
rpm-build 3ee90c
)
rpm-build 3ee90c
rpm-build 3ee90c
AC_ARG_ENABLE([fatal-warnings],
rpm-build 3ee90c
    [AS_HELP_STRING([--enable-fatal-warnings],
rpm-build 3ee90c
        [enable pedantic and fatal warnings for gcc @<:@yes@:>@])],
rpm-build 3ee90c
)
rpm-build 3ee90c
rpm-build 3ee90c
AC_ARG_ENABLE([quiet],
rpm-build 3ee90c
    [AS_HELP_STRING([--enable-quiet],
rpm-build 3ee90c
        [suppress make output unless there is an error @<:@no@:>@])],
rpm-build 3ee90c
)
rpm-build 3ee90c
rpm-build 3ee90c
AC_ARG_ENABLE([no-stack],
rpm-build 3ee90c
    [AS_HELP_STRING([--enable-no-stack],
rpm-build 3ee90c
        [build only the scheduler and its requirements @<:@no@:>@])],
rpm-build 3ee90c
)
rpm-build 3ee90c
rpm-build 3ee90c
AC_ARG_ENABLE([upstart],
rpm-build 3ee90c
    [AS_HELP_STRING([--enable-upstart],
rpm-build 3ee90c
        [enable support for managing resources via Upstart @<:@try@:>@])],
rpm-build 3ee90c
    [],
rpm-build 3ee90c
    [enable_upstart=try],
rpm-build 3ee90c
)
rpm-build 3ee90c
rpm-build 3ee90c
AC_ARG_ENABLE([systemd],
rpm-build 3ee90c
    [AS_HELP_STRING([--enable-systemd],
rpm-build 3ee90c
        [enable support for managing resources via systemd @<:@try@:>@])],
rpm-build 3ee90c
    [],
rpm-build 3ee90c
    [enable_systemd=try],
rpm-build 3ee90c
)
rpm-build 3ee90c
rpm-build 3ee90c
AC_ARG_ENABLE([hardening],
rpm-build 3ee90c
    [AS_HELP_STRING([--enable-hardening],
rpm-build 3ee90c
        [harden the resulting executables/libraries @<:@try@:>@])],
rpm-build 3ee90c
    [ HARDENING="${enableval}" ],
rpm-build 3ee90c
    [ HARDENING=try ],
rpm-build 3ee90c
)
rpm-build 3ee90c
rpm-build 3ee90c
# By default, we add symlinks at the pre-2.0.0 daemon name locations, so that:
rpm-build 3ee90c
# (1) tools that directly invoke those names for metadata etc. will still work
rpm-build 3ee90c
# (2) this installation can be used in a bundle container image used with
rpm-build 3ee90c
#     cluster hosts running Pacemaker 1.1.17+
rpm-build 3ee90c
# If you know your target systems will not have any need for it, you can
rpm-build 3ee90c
# disable this option. Once the above use cases are no longer in wide use, we
rpm-build 3ee90c
# can disable this option by default, and once we no longer want to support
rpm-build 3ee90c
# them at all, we can drop the option altogether.
rpm-build 3ee90c
AC_ARG_ENABLE([legacy-links],
rpm-build 3ee90c
    [AS_HELP_STRING([--enable-legacy-links],
rpm-build 3ee90c
        [add symlinks for old daemon names @<:@yes@:>@])],
rpm-build 3ee90c
    [ LEGACY_LINKS="${enableval}" ],
rpm-build 3ee90c
    [ LEGACY_LINKS=yes ],
rpm-build 3ee90c
)
rpm-build 3ee90c
AM_CONDITIONAL(BUILD_LEGACY_LINKS, test "x${LEGACY_LINKS}" = "xyes")
rpm-build 3ee90c
rpm-build 3ee90c
rpm-build 3ee90c
dnl --with-* options
rpm-build 3ee90c
rpm-build 3ee90c
AC_DEFUN([VERSION_ARG],
rpm-build 3ee90c
    [AC_ARG_WITH([version],
rpm-build 3ee90c
        [AS_HELP_STRING([--with-version=VERSION],
rpm-build 3ee90c
            [override package version @<:@$1@:>@])],
rpm-build 3ee90c
        [ PACKAGE_VERSION="$withval" ])]
rpm-build 3ee90c
)
rpm-build 3ee90c
VERSION_ARG(VERSION_NUMBER)
rpm-build 3ee90c
rpm-build 3ee90c
AC_ARG_WITH([corosync],
rpm-build 3ee90c
    [AS_HELP_STRING([--with-corosync],
rpm-build 3ee90c
        [support the Corosync messaging and membership layer])],
rpm-build 3ee90c
    [ SUPPORT_CS=$withval ],
rpm-build 3ee90c
    [ SUPPORT_CS=try ],
rpm-build 3ee90c
)
rpm-build 3ee90c
rpm-build 3ee90c
AC_ARG_WITH([nagios],
rpm-build 3ee90c
    [AS_HELP_STRING([--with-nagios],
rpm-build 3ee90c
        [support nagios remote monitoring])],
rpm-build 3ee90c
    [ SUPPORT_NAGIOS=$withval ],
rpm-build 3ee90c
    [ SUPPORT_NAGIOS=try ],
rpm-build 3ee90c
)
rpm-build 3ee90c
rpm-build 3ee90c
AC_ARG_WITH([nagios-plugin-dir],
rpm-build 3ee90c
    [AS_HELP_STRING([--with-nagios-plugin-dir=DIR],
rpm-build 3ee90c
        [directory for nagios plugins @<:@LIBEXECDIR/nagios/plugins@:>@])],
rpm-build 3ee90c
    [ NAGIOS_PLUGIN_DIR="$withval" ]
rpm-build 3ee90c
)
rpm-build 3ee90c
rpm-build 3ee90c
AC_ARG_WITH([nagios-metadata-dir],
rpm-build 3ee90c
    [AS_HELP_STRING([--with-nagios-metadata-dir=DIR],
rpm-build 3ee90c
        [directory for nagios plugins metadata @<:@DATADIR/nagios/plugins-metadata@:>@])],
rpm-build 3ee90c
    [ NAGIOS_METADATA_DIR="$withval" ]
rpm-build 3ee90c
)
rpm-build 3ee90c
rpm-build 3ee90c
AC_ARG_WITH([acl],
rpm-build 3ee90c
    [AS_HELP_STRING([--with-acl],
rpm-build 3ee90c
        [support CIB ACL])],
rpm-build 3ee90c
    [ SUPPORT_ACL=$withval ],
rpm-build 3ee90c
    [ SUPPORT_ACL=yes ],
rpm-build 3ee90c
)
rpm-build 3ee90c
rpm-build 3ee90c
AC_ARG_WITH([cibsecrets],
rpm-build 3ee90c
    [AS_HELP_STRING([--with-cibsecrets],
rpm-build 3ee90c
        [support separate file for CIB secrets])],
rpm-build 3ee90c
    [ SUPPORT_CIBSECRETS=$withval ],
rpm-build 3ee90c
    [ SUPPORT_CIBSECRETS=no ],
rpm-build 3ee90c
)
rpm-build 3ee90c
rpm-build 3ee90c
PCMK_GNUTLS_PRIORITIES="NORMAL"
rpm-build 3ee90c
AC_ARG_WITH([gnutls-priorities],
rpm-build 3ee90c
    [AS_HELP_STRING([--with-gnutls-priorities],
rpm-build 3ee90c
        [default GnuTLS cipher priorities @<:@NORMAL@:>@])],
rpm-build 3ee90c
    [ test x"$withval" = x"no" || PCMK_GNUTLS_PRIORITIES="$withval" ]
rpm-build 3ee90c
)
rpm-build 3ee90c
rpm-build 3ee90c
INITDIR=""
rpm-build 3ee90c
AC_ARG_WITH([initdir],
rpm-build 3ee90c
    [AS_HELP_STRING([--with-initdir=DIR],
rpm-build 3ee90c
        [directory for init (rc) scripts])],
rpm-build 3ee90c
    [ INITDIR="$withval" ]
rpm-build 3ee90c
)
rpm-build 3ee90c
rpm-build 3ee90c
systemdsystemunitdir="${systemdsystemunitdir-}"
rpm-build 3ee90c
AC_ARG_WITH([systemdsystemunitdir],
rpm-build 3ee90c
    [AS_HELP_STRING([--with-systemdsystemunitdir=DIR],
rpm-build 3ee90c
        [directory for systemd unit files (advanced option: must match what systemd uses)])],
rpm-build 3ee90c
    [ systemdsystemunitdir="$withval" ]
rpm-build 3ee90c
)
rpm-build 3ee90c
rpm-build 3ee90c
SUPPORT_PROFILING=0
rpm-build 3ee90c
AC_ARG_WITH([profiling],
rpm-build 3ee90c
    [AS_HELP_STRING([--with-profiling],
rpm-build 3ee90c
        [disable optimizations for effective profiling])],
rpm-build 3ee90c
    [ SUPPORT_PROFILING=$withval ]
rpm-build 3ee90c
)
rpm-build 3ee90c
rpm-build 3ee90c
AC_ARG_WITH([coverage],
rpm-build 3ee90c
    [AS_HELP_STRING([--with-coverage],
rpm-build 3ee90c
        [disable optimizations for effective profiling])],
rpm-build 3ee90c
    [ SUPPORT_COVERAGE=$withval ]
rpm-build 3ee90c
)
rpm-build 3ee90c
rpm-build 3ee90c
PUBLICAN_BRAND="common"
rpm-build 3ee90c
AC_ARG_WITH([brand],
rpm-build 3ee90c
    [AS_HELP_STRING([--with-brand=brand],
rpm-build 3ee90c
        [brand to use for generated documentation (set empty for no docs) @<:@common@:>@])],
rpm-build 3ee90c
    [ test x"$withval" = x"no" || PUBLICAN_BRAND="$withval" ]
rpm-build 3ee90c
)
rpm-build 3ee90c
AC_SUBST(PUBLICAN_BRAND)
rpm-build 3ee90c
rpm-build 3ee90c
BUG_URL=""
rpm-build 3ee90c
AC_ARG_WITH([bug-url],
rpm-build 3ee90c
    [AS_HELP_STRING([--with-bug-url=DIR],
rpm-build 3ee90c
        [address where users should submit bug reports @<:@https://bugs.clusterlabs.org/enter_bug.cgi?product=Pacemaker@:>@])],
rpm-build 3ee90c
    [ BUG_URL="$withval" ]
rpm-build 3ee90c
)
rpm-build 3ee90c
rpm-build 3ee90c
CONFIGDIR=""
rpm-build 3ee90c
AC_ARG_WITH([configdir],
rpm-build 3ee90c
    [AS_HELP_STRING([--with-configdir=DIR],
rpm-build 3ee90c
        [directory for Pacemaker configuration file @<:@SYSCONFDIR/sysconfig@:>@])],
rpm-build 3ee90c
    [ CONFIGDIR="$withval" ]
rpm-build 3ee90c
)
rpm-build 3ee90c
rpm-build 3ee90c
CRM_LOG_DIR=""
rpm-build 3ee90c
AC_ARG_WITH([logdir],
rpm-build 3ee90c
    [AS_HELP_STRING([--with-logdir=DIR],
rpm-build 3ee90c
        [directory for Pacemaker log file @<:@LOCALSTATEDIR/log/pacemaker@:>@])],
rpm-build 3ee90c
    [ CRM_LOG_DIR="$withval" ]
rpm-build 3ee90c
)
rpm-build 3ee90c
rpm-build 3ee90c
CRM_BUNDLE_DIR=""
rpm-build 3ee90c
AC_ARG_WITH([bundledir],
rpm-build 3ee90c
    [AS_HELP_STRING([--with-bundledir=DIR],
rpm-build 3ee90c
        [directory for Pacemaker bundle logs @<:@LOCALSTATEDIR/log/pacemaker/bundles@:>@])],
rpm-build 3ee90c
    [ CRM_BUNDLE_DIR="$withval" ]
rpm-build 3ee90c
)
rpm-build 3ee90c
rpm-build 3ee90c
dnl The not-yet-released autoconf 2.70 will have a --runstatedir option.
rpm-build 3ee90c
dnl Until that's available, emulate it with our own --with-runstatedir.
rpm-build 3ee90c
pcmk_runstatedir=""
rpm-build 3ee90c
AC_ARG_WITH([runstatedir],
rpm-build 3ee90c
    [AS_HELP_STRING([--with-runstatedir=DIR],
rpm-build 3ee90c
        [modifiable per-process data @<:@LOCALSTATEDIR/run@:>@ (ignored if --runstatedir is available)])],
rpm-build 3ee90c
    [ pcmk_runstatedir="$withval" ]
rpm-build 3ee90c
)
rpm-build 3ee90c
rpm-build 3ee90c
dnl This defaults to /usr/lib rather than libdir because it's determined by the
rpm-build 3ee90c
dnl OCF project and not pacemaker. Even if a user wants to install pacemaker to
rpm-build 3ee90c
dnl /usr/local or such, the OCF agents will be expected in their usual
rpm-build 3ee90c
dnl location. However, we do give the user the option to override it.
rpm-build 3ee90c
OCF_ROOT_DIR="/usr/lib/ocf"
rpm-build 3ee90c
AC_ARG_WITH([ocfdir],
rpm-build 3ee90c
    [AS_HELP_STRING([--with-ocfdir=DIR],
rpm-build 3ee90c
        [OCF resource agent root directory (advanced option: changing this may break other cluster components unless similarly configured) @<:@/usr/lib/ocf@:>@])],
rpm-build 3ee90c
    [ OCF_ROOT_DIR="$withval" ]
rpm-build 3ee90c
)
rpm-build 3ee90c
AC_SUBST(OCF_ROOT_DIR)
rpm-build 3ee90c
rpm-build 3ee90c
CRM_DAEMON_USER=""
rpm-build 3ee90c
AC_ARG_WITH([daemon-user],
rpm-build 3ee90c
    [AS_HELP_STRING([--with-daemon-user=USER],
rpm-build 3ee90c
        [user to run unprivileged Pacemaker daemons as (advanced option: changing this may break other cluster components unless similarly configured) @<:@hacluster@:>@])],
rpm-build 3ee90c
    [ CRM_DAEMON_USER="$withval" ]
rpm-build 3ee90c
)
rpm-build 3ee90c
rpm-build 3ee90c
CRM_DAEMON_GROUP=""
rpm-build 3ee90c
AC_ARG_WITH([daemon-group],
rpm-build 3ee90c
    [AS_HELP_STRING([--with-daemon-group=GROUP],
rpm-build 3ee90c
        [group to run unprivileged Pacemaker daemons as (advanced option: changing this may break other cluster components unless similarly configured) @<:@haclient@:>@])],
rpm-build 3ee90c
    [ CRM_DAEMON_GROUP="$withval" ]
rpm-build 3ee90c
)
rpm-build 3ee90c
rpm-build 3ee90c
rpm-build 3ee90c
dnl Deprecated options
rpm-build 3ee90c
rpm-build 3ee90c
AC_ARG_WITH([pkg-name],
rpm-build 3ee90c
    [AS_HELP_STRING([--with-pkg-name=name],
rpm-build 3ee90c
        [deprecated and unused (will be removed in a future release)])],
rpm-build 3ee90c
)
rpm-build 3ee90c
rpm-build 3ee90c
AC_ARG_WITH([pkgname],
rpm-build 3ee90c
    [AS_HELP_STRING([--with-pkgname=name],
rpm-build 3ee90c
        [deprecated and unused (will be removed in a future release)])],
rpm-build 3ee90c
)
rpm-build 3ee90c
rpm-build 3ee90c
rpm-build 3ee90c
dnl ===============================================
rpm-build 3ee90c
dnl General Processing
rpm-build 3ee90c
dnl ===============================================
rpm-build 3ee90c
rpm-build 3ee90c
AC_DEFINE_UNQUOTED(PACEMAKER_VERSION, "$PACKAGE_VERSION",
rpm-build 3ee90c
                   [Current pacemaker version])
rpm-build 3ee90c
rpm-build 3ee90c
PACKAGE_SERIES=`echo $PACKAGE_VERSION | awk -F. '{ print $1"."$2 }'`
rpm-build 3ee90c
AC_SUBST(PACKAGE_SERIES)
rpm-build 3ee90c
AC_SUBST(PACKAGE_VERSION)
rpm-build 3ee90c
rpm-build 3ee90c
AC_PROG_LN_S
rpm-build 3ee90c
AC_PROG_MKDIR_P
rpm-build 3ee90c
rpm-build 3ee90c
if cc_supports_flag -Werror; then
rpm-build 3ee90c
    WERROR="-Werror"
rpm-build 3ee90c
else
rpm-build 3ee90c
    WERROR=""
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
# Normalize enable_fatal_warnings (defaulting to yes, when compiler supports it)
rpm-build 3ee90c
if test "x${enable_fatal_warnings}" != "xno" ; then
rpm-build 3ee90c
    if test "$GCC" = "yes" && test "x${WERROR}" != "x" ; then
rpm-build 3ee90c
        enable_fatal_warnings=yes
rpm-build 3ee90c
    else
rpm-build 3ee90c
        AC_MSG_NOTICE(Compiler does not support fatal warnings)
rpm-build 3ee90c
        enable_fatal_warnings=no
rpm-build 3ee90c
    fi
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
INIT_EXT=""
rpm-build 3ee90c
echo Our Host OS: $host_os/$host
rpm-build 3ee90c
rpm-build 3ee90c
AC_MSG_NOTICE(Sanitizing prefix: ${prefix})
rpm-build 3ee90c
case $prefix in
rpm-build 3ee90c
    NONE)
rpm-build 3ee90c
        prefix=/usr
rpm-build 3ee90c
        dnl Fix default variables - "prefix" variable if not specified
rpm-build 3ee90c
        if test "$localstatedir" = "\${prefix}/var"; then
rpm-build 3ee90c
            localstatedir="/var"
rpm-build 3ee90c
        fi
rpm-build 3ee90c
        if test "$sysconfdir" = "\${prefix}/etc"; then
rpm-build 3ee90c
            sysconfdir="/etc"
rpm-build 3ee90c
        fi
rpm-build 3ee90c
        ;;
rpm-build 3ee90c
esac
rpm-build 3ee90c
rpm-build 3ee90c
AC_MSG_NOTICE(Sanitizing exec_prefix: ${exec_prefix})
rpm-build 3ee90c
case $exec_prefix in
rpm-build 3ee90c
    prefix|NONE)
rpm-build 3ee90c
        exec_prefix=$prefix
rpm-build 3ee90c
        ;;
rpm-build 3ee90c
esac
rpm-build 3ee90c
rpm-build 3ee90c
AC_MSG_NOTICE(Sanitizing INITDIR: ${INITDIR})
rpm-build 3ee90c
case $INITDIR in
rpm-build 3ee90c
    prefix) INITDIR=$prefix;;
rpm-build 3ee90c
    "")
rpm-build 3ee90c
        AC_MSG_CHECKING(which init (rc) directory to use)
rpm-build 3ee90c
        for initdir in /etc/init.d /etc/rc.d/init.d /sbin/init.d \
rpm-build 3ee90c
            /usr/local/etc/rc.d /etc/rc.d
rpm-build 3ee90c
        do
rpm-build 3ee90c
            if
rpm-build 3ee90c
                test -d $initdir
rpm-build 3ee90c
            then
rpm-build 3ee90c
                INITDIR=$initdir
rpm-build 3ee90c
                break
rpm-build 3ee90c
            fi
rpm-build 3ee90c
        done
rpm-build 3ee90c
        AC_MSG_RESULT($INITDIR)
rpm-build 3ee90c
        ;;
rpm-build 3ee90c
esac
rpm-build 3ee90c
AC_SUBST(INITDIR)
rpm-build 3ee90c
rpm-build 3ee90c
AC_MSG_NOTICE(Sanitizing libdir: ${libdir})
rpm-build 3ee90c
case $libdir in
rpm-build 3ee90c
    prefix|NONE)
rpm-build 3ee90c
        AC_MSG_CHECKING(which lib directory to use)
rpm-build 3ee90c
        for aDir in lib64 lib
rpm-build 3ee90c
        do
rpm-build 3ee90c
            trydir="${exec_prefix}/${aDir}"
rpm-build 3ee90c
            if
rpm-build 3ee90c
                test -d ${trydir}
rpm-build 3ee90c
            then
rpm-build 3ee90c
                libdir=${trydir}
rpm-build 3ee90c
                break
rpm-build 3ee90c
            fi
rpm-build 3ee90c
        done
rpm-build 3ee90c
        AC_MSG_RESULT($libdir);
rpm-build 3ee90c
        ;;
rpm-build 3ee90c
esac
rpm-build 3ee90c
rpm-build 3ee90c
dnl Expand autoconf variables so that we don't end up with '${prefix}'
rpm-build 3ee90c
dnl in #defines and python scripts
rpm-build 3ee90c
dnl NOTE: Autoconf deliberately leaves them unexpanded to allow
rpm-build 3ee90c
dnl    make exec_prefix=/foo install
rpm-build 3ee90c
dnl No longer being able to do this seems like no great loss to me...
rpm-build 3ee90c
rpm-build 3ee90c
eval prefix="`eval echo ${prefix}`"
rpm-build 3ee90c
eval exec_prefix="`eval echo ${exec_prefix}`"
rpm-build 3ee90c
eval bindir="`eval echo ${bindir}`"
rpm-build 3ee90c
eval sbindir="`eval echo ${sbindir}`"
rpm-build 3ee90c
eval libexecdir="`eval echo ${libexecdir}`"
rpm-build 3ee90c
eval datadir="`eval echo ${datadir}`"
rpm-build 3ee90c
eval sysconfdir="`eval echo ${sysconfdir}`"
rpm-build 3ee90c
eval sharedstatedir="`eval echo ${sharedstatedir}`"
rpm-build 3ee90c
eval localstatedir="`eval echo ${localstatedir}`"
rpm-build 3ee90c
eval libdir="`eval echo ${libdir}`"
rpm-build 3ee90c
eval includedir="`eval echo ${includedir}`"
rpm-build 3ee90c
eval oldincludedir="`eval echo ${oldincludedir}`"
rpm-build 3ee90c
eval infodir="`eval echo ${infodir}`"
rpm-build 3ee90c
eval mandir="`eval echo ${mandir}`"
rpm-build 3ee90c
rpm-build 3ee90c
dnl Home-grown variables
rpm-build 3ee90c
rpm-build 3ee90c
if [ test "x${runstatedir}" = "x" ]; then
rpm-build 3ee90c
    if [ test "x${pcmk_runstatedir}" = "x" ]; then
rpm-build 3ee90c
        runstatedir="${localstatedir}/run"
rpm-build 3ee90c
    else
rpm-build 3ee90c
        runstatedir="${pcmk_runstatedir}"
rpm-build 3ee90c
    fi
rpm-build 3ee90c
fi
rpm-build 3ee90c
eval runstatedir="$(eval echo ${runstatedir})"
rpm-build 3ee90c
AC_DEFINE_UNQUOTED([PCMK_RUN_DIR], ["$runstatedir"],
rpm-build 3ee90c
		   [Location for modifiable per-process data])
rpm-build 3ee90c
AC_SUBST(runstatedir)
rpm-build 3ee90c
rpm-build 3ee90c
eval INITDIR="${INITDIR}"
rpm-build 3ee90c
eval docdir="`eval echo ${docdir}`"
rpm-build 3ee90c
if test x"${docdir}" = x""; then
rpm-build 3ee90c
    docdir=${datadir}/doc/${PACKAGE}-${VERSION}
rpm-build 3ee90c
fi
rpm-build 3ee90c
AC_SUBST(docdir)
rpm-build 3ee90c
if test x"${CONFIGDIR}" = x""; then
rpm-build 3ee90c
    CONFIGDIR="${sysconfdir}/sysconfig"
rpm-build 3ee90c
fi
rpm-build 3ee90c
AC_SUBST(CONFIGDIR)
rpm-build 3ee90c
rpm-build 3ee90c
if test x"${CRM_LOG_DIR}" = x""; then
rpm-build 3ee90c
    CRM_LOG_DIR="${localstatedir}/log/pacemaker"
rpm-build 3ee90c
fi
rpm-build 3ee90c
AC_DEFINE_UNQUOTED(CRM_LOG_DIR,"$CRM_LOG_DIR", Location for Pacemaker log file)
rpm-build 3ee90c
AC_SUBST(CRM_LOG_DIR)
rpm-build 3ee90c
rpm-build 3ee90c
if test x"${CRM_BUNDLE_DIR}" = x""; then
rpm-build 3ee90c
    CRM_BUNDLE_DIR="${localstatedir}/log/pacemaker/bundles"
rpm-build 3ee90c
fi
rpm-build 3ee90c
AC_DEFINE_UNQUOTED(CRM_BUNDLE_DIR,"$CRM_BUNDLE_DIR", Location for Pacemaker bundle logs)
rpm-build 3ee90c
AC_SUBST(CRM_BUNDLE_DIR)
rpm-build 3ee90c
rpm-build 3ee90c
rpm-build 3ee90c
if test x"${PCMK_GNUTLS_PRIORITIES}" = x""; then
rpm-build 3ee90c
    AC_MSG_ERROR([Empty string not applicable with --with-gnutls-priorities])
rpm-build 3ee90c
fi
rpm-build 3ee90c
AC_DEFINE_UNQUOTED([PCMK_GNUTLS_PRIORITIES], ["$PCMK_GNUTLS_PRIORITIES"],
rpm-build 3ee90c
                   [GnuTLS cipher priorities])
rpm-build 3ee90c
rpm-build 3ee90c
if test x"${BUG_URL}" = x""; then
rpm-build 3ee90c
    BUG_URL="https://bugs.clusterlabs.org/enter_bug.cgi?product=Pacemaker"
rpm-build 3ee90c
fi
rpm-build 3ee90c
AC_SUBST(BUG_URL)
rpm-build 3ee90c
rpm-build 3ee90c
for j in prefix exec_prefix bindir sbindir libexecdir datadir sysconfdir \
rpm-build 3ee90c
    sharedstatedir localstatedir libdir includedir oldincludedir infodir \
rpm-build 3ee90c
    mandir INITDIR docdir CONFIGDIR
rpm-build 3ee90c
do
rpm-build 3ee90c
    dirname=`eval echo '${'${j}'}'`
rpm-build 3ee90c
    if
rpm-build 3ee90c
        test ! -d "$dirname"
rpm-build 3ee90c
    then
rpm-build 3ee90c
        AC_MSG_WARN([$j directory ($dirname) does not exist!])
rpm-build 3ee90c
    fi
rpm-build 3ee90c
done
rpm-build 3ee90c
rpm-build 3ee90c
us_auth=
rpm-build 3ee90c
AC_CHECK_HEADER([sys/socket.h], [
rpm-build 3ee90c
    AC_CHECK_DECL([SO_PEERCRED], [
rpm-build 3ee90c
        # Linux
rpm-build 3ee90c
        AC_CHECK_TYPE([struct ucred], [
rpm-build 3ee90c
            us_auth=peercred_ucred;
rpm-build 3ee90c
            AC_DEFINE([US_AUTH_PEERCRED_UCRED], [1],
rpm-build 3ee90c
                      [Define if Unix socket auth method is
rpm-build 3ee90c
                       getsockopt(s, SO_PEERCRED, &ucred, ...)])
rpm-build 3ee90c
        ], [
rpm-build 3ee90c
            # OpenBSD
rpm-build 3ee90c
            AC_CHECK_TYPE([struct sockpeercred], [
rpm-build 3ee90c
                us_auth=localpeercred_sockepeercred;
rpm-build 3ee90c
                AC_DEFINE([US_AUTH_PEERCRED_SOCKPEERCRED], [1],
rpm-build 3ee90c
                          [Define if Unix socket auth method is
rpm-build 3ee90c
                           getsockopt(s, SO_PEERCRED, &sockpeercred, ...)])
rpm-build 3ee90c
            ], [], [[#include <sys/socket.h>]])
rpm-build 3ee90c
        ], [[#define _GNU_SOURCE
rpm-build 3ee90c
             #include <sys/socket.h>]])
rpm-build 3ee90c
    ], [], [[#include <sys/socket.h>]])
rpm-build 3ee90c
])
rpm-build 3ee90c
rpm-build 3ee90c
if test -z "${us_auth}"; then
rpm-build 3ee90c
    # FreeBSD
rpm-build 3ee90c
    AC_CHECK_DECL([getpeereid], [
rpm-build 3ee90c
        us_auth=getpeereid;
rpm-build 3ee90c
        AC_DEFINE([US_AUTH_GETPEEREID], [1],
rpm-build 3ee90c
                  [Define if Unix socket auth method is
rpm-build 3ee90c
                   getpeereid(s, &uid, &gid)])
rpm-build 3ee90c
    ], [
rpm-build 3ee90c
        # Solaris/OpenIndiana
rpm-build 3ee90c
        AC_CHECK_DECL([getpeerucred], [
rpm-build 3ee90c
            us_auth=getpeerucred;
rpm-build 3ee90c
            AC_DEFINE([US_AUTH_GETPEERUCRED], [1],
rpm-build 3ee90c
                      [Define if Unix socket auth method is
rpm-build 3ee90c
                       getpeercred(s, &ucred)])
rpm-build 3ee90c
        ], [
rpm-build 3ee90c
            AC_MSG_ERROR([No way to authenticate a Unix socket peer])
rpm-build 3ee90c
        ], [[#include <ucred.h>]])
rpm-build 3ee90c
    ])
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
dnl This OS-based decision-making is poor autotools practice;
rpm-build 3ee90c
dnl feature-based mechanisms are strongly preferred.
rpm-build 3ee90c
dnl
rpm-build 3ee90c
dnl So keep this section to a bare minimum; regard as a "necessary evil".
rpm-build 3ee90c
rpm-build 3ee90c
case "$host_os" in
rpm-build 3ee90c
    *bsd*)
rpm-build 3ee90c
        AC_DEFINE_UNQUOTED(ON_BSD, 1, Compiling for BSD platform)
rpm-build 3ee90c
        LIBS="-L/usr/local/lib"
rpm-build 3ee90c
        CPPFLAGS="$CPPFLAGS -I/usr/local/include"
rpm-build 3ee90c
        INIT_EXT=".sh"
rpm-build 3ee90c
        ;;
rpm-build 3ee90c
    *solaris*)
rpm-build 3ee90c
        AC_DEFINE_UNQUOTED(ON_SOLARIS, 1, Compiling for Solaris platform)
rpm-build 3ee90c
        ;;
rpm-build 3ee90c
    *linux*)
rpm-build 3ee90c
        AC_DEFINE_UNQUOTED(ON_LINUX, 1, Compiling for Linux platform)
rpm-build 3ee90c
        ;;
rpm-build 3ee90c
    darwin*)
rpm-build 3ee90c
        AC_DEFINE_UNQUOTED(ON_DARWIN, 1, Compiling for Darwin platform)
rpm-build 3ee90c
        LIBS="$LIBS -L${prefix}/lib"
rpm-build 3ee90c
        CFLAGS="$CFLAGS -I${prefix}/include"
rpm-build 3ee90c
        ;;
rpm-build 3ee90c
esac
rpm-build 3ee90c
rpm-build 3ee90c
AC_SUBST(INIT_EXT)
rpm-build 3ee90c
AC_MSG_NOTICE(Host CPU: $host_cpu)
rpm-build 3ee90c
rpm-build 3ee90c
case "$host_cpu" in
rpm-build 3ee90c
    ppc64|powerpc64)
rpm-build 3ee90c
        case $CFLAGS in
rpm-build 3ee90c
         *powerpc64*)
rpm-build 3ee90c
             ;;
rpm-build 3ee90c
         *)
rpm-build 3ee90c
             if test "$GCC" = yes; then
rpm-build 3ee90c
                 CFLAGS="$CFLAGS -m64"
rpm-build 3ee90c
             fi
rpm-build 3ee90c
             ;;
rpm-build 3ee90c
        esac
rpm-build 3ee90c
        ;;
rpm-build 3ee90c
esac
rpm-build 3ee90c
rpm-build 3ee90c
# C99 doesn't guarantee uint64_t type and related format specifiers, but
rpm-build 3ee90c
# prerequisites, corosync + libqb, use that widely, so the target platforms
rpm-build 3ee90c
# are already pre-constrained to those "64bit-clean" (doesn't imply native
rpm-build 3ee90c
# bit width) and hence we deliberately refrain from artificial surrogates
rpm-build 3ee90c
# (sans manipulation through cached values).
rpm-build 3ee90c
AC_CACHE_VAL(
rpm-build 3ee90c
    [pcmk_cv_decl_inttypes],
rpm-build 3ee90c
    [
rpm-build 3ee90c
        AC_CHECK_DECLS(
rpm-build 3ee90c
            [PRIu64, PRIu32, PRIx32,
rpm-build 3ee90c
             SCNu64],
rpm-build 3ee90c
            [pcmk_cv_decl_inttypes="PRIu64 PRIu32 PRIx32 SCNu64"],
rpm-build 3ee90c
            [
rpm-build 3ee90c
                # test shall only react on "no" cached result & error out respectively
rpm-build 3ee90c
                if test "x$ac_cv_have_decl_PRIu64" = xno; then
rpm-build 3ee90c
                    AC_MSG_ERROR([lack of inttypes.h based specifier serving uint64_t (PRIu64)])
rpm-build 3ee90c
                elif test "x$ac_cv_have_decl_PRIu32" = xno; then
rpm-build 3ee90c
                    AC_MSG_ERROR([lack of inttypes.h based specifier serving uint32_t (PRIu32)])
rpm-build 3ee90c
                elif test "x$ac_cv_have_decl_PRIx32" = xno; then
rpm-build 3ee90c
                    AC_MSG_ERROR([lack of inttypes.h based hexa specifier serving uint32_t (PRIx32)])
rpm-build 3ee90c
                elif test "x$ac_cv_have_decl_SCNu64" = xno; then
rpm-build 3ee90c
                    AC_MSG_ERROR([lack of inttypes.h based specifier gathering uint64_t (SCNu64)])
rpm-build 3ee90c
                fi
rpm-build 3ee90c
            ],
rpm-build 3ee90c
            [[#include <inttypes.h>]]
rpm-build 3ee90c
        )
rpm-build 3ee90c
    ]
rpm-build 3ee90c
)
rpm-build 3ee90c
(
rpm-build 3ee90c
    set $pcmk_cv_decl_inttypes
rpm-build 3ee90c
    AC_DEFINE_UNQUOTED([U64T],  [$1], [Correct format specifier for U64T])
rpm-build 3ee90c
    AC_DEFINE_UNQUOTED([U32T],  [$2], [Correct format specifier for U32T])
rpm-build 3ee90c
    AC_DEFINE_UNQUOTED([X32T],  [$3], [Correct format specifier for X32T])
rpm-build 3ee90c
    AC_DEFINE_UNQUOTED([U64TS], [$4], [Correct format specifier for U64TS])
rpm-build 3ee90c
)
rpm-build 3ee90c
rpm-build 3ee90c
dnl ===============================================
rpm-build 3ee90c
dnl Program Paths
rpm-build 3ee90c
dnl ===============================================
rpm-build 3ee90c
rpm-build 3ee90c
PATH="$PATH:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin"
rpm-build 3ee90c
export PATH
rpm-build 3ee90c
rpm-build 3ee90c
dnl Replacing AC_PROG_LIBTOOL with AC_CHECK_PROG because LIBTOOL
rpm-build 3ee90c
dnl was NOT being expanded all the time thus causing things to fail.
rpm-build 3ee90c
AC_CHECK_PROGS(LIBTOOL, glibtool libtool libtool15 libtool13)
rpm-build 3ee90c
rpm-build 3ee90c
dnl Pacemaker's executable python scripts will invoke the python specified by
rpm-build 3ee90c
dnl configure's PYTHON variable. If not specified, AM_PATH_PYTHON will check a
rpm-build 3ee90c
dnl built-in list with (unversioned) "python" having precedence. To configure
rpm-build 3ee90c
dnl Pacemaker to use a specific python interpreter version, define PYTHON
rpm-build 3ee90c
dnl when calling configure, for example: ./configure PYTHON=/usr/bin/python3.6
rpm-build 3ee90c
rpm-build 3ee90c
dnl Ensure PYTHON is an absolute path
rpm-build 3ee90c
AC_PATH_PROG([PYTHON], [$PYTHON])
rpm-build 3ee90c
rpm-build 3ee90c
case "x$PYTHON" in
rpm-build 3ee90c
    x*python3*|x*platform-python*)
rpm-build 3ee90c
        dnl When used with Python 3, Pacemaker requires a minimum of 3.2
rpm-build 3ee90c
        AM_PATH_PYTHON([3.2])
rpm-build 3ee90c
        ;;
rpm-build 3ee90c
    *)
rpm-build 3ee90c
        dnl Otherwise, Pacemaker requires a minimum of 2.7
rpm-build 3ee90c
        AM_PATH_PYTHON([2.7])
rpm-build 3ee90c
        ;;
rpm-build 3ee90c
esac
rpm-build 3ee90c
rpm-build 3ee90c
AC_PATH_PROGS([ASCIIDOC_CONV], [asciidoc asciidoctor])
rpm-build 3ee90c
AC_PATH_PROG([HELP2MAN], [help2man])
rpm-build 3ee90c
AC_PATH_PROG([PUBLICAN], [publican])
rpm-build 3ee90c
AC_PATH_PROG([INKSCAPE], [inkscape])
rpm-build 3ee90c
AC_PATH_PROG([XSLTPROC], [xsltproc])
rpm-build 3ee90c
AC_PATH_PROG([XMLCATALOG], [xmlcatalog])
rpm-build 3ee90c
dnl BASH is already an environment variable, so use something else
rpm-build 3ee90c
AC_PATH_PROG([BASH_PATH], [bash])
rpm-build 3ee90c
rpm-build 3ee90c
PKG_PROG_PKG_CONFIG
rpm-build 3ee90c
# PKG_NOARCH_INSTALLDIR not available prior to pkg-config 0.27 and
rpm-build 3ee90c
# pkgconf 0.8.10, respectively (next line is to mimic that scenario)
rpm-build 3ee90c
dnl m4_ifdef([PKG_NOARCH_INSTALLDIR], [m4_undefine([PKG_NOARCH_INSTALLDIR])])
rpm-build 3ee90c
m4_ifndef([PKG_NOARCH_INSTALLDIR], [
rpm-build 3ee90c
    AC_DEFUN([PKG_NOARCH_INSTALLDIR], [
rpm-build 3ee90c
        AC_SUBST([noarch_pkgconfigdir], ['${datadir}/pkgconfig'])
rpm-build 3ee90c
    ])
rpm-build 3ee90c
])
rpm-build 3ee90c
PKG_NOARCH_INSTALLDIR
rpm-build 3ee90c
rpm-build 3ee90c
AC_PATH_PROGS(VALGRIND_BIN, valgrind, /usr/bin/valgrind)
rpm-build 3ee90c
AC_DEFINE_UNQUOTED(VALGRIND_BIN, "$VALGRIND_BIN", Valgrind command)
rpm-build 3ee90c
rpm-build 3ee90c
if test x"${LIBTOOL}" = x""; then
rpm-build 3ee90c
    AC_MSG_ERROR(You need (g)libtool installed in order to build ${PACKAGE})
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
dnl Bash is needed for building man pages and running regression tests
rpm-build 3ee90c
if test x"${BASH_PATH}" = x""; then
rpm-build 3ee90c
    AC_MSG_ERROR(bash must be installed in order to build ${PACKAGE})
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
AM_CONDITIONAL(BUILD_HELP, test x"${HELP2MAN}" != x"")
rpm-build 3ee90c
if test x"${HELP2MAN}" != x""; then
rpm-build 3ee90c
    PCMK_FEATURES="$PCMK_FEATURES generated-manpages"
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
MANPAGE_XSLT=""
rpm-build 3ee90c
if test x"${XSLTPROC}" != x""; then
rpm-build 3ee90c
    AC_MSG_CHECKING(docbook to manpage transform)
rpm-build 3ee90c
    # first try to figure out correct template using xmlcatalog query,
rpm-build 3ee90c
    # resort to extensive (semi-deterministic) file search if that fails
rpm-build 3ee90c
    DOCBOOK_XSL_URI='http://docbook.sourceforge.net/release/xsl/current'
rpm-build 3ee90c
    DOCBOOK_XSL_PATH='manpages/docbook.xsl'
rpm-build 3ee90c
    MANPAGE_XSLT=$(${XMLCATALOG} "" ${DOCBOOK_XSL_URI}/${DOCBOOK_XSL_PATH} \
rpm-build 3ee90c
                   | sed -n 's|^file://||p;q')
rpm-build 3ee90c
    if test x"${MANPAGE_XSLT}" = x""; then
rpm-build 3ee90c
        DIRS=$(find "${datadir}" -name $(basename $(dirname ${DOCBOOK_XSL_PATH})) \
rpm-build 3ee90c
               -type d | LC_ALL=C sort)
rpm-build 3ee90c
        XSLT=$(basename ${DOCBOOK_XSL_PATH})
rpm-build 3ee90c
        for d in ${DIRS}; do
rpm-build 3ee90c
            if test -f "${d}/${XSLT}"; then
rpm-build 3ee90c
                 MANPAGE_XSLT="${d}/${XSLT}"
rpm-build 3ee90c
                 break
rpm-build 3ee90c
            fi
rpm-build 3ee90c
        done
rpm-build 3ee90c
    fi
rpm-build 3ee90c
fi
rpm-build 3ee90c
AC_MSG_RESULT($MANPAGE_XSLT)
rpm-build 3ee90c
AC_SUBST(MANPAGE_XSLT)
rpm-build 3ee90c
rpm-build 3ee90c
AM_CONDITIONAL(BUILD_XML_HELP, test x"${MANPAGE_XSLT}" != x"")
rpm-build 3ee90c
if test x"${MANPAGE_XSLT}" != x""; then
rpm-build 3ee90c
    PCMK_FEATURES="$PCMK_FEATURES agent-manpages"
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
AM_CONDITIONAL([IS_ASCIIDOC], [echo "${ASCIIDOC_CONV}" | grep -Eq 'asciidoc$'])
rpm-build 3ee90c
AM_CONDITIONAL([BUILD_ASCIIDOC], [test "x${ASCIIDOC_CONV}" != x])
rpm-build 3ee90c
if test "x${ASCIIDOC_CONV}" != x; then
rpm-build 3ee90c
    PCMK_FEATURES="$PCMK_FEATURES ascii-docs"
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
publican_intree_brand=no
rpm-build 3ee90c
if test x"${PUBLICAN_BRAND}" != x"" \
rpm-build 3ee90c
   && test x"${PUBLICAN}" != x"" \
rpm-build 3ee90c
   && test x"${INKSCAPE}" != x""; then
rpm-build 3ee90c
rpm-build 3ee90c
    dnl special handling for clusterlabs brand (possibly in-tree version used)
rpm-build 3ee90c
    test "${PUBLICAN_BRAND}" != "clusterlabs" \
rpm-build 3ee90c
        || test -d /usr/share/publican/Common_Content/clusterlabs
rpm-build 3ee90c
    if test $? -ne 0; then
rpm-build 3ee90c
        dnl Unknown option: brand_dir vs. Option brand_dir requires an argument
rpm-build 3ee90c
        if ${PUBLICAN} build --brand_dir 2>&1 | grep -Eq 'brand_dir$'; then
rpm-build 3ee90c
            AC_MSG_WARN([Cannot use in-tree clusterlabs brand, resorting to common])
rpm-build 3ee90c
            PUBLICAN_BRAND=common
rpm-build 3ee90c
        else
rpm-build 3ee90c
            publican_intree_brand=yes
rpm-build 3ee90c
        fi
rpm-build 3ee90c
    fi
rpm-build 3ee90c
    AC_MSG_NOTICE([Enabling Publican-generated documentation using ${PUBLICAN_BRAND} brand])
rpm-build 3ee90c
    PCMK_FEATURES="$PCMK_FEATURES publican-docs"
rpm-build 3ee90c
fi
rpm-build 3ee90c
AM_CONDITIONAL([BUILD_DOCBOOK],
rpm-build 3ee90c
               [test x"${PUBLICAN_BRAND}" != x"" \
rpm-build 3ee90c
                && test x"${PUBLICAN}" != x"" \
rpm-build 3ee90c
                && test x"${INKSCAPE}" != x""])
rpm-build 3ee90c
AM_CONDITIONAL([PUBLICAN_INTREE_BRAND],
rpm-build 3ee90c
               [test x"${publican_intree_brand}" = x"yes"])
rpm-build 3ee90c
rpm-build 3ee90c
dnl Pacemaker's shell scripts (and thus man page builders) rely on GNU getopt
rpm-build 3ee90c
AC_MSG_CHECKING([for GNU-compatible getopt])
rpm-build 3ee90c
IFS_orig=$IFS
rpm-build 3ee90c
IFS=:
rpm-build 3ee90c
for PATH_DIR in $PATH; do
rpm-build 3ee90c
    IFS=$IFS_orig
rpm-build 3ee90c
    GETOPT_PATH="${PATH_DIR}/getopt"
rpm-build 3ee90c
    if test -f "$GETOPT_PATH" && test -x "$GETOPT_PATH" ; then
rpm-build 3ee90c
        $GETOPT_PATH -T >/dev/null 2>/dev/null
rpm-build 3ee90c
        if test $? -eq 4; then
rpm-build 3ee90c
            break
rpm-build 3ee90c
        fi
rpm-build 3ee90c
    fi
rpm-build 3ee90c
    GETOPT_PATH=""
rpm-build 3ee90c
done
rpm-build 3ee90c
IFS=$IFS_orig
rpm-build 3ee90c
if test -n "$GETOPT_PATH"; then
rpm-build 3ee90c
  AC_MSG_RESULT([$GETOPT_PATH])
rpm-build 3ee90c
else
rpm-build 3ee90c
  AC_MSG_RESULT([no])
rpm-build 3ee90c
  AC_MSG_ERROR(Pacemaker build requires a GNU-compatible getopt)
rpm-build 3ee90c
fi
rpm-build 3ee90c
AC_SUBST([GETOPT_PATH])
rpm-build 3ee90c
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
dnl checks for library functions to replace them
rpm-build 3ee90c
dnl
rpm-build 3ee90c
dnl     NoSuchFunctionName:
rpm-build 3ee90c
dnl             is a dummy function which no system supplies.  It is here to make
rpm-build 3ee90c
dnl             the system compile semi-correctly on OpenBSD which doesn't know
rpm-build 3ee90c
dnl             how to create an empty archive
rpm-build 3ee90c
dnl
rpm-build 3ee90c
dnl     scandir: Only on BSD.
rpm-build 3ee90c
dnl             System-V systems may have it, but hidden and/or deprecated.
rpm-build 3ee90c
dnl             A replacement function is supplied for it.
rpm-build 3ee90c
dnl
rpm-build 3ee90c
dnl     setenv: is some bsdish function that should also be avoided (use
rpm-build 3ee90c
dnl             putenv instead)
rpm-build 3ee90c
dnl             On the other hand, putenv doesn't provide the right API for the
rpm-build 3ee90c
dnl             code and has memory leaks designed in (sigh...)  Fortunately this
rpm-build 3ee90c
dnl             A replacement function is supplied for it.
rpm-build 3ee90c
dnl
rpm-build 3ee90c
dnl     strerror: returns a string that corresponds to an errno.
rpm-build 3ee90c
dnl             A replacement function is supplied for it.
rpm-build 3ee90c
dnl
rpm-build 3ee90c
dnl     strnlen: is a gnu function similar to strlen, but safer.
rpm-build 3ee90c
dnl            We wrote a tolerably-fast replacement function for it.
rpm-build 3ee90c
dnl
rpm-build 3ee90c
dnl     strndup: is a gnu function similar to strdup, but safer.
rpm-build 3ee90c
dnl            We wrote a tolerably-fast replacement function for it.
rpm-build 3ee90c
rpm-build 3ee90c
AC_REPLACE_FUNCS(alphasort NoSuchFunctionName scandir setenv strerror strchrnul unsetenv strnlen strndup)
rpm-build 3ee90c
rpm-build 3ee90c
dnl ===============================================
rpm-build 3ee90c
dnl Libraries
rpm-build 3ee90c
dnl ===============================================
rpm-build 3ee90c
AC_CHECK_LIB(socket, socket)                    dnl -lsocket
rpm-build 3ee90c
AC_CHECK_LIB(c, dlopen)                         dnl if dlopen is in libc...
rpm-build 3ee90c
AC_CHECK_LIB(dl, dlopen)                        dnl -ldl (for Linux)
rpm-build 3ee90c
AC_CHECK_LIB(rt, sched_getscheduler)            dnl -lrt (for Tru64)
rpm-build 3ee90c
AC_CHECK_LIB(gnugetopt, getopt_long)            dnl -lgnugetopt ( if available )
rpm-build 3ee90c
AC_CHECK_LIB(pam, pam_start)                    dnl -lpam (if available)
rpm-build 3ee90c
rpm-build 3ee90c
AC_CHECK_FUNCS([sched_setscheduler])
rpm-build 3ee90c
if test "$ac_cv_func_sched_setscheduler" != yes; then
rpm-build 3ee90c
	PC_LIBS_RT=""
rpm-build 3ee90c
else
rpm-build 3ee90c
	PC_LIBS_RT="-lrt"
rpm-build 3ee90c
fi
rpm-build 3ee90c
AC_SUBST(PC_LIBS_RT)
rpm-build 3ee90c
rpm-build 3ee90c
AC_CHECK_LIB(uuid, uuid_parse)                  dnl load the library if necessary
rpm-build 3ee90c
AC_CHECK_FUNCS(uuid_unparse)                    dnl OSX ships uuid_* as standard functions
rpm-build 3ee90c
rpm-build 3ee90c
AC_CHECK_HEADERS(uuid/uuid.h)
rpm-build 3ee90c
rpm-build 3ee90c
if test "x$ac_cv_func_uuid_unparse" != xyes; then
rpm-build 3ee90c
    AC_MSG_ERROR(You do not have the libuuid development package installed)
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
if test x"${PKG_CONFIG}" = x""; then
rpm-build 3ee90c
    AC_MSG_ERROR(You need pkgconfig installed in order to build ${PACKAGE})
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
# Require glib 2.16.0 (2008-03) or later for g_hash_table_iter_init() etc.
rpm-build 3ee90c
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.16.0],
rpm-build 3ee90c
                  [CPPFLAGS="${CPPFLAGS} ${GLIB_CFLAGS}"
rpm-build 3ee90c
                   LIBS="${LIBS} ${GLIB_LIBS}"])
rpm-build 3ee90c
rpm-build 3ee90c
#
rpm-build 3ee90c
# Where is dlopen?
rpm-build 3ee90c
#
rpm-build 3ee90c
if test "$ac_cv_lib_c_dlopen" = yes; then
rpm-build 3ee90c
    LIBADD_DL=""
rpm-build 3ee90c
elif test "$ac_cv_lib_dl_dlopen" = yes; then
rpm-build 3ee90c
    LIBADD_DL=-ldl
rpm-build 3ee90c
else
rpm-build 3ee90c
    LIBADD_DL=${lt_cv_dlopen_libs}
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
dnl FreeBSD needs -lcompat for ftime() used by lrmd.c
rpm-build 3ee90c
AC_CHECK_LIB([compat], [ftime], [COMPAT_LIBS='-lcompat'])
rpm-build 3ee90c
AC_SUBST(COMPAT_LIBS)
rpm-build 3ee90c
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
dnl Headers
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
rpm-build 3ee90c
dnl Some distributions insert #warnings into deprecated headers such as
rpm-build 3ee90c
dnl timeb.h. If we will enable fatal warnings for the build, then enable
rpm-build 3ee90c
dnl them for the header checks as well, otherwise the build could fail
rpm-build 3ee90c
dnl even though the header check succeeds. (We should probably be doing
rpm-build 3ee90c
dnl this in more places.)
rpm-build 3ee90c
if test "x${enable_fatal_warnings}" = xyes ; then
rpm-build 3ee90c
    cc_temp_flags "$CFLAGS $WERROR"
rpm-build 3ee90c
fi
rpm-build 3ee90c
AC_CHECK_HEADERS(arpa/inet.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(ctype.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(dirent.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(errno.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(getopt.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(glib.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(grp.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(limits.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(linux/swab.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(malloc.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(netdb.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(netinet/in.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(netinet/ip.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(pwd.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(sgtty.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(signal.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(stdarg.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(stddef.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(stdio.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(stdlib.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(string.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(strings.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(sys/dir.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(sys/ioctl.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(sys/param.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(sys/reboot.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(sys/resource.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(sys/socket.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(sys/signalfd.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(sys/sockio.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(sys/stat.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(sys/time.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(sys/timeb.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(sys/types.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(sys/utsname.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(sys/wait.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(time.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(unistd.h)
rpm-build 3ee90c
if test "x${enable_fatal_warnings}" = xyes ; then
rpm-build 3ee90c
    cc_restore_flags
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
dnl These headers need prerequisites before the tests will pass
rpm-build 3ee90c
dnl AC_CHECK_HEADERS(net/if.h)
rpm-build 3ee90c
rpm-build 3ee90c
PKG_CHECK_MODULES(LIBXML2, [libxml-2.0],
rpm-build 3ee90c
                  [CPPFLAGS="${CPPFLAGS} ${LIBXML2_CFLAGS}"
rpm-build 3ee90c
                   LIBS="${LIBS} ${LIBXML2_LIBS}"])
rpm-build 3ee90c
AC_CHECK_HEADERS(libxml/xpath.h)
rpm-build 3ee90c
if test "$ac_cv_header_libxml_xpath_h" != "yes"; then
rpm-build 3ee90c
    AC_MSG_ERROR(libxml development headers not found)
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
AC_CHECK_LIB(xslt, xsltApplyStylesheet, [],
rpm-build 3ee90c
             AC_MSG_ERROR(Unsupported libxslt library version))
rpm-build 3ee90c
AC_CHECK_HEADERS(libxslt/xslt.h)
rpm-build 3ee90c
if test "$ac_cv_header_libxslt_xslt_h" != "yes"; then
rpm-build 3ee90c
    AC_MSG_ERROR(libxslt development headers not found)
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
AC_CACHE_CHECK(whether __progname and __progname_full are available,
rpm-build 3ee90c
               pf_cv_var_progname,
rpm-build 3ee90c
               AC_TRY_LINK([extern char *__progname, *__progname_full;],
rpm-build 3ee90c
                           [__progname = "foo"; __progname_full = "foo bar";],
rpm-build 3ee90c
                           pf_cv_var_progname="yes", pf_cv_var_progname="no"))
rpm-build 3ee90c
rpm-build 3ee90c
if test "$pf_cv_var_progname" = "yes"; then
rpm-build 3ee90c
    AC_DEFINE(HAVE___PROGNAME,1,[ ])
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
dnl Generic declarations
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
rpm-build 3ee90c
AC_CHECK_DECLS([CLOCK_MONOTONIC], [], [], [[
rpm-build 3ee90c
    #include <time.h>
rpm-build 3ee90c
]])
rpm-build 3ee90c
rpm-build 3ee90c
# the above alone could allow using clock_gettime(CLOCK_MONOTONIC, ...)
rpm-build 3ee90c
# in daemons/execd/execd_commands.c, but due to discovery of ftime causing
rpm-build 3ee90c
# buildability problems in an out-of-the-box procedure with very recent glibc
rpm-build 3ee90c
# snapshots (for which the above is meant to be a definitive solution)
rpm-build 3ee90c
# coming very late prior to release, it is intentionally kept as opt-in,
rpm-build 3ee90c
# with the line below (export CPPFLAGS="$CPPFLAGS -UPCMK_TIME_EMERGENCY_CGT"
rpm-build 3ee90c
# or comment it out to revert this conservative delay of the roll out, e.g.,
rpm-build 3ee90c
# when you hit said problems we eventually want to resolve, as already
rpm-build 3ee90c
# materialized in Fedora Rawhide at this time), with the plan this
rpm-build 3ee90c
# will only be applied in 2.0.3 release and will become opt-out since
rpm-build 3ee90c
# (which hopefully explains the name of the macro as it will start to
rpm-build 3ee90c
# make more sense then, and the continuity is important)
rpm-build 3ee90c
CPPFLAGS="-DPCMK_TIME_EMERGENCY_CGT $CPPFLAGS"
rpm-build 3ee90c
rpm-build 3ee90c
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
dnl Structures
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
rpm-build 3ee90c
AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[[#include <time.h>]])
rpm-build 3ee90c
AC_CHECK_MEMBERS([lrm_op_t.rsc_deleted],,,[[#include <lrm/lrm_api.h>]])
rpm-build 3ee90c
AC_CHECK_MEMBER([struct dirent.d_type],
rpm-build 3ee90c
    AC_DEFINE(HAVE_STRUCT_DIRENT_D_TYPE,1,[Define this if struct dirent has d_type]),,
rpm-build 3ee90c
    [#include <dirent.h>])
rpm-build 3ee90c
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
dnl Functions
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
rpm-build 3ee90c
AC_CHECK_FUNCS(getopt, AC_DEFINE(HAVE_DECL_GETOPT,  1, [Have getopt function]))
rpm-build 3ee90c
AC_CHECK_FUNCS(nanosleep, AC_DEFINE(HAVE_DECL_NANOSLEEP,  1, [Have nanosleep function]))
rpm-build 3ee90c
rpm-build 3ee90c
AC_CACHE_CHECK(whether sscanf supports %m,
rpm-build 3ee90c
               pf_cv_var_sscanf,
rpm-build 3ee90c
               AC_RUN_IFELSE([AC_LANG_SOURCE([[
rpm-build 3ee90c
#include <stdio.h>
rpm-build 3ee90c
const char *s = "some-command-line-arg";
rpm-build 3ee90c
int main(int argc, char **argv) {
rpm-build 3ee90c
char *name = NULL;
rpm-build 3ee90c
int n = sscanf(s, "%ms", &name);
rpm-build 3ee90c
return n == 1 ? 0 : 1;
rpm-build 3ee90c
}
rpm-build 3ee90c
]])],
rpm-build 3ee90c
                                 pf_cv_var_sscanf="yes", pf_cv_var_sscanf="no", pf_cv_var_sscanf="no"))
rpm-build 3ee90c
rpm-build 3ee90c
if test "$pf_cv_var_sscanf" = "yes"; then
rpm-build 3ee90c
    AC_DEFINE(SSCANF_HAS_M, 1, [ ])
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
dnl   bzip2
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
AC_CHECK_HEADERS(bzlib.h)
rpm-build 3ee90c
AC_CHECK_LIB(bz2, BZ2_bzBuffToBuffCompress)
rpm-build 3ee90c
rpm-build 3ee90c
if test x$ac_cv_lib_bz2_BZ2_bzBuffToBuffCompress != xyes ; then
rpm-build 3ee90c
    AC_MSG_ERROR(BZ2 libraries not found)
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
if test x$ac_cv_header_bzlib_h != xyes; then
rpm-build 3ee90c
    AC_MSG_ERROR(BZ2 Development headers not found)
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
dnl sighandler_t is missing from Illumos, Solaris11 systems
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
rpm-build 3ee90c
AC_MSG_CHECKING([for sighandler_t])
rpm-build 3ee90c
AC_TRY_COMPILE([#include <signal.h>],[sighandler_t *f;],
rpm-build 3ee90c
has_sighandler_t=yes,has_sighandler_t=no)
rpm-build 3ee90c
AC_MSG_RESULT($has_sighandler_t)
rpm-build 3ee90c
if test "$has_sighandler_t" = "yes" ; then
rpm-build 3ee90c
    AC_DEFINE( HAVE_SIGHANDLER_T, 1, [Define if sighandler_t available] )
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
dnl   ncurses
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
dnl
rpm-build 3ee90c
dnl A few OSes (e.g. Linux) deliver a default "ncurses" alongside "curses".
rpm-build 3ee90c
dnl Many non-Linux deliver "curses"; sites may add "ncurses".
rpm-build 3ee90c
dnl
rpm-build 3ee90c
dnl However, the source-code recommendation for both is to #include "curses.h"
rpm-build 3ee90c
dnl (i.e. "ncurses" still wants the include to be simple, no-'n', "curses.h").
rpm-build 3ee90c
dnl
rpm-build 3ee90c
dnl ncurse takes precedence.
rpm-build 3ee90c
dnl
rpm-build 3ee90c
AC_CHECK_HEADERS(curses.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(curses/curses.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(ncurses.h)
rpm-build 3ee90c
AC_CHECK_HEADERS(ncurses/ncurses.h)
rpm-build 3ee90c
rpm-build 3ee90c
dnl Although n-library is preferred, only look for it if the n-header was found.
rpm-build 3ee90c
CURSESLIBS=''
rpm-build 3ee90c
PC_NAME_CURSES=""
rpm-build 3ee90c
PC_LIBS_CURSES=""
rpm-build 3ee90c
if test "$ac_cv_header_ncurses_h" = "yes"; then
rpm-build 3ee90c
    AC_CHECK_LIB(ncurses, printw,
rpm-build 3ee90c
                 [AC_DEFINE(HAVE_LIBNCURSES,1, have ncurses library)])
rpm-build 3ee90c
    CURSESLIBS=`$PKG_CONFIG --libs ncurses` || CURSESLIBS='-lncurses'
rpm-build 3ee90c
    PC_NAME_CURSES="ncurses"
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
if test "$ac_cv_header_ncurses_ncurses_h" = "yes"; then
rpm-build 3ee90c
    AC_CHECK_LIB(ncurses, printw,
rpm-build 3ee90c
                 [AC_DEFINE(HAVE_LIBNCURSES,1, have ncurses library)])
rpm-build 3ee90c
    CURSESLIBS=`$PKG_CONFIG --libs ncurses` || CURSESLIBS='-lncurses'
rpm-build 3ee90c
    PC_NAME_CURSES="ncurses"
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
dnl Only look for non-n-library if there was no n-library.
rpm-build 3ee90c
if test X"$CURSESLIBS" = X"" -a "$ac_cv_header_curses_h" = "yes"; then
rpm-build 3ee90c
    AC_CHECK_LIB(curses, printw,
rpm-build 3ee90c
                 [CURSESLIBS='-lcurses'; AC_DEFINE(HAVE_LIBCURSES,1, have curses library)])
rpm-build 3ee90c
    PC_LIBS_CURSES="$CURSESLIBS"
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
dnl Only look for non-n-library if there was no n-library.
rpm-build 3ee90c
if test X"$CURSESLIBS" = X"" -a "$ac_cv_header_curses_curses_h" = "yes"; then
rpm-build 3ee90c
    AC_CHECK_LIB(curses, printw,
rpm-build 3ee90c
                 [CURSESLIBS='-lcurses'; AC_DEFINE(HAVE_LIBCURSES,1, have curses library)])
rpm-build 3ee90c
    PC_LIBS_CURSES="$CURSESLIBS"
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
if test "x$CURSESLIBS" != "x"; then
rpm-build 3ee90c
    PCMK_FEATURES="$PCMK_FEATURES ncurses"
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
dnl Check for printw() prototype compatibility
rpm-build 3ee90c
if test X"$CURSESLIBS" != X"" && cc_supports_flag -Wcast-qual; then
rpm-build 3ee90c
    ac_save_LIBS=$LIBS
rpm-build 3ee90c
    LIBS="$CURSESLIBS"
rpm-build 3ee90c
    cc_temp_flags "-Wcast-qual $WERROR"
rpm-build 3ee90c
    # avoid broken test because of hardened build environment in Fedora 23+
rpm-build 3ee90c
    # - https://fedoraproject.org/wiki/Changes/Harden_All_Packages
rpm-build 3ee90c
    # - https://bugzilla.redhat.com/1297985
rpm-build 3ee90c
    if cc_supports_flag -fPIC; then
rpm-build 3ee90c
        CFLAGS="$CFLAGS -fPIC"
rpm-build 3ee90c
    fi
rpm-build 3ee90c
rpm-build 3ee90c
    AC_MSG_CHECKING(whether printw() requires argument of "const char *")
rpm-build 3ee90c
    AC_LINK_IFELSE(
rpm-build 3ee90c
        [AC_LANG_PROGRAM([
rpm-build 3ee90c
#if defined(HAVE_NCURSES_H)
rpm-build 3ee90c
#  include <ncurses.h>
rpm-build 3ee90c
#elif defined(HAVE_NCURSES_NCURSES_H)
rpm-build 3ee90c
#  include <ncurses/ncurses.h>
rpm-build 3ee90c
#elif defined(HAVE_CURSES_H)
rpm-build 3ee90c
#  include <curses.h>
rpm-build 3ee90c
#endif
rpm-build 3ee90c
                         ],
rpm-build 3ee90c
                         [printw((const char *)"Test");]
rpm-build 3ee90c
        )],
rpm-build 3ee90c
        [pcmk_cv_compatible_printw=yes],
rpm-build 3ee90c
        [pcmk_cv_compatible_printw=no]
rpm-build 3ee90c
    )
rpm-build 3ee90c
rpm-build 3ee90c
    LIBS=$ac_save_LIBS
rpm-build 3ee90c
    cc_restore_flags
rpm-build 3ee90c
rpm-build 3ee90c
    AC_MSG_RESULT([$pcmk_cv_compatible_printw])
rpm-build 3ee90c
rpm-build 3ee90c
    if test "$pcmk_cv_compatible_printw" = no; then
rpm-build 3ee90c
        AC_MSG_WARN([The printw() function of your ncurses or curses library is old, we will disable usage of the library. If you want to use this library anyway, please update to newer version of the library, ncurses 5.4 or later is recommended. You can get the library from http://www.gnu.org/software/ncurses/.])
rpm-build 3ee90c
        AC_MSG_NOTICE([Disabling curses])
rpm-build 3ee90c
        AC_DEFINE(HAVE_INCOMPATIBLE_PRINTW, 1, [Do we have incompatible printw() in curses library?])
rpm-build 3ee90c
    fi
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
AC_SUBST(CURSESLIBS)
rpm-build 3ee90c
AC_SUBST(PC_NAME_CURSES)
rpm-build 3ee90c
AC_SUBST(PC_LIBS_CURSES)
rpm-build 3ee90c
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
dnl    Profiling and GProf
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
rpm-build 3ee90c
AC_MSG_NOTICE(Old CFLAGS: $CFLAGS)
rpm-build 3ee90c
case $SUPPORT_COVERAGE in
rpm-build 3ee90c
    1|yes|true)
rpm-build 3ee90c
        SUPPORT_PROFILING=1
rpm-build 3ee90c
        PCMK_FEATURES="$PCMK_FEATURES coverage"
rpm-build 3ee90c
        CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
rpm-build 3ee90c
        dnl During linking, make sure to specify -lgcov or -coverage
rpm-build 3ee90c
        ;;
rpm-build 3ee90c
esac
rpm-build 3ee90c
rpm-build 3ee90c
case $SUPPORT_PROFILING in
rpm-build 3ee90c
    1|yes|true)
rpm-build 3ee90c
        SUPPORT_PROFILING=1
rpm-build 3ee90c
rpm-build 3ee90c
        dnl Disable various compiler optimizations
rpm-build 3ee90c
        CFLAGS="$CFLAGS -fno-omit-frame-pointer -fno-inline -fno-builtin "
rpm-build 3ee90c
        dnl CFLAGS="$CFLAGS -fno-inline-functions -fno-default-inline -fno-inline-functions-called-once -fno-optimize-sibling-calls"
rpm-build 3ee90c
rpm-build 3ee90c
        dnl Turn off optimization so tools can get accurate line numbers
rpm-build 3ee90c
        CFLAGS=`echo $CFLAGS | sed -e 's/-O.\ //g' -e 's/-Wp,-D_FORTIFY_SOURCE=.\ //g' -e 's/-D_FORTIFY_SOURCE=.\ //g'`
rpm-build 3ee90c
        CFLAGS="$CFLAGS -O0 -g3 -gdwarf-2"
rpm-build 3ee90c
rpm-build 3ee90c
        dnl Update features
rpm-build 3ee90c
        PCMK_FEATURES="$PCMK_FEATURES profile"
rpm-build 3ee90c
        ;;
rpm-build 3ee90c
     *)
rpm-build 3ee90c
        SUPPORT_PROFILING=0
rpm-build 3ee90c
        ;;
rpm-build 3ee90c
esac
rpm-build 3ee90c
AC_MSG_NOTICE(New CFLAGS: $CFLAGS)
rpm-build 3ee90c
AC_DEFINE_UNQUOTED(SUPPORT_PROFILING, $SUPPORT_PROFILING, Support for profiling)
rpm-build 3ee90c
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
dnl    Cluster infrastructure - LibQB
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
rpm-build 3ee90c
if test x${enable_no_stack} = xyes; then
rpm-build 3ee90c
    SUPPORT_CS=no
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
PKG_CHECK_MODULES(libqb, libqb >= 0.13)
rpm-build 3ee90c
CPPFLAGS="$libqb_CFLAGS $CPPFLAGS"
rpm-build 3ee90c
LIBS="$libqb_LIBS $LIBS"
rpm-build 3ee90c
rpm-build 3ee90c
dnl libqb 0.14.0+ (2012-06)
rpm-build 3ee90c
AC_CHECK_LIB(qb, qb_ipcs_connection_auth_set)
rpm-build 3ee90c
rpm-build 3ee90c
PCMK_FEATURES="$PCMK_FEATURES libqb-logging libqb-ipc"
rpm-build 3ee90c
rpm-build 3ee90c
dnl libqb 0.17.0+ (2014-02)
rpm-build 3ee90c
AC_CHECK_FUNCS(qb_ipcs_connection_get_buffer_size,
rpm-build 3ee90c
               AC_DEFINE(HAVE_IPCS_GET_BUFFER_SIZE, 1,
rpm-build 3ee90c
                         [Have qb_ipcc_get_buffer_size function]))
rpm-build 3ee90c
rpm-build 3ee90c
dnl libqb not yet released (as of 2018-05)
rpm-build 3ee90c
CHECK_ENUM_VALUE([qb/qblog.h],[qb_log_conf],[QB_LOG_CONF_MAX_LINE_LEN])
rpm-build 3ee90c
CHECK_ENUM_VALUE([qb/qblog.h],[qb_log_conf],[QB_LOG_CONF_ELLIPSIS])
rpm-build 3ee90c
rpm-build 3ee90c
dnl Support Linux-HA fence agents if available
rpm-build 3ee90c
if test "$cross_compiling" != "yes"; then
rpm-build 3ee90c
    CPPFLAGS="$CPPFLAGS -I${prefix}/include/heartbeat"
rpm-build 3ee90c
fi
rpm-build 3ee90c
AC_CHECK_HEADERS(stonith/stonith.h)
rpm-build 3ee90c
if test "$ac_cv_header_stonith_stonith_h" = "yes";  then
rpm-build 3ee90c
    dnl On Debian, AC_CHECK_LIBS fail if a library has any unresolved symbols
rpm-build 3ee90c
    dnl So check for all the dependencies (so they're added to LIBS) before checking for -lplumb
rpm-build 3ee90c
    AC_CHECK_LIB(pils, PILLoadPlugin)
rpm-build 3ee90c
    AC_CHECK_LIB(plumb, G_main_add_IPC_Channel)
rpm-build 3ee90c
    PCMK_FEATURES="$PCMK_FEATURES lha-fencing"
rpm-build 3ee90c
fi
rpm-build 3ee90c
AM_CONDITIONAL([BUILD_LHA_SUPPORT], [test "$ac_cv_header_stonith_stonith_h" = "yes"])
rpm-build 3ee90c
rpm-build 3ee90c
dnl ===============================================
rpm-build 3ee90c
dnl Variables needed for substitution
rpm-build 3ee90c
dnl ===============================================
rpm-build 3ee90c
CRM_SCHEMA_DIRECTORY="${datadir}/pacemaker"
rpm-build 3ee90c
AC_DEFINE_UNQUOTED(CRM_SCHEMA_DIRECTORY,"$CRM_SCHEMA_DIRECTORY", Location for the Pacemaker Relax-NG Schema)
rpm-build 3ee90c
AC_SUBST(CRM_SCHEMA_DIRECTORY)
rpm-build 3ee90c
rpm-build 3ee90c
CRM_CORE_DIR="${localstatedir}/lib/pacemaker/cores"
rpm-build 3ee90c
AC_DEFINE_UNQUOTED(CRM_CORE_DIR,"$CRM_CORE_DIR", Location to store core files produced by Pacemaker daemons)
rpm-build 3ee90c
AC_SUBST(CRM_CORE_DIR)
rpm-build 3ee90c
rpm-build 3ee90c
if test x"${CRM_DAEMON_USER}" = x""; then
rpm-build 3ee90c
    CRM_DAEMON_USER="hacluster"
rpm-build 3ee90c
fi
rpm-build 3ee90c
AC_DEFINE_UNQUOTED(CRM_DAEMON_USER,"$CRM_DAEMON_USER", User to run Pacemaker daemons as)
rpm-build 3ee90c
AC_SUBST(CRM_DAEMON_USER)
rpm-build 3ee90c
rpm-build 3ee90c
if test x"${CRM_DAEMON_GROUP}" = x""; then
rpm-build 3ee90c
    CRM_DAEMON_GROUP="haclient"
rpm-build 3ee90c
fi
rpm-build 3ee90c
AC_DEFINE_UNQUOTED(CRM_DAEMON_GROUP,"$CRM_DAEMON_GROUP", Group to run Pacemaker daemons as)
rpm-build 3ee90c
AC_SUBST(CRM_DAEMON_GROUP)
rpm-build 3ee90c
rpm-build 3ee90c
CRM_PACEMAKER_DIR=${localstatedir}/lib/pacemaker
rpm-build 3ee90c
AC_DEFINE_UNQUOTED(CRM_PACEMAKER_DIR,"$CRM_PACEMAKER_DIR", Location to store directory produced by Pacemaker daemons)
rpm-build 3ee90c
AC_SUBST(CRM_PACEMAKER_DIR)
rpm-build 3ee90c
rpm-build 3ee90c
CRM_BLACKBOX_DIR=${localstatedir}/lib/pacemaker/blackbox
rpm-build 3ee90c
AC_DEFINE_UNQUOTED(CRM_BLACKBOX_DIR,"$CRM_BLACKBOX_DIR", Where to keep blackbox dumps)
rpm-build 3ee90c
AC_SUBST(CRM_BLACKBOX_DIR)
rpm-build 3ee90c
rpm-build 3ee90c
PE_STATE_DIR="${localstatedir}/lib/pacemaker/pengine"
rpm-build 3ee90c
AC_DEFINE_UNQUOTED(PE_STATE_DIR,"$PE_STATE_DIR", Where to keep scheduler outputs)
rpm-build 3ee90c
AC_SUBST(PE_STATE_DIR)
rpm-build 3ee90c
rpm-build 3ee90c
CRM_CONFIG_DIR="${localstatedir}/lib/pacemaker/cib"
rpm-build 3ee90c
AC_DEFINE_UNQUOTED(CRM_CONFIG_DIR,"$CRM_CONFIG_DIR", Where to keep configuration files)
rpm-build 3ee90c
AC_SUBST(CRM_CONFIG_DIR)
rpm-build 3ee90c
rpm-build 3ee90c
CRM_CONFIG_CTS="${localstatedir}/lib/pacemaker/cts"
rpm-build 3ee90c
AC_DEFINE_UNQUOTED(CRM_CONFIG_CTS,"$CRM_CONFIG_CTS", Where to keep cts stateful data)
rpm-build 3ee90c
AC_SUBST(CRM_CONFIG_CTS)
rpm-build 3ee90c
rpm-build 3ee90c
CRM_DAEMON_DIR="${libexecdir}/pacemaker"
rpm-build 3ee90c
AC_DEFINE_UNQUOTED(CRM_DAEMON_DIR,"$CRM_DAEMON_DIR", Location for Pacemaker daemons)
rpm-build 3ee90c
AC_SUBST(CRM_DAEMON_DIR)
rpm-build 3ee90c
rpm-build 3ee90c
CRM_STATE_DIR="${runstatedir}/crm"
rpm-build 3ee90c
AC_DEFINE_UNQUOTED([CRM_STATE_DIR], ["$CRM_STATE_DIR"],
rpm-build 3ee90c
		   [Where to keep state files and sockets])
rpm-build 3ee90c
AC_SUBST(CRM_STATE_DIR)
rpm-build 3ee90c
rpm-build 3ee90c
CRM_RSCTMP_DIR="${runstatedir}/resource-agents"
rpm-build 3ee90c
AC_DEFINE_UNQUOTED(CRM_RSCTMP_DIR,"$CRM_RSCTMP_DIR", Where resource agents should keep state files)
rpm-build 3ee90c
AC_SUBST(CRM_RSCTMP_DIR)
rpm-build 3ee90c
rpm-build 3ee90c
PACEMAKER_CONFIG_DIR="${sysconfdir}/pacemaker"
rpm-build 3ee90c
AC_DEFINE_UNQUOTED(PACEMAKER_CONFIG_DIR,"$PACEMAKER_CONFIG_DIR", Where to keep configuration files like authkey)
rpm-build 3ee90c
AC_SUBST(PACEMAKER_CONFIG_DIR)
rpm-build 3ee90c
rpm-build 3ee90c
OCF_RA_DIR="$OCF_ROOT_DIR/resource.d"
rpm-build 3ee90c
AC_DEFINE_UNQUOTED(OCF_RA_DIR,"$OCF_RA_DIR", Location for OCF RAs)
rpm-build 3ee90c
AC_SUBST(OCF_RA_DIR)
rpm-build 3ee90c
rpm-build 3ee90c
RH_STONITH_DIR="$sbindir"
rpm-build 3ee90c
AC_DEFINE_UNQUOTED(RH_STONITH_DIR,"$RH_STONITH_DIR", Location for Red Hat Stonith agents)
rpm-build 3ee90c
AC_DEFINE_UNQUOTED(SBIN_DIR,"$sbindir", Location for system binaries)
rpm-build 3ee90c
rpm-build 3ee90c
RH_STONITH_PREFIX="fence_"
rpm-build 3ee90c
AC_DEFINE_UNQUOTED(RH_STONITH_PREFIX,"$RH_STONITH_PREFIX", Prefix for Red Hat Stonith agents)
rpm-build 3ee90c
rpm-build 3ee90c
AC_PATH_PROGS(GIT, git false)
rpm-build 3ee90c
AC_MSG_CHECKING(build version)
rpm-build 3ee90c
rpm-build 3ee90c
BUILD_VERSION=4b1f869f0f
rpm-build 3ee90c
if test $BUILD_VERSION != ":%h$"; then
rpm-build 3ee90c
    AC_MSG_RESULT(archive hash: $BUILD_VERSION)
rpm-build 3ee90c
elif test -x $GIT -a -d .git; then
rpm-build 3ee90c
    BUILD_VERSION=`$GIT log --pretty="format:%h" -n 1`
rpm-build 3ee90c
    AC_MSG_RESULT(git hash: $BUILD_VERSION)
rpm-build 3ee90c
else
rpm-build 3ee90c
    # The current directory name make a reasonable default
rpm-build 3ee90c
    # Most generated archives will include the hash or tag
rpm-build 3ee90c
    BASE=`basename $PWD`
rpm-build 3ee90c
    BUILD_VERSION=`echo $BASE | sed s:.*[[Pp]]acemaker-::`
rpm-build 3ee90c
    AC_MSG_RESULT(directory based hash: $BUILD_VERSION)
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
AC_DEFINE_UNQUOTED(BUILD_VERSION, "$BUILD_VERSION", Build version)
rpm-build 3ee90c
AC_SUBST(BUILD_VERSION)
rpm-build 3ee90c
rpm-build 3ee90c
HAVE_dbus=1
rpm-build 3ee90c
PKG_CHECK_MODULES([DBUS], [dbus-1],
rpm-build 3ee90c
		  [CPPFLAGS="${CPPFLAGS} ${DBUS_CFLAGS}"],
rpm-build 3ee90c
		  [HAVE_dbus=0])
rpm-build 3ee90c
AC_DEFINE_UNQUOTED(SUPPORT_DBUS, $HAVE_dbus, Support dbus)
rpm-build 3ee90c
AM_CONDITIONAL(BUILD_DBUS, test $HAVE_dbus = 1)
rpm-build 3ee90c
AC_CHECK_TYPES([DBusBasicValue],,,[[#include <dbus/dbus.h>]])
rpm-build 3ee90c
if test $HAVE_dbus = 0; then
rpm-build 3ee90c
	PC_NAME_DBUS=""
rpm-build 3ee90c
else
rpm-build 3ee90c
	PC_NAME_DBUS="dbus-1"
rpm-build 3ee90c
fi
rpm-build 3ee90c
AC_SUBST(PC_NAME_DBUS)
rpm-build 3ee90c
rpm-build 3ee90c
if test "x${enable_systemd}" != xno; then
rpm-build 3ee90c
    if test $HAVE_dbus = 0; then
rpm-build 3ee90c
        if test "x${enable_systemd}" = xyes; then
rpm-build 3ee90c
            AC_MSG_FAILURE([cannot enable systemd without DBus])
rpm-build 3ee90c
        else
rpm-build 3ee90c
            enable_systemd=no
rpm-build 3ee90c
        fi
rpm-build 3ee90c
    fi
rpm-build 3ee90c
    if test "x${enable_systemd}" = xtry; then
rpm-build 3ee90c
        AC_MSG_CHECKING([for systemd version query result via dbus-send])
rpm-build 3ee90c
        ret=$({ dbus-send --system --print-reply \
rpm-build 3ee90c
                    --dest=org.freedesktop.systemd1 \
rpm-build 3ee90c
                    /org/freedesktop/systemd1 \
rpm-build 3ee90c
                    org.freedesktop.DBus.Properties.Get \
rpm-build 3ee90c
                    string:org.freedesktop.systemd1.Manager \
rpm-build 3ee90c
                    string:Version 2>/dev/null \
rpm-build 3ee90c
                || echo "this borked"; } | tail -n1)
rpm-build 3ee90c
        # sanitize output a bit (interested just in value, not type),
rpm-build 3ee90c
        # ret is intentionally unenquoted so as to normalize whitespace
rpm-build 3ee90c
        ret=$(echo ${ret} | cut -d' ' -f2-)
rpm-build 3ee90c
        AC_MSG_RESULT([${ret}])
rpm-build 3ee90c
        if test "x${ret}" != xborked \
rpm-build 3ee90c
           || systemctl --version 2>/dev/null | grep -q systemd; then
rpm-build 3ee90c
            enable_systemd=yes
rpm-build 3ee90c
        else
rpm-build 3ee90c
            enable_systemd=no
rpm-build 3ee90c
        fi
rpm-build 3ee90c
    fi
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
AC_MSG_CHECKING([whether to enable support for managing resources via systemd])
rpm-build 3ee90c
AC_MSG_RESULT([${enable_systemd}])
rpm-build 3ee90c
HAVE_systemd=0
rpm-build 3ee90c
if test "x${enable_systemd}" = xyes; then
rpm-build 3ee90c
    HAVE_systemd=1
rpm-build 3ee90c
    PCMK_FEATURES="$PCMK_FEATURES systemd"
rpm-build 3ee90c
rpm-build 3ee90c
    AC_MSG_CHECKING([which system unit file directory to use])
rpm-build 3ee90c
    PKG_CHECK_VAR([systemdsystemunitdir], [systemd], [systemdsystemunitdir])
rpm-build 3ee90c
    AC_MSG_RESULT([${systemdsystemunitdir}])
rpm-build 3ee90c
    if test "x${systemdsystemunitdir}" = x""; then
rpm-build 3ee90c
        AC_MSG_FAILURE([cannot enable systemd when systemdsystemunitdir unresolved])
rpm-build 3ee90c
    fi
rpm-build 3ee90c
fi
rpm-build 3ee90c
AC_SUBST([systemdsystemunitdir])
rpm-build 3ee90c
rpm-build 3ee90c
AC_DEFINE_UNQUOTED(SUPPORT_SYSTEMD, $HAVE_systemd, Support systemd based system services)
rpm-build 3ee90c
AM_CONDITIONAL(BUILD_SYSTEMD, test $HAVE_systemd = 1)
rpm-build 3ee90c
AC_SUBST(SUPPORT_SYSTEMD)
rpm-build 3ee90c
rpm-build 3ee90c
if test "x${enable_upstart}" != xno; then
rpm-build 3ee90c
    if test $HAVE_dbus = 0; then
rpm-build 3ee90c
        if test "x${enable_upstart}" = xyes; then
rpm-build 3ee90c
            AC_MSG_FAILURE([cannot enable Upstart without DBus])
rpm-build 3ee90c
        else
rpm-build 3ee90c
            enable_upstart=no
rpm-build 3ee90c
        fi
rpm-build 3ee90c
    fi
rpm-build 3ee90c
    if test "x${enable_upstart}" = xtry; then
rpm-build 3ee90c
        AC_MSG_CHECKING([for Upstart version query result via dbus-send])
rpm-build 3ee90c
        ret=$({ dbus-send --system --print-reply --dest=com.ubuntu.Upstart \
rpm-build 3ee90c
                    /com/ubuntu/Upstart org.freedesktop.DBus.Properties.Get \
rpm-build 3ee90c
                    string:com.ubuntu.Upstart0_6 string:version 2>/dev/null \
rpm-build 3ee90c
                || echo "this borked"; } | tail -n1)
rpm-build 3ee90c
        # sanitize output a bit (interested just in value, not type),
rpm-build 3ee90c
        # ret is intentionally unenquoted so as to normalize whitespace
rpm-build 3ee90c
        ret=$(echo ${ret} | cut -d' ' -f2-)
rpm-build 3ee90c
        AC_MSG_RESULT([${ret}])
rpm-build 3ee90c
        if test "x${ret}" != xborked \
rpm-build 3ee90c
           || initctl --version 2>/dev/null | grep -q upstart; then
rpm-build 3ee90c
            enable_upstart=yes
rpm-build 3ee90c
        else
rpm-build 3ee90c
            enable_upstart=no
rpm-build 3ee90c
        fi
rpm-build 3ee90c
    fi
rpm-build 3ee90c
fi
rpm-build 3ee90c
AC_MSG_CHECKING([whether to enable support for managing resources via Upstart])
rpm-build 3ee90c
AC_MSG_RESULT([${enable_upstart}])
rpm-build 3ee90c
HAVE_upstart=0
rpm-build 3ee90c
if test "x${enable_upstart}" = xyes; then
rpm-build 3ee90c
    HAVE_upstart=1
rpm-build 3ee90c
    PCMK_FEATURES="$PCMK_FEATURES upstart"
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
AC_DEFINE_UNQUOTED(SUPPORT_UPSTART, $HAVE_upstart, Support upstart based system services)
rpm-build 3ee90c
AM_CONDITIONAL(BUILD_UPSTART, test $HAVE_upstart = 1)
rpm-build 3ee90c
AC_SUBST(SUPPORT_UPSTART)
rpm-build 3ee90c
rpm-build 3ee90c
case $SUPPORT_NAGIOS in
rpm-build 3ee90c
    1|yes|true|try)
rpm-build 3ee90c
        SUPPORT_NAGIOS=1
rpm-build 3ee90c
        ;;
rpm-build 3ee90c
    *)
rpm-build 3ee90c
        SUPPORT_NAGIOS=0
rpm-build 3ee90c
        ;;
rpm-build 3ee90c
esac
rpm-build 3ee90c
rpm-build 3ee90c
if test $SUPPORT_NAGIOS = 1; then
rpm-build 3ee90c
    PCMK_FEATURES="$PCMK_FEATURES nagios"
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
AC_DEFINE_UNQUOTED(SUPPORT_NAGIOS, $SUPPORT_NAGIOS, Support nagios plugins)
rpm-build 3ee90c
AM_CONDITIONAL(BUILD_NAGIOS, test $SUPPORT_NAGIOS = 1)
rpm-build 3ee90c
rpm-build 3ee90c
if test x"$NAGIOS_PLUGIN_DIR" = x""; then
rpm-build 3ee90c
    NAGIOS_PLUGIN_DIR="${libexecdir}/nagios/plugins"
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
AC_DEFINE_UNQUOTED(NAGIOS_PLUGIN_DIR, "$NAGIOS_PLUGIN_DIR", Directory for nagios plugins)
rpm-build 3ee90c
AC_SUBST(NAGIOS_PLUGIN_DIR)
rpm-build 3ee90c
rpm-build 3ee90c
if test x"$NAGIOS_METADATA_DIR" = x""; then
rpm-build 3ee90c
    NAGIOS_METADATA_DIR="${datadir}/nagios/plugins-metadata"
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
AC_DEFINE_UNQUOTED(NAGIOS_METADATA_DIR, "$NAGIOS_METADATA_DIR", Directory for nagios plugins metadata)
rpm-build 3ee90c
AC_SUBST(NAGIOS_METADATA_DIR)
rpm-build 3ee90c
rpm-build 3ee90c
STACKS=""
rpm-build 3ee90c
CLUSTERLIBS=""
rpm-build 3ee90c
PC_NAME_CLUSTER=""
rpm-build 3ee90c
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
dnl    Cluster stack - Corosync
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
rpm-build 3ee90c
dnl Normalize the values
rpm-build 3ee90c
case $SUPPORT_CS in
rpm-build 3ee90c
    1|yes|true)
rpm-build 3ee90c
        SUPPORT_CS=yes
rpm-build 3ee90c
        missingisfatal=1
rpm-build 3ee90c
        ;;
rpm-build 3ee90c
    try)
rpm-build 3ee90c
        missingisfatal=0
rpm-build 3ee90c
        ;;
rpm-build 3ee90c
    *)
rpm-build 3ee90c
        SUPPORT_CS=no
rpm-build 3ee90c
        ;;
rpm-build 3ee90c
esac
rpm-build 3ee90c
rpm-build 3ee90c
AC_MSG_CHECKING(for native corosync)
rpm-build 3ee90c
COROSYNC_LIBS=""
rpm-build 3ee90c
rpm-build 3ee90c
if test $SUPPORT_CS = no; then
rpm-build 3ee90c
    AC_MSG_RESULT(no (disabled))
rpm-build 3ee90c
    SUPPORT_CS=0
rpm-build 3ee90c
else
rpm-build 3ee90c
    AC_MSG_RESULT($SUPPORT_CS)
rpm-build 3ee90c
    SUPPORT_CS=1
rpm-build 3ee90c
    PKG_CHECK_MODULES(cpg,    libcpg) dnl Fatal
rpm-build 3ee90c
    PKG_CHECK_MODULES(cfg,    libcfg) dnl Fatal
rpm-build 3ee90c
    PKG_CHECK_MODULES(cmap,   libcmap) dnl Fatal
rpm-build 3ee90c
    PKG_CHECK_MODULES(quorum, libquorum) dnl Fatal
rpm-build 3ee90c
    PKG_CHECK_MODULES(libcorosync_common, libcorosync_common) dnl Fatal
rpm-build 3ee90c
rpm-build 3ee90c
    CFLAGS="$CFLAGS $libqb_FLAGS $cpg_FLAGS $cfg_FLAGS $cmap_CFLAGS $quorum_CFLAGS $libcorosync_common_CFLAGS"
rpm-build 3ee90c
    COROSYNC_LIBS="$COROSYNC_LIBS $libqb_LIBS $cpg_LIBS $cfg_LIBS $cmap_LIBS $quorum_LIBS $libcorosync_common_LIBS"
rpm-build 3ee90c
    CLUSTERLIBS="$CLUSTERLIBS $COROSYNC_LIBS"
rpm-build 3ee90c
    PC_NAME_CLUSTER="$PC_CLUSTER_NAME libcfg libcmap libcorosync_common libcpg libquorum"
rpm-build 3ee90c
    STACKS="$STACKS corosync-native"
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
AC_DEFINE_UNQUOTED(SUPPORT_COROSYNC, $SUPPORT_CS,    Support the Corosync messaging and membership layer)
rpm-build 3ee90c
AM_CONDITIONAL(BUILD_CS_SUPPORT, test $SUPPORT_CS = 1)
rpm-build 3ee90c
AC_SUBST(SUPPORT_COROSYNC)
rpm-build 3ee90c
rpm-build 3ee90c
dnl
rpm-build 3ee90c
dnl    Cluster stack - Sanity
rpm-build 3ee90c
dnl
rpm-build 3ee90c
rpm-build 3ee90c
if test x${enable_no_stack} = xyes; then
rpm-build 3ee90c
    AC_MSG_NOTICE(No cluster stack supported, building only the scheduler)
rpm-build 3ee90c
    PCMK_FEATURES="$PCMK_FEATURES no-cluster-stack"
rpm-build 3ee90c
else
rpm-build 3ee90c
    AC_MSG_CHECKING(for supported stacks)
rpm-build 3ee90c
    if test x"$STACKS" = x; then
rpm-build 3ee90c
        AC_MSG_FAILURE(You must support at least one cluster stack)
rpm-build 3ee90c
    fi
rpm-build 3ee90c
    AC_MSG_RESULT($STACKS)
rpm-build 3ee90c
    PCMK_FEATURES="$PCMK_FEATURES $STACKS"
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
PCMK_FEATURES="$PCMK_FEATURES atomic-attrd"
rpm-build 3ee90c
AC_SUBST(CLUSTERLIBS)
rpm-build 3ee90c
AC_SUBST(PC_NAME_CLUSTER)
rpm-build 3ee90c
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
dnl    ACL
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
rpm-build 3ee90c
case $SUPPORT_ACL in
rpm-build 3ee90c
    1|yes|true)
rpm-build 3ee90c
        missingisfatal=1
rpm-build 3ee90c
        ;;
rpm-build 3ee90c
    try)
rpm-build 3ee90c
        missingisfatal=0
rpm-build 3ee90c
        ;;
rpm-build 3ee90c
    *)
rpm-build 3ee90c
        SUPPORT_ACL=no
rpm-build 3ee90c
        ;;
rpm-build 3ee90c
esac
rpm-build 3ee90c
rpm-build 3ee90c
AC_MSG_CHECKING(for acl support)
rpm-build 3ee90c
if test $SUPPORT_ACL = no; then
rpm-build 3ee90c
    AC_MSG_RESULT(no (disabled))
rpm-build 3ee90c
    SUPPORT_ACL=0
rpm-build 3ee90c
else
rpm-build 3ee90c
    AC_MSG_RESULT($SUPPORT_ACL)
rpm-build 3ee90c
rpm-build 3ee90c
    SUPPORT_ACL=1
rpm-build 3ee90c
    AC_CHECK_LIB(qb, qb_ipcs_connection_auth_set)
rpm-build 3ee90c
    if test $ac_cv_lib_qb_qb_ipcs_connection_auth_set != yes; then
rpm-build 3ee90c
        SUPPORT_ACL=0
rpm-build 3ee90c
    fi
rpm-build 3ee90c
rpm-build 3ee90c
    if test $SUPPORT_ACL = 0; then
rpm-build 3ee90c
        if test $missingisfatal = 0; then
rpm-build 3ee90c
            AC_MSG_WARN(Unable to support ACL. You need to use libqb > 0.13.0)
rpm-build 3ee90c
        else
rpm-build 3ee90c
            AC_MSG_FAILURE(Unable to support ACL. You need to use libqb > 0.13.0)
rpm-build 3ee90c
        fi
rpm-build 3ee90c
    fi
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
if test $SUPPORT_ACL = 1; then
rpm-build 3ee90c
    PCMK_FEATURES="$PCMK_FEATURES acls"
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
AM_CONDITIONAL(ENABLE_ACL, test "$SUPPORT_ACL" = "1")
rpm-build 3ee90c
AC_DEFINE_UNQUOTED(ENABLE_ACL, $SUPPORT_ACL, Build in support for CIB ACL)
rpm-build 3ee90c
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
dnl    CIB secrets
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
rpm-build 3ee90c
case $SUPPORT_CIBSECRETS in
rpm-build 3ee90c
    1|yes|true|try)
rpm-build 3ee90c
        SUPPORT_CIBSECRETS=1
rpm-build 3ee90c
        ;;
rpm-build 3ee90c
    *)
rpm-build 3ee90c
        SUPPORT_CIBSECRETS=0
rpm-build 3ee90c
        ;;
rpm-build 3ee90c
esac
rpm-build 3ee90c
rpm-build 3ee90c
AC_DEFINE_UNQUOTED(SUPPORT_CIBSECRETS, $SUPPORT_CIBSECRETS, Support CIB secrets)
rpm-build 3ee90c
AM_CONDITIONAL(BUILD_CIBSECRETS, test $SUPPORT_CIBSECRETS = 1)
rpm-build 3ee90c
rpm-build 3ee90c
if test $SUPPORT_CIBSECRETS = 1; then
rpm-build 3ee90c
    PCMK_FEATURES="$PCMK_FEATURES cibsecrets"
rpm-build 3ee90c
rpm-build 3ee90c
    LRM_CIBSECRETS_DIR="${localstatedir}/lib/pacemaker/lrm/secrets"
rpm-build 3ee90c
    AC_DEFINE_UNQUOTED(LRM_CIBSECRETS_DIR,"$LRM_CIBSECRETS_DIR", Location for CIB secrets)
rpm-build 3ee90c
    AC_SUBST(LRM_CIBSECRETS_DIR)
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
dnl    GnuTLS
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
rpm-build 3ee90c
dnl gnutls_priority_set_direct available since 2.1.7 (released 2007-11-29)
rpm-build 3ee90c
AC_CHECK_LIB(gnutls, gnutls_priority_set_direct)
rpm-build 3ee90c
if test "$ac_cv_lib_gnutls_gnutls_priority_set_direct" != ""; then
rpm-build 3ee90c
    AC_CHECK_HEADERS(gnutls/gnutls.h)
rpm-build 3ee90c
    AC_CHECK_FUNCS([gnutls_sec_param_to_pk_bits]) dnl since 2.12.0 (2011-03-24)
rpm-build 3ee90c
    if test "$ac_cv_header_gnutls_gnutls_h" != "yes"; then
rpm-build 3ee90c
        PC_NAME_GNUTLS=""
rpm-build 3ee90c
    else
rpm-build 3ee90c
        PC_NAME_GNUTLS="gnutls"
rpm-build 3ee90c
    fi
rpm-build 3ee90c
    AC_SUBST(PC_NAME_GNUTLS)
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
dnl    PAM
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
rpm-build 3ee90c
AC_CHECK_HEADERS(security/pam_appl.h pam/pam_appl.h)
rpm-build 3ee90c
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
dnl    System Health
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
rpm-build 3ee90c
dnl Check if servicelog development package is installed
rpm-build 3ee90c
SERVICELOG=servicelog-1
rpm-build 3ee90c
SERVICELOG_EXISTS="no"
rpm-build 3ee90c
AC_MSG_CHECKING(for $SERVICELOG packages)
rpm-build 3ee90c
if
rpm-build 3ee90c
    $PKG_CONFIG --exists $SERVICELOG
rpm-build 3ee90c
then
rpm-build 3ee90c
    PKG_CHECK_MODULES([SERVICELOG], [servicelog-1])
rpm-build 3ee90c
    SERVICELOG_EXISTS="yes"
rpm-build 3ee90c
fi
rpm-build 3ee90c
AC_MSG_RESULT($SERVICELOG_EXISTS)
rpm-build 3ee90c
AM_CONDITIONAL(BUILD_SERVICELOG, test "$SERVICELOG_EXISTS" = "yes")
rpm-build 3ee90c
rpm-build 3ee90c
dnl Check if OpenIMPI packages and servicelog are installed
rpm-build 3ee90c
OPENIPMI="OpenIPMI OpenIPMIposix"
rpm-build 3ee90c
OPENIPMI_SERVICELOG_EXISTS="no"
rpm-build 3ee90c
AC_MSG_CHECKING(for $SERVICELOG $OPENIPMI packages)
rpm-build 3ee90c
if
rpm-build 3ee90c
    $PKG_CONFIG --exists $OPENIPMI $SERVICELOG
rpm-build 3ee90c
then
rpm-build 3ee90c
    PKG_CHECK_MODULES([OPENIPMI_SERVICELOG],[OpenIPMI OpenIPMIposix])
rpm-build 3ee90c
    OPENIPMI_SERVICELOG_EXISTS="yes"
rpm-build 3ee90c
fi
rpm-build 3ee90c
AC_MSG_RESULT($OPENIPMI_SERVICELOG_EXISTS)
rpm-build 3ee90c
AM_CONDITIONAL(BUILD_OPENIPMI_SERVICELOG, test "$OPENIPMI_SERVICELOG_EXISTS" = "yes")
rpm-build 3ee90c
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
dnl Compiler flags
rpm-build 3ee90c
dnl ========================================================================
rpm-build 3ee90c
rpm-build 3ee90c
dnl Make sure that CFLAGS is not exported. If the user did
rpm-build 3ee90c
dnl not have CFLAGS in their environment then this should have
rpm-build 3ee90c
dnl no effect. However if CFLAGS was exported from the user's
rpm-build 3ee90c
dnl environment, then the new CFLAGS will also be exported
rpm-build 3ee90c
dnl to sub processes.
rpm-build 3ee90c
if export | fgrep " CFLAGS=" > /dev/null; then
rpm-build 3ee90c
    SAVED_CFLAGS="$CFLAGS"
rpm-build 3ee90c
    unset CFLAGS
rpm-build 3ee90c
    CFLAGS="$SAVED_CFLAGS"
rpm-build 3ee90c
    unset SAVED_CFLAGS
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
AC_ARG_VAR([CFLAGS_HARDENED_LIB], [extra C compiler flags for hardened libraries])
rpm-build 3ee90c
AC_ARG_VAR([LDFLAGS_HARDENED_LIB], [extra linker flags for hardened libraries])
rpm-build 3ee90c
rpm-build 3ee90c
AC_ARG_VAR([CFLAGS_HARDENED_EXE], [extra C compiler flags for hardened executables])
rpm-build 3ee90c
AC_ARG_VAR([LDFLAGS_HARDENED_EXE], [extra linker flags for hardened executables])
rpm-build 3ee90c
rpm-build 3ee90c
CC_EXTRAS=""
rpm-build 3ee90c
rpm-build 3ee90c
if test "$GCC" != yes; then
rpm-build 3ee90c
    CFLAGS="$CFLAGS -g"
rpm-build 3ee90c
else
rpm-build 3ee90c
    CFLAGS="$CFLAGS -ggdb"
rpm-build 3ee90c
rpm-build 3ee90c
dnl When we don't have diagnostic push / pull, we can't explicitly disable
rpm-build 3ee90c
dnl checking for nonliteral formats in the places where they occur on purpose
rpm-build 3ee90c
dnl thus we disable nonliteral format checking globally as we are aborting
rpm-build 3ee90c
dnl on warnings. 
rpm-build 3ee90c
dnl what makes the things really ugly is that nonliteral format checking is 
rpm-build 3ee90c
dnl obviously available as an extra switch in very modern gcc but for older
rpm-build 3ee90c
dnl gcc this is part of -Wformat=2 
rpm-build 3ee90c
dnl so if we have push/pull we can enable -Wformat=2 -Wformat-nonliteral
rpm-build 3ee90c
dnl if we don't have push/pull but -Wformat-nonliteral we can enable -Wformat=2
rpm-build 3ee90c
dnl otherwise none of both
rpm-build 3ee90c
rpm-build 3ee90c
    gcc_diagnostic_push_pull=no
rpm-build 3ee90c
    cc_temp_flags "$CFLAGS $WERROR"
rpm-build 3ee90c
    AC_MSG_CHECKING([for gcc diagnostic push / pull])
rpm-build 3ee90c
    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
rpm-build 3ee90c
#pragma GCC diagnostic push
rpm-build 3ee90c
#pragma GCC diagnostic pop
rpm-build 3ee90c
                      ]])],
rpm-build 3ee90c
                      [
rpm-build 3ee90c
                          AC_MSG_RESULT([yes])
rpm-build 3ee90c
                          gcc_diagnostic_push_pull=yes
rpm-build 3ee90c
                      ], AC_MSG_RESULT([no]))
rpm-build 3ee90c
    cc_restore_flags
rpm-build 3ee90c
rpm-build 3ee90c
    if cc_supports_flag "-Wformat-nonliteral"; then
rpm-build 3ee90c
        gcc_format_nonliteral=yes
rpm-build 3ee90c
    else
rpm-build 3ee90c
        gcc_format_nonliteral=no
rpm-build 3ee90c
    fi
rpm-build 3ee90c
        
rpm-build 3ee90c
    # We had to eliminate -Wnested-externs because of libtool changes
rpm-build 3ee90c
    # Make sure to order options so that the former stand for prerequisites
rpm-build 3ee90c
    # of the latter (e.g., -Wformat-nonliteral requires -Wformat).
rpm-build 3ee90c
    EXTRA_FLAGS="-fgnu89-inline
rpm-build 3ee90c
                -Wall
rpm-build 3ee90c
                -Waggregate-return
rpm-build 3ee90c
                -Wbad-function-cast
rpm-build 3ee90c
                -Wcast-align
rpm-build 3ee90c
                -Wdeclaration-after-statement
rpm-build 3ee90c
                -Wendif-labels
rpm-build 3ee90c
                -Wfloat-equal
rpm-build 3ee90c
                -Wformat-security
rpm-build 3ee90c
                -Wmissing-prototypes
rpm-build 3ee90c
                -Wmissing-declarations
rpm-build 3ee90c
                -Wnested-externs
rpm-build 3ee90c
                -Wno-long-long
rpm-build 3ee90c
                -Wno-strict-aliasing
rpm-build 3ee90c
                -Wpointer-arith
rpm-build 3ee90c
                -Wstrict-prototypes
rpm-build 3ee90c
                -Wwrite-strings
rpm-build 3ee90c
                -Wunused-but-set-variable
rpm-build 3ee90c
                -Wunsigned-char"
rpm-build 3ee90c
rpm-build 3ee90c
    if test "x$gcc_diagnostic_push_pull" = "xyes"; then
rpm-build 3ee90c
        AC_DEFINE([GCC_FORMAT_NONLITERAL_CHECKING_ENABLED], [],
rpm-build 3ee90c
                  [gcc can complain about nonliterals in format])
rpm-build 3ee90c
        EXTRA_FLAGS="$EXTRA_FLAGS
rpm-build 3ee90c
                    -Wformat=2 
rpm-build 3ee90c
                    -Wformat-nonliteral"
rpm-build 3ee90c
    else
rpm-build 3ee90c
        if test "x$gcc_format_nonliteral" = "xyes"; then
rpm-build 3ee90c
            EXTRA_FLAGS="$EXTRA_FLAGS -Wformat=2"
rpm-build 3ee90c
        fi
rpm-build 3ee90c
    fi
rpm-build 3ee90c
rpm-build 3ee90c
# Additional warnings it might be nice to enable one day
rpm-build 3ee90c
#                -Wshadow
rpm-build 3ee90c
#                -Wunreachable-code
rpm-build 3ee90c
    for j in $EXTRA_FLAGS
rpm-build 3ee90c
    do
rpm-build 3ee90c
        if
rpm-build 3ee90c
            cc_supports_flag $CC_EXTRAS $j
rpm-build 3ee90c
        then
rpm-build 3ee90c
            CC_EXTRAS="$CC_EXTRAS $j"
rpm-build 3ee90c
        fi
rpm-build 3ee90c
    done
rpm-build 3ee90c
rpm-build 3ee90c
    if test "x${enable_ansi}" = xyes && cc_supports_flag -std=iso9899:199409 ; then
rpm-build 3ee90c
        AC_MSG_NOTICE(Enabling ANSI Compatibility)
rpm-build 3ee90c
        CC_EXTRAS="$CC_EXTRAS -ansi -D_GNU_SOURCE -DANSI_ONLY"
rpm-build 3ee90c
    fi
rpm-build 3ee90c
rpm-build 3ee90c
    AC_MSG_NOTICE(Activated additional gcc flags: ${CC_EXTRAS})
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
dnl
rpm-build 3ee90c
dnl Hardening flags
rpm-build 3ee90c
dnl
rpm-build 3ee90c
dnl The prime control of whether to apply (targeted) hardening build flags and
rpm-build 3ee90c
dnl which ones is --{enable,disable}-hardening option passed to ./configure:
rpm-build 3ee90c
dnl
rpm-build 3ee90c
dnl --enable-hardening=try (default):
rpm-build 3ee90c
dnl     depending on whether any of CFLAGS_HARDENED_EXE, LDFLAGS_HARDENED_EXE,
rpm-build 3ee90c
dnl     CFLAGS_HARDENED_LIB or LDFLAGS_HARDENED_LIB environment variables
rpm-build 3ee90c
dnl     (see below) is set and non-null, all these custom flags (even if not
rpm-build 3ee90c
dnl     set) are used as are, otherwise the best effort is made to offer
rpm-build 3ee90c
dnl     reasonably strong hardening in several categories (RELRO, PIE,
rpm-build 3ee90c
dnl     "bind now", stack protector) according to what the selected toolchain
rpm-build 3ee90c
dnl     can offer
rpm-build 3ee90c
dnl
rpm-build 3ee90c
dnl --enable-hardening:
rpm-build 3ee90c
dnl     same effect as --enable-hardening=try when the environment variables
rpm-build 3ee90c
dnl     in question are suppressed
rpm-build 3ee90c
dnl
rpm-build 3ee90c
dnl --disable-hardening:
rpm-build 3ee90c
dnl     do not apply any targeted hardening measures at all
rpm-build 3ee90c
dnl
rpm-build 3ee90c
dnl The user-injected environment variables that regulate the hardening in
rpm-build 3ee90c
dnl default case are as follows:
rpm-build 3ee90c
dnl
rpm-build 3ee90c
dnl * CFLAGS_HARDENED_EXE, LDFLAGS_HARDENED_EXE
rpm-build 3ee90c
dnl    compiler and linker flags (respectively) for daemon programs
rpm-build 3ee90c
dnl    (pacemakerd, pacemaker-attrd, pacemaker-controld, pacemaker-execd,
rpm-build 3ee90c
dnl    cib, stonithd, pacemaker-remoted, pacemaker-schedulerd)
rpm-build 3ee90c
dnl
rpm-build 3ee90c
dnl * CFLAGS_HARDENED_LIB, LDFLAGS_HARDENED_LIB
rpm-build 3ee90c
dnl    compiler and linker flags (respectively) for libraries linked
rpm-build 3ee90c
dnl    with the daemon programs
rpm-build 3ee90c
dnl
rpm-build 3ee90c
dnl Note that these are purposedly targeted variables (addressing particular
rpm-build 3ee90c
dnl targets all over the scattered Makefiles) and have no effect outside of
rpm-build 3ee90c
dnl the predestined scope (e.g., CLI utilities).  For a global reach,
rpm-build 3ee90c
dnl use CFLAGS, LDFLAGS, etc. as usual.
rpm-build 3ee90c
dnl
rpm-build 3ee90c
dnl For guidance on the suitable flags consult, for instance:
rpm-build 3ee90c
dnl https://fedoraproject.org/wiki/Changes/Harden_All_Packages#Detailed_Harden_Flags_Description
rpm-build 3ee90c
dnl https://owasp.org/index.php/C-Based_Toolchain_Hardening#GCC.2FBinutils
rpm-build 3ee90c
dnl
rpm-build 3ee90c
rpm-build 3ee90c
if test "x${HARDENING}" != "xtry"; then
rpm-build 3ee90c
    unset CFLAGS_HARDENED_EXE
rpm-build 3ee90c
    unset CFLAGS_HARDENED_LIB
rpm-build 3ee90c
    unset LDFLAGS_HARDENED_EXE
rpm-build 3ee90c
    unset LDFLAGS_HARDENED_LIB
rpm-build 3ee90c
fi
rpm-build 3ee90c
if test "x${HARDENING}" = "xno"; then
rpm-build 3ee90c
    AC_MSG_NOTICE([Hardening: explicitly disabled])
rpm-build 3ee90c
elif test "x${HARDENING}" = "xyes" \
rpm-build 3ee90c
     || test "$(env | grep -Ec '^(C|LD)FLAGS_HARDENED_(EXE|LIB)=.')" = 0; then
rpm-build 3ee90c
    dnl We'll figure out on our own...
rpm-build 3ee90c
    CFLAGS_HARDENED_EXE=
rpm-build 3ee90c
    CFLAGS_HARDENED_LIB=
rpm-build 3ee90c
    LDFLAGS_HARDENED_EXE=
rpm-build 3ee90c
    LDFLAGS_HARDENED_LIB=
rpm-build 3ee90c
    relro=0
rpm-build 3ee90c
    pie=0
rpm-build 3ee90c
    bindnow=0
rpm-build 3ee90c
    # daemons incl. libs: partial RELRO
rpm-build 3ee90c
    flag="-Wl,-z,relro"
rpm-build 3ee90c
    CC_CHECK_LDFLAGS(["${flag}"],
rpm-build 3ee90c
                     [LDFLAGS_HARDENED_EXE="${LDFLAGS_HARDENED_EXE} ${flag}";
rpm-build 3ee90c
                      LDFLAGS_HARDENED_LIB="${LDFLAGS_HARDENED_LIB} ${flag}";
rpm-build 3ee90c
                      relro=1])
rpm-build 3ee90c
    # daemons: PIE for both CFLAGS and LDFLAGS
rpm-build 3ee90c
    if cc_supports_flag -fPIE; then
rpm-build 3ee90c
        flag="-pie"
rpm-build 3ee90c
        CC_CHECK_LDFLAGS(["${flag}"],
rpm-build 3ee90c
                         [CFLAGS_HARDENED_EXE="${CFLAGS_HARDENED_EXE} -fPIE";
rpm-build 3ee90c
                          LDFLAGS_HARDENED_EXE="${LDFLAGS_HARDENED_EXE} ${flag}";
rpm-build 3ee90c
                          pie=1])
rpm-build 3ee90c
    fi
rpm-build 3ee90c
    # daemons incl. libs: full RELRO if sensible + as-needed linking
rpm-build 3ee90c
    #                     so as to possibly mitigate startup performance
rpm-build 3ee90c
    #                     hit caused by excessive linking with unneeded
rpm-build 3ee90c
    #                     libraries
rpm-build 3ee90c
    if test "${relro}" = 1 && test "${pie}" = 1; then
rpm-build 3ee90c
        flag="-Wl,-z,now"
rpm-build 3ee90c
        CC_CHECK_LDFLAGS(["${flag}"],
rpm-build 3ee90c
                         [LDFLAGS_HARDENED_EXE="${LDFLAGS_HARDENED_EXE} ${flag}";
rpm-build 3ee90c
                          LDFLAGS_HARDENED_LIB="${LDFLAGS_HARDENED_LIB} ${flag}";
rpm-build 3ee90c
                          bindnow=1])
rpm-build 3ee90c
    fi
rpm-build 3ee90c
    if test "${bindnow}" = 1; then
rpm-build 3ee90c
        flag="-Wl,--as-needed"
rpm-build 3ee90c
        CC_CHECK_LDFLAGS(["${flag}"],
rpm-build 3ee90c
                         [LDFLAGS_HARDENED_EXE="${LDFLAGS_HARDENED_EXE} ${flag}";
rpm-build 3ee90c
                          LDFLAGS_HARDENED_LIB="${LDFLAGS_HARDENED_LIB} ${flag}"])
rpm-build 3ee90c
    fi
rpm-build 3ee90c
    # universal: prefer strong > all > default stack protector if possible
rpm-build 3ee90c
    flag=
rpm-build 3ee90c
    if cc_supports_flag -fstack-protector-strong; then
rpm-build 3ee90c
        flag="-fstack-protector-strong"
rpm-build 3ee90c
    elif cc_supports_flag -fstack-protector-all; then
rpm-build 3ee90c
        flag="-fstack-protector-all"
rpm-build 3ee90c
    elif cc_supports_flag -fstack-protector; then
rpm-build 3ee90c
        flag="-fstack-protector"
rpm-build 3ee90c
    fi
rpm-build 3ee90c
    if test -n "${flag}"; then
rpm-build 3ee90c
        CC_EXTRAS="${CC_EXTRAS} ${flag}"
rpm-build 3ee90c
        stackprot=1
rpm-build 3ee90c
    fi
rpm-build 3ee90c
    if test "${relro}" = 1 \
rpm-build 3ee90c
    || test "${pie}" = 1 \
rpm-build 3ee90c
    || test "${stackprot}" = 1; then
rpm-build 3ee90c
        AC_MSG_NOTICE([Hardening: relro=${relro} pie=${pie} bindnow=${bindnow} stackprot=${flag}])
rpm-build 3ee90c
    else
rpm-build 3ee90c
        AC_MSG_WARN([Hardening: no suitable features in the toolchain detected])
rpm-build 3ee90c
    fi
rpm-build 3ee90c
else
rpm-build 3ee90c
    AC_MSG_NOTICE([Hardening: using custom flags])
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
CFLAGS="$CFLAGS $CC_EXTRAS"
rpm-build 3ee90c
rpm-build 3ee90c
NON_FATAL_CFLAGS="$CFLAGS"
rpm-build 3ee90c
AC_SUBST(NON_FATAL_CFLAGS)
rpm-build 3ee90c
rpm-build 3ee90c
dnl
rpm-build 3ee90c
dnl We reset CFLAGS to include our warnings *after* all function
rpm-build 3ee90c
dnl checking goes on, so that our warning flags don't keep the
rpm-build 3ee90c
dnl AC_*FUNCS() calls above from working.  In particular, -Werror will
rpm-build 3ee90c
dnl *always* cause us troubles if we set it before here.
rpm-build 3ee90c
dnl
rpm-build 3ee90c
dnl
rpm-build 3ee90c
if test "x${enable_fatal_warnings}" = xyes ; then
rpm-build 3ee90c
    AC_MSG_NOTICE(Enabling Fatal Warnings)
rpm-build 3ee90c
    CFLAGS="$CFLAGS $WERROR"
rpm-build 3ee90c
fi
rpm-build 3ee90c
AC_SUBST(CFLAGS)
rpm-build 3ee90c
rpm-build 3ee90c
dnl This is useful for use in Makefiles that need to remove one specific flag
rpm-build 3ee90c
CFLAGS_COPY="$CFLAGS"
rpm-build 3ee90c
AC_SUBST(CFLAGS_COPY)
rpm-build 3ee90c
rpm-build 3ee90c
AC_SUBST(LIBADD_DL)        dnl extra flags for dynamic linking libraries
rpm-build 3ee90c
AC_SUBST(LIBADD_INTL)        dnl extra flags for GNU gettext stuff...
rpm-build 3ee90c
rpm-build 3ee90c
AC_SUBST(LOCALE)
rpm-build 3ee90c
rpm-build 3ee90c
dnl Options for cleaning up the compiler output
rpm-build 3ee90c
QUIET_LIBTOOL_OPTS=""
rpm-build 3ee90c
QUIET_MAKE_OPTS=""
rpm-build 3ee90c
if test "x${enable_quiet}" = "xyes"; then
rpm-build 3ee90c
    QUIET_LIBTOOL_OPTS="--silent"
rpm-build 3ee90c
    QUIET_MAKE_OPTS="-s"  # POSIX compliant
rpm-build 3ee90c
fi
rpm-build 3ee90c
rpm-build 3ee90c
AC_MSG_RESULT(Suppress make details: ${enable_quiet})
rpm-build 3ee90c
rpm-build 3ee90c
dnl Put the above variables to use
rpm-build 3ee90c
LIBTOOL="${LIBTOOL} --tag=CC \$(QUIET_LIBTOOL_OPTS)"
rpm-build 3ee90c
MAKEFLAGS="${MAKEFLAGS} ${QUIET_MAKE_OPTS}"
rpm-build 3ee90c
rpm-build 3ee90c
AC_SUBST(CC)
rpm-build 3ee90c
AC_SUBST(MAKEFLAGS)
rpm-build 3ee90c
AC_SUBST(LIBTOOL)
rpm-build 3ee90c
AC_SUBST(QUIET_LIBTOOL_OPTS)
rpm-build 3ee90c
AC_DEFINE_UNQUOTED(CRM_FEATURES, "$PCMK_FEATURES", Set of enabled features)
rpm-build 3ee90c
AC_SUBST(PCMK_FEATURES)
rpm-build 3ee90c
rpm-build 3ee90c
dnl Files we output that need to be executable
rpm-build 3ee90c
AC_CONFIG_FILES([cts/CTSlab.py], [chmod +x cts/CTSlab.py])
rpm-build 3ee90c
AC_CONFIG_FILES([cts/LSBDummy], [chmod +x cts/LSBDummy])
rpm-build 3ee90c
AC_CONFIG_FILES([cts/OCFIPraTest.py], [chmod +x cts/OCFIPraTest.py])
rpm-build 3ee90c
AC_CONFIG_FILES([cts/cluster_test], [chmod +x cts/cluster_test])
rpm-build 3ee90c
AC_CONFIG_FILES([cts/cts], [chmod +x cts/cts])
rpm-build 3ee90c
AC_CONFIG_FILES([cts/cts-cli], [chmod +x cts/cts-cli])
rpm-build 3ee90c
AC_CONFIG_FILES([cts/cts-coverage], [chmod +x cts/cts-coverage])
rpm-build 3ee90c
AC_CONFIG_FILES([cts/cts-exec], [chmod +x cts/cts-exec])
rpm-build 3ee90c
AC_CONFIG_FILES([cts/cts-fencing], [chmod +x cts/cts-fencing])
rpm-build 3ee90c
AC_CONFIG_FILES([cts/cts-log-watcher], [chmod +x cts/cts-log-watcher])
rpm-build 3ee90c
AC_CONFIG_FILES([cts/cts-regression], [chmod +x cts/cts-regression])
rpm-build 3ee90c
AC_CONFIG_FILES([cts/cts-scheduler], [chmod +x cts/cts-scheduler])
rpm-build 3ee90c
AC_CONFIG_FILES([cts/cts-support], [chmod +x cts/cts-support])
rpm-build 3ee90c
AC_CONFIG_FILES([cts/lxc_autogen.sh], [chmod +x cts/lxc_autogen.sh])
rpm-build 3ee90c
AC_CONFIG_FILES([cts/benchmark/clubench], [chmod +x cts/benchmark/clubench])
rpm-build 3ee90c
AC_CONFIG_FILES([cts/fence_dummy], [chmod +x cts/fence_dummy])
rpm-build 3ee90c
AC_CONFIG_FILES([cts/pacemaker-cts-dummyd], [chmod +x cts/pacemaker-cts-dummyd])
rpm-build 3ee90c
AC_CONFIG_FILES([daemons/fenced/fence_legacy], [chmod +x daemons/fenced/fence_legacy])
rpm-build 3ee90c
AC_CONFIG_FILES([doc/abi-check], [chmod +x doc/abi-check])
rpm-build 3ee90c
AC_CONFIG_FILES([extra/resources/ClusterMon],  [chmod +x extra/resources/ClusterMon])
rpm-build 3ee90c
AC_CONFIG_FILES([extra/resources/HealthSMART], [chmod +x extra/resources/HealthSMART])
rpm-build 3ee90c
AC_CONFIG_FILES([extra/resources/SysInfo],     [chmod +x extra/resources/SysInfo])
rpm-build 3ee90c
AC_CONFIG_FILES([extra/resources/ifspeed],     [chmod +x extra/resources/ifspeed])
rpm-build 3ee90c
AC_CONFIG_FILES([extra/resources/o2cb],        [chmod +x extra/resources/o2cb])
rpm-build 3ee90c
AC_CONFIG_FILES([tools/crm_failcount], [chmod +x tools/crm_failcount])
rpm-build 3ee90c
AC_CONFIG_FILES([tools/crm_master], [chmod +x tools/crm_master])
rpm-build 3ee90c
AC_CONFIG_FILES([tools/crm_report], [chmod +x tools/crm_report])
rpm-build 3ee90c
AC_CONFIG_FILES([tools/crm_standby], [chmod +x tools/crm_standby])
rpm-build 3ee90c
AC_CONFIG_FILES([tools/cibsecret], [chmod +x tools/cibsecret])
rpm-build 3ee90c
AC_CONFIG_FILES([tools/pcmk_simtimes], [chmod +x tools/pcmk_simtimes])
rpm-build 3ee90c
rpm-build 3ee90c
dnl Other files we output
rpm-build 3ee90c
AC_CONFIG_FILES(Makefile                                            \
rpm-build 3ee90c
                cts/Makefile                                        \
rpm-build 3ee90c
                cts/CTS.py                                          \
rpm-build 3ee90c
                cts/CTSvars.py                                      \
rpm-build 3ee90c
                cts/benchmark/Makefile                              \
rpm-build 3ee90c
                cts/pacemaker-cts-dummyd@.service                   \
rpm-build 3ee90c
                daemons/Makefile                                    \
rpm-build 3ee90c
                daemons/attrd/Makefile                              \
rpm-build 3ee90c
                daemons/based/Makefile                              \
rpm-build 3ee90c
                daemons/controld/Makefile                           \
rpm-build 3ee90c
                daemons/execd/Makefile                              \
rpm-build 3ee90c
                daemons/execd/pacemaker_remote                      \
rpm-build 3ee90c
                daemons/execd/pacemaker_remote.service              \
rpm-build 3ee90c
                daemons/fenced/Makefile                             \
rpm-build 3ee90c
                daemons/pacemakerd/Makefile                         \
rpm-build 3ee90c
                daemons/pacemakerd/pacemaker                        \
rpm-build 3ee90c
                daemons/pacemakerd/pacemaker.service                \
rpm-build 3ee90c
                daemons/pacemakerd/pacemaker.upstart                \
rpm-build 3ee90c
                daemons/pacemakerd/pacemaker.combined.upstart       \
rpm-build 3ee90c
                daemons/schedulerd/Makefile                         \
rpm-build 3ee90c
                doc/Doxyfile                                        \
rpm-build 3ee90c
                doc/Makefile                                        \
rpm-build 3ee90c
                doc/Clusters_from_Scratch/publican.cfg              \
rpm-build 3ee90c
                doc/Pacemaker_Administration/publican.cfg           \
rpm-build 3ee90c
                doc/Pacemaker_Development/publican.cfg              \
rpm-build 3ee90c
                doc/Pacemaker_Explained/publican.cfg                \
rpm-build 3ee90c
                doc/Pacemaker_Remote/publican.cfg                   \
rpm-build 3ee90c
                extra/Makefile                                      \
rpm-build 3ee90c
                extra/alerts/Makefile                               \
rpm-build 3ee90c
                extra/resources/Makefile                            \
rpm-build 3ee90c
                extra/logrotate/Makefile                            \
rpm-build 3ee90c
                extra/logrotate/pacemaker                           \
rpm-build 3ee90c
                include/Makefile                                    \
rpm-build 3ee90c
                include/crm/Makefile                                \
rpm-build 3ee90c
                include/crm/cib/Makefile                            \
rpm-build 3ee90c
                include/crm/common/Makefile                         \
rpm-build 3ee90c
                include/crm/cluster/Makefile                        \
rpm-build 3ee90c
                include/crm/fencing/Makefile                        \
rpm-build 3ee90c
                include/crm/pengine/Makefile                        \
rpm-build 3ee90c
                include/pcmki/Makefile                              \
rpm-build 3ee90c
                replace/Makefile                                    \
rpm-build 3ee90c
                lib/Makefile                                        \
rpm-build 3ee90c
                lib/libpacemaker.pc                                 \
rpm-build 3ee90c
                lib/pacemaker.pc                                    \
rpm-build 3ee90c
                lib/pacemaker-cib.pc                                \
rpm-build 3ee90c
                lib/pacemaker-lrmd.pc                               \
rpm-build 3ee90c
                lib/pacemaker-service.pc                            \
rpm-build 3ee90c
                lib/pacemaker-pe_rules.pc                           \
rpm-build 3ee90c
                lib/pacemaker-pe_status.pc                          \
rpm-build 3ee90c
                lib/pacemaker-fencing.pc                            \
rpm-build 3ee90c
                lib/pacemaker-cluster.pc                            \
rpm-build 3ee90c
                lib/common/Makefile                                 \
rpm-build 3ee90c
                lib/cluster/Makefile                                \
rpm-build 3ee90c
                lib/cib/Makefile                                    \
rpm-build 3ee90c
                lib/gnu/Makefile                                    \
rpm-build 3ee90c
                lib/pacemaker/Makefile                              \
rpm-build 3ee90c
                lib/pengine/Makefile                                \
rpm-build 3ee90c
                lib/fencing/Makefile                                \
rpm-build 3ee90c
                lib/lrmd/Makefile                                   \
rpm-build 3ee90c
                lib/services/Makefile                               \
rpm-build 3ee90c
                maint/Makefile                                      \
rpm-build 3ee90c
                tools/Makefile                                      \
rpm-build 3ee90c
                tools/report.collector                              \
rpm-build 3ee90c
                tools/report.common                                 \
rpm-build 3ee90c
                tools/crm_mon.service                               \
rpm-build 3ee90c
                tools/crm_mon.upstart                               \
rpm-build 3ee90c
                xml/Makefile                                        \
rpm-build 3ee90c
                xml/pacemaker-schemas.pc                            \
rpm-build 3ee90c
)
rpm-build 3ee90c
rpm-build 3ee90c
dnl Now process the entire list of files added by previous
rpm-build 3ee90c
dnl  calls to AC_CONFIG_FILES()
rpm-build 3ee90c
AC_OUTPUT()
rpm-build 3ee90c
rpm-build 3ee90c
dnl *****************
rpm-build 3ee90c
dnl Configure summary
rpm-build 3ee90c
dnl *****************
rpm-build 3ee90c
rpm-build 3ee90c
AC_MSG_RESULT([])
rpm-build 3ee90c
AC_MSG_RESULT([$PACKAGE configuration:])
rpm-build 3ee90c
AC_MSG_RESULT([  Version                  = ${VERSION} (Build: $BUILD_VERSION)])
rpm-build 3ee90c
AC_MSG_RESULT([  Features                 =${PCMK_FEATURES}])
rpm-build 3ee90c
AC_MSG_RESULT([])
rpm-build 3ee90c
AC_MSG_RESULT([  Prefix                   = ${prefix}])
rpm-build 3ee90c
AC_MSG_RESULT([  Executables              = ${sbindir}])
rpm-build 3ee90c
AC_MSG_RESULT([  Man pages                = ${mandir}])
rpm-build 3ee90c
AC_MSG_RESULT([  Libraries                = ${libdir}])
rpm-build 3ee90c
AC_MSG_RESULT([  Header files             = ${includedir}])
rpm-build 3ee90c
AC_MSG_RESULT([  Arch-independent files   = ${datadir}])
rpm-build 3ee90c
AC_MSG_RESULT([  State information        = ${localstatedir}])
rpm-build 3ee90c
AC_MSG_RESULT([  System configuration     = ${sysconfdir}])
rpm-build 3ee90c
AC_MSG_RESULT([])
rpm-build 3ee90c
AC_MSG_RESULT([  HA group name            = ${CRM_DAEMON_GROUP}])
rpm-build 3ee90c
AC_MSG_RESULT([  HA user name             = ${CRM_DAEMON_USER}])
rpm-build 3ee90c
AC_MSG_RESULT([])
rpm-build 3ee90c
AC_MSG_RESULT([  CFLAGS                   = ${CFLAGS}])
rpm-build 3ee90c
AC_MSG_RESULT([  CFLAGS_HARDENED_EXE      = ${CFLAGS_HARDENED_EXE}])
rpm-build 3ee90c
AC_MSG_RESULT([  CFLAGS_HARDENED_LIB      = ${CFLAGS_HARDENED_LIB}])
rpm-build 3ee90c
AC_MSG_RESULT([  LDFLAGS_HARDENED_EXE     = ${LDFLAGS_HARDENED_EXE}])
rpm-build 3ee90c
AC_MSG_RESULT([  LDFLAGS_HARDENED_LIB     = ${LDFLAGS_HARDENED_LIB}])
rpm-build 3ee90c
AC_MSG_RESULT([  Libraries                = ${LIBS}])
rpm-build 3ee90c
AC_MSG_RESULT([  Stack Libraries          = ${CLUSTERLIBS}])
rpm-build 3ee90c
AC_MSG_RESULT([  Unix socket auth method  = ${us_auth}])