Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/configure.ac @ 8585

Last change on this file since 8585 was 8523, checked in by bensch, 18 years ago

trunk: compiles on Windows: DANGER: THE LINUX PORT MAY BE COMPROMISED

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