1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-10 19:08:21 +01:00
libunwind-eh_elf/configure.in
ibm.com!masbock aa9a917cb4 Add x86_64 support.
(Logical change 1.249)
2004-08-19 13:39:10 +00:00

115 lines
2.9 KiB
Text

dnl Process this file with autoconf to produce a configure script.
AC_INIT(libunwind, 0.98-alpha, libunwind@linux.hpl.hp.com)
AC_CONFIG_SRCDIR(src/mi/backtrace.c)
AC_CONFIG_AUX_DIR(config)
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE([1.6 subdir-objects])
AM_MAINTAINER_MODE
AM_CONFIG_HEADER(include/config.h)
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AM_PROG_LIBTOOL
AM_PROG_AS
AM_PROG_CC_C_O
dnl Checks for libraries.
AC_CHECK_LIB(uca, __uc_get_grs)
CHECK_ATOMIC_OPS
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(asm/ptrace_offsets.h endian.h execinfo.h ia64intrin.h \
sys/uc_access.h unistd.h signal.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
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], [], [],
[$ac_includes_default
#if HAVE_SIGNAL_H
# include <signal.h>
#endif
])
dnl Checks for library functions.
AC_FUNC_MEMCMP
AC_TYPE_SIGNAL
AC_CHECK_FUNCS(dl_iterate_phdr dl_phdr_removals_counter dlmodinfo getunwind \
ttrace)
get_arch() {
case "$1" in
i?86) echo x86;;
hppa*) echo hppa;;
*) echo $1;;
esac
}
build_arch=`get_arch $build_cpu`
target_arch=`get_arch $target_cpu`
AM_CONDITIONAL(REMOTE_ONLY, test x$target_arch != x$build_arch)
AM_CONDITIONAL(ARCH_IA64, test x$target_arch = xia64)
AM_CONDITIONAL(ARCH_HPPA, test x$target_arch = xhppa)
AM_CONDITIONAL(ARCH_X86, test x$target_arch = xx86)
AM_CONDITIONAL(ARCH_X86_64, test x$target_arch = xx86_64)
AM_CONDITIONAL(OS_LINUX, expr x$target_os : xlinux >/dev/null)
AM_CONDITIONAL(OS_HPUX, expr x$target_os : xhpux >/dev/null)
if test x$target_arch != x$build_arch; then
CPPFLAGS="${CPPFLAGS} -DUNW_REMOTE_ONLY"
fi
AC_CONFIG_LINKS(include/libunwind.h:include/libunwind-$target_arch.h
include/tdep.h:include/tdep-$target_arch.h)
AC_ARG_ENABLE(debug,
[ --enable-debug turn on debug support (slows down execution)],
[enable_debug=yes], [])
LIBUNWIND___THREAD
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -static-libcxa"
AC_TRY_LINK([], [], [have_static_libcxa=yes])
LDFLAGS="$save_LDFLAGS"
if test "x$have_static_libcxa" = xyes; then
LDFLAGS_STATIC_LIBCXA="-XCClinker -static-libcxa"
fi
AC_TRY_COMPILE([], [#ifndef __INTEL_COMPILER
#error choke me
#endif], [intel_compiler=yes])
if test x$GCC = xyes -a x$intel_compiler != xyes; then
CFLAGS="${CFLAGS} -Wall -Wsign-compare"
fi
CCASFLAGS="${CCASFLAGS} ${CPPFLAGS}"
arch="$target_arch"
ARCH=`echo $target_arch | tr [a-z] [A-Z]`
AC_SUBST(build_arch)
AC_SUBST(target_os)
AC_SUBST(arch)
AC_SUBST(ARCH)
AC_SUBST(LDFLAGS_STATIC_LIBCXA)
AC_CONFIG_FILES(Makefile src/Makefile tests/Makefile tests/check-namespace.sh
doc/Makefile doc/common.tex)
AC_OUTPUT