aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2016-07-20 14:14:07 +0000
committerIngo Schwarze <schwarze@openbsd.org>2016-07-20 14:14:07 +0000
commitc70a30223b2d39c4638430476119eb1e1a38a407 (patch)
tree2cfdcd1f4fe8f34e72a467d44b620df30d358fa3
parentfd04a2530af452252677a5bf5b97f05788e91ba6 (diff)
downloadmandoc-c70a30223b2d39c4638430476119eb1e1a38a407.tar.gz
mandoc-c70a30223b2d39c4638430476119eb1e1a38a407.tar.zst
mandoc-c70a30223b2d39c4638430476119eb1e1a38a407.zip
1.13 backport: Autodetect if -lrt is needed for nanosleep(3).
-rw-r--r--Makefile81
-rwxr-xr-xconfigure95
-rw-r--r--configure.local.example86
3 files changed, 187 insertions, 75 deletions
diff --git a/Makefile b/Makefile
index 38f49721..22dff56c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.490 2016/07/20 14:03:06 schwarze Exp $
+# $Id: Makefile,v 1.488.2.1 2016/07/20 14:14:07 schwarze Exp $
#
# Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
# Copyright (c) 2011, 2013-2016 Ingo Schwarze <schwarze@openbsd.org>
@@ -15,7 +15,7 @@
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-VERSION = 1.14.0
+VERSION = 1.13.4
# === LIST OF FILES ====================================================
@@ -26,6 +26,7 @@ TESTSRCS = test-dirent-namlen.c \
test-getsubopt.c \
test-isblank.c \
test-mkdtemp.c \
+ test-mmap.c \
test-nanosleep.c \
test-ohash.c \
test-pledge.c \
@@ -34,6 +35,8 @@ TESTSRCS = test-dirent-namlen.c \
test-rewb-bsd.c \
test-rewb-sysv.c \
test-sandbox_init.c \
+ test-sqlite3.c \
+ test-sqlite3_errstr.c \
test-strcasestr.c \
test-stringlist.c \
test-strlcat.c \
@@ -56,6 +59,7 @@ SRCS = att.c \
compat_ohash.c \
compat_progname.c \
compat_reallocarray.c \
+ compat_sqlite3_errstr.c \
compat_strcasestr.c \
compat_stringlist.c \
compat_strlcat.c \
@@ -63,12 +67,6 @@ SRCS = att.c \
compat_strsep.c \
compat_strtonum.c \
compat_vasprintf.c \
- dba.c \
- dba_array.c \
- dba_read.c \
- dba_write.c \
- dbm.c \
- dbm_map.c \
demandoc.c \
eqn.c \
eqn_html.c \
@@ -89,6 +87,7 @@ SRCS = att.c \
manpage.c \
manpath.c \
mansearch.c \
+ mansearch_const.c \
mdoc.c \
mdoc_argv.c \
mdoc_hash.c \
@@ -130,11 +129,6 @@ DISTFILES = INSTALL \
compat_stringlist.h \
configure \
configure.local.example \
- dba.h \
- dba_array.h \
- dba_write.h \
- dbm.h \
- dbm_map.h \
demandoc.1 \
eqn.7 \
gmdiff \
@@ -227,6 +221,7 @@ COMPAT_OBJS = compat_err.o \
compat_ohash.o \
compat_progname.o \
compat_reallocarray.o \
+ compat_sqlite3_errstr.o \
compat_strcasestr.o \
compat_strlcat.o \
compat_strlcpy.o \
@@ -250,35 +245,28 @@ MANDOC_TERM_OBJS = eqn_term.o \
term_ps.o \
tbl_term.o
-DBM_OBJS = dbm.o \
- dbm_map.o \
- mansearch.o
-
-DBA_OBJS = dba.o \
- dba_array.o \
- dba_read.o \
- dba_write.o \
- mandocdb.o
-
-MAIN_OBJS = $(MANDOC_HTML_OBJS) \
+BASE_OBJS = $(MANDOC_HTML_OBJS) \
$(MANDOC_MAN_OBJS) \
$(MANDOC_TERM_OBJS) \
- $(DBM_OBJS) \
- $(DBA_OBJS) \
main.o \
manpath.o \
out.o \
tag.o \
tree.o
+MAIN_OBJS = $(BASE_OBJS)
+
+DB_OBJS = mandocdb.o \
+ mansearch.o \
+ mansearch_const.o
+
CGI_OBJS = $(MANDOC_HTML_OBJS) \
- $(DBM_OBJS) \
cgi.o \
+ mansearch.o \
+ mansearch_const.o \
out.o
-MANPAGE_OBJS = $(DBM_OBJS) \
- manpage.o \
- manpath.o
+MANPAGE_OBJS = manpage.o mansearch.o mansearch_const.o manpath.o
DEMANDOC_OBJS = demandoc.o
@@ -342,7 +330,7 @@ www: $(WWW_OBJS) $(WWW_MANS)
$(WWW_MANS): mandoc
-.PHONY: base-install cgi-install install www-install
+.PHONY: base-install cgi-install db-install install www-install
.PHONY: clean distclean depend
include Makefile.depend
@@ -354,7 +342,7 @@ distclean: clean
clean:
rm -f libmandoc.a $(LIBMANDOC_OBJS) $(COMPAT_OBJS)
- rm -f mandoc $(MAIN_OBJS)
+ rm -f mandoc $(BASE_OBJS) $(DB_OBJS)
rm -f man.cgi $(CGI_OBJS)
rm -f manpage $(MANPAGE_OBJS)
rm -f demandoc $(DEMANDOC_OBJS)
@@ -364,40 +352,47 @@ clean:
base-install: base-build
mkdir -p $(DESTDIR)$(BINDIR)
- mkdir -p $(DESTDIR)$(SBINDIR)
mkdir -p $(DESTDIR)$(LIBDIR)
mkdir -p $(DESTDIR)$(INCLUDEDIR)
mkdir -p $(DESTDIR)$(MANDIR)/man1
mkdir -p $(DESTDIR)$(MANDIR)/man3
mkdir -p $(DESTDIR)$(MANDIR)/man5
mkdir -p $(DESTDIR)$(MANDIR)/man7
- mkdir -p $(DESTDIR)$(MANDIR)/man8
$(INSTALL_PROGRAM) mandoc demandoc $(DESTDIR)$(BINDIR)
$(INSTALL_PROGRAM) soelim $(DESTDIR)$(BINDIR)/$(BINM_SOELIM)
ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_MAN)
- ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_APROPOS)
- ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_WHATIS)
- ln -f $(DESTDIR)$(BINDIR)/mandoc \
- $(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS)
$(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR)
$(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h roff.h \
$(DESTDIR)$(INCLUDEDIR)
$(INSTALL_MAN) mandoc.1 demandoc.1 $(DESTDIR)$(MANDIR)/man1
$(INSTALL_MAN) soelim.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1
$(INSTALL_MAN) man.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1
- $(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1
- ln -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 \
- $(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1
$(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \
- mansearch.3 mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3
+ mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3
$(INSTALL_MAN) man.conf.5 $(DESTDIR)$(MANDIR)/man5/${MANM_MANCONF}.5
- $(INSTALL_MAN) mandoc.db.5 $(DESTDIR)$(MANDIR)/man5
$(INSTALL_MAN) man.7 $(DESTDIR)$(MANDIR)/man7/${MANM_MAN}.7
$(INSTALL_MAN) mdoc.7 $(DESTDIR)$(MANDIR)/man7/${MANM_MDOC}.7
$(INSTALL_MAN) roff.7 $(DESTDIR)$(MANDIR)/man7/${MANM_ROFF}.7
$(INSTALL_MAN) eqn.7 $(DESTDIR)$(MANDIR)/man7/${MANM_EQN}.7
$(INSTALL_MAN) tbl.7 $(DESTDIR)$(MANDIR)/man7/${MANM_TBL}.7
$(INSTALL_MAN) mandoc_char.7 $(DESTDIR)$(MANDIR)/man7
+
+db-install: base-build
+ mkdir -p $(DESTDIR)$(BINDIR)
+ mkdir -p $(DESTDIR)$(SBINDIR)
+ mkdir -p $(DESTDIR)$(MANDIR)/man1
+ mkdir -p $(DESTDIR)$(MANDIR)/man3
+ mkdir -p $(DESTDIR)$(MANDIR)/man5
+ mkdir -p $(DESTDIR)$(MANDIR)/man8
+ ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_APROPOS)
+ ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_WHATIS)
+ ln -f $(DESTDIR)$(BINDIR)/mandoc \
+ $(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS)
+ $(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1
+ ln -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 \
+ $(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1
+ $(INSTALL_MAN) mansearch.3 $(DESTDIR)$(MANDIR)/man3
+ $(INSTALL_MAN) mandoc.db.5 $(DESTDIR)$(MANDIR)/man5
$(INSTALL_MAN) makewhatis.8 \
$(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8
diff --git a/configure b/configure
index 64a61f2b..6716352d 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $Id: configure,v 1.47 2016/07/20 14:03:06 schwarze Exp $
+# $Id: configure,v 1.43.2.1 2016/07/20 14:14:07 schwarze Exp $
#
# Copyright (c) 2014, 2015, 2016 Ingo Schwarze <schwarze@openbsd.org>
#
@@ -43,20 +43,21 @@ LDADD=
LDFLAGS=
LD_NANOSLEEP=
LD_OHASH=
+LD_SQLITE3=
STATIC="-static"
+BUILD_DB=1
BUILD_CGI=0
HAVE_DIRENT_NAMLEN=
-HAVE_EFTYPE=
HAVE_ERR=
HAVE_FTS=
HAVE_GETLINE=
HAVE_GETSUBOPT=
HAVE_ISBLANK=
HAVE_MKDTEMP=
+HAVE_MMAP=
HAVE_NANOSLEEP=
-HAVE_OHASH=
HAVE_PLEDGE=
HAVE_PROGNAME=
HAVE_REALLOCARRAY=
@@ -73,6 +74,11 @@ HAVE_STRTONUM=
HAVE_VASPRINTF=
HAVE_WCHAR=
+HAVE_SQLITE3=
+HAVE_SQLITE3_ERRSTR=
+HAVE_OHASH=
+HAVE_MANPATH=
+
PREFIX="/usr/local"
BINDIR=
SBINDIR=
@@ -178,13 +184,13 @@ runtest() {
# --- library functions ---
runtest dirent-namlen DIRENT_NAMLEN || true
-runtest EFTYPE EFTYPE || true
runtest err ERR || true
runtest fts FTS || true
runtest getline GETLINE || true
runtest getsubopt GETSUBOPT || true
runtest isblank ISBLANK || true
runtest mkdtemp MKDTEMP || true
+runtest mmap MMAP || true
runtest pledge PLEDGE || true
runtest sandbox_init SANDBOX_INIT || true
runtest progname PROGNAME || true
@@ -201,6 +207,44 @@ runtest strtonum STRTONUM || true
runtest vasprintf VASPRINTF || true
runtest wchar WCHAR || true
+# --- sqlite3 ---
+if [ ${BUILD_DB} -eq 0 ]; then
+ echo "BUILD_DB=0 (manual)" 1>&2
+ echo "BUILD_DB=0 (manual)" 1>&3
+ echo 1>&3
+ HAVE_SQLITE3=0
+elif ismanual sqlite3 "${HAVE_SQLITE3}"; then
+ if [ -z "${LD_SQLITE3}" ]; then
+ LD_SQLITE3="-lsqlite3"
+ fi
+elif [ -n "${LD_SQLITE3}" ]; then
+ runtest sqlite3 SQLITE3 "${LD_SQLITE3}" || true
+elif singletest sqlite3 SQLITE3 "-lsqlite3"; then
+ LD_SQLITE3="-lsqlite3"
+elif runtest sqlite3 SQLITE3 \
+ "-I/usr/local/include -L/usr/local/lib -lsqlite3"; then
+ LD_SQLITE3="-L/usr/local/lib -lsqlite3"
+ CFLAGS="${CFLAGS} -I/usr/local/include"
+fi
+if [ ${HAVE_SQLITE3} -eq 0 ]; then
+ LD_SQLITE3=
+ if [ ${BUILD_DB} -gt 0 ]; then
+ echo "BUILD_DB=0 (no sqlite3)" 1>&2
+ echo "BUILD_DB=0 (no sqlite3)" 1>&3
+ echo 1>&3
+ BUILD_DB=0
+ fi
+fi
+
+# --- sqlite3_errstr ---
+if [ ${BUILD_DB} -eq 0 ]; then
+ HAVE_SQLITE3_ERRSTR=1
+elif ismanual sqlite3_errstr "${HAVE_SQLITE3_ERRSTR}"; then
+ :
+else
+ runtest sqlite3_errstr SQLITE3_ERRSTR "${LD_SQLITE3}" || true
+fi
+
# --- nanosleep ---
if [ -n "${LD_NANOSLEEP}" ]; then
runtest nanosleep NANOSLEEP "${LD_NANOSLEEP}" || true
@@ -230,11 +274,26 @@ if [ "${HAVE_OHASH}" -eq 0 ]; then
fi
# --- LDADD ---
-LDADD="${LDADD} ${LD_NANOSLEEP} ${LD_OHASH} -lz"
+LDADD="${LDADD} ${LD_SQLITE3} ${LD_NANOSLEEP} ${LD_OHASH} -lz"
echo "LDADD=\"${LDADD}\"" 1>&2
echo "LDADD=\"${LDADD}\"" 1>&3
echo 1>&3
+# --- manpath ---
+if ismanual manpath "${HAVE_MANPATH}"; then
+ :
+elif manpath 1>&3 2>&3; then
+ echo "manpath: yes" 1>&2
+ echo "manpath: yes" 1>&3
+ echo 1>&3
+ HAVE_MANPATH=1
+else
+ echo "manpath: no" 1>&2
+ echo "manpath: no" 1>&3
+ echo 1>&3
+ HAVE_MANPATH=0
+fi
+
# --- write config.h ---
exec > config.h
@@ -265,7 +324,6 @@ echo "#define MAN_CONF_FILE \"/etc/${MANM_MANCONF}\""
echo "#define MANPATH_DEFAULT \"${MANPATH_DEFAULT}\""
[ -n "${OSNAME}" ] && echo "#define OSNAME \"${OSNAME}\""
[ -n "${HOMEBREWDIR}" ] && echo "#define HOMEBREWDIR \"${HOMEBREWDIR}\""
-[ ${HAVE_EFTYPE} -eq 0 ] && echo "#define EFTYPE EINVAL"
cat << __HEREDOC__
#define HAVE_DIRENT_NAMLEN ${HAVE_DIRENT_NAMLEN}
@@ -275,6 +333,7 @@ cat << __HEREDOC__
#define HAVE_GETSUBOPT ${HAVE_GETSUBOPT}
#define HAVE_ISBLANK ${HAVE_ISBLANK}
#define HAVE_MKDTEMP ${HAVE_MKDTEMP}
+#define HAVE_MMAP ${HAVE_MMAP}
#define HAVE_PLEDGE ${HAVE_PLEDGE}
#define HAVE_PROGNAME ${HAVE_PROGNAME}
#define HAVE_REALLOCARRAY ${HAVE_REALLOCARRAY}
@@ -290,7 +349,10 @@ cat << __HEREDOC__
#define HAVE_STRTONUM ${HAVE_STRTONUM}
#define HAVE_VASPRINTF ${HAVE_VASPRINTF}
#define HAVE_WCHAR ${HAVE_WCHAR}
+#define HAVE_SQLITE3 ${HAVE_SQLITE3}
+#define HAVE_SQLITE3_ERRSTR ${HAVE_SQLITE3_ERRSTR}
#define HAVE_OHASH ${HAVE_OHASH}
+#define HAVE_MANPATH ${HAVE_MANPATH}
#define BINM_APROPOS "${BINM_APROPOS}"
#define BINM_MAKEWHATIS "${BINM_MAKEWHATIS}"
@@ -327,6 +389,9 @@ fi
[ ${HAVE_REALLOCARRAY} -eq 0 ] && \
echo "extern void *reallocarray(void *, size_t, size_t);"
+[ ${BUILD_DB} -gt 0 -a ${HAVE_SQLITE3_ERRSTR} -eq 0 ] &&
+ echo "extern const char *sqlite3_errstr(int);"
+
[ ${HAVE_STRCASESTR} -eq 0 ] && \
echo "extern char *strcasestr(const char *, const char *);"
@@ -366,10 +431,17 @@ exec > Makefile.local
[ -z "${INSTALL_MAN}" ] && INSTALL_MAN="${INSTALL} -m 0444"
[ -z "${INSTALL_DATA}" ] && INSTALL_DATA="${INSTALL} -m 0444"
-BUILD_TARGETS=
-[ ${BUILD_CGI} -gt 0 ] && BUILD_TARGETS="cgi-build"
-INSTALL_TARGETS=
-[ ${BUILD_CGI} -gt 0 ] && INSTALL_TARGETS="cgi-install"
+if [ ${BUILD_DB} -eq 0 -a ${BUILD_CGI} -gt 0 ]; then
+ echo "BUILD_CGI=0 (no BUILD_DB)" 1>&2
+ echo "BUILD_CGI=0 (no BUILD_DB)" 1>&3
+ BUILD_CGI=0
+fi
+
+BUILD_TARGETS="base-build"
+[ ${BUILD_CGI} -gt 0 ] && BUILD_TARGETS="${BUILD_TARGETS} cgi-build"
+INSTALL_TARGETS="base-install"
+[ ${BUILD_DB} -gt 0 ] && INSTALL_TARGETS="${INSTALL_TARGETS} db-install"
+[ ${BUILD_CGI} -gt 0 ] && INSTALL_TARGETS="${INSTALL_TARGETS} cgi-install"
cat << __HEREDOC__
BUILD_TARGETS = ${BUILD_TARGETS}
@@ -406,6 +478,9 @@ INSTALL_MAN = ${INSTALL_MAN}
INSTALL_DATA = ${INSTALL_DATA}
__HEREDOC__
+[ ${BUILD_DB} -gt 0 ] && \
+ echo "MAIN_OBJS = \$(BASE_OBJS) \$(DB_OBJS)"
+
echo "Makefile.local: written" 1>&2
echo "Makefile.local: written" 1>&3
diff --git a/configure.local.example b/configure.local.example
index 18a84fbd..1ecffff0 100644
--- a/configure.local.example
+++ b/configure.local.example
@@ -1,4 +1,4 @@
-# $Id: configure.local.example,v 1.17 2016/07/20 14:03:06 schwarze Exp $
+# $Id: configure.local.example,v 1.14.2.1 2016/07/20 14:14:07 schwarze Exp $
#
# Copyright (c) 2014, 2015, 2016 Ingo Schwarze <schwarze@openbsd.org>
#
@@ -49,9 +49,9 @@ HAVE_WCHAR=1
HAVE_WCHAR=0
# When man(1) or apropos(1) is called without -m and -M options,
-# MANPATH is not set in the environment, and man.conf(5) is not
-# available, manuals are searched for in the following directory
-# trees by default.
+# MANPATH is not set in the environment, man.conf(5) is not available
+# and manpath(1) not used, manuals are searched for in the following
+# directory trees by default.
MANPATH_DEFAULT="/usr/share/man:/usr/X11R6/man:/usr/local/man"
@@ -65,7 +65,7 @@ MANPATH_DEFAULT="/usr/share/man:/usr/X11R6/man:/usr/local/man"
# If you do not want uname(3) to be called but instead want a fixed
# string to be used, use the following line:
-OSNAME="OpenBSD 6.0"
+OSNAME="OpenBSD 5.9"
# The following installation directories are used.
# It is possible to set only one or a few of these variables,
@@ -80,6 +80,19 @@ INCLUDEDIR="${PREFIX}/include/mandoc"
LIBDIR="${PREFIX}/lib/mandoc"
MANDIR="${PREFIX}/man"
+# The man(1) utility needs to know where the manuals reside.
+# We know of two ways to tell it: via manpath(1) or man.conf(5).
+# The latter is used by OpenBSD and NetBSD, the former by most
+# other systems.
+
+# Force usage of manpath(1).
+# If it is not installed or not operational,
+# man(1), makewhatis(8), and apropos(1) will not work properly.
+HAVE_MANPATH=1
+
+# Force usage of man.conf(5).
+HAVE_MANPATH=0
+
# Some distributions may want to avoid naming conflicts
# with the configuration files of other man(1) implementations.
# This changes the name of the installed section 5 manual page as well.
@@ -98,20 +111,14 @@ MANM_ROFF="mandoc_roff" # default is "roff"
MANM_EQN="mandoc_eqn" # default is "eqn"
MANM_TBL="mandoc_tbl" # default is "tbl"
-# Some distributions may want to avoid naming conflicts with
-# other man(1), apropos(1), makewhatis(8), or soelim(1) utilities.
+# Some distributions may want to avoid naming conflicts
+# with other man(1) and soelim(1) utilities.
# If you want to change the names of binary programs,
# the following alternative names are suggested.
# Using different names is possible as well.
-# This changes the names of the installed section 1 and section 8
-# manual pages as well.
-# It is possible to set only one or two of these variables,
-# there is no need to copy the whole block.
+# This changes the names of the installed section 1 manual pages as well.
BINM_MAN=mman # default is "man"
-BINM_APROPOS=mapropos # default is "apropos"
-BINM_WHATIS=mwhatis # default is "whatis"
-BINM_MAKEWHATIS=mandocdb # default is "makewhatis"
BINM_SOELIM=msoelim # default is "soelim"
# Before falling back to the bundled version of the ohash(3) hashing
@@ -122,13 +129,6 @@ BINM_SOELIM=msoelim # default is "soelim"
LD_OHASH="-lutil"
-# When library autodetection decides to use -L/usr/local/lib,
-# -I/usr/local/include is automatically added to CFLAGS.
-# If you manually set LD_OHASH to something including -L/usr/local/lib,
-# chances are you will also need the following line:
-
-CFLAGS="${CFLAGS} -I/usr/local/include"
-
# Some platforms may need an additional linker flag for nanosleep(2).
# If none is needed or it is -lrt, it is autodetected.
# Otherwise, set the following variable.
@@ -156,6 +156,43 @@ INSTALL_LIB="${INSTALL} -m 0444"
INSTALL_MAN="${INSTALL} -m 0444"
INSTALL_DATA="${INSTALL} -m 0444"
+# --- user settings related to database support ------------------------
+
+# By default, building makewhatis(8) and apropos(1) is enabled.
+# To disable it, for example to avoid the dependency on SQLite3,
+# use the following line. It that case, the remaining settings
+# in this section are irrelevant.
+
+BUILD_DB=0
+
+# Autoconfiguration tries the following linker flags to find the
+# SQLite3 library installed on your system. If none of these work,
+# set the following variable to specify the required linker flags.
+
+LD_SQLITE3="-lsqlite3"
+LD_SQLITE3="-L/usr/local/lib -lsqlite3"
+
+# When library autodetection decides to use -L/usr/local/lib,
+# -I/usr/local/include is automatically added to CFLAGS.
+# If you manually set LD_SQLITE3 to something including -L/usr/local/lib,
+# chances are you will also need the following line:
+
+CFLAGS="${CFLAGS} -I/usr/local/include"
+
+# Some distributions may want to avoid naming conflicts
+# with another implementation of apropos(1) and makewhatis(8).
+# If you want to change the names of the binary programs,
+# the following alternative names are suggested.
+# Using other names is possible as well.
+# This changes the names of the installed section 1 and section 8
+# manual pages as well.
+# It is possible to set only one or two of these variables,
+# there is no need to copy the whole block.
+
+BINM_APROPOS=mapropos # default is "apropos"
+BINM_WHATIS=mwhatis # default is "whatis"
+BINM_MAKEWHATIS=mandocdb # default is "makewhatis"
+
# When using the "homebrew" package manager on Mac OS X, the actual
# manuals are located in a so-called "cellar" and only symlinked
# into the manual trees. To allow mandoc to follow such symlinks,
@@ -169,6 +206,7 @@ HOMEBREWDIR="${PREFIX}/Cellar"
# By default, building man.cgi(8) is disabled. To enable it, copy
# cgi.h.example to cgi.h, edit it, and use the following line.
+# Obviously, this requires that BUILD_DB is enabled, too.
BUILD_CGI=1
@@ -226,7 +264,7 @@ HAVE_GETLINE=0
HAVE_GETSUBOPT=0
HAVE_ISBLANK=0
HAVE_MKDTEMP=0
-HAVE_OHASH=0
+HAVE_MMAP=0
HAVE_PLEDGE=0
HAVE_PROGNAME=0
HAVE_REALLOCARRAY=0
@@ -241,3 +279,7 @@ HAVE_STRSEP=0
HAVE_STRTONUM=0
HAVE_VASPRINTF=0
HAVE_WCHAR=0
+
+HAVE_SQLITE3=0
+HAVE_SQLITE3_ERRSTR=0
+HAVE_OHASH=0