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 PKG_CHECK_MODULES([SQLITE], [sqlite3 >= 3.7.7]) 9 10 PHP_EVAL_INCLINE($SQLITE_CFLAGS) 11 PHP_EVAL_LIBLINE($SQLITE_LIBS, SQLITE3_SHARED_LIBADD) 12 AC_DEFINE(HAVE_SQLITE3, 1, [Define to 1 if you have the sqlite3 extension enabled.]) 13 14 PHP_CHECK_LIBRARY(sqlite3, sqlite3_errstr, [ 15 AC_DEFINE(HAVE_SQLITE3_ERRSTR, 1, [have sqlite3_errstr function]) 16 ], [], [$SQLITE3_SHARED_LIBADD]) 17 18 PHP_CHECK_LIBRARY(sqlite3, sqlite3_expanded_sql, [ 19 AC_DEFINE(HAVE_SQLITE3_EXPANDED_SQL, 1, [have sqlite3_expanded_sql function]) 20 ], [], [$SQLITE3_SHARED_LIBADD]) 21 22 PHP_CHECK_LIBRARY(sqlite3,sqlite3_load_extension, 23 [], 24 [AC_DEFINE(SQLITE_OMIT_LOAD_EXTENSION, 1, [have sqlite3 with extension support])], 25 [$SQLITE3_SHARED_LIBADD] 26 ) 27 28 PHP_NEW_EXTENSION(sqlite3, sqlite3.c, $ext_shared,,-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) 29 PHP_SUBST(SQLITE3_SHARED_LIBADD) 30fi 31