-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.in
67 lines (52 loc) · 1.81 KB
/
configure.in
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
AC_INIT()
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(epiphany,0.9.0)
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
AC_CHECK_HEADER(SDL2/SDL.h,, [echo "Please install SDL from http://www.libsdl.org";exit])
AC_CHECK_HEADER(SDL2/SDL_mixer.h,, [echo "Please install SDL_mixer from http://www.libsdl.org/projects/SDL_mixer/";exit])
AC_CHECK_LIB( SDL2, main,, [
echo "SDL2 installed, but -lSDL2 not found, run 'ldconfig' and try again,"
echo "if that doesn't help have a look at the file config.log and look into"
echo "the FAQ."
exit
])
AC_CHECK_LIB( SDL2_mixer, main,, [
echo "SDL_mixer installed, but -lSDL_mixer not found, run 'ldconfig' and try again,"
echo "if that doesn't help have a look at the file config.log and look into"
echo "the FAQ."
exit
])
AH_TEMPLATE(DEBUG_MODE)
[CXXFLAGS=""]
AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],[Enable debug mode]), [
AC_DEFINE(DEBUG_MODE,1)
CXXFLAGS="$CXXFLAGS -O0 -g -Wall -pedantic"
CPPFLAGS="$CPPFLAGS -DRESOURCE_PATH=\"\\\"${datadir}/${PACKAGE}\\\"\""
],
[
CXXFLAGS="$CXXFLAGS -O2 -Wall -pedantic"
CPPFLAGS="$CPPFLAGS -DRESOURCE_PATH=\"\\\"${datadir}/${PACKAGE}\\\"\""
]
)
AC_ARG_ENABLE(profile, AC_HELP_STRING([--enable-profile],[Enable profile mode (very slow!)]), [
CXXFLAGS="$CXXFLAGS -pg"
],)
AC_ARG_ENABLE(static, AC_HELP_STRING([--enable-static],[Enable static compiling]), [
LDFLAGS="$LDFLAGS --static"
LIBS="$LIBS -L/usr/X11R6/lib -lXext -lXxf86vm -lX11 -lXm -lz -lSDL2 -lSDL2_mixer -ldl -lpthread"
],)
AC_OUTPUT( Makefile \
src/Makefile \
data/Makefile \
data/gfx/Makefile \
data/sfx/Makefile \
data/maps/Makefile
)
echo ""
echo " LDFLAGS = $LDFLAGS"
echo " CXXFLAGS = $CXXFLAGS"
echo ""
echo "Epiphany configuration is done. Start 'make' now."
echo ""