]> sourceware.org Git - libabigail.git/commitdiff
Add libelf to libabigail.la's linker line
authorJan Engelhardt <jengelh@inai.de>
Tue, 9 Sep 2014 12:53:41 +0000 (14:53 +0200)
committerDodji Seketeli <dodji@redhat.com>
Fri, 12 Sep 2014 09:04:57 +0000 (11:04 +0200)
* configure.ac: Check for the existence of libelf at configure
time by looking at the presence of the elf_end symbol.  Add the
libelf to the link command line.

Signed-off-by: Jan Engelhardt <jengelh@inai.de>
configure.ac

index e88ce9efbfe7a95bb3c2ecc7d930eaba23766279..ccebc4e6f64be3af181fb3bc46ed9cc8afbdfe8c 100644 (file)
@@ -55,12 +55,17 @@ AC_CHECK_LIB(dw, dwfl_begin, [DW_LIBS=-ldw])
 AC_CHECK_HEADER(elfutils/libdwfl.h,
                [],
                [AC_MSG_ERROR([could not find elfutils/libdwfl.h installed])])
+AC_CHECK_LIB([elf], [elf_end], [ELF_LIBS="-lelf"])
+AC_CHECK_HEADER([libelf.h],
+               [],
+               [AC_MSG_ERROR([could not find libelf.h])])
 
 if test x$DW_LIBS = x; then
    AC_MSG_ERROR([could not find elfutils dwarf library installed])
 fi
 
 AC_SUBST(DW_LIBS)
+AC_SUBST([ELF_LIBS])
 
 dnl Check for dependency: libxml
 LIBXML2_VERSION=2.6.22
@@ -115,7 +120,7 @@ AM_CONDITIONAL(ENABLE_ZIP_ARCHIVE, test x$ENABLE_ZIP_ARCHIVE = xyes)
 DEPS_CPPFLAGS="$XML_CFLAGS $LIBZIP_CFLAGS"
 AC_SUBST(DEPS_CPPFLAGS)
 
-DEPS_LIBS="$XML_LIBS $LIBZIP_LIBS $DW_LIBS"
+DEPS_LIBS="$XML_LIBS $LIBZIP_LIBS $DW_LIBS $ELF_LIBS"
 AC_SUBST(DEPS_LIBS)
 
 if test x$ABIGAIL_DEVEL != x; then
This page took 0.032846 seconds and 5 git commands to generate.