[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master dcccb925626 2/2: Port better to AIX 7.3 with -lsqlite3 but not sq
From: |
Paul Eggert |
Subject: |
master dcccb925626 2/2: Port better to AIX 7.3 with -lsqlite3 but not sqlite3.h |
Date: |
Sun, 19 Jan 2025 19:24:40 -0500 (EST) |
branch: master
commit dcccb9256262f8e992b75602dd4e861371b97361
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>
Port better to AIX 7.3 with -lsqlite3 but not sqlite3.h
* configure.ac (HAVE_SQLITE): Yes only if sqlite3.h can be
included (Bug#75667).
---
configure.ac | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index 1d8c281ee21..ba39074c83a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3716,9 +3716,18 @@ if test "${with_sqlite3}" != "no"; then
CFLAGS="$SAVE_CFLAGS"
fi
else
- AC_CHECK_LIB([sqlite3], [sqlite3_open_v2],
- [HAVE_SQLITE3=yes],
- [HAVE_SQLITE3=no])
+ AC_CACHE_CHECK([for sqlite3],
+ [emacs_cv_have_sqlite3],
+ [OLIBS=$LIBS
+ LIBS="-lsqlite3 $LIBS"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[#include <sqlite3.h>
+ sqlite3 *handle;]],
+ [[return sqlite3_open_v2 ("", &handle, 0, "");]])],
+ [emacs_cv_have_sqlite3=yes],
+ [emacs_cv_have_sqlite3=no])
+ LIBS=$OLIBS])
+ HAVE_SQLITE3=$emacs_cv_have_sqlite3
if test "$HAVE_SQLITE3" = "yes"; then
SQLITE3_LIBS=-lsqlite3
LIBS="$SQLITE3_LIBS $LIBS"