From 71a5911af71b386e3e48cce7bfeee5ad9188c4b9 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 4 Mar 2019 13:01:57 +0000 Subject: When the -S option is given to man(1) and the requested manual page name is not found and the requested architecture is unknown, complain about the architecture rather than about the manual page name: $ man -S vax cpu man: Unknown architecture "vax". $ man -S sparc64 foobar man: No entry for foobar in the manual. Friendlier error message suggested by jmc@, who also OK'ed the patch. --- configure | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index 6337f6d9..acc2e2b5 100755 --- a/configure +++ b/configure @@ -2,7 +2,7 @@ # # $Id$ # -# Copyright (c) 2014,2015,2016,2017,2018 Ingo Schwarze +# Copyright (c) 2014-2019 Ingo Schwarze # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -37,6 +37,7 @@ SOURCEDIR=`dirname "$0"` MANPATH_BASE="/usr/share/man:/usr/X11R6/man" MANPATH_DEFAULT="/usr/share/man:/usr/X11R6/man:/usr/local/man" +OSENUM= OSNAME= UTF8_LOCALE= @@ -219,6 +220,26 @@ get_locale() { 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" @@ -419,6 +440,7 @@ echo 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}\"" -- cgit