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> |
Elliott Hughes | b755614 | 2018-02-20 17:03:16 -0800 | [diff] [blame] | 8 | # Copyright (c) 2002-2018 The strace developers. |
Dmitry V. Levin | 38a34c9 | 2015-12-17 17:56:48 +0000 | [diff] [blame] | 9 | # All rights reserved. |
| 10 | # |
| 11 | # Redistribution and use in source and binary forms, with or without |
| 12 | # modification, are permitted provided that the following conditions |
| 13 | # are met: |
| 14 | # 1. Redistributions of source code must retain the above copyright |
| 15 | # notice, this list of conditions and the following disclaimer. |
| 16 | # 2. Redistributions in binary form must reproduce the above copyright |
| 17 | # notice, this list of conditions and the following disclaimer in the |
| 18 | # documentation and/or other materials provided with the distribution. |
| 19 | # 3. The name of the author may not be used to endorse or promote products |
| 20 | # derived from this software without specific prior written permission. |
| 21 | # |
| 22 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
| 23 | # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
| 24 | # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
| 25 | # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
| 26 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
| 27 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 28 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 29 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 30 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 31 | # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 32 | |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 33 | AC_PREREQ(2.57) |
Dmitry V. Levin | dce7593 | 2013-04-30 23:52:12 +0000 | [diff] [blame] | 34 | AC_INIT([strace], |
| 35 | m4_esyscmd([./git-version-gen .tarball-version]), |
Elliott Hughes | 28e98bc | 2018-06-14 16:59:04 -0700 | [diff] [blame] | 36 | [strace-devel@lists.strace.io], |
Elliott Hughes | d35df49 | 2017-02-15 15:19:05 -0800 | [diff] [blame] | 37 | [strace], |
| 38 | [https://strace.io]) |
Elliott Hughes | 39bac05 | 2017-05-25 16:56:11 -0700 | [diff] [blame] | 39 | m4_define([copyright_year], m4_esyscmd([./copyright-year-gen .year])) |
Elliott Hughes | 77c3ff8 | 2017-09-08 17:11:00 -0700 | [diff] [blame] | 40 | m4_define([manpage_date], m4_esyscmd([./file-date-gen strace.1.in])) |
Elliott Hughes | dc75b01 | 2017-07-05 13:54:44 -0700 | [diff] [blame] | 41 | AC_COPYRIGHT([Copyright (c) 1999-]copyright_year[ The strace developers.]) |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 42 | AC_CONFIG_SRCDIR([strace.c]) |
Roland McGrath | ffda2d3 | 2009-10-11 16:25:29 -0700 | [diff] [blame] | 43 | AC_CONFIG_AUX_DIR([.]) |
Mike Frysinger | bb3a0f7 | 2013-04-30 22:41:11 -0400 | [diff] [blame] | 44 | AC_CONFIG_HEADERS([config.h]) |
Elliott Hughes | 77c3ff8 | 2017-09-08 17:11:00 -0700 | [diff] [blame] | 45 | AM_INIT_AUTOMAKE([foreign nostdinc dist-xz silent-rules parallel-tests 1.13]) |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 46 | AM_MAINTAINER_MODE |
| 47 | AC_CANONICAL_HOST |
| 48 | |
Elliott Hughes | 03a418e | 2018-06-15 13:11:40 -0700 | [diff] [blame] | 49 | RPM_CHANGELOGTIME="$(LC_TIME=C date -u '+%a %b %d %Y')" |
Dmitry V. Levin | 669efd8 | 2016-06-08 00:32:09 +0000 | [diff] [blame] | 50 | AC_SUBST(RPM_CHANGELOGTIME) |
Elliott Hughes | 03a418e | 2018-06-15 13:11:40 -0700 | [diff] [blame] | 51 | DEB_CHANGELOGTIME="$(LC_TIME=C date -u -R)" |
Dmitry V. Levin | 669efd8 | 2016-06-08 00:32:09 +0000 | [diff] [blame] | 52 | AC_SUBST(DEB_CHANGELOGTIME) |
Dmitry V. Levin | e2b3df2 | 2016-06-07 18:04:53 +0000 | [diff] [blame] | 53 | |
H.J. Lu | 35be581 | 2012-04-16 13:00:01 +0200 | [diff] [blame] | 54 | AC_PROG_CC |
Elliott Hughes | b755614 | 2018-02-20 17:03:16 -0800 | [diff] [blame] | 55 | AC_PROG_CC_STDC |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 56 | AC_PROG_CPP |
Elliott Hughes | d35df49 | 2017-02-15 15:19:05 -0800 | [diff] [blame] | 57 | st_WARN_CFLAGS |
Mike Frysinger | 58c7fe9 | 2015-02-26 22:22:36 -0500 | [diff] [blame] | 58 | AX_PROG_CC_FOR_BUILD |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 59 | AC_PROG_INSTALL |
Elvira Khabirova | 0929422 | 2015-08-04 01:47:02 +0300 | [diff] [blame] | 60 | AC_PROG_RANLIB |
H.J. Lu | 35be581 | 2012-04-16 13:00:01 +0200 | [diff] [blame] | 61 | |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 62 | AC_USE_SYSTEM_EXTENSIONS |
Gabriel Laskar | cba6710 | 2016-02-01 18:15:39 +0100 | [diff] [blame] | 63 | AX_CODE_COVERAGE |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 64 | |
Elliott Hughes | 39bac05 | 2017-05-25 16:56:11 -0700 | [diff] [blame] | 65 | AC_DEFINE([COPYRIGHT_YEAR], "[copyright_year]", [Current copyright year.]) |
| 66 | AC_SUBST([COPYRIGHT_YEAR], [copyright_year]) |
| 67 | |
Elliott Hughes | 77c3ff8 | 2017-09-08 17:11:00 -0700 | [diff] [blame] | 68 | AC_DEFINE([MANPAGE_DATE], "[manpage_date]", [Date]) |
| 69 | AC_SUBST([MANPAGE_DATE], [manpage_date]) |
| 70 | |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 71 | AC_MSG_CHECKING([for supported architecture]) |
Dmitry V. Levin | 1e04e57 | 2015-12-08 00:13:38 +0000 | [diff] [blame] | 72 | arch_m32= |
| 73 | arch_mx32= |
Elliott Hughes | b755614 | 2018-02-20 17:03:16 -0800 | [diff] [blame] | 74 | cc_flags_m32=-m32 |
| 75 | cc_flags_mx32=-mx32 |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 76 | case "$host_cpu" in |
Elliott Hughes | b755614 | 2018-02-20 17:03:16 -0800 | [diff] [blame] | 77 | aarch64*) |
| 78 | arch=aarch64 |
| 79 | arch_m32=arm |
| 80 | AC_DEFINE([AARCH64], 1, [Define for the AArch64 architecture.]) |
| 81 | ;; |
| 82 | alpha*) |
| 83 | arch=alpha |
| 84 | AC_DEFINE([ALPHA], 1, [Define for the Alpha architecture.]) |
| 85 | ;; |
| 86 | arc*) |
| 87 | arch=arc |
| 88 | AC_DEFINE([ARC], 1, [Define for the ARC architecture.]) |
| 89 | ;; |
| 90 | arm*) |
| 91 | arch=arm |
| 92 | AC_DEFINE([ARM], 1, [Define for the ARM architecture.]) |
| 93 | ;; |
| 94 | avr32*) |
| 95 | arch=avr32 |
| 96 | AC_DEFINE([AVR32], 1, [Define for the AVR32 architecture.]) |
| 97 | ;; |
Dmitry V. Levin | 87ea1f4 | 2008-11-10 22:21:41 +0000 | [diff] [blame] | 98 | bfin) |
| 99 | arch=bfin |
| 100 | AC_DEFINE([BFIN], 1, [Define for the Blackfin architecture.]) |
| 101 | ;; |
Elliott Hughes | b755614 | 2018-02-20 17:03:16 -0800 | [diff] [blame] | 102 | hppa*|parisc*) |
| 103 | arch=hppa |
| 104 | AC_DEFINE([HPPA], 1, [Define for the HPPA architecture.]) |
| 105 | ;; |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 106 | i[[3456]]86|pentium) |
| 107 | arch=i386 |
| 108 | AC_DEFINE([I386], 1, [Define for the i386 architecture.]) |
| 109 | ;; |
| 110 | ia64) |
| 111 | arch=ia64 |
| 112 | AC_DEFINE([IA64], 1, [Define for the IA64 architecture.]) |
| 113 | ;; |
| 114 | m68k) |
| 115 | arch=m68k |
| 116 | AC_DEFINE([M68K], 1, [Define for the m68k architecture.]) |
| 117 | ;; |
James Hogan | 5f999a8 | 2013-02-22 14:44:10 +0000 | [diff] [blame] | 118 | metag*) |
| 119 | arch=metag |
| 120 | AC_DEFINE([METAG], 1, [Define for the Meta architecture.]) |
| 121 | ;; |
Elliott Hughes | b755614 | 2018-02-20 17:03:16 -0800 | [diff] [blame] | 122 | microblaze*) |
| 123 | arch=microblaze |
| 124 | AC_DEFINE([MICROBLAZE], 1, [Define for the MicroBlaze architecture.]) |
| 125 | ;; |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 126 | mips*) |
| 127 | arch=mips |
| 128 | AC_DEFINE([MIPS], 1, [Define for the MIPS architecture.]) |
| 129 | ;; |
Elliott Hughes | b755614 | 2018-02-20 17:03:16 -0800 | [diff] [blame] | 130 | nios2*) |
| 131 | arch=nios2 |
| 132 | AC_DEFINE([NIOS2], 1, [Define for the Nios-II architecture.]) |
| 133 | ;; |
| 134 | or1k*) |
| 135 | arch=or1k |
| 136 | AC_DEFINE([OR1K], 1, [Define for the OpenRISC 1000 architecture.]) |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 137 | ;; |
Roland McGrath | eb28535 | 2003-01-14 09:59:00 +0000 | [diff] [blame] | 138 | powerpc*) |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 139 | AC_DEFINE([POWERPC], 1, [Define for the PowerPC architecture.]) |
Anton Blanchard | 9afc2ee | 2013-07-11 12:03:57 +1000 | [diff] [blame] | 140 | AC_TRY_COMPILE( |
| 141 | [#ifndef __LP64__ |
| 142 | # error 32 bit |
Dmitry V. Levin | af3ab5b | 2015-01-21 17:04:31 +0000 | [diff] [blame] | 143 | #endif], [], arch=powerpc64, arch=powerpc) |
| 144 | if test "$arch" = "powerpc64"; then |
Dmitry V. Levin | 1e04e57 | 2015-12-08 00:13:38 +0000 | [diff] [blame] | 145 | arch_m32=powerpc |
Andreas Schwab | d69fa49 | 2010-07-12 21:39:57 +0200 | [diff] [blame] | 146 | AC_DEFINE([POWERPC64], 1, [Define for the PowerPC64 architecture.]) |
| 147 | fi |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 148 | ;; |
Elliott Hughes | b755614 | 2018-02-20 17:03:16 -0800 | [diff] [blame] | 149 | riscv*) |
| 150 | arch=riscv |
| 151 | AC_DEFINE([RISCV], 1, [Define for the RISC-V architecture]) |
Vineet Gupta | 7daacbb | 2013-08-16 12:47:06 +0530 | [diff] [blame] | 152 | ;; |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 153 | s390) |
| 154 | arch=s390 |
| 155 | AC_DEFINE([S390], 1, [Define for the S390 architecture.]) |
| 156 | ;; |
| 157 | s390x) |
| 158 | arch=s390x |
Elliott Hughes | b755614 | 2018-02-20 17:03:16 -0800 | [diff] [blame] | 159 | arch_m32=s390 |
| 160 | cc_flags_m32=-m31 |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 161 | AC_DEFINE([S390X], 1, [Define for the S390x architecture.]) |
| 162 | ;; |
Roland McGrath | 67828ca | 2007-11-01 21:32:49 +0000 | [diff] [blame] | 163 | sh64*) |
Roland McGrath | f5a4777 | 2003-06-26 22:40:42 +0000 | [diff] [blame] | 164 | arch=sh64 |
| 165 | AC_DEFINE([SH64], 1, [Define for the SH64 architecture.]) |
Roland McGrath | e1e584b | 2003-06-02 19:18:58 +0000 | [diff] [blame] | 166 | ;; |
Roland McGrath | 67828ca | 2007-11-01 21:32:49 +0000 | [diff] [blame] | 167 | sh*) |
| 168 | arch=sh |
| 169 | AC_DEFINE([SH], 1, [Define for the SH architecture.]) |
| 170 | ;; |
Elliott Hughes | b755614 | 2018-02-20 17:03:16 -0800 | [diff] [blame] | 171 | sparc64*) |
| 172 | arch=sparc64 |
| 173 | arch_m32=sparc |
| 174 | AC_DEFINE([SPARC64], 1, [Define for the SPARC64 architecture.]) |
| 175 | ;; |
| 176 | sparc*) |
| 177 | arch=sparc |
| 178 | AC_DEFINE([SPARC], 1, [Define for the SPARC architecture.]) |
| 179 | ;; |
| 180 | tile*) |
| 181 | arch=tile |
| 182 | AC_DEFINE([TILE], 1, [Define for the Tile architecture]) |
| 183 | ;; |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 184 | x86?64*) |
Dmitry V. Levin | 1e04e57 | 2015-12-08 00:13:38 +0000 | [diff] [blame] | 185 | arch_m32=i386 |
H.J. Lu | 35be581 | 2012-04-16 13:00:01 +0200 | [diff] [blame] | 186 | AC_TRY_COMPILE( |
| 187 | [#ifndef __ILP32__ |
| 188 | # error not x32 |
| 189 | #endif], [], arch=x32, arch=x86_64) |
| 190 | if test "$arch" = "x86_64"; then |
Dmitry V. Levin | 1e04e57 | 2015-12-08 00:13:38 +0000 | [diff] [blame] | 191 | arch_mx32=x32 |
H.J. Lu | 35be581 | 2012-04-16 13:00:01 +0200 | [diff] [blame] | 192 | AC_DEFINE([X86_64], 1, [Define for the 64bit AMD x86-64 architecture.]) |
| 193 | else |
| 194 | AC_DEFINE([X32], 1, [Define for the 32bit AMD x86-64 architecture.]) |
| 195 | fi |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 196 | ;; |
Chris Zankel | 8f636ed | 2013-03-25 10:22:07 -0700 | [diff] [blame] | 197 | xtensa*) |
| 198 | arch=xtensa |
| 199 | AC_DEFINE([XTENSA], 1, [Define for the Xtensa architecture]) |
| 200 | ;; |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 201 | *) |
| 202 | AC_MSG_RESULT([NO!]) |
| 203 | AC_MSG_ERROR([architecture $host_cpu is not supported by strace]) |
| 204 | ;; |
| 205 | esac |
| 206 | AC_MSG_RESULT($arch) |
| 207 | |
Elliott Hughes | b755614 | 2018-02-20 17:03:16 -0800 | [diff] [blame] | 208 | arch_native=$arch |
| 209 | |
Dmitry V. Levin | 1e04e57 | 2015-12-08 00:13:38 +0000 | [diff] [blame] | 210 | test -n "$arch_m32" || |
| 211 | arch_m32=$arch |
| 212 | test -n "$arch_mx32" || |
| 213 | arch_mx32=$arch |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 214 | AC_SUBST(arch) |
Dmitry V. Levin | 1e04e57 | 2015-12-08 00:13:38 +0000 | [diff] [blame] | 215 | AC_SUBST(arch_m32) |
| 216 | AC_SUBST(arch_mx32) |
Elliott Hughes | b755614 | 2018-02-20 17:03:16 -0800 | [diff] [blame] | 217 | AC_SUBST(cc_flags_m32) |
| 218 | AC_SUBST(cc_flags_mx32) |
| 219 | AC_SUBST(arch_native) |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 220 | |
James Cowgill | 468dccf | 2016-08-11 16:33:02 +0000 | [diff] [blame] | 221 | MIPS_ABI= |
Dmitry V. Levin | 047365e | 2015-02-15 01:08:48 +0000 | [diff] [blame] | 222 | if test "$arch" = mips; then |
Dmitry V. Levin | 6684b68 | 2015-08-18 22:53:22 +0000 | [diff] [blame] | 223 | AC_CACHE_CHECK([for _MIPS_SIM], [st_cv__MIPS_SIM], |
Elliott Hughes | d35df49 | 2017-02-15 15:19:05 -0800 | [diff] [blame] | 224 | [AC_COMPUTE_INT([st_cv__MIPS_SIM], [_MIPS_SIM], , |
Elliott Hughes | b755614 | 2018-02-20 17:03:16 -0800 | [diff] [blame] | 225 | [AC_MSG_FAILURE([_MIPS_SIM cannot be determined])])]) |
Dmitry V. Levin | 6684b68 | 2015-08-18 22:53:22 +0000 | [diff] [blame] | 226 | |
Elliott Hughes | d35df49 | 2017-02-15 15:19:05 -0800 | [diff] [blame] | 227 | # requires GCC >= 3.4 |
Dmitry V. Levin | 6684b68 | 2015-08-18 22:53:22 +0000 | [diff] [blame] | 228 | AC_CACHE_CHECK([for MIPS ABI], [st_cv_mips_abi], |
Dmitry V. Levin | 047365e | 2015-02-15 01:08:48 +0000 | [diff] [blame] | 229 | [AC_COMPILE_IFELSE( |
Elliott Hughes | d35df49 | 2017-02-15 15:19:05 -0800 | [diff] [blame] | 230 | [AC_LANG_PROGRAM(, [[int i[_MIPS_SIM == _ABIO32 ? 1 : - 1];]])], |
Dmitry V. Levin | 6684b68 | 2015-08-18 22:53:22 +0000 | [diff] [blame] | 231 | [st_cv_mips_abi=o32], |
Dmitry V. Levin | 047365e | 2015-02-15 01:08:48 +0000 | [diff] [blame] | 232 | [AC_COMPILE_IFELSE( |
Elliott Hughes | d35df49 | 2017-02-15 15:19:05 -0800 | [diff] [blame] | 233 | [AC_LANG_PROGRAM(, [[int i[_MIPS_SIM == _ABIN32 ? 1 : - 1];]])], |
Dmitry V. Levin | 6684b68 | 2015-08-18 22:53:22 +0000 | [diff] [blame] | 234 | [st_cv_mips_abi=n32], |
Dmitry V. Levin | 047365e | 2015-02-15 01:08:48 +0000 | [diff] [blame] | 235 | [AC_COMPILE_IFELSE( |
Elliott Hughes | d35df49 | 2017-02-15 15:19:05 -0800 | [diff] [blame] | 236 | [AC_LANG_PROGRAM(, [[int i[_MIPS_SIM == _ABI64 ? 1 : - 1];]])], |
Dmitry V. Levin | 6684b68 | 2015-08-18 22:53:22 +0000 | [diff] [blame] | 237 | [st_cv_mips_abi=n64], |
| 238 | [st_cv_mips_abi=unknown])])])]) |
| 239 | |
| 240 | case "$st_cv_mips_abi" in |
Elliott Hughes | d35df49 | 2017-02-15 15:19:05 -0800 | [diff] [blame] | 241 | o32) AC_DEFINE([LINUX_MIPSO32], [1], [Define for _ABIO32.]);; |
| 242 | n32) AC_DEFINE([LINUX_MIPSN32], [1], [Define for _ABIN32.]);; |
| 243 | n64) AC_DEFINE([LINUX_MIPSN64], [1], [Define for _ABI64.]);; |
Dmitry V. Levin | 047365e | 2015-02-15 01:08:48 +0000 | [diff] [blame] | 244 | *) AC_MSG_ERROR([Unsupported _MIPS_SIM]);; |
| 245 | esac |
James Cowgill | 468dccf | 2016-08-11 16:33:02 +0000 | [diff] [blame] | 246 | MIPS_ABI="$st_cv_mips_abi" |
Dmitry V. Levin | 047365e | 2015-02-15 01:08:48 +0000 | [diff] [blame] | 247 | fi |
James Cowgill | 468dccf | 2016-08-11 16:33:02 +0000 | [diff] [blame] | 248 | AC_SUBST(MIPS_ABI) |
Dmitry V. Levin | 047365e | 2015-02-15 01:08:48 +0000 | [diff] [blame] | 249 | |
Dmitry V. Levin | 0160e16 | 2014-03-18 23:37:43 +0000 | [diff] [blame] | 250 | AC_ARG_ENABLE([arm-oabi], |
| 251 | [AS_HELP_STRING([--enable-arm-oabi], |
| 252 | [enable OABI support on ARM EABI])], |
| 253 | [], [enable_arm_oabi=no]) |
| 254 | case "$enable_arm_oabi" in |
| 255 | yes) enable_arm_oabi=1 ;; |
| 256 | no) enable_arm_oabi=0 ;; |
| 257 | *) AC_MSG_ERROR([bad value $enable_arm_oabi for arm-oabi option]) ;; |
| 258 | esac |
| 259 | AC_DEFINE_UNQUOTED([ENABLE_ARM_OABI], [$enable_arm_oabi], |
| 260 | [Define to 1 if you want OABI support on ARM EABI.]) |
| 261 | |
Mike Frysinger | 6d12afd | 2010-09-12 03:39:55 -0400 | [diff] [blame] | 262 | AC_C_BIGENDIAN |
Dmitry V. Levin | 2165a35 | 2016-01-12 00:02:56 +0000 | [diff] [blame] | 263 | AC_C_TYPEOF |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 264 | |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 265 | AC_TYPE_UID_T |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 266 | |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 267 | AC_CHECK_FUNCS(m4_normalize([ |
Dmitry V. Levin | 891855e | 2016-07-11 17:21:22 +0000 | [diff] [blame] | 268 | accept4 |
Elliott Hughes | 77c3ff8 | 2017-09-08 17:11:00 -0700 | [diff] [blame] | 269 | be64toh |
Eugene Syromyatnikov | dbb7660 | 2016-09-22 00:21:50 +0300 | [diff] [blame] | 270 | fallocate |
Dmitry V. Levin | 1ea6473 | 2015-01-10 00:08:58 +0000 | [diff] [blame] | 271 | fanotify_mark |
Dmitry V. Levin | d354130 | 2014-02-26 00:01:00 +0000 | [diff] [blame] | 272 | fopen64 |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 273 | fork |
Dmitry V. Levin | d354130 | 2014-02-26 00:01:00 +0000 | [diff] [blame] | 274 | fputs_unlocked |
Dmitry V. Levin | b0e6115 | 2015-12-02 01:02:39 +0000 | [diff] [blame] | 275 | fstatat |
| 276 | ftruncate |
| 277 | futimens |
Elliott Hughes | b755614 | 2018-02-20 17:03:16 -0800 | [diff] [blame] | 278 | iconv_open |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 279 | if_indextoname |
Dmitry V. Levin | bf2698a | 2016-07-03 22:15:45 +0000 | [diff] [blame] | 280 | open64 |
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 |
Eugene Syromyatnikov | 0c76633 | 2016-09-02 18:28:24 +0300 | [diff] [blame] | 285 | readahead |
Dmitry V. Levin | 30ac062 | 2015-08-03 09:47:25 +0000 | [diff] [blame] | 286 | signalfd |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 287 | stpcpy |
| 288 | strerror |
Elliott Hughes | dc75b01 | 2017-07-05 13:54:44 -0700 | [diff] [blame] | 289 | strndup |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 290 | strsignal |
Dmitry V. Levin | 5b2d257 | 2016-04-06 00:02:08 +0000 | [diff] [blame] | 291 | sync_file_range |
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 | |
Elliott Hughes | b755614 | 2018-02-20 17:03:16 -0800 | [diff] [blame] | 306 | AC_CHECK_TYPES([struct user_desc], |
| 307 | [AC_CHECK_MEMBERS([struct user_desc.lm],,, |
| 308 | [#include <asm/ldt.h>])],, |
| 309 | [#include <asm/ldt.h>]) |
Elliott Hughes | d35df49 | 2017-02-15 15:19:05 -0800 | [diff] [blame] | 310 | |
Dmitry V. Levin | a7c4ee4 | 2016-08-24 00:29:40 +0000 | [diff] [blame] | 311 | AC_CHECK_MEMBERS([struct stat.st_mtime_nsec, struct stat64.st_mtime_nsec],,, |
Dmitry V. Levin | 788939b | 2016-08-23 14:27:45 +0000 | [diff] [blame] | 312 | [#include <sys/types.h> |
| 313 | #include <asm/stat.h>]) |
| 314 | |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 315 | AC_CHECK_TYPES(m4_normalize([ |
| 316 | struct pt_all_user_regs, |
| 317 | struct ia64_fpreg, |
| 318 | struct ptrace_peeksiginfo_args |
| 319 | ]),,, [#include <sys/ptrace.h>]) |
| 320 | |
Elliott Hughes | c187376 | 2018-12-19 15:13:36 -0800 | [diff] [blame] | 321 | # For kernels that do not have v3.10-rc1~201^2~11 |
| 322 | AC_CHECK_TYPES([s390_compat_regs],,, [#include <asm/ptrace.h>]) |
| 323 | |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 324 | AC_CHECK_TYPES(m4_normalize([ |
| 325 | struct flock, |
| 326 | struct flock64, |
| 327 | struct __kernel_flock, |
Elliott Hughes | 03a418e | 2018-06-15 13:11:40 -0700 | [diff] [blame] | 328 | struct __kernel_flock64, |
| 329 | struct f_owner_ex, |
| 330 | struct __kernel_f_owner_ex |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 331 | ]),,, |
| 332 | [#include <sys/types.h> |
| 333 | #include <linux/fcntl.h>]) |
| 334 | |
Elliott Hughes | 77c3ff8 | 2017-09-08 17:11:00 -0700 | [diff] [blame] | 335 | AC_CHECK_TYPES(m4_normalize([ |
| 336 | struct crypto_report_aead, |
| 337 | struct crypto_report_blkcipher, |
| 338 | struct crypto_report_cipher, |
| 339 | struct crypto_report_hash, |
| 340 | struct crypto_report_rng |
| 341 | ]),,, [#include <linux/cryptouser.h>]) |
| 342 | |
| 343 | AC_CHECK_TYPES(m4_normalize([ |
Elliott Hughes | bbf97dc | 2017-11-15 16:45:52 -0800 | [diff] [blame] | 344 | struct kcmp_epoll_slot |
| 345 | ]),,, [#include <linux/kcmp.h>]) |
| 346 | |
| 347 | AC_CHECK_TYPES(m4_normalize([ |
Elliott Hughes | 77c3ff8 | 2017-09-08 17:11:00 -0700 | [diff] [blame] | 348 | struct keyctl_kdf_params |
| 349 | ]),,, [#include <linux/keyctl.h>]) |
| 350 | |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 351 | AC_CHECK_MEMBERS([struct timex.tai],,, [#include <sys/timex.h>]) |
| 352 | |
| 353 | AC_CHECK_MEMBERS([struct utsname.domainname],,, [#include <sys/utsname.h>]) |
| 354 | |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 355 | AC_CHECK_MEMBERS(m4_normalize([ |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 356 | siginfo_t.si_syscall, |
| 357 | siginfo_t.si_timerid, |
| 358 | siginfo_t.si_overrun |
| 359 | ]),,, [#include <signal.h>]) |
| 360 | |
Elliott Hughes | d35df49 | 2017-02-15 15:19:05 -0800 | [diff] [blame] | 361 | AC_CHECK_MEMBERS(m4_normalize([ |
| 362 | struct perf_event_attr.precise_ip, |
| 363 | struct perf_event_attr.mmap_data, |
| 364 | struct perf_event_attr.sample_id_all, |
| 365 | struct perf_event_attr.exclude_host, |
| 366 | struct perf_event_attr.exclude_guest, |
| 367 | struct perf_event_attr.exclude_callchain_kernel, |
| 368 | struct perf_event_attr.exclude_callchain_user, |
| 369 | struct perf_event_attr.mmap2, |
| 370 | struct perf_event_attr.comm_exec, |
| 371 | struct perf_event_attr.use_clockid, |
| 372 | struct perf_event_attr.context_switch, |
| 373 | struct perf_event_attr.write_backward, |
Elliott Hughes | b755614 | 2018-02-20 17:03:16 -0800 | [diff] [blame] | 374 | struct perf_event_attr.namespaces, |
Elliott Hughes | d35df49 | 2017-02-15 15:19:05 -0800 | [diff] [blame] | 375 | struct perf_event_attr.bp_type, |
| 376 | struct perf_event_attr.config1, |
| 377 | struct perf_event_attr.config2, |
| 378 | struct perf_event_attr.branch_sample_type, |
| 379 | struct perf_event_attr.sample_regs_user, |
| 380 | struct perf_event_attr.sample_stack_user, |
| 381 | struct perf_event_attr.sample_regs_intr, |
| 382 | struct perf_event_attr.aux_watermark, |
| 383 | struct perf_event_attr.sample_max_stack |
| 384 | ]),,, [#include <linux/perf_event.h>]) |
| 385 | |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 386 | AC_CHECK_HEADERS(m4_normalize([ |
| 387 | asm/cachectl.h |
Elliott Hughes | b755614 | 2018-02-20 17:03:16 -0800 | [diff] [blame] | 388 | asm/guarded_storage.h |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 389 | asm/sysmips.h |
Dmitry V. Levin | c41808b | 2013-03-18 00:52:29 +0000 | [diff] [blame] | 390 | elf.h |
Elliott Hughes | b755614 | 2018-02-20 17:03:16 -0800 | [diff] [blame] | 391 | iconv.h |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 392 | inttypes.h |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 393 | linux/bsg.h |
Elliott Hughes | 77c3ff8 | 2017-09-08 17:11:00 -0700 | [diff] [blame] | 394 | linux/cryptouser.h |
Elliott Hughes | d35df49 | 2017-02-15 15:19:05 -0800 | [diff] [blame] | 395 | linux/dm-ioctl.h |
Eugene Syromyatnikov | 81b6383 | 2016-09-21 06:12:37 +0300 | [diff] [blame] | 396 | linux/dqblk_xfs.h |
Dmitry V. Levin | 52572b6 | 2014-12-11 19:21:54 +0000 | [diff] [blame] | 397 | linux/falloc.h |
Elliott Hughes | 77c3ff8 | 2017-09-08 17:11:00 -0700 | [diff] [blame] | 398 | linux/fib_rules.h |
Dmitry V. Levin | c525307 | 2016-05-24 00:19:17 +0000 | [diff] [blame] | 399 | linux/fiemap.h |
Elliott Hughes | dc75b01 | 2017-07-05 13:54:44 -0700 | [diff] [blame] | 400 | linux/genetlink.h |
Dmitry V. Levin | df7aa2b | 2015-01-19 17:02:16 +0000 | [diff] [blame] | 401 | linux/hiddev.h |
Elliott Hughes | 77c3ff8 | 2017-09-08 17:11:00 -0700 | [diff] [blame] | 402 | linux/if_addr.h |
| 403 | linux/if_link.h |
Mike Frysinger | 54646b8 | 2015-08-19 13:29:27 -0400 | [diff] [blame] | 404 | linux/ip_vs.h |
Mike Frysinger | ba10a42 | 2015-10-31 00:47:53 -0400 | [diff] [blame] | 405 | linux/ipc.h |
Elliott Hughes | bbf97dc | 2017-11-15 16:45:52 -0800 | [diff] [blame] | 406 | linux/kcmp.h |
Elliott Hughes | b755614 | 2018-02-20 17:03:16 -0800 | [diff] [blame] | 407 | linux/kvm.h |
| 408 | linux/memfd.h |
Dmitry V. Levin | df7aa2b | 2015-01-19 17:02:16 +0000 | [diff] [blame] | 409 | linux/mmtimer.h |
Mike Frysinger | ba10a42 | 2015-10-31 00:47:53 -0400 | [diff] [blame] | 410 | linux/msg.h |
Elliott Hughes | 77c3ff8 | 2017-09-08 17:11:00 -0700 | [diff] [blame] | 411 | linux/neighbour.h |
Elliott Hughes | bbf97dc | 2017-11-15 16:45:52 -0800 | [diff] [blame] | 412 | linux/netfilter/ipset/ip_set.h |
| 413 | linux/netfilter/nf_tables.h |
| 414 | linux/netfilter/nf_tables_compat.h |
Elliott Hughes | dc75b01 | 2017-07-05 13:54:44 -0700 | [diff] [blame] | 415 | linux/netfilter/nfnetlink.h |
Elliott Hughes | bbf97dc | 2017-11-15 16:45:52 -0800 | [diff] [blame] | 416 | linux/netfilter/nfnetlink_acct.h |
| 417 | linux/netfilter/nfnetlink_conntrack.h |
| 418 | linux/netfilter/nfnetlink_cthelper.h |
| 419 | linux/netfilter/nfnetlink_cttimeout.h |
| 420 | linux/netfilter/nfnetlink_log.h |
| 421 | linux/netfilter/nfnetlink_queue.h |
Elliott Hughes | 39bac05 | 2017-05-25 16:56:11 -0700 | [diff] [blame] | 422 | linux/nsfs.h |
Ben Noordhuis | 88eafd8 | 2013-02-04 00:04:57 +0100 | [diff] [blame] | 423 | linux/perf_event.h |
Eugene Syromyatnikov | 81b6383 | 2016-09-21 06:12:37 +0300 | [diff] [blame] | 424 | linux/quota.h |
Dmitry V. Levin | 2af6903 | 2015-02-04 23:50:50 +0000 | [diff] [blame] | 425 | linux/seccomp.h |
Dmitry V. Levin | 1e88073 | 2015-02-14 01:51:03 +0000 | [diff] [blame] | 426 | linux/securebits.h |
Mike Frysinger | ba10a42 | 2015-10-31 00:47:53 -0400 | [diff] [blame] | 427 | linux/sem.h |
| 428 | linux/shm.h |
Dr. David Alan Gilbert | 5d1216a | 2016-05-10 11:49:02 +0100 | [diff] [blame] | 429 | linux/userfaultfd.h |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 430 | linux/utsname.h |
| 431 | mqueue.h |
| 432 | netinet/sctp.h |
Dmitry V. Levin | ebda41a | 2016-06-19 22:02:45 +0000 | [diff] [blame] | 433 | netipx/ipx.h |
Elliott Hughes | b755614 | 2018-02-20 17:03:16 -0800 | [diff] [blame] | 434 | paths.h |
Dmitry V. Levin | fdb896e | 2014-02-25 23:04:55 +0000 | [diff] [blame] | 435 | scsi/sg.h |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 436 | stropts.h |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 437 | sys/conf.h |
Dmitry V. Levin | c8cba99 | 2015-08-01 21:08:13 +0000 | [diff] [blame] | 438 | sys/eventfd.h |
Dmitry V. Levin | 1ea6473 | 2015-01-10 00:08:58 +0000 | [diff] [blame] | 439 | sys/fanotify.h |
Mike Frysinger | ba10a42 | 2015-10-31 00:47:53 -0400 | [diff] [blame] | 440 | sys/ipc.h |
| 441 | sys/msg.h |
Eugene Syromyatnikov | 81b6383 | 2016-09-21 06:12:37 +0300 | [diff] [blame] | 442 | sys/quota.h |
Mike Frysinger | ba10a42 | 2015-10-31 00:47:53 -0400 | [diff] [blame] | 443 | sys/sem.h |
| 444 | sys/shm.h |
Dmitry V. Levin | 30ac062 | 2015-08-03 09:47:25 +0000 | [diff] [blame] | 445 | sys/signalfd.h |
Masatake YAMATO | f548067 | 2014-11-22 19:03:33 +0900 | [diff] [blame] | 446 | sys/xattr.h |
Elliott Hughes | d35df49 | 2017-02-15 15:19:05 -0800 | [diff] [blame] | 447 | ustat.h |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 448 | ])) |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 449 | |
| 450 | AC_CHECK_HEADERS([asm/sigcontext.h],,, [#include <signal.h>]) |
| 451 | |
| 452 | AC_CHECK_HEADERS([netinet/tcp.h netinet/udp.h],,, [#include <netinet/in.h>]) |
| 453 | |
Mike Frysinger | ba10a42 | 2015-10-31 00:47:53 -0400 | [diff] [blame] | 454 | AC_CHECK_HEADERS([linux/mqueue.h],,, [#include <linux/types.h>]) |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 455 | |
Elliott Hughes | bbf97dc | 2017-11-15 16:45:52 -0800 | [diff] [blame] | 456 | AC_CHECK_HEADERS([linux/netfilter/xt_osf.h],,, [#include <linux/ip.h> |
| 457 | #include <linux/tcp.h>]) |
| 458 | |
Mike Frysinger | 54646b8 | 2015-08-19 13:29:27 -0400 | [diff] [blame] | 459 | AC_CHECK_HEADERS(m4_normalize([ |
| 460 | linux/netfilter_arp/arp_tables.h |
| 461 | linux/netfilter_bridge/ebtables.h |
| 462 | linux/netfilter_ipv4/ip_tables.h |
| 463 | linux/netfilter_ipv6/ip6_tables.h |
Dmitry V. Levin | 1ef7aa6 | 2016-01-12 21:27:36 +0000 | [diff] [blame] | 464 | ]),,, [#include <netinet/in.h> |
Mike Frysinger | 54646b8 | 2015-08-19 13:29:27 -0400 | [diff] [blame] | 465 | #include <net/if.h>]) |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 466 | |
Dmitry V. Levin | 19dadf9 | 2015-02-22 02:50:33 +0300 | [diff] [blame] | 467 | AC_CHECK_HEADERS([linux/input.h], [ |
| 468 | AC_CHECK_MEMBERS([struct input_absinfo.resolution],,, [#include <linux/input.h>]) |
| 469 | ]) |
| 470 | |
Dmitry V. Levin | 4e3ded3 | 2015-07-29 16:27:16 +0000 | [diff] [blame] | 471 | AC_CHECK_HEADERS([linux/bpf.h], [ |
Elliott Hughes | 03a418e | 2018-06-15 13:11:40 -0700 | [diff] [blame] | 472 | AC_CHECK_TYPES(m4_normalize([ |
| 473 | struct bpf_insn, |
| 474 | struct bpf_map_info, |
| 475 | struct bpf_prog_info |
| 476 | ]),,, [#include <linux/bpf.h>]) |
Elliott Hughes | 28e98bc | 2018-06-14 16:59:04 -0700 | [diff] [blame] | 477 | st_BPF_ATTR |
Dmitry V. Levin | 4e3ded3 | 2015-07-29 16:27:16 +0000 | [diff] [blame] | 478 | ]) |
| 479 | |
Elliott Hughes | 03a418e | 2018-06-15 13:11:40 -0700 | [diff] [blame] | 480 | AC_CHECK_HEADERS([bluetooth/bluetooth.h], [ |
| 481 | AC_CHECK_MEMBERS([struct sockaddr_l2.l2_bdaddr_type],,, |
| 482 | [#include <bluetooth/bluetooth.h> |
| 483 | #include <bluetooth/l2cap.h>]) |
| 484 | ]) |
| 485 | |
Elliott Hughes | bbf97dc | 2017-11-15 16:45:52 -0800 | [diff] [blame] | 486 | AC_CHECK_TYPES(m4_normalize([ |
| 487 | struct br_mdb_entry, |
| 488 | struct br_port_msg |
| 489 | ]),,, [#include <linux/if_bridge.h>]) |
| 490 | AC_CHECK_MEMBERS(m4_normalize([ |
| 491 | struct br_mdb_entry.flags, |
| 492 | struct br_mdb_entry.vid |
| 493 | ]),,, [#include <linux/if_bridge.h>]) |
| 494 | |
Elliott Hughes | 77c3ff8 | 2017-09-08 17:11:00 -0700 | [diff] [blame] | 495 | AC_CHECK_TYPES([struct dcbmsg],,, [#include <linux/dcbnl.h>]) |
| 496 | AC_CHECK_TYPES([struct ifaddrlblmsg],,, [#include <linux/if_addrlabel.h>]) |
| 497 | AC_CHECK_TYPES([struct netconfmsg],,, [#include <linux/netconf.h>]) |
| 498 | |
| 499 | AC_CHECK_TYPES(m4_normalize([ |
| 500 | struct rta_mfc_stats, |
| 501 | struct rtvia |
Elliott Hughes | 03a418e | 2018-06-15 13:11:40 -0700 | [diff] [blame] | 502 | ]),,, [#include <sys/socket.h> |
| 503 | #include <linux/rtnetlink.h>]) |
Elliott Hughes | 77c3ff8 | 2017-09-08 17:11:00 -0700 | [diff] [blame] | 504 | |
| 505 | AC_CHECK_MEMBERS([struct ndt_stats.ndts_table_fulls],,, [#include <linux/neighbour.h>]) |
| 506 | AC_CHECK_TYPES(m4_normalize([ |
| 507 | struct ndt_config, |
| 508 | struct ndt_stats |
| 509 | ]),,, [#include <linux/neighbour.h>]) |
| 510 | |
| 511 | AC_CHECK_TYPES(m4_normalize([ |
| 512 | struct ifla_bridge_id, |
Elliott Hughes | 03a418e | 2018-06-15 13:11:40 -0700 | [diff] [blame] | 513 | struct ifla_cacheinfo, |
Elliott Hughes | 77c3ff8 | 2017-09-08 17:11:00 -0700 | [diff] [blame] | 514 | struct ifla_port_vsi, |
| 515 | struct rtnl_link_stats64 |
Elliott Hughes | 03a418e | 2018-06-15 13:11:40 -0700 | [diff] [blame] | 516 | ]),,, [#include <sys/socket.h> |
| 517 | #include <linux/rtnetlink.h>]) |
Elliott Hughes | 77c3ff8 | 2017-09-08 17:11:00 -0700 | [diff] [blame] | 518 | AC_CHECK_MEMBERS(m4_normalize([ |
| 519 | struct rtnl_link_stats.rx_nohandler, |
| 520 | struct rtnl_link_stats64.rx_nohandler |
Elliott Hughes | 03a418e | 2018-06-15 13:11:40 -0700 | [diff] [blame] | 521 | ]),,, [#include <sys/socket.h> |
| 522 | #include <linux/rtnetlink.h>]) |
| 523 | AC_CHECK_DECLS(m4_normalize([ |
| 524 | IFLA_PORT_SELF, |
| 525 | IFLA_PROTINFO, |
| 526 | IFLA_AF_SPEC, |
| 527 | IFLA_XDP |
| 528 | ]),,, [#include <sys/socket.h> |
| 529 | #include <linux/rtnetlink.h>]) |
Elliott Hughes | 77c3ff8 | 2017-09-08 17:11:00 -0700 | [diff] [blame] | 530 | |
Elliott Hughes | bbf97dc | 2017-11-15 16:45:52 -0800 | [diff] [blame] | 531 | AC_CHECK_TYPES(m4_normalize([ |
| 532 | struct gnet_stats_basic, |
| 533 | struct gnet_stats_queue, |
| 534 | struct gnet_stats_rate_est, |
| 535 | struct gnet_stats_rate_est64 |
| 536 | ]),,, [#include <linux/gen_stats.h>]) |
| 537 | |
Elliott Hughes | 03a418e | 2018-06-15 13:11:40 -0700 | [diff] [blame] | 538 | AC_CHECK_TYPES([struct tc_sizespec],,, [#include <linux/types.h> |
| 539 | #include <linux/pkt_sched.h>]) |
| 540 | AC_CHECK_DECLS([TCA_STAB_DATA],,, [#include <linux/types.h> |
| 541 | #include <linux/pkt_sched.h>]) |
Elliott Hughes | bbf97dc | 2017-11-15 16:45:52 -0800 | [diff] [blame] | 542 | |
Elliott Hughes | 03a418e | 2018-06-15 13:11:40 -0700 | [diff] [blame] | 543 | AC_CHECK_TYPES(m4_normalize([ |
| 544 | struct fib_rule_uid_range, |
| 545 | struct fib_rule_port_range |
| 546 | ]),,, [#include <linux/fib_rules.h>]) |
Elliott Hughes | 77c3ff8 | 2017-09-08 17:11:00 -0700 | [diff] [blame] | 547 | |
Dmitry V. Levin | 67c2f67 | 2016-04-26 00:21:26 +0000 | [diff] [blame] | 548 | AC_CHECK_TYPES([struct statfs], [ |
Elliott Hughes | 77c3ff8 | 2017-09-08 17:11:00 -0700 | [diff] [blame] | 549 | AC_CHECK_MEMBERS(m4_normalize([ |
| 550 | struct statfs.f_frsize, |
| 551 | struct statfs.f_flags, |
| 552 | struct statfs.f_fsid.val, |
| 553 | struct statfs.f_fsid.__val |
| 554 | ]),,, [#include <linux/types.h> |
Dmitry V. Levin | 67c2f67 | 2016-04-26 00:21:26 +0000 | [diff] [blame] | 555 | #include <asm/statfs.h>]) |
| 556 | ],, [#include <linux/types.h> |
| 557 | #include <asm/statfs.h>]) |
| 558 | |
| 559 | AC_CHECK_TYPES([struct statfs64], [ |
Elliott Hughes | 77c3ff8 | 2017-09-08 17:11:00 -0700 | [diff] [blame] | 560 | AC_CHECK_MEMBERS(m4_normalize([ |
| 561 | struct statfs64.f_frsize, |
| 562 | struct statfs64.f_flags, |
| 563 | struct statfs64.f_fsid.val, |
| 564 | struct statfs64.f_fsid.__val |
| 565 | ]),,, [#include <linux/types.h> |
Dmitry V. Levin | 67c2f67 | 2016-04-26 00:21:26 +0000 | [diff] [blame] | 566 | #include <asm/statfs.h>]) |
| 567 | ],, [#include <linux/types.h> |
| 568 | #include <asm/statfs.h>]) |
| 569 | |
Dmitry V. Levin | 799b22a | 2016-05-26 12:55:41 +0000 | [diff] [blame] | 570 | AC_CHECK_TYPES([struct blk_user_trace_setup],,, [#include <linux/blktrace_api.h>]) |
| 571 | |
Elliott Hughes | b755614 | 2018-02-20 17:03:16 -0800 | [diff] [blame] | 572 | AC_CHECK_TYPES([struct mtd_write_req],,, [#include <mtd/mtd-abi.h>]) |
| 573 | |
| 574 | AC_CHECK_MEMBERS([struct ubi_attach_req.max_beb_per1024],,, [#include <mtd/ubi-user.h>]) |
| 575 | |
| 576 | AC_CHECK_TYPES(m4_normalize([ |
| 577 | struct ptp_sys_offset |
| 578 | ]),,, [#include <linux/ptp_clock.h>]) |
| 579 | |
| 580 | AC_CHECK_TYPES(m4_normalize([ |
Elliott Hughes | c187376 | 2018-12-19 15:13:36 -0800 | [diff] [blame] | 581 | struct kvm_cpuid2, |
Elliott Hughes | b755614 | 2018-02-20 17:03:16 -0800 | [diff] [blame] | 582 | struct kvm_regs, |
| 583 | struct kvm_sregs, |
| 584 | struct kvm_userspace_memory_region |
| 585 | ]),,, [#include <linux/kvm.h>]) |
| 586 | |
Elliott Hughes | 03a418e | 2018-06-15 13:11:40 -0700 | [diff] [blame] | 587 | saved_CPPFLAGS="$CPPFLAGS" |
Elliott Hughes | c187376 | 2018-12-19 15:13:36 -0800 | [diff] [blame] | 588 | |
| 589 | AC_CACHE_CHECK([whether <linux/signal.h> can be used along with <signal.h>], |
| 590 | [st_cv_linux_signal], |
| 591 | [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ |
| 592 | #include <signal.h> |
| 593 | #include <linux/signal.h>]],[])], |
| 594 | [st_cv_linux_signal=yes], |
| 595 | [st_cv_linux_signal=no])]) |
| 596 | if test "x$st_cv_linux_signal" = xno; then |
| 597 | mkdir -p linux/linux |
| 598 | cp $srcdir/linux/signal.h.in linux/linux/signal.h |
| 599 | CPPFLAGS="$CPPFLAGS -Ilinux" |
| 600 | fi |
| 601 | |
Elliott Hughes | 03a418e | 2018-06-15 13:11:40 -0700 | [diff] [blame] | 602 | AC_CHECK_TYPES([struct __aio_sigset],,, [#include <linux/aio_abi.h>]) |
Elliott Hughes | c187376 | 2018-12-19 15:13:36 -0800 | [diff] [blame] | 603 | |
Elliott Hughes | 03a418e | 2018-06-15 13:11:40 -0700 | [diff] [blame] | 604 | CPPFLAGS="$saved_CPPFLAGS" |
| 605 | |
Jeff Mahoney | 8cc6962 | 2016-05-18 18:09:39 -0400 | [diff] [blame] | 606 | AC_CHECK_HEADERS([linux/btrfs.h], [ |
| 607 | AC_CHECK_MEMBERS(m4_normalize([ |
| 608 | struct btrfs_ioctl_feature_flags.compat_flags, |
| 609 | struct btrfs_ioctl_fs_info_args.nodesize, |
Dmitry V. Levin | 7c0e887 | 2016-06-16 23:21:57 +0000 | [diff] [blame] | 610 | struct btrfs_ioctl_defrag_range_args.start, |
Elliott Hughes | 28e98bc | 2018-06-14 16:59:04 -0700 | [diff] [blame] | 611 | struct btrfs_ioctl_search_args_v2.buf_size, |
| 612 | struct btrfs_ioctl_logical_ino_args.flags |
Jeff Mahoney | 8cc6962 | 2016-05-18 18:09:39 -0400 | [diff] [blame] | 613 | ]),,, [ #include <stdio.h> |
| 614 | #include <linux/btrfs.h>]) |
Elliott Hughes | dc75b01 | 2017-07-05 13:54:44 -0700 | [diff] [blame] | 615 | AC_CHECK_DECLS(m4_normalize([BTRFS_COMPRESS_NONE, BTRFS_COMPRESS_ZLIB, |
| 616 | BTRFS_COMPRESS_LZO]),,,[ #include <stdio.h> |
Jeff Mahoney | 8cc6962 | 2016-05-18 18:09:39 -0400 | [diff] [blame] | 617 | #include <linux/btrfs.h>])]) |
| 618 | |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 619 | AC_CHECK_DECLS([sys_errlist]) |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 620 | AC_CHECK_DECLS(m4_normalize([ |
Dmitry V. Levin | 6974bd4 | 2013-11-12 21:20:50 +0000 | [diff] [blame] | 621 | PTRACE_PEEKUSER, |
Dmitry V. Levin | fadf379 | 2015-02-13 00:26:38 +0000 | [diff] [blame] | 622 | PTRACE_POKEUSER |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 623 | ]),,, [#include <sys/ptrace.h>]) |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 624 | |
Dmitry V. Levin | cf050db | 2012-05-02 10:21:49 +0000 | [diff] [blame] | 625 | AC_CHECK_DECLS(m4_normalize([ |
Dmitry V. Levin | d8ad1dd | 2014-04-26 15:22:08 +0000 | [diff] [blame] | 626 | P_PID, |
| 627 | P_PPID, |
| 628 | P_PGID, |
| 629 | P_SID, |
| 630 | P_CID, |
| 631 | P_UID, |
| 632 | P_GID, |
| 633 | P_ALL, |
| 634 | P_LWPID |
| 635 | ]),,, [#include <sys/wait.h>]) |
| 636 | |
| 637 | AC_CHECK_DECLS(m4_normalize([ |
Dmitry V. Levin | baf60d9 | 2014-04-26 14:12:33 +0000 | [diff] [blame] | 638 | LO_FLAGS_READ_ONLY, |
Elliott Hughes | d35df49 | 2017-02-15 15:19:05 -0800 | [diff] [blame] | 639 | LO_FLAGS_USE_AOPS, |
Dmitry V. Levin | cf050db | 2012-05-02 10:21:49 +0000 | [diff] [blame] | 640 | LO_FLAGS_AUTOCLEAR, |
Elliott Hughes | d35df49 | 2017-02-15 15:19:05 -0800 | [diff] [blame] | 641 | LO_FLAGS_PARTSCAN, |
| 642 | LO_FLAGS_DIRECT_IO |
Dmitry V. Levin | cf050db | 2012-05-02 10:21:49 +0000 | [diff] [blame] | 643 | ]),,, [#include <linux/loop.h>]) |
| 644 | |
Dmitry V. Levin | 6dbbe07 | 2014-04-26 13:54:12 +0000 | [diff] [blame] | 645 | AC_CHECK_DECLS(m4_normalize([ |
Dmitry V. Levin | 6dbbe07 | 2014-04-26 13:54:12 +0000 | [diff] [blame] | 646 | CTL_PROC, |
Dmitry V. Levin | 6dbbe07 | 2014-04-26 13:54:12 +0000 | [diff] [blame] | 647 | CTL_ARLAN, |
| 648 | CTL_S390DBF, |
| 649 | CTL_SUNRPC, |
| 650 | CTL_PM, |
| 651 | CTL_FRV, |
Dmitry V. Levin | 6dbbe07 | 2014-04-26 13:54:12 +0000 | [diff] [blame] | 652 | KERN_PRINTK_RATELIMIT, |
| 653 | KERN_PRINTK_RATELIMIT_BURST, |
| 654 | KERN_PTY, |
| 655 | KERN_NGROUPS_MAX, |
| 656 | KERN_SPARC_SCONS_PWROFF, |
| 657 | KERN_HZ_TIMER, |
| 658 | KERN_UNKNOWN_NMI_PANIC, |
| 659 | KERN_BOOTLOADER_TYPE, |
| 660 | KERN_RANDOMIZE, |
| 661 | KERN_SETUID_DUMPABLE, |
| 662 | KERN_SPIN_RETRY, |
| 663 | KERN_ACPI_VIDEO_FLAGS, |
| 664 | KERN_IA64_UNALIGNED, |
| 665 | KERN_COMPAT_LOG, |
| 666 | KERN_MAX_LOCK_DEPTH, |
| 667 | KERN_NMI_WATCHDOG, |
| 668 | KERN_PANIC_ON_NMI, |
Dmitry V. Levin | 6dbbe07 | 2014-04-26 13:54:12 +0000 | [diff] [blame] | 669 | NET_LLC, |
| 670 | NET_NETFILTER, |
| 671 | NET_DCCP, |
| 672 | NET_IRDA, |
Dmitry V. Levin | 6dbbe07 | 2014-04-26 13:54:12 +0000 | [diff] [blame] | 673 | NET_CORE_DESTROY_DELAY, |
Dmitry V. Levin | 6dbbe07 | 2014-04-26 13:54:12 +0000 | [diff] [blame] | 674 | NET_CORE_BUDGET, |
| 675 | NET_CORE_AEVENT_ETIME, |
| 676 | NET_CORE_AEVENT_RSEQTH, |
| 677 | NET_CORE_WARNINGS, |
Dmitry V. Levin | 6dbbe07 | 2014-04-26 13:54:12 +0000 | [diff] [blame] | 678 | NET_IPV4_IGMP_MAX_MSF, |
| 679 | NET_TCP_NO_METRICS_SAVE, |
| 680 | NET_TCP_DEFAULT_WIN_SCALE, |
| 681 | NET_TCP_MODERATE_RCVBUF, |
| 682 | NET_TCP_TSO_WIN_DIVISOR, |
| 683 | NET_TCP_BIC_BETA, |
| 684 | NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR, |
| 685 | NET_TCP_CONG_CONTROL, |
| 686 | NET_TCP_ABC, |
| 687 | NET_IPV4_IPFRAG_MAX_DIST, |
| 688 | NET_TCP_MTU_PROBING, |
| 689 | NET_TCP_BASE_MSS, |
| 690 | NET_IPV4_TCP_WORKAROUND_SIGNED_WINDOWS, |
| 691 | NET_TCP_DMA_COPYBREAK, |
| 692 | NET_TCP_SLOW_START_AFTER_IDLE, |
| 693 | NET_CIPSOV4_CACHE_ENABLE, |
| 694 | NET_CIPSOV4_CACHE_BUCKET_SIZE, |
| 695 | NET_CIPSOV4_RBM_OPTFMT, |
| 696 | NET_CIPSOV4_RBM_STRICTVALID, |
| 697 | NET_TCP_AVAIL_CONG_CONTROL, |
| 698 | NET_TCP_ALLOWED_CONG_CONTROL, |
| 699 | NET_TCP_MAX_SSTHRESH, |
| 700 | NET_TCP_FRTO_RESPONSE, |
Dmitry V. Levin | 6dbbe07 | 2014-04-26 13:54:12 +0000 | [diff] [blame] | 701 | NET_IPV4_ROUTE_GC_MIN_INTERVAL_MS, |
Dmitry V. Levin | 6dbbe07 | 2014-04-26 13:54:12 +0000 | [diff] [blame] | 702 | NET_IPV4_CONF_FORCE_IGMP_VERSION, |
| 703 | NET_IPV4_CONF_ARP_ANNOUNCE, |
| 704 | NET_IPV4_CONF_ARP_IGNORE, |
| 705 | NET_IPV4_CONF_PROMOTE_SECONDARIES, |
| 706 | NET_IPV4_CONF_ARP_ACCEPT, |
| 707 | NET_IPV4_CONF_ARP_NOTIFY, |
Dmitry V. Levin | 6dbbe07 | 2014-04-26 13:54:12 +0000 | [diff] [blame] | 708 | NET_IPV6_MLD_MAX_MSF, |
Dmitry V. Levin | 6dbbe07 | 2014-04-26 13:54:12 +0000 | [diff] [blame] | 709 | NET_IPV6_ROUTE_GC_MIN_INTERVAL_MS, |
Dmitry V. Levin | 6dbbe07 | 2014-04-26 13:54:12 +0000 | [diff] [blame] | 710 | VM_MAX_MAP_COUNT, |
| 711 | VM_LAPTOP_MODE, |
| 712 | VM_BLOCK_DUMP, |
| 713 | VM_HUGETLB_GROUP, |
| 714 | VM_VFS_CACHE_PRESSURE, |
| 715 | VM_LEGACY_VA_LAYOUT, |
| 716 | VM_SWAP_TOKEN_TIMEOUT |
| 717 | ]),,, |
| 718 | [#include <sys/types.h> |
| 719 | #include <linux/sysctl.h>]) |
| 720 | |
Philippe De Muyter | 0cc9614 | 2014-11-03 21:27:40 +0100 | [diff] [blame] | 721 | AC_CHECK_DECLS(m4_normalize([ |
| 722 | V4L2_FIELD_ANY, |
| 723 | V4L2_FIELD_NONE, |
| 724 | V4L2_FIELD_TOP, |
| 725 | V4L2_FIELD_BOTTOM, |
| 726 | V4L2_FIELD_INTERLACED, |
| 727 | V4L2_FIELD_SEQ_TB, |
| 728 | V4L2_FIELD_SEQ_BT, |
| 729 | V4L2_FIELD_ALTERNATE, |
| 730 | V4L2_FIELD_INTERLACED_TB, |
| 731 | V4L2_FIELD_INTERLACED_BT, |
| 732 | V4L2_BUF_TYPE_VIDEO_CAPTURE, |
| 733 | V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, |
| 734 | V4L2_BUF_TYPE_VIDEO_OUTPUT, |
| 735 | V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, |
| 736 | V4L2_BUF_TYPE_VIDEO_OVERLAY, |
| 737 | V4L2_BUF_TYPE_VBI_CAPTURE, |
| 738 | V4L2_BUF_TYPE_VBI_OUTPUT, |
| 739 | V4L2_BUF_TYPE_SLICED_VBI_CAPTURE, |
| 740 | V4L2_BUF_TYPE_SLICED_VBI_OUTPUT, |
| 741 | V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY, |
Elliott Hughes | 39bac05 | 2017-05-25 16:56:11 -0700 | [diff] [blame] | 742 | V4L2_BUF_TYPE_SDR_CAPTURE, |
| 743 | V4L2_BUF_TYPE_SDR_OUTPUT, |
Philippe De Muyter | 0cc9614 | 2014-11-03 21:27:40 +0100 | [diff] [blame] | 744 | V4L2_TUNER_RADIO, |
| 745 | V4L2_TUNER_ANALOG_TV, |
| 746 | V4L2_TUNER_DIGITAL_TV, |
| 747 | V4L2_MEMORY_MMAP, |
| 748 | V4L2_MEMORY_USERPTR, |
| 749 | V4L2_MEMORY_OVERLAY, |
| 750 | V4L2_MEMORY_DMABUF, |
| 751 | V4L2_COLORSPACE_SMPTE170M, |
| 752 | V4L2_COLORSPACE_SMPTE240M, |
| 753 | V4L2_COLORSPACE_REC709, |
| 754 | V4L2_COLORSPACE_BT878, |
| 755 | V4L2_COLORSPACE_470_SYSTEM_M, |
| 756 | V4L2_COLORSPACE_470_SYSTEM_BG, |
| 757 | V4L2_COLORSPACE_JPEG, |
| 758 | V4L2_COLORSPACE_SRGB, |
| 759 | V4L2_PRIORITY_UNSET, |
| 760 | V4L2_PRIORITY_BACKGROUND, |
| 761 | V4L2_PRIORITY_INTERACTIVE, |
| 762 | V4L2_PRIORITY_RECORD, |
| 763 | V4L2_FRMSIZE_TYPE_DISCRETE, |
| 764 | V4L2_FRMSIZE_TYPE_CONTINUOUS, |
| 765 | V4L2_FRMSIZE_TYPE_STEPWISE, |
| 766 | V4L2_FRMIVAL_TYPE_DISCRETE, |
| 767 | V4L2_FRMIVAL_TYPE_CONTINUOUS, |
| 768 | V4L2_FRMIVAL_TYPE_STEPWISE, |
| 769 | V4L2_CTRL_TYPE_INTEGER, |
| 770 | V4L2_CTRL_TYPE_BOOLEAN, |
| 771 | V4L2_CTRL_TYPE_MENU, |
| 772 | V4L2_CTRL_TYPE_BUTTON, |
| 773 | V4L2_CTRL_TYPE_INTEGER64, |
| 774 | V4L2_CTRL_TYPE_CTRL_CLASS, |
| 775 | V4L2_CTRL_TYPE_STRING, |
| 776 | V4L2_CTRL_TYPE_BITMASK, |
| 777 | V4L2_CTRL_TYPE_INTEGER_MENU |
Dmitry V. Levin | a8443f8 | 2016-05-14 00:36:27 +0000 | [diff] [blame] | 778 | ]),,, [#include <sys/time.h> |
| 779 | #include <linux/ioctl.h> |
| 780 | #include <linux/types.h> |
| 781 | #include <linux/videodev2.h>]) |
Philippe De Muyter | 0cc9614 | 2014-11-03 21:27:40 +0100 | [diff] [blame] | 782 | |
Elliott Hughes | 39bac05 | 2017-05-25 16:56:11 -0700 | [diff] [blame] | 783 | AC_CHECK_MEMBERS(m4_normalize([ |
| 784 | struct v4l2_window.global_alpha, |
| 785 | struct v4l2_sdr_format.buffersize |
| 786 | ]),,, [#include <sys/time.h> |
| 787 | #include <linux/ioctl.h> |
| 788 | #include <linux/types.h> |
| 789 | #include <linux/videodev2.h>]) |
| 790 | |
Dmitry V. Levin | 63e4f86 | 2012-03-15 20:42:46 +0000 | [diff] [blame] | 791 | AC_CHECK_SIZEOF([long]) |
Elliott Hughes | b755614 | 2018-02-20 17:03:16 -0800 | [diff] [blame] | 792 | SIZEOF_LONG="$ac_cv_sizeof_long" |
| 793 | AC_SUBST(SIZEOF_LONG) |
Dmitry V. Levin | 7a498be | 2013-05-04 19:51:57 +0000 | [diff] [blame] | 794 | AC_CHECK_SIZEOF([long long]) |
Dmitry V. Levin | 54cabef | 2014-03-03 23:09:47 +0000 | [diff] [blame] | 795 | AC_CHECK_SIZEOF([off_t],,[#include <sys/types.h>]) |
Elliott Hughes | d35df49 | 2017-02-15 15:19:05 -0800 | [diff] [blame] | 796 | AC_CHECK_SIZEOF([kernel_long_t],,[#include "$srcdir/kernel_types.h"]) |
Elliott Hughes | b755614 | 2018-02-20 17:03:16 -0800 | [diff] [blame] | 797 | SIZEOF_KERNEL_LONG_T="$ac_cv_sizeof_kernel_long_t" |
| 798 | AC_SUBST(SIZEOF_KERNEL_LONG_T) |
Dmitry V. Levin | 8c20d89 | 2015-05-21 16:19:40 +0000 | [diff] [blame] | 799 | 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] | 800 | |
Elliott Hughes | b755614 | 2018-02-20 17:03:16 -0800 | [diff] [blame] | 801 | |
Dmitry V. Levin | 59f63d3 | 2015-03-05 05:03:41 +0000 | [diff] [blame] | 802 | AC_CACHE_CHECK([for SIGRTMIN], [st_cv_SIGRTMIN], |
| 803 | [[st_cv_SIGRTMIN="$(echo SIGRTMIN | |
| 804 | $CPP $CPPFLAGS -P -imacros asm/signal.h - | |
| 805 | grep '^[0-9]')" |
Elliott Hughes | dc75b01 | 2017-07-05 13:54:44 -0700 | [diff] [blame] | 806 | test -n "$st_cv_SIGRTMIN" || st_cv_SIGRTMIN=no]]) |
Dmitry V. Levin | 59f63d3 | 2015-03-05 05:03:41 +0000 | [diff] [blame] | 807 | if test "x$st_cv_SIGRTMIN" != xno; then |
| 808 | AC_DEFINE_UNQUOTED([ASM_SIGRTMIN], [$st_cv_SIGRTMIN], |
| 809 | [SIGRTMIN defined in <asm/signal.h>]) |
| 810 | fi |
| 811 | AC_CACHE_CHECK([for SA_RESTORER], [st_cv_SA_RESTORER], |
| 812 | [st_cv_SA_RESTORER="$(echo SA_RESTORER | |
Dmitry V. Levin | ab3953b | 2014-02-08 00:15:52 +0000 | [diff] [blame] | 813 | $CPP $CPPFLAGS -P -imacros asm/signal.h - | |
| 814 | grep ^0x)" |
Elliott Hughes | dc75b01 | 2017-07-05 13:54:44 -0700 | [diff] [blame] | 815 | test -n "$st_cv_SA_RESTORER" || st_cv_SA_RESTORER=no]) |
Dmitry V. Levin | 59f63d3 | 2015-03-05 05:03:41 +0000 | [diff] [blame] | 816 | if test "x$st_cv_SA_RESTORER" != xno; then |
| 817 | AC_DEFINE_UNQUOTED([ASM_SA_RESTORER], [$st_cv_SA_RESTORER], |
Dmitry V. Levin | ab3953b | 2014-02-08 00:15:52 +0000 | [diff] [blame] | 818 | [SA_RESTORER defined in <asm/signal.h>]) |
| 819 | fi |
| 820 | |
Dmitry V. Levin | 38593e9 | 2014-02-26 16:51:28 +0000 | [diff] [blame] | 821 | AC_CACHE_CHECK([for __builtin_popcount], [st_cv_have___builtin_popcount], |
| 822 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([], [__builtin_popcount(0)])], |
| 823 | [st_cv_have___builtin_popcount=yes], |
| 824 | [st_cv_have___builtin_popcount=no])]) |
| 825 | if test "x$st_cv_have___builtin_popcount" = xyes; then |
| 826 | AC_DEFINE([HAVE___BUILTIN_POPCOUNT], [1], |
| 827 | [Define to 1 if the system provides __builtin_popcount function]) |
| 828 | fi |
| 829 | |
Elliott Hughes | dc75b01 | 2017-07-05 13:54:44 -0700 | [diff] [blame] | 830 | AC_CACHE_CHECK([for program_invocation_name], [st_cv_have_program_invocation_name], |
| 831 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <errno.h>]], |
| 832 | [[return !*program_invocation_name]])], |
| 833 | [st_cv_have_program_invocation_name=yes], |
| 834 | [st_cv_have_program_invocation_name=no])]) |
| 835 | if test "x$st_cv_have_program_invocation_name" = xyes; then |
| 836 | AC_DEFINE([HAVE_PROGRAM_INVOCATION_NAME], [1], |
| 837 | [Define to 1 if the system provides program_invocation_name variable]) |
| 838 | fi |
| 839 | |
Elliott Hughes | 28e98bc | 2018-06-14 16:59:04 -0700 | [diff] [blame] | 840 | AC_CACHE_CHECK([for static_assert], [st_cv_have_static_assert], |
| 841 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <assert.h>]], |
Elliott Hughes | 03a418e | 2018-06-15 13:11:40 -0700 | [diff] [blame] | 842 | [[static_assert(1,"")]] |
| 843 | ) |
| 844 | ], |
Elliott Hughes | 28e98bc | 2018-06-14 16:59:04 -0700 | [diff] [blame] | 845 | [st_cv_have_static_assert=yes], |
Elliott Hughes | 03a418e | 2018-06-15 13:11:40 -0700 | [diff] [blame] | 846 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([], |
| 847 | [[_Static_assert(1,"")]] |
| 848 | ) |
| 849 | ], |
| 850 | [st_cv_have_static_assert=_Static_assert], |
| 851 | [st_cv_have_static_assert=no] |
| 852 | ) |
| 853 | ] |
| 854 | ) |
| 855 | ] |
| 856 | ) |
| 857 | case "x$st_cv_have_static_assert" in |
| 858 | xyes) |
| 859 | AC_DEFINE([HAVE_STATIC_ASSERT], [1], |
| 860 | [Define to 1 if the system provides static_assert]) |
| 861 | ;; |
| 862 | x_Static_assert) |
| 863 | AC_DEFINE([HAVE__STATIC_ASSERT], [1], |
| 864 | [Define to 1 if the system provides _Static_assert]) |
| 865 | ;; |
| 866 | esac |
Elliott Hughes | 28e98bc | 2018-06-14 16:59:04 -0700 | [diff] [blame] | 867 | |
Dmitry V. Levin | 856b759 | 2015-02-27 05:01:25 +0000 | [diff] [blame] | 868 | AC_CHECK_LIB([dl], [dladdr], [dl_LIBS='-ldl'], [dl_LIBS=]) |
Dmitry V. Levin | 977550d | 2015-02-27 04:09:56 +0000 | [diff] [blame] | 869 | if test "x$ac_cv_lib_dl_dladdr" = xyes; then |
| 870 | 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] | 871 | fi |
| 872 | AC_SUBST(dl_LIBS) |
| 873 | |
Elliott Hughes | 28e98bc | 2018-06-14 16:59:04 -0700 | [diff] [blame] | 874 | saved_LIBS="$LIBS" |
| 875 | AC_SEARCH_LIBS([timer_create], [rt]) |
| 876 | LIBS="$saved_LIBS" |
| 877 | case "$ac_cv_search_timer_create" in |
| 878 | no) AC_MSG_FAILURE([failed to find timer_create]) ;; |
| 879 | -l*) timer_LIBS="$ac_cv_search_timer_create" ;; |
| 880 | *) timer_LIBS= ;; |
| 881 | esac |
| 882 | AC_SUBST(timer_LIBS) |
| 883 | |
| 884 | saved_LIBS="$LIBS" |
| 885 | AC_SEARCH_LIBS([clock_gettime], [rt]) |
| 886 | LIBS="$saved_LIBS" |
| 887 | case "$ac_cv_search_clock_gettime" in |
| 888 | no) AC_MSG_FAILURE([failed to find clock_gettime]) ;; |
| 889 | -l*) clock_LIBS="$ac_cv_search_clock_gettime" ;; |
| 890 | *) clock_LIBS= ;; |
| 891 | esac |
| 892 | AC_SUBST(clock_LIBS) |
| 893 | |
| 894 | saved_LIBS="$LIBS" |
| 895 | AC_SEARCH_LIBS([mq_open], [rt]) |
| 896 | LIBS="$saved_LIBS" |
| 897 | case "$ac_cv_search_mq_open" in |
| 898 | -l*) mq_LIBS="$ac_cv_search_mq_open" ;; |
| 899 | *) mq_LIBS= ;; |
| 900 | esac |
| 901 | AC_SUBST(mq_LIBS) |
| 902 | |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 903 | AC_PATH_PROG([PERL], [perl]) |
| 904 | |
Elliott Hughes | b755614 | 2018-02-20 17:03:16 -0800 | [diff] [blame] | 905 | AC_CHECK_TOOL([READELF], [readelf]) |
| 906 | |
Elliott Hughes | 03a418e | 2018-06-15 13:11:40 -0700 | [diff] [blame] | 907 | st_STACKTRACE |
Elliott Hughes | b755614 | 2018-02-20 17:03:16 -0800 | [diff] [blame] | 908 | |
Dmitry V. Levin | d59287d | 2015-01-13 04:57:27 +0000 | [diff] [blame] | 909 | if test "$arch" = mips && test "$no_create" != yes; then |
| 910 | mkdir -p linux/mips |
| 911 | if $srcdir/linux/mips/genstub.sh linux/mips; then |
| 912 | AC_MSG_RESULT([Generated MIPS syscallent stubs]) |
| 913 | else |
Elliott Hughes | b755614 | 2018-02-20 17:03:16 -0800 | [diff] [blame] | 914 | AC_MSG_ERROR([Failed to generate syscallent stubs]) |
Dmitry V. Levin | d59287d | 2015-01-13 04:57:27 +0000 | [diff] [blame] | 915 | fi |
| 916 | fi |
| 917 | |
Elliott Hughes | b755614 | 2018-02-20 17:03:16 -0800 | [diff] [blame] | 918 | AC_ARG_ENABLE([mpers], |
| 919 | [AS_HELP_STRING([--enable-mpers=yes|no|check|m32|mx32], |
| 920 | [whether to enable multiple personalities support required |
| 921 | for proper decoding of structures used by tracees with |
| 922 | personalities that differ from the personality of strace, |
| 923 | default is yes.])], |
| 924 | [case "$enableval" in |
| 925 | yes|no|check|m32|mx32) enable_mpers="$enableval" ;; |
| 926 | *) AC_MSG_ERROR([bad value $enableval for enable-mpers option. |
| 927 | Valid options are: yes, no, check, m32, mx32.]) |
| 928 | ;; |
| 929 | esac], |
| 930 | [enable_mpers=yes]) |
| 931 | |
| 932 | st_MPERS([m32], [aarch64|powerpc64|riscv|s390x|sparc64|tile|x32|x86_64]) |
Dmitry V. Levin | f8b4913 | 2015-07-23 11:19:47 +0000 | [diff] [blame] | 933 | st_MPERS([mx32], [x86_64]) |
Dmitry V. Levin | 679c47c | 2015-01-23 22:45:02 +0000 | [diff] [blame] | 934 | |
Elliott Hughes | d35df49 | 2017-02-15 15:19:05 -0800 | [diff] [blame] | 935 | AX_VALGRIND_DFLT([sgcheck], [off]) |
| 936 | AX_VALGRIND_CHECK |
| 937 | |
Dmitry V. Levin | e2b3df2 | 2016-06-07 18:04:53 +0000 | [diff] [blame] | 938 | AC_CONFIG_FILES([Makefile |
| 939 | tests/Makefile |
| 940 | tests-m32/Makefile |
| 941 | tests-mx32/Makefile |
Elliott Hughes | 77c3ff8 | 2017-09-08 17:11:00 -0700 | [diff] [blame] | 942 | strace.1 |
Elliott Hughes | b755614 | 2018-02-20 17:03:16 -0800 | [diff] [blame] | 943 | strace-log-merge.1 |
Dmitry V. Levin | 669efd8 | 2016-06-08 00:32:09 +0000 | [diff] [blame] | 944 | strace.spec |
| 945 | debian/changelog]) |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 946 | AC_OUTPUT |