gh-90005: Don't link with libbsd if not needed (#105236)

The regression was introduced with commit 5b946cada.
Restore pre gh-29696 behaviour.
This commit is contained in:
Erlend E. Aasland 2023-06-06 11:33:01 +02:00 committed by GitHub
parent f4d8e10d0d
commit e01c4de35d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 5 deletions

View File

@ -0,0 +1 @@
Fix a regression in :file:`configure` where we could end up unintentionally linking with ``libbsd``.

8
configure generated vendored
View File

@ -18968,13 +18968,15 @@ fi
printf "%s\n" "$ac_cv_flock_decl" >&6; } printf "%s\n" "$ac_cv_flock_decl" >&6; }
if test "x$ac_cv_flock_decl" = xyes if test "x$ac_cv_flock_decl" = xyes
then : then :
for ac_func in flock
do :
ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock" ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
if test "x$ac_cv_func_flock" = xyes if test "x$ac_cv_func_flock" = xyes
then : then :
printf "%s\n" "#define HAVE_FLOCK 1" >>confdefs.h printf "%s\n" "#define HAVE_FLOCK 1" >>confdefs.h
fi else $as_nop
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
printf %s "checking for flock in -lbsd... " >&6; } printf %s "checking for flock in -lbsd... " >&6; }
if test ${ac_cv_lib_bsd_flock+y} if test ${ac_cv_lib_bsd_flock+y}
@ -19015,7 +19017,9 @@ then :
FCNTL_LIBS="-lbsd" FCNTL_LIBS="-lbsd"
fi fi
fi
done
fi fi

View File

@ -4908,9 +4908,8 @@ AC_CACHE_CHECK([for flock declaration], [ac_cv_flock_decl],
]) ])
dnl Linking with libbsd may be necessary on AIX for flock function. dnl Linking with libbsd may be necessary on AIX for flock function.
AS_VAR_IF([ac_cv_flock_decl], [yes], AS_VAR_IF([ac_cv_flock_decl], [yes],
AC_CHECK_FUNCS([flock]) [AC_CHECK_FUNCS([flock], [],
AC_CHECK_LIB([bsd], [flock], [FCNTL_LIBS="-lbsd"]) [AC_CHECK_LIB([bsd], [flock], [FCNTL_LIBS="-lbsd"])])])
)
PY_CHECK_FUNC([getpagesize], [#include <unistd.h>]) PY_CHECK_FUNC([getpagesize], [#include <unistd.h>])