2 # The build process allows for using a cross-compiler. But the default
3 # action is to target the same platform that we are running on. The
4 # configure script needs to discover the following properties of the
5 # build and target systems:
9 # The is the name of the directory that contains the
10 # "configure" shell script. All source files are
11 # located relative to this directory.
15 # The name of the directory where executables should be
16 # written by the "install" target of the makefile.
20 # Add this prefix to the names of all executables that run
21 # on the target machine. Default: ""
25 # True if shared libraries should be generated.
29 # The name of a command that is used to convert C
30 # source files into executables that run on the build
35 # Switches that the build compiler needs in order to construct
36 # command-line programs.
40 # Libraries that the build compiler needs in order to construct
41 # command-line programs.
45 # The filename extension for executables on the build
46 # platform. "" for Unix and ".exe" for Windows.
50 # Lots of values are read in from the tclConfig.sh script,
51 # if that script is available. This values are used for
52 # constructing and installing the TCL extension.
54 # TARGET_READLINE_LIBS
56 # This is the library directives passed to the target linker
57 # that cause the executable to link against the readline library.
58 # This might be a switch like "-lreadline" or pathnames of library
59 # file like "../../src/libreadline.a".
63 # This variables define the directory that contain header
64 # files for the readline library. If the compiler is able
65 # to find <readline.h> on its own, then this can be blank.
69 # The filename extension for executables on the
70 # target platform. "" for Unix and ".exe" for windows.
72 # This configure.in file is easy to reuse on other projects. Just
73 # change the argument to AC_INIT(). And disable any features that
74 # you don't need (for example BLT) by erasing or commenting out
75 # the corresponding code.
77 AC_INIT(sqlite, m4_esyscmd([cat VERSION | tr -d '\n']))
79 dnl Make sure the local VERSION file matches this configure script
80 sqlite_version_sanity_check=`cat $srcdir/VERSION | tr -d '\n'`
81 if test "$PACKAGE_VERSION" != "$sqlite_version_sanity_check" ; then
82 AC_MSG_ERROR([configure script is out of date:
83 configure \$PACKAGE_VERSION = $PACKAGE_VERSION
84 top level VERSION file = $sqlite_version_sanity_check
85 please regen with autoconf])
95 # Enable large file support (if special flags are necessary)
100 # Check for needed/wanted data types
101 AC_CHECK_TYPES([int8_t, int16_t, int32_t, int64_t, intptr_t, uint8_t,
102 uint16_t, uint32_t, uint64_t, uintptr_t])
105 # Check for needed/wanted headers
106 AC_CHECK_HEADERS([sys/types.h stdlib.h stdint.h inttypes.h malloc.h])
109 # Figure out whether or not we have these functions
111 AC_CHECK_FUNCS([fdatasync gmtime_r isnan localtime_r localtime_s malloc_usable_size strchrnul usleep utime pread pread64 pwrite pwrite64])
114 # By default, we use the amalgamation (this may be changed below...)
119 # See whether we can run specific tclsh versions known to work well;
120 # if not, then we fall back to plain tclsh.
121 # TODO: try other versions before falling back?
123 AC_CHECK_PROGS(TCLSH_CMD, [tclsh8.7 tclsh8.6 tclsh8.5 tclsh], none)
124 if test "$TCLSH_CMD" = "none"; then
125 # If we can't find a local tclsh, then building the amalgamation will fail.
126 # We act as though --disable-amalgamation has been used.
127 echo "Warning: can't find tclsh - defaulting to non-amalgamation build."
133 AC_ARG_VAR([TCLLIBDIR], [Where to install tcl plugin])
134 if test "x${TCLLIBDIR+set}" != "xset" ; then
135 TCLLIBDIR='$(libdir)'
136 for i in `echo 'puts stdout $auto_path' | ${TCLSH_CMD}` ; do
142 TCLLIBDIR="${TCLLIBDIR}/sqlite3"
147 # Set up an appropriate program prefix
149 if test "$program_prefix" = "NONE"; then
152 AC_SUBST(program_prefix)
154 VERSION=[`cat $srcdir/VERSION | sed 's/^\([0-9]*\.*[0-9]*\).*/\1/'`]
155 AC_MSG_NOTICE(Version set to $VERSION)
157 RELEASE=`cat $srcdir/VERSION`
158 AC_MSG_NOTICE(Release set to $RELEASE)
162 # Locate a compiler for the build machine. This compiler should
163 # generate command-line programs that run on the build machine.
165 if test x"$cross_compiling" = xno; then
169 if test "${BUILD_CC+set}" != set; then
170 AC_CHECK_PROGS(BUILD_CC, gcc cc cl)
172 if test "${BUILD_CFLAGS+set}" != set; then
179 # Do we want to support multithreaded use of sqlite
181 AC_ARG_ENABLE(threadsafe,
182 AC_HELP_STRING([--disable-threadsafe],[Disable mutexing]))
183 AC_MSG_CHECKING([whether to support threadsafe operation])
184 if test "$enable_threadsafe" = "no"; then
191 AC_SUBST(SQLITE_THREADSAFE)
193 if test "$SQLITE_THREADSAFE" = "1"; then
194 AC_SEARCH_LIBS(pthread_create, pthread)
195 AC_SEARCH_LIBS(pthread_mutexattr_init, pthread)
199 # Do we want to support release
201 AC_ARG_ENABLE(releasemode,
202 AC_HELP_STRING([--enable-releasemode],[Support libtool link to release mode]),,enable_releasemode=no)
203 AC_MSG_CHECKING([whether to support shared library linked as release mode or not])
204 if test "$enable_releasemode" = "no"; then
208 ALLOWRELEASE="-release `cat $srcdir/VERSION`"
211 AC_SUBST(ALLOWRELEASE)
214 # Do we want temporary databases in memory
216 AC_ARG_ENABLE(tempstore,
217 AC_HELP_STRING([--enable-tempstore],[Use an in-ram database for temporary tables (never,no,yes,always)]),,enable_tempstore=no)
218 AC_MSG_CHECKING([whether to use an in-ram database for temporary tables])
219 case "$enable_tempstore" in
222 AC_MSG_RESULT([never])
234 AC_MSG_RESULT([always])
245 # Lots of things are different if we are compiling for Windows using
246 # the CYGWIN environment. So check for that special case and handle
247 # things accordingly.
249 AC_MSG_CHECKING([if executables have the .exe suffix])
250 if test "$config_BUILD_EXEEXT" = ".exe"; then
254 AC_MSG_RESULT(unknown)
256 if test "$CYGWIN" != "yes"; then
259 if test "$CYGWIN" = "yes"; then
264 if test x"$cross_compiling" = xno; then
265 TARGET_EXEEXT=$BUILD_EXEEXT
267 TARGET_EXEEXT=$config_TARGET_EXEEXT
269 if test "$TARGET_EXEEXT" = ".exe"; then
272 CFLAGS="$CFLAGS -DSQLITE_OS_WIN=1"
276 CFLAGS="$CFLAGS -DSQLITE_OS_UNIX=1"
279 AC_SUBST(BUILD_EXEEXT)
280 AC_SUBST(SQLITE_OS_UNIX)
281 AC_SUBST(SQLITE_OS_WIN)
282 AC_SUBST(TARGET_EXEEXT)
285 # Figure out all the parameters needed to compile against Tcl.
287 # This code is derived from the SC_PATH_TCLCONFIG and SC_LOAD_TCLCONFIG
288 # macros in the in the tcl.m4 file of the standard TCL distribution.
289 # Those macros could not be used directly since we have to make some
290 # minor changes to accomodate systems that do not have TCL installed.
292 AC_ARG_ENABLE(tcl, AC_HELP_STRING([--disable-tcl],[do not build TCL extension]),
293 [use_tcl=$enableval],[use_tcl=yes])
294 if test "${use_tcl}" = "yes" ; then
295 AC_ARG_WITH(tcl, AC_HELP_STRING([--with-tcl=DIR],[directory containing tcl configuration (tclConfig.sh)]), with_tclconfig=${withval})
296 AC_MSG_CHECKING([for Tcl configuration])
297 AC_CACHE_VAL(ac_cv_c_tclconfig,[
298 # First check to see if --with-tcl was specified.
299 if test x"${with_tclconfig}" != x ; then
300 if test -f "${with_tclconfig}/tclConfig.sh" ; then
301 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
303 AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh])
307 # Start autosearch by asking tclsh
308 if test x"${ac_cv_c_tclconfig}" = x ; then
309 if test x"$cross_compiling" = xno; then
310 for i in `echo 'puts stdout $auto_path' | ${TCLSH_CMD}`
312 if test -f "$i/tclConfig.sh" ; then
313 ac_cv_c_tclconfig="$i"
320 # On ubuntu 14.10, $auto_path on tclsh is not quite correct.
321 # So try again after applying corrections.
322 if test x"${ac_cv_c_tclconfig}" = x ; then
323 if test x"$cross_compiling" = xno; then
324 for i in `echo 'puts stdout $auto_path' | ${TCLSH_CMD} | sed 's,/tcltk/tcl,/tcl,g'`
326 if test -f "$i/tclConfig.sh" ; then
327 ac_cv_c_tclconfig="$i"
334 # Recent versions of Xcode on Macs hid the tclConfig.sh file
335 # in a strange place.
336 if test x"${ac_cv_c_tclconfig}" = x ; then
337 if test x"$cross_compiling" = xno; then
338 for i in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX*.sdk/usr/lib
340 if test -f "$i/tclConfig.sh" ; then
341 ac_cv_c_tclconfig="$i"
348 # then check for a private Tcl installation
349 if test x"${ac_cv_c_tclconfig}" = x ; then
352 `ls -dr ../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
353 `ls -dr ../tcl[[8-9]].[[0-9]] 2>/dev/null` \
354 `ls -dr ../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
356 `ls -dr ../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
357 `ls -dr ../../tcl[[8-9]].[[0-9]] 2>/dev/null` \
358 `ls -dr ../../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
360 `ls -dr ../../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
361 `ls -dr ../../../tcl[[8-9]].[[0-9]] 2>/dev/null` \
362 `ls -dr ../../../tcl[[8-9]].[[0-9]]* 2>/dev/null`
364 if test -f "$i/unix/tclConfig.sh" ; then
365 ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
371 # check in a few common install locations
372 if test x"${ac_cv_c_tclconfig}" = x ; then
374 `ls -d ${libdir} 2>/dev/null` \
375 `ls -d /usr/local/lib 2>/dev/null` \
376 `ls -d /usr/contrib/lib 2>/dev/null` \
377 `ls -d /usr/lib 2>/dev/null`
379 if test -f "$i/tclConfig.sh" ; then
380 ac_cv_c_tclconfig=`(cd $i; pwd)`
386 # check in a few other private locations
387 if test x"${ac_cv_c_tclconfig}" = x ; then
390 `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
391 `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]] 2>/dev/null` \
392 `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]]* 2>/dev/null`
394 if test -f "$i/unix/tclConfig.sh" ; then
395 ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
402 if test x"${ac_cv_c_tclconfig}" = x ; then
404 AC_MSG_WARN(Can't find Tcl configuration definitions)
405 AC_MSG_WARN(*** Without Tcl the regression tests cannot be executed ***)
406 AC_MSG_WARN(*** Consider using --with-tcl=... to define location of Tcl ***)
408 TCL_BIN_DIR=${ac_cv_c_tclconfig}
409 AC_MSG_RESULT(found $TCL_BIN_DIR/tclConfig.sh)
411 AC_MSG_CHECKING([for existence of $TCL_BIN_DIR/tclConfig.sh])
412 if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
413 AC_MSG_RESULT([loading])
414 . $TCL_BIN_DIR/tclConfig.sh
416 AC_MSG_RESULT([file not found])
420 # If the TCL_BIN_DIR is the build directory (not the install directory),
421 # then set the common variable name to the value of the build variables.
422 # For example, the variable TCL_LIB_SPEC will be set to the value
423 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
424 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
425 # installed and uninstalled version of Tcl.
428 if test -f $TCL_BIN_DIR/Makefile ; then
429 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
430 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
431 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
435 # eval is required to do the TCL_DBGX substitution
438 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
439 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
440 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
442 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
443 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
444 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
446 AC_SUBST(TCL_VERSION)
447 AC_SUBST(TCL_BIN_DIR)
448 AC_SUBST(TCL_SRC_DIR)
449 AC_SUBST(TCL_INCLUDE_SPEC)
451 AC_SUBST(TCL_LIB_FILE)
452 AC_SUBST(TCL_LIB_FLAG)
453 AC_SUBST(TCL_LIB_SPEC)
455 AC_SUBST(TCL_STUB_LIB_FILE)
456 AC_SUBST(TCL_STUB_LIB_FLAG)
457 AC_SUBST(TCL_STUB_LIB_SPEC)
458 AC_SUBST(TCL_SHLIB_SUFFIX)
461 if test "${use_tcl}" = "no" ; then
469 # Figure out what C libraries are required to compile programs
470 # that use "readline()" library.
472 TARGET_READLINE_LIBS=""
473 TARGET_READLINE_INC=""
474 TARGET_HAVE_READLINE=0
475 TARGET_HAVE_EDITLINE=0
476 AC_ARG_ENABLE([editline],
477 [AC_HELP_STRING([--enable-editline],[enable BSD editline support])],
478 [with_editline=$enableval],
479 [with_editline=auto])
480 AC_ARG_ENABLE([readline],
481 [AC_HELP_STRING([--disable-readline],[disable readline support])],
482 [with_readline=$enableval],
483 [with_readline=auto])
485 if test x"$with_editline" != xno; then
488 TARGET_HAVE_EDITLINE=1
489 AC_SEARCH_LIBS(readline,edit,[with_readline=no],[TARGET_HAVE_EDITLINE=0])
490 TARGET_READLINE_LIBS=$LIBS
493 if test x"$with_readline" != xno; then
496 AC_ARG_WITH([readline-lib],
497 [AC_HELP_STRING([--with-readline-lib],[specify readline library])],
498 [with_readline_lib=$withval],
499 [with_readline_lib="auto"])
500 if test "x$with_readline_lib" = xauto; then
503 AC_SEARCH_LIBS(tgetent, [readline ncurses curses termcap], [term_LIBS="$LIBS"], [term_LIBS=""])
504 AC_CHECK_LIB([readline], [readline], [TARGET_READLINE_LIBS="-lreadline"], [found="no"])
505 TARGET_READLINE_LIBS="$TARGET_READLINE_LIBS $term_LIBS"
508 TARGET_READLINE_LIBS="$with_readline_lib"
511 AC_ARG_WITH([readline-inc],
512 [AC_HELP_STRING([--with-readline-inc],[specify readline include paths])],
513 [with_readline_inc=$withval],
514 [with_readline_inc="auto"])
515 if test "x$with_readline_inc" = xauto; then
516 AC_CHECK_HEADER(readline.h, [found="yes"], [
518 if test "$cross_compiling" != yes; then
519 for dir in /usr /usr/local /usr/local/readline /usr/contrib /mingw; do
520 for subdir in include include/readline; do
521 AC_CHECK_FILE($dir/$subdir/readline.h, found=yes)
522 if test "$found" = "yes"; then
523 TARGET_READLINE_INC="-I$dir/$subdir"
527 test "$found" = "yes" && break
532 TARGET_READLINE_INC="$with_readline_inc"
535 if test x"$found" = xno; then
536 TARGET_READLINE_LIBS=""
537 TARGET_READLINE_INC=""
538 TARGET_HAVE_READLINE=0
540 TARGET_HAVE_READLINE=1
544 AC_SUBST(TARGET_READLINE_LIBS)
545 AC_SUBST(TARGET_READLINE_INC)
546 AC_SUBST(TARGET_HAVE_READLINE)
547 AC_SUBST(TARGET_HAVE_EDITLINE)
550 # Figure out what C libraries are required to compile programs
551 # that use "fdatasync()" function.
553 AC_SEARCH_LIBS(fdatasync, [rt])
556 # check for debug enabled
557 AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],[enable debugging & verbose explain]))
558 AC_MSG_CHECKING([build type])
559 if test "${enable_debug}" = "yes" ; then
560 TARGET_DEBUG="-DSQLITE_DEBUG=1 -DSQLITE_ENABLE_SELECTTRACE -DSQLITE_ENABLE_WHERETRACE -O0"
561 AC_MSG_RESULT([debug])
563 TARGET_DEBUG="-DNDEBUG"
564 AC_MSG_RESULT([release])
566 AC_SUBST(TARGET_DEBUG)
569 # See whether we should use the amalgamation to build
570 AC_ARG_ENABLE(amalgamation, AC_HELP_STRING([--disable-amalgamation],
571 [Disable the amalgamation and instead build all files separately]))
572 if test "${enable_amalgamation}" = "no" ; then
575 AC_SUBST(USE_AMALGAMATION)
578 # Look for zlib. Only needed by extensions and by the sqlite3.exe shell
579 AC_CHECK_HEADERS(zlib.h)
580 AC_SEARCH_LIBS(deflate, z, [HAVE_ZLIB="-DSQLITE_HAVE_ZLIB=1"], [HAVE_ZLIB=""])
584 # See whether we should allow loadable extensions
585 AC_ARG_ENABLE(load-extension, AC_HELP_STRING([--disable-load-extension],
586 [Disable loading of external extensions]),,[enable_load_extension=yes])
587 if test "${enable_load_extension}" = "yes" ; then
589 AC_SEARCH_LIBS(dlopen, dl)
591 OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
595 # Do we want to support math functions
598 AC_HELP_STRING([--disable-math],[Disable math functions]))
599 AC_MSG_CHECKING([whether to support math functions])
600 if test "$enable_math" = "no"; then
604 OPT_FEATURE_FLAGS="${OPT_FEATURE_FLAGS} -DSQLITE_ENABLE_MATH_FUNCTIONS"
605 AC_SEARCH_LIBS(ceil, m)
609 # Do we want to support JSON functions
612 AC_HELP_STRING([--disable-json],[Disable JSON functions]))
613 AC_MSG_CHECKING([whether to support JSON functions])
614 if test "$enable_json" = "no"; then
616 OPT_FEATURE_FLAGS="${OPT_FEATURE_FLAGS} -DSQLITE_OMIT_JSON"
622 # The --enable-all argument is short-hand to enable
623 # multiple extensions.
624 AC_ARG_ENABLE(all, AC_HELP_STRING([--enable-all],
625 [Enable FTS4, FTS5, Geopoly, RTree, Sessions]))
628 # Do we want to support memsys3 and/or memsys5
630 AC_ARG_ENABLE(memsys5,
631 AC_HELP_STRING([--enable-memsys5],[Enable MEMSYS5]))
632 AC_MSG_CHECKING([whether to support MEMSYS5])
633 if test "${enable_memsys5}" = "yes"; then
634 OPT_FEATURE_FLAGS="${OPT_FEATURE_FLAGS} -DSQLITE_ENABLE_MEMSYS5"
639 AC_ARG_ENABLE(memsys3,
640 AC_HELP_STRING([--enable-memsys3],[Enable MEMSYS3]))
641 AC_MSG_CHECKING([whether to support MEMSYS3])
642 if test "${enable_memsys3}" = "yes" -a "${enable_memsys5}" = "no"; then
643 OPT_FEATURE_FLAGS="${OPT_FEATURE_FLAGS} -DSQLITE_ENABLE_MEMSYS3"
650 # See whether we should enable Full Text Search extensions
651 AC_ARG_ENABLE(fts3, AC_HELP_STRING([--enable-fts3],
652 [Enable the FTS3 extension]))
653 AC_MSG_CHECKING([whether to support FTS3])
654 if test "${enable_fts3}" = "yes" ; then
655 OPT_FEATURE_FLAGS="${OPT_FEATURE_FLAGS} -DSQLITE_ENABLE_FTS3"
660 AC_ARG_ENABLE(fts4, AC_HELP_STRING([--enable-fts4],
661 [Enable the FTS4 extension]))
662 AC_MSG_CHECKING([whether to support FTS4])
663 if test "${enable_fts4}" = "yes" -o "${enable_all}" = "yes" ; then
665 OPT_FEATURE_FLAGS="${OPT_FEATURE_FLAGS} -DSQLITE_ENABLE_FTS4"
666 AC_SEARCH_LIBS([log],[m])
670 AC_ARG_ENABLE(fts5, AC_HELP_STRING([--enable-fts5],
671 [Enable the FTS5 extension]))
672 AC_MSG_CHECKING([whether to support FTS5])
673 if test "${enable_fts5}" = "yes" -o "${enable_all}" = "yes" ; then
675 OPT_FEATURE_FLAGS="${OPT_FEATURE_FLAGS} -DSQLITE_ENABLE_FTS5"
676 AC_SEARCH_LIBS([log],[m])
682 # See whether we should enable the LIMIT clause on UPDATE and DELETE
684 AC_ARG_ENABLE(update-limit, AC_HELP_STRING([--enable-update-limit],
685 [Enable the UPDATE/DELETE LIMIT clause]))
686 AC_MSG_CHECKING([whether to support LIMIT on UPDATE and DELETE statements])
687 if test "${enable_update_limit}" = "yes" ; then
688 OPT_FEATURE_FLAGS="${OPT_FEATURE_FLAGS} -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT"
695 # See whether we should enable GEOPOLY
696 AC_ARG_ENABLE(geopoly, AC_HELP_STRING([--enable-geopoly],
697 [Enable the GEOPOLY extension]),
698 [enable_geopoly=yes],[enable_geopoly=no])
699 AC_MSG_CHECKING([whether to support GEOPOLY])
700 if test "${enable_geopoly}" = "yes" -o "${enable_all}" = "yes" ; then
701 OPT_FEATURE_FLAGS="${OPT_FEATURE_FLAGS} -DSQLITE_ENABLE_GEOPOLY"
709 # See whether we should enable RTREE
710 AC_ARG_ENABLE(rtree, AC_HELP_STRING([--enable-rtree],
711 [Enable the RTREE extension]))
712 AC_MSG_CHECKING([whether to support RTREE])
713 if test "${enable_rtree}" = "yes" ; then
714 OPT_FEATURE_FLAGS="${OPT_FEATURE_FLAGS} -DSQLITE_ENABLE_RTREE"
721 # See whether we should enable the SESSION extension
722 AC_ARG_ENABLE(session, AC_HELP_STRING([--enable-session],
723 [Enable the SESSION extension]))
724 AC_MSG_CHECKING([whether to support SESSION])
725 if test "${enable_session}" = "yes" -o "${enable_all}" = "yes" ; then
726 OPT_FEATURE_FLAGS="${OPT_FEATURE_FLAGS} -DSQLITE_ENABLE_SESSION"
727 OPT_FEATURE_FLAGS="${OPT_FEATURE_FLAGS} -DSQLITE_ENABLE_PREUPDATE_HOOK"
734 # attempt to duplicate any OMITS and ENABLES into the ${OPT_FEATURE_FLAGS} parameter
735 for option in $CFLAGS $CPPFLAGS
738 -DSQLITE_OMIT*) OPT_FEATURE_FLAGS="$OPT_FEATURE_FLAGS $option";;
739 -DSQLITE_ENABLE*) OPT_FEATURE_FLAGS="$OPT_FEATURE_FLAGS $option";;
742 AC_SUBST(OPT_FEATURE_FLAGS)
745 # attempt to remove any OMITS and ENABLES from the $(CFLAGS) parameter
747 for option in $CFLAGS
752 *) ac_temp_CFLAGS="$ac_temp_CFLAGS $option";;
755 CFLAGS=$ac_temp_CFLAGS
758 # attempt to remove any OMITS and ENABLES from the $(CPPFLAGS) parameter
760 for option in $CPPFLAGS
765 *) ac_temp_CPPFLAGS="$ac_temp_CPPFLAGS $option";;
768 CPPFLAGS=$ac_temp_CPPFLAGS
771 # attempt to remove any OMITS and ENABLES from the $(BUILD_CFLAGS) parameter
772 ac_temp_BUILD_CFLAGS=""
773 for option in $BUILD_CFLAGS
778 *) ac_temp_BUILD_CFLAGS="$ac_temp_BUILD_CFLAGS $option";;
781 BUILD_CFLAGS=$ac_temp_BUILD_CFLAGS
785 # See whether we should use GCOV
786 AC_ARG_ENABLE(gcov, AC_HELP_STRING([--enable-gcov],
787 [Enable coverage testing using gcov]))
788 if test "${use_gcov}" = "yes" ; then
796 # Enable/disabled amalagamation line macros
798 AMALGAMATION_LINE_MACROS=--linemacros=0
799 if test "${amalgamation_line_macros}" = "yes" ; then
800 AMALGAMATION_LINE_MACROS=--linemacros=1
802 if test "${amalgamation_line_macros}" = "no" ; then
803 AMALGAMATION_LINE_MACROS=--linemacros=0
805 AC_SUBST(AMALGAMATION_LINE_MACROS)
808 # Output the config header
809 AC_CONFIG_HEADERS(config.h)
812 # Generate the output files.
814 AC_SUBST(BUILD_CFLAGS)