btrfs-progs: autoconf: check if backtrace is really supported
authorDavid Sterba <dsterba@suse.cz>
Tue, 3 Feb 2015 15:50:33 +0000 (16:50 +0100)
committerDavid Sterba <dsterba@suse.cz>
Tue, 3 Feb 2015 16:13:57 +0000 (17:13 +0100)
Signed-off-by: David Sterba <dsterba@suse.cz>
configure.ac

index dd67737..95e2809 100644 (file)
@@ -68,6 +68,12 @@ AS_IF([test "x$enable_backtrace" = xno], [
   AC_DEFINE([BTRFS_DISABLE_BACKTRACE], [1], [disable backtrace stuff in kerncompat.h ])
 ])
 
+if test "x$enable_backtrace" = xyes; then
+       AC_CHECK_HEADERS([execinfo.h])
+       AC_CHECK_FUNCS([backtrace backtrace_symbols_fd], [],
+             AC_MSG_ERROR([standard library does not have backtrace support]))
+fi
+
 
 AC_ARG_ENABLE([documentation],
              AS_HELP_STRING([--disable-documentation], [do not build domumentation]),