[ltrace-commits] 01/03: Fix building with libelf in a non-standard location

Petr Machata pmachata-guest at moszumanska.debian.org
Wed Apr 8 11:23:47 UTC 2015


This is an automated email from the git hooks/post-receive script.

pmachata-guest pushed a commit to branch master
in repository ltrace.

commit 391b01454c5ef17db8da8a2b0b5e72f28870dde4
Author: Роман Донченко <dpb at corrigendum.ru>
Date:   Sat Mar 28 20:13:09 2015 +0300

    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.
---
 configure.ac | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index c39fd9f..b9c39fa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/ltrace.git



More information about the ltrace-commits mailing list