1 | |
---|
2 | ########################################################################## |
---|
3 | # orxonox - the future of 3D-vertical-scrollers # |
---|
4 | # # |
---|
5 | # Copyright (C) 2004 orx # |
---|
6 | # # |
---|
7 | # This program is free software; you can redistribute it and/or modify # |
---|
8 | # it under the terms of the GNU General Public License as published by # |
---|
9 | # the Free Software Foundation; either version 2, or (at your option) # |
---|
10 | # any later version. # |
---|
11 | # # |
---|
12 | # ### File Specific: # |
---|
13 | # main-programmer: Benjamin Grauer # |
---|
14 | # co-programmer: ... # |
---|
15 | # # |
---|
16 | # This is the main configuration File of autoconf. # |
---|
17 | # Please edit this file only, if you exactly know what you are doing. # |
---|
18 | # It is quite fragile, and compiling orxonox on different Platforms # |
---|
19 | # is only guarantied, if build with the right config. # |
---|
20 | # # |
---|
21 | # You might also have a look at the acinclude.m4, where many macros # |
---|
22 | # for this configuration files are stored # |
---|
23 | # # |
---|
24 | # be sure to visit us at http://www.orxonox.net # |
---|
25 | ########################################################################## |
---|
26 | |
---|
27 | ######################### |
---|
28 | ## AUTOCONF INIT PHASE ## |
---|
29 | ######################### |
---|
30 | AC_PREREQ(2.59) |
---|
31 | AC_INIT([orxonox], [0.3.4_alpha], [orxonox-dev at mail.datacore.ch]) |
---|
32 | |
---|
33 | ## Detect the canonical host and target build environment. |
---|
34 | AC_CANONICAL_BUILD |
---|
35 | AC_CANONICAL_HOST |
---|
36 | AC_CANONICAL_TARGET |
---|
37 | |
---|
38 | AM_INIT_AUTOMAKE |
---|
39 | |
---|
40 | AC_CONFIG_SRCDIR([src/orxonox.cc]) |
---|
41 | AC_CONFIG_HEADER([config.h]) |
---|
42 | |
---|
43 | ######################### |
---|
44 | ## Checks for programs ## |
---|
45 | ######################### |
---|
46 | AC_PROG_CXX |
---|
47 | AC_PROG_RANLIB |
---|
48 | AC_HEADER_STDC |
---|
49 | |
---|
50 | ## THIS IS OUR DEFAULT-DATA-DIRECTORY |
---|
51 | |
---|
52 | ################################## |
---|
53 | ## CHECKING OPTIONAL ARGUMENTS ## |
---|
54 | ################################## |
---|
55 | #----------------# |
---|
56 | # Data-Directory # |
---|
57 | #----------------# |
---|
58 | DATA_DIR=$datadir |
---|
59 | echo \$\{prefix\} |
---|
60 | if test $DATA_DIR = \$\{prefix\}/share ; then |
---|
61 | echo "not given" |
---|
62 | DATA_DIR=/usr/share |
---|
63 | else |
---|
64 | echo "given: $DATA_DIR" |
---|
65 | fi |
---|
66 | AC_DEFINE_UNQUOTED([ORX_DATADIR], ["$DATA_DIR"], |
---|
67 | [Define to the read-only architecture-independent |
---|
68 | data directory of ORXONOX.]) |
---|
69 | |
---|
70 | #-----------------# |
---|
71 | # shared-lib-path # |
---|
72 | #-----------------# |
---|
73 | SHARED_LIB_PATH=no |
---|
74 | AC_MSG_CHECKING([shared lib path]) |
---|
75 | AC_ARG_WITH([shared-lib-path], |
---|
76 | AS_HELP_STRING(--with-shared-lib-path,Tells the executable, where to look for the shared libraries.), |
---|
77 | SHARED_LIB_PATH=$withval) |
---|
78 | if test x$SHARED_LIB_PATH != xno; then |
---|
79 | echo "set to $SHARED_LIB_PATH" |
---|
80 | else |
---|
81 | echo "no" |
---|
82 | fi |
---|
83 | |
---|
84 | |
---|
85 | #-----------------# |
---|
86 | # DEBUG-statement # |
---|
87 | #-----------------# |
---|
88 | DEBUG_LEVEL=no |
---|
89 | AC_MSG_CHECKING([if DEBUG-mode should be enabled]) |
---|
90 | AC_ARG_ENABLE([debug], |
---|
91 | AS_HELP_STRING(--enable-debug,compiles in debug mode. Lots of debug info about the game.), |
---|
92 | DEBUG_LEVEL=$enableval) |
---|
93 | |
---|
94 | if test x$DEBUG_LEVEL = xno; then |
---|
95 | echo "no" |
---|
96 | echo " -> Setting debuglevel to 4. (orxonox is still in Development. It really is needed." |
---|
97 | DEBUG_LEVEL=4 |
---|
98 | elif test x$DEBUG_LEVEL = xyes; then |
---|
99 | echo "yes" |
---|
100 | echo " -> Setting debuglevel to 4. HARD DEBUG MODE!!." |
---|
101 | DEBUG_LEVEL=4 |
---|
102 | else |
---|
103 | if test x$DEBUG_LEVEL = x0 || test x$DEBUG_LEVEL = x1 || test x$DEBUG_LEVEL = x2 || test x$DEBUG_LEVEL = x3 || test x$DEBUG_LEVEL = x4 || test x$DEBUG_LEVEL = x5 ; then |
---|
104 | echo "yes: setting debuglevel to to $DEBUG_LEVEL" |
---|
105 | else |
---|
106 | echo "yes: invalid Value for Debug ($DEBUG_LEVEL). setting to 4(DEBUG)" |
---|
107 | DEBUG_LEVEL=4 |
---|
108 | fi |
---|
109 | fi |
---|
110 | |
---|
111 | if test $DEBUD_LEVEL > 3 ; then |
---|
112 | CPPFLAGS="${CPPFLAGS} -g" |
---|
113 | fi |
---|
114 | AC_DEFINE_UNQUOTED(DEBUG_LEVEL, ${DEBUG_LEVEL}, [in which debug mode we are]) |
---|
115 | AC_SUBST(DEBUG_LEVEL) |
---|
116 | |
---|
117 | #---------------# |
---|
118 | # Modular Debug # |
---|
119 | #---------------# |
---|
120 | MODULAR_DEBUG=yes |
---|
121 | AC_MSG_CHECKING([if Modular-DEBUG-mode should be ebabled]) |
---|
122 | AC_ARG_ENABLE([modular-debug], |
---|
123 | AS_HELP_STRING(--disable-modular-debug,compiles in modular-debug mode, that logs differently on the many modules of orxonox.), |
---|
124 | MODULAR_DEBUG=$enableval) |
---|
125 | |
---|
126 | if test x$MODULAR_DEBUG = xno; then |
---|
127 | echo "no" |
---|
128 | elif test x$MODULAR_DEBUG = xyes; then |
---|
129 | echo "yes" |
---|
130 | AC_DEFINE_UNQUOTED(MODULAR_DEBUG, 1, [if Modular-DUBUG mode is enabled]) |
---|
131 | fi |
---|
132 | |
---|
133 | |
---|
134 | #------------------# |
---|
135 | # libCurl-disabled # |
---|
136 | #------------------# |
---|
137 | AC_MSG_CHECKING([if libcURL should be enabled]) |
---|
138 | AC_ARG_ENABLE([curl], |
---|
139 | AS_HELP_STRING(--disable-curl,Prevents libcURL from being loaded), [def_curl=no], [def_curl=yes]) |
---|
140 | if test x$def_curl = xyes; then |
---|
141 | echo "yes" |
---|
142 | fi |
---|
143 | if test x$def_curl = xno; then |
---|
144 | echo "no" |
---|
145 | fi |
---|
146 | |
---|
147 | #--------------# |
---|
148 | # GTK-disabled # |
---|
149 | #--------------# |
---|
150 | |
---|
151 | AC_MSG_CHECKING([if gtk should be enabled]) |
---|
152 | AC_ARG_WITH([gtk], |
---|
153 | AS_HELP_STRING(--with-gtk, uses GTK for the GUI), [def_gtk=yes], [def_gtk=no]) |
---|
154 | if test x$def_gtk = xyes; then |
---|
155 | echo "yes - will be overwritten if Qt is enabled" |
---|
156 | fi |
---|
157 | if test x$def_gtk = xno; then |
---|
158 | echo "no" |
---|
159 | fi |
---|
160 | |
---|
161 | |
---|
162 | |
---|
163 | #-------------------# |
---|
164 | # SubProject-enable # |
---|
165 | #-------------------# |
---|
166 | def_sub_projects=no |
---|
167 | AC_MSG_CHECKING([if the SubProjects should be built]) |
---|
168 | AC_ARG_WITH([sub-projects], |
---|
169 | AS_HELP_STRING(--with-sub-projects,also builds the subProjects while make from srcdir), [def_sub_projects=yes]) |
---|
170 | if test x$def_sub_projects = xyes; then |
---|
171 | echo "yes" |
---|
172 | fi |
---|
173 | if test x$def_sub_projects = xno; then |
---|
174 | echo "no" |
---|
175 | fi |
---|
176 | AM_CONDITIONAL(SUB_PROJECTS, test x$def_sub_projects = xyes) |
---|
177 | |
---|
178 | #-------------------# |
---|
179 | # Profiling Enabled # |
---|
180 | #-------------------# |
---|
181 | def_profiling=no |
---|
182 | AC_MSG_CHECKING([if Profiling should be enabled]) |
---|
183 | AC_ARG_ENABLE([profile], |
---|
184 | AS_HELP_STRING(--enable-profile,builds orxonox with profiling support), [def_profiling=yes]) |
---|
185 | if test x$def_profiling = xyes; then |
---|
186 | echo "yes" |
---|
187 | CXXFLAGS="$CXXFLAGS -pg" |
---|
188 | fi |
---|
189 | if test x$def_profiling = xno; then |
---|
190 | echo "no" |
---|
191 | fi |
---|
192 | |
---|
193 | #----------------# |
---|
194 | # efence Enabled # |
---|
195 | #----------------# |
---|
196 | def_efence=no |
---|
197 | AC_MSG_CHECKING([if efence should be enabled]) |
---|
198 | AC_ARG_ENABLE([efence], |
---|
199 | AS_HELP_STRING(--enable-efence,builds orxonox with efence support), [def_efence=yes]) |
---|
200 | if test x$def_efence = xyes; then |
---|
201 | echo "yes" |
---|
202 | fi |
---|
203 | if test x$def_efence = xno; then |
---|
204 | echo "no" |
---|
205 | fi |
---|
206 | |
---|
207 | #----------------------# |
---|
208 | # Documentation-enable # |
---|
209 | #----------------------# |
---|
210 | def_documentation=no |
---|
211 | AC_MSG_CHECKING([if the Documentation should be build by default]) |
---|
212 | AC_ARG_ENABLE([documentation], |
---|
213 | AS_HELP_STRING(--enable-documentation,also builds the sDocumentation while make from srcdir), [def_documentation=yes]) |
---|
214 | if test x$def_documentation = xyes; then |
---|
215 | echo "yes" |
---|
216 | fi |
---|
217 | if test x$def_documentation = xno; then |
---|
218 | echo "no" |
---|
219 | fi |
---|
220 | AM_CONDITIONAL(DOCUMENTATION, test x$def_documentation = xyes) |
---|
221 | |
---|
222 | #---------------------------# |
---|
223 | # WITH TARDIS (convenience) # |
---|
224 | #---------------------------# |
---|
225 | def_tardis=no |
---|
226 | GTKPATH="" |
---|
227 | AC_MSG_CHECKING([convenience flag for working at the taris in the ETH zurich]) |
---|
228 | AC_ARG_WITH([tardis], |
---|
229 | AS_HELP_STRING(--with-tardis,sets all the necesary environment flags for linux-TARDIS boxes at the ETH Zurich), [def_tardis=yes]) |
---|
230 | if test x$def_tardis = xyes; then |
---|
231 | ARCH=i686-debian-linux3.1 |
---|
232 | ## GAMELIBS |
---|
233 | PREFIX=/usr/pack/gamelibs-1.0-to |
---|
234 | CPPFLAGS="${CPPFLAGS} -I${PREFIX}/include" |
---|
235 | LDFLAGS="${LDFLAGS} -L$PREFIX/${ARCH}/lib -Wl,-rpath -Wl,${PREFIX}/${ARCH}/lib" |
---|
236 | |
---|
237 | ## QT on Tardis |
---|
238 | QT_PREFIX=/usr/pack/qt-4.1.1-mo/${ARCH} |
---|
239 | # CPPFLAGS="${CPPFLAGS} -I${PREFIX_QT}/include" |
---|
240 | # LDFLAGS="${LDFLAGS} -L${QT_PREFIX}/lib -Wl,-rpath -Wl,${QT_PREFIX}/${ARCH}/lib" |
---|
241 | |
---|
242 | fi |
---|
243 | if test x$def_tardis = xno; then |
---|
244 | echo "no" |
---|
245 | fi |
---|
246 | |
---|
247 | |
---|
248 | |
---|
249 | ####################### |
---|
250 | ## PROGRAMM CHECKING ## |
---|
251 | ## 3. party Programs ## |
---|
252 | ####################### |
---|
253 | |
---|
254 | #----------------------# |
---|
255 | # checking for Doxygen # |
---|
256 | #----------------------# |
---|
257 | AC_PATH_PROG(DOXYGEN, doxygen) |
---|
258 | AM_CONDITIONAL(DOXYGEN, test $DOXYGEN) |
---|
259 | |
---|
260 | #--------------------# |
---|
261 | # checking for gprof # |
---|
262 | #--------------------# |
---|
263 | AC_PATH_PROG(GPROF, gprof) |
---|
264 | |
---|
265 | #-------------------------# |
---|
266 | # checking for pkg-config # |
---|
267 | #-------------------------# |
---|
268 | if test x$def_gtk = xyes; then |
---|
269 | if test x${GTKPATH} != x; then |
---|
270 | AC_PATH_PROG([PKG_CONFIG], [pkg-config],[], $GTKPATH ) |
---|
271 | else |
---|
272 | AC_PATH_PROG(PKG_CONFIG, pkg-config ) |
---|
273 | fi |
---|
274 | fi |
---|
275 | |
---|
276 | |
---|
277 | ######################### |
---|
278 | ## CHECKING FOR SYSTEM ## |
---|
279 | ######################### |
---|
280 | ## here the system is checked, and openGL is included |
---|
281 | ## also checking for SDL on differen Systems |
---|
282 | |
---|
283 | AC_MSG_CHECKING([for System]) |
---|
284 | ## checking for openGL-environment and other sys-specific parameters |
---|
285 | case "$target" in |
---|
286 | |
---|
287 | ########### |
---|
288 | #---------# |
---|
289 | # WINDOWS # |
---|
290 | #---------# |
---|
291 | ########### |
---|
292 | *-*-mingw32*) |
---|
293 | echo "mingw-WINDOWS detected" |
---|
294 | |
---|
295 | CPPFLAGS="-I/usr/include -I/mingw/include $CPPFLAGS" |
---|
296 | |
---|
297 | mingw="yes" |
---|
298 | MSBITFIELDS="-mms-bitfields" |
---|
299 | MWINDOWS="-mwindows" |
---|
300 | |
---|
301 | #--------# |
---|
302 | # MIN-GW # |
---|
303 | #--------# |
---|
304 | # checking for mingw32 |
---|
305 | AC_CHECK_LIB([mingw32], [main], FOUND_mingw32=yes) |
---|
306 | if test x$FOUND_mingw32 = xyes; then |
---|
307 | LIBS="$LIBS -lmingw32" |
---|
308 | fi |
---|
309 | |
---|
310 | AC_CHECK_LIB([winmm], [main], [FOUND_winmm=yes]) |
---|
311 | if test x${FOUND_winmm} = xyes ; then |
---|
312 | LIBS="$LIBS -lwinmm" |
---|
313 | fi |
---|
314 | |
---|
315 | #---------------# |
---|
316 | # open-GL (win) # |
---|
317 | #---------------# |
---|
318 | # checking gl header |
---|
319 | AC_CHECK_HEADERS(GL/gl.h ,, |
---|
320 | [AC_MSG_ERROR([cannot find opengl headers])]) |
---|
321 | # checking for Windows openGl library |
---|
322 | AC_CHECK_LIB([opengl32], [main], [FOUND_GL=yes; LIBS="$LIBS -lopengl32"]) |
---|
323 | if test x$FOUND_GL != xyes ; then |
---|
324 | echo "------------------" |
---|
325 | echo "opengl not found." |
---|
326 | echo "please install the opengl package which can be found at http://www.opengl.org" |
---|
327 | echo "------------------" |
---|
328 | exit -1 |
---|
329 | fi |
---|
330 | |
---|
331 | # cheking for GLU-header |
---|
332 | AC_CHECK_HEADERS([GL/glu.h] ,, |
---|
333 | [AC_MSG_ERROR([cannot find opengl headers]) ]) |
---|
334 | |
---|
335 | # checking for libGLU |
---|
336 | AC_CHECK_LIB([glu32], [main], [FOUND_GLU=yes; LIBS="$LIBS -lGLU32"]) |
---|
337 | if test x$FOUND_GLU != xyes ; then |
---|
338 | echo "------------------" |
---|
339 | echo "GLU library not found." |
---|
340 | echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org" |
---|
341 | echo "------------------" |
---|
342 | exit -1 |
---|
343 | fi |
---|
344 | |
---|
345 | # checking glew header |
---|
346 | AC_CHECK_HEADERS(GL/glew.h ,, |
---|
347 | [AC_MSG_ERROR([cannot find opengl extension wrangler headers]) ]) |
---|
348 | # checking for Windows glew library |
---|
349 | AC_CHECK_LIB([glew32], [main], [FOUND_GLEW=yes; LIBS="$LIBS -lglew32"]) |
---|
350 | if test x$FOUND_GLEW != xyes ; then |
---|
351 | echo "------------------" |
---|
352 | echo "opengl extension wrangler not found." |
---|
353 | echo "please install the glew package which can be found at http://glew.sourceforge.net" |
---|
354 | echo "------------------" |
---|
355 | exit -1 |
---|
356 | fi |
---|
357 | |
---|
358 | #--------# |
---|
359 | # openAL # |
---|
360 | #--------# |
---|
361 | AX_CHECK_REQUIRED_HEADER_LIB([AL/al.h], [OpenAL32], [main],,, [http://www.openal.org]) |
---|
362 | |
---|
363 | #-----------# |
---|
364 | # SDL(win) # |
---|
365 | #-----------# |
---|
366 | # checking for SDL-headers |
---|
367 | AC_CHECK_HEADERS([SDL/SDL.h] ,, |
---|
368 | [AC_MSG_ERROR([cannot find SDL headers]) ]) |
---|
369 | |
---|
370 | #checking for libSDL |
---|
371 | AC_CHECK_LIB([sdlmain], [main], [FOUND_sdlmain=yes; LIBS="$LIBS -lsdlmain"]) |
---|
372 | if test x$FOUND_sdlmain != xyes ; then |
---|
373 | echo "------------------" |
---|
374 | echo "SDL library not found." |
---|
375 | echo "please install the SDL library, which can be found at http://www.libsdl.org" |
---|
376 | echo "------------------" |
---|
377 | exit 1 |
---|
378 | fi |
---|
379 | AC_CHECK_LIB([sdl], [main], [FOUND_SDL=yes; LIBS="$LIBS -lsdl"]) |
---|
380 | if test x$FOUND_SDL != xyes ; then |
---|
381 | echo "------------------" |
---|
382 | echo "SDL library not found." |
---|
383 | echo "please install the SDL library, which can be found at http://www.libsdl.org" |
---|
384 | echo "------------------" |
---|
385 | exit -1 |
---|
386 | fi |
---|
387 | |
---|
388 | ;; |
---|
389 | |
---|
390 | ######### |
---|
391 | #-------# |
---|
392 | # LINUX # |
---|
393 | #-------# |
---|
394 | ######### |
---|
395 | *-*-linux*) |
---|
396 | echo "Linux detected" |
---|
397 | |
---|
398 | Linux="yes" |
---|
399 | |
---|
400 | ##CPPFLAGS="-I/usr/include $CPPFLAGS" |
---|
401 | ##LDFLAGS="-L/usr/lib $LDFLAGS" |
---|
402 | if test x$SHARED_LIB_PATH != xno; then |
---|
403 | echo "setting new LDFLAGS with $SHARED_LIB_PATH" |
---|
404 | LDFLAGS="-Wl,-rpath,$SHARED_LIB_PATH -L$SHARED_LIB_PATH $LDFLAGS" |
---|
405 | fi |
---|
406 | |
---|
407 | #--------# |
---|
408 | # openGL # |
---|
409 | #--------# |
---|
410 | AX_CHECK_REQUIRED_HEADER_LIB([GL/gl.h], [GL], [main],,, [http://www.opengl.org]) |
---|
411 | AX_CHECK_REQUIRED_HEADER_LIB([GL/glu.h], [GLU], [main],,, [http://www.opengl.org]) |
---|
412 | AX_CHECK_REQUIRED_HEADER_LIB([GL/glew.h], [GLEW], [main],,, [http://glew.sourceforge.net]) |
---|
413 | |
---|
414 | #--------# |
---|
415 | # openAL # |
---|
416 | #--------# |
---|
417 | AX_CHECK_REQUIRED_HEADER_LIB([AL/al.h], [openal], [main],,, [http://www.openal.org]) |
---|
418 | |
---|
419 | #-----# |
---|
420 | # SDL # |
---|
421 | #-----# |
---|
422 | # checking for SDL |
---|
423 | AC_MSG_CHECKING([for SDL-version]) |
---|
424 | SDL_VERSION=`sdl-config --version` |
---|
425 | echo $SDL_VERSION |
---|
426 | CPPFLAGS="$CPPFLAGS `sdl-config --cflags`" |
---|
427 | |
---|
428 | AX_CHECK_REQUIRED_HEADER_LIB([SDL.h SDL/SDL.h], [SDL], [main],,, [http://www.libsdl.org]) |
---|
429 | |
---|
430 | ;; |
---|
431 | |
---|
432 | ############# |
---|
433 | #-----------# |
---|
434 | # MAC -OS X # |
---|
435 | #-----------# |
---|
436 | ############# |
---|
437 | *darwin*) |
---|
438 | echo "OS X detected" |
---|
439 | |
---|
440 | osX="yes" |
---|
441 | |
---|
442 | CPPFLAGS="-I/sw/include -I/sw/include $CPPFLAGS" |
---|
443 | LDFLAGS="$LDFLAGS -L/sw/lib" |
---|
444 | # checking gl header |
---|
445 | AC_CHECK_HEADERS([OpenGL/gl.h] ,, |
---|
446 | [AC_MSG_ERROR([cannot find opengl headers]) ]) |
---|
447 | # cheking for GLU-header |
---|
448 | AC_CHECK_HEADERS([OpenGL/glu.h] ,, |
---|
449 | [AC_MSG_ERROR([cannot find opengl headers]) ]) |
---|
450 | |
---|
451 | LIBS="$LIBS -framework OpenGL" |
---|
452 | |
---|
453 | |
---|
454 | |
---|
455 | # checking for GLEW-headers |
---|
456 | AC_CHECK_HEADERS([GL/glew.h] ,, |
---|
457 | [AC_MSG_ERROR([cannot find glew headers]) ]) |
---|
458 | # checking for GLEW-lib |
---|
459 | AC_CHECK_LIB([GLEW], [main], [FOUND_GLEW=yes; LIBS="$LIBS -lGLEW"]) |
---|
460 | if test x$FOUND_GLEW != xyes ; then |
---|
461 | echo "------------------" |
---|
462 | echo "glew not found." |
---|
463 | echo "please install the glew package which can be found at http://glew.sourceforge.net" |
---|
464 | echo "------------------" |
---|
465 | exit -1 |
---|
466 | fi |
---|
467 | |
---|
468 | |
---|
469 | AC_CHECK_HEADERS([OpenAL/al.h] ,, |
---|
470 | [AC_MSG_ERROR([cannot find opengl headers]) ]) |
---|
471 | HAVE_OPENAL=yes |
---|
472 | LIBS="$LIBS -framework OpenAL" |
---|
473 | |
---|
474 | |
---|
475 | ## SDL-check |
---|
476 | SDL_CFLAGS=`sdl-config --cflags` |
---|
477 | SDL_LIBS=`sdl-config --libs` |
---|
478 | CXXFL\AGS="$CXXFLAGS $SDL_CFLAGS" |
---|
479 | LIBS="$LIBS $SDL_LIBS" |
---|
480 | AC_CHECK_HEADERS([SDL/SDL.h] ,, |
---|
481 | [AC_MSG_ERROR([cannot find SDL headers]) ]) |
---|
482 | HAVE_SDL=yes |
---|
483 | # LIBS="$LIBS -framework SDL" |
---|
484 | |
---|
485 | # checking for SDL-headers |
---|
486 | # AC_CHECK_HEADERS(SDL/SDL.h ,, |
---|
487 | # [AC_MSG_ERROR([cannot find SDL headers]) ]) |
---|
488 | |
---|
489 | ## checking for SDL |
---|
490 | # SDL_VERSION=1.2.7 |
---|
491 | # AM_PATH_SDL($SDL_VERSION, |
---|
492 | # :, |
---|
493 | # AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) |
---|
494 | # ) |
---|
495 | |
---|
496 | |
---|
497 | ;; |
---|
498 | |
---|
499 | *) |
---|
500 | ;; |
---|
501 | esac |
---|
502 | |
---|
503 | AC_SUBST(MSBITFIELDS) |
---|
504 | |
---|
505 | ################################### |
---|
506 | ## CHECKING FOR HEADERS AND LIBS ## |
---|
507 | ################################### |
---|
508 | |
---|
509 | #---------# |
---|
510 | # SDL_ttf # |
---|
511 | #---------# |
---|
512 | AX_CHECK_REQUIRED_HEADER_LIB([SDL_ttf.h SDL/SDL_ttf.h], [SDL_ttf], [TTF_OpenFont],,, [http://www.libsdl.org/projects/SDL_ttf]) |
---|
513 | #-----------# |
---|
514 | # SDL_Image # |
---|
515 | #-----------# |
---|
516 | AX_CHECK_REQUIRED_HEADER_LIB([SDL_image.h SDL/SDL_image.h], [SDL_image], [main],,, [http://www.libsdl.org/projects/SDL_image]) |
---|
517 | #---------# |
---|
518 | # SDL_Net # |
---|
519 | #---------# |
---|
520 | AX_CHECK_REQUIRED_HEADER_LIB([SDL_net.h SDL/SDL_net.h], [SDL_net], [main],,, [http://www.libsdl.org/projects/SDL_net]) |
---|
521 | |
---|
522 | #--------# |
---|
523 | # FFmpeg # |
---|
524 | #--------# |
---|
525 | # checking for FFmpeg-headers |
---|
526 | AX_CHECK_REQUIRED_HEADER_LIB([avformat.h ffmpeg/avformat.h] ,[avformat], [main], |
---|
527 | [AX_CHECK_REQUIRED_HEADER_LIB([avcodec.h ffmpeg/avcodec.h], [avcodec], [main],,, [http://ffmpeg.sourceforge.net]) LIBS="${LIBS} -lavformat -lavcodec"], |
---|
528 | [AX_GET_INSTALL_NECESSARY_LIB([http://svn.orxonox.net/webdev/develop/ext_libs], [ffmpeg.tar.gz], [ffmpeg], [extern_libs/], [include/*.h lib/*.a]) |
---|
529 | LIBS="-llualib -llua" CPPFLAGS="${CPPFLAGS} -I$(top_build_dir)/extern_libs" ], |
---|
530 | [http://ffmpeg.sourceforge.net]) |
---|
531 | |
---|
532 | |
---|
533 | |
---|
534 | |
---|
535 | AC_CHECK_LIB([avutil], [main], [FOUND_avutil=yes; LIBS="$LIBS -lavutil"]) |
---|
536 | AC_CHECK_LIB([xvid], [main], [FOUND_xvid=yes; LIBS="$LIBS -lxvid"]) |
---|
537 | AC_CHECK_LIB([gcj], [main], [FOUND_gcj=yes; LIBS="$LIBS -lgcj"]) |
---|
538 | AC_CHECK_LIB([theora], [main], [FOUND_theora=yes; LIBS="$LIBS -ltheora"]) |
---|
539 | AC_CHECK_LIB([dts], [main], [FOUND_dts=yes; LIBS="$LIBS -ldts"]) |
---|
540 | AC_CHECK_LIB([gsm], [main], [FOUND_gsm=yes; LIBS="$LIBS -lgsm"]) |
---|
541 | AC_CHECK_LIB([dc1394_control], [main], [FOUND_dc1394_control=yes; LIBS="$LIBS -ldc1394_control"]) |
---|
542 | AC_CHECK_LIB([vorbisenc], [main], [FOUND_vorbisenc=yes; LIBS="$LIBS -lvorbisenc"]) |
---|
543 | |
---|
544 | |
---|
545 | #--------# |
---|
546 | # vorbis # |
---|
547 | #--------# |
---|
548 | AX_CHECK_REQUIRED_HEADER_LIB([vorbis/vorbisfile.h], [vorbisfile], [main],,, [http://www.xiph.org/ogg/vorbis/index.html]) |
---|
549 | AX_CHECK_REQUIRED_HEADER_LIB([vorbis/codec.h], [vorbis], [main],,, [http://www.xiph.org/ogg/vorbis/index.html]) |
---|
550 | |
---|
551 | #-----# |
---|
552 | # ogg # |
---|
553 | #-----# |
---|
554 | AX_CHECK_REQUIRED_HEADER_LIB([ogg/ogg.h], [ogg], [main],,, [http://www.xiph.org/ogg/vorbis/index.html]) |
---|
555 | |
---|
556 | |
---|
557 | #----# |
---|
558 | # QT # |
---|
559 | #----# |
---|
560 | AX_CHECK_QT([${QT_PREFIX}], [QtCore QtCore4],, [http://www.trolltech.com]) |
---|
561 | if test x$have_qt = xno ; then |
---|
562 | WITH_QT=no |
---|
563 | fi |
---|
564 | |
---|
565 | #---------# |
---|
566 | # libcURL # |
---|
567 | #---------# |
---|
568 | AX_CHECK_HEADER_LIB([curl/curl.h], [curl], [main], [ |
---|
569 | have_curl=yes |
---|
570 | CURL_LIBS=`curl-config --libs` |
---|
571 | CURLCFLAGS=`curl-config --cflags` |
---|
572 | AC_DEFINE_UNQUOTED(HAVE_CURL, 1, [if we have CURL]) ] |
---|
573 | ,, [http://curl.haxx.se/]) |
---|
574 | |
---|
575 | AC_SUBST(CURL_LIBS) |
---|
576 | AC_SUBST(CURL_CFLAGS) |
---|
577 | AM_CONDITIONAL(HAVE_CURL, test "x$have_curl" = "xyes") |
---|
578 | |
---|
579 | #-----# |
---|
580 | # LUA # |
---|
581 | #-----# |
---|
582 | LUA_DIR="/usr/include/lua" |
---|
583 | AX_CHECK_LUA([${LUA_DIR}]) |
---|
584 | |
---|
585 | #--------# |
---|
586 | # efence # |
---|
587 | #--------# |
---|
588 | if test x$def_efence = xyes ; then |
---|
589 | AC_CHECK_LIB([efence], [main], [FOUND_efence=yes; LIBS="$LIBS -lefence"]) |
---|
590 | if test x$FOUND_efence != xyes ; then |
---|
591 | echo "efence was requested, but is not installed!! going on" |
---|
592 | fi |
---|
593 | fi |
---|
594 | |
---|
595 | # FIXME: Replace `main' with a function in `-lm': |
---|
596 | AC_CHECK_LIB([m], [main]) |
---|
597 | AX_CHECK_REQUIRED_HEADER_LIB([zlib.h], [z], [zlibVersion],,, [http://www.zlib.net]) |
---|
598 | |
---|
599 | # Checks for header files. |
---|
600 | AC_HEADER_STDC |
---|
601 | AC_CHECK_HEADERS([stdlib.h string.h]) |
---|
602 | |
---|
603 | # Checks for typedefs, structures, and compiler characteristics. |
---|
604 | AC_HEADER_STDBOOL |
---|
605 | |
---|
606 | # Checks for library functions. |
---|
607 | AC_FUNC_MALLOC |
---|
608 | AC_CHECK_FUNCS([bzero sqrt]) |
---|
609 | |
---|
610 | ###################### |
---|
611 | ## OUTPUT CONFIGURE ## |
---|
612 | ###################### |
---|
613 | AC_CONFIG_FILES([Makefile |
---|
614 | src/Makefile |
---|
615 | src/lib/Makefile |
---|
616 | src/lib/math/Makefile |
---|
617 | src/lib/graphics/Makefile |
---|
618 | src/lib/graphics/importer/Makefile |
---|
619 | src/lib/graphics/spatial_separation/Makefile |
---|
620 | src/lib/sound/Makefile |
---|
621 | src/lib/event/Makefile |
---|
622 | src/lib/physics/Makefile |
---|
623 | src/lib/particles/Makefile |
---|
624 | src/lib/collision_detection/Makefile |
---|
625 | src/lib/collision_reaction/Makefile |
---|
626 | src/lib/network/Makefile |
---|
627 | src/lib/shell/Makefile |
---|
628 | src/lib/gui/Makefile |
---|
629 | src/lib/gui/gtk/Makefile |
---|
630 | src/lib/gui/gl/Makefile |
---|
631 | src/lib/gui/qt/Makefile |
---|
632 | src/lib/script_engine/Makefile |
---|
633 | src/lib/parser/Makefile |
---|
634 | src/lib/parser/tinyxml/Makefile |
---|
635 | src/lib/parser/ini_parser/Makefile |
---|
636 | src/lib/parser/cmdline_parser/Makefile |
---|
637 | src/lib/parser/preferences/Makefile |
---|
638 | src/util/Makefile |
---|
639 | src/world_entities/Makefile |
---|
640 | src/subprojects/Makefile |
---|
641 | src/subprojects/testmain/Makefile |
---|
642 | src/subprojects/importer/Makefile |
---|
643 | src/subprojects/particles/Makefile |
---|
644 | src/subprojects/collision_detection/Makefile |
---|
645 | src/subprojects/network/Makefile |
---|
646 | ]) |
---|
647 | |
---|
648 | AC_OUTPUT |
---|