comparison ext/guichan-0.8.2/configure.in @ 378:64738befdf3b

bringing in the changes from the build_system_rework branch in preparation for the 0.3.0 release. This commit will require the Jan2010 devkit. Clients will also need to be modified to the new way to import fife.
author vtchill@33b003aa-7bff-0310-803a-e67f0ece8222
date Mon, 11 Jan 2010 23:34:52 +0000
parents
children
comparison
equal deleted inserted replaced
377:fe6fb0e0ed23 378:64738befdf3b
1 AC_PREREQ(2.57)
2
3 AC_INIT(guichan, 0.8.2, olof.naessen@gmail.com, guichan)
4
5 AC_CANONICAL_SYSTEM
6 AC_SUBST(target)
7
8 ALLEGRO="disabled"
9 OPENGL="disabled"
10 SDL="disabled"
11 SDLIMAGE="disabled"
12 dnl GLUT="disabled"
13 dnl X="disabled"
14
15 GUICHAN_MAJOR_VERSION=0
16 GUICHAN_MINOR_VERSION=8
17 GUICHAN_MICRO_VERSION=2
18 GUICHAN_INTERFACE_AGE=0
19 GUICHAN_BINARY_AGE=1
20 GUICHAN_VERSION=$GUICHAN_MAJOR_VERSION.$GUICHAN_MINOR_VERSION.$GUICHAN_MICRO_VERSION
21
22 AC_SUBST(GUICHAN_MAJOR_VERSION)
23 AC_SUBST(GUICHAN_MINOR_VERSION)
24 AC_SUBST(GUICHAN_MICRO_VERSION)
25 AC_SUBST(GUICHAN_INTERFACE_AGE)
26 AC_SUBST(GUICHAN_BINARY_AGE)
27 AC_SUBST(GUICHAN_VERSION)
28
29 dnl TODO Guichan 0.9.0: Remove the .1
30 LT_RELEASE=$GUICHAN_MAJOR_VERSION.$GUICHAN_MINOR_VERSION.1
31 LT_CURRENT=`expr $GUICHAN_MICRO_VERSION - $GUICHAN_INTERFACE_AGE`
32 LT_REVISION=$GUICHAN_INTERFACE_AGE
33 LT_AGE=`expr $GUICHAN_BINARY_AGE - $GUICHAN_INTERFACE_AGE`
34
35 AC_SUBST(LT_RELEASE)
36 AC_SUBST(LT_CURRENT)
37 AC_SUBST(LT_REVISION)
38 AC_SUBST(LT_AGE)
39
40 AM_INIT_AUTOMAKE(guichan, $GUICHAN_VERSION)
41 AM_CONFIG_HEADER([include/config.hpp])
42
43 AC_CONFIG_SRCDIR([src/gui.cpp])
44
45 AC_PROG_CXX
46 AC_PROG_CC
47
48 AC_LIBTOOL_WIN32_DLL
49 AM_PROG_LIBTOOL
50 AC_PROG_MAKE_SET
51 AC_LANG_CPLUSPLUS
52 AC_PROG_INSTALL
53 AC_HEADER_STDC
54
55 CXXFLAGS="$CXXFLAGS -Wall -Wno-unused -DGUICHAN_BUILD"
56
57 dnl NoX()
58 dnl {
59 dnl AC_MSG_WARN(Xlib support skipped when Xlib not found.)
60 dnl X="no"
61 dnl }
62
63 dnl HaveX()
64 dnl {
65 dnl X="yes"
66 dnl X_LIBS="$X_LIBS -L$x_libraries -lX11"
67 dnl GUICHAN_EXTRADIRS="$GUICHAN_EXTRADIRS x"
68 dnl }
69
70 NoOpenGL()
71 {
72 AC_MSG_WARN(OpenGL support skipped when OpenGL not found.)
73 OPENGL="no"
74 }
75
76 HaveOpenGL()
77 {
78 OPENGL="yes"
79 GUICHAN_EXTRADIRS="$GUICHAN_EXTRADIRS opengl"
80 }
81
82 ForceOpenGL()
83 {
84 AC_MSG_WARN(OpenGL support forced.)
85 OPENGL="forced"
86 GUICHAN_EXTRADIRS="$GUICHAN_EXTRADIRS opengl"
87 }
88
89 dnl NoGLUT()
90 dnl {
91 dnl AC_MSG_WARN(GLUT support skipped when GLUT not found.)
92 dnl GLUT="no"
93 dnl }
94
95 dnl HaveGLUT()
96 dnl {
97 dnl GLUT="yes"
98 dnl GUICHAN_EXTRADIRS="$GUICHAN_EXTRADIRS glut"
99 dnl }
100
101 dnl ForceGLUT()
102 dnl {
103 dnl AC_MSG_WARN(GLUT support forced.)
104 dnl GLUT="forced"
105 dnl GUICHAN_EXTRADIRS="$GUICHAN_EXTRADIRS glut"
106 dnl }
107
108 NoSDLImage()
109 {
110 AC_MSG_WARN(SDL_image support skipped when SDL_image not found.)
111 SDLIMAGE="no"
112 }
113
114 HaveSDLImage()
115 {
116 SDLIMAGE="yes"
117 SDL_LIBS="$SDL_LIBS -lSDL_image"
118 CPPFLAGS="$CPPFLAGS `sdl-config --cflags`"
119 }
120
121 ForceSDLImage()
122 {
123 AC_MSG_WARN(SDL Image support forced.)
124 SDLIMAGE="forced"
125 }
126
127 HaveSDL()
128 {
129 GUICHAN_EXTRADIRS="$GUICHAN_EXTRADIRS sdl"
130 }
131
132 ForceSDL()
133 {
134 AC_MSG_WARN(SDL support forced.)
135 GUICHAN_EXTRADIRS="$GUICHAN_EXTRADIRS sdl"
136 }
137
138 NoAllegro()
139 {
140 AC_MSG_WARN(Allegro support skipped when Allegro not found.)
141 }
142
143 HaveAllegro()
144 {
145 ALLEGRO="yes"
146 GUICHAN_EXTRADIRS="$GUICHAN_EXTRADIRS allegro"
147 }
148
149 ForceAllegro()
150 {
151 AC_MSG_WARN(Allegro support forced.)
152 ALLEGRO="forced"
153 GUICHAN_EXTRADIRS="$GUICHAN_EXTRADIRS allegro"
154 }
155
156 dnl AC_ARG_ENABLE(x,
157 dnl [ --enable-x Enable Xlib support [default=no]],
158 dnl , enable_x=no)
159 dnl if test x$enable_x = xyes; then
160 dnl AC_PATH_X
161 dnl if test "x$no_x" = "xyes"; then
162 dnl NoX
163 dnl else
164 dnl dnl AC_CHECK_HEADERS([X11/Xlib.h])
165 dnl dnl AC_CHECK_LIB([X11], [XOpenDisplay], HaveX, NoX)
166 dnl HaveX
167 dnl fi
168 dnl fi
169
170 AC_ARG_ENABLE(opengl,
171 [ --enable-opengl Enable OpenGL support [default=yes]],
172 , enable_opengl=yes)
173 AC_ARG_ENABLE(force_opengl,
174 [ --enable-force-opengl Force OpenGL support (skip checks for OpenGL) [default=no]],
175 , enable_force_opengl=no)
176 if test x$enable_opengl = xyes; then
177 if test x$enable_force_opengl = xno; then
178 AC_CHECK_HEADERS(GL/gl.h)
179 AC_CHECK_LIB([GL], [glBegin], HaveOpenGL, NoOpenGL)
180 else
181 ForceOpenGL
182 fi
183 fi
184
185 dnl AC_ARG_ENABLE(glut,
186 dnl [ --enable-glut Enable GLUT support [default=yes]],
187 dnl , enable_glut=yes)
188 dnl AC_ARG_ENABLE(force_glut,
189 dnl [ --enable-force-glut Force GLUT support (skip checks for GLUT) [default=no]],
190 dnl , enable_force_glut=no)
191 dnl if test x$enable_glut = xyes; then
192 dnl if test x$enable_force_glut = xno; then
193 dnl AC_CHECK_HEADERS(GL/glut.h)
194 dnl AC_CHECK_LIB([glut], [glutInit], HaveGLUT, NoGLUT)
195 dnl else
196 dnl ForceGLUT
197 dnl fi
198 dnl fi
199
200 AC_ARG_ENABLE(sdlimage,
201 [ --enable-sdlimage Enable SDL_image support [default=yes]],
202 , enable_sdlimage=yes)
203 AC_ARG_ENABLE(force_sdlimage,
204 [ --enable-force-sdlimage Force SDL Image support (skip checks for SDL Image) [default=no]],
205 , enable_force_sdlimage=no)
206 if test x$enable_sdlimage = xyes; then
207 if test x$enable_force_sdlimage = xno; then
208 AC_CHECK_HEADERS([SDL/SDL_image.h])
209 AC_CHECK_LIB([SDL_image], [IMG_Load], HaveSDLImage, NoSDLImage)
210 else
211 ForceSDLImage
212 fi
213 fi
214
215 AC_ARG_ENABLE(allegro,
216 [ --enable-allegro Enable Allegro support [default=yes]],
217 , enable_allegro=yes)
218 AC_ARG_ENABLE(force_allegro,
219 [ --enable-force-allegro Force Allegro support (skip checks for Allegro) [default=no]],
220 , enable_force_allegro=no)
221 if test x$enable_allegro = xyes; then
222 if test x$enable_force_allegro = xno; then
223 AC_CHECK_HEADERS([allegro.h])
224 AC_CHECK_PROG(HAVE_ALLEGRO, allegro-config, yes)
225 if test "x$HAVE_ALLEGRO" != "xyes"; then
226 NoAllegro
227 else
228 HaveAllegro
229 fi
230 else
231 ForceAllegro
232 fi
233 fi
234
235 AC_ARG_ENABLE(sdl,
236 [ --enable-sdl Enable SDL support [default=yes]],
237 , enable_sdl=yes)
238 AC_ARG_ENABLE(force_sdl,
239 [ --enable-force-sdl Force SDL support (skip checks for SDL) [default=no]],
240 , enable_force_sdl=no)
241 if test x$enable_sdl = xyes; then
242 if test x$enable_force_sdl = xno; then
243 AC_CHECK_HEADERS(SDL/SDL.h)
244 AC_CHECK_PROG(HAVE_SDL, sdl-config, yes)
245 if test "x$HAVE_SDL" != "xyes"; then
246 SDL="no"
247 else
248 SDL="yes"
249 fi
250 else
251 SDL="forced"
252 ForceSDL
253 fi
254 fi
255
256 if test $SDL = "yes"; then
257 if test $SDLIMAGE = "no"; then
258 SDL="no"
259 AC_MSG_WARN(SDL support skipped when SDL_image not found.)
260 else
261 HaveSDL
262 fi
263 else
264 SDL="no"
265 AC_MSG_WARN(SDL support skipped when SDL not found.)
266 fi
267
268 AC_SUBST([GUICHAN_EXTRADIRS])
269
270 AC_OUTPUT([
271 Makefile
272 guichan-0.8.pc
273 examples/Makefile
274 include/Makefile
275 include/guichan/Makefile
276 include/guichan/allegro/Makefile
277 include/guichan/contrib/Makefile
278 include/guichan/contrib/allegro/Makefile
279 include/guichan/contrib/opengl/Makefile
280 include/guichan/contrib/sdl/Makefile
281 include/guichan/contrib/widgets/Makefile
282 include/guichan/hge/Makefile
283 include/guichan/opengl/Makefile
284 include/guichan/openlayer/Makefile
285 include/guichan/sdl/Makefile
286 include/guichan/widgets/Makefile
287 src/Makefile
288 src/allegro/Makefile
289 src/contrib/Makefile
290 src/contrib/allegro/Makefile
291 src/contrib/opengl/Makefile
292 src/contrib/sdl/Makefile
293 src/contrib/widgets/Makefile
294 src/hge/Makefile
295 src/opengl/Makefile
296 src/opengl/guichan_opengl-0.8.pc
297 src/openlayer/Makefile
298 src/sdl/Makefile
299 src/sdl/guichan_sdl-0.8.pc
300 src/widgets/Makefile])
301 echo ""
302 echo "IMPORTANT! You are about install a BETA version of Guichan"
303 echo "which most likely will lose binary compatibility with the"
304 echo "future stable release. This release should only be used"
305 echo "for testing."
306 echo ""
307 echo "-------------------------------"
308 echo "Guichan ready for compilation!"
309 echo "-------------------------------"
310 echo "* Allegro = "$ALLEGRO
311 echo "* HGE = no (Windows specific and cannot be built)"
312 echo "* OpenGL = "$OPENGL
313 echo "* OpenLayer = no (Requires static build and cannot be built)"
314 echo "* SDL = "$SDL
315 echo "* SDL Image = "$SDLIMAGE
316 echo "--------------------------------"