2 #-----------------------------------------------------------------------
3 # Supports the following non-standard switches.
7 # --enable-dynamic-extensions
11 AC_INIT(sqlite, 3.7.0.1, http://www.sqlite.org)
12 AC_CONFIG_SRCDIR([sqlite3.c])
15 AM_INIT_AUTOMAKE([foreign])
19 # Check for required programs.
24 # Check for library functions that SQLite can optionally use.
25 AC_CHECK_FUNCS([fdatasync usleep fullfsync localtime_r gmtime_r])
27 AC_CONFIG_FILES([Makefile sqlite3.pc])
28 AC_SUBST(BUILD_CFLAGS)
30 #-----------------------------------------------------------------------
33 AC_ARG_ENABLE(readline, [AS_HELP_STRING(
35 [use readline in shell tool (yes, no) [default=yes]])],
36 [], [enable_readline=yes])
37 if test x"$enable_readline" != xno ; then
40 AC_SEARCH_LIBS(tgetent, curses, [], [])
41 AC_SEARCH_LIBS(readline, readline, [], [enable_readline=no])
42 AC_CHECK_FUNCS(readline, [], [])
46 AC_SUBST(READLINE_LIBS)
47 #-----------------------------------------------------------------------
49 #-----------------------------------------------------------------------
52 AC_ARG_ENABLE(threadsafe, [AS_HELP_STRING(
53 [--enable-threadsafe], [build a thread-safe library [default=yes]])],
54 [], [enable_threadsafe=yes])
55 THREADSAFE_FLAGS=-DSQLITE_THREADSAFE=0
56 if test x"$enable_threadsafe" != "xno"; then
57 THREADSAFE_FLAGS=-DSQLITE_THREADSAFE=1
58 AC_SEARCH_LIBS(pthread_create, pthread)
60 AC_SUBST(THREADSAFE_FLAGS)
61 #-----------------------------------------------------------------------
63 #-----------------------------------------------------------------------
64 # --enable-dynamic-extensions
66 AC_ARG_ENABLE(dynamic-extensions, [AS_HELP_STRING(
67 [--enable-dynamic-extensions], [support loadable extensions [default=yes]])],
68 [], [enable_dynamic_extensions=yes])
69 if test x"$enable_dynamic_extensions" != "xno"; then
70 AC_SEARCH_LIBS(dlopen, dl)
72 DYNAMIC_EXTENSION_FLAGS=-DSQLITE_OMIT_LOAD_EXTENSION=1
74 AC_MSG_CHECKING([for whether to support dynamic extensions])
75 AC_MSG_RESULT($enable_dynamic_extensions)
76 AC_SUBST(DYNAMIC_EXTENSION_FLAGS)
77 #-----------------------------------------------------------------------
79 #-----------------------------------------------------------------------
80 # UPDATE: Maybe it's better if users just set CFLAGS before invoking
81 # configure. This option doesn't really add much...
85 # AC_ARG_ENABLE(tempstore, [AS_HELP_STRING(
86 # [--enable-tempstore],
87 # [in-memory temporary tables (never, no, yes, always) [default=no]])],
88 # [], [enable_tempstore=no])
89 # AC_MSG_CHECKING([for whether or not to store temp tables in-memory])
90 # case "$enable_tempstore" in
91 # never ) TEMP_STORE=0 ;;
92 # no ) TEMP_STORE=1 ;;
93 # always ) TEMP_STORE=3 ;;
94 # yes ) TEMP_STORE=3 ;;
97 # enable_tempstore=yes
100 # AC_MSG_RESULT($enable_tempstore)
101 # AC_SUBST(TEMP_STORE)
102 #-----------------------------------------------------------------------