1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-23 17:34:00 +03:00

build-sys: require elfutils >= 158

The recently added stacktrace support in 8d4e028f uses functions added
in elfutils 158. Check for one of the new functions to avoid attempting
to build against older versions.
This commit is contained in:
Michael Marineau 2014-06-20 13:46:04 -07:00 committed by Zbigniew Jędrzejewski-Szmek
parent c305edb643
commit 972bded032

View File

@ -672,7 +672,7 @@ AC_ARG_ENABLE([elfutils],
if test "x${have_elfutils}" != xno ; then if test "x${have_elfutils}" != xno ; then
AC_CHECK_HEADERS( AC_CHECK_HEADERS(
[elfutils/libdwfl.h], [elfutils/libdwfl.h],
[have_elfutils=yes], [],
[if test "x$have_elfutils" = xyes ; then [if test "x$have_elfutils" = xyes ; then
AC_MSG_ERROR([*** ELFUTILS headers not found.]) AC_MSG_ERROR([*** ELFUTILS headers not found.])
fi]) fi])
@ -680,11 +680,19 @@ if test "x${have_elfutils}" != xno ; then
AC_CHECK_LIB( AC_CHECK_LIB(
[dw], [dw],
[dwfl_begin], [dwfl_begin],
[have_elfutils=yes], [],
[if test "x$have_elfutils" = xyes ; then [if test "x$have_elfutils" = xyes ; then
AC_MSG_ERROR([*** ELFUTILS libs not found.]) AC_MSG_ERROR([*** ELFUTILS libs not found.])
fi]) fi])
AC_CHECK_LIB(
[dw],
[dwfl_core_file_attach],
[have_elfutils=yes],
[if test "x$have_elfutils" = xyes ; then
AC_MSG_ERROR([*** ELFUTILS >= 158 is required.])
fi])
if test "x$have_elfutils" = xyes ; then if test "x$have_elfutils" = xyes ; then
ELFUTILS_LIBS="-lelf -ldw" ELFUTILS_LIBS="-lelf -ldw"
AC_DEFINE(HAVE_ELFUTILS, 1, [ELFUTILS available]) AC_DEFINE(HAVE_ELFUTILS, 1, [ELFUTILS available])