
The _dynext_ collection provides three libraries --- compile.ss,
link.ss, and file.ss --- for communicating with a platform-specific C
compiler and linker.

_compile.ss_
------------

> (compile-extension quiet? input-file output-file includes)
   quiet? - Boolean indicating whether command should be echoed to stdout
   input-file - A C source filename
   output-file - A compiled object filename
   includes - A list of include directories; MzScheme's include is
              added automatically.

Compilation is controlled by a number of parameters for Windows
and Unix:

>  current-extension-compiler - compiler executable pathname or
    #f. The default is set by searching for an executable using the
    PATH environment variable. Under windows, the search looks for
    cl.exe, then gcc.exe, then bcc32.exe (Borland). Under Unix, it
    checks the MZSCHEME_DYNEXT_COMPILER environment variable, then
    looks for gcc, then cc. #f indicates that no compiler could be
    found.

>  current-extension-compiler-flags - list of strings passed to the
    compiler as flags. Under Windows, the default is (list "/c" "/O2")
    for cl.exe, (list "-c" "-O2") for gcc.exe and bcc32.exe; under
    Unix, (list "-c" "-O2").

>  current-make-compile-include-strings - procedure that takes an
    include directory path and returns a list of strings for the
    command line.  Windows: "dir" -> (list "/Idir") for cl.exe, (list
    "-Idir") for gcc.exe and bcc32.exe; Unix: "dir" -> (list "-Idir")

>  current-make-compile-input-strings - procedure that takes an
    input file and returns a list of strings for the command line.
    The default is `list'.

>  current-make-compile-output-strings - procedure that takes an
    output file and returns a list of strings for the command line.
    Windows: "file" -> (list "/Fofile") for cl.exe, (list "-o" "file")
    for gcc.exe and bcc32.exe; Unix: "file" -> (list "-o" "file")

> (use-standard-compiler name) sets the above parameters for a
    particular known compiler. The acceptable names are 
    platforms-specific:
      Unix: 'cc or 'gcc
      Windows: 'gcc, 'msvc, or 'borland
      MacOS: 'cw

> (get-standard-compilers) returns a list of standard compiler
    names for the current platform.

Under MacOS, none of these options are used. The compiler always
uses CodeWarrior if it can be found and the compilation options
cannot be changed.

The unit/sig form defined by _compiler.ss_ (signature in
_compiles.ss_) requires no imports.

_link.ss_
---------

> (link-extension quiet? input-files output-file)
   quiet? - Boolean indicating whether command should be echoed to stdout
   input-files - A list of compiled object filenames
   output-file - An extension filename

   For Windows, a special linking sequence is initiated if the
   linker's name is ld.exe (for gcc).

Linking parameters:

>  current-extension-linker - linker executable pathname or #f. 
     The default is set by searching for an executable using the PATH
     environment variable. Under Windows, it looks for cl.exe, then
     ld.exe (gcc), then ilink32.exe (Borland). Under Unix it checks
     the MZSCHEME_DYNEXT_LINKER environment variable, then, except
     AIX, it looks for ld. Under AIX, it looks for cc. #f indicates
     that no linker could be found.

>  current-extension-linker-flags - list of strings. Under Windows,
     default is (list "/LD") for cl.exe, (list "--dll") for ld.exe,
     (list "/Tpd" "/c") for ilink32.exe.  Under Unix, the default
     varies greatly among platforms.

>  current-make-link-input-strings - procedure that takes an
     input file and returns a list of strings for the command line.
     The default is `list'.

> current-make-link-output-strings - procedure that takes an output
    file and returns a list of strings for the command line.  Windows:
    "file" -> (list "/Fefile") for cl.exe, something like (list "-e"
    "_dll_entry@12" "-o" "file") for ld.exe, something complex for
    ilink32.exe; Unix: "file" -> (list "-o" "file")

>  current-standard-link-libraries - list of file paths; For
    most platforms, the default is 
     (list (build-path (collection-path "mzscheme" "lib") 
                       (system-library-subpath)
                       "mzdyn.o"))

> (use-standard-linker name) sets the above parameters for a
    particular known linker. The acceptable names are 
    platforms-specific, the same as for use-standard-compiler.

Under MacOS, none of these options are used. The linker always uses
CodeWarrior if it can be found and the linking options cannot be
changed.

The unit/sig form defined by _linkr.ss_ (signature in _links.ss_)
requires no imports.

_file.ss_
---------

> (append-zo-suffix s) - appends the .zo file suffix to s.

> (append-object-suffix s) - appends the platform-standard compiled
   object file suffix to s.

> (append-c-suffix s) - appends the platform-standard C source
   file suffix to s.

> (append-constant-pool-suffix s) - appends the constant pool file
   suffix (.kp) to s.

> (append-extension-suffix s) - appends the platform-standard dynamic
   extension file suffix to s.

> (extract-base-filename/ss s program) - strips the Scheme file suffix
   from the path s and returns the stripped pathname. If s is not a
   Scheme file name and `program' is a symbol, and error is signalled.
   If s is not a Scheme file and `program' is #f, #f is returned. The
   `program' argument is optional and defaults to #f.

> (extract-base-filename/c s program) - same as
   extract-base-filename/ss, but for C source files.

> (extract-base-filename/kp s program) - same as
   extract-base-filename/ss, but for constant pool files.

> (extract-base-filename/o s program) - same as
   extract-base-filename/ss, but for compiled object files.

> (extract-base-filename/ext s program) - same as
   extract-base-filename/ss, but for extension files.

The unit/sig defined by _filer.ss_ (signature in _files.ss_) requires
no imports.
