OLD | NEW |
| (Empty) |
1 | |
2 #----------------------------------------------------------------------- | |
3 # Supports the following non-standard switches. | |
4 # | |
5 # --enable-threadsafe | |
6 # --enable-readline | |
7 # --enable-editline | |
8 # --enable-static-shell | |
9 # --enable-dynamic-extensions | |
10 # | |
11 | |
12 AC_PREREQ(2.61) | |
13 AC_INIT(sqlite, --SQLITE-VERSION--, http://www.sqlite.org) | |
14 AC_CONFIG_SRCDIR([sqlite3.c]) | |
15 | |
16 # Use automake. | |
17 AM_INIT_AUTOMAKE([foreign]) | |
18 | |
19 AC_SYS_LARGEFILE | |
20 | |
21 # Check for required programs. | |
22 AC_PROG_CC | |
23 AC_PROG_LIBTOOL | |
24 AC_PROG_MKDIR_P | |
25 | |
26 # Check for library functions that SQLite can optionally use. | |
27 AC_CHECK_FUNCS([fdatasync usleep fullfsync localtime_r gmtime_r]) | |
28 AC_FUNC_STRERROR_R | |
29 | |
30 AC_CONFIG_FILES([Makefile sqlite3.pc]) | |
31 AC_SUBST(BUILD_CFLAGS) | |
32 | |
33 #----------------------------------------------------------------------- | |
34 # --enable-editline | |
35 # --enable-readline | |
36 # | |
37 AC_ARG_ENABLE(editline, [AS_HELP_STRING( | |
38 [--enable-editline], | |
39 [use BSD libedit])], | |
40 [], [enable_editline=yes]) | |
41 AC_ARG_ENABLE(readline, [AS_HELP_STRING( | |
42 [--enable-readline], | |
43 [use readline])], | |
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 | |
57 if test x"$enable_readline" != xno ; then | |
58 sLIBS=$LIBS | |
59 LIBS="" | |
60 AC_SEARCH_LIBS(tgetent, curses ncurses ncursesw, [], []) | |
61 AC_SEARCH_LIBS(readline, readline, [], [enable_readline=no]) | |
62 AC_CHECK_FUNCS(readline, [], []) | |
63 READLINE_LIBS=$LIBS | |
64 LIBS=$sLIBS | |
65 fi | |
66 AC_SUBST(READLINE_LIBS) | |
67 #----------------------------------------------------------------------- | |
68 | |
69 #----------------------------------------------------------------------- | |
70 # --enable-threadsafe | |
71 # | |
72 AC_ARG_ENABLE(threadsafe, [AS_HELP_STRING( | |
73 [--enable-threadsafe], [build a thread-safe library [default=yes]])], | |
74 [], [enable_threadsafe=yes]) | |
75 THREADSAFE_FLAGS=-DSQLITE_THREADSAFE=0 | |
76 if test x"$enable_threadsafe" != "xno"; then | |
77 THREADSAFE_FLAGS="-D_REENTRANT=1 -DSQLITE_THREADSAFE=1" | |
78 AC_SEARCH_LIBS(pthread_create, pthread) | |
79 fi | |
80 AC_SUBST(THREADSAFE_FLAGS) | |
81 #----------------------------------------------------------------------- | |
82 | |
83 #----------------------------------------------------------------------- | |
84 # --enable-dynamic-extensions | |
85 # | |
86 AC_ARG_ENABLE(dynamic-extensions, [AS_HELP_STRING( | |
87 [--enable-dynamic-extensions], [support loadable extensions [default=yes]])], | |
88 [], [enable_dynamic_extensions=yes]) | |
89 if test x"$enable_dynamic_extensions" != "xno"; then | |
90 AC_SEARCH_LIBS(dlopen, dl) | |
91 else | |
92 DYNAMIC_EXTENSION_FLAGS=-DSQLITE_OMIT_LOAD_EXTENSION=1 | |
93 fi | |
94 AC_MSG_CHECKING([for whether to support dynamic extensions]) | |
95 AC_MSG_RESULT($enable_dynamic_extensions) | |
96 AC_SUBST(DYNAMIC_EXTENSION_FLAGS) | |
97 #----------------------------------------------------------------------- | |
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 | |
139 AC_CHECK_FUNCS(posix_fallocate) | |
140 | |
141 #----------------------------------------------------------------------- | |
142 # UPDATE: Maybe it's better if users just set CFLAGS before invoking | |
143 # configure. This option doesn't really add much... | |
144 # | |
145 # --enable-tempstore | |
146 # | |
147 # AC_ARG_ENABLE(tempstore, [AS_HELP_STRING( | |
148 # [--enable-tempstore], | |
149 # [in-memory temporary tables (never, no, yes, always) [default=no]])], | |
150 # [], [enable_tempstore=no]) | |
151 # AC_MSG_CHECKING([for whether or not to store temp tables in-memory]) | |
152 # case "$enable_tempstore" in | |
153 # never ) TEMP_STORE=0 ;; | |
154 # no ) TEMP_STORE=1 ;; | |
155 # always ) TEMP_STORE=3 ;; | |
156 # yes ) TEMP_STORE=3 ;; | |
157 # * ) | |
158 # TEMP_STORE=1 | |
159 # enable_tempstore=yes | |
160 # ;; | |
161 # esac | |
162 # AC_MSG_RESULT($enable_tempstore) | |
163 # AC_SUBST(TEMP_STORE) | |
164 #----------------------------------------------------------------------- | |
165 | |
166 AC_OUTPUT | |
OLD | NEW |