Mercurial > hg > early-roguelike
annotate srogue/configure.ac @ 221:71cb5b647f2b
Rogue V5: remove troublesome automatic platform detection.
configure.ac used AC_CANONICAL_SYSTEM to guess the GNU system
description triplets. The target description was substituted into the
Makefile and formatted into the filename for the binary distribution
tarball. But 'target' is only intended for cross-compilers. 'host_os'
might have been a better choice.
The tarball filename can still be changed manually, by running make with
an argument of 'DESTSYS=systemname'.
Cross-compiling may be more difficult now, but I am not certain that it
worked properly previously, and due to pending autoconf changes, it was
likely to break anyway.
The top-level config.guess and config.sub are no longer needed, but they
may reappear if better support for cross-compilation is added.
author | John "Elwin" Edwards |
---|---|
date | Fri, 12 Feb 2016 14:25:47 -0500 |
parents | 5238b835d661 |
children | 0e99eade579c |
rev | line source |
---|---|
101 | 1 # -*- Autoconf -*- |
2 # Process this file with autoconf to produce a configure script. | |
3 | |
4 AC_PREREQ(2.56) | |
5 AC_INIT([SRogue],[9.0], [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 | |
118 | 15 AC_CHECK_HEADERS([arpa/inet.h pwd.h errno.h fcntl.h limits.h nlist.h stdlib.h string.h sys/ioctl.h termios.h unistd.h term.h ncurses/term.h process.h]) |
101 | 16 |
17 # Checks for typedefs, structures, and compiler characteristics. | |
119 | 18 AC_TYPE_UID_T |
101 | 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_TYPE_SIGNAL | |
25 AC_FUNC_STAT | |
26 AC_FUNC_VPRINTF | |
121
e6c8652473fe
srogue: more compatibility improvements.
John "Elwin" Edwards
parents:
119
diff
changeset
|
27 AC_CHECK_FUNCS([erasechar killchar alarm getpass memset setenv strchr nlist _spawnl spawnl getpwuid loadav getloadavg strerror setgid setuid getuid getgid lrand48 random srand48 srandom]) |
101 | 28 AC_PROG_INSTALL |
29 | |
30 AC_ARG_WITH(program-name, AC_HELP_STRING([--with-program-name=NAME],[alternate executable name]),[progname="$withval" ], [progname="srogue"] ) | |
31 PROGRAM=$progname | |
32 AC_SUBST(PROGRAM) | |
33 | |
34 AC_ARG_ENABLE(setgid, AC_HELP_STRING([--enable-setgid=NAME],[install executable as setgid with group ownership of NAME @<:@default=no@:>@])],[],[]) | |
35 AC_MSG_CHECKING([if using setgid execute bit]) | |
36 if test "x$enable_setgid" = "xno" ; then | |
37 GROUPOWNER= | |
38 elif test "x$enable_setgid" = "xyes" ; then | |
39 GROUPOWNER=games | |
40 elif test "x$enable_setgid" = "x" ; then | |
41 GROUPOWNER= | |
42 else | |
43 GROUPOWNER=$enable_setgid | |
44 fi | |
45 | |
46 if test "x$GROUPOWNER" != "x" ; then | |
47 AC_DEFINE_UNQUOTED([GROUPOWNER],[$GROUPOWNER], [Define to group owner of setgid executable]) | |
48 AC_MSG_RESULT([$GROUPOWNER]) | |
49 else | |
50 AC_MSG_RESULT([no]) | |
51 fi | |
52 | |
53 AC_SUBST(GROUPOWNER) | |
54 | |
55 AC_ARG_ENABLE([scorefile],[AC_HELP_STRING([--enable-scorefile=SCOREFILE], [enable scoreboard with given filename])],[],[]) | |
56 AC_MSG_CHECKING([for scoreboard file]) | |
57 if test "x$enable_scorefile" = "xno" ; then | |
58 SCOREFILE= | |
59 elif test "x$enable_scorefile" = "xyes" ; then | |
60 SCOREFILE=$progname.scr | |
61 elif test "x$enable_scorefile" = "x" ; then | |
62 SCOREFILE=$progname.scr | |
63 else | |
64 SCOREFILE=$enable_scorefile | |
65 fi | |
66 | |
67 if test "x$SCOREFILE" != "x" ; then | |
68 AC_DEFINE_UNQUOTED([SCOREFILE], ["$SCOREFILE"], [Define to file to use for scoreboard]) | |
69 AC_MSG_RESULT([$SCOREFILE]) | |
70 else | |
71 AC_MSG_RESULT([disabled]) | |
72 fi | |
73 | |
74 AC_SUBST(SCOREFILE) | |
75 | |
76 AC_ARG_ENABLE([logfile],[AC_HELP_STRING([--enable-logfile=LOGFILE], [enable logfile with given filename])],[],[]) | |
77 AC_MSG_CHECKING([for log file]) | |
78 if test "x$enable_logfile" = "xno" ; then | |
79 LOGFILE= | |
80 elif test "x$enable_logfile" = "xyes" ; then | |
81 LOGFILE=$progname.log | |
82 elif test "x$enable_logfile" = "x" ; then | |
83 LOGFILE=$progname.log | |
84 else | |
85 LOGFILE=$enable_logfile | |
86 fi | |
87 | |
88 if test "x$LOGFILE" != "x" ; then | |
89 AC_DEFINE_UNQUOTED([LOGFILE], ["$LOGFILE"], [Define to file to use for log]) | |
90 AC_MSG_RESULT([$LOGFILE]) | |
91 else | |
92 AC_MSG_RESULT([disabled]) | |
93 fi | |
15f8229f38c1
srogue: begin porting to autoconf.
John "Elwin" Edwards |