From 2cf32f06fb5d880ce4f5a9abbd4f9d3874a0b852 Mon Sep 17 00:00:00 2001 From: "Turgis, Frederic" Date: Tue, 6 Sep 2011 19:38:08 +0200 Subject: [PATCH] runtime/staprun/configure.ac: AC_CHECK_LIB before adding -lelf. --- runtime/staprun/configure | 3 ++- runtime/staprun/configure.ac | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/runtime/staprun/configure b/runtime/staprun/configure index f3743f118..6d9c50706 100755 --- a/runtime/staprun/configure +++ b/runtime/staprun/configure @@ -5773,9 +5773,10 @@ if test "x$ac_cv_lib_elf_elf_getshdrstrndx" = xyes; then : $as_echo "#define HAVE_ELF_GETSHDRSTRNDX 1" >>confdefs.h + staprun_LIBS="$staprun_LIBS -lelf" + fi -staprun_LIBS="$staprun_LIBS -lelf" LIBS="$save_LIBS" diff --git a/runtime/staprun/configure.ac b/runtime/staprun/configure.ac index 79d68eeb6..f449411ca 100644 --- a/runtime/staprun/configure.ac +++ b/runtime/staprun/configure.ac @@ -76,8 +76,9 @@ AC_CHECK_HEADERS([libelf.h]) 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" + 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) -- 2.43.5