A setup-script is a normal Scheme-program, which should contain an invocation of the chicken-setup macro, like this:
(chicken-setup (command-line-arguments) SPEC ...)
-build Builds the extension by compiling any provided source files.
-install Installs the extension. You might have to have root-privileges, if the registry of installed extensions is located in a system-directory. The extension will be built, if it isn't already.
-wrap Creates an archive from all source files and the setup-script. If the extension contains more than a single source file, then there must exist a directory with the same name as the extension containing all needed files.
-uninstall Deletes an extension from the registry,
If no argument is given, then the extension will be extracted, built and installed in one step.
SPEC is a setup-specification that describes the structure and attributes of the extension:
(EXTENSION-NAME (ATTRIBUTE ...) SUBMODULE ...) )
EXTENSION-NAME is a symbol naming the extension.
ATTRIBUTE is a list with one or more elements, where the first element must be a symbol naming an extension attribute.
SUBMODULE is again an setup-specification of a nested extension-module.
The following attributes are allowed:
(require-for-syntax EXT)
where EXT is defined with a specification that contains an attribute like
(require-at-runtime EXTR1 EXTR2)
will result in this code
(require 'EXTR1 'EXTR2)
'cflags STRING Extra C compiler options that should be passed to the C compiler.
'ldflags STRING Extra linker options that should be passed to the linker.
'verbose BOOLEAN If true, show invocation line of the compiler.
'cc STRING What C compiler to use. The default is the one used to build the Chicken system.
'run BOOLEAN If true, the generated executable is run. If the exit-code is non-zero, the result of test-compile will be #f.
'compile-only BOOLEAN If true, the code will be compiled, but not linked.