Skip to content

ext: smarter sqlcipher config params, and a user help message#330

Merged
flavorjones merged 2 commits intomasterfrom
flavorjones-extconf-help-message
Aug 9, 2022
Merged

ext: smarter sqlcipher config params, and a user help message#330
flavorjones merged 2 commits intomasterfrom
flavorjones-extconf-help-message

Conversation

@flavorjones
Copy link
Copy Markdown
Member

Any of the standard mkmf dir_config parameters for sqlcipher now imply both --enable-system-libraries and --with-sqlcipher. Specifically these are --with-sqlicpher-dir, --with-sqlcipher-include, and --with-sqlcipher-lib.

Also I've added a --help option that emits info about the supported parameters. That help text is:

          USAGE: ruby #{$PROGRAM_NAME} [options]

            Flags that are always valid:

                --disable-system-libraries
                    Use the packaged libraries, and ignore the system libraries.
                    (This is the default behavior.)

                --enable-system-libraries
                    Use system libraries instead of building and using the packaged libraries.

                --with-sqlcipher
                    Use libsqlcipher instead of libsqlite3.
                    (Implies `--enable-system-libraries`.)

                --help
                    Display this message.


            Flags only used when using system libraries:

                General (applying to all system libraries):

                    --with-opt-dir=DIRECTORY
                        Look for headers and libraries in DIRECTORY.

                    --with-opt-lib=DIRECTORY
                        Look for libraries in DIRECTORY.

                    --with-opt-include=DIRECTORY
                        Look for headers in DIRECTORY.

                Related to sqlcipher:

                    --with-sqlcipher-dir=DIRECTORY
                        Look for sqlcipher headers and library in DIRECTORY.
                        (Implies `--with-sqlcipher` and `--enable-system-libraries`.)

                    --with-sqlcipher-lib=DIRECTORY
                        Look for sqlcipher library in DIRECTORY.
                        (Implies `--with-sqlcipher` and `--enable-system-libraries`.)

                    --with-sqlcipher-include=DIRECTORY
                        Look for sqlcipher headers in DIRECTORY.
                        (Implies `--with-sqlcipher` and `--enable-system-libraries`.)


            Flags only used when building and using the packaged libraries:

                --enable-cross-build
                    Enable cross-build mode. (You probably do not want to set this manually.)


            Environment variables used for compiling the C extension:

                CC
                    Use this path to invoke the compiler instead of `RbConfig::CONFIG['CC']`


            Environment variables passed through to the compilation of packaged libraries:

                CC
                CPPFLAGS
                CFLAGS
                LDFLAGS
                LIBS
                LT_SYS_LIBRARY_PATH
                CPP

@flavorjones flavorjones requested a review from tenderlove August 6, 2022 19:22
@flavorjones flavorjones merged commit cc6643c into master Aug 9, 2022
@flavorjones flavorjones deleted the flavorjones-extconf-help-message branch August 9, 2022 12:10
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.

1 participant