diff options
Diffstat (limited to 'libbacktrace/configure')
-rwxr-xr-x | libbacktrace/configure | 204 |
1 files changed, 193 insertions, 11 deletions
diff --git a/libbacktrace/configure b/libbacktrace/configure index e5ca8ad..9d22b74 100755 --- a/libbacktrace/configure +++ b/libbacktrace/configure @@ -651,8 +651,14 @@ HAVE_OBJCOPY_DEBUGLINK_FALSE HAVE_OBJCOPY_DEBUGLINK_TRUE READELF OBJCOPY +HAVE_COMPRESSED_DEBUG_ZSTD_FALSE +HAVE_COMPRESSED_DEBUG_ZSTD_TRUE +HAVE_ZSTD_FALSE +HAVE_ZSTD_TRUE HAVE_COMPRESSED_DEBUG_FALSE HAVE_COMPRESSED_DEBUG_TRUE +HAVE_BUILDID_FALSE +HAVE_BUILDID_TRUE HAVE_ZLIB_FALSE HAVE_ZLIB_TRUE HAVE_DWARF5_FALSE @@ -801,6 +807,7 @@ with_gnu_ld enable_libtool_lock enable_largefile enable_cet +enable_werror with_system_libunwind enable_host_shared ' @@ -1448,6 +1455,7 @@ Optional Features: --disable-libtool-lock avoid locking (might break parallel builds) --disable-largefile omit support for large files --enable-cet enable Intel CET in target libraries [default=auto] + --disable-werror disable building with -Werror --enable-host-shared build host code as shared libraries --enable-cet enable Intel CET in host libraries [default=auto] @@ -11571,7 +11579,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11574 "configure" +#line 11582 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11677,7 +11685,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11680 "configure" +#line 11688 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12362,10 +12370,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "${with_target_subdir}"; then - WARN_FLAGS="$WARN_FLAGS -Werror" +# Check whether --enable-werror was given. +if test "${enable_werror+set}" = set; then : + enableval=$enable_werror; fi +if test "x$enable_werror" != "xno" && test -n "${with_target_subdir}"; then : + WARN_FLAGS="$WARN_FLAGS -Werror" +fi if test -n "${with_target_subdir}"; then @@ -13323,26 +13335,31 @@ fi # Check for dl_iterate_phdr. -for ac_header in link.h +for ac_header in link.h sys/link.h do : - ac_fn_c_check_header_mongrel "$LINENO" "link.h" "ac_cv_header_link_h" "$ac_includes_default" -if test "x$ac_cv_header_link_h" = xyes; then : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define HAVE_LINK_H 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done -if test "$ac_cv_header_link_h" = "no"; then +if test "$ac_cv_header_link_h" = "no" -a "$ac_cv_header_sys_link_h" = "no"; then have_dl_iterate_phdr=no else if test -n "${with_target_subdir}"; then + link_h=link.h + if test "$ac_cv_header_link_h" = "no"; then + link_h=sys/link.h + fi # When built as a GCC target library, we can't do a link test. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include <link.h> +#include <$link_h> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | @@ -13430,6 +13447,19 @@ $as_echo "#define HAVE_LOADQUERY 1" >>confdefs.h fi +for ac_header in windows.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" +if test "x$ac_cv_header_windows_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WINDOWS_H 1 +_ACEOF + +fi + +done + + # Check for the fcntl function. if test -n "${with_target_subdir}"; then case "${host}" in @@ -13506,6 +13536,19 @@ $as_echo "#define HAVE_GETEXECNAME 1" >>confdefs.h fi +# Check for _pgmptr variable, contains the executable filename on windows +ac_fn_c_check_decl "$LINENO" "_pgmptr" "ac_cv_have_decl__pgmptr" "$ac_includes_default" +if test "x$ac_cv_have_decl__pgmptr" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL__PGMPTR $ac_have_decl +_ACEOF + + # Check for sysctl definitions. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for KERN_PROC" >&5 @@ -13765,6 +13808,44 @@ else fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether --build-id is supported" >&5 +$as_echo_n "checking whether --build-id is supported... " >&6; } +if ${libbacktrace_cv_ld_buildid+:} false; then : + $as_echo_n "(cached) " >&6 +else + LDFLAGS_hold=$LDFLAGS +LDFLAGS="$LDFLAGS -Wl,--build-id" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + libbacktrace_cv_ld_buildid=yes +else + libbacktrace_cv_ld_buildid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LDFLAGS=$LDFLAGS_hold +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libbacktrace_cv_ld_buildid" >&5 +$as_echo "$libbacktrace_cv_ld_buildid" >&6; } + if test "$libbacktrace_cv_ld_buildid" = yes; then + HAVE_BUILDID_TRUE= + HAVE_BUILDID_FALSE='#' +else + HAVE_BUILDID_TRUE='#' + HAVE_BUILDID_FALSE= +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether --compress-debug-sections is supported" >&5 $as_echo_n "checking whether --compress-debug-sections is supported... " >&6; } if ${libgo_cv_ld_compress+:} false; then : @@ -13803,6 +13884,95 @@ else fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD_compress in -lzstd" >&5 +$as_echo_n "checking for ZSTD_compress in -lzstd... " >&6; } +if ${ac_cv_lib_zstd_ZSTD_compress+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lzstd $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ZSTD_compress (); +int +main () +{ +return ZSTD_compress (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_zstd_ZSTD_compress=yes +else + ac_cv_lib_zstd_ZSTD_compress=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zstd_ZSTD_compress" >&5 +$as_echo "$ac_cv_lib_zstd_ZSTD_compress" >&6; } +if test "x$ac_cv_lib_zstd_ZSTD_compress" = xyes; then : + +$as_echo "#define HAVE_ZSTD 1" >>confdefs.h + +fi + + if test "$ac_cv_lib_zstd_ZSTD_compress" = yes; then + HAVE_ZSTD_TRUE= + HAVE_ZSTD_FALSE='#' +else + HAVE_ZSTD_TRUE='#' + HAVE_ZSTD_FALSE= +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether --compress-debug-sections=zstd is supported" >&5 +$as_echo_n "checking whether --compress-debug-sections=zstd is supported... " >&6; } +if ${libgo_cv_ld_compress_zstd+:} false; then : + $as_echo_n "(cached) " >&6 +else + LDFLAGS_hold=$LDFLAGS +LDFLAGS="$LDFLAGS -Wl,--compress-debug-sections=zstd" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + libgo_cv_ld_compress_zstd=yes +else + libgo_cv_ld_compress_zstd=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LDFLAGS=$LDFLAGS_hold +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgo_cv_ld_compress_zstd" >&5 +$as_echo "$libgo_cv_ld_compress_zstd" >&6; } + if test "$libgo_cv_ld_compress_zstd" = yes; then + HAVE_COMPRESSED_DEBUG_ZSTD_TRUE= + HAVE_COMPRESSED_DEBUG_ZSTD_FALSE='#' +else + HAVE_COMPRESSED_DEBUG_ZSTD_TRUE='#' + HAVE_COMPRESSED_DEBUG_ZSTD_FALSE= +fi + + # Extract the first word of "objcopy", so it can be a program name with args. set dummy objcopy; ac_word=$2 @@ -13887,7 +14057,7 @@ else libbacktrace_cv_objcopy_debuglink=no elif ! test -n "${OBJCOPY}"; then libbacktrace_cv_objcopy_debuglink=no -elif ${OBJCOPY} --help | fgrep add-gnu-debuglink >/dev/null 2>&1; then +elif ${OBJCOPY} --help | grep add-gnu-debuglink >/dev/null 2>&1; then libbacktrace_cv_objcopy_debuglink=yes else libbacktrace_cv_objcopy_debuglink=no @@ -14345,10 +14515,22 @@ if test -z "${HAVE_ZLIB_TRUE}" && test -z "${HAVE_ZLIB_FALSE}"; then as_fn_error $? "conditional \"HAVE_ZLIB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_BUILDID_TRUE}" && test -z "${HAVE_BUILDID_FALSE}"; then + as_fn_error $? "conditional \"HAVE_BUILDID\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${HAVE_COMPRESSED_DEBUG_TRUE}" && test -z "${HAVE_COMPRESSED_DEBUG_FALSE}"; then as_fn_error $? "conditional \"HAVE_COMPRESSED_DEBUG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_ZSTD_TRUE}" && test -z "${HAVE_ZSTD_FALSE}"; then + as_fn_error $? "conditional \"HAVE_ZSTD\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_COMPRESSED_DEBUG_ZSTD_TRUE}" && test -z "${HAVE_COMPRESSED_DEBUG_ZSTD_FALSE}"; then + as_fn_error $? "conditional \"HAVE_COMPRESSED_DEBUG_ZSTD\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${HAVE_OBJCOPY_DEBUGLINK_TRUE}" && test -z "${HAVE_OBJCOPY_DEBUGLINK_FALSE}"; then as_fn_error $? "conditional \"HAVE_OBJCOPY_DEBUGLINK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 |