diff src/configure.ac @ 22041:f55cba26348f v8.2.1570

patch 8.2.1570: configure check for dirfd() does not work on HPUX Commit: https://github.com/vim/vim/commit/9d8bfae50fdaf5f5ec6307c60ebd1fad0927c6be Author: Bram Moolenaar <Bram@vim.org> Date: Wed Sep 2 21:21:35 2020 +0200 patch 8.2.1570: configure check for dirfd() does not work on HPUX Problem: Configure check for dirfd() does not work on HPUX. (Michael Osipov) Solution: Use AC_TRY_LINK instead of AC_TRY_COMPILE. (closes https://github.com/vim/vim/issues/6838)
author Bram Moolenaar <Bram@vim.org>
date Wed, 02 Sep 2020 21:30:03 +0200
parents c346db463a59
children 2cc0de1e05a6
line wrap: on
line diff
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -4013,7 +4013,7 @@ AC_TRY_LINK([#include <stdio.h>], [renam
 
 dnl check for dirfd()
 AC_MSG_CHECKING(for dirfd)
-AC_TRY_COMPILE(
+AC_TRY_LINK(
 [#include <sys/types.h>
 #include <dirent.h>],
 [DIR * dir=opendir("dirname"); dirfd(dir);],
@@ -4021,7 +4021,7 @@ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_DIRFD
 
 dnl check for flock()
 AC_MSG_CHECKING(for flock)
-AC_TRY_COMPILE(
+AC_TRY_LINK(
 [#include <sys/file.h>],
 [flock(10, LOCK_SH);],
 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_FLOCK), AC_MSG_RESULT(not usable))