--- configure.ac~	2013-11-03 16:57:11.000000000 +0000
+++ configure.ac
@@ -418,6 +418,7 @@ AC_HEADER_SYS_WAIT
 AC_HEADER_TIME
 
 AC_CHECK_HEADERS(execinfo.h sys/param.h sys/time.h sys/times.h sys/wait.h unistd.h)
+AC_CHECK_FUNCS(backtrace, , AC_CHECK_LIB(execinfo, backtrace))
 
 AC_TYPE_PID_T
 AC_FUNC_VPRINTF

