Mercurial > hg > early-roguelike
annotate urogue/configure.ac @ 315:ad2570b5b21f
Advanced Rogue 5, 7: fix some trading post messages.
When attempting to buy an unaffordable object, messages were often of
the form "You can't afford that a scroll of hold monster !", because
the object description (stored in curpurch) was the same text used in
inventory displays.
This has been worked around by inspecting the contents of curpurch and
using different message templates.
author | John "Elwin" Edwards |
---|---|
date | Sun, 24 Oct 2021 20:26:21 -0400 |
parents | 029c1f5c5588 |
children | aab761616489 |
rev | line source |
---|---|
273 | 1 # -*- Autoconf -*- |
2 # Process this file with autoconf to produce a configure script. | |
3 | |
312 | 4 AC_PREREQ([2.69]) |
5 AC_INIT([UltraRogue],[1.07],[elwin@sdf.org],[urogue]) | |
273 | 6 AC_CONFIG_HEADERS([config.h]) |
7 AC_CONFIG_FILES([Makefile]) | |
8 | |
9 # Checks for programs. | |
10 AC_PROG_CC | |
11 # Checks for libraries. | |
12 MP_WITH_CURSES | |
13 # Checks for header files. | |
14 AC_HEADER_STDC | |
284 | 15 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]) |
273 | 16 |
17 # Checks for typedefs, structures, and compiler characteristics. | |
18 AC_TYPE_UID_T | |
19 AC_TYPE_SIZE_T | |
20 AC_STRUCT_TM | |
21 # Checks for library functions. | |
22 AC_FUNC_FORK | |
23 AC_PROG_GCC_TRADITIONAL | |
24 AC_FUNC_LSTAT | |
25 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK | |
26 AC_FUNC_STAT | |
27 AC_FUNC_VPRINTF | |
28 AC_CHECK_FUNCS([erasechar killchar alarm getpass memset setenv strchr nlist _spawnl spawnl getpwuid loadav getloadavg strerror setgid setuid getuid getgid]) | |
29 AC_PROG_INSTALL | |
30 | |
31 # Programs to process the documentation | |
275
aa0eefcd7df6
UltraRogue: build and install documentation in the Makefile.
John "Elwin" Edwards
parents:
273
diff
changeset
|
32 AC_CHECK_PROG([NROFF], [nroff], [nroff],) |
aa0eefcd7df6
UltraRogue: build and install documentation in the Makefile.
John "Elwin" Edwards
parents:
273
diff
changeset
|
33 AC_CHECK_PROG([GROFF], [groff], [groff],) |
aa0eefcd7df6
UltraRogue: build and install documentation in the Makefile.
John "Elwin" Edwards
parents:
273
diff
changeset
|
34 AC_CHECK_PROG([COLCRT], [colcrt], [colcrt],) |
273 | 35 |
294
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
288
diff
changeset
|
36 if test "x$GROFF" != "x" ; then |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
288
diff
changeset
|
37 DOCS_GROFF= |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
288
diff
changeset
|
38 DOCS_NROFF=.no-nroff |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
288
diff
changeset
|
39 DOCS_NONE=.none |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
288
diff
changeset
|
40 elif test "x$(NROFF)" != "x" && test "x$(COLCRT)" != "x" ; then |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
288
diff
changeset
|
41 DOCS_GROFF=.no-groff |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
288
diff
changeset
|
42 DOCS_NROFF= |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
288
diff
changeset
|
43 DOCS_NONE=.none |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
288
diff
changeset
|
44 else |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
288
diff
changeset
|
45 DOCS_GROFF=.no-groff |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
288
diff
changeset
|
46 DOCS_NROFF=.no-nroff |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
288
diff
changeset
|
47 DOCS_NONE= |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
288
diff
changeset
|
48 fi |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
288
diff
changeset
|
49 |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
288
diff
changeset
|
50 AC_SUBST(DOCS_GROFF) |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
288
diff
changeset
|
51 AC_SUBST(DOCS_NROFF) |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
288
diff
changeset
|
52 AC_SUBST(DOCS_NONE) |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
288
diff
changeset
|
53 |
312 | 54 AC_ARG_WITH(program-name, AS_HELP_STRING([--with-program-name=NAME],[alternate executable name]),[progname="$withval" ], [progname="urogue"] ) |
273 | 55 PROGRAM=$progname |
56 AC_SUBST(PROGRAM) | |
57 | |
312 | 58 AC_ARG_ENABLE(setgid, AS_HELP_STRING([--enable-setgid=NAME],[install executable as setgid with group ownership of NAME @<:@default=no@:>@]),[],[]) |
273 | 59 AC_MSG_CHECKING([if using setgid execute bit]) |
60 if test "x$enable_setgid" = "xno" ; then | |
61 GROUPOWNER= | |
62 elif test "x$enable_setgid" = "xyes" ; then | |
63 GROUPOWNER=games | |
64 elif test "x$enable_setgid" = "x" ; then | |
65 GROUPOWNER= | |
66 else | |
67 GROUPOWNER=$enable_setgid | |
68 fi | |
69 | |
70 if test "x$GROUPOWNER" != "x" ; then | |
71 AC_DEFINE_UNQUOTED([GROUPOWNER],[$GROUPOWNER], [Define to group owner of setgid executable]) | |
72 AC_MSG_RESULT([$GROUPOWNER]) | |
73 else | |
74 AC_MSG_RESULT([no]) | |
75 fi | |
76 | |
77 AC_SUBST(GROUPOWNER) | |
78 | |
312 | 79 AC_ARG_ENABLE([scorefile],[AS_HELP_STRING([--enable-scorefile=SCOREFILE],[enable scoreboard with given filename])],[],[]) |
273 | 80 AC_MSG_CHECKING([for scoreboard file]) |
81 if test "x$enable_scorefile" = "xno" ; then | |
82 SCOREFILE= | |
83 elif test "x$enable_scorefile" = "xyes" ; then | |
84 SCOREFILE=$progname.scr | |
85 elif test "x$enable_scorefile" = "x" ; then | |
86 SCOREFILE=$progname.scr | |
87 else | |
88 SCOREFILE=$enable_scorefile | |
89 fi | |
90 | |
91 if test "x$SCOREFILE" != "x" ; then | |
92 AC_DEFINE_UNQUOTED([SCOREFILE], ["$SCOREFILE"], [Define to file to use for scoreboard]) | |
93 AC_MSG_RESULT([$SCOREFILE]) | |
94 else | |
95 AC_MSG_RESULT([disabled]) | |
96 fi | |
97 | |
98 AC_SUBST(SCOREFILE) | |
99 | |
312 | 100 AC_ARG_ENABLE([logfile],[AS_HELP_STRING([--enable-logfile=LOGFILE],[enable logfile with given filename])],[],[]) |
273 | 101 AC_MSG_CHECKING([for log file]) |
102 if test "x$enable_logfile" = "xno" ; then | |
103 LOGFILE= | |
104 elif test "x$enable_logfile" = "xyes" ; then | |
105 LOGFILE=$progname.log | |
106 elif test "x$enable_logfile" = "x" ; then | |
107 LOGFILE=$progname.log | |
108 else | |
109 LOGFILE=$enable_logfile | |
110 fi | |
111 | |
112 if test "x$LOGFILE" != "x" ; then | |
113 AC_DEFINE_UNQUOTED([LOGFILE], ["$LOGFILE"], [Define to file to use for log]) | |
114 AC_MSG_RESULT([$LOGFILE]) | |
115 else | |
116 AC_MSG_RESULT([disabled]) | |
117 fi | |
118 | |
119 AC_SUBST(LOGFILE) | |
120 | |
312 | 121 AC_ARG_ENABLE([savedir],[AS_HELP_STRING([--enable-savedir=SAVEDIR],[enable systemwide location for saved games])],[],[enable_savedir="no"]) |
273 | 122 AC_MSG_CHECKING([for save directory]) |
123 if test "x$enable_savedir" = "xno" ; then | |
124 SAVEDIR= | |
125 elif test "x$enable_savedir" = "xyes" -o "x$enable_savedir" = "x"; then | |
126 if test "x$GROUPOWNER" != "x"; then | |
127 SAVEDIR="/var/local/games/roguelike/${progname}save/" | |
128 else | |
129 SAVEDIR="$progname/" | |
130 fi | |
131 else | |
132 SAVEDIR="$enable_savedir" | |
133 fi | |
134 | |
135 if test "x$SAVEDIR" != "x" ; then | |
136 AC_DEFINE_UNQUOTED([SAVEDIR], ["$SAVEDIR"], [Define to systemwide directory for storing saved games]) | |
137 AC_MSG_RESULT([$SAVEDIR]) | |
138 else | |
139 AC_MSG_RESULT([disabled]) | |
140 fi | |
141 | |
142 AC_SUBST(SAVEDIR) | |
143 | |
312 | 144 AC_ARG_ENABLE([chardir],[AS_HELP_STRING([--enable-chardir=CHARDIR],[enable systemwide location for character files])],[],[enable_chardir="no"]) |
273 | 145 AC_MSG_CHECKING([for character directory]) |
146 if test "x$enable_chardir" = "xno" ; then | |
147 CHARDIR= | |
148 elif test "x$enable_chardir" = "xyes" -o "x$enable_chardir" = "x"; then | |
149 if test "x$GROUPOWNER" != "x"; then | |
150 CHARDIR="/var/local/games/roguelike/${progname}char/" | |
151 else | |
152 CHARDIR="$progname/" | |
153 fi | |
154 else | |
155 CHARDIR="$enable_chardir" | |
156 fi | |
157 | |
158 if test "x$CHARDIR" != "x" ; then | |
159 AC_DEFINE_UNQUOTED([CHARDIR], ["$CHARDIR"], [Define to systemwide directory for storing character files]) | |
160 AC_MSG_RESULT([$CHARDIR]) | |
161 else | |
162 AC_MSG_RESULT([disabled]) | |
163 fi | |
164 | |
165 AC_SUBST(CHARDIR) | |
166 | |
312 | 167 AC_ARG_ENABLE([wizardmode],[AS_HELP_STRING([--enable-wizardmode],[enable availability of wizard mode @<:@default=no@:>@])],[],[]) |
273 | 168 AC_MSG_CHECKING([if wizard mode is enabled]) |
169 if test "x$enable_wizardmode" = "xno" ; then | |
170 AC_MSG_RESULT([no]) | |
171 elif test "x$enable_wizardmode" = "x" ; then | |
172 AC_MSG_RESULT([no]) | |
173 else | |
174 AC_DEFINE([WIZARD], [], [Define to include wizard mode]) | |
175 AC_MSG_RESULT([yes]) | |
176 fi | |
177 | |
312 | 178 AC_ARG_ENABLE([memdebug],[AS_HELP_STRING([--enable-memdebug],[enable built-in memory checking @<:@default=no@:>@])],[],[]) |
288
b8919055c2fc
UltraRogue: compile out the built-in memory checking.
John "Elwin" Edwards
parents:
287
diff
changeset
|
179 AC_MSG_CHECKING([if memory checking is enabled]) |
b8919055c2fc
UltraRogue: compile out the built-in memory checking.
John "Elwin" Edwards
parents:
287
diff
changeset
|
180 if test "x$enable_memdebug" = "xno" ; then |
b8919055c2fc
UltraRogue: compile out the built-in memory checking.
John "Elwin" Edwards
parents:
287
diff
changeset
|
181 AC_MSG_RESULT([no]) |
b8919055c2fc
UltraRogue: compile out the built-in memory checking.
John "Elwin" Edwards
parents:
287
diff
changeset
|
182 elif test "x$enable_memdebug" = "x" ; then |
b8919055c2fc
UltraRogue: compile out the built-in memory checking.
John "Elwin" Edwards
parents:
287
diff
changeset
|
183 AC_MSG_RESULT([no]) |
b8919055c2fc
UltraRogue: compile out the built-in memory checking.
John "Elwin" Edwards
parents:
287
diff
changeset
|
184 else |
b8919055c2fc
UltraRogue: compile out the built-in memory checking.
John "Elwin" Edwards
parents:
287
diff
changeset
|
185 AC_DEFINE([MEM_DEBUG], [], [Define to enable built-in memory checking]) |
b8919055c2fc
UltraRogue: compile out the built-in memory checking.
John "Elwin" Edwards
parents:
287
diff
changeset
|
186 AC_MSG_RESULT([yes]) |
b8919055c2fc
UltraRogue: compile out the built-in memory checking.
John "Elwin" Edwards
parents:
287
diff
changeset
|
187 fi |
b8919055c2fc
UltraRogue: compile out the built-in memory checking.
John "Elwin" Edwards
parents:
287
diff
changeset
|
188 |
273 | 189 AC_OUTPUT |