Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow building without SQLite3 #3999

Merged
merged 1 commit into from
Aug 30, 2020

Conversation

whitslack
Copy link
Collaborator

Summary of proposed changes:

  • Introduce SQLITE3_CFLAGS and SQLITE3_LDLIBS config variables, whose values are automagically populated by calling out to pkg-config. If pkg-config is not found, then the new variables are defaulted as SQLITE3_CFLAGS= and SQLITE3_LDLIBS=-lsqlite3, which allows configure to continue working as before on systems lacking pkg-config.
    • When running configure, allow the user to override the name of pkg-config by setting the PKG_CONFIG environment variable. If unset, the default is pkg-config, which means to use the system default (i.e., in $PATH) copy of pkg-config. Cross-compiling users would set the PKG_CONFIG environment variable to the path of a pkg-config binary that provides information about packages built for the target system.
  • Pass $SQLITE3_CFLAGS to Configurator, and add it to CFLAGS in Makefile.
  • Pass $SQLITE3_LDLIBS in place of -lsqlite3, both in Makefile and in the Configurator script.
  • Tweak a few source files so that they compile successfully when HAVE_SQLITE3=0.
  • Omit devtools/checkchannels from build when HAVE_SQLITE3=0, as that tool requires SQLite3.

Changelog-Changed: build: SQLite3 is no longer a hard build requirement. C-Lightning can now be built to support only the PostgreSQL back-end.
Copy link
Contributor

@rustyrussell rustyrussell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack 38cd1a8

Nice work!

@cdecker cdecker merged commit abbc712 into ElementsProject:master Aug 30, 2020
@cdecker
Copy link
Member

cdecker commented Aug 30, 2020

ACK 38cd1a8

@whitslack whitslack deleted the without-sqlite3 branch August 30, 2020 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants