1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2025-02-02 12:52:53 +01:00

Improve configure check reporting.

Adds numerous AC_MSG_CHECKING and AC_MSG_RESULT pairings for
configuration tests that were previously unreported.  Relocates
the debug configuration to the same part of the file as the command
line option declaration for associative clarity.  Makes it easier
to confirm the resultant configuration matches original intentions.

Signed-off-by: Zachary T Welch <zwelch@codesourcery.com>
This commit is contained in:
Zachary T Welch 2010-10-28 16:25:49 -07:00 committed by Arun Sharma
parent cf6a998796
commit 574873ca6e

View file

@ -46,11 +46,6 @@ AC_TYPE_SIGNAL
AC_TYPE_SIZE_T
CPPFLAGS="${CPPFLAGS} -D_GNU_SOURCE"
if test x$enable_debug = xyes; then
CPPFLAGS="${CPPFLAGS} -DDEBUG"
else
CPPFLAGS="${CPPFLAGS} -DNDEBUG"
fi
AC_CHECK_MEMBERS([struct dl_phdr_info.dlpi_subs],,,[#include <link.h>])
AC_CHECK_TYPES([sighandler_t], [], [],
@ -91,8 +86,14 @@ is_gcc_altivec() {
fi;
}
AC_MSG_CHECKING([if building with AltiVec])
use_altivec=`is_gcc_altivec`
AM_CONDITIONAL(USE_ALTIVEC, test x$use_altivec = xhas_altivec)
if test x$use_altivec = xhas_altivec; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
get_arch() {
case "$1" in
@ -110,6 +111,15 @@ build_arch=`get_arch $build_cpu`
host_arch=`get_arch $host_cpu`
target_arch=`get_arch $target_cpu`
AC_MSG_CHECKING([for build architecture])
AC_MSG_RESULT([$build_arch])
AC_MSG_CHECKING([for host architecture])
AC_MSG_RESULT([$host_arch])
AC_MSG_CHECKING([for target architecture])
AC_MSG_RESULT([$target_arch])
AC_MSG_CHECKING([for target operating system])
AC_MSG_RESULT([$target_os])
AM_CONDITIONAL(REMOTE_ONLY, test x$target_arch != x$host_arch)
AM_CONDITIONAL(ARCH_ARM, test x$target_arch = xarm)
AM_CONDITIONAL(ARCH_IA64, test x$target_arch = xia64)
@ -129,14 +139,27 @@ if test x$target_arch = xppc64; then
AC_SUBST([libdir])
fi
AC_MSG_CHECKING([whether to restrict build to remote support])
if test x$target_arch != x$host_arch; then
CPPFLAGS="${CPPFLAGS} -DUNW_REMOTE_ONLY"
remote_only=yes
else
remote_only=no
fi
AC_MSG_RESULT([$remote_only])
AC_MSG_CHECKING([whether to enable debug support])
AC_ARG_ENABLE(debug,
[ --enable-debug turn on debug support (slows down execution)],
[enable_debug=yes], [])
[enable_debug=yes], [enable_debug=no])
if test x$enable_debug = xyes; then
CPPFLAGS="${CPPFLAGS} -DDEBUG"
else
CPPFLAGS="${CPPFLAGS} -DNDEBUG"
fi
AC_MSG_RESULT([$enable_debug])
AC_MSG_CHECKING([whether to enable C++ exception support])
AC_ARG_ENABLE(cxx_exceptions,
[ --enable-cxx-exceptions use libunwind to handle C++ exceptions],
[enable_cxx_exceptions=$enableval],
@ -150,50 +173,58 @@ case $target_arch in
esac
])
if test x$enable_cxx_exceptions = xyes; then
AC_MSG_NOTICE([Enabling C++ exception support])
fi
AM_CONDITIONAL([SUPPORT_CXX_EXCEPTIONS], [test x$enable_cxx_exceptions = xyes])
AC_MSG_RESULT([$enable_cxx_exceptions])
AC_MSG_CHECKING([whether to load .debug_frame sections])
AC_ARG_ENABLE(debug_frame,
[ --enable-debug-frame Load the ".debug_frame" section if available],
[enable_debug_frame=$enableval], [enable_debug_frame=no])
if test x$enable_debug_frame = xyes; then
AC_DEFINE([CONFIG_DEBUG_FRAME], [], [Enable Debug Frame])
fi
AC_MSG_RESULT([$enable_debug_frame])
AC_MSG_CHECKING([whether to block signals during mutex ops])
AC_ARG_ENABLE(block_signals,
[ --enable-block-signals Block signals before performing mutex operations],
[enable_block_signals=$enableval], [enable_block_signals=yes])
if test x$enable_block_signals = xyes; then
AC_DEFINE([CONFIG_BLOCK_SIGNALS], [], [Block signals before mutex operations])
fi
AC_MSG_RESULT([$enable_block_signals])
AC_MSG_CHECKING([whether to validate memory addresses before use])
AC_ARG_ENABLE(conservative_checks,
[ --enable-conservative-checks Validate all memory addresses before use],
[enable_conservative_checks=$enableval], [enable_conservative_checks=yes])
if test x$enable_conservative_checks = xyes; then
CPPFLAGS="${CPPFLAGS} -DCONSERVATIVE_CHECKS"
fi
AC_MSG_RESULT([$enable_conservative_checks])
LIBUNWIND___THREAD
AC_MSG_CHECKING([if linker supports -static-libcxa])
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -static-libcxa"
AC_TRY_LINK([], [], [have_static_libcxa=yes])
AC_TRY_LINK([], [], [have_static_libcxa=yes], [have_static_libcxa=no])
LDFLAGS="$save_LDFLAGS"
if test "x$have_static_libcxa" = xyes; then
LDFLAGS_STATIC_LIBCXA="-XCClinker -static-libcxa"
fi
AC_MSG_RESULT([$have_static_libcxa])
AC_MSG_CHECKING([for Intel compiler])
AC_TRY_COMPILE([], [#ifndef __INTEL_COMPILER
#error choke me
#endif], [intel_compiler=yes])
#endif], [intel_compiler=yes], [intel_compiler=no])
if test x$GCC = xyes -a x$intel_compiler != xyes; then
CFLAGS="${CFLAGS} -fexceptions -Wall -Wsign-compare"
LIBCRTS="-lgcc"
fi
AC_MSG_RESULT([$intel_compiler])
CCASFLAGS="${CCASFLAGS} ${CPPFLAGS}"