Home | History | Annotate | Line # | Download | only in dist
configure.local.example revision 1.1.1.1
      1  1.1  christos # $Id: configure.local.example,v 1.1.1.1 2015/12/17 21:58:48 christos Exp $
      2  1.1  christos #
      3  1.1  christos # Copyright (c) 2014, 2015 Ingo Schwarze <schwarze (a] openbsd.org>
      4  1.1  christos #
      5  1.1  christos # Permission to use, copy, modify, and distribute this software for any
      6  1.1  christos # purpose with or without fee is hereby granted, provided that the above
      7  1.1  christos # copyright notice and this permission notice appear in all copies.
      8  1.1  christos #
      9  1.1  christos # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
     10  1.1  christos # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
     11  1.1  christos # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
     12  1.1  christos # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
     13  1.1  christos # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
     14  1.1  christos # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
     15  1.1  christos # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
     16  1.1  christos 
     17  1.1  christos # For all settings documented in this file, there are reasonable
     18  1.1  christos # defaults and/or the ./configure script attempts autodetection.
     19  1.1  christos # Consequently, you only need to create a file ./configure.local
     20  1.1  christos # and put any of these settings into it if ./configure autodetection
     21  1.1  christos # fails or if you want to make different choices for other reasons.
     22  1.1  christos 
     23  1.1  christos # If autodetection fails, please tell <tech (a] mdocml.bsd.lv>.
     24  1.1  christos 
     25  1.1  christos # We recommend that you write ./configure.local from scratch and
     26  1.1  christos # only put the lines there you need.  This file contains examples.
     27  1.1  christos # It is not intended as a template to be copied as a whole.
     28  1.1  christos 
     29  1.1  christos # --- user settings relevant for all builds ----------------------------
     30  1.1  christos 
     31  1.1  christos # For -Tutf8 and -Tlocale operation, mandoc(1) requires <locale.h>
     32  1.1  christos # providing setlocale(3) and <wchar.h> providing wcwidth(3) and
     33  1.1  christos # putwchar(3) with a wchar_t storing UCS-4 values.  Theoretically,
     34  1.1  christos # the latter should be tested with the __STDC_ISO_10646__ feature
     35  1.1  christos # macro.  In practice, many <wchar.h> headers do not provide that
     36  1.1  christos # macro even though they treat wchar_t as UCS-4.  So the automatic
     37  1.1  christos # test only checks that wchar_t is wide enough, that is, at least
     38  1.1  christos # four bytes.
     39  1.1  christos 
     40  1.1  christos # The following line forces multi-byte support.
     41  1.1  christos # If your C library does not treat wchar_t as UCS-4, the UTF-8 output
     42  1.1  christos # mode will print garbage.
     43  1.1  christos 
     44  1.1  christos HAVE_WCHAR=1
     45  1.1  christos 
     46  1.1  christos # The following line disables multi-byte support.
     47  1.1  christos # The output modes -Tutf8 and -Tlocale will be the same as -Tascii.
     48  1.1  christos 
     49  1.1  christos HAVE_WCHAR=0
     50  1.1  christos 
     51  1.1  christos # In manual pages written in the mdoc(7) language, the operating system
     52  1.1  christos # version is displayed in the page footer line.  If an operating system
     53  1.1  christos # is specified as an argument to the .Os macro, that is always used.
     54  1.1  christos # If the .Os macro has no argument and an operation system is specified
     55  1.1  christos # with the mandoc(1) -Ios= command line option, that is used.
     56  1.1  christos # Otherwise, the uname(3) library function is called at runtime to find
     57  1.1  christos # the name of the operating system.
     58  1.1  christos # If you do not want uname(3) to be called but instead want a fixed
     59  1.1  christos # string to be used, use the following line:
     60  1.1  christos 
     61  1.1  christos OSNAME="OpenBSD 5.6"
     62  1.1  christos 
     63  1.1  christos # The following installation directories are used.
     64  1.1  christos # It is possible to set only one or a few of these variables,
     65  1.1  christos # there is no need to copy the whole block.
     66  1.1  christos # Even if you set PREFIX to something else, the other variables
     67  1.1  christos # pick it up without copying them all over.
     68  1.1  christos 
     69  1.1  christos PREFIX="/usr/local"
     70  1.1  christos BINDIR="${PREFIX}/bin"
     71  1.1  christos SBINDIR="${PREFIX}/sbin"
     72  1.1  christos INCLUDEDIR="${PREFIX}/include/mandoc"
     73  1.1  christos LIBDIR="${PREFIX}/lib/mandoc"
     74  1.1  christos MANDIR="${PREFIX}/man"
     75  1.1  christos EXAMPLEDIR="${PREFIX}/share/examples/mandoc"
     76  1.1  christos 
     77  1.1  christos # The man(1) utility needs to know where the manuals reside.
     78  1.1  christos # We know of two ways to tell it: via manpath(1) or man.conf(5).
     79  1.1  christos # The latter is used by OpenBSD and NetBSD, the former by most
     80  1.1  christos # other systems.
     81  1.1  christos 
     82  1.1  christos # Force usage of manpath(1).
     83  1.1  christos # If it is not installed or not operational,
     84  1.1  christos # man(1), makewhatis(8), and apropos(1) will not work properly.
     85  1.1  christos HAVE_MANPATH=1
     86  1.1  christos 
     87  1.1  christos # Force usage of man.conf(5).
     88  1.1  christos # If it does not exist or contains no valid configuration,
     89  1.1  christos # man(1), makewhatis(8), and apropos(1) will not work properly.
     90  1.1  christos HAVE_MANPATH=0
     91  1.1  christos 
     92  1.1  christos # Some distributions may want to avoid naming conflicts among manuals.
     93  1.1  christos # If you want to change the names of installed section 7 manual pages,
     94  1.1  christos # the following alternative names are suggested.
     95  1.1  christos # The suffix ".7" will automatically be appended.
     96  1.1  christos # It is possible to set only one or a few of these variables,
     97  1.1  christos # there is no need to copy the whole block.
     98  1.1  christos 
     99  1.1  christos MANM_MAN="mandoc_man"		# default is "man"
    100  1.1  christos MANM_MDOC="mandoc_mdoc"		# default is "mdoc"
    101  1.1  christos MANM_ROFF="mandoc_roff"		# default is "roff"
    102  1.1  christos MANM_EQN="mandoc_eqn"		# default is "eqn"
    103  1.1  christos MANM_TBL="mandoc_tbl"		# default is "tbl"
    104  1.1  christos 
    105  1.1  christos # Some distributions may want to avoid naming conflicts
    106  1.1  christos # with another man(1) utility.
    107  1.1  christos # If you want to change the name of the binary program,
    108  1.1  christos # the following alternative name is suggested.
    109  1.1  christos # Using a different name is possible as well.
    110  1.1  christos # This changes the name of the installed section 1 manual page as well.
    111  1.1  christos 
    112  1.1  christos BINM_MAN=mman			# default is "man"
    113  1.1  christos 
    114  1.1  christos # It is possible to change the utility program used for installation
    115  1.1  christos # and the modes files are installed with.  The defaults are:
    116  1.1  christos 
    117  1.1  christos INSTALL="install"
    118  1.1  christos INSTALL_PROGRAM="${INSTALL} -m 0555"
    119  1.1  christos INSTALL_LIB="${INSTALL} -m 0444"
    120  1.1  christos INSTALL_MAN="${INSTALL} -m 0444"
    121  1.1  christos INSTALL_DATA="${INSTALL} -m 0444"
    122  1.1  christos 
    123  1.1  christos # --- user settings related to database support ------------------------
    124  1.1  christos 
    125  1.1  christos # By default, building makewhatis(8) and apropos(1) is enabled.
    126  1.1  christos # To disable it, for example to avoid the dependency on SQLite3,
    127  1.1  christos # use the following line.  It that case, the remaining settings
    128  1.1  christos # in this section are irrelevant.
    129  1.1  christos 
    130  1.1  christos BUILD_DB=0
    131  1.1  christos 
    132  1.1  christos # Two libraries are needed: SQLite3 and ohash(3).
    133  1.1  christos # Autoconfiguration tries the following linker flags to find them.
    134  1.1  christos # If none of these work, add a working DBLIB line to configure.local,
    135  1.1  christos # disabling autodetection for library directories.
    136  1.1  christos 
    137  1.1  christos DBLIB="-lsqlite3"
    138  1.1  christos DBLIB="-lsqlite3 -lutil"
    139  1.1  christos DBLIB="-L/usr/local/lib -lsqlite3"
    140  1.1  christos 
    141  1.1  christos # When library autodetection decides to use -L/usr/local/lib,
    142  1.1  christos # -I/usr/local/include is automatically added to CFLAGS.
    143  1.1  christos # If you manually set DBLIB to something including -L/usr/local/lib,
    144  1.1  christos # chances are you will also need the following line:
    145  1.1  christos 
    146  1.1  christos CFLAGS="${CFLAGS} -I/usr/local/include"
    147  1.1  christos 
    148  1.1  christos # Some distributions may want to avoid naming conflicts
    149  1.1  christos # with another implementation of apropos(1) and makewhatis(8).
    150  1.1  christos # If you want to change the names of the binary programs,
    151  1.1  christos # the following alternative names are suggested.
    152  1.1  christos # Using other names is possible as well.
    153  1.1  christos # This changes the names of the installed section 1 and section 8
    154  1.1  christos # manual pages as well.
    155  1.1  christos # It is possible to set only one or two of these variables,
    156  1.1  christos # there is no need to copy the whole block.
    157  1.1  christos 
    158  1.1  christos BINM_APROPOS=mapropos		# default is "apropos"
    159  1.1  christos BINM_WHATIS=mwhatis		# default is "whatis"
    160  1.1  christos BINM_MAKEWHATIS=mandocdb	# default is "makewhatis"
    161  1.1  christos 
    162  1.1  christos # When using the "homebrew" package manager on Mac OS X, the actual
    163  1.1  christos # manuals are located in a so-called "cellar" and only symlinked
    164  1.1  christos # into the manual trees.  To allow mandoc to follow such symlinks,
    165  1.1  christos # you have to specify the physical location of the cellar as returned
    166  1.1  christos # by realpath(3), for example:
    167  1.1  christos 
    168  1.1  christos PREFIX="/usr/local"
    169  1.1  christos HOMEBREWDIR="${PREFIX}/Cellar"
    170  1.1  christos 
    171  1.1  christos # --- user settings related man.cgi ------------------------------------
    172  1.1  christos 
    173  1.1  christos # By default, building man.cgi(8) is disabled.  To enable it, copy
    174  1.1  christos # cgi.h.example to cgi.h, edit it, and use the following line.
    175  1.1  christos # Obviously, this requires that BUILD_DB is enabled, too.
    176  1.1  christos 
    177  1.1  christos BUILD_CGI=1
    178  1.1  christos 
    179  1.1  christos # The remaining settings in this section are only relevant if BUILD_CGI
    180  1.1  christos # is enabled.  Otherwise, they have no effect either way.
    181  1.1  christos 
    182  1.1  christos # By default, man.cgi(8) is linked statically.
    183  1.1  christos # Some systems do not support static linking, for example Mac OS X.
    184  1.1  christos # In that case, use the following line:
    185  1.1  christos 
    186  1.1  christos STATIC=
    187  1.1  christos 
    188  1.1  christos # Some systems, for example Linux, require -pthread for static linking:
    189  1.1  christos 
    190  1.1  christos STATIC="-static -pthread"
    191  1.1  christos 
    192  1.1  christos # Some directories.
    193  1.1  christos # This works just like PREFIX, see above.
    194  1.1  christos 
    195  1.1  christos WWWPREFIX="/var/www"
    196  1.1  christos HTDOCDIR="${WWWPREFIX}/htdocs"
    197  1.1  christos CGIBINDIR="${WWWPREFIX}/cgi-bin"
    198  1.1  christos 
    199  1.1  christos # --- settings that rarely need to be touched --------------------------
    200  1.1  christos 
    201  1.1  christos # Do not set these variables unless you really need to.
    202  1.1  christos 
    203  1.1  christos # You can manually override the compiler to be used.
    204  1.1  christos # But that's rarely useful because ./configure asks your make(1)
    205  1.1  christos # which compiler to use, and that answer will hardly be wrong.
    206  1.1  christos 
    207  1.1  christos CC=cc
    208  1.1  christos 
    209  1.1  christos # The default compiler flags are:
    210  1.1  christos 
    211  1.1  christos CFLAGS="-g -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings"
    212  1.1  christos 
    213  1.1  christos # In rare cases, it may be required to skip individual automatic tests.
    214  1.1  christos # Each of the following variables can be set to 0 (test will not be run
    215  1.1  christos # and will be regarded as failed) or 1 (test will not be run and will
    216  1.1  christos # be regarded as successful).
    217  1.1  christos 
    218  1.1  christos HAVE_DIRENT_NAMLEN=0
    219  1.1  christos HAVE_FGETLN=0
    220  1.1  christos HAVE_FTS=0
    221  1.1  christos HAVE_GETSUBOPT=0
    222  1.1  christos HAVE_MMAP=0
    223  1.1  christos HAVE_REALLOCARRAY=0
    224  1.1  christos HAVE_STRCASESTR=0
    225  1.1  christos HAVE_STRLCAT=0
    226  1.1  christos HAVE_STRLCPY=0
    227  1.1  christos HAVE_STRPTIME=0
    228  1.1  christos HAVE_STRSEP=0
    229  1.1  christos HAVE_STRTONUM=0
    230  1.1  christos 
    231  1.1  christos HAVE_SQLITE3=0
    232  1.1  christos HAVE_SQLITE3_ERRSTR=0
    233  1.1  christos HAVE_OHASH=0
    234