configure.local.example revision 275397
1161537Smarcel# $Id: configure.local.example,v 1.1 2014/08/16 19:00:01 schwarze Exp $
2161537Smarcel#
3161537Smarcel# Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
4161537Smarcel#
5161537Smarcel# Permission to use, copy, modify, and distribute this software for any
6161537Smarcel# purpose with or without fee is hereby granted, provided that the above
7161537Smarcel# copyright notice and this permission notice appear in all copies.
8161537Smarcel#
9161537Smarcel# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10161537Smarcel# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11161537Smarcel# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12161537Smarcel# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13161537Smarcel# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14161537Smarcel# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15161537Smarcel# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16161537Smarcel
17161537Smarcel# For all settings documented in this file, there are reasonable
18161537Smarcel# defaults and/or the ./configure script attempts autodetection.
19161537Smarcel# Consequently, you only need to create a file ./configure.local
20161537Smarcel# and put any of these settings into it if ./configure autodetection
21161537Smarcel# fails or if you want to make different choices for other reasons.
22161537Smarcel
23161537Smarcel# If autodetection fails, please tell <tech@mdocml.bsd.lv>.
24161537Smarcel
25161537Smarcel# We recommend that you write ./configure.local from scratch and
26161537Smarcel# only put the lines there you need.  This file contains examples.
27161537Smarcel# It is not intended as a template to be copied as a whole.
28161537Smarcel
29161537Smarcel# --- user settings relevant for all builds ----------------------------
30161537Smarcel
31161537Smarcel# For -Tutf8 and -Tlocale operation, mandoc(1) requires <locale.h>
32161537Smarcel# providing setlocale(3) and <wchar.h> providing wcwidth(3) and
33161537Smarcel# putwchar(3) with a wchar_t storing UCS-4 values.  Theoretically,
34161537Smarcel# the latter should be tested with the __STDC_ISO_10646__ feature
35161537Smarcel# macro.  In practice, many <wchar.h> headers do not provide that
36161537Smarcel# macro even though they treat wchar_t as UCS-4.  So the automatic
37161537Smarcel# test only checks that wchar_t is wide enough, that is, at least
38161537Smarcel# four bytes.
39161537Smarcel
40161537Smarcel# The following line forces multi-byte support.
41161537Smarcel# If your C library does not treat wchar_t as UCS-4, the UTF-8 output
42161537Smarcel# mode will print garbage.
43161537Smarcel
44161537SmarcelHAVE_WCHAR=1
45161537Smarcel
46161537Smarcel# The following line disables multi-byte support.
47161537Smarcel# The output modes -Tutf8 and -Tlocale will be the same as -Tascii.
48161537Smarcel
49161537SmarcelHAVE_WCHAR=0
50161537Smarcel
51161537Smarcel# In manual pages written in the mdoc(7) language, the operating system
52161537Smarcel# version is displayed in the page footer line.  If an operating system
53161537Smarcel# is specified as an argument to the .Os macro, that is always used.
54161537Smarcel# If the .Os macro has no argument and an operation system is specified
55161537Smarcel# with the mandoc(1) -Ios= command line option, that is used.
56161537Smarcel# Otherwise, the uname(3) library function is called at runtime to find
57161537Smarcel# the name of the operating system.
58161537Smarcel# If you do not want uname(3) to be called but instead want a fixed
59161537Smarcel# string to be used, use the following line:
60161537Smarcel
61161537SmarcelOSNAME="OpenBSD 5.5"
62161537Smarcel
63161537Smarcel# The following installation directories are used.
64161537Smarcel# It is possible to set only one or a few of these variables,
65161537Smarcel# there is no need to copy the whole block.
66161537Smarcel# Even if you set PREFIX to something else, the other variables
67161537Smarcel# pick it up without copying them all over.
68161537Smarcel
69161537SmarcelPREFIX="/usr/local"
70161537SmarcelBINDIR="${PREFIX}/bin"
71161537SmarcelSBINDIR="${PREFIX}/sbin"
72161537SmarcelINCLUDEDIR="${PREFIX}/include/mandoc"
73161537SmarcelLIBDIR="${PREFIX}/lib/mandoc"
74161537SmarcelMANDIR="${PREFIX}/man"
75161537SmarcelEXAMPLEDIR="${PREFIX}/share/examples/mandoc"
76161537Smarcel
77161537Smarcel# It is possible to change the utility program used for installation
78161537Smarcel# and the modes files are installed with.  The defaults are:
79161537Smarcel
80161537SmarcelINSTALL="install"
81161537SmarcelINSTALL_PROGRAM="${INSTALL} -m 0555"
82161537SmarcelINSTALL_LIB="${INSTALL} -m 0444"
83161537SmarcelINSTALL_MAN="${INSTALL} -m 0444"
84161537SmarcelINSTALL_DATA="${INSTALL} -m 0444"
85161537Smarcel
86161537Smarcel# --- user settings related to database support ------------------------
87161537Smarcel
88161537Smarcel# By default, building makewhatis(8) and apropos(1) is enabled.
89161537Smarcel# To disable it, for example to avoid the dependency on SQLite3,
90161537Smarcel# use the following line.  It that case, the remaining settings
91161537Smarcel# in this section are irrelevant.
92161537Smarcel
93161537SmarcelBUILD_DB=0
94161537Smarcel
95161537Smarcel# Two libraries are needed: SQLite3 and ohash(3).
96161537Smarcel# Autoconfiguration tries the following linker flags to find them.
97161537Smarcel# If none of these work, add a working DBLIB line to configure.local,
98161537Smarcel# disabling autodetection for library directories.
99161537Smarcel
100161537SmarcelDBLIB="-lsqlite3"
101161537SmarcelDBLIB="-lsqlite3 -lutil"
102161537SmarcelDBLIB="-L/usr/local/lib -lsqlite3"
103161537Smarcel
104161537Smarcel# When library autodetection decides to use -L/usr/local/lib,
105161537Smarcel# -I/usr/local/include is automatically added to CFLAGS.
106161537Smarcel# If you manually set DBLIB to something including -L/usr/local/lib,
107161537Smarcel# chances are you will also need the following line:
108161537Smarcel
109161537SmarcelCFLAGS="${CFLAGS} -I/usr/local/include"
110161537Smarcel
111161537Smarcel# The man(1) utility needs to know where the manuals reside.
112161537Smarcel# We know of two ways to tell it: via manpath(1) or man.conf(5).
113161537Smarcel# The latter is used by OpenBSD and NetBSD, the former by most
114161537Smarcel# other systems.
115161537Smarcel
116161537Smarcel# Force usage of manpath(1).
117161537Smarcel# If it is not installed or not operational,
118161537Smarcel# makewhatis(8) and apropos(1) will not work properly.
119161537Smarcel
120161537SmarcelHAVE_MANPATH=1
121161537Smarcel
122161537Smarcel# Force usage of man.conf(5).
123161537Smarcel# If it does not exist or contains no valid configuration,
124161537Smarcel# makewhatis(8) and apropos(1) will not work properly.
125161537Smarcel
126161537SmarcelHAVE_MANPATH=0
127161537Smarcel
128161537Smarcel# --- user settings related man.cgi ------------------------------------
129161537Smarcel
130161537Smarcel# By default, building man.cgi(8) is disabled.  To enable it, copy
131161537Smarcel# cgi.h.example to cgi.h, edit it, and use the following line.
132161537Smarcel# Obviously, this requires that BUILD_DB is enabled, too.
133161537Smarcel
134161537SmarcelBUILD_CGI=1
135161537Smarcel
136161537Smarcel# The remaining settings in this section are only relevant if BUILD_CGI
137161537Smarcel# is enabled.  Otherwise, they have no effect either way.
138161537Smarcel
139161537Smarcel# By default, man.cgi(8) is linked statically.
140161537Smarcel# Some systems do not support static linking, for example Mac OS X.
141161537Smarcel# In that case, use the following line:
142161537Smarcel
143161537SmarcelSTATIC=
144161537Smarcel
145161537Smarcel# Some systems, for example Linux, require -pthread for static linking:
146161537Smarcel
147161537SmarcelSTATIC="-static -pthread"
148161537Smarcel
149161537Smarcel# Some directories.
150161537Smarcel# This works just like PREFIX, see above.
151161537Smarcel
152161537SmarcelWWWPREFIX="/var/www"
153161537SmarcelHTDOCDIR="${WWWPREFIX}/htdocs"
154161537SmarcelCGIBINDIR="${WWWPREFIX}/cgi-bin"
155161537Smarcel
156161537Smarcel# --- settings that rarely need to be touched --------------------------
157161537Smarcel
158161537Smarcel# Do not set these variables unless you really need to.
159161537Smarcel
160161537Smarcel# You can manually override the compiler to be used.
161161537Smarcel# But that's rarely useful because ./configure asks your make(1)
162161537Smarcel# which compiler to use, and that answer will hardly be wrong.
163161537Smarcel
164161537SmarcelCC=cc
165161537Smarcel
166161537Smarcel# The default compiler flags are:
167161537Smarcel
168161537SmarcelCFLAGS="-g -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings"
169161537Smarcel
170161537Smarcel# In rare cases, it may be required to skip individual automatic tests.
171161537Smarcel# Each of the following variables can be set to 0 (test will not be run
172161537Smarcel# and will be regarded as failed) or 1 (test will not be run and will
173161537Smarcel# be regarded as successful).
174161537Smarcel
175161537SmarcelHAVE_DIRENT_NAMLEN=0
176161537SmarcelHAVE_FGETLN=0
177161537SmarcelHAVE_FTS=0
178161537SmarcelHAVE_GETSUBOPT=0
179161537SmarcelHAVE_MMAP=0
180161537SmarcelHAVE_REALLOCARRAY=0
181161537SmarcelHAVE_STRCASESTR=0
182161537SmarcelHAVE_STRLCAT=0
183161537SmarcelHAVE_STRLCPY=0
184161537SmarcelHAVE_STRPTIME=0
185161537SmarcelHAVE_STRSEP=0
186161537Smarcel
187161537SmarcelHAVE_SQLITE3=0
188161537SmarcelHAVE_SQLITE3_ERRSTR=0
189161537SmarcelHAVE_OHASH=0
190161537Smarcel