=================================================================== RCS file: /cvs/mandoc/configure,v retrieving revision 1.59 retrieving revision 1.61 diff -u -p -r1.59 -r1.61 --- mandoc/configure 2017/02/16 16:09:33 1.59 +++ mandoc/configure 2017/02/18 12:24:24 1.61 @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: configure,v 1.59 2017/02/16 16:09:33 schwarze Exp $ +# $Id: configure,v 1.61 2017/02/18 12:24:24 schwarze Exp $ # # Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze # @@ -33,6 +33,8 @@ echo "config.log: writing..." # Initialize all variables here, # such that nothing can leak in from the environment. +SOURCEDIR=`dirname "$0"` + MANPATH_DEFAULT="/usr/share/man:/usr/X11R6/man:/usr/local/man" OSNAME= UTF8_LOCALE= @@ -65,6 +67,7 @@ HAVE_ISBLANK= HAVE_MKDTEMP= HAVE_NANOSLEEP= HAVE_NTOHL= +HAVE_O_DIRECTORY= HAVE_OHASH= HAVE_PATH_MAX= HAVE_PLEDGE= @@ -155,7 +158,8 @@ ${1}${3}: testing... ${COMP} -o test-${1} test-${1}.c ${3} __HEREDOC__ - if ${COMP} -o "test-${1}" "test-${1}.c" ${3} 1>&3 2>&3; then + if ${COMP} -o "test-${1}" "${SOURCEDIR}/test-${1}.c" ${3} 1>&3 2>&3 + then echo "${1}${3}: ${CC} succeeded" 1>&3 else echo "${1}${3}: ${CC} failed with $?" 1>&3 @@ -218,6 +222,7 @@ runtest getsubopt GETSUBOPT || true runtest isblank ISBLANK || true runtest mkdtemp MKDTEMP || true runtest ntohl NTOHL || true +runtest O_DIRECTORY O_DIRECTORY || true runtest PATH_MAX PATH_MAX || true runtest pledge PLEDGE || true runtest sandbox_init SANDBOX_INIT || true @@ -355,6 +360,7 @@ echo "#define MANPATH_DEFAULT \"${MANPATH_DEFAULT}\"" [ -n "${UTF8_LOCALE}" ] && echo "#define UTF8_LOCALE \"${UTF8_LOCALE}\"" [ -n "${HOMEBREWDIR}" ] && echo "#define HOMEBREWDIR \"${HOMEBREWDIR}\"" [ ${HAVE_EFTYPE} -eq 0 ] && echo "#define EFTYPE EINVAL" +[ ${HAVE_O_DIRECTORY} -eq 0 ] && echo "#define O_DIRECTORY 0" [ ${HAVE_PATH_MAX} -eq 0 ] && echo "#define PATH_MAX 4096" if [ ${HAVE_ENDIAN} -eq 0 -a ${HAVE_SYS_ENDIAN} -eq 0 ]; then echo "#define be32toh ntohl"