diff --git a/Makefile.am b/Makefile.am index 75eb4e28..62a5b971 100644 --- a/Makefile.am +++ b/Makefile.am @@ -272,7 +272,6 @@ UTIL_FILES = \ if PLATFORM_LINUX UTIL_FILES += \ - backtrace_execinfo.cpp \ debug_posix.cpp \ io_posix.cpp \ io_posix.hpp \ @@ -287,7 +286,6 @@ endif if PLATFORM_WIN32 UTIL_FILES += \ - backtrace_null.cpp \ debug_win32.cpp \ io_win32.cpp \ library_win32.hpp \ @@ -297,6 +295,12 @@ UTIL_FILES += \ win32/registry.cpp endif +if HAVE_EXECINFO_H +UTIL_FILES += backtrace_execinfo.cpp +else +UTIL_FILES += backtrace_null.cpp +endif + ############################################################################### ## Local build rules diff --git a/configure.ac b/configure.ac index 0f05e8c0..62797882 100644 --- a/configure.ac +++ b/configure.ac @@ -49,9 +49,9 @@ AC_DEFINE([_XOPEN_SOURCE], [700], [use POSIX 2008]) AC_FUNC_MMAP +AC_CHECK_HEADERS([execinfo.h], [break;], [have_execinfo_h=true]) +AM_CONDITIONAL([HAVE_EXECINFO_H], [test "x$have_execinfo_h" = "xtrue"]) -AC_CHECK_HEADER([execinfo.h], [break]) -AM_CONDITIONAL([HAVE_EXECINFO], [test x$ac_cv_header_execinfo_h = "xyes"]) AC_SEARCH_LIBS([clock_gettime], [rt]) AS_IF([test "x$ac_cv_search_clock_gettime" == "x-*"], [