about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--.gitignore5
-rw-r--r--Makefile6
-rw-r--r--Makefile.am48
-rw-r--r--README.md2
-rwxr-xr-xautogen.sh258
-rwxr-xr-xconfig.guess1807
-rwxr-xr-xconfig.sub1960
-rw-r--r--configure.ng850
-rw-r--r--man/Makefile.am32
-rw-r--r--man/ngircd.8147
-rw-r--r--man/ngircd.conf.5608
-rw-r--r--src/Makefile21
-rw-r--r--src/Makefile.am19
-rw-r--r--src/config.h432
-rw-r--r--src/ipaddr/Makefile13
-rw-r--r--src/ipaddr/Makefile.ng21
-rw-r--r--src/ngircd/Makefile52
-rw-r--r--src/ngircd/Makefile.ng124
-rw-r--r--src/portab/Makefile20
-rw-r--r--src/portab/Makefile.ng41
-rw-r--r--src/tool/Makefile13
-rw-r--r--src/tool/Makefile.ng27
22 files changed, 1314 insertions, 5192 deletions
diff --git a/.gitignore b/.gitignore
index 94957798..2fbe3362 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,10 +8,8 @@
 *.log
 *.o
 *~
-Makefile
 Makefile.in
 aclocal.m4
-ansi2knr.1
 ansi2knr.c
 ansi2knr.h
 ar-lib
@@ -33,10 +31,7 @@ missing
 ngircd.dest
 doc/sample-ngircd.conf
 doc/src/html
-man/ngircd.8
-man/ngircd.conf.5
 src/*/Makefile.am
-src/config.h
 src/config.h.in
 src/stamp-h1
 src/ngircd/check-help
diff --git a/Makefile b/Makefile
new file mode 100644
index 00000000..9f78a580
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,6 @@
+.PHONY: all clean
+
+all:
+	make -C src
+clean:
+	make -C src clean
diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index aa491a91..00000000
--- a/Makefile.am
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2024 Alexander Barton (alex@barton.de) and Contributors
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-# Please read the file COPYING, README and AUTHORS for more information.
-#
-
-SUBDIRS = doc src man contrib
-
-EXTRA_DIST = \
-	AUTHORS.md \
-	INSTALL.md \
-	README.md \
-	autogen.sh \
-	configure.ng \
-	.clang_complete \
-	.dockerignore \
-	.mailmap
-
-clean-local:
-	rm -f build-stamp*
-
-maintainer-clean-local:
-	rm -rf autom4te.cache
-	rm -f Makefile.in Makefile aclocal.m4 configure configure.ac
-	rm -f ar-lib mkinstalldirs missing depcomp install-sh
-	rm -f config.log debian
-
-testsuite:
-	${MAKE} -C src/testsuite check
-
-srcdoc:
-	${MAKE} -C doc/src srcdoc
-
-rpm: distcheck
-	rpmbuild -ta ngircd-$(VERSION).tar.gz
-
-deb:
-	[ -f debian/rules ] || ln -s contrib/Debian debian
-	dpkg-buildpackage --build=binary
-
-.PHONY: deb rpm srcdoc testsuite
-
-# -eof-
diff --git a/README.md b/README.md
index 073fff44..6509423d 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,7 @@
 # [ngIRCd](https://ngircd.barton.de) - Internet Relay Chat Server
 
+This is a version with build system rewritten in less painful way
+
 ## Introduction
 
 *ngIRCd* is a free, portable and lightweight *Internet Relay Chat* ([IRC])
diff --git a/autogen.sh b/autogen.sh
deleted file mode 100755
index 0cf9a0e3..00000000
--- a/autogen.sh
+++ /dev/null
@@ -1,258 +0,0 @@
-#!/bin/sh
-#
-# ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2024 Alexander Barton (alex@barton.de) and Contributors
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-# Please read the file COPYING, README and AUTHORS for more information.
-#
-# Usage:
-#   [VAR=<value>] ./autogen.sh [<configure-args>]
-#
-# This script generates the ./configure script using GNU automake and
-# GNU autoconf. It tries to be smart in finding the correct/usable/available
-# installed versions of these tools on your system.
-#
-# In addition, it enables or disables the "de-ANSI-fication" support of GNU
-# automake, which is supported up to autoconf 1.11.x an has been removed
-# in automake 1.12 -- make sure to use a version of automake supporting it
-# when generating distribution archives!
-#
-# The following strategy is used for each of aclocal, autoheader, automake,
-# and autoconf: first, "tool" (the regular name of the tool, e. g. "autoconf"
-# or "automake") is checked. If this fails, "tool<major><minor>" (for example
-# "automake16") and "tool-<major>.<minor>" (e. g. "autoconf-2.54") are tried
-# with <major> being 2 for tool of GNU autoconf and 1 for tools of automake;
-# <minor> is tried from 99 to 0. The first occurrence will be used.
-#
-# When you pass <configure-args> to autogen.sh it will call the generated
-# ./configure script on success and pass these parameters to it.
-#
-# You can tweak the behaviour using these environment variables:
-#
-# - ACLOCAL=<cmd>, AUTOHEADER=<cmd>, AUTOMAKE=<cmd>, AUTOCONF=<cmd>
-#   Name and optionally path to the particular tool.
-# - PREFIX=<path>
-#   Search the GNU autoconf and GNU automake tools in <path> first. If the
-#   generated ./configure script will be called, pass "--prefix=<path>" to it.
-# - EXIST=<tool>
-#   Use <tool> to test for aclocal, autoheader etc. pp. ...
-#   When not specified, either "type" or "which" is used.
-# - VERBOSE=1
-#   Output the detected names of the GNU automake and GNU autoconf tools.
-# - GO=1
-#   Call ./configure even if no arguments have been passed to autogen.sh.
-#
-# Examples:
-#
-# - ./autogen.sh
-#   Generates the ./configure script.
-# - GO=1 ./autogen.sh
-#   Generates the ./configure script and runs it as "./configure".
-# - VERBOSE=1 ./autogen.sh --with-ident
-#   Show tool names, generates the ./configure script, and runs it with
-#   these arguments: "./configure --with-ident".
-# - ACLOCAL=aclocal-1.6 GO=1 PREFIX=$HOME ./autogen.sh
-#   Uses "aclocal-1.6" as aclocal tool, generates the ./configure script,
-#   and runs it with these arguments: "./configure --prefix=$HOME".
-#
-
-Check_Tool()
-{
-	searchlist="$1"
-	major="$2"
-	minor="$3"
-
-	for name in $searchlist; do
-		$EXIST "${name}${major}${minor}" >/dev/null 2>&1
-		if [ $? -eq 0 ]; then
-			echo "${name}${major}${minor}"
-			return 0
-		fi
-		$EXIST "${name}-${major}.${minor}" >/dev/null 2>&1
-		if [ $? -eq 0 ]; then
-			echo "${name}-${major}.${minor}"
-			return 0
-		fi
-	done
-	return 1
-}
-
-Search()
-{
-	[ $# -lt 2 ] && return 1
-	[ $# -gt 3 ] && return 1
-
-	searchlist="$1"
-	major="$2"
-	minor_pref="$3"
-	minor=99
-
-	[ -n "$PREFIX" ] && searchlist="${PREFIX}/$1 ${PREFIX}/bin/$1 $searchlist"
-
-	if [ -n "$minor_pref" ]; then
-		Check_Tool "$searchlist" "$major" "$minor_pref" && return 0
-	fi
-
-	for name in $searchlist; do
-		$EXIST "${name}" >/dev/null 2>&1
-		if [ $? -eq 0 ]; then
-			"${name}" --version 2>&1 \
-			 | grep -v "environment variable" >/dev/null 2>&1
-			if [ $? -eq 0 ]; then
-				echo "${name}"
-				return 0
-			fi
-		fi
-	done
-
-	while [ $minor -ge 0 ]; do
-		Check_Tool "$searchlist" "$major" "$minor" && return 0
-		minor=$(expr $minor - 1)
-	done
-	return 1
-}
-
-Notfound()
-{
-	echo "Error: $* not found!"
-	echo 'Please install supported versions of GNU autoconf, GNU automake'
-	echo 'and pkg-config: see the INSTALL file for details.'
-	exit 1
-}
-
-Run()
-{
-	[ "$VERBOSE" = "1" ] && echo " - running \"$*\" ..."
-	"$@"
-}
-
-# Reset locale settings to suppress warning messages of Perl
-unset LC_ALL
-unset LANG
-
-# Which command should be used to detect the automake/autoconf tools?
-[ -z "$EXIST" ] && existlist="type which" || existlist="$EXIST"
-EXIST=""
-for t in $existlist; do
-	$t /bin/ls >/dev/null 2>&1
-	if [ $? -eq 0 ]; then
-		rm -f /tmp/test.$$
-		$t /tmp/test.$$ >/dev/null 2>&1
-		[ $? -ne 0 ] && EXIST="$t"
-	fi
-	[ -n "$EXIST" ] && break
-done
-if [ -z "$EXIST" ]; then
-	echo "Didn't detect a working command to test for the autoconf/automake tools!"
-	echo "Searchlist: $existlist"
-	exit 1
-fi
-[ "$VERBOSE" = "1" ] && echo "Using \"$EXIST\" to test for tools."
-
-# Try to detect the needed tools when no environment variable already
-# specifies one:
-echo "Searching for required tools ..."
-[ -z "$ACLOCAL" ] && ACLOCAL=$(Search aclocal 1 11)
-[ "$VERBOSE" = "1" ] && echo " - ACLOCAL=$ACLOCAL"
-[ -z "$AUTOHEADER" ] && AUTOHEADER=$(Search autoheader 2)
-[ "$VERBOSE" = "1" ] && echo " - AUTOHEADER=$AUTOHEADER"
-[ -z "$AUTOMAKE" ] && AUTOMAKE=$(Search automake 1 11)
-[ "$VERBOSE" = "1" ] && echo " - AUTOMAKE=$AUTOMAKE"
-[ -z "$AUTOCONF" ] && AUTOCONF=$(Search autoconf 2)
-[ "$VERBOSE" = "1" ] && echo " - AUTOCONF=$AUTOCONF"
-
-AUTOCONF_VERSION=$(echo "$AUTOCONF" | cut -d'-' -f2-)
-[ -n "$AUTOCONF_VERSION" ] && [ "$AUTOCONF_VERSION" != "autoconf" ] \
-	&& export AUTOCONF_VERSION || unset AUTOCONF_VERSION
-[ "$VERBOSE" = "1" ] && echo " - AUTOCONF_VERSION=$AUTOCONF_VERSION"
-AUTOMAKE_VERSION=$(echo $AUTOMAKE | cut -d'-' -f2-)
-[ -n "$AUTOMAKE_VERSION" ] && [ "$AUTOMAKE_VERSION" != "automake" ] \
-	&& export AUTOMAKE_VERSION || unset AUTOMAKE_VERSION
-[ "$VERBOSE" = "1" ] && echo " - AUTOMAKE_VERSION=$AUTOMAKE_VERSION"
-
-[ $# -gt 0 ] && CONFIGURE_ARGS=" $*" || CONFIGURE_ARGS=""
-[ -z "$GO" ] && [ -n "$CONFIGURE_ARGS" ] && GO=1
-
-# Verify that all tools have been found
-command -v pkg-config >/dev/null || Notfound pkg-config
-[ -z "$ACLOCAL" ] && Notfound aclocal
-[ -z "$AUTOHEADER" ] && Notfound autoheader
-[ -z "$AUTOMAKE" ] && Notfound automake
-[ -z "$AUTOCONF" ] && Notfound autoconf
-
-AM_VERSION=$($AUTOMAKE --version | head -n 1 | sed -e 's/.* //g')
-ifs=$IFS; IFS="."; set $AM_VERSION; IFS=$ifs
-AM_MAJOR="$1"; AM_MINOR="$2"
-echo "Detected automake $AM_VERSION ..."
-
-AM_MAKEFILES="src/ipaddr/Makefile.ng src/ngircd/Makefile.ng src/testsuite/Makefile.ng src/tool/Makefile.ng"
-
-# De-ANSI-fication?
-if [ "$AM_MAJOR" -eq "1" ] && [ "$AM_MINOR" -lt "12" ]; then
-	# automake < 1.12 => automatic de-ANSI-fication support available
-	echo " - Enabling de-ANSI-fication support."
-	sed -e "s|^__ng_PROTOTYPES__|AM_C_PROTOTYPES|g" configure.ng >configure.ac
-	DEANSI_START=""
-	DEANSI_END=""
-else
-	# automake >= 1.12 => no de-ANSI-fication support available
-	echo " - Disabling de-ANSI-fication support."
-	sed -e "s|^__ng_PROTOTYPES__|AC_C_PROTOTYPES|g" configure.ng >configure.ac
-	DEANSI_START="#"
-	DEANSI_END=" (disabled by ./autogen.sh script)"
-fi
-# Serial test harness?
-if [ "$AM_MAJOR" -eq "1" ] && [ "$AM_MINOR" -ge "13" ]; then
-	# automake >= 1.13 => enforce "serial test harness"
-	echo " - Enforcing serial test harness."
-	SERIAL_TESTS="serial-tests"
-else
-	# automake < 1.13 => no new test harness, nothing to do
-	# shellcheck disable=SC2034
-	SERIAL_TEST=""
-fi
-
-sed -e "s|^__ng_Makefile_am_template__|AUTOMAKE_OPTIONS = ${SERIAL_TESTS} ${DEANSI_START}ansi2knr${DEANSI_END}|g" \
-	src/portab/Makefile.ng >src/portab/Makefile.am
-for makefile_ng in $AM_MAKEFILES; do
-	makefile_am=$(echo "$makefile_ng" | sed -e "s|\.ng\$|\.am|g")
-	sed -e "s|^__ng_Makefile_am_template__|AUTOMAKE_OPTIONS = ${SERIAL_TESTS} ${DEANSI_START}../portab/ansi2knr${DEANSI_END}|g" \
-		$makefile_ng >$makefile_am
-done
-
-export ACLOCAL AUTOHEADER AUTOMAKE AUTOCONF
-
-# Generate files
-echo "Generating files using \"$AUTOCONF\" and \"$AUTOMAKE\" ..."
-Run $ACLOCAL && \
-	Run $AUTOCONF && \
-	Run $AUTOHEADER && \
-	Run $AUTOMAKE --add-missing --no-force
-
-if [ $? -eq 0 ] && [ -x ./configure ]; then
-	# Success: if we got some parameters we call ./configure and pass
-	# all of them to it.
-	NAME=$(grep PACKAGE_STRING= configure | cut -d"'" -f2)
-	if [ "$GO" = "1" ]; then
-		[ -n "$PREFIX" ] && p=" --prefix=$PREFIX" || p=""
-		c="./configure${p}${CONFIGURE_ARGS}"
-		echo "Okay, autogen.sh for $NAME done."
-		echo "Calling \"$c\" ..."
-		$c
-		exit $?
-	else
-		echo "Okay, autogen.sh for $NAME done."
-		echo "Now run the \"./configure\" script."
-		exit 0
-	fi
-else
-	# Failure!?
-	echo "Error! Check your installation of GNU automake and autoconf!"
-	exit 1
-fi
-
-# -eof-
diff --git a/config.guess b/config.guess
deleted file mode 100755
index cdfc4392..00000000
--- a/config.guess
+++ /dev/null
@@ -1,1807 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-#   Copyright 1992-2023 Free Software Foundation, Inc.
-
-# shellcheck disable=SC2006,SC2268 # see below for rationale
-
-timestamp='2023-08-22'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <https://www.gnu.org/licenses/>.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that
-# program.  This Exception is an additional permission under section 7
-# of the GNU General Public License, version 3 ("GPLv3").
-#
-# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
-#
-# You can get the latest version of this script from:
-# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
-#
-# Please send patches to <config-patches@gnu.org>.
-
-
-# The "shellcheck disable" line above the timestamp inhibits complaints
-# about features and limitations of the classic Bourne shell that were
-# superseded or lifted in POSIX.  However, this script identifies a wide
-# variety of pre-POSIX systems that do not have POSIX shells at all, and
-# even some reasonably current systems (Solaris 10 as case-in-point) still
-# have a pre-POSIX /bin/sh.
-
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system '$me' is run on.
-
-Options:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright 1992-2023 Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try '$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )	# Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help" >&2
-       exit 1 ;;
-    * )
-       break ;;
-  esac
-done
-
-if test $# != 0; then
-  echo "$me: too many arguments$help" >&2
-  exit 1
-fi
-
-# Just in case it came from the environment.
-GUESS=
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still
-# use 'HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-tmp=
-# shellcheck disable=SC2172
-trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
-
-set_cc_for_build() {
-    # prevent multiple calls if $tmp is already set
-    test "$tmp" && return 0
-    : "${TMPDIR=/tmp}"
-    # shellcheck disable=SC2039,SC3028
-    { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
-	{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
-	{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
-	{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
-    dummy=$tmp/dummy
-    case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
-	,,)    echo "int x;" > "$dummy.c"
-	       for driver in cc gcc c89 c99 ; do
-		   if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
-		       CC_FOR_BUILD=$driver
-		       break
-		   fi
-	       done
-	       if test x"$CC_FOR_BUILD" = x ; then
-		   CC_FOR_BUILD=no_compiler_found
-	       fi
-	       ;;
-	,,*)   CC_FOR_BUILD=$CC ;;
-	,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-    esac
-}
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi@noc.rutgers.edu 1994-08-24)
-if test -f /.attbin/uname ; then
-	PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-case $UNAME_SYSTEM in
-Linux|GNU|GNU/*)
-	LIBC=unknown
-
-	set_cc_for_build
-	cat <<-EOF > "$dummy.c"
-	#if defined(__ANDROID__)
-	LIBC=android
-	#else
-	#include <features.h>
-	#if defined(__UCLIBC__)
-	LIBC=uclibc
-	#elif defined(__dietlibc__)
-	LIBC=dietlibc
-	#elif defined(__GLIBC__)
-	LIBC=gnu
-	#else
-	#include <stdarg.h>
-	/* First heuristic to detect musl libc.  */
-	#ifdef __DEFINED_va_list
-	LIBC=musl
-	#endif
-	#endif
-	#endif
-	EOF
-	cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
-	eval "$cc_set_libc"
-
-	# Second heuristic to detect musl libc.
-	if [ "$LIBC" = unknown ] &&
-	   command -v ldd >/dev/null &&
-	   ldd --version 2>&1 | grep -q ^musl; then
-		LIBC=musl
-	fi
-
-	# If the system lacks a compiler, then just pick glibc.
-	# We could probably try harder.
-	if [ "$LIBC" = unknown ]; then
-		LIBC=gnu
-	fi
-	;;
-esac
-
-# Note: order is significant - the case branches are not exclusive.
-
-case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
-    *:NetBSD:*:*)
-	# NetBSD (nbsd) targets should (where applicable) match one or
-	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
-	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
-	# switched to ELF, *-*-netbsd* would select the old
-	# object file format.  This provides both forward
-	# compatibility and a consistent mechanism for selecting the
-	# object file format.
-	#
-	# Note: NetBSD doesn't particularly care about the vendor
-	# portion of the name.  We always set it to "unknown".
-	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
-	    /sbin/sysctl -n hw.machine_arch 2>/dev/null || \
-	    /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \
-	    echo unknown)`
-	case $UNAME_MACHINE_ARCH in
-	    aarch64eb) machine=aarch64_be-unknown ;;
-	    armeb) machine=armeb-unknown ;;
-	    arm*) machine=arm-unknown ;;
-	    sh3el) machine=shl-unknown ;;
-	    sh3eb) machine=sh-unknown ;;
-	    sh5el) machine=sh5le-unknown ;;
-	    earmv*)
-		arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
-		endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
-		machine=${arch}${endian}-unknown
-		;;
-	    *) machine=$UNAME_MACHINE_ARCH-unknown ;;
-	esac
-	# The Operating System including object format, if it has switched
-	# to ELF recently (or will in the future) and ABI.
-	case $UNAME_MACHINE_ARCH in
-	    earm*)
-		os=netbsdelf
-		;;
-	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
-		set_cc_for_build
-		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-			| grep -q __ELF__
-		then
-		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
-		    # Return netbsd for either.  FIX?
-		    os=netbsd
-		else
-		    os=netbsdelf
-		fi
-		;;
-	    *)
-		os=netbsd
-		;;
-	esac
-	# Determine ABI tags.
-	case $UNAME_MACHINE_ARCH in
-	    earm*)
-		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
-		abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
-		;;
-	esac
-	# The OS release
-	# Debian GNU/NetBSD machines have a different userland, and
-	# thus, need a distinct triplet. However, they do not need
-	# kernel version information, so it can be replaced with a
-	# suitable tag, in the style of linux-gnu.
-	case $UNAME_VERSION in
-	    Debian*)
-		release='-gnu'
-		;;
-	    *)
-		release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
-		;;
-	esac
-	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
-	# contains redundant information, the shorter form:
-	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-	GUESS=$machine-${os}${release}${abi-}
-	;;
-    *:Bitrig:*:*)
-	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
-	GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE
-	;;
-    *:OpenBSD:*:*)
-	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
-	GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE
-	;;
-    *:SecBSD:*:*)
-	UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'`
-	GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE
-	;;
-    *:LibertyBSD:*:*)
-	UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
-	GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE
-	;;
-    *:MidnightBSD:*:*)
-	GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE
-	;;
-    *:ekkoBSD:*:*)
-	GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE
-	;;
-    *:SolidBSD:*:*)
-	GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE
-	;;
-    *:OS108:*:*)
-	GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE
-	;;
-    macppc:MirBSD:*:*)
-	GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE
-	;;
-    *:MirBSD:*:*)
-	GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE
-	;;
-    *:Sortix:*:*)
-	GUESS=$UNAME_MACHINE-unknown-sortix
-	;;
-    *:Twizzler:*:*)
-	GUESS=$UNAME_MACHINE-unknown-twizzler
-	;;
-    *:Redox:*:*)
-	GUESS=$UNAME_MACHINE-unknown-redox
-	;;
-    mips:OSF1:*.*)
-	GUESS=mips-dec-osf1
-	;;
-    alpha:OSF1:*:*)
-	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
-	trap '' 0
-	case $UNAME_RELEASE in
-	*4.0)
-		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-		;;
-	*5.*)
-		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
-		;;
-	esac
-	# According to Compaq, /usr/sbin/psrinfo has been available on
-	# OSF/1 and Tru64 systems produced since 1995.  I hope that
-	# covers most systems running today.  This code pipes the CPU
-	# types through head -n 1, so we only detect the type of CPU 0.
-	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
-	case $ALPHA_CPU_TYPE in
-	    "EV4 (21064)")
-		UNAME_MACHINE=alpha ;;
-	    "EV4.5 (21064)")
-		UNAME_MACHINE=alpha ;;
-	    "LCA4 (21066/21068)")
-		UNAME_MACHINE=alpha ;;
-	    "EV5 (21164)")
-		UNAME_MACHINE=alphaev5 ;;
-	    "EV5.6 (21164A)")
-		UNAME_MACHINE=alphaev56 ;;
-	    "EV5.6 (21164PC)")
-		UNAME_MACHINE=alphapca56 ;;
-	    "EV5.7 (21164PC)")
-		UNAME_MACHINE=alphapca57 ;;
-	    "EV6 (21264)")
-		UNAME_MACHINE=alphaev6 ;;
-	    "EV6.7 (21264A)")
-		UNAME_MACHINE=alphaev67 ;;
-	    "EV6.8CB (21264C)")
-		UNAME_MACHINE=alphaev68 ;;
-	    "EV6.8AL (21264B)")
-		UNAME_MACHINE=alphaev68 ;;
-	    "EV6.8CX (21264D)")
-		UNAME_MACHINE=alphaev68 ;;
-	    "EV6.9A (21264/EV69A)")
-		UNAME_MACHINE=alphaev69 ;;
-	    "EV7 (21364)")
-		UNAME_MACHINE=alphaev7 ;;
-	    "EV7.9 (21364A)")
-		UNAME_MACHINE=alphaev79 ;;
-	esac
-	# A Pn.n version is a patched version.
-	# A Vn.n version is a released version.
-	# A Tn.n version is a released field test version.
-	# A Xn.n version is an unreleased experimental baselevel.
-	# 1.2 uses "1.2" for uname -r.
-	OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
-	GUESS=$UNAME_MACHINE-dec-osf$OSF_REL
-	;;
-    Amiga*:UNIX_System_V:4.0:*)
-	GUESS=m68k-unknown-sysv4
-	;;
-    *:[Aa]miga[Oo][Ss]:*:*)
-	GUESS=$UNAME_MACHINE-unknown-amigaos
-	;;
-    *:[Mm]orph[Oo][Ss]:*:*)
-	GUESS=$UNAME_MACHINE-unknown-morphos
-	;;
-    *:OS/390:*:*)
-	GUESS=i370-ibm-openedition
-	;;
-    *:z/VM:*:*)
-	GUESS=s390-ibm-zvmoe
-	;;
-    *:OS400:*:*)
-	GUESS=powerpc-ibm-os400
-	;;
-    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-	GUESS=arm-acorn-riscix$UNAME_RELEASE
-	;;
-    arm*:riscos:*:*|arm*:RISCOS:*:*)
-	GUESS=arm-unknown-riscos
-	;;
-    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
-	GUESS=hppa1.1-hitachi-hiuxmpp
-	;;
-    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
-	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
-	case `(/bin/universe) 2>/dev/null` in
-	    att) GUESS=pyramid-pyramid-sysv3 ;;
-	    *)   GUESS=pyramid-pyramid-bsd   ;;
-	esac
-	;;
-    NILE*:*:*:dcosx)
-	GUESS=pyramid-pyramid-svr4
-	;;
-    DRS?6000:unix:4.0:6*)
-	GUESS=sparc-icl-nx6
-	;;
-    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
-	case `/usr/bin/uname -p` in
-	    sparc) GUESS=sparc-icl-nx7 ;;
-	esac
-	;;
-    s390x:SunOS:*:*)
-	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
-	GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL
-	;;
-    sun4H:SunOS:5.*:*)
-	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
-	GUESS=sparc-hal-solaris2$SUN_REL
-	;;
-    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
-	GUESS=sparc-sun-solaris2$SUN_REL
-	;;
-    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
-	GUESS=i386-pc-auroraux$UNAME_RELEASE
-	;;
-    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
-	set_cc_for_build
-	SUN_ARCH=i386
-	# If there is a compiler, see if it is configured for 64-bit objects.
-	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
-	# This test works for both compilers.
-	if test "$CC_FOR_BUILD" != no_compiler_found; then
-	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
-		(CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \
-		grep IS_64BIT_ARCH >/dev/null
-	    then
-		SUN_ARCH=x86_64
-	    fi
-	fi
-	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
-	GUESS=$SUN_ARCH-pc-solaris2$SUN_REL
-	;;
-    sun4*:SunOS:6*:*)
-	# According to config.sub, this is the proper way to canonicalize
-	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
-	# it's likely to be more like Solaris than SunOS4.
-	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
-	GUESS=sparc-sun-solaris3$SUN_REL
-	;;
-    sun4*:SunOS:*:*)
-	case `/usr/bin/arch -k` in
-	    Series*|S4*)
-		UNAME_RELEASE=`uname -v`
-		;;
-	esac
-	# Japanese Language versions have a version number like '4.1.3-JL'.
-	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
-	GUESS=sparc-sun-sunos$SUN_REL
-	;;
-    sun3*:SunOS:*:*)
-	GUESS=m68k-sun-sunos$UNAME_RELEASE
-	;;
-    sun*:*:4.2BSD:*)
-	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-	test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
-	case `/bin/arch` in
-	    sun3)
-		GUESS=m68k-sun-sunos$UNAME_RELEASE
-		;;
-	    sun4)
-		GUESS=sparc-sun-sunos$UNAME_RELEASE
-		;;
-	esac
-	;;
-    aushp:SunOS:*:*)
-	GUESS=sparc-auspex-sunos$UNAME_RELEASE
-	;;
-    # The situation for MiNT is a little confusing.  The machine name
-    # can be virtually everything (everything which is not
-    # "atarist" or "atariste" at least should have a processor
-    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
-    # to the lowercase version "mint" (or "freemint").  Finally
-    # the system name "TOS" denotes a system which is actually not
-    # MiNT.  But MiNT is downward compatible to TOS, so this should
-    # be no problem.
-    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-	GUESS=m68k-atari-mint$UNAME_RELEASE
-	;;
-    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
-	GUESS=m68k-atari-mint$UNAME_RELEASE
-	;;
-    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-	GUESS=m68k-atari-mint$UNAME_RELEASE
-	;;
-    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-	GUESS=m68k-milan-mint$UNAME_RELEASE
-	;;
-    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-	GUESS=m68k-hades-mint$UNAME_RELEASE
-	;;
-    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-	GUESS=m68k-unknown-mint$UNAME_RELEASE
-	;;
-    m68k:machten:*:*)
-	GUESS=m68k-apple-machten$UNAME_RELEASE
-	;;
-    powerpc:machten:*:*)
-	GUESS=powerpc-apple-machten$UNAME_RELEASE
-	;;
-    RISC*:Mach:*:*)
-	GUESS=mips-dec-mach_bsd4.3
-	;;
-    RISC*:ULTRIX:*:*)
-	GUESS=mips-dec-ultrix$UNAME_RELEASE
-	;;
-    VAX*:ULTRIX*:*:*)
-	GUESS=vax-dec-ultrix$UNAME_RELEASE
-	;;
-    2020:CLIX:*:* | 2430:CLIX:*:*)
-	GUESS=clipper-intergraph-clix$UNAME_RELEASE
-	;;
-    mips:*:*:UMIPS | mips:*:*:RISCos)
-	set_cc_for_build
-	sed 's/^	//' << EOF > "$dummy.c"
-#ifdef __cplusplus
-#include <stdio.h>  /* for printf() prototype */
-	int main (int argc, char *argv[]) {
-#else
-	int main (argc, argv) int argc; char *argv[]; {
-#endif
-	#if defined (host_mips) && defined (MIPSEB)
-	#if defined (SYSTYPE_SYSV)
-	  printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
-	#endif
-	#if defined (SYSTYPE_SVR4)
-	  printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
-	#endif
-	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
-	  printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
-	#endif
-	#endif
-	  exit (-1);
-	}
-EOF
-	$CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
-	  dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
-	  SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
-	    { echo "$SYSTEM_NAME"; exit; }
-	GUESS=mips-mips-riscos$UNAME_RELEASE
-	;;
-    Motorola:PowerMAX_OS:*:*)
-	GUESS=powerpc-motorola-powermax
-	;;
-    Motorola:*:4.3:PL8-*)
-	GUESS=powerpc-harris-powermax
-	;;
-    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
-	GUESS=powerpc-harris-powermax
-	;;
-    Night_Hawk:Power_UNIX:*:*)
-	GUESS=powerpc-harris-powerunix
-	;;
-    m88k:CX/UX:7*:*)
-	GUESS=m88k-harris-cxux7
-	;;
-    m88k:*:4*:R4*)
-	GUESS=m88k-motorola-sysv4
-	;;
-    m88k:*:3*:R3*)
-	GUESS=m88k-motorola-sysv3
-	;;
-    AViiON:dgux:*:*)
-	# DG/UX returns AViiON for all architectures
-	UNAME_PROCESSOR=`/usr/bin/uname -p`
-	if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110
-	then
-	    if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \
-	       test "$TARGET_BINARY_INTERFACE"x = x
-	    then
-		GUESS=m88k-dg-dgux$UNAME_RELEASE
-	    else
-		GUESS=m88k-dg-dguxbcs$UNAME_RELEASE
-	    fi
-	else
-	    GUESS=i586-dg-dgux$UNAME_RELEASE
-	fi
-	;;
-    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
-	GUESS=m88k-dolphin-sysv3
-	;;
-    M88*:*:R3*:*)
-	# Delta 88k system running SVR3
-	GUESS=m88k-motorola-sysv3
-	;;
-    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
-	GUESS=m88k-tektronix-sysv3
-	;;
-    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
-	GUESS=m68k-tektronix-bsd
-	;;
-    *:IRIX*:*:*)
-	IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'`
-	GUESS=mips-sgi-irix$IRIX_REL
-	;;
-    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-	GUESS=romp-ibm-aix    # uname -m gives an 8 hex-code CPU id
-	;;                    # Note that: echo "'`uname -s`'" gives 'AIX '
-    i*86:AIX:*:*)
-	GUESS=i386-ibm-aix
-	;;
-    ia64:AIX:*:*)
-	if test -x /usr/bin/oslevel ; then
-		IBM_REV=`/usr/bin/oslevel`
-	else
-		IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
-	fi
-	GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV
-	;;
-    *:AIX:2:3)
-	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-		set_cc_for_build
-		sed 's/^		//' << EOF > "$dummy.c"
-		#include <sys/systemcfg.h>
-
-		main()
-			{
-			if (!__power_pc())
-				exit(1);
-			puts("powerpc-ibm-aix3.2.5");
-			exit(0);
-			}
-EOF
-		if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
-		then
-			GUESS=$SYSTEM_NAME
-		else
-			GUESS=rs6000-ibm-aix3.2.5
-		fi
-	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
-		GUESS=rs6000-ibm-aix3.2.4
-	else
-		GUESS=rs6000-ibm-aix3.2
-	fi
-	;;
-    *:AIX:*:[4567])
-	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
-	if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
-		IBM_ARCH=rs6000
-	else
-		IBM_ARCH=powerpc
-	fi
-	if test -x /usr/bin/lslpp ; then
-		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \
-			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
-	else
-		IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
-	fi
-	GUESS=$IBM_ARCH-ibm-aix$IBM_REV
-	;;
-    *:AIX:*:*)
-	GUESS=rs6000-ibm-aix
-	;;
-    ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
-	GUESS=romp-ibm-bsd4.4
-	;;
-    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
-	GUESS=romp-ibm-bsd$UNAME_RELEASE    # 4.3 with uname added to
-	;;                                  # report: romp-ibm BSD 4.3
-    *:BOSX:*:*)
-	GUESS=rs6000-bull-bosx
-	;;
-    DPX/2?00:B.O.S.:*:*)
-	GUESS=m68k-bull-sysv3
-	;;
-    9000/[34]??:4.3bsd:1.*:*)
-	GUESS=m68k-hp-bsd
-	;;
-    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
-	GUESS=m68k-hp-bsd4.4
-	;;
-    9000/[34678]??:HP-UX:*:*)
-	HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
-	case $UNAME_MACHINE in
-	    9000/31?)            HP_ARCH=m68000 ;;
-	    9000/[34]??)         HP_ARCH=m68k ;;
-	    9000/[678][0-9][0-9])
-		if test -x /usr/bin/getconf; then
-		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-		    case $sc_cpu_version in
-		      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
-		      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
-		      532)                      # CPU_PA_RISC2_0
-			case $sc_kernel_bits in
-			  32) HP_ARCH=hppa2.0n ;;
-			  64) HP_ARCH=hppa2.0w ;;
-			  '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
-			esac ;;
-		    esac
-		fi
-		if test "$HP_ARCH" = ""; then
-		    set_cc_for_build
-		    sed 's/^		//' << EOF > "$dummy.c"
-
-		#define _HPUX_SOURCE
-		#include <stdlib.h>
-		#include <unistd.h>
-
-		int main ()
-		{
-		#if defined(_SC_KERNEL_BITS)
-		    long bits = sysconf(_SC_KERNEL_BITS);
-		#endif
-		    long cpu  = sysconf (_SC_CPU_VERSION);
-
-		    switch (cpu)
-			{
-			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-			case CPU_PA_RISC2_0:
-		#if defined(_SC_KERNEL_BITS)
-			    switch (bits)
-				{
-				case 64: puts ("hppa2.0w"); break;
-				case 32: puts ("hppa2.0n"); break;
-				default: puts ("hppa2.0"); break;
-				} break;
-		#else  /* !defined(_SC_KERNEL_BITS) */
-			    puts ("hppa2.0"); break;
-		#endif
-			default: puts ("hppa1.0"); break;
-			}
-		    exit (0);
-		}
-EOF
-		    (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
-		    test -z "$HP_ARCH" && HP_ARCH=hppa
-		fi ;;
-	esac
-	if test "$HP_ARCH" = hppa2.0w
-	then
-	    set_cc_for_build
-
-	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
-	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
-	    # generating 64-bit code.  GNU and HP use different nomenclature:
-	    #
-	    # $ CC_FOR_BUILD=cc ./config.guess
-	    # => hppa2.0w-hp-hpux11.23
-	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
-	    # => hppa64-hp-hpux11.23
-
-	    if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
-		grep -q __LP64__
-	    then
-		HP_ARCH=hppa2.0w
-	    else
-		HP_ARCH=hppa64
-	    fi
-	fi
-	GUESS=$HP_ARCH-hp-hpux$HPUX_REV
-	;;
-    ia64:HP-UX:*:*)
-	HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
-	GUESS=ia64-hp-hpux$HPUX_REV
-	;;
-    3050*:HI-UX:*:*)
-	set_cc_for_build
-	sed 's/^	//' << EOF > "$dummy.c"
-	#include <unistd.h>
-	int
-	main ()
-	{
-	  long cpu = sysconf (_SC_CPU_VERSION);
-	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
-	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
-	     results, however.  */
-	  if (CPU_IS_PA_RISC (cpu))
-	    {
-	      switch (cpu)
-		{
-		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
-		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
-		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
-		  default: puts ("hppa-hitachi-hiuxwe2"); break;
-		}
-	    }
-	  else if (CPU_IS_HP_MC68K (cpu))
-	    puts ("m68k-hitachi-hiuxwe2");
-	  else puts ("unknown-hitachi-hiuxwe2");
-	  exit (0);
-	}
-EOF
-	$CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
-		{ echo "$SYSTEM_NAME"; exit; }
-	GUESS=unknown-hitachi-hiuxwe2
-	;;
-    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
-	GUESS=hppa1.1-hp-bsd
-	;;
-    9000/8??:4.3bsd:*:*)
-	GUESS=hppa1.0-hp-bsd
-	;;
-    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
-	GUESS=hppa1.0-hp-mpeix
-	;;
-    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
-	GUESS=hppa1.1-hp-osf
-	;;
-    hp8??:OSF1:*:*)
-	GUESS=hppa1.0-hp-osf
-	;;
-    i*86:OSF1:*:*)
-	if test -x /usr/sbin/sysversion ; then
-	    GUESS=$UNAME_MACHINE-unknown-osf1mk
-	else
-	    GUESS=$UNAME_MACHINE-unknown-osf1
-	fi
-	;;
-    parisc*:Lites*:*:*)
-	GUESS=hppa1.1-hp-lites
-	;;
-    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
-	GUESS=c1-convex-bsd
-	;;
-    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-	exit ;;
-    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
-	GUESS=c34-convex-bsd
-	;;
-    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
-	GUESS=c38-convex-bsd
-	;;
-    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
-	GUESS=c4-convex-bsd
-	;;
-    CRAY*Y-MP:*:*:*)
-	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
-	GUESS=ymp-cray-unicos$CRAY_REL
-	;;
-    CRAY*[A-Z]90:*:*:*)
-	echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
-	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-	      -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*TS:*:*:*)
-	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
-	GUESS=t90-cray-unicos$CRAY_REL
-	;;
-    CRAY*T3E:*:*:*)
-	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
-	GUESS=alphaev5-cray-unicosmk$CRAY_REL
-	;;
-    CRAY*SV1:*:*:*)
-	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
-	GUESS=sv1-cray-unicos$CRAY_REL
-	;;
-    *:UNICOS/mp:*:*)
-	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
-	GUESS=craynv-cray-unicosmp$CRAY_REL
-	;;
-    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
-	FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
-	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
-	FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
-	GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
-	;;
-    5000:UNIX_System_V:4.*:*)
-	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
-	FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
-	GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
-	;;
-    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
-	GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE
-	;;
-    sparc*:BSD/OS:*:*)
-	GUESS=sparc-unknown-bsdi$UNAME_RELEASE
-	;;
-    *:BSD/OS:*:*)
-	GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE
-	;;
-    arm:FreeBSD:*:*)
-	UNAME_PROCESSOR=`uname -p`
-	set_cc_for_build
-	if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
-	    | grep -q __ARM_PCS_VFP
-	then
-	    FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
-	    GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi
-	else
-	    FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
-	    GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf
-	fi
-	;;
-    *:FreeBSD:*:*)
-	UNAME_PROCESSOR=`uname -p`
-	case $UNAME_PROCESSOR in
-	    amd64)
-		UNAME_PROCESSOR=x86_64 ;;
-	    i386)
-		UNAME_PROCESSOR=i586 ;;
-	esac
-	FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
-	GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL
-	;;
-    i*:CYGWIN*:*)
-	GUESS=$UNAME_MACHINE-pc-cygwin
-	;;
-    *:MINGW64*:*)
-	GUESS=$UNAME_MACHINE-pc-mingw64
-	;;
-    *:MINGW*:*)
-	GUESS=$UNAME_MACHINE-pc-mingw32
-	;;
-    *:MSYS*:*)
-	GUESS=$UNAME_MACHINE-pc-msys
-	;;
-    i*:PW*:*)
-	GUESS=$UNAME_MACHINE-pc-pw32
-	;;
-    *:SerenityOS:*:*)
-        GUESS=$UNAME_MACHINE-pc-serenity
-        ;;
-    *:Interix*:*)
-	case $UNAME_MACHINE in
-	    x86)
-		GUESS=i586-pc-interix$UNAME_RELEASE
-		;;
-	    authenticamd | genuineintel | EM64T)
-		GUESS=x86_64-unknown-interix$UNAME_RELEASE
-		;;
-	    IA64)
-		GUESS=ia64-unknown-interix$UNAME_RELEASE
-		;;
-	esac ;;
-    i*:UWIN*:*)
-	GUESS=$UNAME_MACHINE-pc-uwin
-	;;
-    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
-	GUESS=x86_64-pc-cygwin
-	;;
-    prep*:SunOS:5.*:*)
-	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
-	GUESS=powerpcle-unknown-solaris2$SUN_REL
-	;;
-    *:GNU:*:*)
-	# the GNU system
-	GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'`
-	GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'`
-	GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL
-	;;
-    *:GNU/*:*:*)
-	# other systems with GNU libc and userland
-	GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"`
-	GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
-	GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
-	;;
-    x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*)
-	GUESS="$UNAME_MACHINE-pc-managarm-mlibc"
-	;;
-    *:[Mm]anagarm:*:*)
-	GUESS="$UNAME_MACHINE-unknown-managarm-mlibc"
-	;;
-    *:Minix:*:*)
-	GUESS=$UNAME_MACHINE-unknown-minix
-	;;
-    aarch64:Linux:*:*)
-	set_cc_for_build
-	CPU=$UNAME_MACHINE
-	LIBCABI=$LIBC
-	if test "$CC_FOR_BUILD" != no_compiler_found; then
-	    ABI=64
-	    sed 's/^	    //' << EOF > "$dummy.c"
-	    #ifdef __ARM_EABI__
-	    #ifdef __ARM_PCS_VFP
-	    ABI=eabihf
-	    #else
-	    ABI=eabi
-	    #endif
-	    #endif
-EOF
-	    cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
-	    eval "$cc_set_abi"
-	    case $ABI in
-		eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;;
-	    esac
-	fi
-	GUESS=$CPU-unknown-linux-$LIBCABI
-	;;
-    aarch64_be:Linux:*:*)
-	UNAME_MACHINE=aarch64_be
-	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
-	;;
-    alpha:Linux:*:*)
-	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
-	  EV5)   UNAME_MACHINE=alphaev5 ;;
-	  EV56)  UNAME_MACHINE=alphaev56 ;;
-	  PCA56) UNAME_MACHINE=alphapca56 ;;
-	  PCA57) UNAME_MACHINE=alphapca56 ;;
-	  EV6)   UNAME_MACHINE=alphaev6 ;;
-	  EV67)  UNAME_MACHINE=alphaev67 ;;
-	  EV68*) UNAME_MACHINE=alphaev68 ;;
-	esac
-	objdump --private-headers /bin/sh | grep -q ld.so.1
-	if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
-	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
-	;;
-    arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*)
-	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
-	;;
-    arm*:Linux:*:*)
-	set_cc_for_build
-	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
-	    | grep -q __ARM_EABI__
-	then
-	    GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
-	else
-	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
-		| grep -q __ARM_PCS_VFP
-	    then
-		GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi
-	    else
-		GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf
-	    fi
-	fi
-	;;
-    avr32*:Linux:*:*)
-	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
-	;;
-    cris:Linux:*:*)
-	GUESS=$UNAME_MACHINE-axis-linux-$LIBC
-	;;
-    crisv32:Linux:*:*)
-	GUESS=$UNAME_MACHINE-axis-linux-$LIBC
-	;;
-    e2k:Linux:*:*)
-	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
-	;;
-    frv:Linux:*:*)
-	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
-	;;
-    hexagon:Linux:*:*)
-	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
-	;;
-    i*86:Linux:*:*)
-	GUESS=$UNAME_MACHINE-pc-linux-$LIBC
-	;;
-    ia64:Linux:*:*)
-	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
-	;;
-    k1om:Linux:*:*)
-	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
-	;;
-    kvx:Linux:*:*)
-	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
-	;;
-    kvx:cos:*:*)
-	GUESS=$UNAME_MACHINE-unknown-cos
-	;;
-    kvx:mbr:*:*)
-	GUESS=$UNAME_MACHINE-unknown-mbr
-	;;
-    loongarch32:Linux:*:* | loongarch64:Linux:*:*)
-	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
-	;;
-    m32r*:Linux:*:*)
-	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
-	;;
-    m68*:Linux:*:*)
-	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
-	;;
-    mips:Linux:*:* | mips64:Linux:*:*)
-	set_cc_for_build
-	IS_GLIBC=0
-	test x"${LIBC}" = xgnu && IS_GLIBC=1
-	sed 's/^	//' << EOF > "$dummy.c"
-	#undef CPU
-	#undef mips
-	#undef mipsel
-	#undef mips64
-	#undef mips64el
-	#if ${IS_GLIBC} && defined(_ABI64)
-	LIBCABI=gnuabi64
-	#else
-	#if ${IS_GLIBC} && defined(_ABIN32)
-	LIBCABI=gnuabin32
-	#else
-	LIBCABI=${LIBC}
-	#endif
-	#endif
-
-	#if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
-	CPU=mipsisa64r6
-	#else
-	#if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
-	CPU=mipsisa32r6
-	#else
-	#if defined(__mips64)
-	CPU=mips64
-	#else
-	CPU=mips
-	#endif
-	#endif
-	#endif
-
-	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-	MIPS_ENDIAN=el
-	#else
-	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-	MIPS_ENDIAN=
-	#else
-	MIPS_ENDIAN=
-	#endif
-	#endif
-EOF
-	cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`
-	eval "$cc_set_vars"
-	test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
-	;;
-    mips64el:Linux:*:*)
-	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
-	;;
-    openrisc*:Linux:*:*)
-	GUESS=or1k-unknown-linux-$LIBC
-	;;
-    or32:Linux:*:* | or1k*:Linux:*:*)
-	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
-	;;
-    padre:Linux:*:*)
-	GUESS=sparc-unknown-linux-$LIBC
-	;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-	GUESS=hppa64-unknown-linux-$LIBC
-	;;
-    parisc:Linux:*:* | hppa:Linux:*:*)
-	# Look for CPU level
-	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-	  PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;;
-	  PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;;
-	  *)    GUESS=hppa-unknown-linux-$LIBC ;;
-	esac
-	;;
-    ppc64:Linux:*:*)
-	GUESS=powerpc64-unknown-linux-$LIBC
-	;;
-    ppc:Linux:*:*)
-	GUESS=powerpc-unknown-linux-$LIBC
-	;;
-    ppc64le:Linux:*:*)
-	GUESS=powerpc64le-unknown-linux-$LIBC
-	;;
-    ppcle:Linux:*:*)
-	GUESS=powerpcle-unknown-linux-$LIBC
-	;;
-    riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
-	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
-	;;
-    s390:Linux:*:* | s390x:Linux:*:*)
-	GUESS=$UNAME_MACHINE-ibm-linux-$LIBC
-	;;
-    sh64*:Linux:*:*)
-	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
-	;;
-    sh*:Linux:*:*)
-	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
-	;;
-    sparc:Linux:*:* | sparc64:Linux:*:*)
-	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
-	;;
-    tile*:Linux:*:*)
-	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
-	;;
-    vax:Linux:*:*)
-	GUESS=$UNAME_MACHINE-dec-linux-$LIBC
-	;;
-    x86_64:Linux:*:*)
-	set_cc_for_build
-	CPU=$UNAME_MACHINE
-	LIBCABI=$LIBC
-	if test "$CC_FOR_BUILD" != no_compiler_found; then
-	    ABI=64
-	    sed 's/^	    //' << EOF > "$dummy.c"
-	    #ifdef __i386__
-	    ABI=x86
-	    #else
-	    #ifdef __ILP32__
-	    ABI=x32
-	    #endif
-	    #endif
-EOF
-	    cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
-	    eval "$cc_set_abi"
-	    case $ABI in
-		x86) CPU=i686 ;;
-		x32) LIBCABI=${LIBC}x32 ;;
-	    esac
-	fi
-	GUESS=$CPU-pc-linux-$LIBCABI
-	;;
-    xtensa*:Linux:*:*)
-	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
-	;;
-    i*86:DYNIX/ptx:4*:*)
-	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
-	# earlier versions are messed up and put the nodename in both
-	# sysname and nodename.
-	GUESS=i386-sequent-sysv4
-	;;
-    i*86:UNIX_SV:4.2MP:2.*)
-	# Unixware is an offshoot of SVR4, but it has its own version
-	# number series starting with 2...
-	# I am not positive that other SVR4 systems won't match this,
-	# I just have to hope.  -- rms.
-	# Use sysv4.2uw... so that sysv4* matches it.
-	GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
-	;;
-    i*86:OS/2:*:*)
-	# If we were able to find 'uname', then EMX Unix compatibility
-	# is probably installed.
-	GUESS=$UNAME_MACHINE-pc-os2-emx
-	;;
-    i*86:XTS-300:*:STOP)
-	GUESS=$UNAME_MACHINE-unknown-stop
-	;;
-    i*86:atheos:*:*)
-	GUESS=$UNAME_MACHINE-unknown-atheos
-	;;
-    i*86:syllable:*:*)
-	GUESS=$UNAME_MACHINE-pc-syllable
-	;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
-	GUESS=i386-unknown-lynxos$UNAME_RELEASE
-	;;
-    i*86:*DOS:*:*)
-	GUESS=$UNAME_MACHINE-pc-msdosdjgpp
-	;;
-    i*86:*:4.*:*)
-	UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
-	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-		GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL
-	else
-		GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL
-	fi
-	;;
-    i*86:*:5:[678]*)
-	# UnixWare 7.x, OpenUNIX and OpenServer 6.
-	case `/bin/uname -X | grep "^Machine"` in
-	    *486*)	     UNAME_MACHINE=i486 ;;
-	    *Pentium)	     UNAME_MACHINE=i586 ;;
-	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
-	esac
-	GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
-	;;
-    i*86:*:3.2:*)
-	if test -f /usr/options/cb.name; then
-		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-		GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL
-	elif /bin/uname -X 2>/dev/null >/dev/null ; then
-		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
-		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
-		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
-			&& UNAME_MACHINE=i586
-		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
-			&& UNAME_MACHINE=i686
-		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
-			&& UNAME_MACHINE=i686
-		GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL
-	else
-		GUESS=$UNAME_MACHINE-pc-sysv32
-	fi
-	;;
-    pc:*:*:*)
-	# Left here for compatibility:
-	# uname -m prints for DJGPP always 'pc', but it prints nothing about
-	# the processor, so we play safe by assuming i586.
-	# Note: whatever this is, it MUST be the same as what config.sub
-	# prints for the "djgpp" host, or else GDB configure will decide that
-	# this is a cross-build.
-	GUESS=i586-pc-msdosdjgpp
-	;;
-    Intel:Mach:3*:*)
-	GUESS=i386-pc-mach3
-	;;
-    paragon:*:*:*)
-	GUESS=i860-intel-osf1
-	;;
-    i860:*:4.*:*) # i860-SVR4
-	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
-	  GUESS=i860-stardent-sysv$UNAME_RELEASE    # Stardent Vistra i860-SVR4
-	else # Add other i860-SVR4 vendors below as they are discovered.
-	  GUESS=i860-unknown-sysv$UNAME_RELEASE     # Unknown i860-SVR4
-	fi
-	;;
-    mini*:CTIX:SYS*5:*)
-	# "miniframe"
-	GUESS=m68010-convergent-sysv
-	;;
-    mc68k:UNIX:SYSTEM5:3.51m)
-	GUESS=m68k-convergent-sysv
-	;;
-    M680?0:D-NIX:5.3:*)
-	GUESS=m68k-diab-dnix
-	;;
-    M68*:*:R3V[5678]*:*)
-	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
-    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
-	OS_REL=''
-	test -r /etc/.relid \
-	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-	  && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
-	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-	  && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
-    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-	  && { echo i486-ncr-sysv4; exit; } ;;
-    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
-	OS_REL='.3'
-	test -r /etc/.relid \
-	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-	    && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
-	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
-	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
-	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
-    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
-	GUESS=m68k-unknown-lynxos$UNAME_RELEASE
-	;;
-    mc68030:UNIX_System_V:4.*:*)
-	GUESS=m68k-atari-sysv4
-	;;
-    TSUNAMI:LynxOS:2.*:*)
-	GUESS=sparc-unknown-lynxos$UNAME_RELEASE
-	;;
-    rs6000:LynxOS:2.*:*)
-	GUESS=rs6000-unknown-lynxos$UNAME_RELEASE
-	;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
-	GUESS=powerpc-unknown-lynxos$UNAME_RELEASE
-	;;
-    SM[BE]S:UNIX_SV:*:*)
-	GUESS=mips-dde-sysv$UNAME_RELEASE
-	;;
-    RM*:ReliantUNIX-*:*:*)
-	GUESS=mips-sni-sysv4
-	;;
-    RM*:SINIX-*:*:*)
-	GUESS=mips-sni-sysv4
-	;;
-    *:SINIX-*:*:*)
-	if uname -p 2>/dev/null >/dev/null ; then
-		UNAME_MACHINE=`(uname -p) 2>/dev/null`
-		GUESS=$UNAME_MACHINE-sni-sysv4
-	else
-		GUESS=ns32k-sni-sysv
-	fi
-	;;
-    PENTIUM:*:4.0*:*)	# Unisys 'ClearPath HMP IX 4000' SVR4/MP effort
-			# says <Richard.M.Bartel@ccMail.Census.GOV>
-	GUESS=i586-unisys-sysv4
-	;;
-    *:UNIX_System_V:4*:FTX*)
-	# From Gerald Hewes <hewes@openmarket.com>.
-	# How about differentiating between stratus architectures? -djm
-	GUESS=hppa1.1-stratus-sysv4
-	;;
-    *:*:*:FTX*)
-	# From seanf@swdc.stratus.com.
-	GUESS=i860-stratus-sysv4
-	;;
-    i*86:VOS:*:*)
-	# From Paul.Green@stratus.com.
-	GUESS=$UNAME_MACHINE-stratus-vos
-	;;
-    *:VOS:*:*)
-	# From Paul.Green@stratus.com.
-	GUESS=hppa1.1-stratus-vos
-	;;
-    mc68*:A/UX:*:*)
-	GUESS=m68k-apple-aux$UNAME_RELEASE
-	;;
-    news*:NEWS-OS:6*:*)
-	GUESS=mips-sony-newsos6
-	;;
-    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
-	if test -d /usr/nec; then
-		GUESS=mips-nec-sysv$UNAME_RELEASE
-	else
-		GUESS=mips-unknown-sysv$UNAME_RELEASE
-	fi
-	;;
-    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
-	GUESS=powerpc-be-beos
-	;;
-    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
-	GUESS=powerpc-apple-beos
-	;;
-    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
-	GUESS=i586-pc-beos
-	;;
-    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
-	GUESS=i586-pc-haiku
-	;;
-    ppc:Haiku:*:*)	# Haiku running on Apple PowerPC
-	GUESS=powerpc-apple-haiku
-	;;
-    *:Haiku:*:*)	# Haiku modern gcc (not bound by BeOS compat)
-	GUESS=$UNAME_MACHINE-unknown-haiku
-	;;
-    SX-4:SUPER-UX:*:*)
-	GUESS=sx4-nec-superux$UNAME_RELEASE
-	;;
-    SX-5:SUPER-UX:*:*)
-	GUESS=sx5-nec-superux$UNAME_RELEASE
-	;;
-    SX-6:SUPER-UX:*:*)
-	GUESS=sx6-nec-superux$UNAME_RELEASE
-	;;
-    SX-7:SUPER-UX:*:*)
-	GUESS=sx7-nec-superux$UNAME_RELEASE
-	;;
-    SX-8:SUPER-UX:*:*)
-	GUESS=sx8-nec-superux$UNAME_RELEASE
-	;;
-    SX-8R:SUPER-UX:*:*)
-	GUESS=sx8r-nec-superux$UNAME_RELEASE
-	;;
-    SX-ACE:SUPER-UX:*:*)
-	GUESS=sxace-nec-superux$UNAME_RELEASE
-	;;
-    Power*:Rhapsody:*:*)
-	GUESS=powerpc-apple-rhapsody$UNAME_RELEASE
-	;;
-    *:Rhapsody:*:*)
-	GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE
-	;;
-    arm64:Darwin:*:*)
-	GUESS=aarch64-apple-darwin$UNAME_RELEASE
-	;;
-    *:Darwin:*:*)
-	UNAME_PROCESSOR=`uname -p`
-	case $UNAME_PROCESSOR in
-	    unknown) UNAME_PROCESSOR=powerpc ;;
-	esac
-	if command -v xcode-select > /dev/null 2> /dev/null && \
-		! xcode-select --print-path > /dev/null 2> /dev/null ; then
-	    # Avoid executing cc if there is no toolchain installed as
-	    # cc will be a stub that puts up a graphical alert
-	    # prompting the user to install developer tools.
-	    CC_FOR_BUILD=no_compiler_found
-	else
-	    set_cc_for_build
-	fi
-	if test "$CC_FOR_BUILD" != no_compiler_found; then
-	    if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
-		   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
-		   grep IS_64BIT_ARCH >/dev/null
-	    then
-		case $UNAME_PROCESSOR in
-		    i386) UNAME_PROCESSOR=x86_64 ;;
-		    powerpc) UNAME_PROCESSOR=powerpc64 ;;
-		esac
-	    fi
-	    # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
-	    if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
-		   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
-		   grep IS_PPC >/dev/null
-	    then
-		UNAME_PROCESSOR=powerpc
-	    fi
-	elif test "$UNAME_PROCESSOR" = i386 ; then
-	    # uname -m returns i386 or x86_64
-	    UNAME_PROCESSOR=$UNAME_MACHINE
-	fi
-	GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE
-	;;
-    *:procnto*:*:* | *:QNX:[0123456789]*:*)
-	UNAME_PROCESSOR=`uname -p`
-	if test "$UNAME_PROCESSOR" = x86; then
-		UNAME_PROCESSOR=i386
-		UNAME_MACHINE=pc
-	fi
-	GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE
-	;;
-    *:QNX:*:4*)
-	GUESS=i386-pc-qnx
-	;;
-    NEO-*:NONSTOP_KERNEL:*:*)
-	GUESS=neo-tandem-nsk$UNAME_RELEASE
-	;;
-    NSE-*:NONSTOP_KERNEL:*:*)
-	GUESS=nse-tandem-nsk$UNAME_RELEASE
-	;;
-    NSR-*:NONSTOP_KERNEL:*:*)
-	GUESS=nsr-tandem-nsk$UNAME_RELEASE
-	;;
-    NSV-*:NONSTOP_KERNEL:*:*)
-	GUESS=nsv-tandem-nsk$UNAME_RELEASE
-	;;
-    NSX-*:NONSTOP_KERNEL:*:*)
-	GUESS=nsx-tandem-nsk$UNAME_RELEASE
-	;;
-    *:NonStop-UX:*:*)
-	GUESS=mips-compaq-nonstopux
-	;;
-    BS2000:POSIX*:*:*)
-	GUESS=bs2000-siemens-sysv
-	;;
-    DS/*:UNIX_System_V:*:*)
-	GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE
-	;;
-    *:Plan9:*:*)
-	# "uname -m" is not consistent, so use $cputype instead. 386
-	# is converted to i386 for consistency with other x86
-	# operating systems.
-	if test "${cputype-}" = 386; then
-	    UNAME_MACHINE=i386
-	elif test "x${cputype-}" != x; then
-	    UNAME_MACHINE=$cputype
-	fi
-	GUESS=$UNAME_MACHINE-unknown-plan9
-	;;
-    *:TOPS-10:*:*)
-	GUESS=pdp10-unknown-tops10
-	;;
-    *:TENEX:*:*)
-	GUESS=pdp10-unknown-tenex
-	;;
-    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
-	GUESS=pdp10-dec-tops20
-	;;
-    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
-	GUESS=pdp10-xkl-tops20
-	;;
-    *:TOPS-20:*:*)
-	GUESS=pdp10-unknown-tops20
-	;;
-    *:ITS:*:*)
-	GUESS=pdp10-unknown-its
-	;;
-    SEI:*:*:SEIUX)
-	GUESS=mips-sei-seiux$UNAME_RELEASE
-	;;
-    *:DragonFly:*:*)
-	DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
-	GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL
-	;;
-    *:*VMS:*:*)
-	UNAME_MACHINE=`(uname -p) 2>/dev/null`
-	case $UNAME_MACHINE in
-	    A*) GUESS=alpha-dec-vms ;;
-	    I*) GUESS=ia64-dec-vms ;;
-	    V*) GUESS=vax-dec-vms ;;
-	esac ;;
-    *:XENIX:*:SysV)
-	GUESS=i386-pc-xenix
-	;;
-    i*86:skyos:*:*)
-	SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`
-	GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL
-	;;
-    i*86:rdos:*:*)
-	GUESS=$UNAME_MACHINE-pc-rdos
-	;;
-    i*86:Fiwix:*:*)
-	GUESS=$UNAME_MACHINE-pc-fiwix
-	;;
-    *:AROS:*:*)
-	GUESS=$UNAME_MACHINE-unknown-aros
-	;;
-    x86_64:VMkernel:*:*)
-	GUESS=$UNAME_MACHINE-unknown-esx
-	;;
-    amd64:Isilon\ OneFS:*:*)
-	GUESS=x86_64-unknown-onefs
-	;;
-    *:Unleashed:*:*)
-	GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
-	;;
-esac
-
-# Do we have a guess based on uname results?
-if test "x$GUESS" != x; then
-    echo "$GUESS"
-    exit
-fi
-
-# No uname command or uname output not recognized.
-set_cc_for_build
-cat > "$dummy.c" <<EOF
-#ifdef _SEQUENT_
-#include <sys/types.h>
-#include <sys/utsname.h>
-#endif
-#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
-#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
-#include <signal.h>
-#if defined(_SIZE_T_) || defined(SIGLOST)
-#include <sys/utsname.h>
-#endif
-#endif
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
-     I don't know....  */
-  printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
-  printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
-  "4"
-#else
-  ""
-#endif
-  ); exit (0);
-#endif
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
-  int version;
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  if (version < 4)
-    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
-  else
-    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
-  exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
-  printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
-  printf ("ns32k-encore-mach\n"); exit (0);
-#else
-  printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
-  printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
-  printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
-  printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
-  struct utsname un;
-
-  uname(&un);
-  if (strncmp(un.version, "V2", 2) == 0) {
-    printf ("i386-sequent-ptx2\n"); exit (0);
-  }
-  if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
-    printf ("i386-sequent-ptx1\n"); exit (0);
-  }
-  printf ("i386-sequent-ptx\n"); exit (0);
-#endif
-
-#if defined (vax)
-#if !defined (ultrix)
-#include <sys/param.h>
-#if defined (BSD)
-#if BSD == 43
-  printf ("vax-dec-bsd4.3\n"); exit (0);
-#else
-#if BSD == 199006
-  printf ("vax-dec-bsd4.3reno\n"); exit (0);
-#else
-  printf ("vax-dec-bsd\n"); exit (0);
-#endif
-#endif
-#else
-  printf ("vax-dec-bsd\n"); exit (0);
-#endif
-#else
-#if defined(_SIZE_T_) || defined(SIGLOST)
-  struct utsname un;
-  uname (&un);
-  printf ("vax-dec-ultrix%s\n", un.release); exit (0);
-#else
-  printf ("vax-dec-ultrix\n"); exit (0);
-#endif
-#endif
-#endif
-#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
-#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
-#if defined(_SIZE_T_) || defined(SIGLOST)
-  struct utsname *un;
-  uname (&un);
-  printf ("mips-dec-ultrix%s\n", un.release); exit (0);
-#else
-  printf ("mips-dec-ultrix\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (alliant) && defined (i860)
-  printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
-  exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` &&
-	{ echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
-
-echo "$0: unable to guess system type" >&2
-
-case $UNAME_MACHINE:$UNAME_SYSTEM in
-    mips:Linux | mips64:Linux)
-	# If we got here on MIPS GNU/Linux, output extra information.
-	cat >&2 <<EOF
-
-NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
-the system type. Please install a C compiler and try again.
-EOF
-	;;
-esac
-
-cat >&2 <<EOF
-
-This script (version $timestamp), has failed to recognize the
-operating system you are using. If your script is old, overwrite *all*
-copies of config.guess and config.sub with the latest versions from:
-
-  https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
-and
-  https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
-EOF
-
-our_year=`echo $timestamp | sed 's,-.*,,'`
-thisyear=`date +%Y`
-# shellcheck disable=SC2003
-script_age=`expr "$thisyear" - "$our_year"`
-if test "$script_age" -lt 3 ; then
-   cat >&2 <<EOF
-
-If $0 has already been updated, send the following data and any
-information you think might be pertinent to config-patches@gnu.org to
-provide the necessary information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo               = `(hostinfo) 2>/dev/null`
-/bin/universe          = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch              = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = "$UNAME_MACHINE"
-UNAME_RELEASE = "$UNAME_RELEASE"
-UNAME_SYSTEM  = "$UNAME_SYSTEM"
-UNAME_VERSION = "$UNAME_VERSION"
-EOF
-fi
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'before-save-hook 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/config.sub b/config.sub
deleted file mode 100755
index defe52c0..00000000
--- a/config.sub
+++ /dev/null
@@ -1,1960 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-#   Copyright 1992-2023 Free Software Foundation, Inc.
-
-# shellcheck disable=SC2006,SC2268 # see below for rationale
-
-timestamp='2023-09-19'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <https://www.gnu.org/licenses/>.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that
-# program.  This Exception is an additional permission under section 7
-# of the GNU General Public License, version 3 ("GPLv3").
-
-
-# Please send patches to <config-patches@gnu.org>.
-#
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# You can get the latest version of this script from:
-# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support.  The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-# The "shellcheck disable" line above the timestamp inhibits complaints
-# about features and limitations of the classic Bourne shell that were
-# superseded or lifted in POSIX.  However, this script identifies a wide
-# variety of pre-POSIX systems that do not have POSIX shells at all, and
-# even some reasonably current systems (Solaris 10 as case-in-point) still
-# have a pre-POSIX /bin/sh.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
-
-Canonicalize a configuration name.
-
-Options:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright 1992-2023 Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try '$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )	# Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help" >&2
-       exit 1 ;;
-
-    *local*)
-       # First pass through any local machine types.
-       echo "$1"
-       exit ;;
-
-    * )
-       break ;;
-  esac
-done
-
-case $# in
- 0) echo "$me: missing argument$help" >&2
-    exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
-    exit 1;;
-esac
-
-# Split fields of configuration type
-# shellcheck disable=SC2162
-saved_IFS=$IFS
-IFS="-" read field1 field2 field3 field4 <<EOF
-$1
-EOF
-IFS=$saved_IFS
-
-# Separate into logical components for further validation
-case $1 in
-	*-*-*-*-*)
-		echo "Invalid configuration '$1': more than four components" >&2
-		exit 1
-		;;
-	*-*-*-*)
-		basic_machine=$field1-$field2
-		basic_os=$field3-$field4
-		;;
-	*-*-*)
-		# Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
-		# parts
-		maybe_os=$field2-$field3
-		case $maybe_os in
-			nto-qnx* | linux-* | uclinux-uclibc* \
-			| uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
-			| netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
-			| storm-chaos* | os2-emx* | rtmk-nova* | managarm-* \
-			| windows-* )
-				basic_machine=$field1
-				basic_os=$maybe_os
-				;;
-			android-linux)
-				basic_machine=$field1-unknown
-				basic_os=linux-android
-				;;
-			*)
-				basic_machine=$field1-$field2
-				basic_os=$field3
-				;;
-		esac
-		;;
-	*-*)
-		# A lone config we happen to match not fitting any pattern
-		case $field1-$field2 in
-			decstation-3100)
-				basic_machine=mips-dec
-				basic_os=
-				;;
-			*-*)
-				# Second component is usually, but not always the OS
-				case $field2 in
-					# Prevent following clause from handling this valid os
-					sun*os*)
-						basic_machine=$field1
-						basic_os=$field2
-						;;
-					zephyr*)
-						basic_machine=$field1-unknown
-						basic_os=$field2
-						;;
-					# Manufacturers
-					dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
-					| att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
-					| unicom* | ibm* | next | hp | isi* | apollo | altos* \
-					| convergent* | ncr* | news | 32* | 3600* | 3100* \
-					| hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
-					| ultra | tti* | harris | dolphin | highlevel | gould \
-					| cbm | ns | masscomp | apple | axis | knuth | cray \
-					| microblaze* | sim | cisco \
-					| oki | wec | wrs | winbond)
-						basic_machine=$field1-$field2
-						basic_os=
-						;;
-					*)
-						basic_machine=$field1
-						basic_os=$field2
-						;;
-				esac
-			;;
-		esac
-		;;
-	*)
-		# Convert single-component short-hands not valid as part of
-		# multi-component configurations.
-		case $field1 in
-			386bsd)
-				basic_machine=i386-pc
-				basic_os=bsd
-				;;
-			a29khif)
-				basic_machine=a29k-amd
-				basic_os=udi
-				;;
-			adobe68k)
-				basic_machine=m68010-adobe
-				basic_os=scout
-				;;
-			alliant)
-				basic_machine=fx80-alliant
-				basic_os=
-				;;
-			altos | altos3068)
-				basic_machine=m68k-altos
-				basic_os=
-				;;
-			am29k)
-				basic_machine=a29k-none
-				basic_os=bsd
-				;;
-			amdahl)
-				basic_machine=580-amdahl
-				basic_os=sysv
-				;;
-			amiga)
-				basic_machine=m68k-unknown
-				basic_os=
-				;;
-			amigaos | amigados)
-				basic_machine=m68k-unknown
-				basic_os=amigaos
-				;;
-			amigaunix | amix)
-				basic_machine=m68k-unknown
-				basic_os=sysv4
-				;;
-			apollo68)
-				basic_machine=m68k-apollo
-				basic_os=sysv
-				;;
-			apollo68bsd)
-				basic_machine=m68k-apollo
-				basic_os=bsd
-				;;
-			aros)
-				basic_machine=i386-pc
-				basic_os=aros
-				;;
-			aux)
-				basic_machine=m68k-apple
-				basic_os=aux
-				;;
-			balance)
-				basic_machine=ns32k-sequent
-				basic_os=dynix
-				;;
-			blackfin)
-				basic_machine=bfin-unknown
-				basic_os=linux
-				;;
-			cegcc)
-				basic_machine=arm-unknown
-				basic_os=cegcc
-				;;
-			convex-c1)
-				basic_machine=c1-convex
-				basic_os=bsd
-				;;
-			convex-c2)
-				basic_machine=c2-convex
-				basic_os=bsd
-				;;
-			convex-c32)
-				basic_machine=c32-convex
-				basic_os=bsd
-				;;
-			convex-c34)
-				basic_machine=c34-convex
-				basic_os=bsd
-				;;
-			convex-c38)
-				basic_machine=c38-convex
-				basic_os=bsd
-				;;
-			cray)
-				basic_machine=j90-cray
-				basic_os=unicos
-				;;
-			crds | unos)
-				basic_machine=m68k-crds
-				basic_os=
-				;;
-			da30)
-				basic_machine=m68k-da30
-				basic_os=
-				;;
-			decstation | pmax | pmin | dec3100 | decstatn)
-				basic_machine=mips-dec
-				basic_os=
-				;;
-			delta88)
-				basic_machine=m88k-motorola
-				basic_os=sysv3
-				;;
-			dicos)
-				basic_machine=i686-pc
-				basic_os=dicos
-				;;
-			djgpp)
-				basic_machine=i586-pc
-				basic_os=msdosdjgpp
-				;;
-			ebmon29k)
-				basic_machine=a29k-amd
-				basic_os=ebmon
-				;;
-			es1800 | OSE68k | ose68k | ose | OSE)
-				basic_machine=m68k-ericsson
-				basic_os=ose
-				;;
-			gmicro)
-				basic_machine=tron-gmicro
-				basic_os=sysv
-				;;
-			go32)
-				basic_machine=i386-pc
-				basic_os=go32
-				;;
-			h8300hms)
-				basic_machine=h8300-hitachi
-				basic_os=hms
-				;;
-			h8300xray)
-				basic_machine=h8300-hitachi
-				basic_os=xray
-				;;
-			h8500hms)
-				basic_machine=h8500-hitachi
-				basic_os=hms
-				;;
-			harris)
-				basic_machine=m88k-harris
-				basic_os=sysv3
-				;;
-			hp300 | hp300hpux)
-				basic_machine=m68k-hp
-				basic_os=hpux
-				;;
-			hp300bsd)
-				basic_machine=m68k-hp
-				basic_os=bsd
-				;;
-			hppaosf)
-				basic_machine=hppa1.1-hp
-				basic_os=osf
-				;;
-			hppro)
-				basic_machine=hppa1.1-hp
-				basic_os=proelf
-				;;
-			i386mach)
-				basic_machine=i386-mach
-				basic_os=mach
-				;;
-			isi68 | isi)
-				basic_machine=m68k-isi
-				basic_os=sysv
-				;;
-			m68knommu)
-				basic_machine=m68k-unknown
-				basic_os=linux
-				;;
-			magnum | m3230)
-				basic_machine=mips-mips
-				basic_os=sysv
-				;;
-			merlin)
-				basic_machine=ns32k-utek
-				basic_os=sysv
-				;;
-			mingw64)
-				basic_machine=x86_64-pc
-				basic_os=mingw64
-				;;
-			mingw32)
-				basic_machine=i686-pc
-				basic_os=mingw32
-				;;
-			mingw32ce)
-				basic_machine=arm-unknown
-				basic_os=mingw32ce
-				;;
-			monitor)
-				basic_machine=m68k-rom68k
-				basic_os=coff
-				;;
-			morphos)
-				basic_machine=powerpc-unknown
-				basic_os=morphos
-				;;
-			moxiebox)
-				basic_machine=moxie-unknown
-				basic_os=moxiebox
-				;;
-			msdos)
-				basic_machine=i386-pc
-				basic_os=msdos
-				;;
-			msys)
-				basic_machine=i686-pc
-				basic_os=msys
-				;;
-			mvs)
-				basic_machine=i370-ibm
-				basic_os=mvs
-				;;
-			nacl)
-				basic_machine=le32-unknown
-				basic_os=nacl
-				;;
-			ncr3000)
-				basic_machine=i486-ncr
-				basic_os=sysv4
-				;;
-			netbsd386)
-				basic_machine=i386-pc
-				basic_os=netbsd
-				;;
-			netwinder)
-				basic_machine=armv4l-rebel
-				basic_os=linux
-				;;
-			news | news700 | news800 | news900)
-				basic_machine=m68k-sony
-				basic_os=newsos
-				;;
-			news1000)
-				basic_machine=m68030-sony
-				basic_os=newsos
-				;;
-			necv70)
-				basic_machine=v70-nec
-				basic_os=sysv
-				;;
-			nh3000)
-				basic_machine=m68k-harris
-				basic_os=cxux
-				;;
-			nh[45]000)
-				basic_machine=m88k-harris
-				basic_os=cxux
-				;;
-			nindy960)
-				basic_machine=i960-intel
-				basic_os=nindy
-				;;
-			mon960)
-				basic_machine=i960-intel
-				basic_os=mon960
-				;;
-			nonstopux)
-				basic_machine=mips-compaq
-				basic_os=nonstopux
-				;;
-			os400)
-				basic_machine=powerpc-ibm
-				basic_os=os400
-				;;
-			OSE68000 | ose68000)
-				basic_machine=m68000-ericsson
-				basic_os=ose
-				;;
-			os68k)
-				basic_machine=m68k-none
-				basic_os=os68k
-				;;
-			paragon)
-				basic_machine=i860-intel
-				basic_os=osf
-				;;
-			parisc)
-				basic_machine=hppa-unknown
-				basic_os=linux
-				;;
-			psp)
-				basic_machine=mipsallegrexel-sony
-				basic_os=psp
-				;;
-			pw32)
-				basic_machine=i586-unknown
-				basic_os=pw32
-				;;
-			rdos | rdos64)
-				basic_machine=x86_64-pc
-				basic_os=rdos
-				;;
-			rdos32)
-				basic_machine=i386-pc
-				basic_os=rdos
-				;;
-			rom68k)
-				basic_machine=m68k-rom68k
-				basic_os=coff
-				;;
-			sa29200)
-				basic_machine=a29k-amd
-				basic_os=udi
-				;;
-			sei)
-				basic_machine=mips-sei
-				basic_os=seiux
-				;;
-			sequent)
-				basic_machine=i386-sequent
-				basic_os=
-				;;
-			sps7)
-				basic_machine=m68k-bull
-				basic_os=sysv2
-				;;
-			st2000)
-				basic_machine=m68k-tandem
-				basic_os=
-				;;
-			stratus)
-				basic_machine=i860-stratus
-				basic_os=sysv4
-				;;
-			sun2)
-				basic_machine=m68000-sun
-				basic_os=
-				;;
-			sun2os3)
-				basic_machine=m68000-sun
-				basic_os=sunos3
-				;;
-			sun2os4)
-				basic_machine=m68000-sun
-				basic_os=sunos4
-				;;
-			sun3)
-				basic_machine=m68k-sun
-				basic_os=
-				;;
-			sun3os3)
-				basic_machine=m68k-sun
-				basic_os=sunos3
-				;;
-			sun3os4)
-				basic_machine=m68k-sun
-				basic_os=sunos4
-				;;
-			sun4)
-				basic_machine=sparc-sun
-				basic_os=
-				;;
-			sun4os3)
-				basic_machine=sparc-sun
-				basic_os=sunos3
-				;;
-			sun4os4)
-				basic_machine=sparc-sun
-				basic_os=sunos4
-				;;
-			sun4sol2)
-				basic_machine=sparc-sun
-				basic_os=solaris2
-				;;
-			sun386 | sun386i | roadrunner)
-				basic_machine=i386-sun
-				basic_os=
-				;;
-			sv1)
-				basic_machine=sv1-cray
-				basic_os=unicos
-				;;
-			symmetry)
-				basic_machine=i386-sequent
-				basic_os=dynix
-				;;
-			t3e)
-				basic_machine=alphaev5-cray
-				basic_os=unicos
-				;;
-			t90)
-				basic_machine=t90-cray
-				basic_os=unicos
-				;;
-			toad1)
-				basic_machine=pdp10-xkl
-				basic_os=tops20
-				;;
-			tpf)
-				basic_machine=s390x-ibm
-				basic_os=tpf
-				;;
-			udi29k)
-				basic_machine=a29k-amd
-				basic_os=udi
-				;;
-			ultra3)
-				basic_machine=a29k-nyu
-				basic_os=sym1
-				;;
-			v810 | necv810)
-				basic_machine=v810-nec
-				basic_os=none
-				;;
-			vaxv)
-				basic_machine=vax-dec
-				basic_os=sysv
-				;;
-			vms)
-				basic_machine=vax-dec
-				basic_os=vms
-				;;
-			vsta)
-				basic_machine=i386-pc
-				basic_os=vsta
-				;;
-			vxworks960)
-				basic_machine=i960-wrs
-				basic_os=vxworks
-				;;
-			vxworks68)
-				basic_machine=m68k-wrs
-				basic_os=vxworks
-				;;
-			vxworks29k)
-				basic_machine=a29k-wrs
-				basic_os=vxworks
-				;;
-			xbox)
-				basic_machine=i686-pc
-				basic_os=mingw32
-				;;
-			ymp)
-				basic_machine=ymp-cray
-				basic_os=unicos
-				;;
-			*)
-				basic_machine=$1
-				basic_os=
-				;;
-		esac
-		;;
-esac
-
-# Decode 1-component or ad-hoc basic machines
-case $basic_machine in
-	# Here we handle the default manufacturer of certain CPU types.  It is in
-	# some cases the only manufacturer, in others, it is the most popular.
-	w89k)
-		cpu=hppa1.1
-		vendor=winbond
-		;;
-	op50n)
-		cpu=hppa1.1
-		vendor=oki
-		;;
-	op60c)
-		cpu=hppa1.1
-		vendor=oki
-		;;
-	ibm*)
-		cpu=i370
-		vendor=ibm
-		;;
-	orion105)
-		cpu=clipper
-		vendor=highlevel
-		;;
-	mac | mpw | mac-mpw)
-		cpu=m68k
-		vendor=apple
-		;;
-	pmac | pmac-mpw)
-		cpu=powerpc
-		vendor=apple
-		;;
-
-	# Recognize the various machine names and aliases which stand
-	# for a CPU type and a company and sometimes even an OS.
-	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
-		cpu=m68000
-		vendor=att
-		;;
-	3b*)
-		cpu=we32k
-		vendor=att
-		;;
-	bluegene*)
-		cpu=powerpc
-		vendor=ibm
-		basic_os=cnk
-		;;
-	decsystem10* | dec10*)
-		cpu=pdp10
-		vendor=dec
-		basic_os=tops10
-		;;
-	decsystem20* | dec20*)
-		cpu=pdp10
-		vendor=dec
-		basic_os=tops20
-		;;
-	delta | 3300 | motorola-3300 | motorola-delta \
-	      | 3300-motorola | delta-motorola)
-		cpu=m68k
-		vendor=motorola
-		;;
-	dpx2*)
-		cpu=m68k
-		vendor=bull
-		basic_os=sysv3
-		;;
-	encore | umax | mmax)
-		cpu=ns32k
-		vendor=encore
-		;;
-	elxsi)
-		cpu=elxsi
-		vendor=elxsi
-		basic_os=${basic_os:-bsd}
-		;;
-	fx2800)
-		cpu=i860
-		vendor=alliant
-		;;
-	genix)
-		cpu=ns32k
-		vendor=ns
-		;;
-	h3050r* | hiux*)
-		cpu=hppa1.1
-		vendor=hitachi
-		basic_os=hiuxwe2
-		;;
-	hp3k9[0-9][0-9] | hp9[0-9][0-9])
-		cpu=hppa1.0
-		vendor=hp
-		;;
-	hp9k2[0-9][0-9] | hp9k31[0-9])
-		cpu=m68000
-		vendor=hp
-		;;
-	hp9k3[2-9][0-9])
-		cpu=m68k
-		vendor=hp
-		;;
-	hp9k6[0-9][0-9] | hp6[0-9][0-9])
-		cpu=hppa1.0
-		vendor=hp
-		;;
-	hp9k7[0-79][0-9] | hp7[0-79][0-9])
-		cpu=hppa1.1
-		vendor=hp
-		;;
-	hp9k78[0-9] | hp78[0-9])
-		# FIXME: really hppa2.0-hp
-		cpu=hppa1.1
-		vendor=hp
-		;;
-	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
-		# FIXME: really hppa2.0-hp
-		cpu=hppa1.1
-		vendor=hp
-		;;
-	hp9k8[0-9][13679] | hp8[0-9][13679])
-		cpu=hppa1.1
-		vendor=hp
-		;;
-	hp9k8[0-9][0-9] | hp8[0-9][0-9])
-		cpu=hppa1.0
-		vendor=hp
-		;;
-	i*86v32)
-		cpu=`echo "$1" | sed -e 's/86.*/86/'`
-		vendor=pc
-		basic_os=sysv32
-		;;
-	i*86v4*)
-		cpu=`echo "$1" | sed -e 's/86.*/86/'`
-		vendor=pc
-		basic_os=sysv4
-		;;
-	i*86v)
-		cpu=`echo "$1" | sed -e 's/86.*/86/'`
-		vendor=pc
-		basic_os=sysv
-		;;
-	i*86sol2)
-		cpu=`echo "$1" | sed -e 's/86.*/86/'`
-		vendor=pc
-		basic_os=solaris2
-		;;
-	j90 | j90-cray)
-		cpu=j90
-		vendor=cray
-		basic_os=${basic_os:-unicos}
-		;;
-	iris | iris4d)
-		cpu=mips
-		vendor=sgi
-		case $basic_os in
-		    irix*)
-			;;
-		    *)
-			basic_os=irix4
-			;;
-		esac
-		;;
-	miniframe)
-		cpu=m68000
-		vendor=convergent
-		;;
-	*mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
-		cpu=m68k
-		vendor=atari
-		basic_os=mint
-		;;
-	news-3600 | risc-news)
-		cpu=mips
-		vendor=sony
-		basic_os=newsos
-		;;
-	next | m*-next)
-		cpu=m68k
-		vendor=next
-		case $basic_os in
-		    openstep*)
-		        ;;
-		    nextstep*)
-			;;
-		    ns2*)
-		      basic_os=nextstep2
-			;;
-		    *)
-		      basic_os=nextstep3
-			;;
-		esac
-		;;
-	np1)
-		cpu=np1
-		vendor=gould
-		;;
-	op50n-* | op60c-*)
-		cpu=hppa1.1
-		vendor=oki
-		basic_os=proelf
-		;;
-	pa-hitachi)
-		cpu=hppa1.1
-		vendor=hitachi
-		basic_os=hiuxwe2
-		;;
-	pbd)
-		cpu=sparc
-		vendor=tti
-		;;
-	pbb)
-		cpu=m68k
-		vendor=tti
-		;;
-	pc532)
-		cpu=ns32k
-		vendor=pc532
-		;;
-	pn)
-		cpu=pn
-		vendor=gould
-		;;
-	power)
-		cpu=power
-		vendor=ibm
-		;;
-	ps2)
-		cpu=i386
-		vendor=ibm
-		;;
-	rm[46]00)
-		cpu=mips
-		vendor=siemens
-		;;
-	rtpc | rtpc-*)
-		cpu=romp
-		vendor=ibm
-		;;
-	sde)
-		cpu=mipsisa32
-		vendor=sde
-		basic_os=${basic_os:-elf}
-		;;
-	simso-wrs)
-		cpu=sparclite
-		vendor=wrs
-		basic_os=vxworks
-		;;
-	tower | tower-32)
-		cpu=m68k
-		vendor=ncr
-		;;
-	vpp*|vx|vx-*)
-		cpu=f301
-		vendor=fujitsu
-		;;
-	w65)
-		cpu=w65
-		vendor=wdc
-		;;
-	w89k-*)
-		cpu=hppa1.1
-		vendor=winbond
-		basic_os=proelf
-		;;
-	none)
-		cpu=none
-		vendor=none
-		;;
-	leon|leon[3-9])
-		cpu=sparc
-		vendor=$basic_machine
-		;;
-	leon-*|leon[3-9]-*)
-		cpu=sparc
-		vendor=`echo "$basic_machine" | sed 's/-.*//'`
-		;;
-
-	*-*)
-		# shellcheck disable=SC2162
-		saved_IFS=$IFS
-		IFS="-" read cpu vendor <<EOF
-$basic_machine
-EOF
-		IFS=$saved_IFS
-		;;
-	# We use 'pc' rather than 'unknown'
-	# because (1) that's what they normally are, and
-	# (2) the word "unknown" tends to confuse beginning users.
-	i*86 | x86_64)
-		cpu=$basic_machine
-		vendor=pc
-		;;
-	# These rules are duplicated from below for sake of the special case above;
-	# i.e. things that normalized to x86 arches should also default to "pc"
-	pc98)
-		cpu=i386
-		vendor=pc
-		;;
-	x64 | amd64)
-		cpu=x86_64
-		vendor=pc
-		;;
-	# Recognize the basic CPU types without company name.
-	*)
-		cpu=$basic_machine
-		vendor=unknown
-		;;
-esac
-
-unset -v basic_machine
-
-# Decode basic machines in the full and proper CPU-Company form.
-case $cpu-$vendor in
-	# Here we handle the default manufacturer of certain CPU types in canonical form. It is in
-	# some cases the only manufacturer, in others, it is the most popular.
-	craynv-unknown)
-		vendor=cray
-		basic_os=${basic_os:-unicosmp}
-		;;
-	c90-unknown | c90-cray)
-		vendor=cray
-		basic_os=${Basic_os:-unicos}
-		;;
-	fx80-unknown)
-		vendor=alliant
-		;;
-	romp-unknown)
-		vendor=ibm
-		;;
-	mmix-unknown)
-		vendor=knuth
-		;;
-	microblaze-unknown | microblazeel-unknown)
-		vendor=xilinx
-		;;
-	rs6000-unknown)
-		vendor=ibm
-		;;
-	vax-unknown)
-		vendor=dec
-		;;
-	pdp11-unknown)
-		vendor=dec
-		;;
-	we32k-unknown)
-		vendor=att
-		;;
-	cydra-unknown)
-		vendor=cydrome
-		;;
-	i370-ibm*)
-		vendor=ibm
-		;;
-	orion-unknown)
-		vendor=highlevel
-		;;
-	xps-unknown | xps100-unknown)
-		cpu=xps100
-		vendor=honeywell
-		;;
-
-	# Here we normalize CPU types with a missing or matching vendor
-	armh-unknown | armh-alt)
-		cpu=armv7l
-		vendor=alt
-		basic_os=${basic_os:-linux-gnueabihf}
-		;;
-	dpx20-unknown | dpx20-bull)
-		cpu=rs6000
-		vendor=bull
-		basic_os=${basic_os:-bosx}
-		;;
-
-	# Here we normalize CPU types irrespective of the vendor
-	amd64-*)
-		cpu=x86_64
-		;;
-	blackfin-*)
-		cpu=bfin
-		basic_os=linux
-		;;
-	c54x-*)
-		cpu=tic54x
-		;;
-	c55x-*)
-		cpu=tic55x
-		;;
-	c6x-*)
-		cpu=tic6x
-		;;
-	e500v[12]-*)
-		cpu=powerpc
-		basic_os=${basic_os}"spe"
-		;;
-	mips3*-*)
-		cpu=mips64
-		;;
-	ms1-*)
-		cpu=mt
-		;;
-	m68knommu-*)
-		cpu=m68k
-		basic_os=linux
-		;;
-	m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
-		cpu=s12z
-		;;
-	openrisc-*)
-		cpu=or32
-		;;
-	parisc-*)
-		cpu=hppa
-		basic_os=linux
-		;;
-	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
-		cpu=i586
-		;;
-	pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*)
-		cpu=i686
-		;;
-	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
-		cpu=i686
-		;;
-	pentium4-*)
-		cpu=i786
-		;;
-	pc98-*)
-		cpu=i386
-		;;
-	ppc-* | ppcbe-*)
-		cpu=powerpc
-		;;
-	ppcle-* | powerpclittle-*)
-		cpu=powerpcle
-		;;
-	ppc64-*)
-		cpu=powerpc64
-		;;
-	ppc64le-* | powerpc64little-*)
-		cpu=powerpc64le
-		;;
-	sb1-*)
-		cpu=mipsisa64sb1
-		;;
-	sb1el-*)
-		cpu=mipsisa64sb1el
-		;;
-	sh5e[lb]-*)
-		cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
-		;;
-	spur-*)
-		cpu=spur
-		;;
-	strongarm-* | thumb-*)
-		cpu=arm
-		;;
-	tx39-*)
-		cpu=mipstx39
-		;;
-	tx39el-*)
-		cpu=mipstx39el
-		;;
-	x64-*)
-		cpu=x86_64
-		;;
-	xscale-* | xscalee[bl]-*)
-		cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
-		;;
-	arm64-* | aarch64le-*)
-		cpu=aarch64
-		;;
-
-	# Recognize the canonical CPU Types that limit and/or modify the
-	# company names they are paired with.
-	cr16-*)
-		basic_os=${basic_os:-elf}
-		;;
-	crisv32-* | etraxfs*-*)
-		cpu=crisv32
-		vendor=axis
-		;;
-	cris-* | etrax*-*)
-		cpu=cris
-		vendor=axis
-		;;
-	crx-*)
-		basic_os=${basic_os:-elf}
-		;;
-	neo-tandem)
-		cpu=neo
-		vendor=tandem
-		;;
-	nse-tandem)
-		cpu=nse
-		vendor=tandem
-		;;
-	nsr-tandem)
-		cpu=nsr
-		vendor=tandem
-		;;
-	nsv-tandem)
-		cpu=nsv
-		vendor=tandem
-		;;
-	nsx-tandem)
-		cpu=nsx
-		vendor=tandem
-		;;
-	mipsallegrexel-sony)
-		cpu=mipsallegrexel
-		vendor=sony
-		;;
-	tile*-*)
-		basic_os=${basic_os:-linux-gnu}
-		;;
-
-	*)
-		# Recognize the canonical CPU types that are allowed with any
-		# company name.
-		case $cpu in
-			1750a | 580 \
-			| a29k \
-			| aarch64 | aarch64_be | aarch64c | arm64ec \
-			| abacus \
-			| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
-			| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
-			| alphapca5[67] | alpha64pca5[67] \
-			| am33_2.0 \
-			| amdgcn \
-			| arc | arceb | arc32 | arc64 \
-			| arm | arm[lb]e | arme[lb] | armv* \
-			| avr | avr32 \
-			| asmjs \
-			| ba \
-			| be32 | be64 \
-			| bfin | bpf | bs2000 \
-			| c[123]* | c30 | [cjt]90 | c4x \
-			| c8051 | clipper | craynv | csky | cydra \
-			| d10v | d30v | dlx | dsp16xx \
-			| e2k | elxsi | epiphany \
-			| f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
-			| javascript \
-			| h8300 | h8500 \
-			| hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
-			| hexagon \
-			| i370 | i*86 | i860 | i960 | ia16 | ia64 \
-			| ip2k | iq2000 \
-			| k1om \
-			| kvx \
-			| le32 | le64 \
-			| lm32 \
-			| loongarch32 | loongarch64 \
-			| m32c | m32r | m32rle \
-			| m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
-			| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
-			| m88110 | m88k | maxq | mb | mcore | mep | metag \
-			| microblaze | microblazeel \
-			| mips* \
-			| mmix \
-			| mn10200 | mn10300 \
-			| moxie \
-			| mt \
-			| msp430 \
-			| nds32 | nds32le | nds32be \
-			| nfp \
-			| nios | nios2 | nios2eb | nios2el \
-			| none | np1 | ns16k | ns32k | nvptx \
-			| open8 \
-			| or1k* \
-			| or32 \
-			| orion \
-			| picochip \
-			| pdp10 | pdp11 | pj | pjl | pn | power \
-			| powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
-			| pru \
-			| pyramid \
-			| riscv | riscv32 | riscv32be | riscv64 | riscv64be \
-			| rl78 | romp | rs6000 | rx \
-			| s390 | s390x \
-			| score \
-			| sh | shl \
-			| sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
-			| sh[1234]e[lb] |  sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
-			| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
-			| sparclite \
-			| sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
-			| spu \
-			| tahoe \
-			| thumbv7* \
-			| tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
-			| tron \
-			| ubicom32 \
-			| v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
-			| vax \
-			| visium \
-			| w65 \
-			| wasm32 | wasm64 \
-			| we32k \
-			| x86 | x86_64 | xc16x | xgate | xps100 \
-			| xstormy16 | xtensa* \
-			| ymp \
-			| z8k | z80)
-				;;
-
-			*)
-				echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2
-				exit 1
-				;;
-		esac
-		;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $vendor in
-	digital*)
-		vendor=dec
-		;;
-	commodore*)
-		vendor=cbm
-		;;
-	*)
-		;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if test x"$basic_os" != x
-then
-
-# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
-# set os.
-obj=
-case $basic_os in
-	gnu/linux*)
-		kernel=linux
-		os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'`
-		;;
-	os2-emx)
-		kernel=os2
-		os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'`
-		;;
-	nto-qnx*)
-		kernel=nto
-		os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
-		;;
-	*-*)
-		# shellcheck disable=SC2162
-		saved_IFS=$IFS
-		IFS="-" read kernel os <<EOF
-$basic_os
-EOF
-		IFS=$saved_IFS
-		;;
-	# Default OS when just kernel was specified
-	nto*)
-		kernel=nto
-		os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
-		;;
-	linux*)
-		kernel=linux
-		os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
-		;;
-	managarm*)
-		kernel=managarm
-		os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'`
-		;;
-	*)
-		kernel=
-		os=$basic_os
-		;;
-esac
-
-# Now, normalize the OS (knowing we just have one component, it's not a kernel,
-# etc.)
-case $os in
-	# First match some system type aliases that might get confused
-	# with valid system types.
-	# solaris* is a basic system type, with this one exception.
-	auroraux)
-		os=auroraux
-		;;
-	bluegene*)
-		os=cnk
-		;;
-	solaris1 | solaris1.*)
-		os=`echo "$os" | sed -e 's|solaris1|sunos4|'`
-		;;
-	solaris)
-		os=solaris2
-		;;
-	unixware*)
-		os=sysv4.2uw
-		;;
-	# es1800 is here to avoid being matched by es* (a different OS)
-	es1800*)
-		os=ose
-		;;
-	# Some version numbers need modification
-	chorusos*)
-		os=chorusos
-		;;
-	isc)
-		os=isc2.2
-		;;
-	sco6)
-		os=sco5v6
-		;;
-	sco5)
-		os=sco3.2v5
-		;;
-	sco4)
-		os=sco3.2v4
-		;;
-	sco3.2.[4-9]*)
-		os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'`
-		;;
-	sco*v* | scout)
-		# Don't match below
-		;;
-	sco*)
-		os=sco3.2v2
-		;;
-	psos*)
-		os=psos
-		;;
-	qnx*)
-		os=qnx
-		;;
-	hiux*)
-		os=hiuxwe2
-		;;
-	lynx*178)
-		os=lynxos178
-		;;
-	lynx*5)
-		os=lynxos5
-		;;
-	lynxos*)
-		# don't get caught up in next wildcard
-		;;
-	lynx*)
-		os=lynxos
-		;;
-	mac[0-9]*)
-		os=`echo "$os" | sed -e 's|mac|macos|'`
-		;;
-	opened*)
-		os=openedition
-		;;
-	os400*)
-		os=os400
-		;;
-	sunos5*)
-		os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
-		;;
-	sunos6*)
-		os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
-		;;
-	wince*)
-		os=wince
-		;;
-	utek*)
-		os=bsd
-		;;
-	dynix*)
-		os=bsd
-		;;
-	acis*)
-		os=aos
-		;;
-	atheos*)
-		os=atheos
-		;;
-	syllable*)
-		os=syllable
-		;;
-	386bsd)
-		os=bsd
-		;;
-	ctix* | uts*)
-		os=sysv
-		;;
-	nova*)
-		os=rtmk-nova
-		;;
-	ns2)
-		os=nextstep2
-		;;
-	# Preserve the version number of sinix5.
-	sinix5.*)
-		os=`echo "$os" | sed -e 's|sinix|sysv|'`
-		;;
-	sinix*)
-		os=sysv4
-		;;
-	tpf*)
-		os=tpf
-		;;
-	triton*)
-		os=sysv3
-		;;
-	oss*)
-		os=sysv3
-		;;
-	svr4*)
-		os=sysv4
-		;;
-	svr3)
-		os=sysv3
-		;;
-	sysvr4)
-		os=sysv4
-		;;
-	ose*)
-		os=ose
-		;;
-	*mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
-		os=mint
-		;;
-	dicos*)
-		os=dicos
-		;;
-	pikeos*)
-		# Until real need of OS specific support for
-		# particular features comes up, bare metal
-		# configurations are quite functional.
-		case $cpu in
-		    arm*)
-			os=eabi
-			;;
-		    *)
-			os=
-			obj=elf
-			;;
-		esac
-		;;
-	aout* | coff* | elf* | pe*)
-		# These are machine code file formats, not OSes
-		obj=$os
-		os=
-		;;
-	*)
-		# No normalization, but not necessarily accepted, that comes below.
-		;;
-esac
-
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system.  Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-kernel=
-obj=
-case $cpu-$vendor in
-	score-*)
-		os=
-		obj=elf
-		;;
-	spu-*)
-		os=
-		obj=elf
-		;;
-	*-acorn)
-		os=riscix1.2
-		;;
-	arm*-rebel)
-		kernel=linux
-		os=gnu
-		;;
-	arm*-semi)
-		os=
-		obj=aout
-		;;
-	c4x-* | tic4x-*)
-		os=
-		obj=coff
-		;;
-	c8051-*)
-		os=
-		obj=elf
-		;;
-	clipper-intergraph)
-		os=clix
-		;;
-	hexagon-*)
-		os=
-		obj=elf
-		;;
-	tic54x-*)
-		os=
-		obj=coff
-		;;
-	tic55x-*)
-		os=
-		obj=coff
-		;;
-	tic6x-*)
-		os=
-		obj=coff
-		;;
-	# This must come before the *-dec entry.
-	pdp10-*)
-		os=tops20
-		;;
-	pdp11-*)
-		os=none
-		;;
-	*-dec | vax-*)
-		os=ultrix4.2
-		;;
-	m68*-apollo)
-		os=domain
-		;;
-	i386-sun)
-		os=sunos4.0.2
-		;;
-	m68000-sun)
-		os=sunos3
-		;;
-	m68*-cisco)
-		os=
-		obj=aout
-		;;
-	mep-*)
-		os=
-		obj=elf
-		;;
-	mips*-cisco)
-		os=
-		obj=elf
-		;;
-	mips*-*)
-		os=
-		obj=elf
-		;;
-	or32-*)
-		os=
-		obj=coff
-		;;
-	*-tti)	# must be before sparc entry or we get the wrong os.
-		os=sysv3
-		;;
-	sparc-* | *-sun)
-		os=sunos4.1.1
-		;;
-	pru-*)
-		os=
-		obj=elf
-		;;
-	*-be)
-		os=beos
-		;;
-	*-ibm)
-		os=aix
-		;;
-	*-knuth)
-		os=mmixware
-		;;
-	*-wec)
-		os=proelf
-		;;
-	*-winbond)
-		os=proelf
-		;;
-	*-oki)
-		os=proelf
-		;;
-	*-hp)
-		os=hpux
-		;;
-	*-hitachi)
-		os=hiux
-		;;
-	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
-		os=sysv
-		;;
-	*-cbm)
-		os=amigaos
-		;;
-	*-dg)
-		os=dgux
-		;;
-	*-dolphin)
-		os=sysv3
-		;;
-	m68k-ccur)
-		os=rtu
-		;;
-	m88k-omron*)
-		os=luna
-		;;
-	*-next)
-		os=nextstep
-		;;
-	*-sequent)
-		os=ptx
-		;;
-	*-crds)
-		os=unos
-		;;
-	*-ns)
-		os=genix
-		;;
-	i370-*)
-		os=mvs
-		;;
-	*-gould)
-		os=sysv
-		;;
-	*-highlevel)
-		os=bsd
-		;;
-	*-encore)
-		os=bsd
-		;;
-	*-sgi)
-		os=irix
-		;;
-	*-siemens)
-		os=sysv4
-		;;
-	*-masscomp)
-		os=rtu
-		;;
-	f30[01]-fujitsu | f700-fujitsu)
-		os=uxpv
-		;;
-	*-rom68k)
-		os=
-		obj=coff
-		;;
-	*-*bug)
-		os=
-		obj=coff
-		;;
-	*-apple)
-		os=macos
-		;;
-	*-atari*)
-		os=mint
-		;;
-	*-wrs)
-		os=vxworks
-		;;
-	*)
-		os=none
-		;;
-esac
-
-fi
-
-# Now, validate our (potentially fixed-up) individual pieces (OS, OBJ).
-
-case $os in
-	# Sometimes we do "kernel-libc", so those need to count as OSes.
-	musl* | newlib* | relibc* | uclibc*)
-		;;
-	# Likewise for "kernel-abi"
-	eabi* | gnueabi*)
-		;;
-	# VxWorks passes extra cpu info in the 4th filed.
-	simlinux | simwindows | spe)
-		;;
-	# See `case $cpu-$os` validation below
-	ghcjs)
-		;;
-	# Now accept the basic system types.
-	# The portable systems comes first.
-	# Each alternative MUST end in a * to match a version number.
-	gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
-	     | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
-	     | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
-	     | sym* |  plan9* | psp* | sim* | xray* | os68k* | v88r* \
-	     | hiux* | abug | nacl* | netware* | windows* \
-	     | os9* | macos* | osx* | ios* | tvos* | watchos* \
-	     | mpw* | magic* | mmixware* | mon960* | lnews* \
-	     | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
-	     | aos* | aros* | cloudabi* | sortix* | twizzler* \
-	     | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
-	     | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
-	     | mirbsd* | netbsd* | dicos* | openedition* | ose* \
-	     | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
-	     | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
-	     | bosx* | nextstep* | cxux* | oabi* \
-	     | ptx* | ecoff* | winnt* | domain* | vsta* \
-	     | udi* | lites* | ieee* | go32* | aux* | hcos* \
-	     | chorusrdb* | cegcc* | glidix* | serenity* \
-	     | cygwin* | msys* | moss* | proelf* | rtems* \
-	     | midipix* | mingw32* | mingw64* | mint* \
-	     | uxpv* | beos* | mpeix* | udk* | moxiebox* \
-	     | interix* | uwin* | mks* | rhapsody* | darwin* \
-	     | openstep* | oskit* | conix* | pw32* | nonstopux* \
-	     | storm-chaos* | tops10* | tenex* | tops20* | its* \
-	     | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \
-	     | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \
-	     | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
-	     | skyos* | haiku* | rdos* | toppers* | drops* | es* \
-	     | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
-	     | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
-	     | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
-	     | fiwix* | mlibc* | cos* | mbr* )
-		;;
-	# This one is extra strict with allowed versions
-	sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
-		# Don't forget version if it is 3.2v4 or newer.
-		;;
-	none)
-		;;
-	kernel* | msvc* )
-		# Restricted further below
-		;;
-	'')
-		if test x"$obj" = x
-		then
-			echo "Invalid configuration '$1': Blank OS only allowed with explicit machine code file format" 1>&2
-		fi
-		;;
-	*)
-		echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2
-		exit 1
-		;;
-esac
-
-case $obj in
-	aout* | coff* | elf* | pe*)
-		;;
-	'')
-		# empty is fine
-		;;
-	*)
-		echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2
-		exit 1
-		;;
-esac
-
-# Here we handle the constraint that a (synthetic) cpu and os are
-# valid only in combination with each other and nowhere else.
-case $cpu-$os in
-	# The "javascript-unknown-ghcjs" triple is used by GHC; we
-	# accept it here in order to tolerate that, but reject any
-	# variations.
-	javascript-ghcjs)
-		;;
-	javascript-* | *-ghcjs)
-		echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2
-		exit 1
-		;;
-esac
-
-# As a final step for OS-related things, validate the OS-kernel combination
-# (given a valid OS), if there is a kernel.
-case $kernel-$os-$obj in
-	linux-gnu*- | linux-dietlibc*- | linux-android*- | linux-newlib*- \
-		   | linux-musl*- | linux-relibc*- | linux-uclibc*- | linux-mlibc*- )
-		;;
-	uclinux-uclibc*- )
-		;;
-	managarm-mlibc*- | managarm-kernel*- )
-		;;
-	windows*-msvc*-)
-		;;
-	-dietlibc*- | -newlib*- | -musl*- | -relibc*- | -uclibc*- | -mlibc*- )
-		# These are just libc implementations, not actual OSes, and thus
-		# require a kernel.
-		echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2
-		exit 1
-		;;
-	-kernel*- )
-		echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2
-		exit 1
-		;;
-	*-kernel*- )
-		echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2
-		exit 1
-		;;
-	*-msvc*- )
-		echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2
-		exit 1
-		;;
-	kfreebsd*-gnu*- | kopensolaris*-gnu*-)
-		;;
-	vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-)
-		;;
-	nto-qnx*-)
-		;;
-	os2-emx-)
-		;;
-	*-eabi*- | *-gnueabi*-)
-		;;
-	none--*)
-		# None (no kernel, i.e. freestanding / bare metal),
-		# can be paired with an machine code file format
-		;;
-	-*-)
-		# Blank kernel with real OS is always fine.
-		;;
-	--*)
-		# Blank kernel and OS with real machine code file format is always fine.
-		;;
-	*-*-*)
-		echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2
-		exit 1
-		;;
-esac
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer.  We pick the logical manufacturer.
-case $vendor in
-	unknown)
-		case $cpu-$os in
-			*-riscix*)
-				vendor=acorn
-				;;
-			*-sunos*)
-				vendor=sun
-				;;
-			*-cnk* | *-aix*)
-				vendor=ibm
-				;;
-			*-beos*)
-				vendor=be
-				;;
-			*-hpux*)
-				vendor=hp
-				;;
-			*-mpeix*)
-				vendor=hp
-				;;
-			*-hiux*)
-				vendor=hitachi
-				;;
-			*-unos*)
-				vendor=crds
-				;;
-			*-dgux*)
-				vendor=dg
-				;;
-			*-luna*)
-				vendor=omron
-				;;
-			*-genix*)
-				vendor=ns
-				;;
-			*-clix*)
-				vendor=intergraph
-				;;
-			*-mvs* | *-opened*)
-				vendor=ibm
-				;;
-			*-os400*)
-				vendor=ibm
-				;;
-			s390-* | s390x-*)
-				vendor=ibm
-				;;
-			*-ptx*)
-				vendor=sequent
-				;;
-			*-tpf*)
-				vendor=ibm
-				;;
-			*-vxsim* | *-vxworks* | *-windiss*)
-				vendor=wrs
-				;;
-			*-aux*)
-				vendor=apple
-				;;
-			*-hms*)
-				vendor=hitachi
-				;;
-			*-mpw* | *-macos*)
-				vendor=apple
-				;;
-			*-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*)
-				vendor=atari
-				;;
-			*-vos*)
-				vendor=stratus
-				;;
-		esac
-		;;
-esac
-
-echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}"
-exit
-
-# Local variables:
-# eval: (add-hook 'before-save-hook 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/configure.ng b/configure.ng
deleted file mode 100644
index 0dccfbc5..00000000
--- a/configure.ng
+++ /dev/null
@@ -1,850 +0,0 @@
-#
-# ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2024 Alexander Barton (alex@barton.de) and Contributors
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-# Please read the file COPYING, README and AUTHORS for more information.
-#
-
-define(VERSION_ID,esyscmd([
-	V=`git describe 2>/dev/null | sed -e 's/rel-//g' | sed -e 's/-/~/'`;
-	[ -z "$V" -a -r configure ] \
-		&& V=`grep "PACKAGE_STRING=" configure | cut -d"'" -f2 | cut -d' ' -f2`
-	( [ -n "$V" ] && echo "$V" || echo "??" ) | tr -d '\n';
-]))
-
-m4_ifdef([AM_SILENT_RULES],
-	[m4_define([ng_color_tests], [color-tests])],
-	[m4_define([ng_color_tests], [])])
-
-# -- Initialisation --
-
-AC_PREREQ([2.61])
-AC_INIT([ngIRCd],[VERSION_ID],[ngircd@lists.barton.de],[ngircd],[https://ngircd.barton.de/])
-
-AC_CONFIG_SRCDIR([src/ngircd/ngircd.c])
-AC_CONFIG_HEADER([src/config.h])
-AC_CANONICAL_HOST
-
-AM_INIT_AUTOMAKE([-Wall 1.10 foreign ]ng_color_tests)
-
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
-
-# -- Templates for config.h --
-
-AH_TEMPLATE([DEBUG], [Define if debug-mode should be enabled])
-AH_TEMPLATE([HAVE_sockaddr_in_len], [Define if sockaddr_in.sin_len exists])
-AH_TEMPLATE([HAVE_socklen_t], [Define if socklen_t exists])
-AH_TEMPLATE([ICONV], [Define if libiconv can be used, e.g. for CHARCONV])
-AH_TEMPLATE([IDENTAUTH], [Define if the server should do IDENT requests])
-AH_TEMPLATE([IRCPLUS], [Define if IRC+ protocol should be used])
-AH_TEMPLATE([PAM], [Define if PAM should be used])
-AH_TEMPLATE([SNIFFER], [Define if IRC sniffer should be enabled])
-AH_TEMPLATE([STRICT_RFC], [Define if ngIRCd should behave strict RFC compliant])
-AH_TEMPLATE([SYSLOG], [Define if syslog should be used for logging])
-AH_TEMPLATE([TCPWRAP], [Define if TCP wrappers should be used])
-AH_TEMPLATE([WANT_IPV6], [Define if IPV6 protocol should be enabled])
-AH_TEMPLATE([ZLIB], [Define if zlib compression should be enabled])
-
-AH_TEMPLATE([HOST_OS], [Target operating system name])
-AH_TEMPLATE([HOST_VENDOR], [Target system vendor])
-AH_TEMPLATE([HOST_CPU], [Target CPU name])
-
-# -- C Compiler --
-
-AC_PROG_CC
-AC_PROG_CC_STDC
-
-# -- Helper programs --
-
-m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
-
-AC_PROG_AWK
-AC_PROG_INSTALL
-AC_PROG_LN_S
-AC_PROG_MAKE_SET
-AC_PROG_MKDIR_P
-AC_PROG_RANLIB
-
-# -- Compiler Features --
-
-AC_C_CONST
-AC_C_INLINE
-__ng_PROTOTYPES__
-
-# -- Function Definitions --
-
-AC_DEFUN([GCC_STACK_PROTECT_CC],[
-	ssp_cc=yes
-	# Use -fstack-protector-all for the test to enfoce the use of the
-	# guard variable
-	AC_MSG_CHECKING([whether ${CC} accepts -fstack-protector])
-	ssp_old_cflags="$CFLAGS"
-	CFLAGS="$CFLAGS -fstack-protector-all"
-	AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],[],[ssp_cc=no])
-	echo $ssp_cc
-	CFLAGS="$ssp_old_cflags"
-	if test "X$ssp_cc" = "Xyes"; then
-		CFLAGS="$CFLAGS -fstack-protector"
-		AC_DEFINE([ENABLE_SSP_CC], 1, [Define if SSP C support is enabled.])
-	fi
-])
-
-AC_DEFUN([WORKING_GETADDRINFO],[
-	AC_CHECK_FUNCS([getaddrinfo],[
-		AC_MSG_CHECKING([whether getaddrinfo() works])
-		AC_RUN_IFELSE([AC_LANG_SOURCE([[
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netdb.h>
-#include <string.h>
-int
-main(int argc, char **argv)
-{
-	struct addrinfo hints, *ai;
-	memset(&hints, 0, sizeof(hints));
-	hints.ai_flags = AI_PASSIVE;
-	hints.ai_socktype = SOCK_STREAM;
-	hints.ai_family = PF_UNSPEC;
-	if(getaddrinfo(NULL, "0", &hints, &ai) != 0)
-		return 1;
-	return 0;
-}
-		]])],[
-		AC_DEFINE([HAVE_WORKING_GETADDRINFO], 1, [getaddrinfo(0)])
-		AC_MSG_RESULT(yes)
-		],[
-		AC_MSG_RESULT(no)
-		],[
-		AC_MSG_RESULT(no)
-		])
-	])
-])
-
-AC_DEFUN([GCC_W_NO_FORMAT_TRUNC],[
-	result=yes
-	AC_MSG_CHECKING([whether ${CC} accepts -Wno-format-truncation])
-	old_cflags="$CFLAGS"
-	CFLAGS="$CFLAGS -Werror -Wno-format-truncation"
-	AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],[],[result=no])
-	echo $result
-	if test "X$result" = "Xyes"; then
-		CFLAGS="$old_cflags -Wno-format-truncation"
-	else
-		CFLAGS="$old_cflags"
-	fi
-])
-
-# -- Hard coded system and compiler dependencies/features/options ... --
-
-if test "$GCC" = "yes"; then
-	# We are using the GNU C compiler. Good!
-	CFLAGS="$CFLAGS -pipe -W -Wall -Wpointer-arith -Wstrict-prototypes"
-
-	GCC_STACK_PROTECT_CC
-	GCC_W_NO_FORMAT_TRUNC
-fi
-
-case "$host_os" in
-	hpux*)
-		# This is HP/UX, we need to define _XOPEN_SOURCE_EXTENDED
-		# (tested with HP/UX 11.11)
-		CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
-		;;
-esac
-
-# Add additional CFLAGS, eventually specified on the command line:
-test -n "$CFLAGS_ADD" && CFLAGS="$CFLAGS $CFLAGS_ADD"
-
-CFLAGS="$CFLAGS -DSYSCONFDIR='\"\$(sysconfdir)\"' -DDOCDIR='\"\$(docdir)\"'"
-
-# -- Headers --
-
-AC_HEADER_STDC
-AC_HEADER_SYS_WAIT
-AC_HEADER_TIME
-
-# Required header files
-AC_CHECK_HEADERS([ \
-		fcntl.h \
-		netdb.h \
-		netinet/in.h \
-		stdlib.h \
-		string.h \
-		strings.h \
-		sys/socket.h \
-		sys/time.h \
-		sys/types.h \
-		unistd.h \
-	],,AC_MSG_ERROR([required C header missing!]))
-
-# Optional header files
-AC_CHECK_HEADERS_ONCE([ \
-	arpa/inet.h \
-	inttypes.h \
-	malloc.h \
-	netinet/in_systm.h \
-	netinet/ip.h \
-	stdbool.h \
-	stddef.h \
-	stdint.h \
-	sys/resource.h \
-	sys/un.h \
-	varargs.h \
-])
-
-# -- Datatypes --
-
-AC_MSG_CHECKING(whether socklen_t exists)
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include <sys/types.h>
-#include <sys/socket.h>
-	]],[[
-	socklen_t a, b;
-	a = 2; b = 4; a += b;
-	]])],[
-	AC_DEFINE(HAVE_socklen_t) AC_MSG_RESULT(yes)
-	],[
-	AC_MSG_RESULT(no)
-])
-
-AC_TYPE_PID_T
-AC_TYPE_SIZE_T
-AC_TYPE_SSIZE_T
-AC_TYPE_UID_T
-AC_TYPE_UINT16_T
-AC_TYPE_UINT32_T
-AC_TYPE_UINT8_T
-
-AC_CHECK_MEMBER([struct sockaddr_in.sin_len], AC_DEFINE(HAVE_sockaddr_in_len),,
- [#include <arpa/inet.h>])
-
-# -- Libraries --
-
-# memmove: A/UX libUTIL
-AC_SEARCH_LIBS([memmove], [UTIL], [], [
-	AC_MSG_ERROR([unable to find the memmove() function])
-])
-# gethostbyname: Solaris libnsl
-AC_SEARCH_LIBS([gethostbyname], [bind nsl network], [], [
-	AC_MSG_ERROR([unable to find the gethostbyname() function])
-])
-# bind: SVR4 libsocket
-AC_SEARCH_LIBS([bind], [socket network], [], [
-	AC_MSG_ERROR([unable to find the bind() function])
-])
-
-# -- Functions --
-
-AC_FUNC_FORK
-AC_FUNC_STRFTIME
-
-# Required functions
-AC_CHECK_FUNCS([ \
-		alarm \
-		dup2 \
-		endpwent \
-		gethostbyaddr \
-		gethostbyname \
-		gethostname \
-		gettimeofday \
-		inet_ntoa \
-		memmove \
-		memset \
-		setsid \
-		socket \
-		strcasecmp \
-		strchr \
-		strcspn \
-		strerror \
-		strncasecmp \
-		strrchr \
-		strspn \
-		strstr \
-	],,
-	AC_MSG_ERROR([required function missing!]))
-
-# Optional functions
-AC_CHECK_FUNCS_ONCE([
-	arc4random \
-	arc4random_stir \
-	gai_strerror \
-	getnameinfo \
-	inet_aton \
-	setgroups \
-	setrlimit \
-	sigaction \
-	sigprocmask \
-	snprintf \
-	strdup \
-	strlcat \
-	strlcpy \
-	strndup \
-	strsignal \
-	strtok_r \
-	unsetenv \
-	vsnprintf \
-	waitpid \
-])
-
-WORKING_GETADDRINFO
-
-# -- Configuration options --
-
-# use syslog?
-
-x_syslog_on=no
-AC_ARG_WITH(syslog,
-	AS_HELP_STRING([--without-syslog],
-		       [disable syslog (autodetected by default)]),
-	[	if test "$withval" != "no"; then
-			if test "$withval" != "yes"; then
-				CFLAGS="-I$withval/include $CFLAGS"
-				CPPFLAGS="-I$withval/include $CPPFLAGS"
-				LDFLAGS="-L$withval/lib $LDFLAGS"
-			fi
-			AC_SEARCH_LIBS([syslog], [be], [x_syslog_on=yes], [
-				AC_MSG_ERROR([Can't enable syslog!])
-			])
-		fi
-	],
-	[	AC_SEARCH_LIBS([syslog], [be], [x_syslog_on=yes])
-	]
-)
-if test "$x_syslog_on" = "yes"; then
-	AC_DEFINE(SYSLOG, 1)
-	AC_CHECK_HEADERS(syslog.h,,AC_MSG_ERROR([required C header missing!]))
-fi
-
-# use zlib compression?
-
-x_zlib_on=no
-AC_ARG_WITH(zlib,
-	AS_HELP_STRING([--without-zlib],
-		       [disable zlib compression (autodetected by default)]),
-	[	if test "$withval" != "no"; then
-			if test "$withval" != "yes"; then
-				CFLAGS="-I$withval/include $CFLAGS"
-				CPPFLAGS="-I$withval/include $CPPFLAGS"
-				LDFLAGS="-L$withval/lib $LDFLAGS"
-			fi
-			AC_CHECK_LIB(z, deflate)
-			AC_CHECK_FUNCS(deflate, x_zlib_on=yes,
-				AC_MSG_ERROR([Can't enable zlib!])
-			)
-		fi
-	],
-	[	AC_CHECK_LIB(z, deflate)
-		AC_CHECK_FUNCS(deflate, x_zlib_on=yes)
-	]
-)
-if test "$x_zlib_on" = "yes"; then
-	AC_DEFINE(ZLIB, 1)
-	AC_CHECK_HEADERS(zlib.h,,AC_MSG_ERROR([required C header missing!]))
-fi
-
-# detect which IO API to use:
-
-x_io_backend=none
-
-AC_ARG_WITH(select,
-	AS_HELP_STRING([--without-select],
-		       [disable select IO support (autodetected by default)]),
-	[	if test "$withval" != "no"; then
-			if test "$withval" != "yes"; then
-				CFLAGS="-I$withval/include $CFLAGS"
-				CPPFLAGS="-I$withval/include $CPPFLAGS"
-				LDFLAGS="-L$withval/lib $LDFLAGS"
-			fi
-			AC_CHECK_FUNCS(select, x_io_select=yes,
-				AC_MSG_ERROR([Can't enable select IO support!])
-			)
-		fi
-	],
-	[
-		AC_CHECK_FUNCS(select, x_io_select=yes)
-	]
-)
-
-AC_ARG_WITH(poll,
-	AS_HELP_STRING([--without-poll],
-		       [disable poll support (autodetected by default)]),
-	[	if test "$withval" != "no"; then
-			if test "$withval" != "yes"; then
-				CFLAGS="-I$withval/include $CFLAGS"
-				CPPFLAGS="-I$withval/include $CPPFLAGS"
-				LDFLAGS="-L$withval/lib $LDFLAGS"
-			fi
-			AC_CHECK_FUNCS(poll, [
-				AC_CHECK_HEADERS(poll.h,
-					x_io_backend=poll\(\),
-					AC_MSG_ERROR(
-					     [Can't enable poll IO support!])
-				)
-			], [
-				AC_MSG_ERROR([Can't enable poll IO support!])
-			])
-		fi
-	],
-	[
-		AC_CHECK_FUNCS(poll, [
-			AC_CHECK_HEADERS(poll.h, x_io_backend=poll\(\))
-		])
-	]
-)
-
-AC_ARG_WITH(devpoll,
-	AS_HELP_STRING([--without-devpoll],
-		       [disable /dev/poll IO support (autodetected by default)]),
-	[	if test "$withval" != "no"; then
-			if test "$withval" != "yes"; then
-				CFLAGS="-I$withval/include $CFLAGS"
-				CPPFLAGS="-I$withval/include $CPPFLAGS"
-				LDFLAGS="-L$withval/lib $LDFLAGS"
-			fi
-
-				AC_CHECK_HEADERS(sys/devpoll.h,,AC_MSG_ERROR([required C header missing!]))
-		fi
-	],
-	[
-		AC_CHECK_HEADERS(sys/devpoll.h, x_io_backend=/dev/poll)
-	]
-)
-
-AC_ARG_WITH(epoll,
-	AS_HELP_STRING([--without-epoll],
-		       [disable epoll IO support (autodetected by default)]),
-	[	if test "$withval" != "no"; then
-			if test "$withval" != "yes"; then
-				CFLAGS="-I$withval/include $CFLAGS"
-				CPPFLAGS="-I$withval/include $CPPFLAGS"
-				LDFLAGS="-L$withval/lib $LDFLAGS"
-			fi
-			AC_CHECK_FUNCS(epoll_create, x_io_epoll=yes,
-				AC_MSG_ERROR([Can't enable epoll IO support!])
-			)
-		fi
-	],
-	[
-		AC_CHECK_FUNCS(epoll_create, x_io_epoll=yes)
-	]
-)
-
-AC_ARG_WITH(kqueue,
-	AS_HELP_STRING([--without-kqueue],
-		       [disable kqueue IO support (autodetected by default)]),
-	[	if test "$withval" != "no"; then
-			if test "$withval" != "yes"; then
-				CFLAGS="-I$withval/include $CFLAGS"
-				CPPFLAGS="-I$withval/include $CPPFLAGS"
-				LDFLAGS="-L$withval/lib $LDFLAGS"
-			fi
-			AC_CHECK_FUNCS(kqueue, x_io_backend=kqueue\(\),
-				AC_MSG_ERROR([Can't enable kqueue IO support!])
-			)
-		fi
-	],
-	[
-		AC_CHECK_FUNCS(kqueue, x_io_backend=kqueue\(\))
-	]
-)
-
-if test "$x_io_epoll" = "yes" -a "$x_io_select" = "yes"; then
-	# when epoll() and select() are available, we'll use both!
-	x_io_backend="epoll(), select()"
-else
-	if test "$x_io_epoll" = "yes"; then
-		# we prefere epoll() if it is available
-		x_io_backend="epoll()"
-	else
-		if test "$x_io_select" = "yes" -a "$x_io_backend" = "none"; then
-			# we'll use select, when available and no "better"
-			# interface has been detected ...
-			x_io_backend="select()"
-		fi
-	fi
-fi
-
-if test "$x_io_backend" = "none"; then
-	AC_MSG_ERROR([No useable IO API activated/found!?])
-fi
-
-# use SSL?
-
-AC_ARG_WITH(openssl,
-	AS_HELP_STRING([--with-openssl],
-		       [enable SSL support using OpenSSL]),
-	[	if test "$withval" != "no"; then
-			if test "$withval" != "yes"; then
-				CFLAGS="-I$withval/include $CFLAGS"
-				CPPFLAGS="-I$withval/include $CPPFLAGS"
-				LDFLAGS="-L$withval/lib $LDFLAGS"
-			fi
-			PKG_CHECK_MODULES([OPENSSL], [libssl libcrypto],
-				[LIBS="$LIBS $OPENSSL_LIBS" CFLAGS="$CFLAGS $OPENSSL_CFLAGS"
-				AC_DEFINE(HAVE_LIBSSL, 1)],
-				[AC_CHECK_LIB(crypto, BIO_s_mem)
-				AC_CHECK_LIB(ssl, SSL_new)]
-			)
-			AC_CHECK_FUNCS(SSL_new, x_ssl_openssl=yes,
-				AC_MSG_ERROR([Can't enable openssl])
-			)
-		fi
-	]
-)
-
-AC_ARG_WITH(gnutls,
-	AS_HELP_STRING([--with-gnutls],
-		       [enable SSL support using gnutls]),
-	[	if test "$withval" != "no"; then
-			if test "$withval" != "yes"; then
-				CFLAGS="-I$withval/include $CFLAGS"
-				CPPFLAGS="-I$withval/include $CPPFLAGS"
-				LDFLAGS="-L$withval/lib $LDFLAGS"
-			fi
-			AC_CHECK_LIB(gnutls, gnutls_global_init)
-			AC_CHECK_FUNCS(gnutls_global_init, x_ssl_gnutls=yes,
-				AC_MSG_ERROR([Can't enable gnutls])
-			)
-		fi
-	]
-)
-
-x_ssl_lib="no"
-if test "$x_ssl_gnutls" = "yes"; then
-	if test "$x_ssl_openssl" = "yes";then
-		AC_MSG_ERROR([Cannot enable both gnutls and openssl])
-	fi
-	x_ssl_lib=gnutls
-fi
-if test "$x_ssl_openssl" = "yes"; then
-	x_ssl_lib=openssl
-fi
-
-AM_CONDITIONAL(HAVE_SSL, [test $x_ssl_lib != "no"])
-
-# use TCP wrappers?
-
-x_tcpwrap_on=no
-AC_ARG_WITH(tcp-wrappers,
-	AS_HELP_STRING([--with-tcp-wrappers],
-		       [enable TCP wrappers support]),
-	[	if test "$withval" != "no"; then
-			if test "$withval" != "yes"; then
-				CFLAGS="-I$withval/include $CFLAGS"
-				CPPFLAGS="-I$withval/include $CPPFLAGS"
-				LDFLAGS="-L$withval/lib $LDFLAGS"
-			fi
-			AC_MSG_CHECKING(for hosts_access)
-			saved_LIBS="$LIBS"
-			LIBS="-lwrap $LIBS"
-			LIBS_END="-lwrap $LIBS_END"
-			AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <tcpd.h>
-int allow_severity = 0;
-int deny_severity = 0;
-				]],[[
-				tcpd_warn("link test");
-				]])],[
-				AC_MSG_RESULT(yes)
-				AC_DEFINE(TCPWRAP, 1)
-				x_tcpwrap_on=yes
-				],[
-				AC_MSG_RESULT(no)
-				AC_MSG_ERROR([Can't enable TCP wrappers!])
-			])
-			LIBS="$saved_LIBS"
-		fi
-	]
-)
-
-# do IDENT requests using libident?
-
-x_identauth_on=no
-AC_ARG_WITH(ident,
-	AS_HELP_STRING([--with-ident],
-		       [enable "IDENT" ("AUTH") protocol support]),
-	[	if test "$withval" != "no"; then
-			if test "$withval" != "yes"; then
-				CFLAGS="-I$withval/include $CFLAGS"
-				CPPFLAGS="-I$withval/include $CPPFLAGS"
-				LDFLAGS="-L$withval/lib $LDFLAGS"
-			fi
-			AC_CHECK_LIB(ident, ident_id)
-			AC_CHECK_FUNCS(ident_id, x_identauth_on=yes,
-				AC_MSG_ERROR([Can't enable IDENT support!])
-			)
-		fi
-	]
-)
-if test "$x_identauth_on" = "yes"; then
-	AC_DEFINE(IDENTAUTH, 1)
-	AC_CHECK_HEADERS(ident.h,,AC_MSG_ERROR([required C header missing!]))
-fi
-
-# compile in PAM support?
-
-x_pam_on=no
-AC_ARG_WITH(pam,
-	AS_HELP_STRING([--with-pam],
-		       [enable user authentication using PAM]),
-	[	if test "$withval" != "no"; then
-			if test "$withval" != "yes"; then
-				CFLAGS="-I$withval/include $CFLAGS"
-				CPPFLAGS="-I$withval/include $CPPFLAGS"
-				LDFLAGS="-L$withval/lib $LDFLAGS"
-			fi
-			AC_CHECK_LIB(pam, pam_authenticate)
-			AC_CHECK_FUNCS(pam_authenticate, x_pam_on=yes,
-				AC_MSG_ERROR([Can't enable PAM support!])
-			)
-		fi
-	]
-)
-if test "$x_pam_on" = "yes"; then
-	AC_DEFINE(PAM, 1)
-	AC_CHECK_HEADERS(security/pam_appl.h,pam_ok=yes)
-	if test "$pam_ok" != "yes"; then
-		AC_CHECK_HEADERS(pam/pam_appl.h,pam_ok=yes,
-			AC_MSG_ERROR([required C header missing!]))
-	fi
-fi
-
-# compile in IRC+ protocol support?
-
-x_ircplus_on=yes
-AC_ARG_ENABLE(ircplus,
-	AS_HELP_STRING([--disable-ircplus],
-		       [disable IRC+ protocol]),
-	if test "$enableval" = "no"; then x_ircplus_on=no; fi
-)
-if test "$x_ircplus_on" = "yes"; then
-	AC_DEFINE(IRCPLUS, 1)
-
-	# Compile in iconv support?
-	# We only check for it when IRC+ is enabled, because the IRC+ command
-	# CHARCONV is the only function depending on it.
-	x_iconv_on=no
-	AC_ARG_WITH(iconv,
-		AS_HELP_STRING([--with-iconv],
-			       [enable character conversion using libiconv]),
-		[ if test "$withval" != "no"; then
-			if test "$withval" != "yes"; then
-				CFLAGS="-I$withval/include $CFLAGS"
-				CPPFLAGS="-I$withval/include $CPPFLAGS"
-				LDFLAGS="-L$withval/lib $LDFLAGS"
-			fi
-			AC_CHECK_LIB(iconv, iconv_open)
-			AC_CHECK_FUNCS(iconv_open, x_iconv_on=yes)
-			if test "$x_iconv_on" != "yes"; then
-				AC_CHECK_LIB(iconv, libiconv_open)
-				AC_CHECK_FUNCS(libiconv_open, x_iconv_on=yes)
-			fi
-			if test "$x_iconv_on" != "yes"; then
-				AC_MSG_ERROR([Can't enable libiconv support!])
-			fi
-		fi ]
-	)
-	if test "$x_iconv_on" = "yes"; then
-		AC_DEFINE(ICONV, 1)
-	fi
-fi
-
-# enable support for IPv6?
-
-x_ipv6_on=yes
-AC_ARG_ENABLE(ipv6,
-	AS_HELP_STRING([--disable-ipv6],
-		       [disable IPv6 protocol support (autodetected by default)]),
-	[	if test "$enableval" = "no"; then
-			x_ipv6_on=no
-		else
-			AC_CHECK_FUNCS(
-				[getaddrinfo getnameinfo],,
-				AC_MSG_ERROR([required function missing for IPv6 support!])
-			)
-		fi
-	],
-	[	AC_CHECK_FUNCS([getaddrinfo getnameinfo],, x_ipv6_on=no)
-	]
-)
-if test "$x_ipv6_on" = "yes"; then
-	AC_DEFINE(WANT_IPV6, 1)
-fi
-
-# compile in IRC "sniffer"?
-
-x_sniffer_on=no; x_debug_on=no
-AC_ARG_ENABLE(sniffer,
-	AS_HELP_STRING([--enable-sniffer],
-		       [enable IRC traffic sniffer (enables debug mode)]),
-	if test "$enableval" = "yes"; then
-		AC_DEFINE(SNIFFER, 1)
-		x_sniffer_on=yes; x_debug_on=yes
-	fi
-)
-
-# enable additional debugging code?
-
-AC_ARG_ENABLE(debug,
-	AS_HELP_STRING([--enable-debug],
-		       [show additional debug output]),
-	if test "$enableval" = "yes"; then x_debug_on=yes; fi
-)
-if test "$x_debug_on" = "yes"; then
-	AC_DEFINE(DEBUG, 1)
-	test "$GCC" = "yes" && CFLAGS="-pedantic $CFLAGS"
-	AC_CHECK_FUNCS(mtrace)
-fi
-
-# enable "strict RFC rules"?
-
-x_strict_rfc_on=no
-AC_ARG_ENABLE(strict-rfc,
-	AS_HELP_STRING([--enable-strict-rfc],
-		       [strict RFC conformance -- may break clients!]),
-	if test "$enableval" = "yes"; then
-		AC_DEFINE(STRICT_RFC, 1)
-		x_strict_rfc_on=yes
-	fi
-)
-
-# -- Definitions --
-
-AC_DEFINE_UNQUOTED(HOST_CPU, "$host_cpu" )
-AC_DEFINE_UNQUOTED(HOST_VENDOR, "$host_vendor" )
-AC_DEFINE_UNQUOTED(HOST_OS, "$host_os" )
-
-# Add additional CFLAGS, LDFLAGS and LIBS which were specified on the command
-# line or by some tests from above, but after running this script. Useful for
-# adding "-Werror", for example:
-test -n "$CFLAGS_END" && CFLAGS="$CFLAGS $CFLAGS_END"
-test -n "$LDFLAGS_END" && LDFLAGS="$LDFLAGS $LDFLAGS_END"
-test -n "$LIBS_END" && LIBS="$LIBS $LIBS_END"
-
-# -- Generate files --
-
-AC_CONFIG_FILES([ \
-	Makefile \
-	contrib/Debian/Makefile \
-	contrib/Makefile \
-	doc/Makefile \
-	doc/src/Makefile \
-	man/Makefile \
-	src/ipaddr/Makefile \
-	src/Makefile \
-	src/ngircd/Makefile \
-	src/portab/Makefile \
-	src/testsuite/Makefile \
-	src/tool/Makefile \
-])
-
-AC_OUTPUT
-
-type dpkg >/dev/null 2>&1
-if test $? -eq 0; then
-	# Generate debian/ link if the dpkg command exists
-	# (read: if we are running on a debian compatible system)
-	echo "creating Debian-specific links ..."
-	if test ! -f debian/rules -a -f contrib/Debian/rules; then
-		ln -s contrib/Debian debian
-	fi
-fi
-
-# -- Result --
-
-echo
-echo "ngIRCd $PACKAGE_VERSION has been configured with the following options:"
-echo
-
-# Someone please show me a better way :)  [borrowed by OpenSSH]
-B=`eval echo ${bindir}` ; B=`eval echo ${B}`
-S=`eval echo ${sbindir}` ; S=`eval echo ${S}`
-C=`eval echo ${sysconfdir}` ; C=`eval echo ${C}`
-M=`eval echo ${mandir}` ; M=`eval echo ${M}`
-D=`eval echo ${docdir}` ; D=`eval echo ${D}`
-
-echo "               Host: ${host}"
-echo "           Compiler: ${CC}"
-test -n "$CFLAGS"	&& echo "     Compiler flags: ${CFLAGS}"
-test -n "$CPPFLAGS"	&& echo " Preprocessor flags: ${CPPFLAGS}"
-test -n "$LDFLAGS"	&& echo "       Linker flags: ${LDFLAGS}"
-test -n "$LIBS"		&& echo "          Libraries: ${LIBS}"
-echo
-echo "    'ngircd' binary: $S"
-echo " Configuration file: $C"
-echo "       Manual pages: $M"
-echo "      Documentation: $D"
-echo
-
-echo $ECHO_N "     Syslog support: $ECHO_C"
-test "$x_syslog_on" = "yes" \
-	&& echo $ECHO_N "yes   $ECHO_C" \
-	|| echo $ECHO_N "no    $ECHO_C"
-echo $ECHO_N "  Enable debug code: $ECHO_C"
-test "$x_debug_on" = "yes" \
-	&& echo "yes" \
-	|| echo "no"
-
-echo $ECHO_N "   zlib compression: $ECHO_C"
-test "$x_zlib_on" = "yes" \
-	&& echo $ECHO_N "yes   $ECHO_C" \
-	|| echo $ECHO_N "no    $ECHO_C"
-echo $ECHO_N "        IRC sniffer: $ECHO_C"
-test "$x_sniffer_on" = "yes" \
-	&& echo "yes" \
-	|| echo "no"
-
-echo $ECHO_N "   Use TCP Wrappers: $ECHO_C"
-test "$x_tcpwrap_on" = "yes" \
-	&& echo $ECHO_N "yes   $ECHO_C" \
-	|| echo $ECHO_N "no    $ECHO_C"
-echo $ECHO_N "    Strict RFC mode: $ECHO_C"
-test "$x_strict_rfc_on" = "yes" \
-	&& echo "yes" \
-	|| echo "no"
-
-echo $ECHO_N "      IDENT support: $ECHO_C"
-test "$x_identauth_on" = "yes" \
-	&& echo $ECHO_N "yes   $ECHO_C" \
-	|| echo $ECHO_N "no    $ECHO_C"
-echo $ECHO_N "      IRC+ protocol: $ECHO_C"
-test "$x_ircplus_on" = "yes" \
-	&& echo "yes" \
-	|| echo "no"
-
-echo $ECHO_N "      IPv6 protocol: $ECHO_C"
-test "$x_ipv6_on" = "yes" \
-	&& echo $ECHO_N "yes   $ECHO_C" \
-	|| echo $ECHO_N "no    $ECHO_C"
-echo $ECHO_N "        I/O backend: $ECHO_C"
-	echo "$x_io_backend"
-
-echo $ECHO_N "        PAM support: $ECHO_C"
-test "$x_pam_on" = "yes" \
-	&& echo $ECHO_N "yes   $ECHO_C" \
-	|| echo $ECHO_N "no    $ECHO_C"
-echo $ECHO_N "        SSL support: $ECHO_C"
-echo "$x_ssl_lib"
-
-echo $ECHO_N "   libiconv support: $ECHO_C"
-	echo "$x_iconv_on"
-
-echo
-
-define(_automake_regex_,[[^AUTOMAKE_OPTIONS = [a-z .\-]*/portab/ansi2knr]])
-if ! grep "_automake_regex_" src/ngircd/Makefile.am >/dev/null 2>&1; then
-	echo "WARNING:"
-	echo "This GNU automake generated build system does not support \"de-ANSI-fication\","
-	echo "therefore don't use it to generate \"official\" distribution archives!"
-	echo "(Most probably you want to use GNU automake 1.11.x for this purpose ...)"
-	echo
-fi
-
-# -eof-
diff --git a/man/Makefile.am b/man/Makefile.am
deleted file mode 100644
index 077d0eab..00000000
--- a/man/Makefile.am
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-# Please read the file COPYING, README and AUTHORS for more information.
-#
-
-TEMPLATE_MANS = ngircd.conf.5.tmpl ngircd.8.tmpl
-
-SUFFIXES = .tmpl .
-
-.tmpl:
-	$(AM_V_GEN)sed \
-	    -e "s@:SBINDIR:@${sbindir}@" \
-	    -e "s@:BINDIR:@${bindir}@" \
-	    -e "s@:ETCDIR:@${sysconfdir}@" \
-	    <$< >$@
-
-man_MANS = ngircd.conf.5 ngircd.8
-
-CLEANFILES = $(man_MANS)
-
-EXTRA_DIST = $(TEMPLATE_MANS)
-
-maintainer-clean-local:
-	rm -f Makefile Makefile.in
-
-# -eof-
diff --git a/man/ngircd.8 b/man/ngircd.8
new file mode 100644
index 00000000..41bbe7ea
--- /dev/null
+++ b/man/ngircd.8
@@ -0,0 +1,147 @@
+.\"
+.\" ngircd(8) manual page template
+.\"
+.TH ngircd 8 "May 2024" ngIRCd "ngIRCd Manual"
+.SH NAME
+ngIRCd \- the "next generation" IRC daemon
+.SH SYNOPSIS
+.B ngircd
+[
+.I Options
+]
+.SH DESCRIPTION
+.BR ngIRCd
+is a free, portable and lightweight Internet Relay Chat (IRC) server for small
+or private networks, developed under the GNU General Public License (GPL).
+.PP
+The server is quite easy to configure and runs as a single-node server or can
+be part of a network of ngIRCd servers in a LAN or across the internet. It
+optionally supports the IPv6 protocol, SSL/TLS-protected client-server and
+server-server links, the Pluggable Authentication Modules (PAM) system for user
+authentication, IDENT requests, and character set conversion for legacy
+clients.
+.PP
+The name ngIRCd stands for
+.IR "next-generation IRC daemon",
+which is a little bit exaggerated:
+.IR "lightweight Internet Relay Chat server"
+most probably would have been a better name :-)
+.PP
+By default ngIRCd logs diagnostic and informational messages using the syslog
+mechanism, or writes directly to the console when running in the foreground
+(see below).
+.SH OPTIONS
+The default behavior of
+.BR ngircd
+is to read its standard configuration file (see below), to detach from the
+controlling terminal and to wait for clients.
+.PP
+You can use these options to modify this default:
+.TP
+\fB\-f\fR \fIfile\fR, \fB\-\-config\fR \fIfile\fR
+Use
+.I file
+as configuration file.
+.TP
+\fB\-n\fR, \fB\-\-nodaemon\fR
+Don't fork a child and don't detach from controlling terminal.
+All log messages go to the console and you can use CTRL-C to
+terminate the server.
+.TP
+\fB\-p\fR, \fB\-\-passive\fR
+Disable automatic connections to other servers. You can use the IRC command
+CONNECT later on as IRC Operator to link this ngIRCd to other servers.
+.TP
+\fB\-y\fR, \fB\-\-syslog\fR
+Write log messages to the syslog even when running in the foreground. This only
+makes sense when
+.I \-n/\-\-nodaemon
+was given on the command line
+.I before
+this option!
+.PP
+The following options prevent ngIRCd from starting regularly, but perform a
+specific action and then exit the daemon again:
+.TP
+\fB\-h\fR, \fB\-\-help\fR
+Display a brief help text and exit.
+.TP
+\fB\-t\fR, \fB\-\-configtest\fR
+Read, validate and display the configuration; then exit.
+.TP
+\fB\-V\fR, \fB\-\-version\fR
+Output version information and exit.
+.SH FILES
+.I /usr/local/etc/ngircd.conf
+.RS
+The system wide default configuration file.
+.RE
+.I /usr/local/etc/ngircd.motd
+.RS
+Default "message of the day" (MOTD).
+.RE
+.SH SIGNALS
+The daemon understands the following signals:
+.TP
+\fBTERM\fR
+Shut down all connections and terminate the daemon.
+.TP
+\fBHUP\fR
+Shut down all listening sockets, re-read the configuration file and
+re-initialize the daemon.
+.SH HINTS
+It is
+.I always wise
+to use "ngircd \-\-configtest" to validate the configuration of ngIRCd after
+making changes to the configuration files!
+.SH DEBUGGING
+ngIRCd can log additional debug messages, which can be enabled with the command
+line option \-\-debug (\-d) or by sending the USR1 signal to the running daemon.
+Some of those messages may leak personal information, be very technical and can
+be very verbose. Therefore the debug mode is meant for troubleshooting only and
+should definitely be disabled during normal operation!
+.PP
+In addition, a "protocol sniffer" can be enabled on build time by passing the
+"\-\-enable\-sniffer" option to the ./configure script which enables the
+"\-\-sniffer" (\-s) command line option (which is not available by default):
+this "sniffer" logs all incoming and outgoing IRC commands on all connections,
+which can be handy to debug problems with the daemon itself or IRC clients.
+.PP
+Both modes are indicated in the version string shown by the IRC "VERSION"
+command: if the version ends in a dot (like in "26.1."), the daemon operates in
+"normal" mode (the version used in the example is "26.1"). If it ends in ".1"
+(like in "26.1.1") the "debug-mode" is enabled; and if it ends in ".2" (like in
+"26.1.2") the "IRC sniffer" is enabled, too.
+.PP
+\fBOptions:\fR
+.TP
+\fB\-d\fR, \fB\-\-debug\fR
+Enable debug mode and log extra messages.
+.TP
+\fB\-s\fR, \fB\-\-sniffer\fR
+Enable IRC protocol sniffer, which logs all sent and received IRC commands to
+the console/syslog. This option requires that ngIRCd has been ./configure'd
+with "\-\-enable\-sniffer" and enables debug mode automatically, too.
+.PP
+\fBSignals:\fR
+.PP
+Note: Usage of these signals is broadcasted to all users with the +s ("receive
+server notices") mode set!
+.TP
+\fBUSR1\fR
+Toggle debug mode on and off during runtime.
+.TP
+\fBUSR2\fR
+Dump internal server state to the console/syslog when debug mode is on (use
+command line option \-\-debug or signal USR1).
+.SH AUTHORS
+Alexander Barton, <alex@barton.de>
+.br
+Florian Westphal, <fw@strlen.de>
+.PP
+Homepage: http://ngircd.barton.de/
+.SH "SEE ALSO"
+.BR ngircd.conf (5),
+.BR ircd (8)
+.\"
+.\" -eof-
diff --git a/man/ngircd.conf.5 b/man/ngircd.conf.5
new file mode 100644
index 00000000..a79f1d8d
--- /dev/null
+++ b/man/ngircd.conf.5
@@ -0,0 +1,608 @@
+.\"
+.\" ngircd.conf(5) manual page template
+.\"
+.TH ngircd.conf 5 "Sep 2025" ngIRCd "ngIRCd Manual"
+.SH NAME
+ngircd.conf \- configuration file of ngIRCd
+.SH SYNOPSIS
+.B /usr/local/etc/ngircd.conf
+.SH DESCRIPTION
+.BR ngircd.conf
+is the configuration file of the
+.BR ngircd (8)
+Internet Relay Chat (IRC) daemon, which must be customized to the local
+preferences and needs.
+.PP
+Most variables can be modified while the ngIRCd daemon is already running:
+It will reload its configuration file when a HUP signal or REHASH command
+is received.
+.SH "FILE FORMAT"
+The file consists of sections and parameters. A section begins with the name
+of the section in square brackets and continues until the next section
+begins.
+.PP
+Sections contain parameters of the form
+.PP
+.RS
+.I name
+=
+.I value
+.RE
+.PP
+Empty lines and any line beginning with a semicolon (';') or a hash ('#')
+character are treated as a comment and will be ignored. Leading and trailing
+whitespaces are trimmed before any processing takes place.
+.PP
+The file format is line-based - that means, each non-empty newline-terminated
+line represents either a comment, a section name, or a parameter.
+.PP
+Section and parameter names are not case sensitive.
+.PP
+There are three types of variables:
+.I booleans,
+.I text strings,
+and
+.I numbers.
+Boolean values are
+.I true
+if they are "yes", "true", or any non-null integer. Text strings are used 1:1
+without leading and following spaces; there is no way to quote strings. And
+for numbers all decimal integer values are valid.
+.PP
+In addition, some string or numerical variables accept lists of values,
+separated by commas (",").
+.SH "SECTION OVERVIEW"
+The file can contain blocks of seven types: [Global], [Limits], [Options],
+[SSL], [Operator], [Server], and [Channel].
+.PP
+The main configuration of the server is stored in the
+.I [Global]
+section, like the server name, administrative information and the ports on
+which the server should be listening. The variables in this section have to be
+adjusted to the local requirements most of the time, whereas all the variables
+in the other sections can be left on their defaults very often.
+.PP
+Options in the
+.I [Limits]
+block are used to tweak different limits and timeouts of the daemon, like the
+maximum number of clients allowed to connect to this server. Variables in the
+.I [Options]
+section can be used to enable or disable specific features of ngIRCd, like
+support for IDENT, PAM, IPv6, and protocol and cloaking features. The
+.I [SSL]
+block contains all SSL-related configuration variables. These three sections
+are all optional.
+.PP
+IRC operators of this server are defined in
+.I [Operator]
+blocks. Links to remote servers are configured in
+.I [Server]
+sections. And
+.I [Channel]
+blocks are used to configure pre-defined ("persistent") IRC channels.
+.PP
+There can be more than one [Operator], [Server] and [Channel] section per
+configuration file, one for each operator, server, and channel. [Global],
+[Limits], [Options], and [SSL] sections can occur multiple times, too, but
+each variable overwrites itself, only the last assignment is relevant.
+.SH [GLOBAL]
+The
+.I [Global]
+section is used to define the main configuration of the server,
+like the server name and the ports on which the server should be listening.
+These settings depend on your personal preferences, so you should make sure
+that they correspond to your installation and setup!
+.TP
+\fBName\fR (string)
+Server name in the IRC network. This is an individual name of the IRC
+server, it is not related to the DNS host name. It must be unique in the
+IRC network and must contain at least one dot (".") character. When not set,
+ngIRCd tries to deduce a valid IRC server name from the local host name.
+.TP
+\fBAdminInfo1\fR, \fBAdminInfo2\fR, \fBAdminEMail\fR (string)
+Information about the server and the administrator, used by the ADMIN
+command. This information is not required by the server but by RFC!
+.TP
+\fBHelpFile\fR (string)
+Text file which contains the ngIRCd help text. This file is required
+to display help texts when using the "HELP <cmd>" command.
+Please note: Changes made to this file take effect when ngircd starts up
+or is instructed to re-read its configuration file. Default: a built-in
+standard path.
+.TP
+\fBInfo\fR (string)
+Info text of the server. This will be shown by WHOIS and LINKS requests for
+example. Set to the server software name and version by default.
+.TP
+\fBListen\fR (list of strings)
+A comma separated list of IP address on which the server should listen.
+If unset, the defaults value is "0.0.0.0" or, if ngIRCd was compiled
+with IPv6 support, "::,0.0.0.0". So the server listens on all configured
+IP addresses and interfaces by default.
+.TP
+\fBMotdFile\fR (string)
+Text file with the "message of the day" (MOTD). This message will be shown to
+all users connecting to the server. Please note: Changes made to this file
+take effect when ngircd starts up or is instructed to re-read its
+configuration file. Default: a built-in standard path.
+.TP
+\fBMotdPhrase\fR (string)
+A simple Phrase (<127 chars) if you don't want to use a MOTD file.
+.TP
+\fBNetwork\fR (string)
+The name of the IRC network to which this server belongs. This name is
+optional, should only contain ASCII characters, and can't contain spaces.
+It is only used to inform clients. The default is empty, so no network
+name is announced to clients.
+.TP
+\fBPassword\fR (string)
+Global password for all users needed to connect to the server. The default is
+empty, so no password is required. Please note: This feature is not available
+if ngIRCd is using PAM!
+.TP
+\fBPidFile\fR (string)
+This tells ngIRCd to write its current process ID to a file. Note that the
+"PID file" is written AFTER chroot and switching the user ID, therefore the
+directory the file resides in must be writable by the ngIRCd user and exist
+in the chroot directory (if configured, see above).
+.TP
+\fBPorts\fR (list of numbers)
+Port number(s) on which the server should listen for unencrypted connections.
+There may be more than one port, separated with commas (","). Default: 6667.
+.TP
+\fBServerGID\fR (string or number)
+Group ID under which the ngIRCd daemon should run; you can use the name of the
+group or the numerical ID.
+.PP
+.RS
+.B Attention:
+.br
+For this to work the server must have been started with root privileges!
+.RE
+.TP
+\fBServerUID\fR (string or number)
+User ID under which the ngIRCd daemon should run; you can use the name of the
+user or the numerical ID.
+.PP
+.RS
+.B Attention:
+.br
+For this to work the server must have been started with root privileges! In
+addition, the configuration and MOTD files must be readable by this user,
+otherwise RESTART and REHASH won't work!
+.RE
+.SH [LIMITS]
+This section is used to define some limits and timeouts for this ngIRCd
+instance. Default values should be safe, but it is wise to double-check :-)
+.TP
+\fBConnectRetry\fR (number)
+The server tries every <ConnectRetry> seconds to establish a link to not yet
+(or no longer) connected servers. Default: 60.
+.TP
+\fBIdleTimeout\fR (number)
+Number of seconds after which the whole daemon should shutdown when no
+connections are left active after handling at least one client (0: never). This
+can be useful for testing or when ngIRCd is started using "socket activation"
+with systemd(8), for example. Default: 0.
+.TP
+\fBMaxConnections\fR (number)
+Maximum number of simultaneous in- and outbound connections the server is
+allowed to accept (0: unlimited). Default: 0.
+.TP
+\fBMaxConnectionsIP\fR (number)
+Maximum number of simultaneous connections from a single IP address that
+the server will accept (0: unlimited). This configuration options lowers
+the risk of denial of service attacks (DoS). Default: 5.
+.TP
+\fBMaxJoins\fR (number)
+Maximum number of channels a user can be member of (0: no limit).
+Default: 10.
+.TP
+\fBMaxNickLength\fR (number)
+Maximum length of an user nickname (Default: 9, as in RFC 2812). Please
+note that all servers in an IRC network MUST use the same maximum nickname
+length!
+.TP
+\fBMaxPenaltyTime\fR (number)
+Maximum penalty time increase in seconds, per penalty event. Set to -1 for no
+limit (the default), 0 to disable penalties altogether. ngIRCd doesn't use
+penalty increases higher than 2 seconds during normal operation, so values
+greater than 1 rarely make sense.
+.TP
+\fBMaxListSize\fR (number)
+Maximum number of channels returned in response to a LIST command. Default: 100.
+.TP
+\fBPingTimeout\fR (number)
+After <PingTimeout> seconds of inactivity the server will send a PING to
+the peer to test whether it is alive or not. Default: 120.
+.TP
+\fBPongTimeout\fR (number)
+If a client fails to answer a PING with a PONG within <PongTimeout>
+seconds, it will be disconnected by the server. Default: 20.
+.SH [OPTIONS]
+Optional features and configuration options to further tweak the behavior of
+ngIRCd are configured in this section. If you want to get started quickly, you
+most probably don't have to make changes here -- they are all optional.
+.TP
+\fBAllowedChannelTypes\fR (string)
+List of allowed channel types (channel prefixes) for newly created channels
+on the local server. By default, all supported channel types are allowed.
+Set this variable to the empty string to disallow creation of new channels
+by local clients at all. Default: #&+
+.TP
+\fBAllowRemoteOper\fR (boolean)
+If this option is active, IRC operators connected to remote servers are allowed
+to control this local server using administrative commands, for example like
+CONNECT, DIE, SQUIT etc. Default: no.
+.TP
+\fBChrootDir\fR (string)
+A directory to chroot in when everything is initialized. It doesn't need
+to be populated if ngIRCd is compiled as a static binary. By default ngIRCd
+won't use the chroot() feature.
+.PP
+.RS
+.B Attention:
+.br
+For this to work the server must have been started with root privileges!
+.RE
+.TP
+\fBCloakHost\fR (string)
+Set this hostname for every client instead of the real one. Default: empty,
+don't change. Use %x to add the hashed value of the original hostname.
+.TP
+\fBCloakHostModeX\fR (string)
+Use this hostname for hostname cloaking on clients that have the user mode
+"+x" set, instead of the name of the server. Default: empty, use the name
+of the server. Use %x to add the hashed value of the original hostname.
+If this variable is empty, regular users cannot set mode "+x" themselves.
+.TP
+\fBCloakHostSalt\fR (string)
+The Salt for cloaked hostname hashing. When undefined a random hash is
+generated after each server start.
+.TP
+\fBCloakUserToNick\fR (boolean)
+Set every clients' user name and real name to their nickname and hide the one
+supplied by the IRC client. Default: no.
+.TP
+\fBConnectIPv4\fR (boolean)
+Set this to no if you do not want ngIRCd to connect to other IRC servers using
+the IPv4 protocol. This allows the usage of ngIRCd in IPv6-only setups.
+Default: yes.
+.TP
+\fBConnectIPv6\fR (boolean)
+Set this to no if you do not want ngIRCd to connect to other IRC servers using
+the IPv6 protocol.
+Default: yes.
+.TP
+\fBDefaultChannelModes\fR (string)
+Default channel mode(s) to set on new channels.
+Default: none.
+.TP
+\fBDefaultUserModes\fR (string)
+Default user mode(s) to set on new local clients. Please note that only modes
+can be set that the client could set using regular MODE commands, you can't
+set "a" (away) for example!
+Default: none.
+.TP
+\fBDNS\fR (boolean)
+If set to false, ngIRCd will not make any DNS lookups when clients connect.
+If you configure the daemon to connect to other servers, ngIRCd may still
+perform a DNS lookup if required.
+Default: yes.
+.TP
+\fBIdent\fR (boolean)
+If ngIRCd is compiled with IDENT support this can be used to disable IDENT
+lookups at run time.
+Users identified using IDENT are registered without the "~" character
+prepended to their user name.
+Default: yes.
+.TP
+\fBIncludeDir\fR (string)
+Directory containing configuration snippets (*.conf), that should be read in
+after parsing the current configuration file.
+Default: a built-in directory name when no configuration file was explicitly
+given on the command line (check "ngircd --configtest"), none (empty)
+otherwise.
+.PP
+.RS
+This way no default include directory is used when a possibly non-default
+configuration file was explicitly specified using "--config"/"-f" on the
+command line which (intentionally) did not specify an
+.I "IncludeDir"
+directive.
+.RE
+.TP
+\fBMorePrivacy\fR (boolean)
+This will cause ngIRCd to censor user idle time, logon time as well as the
+PART/QUIT messages (that are sometimes used to inform everyone about which
+client software is being used). WHOWAS requests are also silently ignored,
+and NAMES output doesn't list any clients for non-members.
+This option is most useful when ngIRCd is being used together with
+anonymizing software such as TOR or I2P and one does not wish to make it
+too easy to collect statistics on the users.
+Default: no.
+.TP
+\fBNoticeBeforeRegistration\fR (boolean)
+Normally ngIRCd doesn't send any messages to a client until it is registered.
+Enable this option to let the daemon send "NOTICE *" messages to clients
+while connecting. Default: no.
+.TP
+\fBOperCanUseMode\fR (boolean)
+Should IRC Operators be allowed to use the MODE command even if they are
+not(!) channel-operators? Default: no.
+.TP
+\fBOperChanPAutoOp\fR (boolean)
+Should IRC Operators get AutoOp (+o) in persistent (+P) channels?
+Default: yes.
+.TP
+\fBOperServerMode\fR (boolean)
+If \fBOperCanUseMode\fR is enabled, this may lead the compatibility problems
+with Servers that run the ircd-irc2 Software. This Option "masks" mode
+requests by non-chanops as if they were coming from the server. Default: no;
+only enable it if you have ircd-irc2 servers in your IRC network.
+.TP
+\fBPAM\fR (boolean)
+If ngIRCd is compiled with PAM support this can be used to disable all calls
+to the PAM library at runtime; all users connecting without password are
+allowed to connect, all passwords given will fail.
+Users identified using PAM are registered without the "~" character
+prepended to their user name.
+Default: yes.
+.TP
+\fBPAMIsOptional\fR (boolean)
+When PAM is enabled, all clients are required to be authenticated using PAM;
+connecting to the server without successful PAM authentication isn't possible.
+If this option is set, clients not sending a password are still allowed to
+connect: they won't become "identified" and keep the "~" character prepended
+to their supplied user name.
+Please note:
+To make some use of this behavior, it most probably isn't useful to enable
+"Ident", "PAM" and "PAMIsOptional" at the same time, because you wouldn't be
+able to distinguish between Ident'ified and PAM-authenticated users: both
+don't have a "~" character prepended to their respective user names!
+Default: no.
+.TP
+\fBPAMServiceName\fR (string)
+When PAM is enabled, this value determines the used PAM configuration.
+This setting allows running multiple ngIRCd instances with different
+PAM configurations on each instance. If you set it to "ngircd-foo",
+PAM will use /etc/pam.d/ngircd-foo instead of the default
+/etc/pam.d/ngircd.
+Default: ngircd.
+.TP
+\fBRequireAuthPing\fR (boolean)
+Let ngIRCd send an "authentication PING" when a new client connects, and
+register this client only after receiving the corresponding "PONG" reply.
+Default: no.
+.TP
+\fBScrubCTCP\fR (boolean)
+If set to true, ngIRCd will silently drop all CTCP requests sent to it from
+both clients and servers. It will also not forward CTCP requests to any
+other servers. CTCP requests can be used to query user clients about which
+software they are using and which versions said software is. CTCP can also be
+used to reveal clients IP numbers. ACTION CTCP requests are not blocked,
+this means that /me commands will not be dropped, but please note that
+blocking CTCP will disable file sharing between users!
+Default: no.
+.TP
+\fBSyslogFacility\fR (string)
+Syslog "facility" to which ngIRCd should send log messages. Possible
+values are system dependent, but most probably "auth", "daemon", "user"
+and "local1" through "local7" are possible values; see syslog(3).
+Default is "local5" for historical reasons, you probably want to
+change this to "daemon", for example.
+.TP
+\fBWebircPassword\fR (string)
+Password required for using the WEBIRC command used by some Web-to-IRC
+gateways. If not set or empty, the WEBIRC command can't be used.
+Default: not set.
+.SH [SSL]
+All SSL-related configuration variables are located in the
+.I [SSL]
+section. Please note that this whole section is only recognized by ngIRCd
+when it is compiled with support for SSL using OpenSSL or GnuTLS!
+.TP
+\fBCAFile\fR (string)
+Filename pointing to the Trusted CA Certificates. This is required for
+verifying peer certificates. Default: not set, so no certificates are trusted.
+.TP
+\fBCertFile\fR (string)
+SSL Certificate file of the private server key.
+.TP
+\fBCipherList\fR (string)
+Select cipher suites allowed for SSL/TLS connections.  This defaults to
+"HIGH:!aNULL:@STRENGTH:!SSLv3" (OpenSSL) or "SECURE128:-VERS-SSL3.0" (GnuTLS).
+Please see 'man 1ssl ciphers' (OpenSSL) and 'man 3 gnutls_priority_init'
+(GnuTLS) for details.
+.TP
+\fBCRLFile\fR (string)
+Filename of Certificate Revocation List.
+.TP
+\fBDHFile\fR (string)
+Name of the Diffie-Hellman Parameter file. Can be created with GnuTLS
+"certtool \-\-generate-dh-params" or "openssl dhparam". If this file is not
+present, it will be generated on startup when ngIRCd was compiled with GnuTLS
+support (this may take some time). If ngIRCd was compiled with OpenSSL, then
+(Ephemeral)-Diffie-Hellman Key Exchanges and several Cipher Suites will not be
+available.
+.TP
+\fBKeyFile\fR (string)
+Filename of SSL Server Key to be used for SSL connections. This is required
+for SSL/TLS support.
+.TP
+\fBKeyFilePassword\fR (string)
+OpenSSL only: Password to decrypt the private key file.
+.TP
+\fBPorts\fR (list of numbers)
+Same as \fBPorts\fR , except that ngIRCd will expect incoming connections
+to be SSL/TLS encrypted. Common port numbers for SSL-encrypted IRC are 6669
+and 6697. Default: none.
+.SH [OPERATOR]
+.I [Operator]
+sections are used to define IRC Operators. There may be more than one
+.I [Operator]
+block, one for each local operator.
+.TP
+\fBName\fR (string)
+ID of the operator (may be different of the nickname).
+.TP
+\fBPassword\fR (string)
+Password of the IRC operator.
+.TP
+\fBMask\fR (string)
+Mask that is to be checked before an /OPER for this account is accepted.
+Example: nick!ident@*.example.com
+.SH [SERVER]
+Other servers are configured in
+.I [Server]
+sections. If you configure a port for the connection, then this ngIRCd
+tries to connect to the other server on the given port (active);
+if not, it waits for the other server to connect (passive).
+.PP
+ngIRCd supports "server groups": You can assign an "ID" to every server
+with which you want this ngIRCd to link, and the daemon ensures that at
+any given time only one direct link exists to servers with the same ID.
+So if a server of a group won't answer, ngIRCd tries to connect to the next
+server in the given group (="with the same ID"), but never tries to connect
+to more than one server of this group simultaneously.
+.PP
+There may be more than one
+.I [Server]
+block.
+.TP
+\fBName\fR (string)
+IRC name of the remote server.
+.TP
+\fBHost\fR (string)
+Internet host name (or IP address) of the peer.
+.TP
+\fBBind\fR (string)
+IP address to use as source IP for the outgoing connection. Default is
+to let the operating system decide.
+.TP
+\fBPort\fR (number)
+Port of the remote server to which ngIRCd should connect (active).
+If no port is assigned to a configured server, the daemon only waits for
+incoming connections (passive, default).
+.TP
+\fBMyPassword\fR (string)
+Own password for this connection. This password has to be configured as
+\fBPeerPassword\fR on the other server. Must not have ':' as first character.
+.TP
+\fBPeerPassword\fR (string)
+Foreign password for this connection. This password has to be configured as
+\fBMyPassword\fR on the other server.
+.TP
+\fBGroup\fR (number)
+Group of this server (optional).
+.TP
+\fBPassive\fR (boolean)
+Disable automatic connection even if port value is specified. Default: false.
+You can use the IRC Operator command CONNECT later on to create the link.
+.TP
+\fBSSLConnect\fR (boolean)
+Connect to the remote server using TLS/SSL. Default: false.
+.TP
+\fBSSLVerify\fR (boolean)
+Verify the TLS certificate presented by the remote server. Default: yes.
+.TP
+\fBServiceMask\fR (string)
+Define a (case insensitive) list of masks matching nicknames that should be
+treated as IRC services when introduced via this remote server, separated
+by commas (","). REGULAR SERVERS DON'T NEED this parameter, so leave it empty
+(which is the default).
+.PP
+.RS
+When you are connecting IRC services which mask as a IRC server and which use
+"virtual users" to communicate with, for example "NickServ" and "ChanServ",
+you should set this parameter to something like "*Serv", "*Serv,OtherNick",
+or "NickServ,ChanServ,XyzServ".
+.SH [CHANNEL]
+Pre-defined channels can be configured in
+.I [Channel]
+sections. Such channels are created by the server when starting up and even
+persist when there are no more members left.
+.PP
+Persistent channels are marked with the mode 'P', which can be set and unset
+by IRC operators like other modes on the fly.
+.PP
+There may be more than one
+.I [Channel]
+block.
+.TP
+\fBName\fR (string)
+Name of the channel, including channel prefix ("#" or "&").
+.TP
+\fBTopic\fR (string)
+Topic for this channel.
+.TP
+\fBModes\fR (string)
+Initial channel modes, as used in "MODE" commands. Modifying lists (ban list,
+invite list, exception list) is supported.
+.PP
+.RS
+This option can be specified multiple times, evaluated top to bottom.
+.RE
+.TP
+\fBAutojoin\fR (boolean)
+Should ngIRCd automatically join ("autojoin") all users to this channel on
+connect? Note: The users must have permissions to access the channel, otherwise
+joining them will fail!
+.TP
+\fBKeyFile\fR (string)
+Path and file name of a "key file" containing individual channel keys for
+different users. The file consists of plain text lines with the following
+syntax (without spaces!):
+.PP
+.RS
+.RS
+.I user
+:
+.I nick
+:
+.I key
+.RE
+.PP
+.I user
+and
+.I nick
+can contain the wildcard character "*".
+.br
+.I key
+is an arbitrary password.
+.PP
+Valid examples are:
+.PP
+.RS
+*:*:KeY
+.br
+*:nick:123
+.br
+~user:*:xyz
+.RE
+.PP
+The key file is read on each JOIN command when this channel has a key
+(channel mode +k). Access is granted, if a) the channel key set using the
+MODE +k command or b) one of the lines in the key file match.
+.PP
+.B Please note:
+.br
+The file is not reopened on each access, so you can modify and overwrite it
+without problems, but moving or deleting the file will have not effect until
+the daemon re-reads its configuration!
+.RE
+.SH HINTS
+It's wise to use "ngircd \-\-configtest" to validate the configuration file
+after changing it. See
+.BR ngircd (8)
+for details.
+.SH AUTHOR
+Alexander Barton, <alex@barton.de>
+.br
+Florian Westphal, <fw@strlen.de>
+.PP
+Homepage: http://ngircd.barton.de/
+.SH "SEE ALSO"
+.BR ngircd (8)
+.\"
+.\" -eof-
diff --git a/src/Makefile b/src/Makefile
new file mode 100644
index 00000000..58a5093c
--- /dev/null
+++ b/src/Makefile
@@ -0,0 +1,21 @@
+LIBS += portab/libngportab.a
+LIBS += ipaddr/libngipaddr.a
+LIBS += tool/libngtool.a
+
+all: ngircd/ngircd
+
+ngircd/ngircd: ${LIBS}
+	make -C ngircd
+
+portab/libngportab.a:
+	make -C portab
+
+ipaddr/libngipaddr.a:
+	make -C ipaddr
+
+tool/libngtool.a:
+	make -C tool
+
+clean:
+	rm -f ngircd/ngircd
+	find . \( -name '*\.o' -o -name '*\.a' \) -exec rm {} \;
diff --git a/src/Makefile.am b/src/Makefile.am
deleted file mode 100644
index e04ebe1b..00000000
--- a/src/Makefile.am
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-# Please read the file COPYING, README and AUTHORS for more information.
-#
-# $Id: Makefile.am,v 1.8 2008/02/26 22:04:15 fw Exp $
-#
-
-SUBDIRS = portab tool ipaddr ngircd testsuite
-
-maintainer-clean-local:
-	rm -f Makefile Makefile.in config.h config.h.in stamp-h.in
-
-# -eof-
diff --git a/src/config.h b/src/config.h
new file mode 100644
index 00000000..652ab8c3
--- /dev/null
+++ b/src/config.h
@@ -0,0 +1,432 @@
+/* src/config.h.  Generated from config.h.in by configure.  */
+/* src/config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define if debug-mode should be enabled */
+/* #undef DEBUG */
+
+/* Define if SSP C support is enabled. */
+#define ENABLE_SSP_CC 1
+
+/* Define to 1 if you have the 'alarm' function. */
+#define HAVE_ALARM 1
+
+/* Define to 1 if you have the 'arc4random' function. */
+#define HAVE_ARC4RANDOM 1
+
+/* Define to 1 if you have the 'arc4random_stir' function. */
+/* #undef HAVE_ARC4RANDOM_STIR */
+
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+#define HAVE_ARPA_INET_H 1
+
+/* Define to 1 if you have the 'deflate' function. */
+#define HAVE_DEFLATE 1
+
+/* Define to 1 if you have the 'dup2' function. */
+#define HAVE_DUP2 1
+
+/* Define to 1 if you have the 'endpwent' function. */
+#define HAVE_ENDPWENT 1
+
+/* Define to 1 if you have the 'epoll_create' function. */
+/* #undef HAVE_EPOLL_CREATE */
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define to 1 if you have the 'fork' function. */
+#define HAVE_FORK 1
+
+/* Define to 1 if you have the 'gai_strerror' function. */
+#define HAVE_GAI_STRERROR 1
+
+/* Define to 1 if you have the 'getaddrinfo' function. */
+#define HAVE_GETADDRINFO 1
+
+/* Define to 1 if you have the 'gethostbyaddr' function. */
+#define HAVE_GETHOSTBYADDR 1
+
+/* Define to 1 if you have the 'gethostbyname' function. */
+#define HAVE_GETHOSTBYNAME 1
+
+/* Define to 1 if you have the 'gethostname' function. */
+#define HAVE_GETHOSTNAME 1
+
+/* Define to 1 if you have the 'getnameinfo' function. */
+#define HAVE_GETNAMEINFO 1
+
+/* Define to 1 if you have the 'gettimeofday' function. */
+#define HAVE_GETTIMEOFDAY 1
+
+/* Define to 1 if you have the 'gnutls_global_init' function. */
+/* #undef HAVE_GNUTLS_GLOBAL_INIT */
+
+/* Define to 1 if you have the 'iconv_open' function. */
+/* #undef HAVE_ICONV_OPEN */
+
+/* Define to 1 if you have the <ident.h> header file. */
+/* #undef HAVE_IDENT_H */
+
+/* Define to 1 if you have the 'ident_id' function. */
+/* #undef HAVE_IDENT_ID */
+
+/* Define to 1 if you have the 'inet_aton' function. */
+#define HAVE_INET_ATON 1
+
+/* Define to 1 if you have the 'inet_ntoa' function. */
+#define HAVE_INET_NTOA 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the 'kqueue' function. */
+/* #define HAVE_KQUEUE 1 */
+
+/* Define to 1 if you have the 'crypto' library (-lcrypto). */
+/* #undef HAVE_LIBCRYPTO */
+
+/* Define to 1 if you have the 'gnutls' library (-lgnutls). */
+/* #undef HAVE_LIBGNUTLS */
+
+/* Define to 1 if you have the 'iconv' library (-liconv). */
+/* #undef HAVE_LIBICONV */
+
+/* Define to 1 if you have the 'libiconv_open' function. */
+/* #undef HAVE_LIBICONV_OPEN */
+
+/* Define to 1 if you have the 'ident' library (-lident). */
+/* #undef HAVE_LIBIDENT */
+
+/* Define to 1 if you have the 'pam' library (-lpam). */
+/* #undef HAVE_LIBPAM */
+
+/* Define to 1 if you have the 'ssl' library (-lssl). */
+/* #undef HAVE_LIBSSL */
+
+/* Define to 1 if you have the 'z' library (-lz). */
+#define HAVE_LIBZ 1
+
+/* Define to 1 if you have the <malloc.h> header file. */
+/* #undef HAVE_MALLOC_H */
+
+/* Define to 1 if you have the 'memmove' function. */
+#define HAVE_MEMMOVE 1
+
+/* Define to 1 if you have the 'memset' function. */
+#define HAVE_MEMSET 1
+
+/* Define to 1 if you have the 'mtrace' function. */
+/* #undef HAVE_MTRACE */
+
+/* Define to 1 if you have the <netdb.h> header file. */
+#define HAVE_NETDB_H 1
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#define HAVE_NETINET_IN_H 1
+
+/* Define to 1 if you have the <netinet/in_systm.h> header file. */
+#define HAVE_NETINET_IN_SYSTM_H 1
+
+/* Define to 1 if you have the <netinet/ip.h> header file. */
+/* #undef HAVE_NETINET_IP_H */
+
+/* Define to 1 if you have the 'pam_authenticate' function. */
+/* #undef HAVE_PAM_AUTHENTICATE */
+
+/* Define to 1 if you have the <pam/pam_appl.h> header file. */
+/* #undef HAVE_PAM_PAM_APPL_H */
+
+/* Define to 1 if you have the 'poll' function. */
+#define HAVE_POLL 1
+
+/* Define to 1 if you have the <poll.h> header file. */
+#define HAVE_POLL_H 1
+
+/* Define to 1 if you have the <security/pam_appl.h> header file. */
+/* #undef HAVE_SECURITY_PAM_APPL_H */
+
+/* Define to 1 if you have the 'select' function. */
+#define HAVE_SELECT 1
+
+/* Define to 1 if you have the 'setgroups' function. */
+#define HAVE_SETGROUPS 1
+
+/* Define to 1 if you have the 'setrlimit' function. */
+#define HAVE_SETRLIMIT 1
+
+/* Define to 1 if you have the 'setsid' function. */
+#define HAVE_SETSID 1
+
+/* Define to 1 if you have the 'sigaction' function. */
+#define HAVE_SIGACTION 1
+
+/* Define to 1 if you have the 'sigprocmask' function. */
+#define HAVE_SIGPROCMASK 1
+
+/* Define to 1 if you have the 'snprintf' function. */
+#define HAVE_SNPRINTF 1
+
+/* Define to 1 if you have the 'socket' function. */
+#define HAVE_SOCKET 1
+
+/* Define to 1 if you have the 'SSL_new' function. */
+/* #undef HAVE_SSL_NEW */
+
+/* Define to 1 if you have the <stdbool.h> header file. */
+#define HAVE_STDBOOL_H 1
+
+/* Define to 1 if you have the <stddef.h> header file. */
+#define HAVE_STDDEF_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdio.h> header file. */
+#define HAVE_STDIO_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the 'strcasecmp' function. */
+#define HAVE_STRCASECMP 1
+
+/* Define to 1 if you have the 'strchr' function. */
+#define HAVE_STRCHR 1
+
+/* Define to 1 if you have the 'strcspn' function. */
+#define HAVE_STRCSPN 1
+
+/* Define to 1 if you have the 'strdup' function. */
+#define HAVE_STRDUP 1
+
+/* Define to 1 if you have the 'strerror' function. */
+#define HAVE_STRERROR 1
+
+/* Define to 1 if you have the 'strftime' function. */
+#define HAVE_STRFTIME 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the 'strlcat' function. */
+#define HAVE_STRLCAT 1
+
+/* Define to 1 if you have the 'strlcpy' function. */
+#define HAVE_STRLCPY 1
+
+/* Define to 1 if you have the 'strncasecmp' function. */
+#define HAVE_STRNCASECMP 1
+
+/* Define to 1 if you have the 'strndup' function. */
+#define HAVE_STRNDUP 1
+
+/* Define to 1 if you have the 'strrchr' function. */
+#define HAVE_STRRCHR 1
+
+/* Define to 1 if you have the 'strsignal' function. */
+#define HAVE_STRSIGNAL 1
+
+/* Define to 1 if you have the 'strspn' function. */
+#define HAVE_STRSPN 1
+
+/* Define to 1 if you have the 'strstr' function. */
+#define HAVE_STRSTR 1
+
+/* Define to 1 if you have the 'strtok_r' function. */
+#define HAVE_STRTOK_R 1
+
+/* Define to 1 if you have the <syslog.h> header file. */
+#define HAVE_SYSLOG_H 1
+
+/* Define to 1 if you have the <sys/devpoll.h> header file. */
+/* #undef HAVE_SYS_DEVPOLL_H */
+
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#define HAVE_SYS_RESOURCE_H 1
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#define HAVE_SYS_SOCKET_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#define HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <sys/un.h> header file. */
+#define HAVE_SYS_UN_H 1
+
+/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
+#define HAVE_SYS_WAIT_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the 'unsetenv' function. */
+#define HAVE_UNSETENV 1
+
+/* Define to 1 if you have the <varargs.h> header file. */
+/* #undef HAVE_VARARGS_H */
+
+/* Define to 1 if you have the 'vfork' function. */
+#define HAVE_VFORK 1
+
+/* Define to 1 if you have the <vfork.h> header file. */
+/* #undef HAVE_VFORK_H */
+
+/* Define to 1 if you have the 'vsnprintf' function. */
+#define HAVE_VSNPRINTF 1
+
+/* Define to 1 if you have the 'waitpid' function. */
+#define HAVE_WAITPID 1
+
+/* Define to 1 if 'fork' works. */
+#define HAVE_WORKING_FORK 1
+
+/* getaddrinfo(0) */
+#define HAVE_WORKING_GETADDRINFO 1
+
+/* Define to 1 if 'vfork' works. */
+#define HAVE_WORKING_VFORK 1
+
+/* Define to 1 if you have the <zlib.h> header file. */
+#define HAVE_ZLIB_H 1
+
+/* Define if sockaddr_in.sin_len exists */
+/* #undef HAVE_sockaddr_in_len */
+
+/* Define if socklen_t exists */
+#define HAVE_socklen_t 1
+
+/* Target CPU name */
+#define HOST_CPU "x86_64" 
+
+/* Target operating system name */
+#define HOST_OS "openbsd7.7" 
+
+/* Target system vendor */
+#define HOST_VENDOR "unknown" 
+
+/* Define if libiconv can be used, e.g. for CHARCONV */
+/* #undef ICONV */
+
+/* Define if the server should do IDENT requests */
+/* #undef IDENTAUTH */
+
+/* Define if IRC+ protocol should be used */
+#define IRCPLUS 1
+
+/* Name of package */
+#define PACKAGE "ngircd"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "ngircd@lists.barton.de"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "ngIRCd"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "ngIRCd 27~9-gf11b01cc"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "ngircd"
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL "https://ngircd.barton.de/"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "27~9-gf11b01cc"
+
+/* Define if PAM should be used */
+/* #undef PAM */
+
+/* Define to 1 if the C compiler supports function prototypes. */
+#define PROTOTYPES 1
+
+/* Define if IRC sniffer should be enabled */
+/* #undef SNIFFER */
+
+/* Define to 1 if all of the C89 standard headers exist (not just the ones
+   required in a freestanding environment). This macro is provided for
+   backward compatibility; new code need not use it. */
+#define STDC_HEADERS 1
+
+/* Define if ngIRCd should behave strict RFC compliant */
+/* #undef STRICT_RFC */
+
+/* Define if syslog should be used for logging */
+#define SYSLOG 1
+
+/* Define if TCP wrappers should be used */
+/* #undef TCPWRAP */
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. This
+   macro is obsolete. */
+#define TIME_WITH_SYS_TIME 1
+
+/* Version number of package */
+#define VERSION "27~9-gf11b01cc"
+
+/* Define if IPV6 protocol should be enabled */
+#define WANT_IPV6 1
+
+/* Define if zlib compression should be enabled */
+#define ZLIB 1
+
+/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
+   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+   #define below would cause a syntax error. */
+/* #undef _UINT32_T */
+
+/* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
+   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+   #define below would cause a syntax error. */
+/* #undef _UINT8_T */
+
+/* Define like PROTOTYPES; this can be used by system headers. */
+#define __PROTOTYPES 1
+
+/* Define to empty if 'const' does not conform to ANSI C. */
+/* #undef const */
+
+/* Define as 'int' if <sys/types.h> doesn't define. */
+/* #undef gid_t */
+
+/* Define to '__inline__' or '__inline' if that's what the C compiler
+   calls it, or to nothing if 'inline' is not supported under any name.  */
+#ifndef __cplusplus
+/* #undef inline */
+#endif
+
+/* Define as a signed integer type capable of holding a process identifier. */
+/* #undef pid_t */
+
+/* Define as 'unsigned int' if <stddef.h> doesn't define. */
+/* #undef size_t */
+
+/* Define as 'int' if <sys/types.h> doesn't define. */
+/* #undef ssize_t */
+
+/* Define as 'int' if <sys/types.h> doesn't define. */
+/* #undef uid_t */
+
+/* Define to the type of an unsigned integer type of width exactly 16 bits if
+   such a type exists and the standard includes do not define it. */
+/* #undef uint16_t */
+
+/* Define to the type of an unsigned integer type of width exactly 32 bits if
+   such a type exists and the standard includes do not define it. */
+/* #undef uint32_t */
+
+/* Define to the type of an unsigned integer type of width exactly 8 bits if
+   such a type exists and the standard includes do not define it. */
+/* #undef uint8_t */
+
+/* Define as 'fork' if 'vfork' does not work. */
+/* #undef vfork */
diff --git a/src/ipaddr/Makefile b/src/ipaddr/Makefile
new file mode 100644
index 00000000..113786a2
--- /dev/null
+++ b/src/ipaddr/Makefile
@@ -0,0 +1,13 @@
+CFLAGS += -DDOCDIR='"/usr/local/share/doc/ngircd"'
+CFLAGS += -DHAVE_CONFIG_H
+CFLAGS += -I..
+CFLAGS += -I../portab
+CFLAGS += -I../ipaddr
+CFLAGS += -I../tool
+
+OBJS += ng_ipaddr.o
+
+all: libngipaddr.a
+
+libngipaddr.a: ${OBJS}
+	ar rcs libngipaddr.a ${OBJS}
diff --git a/src/ipaddr/Makefile.ng b/src/ipaddr/Makefile.ng
deleted file mode 100644
index ecfce295..00000000
--- a/src/ipaddr/Makefile.ng
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# ipaddr/Makefile.am
-# (c) 2008 Florian Westphal <fw@strlen.de>, public domain.
-#
-
-__ng_Makefile_am_template__
-
-EXTRA_DIST = Makefile.ng
-
-AM_CPPFLAGS = -I$(srcdir)/../portab
-
-noinst_LIBRARIES = libngipaddr.a
-
-libngipaddr_a_SOURCES = ng_ipaddr.c
-
-noinst_HEADERS = ng_ipaddr.h
-
-maintainer-clean-local:
-	rm -f Makefile Makefile.in Makefile.am
-
-# -eof-
diff --git a/src/ngircd/Makefile b/src/ngircd/Makefile
new file mode 100644
index 00000000..bfd3d308
--- /dev/null
+++ b/src/ngircd/Makefile
@@ -0,0 +1,52 @@
+LDFLAGS += -L../portab -L../tool -L../ipaddr
+LDLIBS += -lngportab -lngtool -lngipaddr -lz
+
+CFLAGS += -DDOCDIR='"/usr/local/share/doc/ngircd"'
+CFLAGS += -DHAVE_CONFIG_H
+CFLAGS += -I..
+CFLAGS += -I../portab
+CFLAGS += -I../ipaddr
+CFLAGS += -I../tool
+
+OBJS += array.o
+OBJS += channel.o
+OBJS += class.o
+OBJS += client-cap.o
+OBJS += client.o
+OBJS += conf.o
+OBJS += conn-encoding.o
+OBJS += conn-func.o
+OBJS += conn-ssl.o
+OBJS += conn-zip.o
+OBJS += conn.o
+OBJS += hash.o
+OBJS += io.o
+OBJS += irc-cap.o
+OBJS += irc-channel.o
+OBJS += irc-encoding.o
+OBJS += irc-info.o
+OBJS += irc-login.o
+OBJS += irc-metadata.o
+OBJS += irc-mode.o
+OBJS += irc-op.o
+OBJS += irc-oper.o
+OBJS += irc-server.o
+OBJS += irc-write.o
+OBJS += irc.o
+OBJS += lists.o
+OBJS += log.o
+OBJS += login.o
+OBJS += match.o
+OBJS += ngircd.o
+OBJS += numeric.o
+OBJS += op.o
+OBJS += pam.o
+OBJS += parse.o
+OBJS += proc.o
+OBJS += resolve.o
+OBJS += sighandlers.o
+
+all: ngircd
+
+ngircd: ${OBJS}
+	cc -o ngircd ${LDFLAGS} ${OBJS} ${LDLIBS}
diff --git a/src/ngircd/Makefile.ng b/src/ngircd/Makefile.ng
deleted file mode 100644
index 5045ebae..00000000
--- a/src/ngircd/Makefile.ng
+++ /dev/null
@@ -1,124 +0,0 @@
-#
-# ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2024 Alexander Barton (alex@barton.de) and Contributors
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-# Please read the file COPYING, README and AUTHORS for more information.
-#
-
-__ng_Makefile_am_template__
-
-EXTRA_DIST = Makefile.ng
-
-AM_CPPFLAGS = -I$(srcdir)/../portab -I$(srcdir)/../tool -I$(srcdir)/../ipaddr
-
-sbin_PROGRAMS = ngircd
-
-ngircd_SOURCES = \
-	ngircd.c \
-	array.c \
-	channel.c \
-	class.c \
-	client.c \
-	client-cap.c \
-	conf.c \
-	conn.c \
-	conn-encoding.c \
-	conn-func.c \
-	conn-ssl.c \
-	conn-zip.c \
-	hash.c \
-	io.c \
-	irc.c \
-	irc-cap.c \
-	irc-channel.c \
-	irc-encoding.c \
-	irc-info.c \
-	irc-login.c \
-	irc-metadata.c \
-	irc-mode.c \
-	irc-op.c \
-	irc-oper.c \
-	irc-server.c \
-	irc-write.c \
-	lists.c \
-	log.c \
-	login.c \
-	match.c \
-	numeric.c \
-	op.c \
-	pam.c \
-	parse.c \
-	proc.c \
-	resolve.c \
-	sighandlers.c
-
-ngircd_LDFLAGS = -L../portab -L../tool -L../ipaddr
-
-ngircd_LDADD = -lngportab -lngtool -lngipaddr
-
-noinst_HEADERS = \
-	ngircd.h \
-	array.h \
-	channel.h \
-	class.h \
-	client.h \
-	client-cap.h \
-	conf.h \
-	conf-ssl.h \
-	conn.h \
-	conn-encoding.h \
-	conn-func.h \
-	conn-ssl.h \
-	conn-zip.h \
-	defines.h \
-	hash.h \
-	io.h \
-	irc.h \
-	irc-cap.h \
-	irc-channel.h \
-	irc-encoding.h \
-	irc-info.h \
-	irc-login.h \
-	irc-macros.h \
-	irc-metadata.h \
-	irc-mode.h \
-	irc-op.h \
-	irc-oper.h \
-	irc-server.h \
-	irc-write.h \
-	lists.h \
-	log.h \
-	login.h \
-	match.h \
-	messages.h \
-	numeric.h \
-	op.h \
-	pam.h \
-	parse.h \
-	proc.h \
-	resolve.h \
-	sighandlers.h
-
-clean-local:
-	rm -f check-version check-help
-
-maintainer-clean-local:
-	rm -f Makefile Makefile.in Makefile.am
-
-check-version: Makefile
-	echo "#!/bin/sh" > check-version
-	echo "./ngircd --version | grep ngircd >/dev/null 2>&1" >>check-version
-	chmod 755 check-version
-
-check-help: Makefile
-	echo "#!/bin/sh" > check-help
-	echo "./ngircd --help | grep help >/dev/null 2>&1" >>check-help
-	chmod 755 check-help
-
-TESTS = check-version check-help
-
-# -eof-
diff --git a/src/portab/Makefile b/src/portab/Makefile
new file mode 100644
index 00000000..2814557e
--- /dev/null
+++ b/src/portab/Makefile
@@ -0,0 +1,20 @@
+CFLAGS += -DDOCDIR='"/usr/local/share/doc/ngircd"'
+CFLAGS += -DHAVE_CONFIG_H
+CFLAGS += -I..
+CFLAGS += -I../portab
+CFLAGS += -I../ipaddr
+CFLAGS += -I../tool
+
+OBJS += ansi2knr.o
+OBJS += portabtest.o
+OBJS += strdup.o
+OBJS += strlcpy.o
+OBJS += strndup.o
+OBJS += strtok_r.o
+OBJS += vsnprintf.o
+OBJS += waitpid.o
+
+all: libngportab.a
+
+libngportab.a: ${OBJS}
+	ar rcs libngportab.a ${OBJS}
diff --git a/src/portab/Makefile.ng b/src/portab/Makefile.ng
deleted file mode 100644
index 9be5f567..00000000
--- a/src/portab/Makefile.ng
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2024 Alexander Barton (alex@barton.de) and Contributors
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-# Please read the file COPYING, README and AUTHORS for more information.
-#
-
-__ng_Makefile_am_template__
-
-EXTRA_DIST = Makefile.ng
-
-noinst_LIBRARIES = libngportab.a
-
-libngportab_a_SOURCES = \
-	strdup.c \
-	strlcpy.c \
-	strndup.c \
-	strtok_r.c \
-	vsnprintf.c \
-	waitpid.c
-
-check_PROGRAMS = portabtest
-
-portabtest_SOURCES = portabtest.c
-
-portabtest_LDFLAGS = -L.
-
-portabtest_LDADD = -lngportab
-
-noinst_HEADERS = portab.h
-
-maintainer-clean-local:
-	rm -f Makefile Makefile.in Makefile.am
-
-TESTS = portabtest
-
-# -eof-
diff --git a/src/tool/Makefile b/src/tool/Makefile
new file mode 100644
index 00000000..df41ebae
--- /dev/null
+++ b/src/tool/Makefile
@@ -0,0 +1,13 @@
+CFLAGS += -DDOCDIR='"/usr/local/share/doc/ngircd"'
+CFLAGS += -DHAVE_CONFIG_H
+CFLAGS += -I..
+CFLAGS += -I../portab
+CFLAGS += -I../ipaddr
+CFLAGS += -I../tool
+
+OBJS += tool.o
+
+all: libngtool.a
+
+libngtool.a: ${OBJS}
+	ar rcs libngtool.a ${OBJS}
diff --git a/src/tool/Makefile.ng b/src/tool/Makefile.ng
deleted file mode 100644
index d88bdc94..00000000
--- a/src/tool/Makefile.ng
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-# Please read the file COPYING, README and AUTHORS for more information.
-#
-
-__ng_Makefile_am_template__
-
-EXTRA_DIST = Makefile.ng
-
-AM_CPPFLAGS = -I$(srcdir)/../portab
-
-noinst_LIBRARIES = libngtool.a
-
-libngtool_a_SOURCES = tool.c
-
-noinst_HEADERS = tool.h
-
-maintainer-clean-local:
-	rm -f Makefile Makefile.in Makefile.am
-
-# -eof-