Mercurial > hg > early-roguelike
annotate urogue/configure.ac @ 274:603e8a99c859
UltraRogue: add install and uninstall targets to the Makefile.
author | John "Elwin" Edwards |
---|---|
date | Tue, 05 Sep 2017 21:03:26 -0400 |
parents | 51ddbe7b992d |
children | aa0eefcd7df6 |
rev | line source |
---|---|
273 | 1 # -*- Autoconf -*- |
2 # Process this file with autoconf to produce a configure script. | |
3 | |
4 AC_PREREQ(2.56) | |
5 AC_INIT([UltraRogue],[1.07], [yendor@rogueforge.net]) | |
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([pwd.h errno.h fcntl.h limits.h nlist.h stdlib.h string.h sys/ioctl.h termios.h unistd.h utmp.h utmpx.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_FUNC_LSTAT | |
25 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK | |
26 AC_TYPE_SIGNAL | |
27 AC_FUNC_STAT | |
28 AC_FUNC_VPRINTF | |
29 AC_CHECK_FUNCS([erasechar killchar alarm getpass memset setenv strchr nlist _spawnl spawnl getpwuid loadav getloadavg strerror setgid setuid getuid getgid]) | |
30 AC_PROG_INSTALL | |
31 | |
32 # Programs to process the documentation | |
33 #AC_CHECK_PROG([NROFF], [nroff], [nroff],) | |
34 #AC_CHECK_PROG([GROFF], [groff], [groff],) | |
35 #AC_CHECK_PROG([COLCRT], [colcrt], [colcrt],) | |
36 #AC_CHECK_PROG([TBL], [tbl], [tbl],) | |
37 | |
38 AC_ARG_WITH(program-name, AC_HELP_STRING([--with-program-name=NAME],[alternate executable name]),[progname="$withval" ], [progname="urogue"] ) | |
39 PROGRAM=$progname | |
40 AC_SUBST(PROGRAM) | |
41 | |
42 AC_ARG_ENABLE(setgid, AC_HELP_STRING([--enable-setgid=NAME],[install executable as setgid with group ownership of NAME @<:@default=no@:>@]),[],[]) | |
43 AC_MSG_CHECKING([if using setgid execute bit]) | |
44 if test "x$enable_setgid" = "xno" ; then | |
45 GROUPOWNER= | |
46 elif test "x$enable_setgid" = "xyes" ; then | |
47 GROUPOWNER=games | |
48 elif test "x$enable_setgid" = "x" ; then | |
49 GROUPOWNER= | |
50 else | |
51 GROUPOWNER=$enable_setgid | |
52 fi | |
53 | |
54 if test "x$GROUPOWNER" != "x" ; then | |
55 AC_DEFINE_UNQUOTED([GROUPOWNER],[$GROUPOWNER], [Define to group owner of setgid executable]) | |
56 AC_MSG_RESULT([$GROUPOWNER]) | |
57 else | |
58 AC_MSG_RESULT([no]) | |
59 fi | |
60 | |
61 AC_SUBST(GROUPOWNER) | |
62 | |
63 AC_ARG_ENABLE([scorefile],[AC_HELP_STRING([--enable-scorefile=SCOREFILE], [enable scoreboard with given filename])],[],[]) | |
64 AC_MSG_CHECKING([for scoreboard file]) | |
65 if test "x$enable_scorefile" = "xno" ; then | |
66 SCOREFILE= | |
67 elif test "x$enable_scorefile" = "xyes" ; then | |
68 SCOREFILE=$progname.scr | |
69 elif test "x$enable_scorefile" = "x" ; then | |
70 SCOREFILE=$progname.scr | |
71 else | |
72 SCOREFILE=$enable_scorefile | |
73 fi | |
74 | |
75 if test "x$SCOREFILE" != "x" ; then | |
76 AC_DEFINE_UNQUOTED([SCOREFILE], ["$SCOREFILE"], [Define to file to use for scoreboard]) | |
77 AC_MSG_RESULT([$SCOREFILE]) | |
78 else | |
79 AC_MSG_RESULT([disabled]) | |
80 fi | |
81 | |
82 AC_SUBST(SCOREFILE) | |
83 | |
84 AC_ARG_ENABLE([logfile],[AC_HELP_STRING([--enable-logfile=LOGFILE], [enable logfile with given filename])],[],[]) | |
85 AC_MSG_CHECKING([for log file]) | |
86 if test "x$enable_logfile" = "xno" ; then | |
87 LOGFILE= | |
88 elif test "x$enable_logfile" = "xyes" ; then | |
89 LOGFILE=$progname.log | |
90 elif test "x$enable_logfile" = "x" ; then | |
91 LOGFILE=$progname.log | |
92 else | |
93 LOGFILE=$enable_logfile | |
94 fi | |
95 | |
51ddbe7b992d
UltraRogue: begin autoconfiscation.
John "Elwin" Edwards |