summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZanie Blue <contact@zanie.dev>2024-12-30 08:55:14 (GMT)
committerGitHub <noreply@github.com>2024-12-30 08:55:14 (GMT)
commit81376fef76a53fb79893bfa9c9db18d97c228fbe (patch)
tree9cb13f55009aead12b5836e890feb6e89b4929a3
parentef63cca494571f50906baae1d176469a3dcf8838 (diff)
downloadcpython-81376fef76a53fb79893bfa9c9db18d97c228fbe.zip
cpython-81376fef76a53fb79893bfa9c9db18d97c228fbe.tar.gz
cpython-81376fef76a53fb79893bfa9c9db18d97c228fbe.tar.bz2
gh-128321: Set LIBS instead of LDFLAGS when checking sqlite3 requirements (#128322)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
-rw-r--r--Misc/NEWS.d/next/Build/2024-12-28-21-05-19.gh-issue-128321.0UvbXw.rst3
-rwxr-xr-xconfigure2
-rw-r--r--configure.ac2
3 files changed, 5 insertions, 2 deletions
diff --git a/Misc/NEWS.d/next/Build/2024-12-28-21-05-19.gh-issue-128321.0UvbXw.rst b/Misc/NEWS.d/next/Build/2024-12-28-21-05-19.gh-issue-128321.0UvbXw.rst
new file mode 100644
index 0000000..ed72cc8
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2024-12-28-21-05-19.gh-issue-128321.0UvbXw.rst
@@ -0,0 +1,3 @@
+Set ``LIBS`` instead of ``LDFLAGS`` when checking if :mod:`sqlite3` library
+functions are available. This fixes the ordering of linked libraries during
+checks, which was incorrect when using a statically linked ``libsqlite3``.
diff --git a/configure b/configure
index 299eff6..3d2c602 100755
--- a/configure
+++ b/configure
@@ -15434,7 +15434,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBSQLITE3_CFLAGS"
- LDFLAGS="$LIBSQLITE3_LIBS $LDFLAGS"
+ LIBS="$LIBSQLITE3_LIBS $LIBS"
ac_fn_c_check_header_compile "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default"
if test "x$ac_cv_header_sqlite3_h" = xyes
diff --git a/configure.ac b/configure.ac
index badb19d..ee034e5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4220,7 +4220,7 @@ WITH_SAVE_ENV([
dnl bpo-45774/GH-29507: The CPP check in AC_CHECK_HEADER can fail on FreeBSD,
dnl hence CPPFLAGS instead of CFLAGS.
CPPFLAGS="$CPPFLAGS $LIBSQLITE3_CFLAGS"
- LDFLAGS="$LIBSQLITE3_LIBS $LDFLAGS"
+ LIBS="$LIBSQLITE3_LIBS $LIBS"
AC_CHECK_HEADER([sqlite3.h], [
have_sqlite3=yes