1294113Sbapt# $Id: configure.local.example,v 1.10 2015/11/07 13:14:21 schwarze Exp $
2275397Sbapt#
3279527Sbapt# Copyright (c) 2014, 2015 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
51294113Sbapt# When man(1) or apropos(1) is called without -m and -M options,
52294113Sbapt# MANPATH is not set in the environment, man.conf(5) is not available
53294113Sbapt# and manpath(1) not used, manuals are searched for in the following
54294113Sbapt# directory trees by default.
55294113Sbapt
56294113SbaptMANPATH_DEFAULT="/usr/share/man:/usr/X11R6/man:/usr/local/man"
57294113Sbapt
58275397Sbapt# In manual pages written in the mdoc(7) language, the operating system
59275397Sbapt# version is displayed in the page footer line.  If an operating system
60275397Sbapt# is specified as an argument to the .Os macro, that is always used.
61275397Sbapt# If the .Os macro has no argument and an operation system is specified
62275397Sbapt# with the mandoc(1) -Ios= command line option, that is used.
63275397Sbapt# Otherwise, the uname(3) library function is called at runtime to find
64275397Sbapt# the name of the operating system.
65275397Sbapt# If you do not want uname(3) to be called but instead want a fixed
66275397Sbapt# string to be used, use the following line:
67275397Sbapt
68276219SbaptOSNAME="OpenBSD 5.6"
69275397Sbapt
70275397Sbapt# The following installation directories are used.
71275397Sbapt# It is possible to set only one or a few of these variables,
72275397Sbapt# there is no need to copy the whole block.
73275397Sbapt# Even if you set PREFIX to something else, the other variables
74275397Sbapt# pick it up without copying them all over.
75275397Sbapt
76275397SbaptPREFIX="/usr/local"
77275397SbaptBINDIR="${PREFIX}/bin"
78275397SbaptSBINDIR="${PREFIX}/sbin"
79275397SbaptINCLUDEDIR="${PREFIX}/include/mandoc"
80275397SbaptLIBDIR="${PREFIX}/lib/mandoc"
81275397SbaptMANDIR="${PREFIX}/man"
82275397Sbapt
83279527Sbapt# The man(1) utility needs to know where the manuals reside.
84279527Sbapt# We know of two ways to tell it: via manpath(1) or man.conf(5).
85279527Sbapt# The latter is used by OpenBSD and NetBSD, the former by most
86279527Sbapt# other systems.
87279527Sbapt
88279527Sbapt# Force usage of manpath(1).
89279527Sbapt# If it is not installed or not operational,
90279527Sbapt# man(1), makewhatis(8), and apropos(1) will not work properly.
91279527SbaptHAVE_MANPATH=1
92279527Sbapt
93279527Sbapt# Force usage of man.conf(5).
94279527Sbapt# If it does not exist or contains no valid configuration,
95279527Sbapt# man(1), makewhatis(8), and apropos(1) will not work properly.
96279527SbaptHAVE_MANPATH=0
97279527Sbapt
98294113Sbapt# Some distributions may want to avoid naming conflicts
99294113Sbapt# with the configuration files of other man(1) implementations.
100294113Sbapt# This changes the name of the installed section 5 manual page as well.
101294113SbaptMANM_MANCONF="mandoc.conf"	# default is "man.conf"
102294113Sbapt
103276219Sbapt# Some distributions may want to avoid naming conflicts among manuals.
104276219Sbapt# If you want to change the names of installed section 7 manual pages,
105276219Sbapt# the following alternative names are suggested.
106276219Sbapt# The suffix ".7" will automatically be appended.
107276219Sbapt# It is possible to set only one or a few of these variables,
108276219Sbapt# there is no need to copy the whole block.
109276219Sbapt
110276219SbaptMANM_MAN="mandoc_man"		# default is "man"
111276219SbaptMANM_MDOC="mandoc_mdoc"		# default is "mdoc"
112276219SbaptMANM_ROFF="mandoc_roff"		# default is "roff"
113276219SbaptMANM_EQN="mandoc_eqn"		# default is "eqn"
114276219SbaptMANM_TBL="mandoc_tbl"		# default is "tbl"
115276219Sbapt
116279527Sbapt# Some distributions may want to avoid naming conflicts
117294113Sbapt# with other man(1) and soelim(1) utilities.
118294113Sbapt# If you want to change the names of binary programs,
119294113Sbapt# the following alternative names are suggested.
120294113Sbapt# Using different names is possible as well.
121294113Sbapt# This changes the names of the installed section 1 manual pages as well.
122279527Sbapt
123279527SbaptBINM_MAN=mman			# default is "man"
124294113SbaptBINM_SOELIM=msoelim		# default is "soelim"
125279527Sbapt
126275397Sbapt# It is possible to change the utility program used for installation
127275397Sbapt# and the modes files are installed with.  The defaults are:
128275397Sbapt
129275397SbaptINSTALL="install"
130275397SbaptINSTALL_PROGRAM="${INSTALL} -m 0555"
131275397SbaptINSTALL_LIB="${INSTALL} -m 0444"
132275397SbaptINSTALL_MAN="${INSTALL} -m 0444"
133275397SbaptINSTALL_DATA="${INSTALL} -m 0444"
134275397Sbapt
135275397Sbapt# --- user settings related to database support ------------------------
136275397Sbapt
137275397Sbapt# By default, building makewhatis(8) and apropos(1) is enabled.
138275397Sbapt# To disable it, for example to avoid the dependency on SQLite3,
139275397Sbapt# use the following line.  It that case, the remaining settings
140275397Sbapt# in this section are irrelevant.
141275397Sbapt
142275397SbaptBUILD_DB=0
143275397Sbapt
144275397Sbapt# Two libraries are needed: SQLite3 and ohash(3).
145275397Sbapt# Autoconfiguration tries the following linker flags to find them.
146275397Sbapt# If none of these work, add a working DBLIB line to configure.local,
147275397Sbapt# disabling autodetection for library directories.
148275397Sbapt
149275397SbaptDBLIB="-lsqlite3"
150275397SbaptDBLIB="-lsqlite3 -lutil"
151275397SbaptDBLIB="-L/usr/local/lib -lsqlite3"
152275397Sbapt
153275397Sbapt# When library autodetection decides to use -L/usr/local/lib,
154275397Sbapt# -I/usr/local/include is automatically added to CFLAGS.
155275397Sbapt# If you manually set DBLIB to something including -L/usr/local/lib,
156275397Sbapt# chances are you will also need the following line:
157275397Sbapt
158275397SbaptCFLAGS="${CFLAGS} -I/usr/local/include"
159275397Sbapt
160276219Sbapt# Some distributions may want to avoid naming conflicts
161279527Sbapt# with another implementation of apropos(1) and makewhatis(8).
162279527Sbapt# If you want to change the names of the binary programs,
163276219Sbapt# the following alternative names are suggested.
164276219Sbapt# Using other names is possible as well.
165276219Sbapt# This changes the names of the installed section 1 and section 8
166276219Sbapt# manual pages as well.
167279527Sbapt# It is possible to set only one or two of these variables,
168276219Sbapt# there is no need to copy the whole block.
169276219Sbapt
170276219SbaptBINM_APROPOS=mapropos		# default is "apropos"
171276219SbaptBINM_WHATIS=mwhatis		# default is "whatis"
172276219SbaptBINM_MAKEWHATIS=mandocdb	# default is "makewhatis"
173276219Sbapt
174279527Sbapt# When using the "homebrew" package manager on Mac OS X, the actual
175279527Sbapt# manuals are located in a so-called "cellar" and only symlinked
176279527Sbapt# into the manual trees.  To allow mandoc to follow such symlinks,
177279527Sbapt# you have to specify the physical location of the cellar as returned
178279527Sbapt# by realpath(3), for example:
179279527Sbapt
180279527SbaptPREFIX="/usr/local"
181279527SbaptHOMEBREWDIR="${PREFIX}/Cellar"
182279527Sbapt
183275397Sbapt# --- user settings related man.cgi ------------------------------------
184275397Sbapt
185275397Sbapt# By default, building man.cgi(8) is disabled.  To enable it, copy
186275397Sbapt# cgi.h.example to cgi.h, edit it, and use the following line.
187275397Sbapt# Obviously, this requires that BUILD_DB is enabled, too.
188275397Sbapt
189275397SbaptBUILD_CGI=1
190275397Sbapt
191275397Sbapt# The remaining settings in this section are only relevant if BUILD_CGI
192275397Sbapt# is enabled.  Otherwise, they have no effect either way.
193275397Sbapt
194275397Sbapt# By default, man.cgi(8) is linked statically.
195275397Sbapt# Some systems do not support static linking, for example Mac OS X.
196275397Sbapt# In that case, use the following line:
197275397Sbapt
198275397SbaptSTATIC=
199275397Sbapt
200275397Sbapt# Some systems, for example Linux, require -pthread for static linking:
201275397Sbapt
202275397SbaptSTATIC="-static -pthread"
203275397Sbapt
204275397Sbapt# Some directories.
205275397Sbapt# This works just like PREFIX, see above.
206275397Sbapt
207275397SbaptWWWPREFIX="/var/www"
208275397SbaptHTDOCDIR="${WWWPREFIX}/htdocs"
209275397SbaptCGIBINDIR="${WWWPREFIX}/cgi-bin"
210275397Sbapt
211275397Sbapt# --- settings that rarely need to be touched --------------------------
212275397Sbapt
213275397Sbapt# Do not set these variables unless you really need to.
214275397Sbapt
215275397Sbapt# You can manually override the compiler to be used.
216275397Sbapt# But that's rarely useful because ./configure asks your make(1)
217275397Sbapt# which compiler to use, and that answer will hardly be wrong.
218275397Sbapt
219275397SbaptCC=cc
220275397Sbapt
221275397Sbapt# The default compiler flags are:
222275397Sbapt
223275397SbaptCFLAGS="-g -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings"
224275397Sbapt
225275397Sbapt# In rare cases, it may be required to skip individual automatic tests.
226275397Sbapt# Each of the following variables can be set to 0 (test will not be run
227275397Sbapt# and will be regarded as failed) or 1 (test will not be run and will
228275397Sbapt# be regarded as successful).
229275397Sbapt
230275397SbaptHAVE_DIRENT_NAMLEN=0
231275397SbaptHAVE_FGETLN=0
232275397SbaptHAVE_FTS=0
233275397SbaptHAVE_GETSUBOPT=0
234275397SbaptHAVE_MMAP=0
235275397SbaptHAVE_REALLOCARRAY=0
236275397SbaptHAVE_STRCASESTR=0
237275397SbaptHAVE_STRLCAT=0
238275397SbaptHAVE_STRLCPY=0
239275397SbaptHAVE_STRPTIME=0
240275397SbaptHAVE_STRSEP=0
241279527SbaptHAVE_STRTONUM=0
242275397Sbapt
243275397SbaptHAVE_SQLITE3=0
244275397SbaptHAVE_SQLITE3_ERRSTR=0
245275397SbaptHAVE_OHASH=0
246