CONFIGURATOR(1) =============== :doctype: manpage NAME ---- configurator - Generate a simple config.h or variable file SYNOPSIS -------- *configurator* ['OPTIONS'] ['CC'] ['CFLAGS'...] DESCRIPTION ----------- *configurator* is a standalone C program which evaluates the C environment using code snippets. The C compiler (and flags) can be provided on the command-line, otherwise built-in defaults are used. It has a builtin set of tests, to which more can be added. By default it produces a C header file to standard output, but it can also produce a file containing simple "key=value" lines suitable for parsing by *sh* or *make*. OPTIONS ------- *-v*:: Print out every test result; specified twice, print out each test too. *-vv*:: Shortcut for two *-v* options. *--var-file=*:: Output results in format '=' to '', or stdout if '' is '-'. Default is not to output this. *--header-file=*:: Output C-style header to '' instead out stdout. *--autotools-style*:: Produce output to stdout like autotools' configure script. This usually means you want to use *--header-file* so that doesn't mix with stdout. *-O*:: Override option to set compiler output file. *--configurator-cc=*:: This gives the real compiler command to use for tests, instead of the first commandline argument or the default. *--extra-tests*:: Read additional tests from stdin, see 'EXTRA TESTS' below. OUTPUT ------ The header output is '#ifndef/#define' idempotent-wrapped using 'CCAN_CONFIG_H', and defines '_GNU_SOURCE'. It also defines 'CCAN_COMPILER', 'CCAN_CFLAGS' and 'CCAN_OUTPUT_EXE_CFLAG' as either the built-in definitions or those provided on the command line. The remainder is '#define' of the test names followed by a '0' or '1': note that this means you should use '#if' not '#ifdef' to test features in your C programs! The var-file output is simply the test names followed by '=1' or '=0'. EXTRA TESTS ----------- Extra tests must be formatted as '=' pairs, with leading whitespace and '#' lines ignored. The first three lines are always the same: *var=*:: Define the variable set by the test, e.g. 'var=HAVE_FOO'. *desc=*:: The description printed out with *--autotools-style*, e.g. 'foo support'. *style=