/ Check-in [02e337e0]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Improvements to the --enable and --disable options for the amalgamation tarball.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 02e337e0808947c7ef376b5a300cd3c461f1a368c9fe7ffd7ca5744f102641c2
User & Date: drh 2018-06-11 21:33:08
Context
2018-06-12
13:16
Fix the "Synopsis" on the OP_BitNot opcode. check-in: acd78df6 user: drh tags: trunk
2018-06-11
21:33
Improvements to the --enable and --disable options for the amalgamation tarball. check-in: 02e337e0 user: drh tags: trunk
19:47
Fix various --enable and --disable options on the top-level configure script. check-in: 6fd7e8ce user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to autoconf/Makefile.am.

     1      1   
     2         -AM_CFLAGS = @THREADSAFE_FLAGS@ @DYNAMIC_EXTENSION_FLAGS@ @FTS5_FLAGS@ @JSON1_FLAGS@ @ZLIB_FLAGS@ @SESSION_FLAGS@ -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE @DEBUG_FLAGS@
     3         -
            2  +AM_CFLAGS = @BUILD_CFLAGS@ 
     4      3   lib_LTLIBRARIES = libsqlite3.la
     5      4   libsqlite3_la_SOURCES = sqlite3.c
     6      5   libsqlite3_la_LDFLAGS = -no-undefined -version-info 8:6:8
     7      6   
     8      7   bin_PROGRAMS = sqlite3
     9      8   sqlite3_SOURCES = shell.c sqlite3.h
    10      9   EXTRA_sqlite3_SOURCES = sqlite3.c

Changes to autoconf/configure.ac.

    25     25   AC_PROG_MKDIR_P
    26     26   
    27     27   # Check for library functions that SQLite can optionally use.
    28     28   AC_CHECK_FUNCS([fdatasync usleep fullfsync localtime_r gmtime_r])
    29     29   AC_FUNC_STRERROR_R
    30     30   
    31     31   AC_CONFIG_FILES([Makefile sqlite3.pc])
           32  +BUILD_CFLAGS=
    32     33   AC_SUBST(BUILD_CFLAGS)
    33     34   
    34     35   #-------------------------------------------------------------------------
    35     36   # Two options to enable readline compatible libraries: 
    36     37   #
    37     38   #   --enable-editline
    38     39   #   --enable-readline
................................................................................
    82     83   
    83     84   #-----------------------------------------------------------------------
    84     85   #   --enable-threadsafe
    85     86   #
    86     87   AC_ARG_ENABLE(threadsafe, [AS_HELP_STRING(
    87     88     [--enable-threadsafe], [build a thread-safe library [default=yes]])], 
    88     89     [], [enable_threadsafe=yes])
    89         -THREADSAFE_FLAGS=-DSQLITE_THREADSAFE=0
    90     90   if test x"$enable_threadsafe" != "xno"; then
    91         -  THREADSAFE_FLAGS="-D_REENTRANT=1 -DSQLITE_THREADSAFE=1"
           91  +  BUILD_CFLAGS="$BUILD_CFLAGS -D_REENTRANT=1 -DSQLITE_THREADSAFE=1"
    92     92     AC_SEARCH_LIBS(pthread_create, pthread)
    93     93     AC_SEARCH_LIBS(pthread_mutexattr_init, pthread)
    94     94   fi
    95         -AC_SUBST(THREADSAFE_FLAGS)
    96     95   #-----------------------------------------------------------------------
    97     96   
    98     97   #-----------------------------------------------------------------------
    99     98   #   --enable-dynamic-extensions
   100     99   #
   101    100   AC_ARG_ENABLE(dynamic-extensions, [AS_HELP_STRING(
   102    101     [--enable-dynamic-extensions], [support loadable extensions [default=yes]])], 
   103    102     [], [enable_dynamic_extensions=yes])
   104    103   if test x"$enable_dynamic_extensions" != "xno"; then
   105    104     AC_SEARCH_LIBS(dlopen, dl)
   106    105   else
   107         -  DYNAMIC_EXTENSION_FLAGS=-DSQLITE_OMIT_LOAD_EXTENSION=1
          106  +  BUILD_CFLAGS="$BUILD_CFLAGS -DSQLITE_OMIT_LOAD_EXTENSION=1"
   108    107   fi
   109    108   AC_MSG_CHECKING([for whether to support dynamic extensions])
   110    109   AC_MSG_RESULT($enable_dynamic_extensions)
   111         -AC_SUBST(DYNAMIC_EXTENSION_FLAGS)
          110  +#-----------------------------------------------------------------------
          111  +
          112  +#-----------------------------------------------------------------------
          113  +#   --enable-fts4
          114  +#
          115  +AC_ARG_ENABLE(fts4, [AS_HELP_STRING(
          116  +  [--enable-fts4], [include fts4 support [default=yes]])], 
          117  +  [], [enable_fts4=yes])
          118  +if test x"$enable_fts4" = "xyes"; then
          119  +  BUILD_CFLAGS="$BUILD_CFLAGS -DSQLITE_ENABLE_FTS4"
          120  +fi
          121  +#-----------------------------------------------------------------------
          122  +
          123  +#-----------------------------------------------------------------------
          124  +#   --enable-fts3
          125  +#
          126  +AC_ARG_ENABLE(fts3, [AS_HELP_STRING(
          127  +  [--enable-fts3], [include fts3 support [default=no]])], 
          128  +  [], [])
          129  +if test x"$enable_fts3" = "xyes" -a x"$enable_fts4" = "xno"; then
          130  +  BUILD_CFLAGS="$BUILD_CFLAGS -DSQLITE_ENABLE_FTS3"
          131  +fi
   112    132   #-----------------------------------------------------------------------
   113    133   
   114    134   #-----------------------------------------------------------------------
   115    135   #   --enable-fts5
   116    136   #
   117    137   AC_ARG_ENABLE(fts5, [AS_HELP_STRING(
   118    138     [--enable-fts5], [include fts5 support [default=yes]])], 
   119    139     [], [enable_fts5=yes])
   120    140   if test x"$enable_fts5" = "xyes"; then
   121    141     AC_SEARCH_LIBS(log, m)
   122         -  FTS5_FLAGS=-DSQLITE_ENABLE_FTS5
          142  +  BUILD_CFLAGS="$BUILD_CFLAGS -DSQLITE_ENABLE_FTS5"
   123    143   fi
   124         -AC_SUBST(FTS5_FLAGS)
   125    144   #-----------------------------------------------------------------------
   126    145   
   127    146   #-----------------------------------------------------------------------
   128    147   #   --enable-json1
   129    148   #
   130    149   AC_ARG_ENABLE(json1, [AS_HELP_STRING(
   131    150     [--enable-json1], [include json1 support [default=yes]])], 
   132         -  [], [enable_json1=yes])
          151  +  [],[enable_json1=yes])
   133    152   if test x"$enable_json1" = "xyes"; then
   134         -  JSON1_FLAGS=-DSQLITE_ENABLE_JSON1
          153  +  BUILD_CFLAGS="$BUILD_CFLAGS -DSQLITE_ENABLE_JSON1"
   135    154   fi
   136         -AC_SUBST(JSON1_FLAGS)
          155  +#-----------------------------------------------------------------------
          156  +
          157  +#-----------------------------------------------------------------------
          158  +#   --enable-rtree
          159  +#
          160  +AC_ARG_ENABLE(rtree, [AS_HELP_STRING(
          161  +  [--enable-rtree], [include rtree support [default=yes]])], 
          162  +  [], [enable_rtree=yes])
          163  +if test x"$enable_rtree" = "xyes"; then
          164  +  BUILD_CFLAGS="$BUILD_CFLAGS -DSQLITE_ENABLE_RTREE"
          165  +fi
   137    166   #-----------------------------------------------------------------------
   138    167   
   139    168   #-----------------------------------------------------------------------
   140    169   #   --enable-session
   141    170   #
   142    171   AC_ARG_ENABLE(session, [AS_HELP_STRING(
   143    172     [--enable-session], [enable the session extension [default=no]])], 
   144         -  [], [enable_session=no])
          173  +  [], [])
   145    174   if test x"$enable_session" = "xyes"; then
   146         -  SESSION_FLAGS="-DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_PREUPDATE_HOOK"
          175  +  BUILD_CFLAGS="$BUILD_CFLAGS-DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_PREUPDATE_HOOK"
   147    176   fi
   148         -AC_SUBST(SESSION_FLAGS)
   149    177   #-----------------------------------------------------------------------
   150    178   
   151    179   #-----------------------------------------------------------------------
   152    180   #   --enable-debug
   153    181   #
   154    182   AC_ARG_ENABLE(debug, [AS_HELP_STRING(
   155    183     [--enable-debug], [build with debugging features enabled [default=no]])], 
   156         -  [], [enable_debug=no])
          184  +  [], [])
   157    185   if test x"$enable_debug" = "xyes"; then
   158         -  DEBUG_FLAGS="-DSQLITE_DEBUG -DSQLITE_ENABLE_SELECTTRACE -DSQLITE_ENABLE_WHERETRACE"
          186  +  BUILD_CFLAGS="$BUILD_CFLAGS -DSQLITE_DEBUG -DSQLITE_ENABLE_SELECTTRACE -DSQLITE_ENABLE_WHERETRACE"
          187  +  CFLAGS="-g -O0"
   159    188   fi
   160         -AC_SUBST(DEBUG_FLAGS)
   161    189   #-----------------------------------------------------------------------
   162    190   
   163    191   #-----------------------------------------------------------------------
   164    192   #   --enable-static-shell
   165    193   #
   166    194   AC_ARG_ENABLE(static-shell, [AS_HELP_STRING(
   167    195     [--enable-static-shell], 
................................................................................
   173    201     EXTRA_SHELL_OBJ=libsqlite3.la
   174    202   fi
   175    203   AC_SUBST(EXTRA_SHELL_OBJ)
   176    204   #-----------------------------------------------------------------------
   177    205   
   178    206   AC_CHECK_FUNCS(posix_fallocate)
   179    207   AC_CHECK_HEADERS(zlib.h,[
   180         -  AC_SEARCH_LIBS(deflate,z,[ZLIB_FLAGS="-DSQLITE_HAVE_ZLIB"])
          208  +  AC_SEARCH_LIBS(deflate,z,[BUILD_CFLAGS="$BUILD_CFLAGS -DSQLITE_HAVE_ZLIB"])
   181    209   ])
   182         -AC_SUBST(ZLIB_FLAGS)
   183    210   
   184    211   AC_SEARCH_LIBS(system,,,[SHELL_CFLAGS="-DSQLITE_NOHAVE_SYSTEM"])
   185    212   AC_SUBST(SHELL_CFLAGS)
   186    213   
   187    214   #-----------------------------------------------------------------------
   188    215   # UPDATE: Maybe it's better if users just set CFLAGS before invoking
   189    216   # configure. This option doesn't really add much...