Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/ODE/configure.ac @ 10633

Last change on this file since 10633 was 10355, checked in by bottac, 18 years ago

Here comes the updated version.

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