aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/configure
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2019-03-04 13:01:57 +0000
committerIngo Schwarze <schwarze@openbsd.org>2019-03-04 13:01:57 +0000
commitca708704fad0de6eaa3d24f35deead2fb4b5ebf7 (patch)
treecb2e255a750c123b475700630915a5a36e2c02f3 /configure
parent04c83a367828561c8e5f8f4beb200e2978b5753c (diff)
downloadmandoc-ca708704fad0de6eaa3d24f35deead2fb4b5ebf7.tar.gz
mandoc-ca708704fad0de6eaa3d24f35deead2fb4b5ebf7.tar.zst
mandoc-ca708704fad0de6eaa3d24f35deead2fb4b5ebf7.zip
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.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure26
1 files changed, 24 insertions, 2 deletions
diff --git a/configure b/configure
index 90eacc83..5dca7ad8 100755
--- a/configure
+++ b/configure
@@ -1,8 +1,8 @@
#!/bin/sh
#
-# $Id: configure,v 1.67 2018/08/15 02:15:52 schwarze Exp $
+# $Id: configure,v 1.68 2019/03/04 13:01:57 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
@@ -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}\""