From 04fc88fa31ffac9e6189c4debd745c965473d1d4 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Tue, 22 Mar 2011 21:29:40 +0200 Subject: [PATCH] Fix build and distribution on the FreeBSD. Signed-off-by: Konstantin Belousov --- configure.in | 7 +++++++ src/Makefile.am | 1 + tests/Makefile.am | 1 + 3 files changed, 9 insertions(+) diff --git a/configure.in b/configure.in index c0cdd9ca..db664c94 100644 --- a/configure.in +++ b/configure.in @@ -263,6 +263,12 @@ PKG_MINOR=pkg_minor PKG_EXTRA=pkg_extra PKG_MAINTAINER=pkg_maintainer +old_LIBS="$LIBS" +LIBS="" +AC_SEARCH_LIBS(backtrace, execinfo) +BACKTRACELIB="$LIBS" +LIBS="$old_LIBS" + AC_SUBST(build_arch) AC_SUBST(target_os) AC_SUBST(arch) @@ -276,6 +282,7 @@ AC_SUBST(PKG_MAINTAINER) AC_SUBST(enable_cxx_exceptions) AC_SUBST(enable_debug_frame) AC_SUBST(DLLIB) +AC_SUBST(BACKTRACELIB) AC_CONFIG_FILES(Makefile src/Makefile tests/Makefile tests/check-namespace.sh doc/Makefile doc/common.tex include/libunwind-common.h) diff --git a/src/Makefile.am b/src/Makefile.am index 7c1505ac..68470eab 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -488,6 +488,7 @@ EXTRA_DIST = $(libunwind_la_SOURCES_arm) \ $(libunwind_la_SOURCES_ia64) \ $(libunwind_la_SOURCES_mips) \ $(libunwind_la_SOURCES_x86) \ + $(libunwind_la_SOURCES_os_freebsd) \ $(libunwind_la_SOURCES_os_linux) \ $(libunwind_la_SOURCES_os_hpux) \ $(libunwind_la_SOURCES_common) \ diff --git a/tests/Makefile.am b/tests/Makefile.am index 11f4f301..383f0962 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -133,6 +133,7 @@ test_proc_info_LDADD = $(LIBUNWIND) test_static_link_LDADD = $(LIBUNWIND) test_strerror_LDADD = $(LIBUNWIND) rs_race_LDADD = $(LIBUNWIND) -lpthread +test_varargs_LDADD = @BACKTRACELIB@ Gtest_bt_LDADD = $(LIBUNWIND) Gtest_concurrent_LDADD = $(LIBUNWIND) -lpthread