From bc59b72fa97d362dd56b856d84e02638d8a9bb91 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Sat, 25 Jun 2011 12:40:57 +1000 Subject: [PATCH] Add prelim backtrace support detection in build --- Makefile.am | 7 ++++++- backtrace.cpp => backtrace_execinfo.cpp | 0 configure.ac | 6 +++++- 3 files changed, 11 insertions(+), 2 deletions(-) rename backtrace.cpp => backtrace_execinfo.cpp (100%) diff --git a/Makefile.am b/Makefile.am index 7e20a0b1..de292f44 100644 --- a/Makefile.am +++ b/Makefile.am @@ -27,7 +27,6 @@ UTIL_INCLUDE = \ version.hpp UTIL_FILES = \ - backtrace.cpp \ debug.cpp \ except.cpp \ float.cpp \ @@ -44,6 +43,12 @@ UTIL_FILES = \ vector.cpp \ version.cpp + +if HAVE_EXECINFO +UTIL_FILES += backtrace_execinfo.cpp +endif + + CLEANFILES = json.cpp version.cpp ip.cpp EXTRA_DIST = json.cpp.rl version.cpp.rl ip.cpp.rl diff --git a/backtrace.cpp b/backtrace_execinfo.cpp similarity index 100% rename from backtrace.cpp rename to backtrace_execinfo.cpp diff --git a/configure.ac b/configure.ac index c52bbcd7..ae9ef701 100644 --- a/configure.ac +++ b/configure.ac @@ -67,9 +67,13 @@ AC_C_INLINE AC_C_BIGENDIAN ## -## stdlib features +## platform features AC_FUNC_MMAP +AC_CHECK_HEADER([execinfo.h], [break], [AC_MSG_ERROR([Missing backtrace support])]) + +AM_CONDITIONAL([HAVE_EXECINFO], [test x$ac_cv_header_execinfo_h = "xyes"]) + ## ## Documentation