-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure.ac
111 lines (98 loc) · 2.84 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
108
109
110
111
AC_PREREQ([2.69])
AC_INIT([eureka], [0.2.0], [[email protected]])
AC_CONFIG_SRCDIR([src/eureka.cc])
AC_CONFIG_HEADERS([src/config.h])
AC_CONFIG_MACRO_DIR([m4])
# The boost stuff wants us to use libtool, oh well...
LT_INIT
AC_PROG_LIBTOOL
AM_INIT_AUTOMAKE([foreign subdir-objects])
AM_MAINTAINER_MODE
# Checks for programs:
AC_PROG_CC
AC_PROG_CXX
# Check for SDL and SDL features, i.e. -lSDL2
SDL_VERSION=2.0.5
AM_PATH_SDL2($SDL_VERSION,
[],
[AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])])
AC_CHECK_LIB(SDL2_image, IMG_ReadXPMFromArray)
AC_CHECK_HEADER([SDL2/SDL_image.h],
[],
[AC_MSG_ERROR([*** SDL_image include files not found!
You should install the development package.])])
AC_CHECK_LIB(SDL2_mixer, Mix_OpenAudio)
AC_CHECK_HEADERS([SDL2/SDL_mixer.h],
[],
[AC_MSG_ERROR([*** SDL_mixer include files not found!
You should install the development package.])])
AC_LANG([C++])
# Only for the editor:
PKG_CHECK_MODULES(GTKMM,
[gtkmm-3.0 >= 3.0])
AC_SUBST(GTKMM_CFLAGS)
AC_SUBST(GTKMM_LIBS)
PKG_CHECK_MODULES(LIBXMLPP,
[libxml++-3.0])
AC_SUBST(LIBXMLPP_CFLAGS)
AC_SUBST(LIBXMLPP_LIBS)
BOOST_REQUIRE([1.7.0])
BOOST_FILESYSTEM
BOOST_REGEX
BOOST_STRING_ALGO
BOOST_BIND
BOOST_SYSTEM
BOOST_SIGNALS2
AC_SUBST(BOOST_CPPFLAGS)
AC_SUBST(BOOST_CXXFLAGS)
## Checking for Lua 5.3.1
PKG_CHECK_MODULES(
[LUA],
[lua5.3 >= 5.3.],
[], ## do nothing special
[PKG_CHECK_MODULES([LUA], [lua5.3 >= 5.3.1], [])])
AC_MSG_CHECKING(for lua libraries)
AC_MSG_RESULT($LUA_LIBS)
AC_SUBST([LUA_CFLAGS])
AC_SUBST([LUA_LIBS])
AC_CONFIG_FILES([Makefile \
src/Makefile \
src/Doxyfile \
src/leibniz/Makefile \
m4/Makefile \
data/Makefile \
data/leibniz/Makefile \
data/Demoworld/Makefile \
data/Demoworld/images/Makefile \
data/Demoworld/maps/Makefile \
data/Demoworld/sound/Makefile \
data/Demoworld/services/Makefile \
data/Demoworld/weapons/Makefile \
data/Demoworld/armour/Makefile \
data/Demoworld/shields/Makefile \
data/Demoworld/bestiary/Makefile \
data/Demoworld/bestiary/attacks/Makefile \
data/Demoworld/bestiary/spells/Makefile \
data/Demoworld/miscitems/Makefile \
data/Demoworld/edibles/Makefile \
data/Demoworld/people/Makefile \
data/Demoworld/spells/Makefile \
data/Demoworld/potions/Makefile \
data/Demoworld/doc/Makefile \
data/Demoworld/spells/mage/Makefile])
AC_OUTPUT
echo "
($PACKAGE_NAME) version $PACKAGE_VERSION
Prefix.........: $prefix
C++ Compiler...: $CXX $CXXFLAGS $CPPFLAGS
SDL: $SDL_CFLAGS
Boost: $BOOST_CPPFLAGS
Lua: $LUA_CFLAGS
XML++: $LIBXMLPP_CFLAGS
Linker.........: $LD $LDFLAGS
SDL: $SDL_LIBS
Boost: $BOOST_FILESYSTEM_LIBS
$BOOST_SYSTEM_LIBS
$BOOST_REGEX_LIBS
Lua: $LUA_LIBS
Libs: $LIBS"