configure.local.example revision 279527
1139825Simp# $Id: configure.local.example,v 1.6 2015/02/16 14:56:22 schwarze Exp $ 2148078Srwatson# 3148078Srwatson# Copyright (c) 2014, 2015 Ingo Schwarze <schwarze@openbsd.org> 4148078Srwatson# 592654Sjeff# Permission to use, copy, modify, and distribute this software for any 692654Sjeff# purpose with or without fee is hereby granted, provided that the above 792654Sjeff# copyright notice and this permission notice appear in all copies. 892654Sjeff# 992654Sjeff# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 1092654Sjeff# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 1192654Sjeff# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 1292654Sjeff# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 1392654Sjeff# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 1492654Sjeff# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 1592654Sjeff# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 1692654Sjeff 1792654Sjeff# For all settings documented in this file, there are reasonable 1892654Sjeff# defaults and/or the ./configure script attempts autodetection. 1992654Sjeff# Consequently, you only need to create a file ./configure.local 2092654Sjeff# and put any of these settings into it if ./configure autodetection 2192654Sjeff# fails or if you want to make different choices for other reasons. 2292654Sjeff 2392654Sjeff# If autodetection fails, please tell <tech@mdocml.bsd.lv>. 2492654Sjeff 2592654Sjeff# We recommend that you write ./configure.local from scratch and 2692654Sjeff# only put the lines there you need. This file contains examples. 2792654Sjeff# It is not intended as a template to be copied as a whole. 2892654Sjeff 2992654Sjeff# --- user settings relevant for all builds ---------------------------- 3092654Sjeff 3192654Sjeff# For -Tutf8 and -Tlocale operation, mandoc(1) requires <locale.h> 3292654Sjeff# providing setlocale(3) and <wchar.h> providing wcwidth(3) and 3392654Sjeff# putwchar(3) with a wchar_t storing UCS-4 values. Theoretically, 3492654Sjeff# the latter should be tested with the __STDC_ISO_10646__ feature 3592654Sjeff# macro. In practice, many <wchar.h> headers do not provide that 3692654Sjeff# macro even though they treat wchar_t as UCS-4. So the automatic 3792654Sjeff# test only checks that wchar_t is wide enough, that is, at least 3892654Sjeff# four bytes. 3992654Sjeff 4092654Sjeff# The following line forces multi-byte support. 4192654Sjeff# If your C library does not treat wchar_t as UCS-4, the UTF-8 output 4292654Sjeff# mode will print garbage. 4392654Sjeff 4492654SjeffHAVE_WCHAR=1 4592654Sjeff 4692654Sjeff# The following line disables multi-byte support. 47129906Sbmilekic# The output modes -Tutf8 and -Tlocale will be the same as -Tascii. 4892654Sjeff 4992654SjeffHAVE_WCHAR=0 5092654Sjeff 51166213Smohans# In manual pages written in the mdoc(7) language, the operating system 52166213Smohans# version is displayed in the page footer line. If an operating system 5392654Sjeff# is specified as an argument to the .Os macro, that is always used. 5492654Sjeff# If the .Os macro has no argument and an operation system is specified 5592654Sjeff# with the mandoc(1) -Ios= command line option, that is used. 5692654Sjeff# Otherwise, the uname(3) library function is called at runtime to find 5792654Sjeff# the name of the operating system. 5892654Sjeff# If you do not want uname(3) to be called but instead want a fixed 5992654Sjeff# string to be used, use the following line: 60132987Sgreen 6192654SjeffOSNAME="OpenBSD 5.6" 6292654Sjeff 63132987Sgreen# The following installation directories are used. 64132987Sgreen# It is possible to set only one or a few of these variables, 6592654Sjeff# there is no need to copy the whole block. 6692654Sjeff# Even if you set PREFIX to something else, the other variables 6792654Sjeff# pick it up without copying them all over. 68105689Ssheldonh 6992654SjeffPREFIX="/usr/local" 70132987SgreenBINDIR="${PREFIX}/bin" 7192654SjeffSBINDIR="${PREFIX}/sbin" 7292654SjeffINCLUDEDIR="${PREFIX}/include/mandoc" 7392654SjeffLIBDIR="${PREFIX}/lib/mandoc" 7492654SjeffMANDIR="${PREFIX}/man" 7592654SjeffEXAMPLEDIR="${PREFIX}/share/examples/mandoc" 7692654Sjeff 7792654Sjeff# The man(1) utility needs to know where the manuals reside. 7892654Sjeff# We know of two ways to tell it: via manpath(1) or man.conf(5). 7992654Sjeff# The latter is used by OpenBSD and NetBSD, the former by most 8092654Sjeff# other systems. 8192654Sjeff 8292654Sjeff# Force usage of manpath(1). 8392654Sjeff# If it is not installed or not operational, 8492654Sjeff# man(1), makewhatis(8), and apropos(1) will not work properly. 8592654SjeffHAVE_MANPATH=1 8692654Sjeff 8792654Sjeff# Force usage of man.conf(5). 8892654Sjeff# If it does not exist or contains no valid configuration, 8992654Sjeff# man(1), makewhatis(8), and apropos(1) will not work properly. 9092654SjeffHAVE_MANPATH=0 9192654Sjeff 9292654Sjeff# Some distributions may want to avoid naming conflicts among manuals. 9392654Sjeff# If you want to change the names of installed section 7 manual pages, 9492654Sjeff# the following alternative names are suggested. 9592654Sjeff# The suffix ".7" will automatically be appended. 96132987Sgreen# It is possible to set only one or a few of these variables, 9792654Sjeff# there is no need to copy the whole block. 9892654Sjeff 99132987SgreenMANM_MAN="mandoc_man" # default is "man" 100132987SgreenMANM_MDOC="mandoc_mdoc" # default is "mdoc" 10192654SjeffMANM_ROFF="mandoc_roff" # default is "roff" 10292654SjeffMANM_EQN="mandoc_eqn" # default is "eqn" 10392654SjeffMANM_TBL="mandoc_tbl" # default is "tbl" 10492654Sjeff 10592654Sjeff# Some distributions may want to avoid naming conflicts 106132987Sgreen# with another man(1) utility. 10792654Sjeff# If you want to change the name of the binary program, 10892654Sjeff# the following alternative name is suggested. 10992654Sjeff# Using a different name is possible as well. 11092654Sjeff# This changes the name of the installed section 1 manual page as well. 11192654Sjeff 11292654SjeffBINM_MAN=mman # default is "man" 11392654Sjeff 11492654Sjeff# It is possible to change the utility program used for installation 11592654Sjeff# and the modes files are installed with. The defaults are: 11692654Sjeff 11792654SjeffINSTALL="install" 11892654SjeffINSTALL_PROGRAM="${INSTALL} -m 0555" 11992654SjeffINSTALL_LIB="${INSTALL} -m 0444" 12092654SjeffINSTALL_MAN="${INSTALL} -m 0444" 12192654SjeffINSTALL_DATA="${INSTALL} -m 0444" 12292654Sjeff 12392654Sjeff# --- user settings related to database support ------------------------ 12492654Sjeff 12592654Sjeff# By default, building makewhatis(8) and apropos(1) is enabled. 12692654Sjeff# To disable it, for example to avoid the dependency on SQLite3, 12792654Sjeff# use the following line. It that case, the remaining settings 12892654Sjeff# in this section are irrelevant. 12992654Sjeff 13092654SjeffBUILD_DB=0 13192654Sjeff 13292654Sjeff# Two libraries are needed: SQLite3 and ohash(3). 13392654Sjeff# Autoconfiguration tries the following linker flags to find them. 13492654Sjeff# If none of these work, add a working DBLIB line to configure.local, 13592654Sjeff# disabling autodetection for library directories. 136105689Ssheldonh 13792654SjeffDBLIB="-lsqlite3" 13892654SjeffDBLIB="-lsqlite3 -lutil" 13992654SjeffDBLIB="-L/usr/local/lib -lsqlite3" 14092654Sjeff 14192654Sjeff# When library autodetection decides to use -L/usr/local/lib, 14292654Sjeff# -I/usr/local/include is automatically added to CFLAGS. 14392654Sjeff# If you manually set DBLIB to something including -L/usr/local/lib, 14492654Sjeff# chances are you will also need the following line: 14592654Sjeff 14692654SjeffCFLAGS="${CFLAGS} -I/usr/local/include" 14792654Sjeff 14892654Sjeff# Some distributions may want to avoid naming conflicts 14992654Sjeff# with another implementation of apropos(1) and makewhatis(8). 15092654Sjeff# If you want to change the names of the binary programs, 15192654Sjeff# the following alternative names are suggested. 15292654Sjeff# Using other names is possible as well. 15392654Sjeff# This changes the names of the installed section 1 and section 8 15492654Sjeff# manual pages as well. 15592654Sjeff# It is possible to set only one or two of these variables, 15692654Sjeff# there is no need to copy the whole block. 15792654Sjeff 15892654SjeffBINM_APROPOS=mapropos # default is "apropos" 15992654SjeffBINM_WHATIS=mwhatis # default is "whatis" 16092654SjeffBINM_MAKEWHATIS=mandocdb # default is "makewhatis" 16192654Sjeff 16292654Sjeff# When using the "homebrew" package manager on Mac OS X, the actual 16392654Sjeff# manuals are located in a so-called "cellar" and only symlinked 16492654Sjeff# into the manual trees. To allow mandoc to follow such symlinks, 16592654Sjeff# you have to specify the physical location of the cellar as returned 16692654Sjeff# by realpath(3), for example: 16795925Sarr 16892654SjeffPREFIX="/usr/local" 169148072SsilbyHOMEBREWDIR="${PREFIX}/Cellar" 17092654Sjeff 171120223Sjeff# --- user settings related man.cgi ------------------------------------ 172129906Sbmilekic 173129906Sbmilekic# By default, building man.cgi(8) is disabled. To enable it, copy 174129906Sbmilekic# cgi.h.example to cgi.h, edit it, and use the following line. 175129906Sbmilekic# Obviously, this requires that BUILD_DB is enabled, too. 176129906Sbmilekic 177129906SbmilekicBUILD_CGI=1 178129906Sbmilekic 179129906Sbmilekic# The remaining settings in this section are only relevant if BUILD_CGI 180129906Sbmilekic# is enabled. Otherwise, they have no effect either way. 181129906Sbmilekic 182129906Sbmilekic# By default, man.cgi(8) is linked statically. 183129906Sbmilekic# Some systems do not support static linking, for example Mac OS X. 184129906Sbmilekic# In that case, use the following line: 185129906Sbmilekic 186129906SbmilekicSTATIC= 187129906Sbmilekic 188129906Sbmilekic# Some systems, for example Linux, require -pthread for static linking: 189129906Sbmilekic 190129906SbmilekicSTATIC="-static -pthread" 191129906Sbmilekic 192129906Sbmilekic# Some directories. 193129906Sbmilekic# This works just like PREFIX, see above. 194129906Sbmilekic 195129913SbmilekicWWWPREFIX="/var/www" 196129913SbmilekicHTDOCDIR="${WWWPREFIX}/htdocs" 197129913SbmilekicCGIBINDIR="${WWWPREFIX}/cgi-bin" 198129906Sbmilekic 199129906Sbmilekic# --- settings that rarely need to be touched -------------------------- 200129906Sbmilekic 201129906Sbmilekic# Do not set these variables unless you really need to. 202129906Sbmilekic 203129906Sbmilekic# You can manually override the compiler to be used. 204129906Sbmilekic# But that's rarely useful because ./configure asks your make(1) 205129906Sbmilekic# which compiler to use, and that answer will hardly be wrong. 206129906Sbmilekic 207120223SjeffCC=cc 208120223Sjeff 209120223Sjeff# The default compiler flags are: 210148072Ssilby 211120223SjeffCFLAGS="-g -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings" 21292654Sjeff 21392654Sjeff# In rare cases, it may be required to skip individual automatic tests. 21492654Sjeff# Each of the following variables can be set to 0 (test will not be run 21592654Sjeff# and will be regarded as failed) or 1 (test will not be run and will 21692654Sjeff# be regarded as successful). 21792654Sjeff 21892654SjeffHAVE_DIRENT_NAMLEN=0 21992654SjeffHAVE_FGETLN=0 22095758SjeffHAVE_FTS=0 221103531SjeffHAVE_GETSUBOPT=0 222103531SjeffHAVE_MMAP=0 223103531SjeffHAVE_REALLOCARRAY=0 224103531SjeffHAVE_STRCASESTR=0 225103531SjeffHAVE_STRLCAT=0 226103531SjeffHAVE_STRLCPY=0 227103531SjeffHAVE_STRPTIME=0 228103531SjeffHAVE_STRSEP=0 229129906SbmilekicHAVE_STRTONUM=0 230129906Sbmilekic 231129906SbmilekicHAVE_SQLITE3=0 23292654SjeffHAVE_SQLITE3_ERRSTR=0 23392654SjeffHAVE_OHASH=0 23492654Sjeff