Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 1 | dnl Process this file with autoconf to produce a configure script. |
| 2 | dnl Configure input file for elfutils. -*-autoconf-*- |
| 3 | dnl |
Frank Ch. Eigler | e27e30c | 2019-10-28 13:29:26 -0400 | [diff] [blame] | 4 | dnl Copyright (C) 1996-2019 Red Hat, Inc. |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 5 | dnl |
Mark Wielaard | de2ed97 | 2012-06-05 17:15:16 +0200 | [diff] [blame] | 6 | dnl This file is part of elfutils. |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 7 | dnl |
Mark Wielaard | de2ed97 | 2012-06-05 17:15:16 +0200 | [diff] [blame] | 8 | dnl This file is free software; you can redistribute it and/or modify |
| 9 | dnl it under the terms of the GNU General Public License as published by |
| 10 | dnl the Free Software Foundation; either version 3 of the License, or |
| 11 | dnl (at your option) any later version. |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 12 | dnl |
Mark Wielaard | de2ed97 | 2012-06-05 17:15:16 +0200 | [diff] [blame] | 13 | dnl elfutils is distributed in the hope that it will be useful, but |
| 14 | dnl WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | dnl GNU General Public License for more details. |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 17 | dnl |
Mark Wielaard | de2ed97 | 2012-06-05 17:15:16 +0200 | [diff] [blame] | 18 | dnl You should have received a copy of the GNU General Public License |
| 19 | dnl along with this program. If not, see <http://www.gnu.org/licenses/>. |
Mark Wielaard | d4fd080 | 2020-10-31 17:57:47 +0100 | [diff] [blame] | 20 | AC_INIT([elfutils],[0.182],[https://sourceware.org/bugzilla],[elfutils],[http://elfutils.org/]) |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 21 | |
Mark Wielaard | 34b037b | 2017-01-12 11:43:30 +0100 | [diff] [blame] | 22 | dnl Workaround for older autoconf < 2.64 |
| 23 | m4_ifndef([AC_PACKAGE_URL], |
| 24 | [AC_DEFINE([PACKAGE_URL], ["http://elfutils.org/"], |
| 25 | [Define to home page for this package]) |
| 26 | AC_SUBST([PACKAGE_URL], ["http://elfutils.org/"])]) |
| 27 | |
Dmitry V. Levin | fc5e808 | 2020-12-09 03:12:53 +0300 | [diff] [blame^] | 28 | LIBDEBUGINFOD_SONAME=libdebuginfod.so.1 |
| 29 | AC_SUBST([LIBDEBUGINFOD_SONAME]) |
| 30 | |
Mark Wielaard | 9ba2458 | 2016-03-02 15:04:43 +0100 | [diff] [blame] | 31 | # We want eu- as default program prefix if none was given by the user. |
| 32 | # But if the user explicitly provided --program-prefix="" then pretend |
| 33 | # it wasn't set at all (NONE). We want to test this really early before |
| 34 | # configure has a chance to use the value. |
| 35 | |
| 36 | if test "x$program_prefix" = "xNONE"; then |
| 37 | AC_MSG_NOTICE([No --program-prefix given, using "eu-"]) |
| 38 | program_prefix="eu-" |
| 39 | elif test "x$program_prefix" = "x"; then |
| 40 | AC_MSG_NOTICE([Using no program-prefix]) |
| 41 | program_prefix=NONE |
| 42 | fi |
| 43 | |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 44 | AC_CONFIG_AUX_DIR([config]) |
| 45 | AC_CONFIG_FILES([config/Makefile]) |
| 46 | |
Mark Wielaard | a2bc021 | 2020-06-11 16:09:03 +0200 | [diff] [blame] | 47 | AC_COPYRIGHT([Copyright (C) 1996-2020 The elfutils developers.]) |
Ulrich Drepper | db12f16 | 2009-09-21 08:04:38 -0700 | [diff] [blame] | 48 | AC_PREREQ(2.63) dnl Minimum Autoconf version required. |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 49 | |
Roland McGrath | 9aa8ef7 | 2007-05-18 08:59:43 +0000 | [diff] [blame] | 50 | dnl We use GNU make extensions; automake 1.10 defaults to -Wportability. |
Mark Wielaard | 86be792 | 2013-04-26 23:44:25 +0200 | [diff] [blame] | 51 | AM_INIT_AUTOMAKE([gnits 1.11 -Wno-portability dist-bzip2 no-dist-gzip parallel-tests]) |
Roland McGrath | c373d85 | 2006-10-10 00:25:21 +0000 | [diff] [blame] | 52 | AM_MAINTAINER_MODE |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 53 | |
Mark Wielaard | c04f491 | 2015-10-07 13:37:56 +0200 | [diff] [blame] | 54 | AM_SILENT_RULES([yes]) |
| 55 | |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 56 | AC_CONFIG_SRCDIR([libelf/libelf.h]) |
| 57 | AC_CONFIG_FILES([Makefile]) |
| 58 | AC_CONFIG_HEADERS([config.h]) |
| 59 | |
| 60 | AC_CONFIG_MACRO_DIR([m4]) |
| 61 | AC_CONFIG_FILES([m4/Makefile]) |
| 62 | |
| 63 | dnl The RPM spec file. We substitute a few values in the file. |
| 64 | AC_CONFIG_FILES([elfutils.spec:config/elfutils.spec.in]) |
| 65 | |
Aaron Merey | 288f6b1 | 2019-10-28 13:29:26 -0400 | [diff] [blame] | 66 | dnl debuginfo-server client & server parts. |
Dmitry V. Levin | fc5e808 | 2020-12-09 03:12:53 +0300 | [diff] [blame^] | 67 | AC_CONFIG_FILES([debuginfod/Makefile debuginfod/debuginfod.h]) |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 68 | |
| 69 | AC_CANONICAL_HOST |
| 70 | |
Roland McGrath | 3284b79 | 2012-01-20 12:51:46 -0800 | [diff] [blame] | 71 | AC_ARG_ENABLE(deterministic-archives, |
| 72 | [AS_HELP_STRING([--enable-deterministic-archives], |
| 73 | [ar and ranlib default to -D behavior])], [ |
| 74 | if test "${enableval}" = no; then |
| 75 | default_ar_deterministic=false |
| 76 | else |
| 77 | default_ar_deterministic=true |
| 78 | fi], [default_ar_deterministic=false]) |
| 79 | AC_DEFINE_UNQUOTED(DEFAULT_AR_DETERMINISTIC, $default_ar_deterministic, |
| 80 | [Should ar and ranlib use -D behavior by default?]) |
| 81 | |
Ulrich Drepper | 7e678fa | 2009-01-10 18:02:05 -0800 | [diff] [blame] | 82 | AC_ARG_ENABLE([thread-safety], |
Mark Wielaard | 09c9bb9 | 2013-11-06 12:21:32 +0100 | [diff] [blame] | 83 | AS_HELP_STRING([--enable-thread-safety], |
| 84 | [enable thread safety of libraries EXPERIMENTAL]), |
| 85 | use_locks=$enableval, use_locks=no) |
Ulrich Drepper | 7e678fa | 2009-01-10 18:02:05 -0800 | [diff] [blame] | 86 | AM_CONDITIONAL(USE_LOCKS, test "$use_locks" = yes) |
| 87 | AS_IF([test "$use_locks" = yes], [AC_DEFINE(USE_LOCKS)]) |
Mark Wielaard | 09c9bb9 | 2013-11-06 12:21:32 +0100 | [diff] [blame] | 88 | AS_IF([test "$use_locks" = yes], |
| 89 | [AC_MSG_WARN([thread-safety is EXPERIMENTAL tests might fail.])]) |
Ulrich Drepper | d56e232 | 2008-08-16 03:09:13 +0000 | [diff] [blame] | 90 | |
Ulrich Drepper | 7e678fa | 2009-01-10 18:02:05 -0800 | [diff] [blame] | 91 | AH_TEMPLATE([USE_LOCKS], [Defined if libraries should be thread-safe.]) |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 92 | |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 93 | AC_PROG_CC |
| 94 | AC_PROG_RANLIB |
| 95 | AC_PROG_YACC |
| 96 | AM_PROG_LEX |
Michael Forney | a45c804 | 2013-11-01 00:51:04 -0700 | [diff] [blame] | 97 | # Only available since automake 1.12 |
| 98 | m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) |
| 99 | AC_CHECK_TOOL([READELF], [readelf]) |
| 100 | AC_CHECK_TOOL([NM], [nm]) |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 101 | |
Mark Wielaard | aba6d76 | 2015-04-14 10:18:37 +0200 | [diff] [blame] | 102 | # We use -std=gnu99 but have explicit checks for some language constructs |
| 103 | # and GNU extensions since some compilers claim GNU99 support, but don't |
| 104 | # really support all language extensions. In particular we need |
| 105 | # Mixed Declarations and Code |
| 106 | # https://gcc.gnu.org/onlinedocs/gcc/Mixed-Declarations.html |
| 107 | # Nested Functions |
| 108 | # https://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html |
| 109 | # Arrays of Variable Length |
| 110 | # https://gcc.gnu.org/onlinedocs/gcc/Variable-Length.html |
| 111 | AC_CACHE_CHECK([for gcc with GNU99 support], ac_cv_c99, [dnl |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 112 | old_CFLAGS="$CFLAGS" |
| 113 | CFLAGS="$CFLAGS -std=gnu99" |
Roland McGrath | f64e25f | 2011-02-08 19:36:50 -0800 | [diff] [blame] | 114 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([dnl |
Mark Wielaard | aba6d76 | 2015-04-14 10:18:37 +0200 | [diff] [blame] | 115 | int foo (int a) |
| 116 | { |
| 117 | for (int i = 0; i < a; ++i) if (i % 4) break; int s = a; return s; |
| 118 | } |
| 119 | |
| 120 | double bar (double a, double b) |
| 121 | { |
| 122 | double square (double z) { return z * z; } |
| 123 | return square (a) + square (b); |
| 124 | } |
| 125 | |
| 126 | void baz (int n) |
| 127 | { |
| 128 | struct S { int x[[n]]; }; |
| 129 | }])], |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 130 | ac_cv_c99=yes, ac_cv_c99=no) |
| 131 | CFLAGS="$old_CFLAGS"]) |
| 132 | AS_IF([test "x$ac_cv_c99" != xyes], |
Mark Wielaard | aba6d76 | 2015-04-14 10:18:37 +0200 | [diff] [blame] | 133 | AC_MSG_ERROR([gcc with GNU99 support required])) |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 134 | |
Ulf Hermann | 1127470 | 2017-08-18 13:06:36 +0200 | [diff] [blame] | 135 | AC_CACHE_CHECK([whether gcc supports __attribute__((visibility()))], |
| 136 | ac_cv_visibility, [dnl |
| 137 | save_CFLAGS="$CFLAGS" |
| 138 | CFLAGS="$save_CFLAGS -Werror" |
| 139 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([dnl |
| 140 | int __attribute__((visibility("hidden"))) |
| 141 | foo (int a) |
| 142 | { |
| 143 | return a; |
| 144 | }])], ac_cv_visibility=yes, ac_cv_visibility=no) |
| 145 | CFLAGS="$save_CFLAGS"]) |
| 146 | if test "$ac_cv_visibility" = "yes"; then |
| 147 | AC_DEFINE([HAVE_VISIBILITY], [1], |
| 148 | [Defined if __attribute__((visibility())) is supported]) |
| 149 | fi |
| 150 | |
Ulf Hermann | 17d7194 | 2017-08-18 14:05:10 +0200 | [diff] [blame] | 151 | AC_CACHE_CHECK([whether gcc supports __attribute__((gcc_struct))], |
| 152 | ac_cv_gcc_struct, [dnl |
| 153 | save_CFLAGS="$CFLAGS" |
| 154 | CFLAGS="$save_CFLAGS -Werror" |
| 155 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([dnl |
| 156 | struct test { int x; } __attribute__((gcc_struct)); |
| 157 | ])], ac_cv_gcc_struct=yes, ac_cv_gcc_struct=no) |
| 158 | CFLAGS="$save_CFLAGS"]) |
| 159 | if test "$ac_cv_gcc_struct" = "yes"; then |
| 160 | AC_DEFINE([HAVE_GCC_STRUCT], [1], |
| 161 | [Defined if __attribute__((gcc_struct)) is supported]) |
| 162 | fi |
| 163 | |
Ulf Hermann | 0773758 | 2017-08-18 12:41:11 +0200 | [diff] [blame] | 164 | AC_CACHE_CHECK([whether gcc supports -fPIC], ac_cv_fpic, [dnl |
| 165 | save_CFLAGS="$CFLAGS" |
| 166 | CFLAGS="$save_CFLAGS -fPIC -Werror" |
| 167 | AC_COMPILE_IFELSE([AC_LANG_SOURCE()], ac_cv_fpic=yes, ac_cv_fpic=no) |
| 168 | CFLAGS="$save_CFLAGS" |
| 169 | ]) |
| 170 | if test "$ac_cv_fpic" = "yes"; then |
| 171 | fpic_CFLAGS="-fPIC" |
| 172 | else |
| 173 | fpic_CFLAGS="" |
| 174 | fi |
| 175 | AC_SUBST([fpic_CFLAGS]) |
| 176 | |
| 177 | AC_CACHE_CHECK([whether gcc supports -fPIE], ac_cv_fpie, [dnl |
| 178 | save_CFLAGS="$CFLAGS" |
| 179 | CFLAGS="$save_CFLAGS -fPIE -Werror" |
| 180 | AC_COMPILE_IFELSE([AC_LANG_SOURCE()], ac_cv_fpie=yes, ac_cv_fpie=no) |
| 181 | CFLAGS="$save_CFLAGS" |
| 182 | ]) |
| 183 | if test "$ac_cv_fpie" = "yes"; then |
| 184 | fpie_CFLAGS="-fPIE" |
| 185 | else |
| 186 | fpie_CFLAGS="" |
| 187 | fi |
| 188 | AC_SUBST([fpie_CFLAGS]) |
| 189 | |
| 190 | dso_LDFLAGS="-shared" |
| 191 | |
| 192 | ZDEFS_LDFLAGS="-Wl,-z,defs" |
| 193 | AC_CACHE_CHECK([whether gcc supports $ZDEFS_LDFLAGS], ac_cv_zdefs, [dnl |
| 194 | save_LDFLAGS="$LDFLAGS" |
| 195 | LDFLAGS="$ZDEFS_LDFLAGS $save_LDFLAGS" |
| 196 | AC_LINK_IFELSE([AC_LANG_PROGRAM()], ac_cv_zdefs=yes, ac_cv_zdefs=no) |
| 197 | LDFLAGS="$save_LDFLAGS" |
| 198 | ]) |
| 199 | if test "$ac_cv_zdefs" = "yes"; then |
| 200 | dso_LDFLAGS="$dso_LDFLAGS $ZDEFS_LDFLAGS" |
| 201 | fi |
| 202 | |
Mark Wielaard | cf1b5fe | 2019-12-06 17:20:00 +0100 | [diff] [blame] | 203 | # We really want build-ids. Warn and force generating them if gcc was |
| 204 | # configure without --enable-linker-build-id |
| 205 | AC_CACHE_CHECK([whether the compiler generates build-ids], ac_cv_buildid, [dnl |
Sergei Trofimovich | 9698a39 | 2020-06-14 20:28:07 +0100 | [diff] [blame] | 206 | AC_LINK_IFELSE([AC_LANG_PROGRAM()],[ac_cv_buildid=yes; $READELF -n conftest$EXEEXT | grep -q NT_GNU_BUILD_ID || ac_cv_buildid=no],AC_MSG_FAILURE([unexpected compile failure]))]) |
Mark Wielaard | cf1b5fe | 2019-12-06 17:20:00 +0100 | [diff] [blame] | 207 | if test "$ac_cv_buildid" = "no"; then |
| 208 | AC_MSG_WARN([compiler doesn't generate build-id by default]) |
| 209 | LDFLAGS="$LDFLAGS -Wl,--build-id" |
| 210 | fi |
| 211 | |
Ulf Hermann | 0773758 | 2017-08-18 12:41:11 +0200 | [diff] [blame] | 212 | ZRELRO_LDFLAGS="-Wl,-z,relro" |
| 213 | AC_CACHE_CHECK([whether gcc supports $ZRELRO_LDFLAGS], ac_cv_zrelro, [dnl |
| 214 | save_LDFLAGS="$LDFLAGS" |
| 215 | LDFLAGS="$ZRELRO_LDFLAGS $save_LDFLAGS" |
| 216 | AC_LINK_IFELSE([AC_LANG_PROGRAM()], ac_cv_zrelro=yes, ac_cv_zrelro=no) |
| 217 | LDFLAGS="$save_LDFLAGS" |
| 218 | ]) |
| 219 | if test "$ac_cv_zrelro" = "yes"; then |
| 220 | dso_LDFLAGS="$dso_LDFLAGS $ZRELRO_LDFLAGS" |
| 221 | fi |
| 222 | |
| 223 | AC_SUBST([dso_LDFLAGS]) |
| 224 | |
Roland McGrath | 8181739 | 2009-01-23 03:23:02 -0800 | [diff] [blame] | 225 | AC_CACHE_CHECK([for __thread support], ac_cv_tls, [dnl |
Roland McGrath | e72bf15 | 2009-01-23 14:27:39 -0800 | [diff] [blame] | 226 | # Use the same flags that we use for our DSOs, so the test is representative. |
| 227 | # Some old compiler/linker/libc combinations fail some ways and not others. |
| 228 | save_CFLAGS="$CFLAGS" |
| 229 | save_LDFLAGS="$LDFLAGS" |
Ulf Hermann | 0773758 | 2017-08-18 12:41:11 +0200 | [diff] [blame] | 230 | CFLAGS="$fpic_CFLAGS $CFLAGS" |
| 231 | LDFLAGS="$dso_LDFLAGS $LDFLAGS" |
Roland McGrath | 8181739 | 2009-01-23 03:23:02 -0800 | [diff] [blame] | 232 | AC_LINK_IFELSE([dnl |
Mark Wielaard | 0a35e3a | 2015-03-13 23:51:40 +0100 | [diff] [blame] | 233 | AC_LANG_PROGRAM([[#include <stdlib.h> |
| 234 | #undef __thread |
Roland McGrath | e72bf15 | 2009-01-23 14:27:39 -0800 | [diff] [blame] | 235 | static __thread int a; int foo (int b) { return a + b; }]], |
Roland McGrath | 8181739 | 2009-01-23 03:23:02 -0800 | [diff] [blame] | 236 | [[exit (foo (0));]])], |
Roland McGrath | e72bf15 | 2009-01-23 14:27:39 -0800 | [diff] [blame] | 237 | ac_cv_tls=yes, ac_cv_tls=no) |
| 238 | CFLAGS="$save_CFLAGS" |
| 239 | LDFLAGS="$save_LDFLAGS"]) |
Ulrich Drepper | 7e678fa | 2009-01-10 18:02:05 -0800 | [diff] [blame] | 240 | AS_IF([test "x$ac_cv_tls" != xyes], |
Roland McGrath | 8181739 | 2009-01-23 03:23:02 -0800 | [diff] [blame] | 241 | AC_MSG_ERROR([__thread support required])) |
Ulrich Drepper | 7e678fa | 2009-01-10 18:02:05 -0800 | [diff] [blame] | 242 | |
Jonathon Anderson | 77b66a7 | 2019-08-25 10:01:51 -0500 | [diff] [blame] | 243 | dnl Before 4.9 gcc doesn't ship stdatomic.h, but the nessesary atomics are |
| 244 | dnl available by (at least) 4.7. So if the system doesn't have a stdatomic.h we |
| 245 | dnl fall back on one copied from FreeBSD that handles the difference. |
| 246 | AC_CACHE_CHECK([whether gcc provides stdatomic.h], ac_cv_has_stdatomic, |
| 247 | [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <stdatomic.h>]])], |
| 248 | ac_cv_has_stdatomic=yes, ac_cv_has_stdatomic=no)]) |
| 249 | AM_CONDITIONAL(HAVE_STDATOMIC_H, test "x$ac_cv_has_stdatomic" = xyes) |
| 250 | AS_IF([test "x$ac_cv_has_stdatomic" = xyes], [AC_DEFINE(HAVE_STDATOMIC_H)]) |
| 251 | |
| 252 | AH_TEMPLATE([HAVE_STDATOMIC_H], [Define to 1 if `stdatomic.h` is provided by the |
| 253 | system, 0 otherwise.]) |
| 254 | |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 255 | dnl This test must come as early as possible after the compiler configuration |
| 256 | dnl tests, because the choice of the file model can (in principle) affect |
| 257 | dnl whether functions and headers are available, whether they work, etc. |
| 258 | AC_SYS_LARGEFILE |
| 259 | |
Mark Wielaard | ee22502 | 2016-11-23 20:51:35 +0100 | [diff] [blame] | 260 | dnl Older glibc had a broken fts that didn't work with Large File Systems. |
| 261 | dnl We want the version that can handler LFS, but include workaround if we |
| 262 | dnl get a bad one. Add define to CFLAGS (not AC_DEFINE it) since we need to |
| 263 | dnl check it before including config.h (which might define _FILE_OFFSET_BITS). |
| 264 | AC_CACHE_CHECK([whether fts.h is bad when included (with LFS)], ac_cv_bad_fts, |
| 265 | [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <fts.h>]])], |
| 266 | ac_cv_bad_fts=no, ac_cv_bad_fts=yes)]) |
Mark Wielaard | ad7036f | 2020-07-18 01:53:29 +0200 | [diff] [blame] | 267 | AS_IF([test "x$ac_cv_bad_fts" = "xyes"], |
| 268 | [CFLAGS="$CFLAGS -DBAD_FTS=1" CXXFLAGS="$CXXFLAGS -DBAD_FTS=1"]) |
Mark Wielaard | ee22502 | 2016-11-23 20:51:35 +0100 | [diff] [blame] | 269 | |
Mark Wielaard | 01b994e | 2017-02-09 21:09:54 +0100 | [diff] [blame] | 270 | # See if we can add -D_FORTIFY_SOURCE=2. Don't do it if it is already |
| 271 | # (differently) defined or if it generates warnings/errors because we |
| 272 | # don't use the right optimisation level (string.h will warn about that). |
| 273 | AC_MSG_CHECKING([whether to add -D_FORTIFY_SOURCE=2 to CFLAGS]) |
| 274 | case "$CFLAGS" in |
| 275 | *-D_FORTIFY_SOURCE=2*) |
| 276 | AC_MSG_RESULT([no, already there]) |
| 277 | ;; |
| 278 | *) |
| 279 | save_CFLAGS="$CFLAGS" |
Omar Sandoval | c435a33 | 2019-12-11 16:23:27 -0800 | [diff] [blame] | 280 | CFLAGS="-D_FORTIFY_SOURCE=2 $CFLAGS -Werror" |
Mark Wielaard | 01b994e | 2017-02-09 21:09:54 +0100 | [diff] [blame] | 281 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ |
| 282 | #include <string.h> |
| 283 | int main() { return 0; } |
| 284 | ]])], [ AC_MSG_RESULT([yes]) |
| 285 | CFLAGS="-D_FORTIFY_SOURCE=2 $save_CFLAGS" ], |
| 286 | [ AC_MSG_RESULT([no]) |
| 287 | CFLAGS="$save_CFLAGS"]) |
| 288 | ;; |
| 289 | esac |
| 290 | |
Ulrich Drepper | 3cbdd38 | 2008-01-02 17:44:39 +0000 | [diff] [blame] | 291 | dnl enable debugging of branch prediction. |
Ulrich Drepper | 28a0c61 | 2008-01-21 18:57:48 +0000 | [diff] [blame] | 292 | AC_ARG_ENABLE([debugpred], |
Ulrich Drepper | db12f16 | 2009-09-21 08:04:38 -0700 | [diff] [blame] | 293 | AS_HELP_STRING([--enable-debugpred],[build binaries with support to debug branch prediction]), |
Mike Frysinger | 8f3002e | 2011-10-08 15:09:15 -0700 | [diff] [blame] | 294 | [use_debugpred=$enableval], [use_debugpred=no]) |
| 295 | case $use_debugpred in |
Mark Wielaard | 7702a3c | 2015-05-01 09:23:57 +0200 | [diff] [blame] | 296 | yes) use_debugpred_val=1 ;; |
| 297 | *) use_debugpred_val=0 ;; |
Mike Frysinger | 8f3002e | 2011-10-08 15:09:15 -0700 | [diff] [blame] | 298 | esac |
Mark Wielaard | 7702a3c | 2015-05-01 09:23:57 +0200 | [diff] [blame] | 299 | AC_SUBST([DEBUGPRED], $use_debugpred_val) |
Ulrich Drepper | 3cbdd38 | 2008-01-02 17:44:39 +0000 | [diff] [blame] | 300 | |
| 301 | dnl Enable gprof suport. |
Ulrich Drepper | 47be795 | 2005-08-07 04:41:39 +0000 | [diff] [blame] | 302 | AC_ARG_ENABLE([gprof], |
Mike Frysinger | 8f3002e | 2011-10-08 15:09:15 -0700 | [diff] [blame] | 303 | AS_HELP_STRING([--enable-gprof],[build binaries with gprof support]), [use_gprof=$enableval], [use_gprof=no]) |
Ulrich Drepper | 47be795 | 2005-08-07 04:41:39 +0000 | [diff] [blame] | 304 | if test "$use_gprof" = yes; then |
| 305 | CFLAGS="$CFLAGS -pg" |
| 306 | LDFLAGS="$LDFLAGS -pg" |
| 307 | fi |
| 308 | AM_CONDITIONAL(GPROF, test "$use_gprof" = yes) |
Ulrich Drepper | fbe998a | 2005-08-29 16:27:10 +0000 | [diff] [blame] | 309 | |
| 310 | # Enable gcov suport. |
| 311 | AC_ARG_ENABLE([gcov], |
Mike Frysinger | 8f3002e | 2011-10-08 15:09:15 -0700 | [diff] [blame] | 312 | AS_HELP_STRING([--enable-gcov],[build binaries with gcov support]), [use_gcov=$enableval], [use_gcov=no]) |
Ulrich Drepper | fbe998a | 2005-08-29 16:27:10 +0000 | [diff] [blame] | 313 | if test "$use_gcov" = yes; then |
| 314 | CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage" |
Mark Wielaard | 3f81dbd | 2019-11-26 08:56:44 +0100 | [diff] [blame] | 315 | CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage" |
Ulrich Drepper | fbe998a | 2005-08-29 16:27:10 +0000 | [diff] [blame] | 316 | LDFLAGS="$LDFLAGS -fprofile-arcs" |
| 317 | fi |
Ulrich Drepper | 39cec7a | 2005-08-30 01:22:01 +0000 | [diff] [blame] | 318 | AM_CONDITIONAL(GCOV, test "$use_gcov" = yes) |
Ulrich Drepper | fbe998a | 2005-08-29 16:27:10 +0000 | [diff] [blame] | 319 | |
Mark Wielaard | 2b250b7 | 2015-05-21 23:36:51 +0200 | [diff] [blame] | 320 | AC_ARG_ENABLE([sanitize-undefined], |
| 321 | AS_HELP_STRING([--enable-sanitize-undefined], |
| 322 | [Use gcc undefined behaviour sanitizer]), |
| 323 | [use_undefined=$enableval], [use_undefined=no]) |
| 324 | if test "$use_undefined" = yes; then |
| 325 | old_CFLAGS="$CFLAGS" |
| 326 | old_CXXFLAGS="$CXXFLAGS" |
| 327 | # We explicitly use unaligned access when possible (see ALLOW_UNALIGNED) |
| 328 | # We want to fail immediately on first error, don't try to recover. |
Mark Wielaard | 170f1bb | 2015-05-31 22:37:19 +0200 | [diff] [blame] | 329 | CFLAGS="$CFLAGS -fsanitize=undefined -fno-sanitize-recover" |
| 330 | CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover" |
| 331 | AC_LINK_IFELSE([AC_LANG_SOURCE([int main (int argc, char **argv) { return 0; }])], use_undefined=yes, use_undefined=no) |
Mark Wielaard | 2b250b7 | 2015-05-21 23:36:51 +0200 | [diff] [blame] | 332 | AS_IF([test "x$use_undefined" != xyes], |
| 333 | AC_MSG_WARN([gcc undefined behaviour sanitizer not available]) |
| 334 | CFLAGS="$old_CFLAGS" CXXFLAGS="$old_CXXFLAGS") |
| 335 | fi |
Mark Wielaard | 170f1bb | 2015-05-31 22:37:19 +0200 | [diff] [blame] | 336 | case $use_undefined in |
| 337 | yes) check_undefined_val=1 ;; |
| 338 | *) check_undefined_val=0 ;; |
| 339 | esac |
| 340 | AC_DEFINE_UNQUOTED(CHECK_UNDEFINED, $check_undefined_val, |
| 341 | [Building with -fsanitize=undefined or not]) |
Mark Wielaard | 2b250b7 | 2015-05-21 23:36:51 +0200 | [diff] [blame] | 342 | |
Mark Wielaard | e3e3ee2 | 2012-10-01 16:14:12 +0200 | [diff] [blame] | 343 | AC_ARG_ENABLE([valgrind], |
| 344 | AS_HELP_STRING([--enable-valgrind],[run all tests under valgrind]), |
| 345 | [use_valgrind=$enableval], [use_valgrind=no]) |
| 346 | if test "$use_valgrind" = yes; then |
| 347 | AC_CHECK_PROG(HAVE_VALGRIND, valgrind, yes, no) |
| 348 | if test "$HAVE_VALGRIND" = "no"; then |
| 349 | AC_MSG_ERROR([valgrind not found]) |
| 350 | fi |
| 351 | fi |
| 352 | AM_CONDITIONAL(USE_VALGRIND, test "$use_valgrind" = yes) |
| 353 | |
Jonathon Anderson | 5e2a8e2 | 2019-08-25 09:53:50 -0500 | [diff] [blame] | 354 | AC_ARG_WITH([valgrind], |
| 355 | AS_HELP_STRING([--with-valgrind],[include directory for Valgrind headers]), |
| 356 | [with_valgrind_headers=$withval], [with_valgrind_headers=no]) |
| 357 | if test "x$with_valgrind_headers" != xno; then |
| 358 | save_CFLAGS="$CFLAGS" |
| 359 | CFLAGS="$CFLAGS -I$with_valgrind_headers" |
| 360 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ |
| 361 | #include <valgrind/valgrind.h> |
| 362 | int main() { return 0; } |
| 363 | ]])], [ HAVE_VALGRIND_HEADERS="yes" |
| 364 | CFLAGS="$save_CFLAGS -I$with_valgrind_headers" ], |
| 365 | [ AC_MSG_ERROR([invalid valgrind include directory: $with_valgrind_headers]) ]) |
| 366 | fi |
| 367 | |
| 368 | AC_ARG_ENABLE([valgrind-annotations], |
| 369 | AS_HELP_STRING([--enable-valgrind-annotations],[insert extra annotations for better valgrind support]), |
| 370 | [use_vg_annotations=$enableval], [use_vg_annotations=no]) |
| 371 | if test "$use_vg_annotations" = yes; then |
| 372 | if test "x$HAVE_VALGRIND_HEADERS" != "xyes"; then |
| 373 | AC_MSG_CHECKING([whether Valgrind headers are available]) |
| 374 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ |
| 375 | #include <valgrind/valgrind.h> |
| 376 | int main() { return 0; } |
| 377 | ]])], [ AC_MSG_RESULT([yes]) ], |
| 378 | [ AC_MSG_ERROR([valgrind annotations requested but no headers are available]) ]) |
| 379 | fi |
| 380 | fi |
| 381 | AM_CONDITIONAL(USE_VG_ANNOTATIONS, test "$use_vg_annotations" = yes) |
| 382 | |
Mark Wielaard | b63007e | 2019-01-18 14:18:22 +0100 | [diff] [blame] | 383 | AC_ARG_ENABLE([install-elfh], |
| 384 | AS_HELP_STRING([--enable-install-elfh],[install elf.h in include dir]), |
| 385 | [install_elfh=$enableval], [install_elfh=no]) |
| 386 | AM_CONDITIONAL(INSTALL_ELFH, test "$install_elfh" = yes) |
| 387 | |
Ulrich Drepper | 47be795 | 2005-08-07 04:41:39 +0000 | [diff] [blame] | 388 | AM_CONDITIONAL(BUILD_STATIC, [dnl |
Mark Wielaard | 3232479 | 2014-04-13 17:39:57 +0200 | [diff] [blame] | 389 | test "$use_gprof" = yes -o "$use_gcov" = yes]) |
Ulrich Drepper | 47be795 | 2005-08-07 04:41:39 +0000 | [diff] [blame] | 390 | |
Roland McGrath | 1b8b446 | 2005-11-16 01:33:38 +0000 | [diff] [blame] | 391 | AC_ARG_ENABLE([tests-rpath], |
Ulrich Drepper | db12f16 | 2009-09-21 08:04:38 -0700 | [diff] [blame] | 392 | AS_HELP_STRING([--enable-tests-rpath],[build $ORIGIN-using rpath into tests]), |
Mike Frysinger | 8f3002e | 2011-10-08 15:09:15 -0700 | [diff] [blame] | 393 | [tests_use_rpath=$enableval], [tests_use_rpath=no]) |
Roland McGrath | 1b8b446 | 2005-11-16 01:33:38 +0000 | [diff] [blame] | 394 | AM_CONDITIONAL(TESTS_RPATH, test "$tests_use_rpath" = yes) |
| 395 | |
Mark Wielaard | 528cb45 | 2015-10-16 23:07:12 +0200 | [diff] [blame] | 396 | dnl zlib is mandatory. |
Roland McGrath | bca4315 | 2009-01-05 23:59:32 -0800 | [diff] [blame] | 397 | save_LIBS="$LIBS" |
| 398 | LIBS= |
Roland McGrath | 2416964 | 2009-08-26 02:26:34 -0700 | [diff] [blame] | 399 | eu_ZIPLIB(zlib,ZLIB,z,gzdirect,gzip) |
Mike Frysinger | 2d703bf | 2016-01-14 13:46:18 -0500 | [diff] [blame] | 400 | AS_IF([test "x$with_zlib" = xno], [AC_MSG_ERROR([zlib not found but is required])]) |
Mark Wielaard | 528cb45 | 2015-10-16 23:07:12 +0200 | [diff] [blame] | 401 | LIBS="$save_LIBS" |
| 402 | |
Mark Wielaard | 52536d7 | 2020-09-18 12:49:29 +0200 | [diff] [blame] | 403 | dnl Test for bzlib and xz/lzma/zstd, gives BZLIB/LZMALIB/ZSTD .am |
| 404 | dnl conditional and config.h USE_BZLIB/USE_LZMALIB/USE_ZSTD #define. |
Mark Wielaard | 528cb45 | 2015-10-16 23:07:12 +0200 | [diff] [blame] | 405 | save_LIBS="$LIBS" |
| 406 | LIBS= |
Roland McGrath | 2416964 | 2009-08-26 02:26:34 -0700 | [diff] [blame] | 407 | eu_ZIPLIB(bzlib,BZLIB,bz2,BZ2_bzdopen,bzip2) |
Mark Wielaard | 0aa60ac | 2016-01-04 21:41:52 +0100 | [diff] [blame] | 408 | # We need this since bzip2 doesn't have a pkgconfig file. |
| 409 | BZ2_LIB="$LIBS" |
| 410 | AC_SUBST([BZ2_LIB]) |
Roland McGrath | 2416964 | 2009-08-26 02:26:34 -0700 | [diff] [blame] | 411 | eu_ZIPLIB(lzma,LZMA,lzma,lzma_auto_decoder,[LZMA (xz)]) |
Mark Wielaard | 0aa60ac | 2016-01-04 21:41:52 +0100 | [diff] [blame] | 412 | AS_IF([test "x$with_lzma" = xyes], [LIBLZMA="liblzma"], [LIBLZMA=""]) |
| 413 | AC_SUBST([LIBLZMA]) |
Mark Wielaard | 52536d7 | 2020-09-18 12:49:29 +0200 | [diff] [blame] | 414 | eu_ZIPLIB(zstd,ZSTD,zstd,ZSTD_decompress,[ZSTD (zst)]) |
| 415 | AS_IF([test "x$with_zstd" = xyes], [LIBZSTD="libzstd"], [LIBLZSTD=""]) |
| 416 | AC_SUBST([LIBZSTD]) |
Roland McGrath | bca4315 | 2009-01-05 23:59:32 -0800 | [diff] [blame] | 417 | zip_LIBS="$LIBS" |
| 418 | LIBS="$save_LIBS" |
| 419 | AC_SUBST([zip_LIBS]) |
| 420 | |
Akihiko Odaki | a24d52a | 2016-10-13 09:16:48 +0900 | [diff] [blame] | 421 | AC_CHECK_DECLS([memrchr, rawmemchr],[],[], |
| 422 | [#define _GNU_SOURCE |
| 423 | #include <string.h>]) |
| 424 | AC_CHECK_DECLS([powerof2],[],[],[#include <sys/param.h>]) |
Ulf Hermann | b3248e6 | 2017-02-16 10:10:30 +0100 | [diff] [blame] | 425 | AC_CHECK_DECLS([mempcpy],[],[], |
| 426 | [#define _GNU_SOURCE |
| 427 | #include <string.h>]) |
Akihiko Odaki | a24d52a | 2016-10-13 09:16:48 +0900 | [diff] [blame] | 428 | |
Mark Wielaard | afffdff | 2018-03-18 00:24:08 +0100 | [diff] [blame] | 429 | AC_CHECK_FUNCS([process_vm_readv]) |
| 430 | |
Ulrich Drepper | b4a16cf | 2011-10-02 08:33:19 -0400 | [diff] [blame] | 431 | AC_CHECK_LIB([stdc++], [__cxa_demangle], [dnl |
| 432 | AC_DEFINE([USE_DEMANGLE], [1], [Defined if demangling is enabled])]) |
Max Filippov | 1ce4a45 | 2015-05-03 21:14:09 +0300 | [diff] [blame] | 433 | AM_CONDITIONAL(DEMANGLE, test "x$ac_cv_lib_stdcpp___cxa_demangle" = "xyes") |
| 434 | AS_IF([test "x$ac_cv_lib_stdcpp___cxa_demangle" = "xyes"], |
Mark Wielaard | e6e80da | 2015-05-01 10:31:36 +0200 | [diff] [blame] | 435 | [enable_demangler=yes],[enable_demangler=no]) |
Ulrich Drepper | b4a16cf | 2011-10-02 08:33:19 -0400 | [diff] [blame] | 436 | |
Mark Wielaard | 805ec83 | 2014-11-27 23:53:30 +0100 | [diff] [blame] | 437 | AC_ARG_ENABLE([textrelcheck], |
| 438 | AS_HELP_STRING([--disable-textrelcheck], |
| 439 | [Disable textrelcheck being a fatal error])) |
| 440 | AM_CONDITIONAL(FATAL_TEXTREL, [test "x$enable_textrelcheck" != "xno"]) |
Mark Wielaard | 7702a3c | 2015-05-01 09:23:57 +0200 | [diff] [blame] | 441 | AS_IF([test "x$enable_textrelcheck" != "xno"], |
| 442 | [enable_textrelcheck=yes],[enable_textrelcheck=no]) |
Mark Wielaard | 805ec83 | 2014-11-27 23:53:30 +0100 | [diff] [blame] | 443 | |
Max Filippov | bafacac | 2015-04-23 20:46:59 +0200 | [diff] [blame] | 444 | AC_ARG_ENABLE([symbol-versioning], |
| 445 | AS_HELP_STRING([--disable-symbol-versioning], |
| 446 | [Disable symbol versioning in shared objects])) |
Ulf Hermann | 4a3330a | 2017-08-18 15:50:42 +0200 | [diff] [blame] | 447 | |
| 448 | AC_CACHE_CHECK([whether symbol versioning is supported], ac_cv_symbol_versioning, [dnl |
| 449 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([dnl |
| 450 | #define NEW_VERSION(name, version) \ |
| 451 | asm (".symver " #name "," #name "@@@" #version); |
| 452 | int foo(int x) { return x + 1; } |
| 453 | NEW_VERSION (foo, ELFUTILS_12.12) |
| 454 | ])], ac_cv_symbol_versioning=yes, ac_cv_symbol_versioning=no)]) |
| 455 | if test "$ac_cv_symbol_versioning" = "no"; then |
| 456 | if test "x$enable_symbol_versioning" != "xno"; then |
| 457 | AC_MSG_ERROR([Symbol versioning is not supported. |
| 458 | Use --disable-symbol-versioning to build without.]) |
| 459 | fi |
| 460 | fi |
| 461 | |
Max Filippov | bafacac | 2015-04-23 20:46:59 +0200 | [diff] [blame] | 462 | AM_CONDITIONAL(SYMBOL_VERSIONING, [test "x$enable_symbol_versioning" != "xno"]) |
| 463 | AS_IF([test "x$enable_symbol_versioning" = "xno"], |
Mark Wielaard | 7702a3c | 2015-05-01 09:23:57 +0200 | [diff] [blame] | 464 | [AC_MSG_WARN([Disabling symbol versioning breaks ABI compatibility.]) |
| 465 | enable_symbol_versioning=no],[enable_symbol_versioning=yes]) |
Max Filippov | bafacac | 2015-04-23 20:46:59 +0200 | [diff] [blame] | 466 | |
Mark Wielaard | 4b7953d | 2015-06-09 00:28:13 +0200 | [diff] [blame] | 467 | AC_CACHE_CHECK([whether gcc accepts -Wstack-usage], ac_cv_stack_usage, [dnl |
| 468 | old_CFLAGS="$CFLAGS" |
Filipe Brandenburger | 239cd48 | 2016-05-02 13:26:13 -0700 | [diff] [blame] | 469 | CFLAGS="$CFLAGS -Wstack-usage=262144 -Werror" |
Mark Wielaard | 4b7953d | 2015-06-09 00:28:13 +0200 | [diff] [blame] | 470 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([])], |
| 471 | ac_cv_stack_usage=yes, ac_cv_stack_usage=no) |
| 472 | CFLAGS="$old_CFLAGS"]) |
| 473 | AM_CONDITIONAL(ADD_STACK_USAGE_WARNING, [test "x$ac_cv_stack_usage" != "xno"]) |
| 474 | |
Mark Wielaard | 8bc1423 | 2016-02-09 16:10:22 +0100 | [diff] [blame] | 475 | # -Wlogical-op was too fragile in the past, make sure we get a sane one. |
| 476 | AC_CACHE_CHECK([whether gcc has a sane -Wlogical-op], ac_cv_logical_op, [dnl |
| 477 | old_CFLAGS="$CFLAGS" |
| 478 | CFLAGS="$CFLAGS -Wlogical-op -Werror" |
| 479 | AC_COMPILE_IFELSE([AC_LANG_SOURCE( |
| 480 | [#define FLAG 1 |
| 481 | int f (int r, int f) { return (r && (FLAG || (FLAG & f))); }])], |
| 482 | ac_cv_logical_op=yes, ac_cv_logical_op=no) |
| 483 | CFLAGS="$old_CFLAGS"]) |
| 484 | AM_CONDITIONAL(SANE_LOGICAL_OP_WARNING, |
| 485 | [test "x$ac_cv_logical_op" != "xno"]) |
| 486 | |
| 487 | # -Wduplicated-cond was added by GCC6 |
| 488 | AC_CACHE_CHECK([whether gcc accepts -Wduplicated-cond], ac_cv_duplicated_cond, [dnl |
| 489 | old_CFLAGS="$CFLAGS" |
Filipe Brandenburger | 239cd48 | 2016-05-02 13:26:13 -0700 | [diff] [blame] | 490 | CFLAGS="$CFLAGS -Wduplicated-cond -Werror" |
Mark Wielaard | 8bc1423 | 2016-02-09 16:10:22 +0100 | [diff] [blame] | 491 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([])], |
| 492 | ac_cv_duplicated_cond=yes, ac_cv_duplicated_cond=no) |
| 493 | CFLAGS="$old_CFLAGS"]) |
| 494 | AM_CONDITIONAL(HAVE_DUPLICATED_COND_WARNING, |
| 495 | [test "x$ac_cv_duplicated_cond" != "xno"]) |
| 496 | |
Mark Wielaard | 6993d40 | 2016-02-13 19:10:00 +0100 | [diff] [blame] | 497 | # -Wnull-dereference was added by GCC6 |
| 498 | AC_CACHE_CHECK([whether gcc accepts -Wnull-dereference], ac_cv_null_dereference, [dnl |
| 499 | old_CFLAGS="$CFLAGS" |
Filipe Brandenburger | 239cd48 | 2016-05-02 13:26:13 -0700 | [diff] [blame] | 500 | CFLAGS="$CFLAGS -Wnull-dereference -Werror" |
Mark Wielaard | 6993d40 | 2016-02-13 19:10:00 +0100 | [diff] [blame] | 501 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([])], |
| 502 | ac_cv_null_dereference=yes, ac_cv_null_dereference=no) |
| 503 | CFLAGS="$old_CFLAGS"]) |
| 504 | AM_CONDITIONAL(HAVE_NULL_DEREFERENCE_WARNING, |
| 505 | [test "x$ac_cv_null_dereference" != "xno"]) |
| 506 | |
Mark Wielaard | a3cc818 | 2016-11-02 13:29:26 +0100 | [diff] [blame] | 507 | # -Wimplicit-fallthrough was added by GCC7 |
| 508 | AC_CACHE_CHECK([whether gcc accepts -Wimplicit-fallthrough], ac_cv_implicit_fallthrough, [dnl |
| 509 | old_CFLAGS="$CFLAGS" |
| 510 | CFLAGS="$CFLAGS -Wimplicit-fallthrough -Werror" |
| 511 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([])], |
| 512 | ac_cv_implicit_fallthrough=yes, ac_cv_implicit_fallthrough=no) |
| 513 | CFLAGS="$old_CFLAGS"]) |
| 514 | AM_CONDITIONAL(HAVE_IMPLICIT_FALLTHROUGH_WARNING, |
| 515 | [test "x$ac_cv_implicit_fallthrough" != "xno"]) |
| 516 | |
Joshua Watt | 555e15e | 2018-02-09 10:27:18 -0600 | [diff] [blame] | 517 | # Assume the fallthrough attribute is supported if -Wimplict-fallthrough is supported |
| 518 | if test "$ac_cv_implicit_fallthrough" = "yes"; then |
| 519 | AC_DEFINE([HAVE_FALLTHROUGH], [1], |
| 520 | [Defined if __attribute__((fallthrough)) is supported]) |
| 521 | fi |
| 522 | |
Anthony G. Basile | 1ab3c2b | 2015-05-04 02:25:39 +0300 | [diff] [blame] | 523 | dnl Check if we have argp available from our libc |
| 524 | AC_LINK_IFELSE( |
| 525 | [AC_LANG_PROGRAM( |
| 526 | [#include <argp.h>], |
Filipe Brandenburger | afeccd4 | 2016-05-02 12:18:47 -0700 | [diff] [blame] | 527 | [int argc=1; char *argv[]={"test"}; argp_parse(0,argc,&argv,0,0,0); return 0;] |
Anthony G. Basile | 1ab3c2b | 2015-05-04 02:25:39 +0300 | [diff] [blame] | 528 | )], |
| 529 | [libc_has_argp="true"], |
| 530 | [libc_has_argp="false"] |
| 531 | ) |
| 532 | |
| 533 | dnl If our libc doesn't provide argp, then test for libargp |
| 534 | if test "$libc_has_argp" = "false" ; then |
| 535 | AC_MSG_WARN("libc does not have argp") |
| 536 | AC_CHECK_LIB([argp], [argp_parse], [have_argp="true"], [have_argp="false"]) |
| 537 | |
| 538 | if test "$have_argp" = "false"; then |
| 539 | AC_MSG_ERROR("no libargp found") |
| 540 | else |
| 541 | argp_LDADD="-largp" |
| 542 | fi |
| 543 | else |
| 544 | argp_LDADD="" |
| 545 | fi |
| 546 | AC_SUBST([argp_LDADD]) |
| 547 | |
Érico Rolim | da855fc | 2020-11-01 21:48:50 -0300 | [diff] [blame] | 548 | saved_LIBS="$LIBS" |
| 549 | AC_SEARCH_LIBS([fts_close], [fts]) |
| 550 | LIBS="$saved_LIBS" |
| 551 | case "$ac_cv_search_fts_close" in |
| 552 | no) AC_MSG_FAILURE([failed to find fts_close]) ;; |
| 553 | -l*) fts_LIBS="$ac_cv_search_fts_close" ;; |
| 554 | *) fts_LIBS= ;; |
| 555 | esac |
| 556 | AC_SUBST([fts_LIBS]) |
| 557 | |
| 558 | saved_LIBS="$LIBS" |
| 559 | AC_SEARCH_LIBS([_obstack_free], [obstack]) |
| 560 | LIBS="$saved_LIBS" |
| 561 | case "$ac_cv_search__obstack_free" in |
| 562 | no) AC_MSG_FAILURE([failed to find obstack_free]) ;; |
| 563 | -l*) obstack_LIBS="$ac_cv_search__obstack_free" ;; |
| 564 | *) obstack_LIBS= ;; |
| 565 | esac |
| 566 | AC_SUBST([obstack_LIBS]) |
| 567 | |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 568 | dnl The directories with content. |
| 569 | |
| 570 | dnl Documentation. |
Ben Woodard | f0a5176 | 2019-08-23 13:42:06 -0700 | [diff] [blame] | 571 | AC_CONFIG_FILES([doc/Makefile]) |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 572 | |
| 573 | dnl Support library. |
| 574 | AC_CONFIG_FILES([lib/Makefile]) |
| 575 | |
| 576 | dnl ELF library. |
Ulrich Drepper | 2c9ee4f | 2007-06-06 02:49:30 +0000 | [diff] [blame] | 577 | AC_CONFIG_FILES([libelf/Makefile]) |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 578 | |
| 579 | dnl Higher-level ELF support library. |
| 580 | AC_CONFIG_FILES([libebl/Makefile]) |
| 581 | |
Mark Wielaard | 9380297 | 2014-04-11 23:52:47 +0200 | [diff] [blame] | 582 | dnl DWARF-ELF Lower-level Functions support library. |
| 583 | AC_CONFIG_FILES([libdwelf/Makefile]) |
| 584 | |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 585 | dnl DWARF library. |
| 586 | AC_CONFIG_FILES([libdw/Makefile]) |
| 587 | |
| 588 | dnl Higher-level DWARF support library. |
| 589 | AC_CONFIG_FILES([libdwfl/Makefile]) |
| 590 | |
| 591 | dnl CPU handling library. |
| 592 | AC_CONFIG_FILES([libcpu/Makefile]) |
| 593 | |
| 594 | dnl Assembler library. |
Roland McGrath | d7f8d0c | 2005-11-17 02:32:03 +0000 | [diff] [blame] | 595 | AM_CONDITIONAL(HAVE_LIBASM, true)dnl Used in tests/Makefile.am, which see. |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 596 | AC_CONFIG_FILES([libasm/Makefile]) |
| 597 | |
Roland McGrath | e47ab76 | 2005-11-17 03:16:00 +0000 | [diff] [blame] | 598 | dnl CPU-specific backend libraries. |
| 599 | AC_CONFIG_FILES([backends/Makefile]) |
| 600 | |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 601 | dnl Tools. |
| 602 | AC_CONFIG_FILES([src/Makefile po/Makefile.in]) |
| 603 | |
| 604 | dnl Test suite. |
Roland McGrath | d7f8d0c | 2005-11-17 02:32:03 +0000 | [diff] [blame] | 605 | AM_CONDITIONAL(STANDALONE, false)dnl Used in tests/Makefile.am, which see. |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 606 | AC_CONFIG_FILES([tests/Makefile]) |
| 607 | |
Mark Wielaard | 0aa60ac | 2016-01-04 21:41:52 +0100 | [diff] [blame] | 608 | dnl pkgconfig files |
Aaron Merey | 288f6b1 | 2019-10-28 13:29:26 -0400 | [diff] [blame] | 609 | AC_CONFIG_FILES([config/libelf.pc config/libdw.pc config/libdebuginfod.pc]) |
Mark Wielaard | 0aa60ac | 2016-01-04 21:41:52 +0100 | [diff] [blame] | 610 | |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 611 | # Get the definitions necessary to create the Makefiles in the po |
| 612 | # subdirectories. This is a small subset of the gettext rules. |
| 613 | AC_SUBST(USE_NLS, yes) |
| 614 | AM_PO_SUBDIRS |
| 615 | |
Roland McGrath | b4d6f0f | 2008-08-25 22:55:17 +0000 | [diff] [blame] | 616 | dnl Appended to the config.h file. |
| 617 | dnl We hide all kinds of configuration magic in lib/eu-config.h. |
| 618 | AH_BOTTOM([#include <eu-config.h>]) |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 619 | |
Roland McGrath | fbc7245 | 2008-12-16 17:03:03 -0800 | [diff] [blame] | 620 | dnl Version compatibility header. |
| 621 | AC_CONFIG_FILES([version.h:config/version.h.in]) |
| 622 | AC_SUBST([eu_version]) |
Roland McGrath | ee9d60d | 2009-04-17 13:18:35 -0700 | [diff] [blame] | 623 | |
| 624 | # 1.234<whatever> -> 1234<whatever> |
| 625 | case "$PACKAGE_VERSION" in |
Roland McGrath | e9bf1d3 | 2011-10-08 15:14:30 -0700 | [diff] [blame] | 626 | [[0-9]].*) eu_version=`echo "$PACKAGE_VERSION" | sed 's@\.@@'` ;; |
Roland McGrath | ee9d60d | 2009-04-17 13:18:35 -0700 | [diff] [blame] | 627 | *) AC_MSG_ERROR([confused by version number '$PACKAGE_VERSION']) ;; |
| 628 | esac |
| 629 | case "$eu_version" in |
| 630 | *.*) |
| 631 | # 1234.567 -> "1234", "567" |
| 632 | eu_extra_version="${eu_version#*.}" |
| 633 | eu_version="${eu_version%%.*}" |
| 634 | case "$eu_extra_version" in |
| 635 | [[0-9]][[0-9]][[0-9]]) ;; |
| 636 | [[0-9]][[0-9]]) eu_extra_version="${eu_extra_version}0" ;; |
| 637 | [[0-9]]) eu_extra_version="${eu_extra_version}00" ;; |
| 638 | *) AC_MSG_ERROR([confused by version number '$PACKAGE_VERSION']) ;; |
| 639 | esac |
| 640 | ;; |
| 641 | *) |
| 642 | eu_extra_version=000 |
| 643 | ;; |
| 644 | esac |
| 645 | |
| 646 | case "$eu_version" in |
| 647 | 0[[0-9]][[0-9]][[0-9]]) eu_version="${eu_version#0}$eu_extra_version" ;; |
| 648 | [[0-9]][[0-9]][[0-9]][[0-9]]) eu_version="${eu_version}$eu_extra_version" ;; |
| 649 | [[0-9]][[0-9]][[0-9]]) eu_version="${eu_version}0$eu_extra_version" ;; |
Ulrich Drepper | 2c71252 | 2010-06-28 12:10:53 -0700 | [diff] [blame] | 650 | [[0-9]][[0-9]]) eu_version="${eu_version}00$eu_extra_version";; |
Roland McGrath | ee9d60d | 2009-04-17 13:18:35 -0700 | [diff] [blame] | 651 | *) AC_MSG_ERROR([confused by version number '$PACKAGE_VERSION']) ;; |
Roland McGrath | fbc7245 | 2008-12-16 17:03:03 -0800 | [diff] [blame] | 652 | esac |
| 653 | |
Roland McGrath | 105e398 | 2009-04-19 16:07:45 -0700 | [diff] [blame] | 654 | # Round up to the next release API (x.y) version. |
Roland McGrath | e9bf1d3 | 2011-10-08 15:14:30 -0700 | [diff] [blame] | 655 | eu_version=$(( (eu_version + 999) / 1000 )) |
Roland McGrath | 105e398 | 2009-04-19 16:07:45 -0700 | [diff] [blame] | 656 | |
Jan Kratochvil | 0b86746 | 2013-05-30 14:37:38 +0200 | [diff] [blame] | 657 | AC_CHECK_SIZEOF(long) |
| 658 | |
Kyle McMartin | c1e0fcb | 2014-06-09 21:06:26 +0200 | [diff] [blame] | 659 | # On aarch64 before glibc 2.20 we would get the kernel user_pt_regs instead |
| 660 | # of the user_regs_struct from sys/user.h. They are structurally the same |
| 661 | # but we get either one or the other. |
| 662 | AC_CHECK_TYPE([struct user_regs_struct], |
| 663 | [sys_user_has_user_regs=yes], [sys_user_has_user_regs=no], |
| 664 | [[#include <sys/ptrace.h>] |
| 665 | [#include <sys/time.h>] |
| 666 | [#include <sys/user.h>]]) |
| 667 | if test "$sys_user_has_user_regs" = "yes"; then |
| 668 | AC_DEFINE(HAVE_SYS_USER_REGS, 1, |
| 669 | [Define to 1 if <sys/user.h> defines struct user_regs_struct]) |
| 670 | fi |
| 671 | |
Jan Kratochvil | 0b86746 | 2013-05-30 14:37:38 +0200 | [diff] [blame] | 672 | # On a 64-bit host where can can use $CC -m32, we'll run two sets of tests. |
| 673 | # Likewise in a 32-bit build on a host where $CC -m64 works. |
| 674 | utrace_BIARCH |
| 675 | # `$utrace_biarch' will be `-m64' even on an uniarch i386 machine. |
Jan Kratochvil | 8ae9bc9 | 2013-12-02 20:54:28 +0100 | [diff] [blame] | 676 | CC_BIARCH="$CC $utrace_biarch" |
Jan Kratochvil | 0b86746 | 2013-05-30 14:37:38 +0200 | [diff] [blame] | 677 | AC_SUBST([CC_BIARCH]) |
| 678 | |
Mark Wielaard | 4664fd5 | 2015-05-30 22:50:37 +0200 | [diff] [blame] | 679 | # In maintainer mode we really need flex and bison. |
| 680 | # Otherwise we really need a release dir with maintainer files generated. |
| 681 | if test "x$enable_maintainer_mode" = xyes; then |
| 682 | AC_CHECK_PROG(HAVE_FLEX, flex, yes, no) |
| 683 | if test "$HAVE_FLEX" = "no"; then |
| 684 | AC_MSG_ERROR([flex needed in maintainer mode]) |
| 685 | fi |
| 686 | AC_CHECK_PROG(HAVE_BISON, bison, yes, no) |
| 687 | if test "$HAVE_BISON" = "no"; then |
| 688 | AC_MSG_ERROR([bison needed in maintainer mode]) |
| 689 | fi |
Ross Burton | d612684 | 2018-07-04 12:11:07 +0100 | [diff] [blame] | 690 | AC_CHECK_PROG(HAVE_GAWK, gawk, yes, no) |
| 691 | if test "$HAVE_GAWK" = "no"; then |
| 692 | AC_MSG_ERROR([gawk needed in maintainer mode]) |
| 693 | fi |
Mark Wielaard | 4664fd5 | 2015-05-30 22:50:37 +0200 | [diff] [blame] | 694 | else |
| 695 | if test ! -f ${srcdir}/libdw/known-dwarf.h; then |
| 696 | AC_MSG_ERROR([No libdw/known-dwarf.h. configure --enable-maintainer-mode]) |
| 697 | fi |
| 698 | fi |
| 699 | |
| 700 | # The testfiles are all compressed, we need bunzip2 when running make check |
| 701 | AC_CHECK_PROG(HAVE_BUNZIP2, bunzip2, yes, no) |
| 702 | if test "$HAVE_BUNZIP2" = "no"; then |
| 703 | AC_MSG_WARN([No bunzip2, needed to run make check]) |
| 704 | fi |
| 705 | |
Mark Wielaard | 52536d7 | 2020-09-18 12:49:29 +0200 | [diff] [blame] | 706 | # For tests that need to use zstd compression |
| 707 | AC_CHECK_PROG(HAVE_ZSTD, zstd, yes, no) |
| 708 | AM_CONDITIONAL([HAVE_ZSTD],[test "x$HAVE_ZSTD" = "xyes"]) |
| 709 | |
Mark Wielaard | f7f0cdc | 2020-06-19 19:41:08 +0200 | [diff] [blame] | 710 | # Look for libcurl for libdebuginfod minimum version as per rhel7. |
| 711 | AC_ARG_ENABLE([libdebuginfod],AC_HELP_STRING([--enable-libdebuginfod], [Build debuginfod client library (can be =dummy)])) |
| 712 | AS_IF([test "x$enable_libdebuginfod" != "xno"], [ |
| 713 | if test "x$enable_libdebuginfod" != "xdummy"; then |
| 714 | AC_MSG_NOTICE([checking libdebuginfod dependencies, --disable-libdebuginfod or --enable-libdebuginfo=dummy to skip]) |
| 715 | enable_libdebuginfod=yes # presume success |
| 716 | PKG_PROG_PKG_CONFIG |
| 717 | PKG_CHECK_MODULES([libcurl],[libcurl >= 7.29.0],[],[enable_libdebuginfod=no]) |
| 718 | if test "x$enable_libdebuginfod" = "xno"; then |
| 719 | AC_MSG_ERROR([dependencies not found, use --disable-libdebuginfod to disable or --enable-libdebuginfod=dummy to build a (bootstrap) dummy library.]) |
| 720 | fi |
| 721 | else |
| 722 | AC_MSG_NOTICE([building (bootstrap) dummy libdebuginfo library]) |
| 723 | fi |
| 724 | ]) |
| 725 | |
Dmitry V. Levin | 4ced301 | 2020-08-20 23:27:24 +0300 | [diff] [blame] | 726 | AS_IF([test "x$enable_libdebuginfod" = "xyes" || test "x$enable_libdebuginfod" = "xdummy"], |
| 727 | [AC_DEFINE([ENABLE_LIBDEBUGINFOD], [1], [Enable libdebuginfod])]) |
| 728 | AS_IF([test "x$enable_libdebuginfod" = "xdummy"], |
| 729 | [AC_DEFINE([DUMMY_LIBDEBUGINFOD], [1], [Build dummy libdebuginfod])]) |
Mark Wielaard | f7f0cdc | 2020-06-19 19:41:08 +0200 | [diff] [blame] | 730 | AM_CONDITIONAL([LIBDEBUGINFOD],[test "x$enable_libdebuginfod" = "xyes" || test "x$enable_libdebuginfod" = "xdummy"]) |
| 731 | AM_CONDITIONAL([DUMMY_LIBDEBUGINFOD],[test "x$enable_libdebuginfod" = "xdummy"]) |
| 732 | |
| 733 | # Look for libmicrohttpd, libarchive, sqlite for debuginfo server |
| 734 | # minimum versions as per rhel7. |
| 735 | AC_ARG_ENABLE([debuginfod],AC_HELP_STRING([--enable-debuginfod], [Build debuginfod server])) |
Frank Ch. Eigler | e27e30c | 2019-10-28 13:29:26 -0400 | [diff] [blame] | 736 | AC_PROG_CXX |
Frank Ch. Eigler | e27e30c | 2019-10-28 13:29:26 -0400 | [diff] [blame] | 737 | AS_IF([test "x$enable_debuginfod" != "xno"], [ |
Frank Ch. Eigler | 14d5b41 | 2020-02-03 06:29:31 -0500 | [diff] [blame] | 738 | AC_MSG_NOTICE([checking debuginfod C++11 support, --disable-debuginfod to skip]) |
| 739 | AX_CXX_COMPILE_STDCXX(11, noext, mandatory) |
| 740 | AC_MSG_NOTICE([checking debuginfod dependencies, --disable-debuginfod to skip]) |
Mark Wielaard | f7f0cdc | 2020-06-19 19:41:08 +0200 | [diff] [blame] | 741 | if test "x$enable_libdebuginfod" = "xno"; then |
| 742 | AC_MSG_ERROR([need libdebuginfod (or dummy), use --disable-debuginfod to disable.]) |
| 743 | fi |
Frank Ch. Eigler | e27e30c | 2019-10-28 13:29:26 -0400 | [diff] [blame] | 744 | enable_debuginfod=yes # presume success |
| 745 | PKG_PROG_PKG_CONFIG |
Frank Ch. Eigler | e27e30c | 2019-10-28 13:29:26 -0400 | [diff] [blame] | 746 | PKG_CHECK_MODULES([libmicrohttpd],[libmicrohttpd >= 0.9.33],[],[enable_debuginfod=no]) |
Frank Ch. Eigler | e27e30c | 2019-10-28 13:29:26 -0400 | [diff] [blame] | 747 | PKG_CHECK_MODULES([sqlite3],[sqlite3 >= 3.7.17],[],[enable_debuginfod=no]) |
| 748 | PKG_CHECK_MODULES([libarchive],[libarchive >= 3.1.2],[],[enable_debuginfod=no]) |
| 749 | if test "x$enable_debuginfod" = "xno"; then |
Frank Ch. Eigler | 14d5b41 | 2020-02-03 06:29:31 -0500 | [diff] [blame] | 750 | AC_MSG_ERROR([dependencies not found, use --disable-debuginfod to disable.]) |
Frank Ch. Eigler | e27e30c | 2019-10-28 13:29:26 -0400 | [diff] [blame] | 751 | fi |
| 752 | ]) |
Aaron Merey | 288f6b1 | 2019-10-28 13:29:26 -0400 | [diff] [blame] | 753 | |
Frank Ch. Eigler | e27e30c | 2019-10-28 13:29:26 -0400 | [diff] [blame] | 754 | AS_IF([test "x$enable_debuginfod" != "xno"],AC_DEFINE([ENABLE_DEBUGINFOD],[1],[Build debuginfod])) |
Aaron Merey | 288f6b1 | 2019-10-28 13:29:26 -0400 | [diff] [blame] | 755 | AM_CONDITIONAL([DEBUGINFOD],[test "x$enable_debuginfod" = "xyes"]) |
| 756 | |
Frank Ch. Eigler | 94708e9 | 2020-10-01 16:56:49 -0400 | [diff] [blame] | 757 | dnl for /etc/profile.d/elfutils.{csh,sh} |
| 758 | default_debuginfod_urls="" |
| 759 | AC_ARG_ENABLE(debuginfod-urls, |
| 760 | [AS_HELP_STRING([--enable-debuginfod-urls@<:@=URLS@:>@],[add URLS to profile.d DEBUGINFOD_URLS])], |
| 761 | [if test "x${enableval}" = "xyes"; |
| 762 | then default_debuginfod_urls="https://debuginfod.elfutils.org/"; |
| 763 | elif test "x${enableval}" != "xno"; then |
| 764 | default_debuginfod_urls="${enableval}"; |
| 765 | fi], |
| 766 | [default_debuginfod_urls=""]) |
| 767 | AC_SUBST(DEBUGINFOD_URLS, $default_debuginfod_urls) |
| 768 | AC_CONFIG_FILES([config/profile.sh config/profile.csh]) |
Aaron Merey | 288f6b1 | 2019-10-28 13:29:26 -0400 | [diff] [blame] | 769 | |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 770 | AC_OUTPUT |
Mark Wielaard | 7702a3c | 2015-05-01 09:23:57 +0200 | [diff] [blame] | 771 | |
| 772 | AC_MSG_NOTICE([ |
| 773 | ===================================================================== |
| 774 | elfutils: ${PACKAGE_VERSION} (eu_version: ${eu_version}) |
| 775 | ===================================================================== |
| 776 | |
| 777 | Prefix : ${prefix} |
| 778 | Program prefix ("eu-" recommended) : ${program_prefix} |
| 779 | Source code location : ${srcdir} |
| 780 | Maintainer mode : ${enable_maintainer_mode} |
Mark Wielaard | 7702a3c | 2015-05-01 09:23:57 +0200 | [diff] [blame] | 781 | build arch : ${ac_cv_build} |
| 782 | |
| 783 | RECOMMENDED FEATURES (should all be yes) |
| 784 | gzip support : ${with_zlib} |
| 785 | bzip2 support : ${with_bzlib} |
| 786 | lzma/xz support : ${with_lzma} |
Mark Wielaard | 52536d7 | 2020-09-18 12:49:29 +0200 | [diff] [blame] | 787 | zstd support : ${with_zstd} |
Mark Wielaard | e6e80da | 2015-05-01 10:31:36 +0200 | [diff] [blame] | 788 | libstdc++ demangle support : ${enable_demangler} |
Mark Wielaard | 7702a3c | 2015-05-01 09:23:57 +0200 | [diff] [blame] | 789 | File textrel check : ${enable_textrelcheck} |
| 790 | Symbol versioning : ${enable_symbol_versioning} |
| 791 | |
| 792 | NOT RECOMMENDED FEATURES (should all be no) |
| 793 | Experimental thread safety : ${use_locks} |
Mark Wielaard | b63007e | 2019-01-18 14:18:22 +0100 | [diff] [blame] | 794 | install elf.h : ${install_elfh} |
Mark Wielaard | 7702a3c | 2015-05-01 09:23:57 +0200 | [diff] [blame] | 795 | |
| 796 | OTHER FEATURES |
| 797 | Deterministic archives by default : ${default_ar_deterministic} |
| 798 | Native language support : ${USE_NLS} |
Jonathon Anderson | 5e2a8e2 | 2019-08-25 09:53:50 -0500 | [diff] [blame] | 799 | Extra Valgrind annotations : ${use_vg_annotations} |
Mark Wielaard | f7f0cdc | 2020-06-19 19:41:08 +0200 | [diff] [blame] | 800 | libdebuginfod client support : ${enable_libdebuginfod} |
| 801 | Debuginfod server support : ${enable_debuginfod} |
Frank Ch. Eigler | 94708e9 | 2020-10-01 16:56:49 -0400 | [diff] [blame] | 802 | Default DEBUGINFOD_URLS : ${default_debuginfod_urls} |
Mark Wielaard | 7702a3c | 2015-05-01 09:23:57 +0200 | [diff] [blame] | 803 | |
| 804 | EXTRA TEST FEATURES (used with make check) |
Mark Wielaard | 4664fd5 | 2015-05-30 22:50:37 +0200 | [diff] [blame] | 805 | have bunzip2 installed (required) : ${HAVE_BUNZIP2} |
Mark Wielaard | 52536d7 | 2020-09-18 12:49:29 +0200 | [diff] [blame] | 806 | have zstd installed : ${HAVE_ZSTD} |
Mark Wielaard | 7702a3c | 2015-05-01 09:23:57 +0200 | [diff] [blame] | 807 | debug branch prediction : ${use_debugpred} |
| 808 | gprof support : ${use_gprof} |
| 809 | gcov support : ${use_gcov} |
| 810 | run all tests under valgrind : ${use_valgrind} |
Mark Wielaard | 2b250b7 | 2015-05-21 23:36:51 +0200 | [diff] [blame] | 811 | gcc undefined behaviour sanitizer : ${use_undefined} |
Mark Wielaard | 7702a3c | 2015-05-01 09:23:57 +0200 | [diff] [blame] | 812 | use rpath in tests : ${tests_use_rpath} |
| 813 | test biarch : ${utrace_cv_cc_biarch} |
| 814 | ]) |
Mark Wielaard | b63007e | 2019-01-18 14:18:22 +0100 | [diff] [blame] | 815 | |
| 816 | if test "$install_elfh" = yes; then |
| 817 | if test "${prefix}" = "/usr/local" -o "${prefix}" = "/usr"; then |
| 818 | AC_MSG_WARN([installing elf.h in ${includedir} might conflict with glibc/system elf.h]) |
| 819 | fi |
| 820 | fi |