[glib] configure: Add --disable-libelf option



commit 9e1d4da14d8e69fb60da1a9733ac1d58d0dcd8b2
Author: Martin Jansa <Martin Jansa gmail com>
Date:   Wed Jun 6 21:38:28 2012 -0400

    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 <walters verbum org>

 configure.ac |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index f7c2471..c7c011f 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
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]