Mercurial > hg > early-roguelike
annotate rogue4/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 |
rev | line source |
---|---|
51 | 1 # -*- Autoconf -*- |
2 # Process this file with autoconf to produce a configure script. | |
3 | |
312 | 4 AC_PREREQ([2.69]) |
5 AC_INIT([Rogue],[5.2.2],[elwin@sdf.org],[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_FUNC_STAT | |
28 AC_FUNC_VPRINTF | |
29 AC_CHECK_FUNCS([erasechar killchar alarm getpass memset setenv strchr nlist _spawnl spawnl getpwuid loadav getloadavg strerror setgid setuid getuid getgid]) | |
30 AC_PROG_INSTALL | |
31 | |
32 # Programs to process the documentation | |
33 AC_CHECK_PROG([NROFF], [nroff], [nroff],) | |
34 AC_CHECK_PROG([GROFF], [groff], [groff],) | |
35 AC_CHECK_PROG([COLCRT], [colcrt], [colcrt],) | |
36 AC_CHECK_PROG([TBL], [tbl], [tbl],) | |
37 | |
294
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
38 if test "x$GROFF" != "x" ; then |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
39 DOCS_GROFF= |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
40 DOCS_NROFF=.no-nroff |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
41 DOCS_NONE=.none |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
42 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
|
43 DOCS_GROFF=.no-groff |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
44 DOCS_NROFF= |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
45 DOCS_NONE=.none |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
46 else |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
47 DOCS_GROFF=.no-groff |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
48 DOCS_NROFF=.no-nroff |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
49 DOCS_NONE= |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
50 fi |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
51 |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
52 AC_SUBST(DOCS_GROFF) |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
53 AC_SUBST(DOCS_NROFF) |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
54 AC_SUBST(DOCS_NONE) |
fe6b7a1a6dfc
Improve the documentation build process.
John "Elwin" Edwards
parents:
287
diff
changeset
|
55 |
312 | 56 AC_ARG_WITH(program-name, AS_HELP_STRING([--with-program-name=NAME],[alternate executable name]),[progname="$withval" ], [progname="rogue4"] ) |
51 | 57 PROGRAM=$progname |
58 AC_SUBST(PROGRAM) | |
59 | |
312 | 60 AC_ARG_ENABLE(setgid, AS_HELP_STRING([--enable-setgid=NAME],[install executable as setgid with group ownership of NAME @<:@default=no@:>@]),[],[]) |
51 | 61 AC_MSG_CHECKING([if using setgid execute bit]) |
62 if test "x$enable_setgid" = "xno" ; then | |
63 GROUPOWNER= | |
64 elif test "x$enable_setgid" = "xyes" ; then | |
65 GROUPOWNER=games | |
66 elif test "x$enable_setgid" = "x" ; then | |
67 GROUPOWNER= | |
68 else | |
69 GROUPOWNER=$enable_setgid | |
70 fi | |
71 | |
72 if test "x$GROUPOWNER" != "x" ; then | |
73 AC_DEFINE_UNQUOTED([GROUPOWNER],[$GROUPOWNER], [Define to group owner of setgid executable]) | |
74 AC_MSG_RESULT([$GROUPOWNER]) | |
75 else | |
76 AC_MSG_RESULT([no]) | |
77 fi | |
78 | |
79 AC_SUBST(GROUPOWNER) | |
80 | |
312 | 81 AC_ARG_ENABLE([scorefile],[AS_HELP_STRING([--enable-scorefile=SCOREFILE],[enable scoreboard with given filename])],[],[]) |
51 | 82 AC_MSG_CHECKING([for scoreboard file]) |
83 if test "x$enable_scorefile" = "xno" ; then | |
84 SCOREFILE= | |
85 elif test "x$enable_scorefile" = "xyes" ; then | |
86 SCOREFILE=$progname.scr | |
87 elif test "x$enable_scorefile" = "x" ; then | |
88 SCOREFILE=$progname.scr | |
89 else | |
90 SCOREFILE=$enable_scorefile | |
91 fi | |
92 | |
93 if test "x$SCOREFILE" != "x" ; then | |
94 AC_DEFINE_UNQUOTED([SCOREFILE], ["$SCOREFILE"], [Define to file to use for scoreboard]) | |
95 AC_MSG_RESULT([$SCOREFILE]) | |
96 else | |
97 AC_MSG_RESULT([disabled]) | |
98 fi | |
99 | |
100 AC_SUBST(SCOREFILE) | |
101 | |
312 | 102 AC_ARG_ENABLE([logfile],[AS_HELP_STRING([--enable-logfile=LOGFILE],[enable logfile with given filename])],[],[]) |
51 | 103 AC_MSG_CHECKING([for log file]) |
104 if test "x$enable_logfile" = "xno" ; then | |
105 LOGFILE= | |
106 elif test "x$enable_logfile" = "xyes" ; then | |
107 LOGFILE=$progname.log | |
108 elif test "x$enable_logfile" = "x" ; then | |
109 LOGFILE=$progname.log | |
110 else | |
111 LOGFILE=$enable_logfile | |
112 fi | |
113 | |
114 if test "x$LOGFILE" != "x" ; then | |
115 AC_DEFINE_UNQUOTED([LOGFILE], ["$LOGFILE"], [Define to file to use for log]) | |
116 AC_MSG_RESULT([$LOGFILE]) | |
117 else | |
118 AC_MSG_RESULT([disabled]) | |
119 fi | |
120 | |
121 AC_SUBST(LOGFILE) | |
122 | |
312 | 123 AC_ARG_ENABLE([lockfile],[AS_HELP_STRING([--enable-lockfile=LOCKFILE],[enable scoreboard lockfile with given filename])],[],[]) |
51 | 124 AC_MSG_CHECKING([for scoreboard lockfile file]) |
125 if test "x$enable_lockfile" = "xno" ; then | |
126 LOCKFILE= | |
127 elif test "x$enable_lockfile" = "xyes" ; then | |
128 LOCKFILE=$progname.lck | |
129 elif test "x$enable_lockfile" = "x" ; then | |
130 LOCKFILE=$progname.lck | |
131 else | |
132 LOCKFILE=$enable_lockfile | |
133 fi | |
134 | |
135 if test "x$LOCKFILE" != "x" ; then | |
136 AC_DEFINE_UNQUOTED([LOCKFILE], ["$LOCKFILE"], [Define to file to use for scoreboard lockfile]) | |
137 AC_MSG_RESULT([$LOCKFILE]) | |
138 else | |
139 AC_MSG_RESULT([disabled]) | |
140 fi | |
141 | |
142 AC_SUBST(LOCKFILE) | |
143 | |
312 | 144 AC_ARG_ENABLE([savedir],[AS_HELP_STRING([--enable-savedir=SAVEDIR],[enable systemwide location for saved games])],[],[enable_savedir="no"]) |
51 | 145 AC_MSG_CHECKING([for save directory]) |
146 if test "x$enable_savedir" = "xno" ; then | |
147 SAVEDIR= | |
52 | 148 elif test "x$enable_savedir" = "xyes" -o "x$enable_savedir" = "x"; then |
157 | 149 if test "x$GROUPOWNER" != "x"; then |
52 | 150 SAVEDIR="/var/local/games/roguelike/${progname}save/" |
151 else | |
152 SAVEDIR="$progname/" | |
153 fi | |
51 | 154 else |
52 | 155 SAVEDIR="$enable_savedir" |
51 | 156 fi |
157 | |
158 if test "x$SAVEDIR" != "x" ; then | |
159 AC_DEFINE_UNQUOTED([SAVEDIR], ["$SAVEDIR"], [Define to systemwide directory for storing saved games]) | |
160 AC_MSG_RESULT([$SAVEDIR]) | |
161 else | |
162 AC_MSG_RESULT([disabled]) | |
163 fi | |
164 | |
165 AC_SUBST(SAVEDIR) | |
166 | |
312 | 167 AC_ARG_ENABLE([wizardmode],[AS_HELP_STRING([--enable-wizardmode],[enable availability of wizard mode @<:@default=no@:>@])],[],[]) |
51 | 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 if test "x$enable_wizardmode" != "xyes" ; then | |
176 AC_DEFINE_UNQUOTED([PASSWD],["$enable_wizardmode"], [Define crypt(3) wizard mode password]) | |
177 fi | |
178 AC_MSG_RESULT([yes]) | |
179 fi | |
180 | |
312 | 181 AC_ARG_ENABLE([checktime],[AS_HELP_STRING([--enable-checktime],[enable checktime @<:@default=no@:>@])],[],[]) |
51 | 182 AC_MSG_CHECKING([if checktime is enabled]) |
183 if test "x$enable_checktime" = "xyes" ; then | |
184 AC_DEFINE([CHECKTIME], [1], [Define if checktime feature should be enabled]) | |
185 AC_MSG_RESULT([yes]) | |
186 else | |
187 AC_MSG_RESULT([no]) | |
188 fi | |
189 | |
312 | 190 AC_ARG_ENABLE([maxload],[AS_HELP_STRING([--enable-maxload],[enable maxload @<:@default=no@:>@])],[],[]) |
51 | 191 AC_MSG_CHECKING([runtime execution limit (maximum system load average)]) |
192 if test "x$enable_maxload" = "xyes" ; then | |
193 AC_DEFINE([MAXLOAD], [100], [Define if maxload feature should be enabled]) | |
194 AC_MSG_RESULT([100]) | |
195 elif test "x$enable_maxload" = "x" ; then | |
196 AC_MSG_RESULT([unlimited]) | |
197 elif test "x$enable_maxload" = "xno" ; then | |
198 AC_MSG_RESULT([unlimited]) | |
199 else | |
200 AC_DEFINE_UNQUOTED([MAXLOAD], [$enable_maxload], [Define if maxload feature should be enabled]) | |
201 AC_MSG_RESULT([$enable_maxload]) | |
202 fi | |
203 | |
312 | 204 AC_ARG_ENABLE([maxusers],[AS_HELP_STRING([--enable-maxusers],[enable maxuser @<:@default=no@:>@])],[],[]) |
51 | 205 AC_MSG_CHECKING([runtime execution limit (maximum online system users)]) |
206 if test "x$enable_maxusers" = "xyes" ; then | |
207 AC_DEFINE([MAXUSERS], [100], [Define if maxusers feature should be enabled]) | |
208 AC_MSG_RESULT([100]) | |
209 elif test "x$enable_maxusers" = "x" ; then | |
210 AC_MSG_RESULT([unlimited]) | |
211 elif test "x$enable_maxload" = "xno" ; then | |
212 AC_MSG_RESULT([unlimited]) | |
213 else | |
214 AC_DEFINE_UNQUOTED([MAXLOAD], [$enable_maxusers], [Define if maxusers feature should be enabled]) | |
215 AC_MSG_RESULT([$enable_maxusers]) | |
216 fi | |
217 | |
218 AC_OUTPUT |