Mercurial > hg > early-roguelike
annotate rogue4/configure.ac @ 296:000b1c5b8d63
UltraRogue: fix inventory collision after save and restore.
Inventory letters are based on "identifiers" stored in objects' o_ident
field. Identifiers are allocated by get_ident(), which keeps a list of
objects that have them, to avoid giving the same identifier to multiple
objects.
The list is not stored in the savefile, so after restore, get_ident()
was not aware of existing identifiers. This resulted in picked-up
objects having the same inventory letters as objects restored from the
file.
The restore code now adds all objects with identifiers to the list.
author | John "Elwin" Edwards |
---|---|
date | Mon, 15 Jan 2018 20:20:35 -0500 |
parents | fe6b7a1a6dfc |
children | 029c1f5c5588 |
rev | line source |
---|---|
51 | 1 # -*- Autoconf -*- |
2 # Process this file with autoconf to produce a configure script. | |
3 | |
4 AC_PREREQ(2.56) | |
287
0b3d1b38998f
Remove version numbers from docdir paths.
John "Elwin" Edwards
parents:
278
diff
changeset
|
5 AC_INIT([Rogue],[5.2.2], [yendor@rogueforge.net], [rogue4]) |
51 | 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 | |
294
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
39 if test "x$GROFF" != "x" ; then |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
40 DOCS_GROFF= |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
41 DOCS_NROFF=.no-nroff |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
42 DOCS_NONE=.none |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
43 elif test "x$(NROFF)" != "x" && test "x$(TBL)" != "x" && test "x$(COLCRT)" != "x" ; then |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
44 DOCS_GROFF=.no-groff |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
45 DOCS_NROFF= |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
46 DOCS_NONE=.none |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
47 else |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
48 DOCS_GROFF=.no-groff |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
49 DOCS_NROFF=.no-nroff |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
50 DOCS_NONE= |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
51 fi |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
52 |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
53 AC_SUBST(DOCS_GROFF) |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
54 AC_SUBST(DOCS_NROFF) |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
55 AC_SUBST(DOCS_NONE) |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
56 |
51 | 57 AC_ARG_WITH(program-name, AC_HELP_STRING([--with-program-name=NAME],[alternate executable name]),[progname="$withval" ], [progname="rogue4"] ) |
58 PROGRAM=$progname | |
59 AC_SUBST(PROGRAM) | |
60 | |
278
c222f9d56776
Remove an extra bracket from some Autoconf macros.
John "Elwin" Edwards
parents:
223
diff
changeset
|
61 AC_ARG_ENABLE(setgid, AC_HELP_STRING([--enable-setgid=NAME],[install executable as setgid with group ownership of NAME @<:@default=no@:>@]),[],[]) |
51 | 62 AC_MSG_CHECKING([if using setgid execute bit]) |
63 if test "x$enable_setgid" = "xno" ; then | |
64 GROUPOWNER= | |
65 elif test "x$enable_setgid" = "xyes" ; then | |
66 GROUPOWNER=games | |
67 elif test "x$enable_setgid" = "x" ; then | |
68 GROUPOWNER= | |
69 else | |
70 GROUPOWNER=$enable_setgid | |
71 fi | |
72 | |
73 if test "x$GROUPOWNER" != "x" ; then | |
74 AC_DEFINE_UNQUOTED([GROUPOWNER],[$GROUPOWNER], [Define to group owner of setgid executable]) | |
75 AC_MSG_RESULT([$GROUPOWNER]) | |
76 else | |
77 AC_MSG_RESULT([no]) | |
78 fi | |
79 | |
80 AC_SUBST(GROUPOWNER) | |
81 | |
82 AC_ARG_ENABLE([scorefile],[AC_HELP_STRING([--enable-scorefile=SCOREFILE], [enable scoreboard with given filename])],[],[]) | |
83 AC_MSG_CHECKING([for scoreboard file]) | |
84 if test "x$enable_scorefile" = "xno" ; then | |
85 SCOREFILE= | |
86 elif test "x$enable_scorefile" = "xyes" ; then | |
87 SCOREFILE=$progname.scr | |
88 elif test "x$enable_scorefile" = "x" ; then | |
89 SCOREFILE=$progname.scr | |
90 else | |
91 SCOREFILE=$enable_scorefile | |
92 fi | |
93 | |
94 if test "x$SCOREFILE" != "x" ; then | |
95 AC_DEFINE_UNQUOTED([SCOREFILE], ["$SCOREFILE"], [Define to file to use for scoreboard]) | |
96 AC_MSG_RESULT([$SCOREFILE]) | |
97 else | |
98 AC_MSG_RESULT([disabled]) | |
99 fi | |
100 | |
101 AC_SUBST(SCOREFILE) | |
102 | |