AM_PROG_CC_C_O
AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
+AC_GNU_SOURCE
# Test if we have a new enough compiler.
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
AC_MSG_CHECKING([host distribution])
AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO], [Specify the Linux distribution to target: One of redhat, redhatenterpriseserver, oracle, centos, fedora, suse, gentoo, debian, arch, slackware, plamo, paldo, openmandriva, pardus, sparclinux, altlinux.]))
if type lsb_release >/dev/null 2>&1 && test "z$with_distro" = "z"; then
- with_distro=`lsb_release -is`
+ with_distro=$(lsb_release -is)
fi
if test "z$with_distro" = "z"; then
AC_CHECK_FILE(/etc/redhat-release,with_distro="redhat")
AC_CHECK_FILE(/etc/altlinux-release,with_distro="altlinux")
AC_CHECK_FILE(/etc/pld-release,with_distro="pld")
fi
-with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]'`
+with_distro=$(echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]')
if test "z$with_distro" = "zforsparc"; then
with_distro="sparclinux"
CC_CHECK_FLAGS_APPEND([AM_CFLAGS],[CFLAGS],[ \
-DRUN_ON_OSS_FUZZ=1])
fi
-else
+fi
+
+if test "x$enable_fuzzers" = "xno" -a "x$enable_sanitizers" = "xno"; then
CC_CHECK_FLAGS_APPEND([AM_CFLAGS],[CFLAGS],[-flto=thin])
fi
AC_SUBST(AM_CFLAGS)
[pamdir],
[AS_HELP_STRING([--with-pamdir=PATH],[Specify the directory where PAM modules are stored,
or "none" if PAM modules are not to be built])],
- [pamdir=$withval],
+ [exec_pamdir=$withval],
[
if test "${prefix}" = "/usr"; then
- pamdir="/lib${libdir##*/lib}/security"
+ exec_pamdir="/lib${libdir##*/lib}/security"
else
- pamdir="\$(libdir)/security"
+ exec_pamdir="\$(libdir)/security"
fi
]
)])
-AM_CONDITIONAL([HAVE_PAM], [test x"$pamdir" != "xnone"])
+AM_CONDITIONAL([HAVE_PAM], [test x"$exec_pamdir" != "xnone"])
AM_COND_IF([ENABLE_PAM],
- [if test "z$pamdir" != "znone"; then
+ [if test "z$exec_pamdir" != "znone"; then
AC_ARG_VAR([PAM_CFLAGS], [C compiler flags for pam])
AC_ARG_VAR([PAM_LIBS], [linker flags for pam])
AC_CHECK_LIB(
])
AC_SUBST(PAM_LIBS)
- AC_SUBST([pamdir])
+ AC_SUBST([exec_pamdir])
fi])
# Some systems lack PR_CAPBSET_DROP definition => HAVE_DECL_PR_CAPBSET_DROP
AC_HEADER_MAJOR
# Check for some syscalls functions
-AC_CHECK_FUNCS([setns pivot_root sethostname unshare rand_r confstr faccessat gettid memfd_create move_mount open_tree execveat clone3 fsopen fspick fsconfig fsmount openat2 close_range statvfs mount_setattr])
+AC_CHECK_FUNCS([setns pivot_root sethostname unshare rand_r confstr faccessat gettid memfd_create move_mount open_tree execveat clone3 fsopen fspick fsconfig fsmount openat2 close_range statvfs mount_setattr sigdescr_np])
AC_CHECK_TYPES([__aligned_u64], [], [], [[#include <linux/types.h>]])
AC_CHECK_TYPES([struct mount_attr], [], [], [[#include <linux/mount.h>]])
AC_CHECK_TYPES([struct open_how], [], [], [[#include <linux/openat2.h>]])
AX_PTHREAD
AC_SEARCH_LIBS(clock_gettime, [rt])
-# See if we support thread-local storage.
-LXC_CHECK_TLS
-
# Hardening flags
CC_CHECK_FLAGS_APPEND([AM_CFLAGS],[CFLAGS],[ \
-fPIE \
PAM:
- PAM module: $enable_pam
- - cgroup PAM module: $pamdir
+ - cgroup PAM module: $exec_pamdir
Documentation:
- examples: $enable_examples