diff --git a/configure.in b/configure.in index a1cf6508..31bf4bd0 100644 --- a/configure.in +++ b/configure.in @@ -236,6 +236,22 @@ if test x$enable_msabi_support = xyes; then fi AC_MSG_RESULT([$enable_msabi_support]) +AC_MSG_CHECKING([whether to support LZMA-compressed symbol tables]) +AC_ARG_ENABLE(minidebuginfo, +AS_HELP_STRING([--enable-minidebuginfo], [Enables support for LZMA-compressed symbol tables]), +[enable_minidebuginfo=$enableval], [enable_minidebuginfo=auto]) +AC_MSG_RESULT([$enable_minidebuginfo]) +if test x$enable_minidebuginfo != xno; then + AC_CHECK_LIB([lzma], [lzma_mf_is_supported], + [AC_SUBST([LIBLZMA], [-lzma]) + AC_DEFINE([HAVE_LZMA], [1], [Define if you have liblzma]) + enable_minidebuginfo=yes], + [if test x$enable_minidebuginfo = xyes; then + AC_MSG_FAILURE([liblzma not found]) + fi]) +fi +AM_CONDITIONAL(HAVE_LZMA, test x$enable_minidebuginfo = xyes) + LIBUNWIND___THREAD AC_MSG_CHECKING([for Intel compiler]) diff --git a/src/Makefile.am b/src/Makefile.am index b3fd0433..6209b233 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -515,6 +515,9 @@ endif libunwind_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -XCClinker -nostdlib \ $(LDFLAGS_STATIC_LIBCXA) -version-info $(SOVERSION) libunwind_la_LIBADD += -lc $(LIBCRTS) +if HAVE_LZMA + libunwind_la_LIBADD += -llzma +endif AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/include/tdep-$(arch) -I. AM_CCASFLAGS = $(AM_CPPFLAGS)