Skip to content

Join SQLite library setup M4 macros to PHP_SETUP_SQLITE #14372

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions build/php.m4
Original file line number Diff line number Diff line change
Expand Up @@ -1935,6 +1935,18 @@ AC_DEFUN([PHP_SETUP_EXPAT], [
AC_DEFINE(HAVE_LIBEXPAT, 1, [ ])
])

dnl
dnl PHP_SETUP_SQLITE([shared-add])
dnl
dnl Common setup macro for SQLite library.
dnl
AC_DEFUN([PHP_SETUP_SQLITE], [
PKG_CHECK_MODULES([SQLITE], [sqlite3 >= 3.7.7], [
PHP_EVAL_INCLINE([$SQLITE_CFLAGS])
PHP_EVAL_LIBLINE([$SQLITE_LIBS], [$1])
])
])

dnl ----------------------------------------------------------------------------
dnl Misc. macros
dnl ----------------------------------------------------------------------------
Expand Down
5 changes: 1 addition & 4 deletions ext/pdo_sqlite/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ if test "$PHP_PDO_SQLITE" != "no"; then

PHP_CHECK_PDO_INCLUDES

PKG_CHECK_MODULES([SQLITE], [sqlite3 >= 3.7.7])

PHP_EVAL_INCLINE($SQLITE_CFLAGS)
PHP_EVAL_LIBLINE($SQLITE_LIBS, PDO_SQLITE_SHARED_LIBADD)
PHP_SETUP_SQLITE([PDO_SQLITE_SHARED_LIBADD])

PHP_CHECK_LIBRARY(sqlite3, sqlite3_close_v2, [
AC_DEFINE(HAVE_SQLITE3_CLOSE_V2, 1, [have sqlite3_close_v2])
Expand Down
5 changes: 1 addition & 4 deletions ext/sqlite3/config0.m4
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ PHP_ARG_WITH([sqlite3],
[yes])

if test $PHP_SQLITE3 != "no"; then
PKG_CHECK_MODULES([SQLITE], [sqlite3 >= 3.7.7])

PHP_EVAL_INCLINE($SQLITE_CFLAGS)
PHP_EVAL_LIBLINE($SQLITE_LIBS, SQLITE3_SHARED_LIBADD)
PHP_SETUP_SQLITE([SQLITE3_SHARED_LIBADD])
AC_DEFINE(HAVE_SQLITE3, 1, [Define to 1 if you have the sqlite3 extension enabled.])

PHP_CHECK_LIBRARY(sqlite3, sqlite3_errstr, [
Expand Down
Loading