=================================================================== RCS file: /cvs/mandoc/configure,v retrieving revision 1.26 retrieving revision 1.31 diff -u -p -r1.26 -r1.31 --- mandoc/configure 2015/05/20 22:22:59 1.26 +++ mandoc/configure 2015/11/06 21:19:09 1.31 @@ -43,13 +43,18 @@ BUILD_DB=1 BUILD_CGI=0 HAVE_DIRENT_NAMLEN= +HAVE_ERR= HAVE_FGETLN= HAVE_FTS= HAVE_GETSUBOPT= HAVE_ISBLANK= HAVE_MKDTEMP= HAVE_MMAP= +HAVE_PLEDGE= +HAVE_PROGNAME= HAVE_REALLOCARRAY= +HAVE_REWB_BSD= +HAVE_REWB_SYSV= HAVE_STRCASESTR= HAVE_STRINGLIST= HAVE_STRLCAT= @@ -171,13 +176,18 @@ runtest() { # --- library functions --- runtest dirent-namlen DIRENT_NAMLEN || true +runtest err ERR || true 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 pledge PLEDGE || true +runtest progname PROGNAME || true runtest reallocarray REALLOCARRAY || true +runtest rewb-bsd REWB_BSD || true +runtest rewb-sysv REWB_SYSV || true runtest strcasestr STRCASESTR || true runtest stringlist STRINGLIST || true runtest strlcat STRLCAT || true @@ -239,9 +249,9 @@ fi # --- DBLIB --- if [ ${BUILD_DB} -eq 0 ]; then - DBLIB= + DBLIB="-lz" elif [ -z "${DBLIB}" ]; then - DBLIB="${DETECTLIB}" + DBLIB="${DETECTLIB} -lz" echo "DBLIB=\"${DBLIB}\"" 1>&2 echo "DBLIB=\"${DBLIB}\"" 1>&3 echo 1>&3 @@ -290,13 +300,18 @@ echo "#define MANPATH_DEFAULT \"${MANPATH_DEFAULT}\"" cat << __HEREDOC__ #define HAVE_DIRENT_NAMLEN ${HAVE_DIRENT_NAMLEN} +#define HAVE_ERR ${HAVE_ERR} #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_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_STRCASESTR ${HAVE_STRCASESTR} #define HAVE_STRINGLIST ${HAVE_STRINGLIST} #define HAVE_STRLCAT ${HAVE_STRLCAT} @@ -334,6 +349,12 @@ cat << __HEREDOC__ __HEREDOC__ +if [ ${HAVE_ERR} -eq 0 ]; then + echo "extern void err(int, const char *, ...);" + echo "extern void warn(const char *, ...);" + echo "extern void warnx(const char *, ...);" +fi + [ ${HAVE_FGETLN} -eq 0 ] && \ echo "extern char *fgetln(FILE *, size_t *);" @@ -345,6 +366,11 @@ __HEREDOC__ [ ${HAVE_MKDTEMP} -eq 0 ] && \ echo "extern char *mkdtemp(char *);" + +if [ ${HAVE_PROGNAME} -eq 0 ]; then + echo "extern const char *getprogname(void);" + echo "extern void setprogname(const char *);" +fi [ ${HAVE_REALLOCARRAY} -eq 0 ] && \ echo "extern void *reallocarray(void *, size_t, size_t);"