diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index aa80b3a..7ac3f17 100644 --- a/configure.ac +++ b/configure.ac @@ -112,8 +112,35 @@ else AC_MSG_WARN([Error simulation support disabled]) fi +# check for libunwind, haven't found any generic function, +# so need to set one based on architecture +unwind_func="krava" +if test "$unamem" = "x86_64"; then + unwind_func="_Ux86_64_init_local" +fi +if test "$unamem" = "i686"; then + unwind_func="_Ux86_init_local" +fi + +AC_SEARCH_LIBS([$unwind_func], [unwind-generic], + [ + AC_DEFINE(CONFIG_LIBUNWIND, 1, "Unwind library found.") + AC_SUBST(CONFIG_LIBUNWIND, "y") + ], + [AC_MSG_WARN([libunwind not found, no backtrace support (install libunwind-dev)])]) + +AC_SEARCH_LIBS([elf_begin], [elf], + [ + AC_DEFINE(CONFIG_LIBELF, 1, "Elf library found.") + AC_SUBST(CONFIG_LIBELF, "y") + ], + [AC_MSG_WARN([libelf not found, no symbol support (install libelf-dev)])]) + AC_SEARCH_LIBS([cplus_demangle], [iberty_pic iberty], - [AC_DEFINE(CONFIG_LIBERTY, 1, "Liberty found.")], + [ + AC_DEFINE(CONFIG_LIBERTY, 1, "Liberty library found.") + AC_SUBST(CONFIG_LIBERTY, "y") + ], [AC_MSG_WARN([libiberty not found, no demangle support (install binutils-dev)])]) AC_CONFIG_HEADER([src/autoconf.h]) |