Paul Jakma:

lib/debug.{c,h}: glibc backtrace printing function (from the glibc info page)
configure.ac: check for glibc backtrace and set define
lib/zebra.h: glibc backtrace support
diff --git a/configure.in b/configure.in
index 4c30bce..be371fc 100755
--- a/configure.in
+++ b/configure.in
@@ -856,6 +856,18 @@
  AC_DEFINE(HAVE_RUSAGE,,rusage)],
  AC_MSG_RESULT(no))
 
+dnl ---------------------------
+dnl check for glibc 'backtrace'
+dnl --------------------------- 
+if test "${glibc}" = "yes"; then
+   AC_CHECK_HEADER(execinfo.h)
+fi
+if test x"${ac_cv_header_execinfo_h}" = x"yes"; then
+  AC_CHECK_FUNC(backtrace,
+    [AC_DEFINE(HAVE_GLIBC_BACKTRACE,,Glibc backtrace)]
+  )
+fi
+
 dnl -------------
 dnl check version
 dnl -------------