Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 1 | dnl Process this file with autoconf to create configure. Use autoreconf. |
| 2 | AC_PREREQ(2.57) |
Dmitry V. Levin | dce7593 | 2013-04-30 23:52:12 +0000 | [diff] [blame] | 3 | AC_INIT([strace], |
| 4 | m4_esyscmd([./git-version-gen .tarball-version]), |
| 5 | [strace-devel@lists.sourceforge.net]) |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 6 | AC_CONFIG_SRCDIR([strace.c]) |
Roland McGrath | ffda2d3 | 2009-10-11 16:25:29 -0700 | [diff] [blame] | 7 | AC_CONFIG_AUX_DIR([.]) |
Mike Frysinger | bb3a0f7 | 2013-04-30 22:41:11 -0400 | [diff] [blame] | 8 | AC_CONFIG_HEADERS([config.h]) |
Dmitry V. Levin | 3cf90b6 | 2013-06-18 14:31:57 +0000 | [diff] [blame] | 9 | AM_INIT_AUTOMAKE([foreign dist-xz no-dist-gzip silent-rules parallel-tests]) |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 10 | AM_MAINTAINER_MODE |
| 11 | AC_CANONICAL_HOST |
| 12 | |
H.J. Lu | 35be581 | 2012-04-16 13:00:01 +0200 | [diff] [blame] | 13 | AC_PROG_CC |
H.J. Lu | 35be581 | 2012-04-16 13:00:01 +0200 | [diff] [blame] | 14 | AC_USE_SYSTEM_EXTENSIONS |
| 15 | |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 16 | AC_MSG_CHECKING([for supported architecture]) |
| 17 | case "$host_cpu" in |
Dmitry V. Levin | 87ea1f4 | 2008-11-10 22:21:41 +0000 | [diff] [blame] | 18 | bfin) |
| 19 | arch=bfin |
| 20 | AC_DEFINE([BFIN], 1, [Define for the Blackfin architecture.]) |
| 21 | ;; |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 22 | i[[3456]]86|pentium) |
| 23 | arch=i386 |
| 24 | AC_DEFINE([I386], 1, [Define for the i386 architecture.]) |
| 25 | ;; |
| 26 | ia64) |
| 27 | arch=ia64 |
| 28 | AC_DEFINE([IA64], 1, [Define for the IA64 architecture.]) |
| 29 | ;; |
| 30 | m68k) |
| 31 | arch=m68k |
| 32 | AC_DEFINE([M68K], 1, [Define for the m68k architecture.]) |
| 33 | ;; |
Roland McGrath | 6d1a65c | 2004-07-12 07:44:08 +0000 | [diff] [blame] | 34 | sparc64*) |
| 35 | arch=sparc64 |
| 36 | AC_DEFINE([SPARC64], 1, [Define for the SPARC64 architecture.]) |
| 37 | ;; |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 38 | sparc*) |
| 39 | arch=sparc |
| 40 | AC_DEFINE([SPARC], 1, [Define for the SPARC architecture.]) |
| 41 | ;; |
James Hogan | 5f999a8 | 2013-02-22 14:44:10 +0000 | [diff] [blame] | 42 | metag*) |
| 43 | arch=metag |
| 44 | AC_DEFINE([METAG], 1, [Define for the Meta architecture.]) |
| 45 | ;; |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 46 | mips*) |
| 47 | arch=mips |
| 48 | AC_DEFINE([MIPS], 1, [Define for the MIPS architecture.]) |
| 49 | ;; |
| 50 | alpha*) |
| 51 | arch=alpha |
| 52 | AC_DEFINE([ALPHA], 1, [Define for the Alpha architecture.]) |
| 53 | ;; |
Roland McGrath | eb28535 | 2003-01-14 09:59:00 +0000 | [diff] [blame] | 54 | powerpc*) |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 55 | arch=powerpc |
| 56 | AC_DEFINE([POWERPC], 1, [Define for the PowerPC architecture.]) |
Anton Blanchard | 9afc2ee | 2013-07-11 12:03:57 +1000 | [diff] [blame] | 57 | AC_TRY_COMPILE( |
| 58 | [#ifndef __LP64__ |
| 59 | # error 32 bit |
| 60 | #endif], [], ppc_bits=64, ppc_bits=32) |
| 61 | if test "$ppc_bits" = "64"; then |
Andreas Schwab | d69fa49 | 2010-07-12 21:39:57 +0200 | [diff] [blame] | 62 | AC_DEFINE([POWERPC64], 1, [Define for the PowerPC64 architecture.]) |
| 63 | fi |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 64 | ;; |
| 65 | arm*) |
| 66 | arch=arm |
| 67 | AC_DEFINE([ARM], 1, [Define for the ARM architecture.]) |
| 68 | ;; |
Steve McIntyre | d8d3bd3 | 2012-10-24 17:58:16 +0100 | [diff] [blame] | 69 | aarch64*) |
| 70 | arch=aarch64 |
| 71 | AC_DEFINE([AARCH64], 1, [Define for the AArch64 architecture.]) |
| 72 | ;; |
Denys Vlasenko | 5ae2b7c | 2009-02-27 20:32:52 +0000 | [diff] [blame] | 73 | avr32*) |
| 74 | arch=avr32 |
| 75 | AC_DEFINE([AVR32], 1, [Define for the AVR32 architecture.]) |
| 76 | ;; |
Vineet Gupta | 7daacbb | 2013-08-16 12:47:06 +0530 | [diff] [blame] | 77 | arc*) |
| 78 | arch=arc |
| 79 | AC_DEFINE([ARC], 1, [Define for the ARC architecture.]) |
| 80 | ;; |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 81 | s390) |
| 82 | arch=s390 |
| 83 | AC_DEFINE([S390], 1, [Define for the S390 architecture.]) |
| 84 | ;; |
| 85 | s390x) |
| 86 | arch=s390x |
| 87 | AC_DEFINE([S390X], 1, [Define for the S390x architecture.]) |
| 88 | ;; |
| 89 | hppa*|parisc*) |
| 90 | arch=hppa |
| 91 | AC_DEFINE([HPPA], 1, [Define for the HPPA architecture.]) |
| 92 | ;; |
Roland McGrath | 67828ca | 2007-11-01 21:32:49 +0000 | [diff] [blame] | 93 | sh64*) |
Roland McGrath | f5a4777 | 2003-06-26 22:40:42 +0000 | [diff] [blame] | 94 | arch=sh64 |
| 95 | AC_DEFINE([SH64], 1, [Define for the SH64 architecture.]) |
Roland McGrath | e1e584b | 2003-06-02 19:18:58 +0000 | [diff] [blame] | 96 | ;; |
Roland McGrath | 67828ca | 2007-11-01 21:32:49 +0000 | [diff] [blame] | 97 | sh*) |
| 98 | arch=sh |
| 99 | AC_DEFINE([SH], 1, [Define for the SH architecture.]) |
| 100 | ;; |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 101 | x86?64*) |
H.J. Lu | 35be581 | 2012-04-16 13:00:01 +0200 | [diff] [blame] | 102 | AC_TRY_COMPILE( |
| 103 | [#ifndef __ILP32__ |
| 104 | # error not x32 |
| 105 | #endif], [], arch=x32, arch=x86_64) |
| 106 | if test "$arch" = "x86_64"; then |
| 107 | AC_DEFINE([X86_64], 1, [Define for the 64bit AMD x86-64 architecture.]) |
| 108 | else |
| 109 | AC_DEFINE([X32], 1, [Define for the 32bit AMD x86-64 architecture.]) |
| 110 | fi |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 111 | ;; |
Denys Vlasenko | ea0e6e8 | 2009-02-25 17:08:40 +0000 | [diff] [blame] | 112 | cris|crisv10) |
| 113 | arch=crisv10 |
| 114 | AC_DEFINE([CRISV10], 1, [Define for the CRISv10 architecture.]) |
| 115 | ;; |
| 116 | crisv32) |
| 117 | arch=crisv32 |
| 118 | AC_DEFINE([CRISV32], 1, [Define for the CRISv32 architecture.]) |
| 119 | ;; |
Chris Metcalf | c8c6698 | 2009-12-28 10:00:15 -0500 | [diff] [blame] | 120 | tile*) |
| 121 | arch=tile |
| 122 | AC_DEFINE([TILE], 1, [Define for the Tile architecture]) |
| 123 | ;; |
Edgar E. Iglesias | 939caba | 2010-07-06 14:21:07 +0200 | [diff] [blame] | 124 | microblaze*) |
| 125 | arch=microblaze |
| 126 | AC_DEFINE([MICROBLAZE], 1, [Define for the MicroBlaze architecture.]) |
| 127 | ;; |
Christian Svensson | 492f81f | 2013-02-14 13:26:27 +0100 | [diff] [blame] | 128 | or1k*) |
| 129 | arch=or1k |
| 130 | AC_DEFINE([OR1K], 1, [Define for the OpenRISC 1000 architecture.]) |
| 131 | ;; |
| 132 | |
Chris Zankel | 8f636ed | 2013-03-25 10:22:07 -0700 | [diff] [blame] | 133 | xtensa*) |
| 134 | arch=xtensa |
| 135 | AC_DEFINE([XTENSA], 1, [Define for the Xtensa architecture]) |
| 136 | ;; |
| 137 | |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 138 | *) |
| 139 | AC_MSG_RESULT([NO!]) |
| 140 | AC_MSG_ERROR([architecture $host_cpu is not supported by strace]) |
| 141 | ;; |
| 142 | esac |
| 143 | AC_MSG_RESULT($arch) |
| 144 | |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 145 | AC_SUBST(arch) |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 146 | |
Roland McGrath | bc44e40 | 2004-07-12 05:45:08 +0000 | [diff] [blame] | 147 | AM_CONDITIONAL([I386], [test x$arch = xi386]) |
Roland McGrath | 2746edd | 2002-12-30 09:13:08 +0000 | [diff] [blame] | 148 | AM_CONDITIONAL([X86_64], [test x$arch = xx86_64]) |
H.J. Lu | 35be581 | 2012-04-16 13:00:01 +0200 | [diff] [blame] | 149 | AM_CONDITIONAL([X32], [test x$arch = xx32]) |
Roland McGrath | 45aeb6e | 2003-01-10 10:44:59 +0000 | [diff] [blame] | 150 | |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 151 | AC_INCLUDEDIR |
| 152 | |
Dmitry V. Levin | 0160e16 | 2014-03-18 23:37:43 +0000 | [diff] [blame] | 153 | AC_ARG_ENABLE([arm-oabi], |
| 154 | [AS_HELP_STRING([--enable-arm-oabi], |
| 155 | [enable OABI support on ARM EABI])], |
| 156 | [], [enable_arm_oabi=no]) |
| 157 | case "$enable_arm_oabi" in |
| 158 | yes) enable_arm_oabi=1 ;; |
| 159 | no) enable_arm_oabi=0 ;; |
| 160 | *) AC_MSG_ERROR([bad value $enable_arm_oabi for arm-oabi option]) ;; |
| 161 | esac |
| 162 | AC_DEFINE_UNQUOTED([ENABLE_ARM_OABI], [$enable_arm_oabi], |
| 163 | [Define to 1 if you want OABI support on ARM EABI.]) |
| 164 | |
Dmitry V. Levin | 918e49b | 2010-09-09 17:41:15 +0000 | [diff] [blame] | 165 | gl_WARN_ADD([-Wall]) |
Dmitry V. Levin | 1ed5d80 | 2010-09-09 17:42:28 +0000 | [diff] [blame] | 166 | gl_WARN_ADD([-Wwrite-strings]) |
Dmitry V. Levin | d376c92 | 2012-05-15 00:50:26 +0000 | [diff] [blame] | 167 | AC_ARG_ENABLE([gcc-Werror], |
| 168 | [AS_HELP_STRING([--enable-gcc-Werror], [turn on gcc's -Werror option])], |
| 169 | [case $enableval in |
| 170 | yes) gl_WARN_ADD([-Werror]) ;; |
| 171 | no) ;; |
| 172 | *) AC_MSG_ERROR([bad value $enableval for gcc-Werror option]) ;; |
| 173 | esac] |
| 174 | ) |
Dmitry V. Levin | 918e49b | 2010-09-09 17:41:15 +0000 | [diff] [blame] | 175 | AC_SUBST([WARN_CFLAGS]) |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 176 | |
| 177 | AC_PROG_CPP |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 178 | AC_PROG_INSTALL |
| 179 | AC_C_CONST |
Mike Frysinger | 6d12afd | 2010-09-12 03:39:55 -0400 | [diff] [blame] | 180 | AC_C_BIGENDIAN |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 181 | AC_HEADER_STDC |
Roland McGrath | 639658b | 2008-08-01 01:06:31 +0000 | [diff] [blame] | 182 | AC_HEADER_STDBOOL |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 183 | AC_HEADER_DIRENT |
| 184 | AC_HEADER_STAT |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 185 | AC_CHECK_MEMBERS(m4_normalize([ |
| 186 | struct stat.st_aclcnt, |
| 187 | struct stat.st_blksize, |
| 188 | struct stat.st_blocks, |
| 189 | struct stat.st_flags, |
| 190 | struct stat.st_fstype, |
| 191 | struct stat.st_gen, |
| 192 | struct stat.st_level, |
| 193 | struct stat.st_rdev |
| 194 | ])) |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 195 | AC_STAT64 |
Bernhard Reutner-Fischer | 9906e6d | 2009-10-14 16:33:58 +0200 | [diff] [blame] | 196 | AC_STATFS64 |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 197 | |
| 198 | AC_TYPE_SIGNAL |
| 199 | AC_TYPE_UID_T |
| 200 | AC_TYPE_MODE_T |
| 201 | AC_TYPE_GETGROUPS |
| 202 | AC_HEADER_MAJOR |
Roland McGrath | acf06ef | 2003-01-10 19:57:34 +0000 | [diff] [blame] | 203 | AC_CHECK_TYPES([sig_atomic_t, siginfo_t],,, [#include <signal.h>]) |
Roland McGrath | e07cd60 | 2003-02-26 20:34:02 +0000 | [diff] [blame] | 204 | AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_scope_id],,, |
| 205 | [#include <sys/types.h> |
| 206 | #include <sys/socket.h> |
| 207 | #include <netinet/in.h>]) |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 208 | AC_LITTLE_ENDIAN_LONG_LONG |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 209 | |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 210 | AC_CHECK_FUNCS(m4_normalize([ |
Dmitry V. Levin | d354130 | 2014-02-26 00:01:00 +0000 | [diff] [blame] | 211 | fopen64 |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 212 | fork |
Dmitry V. Levin | d354130 | 2014-02-26 00:01:00 +0000 | [diff] [blame] | 213 | fputs_unlocked |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 214 | if_indextoname |
| 215 | inet_ntop |
| 216 | prctl |
| 217 | process_vm_readv |
| 218 | sendmsg |
| 219 | sigaction |
| 220 | stpcpy |
| 221 | strerror |
| 222 | strsignal |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 223 | ])) |
| 224 | AC_CHECK_HEADERS(m4_normalize([ |
| 225 | asm/cachectl.h |
| 226 | asm/sysmips.h |
Dmitry V. Levin | c41808b | 2013-03-18 00:52:29 +0000 | [diff] [blame] | 227 | elf.h |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 228 | inttypes.h |
| 229 | ioctls.h |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 230 | linux/capability.h |
Ben Noordhuis | 88eafd8 | 2013-02-04 00:04:57 +0100 | [diff] [blame] | 231 | linux/perf_event.h |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 232 | linux/ptrace.h |
| 233 | linux/utsname.h |
| 234 | mqueue.h |
| 235 | netinet/sctp.h |
| 236 | poll.h |
Dmitry V. Levin | fdb896e | 2014-02-25 23:04:55 +0000 | [diff] [blame] | 237 | scsi/sg.h |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 238 | stropts.h |
| 239 | sys/acl.h |
| 240 | sys/asynch.h |
| 241 | sys/conf.h |
| 242 | sys/epoll.h |
| 243 | sys/filio.h |
| 244 | sys/ioctl.h |
| 245 | sys/poll.h |
| 246 | sys/ptrace.h |
| 247 | sys/reg.h |
| 248 | sys/uio.h |
| 249 | sys/vfs.h |
| 250 | ])) |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 251 | AC_CHECK_HEADERS([linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h], |
Roland McGrath | e7fa305 | 2007-07-05 20:50:34 +0000 | [diff] [blame] | 252 | [], [], [#include <stddef.h> |
Andreas Schwab | 360986b | 2010-03-08 16:07:52 +0100 | [diff] [blame] | 253 | #include <sys/socket.h> |
| 254 | #include <asm/types.h>]) |
Roland McGrath | 41074c0 | 2002-12-30 10:23:01 +0000 | [diff] [blame] | 255 | AC_CHECK_HEADERS([asm/sigcontext.h], [], [], [#include <signal.h>]) |
Dmitry V. Levin | e2de3bd | 2013-11-12 15:27:38 +0000 | [diff] [blame] | 256 | AC_CHECK_TYPES([struct sigcontext],,, [#include <signal.h>]) |
Roland McGrath | a7a0d38 | 2003-01-10 19:55:30 +0000 | [diff] [blame] | 257 | AC_CHECK_HEADERS([netinet/tcp.h netinet/udp.h],,, [#include <netinet/in.h>]) |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 258 | |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 259 | AC_CHECK_MEMBERS([struct msghdr.msg_control],,, [#include <sys/socket.h>]) |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 260 | |
Roland McGrath | 79db8af | 2003-06-27 21:20:09 +0000 | [diff] [blame] | 261 | AC_CHECK_TYPES([struct __old_kernel_stat],,, [#include <asm/stat.h>]) |
| 262 | |
Ali Polatel | 0b4060f | 2013-09-24 20:04:32 +0300 | [diff] [blame] | 263 | AC_CHECK_TYPES([struct pt_all_user_regs, struct ia64_fpreg, struct ptrace_peeksiginfo_args],,, |
Roland McGrath | ce9f074 | 2004-03-01 21:29:22 +0000 | [diff] [blame] | 264 | [#include <sys/ptrace.h>]) |
| 265 | |
Dmitry V. Levin | ea22e97 | 2012-05-01 20:56:32 +0000 | [diff] [blame] | 266 | AC_CHECK_MEMBERS([struct utsname.domainname],,, [#include <sys/utsname.h>]) |
| 267 | |
Dmitry V. Levin | ae5aa47 | 2013-11-11 23:54:30 +0000 | [diff] [blame] | 268 | AC_CHECK_MEMBERS([struct sigevent._sigev_un._pad, |
Dmitry V. Levin | bc091e3 | 2014-03-11 22:18:40 +0000 | [diff] [blame] | 269 | struct sigevent.__pad, |
| 270 | siginfo_t.si_syscall],,, [#include <signal.h>]) |
Dmitry V. Levin | ae5aa47 | 2013-11-11 23:54:30 +0000 | [diff] [blame] | 271 | |
Dmitry V. Levin | 594eb8f | 2013-11-12 21:49:03 +0000 | [diff] [blame] | 272 | AC_CHECK_TYPES([struct flock64],,, [#include <fcntl.h>]) |
| 273 | |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 274 | AC_CHECK_DECLS([sys_errlist]) |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 275 | AC_CHECK_DECLS(m4_normalize([ |
| 276 | PTRACE_EVENT_CLONE, |
| 277 | PTRACE_EVENT_EXEC, |
| 278 | PTRACE_EVENT_EXIT, |
| 279 | PTRACE_EVENT_FORK, |
| 280 | PTRACE_EVENT_VFORK, |
| 281 | PTRACE_EVENT_VFORK_DONE, |
| 282 | PTRACE_GETEVENTMSG, |
| 283 | PTRACE_GETSIGINFO, |
| 284 | PTRACE_O_TRACECLONE, |
| 285 | PTRACE_O_TRACEEXEC, |
| 286 | PTRACE_O_TRACEEXIT, |
| 287 | PTRACE_O_TRACEFORK, |
| 288 | PTRACE_O_TRACESYSGOOD, |
| 289 | PTRACE_O_TRACEVFORK, |
Dmitry V. Levin | 6974bd4 | 2013-11-12 21:20:50 +0000 | [diff] [blame] | 290 | PTRACE_PEEKUSER, |
| 291 | PTRACE_POKEUSER, |
Dmitry V. Levin | d8879f4 | 2012-03-25 15:12:16 +0000 | [diff] [blame] | 292 | PTRACE_SETOPTIONS |
| 293 | ]),,, [#include <sys/ptrace.h>]) |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 294 | |
Dmitry V. Levin | cf050db | 2012-05-02 10:21:49 +0000 | [diff] [blame] | 295 | AC_CHECK_DECLS(m4_normalize([ |
Dmitry V. Levin | d8ad1dd | 2014-04-26 15:22:08 +0000 | [diff] [blame] | 296 | P_PID, |
| 297 | P_PPID, |
| 298 | P_PGID, |
| 299 | P_SID, |
| 300 | P_CID, |
| 301 | P_UID, |
| 302 | P_GID, |
| 303 | P_ALL, |
| 304 | P_LWPID |
| 305 | ]),,, [#include <sys/wait.h>]) |
| 306 | |
| 307 | AC_CHECK_DECLS(m4_normalize([ |
Dmitry V. Levin | baf60d9 | 2014-04-26 14:12:33 +0000 | [diff] [blame] | 308 | LO_FLAGS_READ_ONLY, |
Dmitry V. Levin | cf050db | 2012-05-02 10:21:49 +0000 | [diff] [blame] | 309 | LO_FLAGS_AUTOCLEAR, |
| 310 | LO_FLAGS_PARTSCAN |
| 311 | ]),,, [#include <linux/loop.h>]) |
| 312 | |
Dmitry V. Levin | 6dbbe07 | 2014-04-26 13:54:12 +0000 | [diff] [blame] | 313 | AC_CHECK_DECLS(m4_normalize([ |
| 314 | CTL_KERN, |
| 315 | CTL_VM, |
| 316 | CTL_NET, |
| 317 | CTL_PROC, |
| 318 | CTL_FS, |
| 319 | CTL_DEBUG, |
| 320 | CTL_DEV, |
| 321 | CTL_BUS, |
| 322 | CTL_ABI, |
| 323 | CTL_CPU, |
| 324 | CTL_ARLAN, |
| 325 | CTL_S390DBF, |
| 326 | CTL_SUNRPC, |
| 327 | CTL_PM, |
| 328 | CTL_FRV, |
| 329 | KERN_OSTYPE, |
| 330 | KERN_OSRELEASE, |
| 331 | KERN_OSREV, |
| 332 | KERN_VERSION, |
| 333 | KERN_SECUREMASK, |
| 334 | KERN_PROF, |
| 335 | KERN_NODENAME, |
| 336 | KERN_DOMAINNAME, |
| 337 | KERN_PANIC, |
| 338 | KERN_REALROOTDEV, |
| 339 | KERN_SPARC_REBOOT, |
| 340 | KERN_CTLALTDEL, |
| 341 | KERN_PRINTK, |
| 342 | KERN_NAMETRANS, |
| 343 | KERN_PPC_HTABRECLAIM, |
| 344 | KERN_PPC_ZEROPAGED, |
| 345 | KERN_PPC_POWERSAVE_NAP, |
| 346 | KERN_MODPROBE, |
| 347 | KERN_SG_BIG_BUFF, |
| 348 | KERN_ACCT, |
| 349 | KERN_PPC_L2CR, |
| 350 | KERN_RTSIGNR, |
| 351 | KERN_RTSIGMAX, |
| 352 | KERN_SHMMAX, |
| 353 | KERN_MSGMAX, |
| 354 | KERN_MSGMNB, |
| 355 | KERN_MSGPOOL, |
| 356 | KERN_SYSRQ, |
| 357 | KERN_MAX_THREADS, |
| 358 | KERN_RANDOM, |
| 359 | KERN_SHMALL, |
| 360 | KERN_MSGMNI, |
| 361 | KERN_SEM, |
| 362 | KERN_SPARC_STOP_A, |
| 363 | KERN_SHMMNI, |
| 364 | KERN_OVERFLOWUID, |
| 365 | KERN_OVERFLOWGID, |
| 366 | KERN_SHMPATH, |
| 367 | KERN_HOTPLUG, |
| 368 | KERN_IEEE_EMULATION_WARNINGS, |
| 369 | KERN_S390_USER_DEBUG_LOGGING, |
| 370 | KERN_CORE_USES_PID, |
| 371 | KERN_TAINTED, |
| 372 | KERN_CADPID, |
| 373 | KERN_PIDMAX, |
| 374 | KERN_CORE_PATTERN, |
| 375 | KERN_PANIC_ON_OOPS, |
| 376 | KERN_HPPA_PWRSW, |
| 377 | KERN_HPPA_UNALIGNED, |
| 378 | KERN_PRINTK_RATELIMIT, |
| 379 | KERN_PRINTK_RATELIMIT_BURST, |
| 380 | KERN_PTY, |
| 381 | KERN_NGROUPS_MAX, |
| 382 | KERN_SPARC_SCONS_PWROFF, |
| 383 | KERN_HZ_TIMER, |
| 384 | KERN_UNKNOWN_NMI_PANIC, |
| 385 | KERN_BOOTLOADER_TYPE, |
| 386 | KERN_RANDOMIZE, |
| 387 | KERN_SETUID_DUMPABLE, |
| 388 | KERN_SPIN_RETRY, |
| 389 | KERN_ACPI_VIDEO_FLAGS, |
| 390 | KERN_IA64_UNALIGNED, |
| 391 | KERN_COMPAT_LOG, |
| 392 | KERN_MAX_LOCK_DEPTH, |
| 393 | KERN_NMI_WATCHDOG, |
| 394 | KERN_PANIC_ON_NMI, |
| 395 | NET_CORE, |
| 396 | NET_ETHER, |
| 397 | NET_802, |
| 398 | NET_UNIX, |
| 399 | NET_IPV4, |
| 400 | NET_IPX, |
| 401 | NET_ATALK, |
| 402 | NET_NETROM, |
| 403 | NET_AX25, |
| 404 | NET_BRIDGE, |
| 405 | NET_ROSE, |
| 406 | NET_IPV6, |
| 407 | NET_X25, |
| 408 | NET_TR, |
| 409 | NET_DECNET, |
| 410 | NET_ECONET, |
| 411 | NET_SCTP, |
| 412 | NET_LLC, |
| 413 | NET_NETFILTER, |
| 414 | NET_DCCP, |
| 415 | NET_IRDA, |
| 416 | NET_CORE_WMEM_MAX, |
| 417 | NET_CORE_RMEM_MAX, |
| 418 | NET_CORE_WMEM_DEFAULT, |
| 419 | NET_CORE_RMEM_DEFAULT, |
| 420 | NET_CORE_DESTROY_DELAY, |
| 421 | NET_CORE_MAX_BACKLOG, |
| 422 | NET_CORE_FASTROUTE, |
| 423 | NET_CORE_MSG_COST, |
| 424 | NET_CORE_MSG_BURST, |
| 425 | NET_CORE_OPTMEM_MAX, |
| 426 | NET_CORE_HOT_LIST_LENGTH, |
| 427 | NET_CORE_DIVERT_VERSION, |
| 428 | NET_CORE_NO_CONG_THRESH, |
| 429 | NET_CORE_NO_CONG, |
| 430 | NET_CORE_LO_CONG, |
| 431 | NET_CORE_MOD_CONG, |
| 432 | NET_CORE_DEV_WEIGHT, |
| 433 | NET_CORE_SOMAXCONN, |
| 434 | NET_CORE_BUDGET, |
| 435 | NET_CORE_AEVENT_ETIME, |
| 436 | NET_CORE_AEVENT_RSEQTH, |
| 437 | NET_CORE_WARNINGS, |
| 438 | NET_IPV4_FORWARD, |
| 439 | NET_IPV4_DYNADDR, |
| 440 | NET_IPV4_CONF, |
| 441 | NET_IPV4_NEIGH, |
| 442 | NET_IPV4_ROUTE, |
| 443 | NET_IPV4_FIB_HASH, |
| 444 | NET_IPV4_NETFILTER, |
| 445 | NET_IPV4_TCP_TIMESTAMPS, |
| 446 | NET_IPV4_TCP_WINDOW_SCALING, |
| 447 | NET_IPV4_TCP_SACK, |
| 448 | NET_IPV4_TCP_RETRANS_COLLAPSE, |
| 449 | NET_IPV4_DEFAULT_TTL, |
| 450 | NET_IPV4_AUTOCONFIG, |
| 451 | NET_IPV4_NO_PMTU_DISC, |
| 452 | NET_IPV4_TCP_SYN_RETRIES, |
| 453 | NET_IPV4_IPFRAG_HIGH_THRESH, |
| 454 | NET_IPV4_IPFRAG_LOW_THRESH, |
| 455 | NET_IPV4_IPFRAG_TIME, |
| 456 | NET_IPV4_TCP_MAX_KA_PROBES, |
| 457 | NET_IPV4_TCP_KEEPALIVE_TIME, |
| 458 | NET_IPV4_TCP_KEEPALIVE_PROBES, |
| 459 | NET_IPV4_TCP_RETRIES1, |
| 460 | NET_IPV4_TCP_RETRIES2, |
| 461 | NET_IPV4_TCP_FIN_TIMEOUT, |
| 462 | NET_IPV4_IP_MASQ_DEBUG, |
| 463 | NET_TCP_SYNCOOKIES, |
| 464 | NET_TCP_STDURG, |
| 465 | NET_TCP_RFC1337, |
| 466 | NET_TCP_SYN_TAILDROP, |
| 467 | NET_TCP_MAX_SYN_BACKLOG, |
| 468 | NET_IPV4_LOCAL_PORT_RANGE, |
| 469 | NET_IPV4_ICMP_ECHO_IGNORE_ALL, |
| 470 | NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS, |
| 471 | NET_IPV4_ICMP_SOURCEQUENCH_RATE, |
| 472 | NET_IPV4_ICMP_DESTUNREACH_RATE, |
| 473 | NET_IPV4_ICMP_TIMEEXCEED_RATE, |
| 474 | NET_IPV4_ICMP_PARAMPROB_RATE, |
| 475 | NET_IPV4_ICMP_ECHOREPLY_RATE, |
| 476 | NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES, |
| 477 | NET_IPV4_IGMP_MAX_MEMBERSHIPS, |
| 478 | NET_TCP_TW_RECYCLE, |
| 479 | NET_IPV4_ALWAYS_DEFRAG, |
| 480 | NET_IPV4_TCP_KEEPALIVE_INTVL, |
| 481 | NET_IPV4_INET_PEER_THRESHOLD, |
| 482 | NET_IPV4_INET_PEER_MINTTL, |
| 483 | NET_IPV4_INET_PEER_MAXTTL, |
| 484 | NET_IPV4_INET_PEER_GC_MINTIME, |
| 485 | NET_IPV4_INET_PEER_GC_MAXTIME, |
| 486 | NET_TCP_ORPHAN_RETRIES, |
| 487 | NET_TCP_ABORT_ON_OVERFLOW, |
| 488 | NET_TCP_SYNACK_RETRIES, |
| 489 | NET_TCP_MAX_ORPHANS, |
| 490 | NET_TCP_MAX_TW_BUCKETS, |
| 491 | NET_TCP_FACK, |
| 492 | NET_TCP_REORDERING, |
| 493 | NET_TCP_ECN, |
| 494 | NET_TCP_DSACK, |
| 495 | NET_TCP_MEM, |
| 496 | NET_TCP_WMEM, |
| 497 | NET_TCP_RMEM, |
| 498 | NET_TCP_APP_WIN, |
| 499 | NET_TCP_ADV_WIN_SCALE, |
| 500 | NET_IPV4_NONLOCAL_BIND, |
| 501 | NET_IPV4_ICMP_RATELIMIT, |
| 502 | NET_IPV4_ICMP_RATEMASK, |
| 503 | NET_TCP_TW_REUSE, |
| 504 | NET_TCP_FRTO, |
| 505 | NET_TCP_LOW_LATENCY, |
| 506 | NET_IPV4_IPFRAG_SECRET_INTERVAL, |
| 507 | NET_IPV4_IGMP_MAX_MSF, |
| 508 | NET_TCP_NO_METRICS_SAVE, |
| 509 | NET_TCP_DEFAULT_WIN_SCALE, |
| 510 | NET_TCP_MODERATE_RCVBUF, |
| 511 | NET_TCP_TSO_WIN_DIVISOR, |
| 512 | NET_TCP_BIC_BETA, |
| 513 | NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR, |
| 514 | NET_TCP_CONG_CONTROL, |
| 515 | NET_TCP_ABC, |
| 516 | NET_IPV4_IPFRAG_MAX_DIST, |
| 517 | NET_TCP_MTU_PROBING, |
| 518 | NET_TCP_BASE_MSS, |
| 519 | NET_IPV4_TCP_WORKAROUND_SIGNED_WINDOWS, |
| 520 | NET_TCP_DMA_COPYBREAK, |
| 521 | NET_TCP_SLOW_START_AFTER_IDLE, |
| 522 | NET_CIPSOV4_CACHE_ENABLE, |
| 523 | NET_CIPSOV4_CACHE_BUCKET_SIZE, |
| 524 | NET_CIPSOV4_RBM_OPTFMT, |
| 525 | NET_CIPSOV4_RBM_STRICTVALID, |
| 526 | NET_TCP_AVAIL_CONG_CONTROL, |
| 527 | NET_TCP_ALLOWED_CONG_CONTROL, |
| 528 | NET_TCP_MAX_SSTHRESH, |
| 529 | NET_TCP_FRTO_RESPONSE, |
| 530 | NET_IPV4_ROUTE_FLUSH, |
| 531 | NET_IPV4_ROUTE_MIN_DELAY, |
| 532 | NET_IPV4_ROUTE_MAX_DELAY, |
| 533 | NET_IPV4_ROUTE_GC_THRESH, |
| 534 | NET_IPV4_ROUTE_MAX_SIZE, |
| 535 | NET_IPV4_ROUTE_GC_MIN_INTERVAL, |
| 536 | NET_IPV4_ROUTE_GC_TIMEOUT, |
| 537 | NET_IPV4_ROUTE_GC_INTERVAL, |
| 538 | NET_IPV4_ROUTE_REDIRECT_LOAD, |
| 539 | NET_IPV4_ROUTE_REDIRECT_NUMBER, |
| 540 | NET_IPV4_ROUTE_REDIRECT_SILENCE, |
| 541 | NET_IPV4_ROUTE_ERROR_COST, |
| 542 | NET_IPV4_ROUTE_ERROR_BURST, |
| 543 | NET_IPV4_ROUTE_GC_ELASTICITY, |
| 544 | NET_IPV4_ROUTE_MTU_EXPIRES, |
| 545 | NET_IPV4_ROUTE_MIN_PMTU, |
| 546 | NET_IPV4_ROUTE_MIN_ADVMSS, |
| 547 | NET_IPV4_ROUTE_SECRET_INTERVAL, |
| 548 | NET_IPV4_ROUTE_GC_MIN_INTERVAL_MS, |
| 549 | NET_IPV4_CONF_FORWARDING, |
| 550 | NET_IPV4_CONF_MC_FORWARDING, |
| 551 | NET_IPV4_CONF_PROXY_ARP, |
| 552 | NET_IPV4_CONF_ACCEPT_REDIRECTS, |
| 553 | NET_IPV4_CONF_SECURE_REDIRECTS, |
| 554 | NET_IPV4_CONF_SEND_REDIRECTS, |
| 555 | NET_IPV4_CONF_SHARED_MEDIA, |
| 556 | NET_IPV4_CONF_RP_FILTER, |
| 557 | NET_IPV4_CONF_ACCEPT_SOURCE_ROUTE, |
| 558 | NET_IPV4_CONF_BOOTP_RELAY, |
| 559 | NET_IPV4_CONF_LOG_MARTIANS, |
| 560 | NET_IPV4_CONF_TAG, |
| 561 | NET_IPV4_CONF_ARPFILTER, |
| 562 | NET_IPV4_CONF_MEDIUM_ID, |
| 563 | NET_IPV4_CONF_NOXFRM, |
| 564 | NET_IPV4_CONF_NOPOLICY, |
| 565 | NET_IPV4_CONF_FORCE_IGMP_VERSION, |
| 566 | NET_IPV4_CONF_ARP_ANNOUNCE, |
| 567 | NET_IPV4_CONF_ARP_IGNORE, |
| 568 | NET_IPV4_CONF_PROMOTE_SECONDARIES, |
| 569 | NET_IPV4_CONF_ARP_ACCEPT, |
| 570 | NET_IPV4_CONF_ARP_NOTIFY, |
| 571 | NET_IPV6_CONF, |
| 572 | NET_IPV6_NEIGH, |
| 573 | NET_IPV6_ROUTE, |
| 574 | NET_IPV6_ICMP, |
| 575 | NET_IPV6_BINDV6ONLY, |
| 576 | NET_IPV6_IP6FRAG_HIGH_THRESH, |
| 577 | NET_IPV6_IP6FRAG_LOW_THRESH, |
| 578 | NET_IPV6_IP6FRAG_TIME, |
| 579 | NET_IPV6_IP6FRAG_SECRET_INTERVAL, |
| 580 | NET_IPV6_MLD_MAX_MSF, |
| 581 | NET_IPV6_ROUTE_FLUSH, |
| 582 | NET_IPV6_ROUTE_GC_THRESH, |
| 583 | NET_IPV6_ROUTE_MAX_SIZE, |
| 584 | NET_IPV6_ROUTE_GC_MIN_INTERVAL, |
| 585 | NET_IPV6_ROUTE_GC_TIMEOUT, |
| 586 | NET_IPV6_ROUTE_GC_INTERVAL, |
| 587 | NET_IPV6_ROUTE_GC_ELASTICITY, |
| 588 | NET_IPV6_ROUTE_MTU_EXPIRES, |
| 589 | NET_IPV6_ROUTE_MIN_ADVMSS, |
| 590 | NET_IPV6_ROUTE_GC_MIN_INTERVAL_MS, |
| 591 | NET_UNIX_DESTROY_DELAY, |
| 592 | NET_UNIX_DELETE_DELAY, |
| 593 | NET_UNIX_MAX_DGRAM_QLEN, |
| 594 | VM_OVERCOMMIT_MEMORY, |
| 595 | VM_PAGE_CLUSTER, |
| 596 | VM_DIRTY_BACKGROUND, |
| 597 | VM_DIRTY_RATIO, |
| 598 | VM_DIRTY_WB_CS, |
| 599 | VM_DIRTY_EXPIRE_CS, |
| 600 | VM_NR_PDFLUSH_THREADS, |
| 601 | VM_OVERCOMMIT_RATIO, |
| 602 | VM_PAGEBUF, |
| 603 | VM_HUGETLB_PAGES, |
| 604 | VM_SWAPPINESS, |
| 605 | VM_LOWMEM_RESERVE_RATIO, |
| 606 | VM_MIN_FREE_KBYTES, |
| 607 | VM_MAX_MAP_COUNT, |
| 608 | VM_LAPTOP_MODE, |
| 609 | VM_BLOCK_DUMP, |
| 610 | VM_HUGETLB_GROUP, |
| 611 | VM_VFS_CACHE_PRESSURE, |
| 612 | VM_LEGACY_VA_LAYOUT, |
| 613 | VM_SWAP_TOKEN_TIMEOUT |
| 614 | ]),,, |
| 615 | [#include <sys/types.h> |
| 616 | #include <linux/sysctl.h>]) |
| 617 | |
Dmitry V. Levin | 25caa31 | 2011-08-16 21:36:16 +0000 | [diff] [blame] | 618 | AC_CACHE_CHECK([for BLKGETSIZE64], [ac_cv_have_blkgetsize64], |
| 619 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ |
| 620 | #include <stdlib.h> |
| 621 | #include <linux/fs.h>], [return !BLKGETSIZE64;])], |
| 622 | [ac_cv_have_blkgetsize64=yes], [ac_cv_have_blkgetsize64=no])] |
| 623 | if test $ac_cv_have_blkgetsize64 = yes; then |
| 624 | AC_DEFINE([HAVE_BLKGETSIZE64], [1], [Define to 1 if you have BLKGETSIZE64.]) |
| 625 | fi) |
| 626 | |
Dmitry V. Levin | 63e4f86 | 2012-03-15 20:42:46 +0000 | [diff] [blame] | 627 | AC_CHECK_SIZEOF([long]) |
Dmitry V. Levin | 7a498be | 2013-05-04 19:51:57 +0000 | [diff] [blame] | 628 | AC_CHECK_SIZEOF([long long]) |
Dmitry V. Levin | 54cabef | 2014-03-03 23:09:47 +0000 | [diff] [blame] | 629 | AC_CHECK_SIZEOF([off_t],,[#include <sys/types.h>]) |
Dmitry V. Levin | 63e4f86 | 2012-03-15 20:42:46 +0000 | [diff] [blame] | 630 | |
Dmitry V. Levin | ab3953b | 2014-02-08 00:15:52 +0000 | [diff] [blame] | 631 | AC_CACHE_CHECK([for SA_RESTORER], [st_cv_sa_restorer], |
| 632 | [st_cv_sa_restorer="$(echo SA_RESTORER | |
| 633 | $CPP $CPPFLAGS -P -imacros asm/signal.h - | |
| 634 | grep ^0x)" |
| 635 | test -n "$st_cv_sa_restorer" || st_cv_sa_restorer=no]) |
| 636 | if test "x$st_cv_sa_restorer" != xno; then |
| 637 | AC_DEFINE_UNQUOTED([ASM_SA_RESTORER], [$st_cv_sa_restorer], |
| 638 | [SA_RESTORER defined in <asm/signal.h>]) |
| 639 | fi |
| 640 | |
Dmitry V. Levin | 38593e9 | 2014-02-26 16:51:28 +0000 | [diff] [blame] | 641 | AC_CACHE_CHECK([for __builtin_popcount], [st_cv_have___builtin_popcount], |
| 642 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([], [__builtin_popcount(0)])], |
| 643 | [st_cv_have___builtin_popcount=yes], |
| 644 | [st_cv_have___builtin_popcount=no])]) |
| 645 | if test "x$st_cv_have___builtin_popcount" = xyes; then |
| 646 | AC_DEFINE([HAVE___BUILTIN_POPCOUNT], [1], |
| 647 | [Define to 1 if the system provides __builtin_popcount function]) |
| 648 | fi |
| 649 | |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 650 | AC_PATH_PROG([PERL], [perl]) |
| 651 | |
Luca Clementi | 327064b | 2013-07-23 00:11:35 -0700 | [diff] [blame^] | 652 | dnl stack trace with libunwind |
| 653 | libunwind_CPPFLAGS= |
| 654 | libunwind_LDFLAGS= |
| 655 | libunwind_LIBS= |
| 656 | AC_ARG_WITH([libunwind], |
| 657 | [AS_HELP_STRING([--with-libunwind], |
| 658 | [use libunwind to implement stack tracing support])], |
| 659 | [case "${withval}" in |
| 660 | yes|no|check) ;; |
| 661 | *) with_libunwind=yes |
| 662 | libunwind_CPPFLAGS="-I${withval}/include" |
| 663 | libunwind_LDFLAGS="-L${withval}/lib" ;; |
| 664 | esac], |
| 665 | [with_libunwind=check] |
| 666 | ) |
| 667 | |
| 668 | use_libunwind=no |
| 669 | AS_IF([test "x$with_libunwind" != xno], |
| 670 | [saved_CPPFLAGS="$CPPFLAGS" |
| 671 | CPPFLAGS="$CPPFLAGS $libunwind_CPPFLAGS" |
| 672 | |
| 673 | AC_CHECK_HEADERS([libunwind-ptrace.h], |
| 674 | [saved_LDFLAGS="$LDFLAGS" |
| 675 | LDFLAGS="$LDFLAGS $libunwind_LDFLAGS" |
| 676 | |
| 677 | AC_CHECK_LIB([unwind], [backtrace], |
| 678 | [libunwind_LIBS="-lunwind $libunwind_LIBS" |
| 679 | |
| 680 | AC_MSG_CHECKING([for unw_create_addr_space in libunwind-generic]) |
| 681 | saved_LIBS="$LIBS" |
| 682 | LIBS="-lunwind-generic $libunwind_LIBS $LIBS" |
| 683 | |
| 684 | AC_LINK_IFELSE( |
| 685 | [AC_LANG_PROGRAM([[#include <libunwind-ptrace.h>]], |
| 686 | [[return !unw_create_addr_space(0, 0)]]) |
| 687 | ], |
| 688 | [AC_MSG_RESULT([yes]) |
| 689 | libunwind_LIBS="-lunwind-generic $libunwind_LIBS" |
| 690 | |
| 691 | AC_CHECK_LIB([unwind-ptrace], [_UPT_create], |
| 692 | [libunwind_LIBS="-lunwind-ptrace $libunwind_LIBS" |
| 693 | use_libunwind=yes |
| 694 | ], |
| 695 | [if test "x$with_libunwind" != xcheck; then |
| 696 | AC_MSG_FAILURE([failed to find _UPT_create in libunwind-ptrace]) |
| 697 | fi |
| 698 | ], |
| 699 | [$libunwind_LIBS] |
| 700 | ) |
| 701 | ], |
| 702 | [AC_MSG_RESULT([no]) |
| 703 | if test "x$with_libunwind" != xcheck; then |
| 704 | AC_MSG_FAILURE([failed to find unw_create_addr_space in libunwind-generic]) |
| 705 | fi |
| 706 | ] |
| 707 | ) |
| 708 | |
| 709 | LIBS="$saved_LIBS" |
| 710 | ], |
| 711 | [if test "x$with_libunwind" != xcheck; then |
| 712 | AC_MSG_FAILURE([failed to find libunwind]) |
| 713 | fi |
| 714 | ], |
| 715 | [$libunwind_LIBS] |
| 716 | ) |
| 717 | |
| 718 | LDFLAGS="$saved_LDFLAGS" |
| 719 | ], |
| 720 | [if test "x$with_libunwind" != xcheck; then |
| 721 | AC_MSG_FAILURE([failed to find libunwind-ptrace.h]) |
| 722 | fi |
| 723 | ] |
| 724 | ) |
| 725 | |
| 726 | CPPFLAGS="$saved_CPPFLAGS" |
| 727 | ] |
| 728 | ) |
| 729 | |
| 730 | dnl enable libunwind |
| 731 | AC_MSG_CHECKING([whether to enable stack tracing support using libunwind]) |
| 732 | if test "x$use_libunwind" = xyes; then |
| 733 | AC_DEFINE([USE_LIBUNWIND], 1, [Compile stack tracing functionality]) |
| 734 | AC_SUBST(libunwind_LIBS) |
| 735 | AC_SUBST(libunwind_LDFLAGS) |
| 736 | AC_SUBST(libunwind_CPPFLAGS) |
| 737 | fi |
| 738 | AM_CONDITIONAL([USE_LIBUNWIND], [test "x$use_libunwind" = xyes]) |
| 739 | AC_MSG_RESULT([$use_libunwind]) |
| 740 | |
Dmitry V. Levin | 4e4b5ad | 2011-02-27 00:28:50 +0000 | [diff] [blame] | 741 | AC_CONFIG_FILES([Makefile tests/Makefile]) |
Roland McGrath | 6d2b349 | 2002-12-30 00:51:30 +0000 | [diff] [blame] | 742 | AC_OUTPUT |