• Home
  • Raw
  • Download

Lines Matching +full:- +full:- +full:enable +full:- +full:werror

2 dnl Configure input file for elfutils.                     -*-autoconf-*-
4 dnl Copyright (C) 1996-2019 Red Hat, Inc.
32 # We want eu- as default program prefix if none was given by the user.
33 # But if the user explicitly provided --program-prefix="" then pretend
38 AC_MSG_NOTICE([No --program-prefix given, using "eu-"])
39 program_prefix="eu-"
41 AC_MSG_NOTICE([Using no program-prefix])
48 AC_COPYRIGHT([Copyright (C) 1996-2022 The elfutils developers.])
51 dnl We use GNU make extensions; automake 1.10 defaults to -Wportability.
52 AM_INIT_AUTOMAKE([gnits 1.11 -Wno-portability dist-bzip2 no-dist-gzip parallel-tests])
64 dnl debuginfo-server client & server parts.
69 AC_ARG_ENABLE(deterministic-archives,
70 [AS_HELP_STRING([--enable-deterministic-archives],
71 [ar and ranlib default to -D behavior])], [
78 [Should ar and ranlib use -D behavior by default?])
80 AC_ARG_ENABLE([thread-safety],
81 AS_HELP_STRING([--enable-thread-safety],
82 [enable thread safety of libraries EXPERIMENTAL]),
87 [AC_MSG_WARN([thread-safety is EXPERIMENTAL tests might fail.])])
89 AH_TEMPLATE([USE_LOCKS], [Defined if libraries should be thread-safe.])
104 CFLAGS="$save_CFLAGS -Werror"
120 CFLAGS="$save_CFLAGS -Werror"
130 AC_CACHE_CHECK([whether gcc supports -fPIC], ac_cv_fpic, [dnl
132 CFLAGS="$save_CFLAGS -fPIC -Werror"
137 fpic_CFLAGS="-fPIC"
143 AC_CACHE_CHECK([whether gcc supports -fPIE], ac_cv_fpie, [dnl
145 CFLAGS="$save_CFLAGS -fPIE -Werror"
150 fpie_CFLAGS="-fPIE"
156 dso_LDFLAGS="-shared"
158 ZDEFS_LDFLAGS="-Wl,-z,defs"
169 # We really want build-ids. Warn and force generating them if gcc was
170 # configure without --enable-linker-build-id
171 AC_CACHE_CHECK([whether the compiler generates build-ids], ac_cv_buildid, [dnl
172 AC_LINK_IFELSE([AC_LANG_PROGRAM()],[ac_cv_buildid=yes; $READELF -n conftest$EXEEXT | grep -q NT_GNU…
174 AC_MSG_WARN([compiler doesn't generate build-id by default])
175 LDFLAGS="$LDFLAGS -Wl,--build-id"
178 ZRELRO_LDFLAGS="-Wl,-z,relro"
234 [CFLAGS="$CFLAGS -DBAD_FTS=1" CXXFLAGS="$CXXFLAGS -DBAD_FTS=1"])
236 # See if we can add -D_FORTIFY_SOURCE=2 or =3. Don't do it if it is already
239 AC_MSG_CHECKING([whether to add -D_FORTIFY_SOURCE=2 or =3 to CFLAGS])
241 *-D_FORTIFY_SOURCE=*)
247 CFLAGS="-D_FORTIFY_SOURCE=3 $save_CFLAGS -Werror"
252 ]])], [ AC_MSG_RESULT([yes -D_FORTIFY_SOURCE=3])
253 fortified_cflags="-D_FORTIFY_SOURCE=3" ], [])
256 if test -z "$fortified_cflags"; then
257 CFLAGS="-D_FORTIFY_SOURCE=2 $save_CFLAGS -Werror"
261 ]])], [ AC_MSG_RESULT([yes -D_FORTIFY_SOURCE=2])
262 fortified_cflags="-D_FORTIFY_SOURCE=2" ],
270 dnl enable debugging of branch prediction.
272 AS_HELP_STRING([--enable-debugpred],[build binaries with support to debug branch prediction]),
280 dnl Enable gprof support.
282 AS_HELP_STRING([--enable-gprof],[build binaries with gprof support]), [use_gprof=$enableval], [use_…
284 CFLAGS="$CFLAGS -pg"
285 LDFLAGS="$LDFLAGS -pg"
289 # Enable gcov support.
291 AS_HELP_STRING([--enable-gcov],[build binaries with gcov support]), [use_gcov=$enableval], [use_gco…
293 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
294 CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
295 LDFLAGS="$LDFLAGS -fprofile-arcs"
302 AC_ARG_ENABLE([sanitize-undefined],
303 AS_HELP_STRING([--enable-sanitize-undefined],
311 CFLAGS="$CFLAGS -fsanitize=undefined -fno-sanitize-recover"
312 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover"
323 [Building with -fsanitize=undefined or not])
325 AC_ARG_ENABLE([sanitize-address],
326 AS_HELP_STRING([--enable-sanitize-address],
334 CFLAGS="$CFLAGS -fsanitize=address -fno-sanitize-recover"
335 CXXFLAGS="$CXXFLAGS -fsanitize=address -fno-sanitize-recover"
336 # Some compilers don't handle -fsanatize=address correctly with --no-undefined
337 LDFLAGS="-Wl,-z,defs -shared"
347 AS_HELP_STRING([--enable-valgrind],[run all tests under valgrind]),
351 AC_MSG_ERROR([cannot enable valgrind and sanitize address together])
361 AS_HELP_STRING([--with-valgrind],[include directory for Valgrind headers]),
365 CFLAGS="$CFLAGS -I$with_valgrind_headers"
370 CFLAGS="$save_CFLAGS -I$with_valgrind_headers" ],
374 AC_ARG_ENABLE([valgrind-annotations],
375 AS_HELP_STRING([--enable-valgrind-annotations],[insert extra annotations for better valgrind suppor…
389 AC_ARG_ENABLE([install-elfh],
390 AS_HELP_STRING([--enable-install-elfh],[install elf.h in include dir]),
395 test "$use_gprof" = yes -o "$use_gcov" = yes])
397 AC_ARG_ENABLE([tests-rpath],
398 AS_HELP_STRING([--enable-tests-rpath],[build $ORIGIN-using rpath into tests]),
447 CFLAGS="$CFLAGS -D_GNU_SOURCE"
458 AS_HELP_STRING([--disable-textrelcheck],
464 AC_ARG_ENABLE([symbol-versioning],
465 AS_HELP_STRING([--disable-symbol-versioning],
478 Use --disable-symbol-versioning to build without.])
487 AC_CACHE_CHECK([whether gcc accepts -Wstack-usage], ac_cv_stack_usage, [dnl
489 CFLAGS="$CFLAGS -Wstack-usage=262144 -Werror"
495 # -Wlogical-op was too fragile in the past, make sure we get a sane one.
496 AC_CACHE_CHECK([whether gcc has a sane -Wlogical-op], ac_cv_logical_op, [dnl
498 CFLAGS="$CFLAGS -Wlogical-op -Werror"
507 # -Wduplicated-cond was added by GCC6
508 AC_CACHE_CHECK([whether gcc accepts -Wduplicated-cond], ac_cv_duplicated_cond, [dnl
510 CFLAGS="$CFLAGS -Wduplicated-cond -Werror"
517 # -Wnull-dereference was added by GCC6
518 AC_CACHE_CHECK([whether gcc accepts -Wnull-dereference], ac_cv_null_dereference, [dnl
520 CFLAGS="$CFLAGS -Wnull-dereference -Werror"
527 # -Wimplicit-fallthrough was added by GCC7
528 AC_CACHE_CHECK([whether gcc accepts -Wimplicit-fallthrough], ac_cv_implicit_fallthrough, [dnl
530 CFLAGS="$CFLAGS -Wimplicit-fallthrough -Werror"
537 # Check whether the compiler additionally accepts -Wimplicit-fallthrough=5
540 AC_CACHE_CHECK([whether the compiler accepts -Wimplicit-fallthrough=5], ac_cv_implicit_fallthrough_…
542 CFLAGS="$CFLAGS -Wimplicit-fallthrough=5 -Werror"
549 # Assume the fallthrough attribute is supported if -Wimplict-fallthrough is supported
555 AC_CACHE_CHECK([whether the compiler accepts -Wtrampolines], ac_cv_trampolines, [dnl
557 CFLAGS="$CFLAGS -Wtrampolines -Werror"
564 AC_CACHE_CHECK([whether the compiler accepts -Wno-packed-not-aligned], ac_cv_no_packed_not_aligned,…
566 CFLAGS="$CFLAGS -Wno-packed-not-aligned -Werror"
578 -l*) argp_LDADD="$ac_cv_search_argp_parse" ;;
588 -l*) fts_LIBS="$ac_cv_search_fts_close" ;;
598 -l*) obstack_LIBS="$ac_cv_search__obstack_free" ;;
614 dnl Higher-level ELF support library.
617 dnl DWARF-ELF Lower-level Functions support library.
623 dnl Higher-level DWARF support library.
632 dnl CPU-specific backend libraries.
645 dnl translatable strings, we must use need-formatstring-macros here.
646 AM_GNU_GETTEXT([external], [need-formatstring-macros])
656 dnl We hide all kinds of configuration magic in lib/eu-config.h.
657 AH_BOTTOM([#include <eu-config.h>])
663 # 1.234<whatever> -> 1234<whatever>
665 [[0-9]].*) eu_version=`echo "$PACKAGE_VERSION" | sed 's@\.@@'` ;;
670 # 1234.567 -> "1234", "567"
674 [[0-9]][[0-9]][[0-9]]) ;;
675 [[0-9]][[0-9]]) eu_extra_version="${eu_extra_version}0" ;;
676 [[0-9]]) eu_extra_version="${eu_extra_version}00" ;;
686 0[[0-9]][[0-9]][[0-9]]) eu_version="${eu_version#0}$eu_extra_version" ;;
687 [[0-9]][[0-9]][[0-9]][[0-9]]) eu_version="${eu_version}$eu_extra_version" ;;
688 [[0-9]][[0-9]][[0-9]]) eu_version="${eu_version}0$eu_extra_version" ;;
689 [[0-9]][[0-9]]) eu_version="${eu_version}00$eu_extra_version";;
711 # On a 64-bit host where can can use $CC -m32, we'll run two sets of tests.
732 if test ! -f ${srcdir}/libdw/known-dwarf.h; then
733 AC_MSG_ERROR([No libdw/known-dwarf.h. configure --enable-maintainer-mode])
748 AC_ARG_ENABLE([libdebuginfod],AS_HELP_STRING([--enable-libdebuginfod], [Build debuginfod client lib…
751 …AC_MSG_NOTICE([checking libdebuginfod dependencies, --disable-libdebuginfod or --enable-libdebugin…
756 …AC_MSG_ERROR([dependencies not found, use --disable-libdebuginfod to disable or --enable-libdebugi…
764 AC_DEFINE([HAVE_PTHREAD_SETNAME_NP],[1],[Enable pthread_setname_np])])
767 [AC_DEFINE([ENABLE_LIBDEBUGINFOD], [1], [Enable libdebuginfod])])
775 AC_ARG_ENABLE([debuginfod],AS_HELP_STRING([--enable-debuginfod], [Build debuginfod server]))
777 AC_MSG_NOTICE([checking debuginfod C++11 support, --disable-debuginfod to skip])
779 AC_MSG_NOTICE([checking debuginfod dependencies, --disable-debuginfod to skip])
781 AC_MSG_ERROR([need libdebuginfod (or dummy), use --disable-debuginfod to disable.])
790 AC_MSG_ERROR([dependencies not found, use --disable-debuginfod to disable.])
800 AC_ARG_ENABLE(debuginfod-urls,
801 … [AS_HELP_STRING([--enable-debuginfod-urls@<:@=URLS@:>@],[add URLS to profile.d DEBUGINFOD_URLS])],
819 Program prefix ("eu-" recommended) : ${program_prefix}
862 if test "${prefix}" = "/usr/local" -o "${prefix}" = "/usr"; then