Commit 4505d238 authored by Simon McVittie's avatar Simon McVittie

build: Don't run a test program, just link it

This is necessary when cross-compiling, at least on Debian 8 'jessie'.
Signed-off-by: Simon McVittie's avatarSimon McVittie <smcv@collabora.com>
parent 75809d00
......@@ -59,11 +59,11 @@ PKG_CHECK_MODULES([LIBELF], [libelf >= 0.152], [have_libelf=yes], [
AC_CHECK_LIB([elf], [elf_begin], [],
[AC_MSG_ERROR([libelf not found])])
AC_MSG_CHECKING([Elf_Cmd ELF_C_READ_MMAP])
AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <libelf.h>],
[Elf_Cmd x = ELF_C_READ_MMAP;])],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])]
[AC_MSG_ERROR([ELF_C_READ_MMAP missing: libelfg vs libelf0?])])
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <libelf.h>],
[Elf_Cmd x = ELF_C_READ_MMAP;])],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])]
[AC_MSG_ERROR([ELF_C_READ_MMAP missing: libelfg vs libelf0?])])
LIBS="$save_LIBS"
LIBELF_LIBS=-lelf
])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment