]> git.cameronkatri.com Git - mandoc.git/blobdiff - configure
Mention the manual page name and section in the HTML page <title>.
[mandoc.git] / configure
index 884ffe0e1ec9661131134f2dd724c91015f5dcdb..c4e374a9f9486bba1eee352c3f1b2593d2ce4684 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $Id: configure,v 1.59 2017/02/16 16:09:33 schwarze Exp $
+# $Id: configure,v 1.62 2017/03/04 16:36:29 schwarze Exp $
 #
 # Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze@openbsd.org>
 #
@@ -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=
@@ -88,6 +91,7 @@ HAVE_WCHAR=
 PREFIX="/usr/local"
 BINDIR=
 SBINDIR=
+BIN_FROM_SBIN=
 INCLUDEDIR=
 LIBDIR=
 MANDIR=
@@ -155,7 +159,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 +223,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 +361,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"
@@ -452,14 +459,15 @@ echo "config.h: written" 1>&3
 
 exec > Makefile.local
 
-[ -z "${BINDIR}"     ] && BINDIR="${PREFIX}/bin"
-[ -z "${SBINDIR}"    ] && SBINDIR="${PREFIX}/sbin"
-[ -z "${INCLUDEDIR}" ] && INCLUDEDIR="${PREFIX}/include/mandoc"
-[ -z "${LIBDIR}"     ] && LIBDIR="${PREFIX}/lib/mandoc"
-[ -z "${MANDIR}"     ] && MANDIR="${PREFIX}/man"
+[ -z "${BINDIR}"          ] && BINDIR="${PREFIX}/bin"
+[ -z "${SBINDIR}"         ] && SBINDIR="${PREFIX}/sbin"
+[ -z "${BIN_FROM_SBIN}"   ] && BIN_FROM_SBIN="../bin"
+[ -z "${INCLUDEDIR}"      ] && INCLUDEDIR="${PREFIX}/include/mandoc"
+[ -z "${LIBDIR}"          ] && LIBDIR="${PREFIX}/lib/mandoc"
+[ -z "${MANDIR}"          ] && MANDIR="${PREFIX}/man"
 
-[ -z "${HTDOCDIR}"   ] && HTDOCDIR="${WWWPREFIX}/htdocs"
-[ -z "${CGIBINDIR}"  ] && CGIBINDIR="${WWWPREFIX}/cgi-bin"
+[ -z "${HTDOCDIR}"        ] && HTDOCDIR="${WWWPREFIX}/htdocs"
+[ -z "${CGIBINDIR}"       ] && CGIBINDIR="${WWWPREFIX}/cgi-bin"
 
 [ -z "${INSTALL_PROGRAM}" ] && INSTALL_PROGRAM="${INSTALL} -m 0555"
 [ -z "${INSTALL_LIB}"     ] && INSTALL_LIB="${INSTALL} -m 0444"
@@ -487,6 +495,7 @@ STATIC              = ${STATIC}
 PREFIX         = ${PREFIX}
 BINDIR         = ${BINDIR}
 SBINDIR                = ${SBINDIR}
+BIN_FROM_SBIN  = ${BIN_FROM_SBIN}
 INCLUDEDIR     = ${INCLUDEDIR}
 LIBDIR         = ${LIBDIR}
 MANDIR         = ${MANDIR}