1# $Id: configure.local.example,v 1.36 2019/03/06 10:18:58 schwarze Exp $
2#
3# Copyright (c) 2014-2019 Ingo Schwarze <schwarze@openbsd.org>
4#
5# Permission to use, copy, modify, and distribute this software for any
6# purpose with or without fee is hereby granted, provided that the above
7# copyright notice and this permission notice appear in all copies.
8#
9# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16
17# For all settings documented in this file, there are reasonable
18# defaults and/or the ./configure script attempts autodetection.
19# Consequently, you only need to create a file ./configure.local
20# and put any of these settings into it if ./configure autodetection
21# fails or if you want to make different choices for other reasons.
22
23# If autodetection fails, please tell <tech@mandoc.bsd.lv>.
24
25# We recommend that you write ./configure.local from scratch and
26# only put the lines there you need.  This file contains examples.
27# It is not intended as a template to be copied as a whole.
28
29# --- user settings relevant for all builds ----------------------------
30
31# For -Tutf8 and -Tlocale operation, mandoc(1) requires <locale.h>
32# providing setlocale(3) and <wchar.h> providing wcwidth(3) and
33# putwchar(3) with a wchar_t storing UCS-4 values.  Theoretically,
34# the latter should be tested with the __STDC_ISO_10646__ feature
35# macro.  In practice, many <wchar.h> headers do not provide that
36# macro even though they treat wchar_t as UCS-4.  So the automatic
37# test only checks that wchar_t is wide enough, that is, at least
38# four bytes.
39
40# The following line forces multi-byte support.
41# If your C library does not treat wchar_t as UCS-4, the UTF-8 output
42# mode will print garbage.
43
44HAVE_WCHAR=1
45
46# The following line disables multi-byte support.
47# The output modes -Tutf8 and -Tlocale will be the same as -Tascii.
48
49HAVE_WCHAR=0
50
51# For -Tutf8 mode, mandoc needs to set an arbitrary locale having
52# a UTF-8 character set.  If autodetection of a suitable locale
53# fails or selects an undesirable locale, you can manually choose
54# the locale for -Tutf8 mode:
55
56UTF8_LOCALE=en_US.UTF-8
57
58# When man(1) or apropos(1) is called without -m and -M options,
59# MANPATH is not set in the environment, and man.conf(5) is not
60# available, manuals are searched for in the following directory
61# trees by default.
62
63MANPATH_DEFAULT="/usr/share/man:/usr/X11R6/man:/usr/local/man"
64
65# Validation of cross references with mandoc -Tlint only looks
66# for manual pages in the following directories:
67
68MANPATH_BASE="/usr/share/man:/usr/X11R6/man"
69
70# When man(1) is called with the -S option and no manual page is
71# found matching the requested name and the requested architecture,
72# it tries to figure out whether the requested architecture is valid
73# for the present operating system.  Normally, ./configure detects
74# the operating system using uname(1).  If that fails or is not
75# desired, either of the following lines can be used:
76
77OSENUM=MANDOC_OS_NETBSD
78OSENUM=MANDOC_OS_OPENBSD
79OSENUM=MANDOC_OS_OTHER
80
81# In manual pages written in the mdoc(7) language, the operating system
82# version is displayed in the page footer line.  If an operating system
83# is specified as an argument to the .Os macro, that is always used.
84# If the .Os macro has no argument and an operation system is specified
85# with the mandoc(1) -Ios= command line option, that is used.
86# Otherwise, the uname(3) library function is called at runtime to find
87# the name of the operating system.
88# If you do not want uname(3) to be called but instead want a fixed
89# string to be used, use the following line:
90
91OSNAME="OpenBSD 6.5"
92
93# The following installation directories are used.
94# It is possible to set only one or a few of these variables,
95# there is no need to copy the whole block.
96# Even if you set PREFIX to something else, the other variables
97# pick it up without copying them all over.
98
99PREFIX="/usr/local"
100BINDIR="${PREFIX}/bin"
101SBINDIR="${PREFIX}/sbin"
102MANDIR="${PREFIX}/man"
103
104# If BINDIR and SBINDIR are not subdirectories of the same parent
105# directory or if the basename(1) of BINDIR differs from "bin",
106# the relative path from SBINDIR to BINDIR is also needed.
107# The default is:
108
109BIN_FROM_SBIN="../bin"
110
111# Some distributions may want to avoid naming conflicts
112# with the configuration files of other man(1) implementations.
113# This changes the name of the installed section 5 manual page as well.
114
115MANM_MANCONF="mandoc.conf"	# default is "man.conf"
116
117# Some distributions may want to avoid naming conflicts among manuals.
118# If you want to change the names of installed section 7 manual pages,
119# the following alternative names are suggested.
120# The suffix ".7" will automatically be appended.
121# It is possible to set only one or a few of these variables,
122# there is no need to copy the whole block.
123
124MANM_MAN="mandoc_man"		# default is "man"
125MANM_MDOC="mandoc_mdoc"		# default is "mdoc"
126MANM_ROFF="mandoc_roff"		# default is "roff"
127MANM_EQN="mandoc_eqn"		# default is "eqn"
128MANM_TBL="mandoc_tbl"		# default is "tbl"
129
130# Some distributions may want to avoid naming conflicts with
131# other man(1), apropos(1), makewhatis(8), or soelim(1) utilities.
132# If you want to change the names of binary programs,
133# the following alternative names are suggested.
134# Using different names is possible as well.
135# This changes the names of the installed section 1 and section 8
136# manual pages as well.
137# It is possible to set only one or two of these variables,
138# there is no need to copy the whole block.
139
140BINM_MAN=mman			# default is "man"
141BINM_APROPOS=mapropos		# default is "apropos"
142BINM_WHATIS=mwhatis		# default is "whatis"
143BINM_MAKEWHATIS=mandocdb	# default is "makewhatis"
144BINM_SOELIM=msoelim		# default is "soelim"
145
146# Some distributions do not want hardlinks
147# between installed binary programs.
148# Set the following variable to use symbolic links instead.
149# It is also used for links between manual pages.
150# It is only used by the install* targets.
151# When using this, DESTDIR must be empty or an absolute path.
152
153LN="ln -sf"			# default is "ln -f"
154
155# Before falling back to the bundled version of the ohash(3) hashing
156# library, autoconfiguration tries the following linker flag to
157# link against your system version.  If you do have ohash(3) on
158# your system but it needs different linker flags, set the following
159# variable to specify the required linker flags.
160
161LD_OHASH="-lutil"
162
163# Some platforms may need an additional linker flag for nanosleep(2).
164# If none is needed or it is -lrt, it is autodetected.
165# Otherwise, set the following variable.
166
167LD_NANOSLEEP="-lrt"
168
169# Some platforms may need an additional linker flag for recvmsg(2).
170# If none is needed or it is -lsocket, it is autodetected.
171# Otherwise, set the following variable.
172
173LD_RECVMSG="-lsocket"
174
175# Some platforms might need additional linker flags to link against
176# libmandoc that are not autodetected, though no such cases are
177# currently known.
178
179LDADD="-lm"
180
181# Some systems may want to set additional linker flags for all the
182# binaries, not only for those using libmandoc, for example for
183# hardening options.
184
185LDFLAGS="-Wl,-z,relro"
186
187# It is possible to change the utility program used for installation
188# and the modes files are installed with.  The defaults are:
189
190INSTALL="install"
191INSTALL_PROGRAM="${INSTALL} -m 0555"
192INSTALL_LIB="${INSTALL} -m 0444"
193INSTALL_MAN="${INSTALL} -m 0444"
194INSTALL_DATA="${INSTALL} -m 0444"
195
196# When using the "homebrew" package manager on Mac OS X, the actual
197# manuals are located in a so-called "cellar" and only symlinked
198# into the manual trees.  To allow mandoc to follow such symlinks,
199# you have to specify the physical location of the cellar as returned
200# by realpath(3), for example:
201
202PREFIX="/usr/local"
203HOMEBREWDIR="${PREFIX}/Cellar"
204
205# --- user settings for the mandoc(3) library --------------------------
206
207# By default, libmandoc.a is not installed.  It is almost never needed
208# because there is almost no non-mandoc software out there using this
209# library.  The one notable exception is NetBSD apropos(1).
210# So, when building for the NetBSD base system - but not for NetBSD
211# ports nor for pkgsrc! - you may want the following:
212
213INSTALL_LIBMANDOC=1
214
215# The following settings are only used when INSTALL_LIBMANDOC is set.
216
217INCLUDEDIR="${PREFIX}/include/mandoc"
218LIBDIR="${PREFIX}/lib/mandoc"
219
220# --- user settings related to man.cgi ---------------------------------
221
222# By default, building man.cgi(8) is disabled.  To enable it, copy
223# cgi.h.example to cgi.h, edit it, and use the following line.
224
225BUILD_CGI=1
226
227# The remaining settings in this section are only relevant if BUILD_CGI
228# is enabled.  Otherwise, they have no effect either way.
229
230# By default, man.cgi(8) is linked statically if the compiler supports
231# the -static option.  If automatic detection fails, you can force
232# static linking of man.cgi(8).
233
234STATIC="-static"
235
236# Some systems may require -pthread for static linking:
237
238STATIC="-static -pthread"
239
240# If static linking works in general but not with additional libraries
241# like -lrt or -lz, you can force dynamic linking.  This may for
242# example be required on SunOS 5.9.
243
244STATIC=" "
245
246# Some directories.
247# This works just like PREFIX, see above.
248
249WWWPREFIX="/var/www"
250HTDOCDIR="${WWWPREFIX}/htdocs"
251CGIBINDIR="${WWWPREFIX}/cgi-bin"
252
253# --- user settings related to catman ----------------------------------
254
255# By default, building mandocd(8) and catman(8) is disabled.
256# To enable it, use the following line.
257# It does not work on SunOS 5.10 because there is no mkdirat(2)
258# nor on SunOS 5.9 which also lacks CMSG_LEN(3) and CMSG_SPACE(3).
259
260BUILD_CATMAN=1
261
262# Install catman(8) with a different name.
263# See BINM_MAN above for details of how this works.
264
265BINM_CATMAN=mcatman		# default is "catman"
266
267# --- settings that rarely need to be touched --------------------------
268
269# Do not set these variables unless you really need to.
270
271# You can manually override the compiler to be used.
272# But that's rarely useful because ./configure asks your make(1)
273# which compiler to use, and that answer will hardly be wrong.
274
275CC=cc
276
277# Because the system compiler may not provide <stdint.h>,
278# SunOS 5.9 may need:
279
280CC=gcc
281
282# IBM AIX may need:
283
284CC=xlc
285
286# Normally, leave CFLAGS unset.  In that case, -g will automatically
287# be used, and various -W options will be added if the compiler
288# supports them.  If you define CFLAGS manually, it will be used
289# unchanged, and nothing will be added.
290
291CFLAGS="-g"
292
293# In rare cases, it may be required to skip individual automatic tests.
294# Each of the following variables can be set to 0 (test will not be run
295# and will be regarded as failed) or 1 (test will not be run and will
296# be regarded as successful).
297
298HAVE_DIRENT_NAMLEN=0
299HAVE_ENDIAN=0
300HAVE_EFTYPE=0
301HAVE_ERR=0
302HAVE_FTS=0  # Setting this implies HAVE_FTS_COMPARE_CONST=0.
303HAVE_FTS_COMPARE_CONST=0  # Setting this implies HAVE_FTS=1.
304HAVE_GETLINE=0
305HAVE_GETSUBOPT=0
306HAVE_ISBLANK=0
307HAVE_LESS_T=0
308HAVE_MKDTEMP=0
309HAVE_NTOHL=0
310HAVE_O_DIRECTORY=0
311HAVE_OHASH=0
312HAVE_PATH_MAX=0
313HAVE_PLEDGE=0
314HAVE_PROGNAME=0
315HAVE_REALLOCARRAY=0
316HAVE_RECALLOCARRAY=0
317HAVE_REWB_BSD=0
318HAVE_REWB_SYSV=0
319HAVE_STRCASESTR=0
320HAVE_STRINGLIST=0
321HAVE_STRLCAT=0
322HAVE_STRLCPY=0
323HAVE_STRPTIME=0
324HAVE_STRSEP=0
325HAVE_STRTONUM=0
326HAVE_SYS_ENDIAN=0
327HAVE_VASPRINTF=0
328HAVE_WCHAR=0
329