# Initialize all variables here,
# such that nothing can leak in from the environment.
+MANPATH_DEFAULT="/usr/share/man:/usr/X11R6/man:/usr/local/man"
OSNAME=
CC=`printf "all:\\n\\t@echo \\\$(CC)\\n" | make -f -`
HAVE_FGETLN=
HAVE_FTS=
HAVE_GETSUBOPT=
+HAVE_ISBLANK=
+HAVE_MKDTEMP=
HAVE_MMAP=
HAVE_REALLOCARRAY=
HAVE_STRCASESTR=
HAVE_STRPTIME=
HAVE_STRSEP=
HAVE_STRTONUM=
+HAVE_VASPRINTF=
HAVE_WCHAR=
HAVE_SQLITE3=
BINM_WHATIS="whatis"
BINM_MAKEWHATIS="makewhatis"
MANM_MAN="man"
+MANM_MANCONF="man.conf"
MANM_MDOC="mdoc"
MANM_ROFF="roff"
MANM_EQN="eqn"
runtest fgetln FGETLN || true
runtest fts FTS || true
runtest getsubopt GETSUBOPT || true
+runtest isblank ISBLANK || true
+runtest mkdtemp MKDTEMP || true
runtest mmap MMAP || true
runtest reallocarray REALLOCARRAY || true
runtest strcasestr STRCASESTR || true
runtest strptime STRPTIME || true
runtest strsep STRSEP || true
runtest strtonum STRTONUM || true
+runtest vasprintf VASPRINTF || true
runtest wchar WCHAR || true
# --- sqlite3 ---
fi
# --- manpath ---
-if [ ${BUILD_DB} -eq 0 ]; then
- HAVE_MANPATH=0
-elif ismanual manpath "${HAVE_MANPATH}"; then
+if ismanual manpath "${HAVE_MANPATH}"; then
:
elif manpath 1>&3 2>&3; then
echo "manpath: yes" 1>&2
[ ${HAVE_FGETLN} -eq 0 -o ${HAVE_REALLOCARRAY} -eq 0 -o \
${HAVE_STRLCAT} -eq 0 -o ${HAVE_STRLCPY} -eq 0 ] \
&& echo "#include <sys/types.h>"
+[ ${HAVE_VASPRINTF} -eq 0 ] && echo "#include <stdarg.h>"
[ ${HAVE_FGETLN} -eq 0 ] && echo "#include <stdio.h>"
echo
+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}\""
#define HAVE_FGETLN ${HAVE_FGETLN}
#define HAVE_FTS ${HAVE_FTS}
#define HAVE_GETSUBOPT ${HAVE_GETSUBOPT}
+#define HAVE_ISBLANK ${HAVE_ISBLANK}
+#define HAVE_MKDTEMP ${HAVE_MKDTEMP}
#define HAVE_MMAP ${HAVE_MMAP}
#define HAVE_REALLOCARRAY ${HAVE_REALLOCARRAY}
#define HAVE_STRCASESTR ${HAVE_STRCASESTR}
#define HAVE_STRPTIME ${HAVE_STRPTIME}
#define HAVE_STRSEP ${HAVE_STRSEP}
#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}
[ ${HAVE_GETSUBOPT} -eq 0 ] && \
echo "extern int getsubopt(char **, char * const *, char **);"
+[ ${HAVE_ISBLANK} -eq 0 ] && \
+ echo "extern int isblank(int);"
+
+[ ${HAVE_MKDTEMP} -eq 0 ] && \
+ echo "extern char *mkdtemp(char *);"
+
[ ${HAVE_REALLOCARRAY} -eq 0 ] && \
echo "extern void *reallocarray(void *, size_t, size_t);"
[ ${HAVE_STRTONUM} -eq 0 ] && \
echo "extern long long strtonum(const char *, long long, long long, const char **);"
+[ ${HAVE_VASPRINTF} -eq 0 ] && \
+ echo "extern int vasprintf(char **, const char *, va_list);"
+
echo
echo "#endif /* MANDOC_CONFIG_H */"
cat << __HEREDOC__
BUILD_TARGETS = ${BUILD_TARGETS}
INSTALL_TARGETS = ${INSTALL_TARGETS}
+CC = ${CC}
CFLAGS = ${CFLAGS}
DBLIB = ${DBLIB}
STATIC = ${STATIC}
BINM_WHATIS = ${BINM_WHATIS}
BINM_MAKEWHATIS = ${BINM_MAKEWHATIS}
MANM_MAN = ${MANM_MAN}
+MANM_MANCONF = ${MANM_MANCONF}
MANM_MDOC = ${MANM_MDOC}
MANM_ROFF = ${MANM_ROFF}
MANM_EQN = ${MANM_EQN}