mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
Improve libelf configure check
system libelf is not sufficient for glib (lacks elf_getshdrstrndx and elf_getshdrnum) so let's make sure we don't define HAVE_LIBELF
This commit is contained in:
parent
aded15c9d1
commit
431d3adacd
@ -1820,10 +1820,10 @@ PKG_CHECK_MODULES([LIBELF], [libelf], [have_libelf=yes], [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])
|
||||
AC_CHECK_LIB([elf], [elf_getshdrnum], , [have_libelf=no])
|
||||
AC_CHECK_HEADER([libelf.h], , [have_libelf=no])
|
||||
AC_CHECK_LIB([elf], [elf_begin], [:], [have_libelf=no])
|
||||
AC_CHECK_LIB([elf], [elf_getshdrstrndx], [:], [have_libelf=no])
|
||||
AC_CHECK_LIB([elf], [elf_getshdrnum], [:], [have_libelf=no])
|
||||
AC_CHECK_HEADER([libelf.h], [:], [have_libelf=no])
|
||||
LIBS=$glib_save_LIBS
|
||||
|
||||
if test $have_libelf != no; then
|
||||
|
Loading…
Reference in New Issue
Block a user