summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJames O'Gorman <james@netinertia.co.uk>2011-02-19 17:25:33 +0000
committerJames O'Gorman <james@netinertia.co.uk>2011-02-19 17:25:33 +0000
commit51b1708d9f12d830c30e18681951aa1bd7045da6 (patch)
tree9e98476eeef67f2c7829751a95d95b570ffef984 /configure.ac
parent571d648e1ba228496eac01976137679bc712150f (diff)
Fix backtrace by linking to libexecinfo when execinfo.h is found.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 7 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 441a869f..63a94ccc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -122,13 +122,19 @@ esac
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS([dlfcn.h execinfo.h getopt.h process.h pwd.h signal.h])
+AC_CHECK_HEADERS([dlfcn.h getopt.h process.h pwd.h signal.h])
AC_CHECK_HEADERS([syslog.h time.h cxxabi.h])
AC_CHECK_HEADERS([netinet/in.h])
AC_CHECK_HEADERS([sys/param.h sys/socket.h sys/time.h sys/types.h sys/wait.h])
AC_CHECK_HEADERS([sys/uio.h sys/xattr.h])
AC_CHECK_HEADERS([bsd/unistd.h])
+AC_CHECK_HEADERS([execinfo.h], [have_execinfo_h=yes])
+
+if test "$have_execinfo_h" = "yes"; then
+ AC_SEARCH_LIBS([backtrace],[execinfo])
+fi
+
AC_CHECK_HEADER([regex.h], [have_regex_h=yes])
if test "$have_regex_h" = "yes"; then