@@ -66,6 +66,11 @@ 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.])]
+)
+
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 +481,7 @@ AS_IF(
)
AC_SUBST([UDEV_LIBS])
+AC_SUBST([ELF_LIBS])
AC_SUBST([DEVMAPPER_LIBS])
AC_SUBST([CRYPT_LIBS])
AC_SUBST([FDT_LIBS])
@@ -58,7 +58,8 @@ discover_pb_discover_LDADD = \
discover/native/native-parser.ro \
discover/platform.ro \
$(core_lib) \
- $(UDEV_LIBS)
+ $(UDEV_LIBS) \
+ $(ELF_LIBS)
discover_pb_discover_LDFLAGS = \
$(AM_LDFLAGS) \
@@ -18,7 +18,8 @@ dist_pkglibexec_SCRIPTS = utils/pb-console
sbin_PROGRAMS += utils/pb-event utils/pb-config
utils_pb_config_LDADD = $(top_builddir)/lib/libpbcore.la \
- $(top_builddir)/discover/platform.ro
+ $(top_builddir)/discover/platform.ro \
+ $(ELF_LIBS)
utils_hooks_30_dtb_updates_SOURCES = utils/hooks/30-dtb-updates.c
utils_hooks_30_dtb_updates_LDADD = $(top_builddir)/lib/libpbcore.la \
With this library, petitboot is able to open the ELF binary to check information, like annotation in ELF notes section. Signed-off-by: Maxiwell S. Garcia <maxiwell@linux.ibm.com> --- configure.ac | 6 ++++++ discover/Makefile.am | 3 ++- utils/Makefile.am | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-)