Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: third_party/sqlite/src/configure.ac

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/sqlite/src/configure ('k') | third_party/sqlite/src/doc/lemon.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 1 #
2 # The build process allows for using a cross-compiler. But the default 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 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 4 # configure script needs to discover the following properties of the
5 # build and target systems: 5 # build and target systems:
6 # 6 #
7 # srcdir 7 # srcdir
8 # 8 #
9 # The is the name of the directory that contains the 9 # The is the name of the directory that contains the
10 # "configure" shell script. All source files are 10 # "configure" shell script. All source files are
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 AC_CHECK_TYPES([int8_t, int16_t, int32_t, int64_t, intptr_t, uint8_t, 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]) 102 uint16_t, uint32_t, uint64_t, uintptr_t])
103 103
104 ######### 104 #########
105 # Check for needed/wanted headers 105 # Check for needed/wanted headers
106 AC_CHECK_HEADERS([sys/types.h stdlib.h stdint.h inttypes.h malloc.h]) 106 AC_CHECK_HEADERS([sys/types.h stdlib.h stdint.h inttypes.h malloc.h])
107 107
108 ######### 108 #########
109 # Figure out whether or not we have these functions 109 # Figure out whether or not we have these functions
110 # 110 #
111 AC_CHECK_FUNCS([fdatasync gmtime_r isnan localtime_r localtime_s malloc_usable_s ize strchrnul usleep utime]) 111 AC_CHECK_FUNCS([fdatasync gmtime_r isnan localtime_r localtime_s malloc_usable_s ize strchrnul usleep utime pread pread64 pwrite pwrite64])
112 112
113 ######### 113 #########
114 # By default, we use the amalgamation (this may be changed below...) 114 # By default, we use the amalgamation (this may be changed below...)
115 # 115 #
116 USE_AMALGAMATION=1 116 USE_AMALGAMATION=1
117 117
118 ######### 118 #########
119 # See whether we can run specific tclsh versions known to work well; 119 # See whether we can run specific tclsh versions known to work well;
120 # if not, then we fall back to plain tclsh. 120 # if not, then we fall back to plain tclsh.
121 # TODO: try other versions before falling back? 121 # TODO: try other versions before falling back?
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 SQLITE_THREADSAFE=0 188 SQLITE_THREADSAFE=0
189 AC_MSG_RESULT([no]) 189 AC_MSG_RESULT([no])
190 else 190 else
191 SQLITE_THREADSAFE=1 191 SQLITE_THREADSAFE=1
192 AC_MSG_RESULT([yes]) 192 AC_MSG_RESULT([yes])
193 fi 193 fi
194 AC_SUBST(SQLITE_THREADSAFE) 194 AC_SUBST(SQLITE_THREADSAFE)
195 195
196 if test "$SQLITE_THREADSAFE" = "1"; then 196 if test "$SQLITE_THREADSAFE" = "1"; then
197 AC_SEARCH_LIBS(pthread_create, pthread) 197 AC_SEARCH_LIBS(pthread_create, pthread)
198 AC_SEARCH_LIBS(pthread_mutexattr_init, pthread)
198 fi 199 fi
199 200
200 ########## 201 ##########
201 # Do we want to support release 202 # Do we want to support release
202 # 203 #
203 AC_ARG_ENABLE(releasemode, 204 AC_ARG_ENABLE(releasemode,
204 AC_HELP_STRING([--enable-releasemode],[Support libtool link to release mode]),,e nable_releasemode=no) 205 AC_HELP_STRING([--enable-releasemode],[Support libtool link to release mode]),,e nable_releasemode=no)
205 AC_MSG_CHECKING([whether to support shared library linked as release mode or not ]) 206 AC_MSG_CHECKING([whether to support shared library linked as release mode or not ])
206 if test "$enable_releasemode" = "no"; then 207 if test "$enable_releasemode" = "no"; then
207 ALLOWRELEASE="" 208 ALLOWRELEASE=""
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 for i in `echo 'puts stdout $auto_path' | ${TCLSH_CMD} | sed 's,/tcltk/t cl,/tcl,g'` 327 for i in `echo 'puts stdout $auto_path' | ${TCLSH_CMD} | sed 's,/tcltk/t cl,/tcl,g'`
327 do 328 do
328 if test -f "$i/tclConfig.sh" ; then 329 if test -f "$i/tclConfig.sh" ; then
329 ac_cv_c_tclconfig="$i" 330 ac_cv_c_tclconfig="$i"
330 break 331 break
331 fi 332 fi
332 done 333 done
333 fi 334 fi
334 fi 335 fi
335 336
337 # Recent versions of Xcode on Macs hid the tclConfig.sh file
338 # in a strange place.
339 if test x"${ac_cv_c_tclconfig}" = x ; then
340 if test x"$cross_compiling" = xno; then
341 for i in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.pla tform/Developer/SDKs/MacOSX*.sdk/usr/lib
342 do
343 if test -f "$i/tclConfig.sh" ; then
344 ac_cv_c_tclconfig="$i"
345 break
346 fi
347 done
348 fi
349 fi
350
336 # then check for a private Tcl installation 351 # then check for a private Tcl installation
337 if test x"${ac_cv_c_tclconfig}" = x ; then 352 if test x"${ac_cv_c_tclconfig}" = x ; then
338 for i in \ 353 for i in \
339 ../tcl \ 354 ../tcl \
340 `ls -dr ../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ 355 `ls -dr ../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
341 `ls -dr ../tcl[[8-9]].[[0-9]] 2>/dev/null` \ 356 `ls -dr ../tcl[[8-9]].[[0-9]] 2>/dev/null` \
342 `ls -dr ../tcl[[8-9]].[[0-9]]* 2>/dev/null` \ 357 `ls -dr ../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
343 ../../tcl \ 358 ../../tcl \
344 `ls -dr ../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ 359 `ls -dr ../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
345 `ls -dr ../../tcl[[8-9]].[[0-9]] 2>/dev/null` \ 360 `ls -dr ../../tcl[[8-9]].[[0-9]] 2>/dev/null` \
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 # Figure out what C libraries are required to compile programs 553 # Figure out what C libraries are required to compile programs
539 # that use "fdatasync()" function. 554 # that use "fdatasync()" function.
540 # 555 #
541 AC_SEARCH_LIBS(fdatasync, [rt]) 556 AC_SEARCH_LIBS(fdatasync, [rt])
542 557
543 ######### 558 #########
544 # check for debug enabled 559 # check for debug enabled
545 AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],[enable debugging & verbose explain]), 560 AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],[enable debugging & verbose explain]),
546 [use_debug=$enableval],[use_debug=no]) 561 [use_debug=$enableval],[use_debug=no])
547 if test "${use_debug}" = "yes" ; then 562 if test "${use_debug}" = "yes" ; then
548 TARGET_DEBUG="-DSQLITE_DEBUG=1" 563 TARGET_DEBUG="-DSQLITE_DEBUG=1 -DSQLITE_ENABLE_SELECTTRACE -DSQLITE_ENABLE_WHE RETRACE"
549 else 564 else
550 TARGET_DEBUG="-DNDEBUG" 565 TARGET_DEBUG="-DNDEBUG"
551 fi 566 fi
552 AC_SUBST(TARGET_DEBUG) 567 AC_SUBST(TARGET_DEBUG)
553 568
554 ######### 569 #########
555 # See whether we should use the amalgamation to build 570 # See whether we should use the amalgamation to build
556 AC_ARG_ENABLE(amalgamation, AC_HELP_STRING([--disable-amalgamation], 571 AC_ARG_ENABLE(amalgamation, AC_HELP_STRING([--disable-amalgamation],
557 [Disable the amalgamation and instead build all files separately]), 572 [Disable the amalgamation and instead build all files separately]),
558 [use_amalgamation=$enableval],[use_amalgamation=yes]) 573 [use_amalgamation=$enableval],[use_amalgamation=yes])
559 if test "${use_amalgamation}" != "yes" ; then 574 if test "${use_amalgamation}" != "yes" ; then
560 USE_AMALGAMATION=0 575 USE_AMALGAMATION=0
561 fi 576 fi
562 AC_SUBST(USE_AMALGAMATION) 577 AC_SUBST(USE_AMALGAMATION)
563 578
564 ######### 579 #########
565 # See whether we should allow loadable extensions 580 # See whether we should allow loadable extensions
566 AC_ARG_ENABLE(load-extension, AC_HELP_STRING([--disable-load-extension], 581 AC_ARG_ENABLE(load-extension, AC_HELP_STRING([--disable-load-extension],
567 [Disable loading of external extensions]), 582 [Disable loading of external extensions]),
568 [use_loadextension=$enableval],[use_loadextension=yes]) 583 [use_loadextension=$enableval],[use_loadextension=yes])
569 if test "${use_loadextension}" = "yes" ; then 584 if test "${use_loadextension}" = "yes" ; then
570 OPT_FEATURE_FLAGS="" 585 OPT_FEATURE_FLAGS=""
571 AC_SEARCH_LIBS(dlopen, dl) 586 AC_SEARCH_LIBS(dlopen, dl)
572 else 587 else
573 OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1" 588 OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
574 fi 589 fi
575 590
591 ##########
592 # Do we want to support memsys3 and/or memsys5
593 #
594 AC_ARG_ENABLE(memsys5,
595 AC_HELP_STRING([--enable-memsys5],[Enable MEMSYS5]),
596 [enable_memsys5=yes],[enable_memsys5=no])
597 AC_MSG_CHECKING([whether to support MEMSYS5])
598 if test "${enable_memsys5}" = "yes"; then
599 OPT_FEATURE_FLAGS+=" -DSQLITE_ENABLE_MEMSYS5"
600 AC_MSG_RESULT([yes])
601 else
602 AC_MSG_RESULT([no])
603 fi
604 AC_ARG_ENABLE(memsys3,
605 AC_HELP_STRING([--enable-memsys3],[Enable MEMSYS3]),
606 [enable_memsys3=yes],[enable_memsys3=no])
607 AC_MSG_CHECKING([whether to support MEMSYS3])
608 if test "${enable_memsys3}" = "yes" -a "${enable_memsys5}" = "no"; then
609 OPT_FEATURE_FLAGS+=" -DSQLITE_ENABLE_MEMSYS3"
610 AC_MSG_RESULT([yes])
611 else
612 AC_MSG_RESULT([no])
613 fi
614
576 ######### 615 #########
577 # See whether we should enable Full Text Search extensions 616 # See whether we should enable Full Text Search extensions
578 AC_ARG_ENABLE(fts3, AC_HELP_STRING([--enable-fts3], 617 AC_ARG_ENABLE(fts3, AC_HELP_STRING([--enable-fts3],
579 [Enable the FTS3 extension]), 618 [Enable the FTS3 extension]),
580 [enable_fts3=yes],[enable_fts3=no]) 619 [enable_fts3=yes],[enable_fts3=no])
581 if test "${enable_fts3}" = "yes" ; then 620 if test "${enable_fts3}" = "yes" ; then
582 OPT_FEATURE_FLAGS+=" -DSQLITE_ENABLE_FTS3" 621 OPT_FEATURE_FLAGS+=" -DSQLITE_ENABLE_FTS3"
583 fi 622 fi
584 AC_ARG_ENABLE(fts4, AC_HELP_STRING([--enable-fts4], 623 AC_ARG_ENABLE(fts4, AC_HELP_STRING([--enable-fts4],
585 [Enable the FTS4 extension]), 624 [Enable the FTS4 extension]),
(...skipping 22 matching lines...) Expand all
608 ######### 647 #########
609 # See whether we should enable RTREE 648 # See whether we should enable RTREE
610 AC_ARG_ENABLE(rtree, AC_HELP_STRING([--enable-rtree], 649 AC_ARG_ENABLE(rtree, AC_HELP_STRING([--enable-rtree],
611 [Enable the RTREE extension]), 650 [Enable the RTREE extension]),
612 [enable_rtree=yes],[enable_rtree=no]) 651 [enable_rtree=yes],[enable_rtree=no])
613 if test "${enable_rtree}" = "yes" ; then 652 if test "${enable_rtree}" = "yes" ; then
614 OPT_FEATURE_FLAGS+=" -DSQLITE_ENABLE_RTREE" 653 OPT_FEATURE_FLAGS+=" -DSQLITE_ENABLE_RTREE"
615 fi 654 fi
616 655
617 ######### 656 #########
657 # See whether we should enable the SESSION extension
658 AC_ARG_ENABLE(session, AC_HELP_STRING([--enable-session],
659 [Enable the SESSION extension]),
660 [enable_session=yes],[enable_session=no])
661 if test "${enable_session}" = "yes" ; then
662 OPT_FEATURE_FLAGS+=" -DSQLITE_ENABLE_SESSION"
663 OPT_FEATURE_FLAGS+=" -DSQLITE_ENABLE_PREUPDATE_HOOK"
664 fi
665
666 #########
618 # attempt to duplicate any OMITS and ENABLES into the $(OPT_FEATURE_FLAGS) param eter 667 # attempt to duplicate any OMITS and ENABLES into the $(OPT_FEATURE_FLAGS) param eter
619 for option in $CFLAGS $CPPFLAGS 668 for option in $CFLAGS $CPPFLAGS
620 do 669 do
621 case $option in 670 case $option in
622 -DSQLITE_OMIT*) OPT_FEATURE_FLAGS="$OPT_FEATURE_FLAGS $option";; 671 -DSQLITE_OMIT*) OPT_FEATURE_FLAGS="$OPT_FEATURE_FLAGS $option";;
623 -DSQLITE_ENABLE*) OPT_FEATURE_FLAGS="$OPT_FEATURE_FLAGS $option";; 672 -DSQLITE_ENABLE*) OPT_FEATURE_FLAGS="$OPT_FEATURE_FLAGS $option";;
624 esac 673 esac
625 done 674 done
626 AC_SUBST(OPT_FEATURE_FLAGS) 675 AC_SUBST(OPT_FEATURE_FLAGS)
627 676
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 AC_CONFIG_HEADERS(config.h) 732 AC_CONFIG_HEADERS(config.h)
684 733
685 ######### 734 #########
686 # Generate the output files. 735 # Generate the output files.
687 # 736 #
688 AC_SUBST(BUILD_CFLAGS) 737 AC_SUBST(BUILD_CFLAGS)
689 AC_OUTPUT([ 738 AC_OUTPUT([
690 Makefile 739 Makefile
691 sqlite3.pc 740 sqlite3.pc
692 ]) 741 ])
OLDNEW
« no previous file with comments | « third_party/sqlite/src/configure ('k') | third_party/sqlite/src/doc/lemon.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698