]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-98636: Fix detecting gdbm_compat for _dbm module (#98643)
authorMichał Górny <mgorny@gentoo.org>
Wed, 11 Jan 2023 21:46:28 +0000 (22:46 +0100)
committerGitHub <noreply@github.com>
Wed, 11 Jan 2023 21:46:28 +0000 (22:46 +0100)
Fix the gdbm_compat library detection logic to actually check for
-lgdbm_compat independently of the ndbm detection.
This fixes the build failure with `--with-dbmliborder=gdbm`,
and implicit fallback to ndbm with the default value.

Misc/ACKS
Misc/NEWS.d/next/Build/2022-10-25-11-53-55.gh-issue-98636.e0RPAr.rst [new file with mode: 0644]
configure
configure.ac

index b4e309c6905b0d47053d1d0181a09b36a6765cc2..a51658d79fa10add568696d45387b1cb1941f66c 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -640,6 +640,7 @@ Tiago Gonçalves
 Chris Gonnerman
 Shelley Gooch
 David Goodger
+Michał Górny
 Elliot Gorokhovsky
 Hans de Graaff
 Tim Graham
diff --git a/Misc/NEWS.d/next/Build/2022-10-25-11-53-55.gh-issue-98636.e0RPAr.rst b/Misc/NEWS.d/next/Build/2022-10-25-11-53-55.gh-issue-98636.e0RPAr.rst
new file mode 100644 (file)
index 0000000..26a7cc8
--- /dev/null
@@ -0,0 +1,2 @@
+Fix a regression in detecting ``gdbm_compat`` library for the ``_gdbm``
+module build.
index 4841c1d8ad5f5eef08f1545cd73ac0f0d274ad23..5b6750aaa8dbef852d79c08f7e7bf7bb3d9c393e 100755 (executable)
--- a/configure
+++ b/configure
@@ -14710,6 +14710,7 @@ fi
 { ac_cv_header_gdbm_ndbm_h=; unset ac_cv_header_gdbm_ndbm_h;}
 
 if test "$ac_cv_header_gdbm_slash_ndbm_h" = yes -o "$ac_cv_header_gdbm_dash_ndbm_h" = yes; then
+  { ac_cv_search_dbm_open=; unset ac_cv_search_dbm_open;}
   save_CFLAGS=$CFLAGS
 save_CPPFLAGS=$CPPFLAGS
 save_LDFLAGS=$LDFLAGS
@@ -14769,7 +14770,9 @@ $as_echo "$ac_cv_search_dbm_open" >&6; }
 ac_res=$ac_cv_search_dbm_open
 if test "$ac_res" != no; then :
   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
+  have_gdbm_compat=yes
+else
+  have_gdbm_compat=no
 fi
 
 
index 0ed5a24e8683cb7e504a92fd8072edd95da3d554..956334a865f7121ae584e2941a8671e51861e2f3 100644 (file)
@@ -4120,8 +4120,9 @@ AS_VAR_IF([ac_cv_header_gdbm_dash_ndbm_h], [yes], [
 AS_UNSET([ac_cv_header_gdbm_ndbm_h])
 
 if test "$ac_cv_header_gdbm_slash_ndbm_h" = yes -o "$ac_cv_header_gdbm_dash_ndbm_h" = yes; then
+  AS_UNSET([ac_cv_search_dbm_open])
   WITH_SAVE_ENV([
-    AC_SEARCH_LIBS([dbm_open], [gdbm_compat])
+    AC_SEARCH_LIBS([dbm_open], [gdbm_compat], [have_gdbm_compat=yes], [have_gdbm_compat=no])
   ])
 fi