MKCONFIGURE(1)

πŸ“¦ version 3.1, in nixos 26.05, nixpkgs unstable

πŸ’… 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 the HAVE_FOO variable β€” where FOO is the package name in upper-case β€” to show you the results of the test. and C/C++ libraries also typically set FOO_CFLAGS and FOO_LIBS. so many variables, so little time. 😭
    • if the optional version argument is specified, the version number gets verified too, and MK_VERSION_OK is defined to yes if the versions are compatible. πŸ₯³
    • a version argument of 0 means no version checking should be done. zero, zip, nothing. 🚫
    • if the optional prefix argument 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=VALUE or --with-foo=VALUE options. that's the group-chat handshake for build flags, fr fr. 🀝
  • REQUIRE(package[,version[,prefix]]) β€” same as the CHECK directive, 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 (.pm files). more places to look = more chances to slay. πŸ”
  • 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'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. 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. cute header, bestie. πŸ“
  • HDEFINE_UNQUOTED(opt,val) β€” same as HDEFINE(), except the value is left unquoted. she's free, she's wild. πŸ¦‹
  • HUNDEF(opt) β€” similar to HDEFINE, except config/<option>.h will contain an #undef directive. undefine her, she's done. πŸ’”
  • 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. makefile royalty. πŸ‘‘
  • MAPPEND(opt,val) β€” same effect as MDEFINE(), 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 -DFOO flag being used in compiler command lines, but it's also interpreted by build.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 -Idir flag being added to the compiler command line, but it's 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. 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_FOO defines). pass an empty argument to disable (default). ⚠️ this directive should be only called once, and may be placed anywhere in configure.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, -Werror or -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 -g or -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. name specifies the name of the script. for C/C++ style packages, the arguments are usually the --cflags output, followed by the --libs output. like a lil business card for your package. πŸͺͺ
  • CONFIG_CACHE(yes|no) β€” enable support for caching of test results (the ./configure --cache option). by default, caching is disabled. πŸ™ˆ
  • CONFIG_GUESS(path) β€” specify an alternate path to config.guess (default is mk/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 as sys/foo.h is found, HAVE_SYS_FOO_H is defined. header found = variable unlocked. 🎁✨
  • CHECK_HEADER_OPTS(cflags, libs, header[, ...]) β€” literally the same energy as CHECK_HEADER(), except the headers get vibe-checked using the CFLAGS and LIBS you hand it πŸ’…
  • CHECK_FUNC(foofunction[, ...]) β€” does this function even exist, bestie? Checks for one or more functions, and if foofunction() is found, HAVE_FUNCTION_NAME gets defined. Slay ✨
  • CHECK_FUNC_OPTS(cflags, libs, foofunction[, ...]) β€” same as CHECK_FUNCTION(), no cap, just with the function tested using the CFLAGS and LIBS you 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 as CHECK_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, LOCALEDIR or MANDIR. 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