Mercurial > hg > early-roguelike
changeset 51:a1dc75e38e73
rogue4: ported to autoconf.
author | elwin |
---|---|
date | Tue, 11 Oct 2011 15:20:40 +0000 |
parents | c9382913d6df |
children | ae4f413fe76c |
files | rogue4/Makefile rogue4/Makefile.in rogue4/acinclude.m4 rogue4/configure.ac rogue4/install-sh rogue4/rogue.6 rogue4/rogue.6.in rogue4/rogue.h rogue4/rogue.me rogue4/rogue.me.in |
diffstat | 10 files changed, 1956 insertions(+), 1003 deletions(-) [+] |
line wrap: on
line diff
--- a/rogue4/Makefile Mon Oct 10 20:57:51 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,149 +0,0 @@ -# -# Makefile for rogue -# @(#)Makefile 4.13 (Berkeley) 1/23/82 -# -# Rogue: Exploring the Dungeons of Doom -# Copyright (C) 1980, 1981, 1982 Michael Toy, Ken Arnold and Glenn Wichman -# All rights reserved. -# -# See the file LICENSE.TXT for full copyright and licensing information. -# - -DISTNAME=rogue5.2.2 - -HDRS= rogue.h extern.h -DOBJS= vers.o extern.o armor.o chase.o command.o daemon.o daemons.o \ - fight.o init.o io.o list.o main.o misc.o monsters.o move.o \ - new_level.o options.o pack.o passages.o potions.o rings.o rip.o \ - rooms.o save.o scrolls.o state.o sticks.o things.o weapons.o wizard.o\ - xcrypt.o mdport.o -OBJS= $(DOBJS) mach_dep.o -CFILES= vers.c extern.c armor.c chase.c command.c daemon.c daemons.c \ - fight.c init.c io.c list.c main.c misc.c monsters.c move.c \ - new_level.c options.c pack.c passages.c potions.c rings.c rip.c \ - rooms.c save.c scrolls.c state.c sticks.c things.c weapons.c wizard.c \ - mach_dep.c xcrypt.c mdport.c -MISC= Makefile LICENSE.TXT rogue.6 rogue.me - -CC = gcc -CFLAGS= -O3 -DSAVEDIR=\"/usr/local/games/roguelike/rogue4save/\" \ - -DLOGFILE=\"/usr/local/games/roguelike/rogue4.log\" -CRLIB = -lcurses -RM = rm -f -TAR = tar - -SCOREFILE= -SF=-DSCOREFILE=\"/usr/local/games/roguelike/rogue4.scr\" \ - -DLOCKFILE=\"/usr/local/games/roguelike/rogue4save/rogue4.lck\" -NAMELIST= -NL= -#MACHDEP= -DMAXLOAD=40 -DLOADAV -DCHECKTIME=4 -MACHDEP= - -.c.o: - @echo $(CC) -c $(CFLAGS) $*.c - @$(CC) -c $(CFLAGS) $*.c -o $*.o -# @cpp -P $(CFLAGS) $*.c | ./xstr -v -c - -# @cc -c $(CFLAGS) x.c -# @mv x.o $*.o - -rogue: $(HDRS) $(OBJS) # xs.o -# @rm -f x.c -# $(CC) $(LDFLAGS) xs.o $(OBJS) $(CRLIB) - $(CC) $(LDFLAGS) $(OBJS) $(CRLIB) -o $@ - -vers.o: - $(CC) -c $(CFLAGS) vers.c - -mach_dep.o: mach_dep.c - $(CC) -c $(CFLAGS) $(SF) $(NL) $(MACHDEP) mach_dep.c - -xs.o: strings - ./xstr - $(CC) -c $(CFLAGS) xs.c - -xstr: xstr.c - $(CC) -s -O -o xstr xstr.c - -findpw: findpw.c xcrypt.c - $(CC) -s -o findpw findpw.c xcrypt.c - -prob: prob.o extern.o xs.o - $(CC) -O -o prob prob.o extern.o xs.o - -prob.o: prob.c rogue.h - $(CC) -O -c prob.c - -clean: - rm -f $(POBJS) $(OBJS) core a.out p.out rogue strings make.out rogue.tar vgrind.* x.c x.o xs.c xs.o linterrs findpw distmod.o xs.po xstr rogue rogue.exe rogue.tar.gz rogue.cat rogue.doc xstr.exe - -dist.src: - make clean - tar cf $(DISTNAME)-src.tar $(CFILES) $(HDRS) $(MISC) - gzip -f $(DISTNAME)-src.tar - -debug.irix: - make clean - make CC=cc CFLAGS="-woff 1116 -g -DWIZARD" rogue -dist.irix: - make clean - make CC=cc CFLAGS="-woff 1116 -O3" rogue - tbl rogue.me | nroff -me | colcrt - > rogue.doc - nroff -man rogue.6 | colcrt - > rogue.cat - tar cf $(DISTNAME)-irix.tar rogue LICENSE.TXT rogue.cat rogue.doc - gzip -f $(DISTNAME)-irix.tar - -debug.aix: - make clean - make CC=xlc CFLAGS="-qmaxmem=16768 -g -qstrict -DWIZARD" rogue -dist.aix: - make clean - make CC=xlc CFLAGS="-qmaxmem=16768 -O3 -qstrict" rogue - tbl rogue.me | nroff -me | colcrt - > rogue.doc - nroff -man rogue.6 | colcrt - > rogue.cat - tar cf $(DISTNAME)-aix.tar rogue LICENSE.TXT rogue.cat rogue.doc - gzip -f $(DISTNAME)-aix.tar - -debug.linux: - make clean - make CFLAGS="-g3 -DWIZARD" rogue -dist.linux: - make clean - make rogue - groff -P-c -t -me -Tascii rogue.me | sed -e 's/.\x08//g' > rogue.doc - groff -man rogue.6 | sed -e 's/.\x08//g' > rogue.cat - tar cf $(DISTNAME)-linux.tar rogue LICENSE.TXT rogue.cat rogue.doc - gzip -f $(DISTNAME)-linux.tar - -debug.interix: - make clean - make CFLAGS="-g3 -DWIZARD" rogue -dist.interix: - make clean - make rogue - groff -P-b -P-u -t -me -Tascii rogue.me > rogue.doc - groff -P-b -P-u -man -Tascii rogue.6 > rogue.cat - tar cf $(DISTNAME)-interix.tar rogue LICENSE.TXT rogue.cat rogue.doc - gzip -f $(DISTNAME)-interix.tar - -debug.cygwin: - make clean - make CFLAGS="-g3 -DWIZARD" rogue -dist.cygwin: - make clean - make rogue - groff -P-c -t -me -Tascii rogue.me | sed -e 's/.\x08//g' > rogue.doc - groff -P-c -man -Tascii rogue.6 | sed -e 's/.\x08//g' > rogue.cat - tar cf $(DISTNAME)-cygwin.tar rogue.exe LICENSE.TXT rogue.cat rogue.doc - gzip -f $(DISTNAME)-cygwin.tar - -debug.djgpp: - make clean - make CFLAGS="-g3 -DWIZARD" LDFLAGS="-L$(DJDIR)/LIB" CRLIB="-lpdcurses" rogue -dist.djgpp: - make clean - make CFLAGS="-O3" LDFLAGS="-L$(DJDIR)/LIB" CRLIB="-lpdcurses" rogue - groff -t -me -Tascii rogue.me | sed -e 's/.\x08//g' > rogue.doc - groff -man -Tascii rogue.6 | sed -e 's/.\x08//g' > rogue.cat - rm -f $(DISTNAME)-djgpp.zip - zip $(DISTNAME)-djgpp.zip rogue.exe LICENSE.TXT rogue.cat rogue.doc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rogue4/Makefile.in Tue Oct 11 15:20:40 2011 +0000 @@ -0,0 +1,227 @@ +# +# Makefile for rogue +# @(#)Makefile 4.13 (Berkeley) 1/23/82 +# +# Rogue: Exploring the Dungeons of Doom +# Copyright (C) 1980, 1981, 1982 Michael Toy, Ken Arnold and Glenn Wichman +# All rights reserved. +# +# See the file LICENSE.TXT for full copyright and licensing information. +# + +DISTNAME=@PACKAGE_TARNAME@@PACKAGE_VERSION@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@-@PACKAGE_VERSION@ +PROGRAM=@PROGRAM@ + +CC = @CC@ +LIBS = @LIBS@ + +#SCOREFILE=\"/usr/local/games/roguelike/rogue4.scr\" +SCOREFILE=@SCOREFILE@ +#LOGFILE=\"/usr/local/games/roguelike/rogue4.log\" +LOGFILE=@LOGFILE@ +#SAVEDIR=\"/usr/local/games/roguelike/rogue4save/\" +SAVEDIR=@SAVEDIR@ +#LOCKFILE=\"/usr/local/games/roguelike/rogue4save/rogue4.lck\" +LOCKFILE=@LOCKFILE@ +#GROUPOWNER=games +GROUPOWNER=@GROUPOWNER@ + +DESTDIR=@DESTDIR@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +datarootdir=@datarootdir@ +bindir=@bindir@ +mandir=@mandir@ +man6dir=$(mandir)/man6 +docdir=@docdir@ + +HDRS= rogue.h extern.h +DOBJS= vers.o extern.o armor.o chase.o command.o daemon.o daemons.o \ + fight.o init.o io.o list.o main.o misc.o monsters.o move.o \ + new_level.o options.o pack.o passages.o potions.o rings.o rip.o \ + rooms.o save.o scrolls.o state.o sticks.o things.o weapons.o wizard.o\ + xcrypt.o mdport.o +OBJS= $(DOBJS) mach_dep.o +CFILES= vers.c extern.c armor.c chase.c command.c daemon.c daemons.c \ + fight.c init.c io.c list.c main.c misc.c monsters.c move.c \ + new_level.c options.c pack.c passages.c potions.c rings.c rip.c \ + rooms.c save.c scrolls.c state.c sticks.c things.c weapons.c wizard.c \ + mach_dep.c xcrypt.c mdport.c +MISC= Makefile LICENSE.TXT rogue.6 rogue.me + +CFLAGS= -O3 +CRLIB = -lcurses +RM = rm -f +TAR = tar +TOUCH=touch +MKDIR=mkdir +CHGRP=chgrp +CHMOD=chmod +INSTALL=@INSTALL@ + +SF= +NAMELIST= +NL= +#MACHDEP= -DMAXLOAD=40 -DLOADAV -DCHECKTIME=4 +MACHDEP= + +.c.o: + @echo $(CC) -c $(CFLAGS) $*.c + @$(CC) -c $(CFLAGS) $*.c -o $*.o +# @cpp -P $(CFLAGS) $*.c | ./xstr -v -c - +# @cc -c $(CFLAGS) x.c +# @mv x.o $*.o + +@PROGRAM@: $(HDRS) $(OBJS) # xs.o +# @rm -f x.c +# $(CC) $(LDFLAGS) xs.o $(OBJS) $(CRLIB) + $(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $@ + +main.o: main.c $(HDRS) + $(CC) -c $(CFLAGS) -o $@ main.c + +vers.o: + $(CC) -c $(CFLAGS) vers.c + +mach_dep.o: mach_dep.c + $(CC) -c $(CFLAGS) $(SF) $(NL) $(MACHDEP) mach_dep.c + +xs.o: strings + ./xstr + $(CC) -c $(CFLAGS) xs.c + +xstr: xstr.c + $(CC) -s -O -o xstr xstr.c + +findpw: findpw.c xcrypt.c + $(CC) -s -o findpw findpw.c xcrypt.c + +prob: prob.o extern.o xs.o + $(CC) -O -o prob prob.o extern.o xs.o + +prob.o: prob.c rogue.h + $(CC) -O -c prob.c + +clean: + rm -f $(POBJS) $(OBJS) core a.out p.out @PROGRAM@ strings make.out rogue.tar vgrind.* x.c x.o xs.c xs.o linterrs findpw distmod.o xs.po xstr rogue rogue.exe rogue.tar.gz rogue.cat rogue.doc xstr.exe + +maintainer-clean: + make clean + $(RM) Makefile config.h + $(RM) config.status config.log + $(RM) $(PROGRAM).scr $(PROGRAM).log $(PROGRAM).lck + $(RM) rogue.6 rogue.me + +install: $(PROGRAM) + -$(TOUCH) test + -if test ! -f $(DESTDIR)$(SCOREFILE) ; \ + then $(INSTALL) -m 0664 test $(DESTDIR)$(SCOREFILE) ; fi + -if test "x$(LOGFILE)" != "x" -a ! -f $(DESTDIR)$(LOGFILE) ; then \ + $(INSTALL) -m 0664 test $(DESTDIR)$(LOGFILE) ; fi + -if test "x$(SAVEDIR)" != "x" -a ! -d $(DESTDIR)$(SAVEDIR) ; then \ + $(MKDIR) -p $(DESTDIR)$(SAVEDIR) ; fi + -$(INSTALL) -m 0755 $(PROGRAM) $(DESTDIR)$(bindir)/$(PROGRAM) + -if test "x$(GROUPOWNER)" != "x" ; then \ + $(CHGRP) $(GROUPOWNER) $(DESTDIR)$(SCOREFILE) ; \ + $(CHGRP) $(GROUPOWNER) $(DESTDIR)$(LOGFILE) ; \ + $(CHGRP) $(GROUPOWNER) $(DESTDIR)$(bindir)/$(PROGRAM) ; \ + $(CHGRP) $(GROUPOWNER) $(DESTDIR)$(SAVEDIR) ; \ + $(CHMOD) 02755 $(DESTDIR)$(bindir)/$(PROGRAM) ; \ + $(CHMOD) 0464 $(DESTDIR)$(SCOREFILE) ; \ + $(CHMOD) 0464 $(DESTDIR)$(LOGFILE) ; \ + $(CHMOD) 0775 $(DESTDIR)$(SAVEDIR) ; \ + fi + -if test -d $(DESTDIR)$(man6dir) ; \ + then $(INSTALL) -m 0644 rogue.6 $(DESTDIR)$(man6dir)/$(PROGRAM).6 ; fi + -if test ! -d $(DESTDIR)$(man6dir) ; \ + then $(INSTALL) -m 0644 rogue.6 $(DESTDIR)$(mandir)/$(PROGRAM).6 ; fi + -if test ! -d $(DESTDIR)$(docdir) ; \ + then $(MKDIR) -p $(DESTDIR)$(docdir) ; fi + -$(INSTALL) -m 0644 LICENSE.TXT $(DESTDIR)$(docdir)/LICENSE.TXT + -$(INSTALL) -m 0644 rogue.me $(DESTDIR)$(docdir)/$(PROGRAM).me + -if test "x$(LOCKFILE)" != "x" -a ! -f $(DESTDIR)$(LOCKFILE) ; then \ + $(INSTALL) -m 0666 test $(DESTDIR)$(LOCKFILE) ; \ + $(RM) $(DESTDIR)$(LOCKFILE) ; \ + fi + -$(RM) test + +uninstall: + -$(RM) $(DESTDIR)$(bindir)/$(PROGRAM) + -$(RM) $(DESTDIR)$(man6dir)/$(PROGRAM).6 + -$(RM) $(DESTDIR)$(docdir)$(PROGRAM)/$(PROGRAM).doc + -$(RM) $(DESTDIR)$(LOCKFILE) + -$(RMDIR) $(DESTDIR)$(docdir)$(PROGRAM) + +reinstall: uninstall install + +dist.src: + make clean + tar cf $(DISTNAME)-src.tar $(CFILES) $(HDRS) $(MISC) + gzip -f $(DISTNAME)-src.tar + +debug.irix: + make clean + make CC=cc CFLAGS="-woff 1116 -g -DWIZARD" rogue +dist.irix: + make clean + make CC=cc CFLAGS="-woff 1116 -O3" rogue + tbl rogue.me | nroff -me | colcrt - > rogue.doc + nroff -man rogue.6 | colcrt - > rogue.cat + tar cf $(DISTNAME)-irix.tar rogue LICENSE.TXT rogue.cat rogue.doc + gzip -f $(DISTNAME)-irix.tar + +debug.aix: + make clean + make CC=xlc CFLAGS="-qmaxmem=16768 -g -qstrict -DWIZARD" rogue +dist.aix: + make clean + make CC=xlc CFLAGS="-qmaxmem=16768 -O3 -qstrict" rogue + tbl rogue.me | nroff -me | colcrt - > rogue.doc + nroff -man rogue.6 | colcrt - > rogue.cat + tar cf $(DISTNAME)-aix.tar rogue LICENSE.TXT rogue.cat rogue.doc + gzip -f $(DISTNAME)-aix.tar + +debug.linux: + make clean + make CFLAGS="-g3 -DWIZARD" rogue +dist.linux: + make clean + make rogue + groff -P-c -t -me -Tascii rogue.me | sed -e 's/.\x08//g' > rogue.doc + groff -man rogue.6 | sed -e 's/.\x08//g' > rogue.cat + tar cf $(DISTNAME)-linux.tar rogue LICENSE.TXT rogue.cat rogue.doc + gzip -f $(DISTNAME)-linux.tar + +debug.interix: + make clean + make CFLAGS="-g3 -DWIZARD" rogue +dist.interix: + make clean + make rogue + groff -P-b -P-u -t -me -Tascii rogue.me > rogue.doc + groff -P-b -P-u -man -Tascii rogue.6 > rogue.cat + tar cf $(DISTNAME)-interix.tar rogue LICENSE.TXT rogue.cat rogue.doc + gzip -f $(DISTNAME)-interix.tar + +debug.cygwin: + make clean + make CFLAGS="-g3 -DWIZARD" rogue +dist.cygwin: + make clean + make rogue + groff -P-c -t -me -Tascii rogue.me | sed -e 's/.\x08//g' > rogue.doc + groff -P-c -man -Tascii rogue.6 | sed -e 's/.\x08//g' > rogue.cat + tar cf $(DISTNAME)-cygwin.tar rogue.exe LICENSE.TXT rogue.cat rogue.doc + gzip -f $(DISTNAME)-cygwin.tar + +debug.djgpp: + make clean + make CFLAGS="-g3 -DWIZARD" LDFLAGS="-L$(DJDIR)/LIB" rogue +dist.djgpp: + make clean + make CFLAGS="-O3" LDFLAGS="-L$(DJDIR)/LIB" rogue + groff -t -me -Tascii rogue.me | sed -e 's/.\x08//g' > rogue.doc + groff -man -Tascii rogue.6 | sed -e 's/.\x08//g' > rogue.cat + rm -f $(DISTNAME)-djgpp.zip + zip $(DISTNAME)-djgpp.zip rogue.exe LICENSE.TXT rogue.cat rogue.doc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rogue4/acinclude.m4 Tue Oct 11 15:20:40 2011 +0000 @@ -0,0 +1,122 @@ +AC_DEFUN([MP_WITH_CURSES], + [AC_ARG_WITH(ncurses, [ --with-ncurses Force the use of ncurses over curses],,) + mp_save_LIBS="$LIBS" + CURSES_LIB="" + if test "$with_ncurses" != yes + then + AC_CACHE_CHECK([for working curses], mp_cv_curses, + [LIBS="$LIBS -lcurses" + AC_TRY_LINK( + [#include <curses.h>], + [chtype a; int b=A_STANDOUT, c=KEY_LEFT; initscr(); ], + mp_cv_curses=yes, mp_cv_curses=no)]) + if test "$mp_cv_curses" = yes + then + AC_DEFINE(HAVE_CURSES_H, 1, [Define to 1 if libcurses is requested]) + #AC_DEFINE(HAVE_CURSES_H) + CURSES_LIB="-lcurses" + fi + fi + if test ! "$CURSES_LIB" + then + AC_CACHE_CHECK([for working ncurses], mp_cv_ncurses, + [LIBS="$mp_save_LIBS -lncurses" + AC_TRY_LINK( + [#include <ncurses.h>], + [chtype a; int b=A_STANDOUT, c=KEY_LEFT; initscr(); ], + mp_cv_ncurses=yes, mp_cv_ncurses=no)]) + if test "$mp_cv_ncurses" = yes + then + AC_DEFINE(HAVE_NCURSES_H, 1, [Define to 1 if libncurses is requested]) + CURSES_LIB="-lncurses" + fi + fi + if test ! "$CURSES_LIB" + then + AC_CACHE_CHECK([for working pdcurses], mp_cv_pdcurses, + [LIBS="$mp_save_LIBS -lpdcurses" + AC_TRY_LINK( + [#include <curses.h>], + [chtype a; int b=A_STANDOUT, c=KEY_LEFT; initscr(); ], + mp_cv_pdcurses=yes, mp_cv_pdcurses=no)]) + if test "$mp_cv_pdcurses" = yes + then + AC_DEFINE(HAVE_CURSES_H, 1, [Define to 1 if libcurses is requested]) + CURSES_LIB="-lpdcurses" + fi + fi + if test ! "$CURSES_LIB" + then + AC_CACHE_CHECK([for working pdcur], mp_cv_pdcur, + [LIBS="$mp_save_LIBS -lpdcur" + AC_TRY_LINK( + [#include <curses.h>], + [chtype a; int b=A_STANDOUT, c=KEY_LEFT; initscr(); ], + mp_cv_pdcur=yes, mp_cv_pdcur=no)]) + if test "$mp_cv_pdcur" = yes + then + AC_DEFINE(HAVE_CURSES_H, 1, [Define to 1 if libcurses is requested]) + CURSES_LIB="-lpdcur" + fi + fi + if test ! "$CURSES_LIB" + then + AC_CACHE_CHECK([for working peer pdcurses], mp_cv_lpdcurses, + [LIBS="$mp_save_LIBS ../pdcurses/pdcurses.a" + AC_TRY_LINK( + [#include "../pdcurses/curses.h"], + [chtype a; int b=A_STANDOUT, c=KEY_LEFT; initscr(); ], + mp_cv_lpdcurses=yes, mp_cv_lpdcurses=no)]) + if test "$mp_cv_lpdcurses" = yes + then + AC_DEFINE(HAVE_CURSES_H, 1, [Define to 1 if libcurses is requested]) + CURSES_LIB="../pdcurses/pdcurses.a" + RF_ADDTO(CPPFLAGS,"-I../pdcurses") + fi + fi + AC_CACHE_CHECK([for ESCDELAY variable], + [mc_cv_ncurses_escdelay], + [AC_TRY_LINK([], [ + extern int ESCDELAY; + ESCDELAY = 0; + ], + [mc_cv_ncurses_escdelay=yes], + [mc_cv_ncurses_escdelay=no]) + ]) + if test "$mc_cv_ncurses_escdelay" = yes; then + AC_DEFINE(HAVE_ESCDELAY, 1, + [Define if ncurses has ESCDELAY variable]) + fi + if test ! "$CURSES_LIB" ; then + LIBS="$mp_save_LIBS" + fi +])dnl + +dnl +dnl RF_ADDTO(variable, value) +dnl +dnl Add value to variable +dnl +AC_DEFUN([RF_ADDTO],[ + if test "x$$1" = "x"; then + test "x$silent" != "xyes" && echo " setting $1 to \"$2\"" + $1="$2" + else + apr_addto_bugger="$2" + for i in $apr_addto_bugger; do + apr_addto_duplicate="0" + for j in $$1; do + if test "x$i" = "x$j"; then + apr_addto_duplicate="1" + break + fi + done + if test $apr_addto_duplicate = "0"; then + test "x$silent" != "xyes" && echo " adding \"$i\" to $1" + $1="$$1 $i" + fi + done + fi +])dnl + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rogue4/configure.ac Tue Oct 11 15:20:40 2011 +0000 @@ -0,0 +1,232 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ(2.56) +AC_INIT([Rogue],[5.2.2], [yendor@rogueforge.net]) +AC_CONFIG_SRCDIR([armor.c]) +AC_CONFIG_HEADERS([config.h]) +# May not be needed for the documentation +AC_CONFIG_FILES([Makefile rogue.6 rogue.me]) + +# Checks for programs. +AC_PROG_CC +# Checks for libraries. +MP_WITH_CURSES +# Checks for header files. +AC_HEADER_STDC +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]) +# WARN: the sources often don't include the headers when needed. That is one +# reason why adding "-Wall" to CFLAGS produces 1246 lines of messages. + +# Checks for typedefs, structures, and compiler characteristics. +AC_TYPE_UID_T +AC_TYPE_SIZE_T +AC_STRUCT_TM +# Checks for library functions. +AC_FUNC_FORK +AC_PROG_GCC_TRADITIONAL +AC_FUNC_LSTAT +AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK +AC_TYPE_SIGNAL +AC_FUNC_STAT +AC_FUNC_VPRINTF +AC_CHECK_FUNCS([erasechar killchar alarm getpass memset setenv strchr nlist _spawnl spawnl getpwuid loadav getloadavg strerror setgid setuid getuid getgid]) +AC_PROG_INSTALL + +# Programs to process the documentation +AC_CHECK_PROG([NROFF], [nroff], [nroff],) +AC_CHECK_PROG([GROFF], [groff], [groff],) +AC_CHECK_PROG([COLCRT], [colcrt], [colcrt],) +AC_CHECK_PROG([TBL], [tbl], [tbl],) +AC_CHECK_PROG([SED], [sed], [sed],) + +AC_ARG_WITH(program-name, AC_HELP_STRING([--with-program-name=NAME],[alternate executable name]),[progname="$withval" ], [progname="rogue4"] ) +PROGRAM=$progname +AC_SUBST(PROGRAM) + +AC_ARG_ENABLE(setgid, AC_HELP_STRING([--enable-setgid=NAME],[install executable as setgid with group ownership of NAME @<:@default=no@:>@])],[],[]) +AC_MSG_CHECKING([if using setgid execute bit]) +if test "x$enable_setgid" = "xno" ; then +GROUPOWNER= +elif test "x$enable_setgid" = "xyes" ; then +GROUPOWNER=games +elif test "x$enable_setgid" = "x" ; then +GROUPOWNER= +else +GROUPOWNER=$enable_setgid +fi + +if test "x$GROUPOWNER" != "x" ; then +AC_DEFINE_UNQUOTED([GROUPOWNER],[$GROUPOWNER], [Define to group owner of setgid executable]) +AC_MSG_RESULT([$GROUPOWNER]) +else +AC_MSG_RESULT([no]) +fi + +AC_SUBST(GROUPOWNER) + +AC_ARG_ENABLE([scorefile],[AC_HELP_STRING([--enable-scorefile=SCOREFILE], [enable scoreboard with given filename])],[],[]) +AC_MSG_CHECKING([for scoreboard file]) +if test "x$enable_scorefile" = "xno" ; then +SCOREFILE= +elif test "x$enable_scorefile" = "xyes" ; then +SCOREFILE=$progname.scr +elif test "x$enable_scorefile" = "x" ; then +SCOREFILE=$progname.scr +else +SCOREFILE=$enable_scorefile +fi + +if test "x$SCOREFILE" != "x" ; then +AC_DEFINE_UNQUOTED([SCOREFILE], ["$SCOREFILE"], [Define to file to use for scoreboard]) +AC_MSG_RESULT([$SCOREFILE]) +else +AC_MSG_RESULT([disabled])