configure.ac revision 289166
1144513Simp 2144611Simp#----------------------------------------------------------------------- 3144611Simp# Supports the following non-standard switches. 4144611Simp# 5144611Simp# --enable-threadsafe 6144611Simp# --enable-readline 7144611Simp# --enable-dynamic-extensions 8144611Simp# 9144611Simp 10144611SimpAC_PREREQ(2.61) 11144611SimpAC_INIT(sqlite, 3.8.11.1, http://www.sqlite.org) 12144611SimpAC_CONFIG_SRCDIR([sqlite3.c]) 13144611Simp 14144611Simp# Use automake. 15144611SimpAM_INIT_AUTOMAKE([foreign]) 16144611Simp 17144611SimpAC_SYS_LARGEFILE 18144611Simp 19144611Simp# Check for required programs. 20144611SimpAC_PROG_CC 21144611SimpAC_PROG_RANLIB 22144611SimpAC_PROG_LIBTOOL 23144611SimpAC_PROG_MKDIR_P 24144611Simp 25144611Simp# Check for library functions that SQLite can optionally use. 26144513SimpAC_CHECK_FUNCS([fdatasync usleep fullfsync localtime_r gmtime_r]) 27144513SimpAC_FUNC_STRERROR_R 28144611Simp 29144611SimpAC_CONFIG_FILES([Makefile sqlite3.pc]) 30144611SimpAC_SUBST(BUILD_CFLAGS) 31144513Simp 32144611Simp#----------------------------------------------------------------------- 33144611Simp# --enable-readline 34144611Simp# 35144611SimpAC_ARG_ENABLE(readline, [AS_HELP_STRING( 36144611Simp [--enable-readline], 37144611Simp [use readline in shell tool (yes, no) [default=yes]])], 38144611Simp [], [enable_readline=yes]) 39144611Simpif test x"$enable_readline" != xno ; then 40144611Simp sLIBS=$LIBS 41161129Simp LIBS="" 42228027Smarius AC_SEARCH_LIBS(tgetent, curses ncurses ncursesw, [], []) 43161129Simp AC_SEARCH_LIBS(readline, readline, [], [enable_readline=no]) 44228027Smarius AC_CHECK_FUNCS(readline, [], []) 45228027Smarius READLINE_LIBS=$LIBS 46161129Simp LIBS=$sLIBS 47208349Smariusfi 48208349SmariusAC_SUBST(READLINE_LIBS) 49208349Smarius#----------------------------------------------------------------------- 50161129Simp 51144611Simp#----------------------------------------------------------------------- 52# --enable-threadsafe 53# 54AC_ARG_ENABLE(threadsafe, [AS_HELP_STRING( 55 [--enable-threadsafe], [build a thread-safe library [default=yes]])], 56 [], [enable_threadsafe=yes]) 57THREADSAFE_FLAGS=-DSQLITE_THREADSAFE=0 58if test x"$enable_threadsafe" != "xno"; then 59 THREADSAFE_FLAGS="-D_REENTRANT=1 -DSQLITE_THREADSAFE=1" 60 AC_SEARCH_LIBS(pthread_create, pthread) 61fi 62AC_SUBST(THREADSAFE_FLAGS) 63#----------------------------------------------------------------------- 64 65#----------------------------------------------------------------------- 66# --enable-dynamic-extensions 67# 68AC_ARG_ENABLE(dynamic-extensions, [AS_HELP_STRING( 69 [--enable-dynamic-extensions], [support loadable extensions [default=yes]])], 70 [], [enable_dynamic_extensions=yes]) 71if test x"$enable_dynamic_extensions" != "xno"; then 72 AC_SEARCH_LIBS(dlopen, dl) 73else 74 DYNAMIC_EXTENSION_FLAGS=-DSQLITE_OMIT_LOAD_EXTENSION=1 75fi 76AC_MSG_CHECKING([for whether to support dynamic extensions]) 77AC_MSG_RESULT($enable_dynamic_extensions) 78AC_SUBST(DYNAMIC_EXTENSION_FLAGS) 79#----------------------------------------------------------------------- 80 81AC_CHECK_FUNCS(posix_fallocate) 82 83#----------------------------------------------------------------------- 84# UPDATE: Maybe it's better if users just set CFLAGS before invoking 85# configure. This option doesn't really add much... 86# 87# --enable-tempstore 88# 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 ;; 99# * ) 100# TEMP_STORE=1 101# enable_tempstore=yes 102# ;; 103# esac 104# AC_MSG_RESULT($enable_tempstore) 105# AC_SUBST(TEMP_STORE) 106#----------------------------------------------------------------------- 107 108AC_OUTPUT 109