Mercurial > hg > early-roguelike
annotate rogue4/configure.ac @ 77:ae7643e1194b
arogue5: fix "More" prompt appearing in the wrong place.
The magic and monster detection routines printed "--More--" to cw
instead of msgw, making it appear at the @-sign instead of on the top
line.
author | John "Elwin" Edwards <elwin@sdf.org> |
---|---|
date | Sun, 09 Sep 2012 08:55:11 -0700 |
parents | ae4f413fe76c |
children | 8f7c082fde46 |
rev | line source |
---|---|
51 | 1 # -*- Autoconf -*- |
2 # Process this file with autoconf to produce a configure script. | |
3 | |
4 AC_PREREQ(2.56) | |
5 AC_INIT([Rogue],[5.2.2], [yendor@rogueforge.net]) | |
6 AC_CONFIG_SRCDIR([armor.c]) | |
7 AC_CONFIG_HEADERS([config.h]) | |
8 # May not be needed for the documentation | |
9 AC_CONFIG_FILES([Makefile rogue.6 rogue.me]) | |
10 | |
11 # Checks for programs. | |
12 AC_PROG_CC | |
13 # Checks for libraries. | |
14 MP_WITH_CURSES | |
15 # Checks for header files. | |
16 AC_HEADER_STDC | |
17 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]) | |
18 # WARN: the sources often don't include the headers when needed. That is one | |
19 # reason why adding "-Wall" to CFLAGS produces 1246 lines of messages. | |
20 | |
21 # Checks for typedefs, structures, and compiler characteristics. | |
22 AC_TYPE_UID_T | |
23 AC_TYPE_SIZE_T | |
24 AC_STRUCT_TM | |
25 # Checks for library functions. | |
26 AC_FUNC_FORK | |
27 AC_PROG_GCC_TRADITIONAL | |
28 AC_FUNC_LSTAT | |
29 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK | |
30 AC_TYPE_SIGNAL | |
31 AC_FUNC_STAT | |
32 AC_FUNC_VPRINTF | |
33 AC_CHECK_FUNCS([erasechar killchar alarm getpass memset setenv strchr nlist _spawnl spawnl getpwuid loadav getloadavg strerror setgid setuid getuid getgid]) | |
34 AC_PROG_INSTALL | |
35 | |
36 # Programs to process the documentation | |
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="rogue4"] ) | |
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([logfile],[AC_HELP_STRING([--enable-logfile=LOGFILE], [enable logfile with given filename])],[],[]) | |
90 AC_MSG_CHECKING([for log file]) | |
91 if test "x$enable_logfile" = "xno" ; then | |
92 LOGFILE= | |
93 elif test "x$enable_logfile" = "xyes" ; then | |
94 LOGFILE=$progname.log | |
95 elif test "x$enable_logfile" = "x" ; then | |
96 LOGFILE=$progname.log | |
97 else | |
98 LOGFILE=$enable_logfile | |
99 fi | |
100 | |
101 if test "x$LOGFILE" != "x" ; then | |
102 AC_DEFINE_UNQUOTED([LOGFILE], ["$LOGFILE"], [Define to file to use for log]) | |
103 AC_MSG_RESULT([$LOGFILE]) | |
104 else | |
105 AC_MSG_RESULT([disabled]) | |
106 fi | |
107 | |
108 AC_SUBST(LOGFILE) | |
109 | |
110 AC_ARG_ENABLE([lockfile],[AC_HELP_STRING([--enable-lockfile=LOCKFILE], [enable scoreboard lockfile with given filename])],[],[]) | |
a1dc75e38e73
rogue4: ported to autoconf. |