1 | ########################################################################## |
---|
2 | # orxonox - the future of 3D-vertical-scrollers # |
---|
3 | # # |
---|
4 | # Copyright (C) 2004 orx # |
---|
5 | # # |
---|
6 | # This program is free software; you can redistribute it and/or modify # |
---|
7 | # it under the terms of the GNU General Public License as published by # |
---|
8 | # the Free Software Foundation; either version 2, or (at your option) # |
---|
9 | # any later version. # |
---|
10 | # # |
---|
11 | # ### File Specific: # |
---|
12 | # main-programmer: Benjamin Grauer # |
---|
13 | # co-programmer: ... # |
---|
14 | # # |
---|
15 | # This is the main configuration File of autoconf. # |
---|
16 | # Please edit this file only, if you exactly know what you are doing. # |
---|
17 | # It is quite fragile, and compiling orxonox on different Platforms # |
---|
18 | # is only guarantied, if build with the right config. # |
---|
19 | ########################################################################## |
---|
20 | |
---|
21 | ######################### |
---|
22 | ## AUTOCONF INIT PHASE ## |
---|
23 | ######################### |
---|
24 | AC_PREREQ(2.56) |
---|
25 | AC_INIT(orxonox, 0.3.0_alpha, [orxonox-dev at mail.datacore.ch]) |
---|
26 | |
---|
27 | ## Detect the canonical host and target build environment. |
---|
28 | AC_CANONICAL_BUILD |
---|
29 | AC_CANONICAL_HOST |
---|
30 | AC_CANONICAL_TARGET |
---|
31 | |
---|
32 | AM_INIT_AUTOMAKE |
---|
33 | |
---|
34 | AC_CONFIG_SRCDIR([.]) |
---|
35 | AC_CONFIG_HEADER([config.h]) |
---|
36 | |
---|
37 | ######################### |
---|
38 | ## Checks for programs ## |
---|
39 | ######################### |
---|
40 | AC_PROG_CXX |
---|
41 | AC_PROG_RANLIB |
---|
42 | AC_HEADER_STDC |
---|
43 | |
---|
44 | ################################## |
---|
45 | ## CHECKING OPTIONAL ARGUMENTS ## |
---|
46 | ################################## |
---|
47 | |
---|
48 | #-----------------# |
---|
49 | # DEBUG-statement # |
---|
50 | #-----------------# |
---|
51 | DEBUG=no |
---|
52 | AC_MSG_CHECKING([if DEBUG-mode should be enabled]) |
---|
53 | AC_ARG_ENABLE([debug], |
---|
54 | AC_HELP_STRING( [--enable-debug], [compiles in debug mode. Lots of debug info about the game.]), |
---|
55 | DEBUG=$enableval) |
---|
56 | |
---|
57 | if test x$DEBUG = xno; then |
---|
58 | echo "no" |
---|
59 | echo " -> Setting debuglevel to 4. (orxonox is still in Development. It really is needed." |
---|
60 | DEBUG=4 |
---|
61 | elif test x$DEBUG = xyes; then |
---|
62 | echo "yes" |
---|
63 | echo " -> Setting debuglevel to 4. HARD DEBUG MODE!!." |
---|
64 | DEBUG=4 |
---|
65 | else |
---|
66 | echo "yes: setting debuglevel to to $DEBUG" |
---|
67 | fi |
---|
68 | AC_DEFINE_UNQUOTED(DEBUG, $DEBUG, [in which debug mode we are]) |
---|
69 | |
---|
70 | AC_SUBST(DEBUG) |
---|
71 | |
---|
72 | #---------------# |
---|
73 | # Modular Debug # |
---|
74 | #---------------# |
---|
75 | MODULAR_DEBUG=yes |
---|
76 | AC_MSG_CHECKING([if Modular-DEBUG-mode should be ebabled]) |
---|
77 | AC_ARG_ENABLE([modular-debug], |
---|
78 | AC_HELP_STRING( [--disable-modular-debug], [compiles in modular-debug mode, that logs differently on the many modules of orxonox.]), |
---|
79 | MODULAR_DEBUG=$enableval) |
---|
80 | |
---|
81 | if test x$MODULAR_DEBUG = xno; then |
---|
82 | echo "no" |
---|
83 | elif test x$MODULAR_DEBUG = xyes; then |
---|
84 | echo "yes" |
---|
85 | AC_DEFINE_UNQUOTED(MODULAR_DEBUG, 1, [if Modular-DUBUG mode is enabled]) |
---|
86 | fi |
---|
87 | |
---|
88 | #--------------# |
---|
89 | # GTK-disabled # |
---|
90 | #--------------# |
---|
91 | AC_MSG_CHECKING([if gtk should be enabled]) |
---|
92 | AC_ARG_WITH([gtk], |
---|
93 | AC_HELP_STRING( [--without-gtk], |
---|
94 | [Prevents GTK from being loaded]), [def_gtk=no], [def_gtk=yes]) |
---|
95 | if test x$def_gtk = xyes; then |
---|
96 | echo "yes" |
---|
97 | fi |
---|
98 | if test x$def_gtk = xno; then |
---|
99 | echo "no" |
---|
100 | fi |
---|
101 | |
---|
102 | #------------------# |
---|
103 | # libCurl-disabled # |
---|
104 | #------------------# |
---|
105 | AC_MSG_CHECKING([if libcURL should be enabled]) |
---|
106 | AC_ARG_WITH([curl], |
---|
107 | AC_HELP_STRING( [--without-curl], |
---|
108 | [Prevents libcURL from being loaded]), [def_curl=no], [def_curl=yes]) |
---|
109 | if test x$def_curl = xyes; then |
---|
110 | echo "yes" |
---|
111 | fi |
---|
112 | if test x$def_curl = xno; then |
---|
113 | echo "no" |
---|
114 | fi |
---|
115 | |
---|
116 | #-------------------# |
---|
117 | # SubProject-enable # |
---|
118 | #-------------------# |
---|
119 | def_sub_projects=no |
---|
120 | AC_MSG_CHECKING([if the SubProjects should be built]) |
---|
121 | AC_ARG_ENABLE([sub-projects], |
---|
122 | AC_HELP_STRING( [--enable-sub-projects], |
---|
123 | [also builds the subProjects while make from srcdir]), [def_sub_projects=yes]) |
---|
124 | if test x$def_sub_projects = xyes; then |
---|
125 | echo "yes" |
---|
126 | fi |
---|
127 | if test x$def_sub_projects = xno; then |
---|
128 | echo "no" |
---|
129 | fi |
---|
130 | AM_CONDITIONAL(SUB_PROJECTS, test x$def_sub_projects = xyes) |
---|
131 | |
---|
132 | #-------------------# |
---|
133 | # Profiling Enabled # |
---|
134 | #-------------------# |
---|
135 | def_profiling=no |
---|
136 | AC_MSG_CHECKING([if Profiling should be enabled]) |
---|
137 | AC_ARG_ENABLE([profile], |
---|
138 | AC_HELP_STRING( [--enable-profile], |
---|
139 | [builds orxonox with profiling support]), [def_profiling=yes]) |
---|
140 | if test x$def_profiling = xyes; then |
---|
141 | echo "yes" |
---|
142 | CXXFLAGS="$CXXFLAGS -pg" |
---|
143 | fi |
---|
144 | if test x$def_profiling = xno; then |
---|
145 | echo "no" |
---|
146 | fi |
---|
147 | |
---|
148 | #----------------# |
---|
149 | # efence Enabled # |
---|
150 | #----------------# |
---|
151 | def_efence=no |
---|
152 | AC_MSG_CHECKING([if efence should be enabled]) |
---|
153 | AC_ARG_ENABLE([efence], |
---|
154 | AC_HELP_STRING( [--enable-efence], |
---|
155 | [builds orxonox with efence support]), [def_efence=yes]) |
---|
156 | if test x$def_efence = xyes; then |
---|
157 | echo "yes" |
---|
158 | fi |
---|
159 | if test x$def_efence = xno; then |
---|
160 | echo "no" |
---|
161 | fi |
---|
162 | |
---|
163 | #----------------------# |
---|
164 | # Documentation-enable # |
---|
165 | #----------------------# |
---|
166 | def_documentation=no |
---|
167 | AC_MSG_CHECKING([if the Documentation should be build by default]) |
---|
168 | AC_ARG_ENABLE([documentation], |
---|
169 | AC_HELP_STRING( [--enable-documentation], |
---|
170 | [also builds the sDocumentation while make from srcdir]), [def_documentation=yes]) |
---|
171 | if test x$def_documentation = xyes; then |
---|
172 | echo "yes" |
---|
173 | fi |
---|
174 | if test x$def_documentation = xno; then |
---|
175 | echo "no" |
---|
176 | fi |
---|
177 | AM_CONDITIONAL(DOCUMENTATION, test x$def_documentation = xyes) |
---|
178 | ####################### |
---|
179 | ## PROGRAMM CHECKING ## |
---|
180 | ## 3. party Programs ## |
---|
181 | ####################### |
---|
182 | |
---|
183 | #----------------------# |
---|
184 | # checking for Doxygen # |
---|
185 | #----------------------# |
---|
186 | AC_PATH_PROG(DOXYGEN, doxygen) |
---|
187 | AM_CONDITIONAL(DOXYGEN, test $DOXYGEN) |
---|
188 | |
---|
189 | #--------------------# |
---|
190 | # checking for gprof # |
---|
191 | #--------------------# |
---|
192 | AC_PATH_PROG(GPROF, gprof) |
---|
193 | |
---|
194 | #-------------------------# |
---|
195 | # checking for pkg-config # |
---|
196 | #-------------------------# |
---|
197 | if test x$def_gtk = xyes; then |
---|
198 | AC_PATH_PROG(PKG_CONFIG, pkg-config) |
---|
199 | fi |
---|
200 | |
---|
201 | |
---|
202 | ######################### |
---|
203 | ## CHECKING FOR SYSTEM ## |
---|
204 | ######################### |
---|
205 | ## here the system is checked, and openGL is included |
---|
206 | ## also checking for SDL on differen Systems |
---|
207 | |
---|
208 | AC_MSG_CHECKING([for System]) |
---|
209 | ## checking for openGL-environment and other sys-specific parameters |
---|
210 | case "$target" in |
---|
211 | #---------# |
---|
212 | # WINDOWS # |
---|
213 | #---------# |
---|
214 | *-*-mingw32*) |
---|
215 | echo "mingw-WINDOWS detected" |
---|
216 | |
---|
217 | CPPFLAGS="-I/usr/include -I/mingw/include" |
---|
218 | |
---|
219 | mingw="yes" |
---|
220 | MSBITFIELDS="-mms-bitfields" |
---|
221 | MWINDOWS="-mwindows" |
---|
222 | |
---|
223 | |
---|
224 | |
---|
225 | # checking for mingw32 |
---|
226 | AC_CHECK_LIB([mingw32], [main], FOUND_mingw32=yes) |
---|
227 | if test x$FOUND_mingw32 = xyes; then |
---|
228 | LIBS="$LIBS -lmingw32" |
---|
229 | fi |
---|
230 | |
---|
231 | #-----------# |
---|
232 | # SDL (win) # |
---|
233 | #-----------# |
---|
234 | # checking for SDL-headers |
---|
235 | AC_CHECK_HEADERS([SDL/SDL.h] ,, |
---|
236 | [AC_MSG_ERROR([cannot find SDL headers]) ]) |
---|
237 | |
---|
238 | #checking for libSDL |
---|
239 | AC_CHECK_LIB([sdlmain], [main], FOUND_sdlmain=yes) |
---|
240 | if test x$FOUND_sdlmain = xyes ; then |
---|
241 | LIBS="$LIBS -lsdlmain" |
---|
242 | else |
---|
243 | echo "------------------" |
---|
244 | echo "SDL library not found." |
---|
245 | echo "please install the SDL library, which can be found at http://www.libsdl.org" |
---|
246 | echo "------------------" |
---|
247 | exit 1 |
---|
248 | fi |
---|
249 | AC_CHECK_LIB([sdl], [main], FOUND_sdl=yes) |
---|
250 | if test x$FOUND_sdl = xyes ; then |
---|
251 | LIBS="$LIBS -lsdl" |
---|
252 | else |
---|
253 | echo "------------------" |
---|
254 | echo "SDL library not found." |
---|
255 | echo "please install the SDL library, which can be found at http://www.libsdl.org" |
---|
256 | echo "------------------" |
---|
257 | exit -1 |
---|
258 | fi |
---|
259 | |
---|
260 | #---------------# |
---|
261 | # open-GL (win) # |
---|
262 | #---------------# |
---|
263 | # checking gl header |
---|
264 | AC_CHECK_HEADERS(GL/gl.h ,, |
---|
265 | [AC_MSG_ERROR([cannot find opengl headers]) ]) |
---|
266 | # checking for Windows openGl library |
---|
267 | AC_CHECK_LIB([opengl32], [main], FOUND_opengl32=yes, "gl/gl.h") |
---|
268 | if test x$FOUND_opengl32 = xyes ; then |
---|
269 | LIBS="$LIBS -lopengl32" |
---|
270 | else |
---|
271 | echo "------------------" |
---|
272 | echo "opengl not found." |
---|
273 | echo "please install the opengl package which can be found at http://www.opengl.org" |
---|
274 | echo "------------------" |
---|
275 | exit -1 |
---|
276 | fi |
---|
277 | |
---|
278 | # cheking for GLU-header |
---|
279 | AC_CHECK_HEADERS([GL/glu.h] ,, |
---|
280 | [AC_MSG_ERROR([cannot find opengl headers]) ]) |
---|
281 | |
---|
282 | # checking for libGLU |
---|
283 | AC_CHECK_LIB([glu32], [main], FOUND_glu32=yes) |
---|
284 | if test x$FOUND_glu32 = xyes ; then |
---|
285 | LIBS="$LIBS -lGLU32" |
---|
286 | else |
---|
287 | echo "------------------" |
---|
288 | echo "GLU library not found." |
---|
289 | echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org" |
---|
290 | echo "------------------" |
---|
291 | exit -1 |
---|
292 | fi |
---|
293 | |
---|
294 | #--------# |
---|
295 | # openAL # |
---|
296 | #--------# |
---|
297 | # checking for openAL-headers |
---|
298 | AC_CHECK_HEADERS([AL/al.h] ,, |
---|
299 | [AC_MSG_ERROR([cannot find openAL header.])]) |
---|
300 | # checking for openAL-lib |
---|
301 | AC_CHECK_LIB([OpenAL32], [main], [FOUND_openal=yes]) |
---|
302 | AC_CHECK_LIB([ALut], [main], [FOUND_ALut=yes]) |
---|
303 | if test x$FOUND_openal = xyes ; then |
---|
304 | if test x$FOUND_ALut = xyes ; then |
---|
305 | LIBS="$LIBS -lALut -lOpenAL32" |
---|
306 | else |
---|
307 | echo "------------------" |
---|
308 | echo "openal library not found." |
---|
309 | echo "please install the openal library, which can be found at http://www.openal.org" |
---|
310 | echo "------------------" |
---|
311 | exit -1 |
---|
312 | fi |
---|
313 | fi |
---|
314 | ;; |
---|
315 | #-------# |
---|
316 | # LINUX # |
---|
317 | #-------# |
---|
318 | *-*-linux*) |
---|
319 | echo "Linux detected" |
---|
320 | |
---|
321 | Linux="yes" |
---|
322 | |
---|
323 | CPPFLAGS="-I/usr/X11R6/include -I/usr/include" |
---|
324 | LDFLAGS="-L/usr/lib/opengl/xorg-x11/lib -L/usr/Mesa-6.0.1/lib -L/usr/X11R6/lib $LDFLAGS" |
---|
325 | # checking gl header |
---|
326 | AC_CHECK_HEADERS([GL/gl.h] ,, |
---|
327 | [AC_MSG_ERROR([cannot find opengl headers]) ]) |
---|
328 | |
---|
329 | # checking for Unix GL |
---|
330 | AC_CHECK_LIB([GL], [glLoadIdentity], FOUND_GL=yes) |
---|
331 | if test x$FOUND_GL = xyes ; then |
---|
332 | LIBS="$LIBS -lGL" |
---|
333 | else |
---|
334 | echo "------------------" |
---|
335 | echo "opengl not found." |
---|
336 | echo "please install the opengl package which can be found at http://www.opengl.org" |
---|
337 | echo "------------------" |
---|
338 | exit -1 |
---|
339 | fi |
---|
340 | |
---|
341 | # cheking for GLU-header |
---|
342 | AC_CHECK_HEADERS([GL/glu.h] ,, |
---|
343 | [AC_MSG_ERROR([cannot find opengl headers]) ]) |
---|
344 | |
---|
345 | AC_CHECK_LIB([GLU], [gluProject], FOUND_GLU=yes) |
---|
346 | if test x$FOUND_GLU = xyes ; then |
---|
347 | LIBS="$LIBS -lGLU" |
---|
348 | else |
---|
349 | echo "------------------" |
---|
350 | echo "GLU library not found." |
---|
351 | echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org" |
---|
352 | echo "------------------" |
---|
353 | exit -1 |
---|
354 | fi |
---|
355 | |
---|
356 | #--------# |
---|
357 | # openAL # |
---|
358 | #--------# |
---|
359 | # checking for openAL-headers |
---|
360 | AC_CHECK_HEADERS([AL/al.h] ,, |
---|
361 | [AC_MSG_ERROR([cannot find openAL header.])]) |
---|
362 | # checking for openAL-lib |
---|
363 | AC_CHECK_LIB([openal], [main], [FOUND_openal=yes]) |
---|
364 | if test x$FOUND_openal = xyes ; then |
---|
365 | LIBS="$LIBS -lopenal" |
---|
366 | else |
---|
367 | echo "------------------" |
---|
368 | echo "openal library not found." |
---|
369 | echo "please install the openal library, which can be found at http://www.openal.org" |
---|
370 | echo "------------------" |
---|
371 | exit -1 |
---|
372 | fi |
---|
373 | |
---|
374 | # checking for SDL |
---|
375 | AC_MSG_CHECKING([for SDL-version]) |
---|
376 | SDL_VERSION=`sdl-config --version` |
---|
377 | echo $SDL_VERSION |
---|
378 | |
---|
379 | CPPFLAGS="`sdl-config --cflags` $CPPFLAGS" |
---|
380 | AC_CHECK_HEADERS([SDL.h] ,, |
---|
381 | [AC_CHECK_HEADERS([SDL/SDL.h] ,,AC_MSG_ERROR([cannot find SDL header. please download from libsdl.org])])) |
---|
382 | |
---|
383 | LIBS="`sdl-config --libs` $LIBS" |
---|
384 | ;; |
---|
385 | |
---|
386 | #-----------# |
---|
387 | # MAC -OS X # |
---|
388 | #-----------# |
---|
389 | *darwin*) |
---|
390 | echo "OS X detected" |
---|
391 | |
---|
392 | osX="yes" |
---|
393 | |
---|
394 | CPPFLAGS="-I/sw/include -I/sw/include $CPPFLAGS" |
---|
395 | # checking gl header |
---|
396 | AC_CHECK_HEADERS([OpenGL/gl.h] ,, |
---|
397 | [AC_MSG_ERROR([cannot find opengl headers]) ]) |
---|
398 | # cheking for GLU-header |
---|
399 | AC_CHECK_HEADERS([OpenGL/glu.h] ,, |
---|
400 | [AC_MSG_ERROR([cannot find opengl headers]) ]) |
---|
401 | |
---|
402 | LIBS="$LIBS -framework OpenGL" |
---|
403 | |
---|
404 | |
---|
405 | ## SDL-check |
---|
406 | SDL_CFLAGS=`sdl-config --cflags` |
---|
407 | SDL_LIBS=`sdl-config --libs` |
---|
408 | CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" |
---|
409 | LIBS="$LIBS $SDL_LIBS" |
---|
410 | |
---|
411 | |
---|
412 | # checking for SDL-headers |
---|
413 | # AC_CHECK_HEADERS(SDL/SDL.h ,, |
---|
414 | # [AC_MSG_ERROR([cannot find SDL headers]) ]) |
---|
415 | |
---|
416 | ## checking for SDL |
---|
417 | # SDL_VERSION=1.2.7 |
---|
418 | # AM_PATH_SDL($SDL_VERSION, |
---|
419 | # :, |
---|
420 | # AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) |
---|
421 | # ) |
---|
422 | |
---|
423 | |
---|
424 | ;; |
---|
425 | |
---|
426 | *) |
---|
427 | ;; |
---|
428 | esac |
---|
429 | |
---|
430 | AC_SUBST(MSBITFIELDS) |
---|
431 | |
---|
432 | ################################### |
---|
433 | ## CHECKING FOR HEADERS AND LIBS ## |
---|
434 | ################################### |
---|
435 | |
---|
436 | #---------# |
---|
437 | # SDL_ttf # |
---|
438 | #---------# |
---|
439 | # checking for SDL_ttf-headers |
---|
440 | AC_CHECK_HEADERS([SDL_ttf.h] ,, |
---|
441 | [AC_CHECK_HEADERS([SDL/SDL_ttf.h] ,,AC_MSG_ERROR([cannot find SDL_ttf header.])])) |
---|
442 | # checking for SDL_ttf-lib |
---|
443 | AC_CHECK_LIB([SDL_ttf], [TTF_OpenFont], [FOUND_SDL_ttf=yes]) |
---|
444 | if test x$FOUND_SDL_ttf = xyes ; then |
---|
445 | LIBS="$LIBS -lSDL_ttf" |
---|
446 | else |
---|
447 | echo "------------------" |
---|
448 | echo "SDL_ttf library not found." |
---|
449 | echo "please install the SDL_ttf library, which can be found at http://www.libsdl.org/projects/SDL_ttf/" |
---|
450 | echo "------------------" |
---|
451 | exit -1 |
---|
452 | fi |
---|
453 | |
---|
454 | |
---|
455 | #-----------# |
---|
456 | # SDL_Image # |
---|
457 | #-----------# |
---|
458 | # checking for SDL_image-headers |
---|
459 | AC_CHECK_HEADERS([SDL_image.h] ,, |
---|
460 | [AC_CHECK_HEADERS([SDL/SDL_image.h],, AC_MSG_ERROR([SDL_image header not found.]))]) |
---|
461 | # checking for SDL_image-lib |
---|
462 | AC_CHECK_LIB([SDL_image], [main], [FOUND_SDL_image=yes]) |
---|
463 | if test x$FOUND_SDL_image = xyes ; then |
---|
464 | LIBS="$LIBS -lSDL_image" |
---|
465 | else |
---|
466 | echo "------------------" |
---|
467 | echo "SDL_image library not found." |
---|
468 | echo "please install the SDL_image library, which can be found at http://www.libsdl.org/projects/SDL_image/" |
---|
469 | echo "------------------" |
---|
470 | exit -1 |
---|
471 | fi |
---|
472 | |
---|
473 | #-----# |
---|
474 | # ogg # |
---|
475 | #-----# |
---|
476 | ## checking for ogg-headers |
---|
477 | # AC_CHECK_HEADERS([ogg/ogg.h] ,, |
---|
478 | # [AC_MSG_ERROR([cannot find ogg header.])]) |
---|
479 | ## checking for ogg-lib |
---|
480 | # AC_CHECK_LIB([ogg], [main], [FOUND_ogg=yes]) |
---|
481 | # if test x$FOUND_ogg = xyes ; then |
---|
482 | # LIBS="$LIBS -logg" |
---|
483 | # else |
---|
484 | # echo "------------------" |
---|
485 | # echo "ogg library not found." |
---|
486 | # echo "please install the ogg library, which can be found at http://www.xiph.org/ogg/vorbis/index.html" |
---|
487 | # echo "------------------" |
---|
488 | # exit -1 |
---|
489 | # fi |
---|
490 | |
---|
491 | #--------# |
---|
492 | # vorbis # |
---|
493 | #--------# |
---|
494 | ## checking for vorbis-lib |
---|
495 | # AC_CHECK_LIB([vorbis], [main], [FOUND_vorbis=yes]) |
---|
496 | # if test x$FOUND_vorbis = xyes ; then |
---|
497 | # LIBS="$LIBS -lvorbis" |
---|
498 | # else |
---|
499 | # echo "------------------" |
---|
500 | # echo "vorbis library not found." |
---|
501 | # echo "please install the vorbis library, which can be found at http://www.xiph.org/ogg/vorbis/index.html" |
---|
502 | # echo "------------------" |
---|
503 | # exit -1 |
---|
504 | # fi |
---|
505 | |
---|
506 | #------------# |
---|
507 | # vorbisfile # |
---|
508 | #------------# |
---|
509 | ## checking for vorbis-headers |
---|
510 | # AC_CHECK_HEADERS([vorbis/vorbisfile.h] ,, |
---|
511 | # [AC_MSG_ERROR([cannot find vorbisfile header.])]) |
---|
512 | ## checking for vorbisfile-lib |
---|
513 | # AC_CHECK_LIB([vorbisfile], [main], [FOUND_vorbisfile=yes]) |
---|
514 | # if test x$FOUND_vorbisfile = xyes ; then |
---|
515 | # LIBS="$LIBS -lvorbisfile" |
---|
516 | # else |
---|
517 | # echo "------------------" |
---|
518 | # echo "vorbisfile library not found." |
---|
519 | # echo "please install the vorbisfile library, which can be found at http://www.xiph.org/ogg/vorbis/index.html" |
---|
520 | # echo "------------------" |
---|
521 | # exit -1 |
---|
522 | # fi |
---|
523 | |
---|
524 | #-----# |
---|
525 | # GTK # |
---|
526 | #-----# |
---|
527 | if test x$def_gtk = xyes; then |
---|
528 | #PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3, have_gtk2=yes, have_gtk2=no) |
---|
529 | AC_MSG_CHECKING([for gtk2.0]) |
---|
530 | if `$PKG_CONFIG --exists gtk+-2.0`; then |
---|
531 | echo "yes" |
---|
532 | have_gtk2=yes |
---|
533 | GTK2_LIBS=`$PKG_CONFIG --libs gtk+-2.0` |
---|
534 | GTK2_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0` |
---|
535 | AC_DEFINE_UNQUOTED(HAVE_GTK2, 1, [if we have GTK2]) |
---|
536 | if test $DEBUG -ge 3; then |
---|
537 | echo "cflags: $GTK2_CFLAGS" |
---|
538 | echo "libs: $GTK2_LIBS" |
---|
539 | fi |
---|
540 | else |
---|
541 | echo "no" |
---|
542 | fi |
---|
543 | |
---|
544 | fi |
---|
545 | AC_SUBST(GTK2_LIBS) |
---|
546 | AC_SUBST(GTK2_CFLAGS) |
---|
547 | AM_CONDITIONAL(HAVE_GTK2, test x$have_gtk2 = xyes) |
---|
548 | |
---|
549 | #---------# |
---|
550 | # libcURL # |
---|
551 | #---------# |
---|
552 | if test x$def_curl = xyes; then |
---|
553 | |
---|
554 | AC_CHECK_HEADERS([curl/curl.h], [curlHeader="yes"], [curlHeader="no"]) |
---|
555 | AC_CHECK_LIB([curl], [main], [FOUND_curl=yes]) |
---|
556 | if test x$curlHeader = xyes & test x$FOUND_curl = xyes ; then |
---|
557 | have_curl=yes |
---|
558 | CURL_LIBS=`curl-config --libs` |
---|
559 | CURLCFLAGS=`curl-config --cflags` |
---|
560 | AC_DEFINE_UNQUOTED(HAVE_CURL, 1, [if we have CURL]) |
---|
561 | else |
---|
562 | have_curl=no |
---|
563 | fi |
---|
564 | |
---|
565 | fi |
---|
566 | AC_SUBST(CURL_LIBS) |
---|
567 | AC_SUBST(CURL_CFLAGS) |
---|
568 | AM_CONDITIONAL(HAVE_CURL, test x$have_curl = xyes) |
---|
569 | |
---|
570 | #--------# |
---|
571 | # efence # |
---|
572 | #--------# |
---|
573 | if test x$def_efence = xyes ; then |
---|
574 | AC_CHECK_LIB([efence], [main], [FOUND_efence=yes]) |
---|
575 | if test x$FOUND_efence = xyes ; then |
---|
576 | LIBS="$LIBS -lefence" |
---|
577 | fi |
---|
578 | |
---|
579 | fi |
---|
580 | |
---|
581 | # FIXME: Replace `main' with a function in `-lm': |
---|
582 | AC_CHECK_LIB([m], [main]) |
---|
583 | |
---|
584 | |
---|
585 | # Checks for header files. |
---|
586 | AC_HEADER_STDC |
---|
587 | AC_CHECK_HEADERS([stdlib.h string.h]) |
---|
588 | |
---|
589 | # Checks for typedefs, structures, and compiler characteristics. |
---|
590 | AC_HEADER_STDBOOL |
---|
591 | |
---|
592 | # Checks for library functions. |
---|
593 | AC_FUNC_MALLOC |
---|
594 | AC_CHECK_FUNCS([bzero sqrt]) |
---|
595 | |
---|
596 | ###################### |
---|
597 | ## OUTPUT CONFIGURE ## |
---|
598 | ###################### |
---|
599 | AC_CONFIG_FILES([Makefile |
---|
600 | src/Makefile |
---|
601 | src/lib/Makefile |
---|
602 | src/lib/graphics/Makefile |
---|
603 | src/lib/graphics/importer/Makefile |
---|
604 | src/lib/sound/Makefile |
---|
605 | src/lib/event/Makefile |
---|
606 | src/lib/physics/Makefile |
---|
607 | src/lib/particles/Makefile |
---|
608 | src/lib/collision_detection/Makefile |
---|
609 | src/lib/gui/Makefile |
---|
610 | src/lib/tinyxml/Makefile |
---|
611 | src/subprojects/Makefile |
---|
612 | src/subprojects/testmain/Makefile |
---|
613 | src/subprojects/importer/Makefile |
---|
614 | src/subprojects/particles/Makefile |
---|
615 | src/subprojects/collision_detection/Makefile |
---|
616 | src/subprojects/gui/Makefile |
---|
617 | ]) |
---|
618 | |
---|
619 | AC_OUTPUT |
---|