annotate arogue5/configure.ac @ 233:0990adf580ee

Declare some function arguments as const. Some functions, mostly in fight.c, declared variables as pointers to const char but passed them to functions that took pointers to ordinary char. The strings did not actually get modified, so adding 'const' to the function definitions removed the warnings.
author John "Elwin" Edwards
date Sun, 06 Mar 2016 19:32:47 -0500
parents 5238b835d661
children c222f9d56776
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
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
4 AC_PREREQ(2.56)
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
5 AC_INIT([ARogue],[5.8.2], [yendor@rogueforge.net])
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 # May not be needed for the documentation
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
8 AC_CONFIG_FILES([Makefile])
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
9
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
10 # Checks for programs.
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
11 AC_PROG_CC
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
12 # Checks for libraries.
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
13 MP_WITH_CURSES
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
14 # Checks for header files.
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
15 AC_HEADER_STDC
122
65f3da34578a rogue4, arogue5: improve portability.
John "Elwin" Edwards
parents: 99
diff changeset
16 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])
99
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
17
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
18 # Checks for typedefs, structures, and compiler characteristics.
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
19 AC_TYPE_SIZE_T
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
20 AC_STRUCT_TM
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
21 # Checks for library functions.
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
22 AC_FUNC_FORK
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
23 AC_PROG_GCC_TRADITIONAL
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
24 AC_FUNC_LSTAT
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
25 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
26 AC_TYPE_SIGNAL
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
27 AC_FUNC_STAT
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
28 AC_FUNC_VPRINTF
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
29 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
30 AC_PROG_INSTALL
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
31
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
32 AC_ARG_WITH(program-name, AC_HELP_STRING([--with-program-name=NAME],[alternate executable name]),[progname="$withval" ], [progname="arogue5"] )
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
33 PROGRAM=$progname
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
34 AC_SUBST(PROGRAM)
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
35
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
36 AC_ARG_ENABLE(setgid, AC_HELP_STRING([--enable-setgid=NAME],[install executable as setgid with group ownership of NAME @<:@default=no@:>@])],[],[])
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
37 AC_MSG_CHECKING([if using setgid execute bit])
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
38 if test "x$enable_setgid" = "xno" ; then
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
39 GROUPOWNER=
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
40 elif test "x$enable_setgid" = "xyes" ; then
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
41 GROUPOWNER=games
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
42 elif test "x$enable_setgid" = "x" ; then
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
43 GROUPOWNER=
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
44 else
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
45 GROUPOWNER=$enable_setgid
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
46 fi
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
47
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
48 if test "x$GROUPOWNER" != "x" ; then
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
49 AC_DEFINE_UNQUOTED([GROUPOWNER],[$GROUPOWNER], [Define to group owner of setgid executable])
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
50 AC_MSG_RESULT([$GROUPOWNER])
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
51 else
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
52 AC_MSG_RESULT([no])
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
53 fi
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
54
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
55 AC_SUBST(GROUPOWNER)
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
56
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
57 AC_ARG_ENABLE([scorefile],[AC_HELP_STRING([--enable-scorefile=SCOREFILE], [enable scoreboard with given filename])],[],[])
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
58 AC_MSG_CHECKING([for scoreboard file])
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
59 if test "x$enable_scorefile" = "xno" ; then
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
60 SCOREFILE=
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
61 elif test "x$enable_scorefile" = "xyes" ; 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 elif test "x$enable_scorefile" = "x" ; then
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
64 SCOREFILE=$progname.scr
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
65 else
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
66 SCOREFILE=$enable_scorefile
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
67 fi
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
68
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
69 if test "x$SCOREFILE" != "x" ; then
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
70 AC_DEFINE_UNQUOTED([SCOREFILE], ["$SCOREFILE"], [Define to file to use for scoreboard])
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
71 AC_MSG_RESULT([$SCOREFILE])
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
72 else
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
73 AC_MSG_RESULT([disabled])
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
74 fi
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
75
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
76 AC_SUBST(SCOREFILE)
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
77
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
78 AC_ARG_ENABLE([logfile],[AC_HELP_STRING([--enable-logfile=LOGFILE], [enable logfile with given filename])],[],[])
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
79 AC_MSG_CHECKING([for log file])
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
80 if test "x$enable_logfile" = "xno" ; then
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
81 LOGFILE=
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
82 elif test "x$enable_logfile" = "xyes" ; 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 elif test "x$enable_logfile" = "x" ; then
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
85 LOGFILE=$progname.log
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
86 else
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
87 LOGFILE=$enable_logfile
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
88 fi
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
89
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
90 if test "x$LOGFILE" != "x" ; then
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
91 AC_DEFINE_UNQUOTED([LOGFILE], ["$LOGFILE"], [Define to file to use for log])
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
92 AC_MSG_RESULT([$LOGFILE])
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
93 else
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
94 AC_MSG_RESULT([disabled])
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents:
diff changeset
95 fi
dfeed24bb616 arogue5: port to autoconf.
John "Elwin" Edwards
parents: