added libunwind interface support for stack frame backtracing
This commit is contained in:
114
configure
vendored
114
configure
vendored
@ -653,6 +653,8 @@ HCL_SIZEOF_CHAR16_T
|
||||
HCL_SIZEOF_WCHAR_T
|
||||
ENABLE_HCLEX_FALSE
|
||||
ENABLE_HCLEX_TRUE
|
||||
ENABLE_LIBUNWIND_FALSE
|
||||
ENABLE_LIBUNWIND_TRUE
|
||||
ENABLE_LIBLTDL_FALSE
|
||||
ENABLE_LIBLTDL_TRUE
|
||||
ENABLE_STATIC_MODULE_FALSE
|
||||
@ -667,6 +669,7 @@ PACKAGE_VERSION_MINOR
|
||||
PACKAGE_VERSION_MAJOR
|
||||
QUADMATH_LIBS
|
||||
UNICOWS_LIBS
|
||||
UNWIND_LIBS
|
||||
LTDL_LIBS
|
||||
DL_LIBS
|
||||
PTHREAD_CFLAGS
|
||||
@ -779,7 +782,6 @@ infodir
|
||||
docdir
|
||||
oldincludedir
|
||||
includedir
|
||||
runstatedir
|
||||
localstatedir
|
||||
sharedstatedir
|
||||
sysconfdir
|
||||
@ -818,6 +820,7 @@ enable_cxx
|
||||
enable_dynamic_module
|
||||
enable_static_module
|
||||
enable_libltdl
|
||||
enable_libunwind
|
||||
enable_hclex
|
||||
'
|
||||
ac_precious_vars='build_alias
|
||||
@ -872,7 +875,6 @@ datadir='${datarootdir}'
|
||||
sysconfdir='${prefix}/etc'
|
||||
sharedstatedir='${prefix}/com'
|
||||
localstatedir='${prefix}/var'
|
||||
runstatedir='${localstatedir}/run'
|
||||
includedir='${prefix}/include'
|
||||
oldincludedir='/usr/include'
|
||||
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
|
||||
@ -1125,15 +1127,6 @@ do
|
||||
| -silent | --silent | --silen | --sile | --sil)
|
||||
silent=yes ;;
|
||||
|
||||
-runstatedir | --runstatedir | --runstatedi | --runstated \
|
||||
| --runstate | --runstat | --runsta | --runst | --runs \
|
||||
| --run | --ru | --r)
|
||||
ac_prev=runstatedir ;;
|
||||
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
|
||||
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
|
||||
| --run=* | --ru=* | --r=*)
|
||||
runstatedir=$ac_optarg ;;
|
||||
|
||||
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
||||
ac_prev=sbindir ;;
|
||||
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
||||
@ -1271,7 +1264,7 @@ fi
|
||||
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
|
||||
datadir sysconfdir sharedstatedir localstatedir includedir \
|
||||
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
|
||||
libdir localedir mandir runstatedir
|
||||
libdir localedir mandir
|
||||
do
|
||||
eval ac_val=\$$ac_var
|
||||
# Remove trailing slashes.
|
||||
@ -1424,7 +1417,6 @@ Fine tuning of the installation directories:
|
||||
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
||||
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
||||
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
||||
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
|
||||
--libdir=DIR object code libraries [EPREFIX/lib]
|
||||
--includedir=DIR C header files [PREFIX/include]
|
||||
--oldincludedir=DIR C header files for non-gcc [/usr/include]
|
||||
@ -1484,6 +1476,7 @@ Optional Features:
|
||||
--enable-static-module build modules statically into the main
|
||||
library(default. no)
|
||||
--enable-libltdl use libltdl(default. no)
|
||||
--enable-libunwind use libunwind(default. no)
|
||||
--enable-hclex build libhclex(default. no)
|
||||
|
||||
Optional Packages:
|
||||
@ -18246,6 +18239,18 @@ fi
|
||||
|
||||
done
|
||||
|
||||
for ac_header in libunwind.h
|
||||
do :
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "libunwind.h" "ac_cv_header_libunwind_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_libunwind_h" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBUNWIND_H 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
|
||||
|
||||
@ -18454,6 +18459,57 @@ fi
|
||||
LIBS="$save_LIBS"
|
||||
|
||||
|
||||
if test "x${ac_cv_header_libunwind_h}" = "xyes"
|
||||
then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for unw_backtrace in -lunwind" >&5
|
||||
$as_echo_n "checking for unw_backtrace in -lunwind... " >&6; }
|
||||
if ${ac_cv_lib_unwind_unw_backtrace+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lunwind $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 unw_backtrace ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return unw_backtrace ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_lib_unwind_unw_backtrace=yes
|
||||
else
|
||||
ac_cv_lib_unwind_unw_backtrace=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_unwind_unw_backtrace" >&5
|
||||
$as_echo "$ac_cv_lib_unwind_unw_backtrace" >&6; }
|
||||
if test "x$ac_cv_lib_unwind_unw_backtrace" = xyes; then :
|
||||
|
||||
UNWIND_LIBS="-lunwind"
|
||||
|
||||
$as_echo "#define HAVE_UNWIND_LIB 1" >>confdefs.h
|
||||
|
||||
|
||||
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lunicows" >&5
|
||||
$as_echo_n "checking for main in -lunicows... " >&6; }
|
||||
if ${ac_cv_lib_unicows_main+:} false; then :
|
||||
@ -21148,6 +21204,34 @@ else
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --enable-libunwind was given.
|
||||
if test "${enable_libunwind+set}" = set; then :
|
||||
enableval=$enable_libunwind; enable_libunwind_is=$enableval
|
||||
else
|
||||
enable_libunwind_is=no
|
||||
|
||||
fi
|
||||
|
||||
if test "x${enable_libunwind_is}" = "xyes"
|
||||
then
|
||||
if test "x${ac_cv_header_unwind_h}" = "xyes" -a "${UNWIND_LIBS}" != ""
|
||||
then
|
||||
|
||||
$as_echo "#define HCL_ENABLE_LIBUNWIND /**/" >>confdefs.h
|
||||
|
||||
else
|
||||
enable_libunwind_is="no"
|
||||
fi
|
||||
fi
|
||||
if test "x${enable_libunwind_is}" = "xyes"; then
|
||||
ENABLE_LIBUNWIND_TRUE=
|
||||
ENABLE_LIBUNWIND_FALSE='#'
|
||||
else
|
||||
ENABLE_LIBUNWIND_TRUE='#'
|
||||
ENABLE_LIBUNWIND_FALSE=
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --enable-hclex was given.
|
||||
if test "${enable_hclex+set}" = set; then :
|
||||
enableval=$enable_hclex; enable_hclex_is=$enableval
|
||||
@ -21363,6 +21447,10 @@ if test -z "${ENABLE_LIBLTDL_TRUE}" && test -z "${ENABLE_LIBLTDL_FALSE}"; then
|
||||
as_fn_error $? "conditional \"ENABLE_LIBLTDL\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${ENABLE_LIBUNWIND_TRUE}" && test -z "${ENABLE_LIBUNWIND_FALSE}"; then
|
||||
as_fn_error $? "conditional \"ENABLE_LIBUNWIND\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${ENABLE_HCLEX_TRUE}" && test -z "${ENABLE_HCLEX_FALSE}"; then
|
||||
as_fn_error $? "conditional \"ENABLE_HCLEX\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
|
Reference in New Issue
Block a user