1PHP_ARG_WITH([sqlite3], 2 [whether to enable the SQLite3 extension], 3 [AS_HELP_STRING([--without-sqlite3], 4 [Do not include SQLite3 support.])], 5 [yes]) 6 7if test $PHP_SQLITE3 != "no"; then 8 PHP_SETUP_SQLITE([SQLITE3_SHARED_LIBADD]) 9 AC_DEFINE([HAVE_SQLITE3], [1], 10 [Define to 1 if the PHP extension 'sqlite3' is available.]) 11 12 PHP_CHECK_LIBRARY([sqlite3], [sqlite3_errstr], 13 [AC_DEFINE([HAVE_SQLITE3_ERRSTR], [1], 14 [Define to 1 if SQLite library has the 'sqlite3_errstr' function.])], 15 [], 16 [$SQLITE3_SHARED_LIBADD]) 17 18 PHP_CHECK_LIBRARY([sqlite3], [sqlite3_expanded_sql], 19 [AC_DEFINE([HAVE_SQLITE3_EXPANDED_SQL], [1], 20 [Define to 1 if SQLite library has the 'sqlite3_expanded_sql' function.])], 21 [], 22 [$SQLITE3_SHARED_LIBADD]) 23 24 PHP_CHECK_LIBRARY([sqlite3], [sqlite3_load_extension], 25 [], 26 [AC_DEFINE([SQLITE_OMIT_LOAD_EXTENSION], [1], 27 [Define to 1 if SQLite library was compiled with the 28 SQLITE_OMIT_LOAD_EXTENSION and does not have the extension support with 29 the 'sqlite3_load_extension' function. For usage in the sqlite3 PHP 30 extension. See https://www.sqlite.org/compile.html.])], 31 [$SQLITE3_SHARED_LIBADD]) 32 33 PHP_NEW_EXTENSION([sqlite3], 34 [sqlite3.c], 35 [$ext_shared],, 36 [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) 37 PHP_SUBST([SQLITE3_SHARED_LIBADD]) 38fi 39