configure.local.example revision 276219
1276219Sbapt# $Id: configure.local.example,v 1.2 2014/12/09 09:14:33 schwarze Exp $ 2275397Sbapt# 3275397Sbapt# Copyright (c) 2014 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 23275397Sbapt# If autodetection fails, please tell <tech@mdocml.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 51275397Sbapt# In manual pages written in the mdoc(7) language, the operating system 52275397Sbapt# version is displayed in the page footer line. If an operating system 53275397Sbapt# is specified as an argument to the .Os macro, that is always used. 54275397Sbapt# If the .Os macro has no argument and an operation system is specified 55275397Sbapt# with the mandoc(1) -Ios= command line option, that is used. 56275397Sbapt# Otherwise, the uname(3) library function is called at runtime to find 57275397Sbapt# the name of the operating system. 58275397Sbapt# If you do not want uname(3) to be called but instead want a fixed 59275397Sbapt# string to be used, use the following line: 60275397Sbapt 61276219SbaptOSNAME="OpenBSD 5.6" 62275397Sbapt 63275397Sbapt# The following installation directories are used. 64275397Sbapt# It is possible to set only one or a few of these variables, 65275397Sbapt# there is no need to copy the whole block. 66275397Sbapt# Even if you set PREFIX to something else, the other variables 67275397Sbapt# pick it up without copying them all over. 68275397Sbapt 69275397SbaptPREFIX="/usr/local" 70275397SbaptBINDIR="${PREFIX}/bin" 71275397SbaptSBINDIR="${PREFIX}/sbin" 72275397SbaptINCLUDEDIR="${PREFIX}/include/mandoc" 73275397SbaptLIBDIR="${PREFIX}/lib/mandoc" 74275397SbaptMANDIR="${PREFIX}/man" 75275397SbaptEXAMPLEDIR="${PREFIX}/share/examples/mandoc" 76275397Sbapt 77276219Sbapt# Some distributions may want to avoid naming conflicts among manuals. 78276219Sbapt# If you want to change the names of installed section 7 manual pages, 79276219Sbapt# the following alternative names are suggested. 80276219Sbapt# The suffix ".7" will automatically be appended. 81276219Sbapt# It is possible to set only one or a few of these variables, 82276219Sbapt# there is no need to copy the whole block. 83276219Sbapt 84276219SbaptMANM_MAN="mandoc_man" # default is "man" 85276219SbaptMANM_MDOC="mandoc_mdoc" # default is "mdoc" 86276219SbaptMANM_ROFF="mandoc_roff" # default is "roff" 87276219SbaptMANM_EQN="mandoc_eqn" # default is "eqn" 88276219SbaptMANM_TBL="mandoc_tbl" # default is "tbl" 89276219Sbapt 90275397Sbapt# It is possible to change the utility program used for installation 91275397Sbapt# and the modes files are installed with. The defaults are: 92275397Sbapt 93275397SbaptINSTALL="install" 94275397SbaptINSTALL_PROGRAM="${INSTALL} -m 0555" 95275397SbaptINSTALL_LIB="${INSTALL} -m 0444" 96275397SbaptINSTALL_MAN="${INSTALL} -m 0444" 97275397SbaptINSTALL_DATA="${INSTALL} -m 0444" 98275397Sbapt 99275397Sbapt# --- user settings related to database support ------------------------ 100275397Sbapt 101275397Sbapt# By default, building makewhatis(8) and apropos(1) is enabled. 102275397Sbapt# To disable it, for example to avoid the dependency on SQLite3, 103275397Sbapt# use the following line. It that case, the remaining settings 104275397Sbapt# in this section are irrelevant. 105275397Sbapt 106275397SbaptBUILD_DB=0 107275397Sbapt 108275397Sbapt# Two libraries are needed: SQLite3 and ohash(3). 109275397Sbapt# Autoconfiguration tries the following linker flags to find them. 110275397Sbapt# If none of these work, add a working DBLIB line to configure.local, 111275397Sbapt# disabling autodetection for library directories. 112275397Sbapt 113275397SbaptDBLIB="-lsqlite3" 114275397SbaptDBLIB="-lsqlite3 -lutil" 115275397SbaptDBLIB="-L/usr/local/lib -lsqlite3" 116275397Sbapt 117275397Sbapt# When library autodetection decides to use -L/usr/local/lib, 118275397Sbapt# -I/usr/local/include is automatically added to CFLAGS. 119275397Sbapt# If you manually set DBLIB to something including -L/usr/local/lib, 120275397Sbapt# chances are you will also need the following line: 121275397Sbapt 122275397SbaptCFLAGS="${CFLAGS} -I/usr/local/include" 123275397Sbapt 124275397Sbapt# The man(1) utility needs to know where the manuals reside. 125275397Sbapt# We know of two ways to tell it: via manpath(1) or man.conf(5). 126275397Sbapt# The latter is used by OpenBSD and NetBSD, the former by most 127275397Sbapt# other systems. 128275397Sbapt 129275397Sbapt# Force usage of manpath(1). 130275397Sbapt# If it is not installed or not operational, 131275397Sbapt# makewhatis(8) and apropos(1) will not work properly. 132275397Sbapt 133275397SbaptHAVE_MANPATH=1 134275397Sbapt 135275397Sbapt# Force usage of man.conf(5). 136275397Sbapt# If it does not exist or contains no valid configuration, 137275397Sbapt# makewhatis(8) and apropos(1) will not work properly. 138275397Sbapt 139275397SbaptHAVE_MANPATH=0 140275397Sbapt 141276219Sbapt# Some distributions may want to avoid naming conflicts 142276219Sbapt# with groff, man-db, or other tools. 143276219Sbapt# If you want to change the names of binary programs, 144276219Sbapt# the following alternative names are suggested. 145276219Sbapt# Using other names is possible as well. 146276219Sbapt# This changes the names of the installed section 1 and section 8 147276219Sbapt# manual pages as well. 148276219Sbapt# It is possible to set only one or a few of these variables, 149276219Sbapt# there is no need to copy the whole block. 150276219Sbapt 151276219SbaptBINM_APROPOS=mapropos # default is "apropos" 152276219SbaptBINM_MAN=mman # default is "man" 153276219SbaptBINM_WHATIS=mwhatis # default is "whatis" 154276219SbaptBINM_MAKEWHATIS=mandocdb # default is "makewhatis" 155276219Sbapt 156275397Sbapt# --- user settings related man.cgi ------------------------------------ 157275397Sbapt 158275397Sbapt# By default, building man.cgi(8) is disabled. To enable it, copy 159275397Sbapt# cgi.h.example to cgi.h, edit it, and use the following line. 160275397Sbapt# Obviously, this requires that BUILD_DB is enabled, too. 161275397Sbapt 162275397SbaptBUILD_CGI=1 163275397Sbapt 164275397Sbapt# The remaining settings in this section are only relevant if BUILD_CGI 165275397Sbapt# is enabled. Otherwise, they have no effect either way. 166275397Sbapt 167275397Sbapt# By default, man.cgi(8) is linked statically. 168275397Sbapt# Some systems do not support static linking, for example Mac OS X. 169275397Sbapt# In that case, use the following line: 170275397Sbapt 171275397SbaptSTATIC= 172275397Sbapt 173275397Sbapt# Some systems, for example Linux, require -pthread for static linking: 174275397Sbapt 175275397SbaptSTATIC="-static -pthread" 176275397Sbapt 177275397Sbapt# Some directories. 178275397Sbapt# This works just like PREFIX, see above. 179275397Sbapt 180275397SbaptWWWPREFIX="/var/www" 181275397SbaptHTDOCDIR="${WWWPREFIX}/htdocs" 182275397SbaptCGIBINDIR="${WWWPREFIX}/cgi-bin" 183275397Sbapt 184275397Sbapt# --- settings that rarely need to be touched -------------------------- 185275397Sbapt 186275397Sbapt# Do not set these variables unless you really need to. 187275397Sbapt 188275397Sbapt# You can manually override the compiler to be used. 189275397Sbapt# But that's rarely useful because ./configure asks your make(1) 190275397Sbapt# which compiler to use, and that answer will hardly be wrong. 191275397Sbapt 192275397SbaptCC=cc 193275397Sbapt 194275397Sbapt# The default compiler flags are: 195275397Sbapt 196275397SbaptCFLAGS="-g -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings" 197275397Sbapt 198275397Sbapt# In rare cases, it may be required to skip individual automatic tests. 199275397Sbapt# Each of the following variables can be set to 0 (test will not be run 200275397Sbapt# and will be regarded as failed) or 1 (test will not be run and will 201275397Sbapt# be regarded as successful). 202275397Sbapt 203275397SbaptHAVE_DIRENT_NAMLEN=0 204275397SbaptHAVE_FGETLN=0 205275397SbaptHAVE_FTS=0 206275397SbaptHAVE_GETSUBOPT=0 207275397SbaptHAVE_MMAP=0 208275397SbaptHAVE_REALLOCARRAY=0 209275397SbaptHAVE_STRCASESTR=0 210275397SbaptHAVE_STRLCAT=0 211275397SbaptHAVE_STRLCPY=0 212275397SbaptHAVE_STRPTIME=0 213275397SbaptHAVE_STRSEP=0 214275397Sbapt 215275397SbaptHAVE_SQLITE3=0 216275397SbaptHAVE_SQLITE3_ERRSTR=0 217275397SbaptHAVE_OHASH=0 218