annotate arogue5/configure.ac @ 315:ad2570b5b21f

Advanced Rogue 5, 7: fix some trading post messages. When attempting to buy an unaffordable object, messages were often of the form "You can't afford that a scroll of hold monster !", because the object description (stored in curpurch) was the same text used in inventory displays. This has been worked around by inspecting the contents of curpurch and using different message templates.
author John "Elwin" Edwards
date Sun, 24 Oct 2021 20:26:21 -0400
parents 029c1f5c5588
children aab761616489
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
99
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
1 # -*- Autoconf -*-
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
2 # Process this file with autoconf to produce a configure script.
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
3
312
029c1f5c5588 Update the Autoconf files.
John "Elwin" Edwards
parents: 287
diff changeset
4 AC_PREREQ([2.69])
029c1f5c5588 Update the Autoconf files.
John "Elwin" Edwards
parents: 287
diff changeset
5 AC_INIT([Advanced Rogue],[5.8.2],[elwin@sdf.org],[arogue5])
99
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
6 AC_CONFIG_HEADERS([config.h])
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
7 AC_CONFIG_FILES([Makefile])
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
8
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
9 # Checks for programs.
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
10 AC_PROG_CC
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
11 # Checks for libraries.
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
12 MP_WITH_CURSES
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
13 # Checks for header files.
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
14 AC_HEADER_STDC
284
6376b514a30b Fix more header-related warnings.
John "Elwin" Edwards
parents: 278
diff changeset
15 AC_CHECK_HEADERS([pwd.h errno.h fcntl.h limits.h nlist.h stdlib.h string.h sys/ioctl.h sys/utsname.h termios.h unistd.h utmp.h term.h ncurses/term.h process.h arpa/inet.h])
99
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
16
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
17 # Checks for typedefs, structures, and compiler characteristics.
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
18 AC_TYPE_SIZE_T
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
19 AC_STRUCT_TM
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
20 # Checks for library functions.
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
21 AC_FUNC_FORK
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
22 AC_PROG_GCC_TRADITIONAL
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
23 AC_FUNC_LSTAT
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
24 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
25 AC_FUNC_STAT
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
26 AC_FUNC_VPRINTF
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
27 AC_CHECK_FUNCS([erasechar killchar alarm getpass memset setenv strchr nlist _spawnl spawnl getpwuid loadav getloadavg strerror setgid setuid getuid getgid])
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
28 AC_PROG_INSTALL
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
29
312
029c1f5c5588 Update the Autoconf files.
John "Elwin" Edwards
parents: 287
diff changeset
30 AC_ARG_WITH(program-name, AS_HELP_STRING([--with-program-name=NAME],[alternate executable name]),[progname="$withval" ], [progname="arogue5"] )
99
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
31 PROGRAM=$progname
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
32 AC_SUBST(PROGRAM)
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
33
312
029c1f5c5588 Update the Autoconf files.
John "Elwin" Edwards
parents: 287
diff changeset
34 AC_ARG_ENABLE(setgid, AS_HELP_STRING([--enable-setgid=NAME],[install executable as setgid with group ownership of NAME @<:@default=no@:>@]),[],[])
99
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
35 AC_MSG_CHECKING([if using setgid execute bit])
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
36 if test "x$enable_setgid" = "xno" ; then
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
37 GROUPOWNER=
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
38 elif test "x$enable_setgid" = "xyes" ; then
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
39 GROUPOWNER=games
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
40 elif test "x$enable_setgid" = "x" ; then
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
41 GROUPOWNER=
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
42 else
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
43 GROUPOWNER=$enable_setgid
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
44 fi
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
45
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
46 if test "x$GROUPOWNER" != "x" ; then
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
47 AC_DEFINE_UNQUOTED([GROUPOWNER],[$GROUPOWNER], [Define to group owner of setgid executable])
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
48 AC_MSG_RESULT([$GROUPOWNER])
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
49 else
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
50 AC_MSG_RESULT([no])
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
51 fi
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
52
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
53 AC_SUBST(GROUPOWNER)
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
54
312
029c1f5c5588 Update the Autoconf files.
John "Elwin" Edwards
parents: 287
diff changeset
55 AC_ARG_ENABLE([scorefile],[AS_HELP_STRING([--enable-scorefile=SCOREFILE],[enable scoreboard with given filename])],[],[])
99
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
56 AC_MSG_CHECKING([for scoreboard file])
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
57 if test "x$enable_scorefile" = "xno" ; then
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
58 SCOREFILE=
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
59 elif test "x$enable_scorefile" = "xyes" ; then
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
60 SCOREFILE=$progname.scr
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
61 elif test "x$enable_scorefile" = "x" ; then
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
62 SCOREFILE=$progname.scr
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
63 else
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
64 SCOREFILE=$enable_scorefile
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
65 fi
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
66
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
67 if test "x$SCOREFILE" != "x" ; then
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
68 AC_DEFINE_UNQUOTED([SCOREFILE], ["$SCOREFILE"], [Define to file to use for scoreboard])
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
69 AC_MSG_RESULT([$SCOREFILE])
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
70 else
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
71 AC_MSG_RESULT([disabled])
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
72 fi
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
73
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
74 AC_SUBST(SCOREFILE)
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
75
312
029c1f5c5588 Update the Autoconf files.
John "Elwin" Edwards
parents: 287
diff changeset
76 AC_ARG_ENABLE([logfile],[AS_HELP_STRING([--enable-logfile=LOGFILE],[enable logfile with given filename])],[],[])
99
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
77 AC_MSG_CHECKING([for log file])
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
78 if test "x$enable_logfile" = "xno" ; then
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
79 LOGFILE=
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
80 elif test "x$enable_logfile" = "xyes" ; then
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
81 LOGFILE=$progname.log
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
82 elif test "x$enable_logfile" = "x" ; then
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
83 LOGFILE=$progname.log
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
84 else
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
85 LOGFILE=$enable_logfile
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
86 fi
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
87
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
88 if test "x$LOGFILE" != "x" ; then
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
89 AC_DEFINE_UNQUOTED([LOGFILE], ["$LOGFILE"], [Define to file to use for log])
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
90 AC_MSG_RESULT([$LOGFILE])
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
91 else
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
92 AC_MSG_RESULT([disabled])
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
93 fi