.\" .\" Copyright (c) 2007-2012 Hypertriton, Inc. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, .\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES .\" (INCLUDING BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR .\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd JULY 19, 2007 .Dt MKCONFIGURE 1 .Os .ds vT BSDBuild Reference .ds oS BSDBuild 2.8 .Sh NAME .Nm mkconfigure .Nd Compile BSDBuild configure scripts .Sh SYNOPSIS .Nm mkconfigure .Sh DESCRIPTION The .Nm program reads a .Pa configure.in source from the standard input and outputs a valid Bourne configure script to the standard output. .Pp The .Pa 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. .Sh MKCONFIGURE DIRECTIVES .Pp .Nm directives are case-insensitive. The following directives are recognized: .Bl -tag -width "REQUIRE(package[,version[,prefix]]) " .It Ev PACKAGE(name) Short name for the software package. .It Ev VERSION(string) Specify software version. .It Ev RELEASE(string) Specify release name. .It Ev CHECK(package[,version[,prefix]]) Invoke one of the standard BSDBuild tests (see the BSDBuild website for a list). Most tests will set the .Dv HAVE_FOO (where .Dv FOO is the package name in upper-case) variable to indicate the results of the test. C/C++ libraries also typically set .Dv FOO_CFLAGS and .Dv FOO_LIBS . .Pp If the optional .Fa version argument is specified, the version number is verified as well and .Dv MK_VERSION_OK is defined to .Sq yes if the versions are compatible. A version argument of 0 indicates that no version checking should be done. .Pp If the optional .Fa 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 .Sq ${prefix_foo}, which returns the value in .Sq --enable-foo=VALUE or .Sq --with-foo=VALUE options. .It Ev REQUIRE(package[,version[,prefix]]) Same as the .Ev CHECK directive, except that the configure script will fail if the package is either not found, or if the version is too old. .It Ev TEST_DIR(path) Specify an extra directory in which to search for BSDBuild test modules (.pm files). .It Ev REGISTER(name,descr) Describe a configure script argument (for --help). The .Fa name argument is usually of the form .Ar --with-foo or .Ar --enable-foo ) , and .Fa descr is a description of the option (it is also customary to mention the default value of this option in the description). .It Ev REGISTER_SECTION(string) Describe a section of configure script arguments (for --help). .It Ev HDEFINE(opt,val) Define a C preprocessor style header option. .Fa opt is an unquoted, usually upper-case string and .Fa val is a string enclosed in double quotes. For example, if .Fa opt is .Sq ENABLE_FOO , a file .Pa config/enable_foo.h will be generated by configure. .It Ev HDEFINE_UNQUOTED(opt,val) Same as .Ev HDEFINE() , except that the value is left unquoted. .It Ev HUNDEF(opt) Similar to .Ev HDEFINE , except that .Pa config/