MANPATH_DEFAULT="/usr/share/man:/usr/X11R6/man:/usr/local/man"
OSNAME=
-CC=`printf "all:\\n\\t@echo \\\$(CC)\\n" | make -f -`
-CFLAGS="-g -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings"
+CC=`printf "all:\\n\\t@echo \\\$(CC)\\n" | env -i make -f -`
+CFLAGS="-g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings"
+CFLAGS="${CFLAGS} -Wno-unused-parameter"
LDADD=
LDFLAGS=
LD_OHASH=
-LD_SQLITE3=
STATIC="-static"
-BUILD_DB=1
BUILD_CGI=0
HAVE_DIRENT_NAMLEN=
HAVE_GETSUBOPT=
HAVE_ISBLANK=
HAVE_MKDTEMP=
-HAVE_MMAP=
HAVE_PLEDGE=
HAVE_PROGNAME=
HAVE_REALLOCARRAY=
HAVE_REWB_BSD=
HAVE_REWB_SYSV=
+HAVE_SANDBOX_INIT=
HAVE_STRCASESTR=
HAVE_STRINGLIST=
HAVE_STRLCAT=
HAVE_VASPRINTF=
HAVE_WCHAR=
-HAVE_SQLITE3=
-HAVE_SQLITE3_ERRSTR=
HAVE_OHASH=
HAVE_MANPATH=
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
runtest reallocarray REALLOCARRAY || true
runtest rewb-bsd REWB_BSD || 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
-
# --- ohash ---
if ismanual ohash "${HAVE_OHASH}"; then
:
fi
# --- LDADD ---
-LDADD="${LDADD} ${LD_SQLITE3} ${LD_OHASH} -lz"
+LDADD="${LDADD} ${LD_OHASH} -lz"
echo "LDADD=\"${LDADD}\"" 1>&2
echo "LDADD=\"${LDADD}\"" 1>&3
echo 1>&3
#error "Do not use C++. See the INSTALL file."
#endif
-#ifndef MANDOC_CONFIG_H
-#define MANDOC_CONFIG_H
+#if !defined(__GNUC__) || (__GNUC__ < 4)
+#define __attribute__(x)
+#endif
#if defined(__linux__) || defined(__MINT__)
#define _GNU_SOURCE /* See test-*.c what needs this. */
#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}
#define HAVE_REWB_BSD ${HAVE_REWB_BSD}
#define HAVE_REWB_SYSV ${HAVE_REWB_SYSV}
+#define HAVE_SANDBOX_INIT ${HAVE_SANDBOX_INIT}
#define HAVE_STRCASESTR ${HAVE_STRCASESTR}
#define HAVE_STRINGLIST ${HAVE_STRINGLIST}
#define HAVE_STRLCAT ${HAVE_STRLCAT}
#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}
[ ${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 *);"
[ ${HAVE_VASPRINTF} -eq 0 ] && \
echo "extern int vasprintf(char **, const char *, va_list);"
-echo
-echo "#endif /* MANDOC_CONFIG_H */"
-
echo "config.h: written" 1>&2
echo "config.h: written" 1>&3
[ -z "${INSTALL_MAN}" ] && INSTALL_MAN="${INSTALL} -m 0444"
[ -z "${INSTALL_DATA}" ] && INSTALL_DATA="${INSTALL} -m 0444"
-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"
+BUILD_TARGETS=
+[ ${BUILD_CGI} -gt 0 ] && BUILD_TARGETS="cgi-build"
+INSTALL_TARGETS=
+[ ${BUILD_CGI} -gt 0 ] && INSTALL_TARGETS="cgi-install"
cat << __HEREDOC__
BUILD_TARGETS = ${BUILD_TARGETS}
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