Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: third_party/sqlite/src/autoconf/configure.ac

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/autoconf/README.txt ('k') | third_party/sqlite/src/autoconf/tea/configure.ac » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/autoconf/configure.ac
diff --git a/third_party/sqlite/src/autoconf/configure.ac b/third_party/sqlite/src/autoconf/configure.ac
index 2200daffeeefc5cf4ed4dadb42b0abb8b411d5bf..b9a11aac8f495a5aa2465d7142d5b94a7ddf95ad 100644
--- a/third_party/sqlite/src/autoconf/configure.ac
+++ b/third_party/sqlite/src/autoconf/configure.ac
@@ -30,39 +30,52 @@ AC_FUNC_STRERROR_R
AC_CONFIG_FILES([Makefile sqlite3.pc])
AC_SUBST(BUILD_CFLAGS)
-#-----------------------------------------------------------------------
+#-------------------------------------------------------------------------
+# Two options to enable readline compatible libraries:
+#
# --enable-editline
# --enable-readline
#
-AC_ARG_ENABLE(editline, [AS_HELP_STRING(
- [--enable-editline],
- [use BSD libedit])],
- [], [enable_editline=yes])
-AC_ARG_ENABLE(readline, [AS_HELP_STRING(
- [--enable-readline],
- [use readline])],
- [], [enable_readline=no])
-if test x"$enable_editline" != xno ; then
- sLIBS=$LIBS
- LIBS=""
- AC_SEARCH_LIBS([readline],[edit],[enable_readline=no],[enable_editline=no])
- READLINE_LIBS=$LIBS
- if test x"$LIBS" != "x"; then
- AC_DEFINE([HAVE_EDITLINE],1,Define to use BSD editline)
- else
- unset ac_cv_search_readline
- fi
- LIBS=$sLIBS
-fi
-if test x"$enable_readline" != xno ; then
- sLIBS=$LIBS
- LIBS=""
- AC_SEARCH_LIBS(tgetent, curses ncurses ncursesw, [], [])
- AC_SEARCH_LIBS(readline, readline, [], [enable_readline=no])
- AC_CHECK_FUNCS(readline, [], [])
- READLINE_LIBS=$LIBS
- LIBS=$sLIBS
-fi
+# Both are enabled by default. If, after command line processing both are
+# still enabled, the script searches for editline first and automatically
+# disables readline if it is found. So, to use readline explicitly, the
+# user must pass "--disable-editline". To disable command line editing
+# support altogether, "--disable-editline --disable-readline".
+#
+# When searching for either library, check for headers before libraries
+# as some distros supply packages that contain libraries but not header
+# files, which come as a separate development package.
+#
+AC_ARG_ENABLE(editline, [AS_HELP_STRING([--enable-editline],[use BSD libedit])])
+AC_ARG_ENABLE(readline, [AS_HELP_STRING([--enable-readline],[use readline])])
+
+AS_IF([ test x"$enable_editline" != xno ],[
+ AC_CHECK_HEADERS([editline/readline.h],[
+ sLIBS=$LIBS
+ LIBS=""
+ AC_SEARCH_LIBS([readline],[edit],[
+ AC_DEFINE([HAVE_EDITLINE],1,Define to use BSD editline)
+ READLINE_LIBS=$LIBS
+ enable_readline=no
+ ])
+ AS_UNSET(ac_cv_search_readline)
+ LIBS=$sLIBS
+ ])
+])
+
+AS_IF([ test x"$enable_readline" != xno ],[
+ AC_CHECK_HEADERS([readline/readline.h],[
+ sLIBS=$LIBS
+ LIBS=""
+ AC_SEARCH_LIBS(tgetent, termcap curses ncurses ncursesw, [], [])
+ AC_SEARCH_LIBS(readline,[readline edit], [
+ AC_DEFINE([HAVE_READLINE],1,Define to use readline or wrapper)
+ READLINE_LIBS=$LIBS
+ ])
+ LIBS=$sLIBS
+ ])
+])
+
AC_SUBST(READLINE_LIBS)
#-----------------------------------------------------------------------
@@ -76,6 +89,7 @@ THREADSAFE_FLAGS=-DSQLITE_THREADSAFE=0
if test x"$enable_threadsafe" != "xno"; then
THREADSAFE_FLAGS="-D_REENTRANT=1 -DSQLITE_THREADSAFE=1"
AC_SEARCH_LIBS(pthread_create, pthread)
+ AC_SEARCH_LIBS(pthread_mutexattr_init, pthread)
fi
AC_SUBST(THREADSAFE_FLAGS)
#-----------------------------------------------------------------------
@@ -102,7 +116,7 @@ AC_SUBST(DYNAMIC_EXTENSION_FLAGS)
AC_ARG_ENABLE(fts5, [AS_HELP_STRING(
[--enable-fts5], [include fts5 support [default=no]])],
[], [enable_fts5=no])
-if test x"$enable_fts5" == "xyes"; then
+if test x"$enable_fts5" = "xyes"; then
AC_SEARCH_LIBS(log, m)
FTS5_FLAGS=-DSQLITE_ENABLE_FTS5
fi
@@ -115,21 +129,33 @@ AC_SUBST(FTS5_FLAGS)
AC_ARG_ENABLE(json1, [AS_HELP_STRING(
[--enable-json1], [include json1 support [default=no]])],
[], [enable_json1=no])
-if test x"$enable_json1" == "xyes"; then
+if test x"$enable_json1" = "xyes"; then
JSON1_FLAGS=-DSQLITE_ENABLE_JSON1
fi
AC_SUBST(JSON1_FLAGS)
#-----------------------------------------------------------------------
#-----------------------------------------------------------------------
+# --enable-session
+#
+AC_ARG_ENABLE(session, [AS_HELP_STRING(
+ [--enable-session], [enable the session extension [default=no]])],
+ [], [enable_session=no])
+if test x"$enable_session" = "xyes"; then
+ SESSION_FLAGS="-DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_PREUPDATE_HOOK"
+fi
+AC_SUBST(SESSION_FLAGS)
+#-----------------------------------------------------------------------
+
+#-----------------------------------------------------------------------
# --enable-static-shell
#
AC_ARG_ENABLE(static-shell, [AS_HELP_STRING(
[--enable-static-shell],
[statically link libsqlite3 into shell tool [default=yes]])],
[], [enable_static_shell=yes])
-if test x"$enable_static_shell" == "xyes"; then
- EXTRA_SHELL_OBJ=sqlite3.$OBJEXT
+if test x"$enable_static_shell" = "xyes"; then
+ EXTRA_SHELL_OBJ=sqlite3-sqlite3.$OBJEXT
else
EXTRA_SHELL_OBJ=libsqlite3.la
fi
« no previous file with comments | « third_party/sqlite/src/autoconf/README.txt ('k') | third_party/sqlite/src/autoconf/tea/configure.ac » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698