diff --git a/configure.ac b/configure.ac
index bd5b07e..28091a9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -128,6 +128,7 @@ AC_CHECK_FUNCS([localtime_r memchr memmove memset mkdir mkdtemp realpath sqrt st
 
 # for backtrace()
 AC_CHECK_HEADERS([execinfo.h fcntl.h])
+AC_SEARCH_LIBS([backtrace], [c execinfo])
 AC_C_INLINE
 AC_FUNC_MKTIME
 AC_FUNC_STRTOD
