diff --git a/runtime/staprun/configure.ac b/runtime/staprun/configure.ac index 79d68ee..8490a42 100644 --- a/runtime/staprun/configure.ac +++ b/runtime/staprun/configure.ac @@ -73,11 +73,11 @@ dnl is too tricky to bother with. AC_CHECK_HEADERS([libelf.h]) +AC_CHECK_LIB(elf, elf_begin, [staprun_LIBS="$staprun_LIBS -lelf"], []) save_LIBS="$LIBS" dnl this will only succeed with elfutils 0.142+ AC_CHECK_LIB(elf,elf_getshdrstrndx,[ AC_DEFINE([HAVE_ELF_GETSHDRSTRNDX],[1],[Define to 1 if libelf has elf_getshdrstrndx])]) -staprun_LIBS="$staprun_LIBS -lelf" LIBS="$save_LIBS" AC_SUBST(staprun_LIBS)