From 827a7af51bb120579a7addbcda216300988a3b1e Mon Sep 17 00:00:00 2001 From: "Maxiwell S. Garcia" Date: Mon, 23 Sep 2019 19:30:21 -0300 Subject: configure: Add libelf as a requirement With this library, petitboot is able to open the ELF binary to check information, like annotation in ELF notes section. Minor libelf-dw dependency additions by Jeremy Kerr . Signed-off-by: Maxiwell S. Garcia Signed-off-by: Jeremy Kerr --- configure.ac | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 5d541fb..6683be6 100644 --- a/configure.ac +++ b/configure.ac @@ -66,6 +66,15 @@ AC_CHECK_LIB([udev], [udev_new], [AC_MSG_FAILURE([The libudev development library is required by petitboot. Try installing the package libudev-dev or libudev-devel.])] ) +AC_CHECK_LIB([elf], [elf_begin], + [ELF_LIBS=-lelf], + [AC_MSG_FAILURE([The libelf development library is required by petitboot. Try installing the package libelf-dev or elfutils-libelf-devel.])] +) + +AC_CHECK_HEADERS([elfutils/libdw.h], + [], + [AC_MSG_FAILURE([elfutils/libdw.h not found. Try installing the package libdw-dev or elfutils-devel.])] +) PKG_CHECK_EXISTS(libudev >= 218, [old_udev=no], [old_udev=yes]) if test "$old_udev" = "yes" ; then AC_DEFINE(UDEV_LOGGING, 1, [Support old udev logging interface]) @@ -476,6 +485,7 @@ AS_IF( ) AC_SUBST([UDEV_LIBS]) +AC_SUBST([ELF_LIBS]) AC_SUBST([DEVMAPPER_LIBS]) AC_SUBST([CRYPT_LIBS]) AC_SUBST([FDT_LIBS]) -- cgit v1.2.1