crates/backtrace-sys2/src/libbacktrace/configure.ac in pf2-0.6.0 vs crates/backtrace-sys2/src/libbacktrace/configure.ac in pf2-0.7.0
- old
+ new
@@ -1,7 +1,7 @@
# configure.ac -- Backtrace configure script.
-# Copyright (C) 2012-2021 Free Software Foundation, Inc.
+# Copyright (C) 2012-2024 Free Software Foundation, Inc.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
@@ -88,10 +88,12 @@
AM_CONDITIONAL(HAVE_DWZ, test "$DWZ" != "")
LT_INIT
AM_PROG_LIBTOOL
+AM_CONDITIONAL([ENABLE_DARWIN_AT_RPATH], [test x$enable_darwin_at_rpath = xyes])
+
AC_SYS_LARGEFILE
backtrace_supported=yes
if test -n "${with_target_subdir}"; then
@@ -140,11 +142,13 @@
fi
AC_SUBST(EXTRA_FLAGS)
ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wwrite-strings -Wstrict-prototypes \
-Wmissing-prototypes -Wold-style-definition \
- -Wmissing-format-attribute -Wcast-qual],
+ -Wmissing-format-attribute -Wcast-qual \
+ -Wno-attributes -Wno-unknown-attributes \
+ -Wpointer-arith],
[WARN_FLAGS])
AC_ARG_ENABLE([werror],
[AS_HELP_STRING([--disable-werror], [disable building with -Werror])])
AS_IF([test "x$enable_werror" != "xno" && test -n "${with_target_subdir}"],
@@ -372,10 +376,14 @@
if test "$have_loadquery" = "yes"; then
AC_DEFINE(HAVE_LOADQUERY, 1, [Define if AIX loadquery is available.])
fi
AC_CHECK_HEADERS(windows.h)
+AC_CHECK_HEADERS(tlhelp32.h, [], [],
+[#ifdef HAVE_WINDOWS_H
+# include <windows.h>
+#endif])
# Check for the fcntl function.
if test -n "${with_target_subdir}"; then
case "${host}" in
*-*-mingw*) have_fcntl=no ;;
@@ -495,19 +503,30 @@
[libbacktrace_cv_ld_buildid=yes],
[libbacktrace_cv_ld_buildid=no])
LDFLAGS=$LDFLAGS_hold])
AM_CONDITIONAL(HAVE_BUILDID, test "$libbacktrace_cv_ld_buildid" = yes)
-dnl Test whether the linker supports the --compress-debug-sections option.
-AC_CACHE_CHECK([whether --compress-debug-sections is supported],
-[libgo_cv_ld_compress],
+dnl Test whether the linker supports the --compress-debug-sections=zlib-gnu
+dnl option.
+AC_CACHE_CHECK([whether --compress-debug-sections=zlib-gnu is supported],
+[libgo_cv_ld_compress_zlib_gnu],
[LDFLAGS_hold=$LDFLAGS
LDFLAGS="$LDFLAGS -Wl,--compress-debug-sections=zlib-gnu"
AC_LINK_IFELSE([AC_LANG_PROGRAM(,)],
-[libgo_cv_ld_compress=yes],
-[libgo_cv_ld_compress=no])
+[libgo_cv_ld_compress_zlib_gnu=yes],
+[libgo_cv_ld_compress_zlib_gnu=no])
LDFLAGS=$LDFLAGS_hold])
-AM_CONDITIONAL(HAVE_COMPRESSED_DEBUG, test "$libgo_cv_ld_compress" = yes)
+AM_CONDITIONAL(HAVE_COMPRESSED_DEBUG_ZLIB_GNU, test "$libgo_cv_ld_compress_zlib_gnu" = yes)
+
+AC_CACHE_CHECK([whether --compress-debug-sections=zlib-gabi is supported],
+[libgo_cv_ld_compress_zlib_gabi],
+[LDFLAGS_hold=$LDFLAGS
+LDFLAGS="$LDFLAGS -Wl,--compress-debug-sections=zlib-gabi"
+AC_LINK_IFELSE([AC_LANG_PROGRAM(,)],
+[libgo_cv_ld_compress_zlib_gabi=yes],
+[libgo_cv_ld_compress_zlib_gabi=no])
+LDFLAGS=$LDFLAGS_hold])
+AM_CONDITIONAL(HAVE_COMPRESSED_DEBUG_ZLIB_GABI, test "$libgo_cv_ld_compress_zlib_gabi" = yes)
AC_CHECK_LIB([zstd], [ZSTD_compress],
[AC_DEFINE(HAVE_ZSTD, 1, [Define if -lzstd is available.])])
AM_CONDITIONAL(HAVE_ZSTD, test "$ac_cv_lib_zstd_ZSTD_compress" = yes)