summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2019-12-15 18:04:50 +0100
committerAndrei Karas <akaras@inbox.ru>2020-03-30 06:35:10 +0300
commit8578597b71e94cbd599eb211665b1f6a2dbc2bb0 (patch)
tree8fdad8cc7a8f9a46c0afbef0cd0a5374e78fe88b /configure
parent960d13887d7e1e4d14ae68d72163d639590673b5 (diff)
downloadhercules-8578597b71e94cbd599eb211665b1f6a2dbc2bb0.tar.gz
hercules-8578597b71e94cbd599eb211665b1f6a2dbc2bb0.tar.bz2
hercules-8578597b71e94cbd599eb211665b1f6a2dbc2bb0.tar.xz
hercules-8578597b71e94cbd599eb211665b1f6a2dbc2bb0.zip
Disable libbacktrace by default
It's currently only tested on linux, and doesn't work yet on macOS (tested on 10.15). Further work is necessary Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure310
1 files changed, 180 insertions, 130 deletions
diff --git a/configure b/configure
index 5816580ad..a1d233c57 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.ac 9bce92f63.
+# From configure.ac aa7aba7b6.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69.
#
@@ -1366,7 +1366,8 @@ Optional Features:
--enable-debug[=ARG] Compiles extra debug code. (yes by default)
(available options: yes, no, gdb)
--enable-libbacktrace[=ARG]
- Compiles with libbacktrace. (yes by default)
+ Compiles with libbacktrace. (no by default -
+ experimental)
--enable-buildbot[=ARG] (available options: yes, no)
--enable-rdtsc Uses rdtsc as timing source (disabled by default)
Enable it when you've timing issues. (For example:
@@ -3810,7 +3811,7 @@ if test "${enable_libbacktrace+set}" = set; then :
esac
else
- enable_libbacktrace="yes"
+ enable_libbacktrace="no"
fi
@@ -8596,15 +8597,13 @@ esac
#
# libbacktrace
#
-case $enable_libbacktrace in
- "no")
- # default value
- USE_LIBBACKTRACE="no"
- ;;
- "yes")
- CFLAGS="$CFLAGS "
- CPPFLAGS="$CPPFLAGS -DHAVE_LIBBACKTRACE"
- USE_LIBBACKTRACE="yes"
+if test "$enable_libbacktrace" = "no" ; then
+ USE_LIBBACKTRACE="no"
+else
+ CPPFLAGS="$CPPFLAGS -DHAVE_LIBBACKTRACE"
+ USE_LIBBACKTRACE="yes"
+
+ # libbacktrace checks
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -funwind-tables" >&5
$as_echo_n "checking whether $CC supports -funwind-tables... " >&6; }
@@ -8632,12 +8631,8 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ;;
-esac
-# libbacktrace checks
-
-for ac_prog in gawk mawk nawk awk
+ for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
@@ -8679,24 +8674,31 @@ fi
test -n "$AWK" && break
done
-case "$AWK" in
-"") as_fn_error $? "can't build without awk" "$LINENO" 5 ;;
-esac
+ case "$AWK" in
+ "")
+ as_fn_error $? "Libbacktrace requires awk to build" "$LINENO" 5
+ ;;
+ esac
-backtrace_supported=yes
-ac_fn_c_check_header_mongrel "$LINENO" "unwind.h" "ac_cv_header_unwind_h" "$ac_includes_default"
+ backtrace_supported=yes
+ ac_fn_c_check_header_mongrel "$LINENO" "unwind.h" "ac_cv_header_unwind_h" "$ac_includes_default"
if test "x$ac_cv_header_unwind_h" = xyes; then :
ac_fn_c_check_func "$LINENO" "_Unwind_Backtrace" "ac_cv_func__Unwind_Backtrace"
if test "x$ac_cv_func__Unwind_Backtrace" = xyes; then :
BACKTRACE_FILE="backtrace.lo simple.lo"
else
- BACKTRACE_FILE="nounwind.lo"
- backtrace_supported=no
+
+ BACKTRACE_FILE="nounwind.lo"
+ backtrace_supported=no
+
+
fi
else
- BACKTRACE_FILE="nounwind.lo"
- backtrace_supported=no
+
+ BACKTRACE_FILE="nounwind.lo"
+ backtrace_supported=no
+
fi
@@ -8707,98 +8709,121 @@ fi
$as_echo "#define HAVE_GETIPINFO 1" >>confdefs.h
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking __sync extensions" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking __sync extensions" >&5
$as_echo_n "checking __sync extensions... " >&6; }
if ${libbacktrace_cv_sys_sync+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test -n "${with_target_subdir}"; then
- case "${host}" in
- hppa*-*-hpux*) libbacktrace_cv_sys_sync=no ;;
- *) libbacktrace_cv_sys_sync=yes ;;
- esac
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+ if test -n "${with_target_subdir}"; then
+ case "${host}" in
+ hppa*-*-hpux*)
+ libbacktrace_cv_sys_sync=no
+ ;;
+ *)
+ libbacktrace_cv_sys_sync=yes
+ ;;
+ esac
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-int i;
+
+ int i;
int
main ()
{
-__sync_bool_compare_and_swap (&i, i, i);
- __sync_lock_test_and_set (&i, 1);
- __sync_lock_release (&i);
+
+ __sync_bool_compare_and_swap(&i, i, i);
+ __sync_lock_test_and_set(&i, 1);
+ __sync_lock_release(&i);
+
+
;
return 0;
}
+
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
libbacktrace_cv_sys_sync=yes
else
libbacktrace_cv_sys_sync=no
+
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- fi
+ fi
+
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libbacktrace_cv_sys_sync" >&5
$as_echo "$libbacktrace_cv_sys_sync" >&6; }
-BACKTRACE_SUPPORTS_THREADS=0
-if test "$libbacktrace_cv_sys_sync" = "yes"; then
- BACKTRACE_SUPPORTS_THREADS=1
+ BACKTRACE_SUPPORTS_THREADS=0
+ if test "$libbacktrace_cv_sys_sync" = "yes"; then
+ BACKTRACE_SUPPORTS_THREADS=1
$as_echo "#define HAVE_SYNC_FUNCTIONS 1" >>confdefs.h
-fi
+ fi
-# Test for __atomic support.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking __atomic extensions" >&5
+ # Test for __atomic support.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking __atomic extensions" >&5
$as_echo_n "checking __atomic extensions... " >&6; }
if ${libbacktrace_cv_sys_atomic+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test -n "${with_target_subdir}"; then
- libbacktrace_cv_sys_atomic=yes
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+ if test -n "${with_target_subdir}"; then
+ libbacktrace_cv_sys_atomic=yes
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-int i;
+
+ int i;
int
main ()
{
-__atomic_load_n (&i, __ATOMIC_ACQUIRE);
- __atomic_store_n (&i, 1, __ATOMIC_RELEASE);
+
+ __atomic_load_n(&i, __ATOMIC_ACQUIRE);
+ __atomic_store_n(&i, 1, __ATOMIC_RELEASE);
+
+
;
return 0;
}
+
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
libbacktrace_cv_sys_atomic=yes
else
libbacktrace_cv_sys_atomic=no
+
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- fi
+ fi
+
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libbacktrace_cv_sys_atomic" >&5
$as_echo "$libbacktrace_cv_sys_atomic" >&6; }
-if test "$libbacktrace_cv_sys_atomic" = "yes"; then
+ if test "$libbacktrace_cv_sys_atomic" = "yes"; then
$as_echo "#define HAVE_ATOMIC_FUNCTIONS 1" >>confdefs.h
-fi
+ fi
-# The library needs to be able to read the executable itself. Compile
-# a file to determine the executable format. The awk script
-# filetype.awk prints out the file type.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking output filetype" >&5
+ # The library needs to be able to read the executable itself. Compile
+ # a file to determine the executable format. The awk script
+ # filetype.awk prints out the file type.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking output filetype" >&5
$as_echo_n "checking output filetype... " >&6; }
if ${libbacktrace_cv_sys_filetype+:} false; then :
$as_echo_n "(cached) " >&6
else
- filetype=
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+ filetype=
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int i;
int
@@ -8816,74 +8841,93 @@ else
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "compiler failed
See \`config.log' for more details" "$LINENO" 5; }
+
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-libbacktrace_cv_sys_filetype=$filetype
+ libbacktrace_cv_sys_filetype=$filetype
+
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libbacktrace_cv_sys_filetype" >&5
$as_echo "$libbacktrace_cv_sys_filetype" >&6; }
-# Match the file type to decide what files to compile.
-LIBBACKTRACE_FORMAT_FILE=
-backtrace_supports_data=yes
-case "$libbacktrace_cv_sys_filetype" in
-elf*) LIBBACKTRACE_FORMAT_FILE="elf.o" ;;
-pecoff) LIBBACKTRACE_FORMAT_FILE="pecoff.o"
- backtrace_supports_data=no
- ;;
-xcoff*) LIBBACKTRACE_FORMAT_FILE="xcoff.o"
- backtrace_supports_data=no
- ;;
-macho*) LIBBACKTRACE_FORMAT_FILE="macho.o"
- backtrace_supports_data=no
- ;;
-*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not determine output file type" >&5
+ # Match the file type to decide what files to compile.
+ LIBBACKTRACE_FORMAT_FILE=
+ backtrace_supports_data=yes
+ case "$libbacktrace_cv_sys_filetype" in
+ elf*)
+ LIBBACKTRACE_FORMAT_FILE="elf.o"
+ ;;
+ pecoff)
+ LIBBACKTRACE_FORMAT_FILE="pecoff.o"
+ backtrace_supports_data=no
+ ;;
+ xcoff*)
+ LIBBACKTRACE_FORMAT_FILE="xcoff.o"
+ backtrace_supports_data=no
+ ;;
+ macho*)
+ LIBBACKTRACE_FORMAT_FILE="macho.o"
+ backtrace_supports_data=no
+ ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not determine output file type" >&5
$as_echo "$as_me: WARNING: could not determine output file type" >&2;}
- LIBBACKTRACE_FORMAT_FILE="unknown.o"
- backtrace_supported=no
- ;;
-esac
+ LIBBACKTRACE_FORMAT_FILE="unknown.o"
+ backtrace_supported=no
+ ;;
+ esac
-# ELF defines.
-elfsize=
-case "$libbacktrace_cv_sys_filetype" in
-elf32) elfsize=32 ;;
-elf64) elfsize=64 ;;
-*) elfsize=unused
-esac
+ # ELF defines.
+ elfsize=
+ case "$libbacktrace_cv_sys_filetype" in
+ elf32)
+ elfsize=32
+ ;;
+ elf64)
+ elfsize=64
+ ;;
+ *)
+ elfsize=unused
+ esac
cat >>confdefs.h <<_ACEOF
#define BACKTRACE_ELF_SIZE $elfsize
_ACEOF
-# XCOFF defines.
-xcoffsize=
-case "$libbacktrace_cv_sys_filetype" in
-xcoff32) xcoffsize=32 ;;
-xcoff64) xcoffsize=64 ;;
-*) xcoffsize=unused
-esac
+ # XCOFF defines.
+ xcoffsize=
+ case "$libbacktrace_cv_sys_filetype" in
+ xcoff32)
+ xcoffsize=32
+ ;;
+ xcoff64)
+ xcoffsize=64
+ ;;
+ *)
+ xcoffsize=unused
+ esac
cat >>confdefs.h <<_ACEOF
#define BACKTRACE_XCOFF_SIZE $xcoffsize
_ACEOF
-BACKTRACE_SUPPORTED=0
-if test "$backtrace_supported" = "yes"; then
- BACKTRACE_SUPPORTED=1
-fi
+ BACKTRACE_SUPPORTED=0
+ if test "$backtrace_supported" = "yes"; then
+ BACKTRACE_SUPPORTED=1
+ fi
-BACKTRACE_SUPPORTS_DATA=0
-if test "$backtrace_supports_data" = "yes"; then
- BACKTRACE_SUPPORTS_DATA=1
-fi
+ BACKTRACE_SUPPORTS_DATA=0
+ if test "$backtrace_supports_data" = "yes"; then
+ BACKTRACE_SUPPORTS_DATA=1
+ fi
-ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
+ ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
if test "x$ac_cv_func_mmap" = xyes; then :
have_mmap=yes
else
@@ -8891,54 +8935,60 @@ else
fi
-VIEW_FILE=mmapio.lo
-ALLOC_FILE=mmap.lo
+ VIEW_FILE=mmapio.lo
+ ALLOC_FILE=mmap.lo
-BACKTRACE_USES_MALLOC=0
-if test "$ALLOC_FILE" = "alloc.lo"; then
- BACKTRACE_USES_MALLOC=1
-fi
+ BACKTRACE_USES_MALLOC=0
+ if test "$ALLOC_FILE" = "alloc.lo"; then
+ BACKTRACE_USES_MALLOC=1
+ fi
-ac_fn_c_check_func "$LINENO" "dl_iterate_phdr" "ac_cv_func_dl_iterate_phdr"
+ ac_fn_c_check_func "$LINENO" "dl_iterate_phdr" "ac_cv_func_dl_iterate_phdr"
if test "x$ac_cv_func_dl_iterate_phdr" = xyes; then :
have_dl_iterate_phdr=yes
else
have_dl_iterate_phdr=no
fi
-if test "$have_dl_iterate_phdr" = "yes"; then
+ if test "$have_dl_iterate_phdr" = "yes"; then
$as_echo "#define HAVE_DL_ITERATE_PHDR 1" >>confdefs.h
-fi
+ fi
-# Check for the fcntl function.
-if test -n "${with_target_subdir}"; then
- case "${host}" in
- *-*-mingw*) have_fcntl=no ;;
- spu-*-*) have_fcntl=no ;;
- *) have_fcntl=yes ;;
- esac
-else
- ac_fn_c_check_func "$LINENO" "fcntl" "ac_cv_func_fcntl"
+ # Check for the fcntl function.
+ if test -n "${with_target_subdir}"; then
+ case "${host}" in
+ *-*-mingw*)
+ have_fcntl=no
+ ;;
+ spu-*-*)
+ have_fcntl=no
+ ;;
+ *)
+ have_fcntl=yes
+ ;;
+ esac
+ else
+ ac_fn_c_check_func "$LINENO" "fcntl" "ac_cv_func_fcntl"
if test "x$ac_cv_func_fcntl" = xyes; then :
have_fcntl=yes
else
have_fcntl=no
fi
-fi
-if test "$have_fcntl" = "yes"; then
+ fi
+ if test "$have_fcntl" = "yes"; then
$as_echo "#define HAVE_FCNTL 1" >>confdefs.h
-fi
+ fi
-ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
+ ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
if test "x$ac_cv_have_decl_strnlen" = xyes; then :
ac_have_decl=1
else
@@ -8949,7 +8999,7 @@ cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_STRNLEN $ac_have_decl
_ACEOF
-for ac_func in lstat readlink
+ for ac_func in lstat readlink
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -8962,21 +9012,21 @@ fi
done
-ac_fn_c_check_func "$LINENO" "getexecname" "ac_cv_func_getexecname"
+ ac_fn_c_check_func "$LINENO" "getexecname" "ac_cv_func_getexecname"
if test "x$ac_cv_func_getexecname" = xyes; then :
have_getexecname=yes
else
have_getexecname=no
fi
-if test "$have_getexecname" = "yes"; then
+ if test "$have_getexecname" = "yes"; then
$as_echo "#define HAVE_GETEXECNAME 1" >>confdefs.h
+ fi
fi
-
#
# Buildbot
#