Mercurial > hg > early-roguelike
annotate rogue4/configure.ac @ 294:fe6b7a1a6dfc
Improve the documentation build process.
The choice between troff implementations is now made at configure time,
rather than using shell logic in the Makefile to choose while building.
author | John "Elwin" Edwards |
---|---|
date | Sat, 30 Dec 2017 14:15:52 -0500 |
parents | 0b3d1b38998f |
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 | |
103 AC_ARG_ENABLE([logfile],[AC_HELP_STRING([--enable-logfile=LOGFILE], [enable logfile with given filename])],[],[]) | |
104 AC_MSG_CHECKING([for log file]) | |
105 if test "x$enable_logfile" = "xno" ; then | |
106 LOGFILE= | |
107 elif test "x$enable_logfile" = "xyes" ; then | |
108 LOGFILE=$progname.log | |
109 elif test "x$enable_logfile" = "x" ; then | |
110 LOGFILE=$progname.log | |
111 else | |
112 LOGFILE=$enable_logfile | |
113 fi | |
114 | |
115 if test "x$LOGFILE" != "x" ; then | |
116 AC_DEFINE_UNQUOTED([LOGFILE], ["$LOGFILE"], [Define to file to use for log]) | |
117 AC_MSG_RESULT([$LOGFILE]) | |
118 else | |
119 AC_MSG_RESULT([disabled]) | |
120 fi | |
121 | |
122 AC_SUBST(LOGFILE) | |
123 | |
124 AC_ARG_ENABLE([lockfile],[AC_HELP_STRING([--enable-lockfile=LOCKFILE], [enable scoreboard lockfile with given filename])],[],[]) | |
125 AC_MSG_CHECKING([for scoreboard lockfile file]) | |
126 if test "x$enable_lockfile" = "xno" ; then | |
127 LOCKFILE= | |
128 elif test "x$enable_lockfile" = "xyes" ; then | |
129 LOCKFILE=$progname.lck | |
130 elif test "x$enable_lockfile" = "x" ; then | |
131 LOCKFILE=$progname.lck | |
132 else | |
133 LOCKFILE=$enable_lockfile | |
134 fi | |
135 | |
136 if test "x$LOCKFILE" != "x" ; then | |
137 AC_DEFINE_UNQUOTED([LOCKFILE], ["$LOCKFILE"], [Define to file to use for scoreboard lockfile]) | |
138 AC_MSG_RESULT([$LOCKFILE]) | |
139 else | |
140 AC_MSG_RESULT([disabled]) | |
141 fi | |
142 | |
143 AC_SUBST(LOCKFILE) | |
144 | |
52 | 145 AC_ARG_ENABLE([savedir],[AC_HELP_STRING([--enable-savedir=SAVEDIR], [enable systemwide location for saved games])],[],[enable_savedir="no"]) |
51 | 146 AC_MSG_CHECKING([for save directory]) |
147 if test "x$enable_savedir" = "xno" ; then | |
148 SAVEDIR= | |
52 | 149 elif test "x$enable_savedir" = "xyes" -o "x$enable_savedir" = "x"; then |
157 | 150 if test "x$GROUPOWNER" != "x"; then |
52 | 151 SAVEDIR="/var/local/games/roguelike/${progname}save/" |
152 else | |
153 SAVEDIR="$progname/" | |
154 fi | |
51 | 155 else |
52 | 156 SAVEDIR="$enable_savedir" |
51 | 157 fi |
158 | |
159 if test "x$SAVEDIR" != "x" ; then | |
160 AC_DEFINE_UNQUOTED([SAVEDIR], ["$SAVEDIR"], [Define to systemwide directory for storing saved games]) | |
161 AC_MSG_RESULT([$SAVEDIR]) | |
162 else | |
163 AC_MSG_RESULT([disabled]) | |
164 fi | |
165 | |
166 AC_SUBST(SAVEDIR) | |
167 | |
168 AC_ARG_ENABLE([wizardmode],[AC_HELP_STRING([--enable-wizardmode], [enable availability of wizard mode @<:@default=no@:>@])],[],[]) | |
169 AC_MSG_CHECKING([if wizard mode is enabled]) | |
170 if test "x$enable_wizardmode" = "xno" ; then | |
171 AC_MSG_RESULT([no]) | |
172 elif test "x$enable_wizardmode" = "x" ; then | |
173 AC_MSG_RESULT([no]) | |
174 else | |
175 AC_DEFINE([WIZARD], [], [Define to include wizard mode]) | |
176 if test "x$enable_wizardmode" != "xyes" ; then | |
177 AC_DEFINE_UNQUOTED([PASSWD],["$enable_wizardmode"], [Define crypt(3) wizard mode password]) | |
178 fi | |
179 AC_MSG_RESULT([yes]) | |
180 fi | |
181 | |
182 AC_ARG_ENABLE([checktime],[AC_HELP_STRING([--enable-checktime], [enable checktime @<:@default=no@:>@])],[],[]) | |
183 AC_MSG_CHECKING([if checktime is enabled]) | |
184 if test "x$enable_checktime" = "xyes" ; then | |
185 AC_DEFINE([CHECKTIME], [1], [Define if checktime feature should be enabled]) | |
186 AC_MSG_RESULT([yes]) | |
187 else | |
188 AC_MSG_RESULT([no]) | |
189 fi | |
190 | |
191 AC_ARG_ENABLE([maxload],[AC_HELP_STRING([--enable-maxload], [enable maxload @<:@default=no@:>@])],[],[]) | |
192 AC_MSG_CHECKING([runtime execution limit (maximum system load average)]) | |
193 if test "x$enable_maxload" = "xyes" ; then | |
194 AC_DEFINE([MAXLOAD], [100], [Define if maxload feature should be enabled]) | |
195 AC_MSG_RESULT([100]) | |
196 elif test "x$enable_maxload" = "x" ; then | |
197 AC_MSG_RESULT([unlimited]) | |
198 elif test "x$enable_maxload" = "xno" ; then | |
199 AC_MSG_RESULT([unlimited]) | |
200 else | |
201 AC_DEFINE_UNQUOTED([MAXLOAD], [$enable_maxload], [Define if maxload feature should be enabled]) | |
202 AC_MSG_RESULT([$enable_maxload]) | |
203 fi | |
204 | |
205 AC_ARG_ENABLE([maxusers],[AC_HELP_STRING([--enable-maxusers], [enable maxuser @<:@default=no@:>@])],[],[]) | |
206 AC_MSG_CHECKING([runtime execution limit (maximum online system users)]) | |
207 if test "x$enable_maxusers" = "xyes" ; then | |
208 AC_DEFINE([MAXUSERS], [100], [Define if maxusers feature should be enabled]) | |
209 AC_MSG_RESULT([100]) | |
210 elif test "x$enable_maxusers" = "x" ; then | |
211 AC_MSG_RESULT([unlimited]) | |
212 elif test "x$enable_maxload" = "xno" ; then | |
213 AC_MSG_RESULT([unlimited]) | |
214 else | |
215 AC_DEFINE_UNQUOTED([MAXLOAD], [$enable_maxusers], [Define if maxusers feature should be enabled]) | |
216 AC_MSG_RESULT([$enable_maxusers]) | |
217 fi | |
218 | |
219 AC_OUTPUT |