156
|
1 # -*- Autoconf -*-
|
|
2 # Process this file with autoconf to produce a configure script.
|
|
3
|
312
|
4 AC_PREREQ([2.69])
|
|
5 AC_INIT([XRogue],[8.0.3],[elwin@sdf.org],[xrogue])
|
156
|
6 AC_CONFIG_HEADERS([config.h])
|
|
7 AC_CONFIG_FILES([Makefile])
|
317
|
8 AC_CONFIG_AUX_DIR([../build-aux])
|
156
|
9
|
|
10 # Checks for programs.
|
|
11 AC_PROG_CC
|
|
12 # Checks for libraries.
|
|
13 MP_WITH_CURSES
|
|
14 # Checks for header files.
|
284
|
15 AC_CHECK_HEADERS([pwd.h errno.h fcntl.h limits.h stdlib.h string.h sys/ioctl.h sys/utsname.h termios.h unistd.h term.h ncurses/term.h process.h arpa/inet.h])
|
156
|
16
|
|
17 # Checks for typedefs, structures, and compiler characteristics.
|
|
18 AC_TYPE_SIZE_T
|
|
19 AC_STRUCT_TM
|
|
20 # Checks for library functions.
|
|
21 AC_FUNC_FORK
|
|
22 AC_PROG_GCC_TRADITIONAL
|
|
23 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
|
|
24 AC_CHECK_FUNCS([erasechar killchar alarm getpass memset setenv strchr _spawnl spawnl getpwuid loadav strerror setgid setuid getuid getgid])
|
|
25 AC_PROG_INSTALL
|
|
26
|
312
|
27 AC_ARG_WITH(program-name, AS_HELP_STRING([--with-program-name=NAME],[alternate executable name]),[progname="$withval" ], [progname="xrogue"] )
|
156
|
28 PROGRAM=$progname
|
|
29 AC_SUBST(PROGRAM)
|
|
30
|
312
|
31 AC_ARG_ENABLE(setgid, AS_HELP_STRING([--enable-setgid=NAME],[install executable as setgid with group ownership of NAME @<:@default=no@:>@]),[],[])
|
156
|
32 AC_MSG_CHECKING([if using setgid execute bit])
|
|
33 if test "x$enable_setgid" = "xno" ; then
|
|
34 GROUPOWNER=
|
|
35 elif test "x$enable_setgid" = "xyes" ; then
|
|
36 GROUPOWNER=games
|
|
37 elif test "x$enable_setgid" = "x" ; then
|
|
38 GROUPOWNER=
|
|
39 else
|
|
40 GROUPOWNER=$enable_setgid
|
|
41 fi
|
|
42
|
|
43 if test "x$GROUPOWNER" != "x" ; then
|
|
44 AC_DEFINE_UNQUOTED([GROUPOWNER],[$GROUPOWNER], [Define to group owner of setgid executable])
|
|
45 AC_MSG_RESULT([$GROUPOWNER])
|
|
46 else
|
|
47 AC_MSG_RESULT([no])
|
|
48 fi
|
|
49
|
|
50 AC_SUBST(GROUPOWNER)
|
|
51
|
312
|
52 AC_ARG_ENABLE([scorefile],[AS_HELP_STRING([--enable-scorefile=SCOREFILE],[enable scoreboard with given filename])],[],[])
|
156
|
53 AC_MSG_CHECKING([for scoreboard file])
|
|
54 if test "x$enable_scorefile" = "xno" ; then
|
|
55 SCOREFILE=
|
|
56 elif test "x$enable_scorefile" = "xyes" ; then
|
|
57 SCOREFILE=$progname.scr
|
|
58 elif test "x$enable_scorefile" = "x" ; then
|
|
59 SCOREFILE=$progname.scr
|
|
60 else
|
|
61 SCOREFILE=$enable_scorefile
|
|
62 fi
|
|
63
|
|
64 if test "x$SCOREFILE" != "x" ; then
|
|
65 AC_DEFINE_UNQUOTED([SCOREFILE], ["$SCOREFILE"], [Define to file to use for scoreboard])
|
|
66 AC_MSG_RESULT([$SCOREFILE])
|
|
67 else
|
|
68 AC_MSG_RESULT([disabled])
|
|
69 fi
|
|
70
|
|
71 AC_SUBST(SCOREFILE)
|
|
72
|
312
|
73 AC_ARG_ENABLE([logfile],[AS_HELP_STRING([--enable-logfile=LOGFILE],[enable logfile with given filename])],[],[])
|
156
|
74 AC_MSG_CHECKING([for log file])
|
|
75 if test "x$enable_logfile" = "xno" ; then
|
|
76 LOGFILE=
|
|
77 elif test "x$enable_logfile" = "xyes" ; then
|
|
78 LOGFILE=$progname.log
|
|
79 elif test "x$enable_logfile" = "x" ; then
|
|
80 LOGFILE=$progname.log
|
|
81 else
|
|
82 LOGFILE=$enable_logfile
|
|
83 fi
|
|
84
|
|
85 if test "x$LOGFILE" != "x" ; then
|
|
86 AC_DEFINE_UNQUOTED([LOGFILE], ["$LOGFILE"], [Define to file to use for log])
|
|
87 AC_MSG_RESULT([$LOGFILE])
|
|
88 else
|
|
89 AC_MSG_RESULT([disabled])
|
|
90 fi
|
|
91
|
|
92 AC_SUBST(LOGFILE)
|
|