blob: 37914d4cd9c1207a0c74b7d6d55b246d1b30bf8e [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001From 38de4bccdb8a861ffdd447f12fdab19d6d852c02 Mon Sep 17 00:00:00 2001
2From: Chong Lu <Chong.Lu@windriver.com>
3Date: Tue, 26 Jun 2018 17:34:15 +0800
4Subject: [PATCH] vim: add knob whether elf.h are checked
Patrick Williamsb48b7b42016-08-17 15:04:38 -05005
6Previously, it still was checked when there was no elf library in sysroots directory.
7Add knob to decide whether elf.h are checked or not.
8
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08009Upstream-Status: Pending
Patrick Williamsb48b7b42016-08-17 15:04:38 -050010
11Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080012Signed-off-by: Changqing Li <changqing.li@windriver.com>
Patrick Williamsb48b7b42016-08-17 15:04:38 -050013---
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080014 src/configure.ac | 7 +++++++
Patrick Williamsb48b7b42016-08-17 15:04:38 -050015 1 file changed, 7 insertions(+)
16
Brad Bishop6e60e8b2018-02-01 10:27:11 -050017diff --git a/src/configure.ac b/src/configure.ac
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080018index 0ee86ad..64736f0 100644
Brad Bishop6e60e8b2018-02-01 10:27:11 -050019--- a/src/configure.ac
20+++ b/src/configure.ac
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080021@@ -3192,11 +3192,18 @@ AC_TRY_COMPILE([#include <stdio.h>], [int x __attribute__((unused));],
Patrick Williamsb48b7b42016-08-17 15:04:38 -050022 AC_MSG_RESULT(no))
23
24 dnl Checks for header files.
25+AC_MSG_CHECKING(whether or not to look for elf.h)
26+AC_ARG_ENABLE(elf-check,
27+ [ --enable-elf-check If elfutils, check for elf.h [default=no]],
28+ , enable_elf_check="no")
29+AC_MSG_RESULT($enable_elf_check)
30+if test "x$enable_elf_check" != "xno"; then
31 AC_CHECK_HEADER(elf.h, HAS_ELF=1)
32 dnl AC_CHECK_HEADER(dwarf.h, SVR4=1)
33 if test "$HAS_ELF" = 1; then
34 AC_CHECK_LIB(elf, main)
35 fi
36+fi
37
38 AC_HEADER_DIRENT
39
40--
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800412.7.4
Patrick Williamsb48b7b42016-08-17 15:04:38 -050042