Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
MKCONFIGURE(1)		    General Commands Manual		MKCONFIGURE(1)

NAME
       mkconfigure -- Compile BSDBuild configure scripts

SYNOPSIS
       mkconfigure

DESCRIPTION
       The  mkconfigure	 program reads a configure.in source from the standard
       input and outputs a valid Bourne	configure script to the	standard  out-
       put.

       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
       mkconfigure directives are case-insensitive.  The following  directives
       are recognized:

       PACKAGE(name)			     Short name	for the	software pack-
					     age.

       VERSION(string)			     Specify software version.

       RELEASE(string)			     Specify release name.

       CHECK(package[,version[,prefix]])     Invoke  one  of the standard BSD-
					     Build  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++ li-
					     braries   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,  ex-
					     cept  that	 the  configure	script
					     will fail if the package  is  ei-
					     ther 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 argu-
					     ment (for --help).	 The name  ar-
					     gument  is	 usually  of  the form
					     --with-foo	or --enable-foo),  and
					     descr is a	description of the op-
					     tion  (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  un-
					     quoted, 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  gen-
					     erated 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 un-
					     quoted, 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 re-
					     sults 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  com-
					     mand  line, but it	is also	inter-
					     preted 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  di-
					     rectory).	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	(--in-
					     cludes=yes, the default), or cre-
					     ate a set of  symbolic  links  to
					     the original include files	in the
					     source	 directory	(--in-
					     cludes=link).

       C_OPTION				     Provide a gcc-style compiler  op-
					     tion,  such  as -Wall, -Werror or
					     -Wmissing-prototypes.  For	 envi-
					     ronments  using  other compilers,
					     BSDBuild  will  attempt  to   set
					     equivalent	options.

       LD_OPTION			     Provide a ld-style	linker option,
					     such as -g	or -nostdlib.

       C_EXTRA_WARNINGS			     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 usu-
					     ally the `--cflags' output,  fol-
					     lowed 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_HEADER(header[, ...])	     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.

       CHECK_HEADER_OPTS(cflags, libs, header[,	...])
					     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 function-
					     ing.   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  in-
					     stallation	 path  defaults.   The
					     dirname argument may be  one  of:
					     PREFIX,  BINDIR,  LIBDIR,	LIBEX-
					     ECDIR,	DATADIR,     STATEDIR,
					     SYSCONFDIR, LOCALEDIR or MANDIR.

SEE ALSO
       build.common.mk(5), build.lib.mk(5), build.prog.mk(5)

       http://hypertriton.com/bsdbuild/

FreeBSD	ports 15.0		 JULY 19, 2007			MKCONFIGURE(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=mkconfigure&sektion=1&manpath=FreeBSD+Ports+15.0>

home | help