# # Copyright (C) 2013-2020 Canonical, Ltd. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # CFLAGS += -Wall -Wextra -DVERSION='"$(VERSION)"' -O2 -std=gnu99 -I. APPARMOR_PARSER=/sbin/apparmor_parser LIB_APPARMOR := -lapparmor KERNEL=$(shell uname -s) ifeq (,$(findstring $(KERNEL),Darwin DragonFly FreeBSD NetBSD OpenBSD)) LIB_BSD := -lbsd endif LIB_Z := -lz LIB_CRYPT := -lcrypt LIB_RT := -lrt LIB_PTHREAD := -pthread LIB_AIO := -laio LIB_SCTP := -lsctp LIB_DL := -ldl LIB_IPSEC_MB := -lIPSec_MB LIB_JUDY := -lJudy LIB_ATOMIC := -latomic DIR=test MAKE_OPTS=-f Makefile.config --no-print-directory HAVE_CONFIG=1 # # Load in current config; use 'make clean' to clear this # -include config CFLAGS += $(CONFIG_CFLAGS) LDFLAGS += $(CONFIG_LDFLAGS) OBJS += $(CONFIG_OBJS) # # Static flags, only to be used when using GCC # ifeq ($(STATIC),1) LDFLAGS += -static CFLAGS += -DBUILD_STATIC endif # # Determine the system build config # ifndef HAVE_CONFIG HAVE_CONFIG=1 ifeq ($(shell uname -s),SunOS) CONFIG_LDFLAGS += -lsocket -lnsl endif ifndef $(HAVE_LIB_AIO) HAVE_LIB_AIO = $(shell $(MAKE) $(MAKE_OPTS) TEST_LIBS=$(LIB_AIO) TEST_PROG=test-libaio have_test_prog) ifeq ($(HAVE_LIB_AIO),1) CONFIG_CFLAGS += -DHAVE_LIB_AIO CONFIG_LDFLAGS += $(LIB_AIO) $(info autoconfig: using $(LIB_AIO)) endif endif ifndef $(HAVE_LIB_BSD) HAVE_LIB_BSD = $(shell $(MAKE) $(MAKE_OPTS) TEST_LIBS=$(LIB_BSD) TEST_PROG=test-libbsd have_test_prog) ifeq ($(HAVE_LIB_BSD),1) CONFIG_CFLAGS += -DHAVE_LIB_BSD CONFIG_LDFLAGS += $(LIB_BSD) $(info autoconfig: using -lbsd functions) endif endif ifndef $(HAVE_LIB_CRYPT) HAVE_LIB_CRYPT = $(shell $(MAKE) $(MAKE_OPTS) TEST_LIBS=$(LIB_CRYPT) TEST_PROG=test-libcrypt have_test_prog) ifeq ($(HAVE_LIB_CRYPT),1) CONFIG_CFLAGS += -DHAVE_LIB_CRYPT CONFIG_LDFLAGS += $(LIB_CRYPT) $(info autoconfig: using $(LIB_CRYPT)) endif endif ifndef $(HAVE_LIB_RT) HAVE_LIB_RT = $(shell $(MAKE) $(MAKE_OPTS) TEST_LIBS=$(LIB_RT) TEST_PROG=test-librt have_test_prog) ifeq ($(HAVE_LIB_RT),1) CONFIG_CFLAGS += -DHAVE_LIB_RT CONFIG_LDFLAGS += $(LIB_RT) $(info autoconfig: using $(LIB_RT)) endif endif ifndef $(HAVE_LIB_SCTP) HAVE_LIB_SCTP = $(shell $(MAKE) $(MAKE_OPTS) TEST_LIBS=$(LIB_SCTP) TEST_PROG=test-libsctp have_test_prog) ifeq ($(HAVE_LIB_SCTP),1) CONFIG_CFLAGS += -DHAVE_LIB_SCTP CONFIG_LDFLAGS += $(LIB_SCTP) $(info autoconfig: using $(LIB_SCTP)) endif endif ifndef $(HAVE_LIB_Z) HAVE_LIB_Z = $(shell $(MAKE) $(MAKE_OPTS) TEST_LIBS=$(LIB_Z) TEST_PROG=test-libz have_test_prog) ifeq ($(HAVE_LIB_Z),1) CONFIG_CFLAGS += -DHAVE_LIB_Z CONFIG_LDFLAGS += $(LIB_Z) $(info autoconfig: using $(LIB_Z)) endif endif ifndef $(HAVE_LIB_DL) HAVE_LIB_DL = $(shell $(MAKE) $(MAKE_OPTS) TEST_LIBS=$(LIB_DL) TEST_PROG=test-libdl have_test_prog) ifeq ($(HAVE_LIB_DL),1) CONFIG_CFLAGS += -DHAVE_LIB_DL CONFIG_LDFLAGS += $(LIB_DL) $(info autoconfig: using $(LIB_DL)) endif endif ifndef $(HAVE_LIB_JUDY) HAVE_LIB_JUDY = $(shell $(MAKE) $(MAKE_OPTS) TEST_LIBS=$(LIB_JUDY) TEST_PROG=test-judy have_test_prog) ifeq ($(HAVE_LIB_JUDY),1) CONFIG_CFLAGS += -DHAVE_LIB_JUDY CONFIG_LDFLAGS += $(LIB_JUDY) $(info autoconfig: using $(LIB_JUDY)) endif endif ifndef $(HAVE_LIB_PTHREAD_SPINLOCK) HAVE_LIB_PTHREAD_SPINLOCK = $(shell $(MAKE) $(MAKE_OPTS) TEST_LIBS=$(LIB_PTHREAD) TEST_PROG=test-libpthread-spinlock have_test_prog) ifeq ($(HAVE_LIB_PTHREAD_SPINLOCK),1) CONFIG_CFLAGS += -DHAVE_LIB_PTHREAD_SPINLOCK $(info autoconfig: using $(LIB_PTHREAD) spinlock) endif endif # # Always add in pthread lib last to resolve pthread linker issues # ifndef $(HAVE_LIB_PTHREAD) HAVE_LIB_PTHREAD = $(shell $(MAKE) $(MAKE_OPTS) TEST_LIBS=$(LIB_PTHREAD) TEST_PROG=test-libpthread have_test_prog) ifeq ($(HAVE_LIB_PTHREAD),1) CONFIG_CFLAGS += -DHAVE_LIB_PTHREAD CONFIG_LDFLAGS += $(LIB_PTHREAD) $(info autoconfig: using $(LIB_PTHREAD)) endif endif ifndef $(HAVE_APPARMOR) HAVE_APPARMOR = $(shell $(MAKE) $(MAKE_OPTS) have_apparmor) ifeq ($(HAVE_APPARMOR),1) CONFIG_OBJS += apparmor-data.o CONFIG_CFLAGS += -DHAVE_APPARMOR CONFIG_LDFLAGS += $(LIB_APPARMOR) $(info autoconfig: using $(LIB_APPARMOR)) endif endif ifndef $(HAVE_LIB_IPSEC_MB) HAVE_LIB_IPSEC_MB = $(shell $(MAKE) $(MAKE_OPTS) TEST_LIBS=$(LIB_IPSEC_MB) TEST_PROG=test-libipsec-mb have_test_prog) ifeq ($(HAVE_LIB_IPSEC_MB),1) CONFIG_CFLAGS += -DHAVE_LIB_IPSEC_MB CONFIG_LDFLAGS += $(LIB_IPSEC_MB) $(info autoconfig: using $(LIB_IPSEC_MB)) endif endif ifndef $(HAVE_AIO_H) HAVE_AIO_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=aio.h have_header_h) ifeq ($(HAVE_AIO_H),1) CONFIG_CFLAGS += -DHAVE_AIO_H $(info autoconfig: using aio.h) endif endif ifndef $(HAVE_ASM_LDT_H) HAVE_ASM_LDT_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=asm/ldt.h have_header_h) ifeq ($(HAVE_ASM_LDT_H),1) CONFIG_CFLAGS += -DHAVE_ASM_LDT_H $(info autoconfig: using asm/ldt.h) endif endif # # This must always come after -pthread so that static linking works # ifeq ($(shell uname -s),Haiku) CONFIG_LDFLAGS += -lnetwork else CONFIG_LDFLAGS += -lc endif ifndef $(HAVE_BSD_STDLIB_H) HAVE_BSD_STDLIB_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=bsd/stdlib.h have_header_h) ifeq ($(HAVE_BSD_STDLIB_H),1) CONFIG_CFLAGS += -DHAVE_BSD_STDLIB_H $(info autoconfig: using bsd/stdlib.h) endif endif ifndef $(HAVE_BSD_STRING_H) HAVE_BSD_STRING_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=bsd/string.h have_header_h) ifeq ($(HAVE_BSD_STRING_H),1) CONFIG_CFLAGS += -DHAVE_BSD_STRING_H $(info autoconfig: using bsd/string.h) endif endif ifndef $(HAVE_BSD_SYS_TREE_H) HAVE_BSD_SYS_TREE_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=bsd/sys/tree.h have_header_h) ifeq ($(HAVE_BSD_SYS_TREE_H),1) CONFIG_CFLAGS += -DHAVE_BSD_SYS_TREE_H $(info autoconfig: using bsd/sys/tree.h) endif endif ifndef $(HAVE_BSD_UNISTD_H) HAVE_BSD_UNISTD_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=bsd/unistd.h have_header_h) ifeq ($(HAVE_BSD_UNISTD_H),1) CONFIG_CFLAGS += -DHAVE_BSD_UNISTD_H $(info autoconfig: using bsd/unistd.h) endif endif ifndef $(HAVE_BSD_WCHAR) HAVE_BSD_WCHAR = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-bsd-wchar have_test_prog) ifeq ($(HAVE_BSD_WCHAR),1) CONFIG_CFLAGS += -DHAVE_BSD_WCHAR $(info autoconfig: using bsd/wchar.h) endif endif ifndef $(HAVE_LINUX_ANDROID_BINDER_H) HAVE_LINUX_ANDROID_BINDER_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/android/binder.h have_header_h) ifeq ($(HAVE_LINUX_ANDROID_BINDER_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_ANDROID_BINDER_H $(info autoconfig: using linux/android/binder.h) endif endif ifndef $(HAVE_LINUX_ANDROID_BINDERFS_H) HAVE_LINUX_ANDROID_BINDERFS_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/android/binderfs.h have_header_h) ifeq ($(HAVE_LINUX_ANDROID_BINDERFS_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_ANDROID_BINDERFS_H $(info autoconfig: using linux/android/binderfs.h) endif endif ifndef $(HAVE_COMPLEX_H) HAVE_COMPLEX_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=complex.h have_header_h) ifeq ($(HAVE_COMPLEX_H),1) CONFIG_CFLAGS += -DHAVE_COMPLEX_H $(info autoconfig: using complex.h) endif endif ifndef $(HAVE_CPUID_H) HAVE_CPUID_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=cpuid.h have_header_h) ifeq ($(HAVE_CPUID_H),1) CONFIG_CFLAGS += -DHAVE_CPUID_H $(info autoconfig: using cpuid.h) endif endif ifndef $(HAVE_WCHAR) HAVE_WCHAR = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-wchar have_test_prog) ifeq ($(HAVE_WCHAR),1) CONFIG_CFLAGS += -DHAVE_WCHAR $(info autoconfig: using wchar.h) endif endif ifndef $(HAVE_CRYPT_H) HAVE_CRYPT_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=crypt.h have_header_h) ifeq ($(HAVE_CRYPT_H),1) CONFIG_CFLAGS += -DHAVE_CRYPT_H $(info autoconfig: using crypt.h) endif endif ifndef $(HAVE_FEATURES_H) HAVE_FEATURES_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=features.h have_header_h) ifeq ($(HAVE_FEATURES_H),1) CONFIG_CFLAGS += -DHAVE_FEATURES_H $(info autoconfig: using features.h) endif endif ifndef $(HAVE_FENV_H) HAVE_FENV_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=fenv.h have_header_h) ifeq ($(HAVE_FENV_H),1) CONFIG_CFLAGS += -DHAVE_FENV_H $(info autoconfig: using fenv.h) endif endif ifndef $(HAVE_FLOAT_H) HAVE_FLOAT_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=float.h have_header_h) ifeq ($(HAVE_FLOAT_H),1) CONFIG_CFLAGS += -DHAVE_FLOAT_H $(info autoconfig: using float.h) endif endif ifndef $(HAVE_GRP_H) HAVE_GRP_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=grp.h have_header_h) ifeq ($(HAVE_GRP_H),1) CONFIG_CFLAGS += -DHAVE_GRP_H $(info autoconfig: using grp.h) endif endif ifndef $(HAVE_INTEL_IPSEC_MB_H) HAVE_INTEL_IPSEC_MB_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=intel-ipsec-mb.h have_header_h) ifeq ($(HAVE_INTEL_IPSEC_MB_H),1) CONFIG_CFLAGS += -DHAVE_INTEL_IPSEC_MB_H $(info autoconfig: using intel_ipsec_mb.h) endif endif ifndef $(HAVE_JUDY_H) HAVE_JUDY_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=Judy.h have_header_h) ifeq ($(HAVE_JUDY_H),1) CONFIG_CFLAGS += -DHAVE_JUDY_H $(info autoconfig: using Judy.h) endif endif ifndef $(HAVE_KEYUTILS_H) HAVE_KEYUTILS_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=keyutils.h have_header_h) ifeq ($(HAVE_KEYUTILS_H),1) CONFIG_CFLAGS += -DHAVE_KEYUTILS_H $(info autoconfig: using keyutils.h) endif endif ifndef $(HAVE_LIBAIO_H) HAVE_LIBAIO_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=libaio.h have_header_h) ifeq ($(HAVE_LIBAIO_H),1) CONFIG_CFLAGS += -DHAVE_LIBAIO_H $(info autoconfig: using libaio.h) endif endif ifndef $(HAVE_LIBGEN_H) HAVE_LIBGEN_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=libgen.h have_header_h) ifeq ($(HAVE_LIBGEN_H),1) CONFIG_CFLAGS += -DHAVE_LIBGEN_H $(info autoconfig: using libgen.h) endif endif ifndef $(HAVE_LINK_H) HAVE_LINK_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=link.h have_header_h) ifeq ($(HAVE_LINK_H),1) CONFIG_CFLAGS += -DHAVE_LINK_H $(info autoconfig: using link.h) endif endif ifndef $(HAVE_LOCALE_H) HAVE_LOCALE_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=locale.h have_header_h) ifeq ($(HAVE_LOCALE_H),1) CONFIG_CFLAGS += -DHAVE_LOCALE_H $(info autoconfig: using locale.h) endif endif ifndef $(HAVE_MALLOC_H) HAVE_MALLOC_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=malloc.h have_header_h) ifeq ($(HAVE_MALLOC_H),1) CONFIG_CFLAGS += -DHAVE_MALLOC_H $(info autoconfig: using malloc.h) endif endif ifndef $(HAVE_MNTENT_H) HAVE_MNTENT_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=mntent.h have_header_h) ifeq ($(HAVE_MNTENT_H),1) CONFIG_CFLAGS += -DHAVE_MNTENT_H $(info autoconfig: using mntent.h) endif endif ifndef $(HAVE_MQUEUE_H) HAVE_MQUEUE_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=mqueue.h have_header_h) ifeq ($(HAVE_MQUEUE_H),1) CONFIG_CFLAGS += -DHAVE_MQUEUE_H $(info autoconfig: using mqueue.h) endif endif ifndef $(HAVE_POLL_H) HAVE_POLL_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=poll.h have_header_h) ifeq ($(HAVE_POLL_H),1) CONFIG_CFLAGS += -DHAVE_POLL_H $(info autoconfig: using poll.h) endif endif ifndef $(HAVE_SEMAPHORE_H) HAVE_SEMAPHORE_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=semaphore.h have_header_h) ifeq ($(HAVE_SEMAPHORE_H),1) CONFIG_CFLAGS += -DHAVE_SEMAPHORE_H $(info autoconfig: using semaphore.h) endif endif ifndef $(HAVE_STRINGS_H) HAVE_STRINGS_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=strings.h have_header_h) ifeq ($(HAVE_STRINGS_H),1) CONFIG_CFLAGS += -DHAVE_STRINGS_H $(info autoconfig: using strings.h) endif endif ifndef $(HAVE_SYSLOG_H) HAVE_SYSLOG_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=syslog.h have_header_h) ifeq ($(HAVE_SYSLOG_H),1) CONFIG_CFLAGS += -DHAVE_SYSLOG_H $(info autoconfig: using syslog.h) endif endif ifndef $(HAVE_SPAWN_H) HAVE_SPAWN_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=spawn.h have_header_h) ifeq ($(HAVE_SPAWN_H),1) CONFIG_CFLAGS += -DHAVE_SPAWN_H $(info autoconfig: using spawn.h) endif endif ifndef $(HAVE_TERMIO_H) HAVE_TERMIO_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=termio.h have_header_h) ifeq ($(HAVE_TERMIO_H),1) CONFIG_CFLAGS += -DHAVE_TERMIO_H $(info autoconfig: using termio.h) endif endif ifndef $(HAVE_TERMIOS_H) HAVE_TERMIOS_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=termios.h have_header_h) ifeq ($(HAVE_TERMIOS_H),1) CONFIG_CFLAGS += -DHAVE_TERMIOS_H $(info autoconfig: using termios.h) endif endif ifndef $(HAVE_UCONTEXT_H) HAVE_UCONTEXT_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=ucontext.h have_header_h) ifeq ($(HAVE_UCONTEXT_H),1) CONFIG_CFLAGS += -DHAVE_UCONTEXT_H $(info autoconfig: using ucontext.h) endif endif ifndef $(HAVE_USTAT_H) HAVE_USTAT_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=ustat.h have_header_h) ifeq ($(HAVE_USTAT_H),1) CONFIG_CFLAGS += -DHAVE_USTAT_H $(info autoconfig: using ustat.h) endif endif ifndef $(HAVE_UTIME_H) HAVE_UTIME_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=utime.h have_header_h) ifeq ($(HAVE_UTIME_H),1) CONFIG_CFLAGS += -DHAVE_UTIME_H $(info autoconfig: using utime.h) endif endif ifndef $(HAVE_NET_IF_H) HAVE_NET_IF_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=net/if.h have_header_h) ifeq ($(HAVE_NET_IF_H),1) CONFIG_CFLAGS += -DHAVE_NET_IF_H $(info autoconfig: using net/if.h) endif endif ifndef $(HAVE_NETINET_IP_H) HAVE_NETINET_IP_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=netinet/ip.h have_header_h) ifeq ($(HAVE_NETINET_IP_H),1) CONFIG_CFLAGS += -DHAVE_NETINET_IP_H $(info autoconfig: using netinet/ip.h) endif endif ifndef $(HAVE_NETINET_IP_ICMP_H) HAVE_NETINET_IP_ICMP_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=netinet/ip_icmp.h have_header_h) ifeq ($(HAVE_NETINET_IP_ICMP_H),1) CONFIG_CFLAGS += -DHAVE_NETINET_IP_ICMP_H $(info autoconfig: using netinet/ip_icmp.h) endif endif ifndef $(HAVE_NETINET_SCTP_H) HAVE_NETINET_SCTP_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=netinet/sctp.h have_header_h) ifeq ($(HAVE_NETINET_SCTP_H),1) CONFIG_CFLAGS += -DHAVE_NETINET_SCTP_H $(info autoconfig: using netinet/sctp.h) endif endif ifndef $(HAVE_NETINET_TCP_H) HAVE_NETINET_TCP_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=netinet/tcp.h have_header_h) ifeq ($(HAVE_NETINET_TCP_H),1) CONFIG_CFLAGS += -DHAVE_NETINET_TCP_H $(info autoconfig: using netinet/tcp.h) endif endif ifndef $(HAVE_SYS_APPARMOR_H) HAVE_SYS_APPARMOR_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/apparmor.h have_header_h) ifeq ($(HAVE_SYS_APPARMOR_H),1) CONFIG_CFLAGS += -DHAVE_SYS_APPARMOR_H $(info autoconfig: using sys/apparmor.h) endif endif ifndef $(HAVE_SYS_AUXV_H) HAVE_SYS_AUXV_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/auxv.h have_header_h) ifeq ($(HAVE_SYS_AUXV_H),1) CONFIG_CFLAGS += -DHAVE_SYS_AUXV_H $(info autoconfig: using sys/auxv.h) endif endif ifndef $(HAVE_SYS_CAPABILITY_H) HAVE_SYS_CAPABILITY_H = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-cap have_test_prog) ifeq ($(HAVE_SYS_CAPABILITY_H),1) CONFIG_CFLAGS += -DHAVE_SYS_CAPABILITY_H $(info autoconfig: using sys/capability.h) endif endif ifndef $(HAVE_SYS_EPOLL_H) HAVE_SYS_EPOLL_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/epoll.h have_header_h) ifeq ($(HAVE_SYS_EPOLL_H),1) CONFIG_CFLAGS += -DHAVE_SYS_EPOLL_H $(info autoconfig: using sys/epoll.h) endif endif ifndef $(HAVE_SYS_EVENTFD_H) HAVE_SYS_EVENTFD_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/eventfd.h have_header_h) ifeq ($(HAVE_SYS_EVENTFD_H),1) CONFIG_CFLAGS += -DHAVE_SYS_EVENTFD_H $(info autoconfig: using sys/eventfd.h) endif endif ifndef $(HAVE_SYS_INOTIFY_H) HAVE_SYS_INOTIFY_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/inotify.h have_header_h) ifeq ($(HAVE_SYS_INOTIFY_H),1) CONFIG_CFLAGS += -DHAVE_SYS_INOTIFY_H $(info autoconfig: using sys/inotify.h) endif endif ifndef $(HAVE_SYS_IO_H) HAVE_SYS_IO_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/io.h have_header_h) ifeq ($(HAVE_SYS_IO_H),1) CONFIG_CFLAGS += -DHAVE_SYS_IO_H $(info autoconfig: using sys/io.h) endif endif ifndef $(HAVE_SYS_IPC_H) HAVE_SYS_IPC_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/ipc.h have_header_h) ifeq ($(HAVE_SYS_IPC_H),1) CONFIG_CFLAGS += -DHAVE_SYS_IPC_H $(info autoconfig: using sys/ipc.h) endif endif ifndef $(HAVE_SYS_FANOTIFY_H) HAVE_SYS_FANOTIFY_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/fanotify.h have_header_h) ifeq ($(HAVE_SYS_FANOTIFY_H),1) CONFIG_CFLAGS += -DHAVE_SYS_FANOTIFY_H $(info autoconfig: using sys/fanotify.h) endif endif ifndef $(HAVE_SYS_MEMFD_H) HAVE_SYS_MEMFD_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/memfd.h have_header_h) ifeq ($(HAVE_SYS_MEMFD_H),1) CONFIG_CFLAGS += -DHAVE_SYS_MEMFD_H $(info autoconfig: using sys/memfd.h) endif endif ifndef $(HAVE_SYS_MOUNT_H) HAVE_SYS_MOUNT_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/mount.h have_header_h) ifeq ($(HAVE_SYS_MOUNT_H),1) CONFIG_CFLAGS += -DHAVE_SYS_MOUNT_H $(info autoconfig: using sys/mount.h) endif endif ifndef $(HAVE_SYS_MSG_H) HAVE_SYS_MSG_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/msg.h have_header_h) ifeq ($(HAVE_SYS_MSG_H),1) CONFIG_CFLAGS += -DHAVE_SYS_MSG_H $(info autoconfig: using sys/msg.h) endif endif ifndef $(HAVE_SYS_PARAM_H) HAVE_SYS_PARAM_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/param.h have_header_h) ifeq ($(HAVE_SYS_PARAM_H),1) CONFIG_CFLAGS += -DHAVE_SYS_PARAM_H $(info autoconfig: using sys/param.h) endif endif ifndef $(HAVE_SYS_PERSONALITY_H) HAVE_SYS_PERSONALITY_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/personality.h have_header_h) ifeq ($(HAVE_SYS_PERSONALITY_H),1) CONFIG_CFLAGS += -DHAVE_SYS_PERSONALITY_H $(info autoconfig: using sys/personality.h) endif endif ifndef $(HAVE_SYS_PLATFORM_PPC_H) HAVE_SYS_PLATFORM_PPC_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/platform/ppc.h have_header_h) ifeq ($(HAVE_SYS_PLATFORM_PPC_H),1) CONFIG_CFLAGS += -DHAVE_SYS_PLATFORM_PPC_H $(info autoconfig: using sys/platform/ppc.h) endif endif ifndef $(HAVE_SYS_PRCTL_H) HAVE_SYS_PRCTL_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/prctl.h have_header_h) ifeq ($(HAVE_SYS_PRCTL_H),1) CONFIG_CFLAGS += -DHAVE_SYS_PRCTL_H $(info autoconfig: using sys/prctl.h) endif endif ifndef $(HAVE_SYS_TREE_H) HAVE_SYS_TREE_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/tree.h have_header_h) ifeq ($(HAVE_SYS_TREE_H),1) CONFIG_CFLAGS += -DHAVE_SYS_TREE_H $(info autoconfig: using sys/tree.h) endif endif ifndef $(HAVE_SYS_QUOTA_H) HAVE_SYS_QUOTA_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/quota.h have_header_h) ifeq ($(HAVE_SYS_QUOTA_H),1) CONFIG_CFLAGS += -DHAVE_SYS_QUOTA_H $(info autoconfig: using sys/quota.h) endif endif ifndef $(HAVE_SYS_SELECT_H) HAVE_SYS_SELECT_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/select.h have_header_h) ifeq ($(HAVE_SYS_SELECT_H),1) CONFIG_CFLAGS += -DHAVE_SYS_SELECT_H $(info autoconfig: using sys/select.h) endif endif ifndef $(HAVE_SYS_SENDFILE_H) HAVE_SYS_SENDFILE_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/sendfile.h have_header_h) ifeq ($(HAVE_SYS_SENDFILE_H),1) CONFIG_CFLAGS += -DHAVE_SYS_SENDFILE_H $(info autoconfig: using sys/sendfile.h) endif endif ifndef $(HAVE_SYS_SHM_H) HAVE_SYS_SHM_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/shm.h have_header_h) ifeq ($(HAVE_SYS_SHM_H),1) CONFIG_CFLAGS += -DHAVE_SYS_SHM_H $(info autoconfig: using sys/shm.h) endif endif ifndef $(HAVE_SYS_SIGNALFD_H) HAVE_SYS_SIGNALFD_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/signalfd.h have_header_h) ifeq ($(HAVE_SYS_SIGNALFD_H),1) CONFIG_CFLAGS += -DHAVE_SYS_SIGNALFD_H $(info autoconfig: using sys/signalfd.h) endif endif ifndef $(HAVE_SYS_STATFS_H) HAVE_SYS_STATFS_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/statfs.h have_header_h) ifeq ($(HAVE_SYS_STATFS_H),1) CONFIG_CFLAGS += -DHAVE_SYS_STATFS_H $(info autoconfig: using sys/statfs.h) endif endif ifndef $(HAVE_SYS_STATVFS_H) HAVE_SYS_STATVFS_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/statvfs.h have_header_h) ifeq ($(HAVE_SYS_STATVFS_H),1) CONFIG_CFLAGS += -DHAVE_SYS_STATVFS_H $(info autoconfig: using sys/statvfs.h) endif endif ifndef $(HAVE_SYS_SWAP_H) HAVE_SYS_SWAP_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/swap.h have_header_h) ifeq ($(HAVE_SYS_SWAP_H),1) CONFIG_CFLAGS += -DHAVE_SYS_SWAP_H $(info autoconfig: using sys/swap.h) endif endif ifndef $(HAVE_SYSCALL_H) HAVE_SYSCALL_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/syscall.h have_header_h) ifeq ($(HAVE_SYSCALL_H),1) CONFIG_CFLAGS += -DHAVE_SYSCALL_H $(info autoconfig: using sys/syscall.h) endif endif ifndef $(HAVE_SYS_SYSINFO_H) HAVE_SYS_SYSINFO_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/sysinfo.h have_header_h) ifeq ($(HAVE_SYS_SYSINFO_H),1) CONFIG_CFLAGS += -DHAVE_SYS_SYSINFO_H $(info autoconfig: using sys/sysinfo.h) endif endif ifndef $(HAVE_SYS_SYSMACROS_H) HAVE_SYS_SYSMACROS_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/sysmacros.h have_header_h) ifeq ($(HAVE_SYS_SYSMACROS_H),1) CONFIG_CFLAGS += -DHAVE_SYS_SYSMACROS_H $(info autoconfig: using sys/sysmacros.h) endif endif ifndef $(HAVE_SYS_TIMERFD_H) HAVE_SYS_TIMERFD_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/timerfd.h have_header_h) ifeq ($(HAVE_SYS_TIMERFD_H),1) CONFIG_CFLAGS += -DHAVE_SYS_TIMERFD_H $(info autoconfig: using sys/timerfd.h) endif endif ifndef $(HAVE_SYS_TIMEX_H) HAVE_SYS_TIMEX_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/timex.h have_header_h) ifeq ($(HAVE_SYS_TIMEX_H),1) CONFIG_CFLAGS += -DHAVE_SYS_TIMEX_H $(info autoconfig: using sys/timex.h) endif endif ifndef $(HAVE_SYS_UIO_H) HAVE_SYS_UIO_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/uio.h have_header_h) ifeq ($(HAVE_SYS_UIO_H),1) CONFIG_CFLAGS += -DHAVE_SYS_UIO_H $(info autoconfig: using sys/uio.h) endif endif ifndef $(HAVE_SYS_UCRED_H) HAVE_SYS_UCRED_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/ucred.h have_header_h) ifeq ($(HAVE_SYS_UCRED_H),1) CONFIG_CFLAGS += -DHAVE_SYS_UCRED_H $(info autoconfig: using sys/ucred.h) endif endif ifndef $(HAVE_SYS_UN_H) HAVE_SYS_UN_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/un.h have_header_h) ifeq ($(HAVE_SYS_UN_H),1) CONFIG_CFLAGS += -DHAVE_SYS_UN_H $(info autoconfig: using sys/un.h) endif endif ifndef $(HAVE_SYS_UTSNAME_H) HAVE_SYS_UTSNAME_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/utsname.h have_header_h) ifeq ($(HAVE_SYS_UTSNAME_H),1) CONFIG_CFLAGS += -DHAVE_SYS_UTSNAME_H $(info autoconfig: using sys/utsname.h) endif endif ifndef $(HAVE_SYS_VFS_H) HAVE_SYS_VFS_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/vfs.h have_header_h) ifeq ($(HAVE_SYS_VFS_H),1) CONFIG_CFLAGS += -DHAVE_SYS_VFS_H $(info autoconfig: using sys/vfs.h) endif endif ifndef $(HAVE_SYS_XATTR_H) HAVE_SYS_XATTR_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=sys/xattr.h have_header_h) ifeq ($(HAVE_SYS_XATTR_H),1) CONFIG_CFLAGS += -DHAVE_SYS_XATTR_H $(info autoconfig: using sys/xattr.h) endif endif ifndef $(HAVE_ATTR_XATTR_H) HAVE_ATTR_XATTR_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=attr/xattr.h have_header_h) ifeq ($(HAVE_ATTR_XATTR_H),1) CONFIG_CFLAGS += -DHAVE_ATTR_XATTR_H $(info autoconfig: using attr/xattr.h) endif endif ifndef $(HAVE_LINUX_AUDIT_H) HAVE_LINUX_AUDIT_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/audit.h have_header_h) ifeq ($(HAVE_LINUX_AUDIT_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_AUDIT_H $(info autoconfig: using linux/audit.h) endif endif ifndef $(HAVE_LINUX_CN_PROC_H) HAVE_LINUX_CN_PROC_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/cn_proc.h have_header_h) ifeq ($(HAVE_LINUX_CN_PROC_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_CN_PROC_H $(info autoconfig: using linux/cn_proc.h) endif endif ifndef $(HAVE_LINUX_CONNECTOR_H) HAVE_LINUX_CONNECTOR_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/connector.h have_header_h) ifeq ($(HAVE_LINUX_CONNECTOR_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_CONNECTOR_H $(info autoconfig: using linux/connector.h) endif endif ifndef $(HAVE_LINUX_DM_IOCTL_H) HAVE_LINUX_DM_IOCTL_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/dm-ioctl.h have_header_h) ifeq ($(HAVE_LINUX_DM_IOCTL_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_DM_IOCTL_H $(info autoconfig: using linux/dm-ioctl.h) endif endif ifndef $(HAVE_LINUX_FIEMAP_H) HAVE_LINUX_FIEMAP_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/fiemap.h have_header_h) ifeq ($(HAVE_LINUX_FIEMAP_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_FIEMAP_H $(info autoconfig: using linux/fiemap.h) endif endif ifndef $(HAVE_LINUX_FILTER_H) HAVE_LINUX_FILTER_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/filter.h have_header_h) ifeq ($(HAVE_LINUX_FILTER_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_FILTER_H $(info autoconfig: using linux/filter.h) endif endif ifndef $(HAVE_LINUX_FUTEX_H) HAVE_LINUX_FUTEX_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/futex.h have_header_h) ifeq ($(HAVE_LINUX_FUTEX_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_FUTEX_H $(info autoconfig: using linux/futex.h) endif endif ifndef $(HAVE_LINUX_FS_H) HAVE_LINUX_FS_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/fs.h have_header_h) ifeq ($(HAVE_LINUX_FS_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_FS_H $(info autoconfig: using linux/fs.h) endif endif ifndef $(HAVE_LINUX_GENETLINK_H) HAVE_LINUX_GENETLINK_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/genetlink.h have_header_h) ifeq ($(HAVE_LINUX_GENETLINK_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_GENETLINK_H $(info autoconfig: using linux/genetlink.h) endif endif ifndef $(HAVE_LINUX_HDREG_H) HAVE_LINUX_HDREG_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/hdreg.h have_header_h) ifeq ($(HAVE_LINUX_HDREG_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_HDREG_H $(info autoconfig: using linux/hdreg.h) endif endif ifndef $(HAVE_LINUX_HPET_H) HAVE_LINUX_HPET_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/hpet.h have_header_h) ifeq ($(HAVE_LINUX_HPET_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_HPET_H $(info autoconfig: using linux/hpet.h) endif endif ifndef $(HAVE_LINUX_IF_ALG_H) HAVE_LINUX_IF_ALG_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/if_alg.h have_header_h) ifeq ($(HAVE_LINUX_IF_ALG_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_IF_ALG_H $(info autoconfig: using linux/if_alg.h) endif endif ifndef $(HAVE_LINUX_IF_PACKET_H) HAVE_LINUX_IF_PACKET_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/if_packet.h have_header_h) ifeq ($(HAVE_LINUX_IF_PACKET_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_IF_PACKET_H $(info autoconfig: using linux/if_packet.h) endif endif ifndef $(HAVE_LINUX_IF_TUN_H) HAVE_LINUX_IF_TUN_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/if_tun.h have_header_h) ifeq ($(HAVE_LINUX_IF_TUN_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_IF_TUN_H $(info autoconfig: using linux/if_tun.h) endif endif ifndef $(HAVE_LINUX_KD_H) HAVE_LINUX_KD_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/kd.h have_header_h) ifeq ($(HAVE_LINUX_KD_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_KD_H $(info autoconfig: using linux/kd.h) endif endif ifndef $(HAVE_LINUX_LOOP_H) HAVE_LINUX_LOOP_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/loop.h have_header_h) ifeq ($(HAVE_LINUX_LOOP_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_LOOP_H $(info autoconfig: using linux/loop.h) endif endif ifndef $(HAVE_LINUX_MEDIA_H) HAVE_LINUX_MEDIA_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/media.h have_header_h) ifeq ($(HAVE_LINUX_MEDIA_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_MEDIA_H $(info autoconfig: using linux/media.h) endif endif ifndef $(HAVE_LINUX_MEMBARRIER_H) HAVE_LINUX_MEMBARRIER_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/membarrier.h have_header_h) ifeq ($(HAVE_LINUX_MEMBARRIER_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_MEMBARRIER_H $(info autoconfig: using linux/membarrier.h) endif endif ifndef $(HAVE_LINUX_NETLINK_H) HAVE_LINUX_NETLINK_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/netlink.h have_header_h) ifeq ($(HAVE_LINUX_NETLINK_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_NETLINK_H $(info autoconfig: using linux/netlink.h) endif endif ifndef $(HAVE_LINUX_PERF_EVENT_H) HAVE_LINUX_PERF_EVENT_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/perf_event.h have_header_h) ifeq ($(HAVE_LINUX_PERF_EVENT_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_PERF_EVENT_H $(info autoconfig: using linux/perf_event.h) endif endif ifndef $(HAVE_LINUX_POSIX_TYPES_H) HAVE_LINUX_POSIX_TYPES_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/posix_types.h have_header_h) ifeq ($(HAVE_LINUX_POSIX_TYPES_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_POSIX_TYPES_H $(info autoconfig: using linux/posix_types.h) endif endif ifndef $(HAVE_LINUX_PTP_CLOCK_H) HAVE_LINUX_PTP_CLOCK_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/ptp_clock.h have_header_h) ifeq ($(HAVE_LINUX_PTP_CLOCK_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_PTP_CLOCK_H $(info autoconfig: using linux/ptp_clock.h) endif endif ifndef $(HAVE_LINUX_RANDOM_H) HAVE_LINUX_RANDOM_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/random.h have_header_h) ifeq ($(HAVE_LINUX_RANDOM_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_RANDOM_H $(info autoconfig: using linux/random.h) endif endif ifndef $(HAVE_LINUX_RTC_H) HAVE_LINUX_RTC_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/rtc.h have_header_h) ifeq ($(HAVE_LINUX_RTC_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_RTC_H $(info autoconfig: using linux/rtc.h) endif endif ifndef $(HAVE_LINUX_RTNETLINK_H) HAVE_LINUX_RTNETLINK_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/rtnetlink.h have_header_h) ifeq ($(HAVE_LINUX_RTNETLINK_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_RTNETLINK_H $(info autoconfig: using linux/rtnetlink.h) endif endif ifndef $(HAVE_LINUX_SECCOMP_H) HAVE_LINUX_SECCOMP_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/seccomp.h have_header_h) ifeq ($(HAVE_LINUX_SECCOMP_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_SECCOMP_H $(info autoconfig: using linux/seccomp.h) endif endif ifndef $(HAVE_LINUX_SERIAL_H) HAVE_LINUX_SERIAL_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/serial.h have_header_h) ifeq ($(HAVE_LINUX_SERIAL_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_SERIAL_H $(info autoconfig: using linux/serial.h) endif endif ifndef $(HAVE_LINUX_SOCK_DIAG_H) HAVE_LINUX_SOCK_DIAG_H = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-sock-diag have_test_prog) ifeq ($(HAVE_LINUX_SOCK_DIAG_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_SOCK_DIAG_H $(info autoconfig: using linux/sock_diag.h) endif endif ifndef $(HAVE_LINUX_SOCKET_H) HAVE_LINUX_SOCKET_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/socket.h have_header_h) ifeq ($(HAVE_LINUX_SOCKET_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_SOCKET_H $(info autoconfig: using linux/socket.h) endif endif ifndef $(HAVE_LINUX_SOCKIOS_H) HAVE_LINUX_SOCKIOS_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/sockios.h have_header_h) ifeq ($(HAVE_LINUX_SOCKIOS_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_SOCKIOS_H $(info autoconfig: using linux/sockios.h) endif endif ifndef $(HAVE_LINUX_SYSCTL_H) HAVE_LINUX_SYSCTL_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/sysctl.h have_header_h) ifeq ($(HAVE_LINUX_SYSCTL_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_SYSCTL_H $(info autoconfig: using linux/sysctl.h) endif endif ifndef $(HAVE_LINUX_TASKSTATS_H) HAVE_LINUX_TASKSTATS_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/taskstats.h have_header_h) ifeq ($(HAVE_LINUX_TASKSTATS_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_TASKSTATS_H $(info autoconfig: using linux/taskstats.h) endif endif ifndef $(HAVE_LINUX_UDP_H) HAVE_LINUX_UDP_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/udp.h have_header_h) ifeq ($(HAVE_LINUX_UDP_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_UDP_H $(info autoconfig: using linux/udp.h) endif endif ifndef $(HAVE_LINUX_UNIX_DIAG_H) HAVE_LINUX_UNIX_DIAG_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/unix_diag.h have_header_h) ifeq ($(HAVE_LINUX_UNIX_DIAG_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_UNIX_DIAG_H $(info autoconfig: using linux/unix_diag.h) endif endif ifndef $(HAVE_LINUX_USERFAULTFD_H) HAVE_LINUX_USERFAULTFD_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/userfaultfd.h have_header_h) ifeq ($(HAVE_LINUX_USERFAULTFD_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_USERFAULTFD_H $(info autoconfig: using linux/userfaultfd.h.h) endif endif ifndef $(HAVE_LINUX_VERSION_H) HAVE_LINUX_VERSION_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/version.h have_header_h) ifeq ($(HAVE_LINUX_VERSION_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_VERSION_H $(info autoconfig: using linux/version.h) endif endif ifndef $(HAVE_LINUX_VIDEODEV2_H) HAVE_LINUX_VIDEODEV2_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/videodev2.h have_header_h) ifeq ($(HAVE_LINUX_VIDEODEV2_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_VIDEODEV2_H $(info autoconfig: using linux/videodev2.h) endif endif ifndef $(HAVE_LINUX_VT_H) HAVE_LINUX_VT_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/vt.h have_header_h) ifeq ($(HAVE_LINUX_VT_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_VT_H $(info autoconfig: using linux/vt.h) endif endif ifndef $(HAVE_LINUX_WATCHDOG_H) HAVE_LINUX_WATCHDOG_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=linux/watchdog.h have_header_h) ifeq ($(HAVE_LINUX_WATCHDOG_H),1) CONFIG_CFLAGS += -DHAVE_LINUX_WATCHDOG_H $(info autoconfig: using linux/watchdog.h) endif endif ifndef $(HAVE_SCSI_SCSI_H) HAVE_SCSI_SCSI_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=scsi/scsi.h have_header_h) ifeq ($(HAVE_SCSI_SCSI_H),1) CONFIG_CFLAGS += -DHAVE_SCSI_SCSI_H $(info autoconfig: using scsi/scsi.h) endif endif ifndef $(HAVE_SCSI_SG_H) HAVE_SCSI_SG_H = $(shell $(MAKE) $(MAKE_OPTS) HEADER=scsi/sg.h have_header_h) ifeq ($(HAVE_SCSI_SG_H),1) CONFIG_CFLAGS += -DHAVE_SCSI_SG_H $(info autoconfig: using scsi/sg.h) endif endif ifndef $(HAVE_FLOAT_DECIMAL32) HAVE_FLOAT_DECIMAL32 = $(shell $(MAKE) $(MAKE_OPTS) FLOAT_TYPE=_Decimal32 have_float) ifeq ($(HAVE_FLOAT_DECIMAL32),1) CONFIG_CFLAGS += -DHAVE_FLOAT_DECIMAL32 $(info autoconfig: using float decimal32 support) endif endif ifndef $(HAVE_FLOAT_DECIMAL64) HAVE_FLOAT_DECIMAL64 = $(shell $(MAKE) $(MAKE_OPTS) FLOAT_TYPE=_Decimal64 have_float) ifeq ($(HAVE_FLOAT_DECIMAL64),1) CONFIG_CFLAGS += -DHAVE_FLOAT_DECIMAL64 $(info autoconfig: using float decimal64 support) endif endif ifndef $(HAVE_FLOAT_DECIMAL128) HAVE_FLOAT_DECIMAL128 = $(shell $(MAKE) $(MAKE_OPTS) FLOAT_TYPE=_Decimal128 have_float) ifeq ($(HAVE_FLOAT_DECIMAL128),1) CONFIG_CFLAGS += -DHAVE_FLOAT_DECIMAL128 $(info autoconfig: using float decimal128 support) endif endif ifndef $(HAVE_FLOAT16) HAVE_FLOAT16 = $(shell $(MAKE) $(MAKE_OPTS) FLOAT_TYPE=__fp16 have_float) ifeq ($(HAVE_FLOAT16),1) CONFIG_CFLAGS += -DHAVE_FLOAT16 $(info autoconfig: using float16 support) endif endif ifndef $(HAVE_FLOAT32) HAVE_FLOAT32 = $(shell $(MAKE) $(MAKE_OPTS) FLOAT_TYPE=_Float32 have_float) ifeq ($(HAVE_FLOAT32),1) CONFIG_CFLAGS += -DHAVE_FLOAT32 $(info autoconfig: using float32 support) endif endif ifndef $(HAVE_FLOAT80) HAVE_FLOAT80 = $(shell $(MAKE) $(MAKE_OPTS) FLOAT_TYPE=__float80 have_float) ifeq ($(HAVE_FLOAT80),1) CONFIG_CFLAGS += -DHAVE_FLOAT80 $(info autoconfig: using float80 support) endif endif ifndef $(HAVE_FLOAT128) HAVE_FLOAT128 = $(shell $(MAKE) $(MAKE_OPTS) FLOAT_TYPE=__float128 have_float) ifeq ($(HAVE_FLOAT128),1) CONFIG_CFLAGS += -DHAVE_FLOAT128 $(info autoconfig: using float128 support) endif endif ifndef $(HAVE_INT128_T) HAVE_INT128_T = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-int128_t have_test_prog) ifeq ($(HAVE_INT128_T),1) CONFIG_CFLAGS += -DHAVE_INT128_T $(info autoconfig: using int128_t support) endif endif ifndef $(HAVE_VECMATH) HAVE_VECMATH = $(shell $(MAKE) $(MAKE_OPTS) have_vecmath) ifeq ($(HAVE_VECMATH),1) CONFIG_CFLAGS += -DHAVE_VECMATH $(info autoconfig: using vector math support) endif endif ifndef $(HAVE_ATOMIC) HAVE_ATOMIC = $(shell $(MAKE) $(MAKE_OPTS) have_atomic) ifeq ($(HAVE_ATOMIC),1) CONFIG_CFLAGS += -DHAVE_ATOMIC CONFIG_LDFLAGS += $(LIB_ATOMIC) $(info autoconfig: using atomic support with $(LIB_ATOMIC)) endif endif ifndef $(HAVE_ASM_NOP) HAVE_ASM_NOP = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-asm-nop have_test_prog) ifeq ($(HAVE_ASM_NOP),1) CONFIG_CFLAGS += -DHAVE_ASM_NOP $(info autoconfig: using nop assembler instruction) endif endif ifndef $(HAVE_TARGET_CLONES) HAVE_TARGET_CLONES = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-target-clones have_test_prog) ifeq ($(HAVE_TARGET_CLONES),1) CONFIG_CFLAGS += -DHAVE_TARGET_CLONES $(info autoconfig: using target_clones attribute) endif endif ifndef $(HAVE_ALIGNED_64) HAVE_ALIGNED_64 = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-aligned-64 have_test_prog) ifeq ($(HAVE_ALIGNED_64),1) CONFIG_CFLAGS += -DHAVE_ALIGNED_64 $(info autoconfig: using 64 byte alignment attribute) endif endif ifndef $(HAVE_ALIGNED_128) HAVE_ALIGNED_128 = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-aligned-128 have_test_prog) ifeq ($(HAVE_ALIGNED_128),1) CONFIG_CFLAGS += -DHAVE_ALIGNED_128 $(info autoconfig: using 128 byte alignment attribute) endif endif ifndef $(HAVE_ALIGNED_64K) HAVE_ALIGNED_64K = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-aligned-64K have_test_prog) ifeq ($(HAVE_ALIGNED_64K),1) CONFIG_CFLAGS += -DHAVE_ALIGNED_64K $(info autoconfig: using 64K byte alignment attribute) endif endif ifndef $(HAVE_ACCEPT4) HAVE_ACCEPT4 = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-accept4 have_test_prog) ifeq ($(HAVE_ACCEPT4),1) CONFIG_CFLAGS += -DHAVE_ACCEPT4 $(info autoconfig: using accept4) endif endif ifndef $(HAVE_ADJTIME) HAVE_ADJTIME = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-adjtime have_test_prog) ifeq ($(HAVE_ADJTIME),1) CONFIG_CFLAGS += -DHAVE_ADJTIME $(info autoconfig: using adjtime) endif endif ifndef $(HAVE_ADJTIMEX) HAVE_ADJTIMEX = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-adjtimex have_test_prog) ifeq ($(HAVE_ADJTIMEX),1) CONFIG_CFLAGS += -DHAVE_ADJTIMEX $(info autoconfig: using adjtimex) endif endif ifndef $(HAVE_AFFINITY) HAVE_AFFINITY = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-affinity have_test_prog) ifeq ($(HAVE_AFFINITY),1) CONFIG_CFLAGS += -DHAVE_AFFINITY $(info autoconfig: using affinity scheduling CPU masks) endif endif ifndef $(HAVE_BRK) HAVE_BRK = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-brk have_test_prog) ifeq ($(HAVE_BRK),1) CONFIG_CFLAGS += -DHAVE_BRK $(info autoconfig: using brk) endif endif ifndef $(HAVE_BUILTIN_CTZ) HAVE_BUILTIN_CTZ = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-builtin-ctz have_test_prog) ifeq ($(HAVE_BUILTIN_CTZ),1) CONFIG_CFLAGS += -DHAVE_BUILTIN_CTZ $(info autoconfig: using __builtin_ctz) endif endif ifndef $(HAVE_BUILTIN_CPU_IS) HAVE_BUILTIN_CPU_IS = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-builtin-cpu-is have_test_prog) ifeq ($(HAVE_BUILTIN_CPU_IS),1) CONFIG_CFLAGS += -DHAVE_BUILTIN_CPU_IS $(info autoconfig: using __builtin_cpu_is) endif endif ifndef $(HAVE_BUILTIN_MEMCPY) HAVE_BUILTIN_MEMCPY = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-builtin-memcpy have_test_prog) ifeq ($(HAVE_BUILTIN_MEMCPY),1) CONFIG_CFLAGS += -DHAVE_BUILTIN_MEMCPY $(info autoconfig: using __builtin_memcpy) endif endif ifndef $(HAVE_BUILTIN_MEMMOVE) HAVE_BUILTIN_MEMMOVE = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-builtin-memmove have_test_prog) ifeq ($(HAVE_BUILTIN_MEMMOVE),1) CONFIG_CFLAGS += -DHAVE_BUILTIN_MEMMOVE $(info autoconfig: using __builtin_memmove) endif endif ifndef $(HAVE_BUILTIN_PREFETCH) HAVE_BUILTIN_PREFETCH = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-builtin-prefetch have_test_prog) ifeq ($(HAVE_BUILTIN_PREFETCH),1) CONFIG_CFLAGS += -DHAVE_BUILTIN_PREFETCH $(info autoconfig: using __builtin_prefetch) endif endif ifndef $(HAVE_BUILTIN_SFENCE) HAVE_BUILTIN_SFENCE = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-builtin-sfence have_test_prog) ifeq ($(HAVE_BUILTIN_SFENCE),1) CONFIG_CFLAGS += -DHAVE_BUILTIN_SFENCE $(info autoconfig: using __builtin_ia32_sfence) endif endif ifndef $(HAVE_CABSL) MATHFUNC=cabsl export MATHFUNC HAVE_CABSL = $(shell $(MAKE) $(MAKE_OPTS) MATHFUNC=cabsl have_mathfunc) ifeq ($(HAVE_CABSL),1) CONFIG_CFLAGS += -DHAVE_CABSL $(info autoconfig: using cabsl) endif endif ifndef $(HAVE_CCOSL) MATHFUNC=ccosl export MATHFUNC HAVE_CCOSL = $(shell $(MAKE) $(MAKE_OPTS) MATHFUNC=ccosl have_mathfunc) ifeq ($(HAVE_CCOSL),1) CONFIG_CFLAGS += -DHAVE_CCOSL $(info autoconfig: using ccosl) endif endif ifndef $(HAVE_CHROOT) HAVE_CHROOT = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-chroot have_test_prog) ifeq ($(HAVE_CHROOT),1) CONFIG_CFLAGS += -DHAVE_CHROOT $(info autoconfig: using chroot) endif endif ifndef $(HAVE_CRYPT_R) HAVE_CRYPT_R = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-crypt-r TEST_LIBS=$(LIB_CRYPT) have_test_prog) ifeq ($(HAVE_CRYPT_R),1) CONFIG_CFLAGS += -DHAVE_CRYPT_R $(info autoconfig: using crypt_r) endif endif ifndef $(HAVE_CLEARENV) HAVE_CLEARENV = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-clearenv have_test_prog) ifeq ($(HAVE_CLEARENV),1) CONFIG_CFLAGS += -DHAVE_CLEARENV $(info autoconfig: using clearenv) endif endif ifndef $(HAVE_CLOCK_GETRES) HAVE_CLOCK_GETRES = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-clock-getres have_test_prog) ifeq ($(HAVE_CLOCK_GETRES),1) CONFIG_CFLAGS += -DHAVE_CLOCK_GETRES $(info autoconfig: using clock_getres) endif endif ifndef $(HAVE_CLOCK_GETTIME) HAVE_CLOCK_GETTIME = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-clock-gettime have_test_prog) ifeq ($(HAVE_CLOCK_GETTIME),1) CONFIG_CFLAGS += -DHAVE_CLOCK_GETTIME $(info autoconfig: using clock_gettime) endif endif ifndef $(HAVE_CLOCK_NANOSLEEP) HAVE_CLOCK_NANOSLEEP = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-clock-nanosleep have_test_prog) ifeq ($(HAVE_CLOCK_NANOSLEEP),1) CONFIG_CFLAGS += -DHAVE_CLOCK_NANOSLEEP $(info autoconfig: using clock_nanosleep) endif endif ifndef $(HAVE_CLOCK_SETTIME) HAVE_CLOCK_SETTIME = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-clock-settime have_test_prog) ifeq ($(HAVE_CLOCK_SETTIME),1) CONFIG_CFLAGS += -DHAVE_CLOCK_SETTIME $(info autoconfig: using clock_settime) endif endif ifndef $(HAVE_CLONE) HAVE_CLONE = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-clone have_test_prog) ifeq ($(HAVE_CLONE),1) CONFIG_CFLAGS += -DHAVE_CLONE $(info autoconfig: using clone) endif endif ifndef $(HAVE_COMPLEX) HAVE_COMPLEX = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-complex have_test_prog) ifeq ($(HAVE_COMPLEX),1) CONFIG_CFLAGS += -DHAVE_COMPLEX $(info autoconfig: using complex) endif endif ifndef $(HAVE_COPY_FILE_RANGE) HAVE_COPY_FILE_RANGE = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-copy-file-range have_test_prog) ifeq ($(HAVE_COPY_FILE_RANGE),1) CONFIG_CFLAGS += -DHAVE_COPY_FILE_RANGE $(info autoconfig: using copy_file_range) endif endif ifndef $(HAVE_COSHL) MATHFUNC=coshl export MATHFUNC HAVE_COSHL = $(shell $(MAKE) $(MAKE_OPTS) MATHFUNC=coshl have_mathfunc) ifeq ($(HAVE_COSHL),1) CONFIG_CFLAGS += -DHAVE_COSHL $(info autoconfig: using coshl) endif endif ifndef $(HAVE_COSL) MATHFUNC=cosl export MATHFUNC HAVE_COSL = $(shell $(MAKE) $(MAKE_OPTS) MATHFUNC=cosl have_mathfunc) ifeq ($(HAVE_COSL),1) CONFIG_CFLAGS += -DHAVE_COSL $(info autoconfig: using cosl) endif endif ifndef $(HAVE_CPOW) MATHFUNC=cpow export MATHFUNC HAVE_CPOW = $(shell $(MAKE) $(MAKE_OPTS) MATHFUNC=cpow have_mathfunc) ifeq ($(HAVE_CPOW),1) CONFIG_CFLAGS += -DHAVE_CPOW $(info autoconfig: using cpow) endif endif ifndef $(HAVE_CPUID) HAVE_CPUID = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-cpuid have_test_prog) ifeq ($(HAVE_CPUID),1) CONFIG_CFLAGS += -DHAVE_CPUID $(info autoconfig: using cpuid) endif endif ifndef $(HAVE_CSINL) MATHFUNC=csinl export MATHFUNC HAVE_CSINL = $(shell $(MAKE) $(MAKE_OPTS) MATHFUNC=csinl have_mathfunc) ifeq ($(HAVE_CSINL),1) CONFIG_CFLAGS += -DHAVE_CSINL $(info autoconfig: using csinl) endif endif ifndef $(HAVE_DADDR_T) HAVE_DADDR_T = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-daddr_t have_test_prog) ifeq ($(HAVE_DADDR_T),1) CONFIG_CFLAGS += -DHAVE_DADDR_T $(info autoconfig: using daddr_t) endif endif ifndef $(HAVE_DARN) HAVE_DARN = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-darn have_test_prog) ifeq ($(HAVE_DARN),1) CONFIG_CFLAGS += -DHAVE_DARN $(info autoconfig: using power9 instruction darn) endif endif ifndef $(HAVE_DUP3) HAVE_DUP3 = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-dup3 have_test_prog) ifeq ($(HAVE_DUP3),1) CONFIG_CFLAGS += -DHAVE_DUP3 $(info autoconfig: using dup3) endif endif ifndef $(HAVE_EPOLL_CREATE1) HAVE_EPOLL_CREATE1 = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-epoll-create1 have_test_prog) ifeq ($(HAVE_EPOLL_CREATE1),1) CONFIG_CFLAGS += -DHAVE_EPOLL_CREATE1 $(info autoconfig: using epoll_create1) endif endif ifndef $(HAVE_EVENTFD) HAVE_EVENTFD = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-eventfd have_test_prog) ifeq ($(HAVE_EVENTFD),1) CONFIG_CFLAGS += -DHAVE_EVENTFD $(info autoconfig: using eventfd) endif endif ifndef $(HAVE_EXECVEAT) HAVE_EXECVEAT = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-execveat have_test_prog) ifeq ($(HAVE_EXECVEAT),1) CONFIG_CFLAGS += -DHAVE_EXECVEAT $(info autoconfig: using execveat) endif endif ifndef $(HAVE_EXPL) MATHFUNC=expl export MATHFUNC HAVE_EXPL = $(shell $(MAKE) $(MAKE_OPTS) MATHFUNC=expl have_mathfunc) ifeq ($(HAVE_EXPL),1) CONFIG_CFLAGS += -DHAVE_EXPL $(info autoconfig: using expl) endif endif ifndef $(HAVE_FACCESSAT) HAVE_FACCESSAT = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-faccessat have_test_prog) ifeq ($(HAVE_FACCESSAT),1) CONFIG_CFLAGS += -DHAVE_FACCESSAT $(info autoconfig: using faccessat) endif endif ifndef $(HAVE_FACCESSAT2) HAVE_FACCESSAT2 = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-faccessat2 have_test_prog) ifeq ($(HAVE_FACCESSAT2),1) CONFIG_CFLAGS += -DHAVE_FACCESSAT2 $(info autoconfig: using faccessat2) endif endif ifndef $(HAVE_FALLOCATE) HAVE_FALLOCATE = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-fallocate have_test_prog) ifeq ($(HAVE_FALLOCATE),1) CONFIG_CFLAGS += -DHAVE_FALLOCATE $(info autoconfig: using fallocate) endif endif ifndef $(HAVE_FANOTIFY) HAVE_FANOTIFY = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-fanotify have_test_prog) ifeq ($(HAVE_FANOTIFY),1) CONFIG_CFLAGS += -DHAVE_FANOTIFY $(info autoconfig: using fanotify) endif endif ifndef $(HAVE_FCHMODAT) HAVE_FCHMODAT = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-fchmodat have_test_prog) ifeq ($(HAVE_FCHMODAT),1) CONFIG_CFLAGS += -DHAVE_FCHMODAT $(info autoconfig: using fchmodat) endif endif ifndef $(HAVE_FCHOWNAT) HAVE_FCHOWNAT = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-fchownat have_test_prog) ifeq ($(HAVE_FCHOWNAT),1) CONFIG_CFLAGS += -DHAVE_FCHOWNAT $(info autoconfig: using fchownat) endif endif ifndef $(HAVE_FDATASYNC) HAVE_FDATASYNC = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-fdatasync have_test_prog) ifeq ($(HAVE_FDATASYNC),1) CONFIG_CFLAGS += -DHAVE_FDATASYNC $(info autoconfig: using fdatasync) endif endif ifndef $(HAVE_FGETXATTR) HAVE_FGETXATTR = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-fgetxattr have_test_prog) ifeq ($(HAVE_FGETXATTR),1) CONFIG_CFLAGS += -DHAVE_FGETXATTR $(info autoconfig: using fgetxattr) endif endif ifndef $(HAVE_FLISTXATTR) HAVE_FLISTXATTR = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-flistxattr have_test_prog) ifeq ($(HAVE_FLISTXATTR),1) CONFIG_CFLAGS += -DHAVE_FLISTXATTR $(info autoconfig: using flistxattr) endif endif ifndef $(HAVE_FLOCK) HAVE_FLOCK = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-flock have_test_prog) ifeq ($(HAVE_FLOCK),1) CONFIG_CFLAGS += -DHAVE_FLOCK $(info autoconfig: using flock) endif endif ifndef $(HAVE_FREMOVEXATTR) HAVE_FREMOVEXATTR = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-fremovexattr have_test_prog) ifeq ($(HAVE_FREMOVEXATTR),1) CONFIG_CFLAGS += -DHAVE_FREMOVEXATTR $(info autoconfig: using fremovexattr) endif endif ifndef $(HAVE_FSETXATTR) HAVE_FSETXATTR = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-fsetxattr have_test_prog) ifeq ($(HAVE_FSETXATTR),1) CONFIG_CFLAGS += -DHAVE_FSETXATTR $(info autoconfig: using fsetxattr) endif endif ifndef $(HAVE_FSYNC) HAVE_FSYNC = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-fsync have_test_prog) ifeq ($(HAVE_FSYNC),1) CONFIG_CFLAGS += -DHAVE_FSYNC $(info autoconfig: using fsync) endif endif ifndef $(HAVE_FUTIMENS) HAVE_FUTIMENS = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-futimens have_test_prog) ifeq ($(HAVE_FUTIMENS),1) CONFIG_CFLAGS += -DHAVE_FUTIMENS $(info autoconfig: using futimens) endif endif ifndef $(HAVE_FUTIMES) HAVE_FUTIMES = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-futimes have_test_prog) ifeq ($(HAVE_FUTIMES),1) CONFIG_CFLAGS += -DHAVE_FUTIMES $(info autoconfig: using futimes) endif endif ifndef $(HAVE_GETAUXVAL) HAVE_GETAUXVAL = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-getauxval have_test_prog) ifeq ($(HAVE_GETAUXVAL),1) CONFIG_CFLAGS += -DHAVE_GETAUXVAL $(info autoconfig: using getauxval) endif endif ifndef $(HAVE_GETDOMAINNAME) HAVE_GETDOMAINNAME = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-getdomainname have_test_prog) ifeq ($(HAVE_GETDOMAINNAME),1) CONFIG_CFLAGS += -DHAVE_GETDOMAINNAME $(info autoconfig: using getdomainname) endif endif ifndef $(HAVE_GETDTABLESIZE) HAVE_GETDTABLESIZE = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-getdtablesize have_test_prog) ifeq ($(HAVE_GETDTABLESIZE),1) CONFIG_CFLAGS += -DHAVE_GETDTABLESIZE $(info autoconfig: using getdtablesize) endif endif ifndef $(HAVE_GETHOSTNAME) HAVE_GETHOSTNAME = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-gethostname have_test_prog) ifeq ($(HAVE_GETHOSTNAME),1) CONFIG_CFLAGS += -DHAVE_GETHOSTNAME $(info autoconfig: using gethostname) endif endif ifndef $(HAVE_GETHOSTID) HAVE_GETHOSTID = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-gethostid have_test_prog) ifeq ($(HAVE_GETHOSTID),1) CONFIG_CFLAGS += -DHAVE_GETHOSTID $(info autoconfig: using gethostid) endif endif ifndef $(HAVE_GETMNTENT) HAVE_GETMNTENT = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-getmntent have_test_prog) ifeq ($(HAVE_GETMNTENT),1) CONFIG_CFLAGS += -DHAVE_GETMNTENT $(info autoconfig: using getmntent) endif endif ifndef $(HAVE_GETMNTINFO) HAVE_GETMNTINFO = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-getmntinfo have_test_prog) ifeq ($(HAVE_GETMNTINFO),1) CONFIG_CFLAGS += -DHAVE_GETMNTINFO $(info autoconfig: using getmntinfo) endif endif ifndef $(HAVE_GETPAGESIZE) HAVE_GETPAGESIZE = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-getpagesize have_test_prog) ifeq ($(HAVE_GETPAGESIZE),1) CONFIG_CFLAGS += -DHAVE_GETPAGESIZE $(info autoconfig: using getpagesize) endif endif ifndef $(HAVE_GETPGID) HAVE_GETPGID = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-getpgid have_test_prog) ifeq ($(HAVE_GETPGID),1) CONFIG_CFLAGS += -DHAVE_GETPGID $(info autoconfig: using getpgid) endif endif ifndef $(HAVE_GETPGRP) HAVE_GETPGRP = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-getpgrp have_test_prog) ifeq ($(HAVE_GETPGRP),1) CONFIG_CFLAGS += -DHAVE_GETPGRP $(info autoconfig: using getpgrp) endif endif ifndef $(HAVE_GETPRIORITY) HAVE_GETPRIORITY = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-getpriority have_test_prog) ifeq ($(HAVE_GETPRIORITY),1) CONFIG_CFLAGS += -DHAVE_GETPRIORITY $(info autoconfig: using getpriority) endif endif ifndef $(HAVE_GETRESGID) HAVE_GETRESGID = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-getresgid have_test_prog) ifeq ($(HAVE_GETRESGID),1) CONFIG_CFLAGS += -DHAVE_GETRESGID $(info autoconfig: using getresgid) endif endif ifndef $(HAVE_GETRESUID) HAVE_GETRESUID = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-getresuid have_test_prog) ifeq ($(HAVE_GETRESUID),1) CONFIG_CFLAGS += -DHAVE_GETRESUID $(info autoconfig: using getresuid) endif endif ifndef $(HAVE_GETSID) HAVE_GETSID = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-getsid have_test_prog) ifeq ($(HAVE_GETSID),1) CONFIG_CFLAGS += -DHAVE_GETSID $(info autoconfig: using getsid) endif endif ifndef $(HAVE_GETXATTR) HAVE_GETXATTR = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-getxattr have_test_prog) ifeq ($(HAVE_GETXATTR),1) CONFIG_CFLAGS += -DHAVE_GETXATTR $(info autoconfig: using getxattr) endif endif ifndef $(HAVE_INO64_T) HAVE_INO64_T = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-ino64_t have_test_prog) ifeq ($(HAVE_INO64_T),1) CONFIG_CFLAGS += -DHAVE_INO64_T $(info autoconfig: using ino64_t) endif endif ifndef $(HAVE_INOTIFY) HAVE_INOTIFY = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-inotify have_test_prog) ifeq ($(HAVE_INOTIFY),1) CONFIG_CFLAGS += -DHAVE_INOTIFY $(info autoconfig: using inotify) endif endif ifndef $(HAVE_IOPORT) HAVE_IOPORT = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-ioport have_test_prog) ifeq ($(HAVE_IOPORT),1) CONFIG_CFLAGS += -DHAVE_IOPORT $(info autoconfig: using ioport) endif endif ifndef $(HAVE_KERNEL_LONG_T) HAVE_KERNEL_LONG_T = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-kernel_long_t have_test_prog) ifeq ($(HAVE_KERNEL_LONG_T),1) CONFIG_CFLAGS += -DHAVE_KERNEL_LONG_T $(info autoconfig: using __kernel_long_t) endif endif ifndef $(HAVE_KERNEL_ULONG_T) HAVE_KERNEL_ULONG_T = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-kernel_ulong_t have_test_prog) ifeq ($(HAVE_KERNEL_ULONG_T),1) CONFIG_CFLAGS += -DHAVE_KERNEL_ULONG_T $(info autoconfig: using __kernel_ulong_t) endif endif ifndef $(HAVE_LABEL_AS_VALUE) HAVE_LABEL_AS_VALUE = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-label-as-value have_test_prog) ifeq ($(HAVE_LABEL_AS_VALUE),1) CONFIG_CFLAGS += -DHAVE_LABEL_AS_VALUE $(info autoconfig: using label as value feature) endif endif ifndef $(HAVE_LGAMMAL) MATHFUNC=lgammal export MATHFUNC HAVE_LGAMMAL = $(shell $(MAKE) $(MAKE_OPTS) MATHFUNC=lgammal have_mathfunc) ifeq ($(HAVE_LGAMMAL),1) CONFIG_CFLAGS += -DHAVE_LGAMMAL $(info autoconfig: using lgammal) endif endif ifndef $(HAVE_LGETXATTR) HAVE_LGETXATTR = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-lgetxattr have_test_prog) ifeq ($(HAVE_LGETXATTR),1) CONFIG_CFLAGS += -DHAVE_LGETXATTR $(info autoconfig: using lgetxattr) endif endif ifndef $(HAVE_LISTXATTR) HAVE_LISTXATTR = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-listxattr have_test_prog) ifeq ($(HAVE_LISTXATTR),1) CONFIG_CFLAGS += -DHAVE_LISTXATTR $(info autoconfig: using listxattr) endif endif ifndef $(HAVE_LLISTXATTR) HAVE_LLISTXATTR = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-llistxattr have_test_prog) ifeq ($(HAVE_LLISTXATTR),1) CONFIG_CFLAGS += -DHAVE_LLISTXATTR $(info autoconfig: using llistxattr) endif endif ifndef $(HAVE_LREMOVEXATTR) HAVE_LREMOVEXATTR = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-lremovexattr have_test_prog) ifeq ($(HAVE_LREMOVEXATTR),1) CONFIG_CFLAGS += -DHAVE_LREMOVEXATTR $(info autoconfig: using lremovexattr) endif endif ifndef $(HAVE_LOFF_T) HAVE_LOFF_T = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-loff_t have_test_prog) ifeq ($(HAVE_LOFF_T),1) CONFIG_CFLAGS += -DHAVE_LOFF_T $(info autoconfig: using loff_t) endif endif ifndef $(HAVE_LOCKF) HAVE_LOCKF = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-lockf have_test_prog) ifeq ($(HAVE_LOCKF),1) CONFIG_CFLAGS += -DHAVE_LOCKF $(info autoconfig: using lockf) endif endif ifndef $(HAVE_LOGL) MATHFUNC=logl export MATHFUNC HAVE_LOGL = $(shell $(MAKE) $(MAKE_OPTS) MATHFUNC=logl have_mathfunc) ifeq ($(HAVE_LOGL),1) CONFIG_CFLAGS += -DHAVE_LOGL $(info autoconfig: using logl) endif endif ifndef $(HAVE_LOOKUP_DCOOKIE) HAVE_LOOKUP_DCOOKIE = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-lookup-dcookie have_test_prog) ifeq ($(HAVE_LOOKUP_DCOOKIE),1) CONFIG_CFLAGS += -DHAVE_LOOKUP_DCOOKIE $(info autoconfig: using lookup_dcookie) endif endif ifndef $(HAVE_LSETXATTR) HAVE_LSETXATTR = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-lsetxattr have_test_prog) ifeq ($(HAVE_LSETXATTR),1) CONFIG_CFLAGS += -DHAVE_LSETXATTR $(info autoconfig: using lsetxattr) endif endif ifndef $(HAVE_MADVISE) HAVE_MADVISE = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-madvise have_test_prog) ifeq ($(HAVE_MADVISE),1) CONFIG_CFLAGS += -DHAVE_MADVISE $(info autoconfig: using madvise) endif endif ifndef $(HAVE_MALLOPT) HAVE_MALLOPT = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-mallopt have_test_prog) ifeq ($(HAVE_MALLOPT),1) CONFIG_CFLAGS += -DHAVE_MALLOPT $(info autoconfig: using mallopt) endif endif ifndef $(HAVE_MEMFD_CREATE) HAVE_MEMFD_CREATE = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-memfd-create have_test_prog) ifeq ($(HAVE_MEMFD_CREATE),1) CONFIG_CFLAGS += -DHAVE_MEMFD_CREATE $(info autoconfig: using memfd_create) endif endif ifndef $(HAVE_MINCORE) HAVE_MINCORE = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-mincore have_test_prog) ifeq ($(HAVE_MINCORE),1) CONFIG_CFLAGS += -DHAVE_MINCORE $(info autoconfig: using mincore) endif endif ifndef $(HAVE_MLOCK) HAVE_MLOCK = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-mlock have_test_prog) ifeq ($(HAVE_MLOCK),1) CONFIG_CFLAGS += -DHAVE_MLOCK $(info autoconfig: using mlock) endif endif ifndef $(HAVE_MLOCK2) HAVE_MLOCK2 = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-mlock2 have_test_prog) ifeq ($(HAVE_MLOCK2),1) CONFIG_CFLAGS += -DHAVE_MLOCK2 $(info autoconfig: using mlock2) endif endif ifndef $(HAVE_MLOCKALL) HAVE_MLOCKALL = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-mlockall have_test_prog) ifeq ($(HAVE_MLOCKALL),1) CONFIG_CFLAGS += -DHAVE_MLOCKALL $(info autoconfig: using mlockall and munlockall) endif endif ifndef $(HAVE_MODIFY_LDT) HAVE_MODIFY_LDT = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-modify-ldt have_test_prog) ifeq ($(HAVE_MODIFY_LDT),1) CONFIG_CFLAGS += -DHAVE_MODIFY_LDT $(info autoconfig: using modify_ldt) endif endif ifndef $(HAVE_MPROTECT) HAVE_MPROTECT = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-mprotect have_test_prog) ifeq ($(HAVE_MPROTECT),1) CONFIG_CFLAGS += -DHAVE_MPROTECT $(info autoconfig: using mprotect) endif endif ifndef $(HAVE_MREMAP) HAVE_MREMAP = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-mremap have_test_prog) ifeq ($(HAVE_MREMAP),1) CONFIG_CFLAGS += -DHAVE_MREMAP $(info autoconfig: using mremap) endif endif ifndef $(HAVE_MSYNC) HAVE_MSYNC = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-msync have_test_prog) ifeq ($(HAVE_MSYNC),1) CONFIG_CFLAGS += -DHAVE_MSYNC $(info autoconfig: using msync) endif endif ifndef $(HAVE_MUNLOCK) HAVE_MUNLOCK = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-munlock have_test_prog) ifeq ($(HAVE_MUNLOCK),1) CONFIG_CFLAGS += -DHAVE_MUNLOCK $(info autoconfig: using munlock) endif endif ifndef $(HAVE_NAME_TO_HANDLE_AT) HAVE_NAME_TO_HANDLE_AT = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-name-to-handle-at have_test_prog) ifeq ($(HAVE_NAME_TO_HANDLE_AT),1) CONFIG_CFLAGS += -DHAVE_NAME_TO_HANDLE_AT $(info autoconfig: using name_to_handle_at) endif endif ifndef $(HAVE_NANOSLEEP) HAVE_NANOSLEEP = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-nanosleep have_test_prog) ifeq ($(HAVE_NANOSLEEP),1) CONFIG_CFLAGS += -DHAVE_NANOSLEEP $(info autoconfig: using nanosleep) endif endif ifndef $(HAVE_NICE) HAVE_NICE = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-nice have_test_prog) ifeq ($(HAVE_NICE),1) CONFIG_CFLAGS += -DHAVE_NICE $(info autoconfig: using nice) endif endif ifndef $(HAVE_OFF64_T) HAVE_OFF64_T = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-off64_t have_test_prog) ifeq ($(HAVE_OFF64_T),1) CONFIG_CFLAGS += -DHAVE_OFF64_T $(info autoconfig: using off64_t) endif endif ifndef $(HAVE_OPEN_BY_HANDLE_AT) HAVE_OPEN_BY_HANDLE_AT = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-open-by-handle-at have_test_prog) ifeq ($(HAVE_OPEN_BY_HANDLE_AT),1) CONFIG_CFLAGS += -DHAVE_OPEN_BY_HANDLE_AT $(info autoconfig: using open_by_handle_at) endif endif ifndef $(HAVE_PIDFD_GETFD) HAVE_PIDFD_GETFD = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-pidfd-getfd have_test_prog) ifeq ($(HAVE_PIDFD_GETFD),1) CONFIG_CFLAGS += -DHAVE_PIDFD_GETFD $(info autoconfig: using pidfd_getfd) endif endif ifndef $(HAVE_PIDFD_OPEN) HAVE_PIDFD_OPEN = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-pidfd-open have_test_prog) ifeq ($(HAVE_PIDFD_OPEN),1) CONFIG_CFLAGS += -DHAVE_PIDFD_OPEN $(info autoconfig: using pidfd_open) endif endif ifndef $(HAVE_PIDFD_SEND_SIGNAL) HAVE_PIDFD_SEND_SIGNAL = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-pidfd-send-signal have_test_prog) ifeq ($(HAVE_PIDFD_SEND_SIGNAL),1) CONFIG_CFLAGS += -DHAVE_PIDFD_SEND_SIGNAL $(info autoconfig: using pidfd_send_signal) endif endif ifndef $(HAVE_PERSONALITY) HAVE_PERSONALITY = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-personality have_test_prog) ifeq ($(HAVE_PERSONALITY),1) CONFIG_CFLAGS += -DHAVE_PERSONALITY $(info autoconfig: using personality) endif endif ifndef $(HAVE_PIPE2) HAVE_PIPE2 = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-pipe2 have_test_prog) ifeq ($(HAVE_PIPE2),1) CONFIG_CFLAGS += -DHAVE_PIPE2 $(info autoconfig: using pipe2) endif endif ifndef $(HAVE_PKEY_ALLOC) HAVE_PKEY_ALLOC = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-pkey-alloc have_test_prog) ifeq ($(HAVE_PKEY_ALLOC),1) CONFIG_CFLAGS += -DHAVE_PKEY_ALLOC $(info autoconfig: using pkey_alloc) endif endif ifndef $(HAVE_PKEY_FREE) HAVE_PKEY_FREE = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-pkey-free have_test_prog) ifeq ($(HAVE_PKEY_FREE),1) CONFIG_CFLAGS += -DHAVE_PKEY_FREE $(info autoconfig: using pkey_free) endif endif ifndef $(HAVE_PKEY_MPROTECT) HAVE_PKEY_MPROTECT = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-pkey-mprotect have_test_prog) ifeq ($(HAVE_PKEY_MPROTECT),1) CONFIG_CFLAGS += -DHAVE_PKEY_MPROTECT $(info autoconfig: using pkey_mprotect) endif endif ifndef $(HAVE_POSIX_FADVISE) HAVE_POSIX_FADVISE = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-posix-fadvise have_test_prog) ifeq ($(HAVE_POSIX_FADVISE),1) CONFIG_CFLAGS += -DHAVE_POSIX_FADVISE $(info autoconfig: using posix_fadvise) endif endif ifndef $(HAVE_POSIX_FALLOCATE) HAVE_POSIX_FALLOCATE = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-posix-fallocate have_test_prog) ifeq ($(HAVE_POSIX_FALLOCATE),1) CONFIG_CFLAGS += -DHAVE_POSIX_FALLOCATE $(info autoconfig: using posix_fallocate) endif endif ifndef $(HAVE_POSIX_MADVISE) HAVE_POSIX_MADVISE = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-posix-madvise have_test_prog) ifeq ($(HAVE_POSIX_MADVISE),1) CONFIG_CFLAGS += -DHAVE_POSIX_MADVISE $(info autoconfig: using posix_madvise) endif endif ifndef $(HAVE_POSIX_MEMALIGN) HAVE_POSIX_MEMALIGN = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-posix-memalign have_test_prog) ifeq ($(HAVE_POSIX_MEMALIGN),1) CONFIG_CFLAGS += -DHAVE_POSIX_MEMALIGN $(info autoconfig: using posix_memalign) endif endif ifndef $(HAVE_MQ_POSIX) HAVE_MQ_POSIX = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-mq-posix TEST_LIBS='$(LIB_RT) $(LIB_PTHREAD)' have_test_prog) ifeq ($(HAVE_MQ_POSIX),1) CONFIG_CFLAGS += -DHAVE_MQ_POSIX $(info autoconfig: using POSIX message queues) endif endif ifndef $(HAVE_PPC_GET_TIMEBASE) HAVE_PPC_GET_TIMEBASE = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-ppc-get-timebase TEST_LIBS='$(LIB_RT) $(LIB_PTHREAD)' have_test_prog) ifeq ($(HAVE_PPC_GET_TIMEBASE),1) CONFIG_CFLAGS += -DHAVE_PPC_GET_TIMEBASE $(info autoconfig: using __ppc_get_timebase) endif endif ifndef $(HAVE_POSIX_OPENPT) HAVE_POSIX_OPENPT = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-posix-openpt have_test_prog) ifeq ($(HAVE_POSIX_OPENPT),1) CONFIG_CFLAGS += -DHAVE_POSIX_OPENPT $(info autoconfig: using posix_openpt) endif endif ifndef $(HAVE_SEM_POSIX) HAVE_SEM_POSIX = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-sem-posix TEST_LIBS=$(LIB_PTHREAD) have_test_prog) ifeq ($(HAVE_SEM_POSIX),1) CONFIG_CFLAGS += -DHAVE_SEM_POSIX $(info autoconfig: using POSIX semaphores) endif endif ifndef $(HAVE_POSIX_SPAWN) HAVE_POSIX_SPAWN = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-posix-spawn have_test_prog) ifeq ($(HAVE_POSIX_SPAWN),1) CONFIG_CFLAGS += -DHAVE_POSIX_SPAWN $(info autoconfig: using posix_spawn) endif endif ifndef $(HAVE_POWL) MATHFUNC=powl export MATHFUNC HAVE_POWL = $(shell $(MAKE) $(MAKE_OPTS) MATHFUNC=powl have_mathfunc) ifeq ($(HAVE_POWL),1) CONFIG_CFLAGS += -DHAVE_POWL $(info autoconfig: using powl) endif endif ifndef $(HAVE_PPOLL) HAVE_PPOLL = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-ppoll have_test_prog) ifeq ($(HAVE_PPOLL),1) CONFIG_CFLAGS += -DHAVE_PPOLL $(info autoconfig: using ppoll) endif endif ifndef $(HAVE_PRCTL) HAVE_PRCTL = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-prctl have_test_prog) ifeq ($(HAVE_PRCTL),1) CONFIG_CFLAGS += -DHAVE_PRCTL $(info autoconfig: using prctl) endif endif ifndef $(HAVE_PREADV) HAVE_PREADV = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-preadv have_test_prog) ifeq ($(HAVE_PREADV),1) CONFIG_CFLAGS += -DHAVE_PREADV $(info autoconfig: using preadv) endif endif ifndef $(HAVE_PREADV2) HAVE_PREADV2 = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-preadv2 have_test_prog) ifeq ($(HAVE_PREADV2),1) CONFIG_CFLAGS += -DHAVE_PREADV2 $(info autoconfig: using preadv2) endif endif ifndef $(HAVE_PRLIMIT) HAVE_PRLIMIT = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-prlimit have_test_prog) ifeq ($(HAVE_PRLIMIT),1) CONFIG_CFLAGS += -DHAVE_PRLIMIT $(info autoconfig: using prlimit) endif endif ifndef $(HAVE_PROCESS_VM_READV) HAVE_PROCESS_VM_READV = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-process-vm-readv have_test_prog) ifeq ($(HAVE_PROCESS_VM_READV),1) CONFIG_CFLAGS += -DHAVE_PROCESS_VM_READV $(info autoconfig: using process_vm_readv) endif endif ifndef $(HAVE_PROCESS_VM_WRITEV) HAVE_PROCESS_VM_WRITEV = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-process-vm-writev have_test_prog) ifeq ($(HAVE_PROCESS_VM_WRITEV),1) CONFIG_CFLAGS += -DHAVE_PROCESS_VM_WRITEV $(info autoconfig: using process_vm_writev) endif endif ifndef $(HAVE_PSELECT) HAVE_PSELECT = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-pselect have_test_prog) ifeq ($(HAVE_PSELECT),1) CONFIG_CFLAGS += -DHAVE_PSELECT $(info autoconfig: using pselect) endif endif ifndef $(HAVE_PTHREAD_ATTR_SETSTACK) HAVE_PTHREAD_ATTR_SETSTACK = $(shell $(MAKE) $(MAKE_OPTS) TEST_LIBS=$(LIB_PTHREAD) TEST_PROG=test-pthread-attr-setstack have_test_prog) ifeq ($(HAVE_PTHREAD_ATTR_SETSTACK),1) CONFIG_CFLAGS += -DHAVE_PTHREAD_ATTR_SETSTACK $(info autoconfig: using pthread_attr_setstack) endif endif ifndef $(HAVE_PTRACE) HAVE_PTRACE = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-ptrace have_test_prog) ifeq ($(HAVE_PTRACE),1) CONFIG_CFLAGS += -DHAVE_PTRACE $(info autoconfig: using ptrace) endif endif ifndef $(HAVE_PTSNAME) HAVE_PTSNAME = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-ptsname have_test_prog) ifeq ($(HAVE_PTSNAME),1) CONFIG_CFLAGS += -DHAVE_PTSNAME $(info autoconfig: using ptsname) endif endif ifndef $(HAVE_PWRITEV) HAVE_PWRITEV = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-pwritev have_test_prog) ifeq ($(HAVE_PWRITEV),1) CONFIG_CFLAGS += -DHAVE_PWRITEV $(info autoconfig: using pwritev) endif endif ifndef $(HAVE_PWRITEV2) HAVE_PWRITEV2 = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-pwritev2 have_test_prog) ifeq ($(HAVE_PWRITEV2),1) CONFIG_CFLAGS += -DHAVE_PWRITEV2 $(info autoconfig: using pwritev2) endif endif ifndef $(HAVE_RECVMMSG) HAVE_RECVMMSG = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-recvmmsg have_test_prog) ifeq ($(HAVE_RECVMMSG),1) CONFIG_CFLAGS += -DHAVE_RECVMMSG $(info autoconfig: using recvmmsg) endif endif ifndef $(HAVE_REMAP_FILE_PAGES) HAVE_REMAP_FILE_PAGES = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-remap-file-pages have_test_prog) ifeq ($(HAVE_REMAP_FILE_PAGES),1) CONFIG_CFLAGS += -DHAVE_REMAP_FILE_PAGES $(info autoconfig: using remap_file_pages) endif endif ifndef $(HAVE_REMOVEXATTR) HAVE_REMOVEXATTR = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-removexattr have_test_prog) ifeq ($(HAVE_REMOVEXATTR),1) CONFIG_CFLAGS += -DHAVE_REMOVEXATTR $(info autoconfig: using removexattr) endif endif ifndef $(HAVE_RENAMEAT) HAVE_RENAMEAT = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-renameat have_test_prog) ifeq ($(HAVE_RENAMEAT),1) CONFIG_CFLAGS += -DHAVE_RENAMEAT $(info autoconfig: using renameat) endif endif ifndef $(HAVE_RENAMEAT2) HAVE_RENAMEAT2 = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-renameat2 have_test_prog) ifeq ($(HAVE_RENAMEAT2),1) CONFIG_CFLAGS += -DHAVE_RENAMEAT2 $(info autoconfig: using renameat2) endif endif ifndef $(HAVE_RINTL) MATHFUNC=rintl export MATHFUNC HAVE_RINTL = $(shell $(MAKE) $(MAKE_OPTS) MATHFUNC=rintl have_mathfunc) ifeq ($(HAVE_RINTL),1) CONFIG_CFLAGS += -DHAVE_RINTL $(info autoconfig: using rintl) endif endif ifndef $(HAVE_SCHED_GET_PRIORITY_MAX) HAVE_SCHED_GET_PRIORITY_MAX = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-sched-get-priority-max have_test_prog) ifeq ($(HAVE_SCHED_GET_PRIORITY_MAX),1) CONFIG_CFLAGS += -DHAVE_SCHED_GET_PRIORITY_MAX $(info autoconfig: using sched_get_priority_max) endif endif ifndef $(HAVE_SCHED_GET_PRIORITY_MIN) HAVE_SCHED_GET_PRIORITY_MIN = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-sched-get-priority-min have_test_prog) ifeq ($(HAVE_SCHED_GET_PRIORITY_MIN),1) CONFIG_CFLAGS += -DHAVE_SCHED_GET_PRIORITY_MIN $(info autoconfig: using sched_get_priority_min) endif endif ifndef $(HAVE_SCHED_GETAFFINITY) HAVE_SCHED_GETAFFINITY = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-sched-getaffinity have_test_prog) ifeq ($(HAVE_SCHED_GETAFFINITY),1) CONFIG_CFLAGS += -DHAVE_SCHED_GETAFFINITY $(info autoconfig: using sched_getaffinity) endif endif ifndef $(HAVE_SCHED_GETCPU) HAVE_SCHED_GETCPU = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-sched-getcpu have_test_prog) ifeq ($(HAVE_SCHED_GETCPU),1) CONFIG_CFLAGS += -DHAVE_SCHED_GETCPU $(info autoconfig: using sched_getcpu) endif endif ifndef $(HAVE_SCHED_RR_GET_INTERVAL) HAVE_SCHED_RR_GET_INTERVAL = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-sched-rr-get-interval have_test_prog) ifeq ($(HAVE_SCHED_RR_GET_INTERVAL),1) CONFIG_CFLAGS += -DHAVE_SCHED_RR_GET_INTERVAL $(info autoconfig: using sched_rr_get_interval) endif endif ifndef $(HAVE_SCHED_SETSCHEDULER) HAVE_SCHED_SETSCHEDULER = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-sched-setscheduler have_test_prog) ifeq ($(HAVE_SCHED_SETSCHEDULER),1) CONFIG_CFLAGS += -DHAVE_SCHED_SETSCHEDULER $(info autoconfig: using sched_setscheduler) endif endif ifndef $(HAVE_SCHED_YIELD) HAVE_SCHED_YIELD = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-sched-yield have_test_prog) ifeq ($(HAVE_SCHED_YIELD),1) CONFIG_CFLAGS += -DHAVE_SCHED_YIELD $(info autoconfig: using sched_yield) endif endif ifndef $(HAVE_SENDMMSG) HAVE_SENDMMSG = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-sendmmsg have_test_prog) ifeq ($(HAVE_SENDMMSG),1) CONFIG_CFLAGS += -DHAVE_SENDMMSG $(info autoconfig: using sendmmsg) endif endif ifndef $(HAVE_SETDOMAINNAME) HAVE_SETDOMAINNAME = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-setdomainname have_test_prog) ifeq ($(HAVE_SETDOMAINNAME),1) CONFIG_CFLAGS += -DHAVE_SETDOMAINNAME $(info autoconfig: using setdomainname) endif endif ifndef $(HAVE_SETPROCTITLE) HAVE_SETPROCTITLE = $(shell $(MAKE) $(MAKE_OPTS) TEST_LIBS=$(LIB_BSD) TEST_PROG=test-setproctitle have_test_prog) ifeq ($(HAVE_SETPROCTITLE),1) CONFIG_CFLAGS += -DHAVE_SETPROCTITLE $(info autoconfig: using setproctitle) endif endif ifndef $(HAVE_SETNS) HAVE_SETNS = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-setns have_test_prog) ifeq ($(HAVE_SETNS),1) CONFIG_CFLAGS += -DHAVE_SETNS $(info autoconfig: using setns) endif endif ifndef $(HAVE_SETPGID) HAVE_SETPGID = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-setpgid have_test_prog) ifeq ($(HAVE_SETPGID),1) CONFIG_CFLAGS += -DHAVE_SETPGID $(info autoconfig: using setpgid) endif endif ifndef $(HAVE_SETPGRP) HAVE_SETPGRP = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-setpgrp have_test_prog) ifeq ($(HAVE_SETPGRP),1) CONFIG_CFLAGS += -DHAVE_SETPGRP $(info autoconfig: using setpgrp) endif endif ifndef $(HAVE_SETPRIORITY) HAVE_SETPRIORITY = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-setpriority have_test_prog) ifeq ($(HAVE_SETPRIORITY),1) CONFIG_CFLAGS += -DHAVE_SETPRIORITY $(info autoconfig: using setpriority) endif endif ifndef $(HAVE_SETREGID) HAVE_SETREGID = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-setregid have_test_prog) ifeq ($(HAVE_SETREGID),1) CONFIG_CFLAGS += -DHAVE_SETREGID $(info autoconfig: using setregid) endif endif ifndef $(HAVE_SETRESGID) HAVE_SETRESGID = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-setresgid have_test_prog) ifeq ($(HAVE_SETRESGID),1) CONFIG_CFLAGS += -DHAVE_SETRESGID $(info autoconfig: using setresgid) endif endif ifndef $(HAVE_SETRESUID) HAVE_SETRESUID = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-setresuid have_test_prog) ifeq ($(HAVE_SETRESUID),1) CONFIG_CFLAGS += -DHAVE_SETRESUID $(info autoconfig: using setresuid) endif endif ifndef $(HAVE_SETREUID) HAVE_SETREUID = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-setreuid have_test_prog) ifeq ($(HAVE_SETREUID),1) CONFIG_CFLAGS += -DHAVE_SETREUID $(info autoconfig: using setreuid) endif endif ifndef $(HAVE_SETTIMEOFDAY) HAVE_SETTIMEOFDAY = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-settimeofday have_test_prog) ifeq ($(HAVE_SETTIMEOFDAY),1) CONFIG_CFLAGS += -DHAVE_SETTIMEOFDAY $(info autoconfig: using settimeofday) endif endif ifndef $(HAVE_SETXATTR) HAVE_SETXATTR = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-setxattr have_test_prog) ifeq ($(HAVE_SETXATTR),1) CONFIG_CFLAGS += -DHAVE_SETXATTR $(info autoconfig: using setxattr) endif endif ifndef $(HAVE_SIGALTSTACK) HAVE_SIGALTSTACK = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-sigaltstack have_test_prog) ifeq ($(HAVE_SIGALTSTACK),1) CONFIG_CFLAGS += -DHAVE_SIGALTSTACK $(info autoconfig: using sigaltstack) endif endif ifndef $(HAVE_SIGQUEUE) HAVE_SIGQUEUE = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-sigqueue have_test_prog) ifeq ($(HAVE_SIGQUEUE),1) CONFIG_CFLAGS += -DHAVE_SIGQUEUE $(info autoconfig: using sigqueue) endif endif ifndef $(HAVE_SIGWAITINFO) HAVE_SIGWAITINFO = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-sigwaitinfo have_test_prog) ifeq ($(HAVE_SIGWAITINFO),1) CONFIG_CFLAGS += -DHAVE_SIGWAITINFO $(info autoconfig: using sigwaitinfo) endif endif ifndef $(HAVE_SINHL) MATHFUNC=sinhl export MATHFUNC HAVE_SINHL = $(shell $(MAKE) $(MAKE_OPTS) MATHFUNC=sinhl have_mathfunc) ifeq ($(HAVE_SINHL),1) CONFIG_CFLAGS += -DHAVE_SINHL $(info autoconfig: using sinhl) endif endif ifndef $(HAVE_SINL) MATHFUNC=sinl export MATHFUNC HAVE_SINL = $(shell $(MAKE) $(MAKE_OPTS) MATHFUNC=sinl have_mathfunc) ifeq ($(HAVE_SINL),1) CONFIG_CFLAGS += -DHAVE_SINL $(info autoconfig: using sinl) endif endif ifndef $(HAVE_SPLICE) HAVE_SPLICE = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-splice have_test_prog) ifeq ($(HAVE_SPLICE),1) CONFIG_CFLAGS += -DHAVE_SPLICE $(info autoconfig: using splice) endif endif ifndef $(HAVE_SQRTL) MATHFUNC=sqrtl export MATHFUNC HAVE_SQRTL = $(shell $(MAKE) $(MAKE_OPTS) MATHFUNC=sqrtl have_mathfunc) ifeq ($(HAVE_SQRTL),1) CONFIG_CFLAGS += -DHAVE_SQRTL $(info autoconfig: using sqrtl) endif endif ifndef $(HAVE_STATFS) HAVE_STATFS = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-statfs have_test_prog) ifeq ($(HAVE_STATFS),1) CONFIG_CFLAGS += -DHAVE_STATFS $(info autoconfig: using statfs) endif endif ifndef $(HAVE_STRLCAT) STRFUNC=strlcat export STRFUNC HAVE_STRLCAT = $(shell $(MAKE) $(MAKE_OPTS) STRFUNC=strlcat have_strfunc) ifeq ($(HAVE_STRLCAT),1) CONFIG_CFLAGS += -DHAVE_STRLCAT $(info autoconfig: using strlcat) endif endif ifndef $(HAVE_STRLCPY) STRFUNC=strlcpy export STRFUNC HAVE_STRLCPY = $(shell $(MAKE) $(MAKE_OPTS) STRFUNC=strlcpy have_strfunc) ifeq ($(HAVE_STRLCPY),1) CONFIG_CFLAGS += -DHAVE_STRLCPY $(info autoconfig: using strlcpy) endif endif ifndef $(HAVE_IFCONF) HAVE_IFCONF = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-ifconf have_test_prog) ifeq ($(HAVE_IFCONF),1) CONFIG_CFLAGS += -DHAVE_IFCONF $(info autoconfig: using struct ifconf) endif endif ifndef $(HAVE_ICMPHDR) HAVE_ICMPHDR = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-icmphdr have_test_prog) ifeq ($(HAVE_ICMPHDR),1) CONFIG_CFLAGS += -DHAVE_ICMPHDR $(info autoconfig: using struct iphdr and icmphdr) endif endif ifndef $(HAVE_MSGINFO) HAVE_MSGINFO = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-msginfo have_test_prog) ifeq ($(HAVE_MSGINFO),1) CONFIG_CFLAGS += -DHAVE_MSGINFO $(info autoconfig: using struct msginfo) endif endif ifndef $(HAVE_SERIAL_ICOUNTER) HAVE_SERIAL_ICOUNTER = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-serial-icounter have_test_prog) ifeq ($(HAVE_SERIAL_ICOUNTER),1) CONFIG_CFLAGS += -DHAVE_SERIAL_ICOUNTER $(info autoconfig: using struct serial_icounter_struct) endif endif ifndef $(HAVE_SERIAL_STRUCT) HAVE_SERIAL_STRUCT = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-serial-struct have_test_prog) ifeq ($(HAVE_SERIAL_STRUCT),1) CONFIG_CFLAGS += -DHAVE_SERIAL_STRUCT $(info autoconfig: using struct serial_struct) endif endif ifndef $(HAVE_SHMID_DS) HAVE_SHMID_DS = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-shmid-ds have_test_prog) ifeq ($(HAVE_SHMID_DS),1) CONFIG_CFLAGS += -DHAVE_SHMID_DS $(info autoconfig: using struct shmid_ds) endif endif ifndef $(HAVE_SHMINFO) HAVE_SHMINFO = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-shminfo have_test_prog) ifeq ($(HAVE_SHMINFO),1) CONFIG_CFLAGS += -DHAVE_SHMINFO $(info autoconfig: using struct shminfo) endif endif ifndef $(HAVE_USER_DESC) HAVE_USER_DESC = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-user-desc have_test_prog) ifeq ($(HAVE_USER_DESC),1) CONFIG_CFLAGS += -DHAVE_USER_DESC $(info autoconfig: using struct user_desc) endif endif ifndef $(HAVE_SWAPCONTEXT) HAVE_SWAPCONTEXT = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-swapcontext have_test_prog) ifeq ($(HAVE_SWAPCONTEXT),1) CONFIG_CFLAGS += -DHAVE_SWAPCONTEXT $(info autoconfig: using swapcontext) endif endif ifndef $(HAVE_SWAP) HAVE_SWAP = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-swap have_test_prog) ifeq ($(HAVE_SWAP),1) CONFIG_CFLAGS += -DHAVE_SWAP $(info autoconfig: using swapon and swapoff) endif endif ifndef $(HAVE_SYNC_FILE_RANGE) HAVE_SYNC_FILE_RANGE = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-sync-file-range have_test_prog) ifeq ($(HAVE_SYNC_FILE_RANGE),1) CONFIG_CFLAGS += -DHAVE_SYNC_FILE_RANGE $(info autoconfig: using sync_file_range) endif endif ifndef $(HAVE_SYNCFS) HAVE_SYNCFS = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-syncfs have_test_prog) ifeq ($(HAVE_SYNCFS),1) CONFIG_CFLAGS += -DHAVE_SYNCFS $(info autoconfig: using syncfs) endif endif ifndef $(HAVE_SYSINFO) HAVE_SYSINFO = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-sysinfo have_test_prog) ifeq ($(HAVE_SYSINFO),1) CONFIG_CFLAGS += -DHAVE_SYSINFO $(info autoconfig: using sysinfo) endif endif ifndef $(HAVE_MQ_SYSV) HAVE_MQ_SYSV = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-mq-sysv have_test_prog) ifeq ($(HAVE_MQ_SYSV),1) CONFIG_CFLAGS += -DHAVE_MQ_SYSV $(info autoconfig: using SYSV message queues) endif endif ifndef $(HAVE_SEM_SYSV) HAVE_SEM_SYSV = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-sem-sysv have_test_prog) ifeq ($(HAVE_SEM_SYSV),1) CONFIG_CFLAGS += -DHAVE_SEM_SYSV $(info autoconfig: using SYSV semaphores) endif endif ifndef $(HAVE_SEMTIMEDOP) HAVE_SEMTIMEDOP = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-semtimedop have_test_prog) ifeq ($(HAVE_SEMTIMEDOP),1) CONFIG_CFLAGS += -DHAVE_SEMTIMEDOP $(info autoconfig: using SYSV semtimedop) endif endif ifndef $(HAVE_SHM_SYSV) HAVE_SHM_SYSV = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-shm-sysv have_test_prog) ifeq ($(HAVE_SHM_SYSV),1) CONFIG_CFLAGS += -DHAVE_SHM_SYSV $(info autoconfig: using SYSV shared memory) endif endif ifndef $(HAVE_TCDRAIN) HAVE_TCDRAIN = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-tcdrain have_test_prog) ifeq ($(HAVE_TCDRAIN),1) CONFIG_CFLAGS += -DHAVE_TCDRAIN $(info autoconfig: using tcdrain) endif endif ifndef $(HAVE_TCFLOW) HAVE_TCFLOW = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-tcflow have_test_prog) ifeq ($(HAVE_TCFLOW),1) CONFIG_CFLAGS += -DHAVE_TCFLOW $(info autoconfig: using tcflow) endif endif ifndef $(HAVE_TCFLUSH) HAVE_TCFLUSH = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-tcflush have_test_prog) ifeq ($(HAVE_TCFLUSH),1) CONFIG_CFLAGS += -DHAVE_TCFLUSH $(info autoconfig: using tcflush) endif endif ifndef $(HAVE_TCGETATTR) HAVE_TCGETATTR = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-tcgetattr have_test_prog) ifeq ($(HAVE_TCGETATTR),1) CONFIG_CFLAGS += -DHAVE_TCGETATTR $(info autoconfig: using tcgetattr) endif endif ifndef $(HAVE_TEE) HAVE_TEE = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-tee have_test_prog) ifeq ($(HAVE_TEE),1) CONFIG_CFLAGS += -DHAVE_TEE $(info autoconfig: using tee) endif endif ifndef $(HAVE_TIMER_CREATE) HAVE_TIMER_CREATE = $(shell $(MAKE) $(MAKE_OPTS) TEST_LIBS='$(LIB_RT) $(LIB_PTHREAD)' TEST_PROG=test-timer-create have_test_prog) ifeq ($(HAVE_TIMER_CREATE),1) CONFIG_CFLAGS += -DHAVE_TIMER_CREATE $(info autoconfig: using timer_create) endif endif ifndef $(HAVE_TIMER_DELETE) HAVE_TIMER_DELETE = $(shell $(MAKE) $(MAKE_OPTS) TEST_LIBS='$(LIB_RT) $(LIB_PTHREAD)' TEST_PROG=test-timer-delete have_test_prog) ifeq ($(HAVE_TIMER_DELETE),1) CONFIG_CFLAGS += -DHAVE_TIMER_DELETE $(info autoconfig: using timer_delete) endif endif ifndef $(HAVE_TIMER_GETTIME) HAVE_TIMER_GETTIME = $(shell $(MAKE) $(MAKE_OPTS) TEST_LIBS=$(LIB_RT) TEST_PROG=test-timer-gettime have_test_prog) ifeq ($(HAVE_TIMER_GETTIME),1) CONFIG_CFLAGS += -DHAVE_TIMER_GETTIME $(info autoconfig: using timer_gettime) endif endif ifndef $(HAVE_TIMER_GETOVERRUN) HAVE_TIMER_GETOVERRUN = $(shell $(MAKE) $(MAKE_OPTS) TEST_LIBS=$(LIB_RT) TEST_PROG=test-timer-getoverrun have_test_prog) ifeq ($(HAVE_TIMER_GETOVERRUN),1) CONFIG_CFLAGS += -DHAVE_TIMER_GETOVERRUN $(info autoconfig: using timer_getoverrrun) endif endif ifndef $(HAVE_TIMER_SETTIME) HAVE_TIMER_SETTIME = $(shell $(MAKE) $(MAKE_OPTS) TEST_LIBS=$(LIB_RT) TEST_PROG=test-timer-settime have_test_prog) ifeq ($(HAVE_TIMER_SETTIME),1) CONFIG_CFLAGS += -DHAVE_TIMER_SETTIME $(info autoconfig: using timer_settime) endif endif ifndef $(HAVE_TTYNAME) HAVE_TTYNAME = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-ttyname have_test_prog) ifeq ($(HAVE_TTYNAME),1) CONFIG_CFLAGS += -DHAVE_TTYNAME $(info autoconfig: using ttyname) endif endif ifndef $(HAVE_UNAME) HAVE_UNAME = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-uname have_test_prog) ifeq ($(HAVE_UNAME),1) CONFIG_CFLAGS += -DHAVE_UNAME $(info autoconfig: using uname) endif endif ifndef $(HAVE_UNSHARE) HAVE_UNSHARE = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-unshare have_test_prog) ifeq ($(HAVE_UNSHARE),1) CONFIG_CFLAGS += -DHAVE_UNSHARE $(info autoconfig: using unshare) endif endif ifndef $(HAVE_USTAT) HAVE_USTAT = $(shell $(MAKE) $(MAKE_OPTS) TEST_CFLAGS=-Werror TEST_PROG=test-ustat have_test_prog) ifeq ($(HAVE_USTAT),1) CONFIG_CFLAGS += -DHAVE_USTAT $(info autoconfig: using ustat) endif endif ifndef $(HAVE_UTIMENSAT) HAVE_UTIMENSAT = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-utimensat have_test_prog) ifeq ($(HAVE_UTIMENSAT),1) CONFIG_CFLAGS += -DHAVE_UTIMENSAT $(info autoconfig: using utimensat) endif endif ifndef $(HAVE_VLA_ARG) HAVE_VLA_ARG = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-vla-arg have_test_prog) ifeq ($(HAVE_VLA_ARG),1) CONFIG_CFLAGS += -DHAVE_VLA_ARG $(info autoconfig: using variable length array function args) endif endif ifndef $(HAVE_VMSPLICE) HAVE_VMSPLICE = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-vmsplice have_test_prog) ifeq ($(HAVE_VMSPLICE),1) CONFIG_CFLAGS += -DHAVE_VMSPLICE $(info autoconfig: using vmsplice) endif endif ifndef $(HAVE_WAITID) HAVE_WAITID = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-waitid have_test_prog) ifeq ($(HAVE_WAITID),1) CONFIG_CFLAGS += -DHAVE_WAITID $(info autoconfig: using waitid) endif endif ifndef $(HAVE_WAIT3) HAVE_WAIT3 = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-wait3 have_test_prog) ifeq ($(HAVE_WAIT3),1) CONFIG_CFLAGS += -DHAVE_WAIT3 $(info autoconfig: using wait3) endif endif ifndef $(HAVE_WAIT4) HAVE_WAIT4 = $(shell $(MAKE) $(MAKE_OPTS) TEST_PROG=test-wait4 have_test_prog) ifeq ($(HAVE_WAIT4),1) CONFIG_CFLAGS += -DHAVE_WAIT4 $(info autoconfig: using wait4) endif endif ifndef $(HAVE_HAVE_WCSCASECMP) WCSFUNC=wcscasecmp export WCSFUNC HAVE_WCSCASECMP = $(shell $(MAKE) $(MAKE_OPTS) WCSFUNC=wcscasecmp have_wcsfunc) ifeq ($(HAVE_WCSCASECMP),1) CONFIG_CFLAGS += -DHAVE_WCSCASECMP $(info autoconfig: using wcscasecmp) endif endif ifndef $(HAVE_WCSCAT) WCSFUNC=wcscat export WCSFUNC HAVE_WCSCAT = $(shell $(MAKE) $(MAKE_OPTS) WCSFUNC=wcscat have_wcsfunc) ifeq ($(HAVE_WCSCAT),1) CONFIG_CFLAGS += -DHAVE_WCSCAT $(info autoconfig: using wcscat) endif endif ifndef $(HAVE_WCSCHR) WCSFUNC=wcschr export WCSFUNC HAVE_WCSCHR = $(shell $(MAKE) $(MAKE_OPTS) WCSFUNC=wcschr have_wcsfunc) ifeq ($(HAVE_WCSCHR),1) CONFIG_CFLAGS += -DHAVE_WCSCHR $(info autoconfig: using wcschr) endif endif ifndef $(HAVE_WCSCMP) WCSFUNC=wcscmp export WCSFUNC HAVE_WCSCMP = $(shell $(MAKE) $(MAKE_OPTS) WCSFUNC=wcscmp have_wcsfunc) ifeq ($(HAVE_WCSCMP),1) CONFIG_CFLAGS += -DHAVE_WCSCMP $(info autoconfig: using wcscmp) endif endif ifndef $(HAVE_WCSCOLL) WCSFUNC=wcscoll export WCSFUNC HAVE_WCSCOLL = $(shell $(MAKE) $(MAKE_OPTS) WCSFUNC=wcscoll have_wcsfunc) ifeq ($(HAVE_WCSCOLL),1) CONFIG_CFLAGS += -DHAVE_WCSCOLL $(info autoconfig: using wcscoll) endif endif ifndef $(HAVE_WCSCPY) WCSFUNC=wcscpy export WCSFUNC HAVE_WCSCPY = $(shell $(MAKE) $(MAKE_OPTS) WCSFUNC=wcscpy have_wcsfunc) ifeq ($(HAVE_WCSCPY),1) CONFIG_CFLAGS += -DHAVE_WCSCPY $(info autoconfig: using wcscpy) endif endif ifndef $(HAVE_WCSLCAT) WCSFUNC=wcslcat export WCSFUNC HAVE_WCSLCAT = $(shell $(MAKE) $(MAKE_OPTS) WCSFUNC=wcslcat have_wcsfunc) ifeq ($(HAVE_WCSLCAT),1) CONFIG_CFLAGS += -DHAVE_WCSLCAT $(info autoconfig: using wcslcat) endif endif ifndef $(HAVE_WCSLCPY) WCSFUNC=wcslcpy export WCSFUNC HAVE_WCSLCPY = $(shell $(MAKE) $(MAKE_OPTS) WCSFUNC=wcslcpy have_wcsfunc) ifeq ($(HAVE_WCSLCPY),1) CONFIG_CFLAGS += -DHAVE_WCSLCPY $(info autoconfig: using wcslcpy) endif endif ifndef $(HAVE_WCSLEN) WCSFUNC=wcslen export WCSFUNC HAVE_WCSLEN = $(shell $(MAKE) $(MAKE_OPTS) WCSFUNC=wcslen have_wcsfunc) ifeq ($(HAVE_WCSLEN),1) CONFIG_CFLAGS += -DHAVE_WCSLEN $(info autoconfig: using wcslen) endif endif ifndef $(HAVE_WCSNCASECMP) WCSFUNC=wcsncasecmp export WCSFUNC HAVE_WCSNCASECMP = $(shell $(MAKE) $(MAKE_OPTS) WCSFUNC=wcsncasecmp have_wcsfunc) ifeq ($(HAVE_WCSNCASECMP),1) CONFIG_CFLAGS += -DHAVE_WCSNCASECMP $(info autoconfig: using wcsncasecmp) endif endif ifndef $(HAVE_WCSNCAT) WCSFUNC=wcsncat export WCSFUNC HAVE_WCSNCAT = $(shell $(MAKE) $(MAKE_OPTS) WCSFUNC=wcsncat have_wcsfunc) ifeq ($(HAVE_WCSNCAT),1) CONFIG_CFLAGS += -DHAVE_WCSNCAT $(info autoconfig: using wcsncat) endif endif ifndef $(HAVE_WCSNCMP) WCSFUNC=wcsncmp export WCSFUNC HAVE_WCSNCMP = $(shell $(MAKE) $(MAKE_OPTS) WCSFUNC=wcsncmp have_wcsfunc) ifeq ($(HAVE_WCSNCMP),1) CONFIG_CFLAGS += -DHAVE_WCSNCMP $(info autoconfig: using wcsncmp) endif endif ifndef $(HAVE_WCSRCHR) WCSFUNC=wcsrchr export WCSFUNC HAVE_WCSRCHR = $(shell $(MAKE) $(MAKE_OPTS) WCSFUNC=wcsrchr have_wcsfunc) ifeq ($(HAVE_WCSRCHR),1) CONFIG_CFLAGS += -DHAVE_WCSRCHR $(info autoconfig: using wcsrchr) endif endif ifndef $(HAVE_WCSXFRM) WCSFUNC=wcsxfrm export WCSFUNC HAVE_WCSXFRM = $(shell $(MAKE) $(MAKE_OPTS) WCSFUNC=wcsxfrm have_wcsfunc) ifeq ($(HAVE_WCSXFRM),1) CONFIG_CFLAGS += -DHAVE_WCSXFRM $(info autoconfig: using wcsxfrm) endif endif endif .SUFFIXES: .c .o # # save configuration # .PHONY: save_config save_config: @echo CONFIG_CFLAGS=$(CONFIG_CFLAGS) >> config @echo CONFIG_LDFLAGS=$(CONFIG_LDFLAGS) >> config @echo CONFIG_OBJS=$(CONFIG_OBJS) >> config # # check if we can build against AppArmor # .PHONY: have_apparmor have_apparmor: $(DIR)/test-apparmor.c @$(CC) $(CFLAGS) $(CPPFLAGS) $(DIR)/test-apparmor.c $(LIB_APPARMOR) -o $(DIR)/test-apparmor 2> /dev/null || true @$(APPARMOR_PARSER) -Q usr.bin.pulseaudio.eg -o apparmor-data.bin 2> /dev/null; \ if [ $$? -ne 0 ]; then \ echo 0 ;\ else \ if [ -f $(DIR)/test-apparmor ]; then \ if [ -x "$(APPARMOR_PARSER)" ]; then \ if [ -f apparmor-data.bin ]; then \ echo 1 ;\ else \ echo 0 ;\ fi \ else \ echo 0 ;\ fi \ else \ echo 0 ;\ fi \ fi @rm -f $(DIR)/test-apparmor apparmor-data.bin # # check if compiler supports a specific floating point decimal format # .PHONY: have_float have_float: @$(CC) $(CFLAGS) $(CPPFLAGS) -DFLOAT=$(FLOAT_TYPE) -o $(DIR)/test-float $(DIR)/test-float.c -lm 2> /dev/null || true @if [ -f $(DIR)/test-float ]; then \ echo 1 ;\ else \ echo 0 ;\ fi @rm -f $(DIR)/test-float # # check if we have a specific header # .PHONY: have_header_h have_header_h: @echo "#include " > $(DIR)/test-header.c @echo "#include <$(HEADER)>" >> $(DIR)/test-header.c @$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $(DIR)/test-header.o $(DIR)/test-header.c 2> /dev/null || true @if [ -f $(DIR)/test-header.o ]; then \ echo 1 ;\ else \ echo 0 ;\ fi @rm -f $(DIR)/test-header.o $(DIR)/test-header.c # # check if we can build using a specific test program # .PHONY: have_test_prog have_test_prog: $(DIR)/$(TEST_PROG).c @$(CC) $(CFLAGS) $(CPPFLAGS) $(TEST_CFLAGS) $(DIR)/$(TEST_PROG).c $(TEST_LIBS) -o $(DIR)/$(TEST_PROG) $(LDFLAGS) 2> /dev/null || true @if [ -f $(DIR)/$(TEST_PROG) ]; then \ echo 1 ;\ else \ echo 0 ;\ fi @rm -rf $(DIR)/$(TEST_PROG) # # check if we can build vecmath related code # .PHONY: have_vecmath have_vecmath: stress-vecmath.c @$(CC) $(CFLAGS) $(CPPFLAGS) -DHAVE_VECMATH -c -o stress-vecmath-test.o stress-vecmath.c 2> /dev/null || true @if [ -f stress-vecmath-test.o ]; then \ echo 1 ;\ else \ echo 0 ;\ fi @rm -rf stress-vecmath-test.o # # check if we can build atomic related code # .PHONY: have_atomic have_atomic: stress-atomic.c @$(CC) $(CFLAGS) $(CPPFLAGS) -DTEST_ATOMIC_BUILD -DHAVE_ATOMIC stress-atomic.c $(LIB_ATOMIC) -o stress-atomic-test 2> /dev/null || true @if [ -f stress-atomic-test ]; then \ echo 1 ;\ else \ echo 0 ;\ fi @rm -rf stress-atomic-test # # check if we have specific math functions # .PHONY: have_mathfunc have_mathfunc: $(DIR)/test-mathfunc.c @$(CC) $(CFLAGS) $(CPPFLAGS) -DMATHFUNC=$(MATHFUNC) $(DIR)/test-mathfunc.c -o $(DIR)/test-mathfunc -lm 2> /dev/null || true @if [ -f $(DIR)/test-mathfunc ]; then \ echo 1 ;\ else \ echo 0 ;\ fi @rm -rf $(DIR)/test-mathfunc # # check if we have specific string str* functions # .PHONY: have_strfunc have_strfunc: $(DIR)/test-strfunc.c @$(CC) $(CFLAGS) $(CPPFLAGS) -DSTRFUNC=$(STRFUNC) $(DIR)/test-strfunc.c -o $(DIR)/test-strfunc $(LIB_BSD) 2> /dev/null || true @if [ -f $(DIR)/test-strfunc ]; then \ echo 1 ;\ else \ echo 0 ;\ fi @rm -rf $(DIR)/test-strfunc # # check if we have specific wide string wcs* functions # .PHONY: have_wcsfunc have_wcsfunc: $(DIR)/test-wcsfunc.c @$(CC) $(CFLAGS) $(CPPFLAGS) -DWCSFUNC=$(WCSFUNC) $(DIR)/test-wcsfunc.c -o $(DIR)/test-wcsfunc $(LIB_BSD) 2> /dev/null || true @if [ -f $(DIR)/test-wcsfunc ]; then \ echo 1 ;\ else \ echo 0 ;\ fi @rm -rf $(DIR)/test-wcsfunc