-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathconfigure.ac
108 lines (89 loc) · 2.45 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
AC_INIT([SDL Sopwith], [2.8.0], [[email protected]], [sdl-sopwith])
AC_CONFIG_AUX_DIR(autotools)
VERSION=$CONFIG_VERSION
PACKAGE_COPYRIGHT="Copyright (C) 1984-2024"
PACKAGE_LICENSE="GNU General Public License, version 2"
AC_SUBST(VERSION)
AC_SUBST(PACKAGE_COPYRIGHT)
AC_SUBST(PACKAGE_LICENSE)
AC_CANONICAL_TARGET
AC_SEARCH_LIBS([sin], [m])
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE([1.8.0 foreign])
AC_PROG_CC
AC_PROG_RANLIB
AC_CHECK_TOOL(STRIP, strip, )
AC_CHECK_TOOL(CONVERT, convert, )
AC_CHECK_HEADERS(stdbool.h)
AC_CHECK_FUNCS(isatty)
if test "$GCC" = "yes"; then
WARNINGS="-Wall -Wdeclaration-after-statement -Wredundant-decls"
CFLAGS="-O2 -g $WARNINGS $CFLAGS"
fi
dnl network libraries; not all systems have the sockets API in their libc:
SOCKET_LIBS=
case "$target" in
*-*-cygwin* | *-*-mingw32*)
SOCKET_LIBS="-lwsock32"
;;
sparc*-*-solaris*)
SOCKET_LIBS="-lsocket -lnsl"
;;
*-*-qnx*)
SOCKET_LIBS="-lsocket"
;;
*haiku*)
SOCKET_LIBS="-lnetwork"
;;
esac
AC_SUBST(SOCKET_LIBS)
case "$host" in
*cygwin* | *mingw* )
AC_CHECK_TOOL(WINDRES, windres, )
;;
*)
WINDRES=
;;
esac
case "$host" in
*cygwin* | *mingw* | *emscripten* | *haiku*)
HISCORES_PATH=
;;
*)
HISCORES_PATH=/var/games/sopwith
;;
esac
AC_ARG_WITH([hiscores-path],
[AS_HELP_STRING([--with-hiscores-path=dir],
[directory for system-wide high scores file])],
[HISCORES_PATH=${with_hiscores_path}], [])
AC_SUBST(HISCORES_PATH)
AC_ARG_WITH([hiscores-group],
[AS_HELP_STRING([--with-hiscores-group=name],
[group name for high scores directory])],
[HISCORES_GROUP=${with_hiscores_group}],
[HISCORES_GROUP=games])
AC_SUBST(HISCORES_GROUP)
AM_CONDITIONAL(GLOBAL_HISCORES, test "$HISCORES_PATH" != "")
AC_DEFINE_UNQUOTED(HISCORES_PATH, "$HISCORES_PATH",
[Path to directory containing high scores file.])
AM_CONDITIONAL(HAVE_WINDRES, test "$WINDRES" != "")
AM_CONDITIONAL(HAVE_CONVERT, test "$CONVERT" != "")
AC_CONFIG_HEADERS([config.h:config.hin])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_PROG_INSTALL
PKG_CHECK_MODULES(SDL, [sdl2 >= 2.0.7])
AC_CHECK_HEADERS(netinet/in.h winsock.h)
AC_SUBST(ac_aux_dir)
AC_CONFIG_FILES([
Makefile
doc/Makefile
pkg/config.make
pkg/macos/Info.plist
pkg/Makefile
src/Makefile
src/resource.rc
src/sdl/Makefile
])
AC_OUTPUT