MKCONFIGURE(1)
π MKCONFIGURE(1) β General Commands Manual π
okay bestie, sit down, we're learning mkconfigure today and honestly? she's iconic. iykyk.
β¨ NAME β¨
mkconfigure β compile BSDBuild configure scripts π οΈβ¨
π SYNOPSIS π
mkconfigure
π¦ DESCRIPTION π¦
so here's the vibe: mkconfigure reads a configure.in source from standard input and outputs a valid Bourne configure script to standard output. like a little glow-up machine for your build system, no cap. π
your configure.in source can hold a bunch of special directives, plus plain Bourne shell code fragments that get copied over verbatim into the configure script. no editing, no meddling, just straight through. π«Ά
and if your lines are getting long and dramatic, you can break them with an end-of-line backslash (\) character. she's flexible like that. β¨
π MKCONFIGURE DIRECTIVES π
first things first: mkconfigure directives are case-insensitive. periodt. so don't stress about the caps. here's the full roster, every single one of them, bestie: π
PACKAGE(name)β the short name for the software package. like her government name but shorter. π·οΈVERSION(string)β specify the software version. yes, the number. the important one. π’RELEASE(string)β specify the release name. a little nickname for the drop. πCHECK(package[,version[,prefix]])β invoke one of the standard BSDBuild tests (peep the BSDBuild website for the full list, bestie π). most tests will set theHAVE_FOOvariable β whereFOOis the package name in upper-case β to show you the results of the test. and C/C++ libraries also typically setFOO_CFLAGSandFOO_LIBS. so many variables, so little time. π- if the optional
versionargument is specified, the version number gets verified too, andMK_VERSION_OKis defined toyesif the versions are compatible. π₯³ - a
versionargument of0means no version checking should be done. zero, zip, nothing. π« - if the optional
prefixargument is defined, the test looks for the package only under the specified prefix, and the test fails if it can't be found under it. this is typically set to${prefix_foo},which returns the value in the--enable-foo=VALUEor--with-foo=VALUEoptions. that's the group-chat handshake for build flags, fr fr. π€
- if the optional
REQUIRE(package[,version[,prefix]])β same as theCHECKdirective, except the configure script will fail if the package is either not found, or if the version is too old. she's not asking, she's telling. πTEST_DIR(path)β specify an extra directory to search for BSDBuild test modules (.pmfiles). more places to look = more chances to slay. πREGISTER(name,descr)β describe a configure script argument (for--help). thenameargument is usually of the form--with-fooor--enable-foo, anddescris a description of the option (it's also customary to mention the default value of this option in the description. yes, the default. say it out loud. π£οΈπ ).REGISTER_SECTION(string)β describe a section of configure script arguments (for--help). headings for your headings. aesthetic. πHDEFINE(opt,val)β define a C preprocessor style header option.optis an unquoted, usually upper-case string, andvalis a string enclosed in double quotes. for example, ifoptisENABLE_FOO, a fileconfig/enable_foo.hwill be generated byconfigure. cute header, bestie. πHDEFINE_UNQUOTED(opt,val)β same asHDEFINE(), except the value is left unquoted. she's free, she's wild. π¦HUNDEF(opt)β similar toHDEFINE, exceptconfig/<option>.hwill contain an#undefdirective. undefine her, she's done. πMDEFINE(opt,val)β define amake(1)variable, which will be visible in the project's makefiles.optis again an unquoted, usually upper-case string, andvalis a value enclosed in double quotes. makefile royalty. πMAPPEND(opt,val)β same effect asMDEFINE(), except the value gets appended to the variable (following a space). yes, the space matters. we stan proper spacing. β¨C_DEFINE(opt)β (C-style compilers only π©΅) specify a global define that will be passed to the compiler. this results in the-DFOOflag being used in compiler command lines, but it's also interpreted bybuild.proj.mk(5). double duty, main character energy. π₯C_INCDIR(dir)β (C-style compilers only π©΅) specify a directory for include files. this results in the-Idirflag being added to the compiler command line, but it's also interpreted bybuild.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_FOOis written tohave_foo.hin the specified directory). pass an empty argument to disable. by default,./configis used. β οΈ this directive should be only called once, and may be placed anywhere inconfigure.in. one and done, bestie.C_INCLUDE_CONFIG(file)β (C-style compilers only π©΅) specify a monolithic C include file which will contain configure-script generated statements (i.e.,HAVE_FOOdefines). pass an empty argument to disable (default). β οΈ this directive should be only called once, and may be placed anywhere inconfigure.in. one big file, one big moment. π«ΆC_INCPREP(dir)β (C-style compilers only π©΅) specify an absolute path to a directory which will contain include files. the configure script gives the user the option of either generating preprocessed header files into this directory (--includes=yes, the default), or creating a set of symbolic links to the original include files in the source directory (--includes=link). you get a choice, bestie, live your truth. πC_OPTIONβ provide a gcc-style compiler option, such as-Wall,-Werroror-Wmissing-prototypes. for environments using other compilers, BSDBuild will attempt to set equivalent options. she's adaptable π β¨LD_OPTIONβ provide a ld-style linker option, such as-gor-nostdlib. linking but make it fashion. πC_EXTRA_WARNINGSβ request extra compiler warnings. the exact meaning is compiler specific. (iykyk π)C_FATAL_WARNINGSβ request that compilation fail if warnings are encountered. no warnings allowed, periodt. πCONFIG_SCRIPT(name[,args])β generate a standard"foo-config"script.namespecifies the name of the script. for C/C++ style packages, the arguments are usually the--cflagsoutput, followed by the--libsoutput. like a lil business card for your package. πͺͺCONFIG_CACHE(yes|no)β enable support for caching of test results (the./configure --cacheoption). by default, caching is disabled. πCONFIG_GUESS(path)β specify an alternate path toconfig.guess(default ismk/config.guess). she can be found elsewhere if you want. πΊοΈCHECK_HEADER(header[, ...])β check whether one or more header files are available under the current C/C++ compiler settings. if a header file such assys/foo.his found,HAVE_SYS_FOO_His defined. header found = variable unlocked. πβ¨CHECK_HEADER_OPTS(cflags, libs, header[, ...])β literally the same energy asCHECK_HEADER(), except the headers get vibe-checked using theCFLAGSandLIBSyou hand it πCHECK_FUNC(foofunction[, ...])β does this function even exist, bestie? Checks for one or more functions, and iffoofunction()is found,HAVE_FUNCTION_NAMEgets defined. Slay β¨CHECK_FUNC_OPTS(cflags, libs, foofunction[, ...])β same asCHECK_FUNCTION(), no cap, just with the function tested using theCFLAGSandLIBSyou provide π«ΆCHECK_PERL_MODULE(modulename)β makes sure the Perl module you named is actually installed and functioning. Like, for example, if modulename is"Time::Zone", the macro sets the variable"HAVE_TIME_ZONE"accordingly. It's giving thorough πREQUIRE_PERL_MODULE(modulename)β same asCHECK_PERL_MODULE, except your configure script will straight-up abort if the module isn't found. Not me being dramatic, that's just the deal πDEFAULT_DIR(dirname, path)β overrides one of the standard installation path defaults. The dirname argument may be one of:PREFIX,BINDIR,LIBDIR,LIBEXECDIR,DATADIR,STATEDIR,SYSCONFDIR,LOCALEDIRorMANDIR. Pick your fighter π
π SEE ALSO π
and the whole entire site: http://hypertriton.com/bsdbuild/ π¦
okay that's the whole page bestie, go forth and configure responsibly π this icon of a manual page is served up by Debian, dated JULY 19, 2007, and it lives in section MKCONFIGURE(1) β periodt πβ¨
π¦ where this page comes from
- nixos 26.05: bsdbuild 3.1
- nixpkgs unstable: bsdbuild 3.1
- Copyright (c) 2007-2012 Hypertriton, Inc. <http://www.hypertriton.com/>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms