2 #-----------------------------------------------------------------------
3 # Supports the following non-standard switches.
7 # --enable-dynamic-extensions
11 AC_INIT(sqlite, 3.7.5, http://www.sqlite.org)
12 AC_CONFIG_SRCDIR([sqlite3.c])
15 AM_INIT_AUTOMAKE([foreign])
19 # Check for required programs.
25 # Check for library functions that SQLite can optionally use.
26 AC_CHECK_FUNCS([fdatasync usleep fullfsync localtime_r gmtime_r])
29 AC_CONFIG_FILES([Makefile sqlite3.pc])
30 AC_SUBST(BUILD_CFLAGS)
32 #-----------------------------------------------------------------------
35 AC_ARG_ENABLE(readline, [AS_HELP_STRING(
37 [use readline in shell tool (yes, no) [default=yes]])],
38 [], [enable_readline=yes])
39 if test x"$enable_readline" != xno ; then
42 AC_SEARCH_LIBS(tgetent, curses ncurses ncursesw, [], [])
43 AC_SEARCH_LIBS(readline, readline, [], [enable_readline=no])
44 AC_CHECK_FUNCS(readline, [], [])
48 AC_SUBST(READLINE_LIBS)
49 #-----------------------------------------------------------------------
51 #-----------------------------------------------------------------------
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)
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...
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 ;;
101 # enable_tempstore=yes
104 # AC_MSG_RESULT($enable_tempstore)
105 # AC_SUBST(TEMP_STORE)
106 #-----------------------------------------------------------------------