OLD | NEW |
1 | 1 |
2 #----------------------------------------------------------------------- | 2 #----------------------------------------------------------------------- |
3 # Supports the following non-standard switches. | 3 # Supports the following non-standard switches. |
4 # | 4 # |
5 # --enable-threadsafe | 5 # --enable-threadsafe |
6 # --enable-readline | 6 # --enable-readline |
| 7 # --enable-editline |
| 8 # --enable-static-shell |
7 # --enable-dynamic-extensions | 9 # --enable-dynamic-extensions |
8 # | 10 # |
9 | 11 |
10 AC_PREREQ(2.61) | 12 AC_PREREQ(2.61) |
11 AC_INIT(sqlite, 3.7.5, http://www.sqlite.org) | 13 AC_INIT(sqlite, --SQLITE-VERSION--, http://www.sqlite.org) |
12 AC_CONFIG_SRCDIR([sqlite3.c]) | 14 AC_CONFIG_SRCDIR([sqlite3.c]) |
13 | 15 |
14 # Use automake. | 16 # Use automake. |
15 AM_INIT_AUTOMAKE([foreign]) | 17 AM_INIT_AUTOMAKE([foreign]) |
16 | 18 |
17 AC_SYS_LARGEFILE | 19 AC_SYS_LARGEFILE |
18 | 20 |
19 # Check for required programs. | 21 # Check for required programs. |
20 AC_PROG_CC | 22 AC_PROG_CC |
21 AC_PROG_RANLIB | |
22 AC_PROG_LIBTOOL | 23 AC_PROG_LIBTOOL |
23 AC_PROG_MKDIR_P | 24 AC_PROG_MKDIR_P |
24 | 25 |
25 # Check for library functions that SQLite can optionally use. | 26 # Check for library functions that SQLite can optionally use. |
26 AC_CHECK_FUNCS([fdatasync usleep fullfsync localtime_r gmtime_r]) | 27 AC_CHECK_FUNCS([fdatasync usleep fullfsync localtime_r gmtime_r]) |
27 AC_FUNC_STRERROR_R | 28 AC_FUNC_STRERROR_R |
28 | 29 |
29 AC_CONFIG_FILES([Makefile sqlite3.pc]) | 30 AC_CONFIG_FILES([Makefile sqlite3.pc]) |
30 AC_SUBST(BUILD_CFLAGS) | 31 AC_SUBST(BUILD_CFLAGS) |
31 | 32 |
32 #----------------------------------------------------------------------- | 33 #----------------------------------------------------------------------- |
| 34 # --enable-editline |
33 # --enable-readline | 35 # --enable-readline |
34 # | 36 # |
| 37 AC_ARG_ENABLE(editline, [AS_HELP_STRING( |
| 38 [--enable-editline], |
| 39 [use BSD libedit])], |
| 40 [], [enable_editline=yes]) |
35 AC_ARG_ENABLE(readline, [AS_HELP_STRING( | 41 AC_ARG_ENABLE(readline, [AS_HELP_STRING( |
36 [--enable-readline], | 42 [--enable-readline], |
37 [use readline in shell tool (yes, no) [default=yes]])], | 43 [use readline])], |
38 [], [enable_readline=yes]) | 44 [], [enable_readline=no]) |
| 45 if test x"$enable_editline" != xno ; then |
| 46 sLIBS=$LIBS |
| 47 LIBS="" |
| 48 AC_SEARCH_LIBS([readline],[edit],[enable_readline=no],[enable_editline=no]) |
| 49 READLINE_LIBS=$LIBS |
| 50 if test x"$LIBS" != "x"; then |
| 51 AC_DEFINE([HAVE_EDITLINE],1,Define to use BSD editline) |
| 52 else |
| 53 unset ac_cv_search_readline |
| 54 fi |
| 55 LIBS=$sLIBS |
| 56 fi |
39 if test x"$enable_readline" != xno ; then | 57 if test x"$enable_readline" != xno ; then |
40 sLIBS=$LIBS | 58 sLIBS=$LIBS |
41 LIBS="" | 59 LIBS="" |
42 AC_SEARCH_LIBS(tgetent, curses ncurses ncursesw, [], []) | 60 AC_SEARCH_LIBS(tgetent, curses ncurses ncursesw, [], []) |
43 AC_SEARCH_LIBS(readline, readline, [], [enable_readline=no]) | 61 AC_SEARCH_LIBS(readline, readline, [], [enable_readline=no]) |
44 AC_CHECK_FUNCS(readline, [], []) | 62 AC_CHECK_FUNCS(readline, [], []) |
45 READLINE_LIBS=$LIBS | 63 READLINE_LIBS=$LIBS |
46 LIBS=$sLIBS | 64 LIBS=$sLIBS |
47 fi | 65 fi |
48 AC_SUBST(READLINE_LIBS) | 66 AC_SUBST(READLINE_LIBS) |
(...skipping 22 matching lines...) Expand all Loading... |
71 if test x"$enable_dynamic_extensions" != "xno"; then | 89 if test x"$enable_dynamic_extensions" != "xno"; then |
72 AC_SEARCH_LIBS(dlopen, dl) | 90 AC_SEARCH_LIBS(dlopen, dl) |
73 else | 91 else |
74 DYNAMIC_EXTENSION_FLAGS=-DSQLITE_OMIT_LOAD_EXTENSION=1 | 92 DYNAMIC_EXTENSION_FLAGS=-DSQLITE_OMIT_LOAD_EXTENSION=1 |
75 fi | 93 fi |
76 AC_MSG_CHECKING([for whether to support dynamic extensions]) | 94 AC_MSG_CHECKING([for whether to support dynamic extensions]) |
77 AC_MSG_RESULT($enable_dynamic_extensions) | 95 AC_MSG_RESULT($enable_dynamic_extensions) |
78 AC_SUBST(DYNAMIC_EXTENSION_FLAGS) | 96 AC_SUBST(DYNAMIC_EXTENSION_FLAGS) |
79 #----------------------------------------------------------------------- | 97 #----------------------------------------------------------------------- |
80 | 98 |
| 99 #----------------------------------------------------------------------- |
| 100 # --enable-fts5 |
| 101 # |
| 102 AC_ARG_ENABLE(fts5, [AS_HELP_STRING( |
| 103 [--enable-fts5], [include fts5 support [default=no]])], |
| 104 [], [enable_fts5=no]) |
| 105 if test x"$enable_fts5" == "xyes"; then |
| 106 AC_SEARCH_LIBS(log, m) |
| 107 FTS5_FLAGS=-DSQLITE_ENABLE_FTS5 |
| 108 fi |
| 109 AC_SUBST(FTS5_FLAGS) |
| 110 #----------------------------------------------------------------------- |
| 111 |
| 112 #----------------------------------------------------------------------- |
| 113 # --enable-json1 |
| 114 # |
| 115 AC_ARG_ENABLE(json1, [AS_HELP_STRING( |
| 116 [--enable-json1], [include json1 support [default=no]])], |
| 117 [], [enable_json1=no]) |
| 118 if test x"$enable_json1" == "xyes"; then |
| 119 JSON1_FLAGS=-DSQLITE_ENABLE_JSON1 |
| 120 fi |
| 121 AC_SUBST(JSON1_FLAGS) |
| 122 #----------------------------------------------------------------------- |
| 123 |
| 124 #----------------------------------------------------------------------- |
| 125 # --enable-static-shell |
| 126 # |
| 127 AC_ARG_ENABLE(static-shell, [AS_HELP_STRING( |
| 128 [--enable-static-shell], |
| 129 [statically link libsqlite3 into shell tool [default=yes]])], |
| 130 [], [enable_static_shell=yes]) |
| 131 if test x"$enable_static_shell" == "xyes"; then |
| 132 EXTRA_SHELL_OBJ=sqlite3.$OBJEXT |
| 133 else |
| 134 EXTRA_SHELL_OBJ=libsqlite3.la |
| 135 fi |
| 136 AC_SUBST(EXTRA_SHELL_OBJ) |
| 137 #----------------------------------------------------------------------- |
| 138 |
81 AC_CHECK_FUNCS(posix_fallocate) | 139 AC_CHECK_FUNCS(posix_fallocate) |
82 | 140 |
83 #----------------------------------------------------------------------- | 141 #----------------------------------------------------------------------- |
84 # UPDATE: Maybe it's better if users just set CFLAGS before invoking | 142 # UPDATE: Maybe it's better if users just set CFLAGS before invoking |
85 # configure. This option doesn't really add much... | 143 # configure. This option doesn't really add much... |
86 # | 144 # |
87 # --enable-tempstore | 145 # --enable-tempstore |
88 # | 146 # |
89 # AC_ARG_ENABLE(tempstore, [AS_HELP_STRING( | 147 # AC_ARG_ENABLE(tempstore, [AS_HELP_STRING( |
90 # [--enable-tempstore], | 148 # [--enable-tempstore], |
91 # [in-memory temporary tables (never, no, yes, always) [default=no]])], | 149 # [in-memory temporary tables (never, no, yes, always) [default=no]])], |
92 # [], [enable_tempstore=no]) | 150 # [], [enable_tempstore=no]) |
93 # AC_MSG_CHECKING([for whether or not to store temp tables in-memory]) | 151 # AC_MSG_CHECKING([for whether or not to store temp tables in-memory]) |
94 # case "$enable_tempstore" in | 152 # case "$enable_tempstore" in |
95 # never ) TEMP_STORE=0 ;; | 153 # never ) TEMP_STORE=0 ;; |
96 # no ) TEMP_STORE=1 ;; | 154 # no ) TEMP_STORE=1 ;; |
97 # always ) TEMP_STORE=3 ;; | 155 # always ) TEMP_STORE=3 ;; |
98 # yes ) TEMP_STORE=3 ;; | 156 # yes ) TEMP_STORE=3 ;; |
99 # * ) | 157 # * ) |
100 # TEMP_STORE=1 | 158 # TEMP_STORE=1 |
101 # enable_tempstore=yes | 159 # enable_tempstore=yes |
102 # ;; | 160 # ;; |
103 # esac | 161 # esac |
104 # AC_MSG_RESULT($enable_tempstore) | 162 # AC_MSG_RESULT($enable_tempstore) |
105 # AC_SUBST(TEMP_STORE) | 163 # AC_SUBST(TEMP_STORE) |
106 #----------------------------------------------------------------------- | 164 #----------------------------------------------------------------------- |
107 | 165 |
108 AC_OUTPUT | 166 AC_OUTPUT |
OLD | NEW |