Home | History | Annotate | Line # | Download | only in dist
configure.local.example revision 1.1.1.6
      1  1.1.1.6       wiz # Id: configure.local.example,v 1.43 2021/09/20 13:25:42 schwarze Exp 
      2      1.1  christos #
      3  1.1.1.6       wiz # Copyright (c) 2014-2021 Ingo Schwarze <schwarze (a] openbsd.org>
      4      1.1  christos #
      5      1.1  christos # Permission to use, copy, modify, and distribute this software for any
      6      1.1  christos # purpose with or without fee is hereby granted, provided that the above
      7      1.1  christos # copyright notice and this permission notice appear in all copies.
      8      1.1  christos #
      9      1.1  christos # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
     10      1.1  christos # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
     11      1.1  christos # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
     12      1.1  christos # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
     13      1.1  christos # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
     14      1.1  christos # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
     15      1.1  christos # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
     16      1.1  christos 
     17      1.1  christos # For all settings documented in this file, there are reasonable
     18      1.1  christos # defaults and/or the ./configure script attempts autodetection.
     19      1.1  christos # Consequently, you only need to create a file ./configure.local
     20      1.1  christos # and put any of these settings into it if ./configure autodetection
     21      1.1  christos # fails or if you want to make different choices for other reasons.
     22      1.1  christos 
     23  1.1.1.4  christos # If autodetection fails, please tell <tech (a] mandoc.bsd.lv>.
     24      1.1  christos 
     25      1.1  christos # We recommend that you write ./configure.local from scratch and
     26      1.1  christos # only put the lines there you need.  This file contains examples.
     27      1.1  christos # It is not intended as a template to be copied as a whole.
     28      1.1  christos 
     29      1.1  christos # --- user settings relevant for all builds ----------------------------
     30      1.1  christos 
     31  1.1.1.6       wiz # By default, "cc" is used as the C compiler, but it can be overridden.
     32  1.1.1.6       wiz # For example, the system compiler in SunOS 5.9 may not provide <stdint.h>,
     33  1.1.1.6       wiz # which may require this line:
     34  1.1.1.6       wiz CC=gcc
     35  1.1.1.6       wiz 
     36  1.1.1.6       wiz # IBM AIX may need:
     37  1.1.1.6       wiz CC=xlc
     38  1.1.1.6       wiz 
     39  1.1.1.6       wiz # By default, "ar" is used as the library archive builder, but it
     40  1.1.1.6       wiz # can be overridden.  For example, NixOS may not have ar(1) in the
     41  1.1.1.6       wiz # PATH, but may want to specify an absolute path instead.
     42  1.1.1.6       wiz AR=ar
     43  1.1.1.6       wiz 
     44      1.1  christos # For -Tutf8 and -Tlocale operation, mandoc(1) requires <locale.h>
     45      1.1  christos # providing setlocale(3) and <wchar.h> providing wcwidth(3) and
     46      1.1  christos # putwchar(3) with a wchar_t storing UCS-4 values.  Theoretically,
     47      1.1  christos # the latter should be tested with the __STDC_ISO_10646__ feature
     48      1.1  christos # macro.  In practice, many <wchar.h> headers do not provide that
     49      1.1  christos # macro even though they treat wchar_t as UCS-4.  So the automatic
     50      1.1  christos # test only checks that wchar_t is wide enough, that is, at least
     51      1.1  christos # four bytes.
     52      1.1  christos 
     53      1.1  christos # The following line forces multi-byte support.
     54      1.1  christos # If your C library does not treat wchar_t as UCS-4, the UTF-8 output
     55      1.1  christos # mode will print garbage.
     56      1.1  christos 
     57      1.1  christos HAVE_WCHAR=1
     58      1.1  christos 
     59      1.1  christos # The following line disables multi-byte support.
     60      1.1  christos # The output modes -Tutf8 and -Tlocale will be the same as -Tascii.
     61      1.1  christos 
     62      1.1  christos HAVE_WCHAR=0
     63      1.1  christos 
     64  1.1.1.3  christos # For -Tutf8 mode, mandoc needs to set an arbitrary locale having
     65  1.1.1.3  christos # a UTF-8 character set.  If autodetection of a suitable locale
     66  1.1.1.3  christos # fails or selects an undesirable locale, you can manually choose
     67  1.1.1.3  christos # the locale for -Tutf8 mode:
     68  1.1.1.3  christos 
     69  1.1.1.3  christos UTF8_LOCALE=en_US.UTF-8
     70  1.1.1.3  christos 
     71  1.1.1.2  christos # When man(1) or apropos(1) is called without -m and -M options,
     72  1.1.1.3  christos # MANPATH is not set in the environment, and man.conf(5) is not
     73  1.1.1.3  christos # available, manuals are searched for in the following directory
     74  1.1.1.3  christos # trees by default.
     75  1.1.1.2  christos 
     76  1.1.1.2  christos MANPATH_DEFAULT="/usr/share/man:/usr/X11R6/man:/usr/local/man"
     77  1.1.1.2  christos 
     78  1.1.1.4  christos # Validation of cross references with mandoc -Tlint only looks
     79  1.1.1.4  christos # for manual pages in the following directories:
     80  1.1.1.4  christos 
     81  1.1.1.4  christos MANPATH_BASE="/usr/share/man:/usr/X11R6/man"
     82  1.1.1.4  christos 
     83  1.1.1.5  christos # When man(1) is called with the -S option and no manual page is
     84  1.1.1.5  christos # found matching the requested name and the requested architecture,
     85  1.1.1.5  christos # it tries to figure out whether the requested architecture is valid
     86  1.1.1.5  christos # for the present operating system.  Normally, ./configure detects
     87  1.1.1.5  christos # the operating system using uname(1).  If that fails or is not
     88  1.1.1.5  christos # desired, either of the following lines can be used:
     89  1.1.1.5  christos 
     90  1.1.1.5  christos OSENUM=MANDOC_OS_NETBSD
     91  1.1.1.5  christos OSENUM=MANDOC_OS_OPENBSD
     92  1.1.1.5  christos OSENUM=MANDOC_OS_OTHER
     93  1.1.1.5  christos 
     94      1.1  christos # In manual pages written in the mdoc(7) language, the operating system
     95      1.1  christos # version is displayed in the page footer line.  If an operating system
     96      1.1  christos # is specified as an argument to the .Os macro, that is always used.
     97      1.1  christos # If the .Os macro has no argument and an operation system is specified
     98      1.1  christos # with the mandoc(1) -Ios= command line option, that is used.
     99      1.1  christos # Otherwise, the uname(3) library function is called at runtime to find
    100      1.1  christos # the name of the operating system.
    101      1.1  christos # If you do not want uname(3) to be called but instead want a fixed
    102      1.1  christos # string to be used, use the following line:
    103      1.1  christos 
    104  1.1.1.6       wiz OSNAME="OpenBSD 7.0"
    105      1.1  christos 
    106      1.1  christos # The following installation directories are used.
    107      1.1  christos # It is possible to set only one or a few of these variables,
    108      1.1  christos # there is no need to copy the whole block.
    109      1.1  christos # Even if you set PREFIX to something else, the other variables
    110      1.1  christos # pick it up without copying them all over.
    111      1.1  christos 
    112      1.1  christos PREFIX="/usr/local"
    113      1.1  christos BINDIR="${PREFIX}/bin"
    114      1.1  christos SBINDIR="${PREFIX}/sbin"
    115      1.1  christos MANDIR="${PREFIX}/man"
    116      1.1  christos 
    117  1.1.1.4  christos # If BINDIR and SBINDIR are not subdirectories of the same parent
    118  1.1.1.4  christos # directory or if the basename(1) of BINDIR differs from "bin",
    119  1.1.1.4  christos # the relative path from SBINDIR to BINDIR is also needed.
    120  1.1.1.4  christos # The default is:
    121  1.1.1.4  christos 
    122  1.1.1.4  christos BIN_FROM_SBIN="../bin"
    123  1.1.1.4  christos 
    124  1.1.1.2  christos # Some distributions may want to avoid naming conflicts
    125  1.1.1.2  christos # with the configuration files of other man(1) implementations.
    126  1.1.1.2  christos # This changes the name of the installed section 5 manual page as well.
    127  1.1.1.4  christos 
    128  1.1.1.2  christos MANM_MANCONF="mandoc.conf"	# default is "man.conf"
    129  1.1.1.2  christos 
    130      1.1  christos # Some distributions may want to avoid naming conflicts among manuals.
    131      1.1  christos # If you want to change the names of installed section 7 manual pages,
    132      1.1  christos # the following alternative names are suggested.
    133      1.1  christos # The suffix ".7" will automatically be appended.
    134      1.1  christos # It is possible to set only one or a few of these variables,
    135      1.1  christos # there is no need to copy the whole block.
    136      1.1  christos 
    137      1.1  christos MANM_MAN="mandoc_man"		# default is "man"
    138      1.1  christos MANM_MDOC="mandoc_mdoc"		# default is "mdoc"
    139      1.1  christos MANM_ROFF="mandoc_roff"		# default is "roff"
    140      1.1  christos MANM_EQN="mandoc_eqn"		# default is "eqn"
    141      1.1  christos MANM_TBL="mandoc_tbl"		# default is "tbl"
    142      1.1  christos 
    143  1.1.1.3  christos # Some distributions may want to avoid naming conflicts with
    144  1.1.1.3  christos # other man(1), apropos(1), makewhatis(8), or soelim(1) utilities.
    145  1.1.1.2  christos # If you want to change the names of binary programs,
    146  1.1.1.2  christos # the following alternative names are suggested.
    147  1.1.1.2  christos # Using different names is possible as well.
    148  1.1.1.3  christos # This changes the names of the installed section 1 and section 8
    149  1.1.1.3  christos # manual pages as well.
    150  1.1.1.3  christos # It is possible to set only one or two of these variables,
    151  1.1.1.3  christos # there is no need to copy the whole block.
    152      1.1  christos 
    153      1.1  christos BINM_MAN=mman			# default is "man"
    154  1.1.1.3  christos BINM_APROPOS=mapropos		# default is "apropos"
    155  1.1.1.3  christos BINM_WHATIS=mwhatis		# default is "whatis"
    156  1.1.1.3  christos BINM_MAKEWHATIS=mandocdb	# default is "makewhatis"
    157  1.1.1.2  christos BINM_SOELIM=msoelim		# default is "soelim"
    158  1.1.1.2  christos 
    159  1.1.1.6       wiz # If less(1) is available, it is used as the default manual pager.
    160  1.1.1.6       wiz # Otherwise, more(1) is used: its existence is required by POSIX.
    161  1.1.1.6       wiz # It is possible to force using a different default pager, either
    162  1.1.1.6       wiz # by giving the name of a program found in the PATH, or by giving
    163  1.1.1.6       wiz # an absolute path.
    164  1.1.1.6       wiz 
    165  1.1.1.6       wiz BINM_PAGER=pg			# default is "less" or "more"
    166  1.1.1.6       wiz 
    167  1.1.1.3  christos # Some distributions do not want hardlinks
    168  1.1.1.3  christos # between installed binary programs.
    169  1.1.1.3  christos # Set the following variable to use symbolic links instead.
    170  1.1.1.3  christos # It is also used for links between manual pages.
    171  1.1.1.3  christos # It is only used by the install* targets.
    172  1.1.1.3  christos # When using this, DESTDIR must be empty or an absolute path.
    173  1.1.1.3  christos 
    174  1.1.1.3  christos LN="ln -sf"			# default is "ln -f"
    175  1.1.1.3  christos 
    176  1.1.1.2  christos # Before falling back to the bundled version of the ohash(3) hashing
    177  1.1.1.2  christos # library, autoconfiguration tries the following linker flag to
    178  1.1.1.2  christos # link against your system version.  If you do have ohash(3) on
    179  1.1.1.2  christos # your system but it needs different linker flags, set the following
    180  1.1.1.2  christos # variable to specify the required linker flags.
    181  1.1.1.2  christos 
    182  1.1.1.2  christos LD_OHASH="-lutil"
    183  1.1.1.2  christos 
    184  1.1.1.3  christos # Some platforms may need an additional linker flag for nanosleep(2).
    185  1.1.1.3  christos # If none is needed or it is -lrt, it is autodetected.
    186  1.1.1.3  christos # Otherwise, set the following variable.
    187  1.1.1.3  christos 
    188  1.1.1.3  christos LD_NANOSLEEP="-lrt"
    189  1.1.1.3  christos 
    190  1.1.1.3  christos # Some platforms may need an additional linker flag for recvmsg(2).
    191  1.1.1.3  christos # If none is needed or it is -lsocket, it is autodetected.
    192  1.1.1.3  christos # Otherwise, set the following variable.
    193  1.1.1.3  christos 
    194  1.1.1.3  christos LD_RECVMSG="-lsocket"
    195  1.1.1.2  christos 
    196  1.1.1.3  christos # Some platforms might need additional linker flags to link against
    197  1.1.1.3  christos # libmandoc that are not autodetected, though no such cases are
    198  1.1.1.3  christos # currently known.
    199  1.1.1.3  christos 
    200  1.1.1.3  christos LDADD="-lm"
    201  1.1.1.2  christos 
    202  1.1.1.2  christos # Some systems may want to set additional linker flags for all the
    203  1.1.1.2  christos # binaries, not only for those using libmandoc, for example for
    204  1.1.1.2  christos # hardening options.
    205  1.1.1.2  christos 
    206  1.1.1.2  christos LDFLAGS="-Wl,-z,relro"
    207      1.1  christos 
    208      1.1  christos # It is possible to change the utility program used for installation
    209      1.1  christos # and the modes files are installed with.  The defaults are:
    210      1.1  christos 
    211      1.1  christos INSTALL="install"
    212      1.1  christos INSTALL_PROGRAM="${INSTALL} -m 0555"
    213      1.1  christos INSTALL_LIB="${INSTALL} -m 0444"
    214      1.1  christos INSTALL_MAN="${INSTALL} -m 0444"
    215      1.1  christos INSTALL_DATA="${INSTALL} -m 0444"
    216      1.1  christos 
    217  1.1.1.6       wiz # By default, makewhatis(8) can only read from the paths passed on the
    218  1.1.1.6       wiz # command line or configured in man.conf(5).
    219  1.1.1.6       wiz # But some package managers on some operating systems store manual pages
    220  1.1.1.6       wiz # in separate "cellar" or "store" directories and only symlink them
    221  1.1.1.6       wiz # into the manual trees.
    222  1.1.1.6       wiz # To support one or more such package managers, give makewhatis(8)
    223  1.1.1.6       wiz # read access to the cellars and stores on your system, in the form
    224  1.1.1.6       wiz # of a colon-separated path:
    225      1.1  christos 
    226  1.1.1.6       wiz # Homebrow package manager on Mac OS X:
    227      1.1  christos PREFIX="/usr/local"
    228  1.1.1.6       wiz READ_ALLOWED_PATH="${PREFIX}/Cellar"
    229  1.1.1.6       wiz 
    230  1.1.1.6       wiz # Nix package manager and/or NixOS Linux distribution:
    231  1.1.1.6       wiz READ_ALLOWED_PATH="/nix/store"
    232  1.1.1.6       wiz 
    233  1.1.1.6       wiz # GNU Guix package manager and/or GNU Guix Linux distribution:
    234  1.1.1.6       wiz READ_ALLOWED_PATH="/gnu/store"
    235  1.1.1.6       wiz 
    236  1.1.1.6       wiz # If multiple package managers are used concurrently:
    237  1.1.1.6       wiz PREFIX="/usr/local"
    238  1.1.1.6       wiz READ_ALLOWED_PATH="/nix/store:${PREFIX}/Cellar"
    239      1.1  christos 
    240  1.1.1.3  christos # --- user settings for the mandoc(3) library --------------------------
    241  1.1.1.3  christos 
    242  1.1.1.3  christos # By default, libmandoc.a is not installed.  It is almost never needed
    243  1.1.1.3  christos # because there is almost no non-mandoc software out there using this
    244  1.1.1.3  christos # library.  The one notable exception is NetBSD apropos(1).
    245  1.1.1.3  christos # So, when building for the NetBSD base system - but not for NetBSD
    246  1.1.1.3  christos # ports nor for pkgsrc! - you may want the following:
    247  1.1.1.3  christos 
    248  1.1.1.3  christos INSTALL_LIBMANDOC=1
    249  1.1.1.3  christos 
    250  1.1.1.3  christos # The following settings are only used when INSTALL_LIBMANDOC is set.
    251  1.1.1.3  christos 
    252  1.1.1.3  christos INCLUDEDIR="${PREFIX}/include/mandoc"
    253  1.1.1.3  christos LIBDIR="${PREFIX}/lib/mandoc"
    254  1.1.1.3  christos 
    255  1.1.1.3  christos # --- user settings related to man.cgi ---------------------------------
    256      1.1  christos 
    257      1.1  christos # By default, building man.cgi(8) is disabled.  To enable it, copy
    258      1.1  christos # cgi.h.example to cgi.h, edit it, and use the following line.
    259      1.1  christos 
    260      1.1  christos BUILD_CGI=1
    261      1.1  christos 
    262      1.1  christos # The remaining settings in this section are only relevant if BUILD_CGI
    263      1.1  christos # is enabled.  Otherwise, they have no effect either way.
    264      1.1  christos 
    265  1.1.1.4  christos # By default, man.cgi(8) is linked statically if the compiler supports
    266  1.1.1.4  christos # the -static option.  If automatic detection fails, you can force
    267  1.1.1.4  christos # static linking of man.cgi(8).
    268      1.1  christos 
    269  1.1.1.4  christos STATIC="-static"
    270      1.1  christos 
    271  1.1.1.4  christos # Some systems may require -pthread for static linking:
    272      1.1  christos 
    273      1.1  christos STATIC="-static -pthread"
    274      1.1  christos 
    275  1.1.1.4  christos # If static linking works in general but not with additional libraries
    276  1.1.1.4  christos # like -lrt or -lz, you can force dynamic linking.  This may for
    277  1.1.1.4  christos # example be required on SunOS 5.9.
    278  1.1.1.4  christos 
    279  1.1.1.4  christos STATIC=" "
    280  1.1.1.4  christos 
    281      1.1  christos # Some directories.
    282      1.1  christos # This works just like PREFIX, see above.
    283      1.1  christos 
    284      1.1  christos WWWPREFIX="/var/www"
    285      1.1  christos HTDOCDIR="${WWWPREFIX}/htdocs"
    286      1.1  christos CGIBINDIR="${WWWPREFIX}/cgi-bin"
    287      1.1  christos 
    288  1.1.1.3  christos # --- user settings related to catman ----------------------------------
    289  1.1.1.3  christos 
    290  1.1.1.3  christos # By default, building mandocd(8) and catman(8) is disabled.
    291  1.1.1.3  christos # To enable it, use the following line.
    292  1.1.1.3  christos # It does not work on SunOS 5.10 because there is no mkdirat(2)
    293  1.1.1.3  christos # nor on SunOS 5.9 which also lacks CMSG_LEN(3) and CMSG_SPACE(3).
    294  1.1.1.6       wiz # It may not work on old releases of Mac OS X either.  For example,
    295  1.1.1.6       wiz # Mac OS X 10.4 Tiger provides neither mkdirat(2) nor openat(2).
    296  1.1.1.3  christos 
    297  1.1.1.3  christos BUILD_CATMAN=1
    298  1.1.1.3  christos 
    299  1.1.1.3  christos # Install catman(8) with a different name.
    300  1.1.1.3  christos # See BINM_MAN above for details of how this works.
    301  1.1.1.3  christos 
    302  1.1.1.3  christos BINM_CATMAN=mcatman		# default is "catman"
    303  1.1.1.3  christos 
    304      1.1  christos # --- settings that rarely need to be touched --------------------------
    305      1.1  christos 
    306      1.1  christos # Do not set these variables unless you really need to.
    307      1.1  christos 
    308  1.1.1.4  christos # Normally, leave CFLAGS unset.  In that case, -g will automatically
    309  1.1.1.4  christos # be used, and various -W options will be added if the compiler
    310  1.1.1.4  christos # supports them.  If you define CFLAGS manually, it will be used
    311  1.1.1.4  christos # unchanged, and nothing will be added.
    312  1.1.1.2  christos 
    313  1.1.1.2  christos CFLAGS="-g"
    314  1.1.1.2  christos 
    315      1.1  christos # In rare cases, it may be required to skip individual automatic tests.
    316      1.1  christos # Each of the following variables can be set to 0 (test will not be run
    317      1.1  christos # and will be regarded as failed) or 1 (test will not be run and will
    318      1.1  christos # be regarded as successful).
    319      1.1  christos 
    320  1.1.1.6       wiz HAVE_ATTRIBUTE=0
    321      1.1  christos HAVE_DIRENT_NAMLEN=0
    322  1.1.1.3  christos HAVE_ENDIAN=0
    323  1.1.1.3  christos HAVE_EFTYPE=0
    324  1.1.1.2  christos HAVE_ERR=0
    325  1.1.1.3  christos HAVE_FTS=0  # Setting this implies HAVE_FTS_COMPARE_CONST=0.
    326  1.1.1.3  christos HAVE_FTS_COMPARE_CONST=0  # Setting this implies HAVE_FTS=1.
    327  1.1.1.2  christos HAVE_GETLINE=0
    328      1.1  christos HAVE_GETSUBOPT=0
    329  1.1.1.2  christos HAVE_ISBLANK=0
    330  1.1.1.5  christos HAVE_LESS_T=0
    331  1.1.1.2  christos HAVE_MKDTEMP=0
    332  1.1.1.3  christos HAVE_NTOHL=0
    333  1.1.1.3  christos HAVE_O_DIRECTORY=0
    334  1.1.1.3  christos HAVE_OHASH=0
    335  1.1.1.3  christos HAVE_PATH_MAX=0
    336  1.1.1.2  christos HAVE_PLEDGE=0
    337  1.1.1.2  christos HAVE_PROGNAME=0
    338      1.1  christos HAVE_REALLOCARRAY=0
    339  1.1.1.4  christos HAVE_RECALLOCARRAY=0
    340  1.1.1.2  christos HAVE_REWB_BSD=0
    341  1.1.1.2  christos HAVE_REWB_SYSV=0
    342      1.1  christos HAVE_STRCASESTR=0
    343  1.1.1.2  christos HAVE_STRINGLIST=0
    344      1.1  christos HAVE_STRLCAT=0
    345      1.1  christos HAVE_STRLCPY=0
    346      1.1  christos HAVE_STRPTIME=0
    347      1.1  christos HAVE_STRSEP=0
    348      1.1  christos HAVE_STRTONUM=0
    349  1.1.1.3  christos HAVE_SYS_ENDIAN=0
    350  1.1.1.2  christos HAVE_VASPRINTF=0
    351  1.1.1.2  christos HAVE_WCHAR=0
    352