Build ELF convenience libraries
Rather than building the sources directly, create a library that
gets linked statically into libunwind.la and libunwind-$(arch).la.
Signed-off-by: Zachary T Welch <zwelch@codesourcery.com>
diff --git a/configure.in b/configure.in
index d5db1fe..c0cdd9c 100644
--- a/configure.in
+++ b/configure.in
@@ -133,6 +133,17 @@
AM_CONDITIONAL(OS_HPUX, expr x$target_os : xhpux >/dev/null)
AM_CONDITIONAL(OS_FREEBSD, expr x$target_os : xfreebsd >/dev/null)
+AC_MSG_CHECKING([for ELF helper width])
+case "${target_arch}" in
+(arm|hppa|ppc32|x86) use_elf32=yes; AC_MSG_RESULT([32]);;
+(ia64|ppc64|x86_64) use_elf64=yes; AC_MSG_RESULT([64]);;
+(mips) use_elfxx=yes; AC_MSG_RESULT([xx]);;
+*) AC_MSG_ERROR([Unknown ELF target: ${target_arch}])
+esac
+AM_CONDITIONAL(USE_ELF32, [test x$use_elf32 = xyes])
+AM_CONDITIONAL(USE_ELF64, [test x$use_elf64 = xyes])
+AM_CONDITIONAL(USE_ELFXX, [test x$use_elfxx = xyes])
+
AC_MSG_CHECKING([whether to include DWARF support])
if test x$target_arch != xia64; then
use_dwarf=yes