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