#!/bin/sh
#
-# $Id: configure,v 1.67 2018/08/15 02:15:52 schwarze Exp $
+# $Id: configure,v 1.70 2019/03/06 16:04:31 schwarze Exp $
#
-# Copyright (c) 2014,2015,2016,2017,2018 Ingo Schwarze <schwarze@openbsd.org>
+# Copyright (c) 2014-2019 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
MANPATH_BASE="/usr/share/man:/usr/X11R6/man"
MANPATH_DEFAULT="/usr/share/man:/usr/X11R6/man:/usr/local/man"
+OSENUM=
OSNAME=
UTF8_LOCALE=
HAVE_GETLINE=
HAVE_GETSUBOPT=
HAVE_ISBLANK=
+HAVE_LESS_T=
HAVE_MKDTEMP=
HAVE_NANOSLEEP=
HAVE_NTOHL=
return 0;
}
+# --- operating system -------------------------------------------------
+
+if [ -n "${OSENUM}" ]; then
+ echo "OSENUM specified manually: ${OSENUM}" 1>&2
+ echo "OSENUM specified manually: ${OSENUM}" 1>&3
+else
+ OSDETECT=`uname`
+ if [ "X${OSDETECT}" = "XNetBSD" ]; then
+ OSENUM=MANDOC_OS_NETBSD
+ elif [ "X${OSDETECT}" = "XOpenBSD" ]; then
+ OSENUM=MANDOC_OS_OPENBSD
+ else
+ OSENUM=MANDOC_OS_OTHER
+ fi
+ echo "tested operating system: ${OSDETECT} -> OSENUM=${OSENUM}" 1>&2
+ echo "tested operating system: ${OSDETECT} -> OSENUM=${OSENUM}" 1>&3
+ unset OSDETECT
+fi
+echo 1>&3
+
# --- compiler options -------------------------------------------------
DEFCFLAGS="-g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter"
runtest fts FTS || true
fi
+if ismanual "less -T" LESS_T ${HAVE_LESS_T}; then
+ :
+elif less -ET /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 1>&3
+else
+ HAVE_LESS_T=0
+ echo "tested less -T: no" 1>&2
+ echo "tested less -T: no" 1>&3
+ echo 1>&3
+fi
+
# --- wide character and locale support ---
if get_locale; then
singletest wchar WCHAR -DUTF8_LOCALE=\"${UTF8_LOCALE}\" || \
echo "#define MAN_CONF_FILE \"/etc/${MANM_MANCONF}\""
echo "#define MANPATH_BASE \"${MANPATH_BASE}\""
echo "#define MANPATH_DEFAULT \"${MANPATH_DEFAULT}\""
+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}\""
#define HAVE_GETLINE ${HAVE_GETLINE}
#define HAVE_GETSUBOPT ${HAVE_GETSUBOPT}
#define HAVE_ISBLANK ${HAVE_ISBLANK}
+#define HAVE_LESS_T ${HAVE_LESS_T}
#define HAVE_MKDTEMP ${HAVE_MKDTEMP}
#define HAVE_NTOHL ${HAVE_NTOHL}
#define HAVE_PLEDGE ${HAVE_PLEDGE}