From 9e1d4da14d8e69fb60da1a9733ac1d58d0dcd8b2 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Wed, 6 Jun 2012 21:38:28 -0400 Subject: [PATCH] configure: Add --disable-libelf option See http://git.openembedded.org/openembedded-core/tree/meta/recipes-core/glib-2.0/glib-2.0/nolibelf.patch?id=1f73485a143f0aa6cd87636f3d36a7d1dfc40a3b Signed-off-by: Colin Walters --- configure.ac | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index f7c24716c..c7c011fc1 100644 --- a/configure.ac +++ b/configure.ac @@ -1815,10 +1815,11 @@ AC_SUBST(XATTR_LIBS) dnl ************************ dnl *** check for libelf *** dnl ************************ - +AC_ARG_ENABLE(libelf, + AC_HELP_STRING([--disable-libelf], [build without libelf support])) +AS_IF([ test "x$enable_libelf" != "xno"],[ PKG_CHECK_MODULES([LIBELF], [libelf >= 0.8.12], [have_libelf=yes], [have_libelf=maybe]) - -AS_IF([ test $have_libelf = maybe], [ +AS_IF([ test $have_libelf = maybe ], [ glib_save_LIBS=$LIBS AC_CHECK_LIB([elf], [elf_begin], [:], [have_libelf=no]) AC_CHECK_LIB([elf], [elf_getshdrstrndx], [:], [have_libelf=no]) @@ -1831,8 +1832,9 @@ AS_IF([ test $have_libelf = maybe], [ have_libelf=yes fi ]) +]) -if test $have_libelf = yes; then +if test x$have_libelf = xyes; then AC_DEFINE(HAVE_LIBELF, 1, [Define if libelf is available]) fi