git: a03851a45233 - main - emulators/pcem: update to version 17

From: Stefan Eßer <se_at_FreeBSD.org>
Date: Sun, 15 Oct 2023 13:25:20 UTC
The branch main has been updated by se:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a03851a45233a427433600070ca0f65ef9bcd054

commit a03851a45233a427433600070ca0f65ef9bcd054
Author:     Stefan Eßer <se@FreeBSD.org>
AuthorDate: 2023-10-15 13:18:13 +0000
Commit:     Stefan Eßer <se@FreeBSD.org>
CommitDate: 2023-10-15 13:24:12 +0000

    emulators/pcem: update to version 17
    
    The repository used by this port is actively maintained and there
    "dev" branch contains updates and fixes (including for builds on
    aarch64).
    
    Since the maintainer had not updated the port for more than 1 year
    and it had become deprecated, I'm taking over maintainership.
---
 emulators/pcem/Makefile                            |   26 +-
 emulators/pcem/distinfo                            |    6 +-
 emulators/pcem/files/patch-configure               | 6295 ++++++++++++++++++++
 .../pcem/files/patch-src_codegen__allocator.c      |    8 +
 .../pcem/files/patch-src_codegen__backend__arm.c   |   11 +
 .../files/patch-src_codegen__backend__x86-64.c     |   11 +
 .../pcem/files/patch-src_codegen__backend__x86.c   |   11 +
 .../pcem/files/patch-src_codegen__timing__p6.c     |   20 +
 emulators/pcem/files/patch-src_codegen__x86-64.c   |   11 +
 emulators/pcem/files/patch-src_hdd__file.c         |   50 +
 emulators/pcem/files/patch-src_rtc__tc8521.c       |   11 +
 emulators/pcem/files/patch-src_vid__t1000.c        |   11 +
 emulators/pcem/files/patch-src_vid__t3100e.c       |   11 +
 .../files/patch-src_vid__voodoo__codegen__x86-64.h |   11 +
 .../pcem/files/patch-src_vid__voodoo__render.c     |   11 +
 emulators/pcem/files/patch-src_wx-config.c         |   31 +
 emulators/pcem/files/patch-src_wx-sdl2.c           |   20 +
 emulators/pcem/files/patch-src_wx-thread.c         |   11 +
 emulators/pcem/files/patch-src_x86seg.c            |   11 +
 19 files changed, 6560 insertions(+), 17 deletions(-)

diff --git a/emulators/pcem/Makefile b/emulators/pcem/Makefile
index b924554a95c1..9a149d51a6f4 100644
--- a/emulators/pcem/Makefile
+++ b/emulators/pcem/Makefile
@@ -1,31 +1,29 @@
 PORTNAME=	pcem
-DISTVERSION=	14
-PORTREVISION=	2
+DISTVERSIONPREFIX=	v
+DISTVERSION=	17
 CATEGORIES=	emulators
-MASTER_SITES=	https://bitbucket.org/pcem_emulator/pcem/get/
-DISTNAME=	faf5d6423060
 
-MAINTAINER=	darkfm@vera.com.uy
+MAINTAINER=	se@freebsd.org
 COMMENT=	PC/PC-Compatible low-level emulator striving for accuracy
 WWW=		https://www.pcem-emulator.co.uk
 
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-BROKEN_FreeBSD_13=	ld: error: duplicate symbol: CGACONST
-BROKEN_FreeBSD_14=	ld: error: duplicate symbol: CGACONST
-DEPRECATED=	Fails to build and marked broken over a year ago
-EXPIRATION_DATE=2023-11-30
+ONLY_FOR_ARCHS=	amd64
 
-USES=		autoreconf compiler gl gmake localbase:ldflags openal pkgconfig sdl zip
+USES=		autoreconf compiler dos2unix gl gmake localbase:ldflags openal \
+		pkgconfig sdl
+USE_GITHUB=	yes
+GH_ACCOUNT=	sarah-walker-pcem
 USE_GL=		gl
 USE_SDL=	sdl2
 USE_WX=		3.0
 
-WRKSRC=		${WRKDIR}/pcem_emulator-pcem-faf5d6423060/
-PLIST_FILES=	bin/pcem
-CONFIGURE_ARGS=	--enable-release-build --with-wx-config="${WX_CONFIG}"
 GNU_CONFIGURE=	yes
-ONLY_FOR_ARCHS=	amd64
+CONFIGURE_ARGS=	--enable-release-build \
+		--with-wx-config="${WX_CONFIG}"
+
+PLIST_FILES=	bin/pcem
 
 .include <bsd.port.mk>
diff --git a/emulators/pcem/distinfo b/emulators/pcem/distinfo
index 5ebb32de2f5c..64366c3b082f 100644
--- a/emulators/pcem/distinfo
+++ b/emulators/pcem/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1555640654
-SHA256 (faf5d6423060.zip) = c184c1e279b2d77d89bdc02ed6a87d0f79b98863dcef2feca1fff74554e2f19b
-SIZE (faf5d6423060.zip) = 1792228
+TIMESTAMP = 1697375608
+SHA256 (sarah-walker-pcem-pcem-v17_GH0.tar.gz) = bd3b107c467cf88f9647a1970054ce41d416201996e8cf6d47c7bc27ed15d5e3
+SIZE (sarah-walker-pcem-pcem-v17_GH0.tar.gz) = 1868495
diff --git a/emulators/pcem/files/patch-configure b/emulators/pcem/files/patch-configure
new file mode 100644
index 000000000000..14a9996bd10c
--- /dev/null
+++ b/emulators/pcem/files/patch-configure
@@ -0,0 +1,6295 @@
+--- configure.orig	2020-12-01 19:49:05 UTC
++++ configure
+@@ -1,11 +1,12 @@
+ #! /bin/sh
+ # Guess values for system-dependent variables and create Makefiles.
+-# Generated by GNU Autoconf 2.69 for PCem v14.
++# Generated by GNU Autoconf 2.71 for PCem v17.
+ #
+ # Report bugs to <Sarah Walker <pcem@pcem-emulator.co.uk>>.
+ #
+ #
+-# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
++# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
++# Inc.
+ #
+ #
+ # This configure script is free software; the Free Software Foundation
+@@ -16,14 +17,16 @@ DUALCASE=1; export DUALCASE # for MKS sh
+ 
+ # Be more Bourne compatible
+ DUALCASE=1; export DUALCASE # for MKS sh
+-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
++as_nop=:
++if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
++then :
+   emulate sh
+   NULLCMD=:
+   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+   # is contrary to our usage.  Disable this feature.
+   alias -g '${1+"$@"}'='"$@"'
+   setopt NO_GLOB_SUBST
+-else
++else $as_nop
+   case `(set -o) 2>/dev/null` in #(
+   *posix*) :
+     set -o posix ;; #(
+@@ -33,46 +36,46 @@ fi
+ fi
+ 
+ 
++
++# Reset variables that may have inherited troublesome values from
++# the environment.
++
++# IFS needs to be set, to space, tab, and newline, in precisely that order.
++# (If _AS_PATH_WALK were called with IFS unset, it would have the
++# side effect of setting IFS to empty, thus disabling word splitting.)
++# Quoting is to prevent editors from complaining about space-tab.
+ as_nl='
+ '
+ export as_nl
+-# Printing a long string crashes Solaris 7 /usr/bin/printf.
+-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+-# Prefer a ksh shell builtin over an external printf program on Solaris,
+-# but without wasting forks for bash or zsh.
+-if test -z "$BASH_VERSION$ZSH_VERSION" \
+-    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+-  as_echo='print -r --'
+-  as_echo_n='print -rn --'
+-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+-  as_echo='printf %s\n'
+-  as_echo_n='printf %s'
+-else
+-  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+-    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+-    as_echo_n='/usr/ucb/echo -n'
+-  else
+-    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+-    as_echo_n_body='eval
+-      arg=$1;
+-      case $arg in #(
+-      *"$as_nl"*)
+-	expr "X$arg" : "X\\(.*\\)$as_nl";
+-	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+-      esac;
+-      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+-    '
+-    export as_echo_n_body
+-    as_echo_n='sh -c $as_echo_n_body as_echo'
+-  fi
+-  export as_echo_body
+-  as_echo='sh -c $as_echo_body as_echo'
+-fi
++IFS=" ""	$as_nl"
+ 
++PS1='$ '
++PS2='> '
++PS4='+ '
++
++# Ensure predictable behavior from utilities with locale-dependent output.
++LC_ALL=C
++export LC_ALL
++LANGUAGE=C
++export LANGUAGE
++
++# We cannot yet rely on "unset" to work, but we need these variables
++# to be unset--not just set to an empty or harmless value--now, to
++# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
++# also avoids known problems related to "unset" and subshell syntax
++# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
++for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
++do eval test \${$as_var+y} \
++  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
++done
++
++# Ensure that fds 0, 1, and 2 are open.
++if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
++if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
++if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
++
+ # The user is always right.
+-if test "${PATH_SEPARATOR+set}" != set; then
++if ${PATH_SEPARATOR+false} :; then
+   PATH_SEPARATOR=:
+   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+@@ -81,13 +84,6 @@ fi
+ fi
+ 
+ 
+-# IFS
+-# We need space, tab and new line, in precisely that order.  Quoting is
+-# there to prevent editors from complaining about space-tab.
+-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+-# splitting by setting IFS to empty value.)
+-IFS=" ""	$as_nl"
+-
+ # Find who we are.  Look in the path if we contain no directory separator.
+ as_myself=
+ case $0 in #((
+@@ -96,8 +92,12 @@ do
+ for as_dir in $PATH
+ do
+   IFS=$as_save_IFS
+-  test -z "$as_dir" && as_dir=.
+-    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
++  case $as_dir in #(((
++    '') as_dir=./ ;;
++    */) ;;
++    *) as_dir=$as_dir/ ;;
++  esac
++    test -r "$as_dir$0" && as_myself=$as_dir$0 && break
+   done
+ IFS=$as_save_IFS
+ 
+@@ -109,31 +109,11 @@ if test ! -f "$as_myself"; then
+   as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+-  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
++  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+   exit 1
+ fi
+ 
+-# Unset variables that we do not need and which cause bugs (e.g. in
+-# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+-# suppresses any "Segmentation fault" message there.  '((' could
+-# trigger a bug in pdksh 5.2.14.
+-for as_var in BASH_ENV ENV MAIL MAILPATH
+-do eval test x\${$as_var+set} = xset \
+-  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+-done
+-PS1='$ '
+-PS2='> '
+-PS4='+ '
+ 
+-# NLS nuisances.
+-LC_ALL=C
+-export LC_ALL
+-LANGUAGE=C
+-export LANGUAGE
+-
+-# CDPATH.
+-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+-
+ # Use a proper internal environment variable to ensure we don't fall
+   # into an infinite loop, continuously re-executing ourselves.
+   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+@@ -154,20 +134,22 @@ exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+ exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+ # Admittedly, this is quite paranoid, since all the known shells bail
+ # out after a failed `exec'.
+-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+-as_fn_exit 255
++printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
++exit 255
+   fi
+   # We don't want this to propagate to other subprocesses.
+           { _as_can_reexec=; unset _as_can_reexec;}
+ if test "x$CONFIG_SHELL" = x; then
+-  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
++  as_bourne_compatible="as_nop=:
++if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
++then :
+   emulate sh
+   NULLCMD=:
+   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+   # is contrary to our usage.  Disable this feature.
+   alias -g '\${1+\"\$@\"}'='\"\$@\"'
+   setopt NO_GLOB_SUBST
+-else
++else \$as_nop
+   case \`(set -o) 2>/dev/null\` in #(
+   *posix*) :
+     set -o posix ;; #(
+@@ -187,41 +169,52 @@ as_fn_ret_failure && { exitcode=1; echo as_fn_ret_fail
+ as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+ as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+ as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+-if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
++if ( set x; as_fn_ret_success y && test x = \"\$1\" )
++then :
+ 
+-else
++else \$as_nop
+   exitcode=1; echo positional parameters were not saved.
+ fi
+ test x\$exitcode = x0 || exit 1
++blah=\$(echo \$(echo blah))
++test x\"\$blah\" = xblah || exit 1
+ test -x / || exit 1"
+   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
+-  if (eval "$as_required") 2>/dev/null; then :
++  if (eval "$as_required") 2>/dev/null
++then :
+   as_have_required=yes
+-else
++else $as_nop
+   as_have_required=no
+ fi
+-  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
++  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
++then :
+ 
+-else
++else $as_nop
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ as_found=false
+ for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+ do
+   IFS=$as_save_IFS
+-  test -z "$as_dir" && as_dir=.
++  case $as_dir in #(((
++    '') as_dir=./ ;;
++    */) ;;
++    *) as_dir=$as_dir/ ;;
++  esac
+   as_found=:
+   case $as_dir in #(
+ 	 /*)
+ 	   for as_base in sh bash ksh sh5; do
+ 	     # Try only shells that exist, to save several forks.
+-	     as_shell=$as_dir/$as_base
++	     as_shell=$as_dir$as_base
+ 	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+-		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
++		    as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
++then :
+   CONFIG_SHELL=$as_shell as_have_required=yes
+-		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
++		   if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
++then :
+   break 2
+ fi
+ fi
+@@ -229,14 +222,21 @@ done
+        esac
+   as_found=false
+ done
+-$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+-	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+-  CONFIG_SHELL=$SHELL as_have_required=yes
+-fi; }
+ IFS=$as_save_IFS
++if $as_found
++then :
+ 
++else $as_nop
++  if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
++	      as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
++then :
++  CONFIG_SHELL=$SHELL as_have_required=yes
++fi
++fi
+ 
+-      if test "x$CONFIG_SHELL" != x; then :
++
++      if test "x$CONFIG_SHELL" != x
++then :
+   export CONFIG_SHELL
+              # We cannot yet assume a decent shell, so we have to provide a
+ # neutralization value for shells without unset; and this also
+@@ -254,18 +254,19 @@ exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+ exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+ # Admittedly, this is quite paranoid, since all the known shells bail
+ # out after a failed `exec'.
+-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
++printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
+ exit 255
+ fi
+ 
+-    if test x$as_have_required = xno; then :
+-  $as_echo "$0: This script requires a shell more modern than all"
+-  $as_echo "$0: the shells that I found on your system."
+-  if test x${ZSH_VERSION+set} = xset ; then
+-    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+-    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
++    if test x$as_have_required = xno
++then :
++  printf "%s\n" "$0: This script requires a shell more modern than all"
++  printf "%s\n" "$0: the shells that I found on your system."
++  if test ${ZSH_VERSION+y} ; then
++    printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
++    printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
+   else
+-    $as_echo "$0: Please tell bug-autoconf@gnu.org and Sarah Walker
++    printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and Sarah Walker
+ $0: <pcem@pcem-emulator.co.uk> about your system, including
+ $0: any error possibly output before this message. Then
+ $0: install a modern shell, or manually run the script
+@@ -293,6 +294,7 @@ as_unset=as_fn_unset
+ }
+ as_unset=as_fn_unset
+ 
++
+ # as_fn_set_status STATUS
+ # -----------------------
+ # Set $? to STATUS, without forking.
+@@ -310,6 +312,14 @@ as_fn_exit ()
+   as_fn_set_status $1
+   exit $1
+ } # as_fn_exit
++# as_fn_nop
++# ---------
++# Do nothing but, unlike ":", preserve the value of $?.
++as_fn_nop ()
++{
++  return $?
++}
++as_nop=as_fn_nop
+ 
+ # as_fn_mkdir_p
+ # -------------
+@@ -324,7 +334,7 @@ as_fn_mkdir_p ()
+     as_dirs=
+     while :; do
+       case $as_dir in #(
+-      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
++      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+       *) as_qdir=$as_dir;;
+       esac
+       as_dirs="'$as_qdir' $as_dirs"
+@@ -333,7 +343,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| 
+ 	 X"$as_dir" : 'X\(//\)[^/]' \| \
+ 	 X"$as_dir" : 'X\(//\)$' \| \
+ 	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+-$as_echo X"$as_dir" |
++printf "%s\n" X"$as_dir" |
+     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ 	    s//\1/
+ 	    q
+@@ -372,12 +382,13 @@ as_fn_executable_p ()
+ # advantage of any shell optimizations that allow amortized linear growth over
+ # repeated appends, instead of the typical quadratic growth present in naive
+ # implementations.
+-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
++if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
++then :
+   eval 'as_fn_append ()
+   {
+     eval $1+=\$2
+   }'
+-else
++else $as_nop
+   as_fn_append ()
+   {
+     eval $1=\$$1\$2
+@@ -389,18 +400,27 @@ fi # as_fn_append
+ # Perform arithmetic evaluation on the ARGs, and store the result in the
+ # global $as_val. Take advantage of shells that can avoid forks. The arguments
+ # must be portable across $(()) and expr.
+-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
++if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
++then :
+   eval 'as_fn_arith ()
+   {
+     as_val=$(( $* ))
+   }'
+-else
++else $as_nop
+   as_fn_arith ()
+   {
+     as_val=`expr "$@" || test $? -eq 1`
+   }
+ fi # as_fn_arith
+ 
++# as_fn_nop
++# ---------
++# Do nothing but, unlike ":", preserve the value of $?.
++as_fn_nop ()
++{
++  return $?
++}
++as_nop=as_fn_nop
+ 
+ # as_fn_error STATUS ERROR [LINENO LOG_FD]
+ # ----------------------------------------
+@@ -412,9 +432,9 @@ as_fn_error ()
+   as_status=$1; test $as_status -eq 0 && as_status=1
+   if test "$4"; then
+     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
++    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+   fi
+-  $as_echo "$as_me: error: $2" >&2
++  printf "%s\n" "$as_me: error: $2" >&2
+   as_fn_exit $as_status
+ } # as_fn_error
+ 
+@@ -441,7 +461,7 @@ $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ 	 X"$0" : 'X\(//\)$' \| \
+ 	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+-$as_echo X/"$0" |
++printf "%s\n" X/"$0" |
+     sed '/^.*\/\([^/][^/]*\)\/*$/{
+ 	    s//\1/
+ 	    q
+@@ -485,7 +505,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
+       s/-\n.*//
+     ' >$as_me.lineno &&
+   chmod +x "$as_me.lineno" ||
+-    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
++    { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ 
+   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+   # already done that, so ensure we don't try to do so again and fall
+@@ -499,6 +519,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
+   exit
+ }
+ 
++
++# Determine whether it's possible to make 'echo' print without a newline.
++# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
++# for compatibility with existing Makefiles.
+ ECHO_C= ECHO_N= ECHO_T=
+ case `echo -n x` in #(((((
+ -n*)
+@@ -512,6 +536,13 @@ esac
+   ECHO_N='-n';;
+ esac
+ 
++# For backward compatibility with old third-party macros, we provide
++# the shell variables $as_echo and $as_echo_n.  New code should use
++# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
++as_echo='printf %s\n'
++as_echo_n='printf %s'
++
++
+ rm -f conf$$ conf$$.exe conf$$.file
+ if test -d conf$$.dir; then
+   rm -f conf$$.dir/conf$$.file
+@@ -579,8 +610,8 @@ PACKAGE_TARNAME='pcem'
+ # Identity of this package.
+ PACKAGE_NAME='PCem'
+ PACKAGE_TARNAME='pcem'
+-PACKAGE_VERSION='v14'
+-PACKAGE_STRING='PCem v14'
++PACKAGE_VERSION='v17'
++PACKAGE_STRING='PCem v17'
+ PACKAGE_BUGREPORT='Sarah Walker <pcem@pcem-emulator.co.uk>'
+ PACKAGE_URL=''
+ 
+@@ -647,7 +678,6 @@ AMDEP_TRUE
+ AMDEPBACKSLASH
+ AMDEP_FALSE
+ AMDEP_TRUE
+-am__quote
+ am__include
+ DEPDIR
+ OBJEXT
+@@ -661,6 +691,9 @@ AM_V
+ AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V
+ AM_V
++CSCOPE
++ETAGS
++CTAGS
+ am__untar
+ am__tar
+ AMTAR
+@@ -730,7 +763,8 @@ PATH_SEPARATOR
+ PACKAGE_TARNAME
+ PACKAGE_NAME
+ PATH_SEPARATOR
+-SHELL'
++SHELL
++am__quote'
+ ac_subst_files=''
+ ac_user_opts='
+ enable_option_checking
+@@ -834,8 +868,6 @@ do
+   *)    ac_optarg=yes ;;
+   esac
+ 
+-  # Accept the important Cygnus configure options, so we can diagnose typos.
+-
+   case $ac_dashdash$ac_option in
+   --)
+     ac_dashdash=yes ;;
+@@ -876,9 +908,9 @@ do
+     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+     # Reject names that are not valid shell variable names.
+     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+-      as_fn_error $? "invalid feature name: $ac_useropt"
++      as_fn_error $? "invalid feature name: \`$ac_useropt'"
+     ac_useropt_orig=$ac_useropt
+-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
++    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
+     case $ac_user_opts in
+       *"
+ "enable_$ac_useropt"
+@@ -902,9 +934,9 @@ do
+     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+     # Reject names that are not valid shell variable names.
+     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+-      as_fn_error $? "invalid feature name: $ac_useropt"
++      as_fn_error $? "invalid feature name: \`$ac_useropt'"
+     ac_useropt_orig=$ac_useropt
+-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
++    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
+     case $ac_user_opts in
+       *"
+ "enable_$ac_useropt"
+@@ -1115,9 +1147,9 @@ do
+     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+     # Reject names that are not valid shell variable names.
+     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+-      as_fn_error $? "invalid package name: $ac_useropt"
++      as_fn_error $? "invalid package name: \`$ac_useropt'"
+     ac_useropt_orig=$ac_useropt
+-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
++    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
+     case $ac_user_opts in
+       *"
+ "with_$ac_useropt"
+@@ -1131,9 +1163,9 @@ do
+     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+     # Reject names that are not valid shell variable names.
+     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+-      as_fn_error $? "invalid package name: $ac_useropt"
++      as_fn_error $? "invalid package name: \`$ac_useropt'"
+     ac_useropt_orig=$ac_useropt
+-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
++    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
+     case $ac_user_opts in
+       *"
+ "with_$ac_useropt"
+@@ -1177,9 +1209,9 @@ Try \`$0 --help' for more information"
+ 
+   *)
+     # FIXME: should be removed in autoconf 3.0.
+-    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
++    printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
+     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+-      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
++      printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
+     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+     ;;
+ 
+@@ -1195,7 +1227,7 @@ if test -n "$ac_unrecognized_opts"; then
+   case $enable_option_checking in
+     no) ;;
+     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+-    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
++    *)     printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+   esac
+ fi
+ 
+@@ -1259,7 +1291,7 @@ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' 
+ 	 X"$as_myself" : 'X\(//\)[^/]' \| \
+ 	 X"$as_myself" : 'X\(//\)$' \| \
+ 	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+-$as_echo X"$as_myself" |
++printf "%s\n" X"$as_myself" |
+     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ 	    s//\1/
+ 	    q
+@@ -1316,7 +1348,7 @@ if test "$ac_init_help" = "long"; then
+   # Omit some internal or obsolete options to make the list less imposing.
+   # This message is too long to be a string in the A/UX 3.1 sh.
+   cat <<_ACEOF
+-\`configure' configures PCem v14 to adapt to many kinds of systems.
++\`configure' configures PCem v17 to adapt to many kinds of systems.
+ 
+ Usage: $0 [OPTION]... [VAR=VALUE]...
+ 
+@@ -1387,7 +1419,7 @@ if test -n "$ac_init_help"; then
+ 
+ if test -n "$ac_init_help"; then
+   case $ac_init_help in
+-     short | recursive ) echo "Configuration of PCem v14:";;
++     short | recursive ) echo "Configuration of PCem v17:";;
+    esac
+   cat <<\_ACEOF
+ 
+@@ -1458,9 +1490,9 @@ case "$ac_dir" in
+ case "$ac_dir" in
+ .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *)
+-  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
++  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
+   # A ".." for each directory in $ac_dir_suffix.
+-  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
++  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+   case $ac_top_builddir_sub in
+   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+@@ -1488,7 +1520,8 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+ 
+     cd "$ac_dir" || { ac_status=$?; continue; }
+-    # Check for guested configure.
++    # Check for configure.gnu first; this name is used for a wrapper for
++    # Metaconfig's "Configure" on case-insensitive file systems.
+     if test -f "$ac_srcdir/configure.gnu"; then
+       echo &&
+       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+@@ -1496,7 +1529,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+       echo &&
+       $SHELL "$ac_srcdir/configure" --help=recursive
+     else
+-      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
++      printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+     fi || ac_status=$?
+     cd "$ac_pwd" || { ac_status=$?; break; }
+   done
+@@ -1505,10 +1538,10 @@ if $ac_init_version; then
+ test -n "$ac_init_help" && exit $ac_status
+ if $ac_init_version; then
+   cat <<\_ACEOF
+-PCem configure v14
+-generated by GNU Autoconf 2.69
++PCem configure v17
++generated by GNU Autoconf 2.71
+ 
+-Copyright (C) 2012 Free Software Foundation, Inc.
++Copyright (C) 2021 Free Software Foundation, Inc.
+ This configure script is free software; the Free Software Foundation
+ gives unlimited permission to copy, distribute and modify it.
+ _ACEOF
+@@ -1525,14 +1558,14 @@ ac_fn_c_try_compile ()
+ ac_fn_c_try_compile ()
+ {
+   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+-  rm -f conftest.$ac_objext
++  rm -f conftest.$ac_objext conftest.beam
+   if { { ac_try="$ac_compile"
+ case "(($ac_try" in
+   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+   *) ac_try_echo=$ac_try;;
+ esac
+ eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+-$as_echo "$ac_try_echo"; } >&5
++printf "%s\n" "$ac_try_echo"; } >&5
+   (eval "$ac_compile") 2>conftest.err
+   ac_status=$?
+   if test -s conftest.err; then
+@@ -1540,14 +1573,15 @@ $as_echo "$ac_try_echo"; } >&5
+     cat conftest.er1 >&5
+     mv -f conftest.er1 conftest.err
+   fi
+-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+   test $ac_status = 0; } && {
+ 	 test -z "$ac_c_werror_flag" ||
+ 	 test ! -s conftest.err
+-       } && test -s conftest.$ac_objext; then :
++       } && test -s conftest.$ac_objext
++then :
+   ac_retval=0
+-else
+-  $as_echo "$as_me: failed program was:" >&5
++else $as_nop
++  printf "%s\n" "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ 
+ 	ac_retval=1
+@@ -1563,14 +1597,14 @@ ac_fn_cxx_try_compile ()
+ ac_fn_cxx_try_compile ()
+ {
+   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+-  rm -f conftest.$ac_objext
++  rm -f conftest.$ac_objext conftest.beam
+   if { { ac_try="$ac_compile"
+ case "(($ac_try" in
+   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+   *) ac_try_echo=$ac_try;;
+ esac
+ eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+-$as_echo "$ac_try_echo"; } >&5
++printf "%s\n" "$ac_try_echo"; } >&5
+   (eval "$ac_compile") 2>conftest.err
+   ac_status=$?
+   if test -s conftest.err; then
+@@ -1578,14 +1612,15 @@ $as_echo "$ac_try_echo"; } >&5
+     cat conftest.er1 >&5
+     mv -f conftest.er1 conftest.err
+   fi
+-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+   test $ac_status = 0; } && {
+ 	 test -z "$ac_cxx_werror_flag" ||
+ 	 test ! -s conftest.err
+-       } && test -s conftest.$ac_objext; then :
++       } && test -s conftest.$ac_objext
++then :
+   ac_retval=0
+-else
+-  $as_echo "$as_me: failed program was:" >&5
++else $as_nop
++  printf "%s\n" "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ 
+ 	ac_retval=1
+@@ -1601,14 +1636,14 @@ ac_fn_c_try_link ()
+ ac_fn_c_try_link ()
+ {
+   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+-  rm -f conftest.$ac_objext conftest$ac_exeext
++  rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
+   if { { ac_try="$ac_link"
+ case "(($ac_try" in
+   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+   *) ac_try_echo=$ac_try;;
+ esac
+ eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+-$as_echo "$ac_try_echo"; } >&5
++printf "%s\n" "$ac_try_echo"; } >&5
+   (eval "$ac_link") 2>conftest.err
+   ac_status=$?
+   if test -s conftest.err; then
+@@ -1616,17 +1651,18 @@ $as_echo "$ac_try_echo"; } >&5
+     cat conftest.er1 >&5
+     mv -f conftest.er1 conftest.err
+   fi
+-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+   test $ac_status = 0; } && {
+ 	 test -z "$ac_c_werror_flag" ||
+ 	 test ! -s conftest.err
+        } && test -s conftest$ac_exeext && {
+ 	 test "$cross_compiling" = yes ||
+ 	 test -x conftest$ac_exeext
+-       }; then :
++       }
++then :
+   ac_retval=0
+-else
+-  $as_echo "$as_me: failed program was:" >&5
++else $as_nop
++  printf "%s\n" "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ 
+ 	ac_retval=1
+@@ -1643,8 +1679,8 @@ fi
+ 
+ # ac_fn_c_try_run LINENO
+ # ----------------------
+-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+-# that executables *can* be run.
++# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
++# executables *can* be run.
+ ac_fn_c_try_run ()
+ {
+   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+@@ -1654,25 +1690,26 @@ eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_
+   *) ac_try_echo=$ac_try;;
+ esac
+ eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+-$as_echo "$ac_try_echo"; } >&5
++printf "%s\n" "$ac_try_echo"; } >&5
+   (eval "$ac_link") 2>&5
+   ac_status=$?
+-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+   { { case "(($ac_try" in
+   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+   *) ac_try_echo=$ac_try;;
+ esac
+ eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+-$as_echo "$ac_try_echo"; } >&5
++printf "%s\n" "$ac_try_echo"; } >&5
+   (eval "$ac_try") 2>&5
+   ac_status=$?
+-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+-  test $ac_status = 0; }; }; then :
++  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; }
++then :
+   ac_retval=0
+-else
+-  $as_echo "$as_me: program exited with status $ac_status" >&5
+-       $as_echo "$as_me: failed program was:" >&5
++else $as_nop
++  printf "%s\n" "$as_me: program exited with status $ac_status" >&5
++       printf "%s\n" "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ 
+        ac_retval=$ac_status
+@@ -1682,14 +1719,34 @@ fi
+   as_fn_set_status $ac_retval
+ 
+ } # ac_fn_c_try_run
++ac_configure_args_raw=
++for ac_arg
++do
++  case $ac_arg in
++  *\'*)
++    ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
++  esac
++  as_fn_append ac_configure_args_raw " '$ac_arg'"
++done
++
++case $ac_configure_args_raw in
++  *$as_nl*)
++    ac_safe_unquote= ;;
++  *)
++    ac_unsafe_z='|&;<>()$`\\"*?[ ''	' # This string ends in space, tab.
++    ac_unsafe_a="$ac_unsafe_z#~"
++    ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
++    ac_configure_args_raw=`      printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
++esac
++
+ cat >config.log <<_ACEOF
+ This file contains any messages produced by compilers while
+ running configure, to aid debugging if configure makes a mistake.
+ 
+-It was created by PCem $as_me v14, which was
+-generated by GNU Autoconf 2.69.  Invocation command line was
++It was created by PCem $as_me v17, which was
++generated by GNU Autoconf 2.71.  Invocation command line was
+ 
+-  $ $0 $@
++  $ $0$ac_configure_args_raw
+ 
+ _ACEOF
+ exec 5>>config.log
+@@ -1722,8 +1779,12 @@ do
+ for as_dir in $PATH
+ do
+   IFS=$as_save_IFS
+-  test -z "$as_dir" && as_dir=.
+-    $as_echo "PATH: $as_dir"
++  case $as_dir in #(((
++    '') as_dir=./ ;;
++    */) ;;
++    *) as_dir=$as_dir/ ;;
++  esac
++    printf "%s\n" "PATH: $as_dir"
+   done
+ IFS=$as_save_IFS
+ 
+@@ -1758,7 +1819,7 @@ do
+     | -silent | --silent | --silen | --sile | --sil)
+       continue ;;
+     *\'*)
+-      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
++      ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+     esac
+     case $ac_pass in
+     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+@@ -1793,11 +1854,13 @@ trap 'exit_status=$?
+ # WARNING: Use '\'' to represent an apostrophe within the trap.
+ # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
*** 5760 LINES SKIPPED ***