configure.local.example revision 275397
1275397Sbapt# $Id: configure.local.example,v 1.1 2014/08/16 19:00:01 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 61275397SbaptOSNAME="OpenBSD 5.5" 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 77275397Sbapt# It is possible to change the utility program used for installation 78275397Sbapt# and the modes files are installed with. The defaults are: 79275397Sbapt 80275397SbaptINSTALL="install" 81275397SbaptINSTALL_PROGRAM="${INSTALL} -m 0555" 82275397SbaptINSTALL_LIB="${INSTALL} -m 0444" 83275397SbaptINSTALL_MAN="${INSTALL} -m 0444" 84275397SbaptINSTALL_DATA="${INSTALL} -m 0444" 85275397Sbapt 86275397Sbapt# --- user settings related to database support ------------------------ 87275397Sbapt 88275397Sbapt# By default, building makewhatis(8) and apropos(1) is enabled. 89275397Sbapt# To disable it, for example to avoid the dependency on SQLite3, 90275397Sbapt# use the following line. It that case, the remaining settings 91275397Sbapt# in this section are irrelevant. 92275397Sbapt 93275397SbaptBUILD_DB=0 94275397Sbapt 95275397Sbapt# Two libraries are needed: SQLite3 and ohash(3). 96275397Sbapt# Autoconfiguration tries the following linker flags to find them. 97275397Sbapt# If none of these work, add a working DBLIB line to configure.local, 98275397Sbapt# disabling autodetection for library directories. 99275397Sbapt 100275397SbaptDBLIB="-lsqlite3" 101275397SbaptDBLIB="-lsqlite3 -lutil" 102275397SbaptDBLIB="-L/usr/local/lib -lsqlite3" 103275397Sbapt 104275397Sbapt# When library autodetection decides to use -L/usr/local/lib, 105275397Sbapt# -I/usr/local/include is automatically added to CFLAGS. 106275397Sbapt# If you manually set DBLIB to something including -L/usr/local/lib, 107275397Sbapt# chances are you will also need the following line: 108275397Sbapt 109275397SbaptCFLAGS="${CFLAGS} -I/usr/local/include" 110275397Sbapt 111275397Sbapt# The man(1) utility needs to know where the manuals reside. 112275397Sbapt# We know of two ways to tell it: via manpath(1) or man.conf(5). 113275397Sbapt# The latter is used by OpenBSD and NetBSD, the former by most 114275397Sbapt# other systems. 115275397Sbapt 116275397Sbapt# Force usage of manpath(1). 117275397Sbapt# If it is not installed or not operational, 118275397Sbapt# makewhatis(8) and apropos(1) will not work properly. 119275397Sbapt 120275397SbaptHAVE_MANPATH=1 121275397Sbapt 122275397Sbapt# Force usage of man.conf(5). 123275397Sbapt# If it does not exist or contains no valid configuration, 124275397Sbapt# makewhatis(8) and apropos(1) will not work properly. 125275397Sbapt 126275397SbaptHAVE_MANPATH=0 127275397Sbapt 128275397Sbapt# --- user settings related man.cgi ------------------------------------ 129275397Sbapt 130275397Sbapt# By default, building man.cgi(8) is disabled. To enable it, copy 131275397Sbapt# cgi.h.example to cgi.h, edit it, and use the following line. 132275397Sbapt# Obviously, this requires that BUILD_DB is enabled, too. 133275397Sbapt 134275397SbaptBUILD_CGI=1 135275397Sbapt 136275397Sbapt# The remaining settings in this section are only relevant if BUILD_CGI 137275397Sbapt# is enabled. Otherwise, they have no effect either way. 138275397Sbapt 139275397Sbapt# By default, man.cgi(8) is linked statically. 140275397Sbapt# Some systems do not support static linking, for example Mac OS X. 141275397Sbapt# In that case, use the following line: 142275397Sbapt 143275397SbaptSTATIC= 144275397Sbapt 145275397Sbapt# Some systems, for example Linux, require -pthread for static linking: 146275397Sbapt 147275397SbaptSTATIC="-static -pthread" 148275397Sbapt 149275397Sbapt# Some directories. 150275397Sbapt# This works just like PREFIX, see above. 151275397Sbapt 152275397SbaptWWWPREFIX="/var/www" 153275397SbaptHTDOCDIR="${WWWPREFIX}/htdocs" 154275397SbaptCGIBINDIR="${WWWPREFIX}/cgi-bin" 155275397Sbapt 156275397Sbapt# --- settings that rarely need to be touched -------------------------- 157275397Sbapt 158275397Sbapt# Do not set these variables unless you really need to. 159275397Sbapt 160275397Sbapt# You can manually override the compiler to be used. 161275397Sbapt# But that's rarely useful because ./configure asks your make(1) 162275397Sbapt# which compiler to use, and that answer will hardly be wrong. 163275397Sbapt 164275397SbaptCC=cc 165275397Sbapt 166275397Sbapt# The default compiler flags are: 167275397Sbapt 168275397SbaptCFLAGS="-g -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings" 169275397Sbapt 170275397Sbapt# In rare cases, it may be required to skip individual automatic tests. 171275397Sbapt# Each of the following variables can be set to 0 (test will not be run 172275397Sbapt# and will be regarded as failed) or 1 (test will not be run and will 173275397Sbapt# be regarded as successful). 174275397Sbapt 175275397SbaptHAVE_DIRENT_NAMLEN=0 176275397SbaptHAVE_FGETLN=0 177275397SbaptHAVE_FTS=0 178275397SbaptHAVE_GETSUBOPT=0 179275397SbaptHAVE_MMAP=0 180275397SbaptHAVE_REALLOCARRAY=0 181275397SbaptHAVE_STRCASESTR=0 182275397SbaptHAVE_STRLCAT=0 183275397SbaptHAVE_STRLCPY=0 184275397SbaptHAVE_STRPTIME=0 185275397SbaptHAVE_STRSEP=0 186275397Sbapt 187275397SbaptHAVE_SQLITE3=0 188275397SbaptHAVE_SQLITE3_ERRSTR=0 189275397SbaptHAVE_OHASH=0 190