Annotation of early-roguelike/rogue5/configure.ac, Revision 1.1
1.1 ! rubenllo 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], [rogue5])
! 6: AC_CONFIG_SRCDIR([armor.c])
! 7: AC_CONFIG_HEADER([config.h])
! 8: AC_CONFIG_FILES([Makefile rogue.6 rogue.me rogue.html])
! 9:
! 10: # Checks for programs.
! 11: AC_PROG_CC
! 12: AC_PROG_INSTALL
! 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:
! 42: if test "x$GROFF" != "x" ; then
! 43: DOCS_GROFF=
! 44: DOCS_NROFF=.no-nroff
! 45: DOCS_NONE=.none
! 46: elif test "x$(NROFF)" != "x" && test "x$(TBL)" != "x" && test "x$(COLCRT)" != "x" ; then
! 47: DOCS_GROFF=.no-groff
! 48: DOCS_NROFF=
! 49: DOCS_NONE=.none
! 50: else
! 51: DOCS_GROFF=.no-groff
! 52: DOCS_NROFF=.no-nroff
! 53: DOCS_NONE=
! 54: fi
! 55:
! 56: AC_SUBST(DOCS_GROFF)
! 57: AC_SUBST(DOCS_NROFF)
! 58: AC_SUBST(DOCS_NONE)
! 59:
! 60: AC_ARG_WITH(program-name, AC_HELP_STRING([--with-program-name=NAME],[alternate executable name]),[progname="$withval" ], [progname="rogue5"] )
! 61: PROGRAM=$progname
! 62: AC_SUBST(PROGRAM)
! 63:
! 64: AC_ARG_ENABLE(setgid, AC_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])
! 66: if test "x$enable_setgid" = "xno" ; then
! 67: GROUPOWNER=
! 68: elif test "x$enable_setgid" = "xyes" ; then
! 69: GROUPOWNER=games
! 70: elif test "x$enable_setgid" = "x" ; then
! 71: GROUPOWNER=
! 72: else
! 73: GROUPOWNER=$enable_setgid
! 74: fi
! 75:
! 76: if test "x$GROUPOWNER" != "x" ; then
! 77: AC_DEFINE_UNQUOTED([GROUPOWNER],[$GROUPOWNER], [Define to group owner of setgid executable])
! 78: AC_MSG_RESULT([$GROUPOWNER])
! 79: else
! 80: AC_MSG_RESULT([no])
! 81: fi
! 82:
! 83: AC_SUBST(GROUPOWNER)
! 84:
! 85: AC_ARG_ENABLE([scorefile],[AC_HELP_STRING([--enable-scorefile=SCOREFILE], [enable scoreboard with given filename])],[],[])
! 86: AC_MSG_CHECKING([for scoreboard file])
! 87: if test "x$enable_scorefile" = "xno" ; then
! 88: SCOREFILE=
! 89: elif test "x$enable_scorefile" = "xyes" ; then
! 90: SCOREFILE=$progname.scr
! 91: elif test "x$enable_scorefile" = "x" ; then
! 92: SCOREFILE=$progname.scr
! 93: else
! 94: SCOREFILE=$enable_scorefile
! 95: fi
! 96:
! 97: if test "x$SCOREFILE" != "x" ; then
! 98: AC_DEFINE_UNQUOTED([SCOREFILE], ["$SCOREFILE"], [Define to file to use for scoreboard])
! 99: AC_MSG_RESULT([$SCOREFILE])
! 100: else
! 101: AC_MSG_RESULT([disabled])
! 102: fi
! 103:
! 104: AC_SUBST(SCOREFILE)
! 105:
! 106: AC_ARG_ENABLE([logfile],[AC_HELP_STRING([--enable-logfile=LOGFILE], [enable logfile with given filename])],[],[])
! 107: AC_MSG_CHECKING([for log file])
! 108: if test "x$enable_logfile" = "xno" ; then
! 109: LOGFILE=
! 110: elif test "x$enable_logfile" = "xyes" ; then
! 111: LOGFILE=$progname.log
! 112: elif test "x$enable_logfile" = "x" ; then
! 113: LOGFILE=$progname.log
! 114: else
! 115: LOGFILE=$enable_logfile
! 116: fi
! 117:
! 118: if test "x$LOGFILE" != "x" ; then
! 119: AC_DEFINE_UNQUOTED([LOGFILE], ["$LOGFILE"], [Define to file to use for log])
! 120: AC_MSG_RESULT([$LOGFILE])
! 121: else
! 122: AC_MSG_RESULT([disabled])
! 123: fi
! 124:
! 125: AC_SUBST(LOGFILE)
! 126:
! 127: AC_ARG_ENABLE([lockfile],[AC_HELP_STRING([--enable-lockfile=LOCKFILE], [enable scoreboard lockfile with given filename])],[],[])
! 128: AC_MSG_CHECKING([for scoreboard lockfile file])
! 129: if test "x$enable_lockfile" = "xno" ; then
! 130: LOCKFILE=
! 131: elif test "x$enable_lockfile" = "xyes" ; then
! 132: LOCKFILE=$progname.lck
! 133: elif test "x$enable_lockfile" = "x" ; then
! 134: LOCKFILE=$progname.lck
! 135: else
! 136: LOCKFILE=$enable_lockfile
! 137: fi
! 138:
! 139: if test "x$LOCKFILE" != "x" ; then
! 140: AC_DEFINE_UNQUOTED([LOCKFILE], ["$LOCKFILE"], [Define to file to use for scoreboard lockfile])
! 141: AC_MSG_RESULT([$LOCKFILE])
! 142: else
! 143: AC_MSG_RESULT([disabled])
! 144: fi
! 145:
! 146: AC_SUBST(LOCKFILE)
! 147:
! 148: AC_ARG_ENABLE([savedir],[AC_HELP_STRING([--enable-savedir=SAVEDIR], [enable systemwide location for saved games])],[],[enable_savedir="no"])
! 149: AC_MSG_CHECKING([for save directory])
! 150: if test "x$enable_savedir" = "xno" ; then
! 151: SAVEDIR=
! 152: elif test "x$enable_savedir" = "xyes" -o "x$enable_savedir" = "x"; then
! 153: if test "x$GROUPOWNER" != "x"; then
! 154: SAVEDIR="/var/local/games/roguelike/${progname}save/"
! 155: else
! 156: SAVEDIR="$progname/"
! 157: fi
! 158: else
! 159: SAVEDIR="$enable_savedir"
! 160: fi
! 161:
! 162: if test "x$SAVEDIR" != "x" ; then
! 163: AC_DEFINE_UNQUOTED([SAVEDIR], ["$SAVEDIR"], [Define to systemwide directory for storing saved games])
! 164: AC_MSG_RESULT([$SAVEDIR])
! 165: else
! 166: AC_MSG_RESULT([disabled])
! 167: fi
! 168:
! 169: AC_SUBST(SAVEDIR)
! 170:
! 171: AC_ARG_ENABLE([wizardmode],[AC_HELP_STRING([--enable-wizardmode], [enable availability of wizard mode @<:@default=no@:>@])],[],[])
! 172: AC_MSG_CHECKING([if wizard mode is enabled])
! 173: if test "x$enable_wizardmode" = "xno" ; then
! 174: AC_MSG_RESULT([no])
! 175: elif test "x$enable_wizardmode" = "x" ; then
! 176: AC_MSG_RESULT([no])
! 177: else
! 178: AC_DEFINE([MASTER], [], [Define to include wizard mode])
! 179: if test "x$enable_wizardmode" != "xyes" ; then
! 180: AC_DEFINE_UNQUOTED([PASSWD],["$enable_wizardmode"], [Define crypt(3) wizard mode password])
! 181: fi
! 182: AC_MSG_RESULT([yes])
! 183: fi
! 184:
! 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])
! 186: AC_MSG_CHECKING([if allscores is enabled])
! 187: if test "x$enable_allscores" = "xyes" ; then
! 188: AC_DEFINE([ALLSCORES], [1], [Define if scorefile is top scores, not top players])
! 189: AC_MSG_RESULT([yes])
! 190: else
! 191: AC_MSG_RESULT([no])
! 192: fi
! 193:
! 194: AC_ARG_ENABLE([checktime],[AC_HELP_STRING([--enable-checktime], [enable checktime @<:@default=no@:>@])],[],[])
! 195: AC_MSG_CHECKING([if checktime is enabled])
! 196: if test "x$enable_checktime" = "xyes" ; then
! 197: AC_DEFINE([CHECKTIME], [1], [Define if checktime feature should be enabled])
! 198: AC_MSG_RESULT([yes])
! 199: else
! 200: AC_MSG_RESULT([no])
! 201: fi
! 202:
! 203: AC_ARG_ENABLE([maxload],[AC_HELP_STRING([--enable-maxload], [enable maxload @<:@default=no@:>@])],[],[])
! 204: AC_MSG_CHECKING([runtime execution limit (maximum system load average)])
! 205: if test "x$enable_maxload" = "xyes" ; then
! 206: AC_DEFINE([MAXLOAD], [100], [Define if maxload feature should be enabled])
! 207: AC_MSG_RESULT([100])
! 208: elif test "x$enable_maxload" = "x" ; then
! 209: AC_MSG_RESULT([unlimited])
! 210: elif test "x$enable_maxload" = "xno" ; then
! 211: AC_MSG_RESULT([unlimited])
! 212: else
! 213: AC_DEFINE_UNQUOTED([MAXLOAD], [$enable_maxload], [Define if maxload feature should be enabled])
! 214: AC_MSG_RESULT([$enable_maxload])
! 215: fi
! 216:
! 217: AC_ARG_ENABLE([maxusers],[AC_HELP_STRING([--enable-maxusers], [enable maxuser @<:@default=no@:>@])],[],[])
! 218: AC_MSG_CHECKING([runtime execution limit (maximum online system users)])
! 219: if test "x$enable_maxusers" = "xyes" ; then
! 220: AC_DEFINE([MAXUSERS], [100], [Define if maxusers feature should be enabled])
! 221: AC_MSG_RESULT([100])
! 222: elif test "x$enable_maxusers" = "x" ; then
! 223: AC_MSG_RESULT([unlimited])
! 224: elif test "x$enable_maxload" = "xno" ; then
! 225: AC_MSG_RESULT([unlimited])
! 226: else
! 227: AC_DEFINE_UNQUOTED([MAXLOAD], [$enable_maxusers], [Define if maxusers feature should be enabled])
! 228: AC_MSG_RESULT([$enable_maxusers])
! 229: fi
! 230:
! 231: AC_ARG_ENABLE([numscores],[AC_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])
! 233: if test "x$numscores" = "xyes" ; then
! 234: AC_DEFINE([NUMSCORES], [10], [number of scores to store in scoreboard])
! 235: AC_MSG_RESULT([10])
! 236: elif test "x$enable_numscores" = "x" ; then
! 237: AC_DEFINE([NUMSCORES], [10], [number of scores to store in scoreboard])
! 238: AC_MSG_RESULT([10])
! 239: elif test "x$enable_numscores" = "xno" ; then
! 240: AC_DEFINE([NUMSCORES], [10], [number of scores to store in scoreboard])
! 241: AC_MSG_RESULT([10])
! 242: else
! 243: AC_DEFINE_UNQUOTED([NUMSCORES], [$enable_numscores], [number of scores to store in scoreboard])
! 244: AC_MSG_RESULT([$enable_numscores])
! 245: fi
! 246:
! 247: AC_ARG_ENABLE([numname],[AC_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])
! 249: if test "x$enable_numname" = "xyes" ; then
! 250: AC_DEFINE([NUMNAME], ["Ten"], [word for the number of scores to store in scoreboard])
! 251: AC_MSG_RESULT([Ten])
! 252: elif test "x$enable_numname" = "x" ; then
! 253: AC_DEFINE([NUMNAME], ["Ten"], [word for the number of scores to store in scoreboard])
! 254: AC_MSG_RESULT([Ten])
! 255: elif test "x$enable_numname" = "xno" ; then
! 256: AC_DEFINE([NUMNAME], ["Ten"], [word for the number of scores to store in scoreboard])
! 257: AC_MSG_RESULT([Ten])
! 258: else
! 259: AC_DEFINE_UNQUOTED([NUMNAME], ["$enable_numname"], [word for the number of scores to store in scoreboard])
! 260: AC_MSG_RESULT([$enable_numname])
! 261: fi
! 262:
! 263: AC_ARG_ENABLE([loadav],[AC_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])
! 265: if test "x$enable_loadav" = "xyes" ; then
! 266: 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)])
! 268: AC_MSG_RESULT([/vmunix])
! 269: elif test "x$enable_loadav" = "x" ; then
! 270: AC_MSG_RESULT([no])
! 271: elif test "x$enable_loadav" = "xno" ; then
! 272: AC_MSG_RESULT([no])
! 273: else
! 274: 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)])
! 276: AC_MSG_RESULT([$enable_loadav])
! 277: fi
! 278:
! 279: AC_ARG_ENABLE([ucount],[AC_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])
! 281: 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])
! 283: 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])
! 285: elif test "x$enable_ucount" = "x" ; then
! 286: AC_MSG_RESULT([no])
! 287: elif test "x$enable_count" = "xno" ; then
! 288: AC_MSG_RESULT([no])
! 289: else
! 290: AC_DEFINE([UCOUNT], [], [define if we should use program's user counting function instead of system's])
! 291: AC_DEFINE_UNQUOTED([UTMP], [$enable_ucount], [utmp like file to pass to ucount() when counting online users (unlikely to work)])
! 292: AC_MSG_RESULT([$enable_ucount])
! 293: fi
! 294:
! 295: AC_OUTPUT
CVSweb