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>
This commit is contained in:
Martin Jansa 2012-06-06 21:38:28 -04:00 committed by Colin Walters
parent 032e8dabd1
commit 9e1d4da14d

View File

@ -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