Commit 649b30ad authored by Роман Донченко's avatar Роман Донченко Committed by Petr Machata

Fix building with libelf in a non-standard location

The default action for AC_CHECK_LIB adds -lelf to LIBS. If libelf.so
is in a non-standard location, this causes all subsequent link operations
to fail, including all of the function presence tests.

Change the action to set libelf_LIBS instead, like for every other library.
Makefile.am already uses that variable, so no change required there.
parent eedd62bb
......@@ -94,11 +94,12 @@ LDFLAGS="${LDFLAGS} ${AM_LDFLAGS}"
AC_CHECK_HEADERS([elf.h gelf.h],,
[AC_MSG_ERROR([*** libelf.h or gelf.h not found on your system])]
)
AC_CHECK_LIB([elf], [elf_begin],,
AC_CHECK_LIB([elf], [elf_begin], [libelf_LIBS="-lelf"],
[AC_MSG_ERROR([*** libelf not found on your system])]
)
CPPFLAGS="${saved_CPPFLAGS}"
LDFLAGS="${saved_LDFLAGS}"
AC_SUBST(libelf_LIBS)
# HAVE_LIBIBERTY
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment