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