Debian Codegraph @

configure.ac

raw
1 AC_INIT([Blocks of the Undead], [1.0], [[email protected]],
2 [BlocksOfTheUndead])
3 AC_CONFIG_SRCDIR([TetrisAttack/src/CApplyGravityEvent.cpp])
4 AM_INIT_AUTOMAKE
5
6 AM_OPTIONS_WXCONFIG
7
8 AC_ARG_ENABLE([animview],
9 AS_HELP_STRING([--enable-animview],
10 [build AnimView (default is auto)]),
11 [case $enableval in
12 yes)
13 animview=1
14 ;;
15
16 no)
17 animview=0
18 ;;
19
20 auto)
21 animview=2
22 ;;
23
24 *)
25 AC_MSG_ERROR([Invalid argument ${enableval} for --enable-animview])
26 ;;
27 esac],
28 [animview=2])
29
30 AC_ARG_ENABLE([puzzleedit],
31 AS_HELP_STRING([--enable-puzzleedit],
32 [build PuzzleEdit (does not work) (default is no)]),
33 [case $enableval in
34 yes)
35 puzzleedit=1
36 ;;
37
38 no)
39 puzzleedit=0
40 ;;
41
42 *)
43 AC_MSG_ERROR([Invalid argument ${enableval} for --enable-puzzleedit])
44 ;;
45 esac],
46 [puzzleedit=0])
47
48 AC_PROG_CXX
49 AC_PROG_INSTALL
50 AC_PROG_RANLIB
51
52 AM_PATH_SDL([1.2.0],
53 [CPPFLAGS=$SDL_CFLAGS $CPPFLAGS
54 LIBS=$SDL_LIBS $LIBS])
55
56 AM_PATH_WXCONFIG([2.4.0], [have_wxwin=1])
57
58 AC_CHECK_LIB([SDL_image], [IMG_Load])
59 AC_CHECK_LIB([SDL_gfx], [aalineColor])
60 AC_CHECK_LIB([SDL_ttf], [TTF_OpenFont])
61 AC_CHECK_LIB([SDL_mixer], [Mix_OpenAudio])
62
63 AC_CHECK_HEADER([SDL_image.h], [],
64 AC_MSG_ERROR([[A required header file, SDL_image.h is missing]]))
65 AC_CHECK_HEADER([SDL_gfxPrimitives.h], [],
66 AC_MSG_ERROR([[A required header file, SDL_gfxPrimitives.h is missing]]))
67 AC_CHECK_HEADER([SDL_ttf.h], [],
68 AC_MSG_ERROR([[A required header file, SDL_ttf.h is missing]]))
69 AC_CHECK_HEADER([SDL_mixer.h], [],
70 AC_MSG_ERROR([[A required header file, SDL_mixer.h is missing]]))
71
72 CPPFLAGS="$CPPFLAGS -DPKGDATADIR=\\\"\${pkgdatadir}\\\""
73
74 if test $animview = 2; then
75 if test "$have_wxwin" = 1; then
76 animview=1
77 else
78 animview=0
79 fi
80 fi
81
82 AM_CONDITIONAL([COND_ANIMVIEW], [test $animview = 1])
83
84 if test $animview = 1; then
85 if test "$have_wxwin" != 1; then
86 AC_MSG_ERROR([AnimViewer requires wxWindows, but the wx-config program could not be found])
87 fi
88 fi
89
90 AM_CONDITIONAL([COND_PUZZLEEDIT], [test $puzzleedit = 1])
91
92 if test $puzzleedit = 1; then
93 if test "$have_wxwin" != 1; then
94 AC_MSG_ERROR([PuzzleEdit requires wxWindows, but the wx-config program could not be found])
95 fi
96 fi
97
98 AC_CONFIG_FILES([Makefile \
99 AnimView/Makefile \
100 AnimView/src/Makefile \
101 Oodle/Makefile \
102 Oodle/src/Makefile \
103 PuzzleEdit/Makefile \
104 PuzzleEdit/src/Makefile
105 TetrisAttack/Makefile \
106 TetrisAttack/assets/Makefile \
107 TetrisAttack/assets/fonts/Makefile \
108 TetrisAttack/assets/img/Makefile \
109 TetrisAttack/assets/img/1/Makefile \
110 TetrisAttack/assets/img/1/640x480/Makefile \
111 TetrisAttack/assets/img/2/Makefile \
112 TetrisAttack/assets/img/2/640x480/Makefile \
113 TetrisAttack/assets/img/3/Makefile \
114 TetrisAttack/assets/img/3/640x480/Makefile \
115 TetrisAttack/assets/lvls/Makefile \
116 TetrisAttack/assets/lvls/1/Makefile \
117 TetrisAttack/assets/lvls/2/Makefile \
118 TetrisAttack/assets/lvls/3/Makefile \
119 TetrisAttack/assets/snd/Makefile \
120 TetrisAttack/src/Makefile])
121
122
123 AC_OUTPUT