Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
configure: Reset LIBS after ELF check
Browse files Browse the repository at this point in the history
If action-if-found is not specified, AC_CHECK_LIB will append the library
to LIBS. As we don't want to link everything against libelf, reset LIBS
after doing the checks.
  • Loading branch information
mbiebl committed May 1, 2012
1 parent eb5381b commit 8db824e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1824,10 +1824,12 @@ dnl ************************
PKG_CHECK_MODULES([LIBELF], [libelf], [have_libelf=yes], [have_libelf=maybe])

if test $have_libelf = maybe; then
glib_save_LIBS=$LIBS
AC_CHECK_LIB([elf], [elf_begin], , [have_libelf=no])
AC_CHECK_LIB([elf], [elf_getshdrstrndx], , [have_libelf=no])
AC_CHECK_LIB([elf], [elf_getshdrnum], , [have_libelf=no])
AC_CHECK_HEADER([libelf.h], , [have_libelf=no])
LIBS=$glib_save_LIBS

if test $have_libelf != no; then
LIBELF_LIBS=-lelf
Expand Down

0 comments on commit 8db824e

Please sign in to comment.