Annotation of pkgsrc/databases/sqlite3/Makefile, revision 1.166

1.166   ! jperkin     1: # $NetBSD: Makefile,v 1.165 2025/03/31 16:02:03 riastradh Exp $
1.109     kamil       2: 
                      3: .include "Makefile.common"
1.22      tnn         4: 
1.122     adam        5: DISTNAME=      sqlite-autoconf-${SQLITE3_DISTVERSION}
1.95      khorben     6: PKGNAME=       sqlite3-${SQLITE3_VERSION}
1.166   ! jperkin     7: PKGREVISION=   2
1.22      tnn         8: CATEGORIES=    databases
                      9: 
                     10: MAINTAINER=    pkgsrc-users@NetBSD.org
                     11: COMMENT=       SQL Database Engine in a C Library
1.9       heinz      12: 
1.37      agc        13: .include "options.mk"
                     14: 
1.164     adam       15: # Disable ccache; see autosetup/cc.tcl
                     16: CONFIGURE_ENV+=        CCACHE=none
                     17: 
1.32      adam       18: USE_LIBTOOL=           yes
                     19: USE_TOOLS+=            gmake
1.164     adam       20: HAS_CONFIGURE=         yes
                     21: CONFIGURE_ARGS+=       --mandir=${PREFIX}/${PKGMANDIR}
                     22: CONFIGURE_ARGS+=       --prefix=${PREFIX}
1.110     kamil      23: PKGCONFIG_OVERRIDE+=   sqlite3.pc.in
                     24: 
1.28      obache     25: .include "../../mk/bsd.prefs.mk"
                     26: 
1.161     riastrad   27: # sqlite3 compile options are documented at:
                     28: #
                     29: # https://www.sqlite.org/compile.html
                     30: #
                     31: # We always enable those options that:
                     32: #
                     33: # (a) are not dynamically loadable, but
                     34: # (b) enable functionality applications are likely to require, and
                     35: # (c) do not change default settings, and
                     36: # (d) do not bring unwieldy dependencies, and
                     37: # (e) do not incur unreasonable burden on users not needing them if
                     38: #     applicable only to niche use cases.
                     39: #
                     40: # We also always enable options that are necessary to build, or are
                     41: # performance optimizations that do not affect functionality.
                     42: #
                     43: # Other options -- those that can be dynamically loaded, those that
                     44: # change defaults which applications could override anyway, or those
                     45: # that bring in unwieldy dependencies -- are relegated to options.mk,
                     46: # e.g. the `icu' option which brings in the unwieldy dependency of
                     47: # textproc/icu.
                     48: #
                     49: # Where both a configure argument option and a C preprocessor macro
                     50: # option are available, we prefer the configure argument so that it is
                     51: # checked by the configure script to detect potential bitrot in the
                     52: # future.
                     53: 
                     54: ### Build fixes
1.35      joerg      55: 
1.28      obache     56: # Darwin < 9 (Mac OS X < 10.5 "Leopard") doesn't have gethostuuid(2)
1.81      wiz        57: # and lacks the zone memory allocator
1.166   ! jperkin    58: .if ${MACHINE_PLATFORM:MDarwin-[0-8].*-*}
1.164     adam       59: CFLAGS+=       -DSQLITE_ENABLE_LOCKING_STYLE=0
                     60: CFLAGS+=       -DSQLITE_WITHOUT_ZONEMALLOC
1.28      obache     61: .endif
                     62: 
1.161     riastrad   63: ### Performance optimizations
                     64: 
                     65: # In the past, Linux had database corruption issues with pread, so only
                     66: # enable it on safe platforms.  This (undocumented) option enables the
                     67: # use of pread(2), instead of the sequence of syscalls
                     68: # lseek(2)-then-read(2), to read from a specific position in a file.
                     69: CFLAGS.NetBSD+=                -DUSE_PREAD
                     70: 
                     71: ### Enabled functionality
1.139     adam       72: 
1.161     riastrad   73: # SQLITE_THREADSAFE.  Some applications of sqlite3 in pkgsrc require
                     74: # thread-safety, so we enable this for everyone.  Applications that
                     75: # really benefit from omitting mutexes and similar can statically link
                     76: # a custom build of sqlite3.  We pass the arguments to make sure they
                     77: # stay enabled in case upstream ever changes the default until we
                     78: # review the change.
                     79: CONFIGURE_ARGS+=       --enable-threadsafe
                     80: 
                     81: # The column metadata API provides some additional information about
                     82: # the provenance of columns in query results, and is not dynamically
                     83: # loadable:
                     84: #
                     85: # https://www.sqlite.org/c3ref/column_database_name.html
                     86: # https://www.sqlite.org/compile.html#enable_column_metadata
1.164     adam       87: CFLAGS+=       -DSQLITE_ENABLE_COLUMN_METADATA
1.161     riastrad   88: 
                     89: # The DBSTAT virtual table provides information about disk space
                     90: # utilization, is required by lang/tcl's bin/sqlite3_analyzer, and is
                     91: # not (as far as I can tell) dynamically loadable:
                     92: #
                     93: # https://www.sqlite.org/dbstat.html
                     94: # https://www.sqlite.org/compile.html#enable_dbstat_vtab
1.164     adam       95: CFLAGS+=       -DSQLITE_ENABLE_DBSTAT_VTAB
1.161     riastrad   96: 
                     97: # Full-text search engines.  There are two full-text search engines,
                     98: # fts3/4 and fts5.  The options SQLITE_ENABLE_FTS3 and
                     99: # SQLITE_ENABLE_FTS4 are equivalent; we enable both to make it clear
                    100: # that that is intended.  fts3 has been available since 3.5.0 in 2007,
                    101: # the fts4 extension (which is unconditionally bundled with the fts3
                    102: # build option now) since 3.7.4 in 2010, fts5 since 3.9.0 in 2015, and
                    103: # all are enabled by default.  We pass the arguments to make sure they
                    104: # stay enabled in case upstream ever changes the default until we
                    105: # review the change.
                    106: #
                    107: # In principle, fts5 is dynamically loadable, but since upstream
                    108: # enables it by default anyway we treat that as a moot point.
                    109: #
                    110: # https://www.sqlite.org/fts3.html
                    111: # https://www.sqlite.org/fts5.html
                    112: # https://www.sqlite.org/compile.html#enable_fts3
                    113: # https://www.sqlite.org/compile.html#enable_fts4
                    114: # https://www.sqlite.org/compile.html#enable_fts5
1.164     adam      115: CONFIGURE_ARGS+=       --fts3 # -DSQLITE_ENABLE_FTS3
                    116: CONFIGURE_ARGS+=       --fts4 # -DSQLITE_ENABLE_FTS4
                    117: CONFIGURE_ARGS+=       --fts5 # -DSQLITE_ENABLE_FTS5
1.161     riastrad  118: 
                    119: # Nested queries and AND/OR operators for fts3/4.
                    120: #
                    121: # https://www.sqlite.org/fts3.html#_set_operations_using_the_enhanced_query_syntax
                    122: # https://www.sqlite.org/compile.html#enable_fts3_parenthesis
1.164     adam      123: CFLAGS+=       -DSQLITE_ENABLE_FTS3_PARENTHESIS
1.161     riastrad  124: 
                    125: # SQLITE_ENABLE_GEOPOLY, SQLITE_ENABLE_RTREE -- R*Tree and Geopoly
                    126: # interface for geospatial queries.  Enabled by default since 2018.  We
                    127: # pass the arguments to make sure they stay enabled in case upstream
                    128: # ever changes the default until we review the change.
                    129: #
                    130: # https://www.sqlite.org/geopoly.html
                    131: # https://www.sqlite.org/rtree.html
                    132: # https://www.sqlite.org/compile.html#enable_geopoly
                    133: # https://www.sqlite.org/compile.html#enable_rtree
1.164     adam      134: CONFIGURE_ARGS+=       --geopoly
                    135: CONFIGURE_ARGS+=       --rtree
1.161     riastrad  136: 
                    137: # SQLITE_ENABLE_ICU -- unwieldy dependency, relegated to options.mk.
                    138: # https://www.sqlite.org/compile.html#enable_icu
                    139: 
                    140: # SQLITE_ENABLE_IOTRACE -- experimental and may be discontinued in a
                    141: # future release.
                    142: # https://www.sqlite.org/compile.html#enable_iotrace
                    143: 
                    144: # Hidden columns.  Allows virtual tables to declare certain columns
                    145: # HIDDEN, which hides them from PRAGMA table_info, SELECT *, and
                    146: # implicit INSERT.
                    147: #
                    148: # https://www.sqlite.org/vtab.html#hiddencol
                    149: # https://www.sqlite.org/compile.html#enable_hidden_columns
1.164     adam      150: CFLAGS+=       -DSQLITE_ENABLE_HIDDEN_COLUMNS
1.161     riastrad  151: 
                    152: # SQLITE_ENABLE_JSON1 -- JSON1 support, built-in functions for
                    153: # manipulating JSON.  Enabled by default since 2022, configure option
                    154: # removed, compile-time option switched from opt-in to opt-out in
                    155: # sqlite3>=3.38.0.
                    156: #
                    157: # https://www.sqlite.org/json1.html
                    158: # https://www.sqlite.org/compile.html#enable_json1
                    159: 
                    160: # SQLITE_ENABLE_LOCKING_STYLE -- relevant mainly (only?) on Apple
                    161: # systems, where it is enabled by default anyway.
                    162: #
                    163: #      This option enables additional logic in the OS interface layer
                    164: #      for Mac OS X.  The additional logic attempts to determine the
                    165: #      type of the underlying filesystem and choose and alternative
                    166: #      locking strategy that works correctly for that filesystem type.
                    167: #
                    168: # Note issue with Darwin < 9 (Mac OS X < 10.5 "Leopard") above.
                    169: #
                    170: # https://www.sqlite.org/compile.html#enable_locking_style
                    171: 
                    172: # SQLITE_ENABLE_MATH_FUNCTIONS -- SQL math functions: sin/cos/tan,
                    173: # log/exp, floor/ceil/trunc, &c.  We pass the arguments to make sure
                    174: # they stay enabled in case upstream ever changes the default until we
                    175: # review the change.
                    176: #
                    177: # https://www.sqlite.org/lang_mathfunc.html
                    178: # https://www.sqlite.org/compile.html#enable_math_functions
                    179: CONFIGURE_ARGS+=       --enable-math
                    180: 
                    181: # XXX Consider SQLITE_ENABLE_MEMORY_MANAGEMENT.
                    182: #
                    183: #      This option adds extra logic to SQLite that allows it to
                    184: #      release unused memory upon request.  This option must be
                    185: #      enabled in order for the sqlite3_release_memory() interface to
                    186: #      work.  If this compile-time option is not used, the
                    187: #      sqlite3_release_memory() interface is a no-op.
                    188: #
                    189: # https://www.sqlite.org/compile.html#enable_memory_management
                    190: 
                    191: # SQLITE_ENABLE_MEMSYS3, SQLITE_ENABLE_MEMSYS5 -- alternative memory
                    192: # allocators, mutually exclusive.  These seem likely to be relevant
                    193: # only for specialized applications having unusual dynamic memory
                    194: # allocation requirements, so although this does enable extra
                    195: # functionality (SQLITE_CONFIG_HEAP,
                    196: # https://www.sqlite.org/c3ref/c_config_covering_index_scan.html#sqliteconfigheap),
                    197: # it's not clear which allocator is appropriate to ship by default so
                    198: # we will not enable either one.
                    199: #
                    200: # https://www.sqlite.org/compile.html#enable_memsys3
                    201: # https://www.sqlite.org/compile.html#enable_memsys5
                    202: 
                    203: # XXX Consider -DSQLITE_ENABLE_NORMALIZE.
                    204: #
                    205: #      This option includes the sqlite3_normalized_sql() API.
                    206: #
                    207: # Unclear what runtime consequences this has.  Unclear what
                    208: # applications outside https://github.com/bloomberg/comdb2 use this.
                    209: #
                    210: # https://www.sqlite.org/compile.html#enable_normalize
                    211: #
                    212: # Gentoo enables: https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-db/sqlite/sqlite-3.47.2.ebuild?id=be159693998b95bddf9c118b2425d9f8a2365a67#n211
                    213: #
                    214: # Arch Linux does not: https://gitlab.archlinux.org/archlinux/packaging/packages/sqlite/-/blob/bf41f088e6ca945d9374838780d5bacb47653277/PKGBUILD#L42-53
                    215: # Debian does not: https://sources.debian.org/src/sqlite3/3.46.1-1/debian/rules/#line43
                    216: # Fedora does not: https://src.fedoraproject.org/rpms/sqlite/blob/182717934c83e9d3ec80f9f818961fd21640c964/f/sqlite.spec#_189
                    217: # FreeBSD does not: https://cgit.freebsd.org/ports/tree/databases/sqlite3/Makefile?id=8d38e8fbf53dfc94507a466b7269b38a55b167ac#n70
                    218: # Homebrew does not: https://github.com/Homebrew/homebrew-core/blob/f6ac42c098379841c21ed3a30e150f26187f34b1/Formula/s/sqlite.rb#L35-L58
                    219: # OpenBSD does not: https://cvsweb.openbsd.org/ports/databases/sqlite3/Makefile?rev=1.132&content-type=text/x-cvsweb-markup
                    220: #
                    221: # https://www.sqlite.org/compile.html#enable_normalize
                    222: 
                    223: # SQLITE_ENABLE_NULL_TRIM -- minor on-disk space optimization with some
                    224: # compatibility issues and potentially blob API bugs.  We will let
                    225: # sleeping dogs lie here.
                    226: #
                    227: # https://www.sqlite.org/compile.html#enable_null_trim
                    228: 
                    229: # XXX Consider -DSQLITE_ENABLE_OFFSET_SQL_FUNC.
                    230: #
                    231: # Unclear what applications need this.  Gentoo and Fedora enable this;
                    232: # others I checked do not.
                    233: #
                    234: #      This option enables support for the sqlite_offset(X) SQL
                    235: #      function.
                    236: #
                    237: #      The sqlite_offset(X) SQL function requires a new interface on
                    238: #      the B-tree storage engine, a new opcode in the virtual machine
                    239: #      that runs SQL statements, and a new conditional in a critical
                    240: #      path of the code generator.  To avoid that overhead in
                    241: #      applications that do not need the utility of sqlite_offset(X),
                    242: #      the function is disabled by default.
                    243: #
                    244: # https://www.sqlite.org/compile.html#enable_offset_sql_func
                    245: #
                    246: #      The sqlite_offset(X) function returns the byte offset in the
                    247: #      database file for the beginning of the record from which value
                    248: #      would be read.  If X is not a column in an ordinary table, then
                    249: #      sqlite_offset(X) returns NULL.  The value returned by
                    250: #      sqlite_offset(X) might reference either the original table or
                    251: #      an index, depending on the query.  If the value X would
                    252: #      normally be extracted from an index, the sqlite_offset(X)
                    253: #      returns the offset to the corresponding index record.  If the
                    254: #      value X would be extracted from the original table, then
                    255: #      sqlite_offset(X) returns the offset to the table record.
                    256: #
                    257: # https://www.sqlite.org/lang_corefunc.html#sqlite_offset
                    258: 
                    259: # XXX Consider SQLITE_ENABLE_ORDERED_SET_AGGREGATES.
                    260: #
                    261: #      This option enables support for the "WITHIN GROUP ORDER BY"
                    262: #      ordered-set aggregate syntax.  For example:
                    263: #
                    264: #          SELECT percentile_cont(0.75) WITHIN GROUP (ORDER BY x) FROM tab;
                    265: #
                    266: #      The above is the SQL-standard way to compute the 75-percentile
                    267: #      value of a distribution.  The usual way to do this in SQLite is
                    268: #      as follows:
                    269: #
                    270: #          SELECT percentile_cont(x,0.75) FROM tab;
                    271: #
                    272: #      Though simpler, easier to read, and easier to type, this syntax
                    273: #      is not compliant with standard SQL.  The simpler, non-standard
                    274: #      syntax is always available in SQLite.  But the SQL-standard
                    275: #      compliant syntax is only available if compiled using
                    276: #      -DSQLITE_ENABLE_ORDERED_SET_AGGREGATES.  The SQL-standard
                    277: #      compliant syntax is disabled by default because (A) it requires
                    278: #      about 1,200 bytes of extra code in the compiled SQLite binary
                    279: #      and (B) because it makes your SQL code more difficult to read,
                    280: #      write, and understand without adding any value.  Use this
                    281: #      option only if you need to write cross-platform SQL that uses
                    282: #      ordered-set aggregate functions such as percentile_cont().
                    283: #
                    284: # This might be useful for generic database wrappers that use this
                    285: # package for a sqlite3 backend.  But nobody else seems to enable this.
                    286: # So let's hold off until the need arises.
                    287: #
                    288: # https://www.sqlite.org/compile.html#enable_ordered_set_aggregates
                    289: 
                    290: # SQLITE_ENABLE_PREUPDATE_HOOK, SQLITE_ENABLE_SESSION -- enables the
                    291: # sqlite3_preupdate_* for pre-update hooks, and the sqlite3session_*
                    292: # APIs for reifying changesets.
                    293: #
                    294: # https://www.sqlite.org/c3ref/preupdate_blobwrite.html
                    295: # https://www.sqlite.org/sessionintro.html
                    296: # https://www.sqlite.org/compile.html#enable_preupdate_hook
                    297: # https://www.sqlite.org/compile.html#enable_session
1.164     adam      298: CONFIGURE_ARGS+=       --session
1.161     riastrad  299: 
                    300: # SQLITE_ENABLE_QPSG -- query planner stability guarantee.  Off by
                    301: # default.  This option turns it on by default.  Applications can
                    302: # always use sqlite3_db_config(SQLITE_DBCONFIG_ENABLE_QPSG) to enable
                    303: # it at run-time, so no need for us to build sqlite3 with it.
                    304: #
                    305: # https://www.sqlite.org/queryplanner-ng.html#qpstab
                    306: # https://www.sqlite.org/compile.html#enable_qpsg
                    307: 
                    308: # XXX Consider SQLITE_ENABLE_RBU, Resumable Bulk Updates.
                    309: #
                    310: # Gentoo enables this; nobody else I found does.
                    311: #
                    312: # https://www.sqlite.org/rbu.html
                    313: # https://www.sqlite.org/compile.html#enable_rbu
                    314: 
                    315: # XXX Consider SQLITE_ENABLE_SNAPSHOT, write-ahead log snapshots.
                    316: #
                    317: # Unclear what applications might use this.  Nobody else seems to
                    318: # enable this.
                    319: #
                    320: # https://www.sqlite.org/c3ref/snapshot.html
                    321: # https://www.sqlite.org/compile.html#enable_snapshot
                    322: 
                    323: # SQLITE_ENABLE_SORTER_REFERENCES -- potential optimization whose value
                    324: # is not clear, off by default.
                    325: #
                    326: # https://www.sqlite.org/compile.html#enable_sorter_references
                    327: 
                    328: # SQLITE_ENABLE_STMT_SCANSTATUS -- enables sqlite3_stmt_scanstatus and
                    329: # sqlite3_stmt_scanstatus_v2.
                    330: #
                    331: #       Those interfaces are normally omitted from the build because
                    332: #       they imposes a performance penalty, even on statements that do
                    333: #       not use the feature.
                    334: #
                    335: # https://www.sqlite.org/c3ref/stmt_scanstatus.html
                    336: # https://www.sqlite.org/compile.html#enable_stmt_scanstatus
                    337: 
                    338: # The SQLITE_STMT virtual table provides information about all prepared
                    339: # statements associated with the database connection.  This is likely
                    340: # to be useful for performance analysis of applications and does not
                    341: # appear to have any performance penalty for applications that don't
                    342: # use it.
                    343: #
                    344: # https://www.sqlite.org/stmt.html
                    345: # https://www.sqlite.org/compile.html#enable_stmtvtab
1.164     adam      346: CFLAGS+=       -DSQLITE_ENABLE_STMTVTAB
1.161     riastrad  347: 
                    348: # SQLITE_RTREE_INT_ONLY
                    349: #
                    350: #      This compile-time option is deprecated and untested.
                    351: #
                    352: # https://www.sqlite.org/compile.html#rtree_int_only
                    353: 
                    354: # SQLITE_ENABLE_SQLLOG
                    355: #
                    356: #      This option enables extra code (especially the
                    357: #      SQLITE_CONFIG_SQLLOG option to sqlite3_config()) that can be
                    358: #      used to create logs of all SQLite processing performed by an
                    359: #      application.
                    360: #
                    361: # Unclear what applications use this or what it does beyond
                    362: # sqlite3_trace_v2 (https://www.sqlite.org/c3ref/trace_v2.html).  Can't
                    363: # find anyone else who enables this.
                    364: #
                    365: # https://www.sqlite.org/c3ref/c_config_covering_index_scan.html#sqliteconfigsqllog
                    366: # https://www.sqlite.org/compile.html#enable_sqllog
                    367: 
                    368: # SQLITE_ENABLE_STAT2, SQLITE_ENABLE_STAT3, SQLITE_ENABLE_STAT4 --
                    369: # statistics tables created by the ANALYZE command.
                    370: # SQLITE_ENABLE_STAT2 and SQLITE_ENABLE_STAT3 are now ignored.
                    371: # SQLITE_ENABLE_STAT4 is not enabled by default and it's unclear what
                    372: # the performance implications are, but it appears likely to expand
                    373: # disk usage and potentially break the query planner stability
                    374: # guarantee, so we'll leave it off for now.
                    375: #
                    376: # https://www.sqlite.org/fileformat2.html#stat4tab
                    377: # https://www.sqlite.org/compile.html#enable_stat2
                    378: # https://www.sqlite.org/compile.html#enable_stat3
                    379: # https://www.sqlite.org/compile.html#enable_stat4
                    380: 
                    381: # SQLITE_ENABLE_TREE_EXPLAIN
                    382: #
                    383: #      This compile-time option is no longer used.
                    384: #
                    385: # https://www.sqlite.org/compile.html#enable_tree_explain
                    386: 
                    387: # XXX Consider SQLITE_ENABLE_UPDATE_DELETE_LIMIT:
                    388: #
                    389: #      This option enables an optional ORDER BY and LIMIT clause on
                    390: #      UPDATE and DELETE statements.
                    391: #
                    392: # Unclear what applications might rely on this.  Debian and Gentoo
                    393: # enable this by default; others do not.
                    394: #
                    395: # https://www.sqlite.org/compile.html#enable_update_delete_limit
                    396: 
                    397: # XXX Consider SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION -- enables the
                    398: # `unknown()' function for (and only for) EXPLAIN or EXPLAIN QUERY
                    399: # PLAN, as a substitute for any functions sqlite3 does not recognize.
                    400: #
                    401: #      When used in the command-line shell, the
                    402: #      SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION feature allows SQL text that
                    403: #      contains application-defined functions to be pasted into the
                    404: #      shell for analysis and debugging without having to create and
                    405: #      load an extension that implements the application-defined
                    406: #      functions.
                    407: #
                    408: # However, this might be useful _only_ for the command-line shell;
                    409: # unclear what applications might rely on failure vs unknown().
                    410: #
                    411: # https://www.sqlite.org/compile.html#enable_unknown_sql_function
                    412: 
                    413: # SQLITE_ENABLE_UNLOCK_NOTIFY -- enables sqlite3_unlock_notify(),
                    414: # needed for various sqlite3 API calls to sleep rather than fail with
                    415: # SQLITE_LOCKED when another thread is using another connection to the
                    416: # same database, so they can be woken by the other thread when it is
                    417: # done.  Needed by, e.g., Firefox.
                    418: #
                    419: # https://www.sqlite.org/unlock_notify.html
                    420: # https://www.sqlite.org/compile.html#enable_unlock_notify
1.164     adam      421: CFLAGS+=       -DSQLITE_ENABLE_UNLOCK_NOTIFY
1.161     riastrad  422: 
                    423: # SQLITE_INTROSPECTION_PRAGMAS
                    424: #
                    425: #      This option is obsolete.
                    426: #
                    427: # https://www.sqlite.org/compile.html#introspection_pragmas
                    428: 
                    429: # XXX Consider SQLITE_SOUNDEX:
                    430: #
                    431: #      This option enables the soundex() SQL function.
                    432: #
                    433: # Debian and Gentoo enable this by default; others do not.
                    434: #
                    435: # https://www.sqlite.org/lang_corefunc.html#soundex
                    436: # https://www.sqlite.org/compile.html#soundex
                    437: 
                    438: # XXX Consider SQLITE_STRICT_SUBTYPE=1:
                    439: #
                    440: #      This option causes application-defined SQL functions to raise
                    441: #      an SQL error if they invoke the sqlite3_result_subtype()
                    442: #      interface but where not registered with the
                    443: #      SQLITE_RESULT_SUBTYPE property.  This recommended option helps
                    444: #      to identify problems in the implementation of
                    445: #      application-defined SQL functions early in the development
                    446: #      cycle.
                    447: #
                    448: # Debian and FreeBSD enable this; others do not.
                    449: #
                    450: # https://www.sqlite.org/compile.html#strict_subtype
                    451: 
                    452: # XXX Consider SQLITE_USE_ALLOCA:
                    453: #
                    454: #      If this option is enabled, then the alloca() memory allocator
                    455: #      will be used in a few situations where it is appropriate.  This
                    456: #      results in a slightly smaller and faster binary.  The
                    457: #      SQLITE_USE_ALLOCA compile-time only works, of course, on
                    458: #      systems that support alloca().
                    459: #
                    460: # Nobody else seems to enable this.
                    461: #
                    462: # https://www.sqlite.org/compile.html#use_alloca
                    463: 
                    464: # XXX Consider SQLITE_USE_FCNTL_TRACE:
                    465: #
                    466: #      This option causes SQLite to issue extra SQLITE_FCNTL_TRACE
                    467: #      file controls to provide supplementary information to the VFS.
                    468: #      The "vfslog.c" extension makes use of this to provide enhanced
                    469: #      logs of VFS activity.
                    470: #
                    471: # Nobody else seems to enable this.  Unclear what applications this
                    472: # benefits.
                    473: #
                    474: # https://www.sqlite.org/compile.html#use_fcntl_trace
                    475: 
                    476: # SQLITE_USE_SEH
                    477: #
                    478: #      Client code should not use this define, as it is used
                    479: #      internally by the library.
                    480: #
                    481: # https://www.sqlite.org/compile.html#use_seh
                    482: 
                    483: # XXX Consider SQLITE_HAVE_ZLIB:
                    484: #
                    485: #      This option has no effect on the SQLite core.  It is only used
                    486: #      by extensions.  This is option is necessary for the compression
                    487: #      and decompression functions that are part of SQL Archive
                    488: #      support in the command-line shell.
                    489: #
                    490: # https://www.sqlite.org/compile.html#have_zlib
1.165     riastrad  491: #
                    492: # XXX sqlite3 appears to automatically pull zlib in if it's available
                    493: # in the system, even if buildlink3 hasn't authorized it.  And on some
                    494: # platforms with pkgsrc zlib and system zlib, this may confuse the
                    495: # REQUIRES processing, making pkg_add choke on the sqlite3 package.
                    496: # Let's forcibly disable it for now (can't find a --disable-zlib
                    497: # option, so we'll have to use a big buildlink3 hammer) until we
                    498: # discuss whether sqlite3 should have zlib linked in, as a conscious
                    499: # decision rather than an accident.
                    500: BUILDLINK_TRANSFORM+=  rm:-lz
                    501: BUILDLINK_TRANSFORM+=  rm:-DSQLITE_HAVE_ZLIB=1
1.161     riastrad  502: 
                    503: # XXX Consider YYTRACKMAXSTACKDEPTH:
                    504: #
                    505: #      This option causes the LALR(1) parser stack depth to be tracked
                    506: #      and reported using the
                    507: #      sqlite3_status(SQLITE_STATUS_PARSER_STACK,...)  interface.
                    508: #      SQLite's LALR(1) parser has a fixed stack depth (determined at
                    509: #      compile-time using the YYSTACKDEPTH options).  This option can
                    510: #      be used to help determine if an application is getting close to
                    511: #      exceeding the maximum LALR(1) stack depth.
                    512: 
                    513: # SQLITE_OMIT_LOAD_EXTENSION (old: !SQLITE_ENABLE_LOAD_EXTENSION)
                    514: #
                    515: # Make sure this is consistently enabled on all platforms -- this way
                    516: # the build fails early if something goes wrong with getting at dlopen.
                    517: # (XXX If we have platforms without dlopen, we may want to disable this
                    518: # on those platforms.)
                    519: #
                    520: # https://www.sqlite.org/compile.html#omit_load_extension
1.164     adam      521: CONFIGURE_ARGS+=       --enable-load-extension
1.29      tnn       522: 
1.16      epg       523: # Uses dlopen and friends but doesn't use -ldl on Linux.
                    524: # See http://www.sqlite.org/cvstrac/tktview?tn=3555
1.164     adam      525: LIBS+=         ${BUILDLINK_LDADD.dl}
1.16      epg       526: 
1.161     riastrad  527: # Solaris needs -lrt for nanosleep, PR pkg/58714
1.164     adam      528: LIBS.SunOS+=   -lrt
1.156     nia       529: 
1.80      ryoon     530: .if ${OS_VARIANT} == "SCOOSR5"
                    531: LDFLAGS.SCO_SV+=       -lpthread
                    532: .endif
                    533: 
1.164     adam      534: .if ${OPSYS} == "Darwin"
                    535: post-install:
                    536:        install_name_tool -id ${PREFIX}/lib/libsqlite3.dylib \
                    537:                ${DESTDIR}${PREFIX}/lib/libsqlite3.dylib
                    538: .endif
                    539: 
                    540: .include "../../mk/dlopen.buildlink3.mk"
1.127     sevan     541: .include "../../mk/pthread.buildlink3.mk"
1.67      ryoon     542: .include "../../mk/readline.buildlink3.mk"
1.1       tv        543: .include "../../mk/bsd.pkg.mk"

CVSweb <webmaster@jp.NetBSD.org>