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 | 2afa76e | 2016-06-08 00:32:22 +0000 | [diff] [blame] | 39 | AM_INIT_AUTOMAKE([foreign nostdinc dist-xz 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 | |
Dmitry V. Levin | 669efd8 | 2016-06-08 00:32:09 +0000 | [diff] [blame] | 43 | RPM_CHANGELOGTIME="$(LC_TIME=C date '+%a %b %d %Y')" |
| 44 | AC_SUBST(RPM_CHANGELOGTIME) |
| 45 | DEB_CHANGELOGTIME="$(LC_TIME=C date -R)" |
| 46 | AC_SUBST(DEB_CHANGELOGTIME) |
Dmitry V. Levin | e2b3df2 | 2016-06-07 18:04:53 +0000 | [diff] [blame] | 47 | |
H.J. Lu | 35be581 | 2012-04-16 13:00:01 +0200 | [diff] [blame] | 48 | AC_PROG_CC |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 49 | AC_PROG_CPP |
Mike Frysinger | 58c7fe9 | 2015-02-26 22:22:36 -0500 | [diff] [blame] | 50 | AX_PROG_CC_FOR_BUILD |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 51 | AC_PROG_INSTALL |
Elvira Khabirova | 0929422 | 2015-08-04 01:47:02 +0300 | [diff] [blame] | 52 | AC_PROG_RANLIB |
H.J. Lu | 35be581 | 2012-04-16 13:00:01 +0200 | [diff] [blame] | 53 | |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 54 | AC_USE_SYSTEM_EXTENSIONS |
Gabriel Laskar | cba6710 | 2016-02-01 18:15:39 +0100 | [diff] [blame] | 55 | AX_CODE_COVERAGE |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 56 | |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 57 | AC_MSG_CHECKING([for supported architecture]) |
Dmitry V. Levin | 1e04e57 | 2015-12-08 00:13:38 +0000 | [diff] [blame] | 58 | arch_m32= |
| 59 | arch_mx32= |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 60 | case "$host_cpu" in |
Dmitry V. Levin | 87ea1f4 | 2008-11-10 22:21:41 +0000 | [diff] [blame] | 61 | bfin) |
| 62 | arch=bfin |
| 63 | AC_DEFINE([BFIN], 1, [Define for the Blackfin architecture.]) |
| 64 | ;; |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 65 | i[[3456]]86|pentium) |
| 66 | arch=i386 |
| 67 | AC_DEFINE([I386], 1, [Define for the i386 architecture.]) |
| 68 | ;; |
| 69 | ia64) |
| 70 | arch=ia64 |
| 71 | AC_DEFINE([IA64], 1, [Define for the IA64 architecture.]) |
| 72 | ;; |
| 73 | m68k) |
| 74 | arch=m68k |
| 75 | AC_DEFINE([M68K], 1, [Define for the m68k architecture.]) |
| 76 | ;; |
Roland McGrath | 6d1a65c | 2004-07-12 07:44:08 +0000 | [diff] [blame] | 77 | sparc64*) |
| 78 | arch=sparc64 |
Dmitry V. Levin | 1e04e57 | 2015-12-08 00:13:38 +0000 | [diff] [blame] | 79 | arch_m32=sparc |
Roland McGrath | 6d1a65c | 2004-07-12 07:44:08 +0000 | [diff] [blame] | 80 | AC_DEFINE([SPARC64], 1, [Define for the SPARC64 architecture.]) |
| 81 | ;; |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 82 | sparc*) |
| 83 | arch=sparc |
| 84 | AC_DEFINE([SPARC], 1, [Define for the SPARC architecture.]) |
| 85 | ;; |
James Hogan | 5f999a8 | 2013-02-22 14:44:10 +0000 | [diff] [blame] | 86 | metag*) |
| 87 | arch=metag |
| 88 | AC_DEFINE([METAG], 1, [Define for the Meta architecture.]) |
| 89 | ;; |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 90 | mips*) |
| 91 | arch=mips |
| 92 | AC_DEFINE([MIPS], 1, [Define for the MIPS architecture.]) |
| 93 | ;; |
| 94 | alpha*) |
| 95 | arch=alpha |
| 96 | AC_DEFINE([ALPHA], 1, [Define for the Alpha architecture.]) |
| 97 | ;; |
Roland McGrath | eb28535 | 2003-01-14 09:59:00 +0000 | [diff] [blame] | 98 | powerpc*) |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 99 | AC_DEFINE([POWERPC], 1, [Define for the PowerPC architecture.]) |
Anton Blanchard | 9afc2ee | 2013-07-11 12:03:57 +1000 | [diff] [blame] | 100 | AC_TRY_COMPILE( |
| 101 | [#ifndef __LP64__ |
| 102 | # error 32 bit |
Dmitry V. Levin | af3ab5b | 2015-01-21 17:04:31 +0000 | [diff] [blame] | 103 | #endif], [], arch=powerpc64, arch=powerpc) |
| 104 | if test "$arch" = "powerpc64"; then |
Dmitry V. Levin | 1e04e57 | 2015-12-08 00:13:38 +0000 | [diff] [blame] | 105 | arch_m32=powerpc |
Andreas Schwab | d69fa49 | 2010-07-12 21:39:57 +0200 | [diff] [blame] | 106 | AC_DEFINE([POWERPC64], 1, [Define for the PowerPC64 architecture.]) |
| 107 | fi |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 108 | ;; |
| 109 | arm*) |
| 110 | arch=arm |
| 111 | AC_DEFINE([ARM], 1, [Define for the ARM architecture.]) |
| 112 | ;; |
Steve McIntyre | d8d3bd3 | 2012-10-24 17:58:16 +0100 | [diff] [blame] | 113 | aarch64*) |
| 114 | arch=aarch64 |
Dmitry V. Levin | 1e04e57 | 2015-12-08 00:13:38 +0000 | [diff] [blame] | 115 | arch_m32=arm |
Steve McIntyre | d8d3bd3 | 2012-10-24 17:58:16 +0100 | [diff] [blame] | 116 | AC_DEFINE([AARCH64], 1, [Define for the AArch64 architecture.]) |
| 117 | ;; |
Denys Vlasenko | 5ae2b7c | 2009-02-27 20:32:52 +0000 | [diff] [blame] | 118 | avr32*) |
| 119 | arch=avr32 |
| 120 | AC_DEFINE([AVR32], 1, [Define for the AVR32 architecture.]) |
| 121 | ;; |
Vineet Gupta | 7daacbb | 2013-08-16 12:47:06 +0530 | [diff] [blame] | 122 | arc*) |
| 123 | arch=arc |
| 124 | AC_DEFINE([ARC], 1, [Define for the ARC architecture.]) |
| 125 | ;; |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 126 | s390) |
| 127 | arch=s390 |
| 128 | AC_DEFINE([S390], 1, [Define for the S390 architecture.]) |
| 129 | ;; |
| 130 | s390x) |
| 131 | arch=s390x |
| 132 | AC_DEFINE([S390X], 1, [Define for the S390x architecture.]) |
| 133 | ;; |
| 134 | hppa*|parisc*) |
| 135 | arch=hppa |
| 136 | AC_DEFINE([HPPA], 1, [Define for the HPPA architecture.]) |
| 137 | ;; |
Roland McGrath | 67828ca | 2007-11-01 21:32:49 +0000 | [diff] [blame] | 138 | sh64*) |
Roland McGrath | f5a4777 | 2003-06-26 22:40:42 +0000 | [diff] [blame] | 139 | arch=sh64 |
| 140 | AC_DEFINE([SH64], 1, [Define for the SH64 architecture.]) |
Roland McGrath | e1e584b | 2003-06-02 19:18:58 +0000 | [diff] [blame] | 141 | ;; |
Roland McGrath | 67828ca | 2007-11-01 21:32:49 +0000 | [diff] [blame] | 142 | sh*) |
| 143 | arch=sh |
| 144 | AC_DEFINE([SH], 1, [Define for the SH architecture.]) |
| 145 | ;; |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 146 | x86?64*) |
Dmitry V. Levin | 1e04e57 | 2015-12-08 00:13:38 +0000 | [diff] [blame] | 147 | arch_m32=i386 |
H.J. Lu | 35be581 | 2012-04-16 13:00:01 +0200 | [diff] [blame] | 148 | AC_TRY_COMPILE( |
| 149 | [#ifndef __ILP32__ |
| 150 | # error not x32 |
| 151 | #endif], [], arch=x32, arch=x86_64) |
| 152 | if test "$arch" = "x86_64"; then |
Dmitry V. Levin | 1e04e57 | 2015-12-08 00:13:38 +0000 | [diff] [blame] | 153 | arch_mx32=x32 |
H.J. Lu | 35be581 | 2012-04-16 13:00:01 +0200 | [diff] [blame] | 154 | AC_DEFINE([X86_64], 1, [Define for the 64bit AMD x86-64 architecture.]) |
| 155 | else |
| 156 | AC_DEFINE([X32], 1, [Define for the 32bit AMD x86-64 architecture.]) |
| 157 | fi |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 158 | ;; |
Denys Vlasenko | ea0e6e8 | 2009-02-25 17:08:40 +0000 | [diff] [blame] | 159 | cris|crisv10) |
| 160 | arch=crisv10 |
| 161 | AC_DEFINE([CRISV10], 1, [Define for the CRISv10 architecture.]) |
| 162 | ;; |
| 163 | crisv32) |
| 164 | arch=crisv32 |
| 165 | AC_DEFINE([CRISV32], 1, [Define for the CRISv32 architecture.]) |
| 166 | ;; |
Chris Metcalf | c8c6698 | 2009-12-28 10:00:15 -0500 | [diff] [blame] | 167 | tile*) |
| 168 | arch=tile |
| 169 | AC_DEFINE([TILE], 1, [Define for the Tile architecture]) |
| 170 | ;; |
Edgar E. Iglesias | 939caba | 2010-07-06 14:21:07 +0200 | [diff] [blame] | 171 | microblaze*) |
| 172 | arch=microblaze |
| 173 | AC_DEFINE([MICROBLAZE], 1, [Define for the MicroBlaze architecture.]) |
| 174 | ;; |
Ezequiel Garcia | bd8dd77 | 2015-04-18 17:33:27 -0300 | [diff] [blame] | 175 | nios2*) |
| 176 | arch=nios2 |
| 177 | AC_DEFINE([NIOS2], 1, [Define for the Nios-II architecture.]) |
| 178 | ;; |
| 179 | |
Christian Svensson | 492f81f | 2013-02-14 13:26:27 +0100 | [diff] [blame] | 180 | or1k*) |
| 181 | arch=or1k |
| 182 | AC_DEFINE([OR1K], 1, [Define for the OpenRISC 1000 architecture.]) |
| 183 | ;; |
| 184 | |
Chris Zankel | 8f636ed | 2013-03-25 10:22:07 -0700 | [diff] [blame] | 185 | xtensa*) |
| 186 | arch=xtensa |
| 187 | AC_DEFINE([XTENSA], 1, [Define for the Xtensa architecture]) |
| 188 | ;; |
| 189 | |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 190 | *) |
| 191 | AC_MSG_RESULT([NO!]) |
| 192 | AC_MSG_ERROR([architecture $host_cpu is not supported by strace]) |
| 193 | ;; |
| 194 | esac |
| 195 | AC_MSG_RESULT($arch) |
| 196 | |
Dmitry V. Levin | 1e04e57 | 2015-12-08 00:13:38 +0000 | [diff] [blame] | 197 | test -n "$arch_m32" || |
| 198 | arch_m32=$arch |
| 199 | test -n "$arch_mx32" || |
| 200 | arch_mx32=$arch |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 201 | AC_SUBST(arch) |
Dmitry V. Levin | 1e04e57 | 2015-12-08 00:13:38 +0000 | [diff] [blame] | 202 | AC_SUBST(arch_m32) |
| 203 | AC_SUBST(arch_mx32) |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 204 | |
Dmitry V. Levin | 047365e | 2015-02-15 01:08:48 +0000 | [diff] [blame] | 205 | if test "$arch" = mips; then |
Dmitry V. Levin | 6684b68 | 2015-08-18 22:53:22 +0000 | [diff] [blame] | 206 | AC_CACHE_CHECK([for _MIPS_SIM], [st_cv__MIPS_SIM], |
| 207 | [AC_COMPUTE_INT([st_cv__MIPS_SIM], [_MIPS_SIM], |
| 208 | [#include <sgidefs.h>], |
| 209 | [AC_MSG_ERROR([_MIPS_SIM cannot be determined])])]) |
| 210 | |
| 211 | AC_CACHE_CHECK([for MIPS ABI], [st_cv_mips_abi], |
Dmitry V. Levin | 047365e | 2015-02-15 01:08:48 +0000 | [diff] [blame] | 212 | [AC_COMPILE_IFELSE( |
| 213 | [AC_LANG_PROGRAM([[#include <sgidefs.h>]], |
| 214 | [[int i[_MIPS_SIM == _MIPS_SIM_ABI32 ? 1 : - 1];]])], |
Dmitry V. Levin | 6684b68 | 2015-08-18 22:53:22 +0000 | [diff] [blame] | 215 | [st_cv_mips_abi=o32], |
Dmitry V. Levin | 047365e | 2015-02-15 01:08:48 +0000 | [diff] [blame] | 216 | [AC_COMPILE_IFELSE( |
| 217 | [AC_LANG_PROGRAM([[#include <sgidefs.h>]], |
| 218 | [[int i[_MIPS_SIM == _MIPS_SIM_NABI32 ? 1 : - 1];]])], |
Dmitry V. Levin | 6684b68 | 2015-08-18 22:53:22 +0000 | [diff] [blame] | 219 | [st_cv_mips_abi=n32], |
Dmitry V. Levin | 047365e | 2015-02-15 01:08:48 +0000 | [diff] [blame] | 220 | [AC_COMPILE_IFELSE( |
| 221 | [AC_LANG_PROGRAM([[#include <sgidefs.h>]], |
| 222 | [[int i[_MIPS_SIM == _MIPS_SIM_ABI64 ? 1 : - 1];]])], |
Dmitry V. Levin | 6684b68 | 2015-08-18 22:53:22 +0000 | [diff] [blame] | 223 | [st_cv_mips_abi=n64], |
| 224 | [st_cv_mips_abi=unknown])])])]) |
| 225 | |
| 226 | case "$st_cv_mips_abi" in |
Dmitry V. Levin | 047365e | 2015-02-15 01:08:48 +0000 | [diff] [blame] | 227 | o32) AC_DEFINE([LINUX_MIPSO32], [1], [Define for _MIPS_SIM_ABI32.]);; |
| 228 | n32) AC_DEFINE([LINUX_MIPSN32], [1], [Define for _MIPS_SIM_NABI32.]);; |
| 229 | n64) AC_DEFINE([LINUX_MIPSN64], [1], [Define for _MIPS_SIM_ABI64.]);; |
| 230 | *) AC_MSG_ERROR([Unsupported _MIPS_SIM]);; |
| 231 | esac |
| 232 | fi |
| 233 | |
Dmitry V. Levin | 0160e16 | 2014-03-18 23:37:43 +0000 | [diff] [blame] | 234 | AC_ARG_ENABLE([arm-oabi], |
| 235 | [AS_HELP_STRING([--enable-arm-oabi], |
| 236 | [enable OABI support on ARM EABI])], |
| 237 | [], [enable_arm_oabi=no]) |
| 238 | case "$enable_arm_oabi" in |
| 239 | yes) enable_arm_oabi=1 ;; |
| 240 | no) enable_arm_oabi=0 ;; |
| 241 | *) AC_MSG_ERROR([bad value $enable_arm_oabi for arm-oabi option]) ;; |
| 242 | esac |
| 243 | AC_DEFINE_UNQUOTED([ENABLE_ARM_OABI], [$enable_arm_oabi], |
| 244 | [Define to 1 if you want OABI support on ARM EABI.]) |
| 245 | |
Dmitry V. Levin | 918e49b | 2010-09-09 17:41:15 +0000 | [diff] [blame] | 246 | gl_WARN_ADD([-Wall]) |
Elvira Khabirova | dc427d5 | 2016-06-13 01:41:02 +0300 | [diff] [blame] | 247 | gl_WARN_ADD([-Wempty-body]) |
| 248 | gl_WARN_ADD([-Wformat-security]) |
| 249 | gl_WARN_ADD([-Wignored-qualifiers]) |
| 250 | gl_WARN_ADD([-Winit-self]) |
| 251 | gl_WARN_ADD([-Wlogical-op]) |
| 252 | gl_WARN_ADD([-Wmissing-parameter-type]) |
| 253 | gl_WARN_ADD([-Wnested-externs]) |
| 254 | gl_WARN_ADD([-Wold-style-declaration]) |
| 255 | gl_WARN_ADD([-Wold-style-definition]) |
Dmitry V. Levin | 3ed5d02 | 2014-09-10 13:46:04 +0000 | [diff] [blame] | 256 | gl_WARN_ADD([-Wsign-compare]) |
Elvira Khabirova | dc427d5 | 2016-06-13 01:41:02 +0300 | [diff] [blame] | 257 | gl_WARN_ADD([-Wtype-limits]) |
| 258 | gl_WARN_ADD([-Wwrite-strings]) |
Dmitry V. Levin | d376c92 | 2012-05-15 00:50:26 +0000 | [diff] [blame] | 259 | AC_ARG_ENABLE([gcc-Werror], |
| 260 | [AS_HELP_STRING([--enable-gcc-Werror], [turn on gcc's -Werror option])], |
| 261 | [case $enableval in |
| 262 | yes) gl_WARN_ADD([-Werror]) ;; |
| 263 | no) ;; |
| 264 | *) AC_MSG_ERROR([bad value $enableval for gcc-Werror option]) ;; |
| 265 | esac] |
| 266 | ) |
Dmitry V. Levin | 918e49b | 2010-09-09 17:41:15 +0000 | [diff] [blame] | 267 | AC_SUBST([WARN_CFLAGS]) |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 268 | |
Mike Frysinger | 6d12afd | 2010-09-12 03:39:55 -0400 | [diff] [blame] | 269 | AC_C_BIGENDIAN |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 270 | AC_C_CONST |
Dmitry V. Levin | 2165a35 | 2016-01-12 00:02:56 +0000 | [diff] [blame] | 271 | AC_C_TYPEOF |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 272 | |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 273 | AC_TYPE_GETGROUPS |
| 274 | AC_TYPE_MODE_T |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 275 | AC_TYPE_SIGNAL |
| 276 | AC_TYPE_UID_T |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 277 | |
| 278 | AC_HEADER_DIRENT |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 279 | AC_HEADER_MAJOR |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 280 | AC_HEADER_STAT |
| 281 | AC_HEADER_STDBOOL |
| 282 | AC_HEADER_STDC |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 283 | |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 284 | AC_CHECK_FUNCS(m4_normalize([ |
Dmitry V. Levin | 891855e | 2016-07-11 17:21:22 +0000 | [diff] [blame] | 285 | accept4 |
Dmitry V. Levin | 1ea6473 | 2015-01-10 00:08:58 +0000 | [diff] [blame] | 286 | fanotify_mark |
Dmitry V. Levin | d354130 | 2014-02-26 00:01:00 +0000 | [diff] [blame] | 287 | fopen64 |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 288 | fork |
Dmitry V. Levin | d354130 | 2014-02-26 00:01:00 +0000 | [diff] [blame] | 289 | fputs_unlocked |
Dmitry V. Levin | b0e6115 | 2015-12-02 01:02:39 +0000 | [diff] [blame] | 290 | fstatat |
| 291 | ftruncate |
| 292 | futimens |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 293 | if_indextoname |
Dmitry V. Levin | bf2698a | 2016-07-03 22:15:45 +0000 | [diff] [blame] | 294 | open64 |
Dmitry V. Levin | 78ed3f3 | 2015-03-23 00:04:27 +0000 | [diff] [blame] | 295 | pipe2 |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 296 | prctl |
Mike Frysinger | 97ca027 | 2014-08-11 02:52:08 -0400 | [diff] [blame] | 297 | preadv |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 298 | process_vm_readv |
Mike Frysinger | 97ca027 | 2014-08-11 02:52:08 -0400 | [diff] [blame] | 299 | pwritev |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 300 | sigaction |
Dmitry V. Levin | 30ac062 | 2015-08-03 09:47:25 +0000 | [diff] [blame] | 301 | signalfd |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 302 | stpcpy |
| 303 | strerror |
| 304 | strsignal |
Dmitry V. Levin | 5b2d257 | 2016-04-06 00:02:08 +0000 | [diff] [blame] | 305 | sync_file_range |
Dmitry V. Levin | 78e48eb | 2015-07-15 15:34:59 +0000 | [diff] [blame] | 306 | utimensat |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 307 | ])) |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 308 | |
| 309 | AC_CHECK_TYPES([sig_atomic_t, struct sigcontext],,, [#include <signal.h>]) |
| 310 | |
| 311 | AC_CHECK_TYPES([struct mmsghdr],,, [#include <sys/socket.h>]) |
| 312 | |
| 313 | AC_CHECK_TYPES([__kernel_long_t, __kernel_ulong_t],,, |
| 314 | [#include <asm/posix_types.h>]) |
| 315 | |
| 316 | AC_CHECK_TYPES([struct stat64, struct __old_kernel_stat],,, |
| 317 | [#include <sys/types.h> |
| 318 | #include <asm/stat.h>]) |
| 319 | |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 320 | AC_CHECK_TYPES(m4_normalize([ |
| 321 | struct pt_all_user_regs, |
| 322 | struct ia64_fpreg, |
| 323 | struct ptrace_peeksiginfo_args |
| 324 | ]),,, [#include <sys/ptrace.h>]) |
| 325 | |
| 326 | AC_CHECK_TYPES(m4_normalize([ |
| 327 | struct flock, |
| 328 | struct flock64, |
| 329 | struct __kernel_flock, |
| 330 | struct __kernel_flock64 |
| 331 | ]),,, |
| 332 | [#include <sys/types.h> |
| 333 | #include <linux/fcntl.h>]) |
| 334 | |
| 335 | AC_CHECK_MEMBERS(m4_normalize([ |
| 336 | struct stat.st_atim.tv_nsec, |
| 337 | struct stat.st_blksize, |
| 338 | struct stat.st_blocks, |
| 339 | struct stat.st_ctim.tv_nsec, |
| 340 | struct stat.st_flags, |
| 341 | struct stat.st_fstype, |
| 342 | struct stat.st_gen, |
| 343 | struct stat.st_mtim.tv_nsec, |
| 344 | struct stat.st_rdev |
| 345 | ])) |
| 346 | |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 347 | AC_CHECK_MEMBERS([struct timex.tai],,, [#include <sys/timex.h>]) |
| 348 | |
| 349 | AC_CHECK_MEMBERS([struct utsname.domainname],,, [#include <sys/utsname.h>]) |
| 350 | |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 351 | AC_CHECK_MEMBERS(m4_normalize([ |
| 352 | struct stat.st_atime_nsec, |
| 353 | struct stat.st_ctime_nsec, |
| 354 | struct stat.st_mtime_nsec |
| 355 | ]),,, [#include <sys/types.h> |
| 356 | #include <asm/stat.h>]) |
| 357 | |
| 358 | AC_CHECK_MEMBERS(m4_normalize([ |
| 359 | siginfo_t.si_syscall, |
| 360 | siginfo_t.si_timerid, |
| 361 | siginfo_t.si_overrun |
| 362 | ]),,, [#include <signal.h>]) |
| 363 | |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 364 | AC_CHECK_HEADERS(m4_normalize([ |
| 365 | asm/cachectl.h |
| 366 | asm/sysmips.h |
Lubomir Rintel | c400a1c | 2014-10-03 11:40:28 +0200 | [diff] [blame] | 367 | bluetooth/bluetooth.h |
Dmitry V. Levin | c41808b | 2013-03-18 00:52:29 +0000 | [diff] [blame] | 368 | elf.h |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 369 | inttypes.h |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 370 | linux/bsg.h |
Dmitry V. Levin | 52572b6 | 2014-12-11 19:21:54 +0000 | [diff] [blame] | 371 | linux/falloc.h |
Dmitry V. Levin | c525307 | 2016-05-24 00:19:17 +0000 | [diff] [blame] | 372 | linux/fiemap.h |
Dmitry V. Levin | 2af6903 | 2015-02-04 23:50:50 +0000 | [diff] [blame] | 373 | linux/filter.h |
Dmitry V. Levin | df7aa2b | 2015-01-19 17:02:16 +0000 | [diff] [blame] | 374 | linux/hiddev.h |
Mike Frysinger | 54646b8 | 2015-08-19 13:29:27 -0400 | [diff] [blame] | 375 | linux/ip_vs.h |
Mike Frysinger | ba10a42 | 2015-10-31 00:47:53 -0400 | [diff] [blame] | 376 | linux/ipc.h |
Dmitry V. Levin | df7aa2b | 2015-01-19 17:02:16 +0000 | [diff] [blame] | 377 | linux/mmtimer.h |
Mike Frysinger | ba10a42 | 2015-10-31 00:47:53 -0400 | [diff] [blame] | 378 | linux/msg.h |
Ben Noordhuis | 88eafd8 | 2013-02-04 00:04:57 +0100 | [diff] [blame] | 379 | linux/perf_event.h |
Dmitry V. Levin | 2af6903 | 2015-02-04 23:50:50 +0000 | [diff] [blame] | 380 | linux/seccomp.h |
Dmitry V. Levin | 1e88073 | 2015-02-14 01:51:03 +0000 | [diff] [blame] | 381 | linux/securebits.h |
Mike Frysinger | ba10a42 | 2015-10-31 00:47:53 -0400 | [diff] [blame] | 382 | linux/sem.h |
| 383 | linux/shm.h |
Dr. David Alan Gilbert | 5d1216a | 2016-05-10 11:49:02 +0100 | [diff] [blame] | 384 | linux/userfaultfd.h |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 385 | linux/utsname.h |
| 386 | mqueue.h |
| 387 | netinet/sctp.h |
Dmitry V. Levin | ebda41a | 2016-06-19 22:02:45 +0000 | [diff] [blame] | 388 | netipx/ipx.h |
Dmitry V. Levin | fdb896e | 2014-02-25 23:04:55 +0000 | [diff] [blame] | 389 | scsi/sg.h |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 390 | stropts.h |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 391 | sys/conf.h |
Dmitry V. Levin | c8cba99 | 2015-08-01 21:08:13 +0000 | [diff] [blame] | 392 | sys/eventfd.h |
Dmitry V. Levin | 1ea6473 | 2015-01-10 00:08:58 +0000 | [diff] [blame] | 393 | sys/fanotify.h |
Mike Frysinger | ba10a42 | 2015-10-31 00:47:53 -0400 | [diff] [blame] | 394 | sys/ipc.h |
| 395 | sys/msg.h |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 396 | sys/reg.h |
Mike Frysinger | ba10a42 | 2015-10-31 00:47:53 -0400 | [diff] [blame] | 397 | sys/sem.h |
| 398 | sys/shm.h |
Dmitry V. Levin | 30ac062 | 2015-08-03 09:47:25 +0000 | [diff] [blame] | 399 | sys/signalfd.h |
Masatake YAMATO | f548067 | 2014-11-22 19:03:33 +0900 | [diff] [blame] | 400 | sys/xattr.h |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 401 | ])) |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 402 | |
| 403 | AC_CHECK_HEADERS([asm/sigcontext.h],,, [#include <signal.h>]) |
| 404 | |
| 405 | AC_CHECK_HEADERS([netinet/tcp.h netinet/udp.h],,, [#include <netinet/in.h>]) |
| 406 | |
Mike Frysinger | ba10a42 | 2015-10-31 00:47:53 -0400 | [diff] [blame] | 407 | AC_CHECK_HEADERS([linux/mqueue.h],,, [#include <linux/types.h>]) |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 408 | |
Mike Frysinger | 54646b8 | 2015-08-19 13:29:27 -0400 | [diff] [blame] | 409 | AC_CHECK_HEADERS(m4_normalize([ |
| 410 | linux/netfilter_arp/arp_tables.h |
| 411 | linux/netfilter_bridge/ebtables.h |
| 412 | linux/netfilter_ipv4/ip_tables.h |
| 413 | linux/netfilter_ipv6/ip6_tables.h |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 414 | ]),,, [#include <netinet/in.h> |
Mike Frysinger | 54646b8 | 2015-08-19 13:29:27 -0400 | [diff] [blame] | 415 | #include <net/if.h>]) |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 416 | |
Dmitry V. Levin | 19dadf9 | 2015-02-22 02:50:33 +0300 | [diff] [blame] | 417 | AC_CHECK_HEADERS([linux/input.h], [ |
| 418 | AC_CHECK_MEMBERS([struct input_absinfo.resolution],,, [#include <linux/input.h>]) |
| 419 | ]) |
| 420 | |
Dmitry V. Levin | 4e3ded3 | 2015-07-29 16:27:16 +0000 | [diff] [blame] | 421 | AC_CHECK_HEADERS([linux/bpf.h], [ |
| 422 | AC_CACHE_CHECK([whether union bpf_attr.log_buf initialization works], |
| 423 | [st_cv_have_union_bpf_attr_log_buf], |
| 424 | [AC_COMPILE_IFELSE( |
| 425 | [AC_LANG_PROGRAM([[#include <linux/bpf.h>]], |
| 426 | [[union bpf_attr a = { .log_buf = 0 };]])], |
| 427 | [st_cv_have_union_bpf_attr_log_buf=yes], |
| 428 | [st_cv_have_union_bpf_attr_log_buf=no])]) |
| 429 | if test $st_cv_have_union_bpf_attr_log_buf = yes; then |
| 430 | AC_DEFINE(HAVE_UNION_BPF_ATTR_LOG_BUF, [1], |
| 431 | [Define to 1 if union bpf_attr.log_buf initialization works]) |
| 432 | fi |
| 433 | ]) |
| 434 | |
Dmitry V. Levin | 67c2f67 | 2016-04-26 00:21:26 +0000 | [diff] [blame] | 435 | AC_CHECK_TYPES([struct statfs], [ |
| 436 | AC_CHECK_MEMBERS([struct statfs.f_frsize],,, [#include <linux/types.h> |
| 437 | #include <asm/statfs.h>]) |
| 438 | AC_CHECK_MEMBERS([struct statfs.f_flags],,, [#include <linux/types.h> |
| 439 | #include <asm/statfs.h>]) |
| 440 | AC_CHECK_MEMBERS([struct statfs.f_fsid.val],,, [#include <linux/types.h> |
| 441 | #include <asm/statfs.h>]) |
| 442 | AC_CHECK_MEMBERS([struct statfs.f_fsid.__val],,, [#include <linux/types.h> |
| 443 | #include <asm/statfs.h>]) |
| 444 | ],, [#include <linux/types.h> |
| 445 | #include <asm/statfs.h>]) |
| 446 | |
| 447 | AC_CHECK_TYPES([struct statfs64], [ |
| 448 | AC_CHECK_MEMBERS([struct statfs64.f_frsize],,, [#include <linux/types.h> |
| 449 | #include <asm/statfs.h>]) |
| 450 | AC_CHECK_MEMBERS([struct statfs64.f_flags],,, [#include <linux/types.h> |
| 451 | #include <asm/statfs.h>]) |
| 452 | AC_CHECK_MEMBERS([struct statfs64.f_fsid.val],,, [#include <linux/types.h> |
| 453 | #include <asm/statfs.h>]) |
| 454 | AC_CHECK_MEMBERS([struct statfs64.f_fsid.__val],,, [#include <linux/types.h> |
| 455 | #include <asm/statfs.h>]) |
| 456 | ],, [#include <linux/types.h> |
| 457 | #include <asm/statfs.h>]) |
| 458 | |
Dmitry V. Levin | 799b22a | 2016-05-26 12:55:41 +0000 | [diff] [blame] | 459 | AC_CHECK_TYPES([struct blk_user_trace_setup],,, [#include <linux/blktrace_api.h>]) |
| 460 | |
Jeff Mahoney | 8cc6962 | 2016-05-18 18:09:39 -0400 | [diff] [blame] | 461 | AC_CHECK_HEADERS([linux/btrfs.h], [ |
| 462 | AC_CHECK_MEMBERS(m4_normalize([ |
| 463 | struct btrfs_ioctl_feature_flags.compat_flags, |
| 464 | struct btrfs_ioctl_fs_info_args.nodesize, |
Dmitry V. Levin | 7c0e887 | 2016-06-16 23:21:57 +0000 | [diff] [blame] | 465 | struct btrfs_ioctl_defrag_range_args.start, |
Jeff Mahoney | 8cc6962 | 2016-05-18 18:09:39 -0400 | [diff] [blame] | 466 | struct btrfs_ioctl_search_args_v2.buf_size |
| 467 | ]),,, [ #include <stdio.h> |
| 468 | #include <linux/btrfs.h>]) |
| 469 | AC_CHECK_DECLS(m4_normalize([BTRFS_COMPRESS_NONE, BTRFS_COMPRESS_ZLIB, |
| 470 | BTRFS_COMPRESS_LZO]),,,[ #include <stdio.h> |
| 471 | #include <linux/btrfs.h>])]) |
| 472 | |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 473 | AC_CHECK_DECLS([sys_errlist]) |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 474 | AC_CHECK_DECLS(m4_normalize([ |
Dmitry V. Levin | 6974bd4 | 2013-11-12 21:20:50 +0000 | [diff] [blame] | 475 | PTRACE_PEEKUSER, |
Dmitry V. Levin | fadf379 | 2015-02-13 00:26:38 +0000 | [diff] [blame] | 476 | PTRACE_POKEUSER |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 477 | ]),,, [#include <sys/ptrace.h>]) |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 478 | |
Dmitry V. Levin | cf050db | 2012-05-02 10:21:49 +0000 | [diff] [blame] | 479 | AC_CHECK_DECLS(m4_normalize([ |
Dmitry V. Levin | d8ad1dd | 2014-04-26 15:22:08 +0000 | [diff] [blame] | 480 | P_PID, |
| 481 | P_PPID, |
| 482 | P_PGID, |
| 483 | P_SID, |
| 484 | P_CID, |
| 485 | P_UID, |
| 486 | P_GID, |
| 487 | P_ALL, |
| 488 | P_LWPID |
| 489 | ]),,, [#include <sys/wait.h>]) |
| 490 | |
| 491 | AC_CHECK_DECLS(m4_normalize([ |
Dmitry V. Levin | baf60d9 | 2014-04-26 14:12:33 +0000 | [diff] [blame] | 492 | LO_FLAGS_READ_ONLY, |
Dmitry V. Levin | cf050db | 2012-05-02 10:21:49 +0000 | [diff] [blame] | 493 | LO_FLAGS_AUTOCLEAR, |
| 494 | LO_FLAGS_PARTSCAN |
| 495 | ]),,, [#include <linux/loop.h>]) |
| 496 | |
Dmitry V. Levin | 6dbbe07 | 2014-04-26 13:54:12 +0000 | [diff] [blame] | 497 | AC_CHECK_DECLS(m4_normalize([ |
Dmitry V. Levin | 6dbbe07 | 2014-04-26 13:54:12 +0000 | [diff] [blame] | 498 | CTL_PROC, |
Dmitry V. Levin | 6dbbe07 | 2014-04-26 13:54:12 +0000 | [diff] [blame] | 499 | CTL_ARLAN, |
| 500 | CTL_S390DBF, |
| 501 | CTL_SUNRPC, |
| 502 | CTL_PM, |
| 503 | CTL_FRV, |
Dmitry V. Levin | 6dbbe07 | 2014-04-26 13:54:12 +0000 | [diff] [blame] | 504 | KERN_PRINTK_RATELIMIT, |
| 505 | KERN_PRINTK_RATELIMIT_BURST, |
| 506 | KERN_PTY, |
| 507 | KERN_NGROUPS_MAX, |
| 508 | KERN_SPARC_SCONS_PWROFF, |
| 509 | KERN_HZ_TIMER, |
| 510 | KERN_UNKNOWN_NMI_PANIC, |
| 511 | KERN_BOOTLOADER_TYPE, |
| 512 | KERN_RANDOMIZE, |
| 513 | KERN_SETUID_DUMPABLE, |
| 514 | KERN_SPIN_RETRY, |
| 515 | KERN_ACPI_VIDEO_FLAGS, |
| 516 | KERN_IA64_UNALIGNED, |
| 517 | KERN_COMPAT_LOG, |
| 518 | KERN_MAX_LOCK_DEPTH, |
| 519 | KERN_NMI_WATCHDOG, |
| 520 | KERN_PANIC_ON_NMI, |
Dmitry V. Levin | 6dbbe07 | 2014-04-26 13:54:12 +0000 | [diff] [blame] | 521 | NET_LLC, |
| 522 | NET_NETFILTER, |
| 523 | NET_DCCP, |
| 524 | NET_IRDA, |
Dmitry V. Levin | 6dbbe07 | 2014-04-26 13:54:12 +0000 | [diff] [blame] | 525 | NET_CORE_DESTROY_DELAY, |
Dmitry V. Levin | 6dbbe07 | 2014-04-26 13:54:12 +0000 | [diff] [blame] | 526 | NET_CORE_BUDGET, |
| 527 | NET_CORE_AEVENT_ETIME, |
| 528 | NET_CORE_AEVENT_RSEQTH, |
| 529 | NET_CORE_WARNINGS, |
Dmitry V. Levin | 6dbbe07 | 2014-04-26 13:54:12 +0000 | [diff] [blame] | 530 | NET_IPV4_IGMP_MAX_MSF, |
| 531 | NET_TCP_NO_METRICS_SAVE, |
| 532 | NET_TCP_DEFAULT_WIN_SCALE, |
| 533 | NET_TCP_MODERATE_RCVBUF, |
| 534 | NET_TCP_TSO_WIN_DIVISOR, |
| 535 | NET_TCP_BIC_BETA, |
| 536 | NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR, |
| 537 | NET_TCP_CONG_CONTROL, |
| 538 | NET_TCP_ABC, |
| 539 | NET_IPV4_IPFRAG_MAX_DIST, |
| 540 | NET_TCP_MTU_PROBING, |
| 541 | NET_TCP_BASE_MSS, |
| 542 | NET_IPV4_TCP_WORKAROUND_SIGNED_WINDOWS, |
| 543 | NET_TCP_DMA_COPYBREAK, |
| 544 | NET_TCP_SLOW_START_AFTER_IDLE, |
| 545 | NET_CIPSOV4_CACHE_ENABLE, |
| 546 | NET_CIPSOV4_CACHE_BUCKET_SIZE, |
| 547 | NET_CIPSOV4_RBM_OPTFMT, |
| 548 | NET_CIPSOV4_RBM_STRICTVALID, |
| 549 | NET_TCP_AVAIL_CONG_CONTROL, |
| 550 | NET_TCP_ALLOWED_CONG_CONTROL, |
| 551 | NET_TCP_MAX_SSTHRESH, |
| 552 | NET_TCP_FRTO_RESPONSE, |
Dmitry V. Levin | 6dbbe07 | 2014-04-26 13:54:12 +0000 | [diff] [blame] | 553 | NET_IPV4_ROUTE_GC_MIN_INTERVAL_MS, |
Dmitry V. Levin | 6dbbe07 | 2014-04-26 13:54:12 +0000 | [diff] [blame] | 554 | NET_IPV4_CONF_FORCE_IGMP_VERSION, |
| 555 | NET_IPV4_CONF_ARP_ANNOUNCE, |
| 556 | NET_IPV4_CONF_ARP_IGNORE, |
| 557 | NET_IPV4_CONF_PROMOTE_SECONDARIES, |
| 558 | NET_IPV4_CONF_ARP_ACCEPT, |
| 559 | NET_IPV4_CONF_ARP_NOTIFY, |
Dmitry V. Levin | 6dbbe07 | 2014-04-26 13:54:12 +0000 | [diff] [blame] | 560 | NET_IPV6_MLD_MAX_MSF, |
Dmitry V. Levin | 6dbbe07 | 2014-04-26 13:54:12 +0000 | [diff] [blame] | 561 | NET_IPV6_ROUTE_GC_MIN_INTERVAL_MS, |
Dmitry V. Levin | 6dbbe07 | 2014-04-26 13:54:12 +0000 | [diff] [blame] | 562 | VM_MAX_MAP_COUNT, |
| 563 | VM_LAPTOP_MODE, |
| 564 | VM_BLOCK_DUMP, |
| 565 | VM_HUGETLB_GROUP, |
| 566 | VM_VFS_CACHE_PRESSURE, |
| 567 | VM_LEGACY_VA_LAYOUT, |
| 568 | VM_SWAP_TOKEN_TIMEOUT |
| 569 | ]),,, |
| 570 | [#include <sys/types.h> |
| 571 | #include <linux/sysctl.h>]) |
| 572 | |
Philippe De Muyter | 0cc9614 | 2014-11-03 21:27:40 +0100 | [diff] [blame] | 573 | AC_CHECK_DECLS(m4_normalize([ |
| 574 | V4L2_FIELD_ANY, |
| 575 | V4L2_FIELD_NONE, |
| 576 | V4L2_FIELD_TOP, |
| 577 | V4L2_FIELD_BOTTOM, |
| 578 | V4L2_FIELD_INTERLACED, |
| 579 | V4L2_FIELD_SEQ_TB, |
| 580 | V4L2_FIELD_SEQ_BT, |
| 581 | V4L2_FIELD_ALTERNATE, |
| 582 | V4L2_FIELD_INTERLACED_TB, |
| 583 | V4L2_FIELD_INTERLACED_BT, |
| 584 | V4L2_BUF_TYPE_VIDEO_CAPTURE, |
| 585 | V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, |
| 586 | V4L2_BUF_TYPE_VIDEO_OUTPUT, |
| 587 | V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, |
| 588 | V4L2_BUF_TYPE_VIDEO_OVERLAY, |
| 589 | V4L2_BUF_TYPE_VBI_CAPTURE, |
| 590 | V4L2_BUF_TYPE_VBI_OUTPUT, |
| 591 | V4L2_BUF_TYPE_SLICED_VBI_CAPTURE, |
| 592 | V4L2_BUF_TYPE_SLICED_VBI_OUTPUT, |
| 593 | V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY, |
| 594 | V4L2_TUNER_RADIO, |
| 595 | V4L2_TUNER_ANALOG_TV, |
| 596 | V4L2_TUNER_DIGITAL_TV, |
| 597 | V4L2_MEMORY_MMAP, |
| 598 | V4L2_MEMORY_USERPTR, |
| 599 | V4L2_MEMORY_OVERLAY, |
| 600 | V4L2_MEMORY_DMABUF, |
| 601 | V4L2_COLORSPACE_SMPTE170M, |
| 602 | V4L2_COLORSPACE_SMPTE240M, |
| 603 | V4L2_COLORSPACE_REC709, |
| 604 | V4L2_COLORSPACE_BT878, |
| 605 | V4L2_COLORSPACE_470_SYSTEM_M, |
| 606 | V4L2_COLORSPACE_470_SYSTEM_BG, |
| 607 | V4L2_COLORSPACE_JPEG, |
| 608 | V4L2_COLORSPACE_SRGB, |
| 609 | V4L2_PRIORITY_UNSET, |
| 610 | V4L2_PRIORITY_BACKGROUND, |
| 611 | V4L2_PRIORITY_INTERACTIVE, |
| 612 | V4L2_PRIORITY_RECORD, |
| 613 | V4L2_FRMSIZE_TYPE_DISCRETE, |
| 614 | V4L2_FRMSIZE_TYPE_CONTINUOUS, |
| 615 | V4L2_FRMSIZE_TYPE_STEPWISE, |
| 616 | V4L2_FRMIVAL_TYPE_DISCRETE, |
| 617 | V4L2_FRMIVAL_TYPE_CONTINUOUS, |
| 618 | V4L2_FRMIVAL_TYPE_STEPWISE, |
| 619 | V4L2_CTRL_TYPE_INTEGER, |
| 620 | V4L2_CTRL_TYPE_BOOLEAN, |
| 621 | V4L2_CTRL_TYPE_MENU, |
| 622 | V4L2_CTRL_TYPE_BUTTON, |
| 623 | V4L2_CTRL_TYPE_INTEGER64, |
| 624 | V4L2_CTRL_TYPE_CTRL_CLASS, |
| 625 | V4L2_CTRL_TYPE_STRING, |
| 626 | V4L2_CTRL_TYPE_BITMASK, |
| 627 | V4L2_CTRL_TYPE_INTEGER_MENU |
Dmitry V. Levin | a8443f8 | 2016-05-14 00:36:27 +0000 | [diff] [blame] | 628 | ]),,, [#include <sys/time.h> |
| 629 | #include <linux/ioctl.h> |
| 630 | #include <linux/types.h> |
| 631 | #include <linux/videodev2.h>]) |
Philippe De Muyter | 0cc9614 | 2014-11-03 21:27:40 +0100 | [diff] [blame] | 632 | |
Dmitry V. Levin | 25caa31 | 2011-08-16 21:36:16 +0000 | [diff] [blame] | 633 | AC_CACHE_CHECK([for BLKGETSIZE64], [ac_cv_have_blkgetsize64], |
| 634 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ |
| 635 | #include <stdlib.h> |
| 636 | #include <linux/fs.h>], [return !BLKGETSIZE64;])], |
| 637 | [ac_cv_have_blkgetsize64=yes], [ac_cv_have_blkgetsize64=no])] |
| 638 | if test $ac_cv_have_blkgetsize64 = yes; then |
| 639 | AC_DEFINE([HAVE_BLKGETSIZE64], [1], [Define to 1 if you have BLKGETSIZE64.]) |
| 640 | fi) |
| 641 | |
Dmitry V. Levin | 63e4f86 | 2012-03-15 20:42:46 +0000 | [diff] [blame] | 642 | AC_CHECK_SIZEOF([long]) |
Dmitry V. Levin | 7a498be | 2013-05-04 19:51:57 +0000 | [diff] [blame] | 643 | AC_CHECK_SIZEOF([long long]) |
Dmitry V. Levin | 54cabef | 2014-03-03 23:09:47 +0000 | [diff] [blame] | 644 | AC_CHECK_SIZEOF([off_t],,[#include <sys/types.h>]) |
Dmitry V. Levin | 8c20d89 | 2015-05-21 16:19:40 +0000 | [diff] [blame] | 645 | 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] | 646 | |
Dmitry V. Levin | 59f63d3 | 2015-03-05 05:03:41 +0000 | [diff] [blame] | 647 | AC_CACHE_CHECK([for SIGRTMIN], [st_cv_SIGRTMIN], |
| 648 | [[st_cv_SIGRTMIN="$(echo SIGRTMIN | |
| 649 | $CPP $CPPFLAGS -P -imacros asm/signal.h - | |
| 650 | grep '^[0-9]')" |
| 651 | test -n "$st_cv_SIGRTMIN" || st_cv_SIGRTMIN=no]]) |
| 652 | if test "x$st_cv_SIGRTMIN" != xno; then |
| 653 | AC_DEFINE_UNQUOTED([ASM_SIGRTMIN], [$st_cv_SIGRTMIN], |
| 654 | [SIGRTMIN defined in <asm/signal.h>]) |
| 655 | fi |
| 656 | AC_CACHE_CHECK([for SA_RESTORER], [st_cv_SA_RESTORER], |
| 657 | [st_cv_SA_RESTORER="$(echo SA_RESTORER | |
Dmitry V. Levin | ab3953b | 2014-02-08 00:15:52 +0000 | [diff] [blame] | 658 | $CPP $CPPFLAGS -P -imacros asm/signal.h - | |
| 659 | grep ^0x)" |
Dmitry V. Levin | 59f63d3 | 2015-03-05 05:03:41 +0000 | [diff] [blame] | 660 | test -n "$st_cv_SA_RESTORER" || st_cv_SA_RESTORER=no]) |
| 661 | if test "x$st_cv_SA_RESTORER" != xno; then |
| 662 | AC_DEFINE_UNQUOTED([ASM_SA_RESTORER], [$st_cv_SA_RESTORER], |
Dmitry V. Levin | ab3953b | 2014-02-08 00:15:52 +0000 | [diff] [blame] | 663 | [SA_RESTORER defined in <asm/signal.h>]) |
| 664 | fi |
| 665 | |
Dmitry V. Levin | 38593e9 | 2014-02-26 16:51:28 +0000 | [diff] [blame] | 666 | AC_CACHE_CHECK([for __builtin_popcount], [st_cv_have___builtin_popcount], |
| 667 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([], [__builtin_popcount(0)])], |
| 668 | [st_cv_have___builtin_popcount=yes], |
| 669 | [st_cv_have___builtin_popcount=no])]) |
| 670 | if test "x$st_cv_have___builtin_popcount" = xyes; then |
| 671 | AC_DEFINE([HAVE___BUILTIN_POPCOUNT], [1], |
| 672 | [Define to 1 if the system provides __builtin_popcount function]) |
| 673 | fi |
| 674 | |
Dmitry V. Levin | 856b759 | 2015-02-27 05:01:25 +0000 | [diff] [blame] | 675 | AC_CHECK_LIB([dl], [dladdr], [dl_LIBS='-ldl'], [dl_LIBS=]) |
Dmitry V. Levin | 977550d | 2015-02-27 04:09:56 +0000 | [diff] [blame] | 676 | if test "x$ac_cv_lib_dl_dladdr" = xyes; then |
| 677 | 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] | 678 | fi |
| 679 | AC_SUBST(dl_LIBS) |
| 680 | |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 681 | AC_PATH_PROG([PERL], [perl]) |
| 682 | |
Luca Clementi | 327064b | 2013-07-23 00:11:35 -0700 | [diff] [blame] | 683 | dnl stack trace with libunwind |
| 684 | libunwind_CPPFLAGS= |
| 685 | libunwind_LDFLAGS= |
| 686 | libunwind_LIBS= |
| 687 | AC_ARG_WITH([libunwind], |
| 688 | [AS_HELP_STRING([--with-libunwind], |
| 689 | [use libunwind to implement stack tracing support])], |
| 690 | [case "${withval}" in |
| 691 | yes|no|check) ;; |
| 692 | *) with_libunwind=yes |
| 693 | libunwind_CPPFLAGS="-I${withval}/include" |
| 694 | libunwind_LDFLAGS="-L${withval}/lib" ;; |
| 695 | esac], |
| 696 | [with_libunwind=check] |
| 697 | ) |
| 698 | |
| 699 | use_libunwind=no |
| 700 | AS_IF([test "x$with_libunwind" != xno], |
| 701 | [saved_CPPFLAGS="$CPPFLAGS" |
| 702 | CPPFLAGS="$CPPFLAGS $libunwind_CPPFLAGS" |
| 703 | |
| 704 | AC_CHECK_HEADERS([libunwind-ptrace.h], |
| 705 | [saved_LDFLAGS="$LDFLAGS" |
| 706 | LDFLAGS="$LDFLAGS $libunwind_LDFLAGS" |
| 707 | |
| 708 | AC_CHECK_LIB([unwind], [backtrace], |
| 709 | [libunwind_LIBS="-lunwind $libunwind_LIBS" |
| 710 | |
| 711 | AC_MSG_CHECKING([for unw_create_addr_space in libunwind-generic]) |
| 712 | saved_LIBS="$LIBS" |
| 713 | LIBS="-lunwind-generic $libunwind_LIBS $LIBS" |
| 714 | |
| 715 | AC_LINK_IFELSE( |
| 716 | [AC_LANG_PROGRAM([[#include <libunwind-ptrace.h>]], |
| 717 | [[return !unw_create_addr_space(0, 0)]]) |
| 718 | ], |
| 719 | [AC_MSG_RESULT([yes]) |
| 720 | libunwind_LIBS="-lunwind-generic $libunwind_LIBS" |
| 721 | |
| 722 | AC_CHECK_LIB([unwind-ptrace], [_UPT_create], |
| 723 | [libunwind_LIBS="-lunwind-ptrace $libunwind_LIBS" |
| 724 | use_libunwind=yes |
| 725 | ], |
| 726 | [if test "x$with_libunwind" != xcheck; then |
| 727 | AC_MSG_FAILURE([failed to find _UPT_create in libunwind-ptrace]) |
| 728 | fi |
| 729 | ], |
| 730 | [$libunwind_LIBS] |
| 731 | ) |
| 732 | ], |
| 733 | [AC_MSG_RESULT([no]) |
| 734 | if test "x$with_libunwind" != xcheck; then |
| 735 | AC_MSG_FAILURE([failed to find unw_create_addr_space in libunwind-generic]) |
| 736 | fi |
| 737 | ] |
| 738 | ) |
| 739 | |
| 740 | LIBS="$saved_LIBS" |
| 741 | ], |
| 742 | [if test "x$with_libunwind" != xcheck; then |
| 743 | AC_MSG_FAILURE([failed to find libunwind]) |
| 744 | fi |
| 745 | ], |
| 746 | [$libunwind_LIBS] |
| 747 | ) |
| 748 | |
| 749 | LDFLAGS="$saved_LDFLAGS" |
| 750 | ], |
| 751 | [if test "x$with_libunwind" != xcheck; then |
| 752 | AC_MSG_FAILURE([failed to find libunwind-ptrace.h]) |
| 753 | fi |
| 754 | ] |
| 755 | ) |
| 756 | |
| 757 | CPPFLAGS="$saved_CPPFLAGS" |
| 758 | ] |
| 759 | ) |
| 760 | |
| 761 | dnl enable libunwind |
| 762 | AC_MSG_CHECKING([whether to enable stack tracing support using libunwind]) |
| 763 | if test "x$use_libunwind" = xyes; then |
| 764 | AC_DEFINE([USE_LIBUNWIND], 1, [Compile stack tracing functionality]) |
| 765 | AC_SUBST(libunwind_LIBS) |
| 766 | AC_SUBST(libunwind_LDFLAGS) |
| 767 | AC_SUBST(libunwind_CPPFLAGS) |
| 768 | fi |
| 769 | AM_CONDITIONAL([USE_LIBUNWIND], [test "x$use_libunwind" = xyes]) |
| 770 | AC_MSG_RESULT([$use_libunwind]) |
| 771 | |
Dmitry V. Levin | d59287d | 2015-01-13 04:57:27 +0000 | [diff] [blame] | 772 | if test "$arch" = mips && test "$no_create" != yes; then |
| 773 | mkdir -p linux/mips |
| 774 | if $srcdir/linux/mips/genstub.sh linux/mips; then |
| 775 | AC_MSG_RESULT([Generated MIPS syscallent stubs]) |
| 776 | else |
| 777 | AC_MSG_FAILURE([Failed to generate syscallent stubs]) |
| 778 | fi |
| 779 | fi |
| 780 | |
Dmitry V. Levin | f8b4913 | 2015-07-23 11:19:47 +0000 | [diff] [blame] | 781 | st_MPERS([m32], [aarch64|powerpc64|sparc64|tile|x32|x86_64]) |
| 782 | st_MPERS([mx32], [x86_64]) |
Dmitry V. Levin | 679c47c | 2015-01-23 22:45:02 +0000 | [diff] [blame] | 783 | |
Dmitry V. Levin | e2b3df2 | 2016-06-07 18:04:53 +0000 | [diff] [blame] | 784 | AC_CONFIG_FILES([Makefile |
| 785 | tests/Makefile |
| 786 | tests-m32/Makefile |
| 787 | tests-mx32/Makefile |
Dmitry V. Levin | 669efd8 | 2016-06-08 00:32:09 +0000 | [diff] [blame] | 788 | strace.spec |
| 789 | debian/changelog]) |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 790 | AC_OUTPUT |