1322249Sbapt# $Id: configure.local.example,v 1.33 2017/07/20 16:24:53 schwarze Exp $ 2275397Sbapt# 3322249Sbapt# Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze@openbsd.org> 4275397Sbapt# 5275397Sbapt# Permission to use, copy, modify, and distribute this software for any 6275397Sbapt# purpose with or without fee is hereby granted, provided that the above 7275397Sbapt# copyright notice and this permission notice appear in all copies. 8275397Sbapt# 9275397Sbapt# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10275397Sbapt# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11275397Sbapt# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12275397Sbapt# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13275397Sbapt# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14275397Sbapt# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15275397Sbapt# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16275397Sbapt 17275397Sbapt# For all settings documented in this file, there are reasonable 18275397Sbapt# defaults and/or the ./configure script attempts autodetection. 19275397Sbapt# Consequently, you only need to create a file ./configure.local 20275397Sbapt# and put any of these settings into it if ./configure autodetection 21275397Sbapt# fails or if you want to make different choices for other reasons. 22275397Sbapt 23322249Sbapt# If autodetection fails, please tell <tech@mandoc.bsd.lv>. 24275397Sbapt 25275397Sbapt# We recommend that you write ./configure.local from scratch and 26275397Sbapt# only put the lines there you need. This file contains examples. 27275397Sbapt# It is not intended as a template to be copied as a whole. 28275397Sbapt 29275397Sbapt# --- user settings relevant for all builds ---------------------------- 30275397Sbapt 31275397Sbapt# For -Tutf8 and -Tlocale operation, mandoc(1) requires <locale.h> 32275397Sbapt# providing setlocale(3) and <wchar.h> providing wcwidth(3) and 33275397Sbapt# putwchar(3) with a wchar_t storing UCS-4 values. Theoretically, 34275397Sbapt# the latter should be tested with the __STDC_ISO_10646__ feature 35275397Sbapt# macro. In practice, many <wchar.h> headers do not provide that 36275397Sbapt# macro even though they treat wchar_t as UCS-4. So the automatic 37275397Sbapt# test only checks that wchar_t is wide enough, that is, at least 38275397Sbapt# four bytes. 39275397Sbapt 40275397Sbapt# The following line forces multi-byte support. 41275397Sbapt# If your C library does not treat wchar_t as UCS-4, the UTF-8 output 42275397Sbapt# mode will print garbage. 43275397Sbapt 44275397SbaptHAVE_WCHAR=1 45275397Sbapt 46275397Sbapt# The following line disables multi-byte support. 47275397Sbapt# The output modes -Tutf8 and -Tlocale will be the same as -Tascii. 48275397Sbapt 49275397SbaptHAVE_WCHAR=0 50275397Sbapt 51316420Sbapt# For -Tutf8 mode, mandoc needs to set an arbitrary locale having 52316420Sbapt# a UTF-8 character set. If autodetection of a suitable locale 53316420Sbapt# fails or selects an undesirable locale, you can manually choose 54316420Sbapt# the locale for -Tutf8 mode: 55316420Sbapt 56316420SbaptUTF8_LOCALE=en_US.UTF-8 57316420Sbapt 58294113Sbapt# When man(1) or apropos(1) is called without -m and -M options, 59316420Sbapt# MANPATH is not set in the environment, and man.conf(5) is not 60316420Sbapt# available, manuals are searched for in the following directory 61316420Sbapt# trees by default. 62294113Sbapt 63294113SbaptMANPATH_DEFAULT="/usr/share/man:/usr/X11R6/man:/usr/local/man" 64294113Sbapt 65322249Sbapt# Validation of cross references with mandoc -Tlint only looks 66322249Sbapt# for manual pages in the following directories: 67322249Sbapt 68322249SbaptMANPATH_BASE="/usr/share/man:/usr/X11R6/man" 69322249Sbapt 70275397Sbapt# In manual pages written in the mdoc(7) language, the operating system 71275397Sbapt# version is displayed in the page footer line. If an operating system 72275397Sbapt# is specified as an argument to the .Os macro, that is always used. 73275397Sbapt# If the .Os macro has no argument and an operation system is specified 74275397Sbapt# with the mandoc(1) -Ios= command line option, that is used. 75275397Sbapt# Otherwise, the uname(3) library function is called at runtime to find 76275397Sbapt# the name of the operating system. 77275397Sbapt# If you do not want uname(3) to be called but instead want a fixed 78275397Sbapt# string to be used, use the following line: 79275397Sbapt 80316420SbaptOSNAME="OpenBSD 6.0" 81275397Sbapt 82275397Sbapt# The following installation directories are used. 83275397Sbapt# It is possible to set only one or a few of these variables, 84275397Sbapt# there is no need to copy the whole block. 85275397Sbapt# Even if you set PREFIX to something else, the other variables 86275397Sbapt# pick it up without copying them all over. 87275397Sbapt 88275397SbaptPREFIX="/usr/local" 89275397SbaptBINDIR="${PREFIX}/bin" 90275397SbaptSBINDIR="${PREFIX}/sbin" 91275397SbaptMANDIR="${PREFIX}/man" 92275397Sbapt 93322249Sbapt# If BINDIR and SBINDIR are not subdirectories of the same parent 94322249Sbapt# directory or if the basename(1) of BINDIR differs from "bin", 95322249Sbapt# the relative path from SBINDIR to BINDIR is also needed. 96322249Sbapt# The default is: 97322249Sbapt 98322249SbaptBIN_FROM_SBIN="../bin" 99322249Sbapt 100294113Sbapt# Some distributions may want to avoid naming conflicts 101294113Sbapt# with the configuration files of other man(1) implementations. 102294113Sbapt# This changes the name of the installed section 5 manual page as well. 103294113SbaptMANM_MANCONF="mandoc.conf" # default is "man.conf" 104294113Sbapt 105276219Sbapt# Some distributions may want to avoid naming conflicts among manuals. 106276219Sbapt# If you want to change the names of installed section 7 manual pages, 107276219Sbapt# the following alternative names are suggested. 108276219Sbapt# The suffix ".7" will automatically be appended. 109276219Sbapt# It is possible to set only one or a few of these variables, 110276219Sbapt# there is no need to copy the whole block. 111276219Sbapt 112276219SbaptMANM_MAN="mandoc_man" # default is "man" 113276219SbaptMANM_MDOC="mandoc_mdoc" # default is "mdoc" 114276219SbaptMANM_ROFF="mandoc_roff" # default is "roff" 115276219SbaptMANM_EQN="mandoc_eqn" # default is "eqn" 116276219SbaptMANM_TBL="mandoc_tbl" # default is "tbl" 117276219Sbapt 118316420Sbapt# Some distributions may want to avoid naming conflicts with 119316420Sbapt# other man(1), apropos(1), makewhatis(8), or soelim(1) utilities. 120294113Sbapt# If you want to change the names of binary programs, 121294113Sbapt# the following alternative names are suggested. 122294113Sbapt# Using different names is possible as well. 123316420Sbapt# This changes the names of the installed section 1 and section 8 124316420Sbapt# manual pages as well. 125316420Sbapt# It is possible to set only one or two of these variables, 126316420Sbapt# there is no need to copy the whole block. 127279527Sbapt 128279527SbaptBINM_MAN=mman # default is "man" 129316420SbaptBINM_APROPOS=mapropos # default is "apropos" 130316420SbaptBINM_WHATIS=mwhatis # default is "whatis" 131316420SbaptBINM_MAKEWHATIS=mandocdb # default is "makewhatis" 132294113SbaptBINM_SOELIM=msoelim # default is "soelim" 133279527Sbapt 134322249Sbapt# Some distributions do not want hardlinks 135322249Sbapt# between installed binary programs. 136322249Sbapt# Set the following variable to use symbolic links instead. 137322249Sbapt# It is also used for links between manual pages. 138322249Sbapt# It is only used by the install* targets. 139322249Sbapt# When using this, DESTDIR must be empty or an absolute path. 140322249Sbapt 141322249SbaptLN="ln -sf" # default is "ln -f" 142322249Sbapt 143307795Sbapt# Before falling back to the bundled version of the ohash(3) hashing 144307795Sbapt# library, autoconfiguration tries the following linker flag to 145307795Sbapt# link against your system version. If you do have ohash(3) on 146307795Sbapt# your system but it needs different linker flags, set the following 147307795Sbapt# variable to specify the required linker flags. 148307795Sbapt 149307795SbaptLD_OHASH="-lutil" 150307795Sbapt 151316420Sbapt# When library autodetection decides to use -L/usr/local/lib, 152316420Sbapt# -I/usr/local/include is automatically added to CFLAGS. 153316420Sbapt# If you manually set LD_OHASH to something including -L/usr/local/lib, 154316420Sbapt# chances are you will also need the following line: 155307795Sbapt 156316420SbaptCFLAGS="${CFLAGS} -I/usr/local/include" 157307795Sbapt 158316420Sbapt# Some platforms may need an additional linker flag for nanosleep(2). 159316420Sbapt# If none is needed or it is -lrt, it is autodetected. 160316420Sbapt# Otherwise, set the following variable. 161316420Sbapt 162316420SbaptLD_NANOSLEEP="-lrt" 163316420Sbapt 164322249Sbapt# Some platforms may need an additional linker flag for recvmsg(2). 165322249Sbapt# If none is needed or it is -lsocket, it is autodetected. 166322249Sbapt# Otherwise, set the following variable. 167322249Sbapt 168322249SbaptLD_RECVMSG="-lsocket" 169322249Sbapt 170316420Sbapt# Some platforms might need additional linker flags to link against 171316420Sbapt# libmandoc that are not autodetected, though no such cases are 172316420Sbapt# currently known. 173316420Sbapt 174316420SbaptLDADD="-lm" 175316420Sbapt 176307795Sbapt# Some systems may want to set additional linker flags for all the 177307795Sbapt# binaries, not only for those using libmandoc, for example for 178307795Sbapt# hardening options. 179307795Sbapt 180307795SbaptLDFLAGS="-Wl,-z,relro" 181307795Sbapt 182275397Sbapt# It is possible to change the utility program used for installation 183275397Sbapt# and the modes files are installed with. The defaults are: 184275397Sbapt 185275397SbaptINSTALL="install" 186275397SbaptINSTALL_PROGRAM="${INSTALL} -m 0555" 187275397SbaptINSTALL_LIB="${INSTALL} -m 0444" 188275397SbaptINSTALL_MAN="${INSTALL} -m 0444" 189275397SbaptINSTALL_DATA="${INSTALL} -m 0444" 190275397Sbapt 191279527Sbapt# When using the "homebrew" package manager on Mac OS X, the actual 192279527Sbapt# manuals are located in a so-called "cellar" and only symlinked 193279527Sbapt# into the manual trees. To allow mandoc to follow such symlinks, 194279527Sbapt# you have to specify the physical location of the cellar as returned 195279527Sbapt# by realpath(3), for example: 196279527Sbapt 197279527SbaptPREFIX="/usr/local" 198279527SbaptHOMEBREWDIR="${PREFIX}/Cellar" 199279527Sbapt 200316420Sbapt# --- user settings for the mandoc(3) library -------------------------- 201275397Sbapt 202316420Sbapt# By default, libmandoc.a is not installed. It is almost never needed 203316420Sbapt# because there is almost no non-mandoc software out there using this 204316420Sbapt# library. The one notable exception is NetBSD apropos(1). 205316420Sbapt# So, when building for the NetBSD base system - but not for NetBSD 206316420Sbapt# ports nor for pkgsrc! - you may want the following: 207316420Sbapt 208316420SbaptINSTALL_LIBMANDOC=1 209316420Sbapt 210316420Sbapt# The following settings are only used when INSTALL_LIBMANDOC is set. 211316420Sbapt 212316420SbaptINCLUDEDIR="${PREFIX}/include/mandoc" 213316420SbaptLIBDIR="${PREFIX}/lib/mandoc" 214316420Sbapt 215316420Sbapt# --- user settings related to man.cgi --------------------------------- 216316420Sbapt 217275397Sbapt# By default, building man.cgi(8) is disabled. To enable it, copy 218275397Sbapt# cgi.h.example to cgi.h, edit it, and use the following line. 219275397Sbapt 220275397SbaptBUILD_CGI=1 221275397Sbapt 222275397Sbapt# The remaining settings in this section are only relevant if BUILD_CGI 223275397Sbapt# is enabled. Otherwise, they have no effect either way. 224275397Sbapt 225275397Sbapt# By default, man.cgi(8) is linked statically. 226275397Sbapt# Some systems do not support static linking, for example Mac OS X. 227275397Sbapt# In that case, use the following line: 228275397Sbapt 229275397SbaptSTATIC= 230275397Sbapt 231275397Sbapt# Some systems, for example Linux, require -pthread for static linking: 232275397Sbapt 233275397SbaptSTATIC="-static -pthread" 234275397Sbapt 235275397Sbapt# Some directories. 236275397Sbapt# This works just like PREFIX, see above. 237275397Sbapt 238275397SbaptWWWPREFIX="/var/www" 239275397SbaptHTDOCDIR="${WWWPREFIX}/htdocs" 240275397SbaptCGIBINDIR="${WWWPREFIX}/cgi-bin" 241275397Sbapt 242322249Sbapt# --- user settings related to catman ---------------------------------- 243322249Sbapt 244322249Sbapt# By default, building mandocd(8) and catman(8) is disabled. 245322249Sbapt# To enable it, use the following line. 246322249Sbapt# It does not work on SunOS 5.10 because there is no mkdirat(2) 247322249Sbapt# nor on SunOS 5.9 which also lacks CMSG_LEN(3) and CMSG_SPACE(3). 248322249Sbapt 249322249SbaptBUILD_CATMAN=1 250322249Sbapt 251322249Sbapt# Install catman(8) with a different name. 252322249Sbapt# See BINM_MAN above for details of how this works. 253322249Sbapt 254322249SbaptBINM_CATMAN=mcatman # default is "catman" 255322249Sbapt 256275397Sbapt# --- settings that rarely need to be touched -------------------------- 257275397Sbapt 258275397Sbapt# Do not set these variables unless you really need to. 259275397Sbapt 260275397Sbapt# You can manually override the compiler to be used. 261275397Sbapt# But that's rarely useful because ./configure asks your make(1) 262275397Sbapt# which compiler to use, and that answer will hardly be wrong. 263275397Sbapt 264275397SbaptCC=cc 265275397Sbapt 266307795Sbapt# IBM AIX may need: 267307795Sbapt 268307795SbaptCC=xlc 269307795Sbapt 270275397Sbapt# The default compiler flags are: 271275397Sbapt 272275397SbaptCFLAGS="-g -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings" 273275397Sbapt 274307795Sbapt# IBM AIX xlc does not support -W; in that case, please use: 275307795Sbapt 276307795SbaptCFLAGS="-g" 277307795Sbapt 278275397Sbapt# In rare cases, it may be required to skip individual automatic tests. 279275397Sbapt# Each of the following variables can be set to 0 (test will not be run 280275397Sbapt# and will be regarded as failed) or 1 (test will not be run and will 281275397Sbapt# be regarded as successful). 282275397Sbapt 283275397SbaptHAVE_DIRENT_NAMLEN=0 284316420SbaptHAVE_ENDIAN=0 285316420SbaptHAVE_EFTYPE=0 286307795SbaptHAVE_ERR=0 287316420SbaptHAVE_FTS=0 # Setting this implies HAVE_FTS_COMPARE_CONST=0. 288316420SbaptHAVE_FTS_COMPARE_CONST=0 # Setting this implies HAVE_FTS=1. 289307795SbaptHAVE_GETLINE=0 290275397SbaptHAVE_GETSUBOPT=0 291307795SbaptHAVE_ISBLANK=0 292307795SbaptHAVE_MKDTEMP=0 293316420SbaptHAVE_NTOHL=0 294322249SbaptHAVE_O_DIRECTORY=0 295316420SbaptHAVE_OHASH=0 296316420SbaptHAVE_PATH_MAX=0 297307795SbaptHAVE_PLEDGE=0 298307795SbaptHAVE_PROGNAME=0 299275397SbaptHAVE_REALLOCARRAY=0 300322249SbaptHAVE_RECALLOCARRAY=0 301307795SbaptHAVE_REWB_BSD=0 302307795SbaptHAVE_REWB_SYSV=0 303275397SbaptHAVE_STRCASESTR=0 304307795SbaptHAVE_STRINGLIST=0 305275397SbaptHAVE_STRLCAT=0 306275397SbaptHAVE_STRLCPY=0 307275397SbaptHAVE_STRPTIME=0 308275397SbaptHAVE_STRSEP=0 309279527SbaptHAVE_STRTONUM=0 310316420SbaptHAVE_SYS_ENDIAN=0 311307795SbaptHAVE_VASPRINTF=0 312307795SbaptHAVE_WCHAR=0 313