Annotation of early-roguelike/srogue/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([SRogue],[9.0], [yendor@rogueforge.net], [srogue])
! 6: AC_CONFIG_HEADERS([config.h])
! 7: AC_CONFIG_FILES([Makefile])
! 8:
! 9: # Checks for programs.
! 10: AC_PROG_CC
! 11: # Checks for libraries.
! 12: MP_WITH_CURSES
! 13: # Checks for header files.
! 14: AC_HEADER_STDC
! 15: AC_CHECK_HEADERS([arpa/inet.h pwd.h errno.h fcntl.h limits.h nlist.h stdlib.h string.h sys/ioctl.h termios.h unistd.h term.h ncurses/term.h process.h])
! 16:
! 17: # Checks for typedefs, structures, and compiler characteristics.
! 18: AC_TYPE_UID_T
! 19: AC_TYPE_SIZE_T
! 20: AC_STRUCT_TM
! 21: # Checks for library functions.
! 22: AC_FUNC_FORK
! 23: AC_PROG_GCC_TRADITIONAL
! 24: AC_TYPE_SIGNAL
! 25: AC_FUNC_STAT
! 26: AC_FUNC_VPRINTF
! 27: AC_CHECK_FUNCS([erasechar killchar alarm getpass memset setenv strchr nlist _spawnl spawnl getpwuid loadav getloadavg strerror setgid setuid getuid getgid lrand48 random srand48 srandom])
! 28: AC_PROG_INSTALL
! 29:
! 30: AC_CHECK_PROG([NROFF], [nroff], [nroff],)
! 31: AC_CHECK_PROG([GROFF], [groff], [groff],)
! 32: AC_CHECK_PROG([COLCRT], [colcrt], [colcrt],)
! 33: AC_CHECK_PROG([TBL], [tbl], [tbl],)
! 34:
! 35: if test "x$GROFF" != "x" ; then
! 36: DOCS_GROFF=
! 37: DOCS_NROFF=.no-nroff
! 38: DOCS_NONE=.none
! 39: elif test "x$(NROFF)" != "x" && test "x$(TBL)" != "x" && test "x$(COLCRT)" != "x" ; then
! 40: DOCS_GROFF=.no-groff
! 41: DOCS_NROFF=
! 42: DOCS_NONE=.none
! 43: else
! 44: DOCS_GROFF=.no-groff
! 45: DOCS_NROFF=.no-nroff
! 46: DOCS_NONE=
! 47: fi
! 48:
! 49: AC_SUBST(DOCS_GROFF)
! 50: AC_SUBST(DOCS_NROFF)
! 51: AC_SUBST(DOCS_NONE)
! 52:
! 53: AC_ARG_WITH(program-name, AC_HELP_STRING([--with-program-name=NAME],[alternate executable name]),[progname="$withval" ], [progname="srogue"] )
! 54: PROGRAM=$progname
! 55: AC_SUBST(PROGRAM)
! 56:
! 57: AC_ARG_ENABLE(setgid, AC_HELP_STRING([--enable-setgid=NAME],[install executable as setgid with group ownership of NAME @<:@default=no@:>@]),[],[])
! 58: AC_MSG_CHECKING([if using setgid execute bit])
! 59: if test "x$enable_setgid" = "xno" ; then
! 60: GROUPOWNER=
! 61: elif test "x$enable_setgid" = "xyes" ; then
! 62: GROUPOWNER=games
! 63: elif test "x$enable_setgid" = "x" ; then
! 64: GROUPOWNER=
! 65: else
! 66: GROUPOWNER=$enable_setgid
! 67: fi
! 68:
! 69: if test "x$GROUPOWNER" != "x" ; then
! 70: AC_DEFINE_UNQUOTED([GROUPOWNER],[$GROUPOWNER], [Define to group owner of setgid executable])
! 71: AC_MSG_RESULT([$GROUPOWNER])
! 72: else
! 73: AC_MSG_RESULT([no])
! 74: fi
! 75:
! 76: AC_SUBST(GROUPOWNER)
! 77:
! 78: AC_ARG_ENABLE([scorefile],[AC_HELP_STRING([--enable-scorefile=SCOREFILE], [enable scoreboard with given filename])],[],[])
! 79: AC_MSG_CHECKING([for scoreboard file])
! 80: if test "x$enable_scorefile" = "xno" ; then
! 81: SCOREFILE=
! 82: elif test "x$enable_scorefile" = "xyes" ; then
! 83: SCOREFILE=$progname.scr
! 84: elif test "x$enable_scorefile" = "x" ; then
! 85: SCOREFILE=$progname.scr
! 86: else
! 87: SCOREFILE=$enable_scorefile
! 88: fi
! 89:
! 90: if test "x$SCOREFILE" != "x" ; then
! 91: AC_DEFINE_UNQUOTED([SCOREFILE], ["$SCOREFILE"], [Define to file to use for scoreboard])
! 92: AC_MSG_RESULT([$SCOREFILE])
! 93: else
! 94: AC_MSG_RESULT([disabled])
! 95: fi
! 96:
! 97: AC_SUBST(SCOREFILE)
! 98:
! 99: AC_ARG_ENABLE([logfile],[AC_HELP_STRING([--enable-logfile=LOGFILE], [enable logfile with given filename])],[],[])
! 100: AC_MSG_CHECKING([for log file])
! 101: if test "x$enable_logfile" = "xno" ; then
! 102: LOGFILE=
! 103: elif test "x$enable_logfile" = "xyes" ; then
! 104: LOGFILE=$progname.log
! 105: elif test "x$enable_logfile" = "x" ; then
! 106: LOGFILE=$progname.log
! 107: else
! 108: LOGFILE=$enable_logfile
! 109: fi
! 110:
! 111: if test "x$LOGFILE" != "x" ; then
! 112: AC_DEFINE_UNQUOTED([LOGFILE], ["$LOGFILE"], [Define to file to use for log])
! 113: AC_MSG_RESULT([$LOGFILE])
! 114: else
! 115: AC_MSG_RESULT([disabled])
! 116: fi
! 117:
! 118: AC_SUBST(LOGFILE)
! 119:
! 120: AC_ARG_ENABLE([savedir],[AC_HELP_STRING([--enable-savedir=SAVEDIR], [enable systemwide location for saved games])],[],[enable_savedir="no"])
! 121: AC_MSG_CHECKING([for save directory])
! 122: if test "x$enable_savedir" = "xno" ; then
! 123: SAVEDIR=
! 124: elif test "x$enable_savedir" = "xyes" -o "x$enable_savedir" = "x"; then
! 125: if test "x$GROUPOWNER" != "x"; then
! 126: SAVEDIR="/var/local/games/roguelike/${progname}save/"
! 127: else
! 128: SAVEDIR="$progname/"
! 129: fi
! 130: else
! 131: SAVEDIR="$enable_savedir"
! 132: fi
! 133:
! 134: if test "x$SAVEDIR" != "x" ; then
! 135: AC_DEFINE_UNQUOTED([SAVEDIR], ["$SAVEDIR"], [Define to systemwide directory for storing saved games])
! 136: AC_MSG_RESULT([$SAVEDIR])
! 137: else
! 138: AC_MSG_RESULT([disabled])
! 139: fi
! 140:
! 141: AC_SUBST(SAVEDIR)
! 142:
! 143: AC_ARG_ENABLE([wizardmode],[AC_HELP_STRING([--enable-wizardmode], [enable availability of wizard mode @<:@default=no@:>@])],[],[])
! 144: AC_MSG_CHECKING([if wizard mode is enabled])
! 145: if test "x$enable_wizardmode" = "xno" ; then
! 146: AC_MSG_RESULT([no])
! 147: elif test "x$enable_wizardmode" = "x" ; then
! 148: AC_MSG_RESULT([no])
! 149: else
! 150: AC_DEFINE([WIZARD], [], [Define to include wizard mode])
! 151: AC_MSG_RESULT([yes])
! 152: fi
! 153:
! 154: AC_OUTPUT
CVSweb