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