blob: 6c620f9f27955810ea36a80bd2b52fe9faeb6877 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001vim: add knob whether elf.h are checked
2
3Previously, it still was checked when there was no elf library in sysroots directory.
4Add knob to decide whether elf.h are checked or not.
5
6Upstream-status: Pending
7
8Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
9---
Brad Bishop6e60e8b2018-02-01 10:27:11 -050010 src/configure.ac | 7 +++++++
Patrick Williamsb48b7b42016-08-17 15:04:38 -050011 1 file changed, 7 insertions(+)
12
Brad Bishop6e60e8b2018-02-01 10:27:11 -050013diff --git a/src/configure.ac b/src/configure.ac
Patrick Williamsb48b7b42016-08-17 15:04:38 -050014index d734064..f504fa6 100644
Brad Bishop6e60e8b2018-02-01 10:27:11 -050015--- a/src/configure.ac
16+++ b/src/configure.ac
Patrick Williamsb48b7b42016-08-17 15:04:38 -050017@@ -2483,11 +2483,18 @@ AC_TRY_COMPILE([#include <stdio.h>], [int x __attribute__((unused));],
18 AC_MSG_RESULT(no))
19
20 dnl Checks for header files.
21+AC_MSG_CHECKING(whether or not to look for elf.h)
22+AC_ARG_ENABLE(elf-check,
23+ [ --enable-elf-check If elfutils, check for elf.h [default=no]],
24+ , enable_elf_check="no")
25+AC_MSG_RESULT($enable_elf_check)
26+if test "x$enable_elf_check" != "xno"; then
27 AC_CHECK_HEADER(elf.h, HAS_ELF=1)
28 dnl AC_CHECK_HEADER(dwarf.h, SVR4=1)
29 if test "$HAS_ELF" = 1; then
30 AC_CHECK_LIB(elf, main)
31 fi
32+fi
33
34 AC_HEADER_DIRENT
35
36--
371.7.9.5
38