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