From: Ralf Corsépius Date: Fri, 10 Aug 2007 13:22:25 +0000 (+0200) Subject: Use AC_CHECK_HEADERS(gelf.h). X-Git-Tag: rpm-4.6.0-rc1~2147 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d1e0b73576ba80a8d1956365386d41539a60048a;p=platform%2Fupstream%2Frpm.git Use AC_CHECK_HEADERS(gelf.h). Add AM_CONDITIONAL(LIBELF). --- diff --git a/configure.ac b/configure.ac index 98867fa..6c77ff3 100644 --- a/configure.ac +++ b/configure.ac @@ -422,15 +422,16 @@ AC_CHECK_LIB(port, writev) WITH_LIBELF_INCLUDE= WITH_LIBELF_LIB= AC_CHECK_HEADER([libelf.h]) -AC_CHECK_HEADER([gelf.h], [ - AC_DEFINE(HAVE_GELF_H, 1, [Define to 1 if you have the header file.]) +AC_CHECK_HEADERS([gelf.h], [ AC_CHECK_LIB(elf, gelf_getvernaux, [ AC_DEFINE(HAVE_LIBELF, 1, [Define to 1 if you have the 'elf' library (-lelf).]) WITH_LIBELF_LIB="-lelf" + WITH_LIBELF=yes ]) ]) AC_SUBST(WITH_LIBELF_INCLUDE) AC_SUBST(WITH_LIBELF_LIB) +AM_CONDITIONAL(LIBELF,[test "$WITH_LIBELF" = yes]) AC_CHECK_HEADERS([dwarf.h], [ WITH_LIBDWARF=yes