Dmitry V. Levin | 38a34c9 | 2015-12-17 17:56:48 +0000 | [diff] [blame] | 1 | # Configure template for strace. |
| 2 | # |
| 3 | # Copyright (c) 1999-2001 Wichert Akkerman <wichert@deephackmode.org> |
| 4 | # Copyright (c) 2002-2009 Roland McGrath <roland@redhat.com> |
Dmitry V. Levin | 2165a35 | 2016-01-12 00:02:56 +0000 | [diff] [blame] | 5 | # Copyright (c) 2006-2016 Dmitry V. Levin <ldv@altlinux.org> |
Dmitry V. Levin | 38a34c9 | 2015-12-17 17:56:48 +0000 | [diff] [blame] | 6 | # Copyright (c) 2008-2015 Mike Frysinger <vapier@gentoo.org> |
| 7 | # Copyright (c) 2015 Elvira Khabirova <lineprinter0@gmail.com> |
| 8 | # All rights reserved. |
| 9 | # |
| 10 | # Redistribution and use in source and binary forms, with or without |
| 11 | # modification, are permitted provided that the following conditions |
| 12 | # are met: |
| 13 | # 1. Redistributions of source code must retain the above copyright |
| 14 | # notice, this list of conditions and the following disclaimer. |
| 15 | # 2. Redistributions in binary form must reproduce the above copyright |
| 16 | # notice, this list of conditions and the following disclaimer in the |
| 17 | # documentation and/or other materials provided with the distribution. |
| 18 | # 3. The name of the author may not be used to endorse or promote products |
| 19 | # derived from this software without specific prior written permission. |
| 20 | # |
| 21 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
| 22 | # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
| 23 | # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
| 24 | # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
| 25 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
| 26 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 30 | # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 31 | |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 32 | AC_PREREQ(2.57) |
Dmitry V. Levin | dce7593 | 2013-04-30 23:52:12 +0000 | [diff] [blame] | 33 | AC_INIT([strace], |
| 34 | m4_esyscmd([./git-version-gen .tarball-version]), |
| 35 | [strace-devel@lists.sourceforge.net]) |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 36 | AC_CONFIG_SRCDIR([strace.c]) |
Roland McGrath | ffda2d3 | 2009-10-11 16:25:29 -0700 | [diff] [blame] | 37 | AC_CONFIG_AUX_DIR([.]) |
Mike Frysinger | bb3a0f7 | 2013-04-30 22:41:11 -0400 | [diff] [blame] | 38 | AC_CONFIG_HEADERS([config.h]) |
Dmitry V. Levin | cf3ecbd | 2015-08-26 22:50:58 +0000 | [diff] [blame] | 39 | AM_INIT_AUTOMAKE([foreign nostdinc dist-xz no-dist-gzip silent-rules parallel-tests]) |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 40 | AM_MAINTAINER_MODE |
| 41 | AC_CANONICAL_HOST |
| 42 | |
H.J. Lu | 35be581 | 2012-04-16 13:00:01 +0200 | [diff] [blame] | 43 | AC_PROG_CC |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 44 | AC_PROG_CPP |
Mike Frysinger | 58c7fe9 | 2015-02-26 22:22:36 -0500 | [diff] [blame] | 45 | AX_PROG_CC_FOR_BUILD |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 46 | AC_PROG_INSTALL |
Elvira Khabirova | 0929422 | 2015-08-04 01:47:02 +0300 | [diff] [blame] | 47 | AC_PROG_RANLIB |
H.J. Lu | 35be581 | 2012-04-16 13:00:01 +0200 | [diff] [blame] | 48 | |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 49 | AC_USE_SYSTEM_EXTENSIONS |
Gabriel Laskar | cba6710 | 2016-02-01 18:15:39 +0100 | [diff] [blame] | 50 | AX_CODE_COVERAGE |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 51 | |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 52 | AC_MSG_CHECKING([for supported architecture]) |
Dmitry V. Levin | 1e04e57 | 2015-12-08 00:13:38 +0000 | [diff] [blame] | 53 | arch_m32= |
| 54 | arch_mx32= |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 55 | case "$host_cpu" in |
Dmitry V. Levin | 87ea1f4 | 2008-11-10 22:21:41 +0000 | [diff] [blame] | 56 | bfin) |
| 57 | arch=bfin |
| 58 | AC_DEFINE([BFIN], 1, [Define for the Blackfin architecture.]) |
| 59 | ;; |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 60 | i[[3456]]86|pentium) |
| 61 | arch=i386 |
| 62 | AC_DEFINE([I386], 1, [Define for the i386 architecture.]) |
| 63 | ;; |
| 64 | ia64) |
| 65 | arch=ia64 |
| 66 | AC_DEFINE([IA64], 1, [Define for the IA64 architecture.]) |
| 67 | ;; |
| 68 | m68k) |
| 69 | arch=m68k |
| 70 | AC_DEFINE([M68K], 1, [Define for the m68k architecture.]) |
| 71 | ;; |
Roland McGrath | 6d1a65c | 2004-07-12 07:44:08 +0000 | [diff] [blame] | 72 | sparc64*) |
| 73 | arch=sparc64 |
Dmitry V. Levin | 1e04e57 | 2015-12-08 00:13:38 +0000 | [diff] [blame] | 74 | arch_m32=sparc |
Roland McGrath | 6d1a65c | 2004-07-12 07:44:08 +0000 | [diff] [blame] | 75 | AC_DEFINE([SPARC64], 1, [Define for the SPARC64 architecture.]) |
| 76 | ;; |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 77 | sparc*) |
| 78 | arch=sparc |
| 79 | AC_DEFINE([SPARC], 1, [Define for the SPARC architecture.]) |
| 80 | ;; |
James Hogan | 5f999a8 | 2013-02-22 14:44:10 +0000 | [diff] [blame] | 81 | metag*) |
| 82 | arch=metag |
| 83 | AC_DEFINE([METAG], 1, [Define for the Meta architecture.]) |
| 84 | ;; |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 85 | mips*) |
| 86 | arch=mips |
| 87 | AC_DEFINE([MIPS], 1, [Define for the MIPS architecture.]) |
| 88 | ;; |
| 89 | alpha*) |
| 90 | arch=alpha |
| 91 | AC_DEFINE([ALPHA], 1, [Define for the Alpha architecture.]) |
| 92 | ;; |
Roland McGrath | eb28535 | 2003-01-14 09:59:00 +0000 | [diff] [blame] | 93 | powerpc*) |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 94 | AC_DEFINE([POWERPC], 1, [Define for the PowerPC architecture.]) |
Anton Blanchard | 9afc2ee | 2013-07-11 12:03:57 +1000 | [diff] [blame] | 95 | AC_TRY_COMPILE( |
| 96 | [#ifndef __LP64__ |
| 97 | # error 32 bit |
Dmitry V. Levin | af3ab5b | 2015-01-21 17:04:31 +0000 | [diff] [blame] | 98 | #endif], [], arch=powerpc64, arch=powerpc) |
| 99 | if test "$arch" = "powerpc64"; then |
Dmitry V. Levin | 1e04e57 | 2015-12-08 00:13:38 +0000 | [diff] [blame] | 100 | arch_m32=powerpc |
Andreas Schwab | d69fa49 | 2010-07-12 21:39:57 +0200 | [diff] [blame] | 101 | AC_DEFINE([POWERPC64], 1, [Define for the PowerPC64 architecture.]) |
| 102 | fi |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 103 | ;; |
| 104 | arm*) |
| 105 | arch=arm |
| 106 | AC_DEFINE([ARM], 1, [Define for the ARM architecture.]) |
| 107 | ;; |
Steve McIntyre | d8d3bd3 | 2012-10-24 17:58:16 +0100 | [diff] [blame] | 108 | aarch64*) |
| 109 | arch=aarch64 |
Dmitry V. Levin | 1e04e57 | 2015-12-08 00:13:38 +0000 | [diff] [blame] | 110 | arch_m32=arm |
Steve McIntyre | d8d3bd3 | 2012-10-24 17:58:16 +0100 | [diff] [blame] | 111 | AC_DEFINE([AARCH64], 1, [Define for the AArch64 architecture.]) |
| 112 | ;; |
Denys Vlasenko | 5ae2b7c | 2009-02-27 20:32:52 +0000 | [diff] [blame] | 113 | avr32*) |
| 114 | arch=avr32 |
| 115 | AC_DEFINE([AVR32], 1, [Define for the AVR32 architecture.]) |
| 116 | ;; |
Vineet Gupta | 7daacbb | 2013-08-16 12:47:06 +0530 | [diff] [blame] | 117 | arc*) |
| 118 | arch=arc |
| 119 | AC_DEFINE([ARC], 1, [Define for the ARC architecture.]) |
| 120 | ;; |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 121 | s390) |
| 122 | arch=s390 |
| 123 | AC_DEFINE([S390], 1, [Define for the S390 architecture.]) |
| 124 | ;; |
| 125 | s390x) |
| 126 | arch=s390x |
| 127 | AC_DEFINE([S390X], 1, [Define for the S390x architecture.]) |
| 128 | ;; |
| 129 | hppa*|parisc*) |
| 130 | arch=hppa |
| 131 | AC_DEFINE([HPPA], 1, [Define for the HPPA architecture.]) |
| 132 | ;; |
Roland McGrath | 67828ca | 2007-11-01 21:32:49 +0000 | [diff] [blame] | 133 | sh64*) |
Roland McGrath | f5a4777 | 2003-06-26 22:40:42 +0000 | [diff] [blame] | 134 | arch=sh64 |
| 135 | AC_DEFINE([SH64], 1, [Define for the SH64 architecture.]) |
Roland McGrath | e1e584b | 2003-06-02 19:18:58 +0000 | [diff] [blame] | 136 | ;; |
Roland McGrath | 67828ca | 2007-11-01 21:32:49 +0000 | [diff] [blame] | 137 | sh*) |
| 138 | arch=sh |
| 139 | AC_DEFINE([SH], 1, [Define for the SH architecture.]) |
| 140 | ;; |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 141 | x86?64*) |
Dmitry V. Levin | 1e04e57 | 2015-12-08 00:13:38 +0000 | [diff] [blame] | 142 | arch_m32=i386 |
H.J. Lu | 35be581 | 2012-04-16 13:00:01 +0200 | [diff] [blame] | 143 | AC_TRY_COMPILE( |
| 144 | [#ifndef __ILP32__ |
| 145 | # error not x32 |
| 146 | #endif], [], arch=x32, arch=x86_64) |
| 147 | if test "$arch" = "x86_64"; then |
Dmitry V. Levin | 1e04e57 | 2015-12-08 00:13:38 +0000 | [diff] [blame] | 148 | arch_mx32=x32 |
H.J. Lu | 35be581 | 2012-04-16 13:00:01 +0200 | [diff] [blame] | 149 | AC_DEFINE([X86_64], 1, [Define for the 64bit AMD x86-64 architecture.]) |
| 150 | else |
| 151 | AC_DEFINE([X32], 1, [Define for the 32bit AMD x86-64 architecture.]) |
| 152 | fi |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 153 | ;; |
Denys Vlasenko | ea0e6e8 | 2009-02-25 17:08:40 +0000 | [diff] [blame] | 154 | cris|crisv10) |
| 155 | arch=crisv10 |
| 156 | AC_DEFINE([CRISV10], 1, [Define for the CRISv10 architecture.]) |
| 157 | ;; |
| 158 | crisv32) |
| 159 | arch=crisv32 |
| 160 | AC_DEFINE([CRISV32], 1, [Define for the CRISv32 architecture.]) |
| 161 | ;; |
Chris Metcalf | c8c6698 | 2009-12-28 10:00:15 -0500 | [diff] [blame] | 162 | tile*) |
| 163 | arch=tile |
| 164 | AC_DEFINE([TILE], 1, [Define for the Tile architecture]) |
| 165 | ;; |
Edgar E. Iglesias | 939caba | 2010-07-06 14:21:07 +0200 | [diff] [blame] | 166 | microblaze*) |
| 167 | arch=microblaze |
| 168 | AC_DEFINE([MICROBLAZE], 1, [Define for the MicroBlaze architecture.]) |
| 169 | ;; |
Ezequiel Garcia | bd8dd77 | 2015-04-18 17:33:27 -0300 | [diff] [blame] | 170 | nios2*) |
| 171 | arch=nios2 |
| 172 | AC_DEFINE([NIOS2], 1, [Define for the Nios-II architecture.]) |
| 173 | ;; |
| 174 | |
Christian Svensson | 492f81f | 2013-02-14 13:26:27 +0100 | [diff] [blame] | 175 | or1k*) |
| 176 | arch=or1k |
| 177 | AC_DEFINE([OR1K], 1, [Define for the OpenRISC 1000 architecture.]) |
| 178 | ;; |
| 179 | |
Chris Zankel | 8f636ed | 2013-03-25 10:22:07 -0700 | [diff] [blame] | 180 | xtensa*) |
| 181 | arch=xtensa |
| 182 | AC_DEFINE([XTENSA], 1, [Define for the Xtensa architecture]) |
| 183 | ;; |
| 184 | |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 185 | *) |
| 186 | AC_MSG_RESULT([NO!]) |
| 187 | AC_MSG_ERROR([architecture $host_cpu is not supported by strace]) |
| 188 | ;; |
| 189 | esac |
| 190 | AC_MSG_RESULT($arch) |
| 191 | |
Dmitry V. Levin | 1e04e57 | 2015-12-08 00:13:38 +0000 | [diff] [blame] | 192 | test -n "$arch_m32" || |
| 193 | arch_m32=$arch |
| 194 | test -n "$arch_mx32" || |
| 195 | arch_mx32=$arch |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 196 | AC_SUBST(arch) |
Dmitry V. Levin | 1e04e57 | 2015-12-08 00:13:38 +0000 | [diff] [blame] | 197 | AC_SUBST(arch_m32) |
| 198 | AC_SUBST(arch_mx32) |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 199 | |
Dmitry V. Levin | 047365e | 2015-02-15 01:08:48 +0000 | [diff] [blame] | 200 | if test "$arch" = mips; then |
Dmitry V. Levin | 6684b68 | 2015-08-18 22:53:22 +0000 | [diff] [blame] | 201 | AC_CACHE_CHECK([for _MIPS_SIM], [st_cv__MIPS_SIM], |
| 202 | [AC_COMPUTE_INT([st_cv__MIPS_SIM], [_MIPS_SIM], |
| 203 | [#include <sgidefs.h>], |
| 204 | [AC_MSG_ERROR([_MIPS_SIM cannot be determined])])]) |
| 205 | |
| 206 | AC_CACHE_CHECK([for MIPS ABI], [st_cv_mips_abi], |
Dmitry V. Levin | 047365e | 2015-02-15 01:08:48 +0000 | [diff] [blame] | 207 | [AC_COMPILE_IFELSE( |
| 208 | [AC_LANG_PROGRAM([[#include <sgidefs.h>]], |
| 209 | [[int i[_MIPS_SIM == _MIPS_SIM_ABI32 ? 1 : - 1];]])], |
Dmitry V. Levin | 6684b68 | 2015-08-18 22:53:22 +0000 | [diff] [blame] | 210 | [st_cv_mips_abi=o32], |
Dmitry V. Levin | 047365e | 2015-02-15 01:08:48 +0000 | [diff] [blame] | 211 | [AC_COMPILE_IFELSE( |
| 212 | [AC_LANG_PROGRAM([[#include <sgidefs.h>]], |
| 213 | [[int i[_MIPS_SIM == _MIPS_SIM_NABI32 ? 1 : - 1];]])], |
Dmitry V. Levin | 6684b68 | 2015-08-18 22:53:22 +0000 | [diff] [blame] | 214 | [st_cv_mips_abi=n32], |
Dmitry V. Levin | 047365e | 2015-02-15 01:08:48 +0000 | [diff] [blame] | 215 | [AC_COMPILE_IFELSE( |
| 216 | [AC_LANG_PROGRAM([[#include <sgidefs.h>]], |
| 217 | [[int i[_MIPS_SIM == _MIPS_SIM_ABI64 ? 1 : - 1];]])], |
Dmitry V. Levin | 6684b68 | 2015-08-18 22:53:22 +0000 | [diff] [blame] | 218 | [st_cv_mips_abi=n64], |
| 219 | [st_cv_mips_abi=unknown])])])]) |
| 220 | |
| 221 | case "$st_cv_mips_abi" in |
Dmitry V. Levin | 047365e | 2015-02-15 01:08:48 +0000 | [diff] [blame] | 222 | o32) AC_DEFINE([LINUX_MIPSO32], [1], [Define for _MIPS_SIM_ABI32.]);; |
| 223 | n32) AC_DEFINE([LINUX_MIPSN32], [1], [Define for _MIPS_SIM_NABI32.]);; |
| 224 | n64) AC_DEFINE([LINUX_MIPSN64], [1], [Define for _MIPS_SIM_ABI64.]);; |
| 225 | *) AC_MSG_ERROR([Unsupported _MIPS_SIM]);; |
| 226 | esac |
| 227 | fi |
| 228 | |
Dmitry V. Levin | 0160e16 | 2014-03-18 23:37:43 +0000 | [diff] [blame] | 229 | AC_ARG_ENABLE([arm-oabi], |
| 230 | [AS_HELP_STRING([--enable-arm-oabi], |
| 231 | [enable OABI support on ARM EABI])], |
| 232 | [], [enable_arm_oabi=no]) |
| 233 | case "$enable_arm_oabi" in |
| 234 | yes) enable_arm_oabi=1 ;; |
| 235 | no) enable_arm_oabi=0 ;; |
| 236 | *) AC_MSG_ERROR([bad value $enable_arm_oabi for arm-oabi option]) ;; |
| 237 | esac |
| 238 | AC_DEFINE_UNQUOTED([ENABLE_ARM_OABI], [$enable_arm_oabi], |
| 239 | [Define to 1 if you want OABI support on ARM EABI.]) |
| 240 | |
Dmitry V. Levin | 918e49b | 2010-09-09 17:41:15 +0000 | [diff] [blame] | 241 | gl_WARN_ADD([-Wall]) |
Dmitry V. Levin | 1ed5d80 | 2010-09-09 17:42:28 +0000 | [diff] [blame] | 242 | gl_WARN_ADD([-Wwrite-strings]) |
Dmitry V. Levin | 3ed5d02 | 2014-09-10 13:46:04 +0000 | [diff] [blame] | 243 | gl_WARN_ADD([-Wsign-compare]) |
Dmitry V. Levin | d376c92 | 2012-05-15 00:50:26 +0000 | [diff] [blame] | 244 | AC_ARG_ENABLE([gcc-Werror], |
| 245 | [AS_HELP_STRING([--enable-gcc-Werror], [turn on gcc's -Werror option])], |
| 246 | [case $enableval in |
| 247 | yes) gl_WARN_ADD([-Werror]) ;; |
| 248 | no) ;; |
| 249 | *) AC_MSG_ERROR([bad value $enableval for gcc-Werror option]) ;; |
| 250 | esac] |
| 251 | ) |
Dmitry V. Levin | 918e49b | 2010-09-09 17:41:15 +0000 | [diff] [blame] | 252 | AC_SUBST([WARN_CFLAGS]) |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 253 | |
Mike Frysinger | 6d12afd | 2010-09-12 03:39:55 -0400 | [diff] [blame] | 254 | AC_C_BIGENDIAN |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 255 | AC_C_CONST |
Dmitry V. Levin | 2165a35 | 2016-01-12 00:02:56 +0000 | [diff] [blame] | 256 | AC_C_TYPEOF |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 257 | |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 258 | AC_TYPE_GETGROUPS |
| 259 | AC_TYPE_MODE_T |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 260 | AC_TYPE_SIGNAL |
| 261 | AC_TYPE_UID_T |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 262 | |
| 263 | AC_HEADER_DIRENT |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 264 | AC_HEADER_MAJOR |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 265 | AC_HEADER_STAT |
| 266 | AC_HEADER_STDBOOL |
| 267 | AC_HEADER_STDC |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 268 | |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 269 | AC_CHECK_FUNCS(m4_normalize([ |
Dmitry V. Levin | 1ea6473 | 2015-01-10 00:08:58 +0000 | [diff] [blame] | 270 | fanotify_mark |
Dmitry V. Levin | d354130 | 2014-02-26 00:01:00 +0000 | [diff] [blame] | 271 | fopen64 |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 272 | fork |
Dmitry V. Levin | d354130 | 2014-02-26 00:01:00 +0000 | [diff] [blame] | 273 | fputs_unlocked |
Dmitry V. Levin | b0e6115 | 2015-12-02 01:02:39 +0000 | [diff] [blame] | 274 | fstatat |
| 275 | ftruncate |
| 276 | futimens |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 277 | if_indextoname |
| 278 | inet_ntop |
Dmitry V. Levin | 7bee462 | 2015-06-08 14:19:46 +0000 | [diff] [blame] | 279 | inet_pton |
Dmitry V. Levin | 78ed3f3 | 2015-03-23 00:04:27 +0000 | [diff] [blame] | 280 | pipe2 |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 281 | prctl |
Mike Frysinger | 97ca027 | 2014-08-11 02:52:08 -0400 | [diff] [blame] | 282 | preadv |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 283 | process_vm_readv |
Mike Frysinger | 97ca027 | 2014-08-11 02:52:08 -0400 | [diff] [blame] | 284 | pwritev |
Dmitry V. Levin | eb4649a | 2016-01-12 04:37:06 +0000 | [diff] [blame] | 285 | recvmmsg |
Masatake YAMATO | 993198d | 2014-11-07 01:23:27 +0900 | [diff] [blame] | 286 | sendmmsg |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 287 | sigaction |
Dmitry V. Levin | 30ac062 | 2015-08-03 09:47:25 +0000 | [diff] [blame] | 288 | signalfd |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 289 | stpcpy |
| 290 | strerror |
| 291 | strsignal |
Dmitry V. Levin | 78e48eb | 2015-07-15 15:34:59 +0000 | [diff] [blame] | 292 | utimensat |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 293 | ])) |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 294 | |
| 295 | AC_CHECK_TYPES([sig_atomic_t, struct sigcontext],,, [#include <signal.h>]) |
| 296 | |
| 297 | AC_CHECK_TYPES([struct mmsghdr],,, [#include <sys/socket.h>]) |
| 298 | |
| 299 | AC_CHECK_TYPES([__kernel_long_t, __kernel_ulong_t],,, |
| 300 | [#include <asm/posix_types.h>]) |
| 301 | |
| 302 | AC_CHECK_TYPES([struct stat64, struct __old_kernel_stat],,, |
| 303 | [#include <sys/types.h> |
| 304 | #include <asm/stat.h>]) |
| 305 | |
| 306 | AC_CHECK_TYPES([struct statfs64],,, [#include <sys/vfs.h>]) |
| 307 | |
| 308 | AC_CHECK_TYPES(m4_normalize([ |
| 309 | struct pt_all_user_regs, |
| 310 | struct ia64_fpreg, |
| 311 | struct ptrace_peeksiginfo_args |
| 312 | ]),,, [#include <sys/ptrace.h>]) |
| 313 | |
| 314 | AC_CHECK_TYPES(m4_normalize([ |
| 315 | struct flock, |
| 316 | struct flock64, |
| 317 | struct __kernel_flock, |
| 318 | struct __kernel_flock64 |
| 319 | ]),,, |
| 320 | [#include <sys/types.h> |
| 321 | #include <linux/fcntl.h>]) |
| 322 | |
| 323 | AC_CHECK_MEMBERS(m4_normalize([ |
| 324 | struct stat.st_atim.tv_nsec, |
| 325 | struct stat.st_blksize, |
| 326 | struct stat.st_blocks, |
| 327 | struct stat.st_ctim.tv_nsec, |
| 328 | struct stat.st_flags, |
| 329 | struct stat.st_fstype, |
| 330 | struct stat.st_gen, |
| 331 | struct stat.st_mtim.tv_nsec, |
| 332 | struct stat.st_rdev |
| 333 | ])) |
| 334 | |
| 335 | AC_CHECK_MEMBERS([struct msghdr.msg_control],,, [#include <sys/socket.h>]) |
| 336 | |
| 337 | AC_CHECK_MEMBERS([struct timex.tai],,, [#include <sys/timex.h>]) |
| 338 | |
| 339 | AC_CHECK_MEMBERS([struct utsname.domainname],,, [#include <sys/utsname.h>]) |
| 340 | |
| 341 | AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_scope_id],,, |
| 342 | [#include <sys/types.h> |
| 343 | #include <sys/socket.h> |
| 344 | #include <netinet/in.h>]) |
| 345 | |
| 346 | AC_CHECK_MEMBERS(m4_normalize([ |
| 347 | struct stat.st_atime_nsec, |
| 348 | struct stat.st_ctime_nsec, |
| 349 | struct stat.st_mtime_nsec |
| 350 | ]),,, [#include <sys/types.h> |
| 351 | #include <asm/stat.h>]) |
| 352 | |
| 353 | AC_CHECK_MEMBERS(m4_normalize([ |
| 354 | siginfo_t.si_syscall, |
| 355 | siginfo_t.si_timerid, |
| 356 | siginfo_t.si_overrun |
| 357 | ]),,, [#include <signal.h>]) |
| 358 | |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 359 | AC_CHECK_HEADERS(m4_normalize([ |
| 360 | asm/cachectl.h |
| 361 | asm/sysmips.h |
Lubomir Rintel | c400a1c | 2014-10-03 11:40:28 +0200 | [diff] [blame] | 362 | bluetooth/bluetooth.h |
Dmitry V. Levin | c41808b | 2013-03-18 00:52:29 +0000 | [diff] [blame] | 363 | elf.h |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 364 | inttypes.h |
| 365 | ioctls.h |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 366 | linux/bsg.h |
Dmitry V. Levin | 52572b6 | 2014-12-11 19:21:54 +0000 | [diff] [blame] | 367 | linux/falloc.h |
Dmitry V. Levin | 2af6903 | 2015-02-04 23:50:50 +0000 | [diff] [blame] | 368 | linux/filter.h |
Dmitry V. Levin | df7aa2b | 2015-01-19 17:02:16 +0000 | [diff] [blame] | 369 | linux/hiddev.h |
Mike Frysinger | 54646b8 | 2015-08-19 13:29:27 -0400 | [diff] [blame] | 370 | linux/ip_vs.h |
Mike Frysinger | ba10a42 | 2015-10-31 00:47:53 -0400 | [diff] [blame] | 371 | linux/ipc.h |
Dmitry V. Levin | df7aa2b | 2015-01-19 17:02:16 +0000 | [diff] [blame] | 372 | linux/mmtimer.h |
Mike Frysinger | ba10a42 | 2015-10-31 00:47:53 -0400 | [diff] [blame] | 373 | linux/msg.h |
Ben Noordhuis | 88eafd8 | 2013-02-04 00:04:57 +0100 | [diff] [blame] | 374 | linux/perf_event.h |
Dmitry V. Levin | 2af6903 | 2015-02-04 23:50:50 +0000 | [diff] [blame] | 375 | linux/seccomp.h |
Dmitry V. Levin | 1e88073 | 2015-02-14 01:51:03 +0000 | [diff] [blame] | 376 | linux/securebits.h |
Mike Frysinger | ba10a42 | 2015-10-31 00:47:53 -0400 | [diff] [blame] | 377 | linux/sem.h |
| 378 | linux/shm.h |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 379 | linux/utsname.h |
| 380 | mqueue.h |
| 381 | netinet/sctp.h |
Dmitry V. Levin | fdb896e | 2014-02-25 23:04:55 +0000 | [diff] [blame] | 382 | scsi/sg.h |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 383 | stropts.h |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 384 | sys/conf.h |
| 385 | sys/epoll.h |
Dmitry V. Levin | c8cba99 | 2015-08-01 21:08:13 +0000 | [diff] [blame] | 386 | sys/eventfd.h |
Dmitry V. Levin | 1ea6473 | 2015-01-10 00:08:58 +0000 | [diff] [blame] | 387 | sys/fanotify.h |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 388 | sys/ioctl.h |
Mike Frysinger | ba10a42 | 2015-10-31 00:47:53 -0400 | [diff] [blame] | 389 | sys/ipc.h |
| 390 | sys/msg.h |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 391 | sys/reg.h |
Mike Frysinger | ba10a42 | 2015-10-31 00:47:53 -0400 | [diff] [blame] | 392 | sys/sem.h |
| 393 | sys/shm.h |
Dmitry V. Levin | 30ac062 | 2015-08-03 09:47:25 +0000 | [diff] [blame] | 394 | sys/signalfd.h |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 395 | sys/vfs.h |
Masatake YAMATO | f548067 | 2014-11-22 19:03:33 +0900 | [diff] [blame] | 396 | sys/xattr.h |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 397 | ])) |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 398 | |
| 399 | AC_CHECK_HEADERS([asm/sigcontext.h],,, [#include <signal.h>]) |
| 400 | |
| 401 | AC_CHECK_HEADERS([netinet/tcp.h netinet/udp.h],,, [#include <netinet/in.h>]) |
| 402 | |
Mike Frysinger | ba10a42 | 2015-10-31 00:47:53 -0400 | [diff] [blame] | 403 | AC_CHECK_HEADERS([linux/mqueue.h],,, [#include <linux/types.h>]) |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 404 | |
| 405 | AC_CHECK_HEADERS([linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h],,, |
| 406 | [#include <stddef.h> |
Andreas Schwab | 360986b | 2010-03-08 16:07:52 +0100 | [diff] [blame] | 407 | #include <sys/socket.h> |
| 408 | #include <asm/types.h>]) |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 409 | |
Mike Frysinger | 54646b8 | 2015-08-19 13:29:27 -0400 | [diff] [blame] | 410 | AC_CHECK_HEADERS(m4_normalize([ |
| 411 | linux/netfilter_arp/arp_tables.h |
| 412 | linux/netfilter_bridge/ebtables.h |
| 413 | linux/netfilter_ipv4/ip_tables.h |
| 414 | linux/netfilter_ipv6/ip6_tables.h |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 415 | ]),,, [#include <netinet/in.h> |
Mike Frysinger | 54646b8 | 2015-08-19 13:29:27 -0400 | [diff] [blame] | 416 | #include <net/if.h>]) |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 417 | |
Dmitry V. Levin | 19dadf9 | 2015-02-22 02:50:33 +0300 | [diff] [blame] | 418 | AC_CHECK_HEADERS([linux/input.h], [ |
| 419 | AC_CHECK_MEMBERS([struct input_absinfo.resolution],,, [#include <linux/input.h>]) |
| 420 | ]) |
| 421 | |
Dmitry V. Levin | 4e3ded3 | 2015-07-29 16:27:16 +0000 | [diff] [blame] | 422 | AC_CHECK_HEADERS([linux/bpf.h], [ |
| 423 | AC_CACHE_CHECK([whether union bpf_attr.log_buf initialization works], |
| 424 | [st_cv_have_union_bpf_attr_log_buf], |
| 425 | [AC_COMPILE_IFELSE( |
| 426 | [AC_LANG_PROGRAM([[#include <linux/bpf.h>]], |
| 427 | [[union bpf_attr a = { .log_buf = 0 };]])], |
| 428 | [st_cv_have_union_bpf_attr_log_buf=yes], |
| 429 | [st_cv_have_union_bpf_attr_log_buf=no])]) |
| 430 | if test $st_cv_have_union_bpf_attr_log_buf = yes; then |
| 431 | AC_DEFINE(HAVE_UNION_BPF_ATTR_LOG_BUF, [1], |
| 432 | [Define to 1 if union bpf_attr.log_buf initialization works]) |
| 433 | fi |
| 434 | ]) |
| 435 | |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 436 | AC_CHECK_DECLS([sys_errlist]) |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 437 | AC_CHECK_DECLS(m4_normalize([ |
Dmitry V. Levin | 6974bd4 | 2013-11-12 21:20:50 +0000 | [diff] [blame] | 438 | PTRACE_PEEKUSER, |
Dmitry V. Levin | fadf379 | 2015-02-13 00:26:38 +0000 | [diff] [blame] | 439 | PTRACE_POKEUSER |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 440 | ]),,, [#include <sys/ptrace.h>]) |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 441 | |
Dmitry V. Levin | cf050db | 2012-05-02 10:21:49 +0000 | [diff] [blame] | 442 | AC_CHECK_DECLS(m4_normalize([ |
Dmitry V. Levin | d8ad1dd | 2014-04-26 15:22:08 +0000 | [diff] [blame] | 443 | P_PID, |
| 444 | P_PPID, |
| 445 | P_PGID, |
| 446 | P_SID, |
| 447 | P_CID, |
| 448 | P_UID, |
| 449 | P_GID, |
| 450 | P_ALL, |
| 451 | P_LWPID |
| 452 | ]),,, [#include <sys/wait.h>]) |
| 453 | |
| 454 | AC_CHECK_DECLS(m4_normalize([ |
Dmitry V. Levin | baf60d9 | 2014-04-26 14:12:33 +0000 | [diff] [blame] | 455 | LO_FLAGS_READ_ONLY, |
Dmitry V. Levin | cf050db | 2012-05-02 10:21:49 +0000 | [diff] [blame] | 456 | LO_FLAGS_AUTOCLEAR, |
| 457 | LO_FLAGS_PARTSCAN |
| 458 | ]),,, [#include <linux/loop.h>]) |
| 459 | |
Dmitry V. Levin | 6dbbe07 | 2014-04-26 13:54:12 +0000 | [diff] [blame] | 460 | AC_CHECK_DECLS(m4_normalize([ |
| 461 | CTL_KERN, |
| 462 | CTL_VM, |
| 463 | CTL_NET, |
| 464 | CTL_PROC, |
| 465 | CTL_FS, |
| 466 | CTL_DEBUG, |
| 467 | CTL_DEV, |
| 468 | CTL_BUS, |
| 469 | CTL_ABI, |
| 470 | CTL_CPU, |
| 471 | CTL_ARLAN, |
| 472 | CTL_S390DBF, |
| 473 | CTL_SUNRPC, |
| 474 | CTL_PM, |
| 475 | CTL_FRV, |
| 476 | KERN_OSTYPE, |
| 477 | KERN_OSRELEASE, |
| 478 | KERN_OSREV, |
| 479 | KERN_VERSION, |
| 480 | KERN_SECUREMASK, |
| 481 | KERN_PROF, |
| 482 | KERN_NODENAME, |
| 483 | KERN_DOMAINNAME, |
| 484 | KERN_PANIC, |
| 485 | KERN_REALROOTDEV, |
| 486 | KERN_SPARC_REBOOT, |
| 487 | KERN_CTLALTDEL, |
| 488 | KERN_PRINTK, |
| 489 | KERN_NAMETRANS, |
| 490 | KERN_PPC_HTABRECLAIM, |
| 491 | KERN_PPC_ZEROPAGED, |
| 492 | KERN_PPC_POWERSAVE_NAP, |
| 493 | KERN_MODPROBE, |
| 494 | KERN_SG_BIG_BUFF, |
| 495 | KERN_ACCT, |
| 496 | KERN_PPC_L2CR, |
| 497 | KERN_RTSIGNR, |
| 498 | KERN_RTSIGMAX, |
| 499 | KERN_SHMMAX, |
| 500 | KERN_MSGMAX, |
| 501 | KERN_MSGMNB, |
| 502 | KERN_MSGPOOL, |
| 503 | KERN_SYSRQ, |
| 504 | KERN_MAX_THREADS, |
| 505 | KERN_RANDOM, |
| 506 | KERN_SHMALL, |
| 507 | KERN_MSGMNI, |
| 508 | KERN_SEM, |
| 509 | KERN_SPARC_STOP_A, |
| 510 | KERN_SHMMNI, |
| 511 | KERN_OVERFLOWUID, |
| 512 | KERN_OVERFLOWGID, |
| 513 | KERN_SHMPATH, |
| 514 | KERN_HOTPLUG, |
| 515 | KERN_IEEE_EMULATION_WARNINGS, |
| 516 | KERN_S390_USER_DEBUG_LOGGING, |
| 517 | KERN_CORE_USES_PID, |
| 518 | KERN_TAINTED, |
| 519 | KERN_CADPID, |
| 520 | KERN_PIDMAX, |
| 521 | KERN_CORE_PATTERN, |
| 522 | KERN_PANIC_ON_OOPS, |
| 523 | KERN_HPPA_PWRSW, |
| 524 | KERN_HPPA_UNALIGNED, |
| 525 | KERN_PRINTK_RATELIMIT, |
| 526 | KERN_PRINTK_RATELIMIT_BURST, |
| 527 | KERN_PTY, |
| 528 | KERN_NGROUPS_MAX, |
| 529 | KERN_SPARC_SCONS_PWROFF, |
| 530 | KERN_HZ_TIMER, |
| 531 | KERN_UNKNOWN_NMI_PANIC, |
| 532 | KERN_BOOTLOADER_TYPE, |
| 533 | KERN_RANDOMIZE, |
| 534 | KERN_SETUID_DUMPABLE, |
| 535 | KERN_SPIN_RETRY, |
| 536 | KERN_ACPI_VIDEO_FLAGS, |
| 537 | KERN_IA64_UNALIGNED, |
| 538 | KERN_COMPAT_LOG, |
| 539 | KERN_MAX_LOCK_DEPTH, |
| 540 | KERN_NMI_WATCHDOG, |
| 541 | KERN_PANIC_ON_NMI, |
| 542 | NET_CORE, |
| 543 | NET_ETHER, |
| 544 | NET_802, |
| 545 | NET_UNIX, |
| 546 | NET_IPV4, |
| 547 | NET_IPX, |
| 548 | NET_ATALK, |
| 549 | NET_NETROM, |
| 550 | NET_AX25, |
| 551 | NET_BRIDGE, |
| 552 | NET_ROSE, |
| 553 | NET_IPV6, |
| 554 | NET_X25, |
| 555 | NET_TR, |
| 556 | NET_DECNET, |
| 557 | NET_ECONET, |
| 558 | NET_SCTP, |
| 559 | NET_LLC, |
| 560 | NET_NETFILTER, |
| 561 | NET_DCCP, |
| 562 | NET_IRDA, |
| 563 | NET_CORE_WMEM_MAX, |
| 564 | NET_CORE_RMEM_MAX, |
| 565 | NET_CORE_WMEM_DEFAULT, |
| 566 | NET_CORE_RMEM_DEFAULT, |
| 567 | NET_CORE_DESTROY_DELAY, |
| 568 | NET_CORE_MAX_BACKLOG, |
| 569 | NET_CORE_FASTROUTE, |
| 570 | NET_CORE_MSG_COST, |
| 571 | NET_CORE_MSG_BURST, |
| 572 | NET_CORE_OPTMEM_MAX, |
| 573 | NET_CORE_HOT_LIST_LENGTH, |
| 574 | NET_CORE_DIVERT_VERSION, |
| 575 | NET_CORE_NO_CONG_THRESH, |
| 576 | NET_CORE_NO_CONG, |
| 577 | NET_CORE_LO_CONG, |
| 578 | NET_CORE_MOD_CONG, |
| 579 | NET_CORE_DEV_WEIGHT, |
| 580 | NET_CORE_SOMAXCONN, |
| 581 | NET_CORE_BUDGET, |
| 582 | NET_CORE_AEVENT_ETIME, |
| 583 | NET_CORE_AEVENT_RSEQTH, |
| 584 | NET_CORE_WARNINGS, |
| 585 | NET_IPV4_FORWARD, |
| 586 | NET_IPV4_DYNADDR, |
| 587 | NET_IPV4_CONF, |
| 588 | NET_IPV4_NEIGH, |
| 589 | NET_IPV4_ROUTE, |
| 590 | NET_IPV4_FIB_HASH, |
| 591 | NET_IPV4_NETFILTER, |
| 592 | NET_IPV4_TCP_TIMESTAMPS, |
| 593 | NET_IPV4_TCP_WINDOW_SCALING, |
| 594 | NET_IPV4_TCP_SACK, |
| 595 | NET_IPV4_TCP_RETRANS_COLLAPSE, |
| 596 | NET_IPV4_DEFAULT_TTL, |
| 597 | NET_IPV4_AUTOCONFIG, |
| 598 | NET_IPV4_NO_PMTU_DISC, |
| 599 | NET_IPV4_TCP_SYN_RETRIES, |
| 600 | NET_IPV4_IPFRAG_HIGH_THRESH, |
| 601 | NET_IPV4_IPFRAG_LOW_THRESH, |
| 602 | NET_IPV4_IPFRAG_TIME, |
| 603 | NET_IPV4_TCP_MAX_KA_PROBES, |
| 604 | NET_IPV4_TCP_KEEPALIVE_TIME, |
| 605 | NET_IPV4_TCP_KEEPALIVE_PROBES, |
| 606 | NET_IPV4_TCP_RETRIES1, |
| 607 | NET_IPV4_TCP_RETRIES2, |
| 608 | NET_IPV4_TCP_FIN_TIMEOUT, |
| 609 | NET_IPV4_IP_MASQ_DEBUG, |
| 610 | NET_TCP_SYNCOOKIES, |
| 611 | NET_TCP_STDURG, |
| 612 | NET_TCP_RFC1337, |
| 613 | NET_TCP_SYN_TAILDROP, |
| 614 | NET_TCP_MAX_SYN_BACKLOG, |
| 615 | NET_IPV4_LOCAL_PORT_RANGE, |
| 616 | NET_IPV4_ICMP_ECHO_IGNORE_ALL, |
| 617 | NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS, |
| 618 | NET_IPV4_ICMP_SOURCEQUENCH_RATE, |
| 619 | NET_IPV4_ICMP_DESTUNREACH_RATE, |
| 620 | NET_IPV4_ICMP_TIMEEXCEED_RATE, |
| 621 | NET_IPV4_ICMP_PARAMPROB_RATE, |
| 622 | NET_IPV4_ICMP_ECHOREPLY_RATE, |
| 623 | NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES, |
| 624 | NET_IPV4_IGMP_MAX_MEMBERSHIPS, |
| 625 | NET_TCP_TW_RECYCLE, |
| 626 | NET_IPV4_ALWAYS_DEFRAG, |
| 627 | NET_IPV4_TCP_KEEPALIVE_INTVL, |
| 628 | NET_IPV4_INET_PEER_THRESHOLD, |
| 629 | NET_IPV4_INET_PEER_MINTTL, |
| 630 | NET_IPV4_INET_PEER_MAXTTL, |
| 631 | NET_IPV4_INET_PEER_GC_MINTIME, |
| 632 | NET_IPV4_INET_PEER_GC_MAXTIME, |
| 633 | NET_TCP_ORPHAN_RETRIES, |
| 634 | NET_TCP_ABORT_ON_OVERFLOW, |
| 635 | NET_TCP_SYNACK_RETRIES, |
| 636 | NET_TCP_MAX_ORPHANS, |
| 637 | NET_TCP_MAX_TW_BUCKETS, |
| 638 | NET_TCP_FACK, |
| 639 | NET_TCP_REORDERING, |
| 640 | NET_TCP_ECN, |
| 641 | NET_TCP_DSACK, |
| 642 | NET_TCP_MEM, |
| 643 | NET_TCP_WMEM, |
| 644 | NET_TCP_RMEM, |
| 645 | NET_TCP_APP_WIN, |
| 646 | NET_TCP_ADV_WIN_SCALE, |
| 647 | NET_IPV4_NONLOCAL_BIND, |
| 648 | NET_IPV4_ICMP_RATELIMIT, |
| 649 | NET_IPV4_ICMP_RATEMASK, |
| 650 | NET_TCP_TW_REUSE, |
| 651 | NET_TCP_FRTO, |
| 652 | NET_TCP_LOW_LATENCY, |
| 653 | NET_IPV4_IPFRAG_SECRET_INTERVAL, |
| 654 | NET_IPV4_IGMP_MAX_MSF, |
| 655 | NET_TCP_NO_METRICS_SAVE, |
| 656 | NET_TCP_DEFAULT_WIN_SCALE, |
| 657 | NET_TCP_MODERATE_RCVBUF, |
| 658 | NET_TCP_TSO_WIN_DIVISOR, |
| 659 | NET_TCP_BIC_BETA, |
| 660 | NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR, |
| 661 | NET_TCP_CONG_CONTROL, |
| 662 | NET_TCP_ABC, |
| 663 | NET_IPV4_IPFRAG_MAX_DIST, |
| 664 | NET_TCP_MTU_PROBING, |
| 665 | NET_TCP_BASE_MSS, |
| 666 | NET_IPV4_TCP_WORKAROUND_SIGNED_WINDOWS, |
| 667 | NET_TCP_DMA_COPYBREAK, |
| 668 | NET_TCP_SLOW_START_AFTER_IDLE, |
| 669 | NET_CIPSOV4_CACHE_ENABLE, |
| 670 | NET_CIPSOV4_CACHE_BUCKET_SIZE, |
| 671 | NET_CIPSOV4_RBM_OPTFMT, |
| 672 | NET_CIPSOV4_RBM_STRICTVALID, |
| 673 | NET_TCP_AVAIL_CONG_CONTROL, |
| 674 | NET_TCP_ALLOWED_CONG_CONTROL, |
| 675 | NET_TCP_MAX_SSTHRESH, |
| 676 | NET_TCP_FRTO_RESPONSE, |
| 677 | NET_IPV4_ROUTE_FLUSH, |
| 678 | NET_IPV4_ROUTE_MIN_DELAY, |
| 679 | NET_IPV4_ROUTE_MAX_DELAY, |
| 680 | NET_IPV4_ROUTE_GC_THRESH, |
| 681 | NET_IPV4_ROUTE_MAX_SIZE, |
| 682 | NET_IPV4_ROUTE_GC_MIN_INTERVAL, |
| 683 | NET_IPV4_ROUTE_GC_TIMEOUT, |
| 684 | NET_IPV4_ROUTE_GC_INTERVAL, |
| 685 | NET_IPV4_ROUTE_REDIRECT_LOAD, |
| 686 | NET_IPV4_ROUTE_REDIRECT_NUMBER, |
| 687 | NET_IPV4_ROUTE_REDIRECT_SILENCE, |
| 688 | NET_IPV4_ROUTE_ERROR_COST, |
| 689 | NET_IPV4_ROUTE_ERROR_BURST, |
| 690 | NET_IPV4_ROUTE_GC_ELASTICITY, |
| 691 | NET_IPV4_ROUTE_MTU_EXPIRES, |
| 692 | NET_IPV4_ROUTE_MIN_PMTU, |
| 693 | NET_IPV4_ROUTE_MIN_ADVMSS, |
| 694 | NET_IPV4_ROUTE_SECRET_INTERVAL, |
| 695 | NET_IPV4_ROUTE_GC_MIN_INTERVAL_MS, |
| 696 | NET_IPV4_CONF_FORWARDING, |
| 697 | NET_IPV4_CONF_MC_FORWARDING, |
| 698 | NET_IPV4_CONF_PROXY_ARP, |
| 699 | NET_IPV4_CONF_ACCEPT_REDIRECTS, |
| 700 | NET_IPV4_CONF_SECURE_REDIRECTS, |
| 701 | NET_IPV4_CONF_SEND_REDIRECTS, |
| 702 | NET_IPV4_CONF_SHARED_MEDIA, |
| 703 | NET_IPV4_CONF_RP_FILTER, |
| 704 | NET_IPV4_CONF_ACCEPT_SOURCE_ROUTE, |
| 705 | NET_IPV4_CONF_BOOTP_RELAY, |
| 706 | NET_IPV4_CONF_LOG_MARTIANS, |
| 707 | NET_IPV4_CONF_TAG, |
| 708 | NET_IPV4_CONF_ARPFILTER, |
| 709 | NET_IPV4_CONF_MEDIUM_ID, |
| 710 | NET_IPV4_CONF_NOXFRM, |
| 711 | NET_IPV4_CONF_NOPOLICY, |
| 712 | NET_IPV4_CONF_FORCE_IGMP_VERSION, |
| 713 | NET_IPV4_CONF_ARP_ANNOUNCE, |
| 714 | NET_IPV4_CONF_ARP_IGNORE, |
| 715 | NET_IPV4_CONF_PROMOTE_SECONDARIES, |
| 716 | NET_IPV4_CONF_ARP_ACCEPT, |
| 717 | NET_IPV4_CONF_ARP_NOTIFY, |
| 718 | NET_IPV6_CONF, |
| 719 | NET_IPV6_NEIGH, |
| 720 | NET_IPV6_ROUTE, |
| 721 | NET_IPV6_ICMP, |
| 722 | NET_IPV6_BINDV6ONLY, |
| 723 | NET_IPV6_IP6FRAG_HIGH_THRESH, |
| 724 | NET_IPV6_IP6FRAG_LOW_THRESH, |
| 725 | NET_IPV6_IP6FRAG_TIME, |
| 726 | NET_IPV6_IP6FRAG_SECRET_INTERVAL, |
| 727 | NET_IPV6_MLD_MAX_MSF, |
| 728 | NET_IPV6_ROUTE_FLUSH, |
| 729 | NET_IPV6_ROUTE_GC_THRESH, |
| 730 | NET_IPV6_ROUTE_MAX_SIZE, |
| 731 | NET_IPV6_ROUTE_GC_MIN_INTERVAL, |
| 732 | NET_IPV6_ROUTE_GC_TIMEOUT, |
| 733 | NET_IPV6_ROUTE_GC_INTERVAL, |
| 734 | NET_IPV6_ROUTE_GC_ELASTICITY, |
| 735 | NET_IPV6_ROUTE_MTU_EXPIRES, |
| 736 | NET_IPV6_ROUTE_MIN_ADVMSS, |
| 737 | NET_IPV6_ROUTE_GC_MIN_INTERVAL_MS, |
| 738 | NET_UNIX_DESTROY_DELAY, |
| 739 | NET_UNIX_DELETE_DELAY, |
| 740 | NET_UNIX_MAX_DGRAM_QLEN, |
| 741 | VM_OVERCOMMIT_MEMORY, |
| 742 | VM_PAGE_CLUSTER, |
| 743 | VM_DIRTY_BACKGROUND, |
| 744 | VM_DIRTY_RATIO, |
| 745 | VM_DIRTY_WB_CS, |
| 746 | VM_DIRTY_EXPIRE_CS, |
| 747 | VM_NR_PDFLUSH_THREADS, |
| 748 | VM_OVERCOMMIT_RATIO, |
| 749 | VM_PAGEBUF, |
| 750 | VM_HUGETLB_PAGES, |
| 751 | VM_SWAPPINESS, |
| 752 | VM_LOWMEM_RESERVE_RATIO, |
| 753 | VM_MIN_FREE_KBYTES, |
| 754 | VM_MAX_MAP_COUNT, |
| 755 | VM_LAPTOP_MODE, |
| 756 | VM_BLOCK_DUMP, |
| 757 | VM_HUGETLB_GROUP, |
| 758 | VM_VFS_CACHE_PRESSURE, |
| 759 | VM_LEGACY_VA_LAYOUT, |
| 760 | VM_SWAP_TOKEN_TIMEOUT |
| 761 | ]),,, |
| 762 | [#include <sys/types.h> |
| 763 | #include <linux/sysctl.h>]) |
| 764 | |
Philippe De Muyter | 0cc9614 | 2014-11-03 21:27:40 +0100 | [diff] [blame] | 765 | AC_CHECK_DECLS(m4_normalize([ |
| 766 | V4L2_FIELD_ANY, |
| 767 | V4L2_FIELD_NONE, |
| 768 | V4L2_FIELD_TOP, |
| 769 | V4L2_FIELD_BOTTOM, |
| 770 | V4L2_FIELD_INTERLACED, |
| 771 | V4L2_FIELD_SEQ_TB, |
| 772 | V4L2_FIELD_SEQ_BT, |
| 773 | V4L2_FIELD_ALTERNATE, |
| 774 | V4L2_FIELD_INTERLACED_TB, |
| 775 | V4L2_FIELD_INTERLACED_BT, |
| 776 | V4L2_BUF_TYPE_VIDEO_CAPTURE, |
| 777 | V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, |
| 778 | V4L2_BUF_TYPE_VIDEO_OUTPUT, |
| 779 | V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, |
| 780 | V4L2_BUF_TYPE_VIDEO_OVERLAY, |
| 781 | V4L2_BUF_TYPE_VBI_CAPTURE, |
| 782 | V4L2_BUF_TYPE_VBI_OUTPUT, |
| 783 | V4L2_BUF_TYPE_SLICED_VBI_CAPTURE, |
| 784 | V4L2_BUF_TYPE_SLICED_VBI_OUTPUT, |
| 785 | V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY, |
| 786 | V4L2_TUNER_RADIO, |
| 787 | V4L2_TUNER_ANALOG_TV, |
| 788 | V4L2_TUNER_DIGITAL_TV, |
| 789 | V4L2_MEMORY_MMAP, |
| 790 | V4L2_MEMORY_USERPTR, |
| 791 | V4L2_MEMORY_OVERLAY, |
| 792 | V4L2_MEMORY_DMABUF, |
| 793 | V4L2_COLORSPACE_SMPTE170M, |
| 794 | V4L2_COLORSPACE_SMPTE240M, |
| 795 | V4L2_COLORSPACE_REC709, |
| 796 | V4L2_COLORSPACE_BT878, |
| 797 | V4L2_COLORSPACE_470_SYSTEM_M, |
| 798 | V4L2_COLORSPACE_470_SYSTEM_BG, |
| 799 | V4L2_COLORSPACE_JPEG, |
| 800 | V4L2_COLORSPACE_SRGB, |
| 801 | V4L2_PRIORITY_UNSET, |
| 802 | V4L2_PRIORITY_BACKGROUND, |
| 803 | V4L2_PRIORITY_INTERACTIVE, |
| 804 | V4L2_PRIORITY_RECORD, |
| 805 | V4L2_FRMSIZE_TYPE_DISCRETE, |
| 806 | V4L2_FRMSIZE_TYPE_CONTINUOUS, |
| 807 | V4L2_FRMSIZE_TYPE_STEPWISE, |
| 808 | V4L2_FRMIVAL_TYPE_DISCRETE, |
| 809 | V4L2_FRMIVAL_TYPE_CONTINUOUS, |
| 810 | V4L2_FRMIVAL_TYPE_STEPWISE, |
| 811 | V4L2_CTRL_TYPE_INTEGER, |
| 812 | V4L2_CTRL_TYPE_BOOLEAN, |
| 813 | V4L2_CTRL_TYPE_MENU, |
| 814 | V4L2_CTRL_TYPE_BUTTON, |
| 815 | V4L2_CTRL_TYPE_INTEGER64, |
| 816 | V4L2_CTRL_TYPE_CTRL_CLASS, |
| 817 | V4L2_CTRL_TYPE_STRING, |
| 818 | V4L2_CTRL_TYPE_BITMASK, |
| 819 | V4L2_CTRL_TYPE_INTEGER_MENU |
| 820 | ]),,, [#include <linux/videodev2.h>]) |
| 821 | |
Dmitry V. Levin | 25caa31 | 2011-08-16 21:36:16 +0000 | [diff] [blame] | 822 | AC_CACHE_CHECK([for BLKGETSIZE64], [ac_cv_have_blkgetsize64], |
| 823 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ |
| 824 | #include <stdlib.h> |
| 825 | #include <linux/fs.h>], [return !BLKGETSIZE64;])], |
| 826 | [ac_cv_have_blkgetsize64=yes], [ac_cv_have_blkgetsize64=no])] |
| 827 | if test $ac_cv_have_blkgetsize64 = yes; then |
| 828 | AC_DEFINE([HAVE_BLKGETSIZE64], [1], [Define to 1 if you have BLKGETSIZE64.]) |
| 829 | fi) |
| 830 | |
Dmitry V. Levin | 63e4f86 | 2012-03-15 20:42:46 +0000 | [diff] [blame] | 831 | AC_CHECK_SIZEOF([long]) |
Dmitry V. Levin | 7a498be | 2013-05-04 19:51:57 +0000 | [diff] [blame] | 832 | AC_CHECK_SIZEOF([long long]) |
Dmitry V. Levin | 54cabef | 2014-03-03 23:09:47 +0000 | [diff] [blame] | 833 | AC_CHECK_SIZEOF([off_t],,[#include <sys/types.h>]) |
Dmitry V. Levin | 8c20d89 | 2015-05-21 16:19:40 +0000 | [diff] [blame] | 834 | AC_CHECK_SIZEOF([struct i64_i32],,[struct i64_i32 {long long i64; int i32;};]) |
Dmitry V. Levin | 63e4f86 | 2012-03-15 20:42:46 +0000 | [diff] [blame] | 835 | |
Dmitry V. Levin | 59f63d3 | 2015-03-05 05:03:41 +0000 | [diff] [blame] | 836 | AC_CACHE_CHECK([for SIGRTMIN], [st_cv_SIGRTMIN], |
| 837 | [[st_cv_SIGRTMIN="$(echo SIGRTMIN | |
| 838 | $CPP $CPPFLAGS -P -imacros asm/signal.h - | |
| 839 | grep '^[0-9]')" |
| 840 | test -n "$st_cv_SIGRTMIN" || st_cv_SIGRTMIN=no]]) |
| 841 | if test "x$st_cv_SIGRTMIN" != xno; then |
| 842 | AC_DEFINE_UNQUOTED([ASM_SIGRTMIN], [$st_cv_SIGRTMIN], |
| 843 | [SIGRTMIN defined in <asm/signal.h>]) |
| 844 | fi |
| 845 | AC_CACHE_CHECK([for SA_RESTORER], [st_cv_SA_RESTORER], |
| 846 | [st_cv_SA_RESTORER="$(echo SA_RESTORER | |
Dmitry V. Levin | ab3953b | 2014-02-08 00:15:52 +0000 | [diff] [blame] | 847 | $CPP $CPPFLAGS -P -imacros asm/signal.h - | |
| 848 | grep ^0x)" |
Dmitry V. Levin | 59f63d3 | 2015-03-05 05:03:41 +0000 | [diff] [blame] | 849 | test -n "$st_cv_SA_RESTORER" || st_cv_SA_RESTORER=no]) |
| 850 | if test "x$st_cv_SA_RESTORER" != xno; then |
| 851 | AC_DEFINE_UNQUOTED([ASM_SA_RESTORER], [$st_cv_SA_RESTORER], |
Dmitry V. Levin | ab3953b | 2014-02-08 00:15:52 +0000 | [diff] [blame] | 852 | [SA_RESTORER defined in <asm/signal.h>]) |
| 853 | fi |
| 854 | |
Dmitry V. Levin | 38593e9 | 2014-02-26 16:51:28 +0000 | [diff] [blame] | 855 | AC_CACHE_CHECK([for __builtin_popcount], [st_cv_have___builtin_popcount], |
| 856 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([], [__builtin_popcount(0)])], |
| 857 | [st_cv_have___builtin_popcount=yes], |
| 858 | [st_cv_have___builtin_popcount=no])]) |
| 859 | if test "x$st_cv_have___builtin_popcount" = xyes; then |
| 860 | AC_DEFINE([HAVE___BUILTIN_POPCOUNT], [1], |
| 861 | [Define to 1 if the system provides __builtin_popcount function]) |
| 862 | fi |
| 863 | |
Dmitry V. Levin | 856b759 | 2015-02-27 05:01:25 +0000 | [diff] [blame] | 864 | AC_CHECK_LIB([dl], [dladdr], [dl_LIBS='-ldl'], [dl_LIBS=]) |
Dmitry V. Levin | 977550d | 2015-02-27 04:09:56 +0000 | [diff] [blame] | 865 | if test "x$ac_cv_lib_dl_dladdr" = xyes; then |
| 866 | AC_DEFINE([HAVE_DLADDR], [1], [Define to 1 if the system provides dladdr]) |
Dmitry V. Levin | 977550d | 2015-02-27 04:09:56 +0000 | [diff] [blame] | 867 | fi |
| 868 | AC_SUBST(dl_LIBS) |
| 869 | |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 870 | AC_PATH_PROG([PERL], [perl]) |
| 871 | |
Luca Clementi | 327064b | 2013-07-23 00:11:35 -0700 | [diff] [blame] | 872 | dnl stack trace with libunwind |
| 873 | libunwind_CPPFLAGS= |
| 874 | libunwind_LDFLAGS= |
| 875 | libunwind_LIBS= |
| 876 | AC_ARG_WITH([libunwind], |
| 877 | [AS_HELP_STRING([--with-libunwind], |
| 878 | [use libunwind to implement stack tracing support])], |
| 879 | [case "${withval}" in |
| 880 | yes|no|check) ;; |
| 881 | *) with_libunwind=yes |
| 882 | libunwind_CPPFLAGS="-I${withval}/include" |
| 883 | libunwind_LDFLAGS="-L${withval}/lib" ;; |
| 884 | esac], |
| 885 | [with_libunwind=check] |
| 886 | ) |
| 887 | |
| 888 | use_libunwind=no |
| 889 | AS_IF([test "x$with_libunwind" != xno], |
| 890 | [saved_CPPFLAGS="$CPPFLAGS" |
| 891 | CPPFLAGS="$CPPFLAGS $libunwind_CPPFLAGS" |
| 892 | |
| 893 | AC_CHECK_HEADERS([libunwind-ptrace.h], |
| 894 | [saved_LDFLAGS="$LDFLAGS" |
| 895 | LDFLAGS="$LDFLAGS $libunwind_LDFLAGS" |
| 896 | |
| 897 | AC_CHECK_LIB([unwind], [backtrace], |
| 898 | [libunwind_LIBS="-lunwind $libunwind_LIBS" |
| 899 | |
| 900 | AC_MSG_CHECKING([for unw_create_addr_space in libunwind-generic]) |
| 901 | saved_LIBS="$LIBS" |
| 902 | LIBS="-lunwind-generic $libunwind_LIBS $LIBS" |
| 903 | |
| 904 | AC_LINK_IFELSE( |
| 905 | [AC_LANG_PROGRAM([[#include <libunwind-ptrace.h>]], |
| 906 | [[return !unw_create_addr_space(0, 0)]]) |
| 907 | ], |
| 908 | [AC_MSG_RESULT([yes]) |
| 909 | libunwind_LIBS="-lunwind-generic $libunwind_LIBS" |
| 910 | |
| 911 | AC_CHECK_LIB([unwind-ptrace], [_UPT_create], |
| 912 | [libunwind_LIBS="-lunwind-ptrace $libunwind_LIBS" |
| 913 | use_libunwind=yes |
| 914 | ], |
| 915 | [if test "x$with_libunwind" != xcheck; then |
| 916 | AC_MSG_FAILURE([failed to find _UPT_create in libunwind-ptrace]) |
| 917 | fi |
| 918 | ], |
| 919 | [$libunwind_LIBS] |
| 920 | ) |
| 921 | ], |
| 922 | [AC_MSG_RESULT([no]) |
| 923 | if test "x$with_libunwind" != xcheck; then |
| 924 | AC_MSG_FAILURE([failed to find unw_create_addr_space in libunwind-generic]) |
| 925 | fi |
| 926 | ] |
| 927 | ) |
| 928 | |
| 929 | LIBS="$saved_LIBS" |
| 930 | ], |
| 931 | [if test "x$with_libunwind" != xcheck; then |
| 932 | AC_MSG_FAILURE([failed to find libunwind]) |
| 933 | fi |
| 934 | ], |
| 935 | [$libunwind_LIBS] |
| 936 | ) |
| 937 | |
| 938 | LDFLAGS="$saved_LDFLAGS" |
| 939 | ], |
| 940 | [if test "x$with_libunwind" != xcheck; then |
| 941 | AC_MSG_FAILURE([failed to find libunwind-ptrace.h]) |
| 942 | fi |
| 943 | ] |
| 944 | ) |
| 945 | |
| 946 | CPPFLAGS="$saved_CPPFLAGS" |
| 947 | ] |
| 948 | ) |
| 949 | |
| 950 | dnl enable libunwind |
| 951 | AC_MSG_CHECKING([whether to enable stack tracing support using libunwind]) |
| 952 | if test "x$use_libunwind" = xyes; then |
| 953 | AC_DEFINE([USE_LIBUNWIND], 1, [Compile stack tracing functionality]) |
| 954 | AC_SUBST(libunwind_LIBS) |
| 955 | AC_SUBST(libunwind_LDFLAGS) |
| 956 | AC_SUBST(libunwind_CPPFLAGS) |
| 957 | fi |
| 958 | AM_CONDITIONAL([USE_LIBUNWIND], [test "x$use_libunwind" = xyes]) |
| 959 | AC_MSG_RESULT([$use_libunwind]) |
| 960 | |
Dmitry V. Levin | d59287d | 2015-01-13 04:57:27 +0000 | [diff] [blame] | 961 | if test "$arch" = mips && test "$no_create" != yes; then |
| 962 | mkdir -p linux/mips |
| 963 | if $srcdir/linux/mips/genstub.sh linux/mips; then |
| 964 | AC_MSG_RESULT([Generated MIPS syscallent stubs]) |
| 965 | else |
| 966 | AC_MSG_FAILURE([Failed to generate syscallent stubs]) |
| 967 | fi |
| 968 | fi |
| 969 | |
Dmitry V. Levin | f8b4913 | 2015-07-23 11:19:47 +0000 | [diff] [blame] | 970 | st_MPERS([m32], [aarch64|powerpc64|sparc64|tile|x32|x86_64]) |
| 971 | st_MPERS([mx32], [x86_64]) |
Dmitry V. Levin | 679c47c | 2015-01-23 22:45:02 +0000 | [diff] [blame] | 972 | |
| 973 | AC_CONFIG_FILES([Makefile tests/Makefile tests-m32/Makefile tests-mx32/Makefile]) |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 974 | AC_OUTPUT |