#!/bin/sh
#
-# $Id: configure,v 1.76 2020/06/22 20:00:38 schwarze Exp $
+# $Id: configure,v 1.78 2021/08/07 13:02:10 schwarze Exp $
#
# Copyright (c) 2014-2020 Ingo Schwarze <schwarze@openbsd.org>
#
INCLUDEDIR=
LIBDIR=
MANDIR=
-HOMEBREWDIR=
+READ_ALLOWED_PATH=
WWWPREFIX="/var/www"
HTDOCDIR=
BINM_MAN="man"
BINM_SOELIM="soelim"
BINM_WHATIS="whatis"
+BINM_PAGER=
MANM_MAN="man"
MANM_MANCONF="man.conf"
MANM_MDOC="mdoc"
runtest fts FTS || true
fi
+# --- pager ---
+manual=
+if [ -n "${BINM_PAGER}" ]; then
+ manual=" (manual)"
+elif less test-noop.c 1>/dev/null 2>&3; then
+ BINM_PAGER=less
+ echo "tested less: yes" 1>&2
+ echo "tested less: yes" 1>&3
+else
+ BINM_PAGER=more
+ echo "tested less: no" 1>&2
+ echo "tested less: no" 1>&3
+fi
+echo "selected BINM_PAGER=${BINM_PAGER}${manual}" 1>&2
+echo "selected BINM_PAGER=${BINM_PAGER}${manual}" 1>&3
+
# --- tagging support in the pager ---
-if ismanual "less -T" LESS_T ${HAVE_LESS_T}; then
+if ismanual "${BINM_PAGER} -T" LESS_T ${HAVE_LESS_T}; then
:
-elif less -ET /dev/null test-noop.c 1>/dev/null 2>&3; then
+elif ${BINM_PAGER} -T /dev/null test-noop.c 1>/dev/null 2>&3; then
HAVE_LESS_T=1
- echo "tested less -T: yes" 1>&2
- echo "tested less -T: yes" 1>&3
+ echo "tested ${BINM_PAGER} -T: yes" 1>&2
+ echo "tested ${BINM_PAGER} -T: yes" 1>&3
echo 1>&3
else
HAVE_LESS_T=0
- echo "tested less -T: no" 1>&2
- echo "tested less -T: no" 1>&3
+ echo "tested ${BINM_PAGER} -T: no" 1>&2
+ echo "tested ${BINM_PAGER} -T: no" 1>&3
echo 1>&3
fi
echo "#define OSENUM ${OSENUM}"
[ -n "${OSNAME}" ] && echo "#define OSNAME \"${OSNAME}\""
[ -n "${UTF8_LOCALE}" ] && echo "#define UTF8_LOCALE \"${UTF8_LOCALE}\""
-[ -n "${HOMEBREWDIR}" ] && echo "#define HOMEBREWDIR \"${HOMEBREWDIR}\""
+[ -n "${READ_ALLOWED_PATH}" ] \
+ && echo "#define READ_ALLOWED_PATH \"${READ_ALLOWED_PATH}\""
[ ${HAVE_ATTRIBUTE} -eq 0 ] && echo "#define __attribute__(x)"
[ ${HAVE_EFTYPE} -eq 0 ] && echo "#define EFTYPE EINVAL"
[ ${HAVE_O_DIRECTORY} -eq 0 ] && echo "#define O_DIRECTORY 0"
#define BINM_MAN "${BINM_MAN}"
#define BINM_SOELIM "${BINM_SOELIM}"
#define BINM_WHATIS "${BINM_WHATIS}"
+#define BINM_PAGER "${BINM_PAGER}"
__HEREDOC__