2002-02-28 17:24:48 +01:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
AC_INIT(src/backtrace.c)
|
|
|
|
AC_CONFIG_AUX_DIR(aux)
|
|
|
|
AC_CANONICAL_SYSTEM
|
2002-07-18 05:58:34 +02:00
|
|
|
AM_INIT_AUTOMAKE(libunwind, 0.2-pre2)
|
2002-02-28 17:24:48 +01:00
|
|
|
AM_MAINTAINER_MODE
|
|
|
|
AM_CONFIG_HEADER(include/config.h)
|
|
|
|
|
|
|
|
dnl Checks for programs.
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
AM_PROG_LIBTOOL
|
|
|
|
|
|
|
|
dnl Checks for libraries.
|
|
|
|
|
|
|
|
dnl Checks for header files.
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_CHECK_HEADERS(unistd.h)
|
|
|
|
|
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
AC_C_CONST
|
|
|
|
AC_C_INLINE
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
|
|
|
|
dnl Checks for library functions.
|
|
|
|
AC_FUNC_MEMCMP
|
|
|
|
AC_TYPE_SIGNAL
|
2002-04-25 08:47:29 +02:00
|
|
|
AC_CHECK_FUNCS(getunwind)
|
2002-02-28 17:24:48 +01:00
|
|
|
|
|
|
|
dnl Hopefully there will be an AC_PROG_AS at some point...
|
|
|
|
AS="$CC"
|
|
|
|
AC_SUBST(AS)
|
|
|
|
AC_SUBST(ASFLAGS)
|
|
|
|
|
|
|
|
get_arch() {
|
|
|
|
case "$1" in
|
|
|
|
i?86) echo x86;;
|
|
|
|
*) echo $target_cpu;;
|
|
|
|
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)
|
2002-04-06 01:37:55 +02:00
|
|
|
AM_CONDITIONAL(ARCH_IA32, test x$target_arch == x86)
|
2002-02-28 17:24:48 +01:00
|
|
|
|
|
|
|
if test x$target_arch != x$build_arch; then
|
|
|
|
CPPFLAGS="${CPPFLAGS} -DUNW_REMOTE_ONLY"
|
2002-04-06 01:37:55 +02:00
|
|
|
else
|
|
|
|
AC_CONFIG_LINKS(include/libunwind.h:include/libunwind-$target_arch.h)
|
2002-02-28 17:24:48 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(debug,
|
|
|
|
[ --enable-debug turn on debug support (slows down execution)],
|
|
|
|
[enable_debug=yes], [])
|
|
|
|
|
|
|
|
CPPFLAGS="${CPPFLAGS} -D_GNU_SOURCE"
|
|
|
|
if test x$enable_debug == xyes; then
|
|
|
|
CPPFLAGS="${CPPFLAGS} -DDEBUG"
|
|
|
|
else
|
|
|
|
CPPFLAGS="${CPPFLAGS} -DNDEBUG"
|
|
|
|
fi
|
|
|
|
ASFLAGS="${ASFLAGS} ${CPPFLAGS}"
|
|
|
|
|
2002-07-18 05:58:34 +02:00
|
|
|
if test x$GCC = xyes; then
|
|
|
|
CFLAGS="${CFLAGS} -Wall"
|
|
|
|
fi
|
|
|
|
|
2002-04-06 01:37:55 +02:00
|
|
|
arch="$target_arch"
|
2002-02-28 17:24:48 +01:00
|
|
|
ARCH=`echo $target_arch | tr [a-z] [A-Z]`
|
|
|
|
|
|
|
|
|
2002-04-06 01:37:55 +02:00
|
|
|
AC_SUBST(arch)
|
2002-02-28 17:24:48 +01:00
|
|
|
AC_SUBST(ARCH)
|
|
|
|
AC_OUTPUT(Makefile src/Makefile tests/Makefile doc/Makefile)
|