Mercurial > hg > early-roguelike
comparison rogue5/configure.ac @ 33:f502bf60e6e4
Import Rogue 5.4 from the Roguelike Restoration Project (r1490)
| author | elwin |
|---|---|
| date | Mon, 24 May 2010 20:10:59 +0000 |
| parents | |
| children | 655c317b6237 |
comparison
equal
deleted
inserted
replaced
| 32:2dcd75e6a736 | 33:f502bf60e6e4 |
|---|---|
| 1 # -*- Autoconf -*- | |
| 2 # Process this file with autoconf to produce a configure script. | |
| 3 | |
| 4 AC_PREREQ(2.56) | |
| 5 AC_INIT([Rogue],[5.4.5], [yendor@rogueforge.net]) | |
| 6 AC_CONFIG_SRCDIR([armor.c]) | |
| 7 AC_CONFIG_HEADER([config.h]) | |
| 8 AC_CONFIG_FILES([Makefile rogue.6 rogue.cat rogue.doc rogue.html rogue.me]) | |
| 9 AC_CANONICAL_SYSTEM([]) | |
| 10 | |
| 11 # Checks for programs. | |
| 12 AC_PROG_CC | |
| 13 | |
| 14 # Checks for libraries. | |
| 15 | |
| 16 # Checks for header files. | |
| 17 AC_HEADER_STDC | |
| 18 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 utmp.h term.h ncurses/term.h process.h]) | |
| 19 | |
| 20 # Checks for typedefs, structures, and compiler characteristics. | |
| 21 AC_HEADER_STDBOOL | |
| 22 AC_C_CONST | |
| 23 AC_TYPE_UID_T | |
| 24 AC_TYPE_SIZE_T | |
| 25 AC_STRUCT_TM | |
| 26 MP_WITH_CURSES | |
| 27 # Checks for library functions. | |
| 28 AC_FUNC_FORK | |
| 29 AC_PROG_GCC_TRADITIONAL | |
| 30 AC_FUNC_LSTAT | |
| 31 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK | |
| 32 AC_TYPE_SIGNAL | |
| 33 AC_FUNC_STAT | |
| 34 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]) | |
| 36 | |
| 37 AC_CHECK_PROG([NROFF], [nroff], [nroff],) | |
| 38 AC_CHECK_PROG([GROFF], [groff], [groff],) | |
| 39 AC_CHECK_PROG([COLCRT], [colcrt], [colcrt],) | |
| 40 AC_CHECK_PROG([TBL], [tbl], [tbl],) | |
| 41 AC_CHECK_PROG([SED], [sed], [sed],) | |
| 42 | |
| 43 AC_ARG_WITH(program-name, AC_HELP_STRING([--with-program-name=NAME],[alternate executable name]),[progname="$withval" ], [progname="rogue"] ) | |
| 44 PROGRAM=$progname | |
| 45 AC_SUBST(PROGRAM) | |
| 46 | |
| 47 AC_ARG_ENABLE(setgid, AC_HELP_STRING([--enable-setgid=NAME],[install executable as setgid with group ownership of NAME @<:@default=no@:>@])],[],[]) | |
| 48 AC_MSG_CHECKING([if using setgid execute bit]) | |
| 49 if test "x$enable_setgid" = "xno" ; then | |
| 50 GROUPOWNER= | |
| 51 elif test "x$enable_setgid" = "xyes" ; then | |
| 52 GROUPOWNER=games | |
| 53 elif test "x$enable_setgid" = "x" ; then | |
| 54 GROUPOWNER= | |
| 55 else | |
| 56 GROUPOWNER=$enable_setgid | |
| 57 fi | |
| 58 | |
| 59 if test "x$GROUPOWNER" != "x" ; then | |
| 60 AC_DEFINE_UNQUOTED([GROUPOWNER],[$GROUPOWNER], [Define to group owner of setgid executable]) | |
| 61 AC_MSG_RESULT([$GROUPOWNER]) | |
| 62 else | |
| 63 AC_MSG_RESULT([no]) | |
| 64 fi | |
| 65 | |
| 66 AC_SUBST(GROUPOWNER) | |
| 67 | |
| 68 AC_ARG_ENABLE([scorefile],[AC_HELP_STRING([--enable-scorefile=SCOREFILE], [enable scoreboard with given filename])],[],[]) | |
| 69 AC_MSG_CHECKING([for scoreboard file]) | |
| 70 if test "x$enable_scorefile" = "xno" ; then | |
| 71 SCOREFILE= | |
| 72 elif test "x$enable_scorefile" = "xyes" ; then | |
| 73 SCOREFILE=$progname.scr | |
| 74 elif test "x$enable_scorefile" = "x" ; then | |
| 75 SCOREFILE=$progname.scr | |
| 76 else | |
| 77 SCOREFILE=$enable_scorefile | |
| 78 fi | |
| 79 | |
| 80 if test "x$SCOREFILE" != "x" ; then | |
| 81 AC_DEFINE_UNQUOTED([SCOREFILE], ["$SCOREFILE"], [Define to file to use for scoreboard]) | |
| 82 AC_MSG_RESULT([$SCOREFILE]) | |
| 83 else | |
| 84 AC_MSG_RESULT([disabled]) | |
| 85 fi | |
| 86 | |
| 87 AC_SUBST(SCOREFILE) | |
| 88 | |
| 89 AC_ARG_ENABLE([lockfile],[AC_HELP_STRING([--enable-lockfile=LOCKFILE], [enable scoreboard lockfile with given filename])],[],[]) | |
| 90 AC_MSG_CHECKING([for scoreboard lockfile file]) | |
| 91 if test "x$enable_lockfile" = "xno" ; then | |
| 92 LOCKFILE= | |
| 93 elif test "x$enable_lockfile" = "xyes" ; then | |
| 94 LOCKFILE=$progname.lck | |
| 95 elif test "x$enable_lockfile" = "x" ; then | |
| 96 LOCKFILE=$progname.lck | |
| 97 else | |
| 98 LOCKFILE=$enable_lockfile | |
| 99 fi | |
| 100 | |
| 101 if test "x$LOCKFILE" != "x" ; then | |
| 102 AC_DEFINE_UNQUOTED([LOCKFILE], ["$LOCKFILE"], [Define to file to use for scoreboard lockfile]) | |
| 103 AC_MSG_RESULT([$LOCKFILE]) | |
| 104 else | |
| 105 AC_MSG_RESULT([disabled]) | |
| 106 fi | |
| 107 | |
| 108 AC_SUBST(LOCKFILE) | |
| 109 | |
| 110 AC_ARG_ENABLE([wizardmode],[AC_HELP_STRING([--enable-wizardmode], [enable availability of wizard mode @<:@default=no@:>@])],[],[]) | |
| 111 AC_MSG_CHECKING([if wizard mode is enabled]) | |
| 112 if test "x$enable_wizardmode" = "xno" ; then | |
| 113 AC_MSG_RESULT([no]) | |
| 114 elif test "x$enable_wizardmode" = "x" ; then | |
| 115 AC_MSG_RESULT([no]) | |
| 116 else | |
| 117 AC_DEFINE([MASTER], [], [Define to include wizard mode]) | |
| 118 if test "x$enable_wizardmode" != "xyes" ; then | |
| 119 AC_DEFINE_UNQUOTED([PASSWD],["$enable_wizardmode"], [Define crypt(3) wizard mode password]) | |
| 120 fi | |
| 121 AC_MSG_RESULT([yes]) | |
| 122 fi | |
| 123 | |
| 124 AC_ARG_ENABLE([allscores],[AC_HELP_STRING([--enable-allscores], [enable scoreboard to show top scores, not just top players @<:@default=yes@:>@])],[],[enable_allscores=yes]) | |
| 125 AC_MSG_CHECKING([if allscores is enabled]) | |
| 126 if test "x$enable_allscores" = "xyes" ; then | |
| 127 AC_DEFINE([ALLSCORES], [1], [Define if scorefile is top scores, not top players]) | |
| 128 AC_MSG_RESULT([yes]) | |
| 129 else | |
| 130 AC_MSG_RESULT([no]) | |
| 131 fi | |
| 132 | |
| 133 AC_ARG_ENABLE([checktime],[AC_HELP_STRING([--enable-checktime], [enable checktime @<:@default=no@:>@])],[],[]) | |
| 134 AC_MSG_CHECKING([if checktime is enabled]) | |
| 135 if test "x$enable_checktime" = "xyes" ; then | |
| 136 AC_DEFINE([CHECKTIME], [1], [Define if checktime feature should be enabled]) | |
| 137 AC_MSG_RESULT([yes]) | |
| 138 else | |
| 139 AC_MSG_RESULT([no]) | |
| 140 fi | |
| 141 | |
| 142 AC_ARG_ENABLE([maxload],[AC_HELP_STRING([--enable-maxload], [enable maxload @<:@default=no@:>@])],[],[]) | |
| 143 AC_MSG_CHECKING([runtime execution limit (maximum system load average)]) | |
| 144 if test "x$enable_maxload" = "xyes" ; then | |
| 145 AC_DEFINE([MAXLOAD], [100], [Define if maxload feature should be enabled]) | |
| 146 AC_MSG_RESULT([100]) | |
| 147 elif test "x$enable_maxload" = "x" ; then | |
| 148 AC_MSG_RESULT([unlimited]) | |
| 149 elif test "x$enable_maxload" = "xno" ; then | |
| 150 AC_MSG_RESULT([unlimited]) | |
| 151 else | |
| 152 AC_DEFINE_UNQUOTED([MAXLOAD], [$enable_maxload], [Define if maxload feature should be enabled]) | |
| 153 AC_MSG_RESULT([$enable_maxload]) | |
| 154 fi | |
| 155 | |
| 156 AC_ARG_ENABLE([maxusers],[AC_HELP_STRING([--enable-maxusers], [enable maxuser @<:@default=no@:>@])],[],[]) | |
| 157 AC_MSG_CHECKING([runtime execution limit (maximum online system users)]) | |
| 158 if test "x$enable_maxusers" = "xyes" ; then | |
| 159 AC_DEFINE([MAXUSERS], [100], [Define if maxusers feature should be enabled]) | |
| 160 AC_MSG_RESULT([100]) | |
| 161 elif test "x$enable_maxusers" = "x" ; then | |
| 162 AC_MSG_RESULT([unlimited]) | |
| 163 elif test "x$enable_maxload" = "xno" ; then | |
| 164 AC_MSG_RESULT([unlimited]) | |
| 165 else | |
| 166 AC_DEFINE_UNQUOTED([MAXLOAD], [$enable_maxusers], [Define if maxusers feature should be enabled]) | |
| 167 AC_MSG_RESULT([$enable_maxusers]) | |
| 168 fi | |
| 169 | |
| 170 AC_ARG_ENABLE([numscores],[AC_HELP_STRING([--enable-numscores], [number of scores to store in scoreboard @<:@default=10@:>@])],[],[]) | |
| 171 AC_MSG_CHECKING([what the number of scores to store in scoreboard is]) | |
| 172 if test "x$numscores" = "xyes" ; then | |
| 173 AC_DEFINE([NUMSCORES], [10], [number of scores to store in scoreboard]) | |
| 174 AC_MSG_RESULT([10]) | |
| 175 elif test "x$enable_numscores" = "x" ; then | |
| 176 AC_DEFINE([NUMSCORES], [10], [number of scores to store in scoreboard]) | |
| 177 AC_MSG_RESULT([10]) | |
| 178 elif test "x$enable_numscores" = "xno" ; then | |
| 179 AC_DEFINE([NUMSCORES], [10], [number of scores to store in scoreboard]) | |
| 180 AC_MSG_RESULT([10]) | |
| 181 else | |
| 182 AC_DEFINE_UNQUOTED([NUMSCORES], [$enable_numscores], [number of scores to store in scoreboard]) | |
| 183 AC_MSG_RESULT([$enable_numscores]) | |
| 184 fi | |
| 185 | |
| 186 AC_ARG_ENABLE([numname],[AC_HELP_STRING([--enable-numname], [word for number of scores to store in scoreboard @<:@default=Ten@:>@])],[],[]) | |
| 187 AC_MSG_CHECKING([word for the number of scores to store in scoreboard is]) | |
| 188 if test "x$enable_numname" = "xyes" ; then | |
| 189 AC_DEFINE([NUMNAME], ["Ten"], [word for the number of scores to store in scoreboard]) | |
| 190 AC_MSG_RESULT([Ten]) | |
| 191 elif test "x$enable_numname" = "x" ; then | |
| 192 AC_DEFINE([NUMNAME], ["Ten"], [word for the number of scores to store in scoreboard]) | |
| 193 AC_MSG_RESULT([Ten]) | |
| 194 elif test "x$enable_numname" = "xno" ; then | |
| 195 AC_DEFINE([NUMNAME], ["Ten"], [word for the number of scores to store in scoreboard]) | |
| 196 AC_MSG_RESULT([Ten]) | |
| 197 else | |
| 198 AC_DEFINE_UNQUOTED([NUMNAME], ["$enable_numname"], [word for the number of scores to store in scoreboard]) | |
| 199 AC_MSG_RESULT([$enable_numname]) | |
| 200 fi | |
| 201 | |
| 202 AC_ARG_ENABLE([loadav],[AC_HELP_STRING([--enable-loadav=NAMELIST], [use program's load average function (unlikely to work) @<:@default=no@:>@])],[],[]) | |
| 203 AC_MSG_CHECKING([whether to use program's built in load average function]) | |
| 204 if test "x$enable_loadav" = "xyes" ; then | |
| 205 AC_DEFINE([LOADAV], [], [define if we should use program's load average function instead of system]) | |
| 206 AC_DEFINE([NAMELIST], [/vmunix], [kernel file to pass to nlist() when reading load average (unlikely to work)]) | |
| 207 AC_MSG_RESULT([/vmunix]) | |
| 208 elif test "x$enable_loadav" = "x" ; then | |
| 209 AC_MSG_RESULT([no]) | |
| 210 elif test "x$enable_loadav" = "xno" ; then | |
| 211 AC_MSG_RESULT([no]) | |
| 212 else | |
| 213 AC_DEFINE([LOADAV], [], [define if we should use program's load average function instead of system]) | |
| 214 AC_DEFINE_UNQUOTED([NAMELIST], [$enable_loadav], [kernel file to pass to nlist() when reading load average (unlikely to work)]) | |
| 215 AC_MSG_RESULT([$enable_loadav]) | |
| 216 fi | |
| 217 | |
| 218 AC_ARG_ENABLE([ucount],[AC_HELP_STRING([--enable-ucount=UTMPFILE], [use program's own function to count users (unlikely to work) @<:@default=no@:>@])],[],[]) | |
| 219 AC_MSG_CHECKING([whether to use program's built in user counting function]) | |
| 220 if test "x$enable_ucount" = "xyes" ; then | |
| 221 AC_DEFINE([UCOUNT], [], [define if we should use program's user counting function instead of system's]) | |
| 222 AC_DEFINE([UTMP], [/etc/utmp], [utmp like file to pass to ucount() when counting online users (unlikely to work)]) | |
| 223 AC_MSG_RESULT([/etc/utmp]) | |
| 224 elif test "x$enable_ucount" = "x" ; then | |
| 225 AC_MSG_RESULT([no]) | |
| 226 elif test "x$enable_count" = "xno" ; then | |
| 227 AC_MSG_RESULT([no]) | |
| 228 else | |
| 229 AC_DEFINE([UCOUNT], [], [define if we should use program's user counting function instead of system's]) | |
| 230 AC_DEFINE_UNQUOTED([UTMP], [$enable_ucount], [utmp like file to pass to ucount() when counting online users (unlikely to work)]) | |
| 231 AC_MSG_RESULT([$enable_ucount]) | |
| 232 fi | |
| 233 | |
| 234 TARGET=$target | |
| 235 AC_SUBST(TARGET) | |
| 236 | |
| 237 AC_MSG_CHECKING([whether to docdir is defined]) | |
| 238 if test "x$docdir" = "x" ; then | |
| 239 AC_MSG_RESULT([docdir undefined]) | |
| 240 docdir=\${datadir}/doc/\${PACKAGE_TARNAME} | |
| 241 AC_SUBST(docdir) | |
| 242 else | |
| 243 AC_MSG_RESULT([docdir defined]) | |
| 244 fi | |
| 245 | |
| 246 AC_OUTPUT |
