patch 9.1.0452: Configure checks for libelf unnecessarily

Commit: 
https://github.com/vim/vim/commit/1acc67ac4412aa9a75d1c58ebf93f2b29585a960
Author: youcai <omegacole...@gmail.com>
Date:   Thu May 30 19:31:36 2024 +0200

    patch 9.1.0452: Configure checks for libelf unnecessarily
    
    Problem:  Configure checks for libelf unnecessarily
    Solution: Remove configure check (youcai)
    
    closes: #14879
    
    Signed-off-by: youcai <omegacole...@gmail.com>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 9b15d001d..7491b06e0 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -4402,7 +4402,6 @@ Code size:
     left out.
 8   When compiled with a GUI-only version, the termcap entries for terminals
     can be removed.
-8   Can the check for libelf in configure.ac be removed?
 
 
 Messages:
diff --git a/src/auto/configure b/src/auto/configure
index 8433133c6..98b9580b7 100755
--- a/src/auto/configure
+++ b/src/auto/configure
@@ -11407,55 +11407,6 @@ printf "%s
" "no" >&6; }
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
-ac_fn_c_check_header_compile "$LINENO" "elf.h" "ac_cv_header_elf_h" 
"$ac_includes_default"
-if test "x$ac_cv_header_elf_h" = xyes
-then :
-  HAS_ELF=1
-fi
-
-if test "$HAS_ELF" = 1; then
-  { printf "%s
" "$as_me:${as_lineno-$LINENO}: checking for main in -lelf" >&5
-printf %s "checking for main in -lelf... " >&6; }
-if test ${ac_cv_lib_elf_main+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lelf  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-int
-main (void)
-{
-return main ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
-  ac_cv_lib_elf_main=yes
-else $as_nop
-  ac_cv_lib_elf_main=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ printf "%s
" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_main" >&5
-printf "%s
" "$ac_cv_lib_elf_main" >&6; }
-if test "x$ac_cv_lib_elf_main" = xyes
-then :
-  printf "%s
" "#define HAVE_LIBELF 1" >>confdefs.h
-
-  LIBS="-lelf $LIBS"
-
-fi
-
-fi
-
 ac_header_dirent=no
 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
   as_ac_Header=`printf "%s
" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
diff --git a/src/configure.ac b/src/configure.ac
index e092f686a..946fe52ff 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -3307,13 +3307,6 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>], 
[int x __attribute__((u
        AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ATTRIBUTE_UNUSED),
        AC_MSG_RESULT(no))
 
-dnl Checks for header files.
-AC_CHECK_HEADER(elf.h, HAS_ELF=1)
-dnl AC_CHECK_HEADER(dwarf.h, SVR4=1)
-if test "$HAS_ELF" = 1; then
-  AC_CHECK_LIB(elf, main)
-fi
-
 AC_HEADER_DIRENT
 
 dnl If sys/wait.h is not found it might still exist but not be POSIX
diff --git a/src/link.sh b/src/link.sh
index e4030de86..6e5c50f74 100755
--- a/src/link.sh
+++ b/src/link.sh
@@ -53,7 +53,7 @@ else
   if sh link_$PROG.cmd; then
     touch auto/link.sed
     cp link_$PROG.cmd linkit_$PROG.sh
-    for libname in SM ICE nsl dnet dnet_stub inet socket dir elf iconv Xt Xmu 
Xp Xpm X11 Xdmcp x w perl dl pthread thread readline m crypt attr; do
+    for libname in SM ICE nsl dnet dnet_stub inet socket dir iconv Xt Xmu Xp 
Xpm X11 Xdmcp x w perl dl pthread thread readline m crypt attr; do
       cont=yes
       while test -n "$cont"; do
         if grep "l$libname " linkit_$PROG.sh >/dev/null; then
diff --git a/src/version.c b/src/version.c
index e90bd3074..e5b8e4527 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    452,
 /**/
     451,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1sCjq4-00HAID-Gm%40256bit.org.

Raspunde prin e-mail lui