|
|
| |
MKCONFIGURE(1) |
FreeBSD General Commands Manual |
MKCONFIGURE(1) |
mkconfigure —
Compile BSDBuild configure scripts
The mkconfigure program reads a
configure.in source from the standard input and
outputs a valid Bourne configure script to the standard output.
The configure.in source can contain a
number of special directives, along with Bourne shell code fragments that
will be copied verbatim to the configure script. Long lines in the input
script can be broken with end-of-line backslash (\) characters.
mkconfigure directives are case-insensitive. The
following directives are recognized:
PACKAGE(name)
- Short name for the software package.
VERSION(string)
- Specify software version.
RELEASE(string)
- Specify release name.
CHECK(package[,version[,prefix]])
- Invoke one of the standard BSDBuild tests (see the BSDBuild website for a
list). Most tests will set the
HAVE_FOO (where
FOO is the package name in upper-case) variable to
indicate the results of the test. C/C++ libraries also typically set
FOO_CFLAGS and FOO_LIBS .
If the optional version argument is
specified, the version number is verified as well and
MK_VERSION_OK is defined to ‘yes’
if the versions are compatible. A version argument of 0 indicates that
no version checking should be done.
If the optional prefix argument is
defined, the test will look for the package only under the specified
prefix, and the test will fail if it cannot be found under it. This is
typically set to ‘${prefix_foo},’ which returns the value
in ‘--enable-foo=VALUE’ or
‘--with-foo=VALUE’ options.
REQUIRE(package[,version[,prefix]])
- Same as the
CHECK directive, except that the
configure script will fail if the package is either not found, or if the
version is too old.
TEST_DIR(path)
- Specify an extra directory in which to search for BSDBuild test modules
(.pm files).
REGISTER(name,descr)
- Describe a configure script argument (for --help). The
name argument is usually of the form
--with-foo or --enable-foo),
and descr is a description of the option (it is also
customary to mention the default value of this option in the
description).
REGISTER_SECTION(string)
- Describe a section of configure script arguments (for --help).
HDEFINE(opt,val)
- Define a C preprocessor style header option. opt is
an unquoted, usually upper-case string and val is a
string enclosed in double quotes. For example, if
opt is ‘ENABLE_FOO’, a file
config/enable_foo.h will be generated by
configure.
HDEFINE_UNQUOTED(opt,val)
- Same as
HDEFINE() , except that the value is left
unquoted.
HUNDEF(opt)
- Similar to
HDEFINE , except that
config/<option>.h will contain an #undef
directive.
MDEFINE(opt,val)
- Define a
make(1)
variable, which will be visible in the project's makefiles.
opt is again an unquoted, usually upper-case string
and val is a value enclosed in double quotes.
MAPPEND(opt,val)
- Same effect as
MDEFINE() , except that the value is
appended to the variable (following a space).
C_DEFINE(opt)
- (C-style compilers only) Specify a global define that will be passed to
the compiler. This results in the -DFOO flag being
used in compiler command lines, but it is also interpreted by
build.proj.mk(5).
C_INCDIR(dir)
- (C-style compilers only) Specify a directory for include files. This
results in the -Idir flag being added to the
compiler command line, but it is also interpreted by
build.proj.mk(5).
C_INCDIR_CONFIG(dir)
- (C-style compilers only) Specify a target directory for individual include
files with configure-script generated statements (i.e.,
HAVE_FOO is written to
have_foo.h in the specified directory). Pass an
empty argument to disable. By default, ./config is
used. This directive should be only called once, and may be placed
anywhere in configure.in.
C_INCLUDE_CONFIG(file)
- (C-style compilers only) Specify a monolithic C include file which will
contain configure-script generated statements (i.e.,
HAVE_FOO defines). Pass an empty argument to
disable (default). This directive should be only called once, and may be
placed anywhere in configure.in.
C_INCPREP(dir)
- (C-style compilers only) Specify absolute path to directory which will
contain include files. The configure script provides the user with the
option of either generating preprocessed header files into this directory
(--includes=yes, the default), or create a set of symbolic links to the
original include files in the source directory (--includes=link).
C_OPTION
- Provide a gcc-style compiler option, such as -Wall,
-Werror or
-Wmissing-prototypes. For environments using other
compilers, BSDBuild will attempt to set equivalent options.
LD_OPTION
- Provide a ld-style linker option, such as -g or
-nostdlib.
- Request extra compiler warnings. The exact meaning is compiler
specific.
C_FATAL_WARNINGS
- Request that compilation fail if warnings are encountered.
CONFIG_SCRIPT(name[,args])
- Generate a standard "foo-config" script.
name specifies the name of the script. For C/C++
style packages, the arguments are usually the ‘--cflags’
output, followed by the ‘--libs’ output.
CONFIG_CACHE(yes|no)
- Enable support for caching of test results (./configure --cache option).
By default, caching is disabled.
CONFIG_GUESS(path)
- Specify an alternate path to config.guess (default
is mk/config.guess).
- Check whether one or more header files are available under the current
C/C++ compiler settings. If a header file such as
sys/foo.h is found,
HAVE_SYS_FOO_H is defined.
- Same as
CHECK_HEADER() , except that the headers
are tested using the provided CFLAGS and LIBS.
CHECK_FUNC(foofunction[,
...])
- Check for the existence of one or more functions. If a function
foofunction () is found,
HAVE_FUNCTION_NAME is defined.
CHECK_FUNC_OPTS(cflags,
libs, foofunction[, ...])
- Same as
CHECK_FUNCTION() , except that the function
is tested using the provided CFLAGS and LIBS.
CHECK_PERL_MODULE(modulename)
- Check that the specified Perl module is installed and functioning. For
example, if modulename is "Time::Zone",
the macro will set the variable "HAVE_TIME_ZONE"
accordingly.
REQUIRE_PERL_MODULE(modulename)
- Same as
CHECK_PERL_MODULE , except that the
configure script will abort if the module is not found.
DEFAULT_DIR(dirname,
path)
- Override one of the standard installation path defaults. The
dirname argument may be one of: PREFIX, BINDIR,
LIBDIR, LIBEXECDIR, DATADIR, STATEDIR, SYSCONFDIR, LOCALEDIR or
MANDIR.
Visit the GSP FreeBSD Man Page Interface. Output converted with ManDoc. |