Update mojo sdk to rev 1dc8a9a5db73d3718d99917fadf31f5fb2ebad4f
[chromium-blink-merge.git] / third_party / sqlite / src / autoconf / configure.ac
blob46b6563edca3742643298f873ef40585f3d6edd4
2 #-----------------------------------------------------------------------
3 # Supports the following non-standard switches.
5 #   --enable-threadsafe
6 #   --enable-readline
7 #   --enable-dynamic-extensions
10 AC_PREREQ(2.61)
11 AC_INIT(sqlite, 3.7.5, http://www.sqlite.org)
12 AC_CONFIG_SRCDIR([sqlite3.c])
14 # Use automake.
15 AM_INIT_AUTOMAKE([foreign])
17 AC_SYS_LARGEFILE
19 # Check for required programs.
20 AC_PROG_CC
21 AC_PROG_RANLIB
22 AC_PROG_LIBTOOL
23 AC_PROG_MKDIR_P
25 # Check for library functions that SQLite can optionally use.
26 AC_CHECK_FUNCS([fdatasync usleep fullfsync localtime_r gmtime_r])
27 AC_FUNC_STRERROR_R
29 AC_CONFIG_FILES([Makefile sqlite3.pc])
30 AC_SUBST(BUILD_CFLAGS)
32 #-----------------------------------------------------------------------
33 #   --enable-readline
35 AC_ARG_ENABLE(readline, [AS_HELP_STRING(
36   [--enable-readline], 
37   [use readline in shell tool (yes, no) [default=yes]])], 
38   [], [enable_readline=yes])
39 if test x"$enable_readline" != xno ; then
40   sLIBS=$LIBS
41   LIBS=""
42   AC_SEARCH_LIBS(tgetent, curses ncurses ncursesw, [], [])
43   AC_SEARCH_LIBS(readline, readline, [], [enable_readline=no])
44   AC_CHECK_FUNCS(readline, [], [])
45   READLINE_LIBS=$LIBS
46   LIBS=$sLIBS
48 AC_SUBST(READLINE_LIBS)
49 #-----------------------------------------------------------------------
51 #-----------------------------------------------------------------------
52 #   --enable-threadsafe
54 AC_ARG_ENABLE(threadsafe, [AS_HELP_STRING(
55   [--enable-threadsafe], [build a thread-safe library [default=yes]])], 
56   [], [enable_threadsafe=yes])
57 THREADSAFE_FLAGS=-DSQLITE_THREADSAFE=0
58 if test x"$enable_threadsafe" != "xno"; then
59   THREADSAFE_FLAGS="-D_REENTRANT=1 -DSQLITE_THREADSAFE=1"
60   AC_SEARCH_LIBS(pthread_create, pthread)
62 AC_SUBST(THREADSAFE_FLAGS)
63 #-----------------------------------------------------------------------
65 #-----------------------------------------------------------------------
66 #   --enable-dynamic-extensions
68 AC_ARG_ENABLE(dynamic-extensions, [AS_HELP_STRING(
69   [--enable-dynamic-extensions], [support loadable extensions [default=yes]])], 
70   [], [enable_dynamic_extensions=yes])
71 if test x"$enable_dynamic_extensions" != "xno"; then
72   AC_SEARCH_LIBS(dlopen, dl)
73 else
74   DYNAMIC_EXTENSION_FLAGS=-DSQLITE_OMIT_LOAD_EXTENSION=1
76 AC_MSG_CHECKING([for whether to support dynamic extensions])
77 AC_MSG_RESULT($enable_dynamic_extensions)
78 AC_SUBST(DYNAMIC_EXTENSION_FLAGS)
79 #-----------------------------------------------------------------------
81 AC_CHECK_FUNCS(posix_fallocate)
83 #-----------------------------------------------------------------------
84 # UPDATE: Maybe it's better if users just set CFLAGS before invoking
85 # configure. This option doesn't really add much...
87 #   --enable-tempstore
89 # AC_ARG_ENABLE(tempstore, [AS_HELP_STRING(
90 #   [--enable-tempstore], 
91 #   [in-memory temporary tables (never, no, yes, always) [default=no]])], 
92 #   [], [enable_tempstore=no])
93 # AC_MSG_CHECKING([for whether or not to store temp tables in-memory])
94 # case "$enable_tempstore" in
95 #   never )  TEMP_STORE=0 ;;
96 #   no )     TEMP_STORE=1 ;;
97 #   always ) TEMP_STORE=3 ;;
98 #   yes )    TEMP_STORE=3 ;;
99 #   * )
100 #     TEMP_STORE=1
101 #     enable_tempstore=yes
102 #   ;;
103 # esac
104 # AC_MSG_RESULT($enable_tempstore)
105 # AC_SUBST(TEMP_STORE)
106 #-----------------------------------------------------------------------
108 AC_OUTPUT