]> git.cameronkatri.com Git - mandoc.git/blobdiff - configure
do not break the line between Bsx/Bx/Fx/Nx/Ox/Dx and its arguments
[mandoc.git] / configure
index bb3a735775717066b707a3e8d5444e0ce1443710..c4e374a9f9486bba1eee352c3f1b2593d2ce4684 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,8 +1,8 @@
 #!/bin/sh
 #
-# $Id: configure,v 1.57 2017/02/08 16:11:41 schwarze Exp $
+# $Id: configure,v 1.62 2017/03/04 16:36:29 schwarze Exp $
 #
-# Copyright (c) 2014, 2015, 2016 Ingo Schwarze <schwarze@openbsd.org>
+# Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze@openbsd.org>
 #
 # Permission to use, copy, modify, and distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above
@@ -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=
@@ -98,6 +102,7 @@ HTDOCDIR=
 CGIBINDIR=
 
 BINM_APROPOS="apropos"
+BINM_CATMAN="catman"
 BINM_MAKEWHATIS="makewhatis"
 BINM_MAN="man"
 BINM_SOELIM="soelim"
@@ -114,6 +119,7 @@ INSTALL_PROGRAM=
 INSTALL_LIB=
 INSTALL_MAN=
 INSTALL_DATA=
+LN="ln -f"
 
 # --- manual settings from configure.local -----------------------------
 
@@ -153,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
@@ -216,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
@@ -353,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"
@@ -390,6 +399,7 @@ cat << __HEREDOC__
 #define HAVE_OHASH ${HAVE_OHASH}
 
 #define BINM_APROPOS "${BINM_APROPOS}"
+#define BINM_CATMAN "${BINM_CATMAN}"
 #define BINM_MAKEWHATIS "${BINM_MAKEWHATIS}"
 #define BINM_MAN "${BINM_MAN}"
 #define BINM_SOELIM "${BINM_SOELIM}"
@@ -449,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"
@@ -484,6 +495,7 @@ STATIC              = ${STATIC}
 PREFIX         = ${PREFIX}
 BINDIR         = ${BINDIR}
 SBINDIR                = ${SBINDIR}
+BIN_FROM_SBIN  = ${BIN_FROM_SBIN}
 INCLUDEDIR     = ${INCLUDEDIR}
 LIBDIR         = ${LIBDIR}
 MANDIR         = ${MANDIR}
@@ -491,6 +503,7 @@ WWWPREFIX   = ${WWWPREFIX}
 HTDOCDIR       = ${HTDOCDIR}
 CGIBINDIR      = ${CGIBINDIR}
 BINM_APROPOS   = ${BINM_APROPOS}
+BINM_CATMAN    = ${BINM_CATMAN}
 BINM_MAKEWHATIS        = ${BINM_MAKEWHATIS}
 BINM_MAN       = ${BINM_MAN}
 BINM_SOELIM    = ${BINM_SOELIM}
@@ -506,6 +519,7 @@ INSTALL_PROGRAM     = ${INSTALL_PROGRAM}
 INSTALL_LIB    = ${INSTALL_LIB}
 INSTALL_MAN    = ${INSTALL_MAN}
 INSTALL_DATA   = ${INSTALL_DATA}
+LN             = ${LN}
 __HEREDOC__
 
 echo "Makefile.local: written" 1>&2