Rearrange some Autoconf files.

Autoconf was failing to detect install-sh at the top level and needed
some explicit directions.  It also wants config.guess and config.sub to
be provided too.

A few other macros have also been updated.
This commit is contained in:
John "Elwin" Edwards 2023-09-05 20:05:24 -04:00
parent 8a4bf37667
commit 35c5e434e6
11 changed files with 3746 additions and 76 deletions

View file

@ -5,13 +5,13 @@ AC_PREREQ([2.69])
AC_INIT([Advanced Rogue],[5.8.2],[elwin@sdf.org],[arogue5]) AC_INIT([Advanced Rogue],[5.8.2],[elwin@sdf.org],[arogue5])
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([Makefile])
AC_CONFIG_AUX_DIR([../build-aux])
# Checks for programs. # Checks for programs.
AC_PROG_CC AC_PROG_CC
# Checks for libraries. # Checks for libraries.
MP_WITH_CURSES MP_WITH_CURSES
# Checks for header files. # Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([pwd.h errno.h fcntl.h limits.h nlist.h stdlib.h string.h sys/ioctl.h sys/utsname.h termios.h unistd.h utmp.h term.h ncurses/term.h process.h arpa/inet.h]) AC_CHECK_HEADERS([pwd.h errno.h fcntl.h limits.h nlist.h stdlib.h string.h sys/ioctl.h sys/utsname.h termios.h unistd.h utmp.h term.h ncurses/term.h process.h arpa/inet.h])
# Checks for typedefs, structures, and compiler characteristics. # Checks for typedefs, structures, and compiler characteristics.

View file

@ -5,13 +5,13 @@ AC_PREREQ([2.69])
AC_INIT([Advanced Rogue],[7.7.1],[elwin@sdf.org],[arogue7]) AC_INIT([Advanced Rogue],[7.7.1],[elwin@sdf.org],[arogue7])
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([Makefile])
AC_CONFIG_AUX_DIR([../build-aux])
# Checks for programs. # Checks for programs.
AC_PROG_CC AC_PROG_CC
# Checks for libraries. # Checks for libraries.
MP_WITH_CURSES MP_WITH_CURSES
# Checks for header files. # Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([pwd.h errno.h fcntl.h limits.h stdlib.h string.h sys/ioctl.h sys/utsname.h termios.h unistd.h utmp.h term.h ncurses/term.h process.h arpa/inet.h]) AC_CHECK_HEADERS([pwd.h errno.h fcntl.h limits.h stdlib.h string.h sys/ioctl.h sys/utsname.h termios.h unistd.h utmp.h term.h ncurses/term.h process.h arpa/inet.h])
# Checks for typedefs, structures, and compiler characteristics. # Checks for typedefs, structures, and compiler characteristics.

1768
build-aux/config.guess vendored Executable file

File diff suppressed because it is too large Load diff

1890
build-aux/config.sub vendored Executable file

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
#!/bin/sh #!/usr/bin/sh
# install - install a program, script, or datafile # install - install a program, script, or datafile
scriptversion=2018-03-11.20; # UTC scriptversion=2020-11-14.01; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was # This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the # later released in X11R6 (xc/config/util/install.sh) with the
@ -69,6 +69,11 @@ posix_mkdir=
# Desired mode of installed file. # Desired mode of installed file.
mode=0755 mode=0755
# Create dirs (including intermediate dirs) using mode 755.
# This is like GNU 'install' as of coreutils 8.32 (2020).
mkdir_umask=22
backupsuffix=
chgrpcmd= chgrpcmd=
chmodcmd=$chmodprog chmodcmd=$chmodprog
chowncmd= chowncmd=
@ -99,18 +104,28 @@ Options:
--version display version info and exit. --version display version info and exit.
-c (ignored) -c (ignored)
-C install only if different (preserve the last data modification time) -C install only if different (preserve data modification time)
-d create directories instead of installing files. -d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP. -g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE. -m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER. -o USER $chownprog installed files to USER.
-p pass -p to $cpprog.
-s $stripprog installed files. -s $stripprog installed files.
-S SUFFIX attempt to back up existing files, with suffix SUFFIX.
-t DIRECTORY install into DIRECTORY. -t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory. -T report an error if DSTFILE is a directory.
Environment variables override the default commands: Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG RMPROG STRIPPROG
By default, rm is invoked with -f; when overridden with RMPROG,
it's up to you to specify -f if you want it.
If -S is not specified, no backups are attempted.
Email bug reports to bug-automake@gnu.org.
Automake home page: https://www.gnu.org/software/automake/
" "
while test $# -ne 0; do while test $# -ne 0; do
@ -137,8 +152,13 @@ while test $# -ne 0; do
-o) chowncmd="$chownprog $2" -o) chowncmd="$chownprog $2"
shift;; shift;;
-p) cpprog="$cpprog -p";;
-s) stripcmd=$stripprog;; -s) stripcmd=$stripprog;;
-S) backupsuffix="$2"
shift;;
-t) -t)
is_target_a_directory=always is_target_a_directory=always
dst_arg=$2 dst_arg=$2
@ -255,6 +275,10 @@ do
dstdir=$dst dstdir=$dst
test -d "$dstdir" test -d "$dstdir"
dstdir_status=$? dstdir_status=$?
# Don't chown directories that already exist.
if test $dstdir_status = 0; then
chowncmd=""
fi
else else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
@ -301,22 +325,6 @@ do
if test $dstdir_status != 0; then if test $dstdir_status != 0; then
case $posix_mkdir in case $posix_mkdir in
'') '')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode. # With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask. # Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then if test -n "$dir_arg"; then
@ -326,22 +334,20 @@ do
fi fi
posix_mkdir=false posix_mkdir=false
case $umask in # The $RANDOM variable is not portable (e.g., dash). Use it
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
# Note that $RANDOM variable is not portable (e.g. dash); Use it
# here however when possible just to lower collision chance. # here however when possible just to lower collision chance.
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 trap '
ret=$?
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
exit $ret
' 0
# Because "mkdir -p" follows existing symlinks and we likely work # Because "mkdir -p" follows existing symlinks and we likely work
# directly in world-writeable /tmp, make sure that the '$tmpdir' # directly in world-writeable /tmp, make sure that the '$tmpdir'
# directory is successfully created first before we actually test # directory is successfully created first before we actually test
# 'mkdir -p' feature. # 'mkdir -p'.
if (umask $mkdir_umask && if (umask $mkdir_umask &&
$mkdirprog $mkdir_mode "$tmpdir" && $mkdirprog $mkdir_mode "$tmpdir" &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
@ -371,7 +377,6 @@ do
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
fi fi
trap '' 0;; trap '' 0;;
esac;;
esac esac
if if
@ -382,7 +387,7 @@ do
then : then :
else else
# The umask is ridiculous, or mkdir does not conform to POSIX, # mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the # or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go. # directory the slow way, step by step, checking for races as we go.
@ -411,7 +416,7 @@ do
prefixes= prefixes=
else else
if $posix_mkdir; then if $posix_mkdir; then
(umask=$mkdir_umask && (umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently. # Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1 test -d "$prefix" || exit 1
@ -488,6 +493,13 @@ do
then then
rm -f "$dsttmp" rm -f "$dsttmp"
else else
# If $backupsuffix is set, and the file being installed
# already exists, attempt a backup. Don't worry if it fails,
# e.g., if mv doesn't support -f.
if test -n "$backupsuffix" && test -f "$dst"; then
$doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
fi
# Rename the file to the real destination. # Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
@ -502,9 +514,9 @@ do
# file should still install successfully. # file should still install successfully.
{ {
test ! -f "$dst" || test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null || $doit $rmcmd "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } { $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
} || } ||
{ echo "$0: cannot unlink or rename $dst" >&2 { echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1 (exit 1); exit 1

View file

@ -5,13 +5,13 @@ AC_PREREQ([2.69])
AC_INIT([Rogue],[3.6.4],[elwin@sdf.org],[rogue3]) AC_INIT([Rogue],[3.6.4],[elwin@sdf.org],[rogue3])
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile rogue.6 rogue.r]) AC_CONFIG_FILES([Makefile rogue.6 rogue.r])
AC_CONFIG_AUX_DIR([../build-aux])
# Checks for programs. # Checks for programs.
AC_PROG_CC AC_PROG_CC
# Checks for libraries. # Checks for libraries.
MP_WITH_CURSES MP_WITH_CURSES
# Checks for header files. # Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([arpa/inet.h pwd.h errno.h fcntl.h limits.h nlist.h stdlib.h string.h sys/ioctl.h termios.h unistd.h utmp.h utmpx.h term.h ncurses/term.h process.h]) AC_CHECK_HEADERS([arpa/inet.h pwd.h errno.h fcntl.h limits.h nlist.h stdlib.h string.h sys/ioctl.h termios.h unistd.h utmp.h utmpx.h term.h ncurses/term.h process.h])
# Checks for typedefs, structures, and compiler characteristics. # Checks for typedefs, structures, and compiler characteristics.

View file

@ -6,13 +6,13 @@ AC_INIT([Rogue],[5.2.2],[elwin@sdf.org],[rogue4])
AC_CONFIG_SRCDIR([armor.c]) AC_CONFIG_SRCDIR([armor.c])
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile rogue.6 rogue.me]) AC_CONFIG_FILES([Makefile rogue.6 rogue.me])
AC_CONFIG_AUX_DIR([../build-aux])
# Checks for programs. # Checks for programs.
AC_PROG_CC AC_PROG_CC
# Checks for libraries. # Checks for libraries.
MP_WITH_CURSES MP_WITH_CURSES
# Checks for header files. # Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([arpa/inet.h sys/utsname.h pwd.h fcntl.h limits.h nlist.h stdlib.h string.h sys/ioctl.h termios.h unistd.h utmpx.h term.h ncurses/term.h process.h]) AC_CHECK_HEADERS([arpa/inet.h sys/utsname.h pwd.h fcntl.h limits.h nlist.h stdlib.h string.h sys/ioctl.h termios.h unistd.h utmpx.h term.h ncurses/term.h process.h])
# Checks for typedefs, structures, and compiler characteristics. # Checks for typedefs, structures, and compiler characteristics.

View file

@ -4,8 +4,9 @@
AC_PREREQ([2.69]) AC_PREREQ([2.69])
AC_INIT([Rogue],[5.4.5],[elwin@sdf.org],[rogue5]) AC_INIT([Rogue],[5.4.5],[elwin@sdf.org],[rogue5])
AC_CONFIG_SRCDIR([armor.c]) AC_CONFIG_SRCDIR([armor.c])
AC_CONFIG_HEADER([config.h]) AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile rogue.6 rogue.me rogue.html]) AC_CONFIG_FILES([Makefile rogue.6 rogue.me rogue.html])
AC_CONFIG_AUX_DIR([../build-aux])
# Checks for programs. # Checks for programs.
AC_PROG_CC AC_PROG_CC
@ -14,7 +15,6 @@ AC_PROG_INSTALL
# Checks for libraries. # Checks for libraries.
# Checks for header files. # Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([arpa/inet.h sys/utsname.h pwd.h fcntl.h limits.h nlist.h stdlib.h string.h sys/ioctl.h termios.h unistd.h utmp.h term.h ncurses/term.h process.h]) AC_CHECK_HEADERS([arpa/inet.h sys/utsname.h pwd.h fcntl.h limits.h nlist.h stdlib.h string.h sys/ioctl.h termios.h unistd.h utmp.h term.h ncurses/term.h process.h])
# Checks for typedefs, structures, and compiler characteristics. # Checks for typedefs, structures, and compiler characteristics.

View file

@ -5,13 +5,13 @@ AC_PREREQ([2.69])
AC_INIT([Super-Rogue],[9.0],[elwin@sdf.org],[srogue]) AC_INIT([Super-Rogue],[9.0],[elwin@sdf.org],[srogue])
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([Makefile])
AC_CONFIG_AUX_DIR([../build-aux])
# Checks for programs. # Checks for programs.
AC_PROG_CC AC_PROG_CC
# Checks for libraries. # Checks for libraries.
MP_WITH_CURSES MP_WITH_CURSES
# Checks for header files. # Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([arpa/inet.h pwd.h errno.h fcntl.h limits.h nlist.h stdlib.h string.h sys/ioctl.h termios.h unistd.h term.h ncurses/term.h process.h]) AC_CHECK_HEADERS([arpa/inet.h pwd.h errno.h fcntl.h limits.h nlist.h stdlib.h string.h sys/ioctl.h termios.h unistd.h term.h ncurses/term.h process.h])
# Checks for typedefs, structures, and compiler characteristics. # Checks for typedefs, structures, and compiler characteristics.

View file

@ -5,13 +5,13 @@ AC_PREREQ([2.69])
AC_INIT([UltraRogue],[1.07],[elwin@sdf.org],[urogue]) AC_INIT([UltraRogue],[1.07],[elwin@sdf.org],[urogue])
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([Makefile])
AC_CONFIG_AUX_DIR([../build-aux])
# Checks for programs. # Checks for programs.
AC_PROG_CC AC_PROG_CC
# Checks for libraries. # Checks for libraries.
MP_WITH_CURSES MP_WITH_CURSES
# Checks for header files. # Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([pwd.h errno.h fcntl.h limits.h nlist.h stdlib.h string.h sys/ioctl.h termios.h unistd.h utmp.h utmpx.h term.h ncurses/term.h process.h arpa/inet.h]) AC_CHECK_HEADERS([pwd.h errno.h fcntl.h limits.h nlist.h stdlib.h string.h sys/ioctl.h termios.h unistd.h utmp.h utmpx.h term.h ncurses/term.h process.h arpa/inet.h])
# Checks for typedefs, structures, and compiler characteristics. # Checks for typedefs, structures, and compiler characteristics.

View file

@ -5,13 +5,13 @@ AC_PREREQ([2.69])
AC_INIT([XRogue],[8.0.3],[elwin@sdf.org],[xrogue]) AC_INIT([XRogue],[8.0.3],[elwin@sdf.org],[xrogue])
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([Makefile])
AC_CONFIG_AUX_DIR([../build-aux])
# Checks for programs. # Checks for programs.
AC_PROG_CC AC_PROG_CC
# Checks for libraries. # Checks for libraries.
MP_WITH_CURSES MP_WITH_CURSES
# Checks for header files. # Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([pwd.h errno.h fcntl.h limits.h stdlib.h string.h sys/ioctl.h sys/utsname.h termios.h unistd.h term.h ncurses/term.h process.h arpa/inet.h]) AC_CHECK_HEADERS([pwd.h errno.h fcntl.h limits.h stdlib.h string.h sys/ioctl.h sys/utsname.h termios.h unistd.h term.h ncurses/term.h process.h arpa/inet.h])
# Checks for typedefs, structures, and compiler characteristics. # Checks for typedefs, structures, and compiler characteristics.