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