comparison rogue5/configure.ac @ 312:029c1f5c5588

Update the Autoconf files. These are mostly automatic updates for obsolete macros.
author John "Elwin" Edwards
date Tue, 11 May 2021 22:30:03 -0400
parents fe6b7a1a6dfc
children aab761616489
comparison
equal deleted inserted replaced
311:28e22fb35989 312:029c1f5c5588
1 # -*- Autoconf -*- 1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script. 2 # Process this file with autoconf to produce a configure script.
3 3
4 AC_PREREQ(2.56) 4 AC_PREREQ([2.69])
5 AC_INIT([Rogue],[5.4.5], [yendor@rogueforge.net], [rogue5]) 5 AC_INIT([Rogue],[5.4.5],[elwin@sdf.org],[rogue5])
6 AC_CONFIG_SRCDIR([armor.c]) 6 AC_CONFIG_SRCDIR([armor.c])
7 AC_CONFIG_HEADER([config.h]) 7 AC_CONFIG_HEADER([config.h])
8 AC_CONFIG_FILES([Makefile rogue.6 rogue.me rogue.html]) 8 AC_CONFIG_FILES([Makefile rogue.6 rogue.me rogue.html])
9 9
10 # Checks for programs. 10 # Checks for programs.
27 # Checks for library functions. 27 # Checks for library functions.
28 AC_FUNC_FORK 28 AC_FUNC_FORK
29 AC_PROG_GCC_TRADITIONAL 29 AC_PROG_GCC_TRADITIONAL
30 AC_FUNC_LSTAT 30 AC_FUNC_LSTAT
31 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK 31 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
32 AC_TYPE_SIGNAL
33 AC_FUNC_STAT 32 AC_FUNC_STAT
34 AC_FUNC_VPRINTF 33 AC_FUNC_VPRINTF
35 AC_CHECK_FUNCS([erasechar killchar alarm getpass memset setenv strchr nlist _spawnl spawnl getpwuid loadav getloadavg strerror setresgid setregid setgid setresuid setreuid setuid getuid getgid]) 34 AC_CHECK_FUNCS([erasechar killchar alarm getpass memset setenv strchr nlist _spawnl spawnl getpwuid loadav getloadavg strerror setresgid setregid setgid setresuid setreuid setuid getuid getgid])
36 35
37 AC_CHECK_PROG([NROFF], [nroff], [nroff],) 36 AC_CHECK_PROG([NROFF], [nroff], [nroff],)
55 54
56 AC_SUBST(DOCS_GROFF) 55 AC_SUBST(DOCS_GROFF)
57 AC_SUBST(DOCS_NROFF) 56 AC_SUBST(DOCS_NROFF)
58 AC_SUBST(DOCS_NONE) 57 AC_SUBST(DOCS_NONE)
59 58
60 AC_ARG_WITH(program-name, AC_HELP_STRING([--with-program-name=NAME],[alternate executable name]),[progname="$withval" ], [progname="rogue5"] ) 59 AC_ARG_WITH(program-name, AS_HELP_STRING([--with-program-name=NAME],[alternate executable name]),[progname="$withval" ], [progname="rogue5"] )
61 PROGRAM=$progname 60 PROGRAM=$progname
62 AC_SUBST(PROGRAM) 61 AC_SUBST(PROGRAM)
63 62
64 AC_ARG_ENABLE(setgid, AC_HELP_STRING([--enable-setgid=NAME],[install executable as setgid with group ownership of NAME @<:@default=no@:>@]),[],[]) 63 AC_ARG_ENABLE(setgid, AS_HELP_STRING([--enable-setgid=NAME],[install executable as setgid with group ownership of NAME @<:@default=no@:>@]),[],[])
65 AC_MSG_CHECKING([if using setgid execute bit]) 64 AC_MSG_CHECKING([if using setgid execute bit])
66 if test "x$enable_setgid" = "xno" ; then 65 if test "x$enable_setgid" = "xno" ; then
67 GROUPOWNER= 66 GROUPOWNER=
68 elif test "x$enable_setgid" = "xyes" ; then 67 elif test "x$enable_setgid" = "xyes" ; then
69 GROUPOWNER=games 68 GROUPOWNER=games
80 AC_MSG_RESULT([no]) 79 AC_MSG_RESULT([no])
81 fi 80 fi
82 81
83 AC_SUBST(GROUPOWNER) 82 AC_SUBST(GROUPOWNER)
84 83
85 AC_ARG_ENABLE([scorefile],[AC_HELP_STRING([--enable-scorefile=SCOREFILE], [enable scoreboard with given filename])],[],[]) 84 AC_ARG_ENABLE([scorefile],[AS_HELP_STRING([--enable-scorefile=SCOREFILE],[enable scoreboard with given filename])],[],[])
86 AC_MSG_CHECKING([for scoreboard file]) 85 AC_MSG_CHECKING([for scoreboard file])
87 if test "x$enable_scorefile" = "xno" ; then 86 if test "x$enable_scorefile" = "xno" ; then
88 SCOREFILE= 87 SCOREFILE=
89 elif test "x$enable_scorefile" = "xyes" ; then 88 elif test "x$enable_scorefile" = "xyes" ; then
90 SCOREFILE=$progname.scr 89 SCOREFILE=$progname.scr
101 AC_MSG_RESULT([disabled]) 100 AC_MSG_RESULT([disabled])
102 fi 101 fi
103 102
104 AC_SUBST(SCOREFILE) 103 AC_SUBST(SCOREFILE)
105 104
106 AC_ARG_ENABLE([logfile],[AC_HELP_STRING([--enable-logfile=LOGFILE], [enable logfile with given filename])],[],[]) 105 AC_ARG_ENABLE([logfile],[AS_HELP_STRING([--enable-logfile=LOGFILE],[enable logfile with given filename])],[],[])
107 AC_MSG_CHECKING([for log file]) 106 AC_MSG_CHECKING([for log file])
108 if test "x$enable_logfile" = "xno" ; then 107 if test "x$enable_logfile" = "xno" ; then
109 LOGFILE= 108 LOGFILE=
110 elif test "x$enable_logfile" = "xyes" ; then 109 elif test "x$enable_logfile" = "xyes" ; then
111 LOGFILE=$progname.log 110 LOGFILE=$progname.log
122 AC_MSG_RESULT([disabled]) 121 AC_MSG_RESULT([disabled])
123 fi 122 fi
124 123
125 AC_SUBST(LOGFILE) 124 AC_SUBST(LOGFILE)
126 125
127 AC_ARG_ENABLE([lockfile],[AC_HELP_STRING([--enable-lockfile=LOCKFILE], [enable scoreboard lockfile with given filename])],[],[]) 126 AC_ARG_ENABLE([lockfile],[AS_HELP_STRING([--enable-lockfile=LOCKFILE],[enable scoreboard lockfile with given filename])],[],[])
128 AC_MSG_CHECKING([for scoreboard lockfile file]) 127 AC_MSG_CHECKING([for scoreboard lockfile file])
129 if test "x$enable_lockfile" = "xno" ; then 128 if test "x$enable_lockfile" = "xno" ; then
130 LOCKFILE= 129 LOCKFILE=
131 elif test "x$enable_lockfile" = "xyes" ; then 130 elif test "x$enable_lockfile" = "xyes" ; then
132 LOCKFILE=$progname.lck 131 LOCKFILE=$progname.lck
143 AC_MSG_RESULT([disabled]) 142 AC_MSG_RESULT([disabled])
144 fi 143 fi
145 144
146 AC_SUBST(LOCKFILE) 145 AC_SUBST(LOCKFILE)
147 146
148 AC_ARG_ENABLE([savedir],[AC_HELP_STRING([--enable-savedir=SAVEDIR], [enable systemwide location for saved games])],[],[enable_savedir="no"]) 147 AC_ARG_ENABLE([savedir],[AS_HELP_STRING([--enable-savedir=SAVEDIR],[enable systemwide location for saved games])],[],[enable_savedir="no"])
149 AC_MSG_CHECKING([for save directory]) 148 AC_MSG_CHECKING([for save directory])
150 if test "x$enable_savedir" = "xno" ; then 149 if test "x$enable_savedir" = "xno" ; then
151 SAVEDIR= 150 SAVEDIR=
152 elif test "x$enable_savedir" = "xyes" -o "x$enable_savedir" = "x"; then 151 elif test "x$enable_savedir" = "xyes" -o "x$enable_savedir" = "x"; then
153 if test "x$GROUPOWNER" != "x"; then 152 if test "x$GROUPOWNER" != "x"; then
166 AC_MSG_RESULT([disabled]) 165 AC_MSG_RESULT([disabled])
167 fi 166 fi
168 167
169 AC_SUBST(SAVEDIR) 168 AC_SUBST(SAVEDIR)
170 169
171 AC_ARG_ENABLE([wizardmode],[AC_HELP_STRING([--enable-wizardmode], [enable availability of wizard mode @<:@default=no@:>@])],[],[]) 170 AC_ARG_ENABLE([wizardmode],[AS_HELP_STRING([--enable-wizardmode],[enable availability of wizard mode @<:@default=no@:>@])],[],[])
172 AC_MSG_CHECKING([if wizard mode is enabled]) 171 AC_MSG_CHECKING([if wizard mode is enabled])
173 if test "x$enable_wizardmode" = "xno" ; then 172 if test "x$enable_wizardmode" = "xno" ; then
174 AC_MSG_RESULT([no]) 173 AC_MSG_RESULT([no])
175 elif test "x$enable_wizardmode" = "x" ; then 174 elif test "x$enable_wizardmode" = "x" ; then
176 AC_MSG_RESULT([no]) 175 AC_MSG_RESULT([no])
180 AC_DEFINE_UNQUOTED([PASSWD],["$enable_wizardmode"], [Define crypt(3) wizard mode password]) 179 AC_DEFINE_UNQUOTED([PASSWD],["$enable_wizardmode"], [Define crypt(3) wizard mode password])
181 fi 180 fi
182 AC_MSG_RESULT([yes]) 181 AC_MSG_RESULT([yes])
183 fi 182 fi
184 183
185 AC_ARG_ENABLE([allscores],[AC_HELP_STRING([--enable-allscores], [enable scoreboard to show top scores, not just top players @<:@default=yes@:>@])],[],[enable_allscores=yes]) 184 AC_ARG_ENABLE([allscores],[AS_HELP_STRING([--enable-allscores],[enable scoreboard to show top scores, not just top players @<:@default=yes@:>@])],[],[enable_allscores=yes])
186 AC_MSG_CHECKING([if allscores is enabled]) 185 AC_MSG_CHECKING([if allscores is enabled])
187 if test "x$enable_allscores" = "xyes" ; then 186 if test "x$enable_allscores" = "xyes" ; then
188 AC_DEFINE([ALLSCORES], [1], [Define if scorefile is top scores, not top players]) 187 AC_DEFINE([ALLSCORES], [1], [Define if scorefile is top scores, not top players])
189 AC_MSG_RESULT([yes]) 188 AC_MSG_RESULT([yes])
190 else 189 else
191 AC_MSG_RESULT([no]) 190 AC_MSG_RESULT([no])
192 fi 191 fi
193 192
194 AC_ARG_ENABLE([checktime],[AC_HELP_STRING([--enable-checktime], [enable checktime @<:@default=no@:>@])],[],[]) 193 AC_ARG_ENABLE([checktime],[AS_HELP_STRING([--enable-checktime],[enable checktime @<:@default=no@:>@])],[],[])
195 AC_MSG_CHECKING([if checktime is enabled]) 194 AC_MSG_CHECKING([if checktime is enabled])
196 if test "x$enable_checktime" = "xyes" ; then 195 if test "x$enable_checktime" = "xyes" ; then
197 AC_DEFINE([CHECKTIME], [1], [Define if checktime feature should be enabled]) 196 AC_DEFINE([CHECKTIME], [1], [Define if checktime feature should be enabled])
198 AC_MSG_RESULT([yes]) 197 AC_MSG_RESULT([yes])
199 else 198 else
200 AC_MSG_RESULT([no]) 199 AC_MSG_RESULT([no])
201 fi 200 fi
202 201
203 AC_ARG_ENABLE([maxload],[AC_HELP_STRING([--enable-maxload], [enable maxload @<:@default=no@:>@])],[],[]) 202 AC_ARG_ENABLE([maxload],[AS_HELP_STRING([--enable-maxload],[enable maxload @<:@default=no@:>@])],[],[])
204 AC_MSG_CHECKING([runtime execution limit (maximum system load average)]) 203 AC_MSG_CHECKING([runtime execution limit (maximum system load average)])
205 if test "x$enable_maxload" = "xyes" ; then 204 if test "x$enable_maxload" = "xyes" ; then
206 AC_DEFINE([MAXLOAD], [100], [Define if maxload feature should be enabled]) 205 AC_DEFINE([MAXLOAD], [100], [Define if maxload feature should be enabled])
207 AC_MSG_RESULT([100]) 206 AC_MSG_RESULT([100])
208 elif test "x$enable_maxload" = "x" ; then 207 elif test "x$enable_maxload" = "x" ; then
212 else 211 else
213 AC_DEFINE_UNQUOTED([MAXLOAD], [$enable_maxload], [Define if maxload feature should be enabled]) 212 AC_DEFINE_UNQUOTED([MAXLOAD], [$enable_maxload], [Define if maxload feature should be enabled])
214 AC_MSG_RESULT([$enable_maxload]) 213 AC_MSG_RESULT([$enable_maxload])
215 fi 214 fi
216 215
217 AC_ARG_ENABLE([maxusers],[AC_HELP_STRING([--enable-maxusers], [enable maxuser @<:@default=no@:>@])],[],[]) 216 AC_ARG_ENABLE([maxusers],[AS_HELP_STRING([--enable-maxusers],[enable maxuser @<:@default=no@:>@])],[],[])
218 AC_MSG_CHECKING([runtime execution limit (maximum online system users)]) 217 AC_MSG_CHECKING([runtime execution limit (maximum online system users)])
219 if test "x$enable_maxusers" = "xyes" ; then 218 if test "x$enable_maxusers" = "xyes" ; then
220 AC_DEFINE([MAXUSERS], [100], [Define if maxusers feature should be enabled]) 219 AC_DEFINE([MAXUSERS], [100], [Define if maxusers feature should be enabled])
221 AC_MSG_RESULT([100]) 220 AC_MSG_RESULT([100])
222 elif test "x$enable_maxusers" = "x" ; then 221 elif test "x$enable_maxusers" = "x" ; then
226 else 225 else
227 AC_DEFINE_UNQUOTED([MAXLOAD], [$enable_maxusers], [Define if maxusers feature should be enabled]) 226 AC_DEFINE_UNQUOTED([MAXLOAD], [$enable_maxusers], [Define if maxusers feature should be enabled])
228 AC_MSG_RESULT([$enable_maxusers]) 227 AC_MSG_RESULT([$enable_maxusers])
229 fi 228 fi
230 229
231 AC_ARG_ENABLE([numscores],[AC_HELP_STRING([--enable-numscores], [number of scores to store in scoreboard @<:@default=10@:>@])],[],[]) 230 AC_ARG_ENABLE([numscores],[AS_HELP_STRING([--enable-numscores],[number of scores to store in scoreboard @<:@default=10@:>@])],[],[])
232 AC_MSG_CHECKING([what the number of scores to store in scoreboard is]) 231 AC_MSG_CHECKING([what the number of scores to store in scoreboard is])
233 if test "x$numscores" = "xyes" ; then 232 if test "x$numscores" = "xyes" ; then
234 AC_DEFINE([NUMSCORES], [10], [number of scores to store in scoreboard]) 233 AC_DEFINE([NUMSCORES], [10], [number of scores to store in scoreboard])
235 AC_MSG_RESULT([10]) 234 AC_MSG_RESULT([10])
236 elif test "x$enable_numscores" = "x" ; then 235 elif test "x$enable_numscores" = "x" ; then
242 else 241 else
243 AC_DEFINE_UNQUOTED([NUMSCORES], [$enable_numscores], [number of scores to store in scoreboard]) 242 AC_DEFINE_UNQUOTED([NUMSCORES], [$enable_numscores], [number of scores to store in scoreboard])
244 AC_MSG_RESULT([$enable_numscores]) 243 AC_MSG_RESULT([$enable_numscores])
245 fi 244 fi
246 245
247 AC_ARG_ENABLE([numname],[AC_HELP_STRING([--enable-numname], [word for number of scores to store in scoreboard @<:@default=Ten@:>@])],[],[]) 246 AC_ARG_ENABLE([numname],[AS_HELP_STRING([--enable-numname],[word for number of scores to store in scoreboard @<:@default=Ten@:>@])],[],[])
248 AC_MSG_CHECKING([word for the number of scores to store in scoreboard is]) 247 AC_MSG_CHECKING([word for the number of scores to store in scoreboard is])
249 if test "x$enable_numname" = "xyes" ; then 248 if test "x$enable_numname" = "xyes" ; then
250 AC_DEFINE([NUMNAME], ["Ten"], [word for the number of scores to store in scoreboard]) 249 AC_DEFINE([NUMNAME], ["Ten"], [word for the number of scores to store in scoreboard])
251 AC_MSG_RESULT([Ten]) 250 AC_MSG_RESULT([Ten])
252 elif test "x$enable_numname" = "x" ; then 251 elif test "x$enable_numname" = "x" ; then
258 else 257 else
259 AC_DEFINE_UNQUOTED([NUMNAME], ["$enable_numname"], [word for the number of scores to store in scoreboard]) 258 AC_DEFINE_UNQUOTED([NUMNAME], ["$enable_numname"], [word for the number of scores to store in scoreboard])
260 AC_MSG_RESULT([$enable_numname]) 259 AC_MSG_RESULT([$enable_numname])
261 fi 260 fi
262 261
263 AC_ARG_ENABLE([loadav],[AC_HELP_STRING([--enable-loadav=NAMELIST], [use program's load average function (unlikely to work) @<:@default=no@:>@])],[],[]) 262 AC_ARG_ENABLE([loadav],[AS_HELP_STRING([--enable-loadav=NAMELIST],[use program's load average function (unlikely to work) @<:@default=no@:>@])],[],[])
264 AC_MSG_CHECKING([whether to use program's built in load average function]) 263 AC_MSG_CHECKING([whether to use program's built in load average function])
265 if test "x$enable_loadav" = "xyes" ; then 264 if test "x$enable_loadav" = "xyes" ; then
266 AC_DEFINE([LOADAV], [], [define if we should use program's load average function instead of system]) 265 AC_DEFINE([LOADAV], [], [define if we should use program's load average function instead of system])
267 AC_DEFINE([NAMELIST], [/vmunix], [kernel file to pass to nlist() when reading load average (unlikely to work)]) 266 AC_DEFINE([NAMELIST], [/vmunix], [kernel file to pass to nlist() when reading load average (unlikely to work)])
268 AC_MSG_RESULT([/vmunix]) 267 AC_MSG_RESULT([/vmunix])
274 AC_DEFINE([LOADAV], [], [define if we should use program's load average function instead of system]) 273 AC_DEFINE([LOADAV], [], [define if we should use program's load average function instead of system])
275 AC_DEFINE_UNQUOTED([NAMELIST], [$enable_loadav], [kernel file to pass to nlist() when reading load average (unlikely to work)]) 274 AC_DEFINE_UNQUOTED([NAMELIST], [$enable_loadav], [kernel file to pass to nlist() when reading load average (unlikely to work)])
276 AC_MSG_RESULT([$enable_loadav]) 275 AC_MSG_RESULT([$enable_loadav])
277 fi 276 fi
278 277
279 AC_ARG_ENABLE([ucount],[AC_HELP_STRING([--enable-ucount=UTMPFILE], [use program's own function to count users (unlikely to work) @<:@default=no@:>@])],[],[]) 278 AC_ARG_ENABLE([ucount],[AS_HELP_STRING([--enable-ucount=UTMPFILE],[use program's own function to count users (unlikely to work) @<:@default=no@:>@])],[],[])
280 AC_MSG_CHECKING([whether to use program's built in user counting function]) 279 AC_MSG_CHECKING([whether to use program's built in user counting function])
281 if test "x$enable_ucount" = "xyes" ; then 280 if test "x$enable_ucount" = "xyes" ; then
282 AC_DEFINE([UCOUNT], [], [define if we should use program's user counting function instead of system's]) 281 AC_DEFINE([UCOUNT], [], [define if we should use program's user counting function instead of system's])
283 AC_DEFINE([UTMP], [/etc/utmp], [utmp like file to pass to ucount() when counting online users (unlikely to work)]) 282 AC_DEFINE([UTMP], [/etc/utmp], [utmp like file to pass to ucount() when counting online users (unlikely to work)])
284 AC_MSG_RESULT([/etc/utmp]) 283 AC_MSG_RESULT([/etc/utmp])