=================================================================== RCS file: /cvs/mandoc/configure,v retrieving revision 1.16 retrieving revision 1.21 diff -u -p -r1.16 -r1.21 --- mandoc/configure 2014/12/09 09:14:33 1.16 +++ mandoc/configure 2015/03/11 13:15:44 1.21 @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2014 Ingo Schwarze +# Copyright (c) 2014, 2015 Ingo Schwarze # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -31,10 +31,6 @@ echo "config.log: writing..." # Initialize all variables here, # such that nothing can leak in from the environment. -VERSION="1.13.1" -echo "VERSION=\"${VERSION}\"" 1>&2 -echo "VERSION=\"${VERSION}\"" 1>&3 - OSNAME= CC=`printf "all:\\n\\t@echo \\\$(CC)\\n" | make -f -` @@ -56,6 +52,7 @@ HAVE_STRLCAT= HAVE_STRLCPY= HAVE_STRPTIME= HAVE_STRSEP= +HAVE_STRTONUM= HAVE_WCHAR= HAVE_SQLITE3= @@ -70,6 +67,7 @@ INCLUDEDIR= LIBDIR= MANDIR= EXAMPLEDIR= +HOMEBREWDIR= WWWPREFIX="/var/www" HTDOCDIR= @@ -176,6 +174,7 @@ runtest strlcat STRLCAT || true runtest strlcpy STRLCPY || true runtest strptime STRPTIME || true runtest strsep STRSEP || true +runtest strtonum STRTONUM || true runtest wchar WCHAR || true # --- sqlite3 --- @@ -238,9 +237,7 @@ elif [ -z "${DBLIB}" ]; then 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 @@ -274,8 +271,8 @@ __HEREDOC__ [ ${HAVE_FGETLN} -eq 0 ] && echo "#include " echo -echo "#define VERSION \"${VERSION}\"" [ -n "${OSNAME}" ] && echo "#define OSNAME \"${OSNAME}\"" +[ -n "${HOMEBREWDIR}" ] && echo "#define HOMEBREWDIR \"${HOMEBREWDIR}\"" cat << __HEREDOC__ #define HAVE_DIRENT_NAMLEN ${HAVE_DIRENT_NAMLEN} @@ -289,6 +286,7 @@ cat << __HEREDOC__ #define HAVE_STRLCPY ${HAVE_STRLCPY} #define HAVE_STRPTIME ${HAVE_STRPTIME} #define HAVE_STRSEP ${HAVE_STRSEP} +#define HAVE_STRTONUM ${HAVE_STRTONUM} #define HAVE_WCHAR ${HAVE_WCHAR} #define HAVE_SQLITE3 ${HAVE_SQLITE3} #define HAVE_SQLITE3_ERRSTR ${HAVE_SQLITE3_ERRSTR} @@ -341,6 +339,9 @@ __HEREDOC__ [ ${HAVE_STRSEP} -eq 0 ] && \ echo "extern char *strsep(char **, const char *);" +[ ${HAVE_STRTONUM} -eq 0 ] && \ + echo "extern long long strtonum(const char *, long long, long long, const char **);" + echo echo "#endif /* MANDOC_CONFIG_H */" @@ -379,7 +380,6 @@ INSTALL_TARGETS="base-install" [ ${BUILD_CGI} -gt 0 ] && INSTALL_TARGETS="${INSTALL_TARGETS} cgi-install" cat << __HEREDOC__ -VERSION = ${VERSION} BUILD_TARGETS = ${BUILD_TARGETS} INSTALL_TARGETS = ${INSTALL_TARGETS} CFLAGS = ${CFLAGS}