]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/sqlite/lib/contrib/configure.ac
52f3dcfc47808337fc7f99811f1e50aaad9029a7
[l4.git] / l4 / pkg / sqlite / lib / contrib / configure.ac
1
2 #-----------------------------------------------------------------------
3 # Supports the following non-standard switches.
4 #
5 #   --enable-threadsafe
6 #   --enable-readline
7 #   --enable-dynamic-extensions
8 #
9
10 AC_PREREQ(2.61)
11 AC_INIT(sqlite, 3.7.4, http://www.sqlite.org)
12 AC_CONFIG_SRCDIR([sqlite3.c])
13
14 # Use automake.
15 AM_INIT_AUTOMAKE([foreign])
16
17 AC_SYS_LARGEFILE
18
19 # Check for required programs.
20 AC_PROG_CC
21 AC_PROG_RANLIB
22 AC_PROG_LIBTOOL
23
24 # Check for library functions that SQLite can optionally use.
25 AC_CHECK_FUNCS([fdatasync usleep fullfsync localtime_r gmtime_r])
26
27 AC_CONFIG_FILES([Makefile sqlite3.pc])
28 AC_SUBST(BUILD_CFLAGS)
29
30 #-----------------------------------------------------------------------
31 #   --enable-readline
32 #
33 AC_ARG_ENABLE(readline, [AS_HELP_STRING(
34   [--enable-readline], 
35   [use readline in shell tool (yes, no) [default=yes]])], 
36   [], [enable_readline=yes])
37 if test x"$enable_readline" != xno ; then
38   sLIBS=$LIBS
39   LIBS=""
40   AC_SEARCH_LIBS(tgetent, curses ncurses ncursesw, [], [])
41   AC_SEARCH_LIBS(readline, readline, [], [enable_readline=no])
42   AC_CHECK_FUNCS(readline, [], [])
43   READLINE_LIBS=$LIBS
44   LIBS=$sLIBS
45 fi
46 AC_SUBST(READLINE_LIBS)
47 #-----------------------------------------------------------------------
48
49 #-----------------------------------------------------------------------
50 #   --enable-threadsafe
51 #
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)
59 fi
60 AC_SUBST(THREADSAFE_FLAGS)
61 #-----------------------------------------------------------------------
62
63 #-----------------------------------------------------------------------
64 #   --enable-dynamic-extensions
65 #
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)
71 else
72   DYNAMIC_EXTENSION_FLAGS=-DSQLITE_OMIT_LOAD_EXTENSION=1
73 fi
74 AC_MSG_CHECKING([for whether to support dynamic extensions])
75 AC_MSG_RESULT($enable_dynamic_extensions)
76 AC_SUBST(DYNAMIC_EXTENSION_FLAGS)
77 #-----------------------------------------------------------------------
78
79 #-----------------------------------------------------------------------
80 # UPDATE: Maybe it's better if users just set CFLAGS before invoking
81 # configure. This option doesn't really add much...
82 #
83 #   --enable-tempstore
84 #
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 ;;
95 #   * )
96 #     TEMP_STORE=1
97 #     enable_tempstore=yes
98 #   ;;
99 # esac
100 # AC_MSG_RESULT($enable_tempstore)
101 # AC_SUBST(TEMP_STORE)
102 #-----------------------------------------------------------------------
103
104 AC_OUTPUT