Mercurial > hg > early-roguelike
annotate rogue4/configure.ac @ 227:696277507a2e
Rogue V4, V5: disable a cheat granting permanent monster detection.
In these two games, a potion of monster detection turns on the player's
SEEMONST flag. A fuse is set to call turn_see() to turn the flag back
off. But the save and restore functions do not recognize turn_see() and
fail to set the fuse up again.
When restoring, Rogue V4 merely sets the fuse's function to NULL and
leaves it burning. When it goes off, a segfault results. Rogue V5
clears all the fuse's fields, and the player retains the ability to see
all monsters on the level.
The save and restore code can now handle the fuse. The function used is
a new wrapper, turn_see_off(), which should lead to less problems with
daemons being multiple incompatible types.
Also, Rogue V4 and Super-Rogue now properly clear unrecognized daemon
and fuse slots when restoring a saved game.
author | John "Elwin" Edwards |
---|---|
date | Sat, 05 Mar 2016 12:10:20 -0500 |
parents | 0e99eade579c |
children | c222f9d56776 |
rev | line source |
---|---|
51 | 1 # -*- Autoconf -*- |
2 # Process this file with autoconf to produce a configure script. | |
3 | |
4 AC_PREREQ(2.56) | |
5 AC_INIT([Rogue],[5.2.2], [yendor@rogueforge.net]) | |
6 AC_CONFIG_SRCDIR([armor.c]) | |
7 AC_CONFIG_HEADERS([config.h]) | |
8 AC_CONFIG_FILES([Makefile rogue.6 rogue.me]) | |
9 | |
10 # Checks for programs. | |
11 AC_PROG_CC | |
12 # Checks for libraries. | |
13 MP_WITH_CURSES | |
14 # Checks for header files. | |
15 AC_HEADER_STDC | |
122 | 16 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]) |
51 | 17 |
18 # Checks for typedefs, structures, and compiler characteristics. | |
19 AC_TYPE_UID_T | |
20 AC_TYPE_SIZE_T | |
21 AC_STRUCT_TM | |
22 # Checks for library functions. | |
23 AC_FUNC_FORK | |
24 AC_PROG_GCC_TRADITIONAL | |
25 AC_FUNC_LSTAT | |
26 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK | |
27 AC_TYPE_SIGNAL | |
28 AC_FUNC_STAT | |
29 AC_FUNC_VPRINTF | |
30 AC_CHECK_FUNCS([erasechar killchar alarm getpass memset setenv strchr nlist _spawnl spawnl getpwuid loadav getloadavg strerror setgid setuid getuid getgid]) | |
31 AC_PROG_INSTALL | |
32 | |
33 # Programs to process the documentation | |
34 AC_CHECK_PROG([NROFF], [nroff], [nroff],) | |
35 AC_CHECK_PROG([GROFF], [groff], [groff],) | |
36 AC_CHECK_PROG([COLCRT], [colcrt], [colcrt],) | |
37 AC_CHECK_PROG([TBL], [tbl], [tbl],) | |
38 | |
39 AC_ARG_WITH(program-name, AC_HELP_STRING([--with-program-name=NAME],[alternate executable name]),[progname="$withval" ], [progname="rogue4"] ) | |
40 PROGRAM=$progname | |
41 AC_SUBST(PROGRAM) | |
42 | |
43 AC_ARG_ENABLE(setgid, AC_HELP_STRING([--enable-setgid=NAME],[install executable as setgid with group ownership of NAME @<:@default=no@:>@])],[],[]) | |
44 AC_MSG_CHECKING([if using setgid execute bit]) | |
45 if test "x$enable_setgid" = "xno" ; then | |
46 GROUPOWNER= | |
47 elif test "x$enable_setgid" = "xyes" ; then | |
48 GROUPOWNER=games | |
49 elif test "x$enable_setgid" = "x" ; then | |
50 GROUPOWNER= | |
51 else | |
52 GROUPOWNER=$enable_setgid | |
53 fi | |
54 | |
55 if test "x$GROUPOWNER" != "x" ; then | |
56 AC_DEFINE_UNQUOTED([GROUPOWNER],[$GROUPOWNER], [Define to group owner of setgid executable]) | |
57 AC_MSG_RESULT([$GROUPOWNER]) | |
58 else | |
59 AC_MSG_RESULT([no]) | |
60 fi | |
61 | |
62 AC_SUBST(GROUPOWNER) | |
63 | |
64 AC_ARG_ENABLE([scorefile],[AC_HELP_STRING([--enable-scorefile=SCOREFILE], [enable scoreboard with given filename])],[],[]) | |
65 AC_MSG_CHECKING([for scoreboard file]) | |
66 if test "x$enable_scorefile" = "xno" ; then | |
67 SCOREFILE= | |
68 elif test "x$enable_scorefile" = "xyes" ; then | |
69 SCOREFILE=$progname.scr | |
70 elif test "x$enable_scorefile" = "x" ; then | |
71 SCOREFILE=$progname.scr | |
72 else | |
73 SCOREFILE=$enable_scorefile | |
74 fi | |
75 | |
76 if test "x$SCOREFILE" != "x" ; then | |
77 AC_DEFINE_UNQUOTED([SCOREFILE], ["$SCOREFILE"], [Define to file to use for scoreboard]) | |
78 AC_MSG_RESULT([$SCOREFILE]) | |
79 else | |
80 AC_MSG_RESULT([disabled]) | |
81 fi | |
82 | |
83 AC_SUBST(SCOREFILE) | |
84 | |
85 AC_ARG_ENABLE([logfile],[AC_HELP_STRING([--enable-logfile=LOGFILE], [enable logfile with given filename])],[],[]) | |
86 AC_MSG_CHECKING([for log file]) | |
87 if test "x$enable_logfile" = "xno" ; then | |
88 LOGFILE= | |
89 elif test "x$enable_logfile" = "xyes" ; then | |
90 LOGFILE=$progname.log | |
91 elif test "x$enable_logfile" = "x" ; then | |
92 LOGFILE=$progname.log | |
93 else | |
94 LOGFILE=$enable_logfile | |
95 fi | |
96 | |
97 if test "x$LOGFILE" != "x" ; then | |
98 AC_DEFINE_UNQUOTED([LOGFILE], ["$LOGFILE"], [Define to file to use for log]) | |
99 AC_MSG_RESULT([$LOGFILE]) | |
100 else | |
101 AC_MSG_RESULT([disabled]) | |
102 fi | |
103 | |
104 AC_SUBST(LOGFILE) | |
105 | |
106 AC_ARG_ENABLE([lockfile],[AC_HELP_STRING([--enable-lockfile=LOCKFILE], [enable scoreboard lockfile with given filename])],[],[]) | |
107 AC_MSG_CHECKING([for scoreboard lockfile file]) | |
108 if test "x$enable_lockfile" = "xno" ; then | |
109 LOCKFILE= | |
a1dc75e38e73
rogue4: ported to autoconf. |