Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 9873 was 9872, checked in by bensch, 18 years ago

Changelog adapted for the proxy server arch, and also switched to the next stage of Orxonox: 0.3.6_alpha

now we will make our approach to orxonox 0.4.0_alpha with the first beta release (i hope :) )

File size: 19.9 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#########################
[9391]30AC_PREREQ(2.56)
[9872]31AC_INIT([orxonox], [0.3.6_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
[3424]147#-------------------#
148# SubProject-enable #
149#-------------------#
150def_sub_projects=no
[3377]151AC_MSG_CHECKING([if the SubProjects should be built])
[4774]152AC_ARG_WITH([sub-projects],
[5479]153        AS_HELP_STRING(--with-sub-projects,also builds the subProjects while make from srcdir), [def_sub_projects=yes])
[3424]154if test x$def_sub_projects = xyes; then
[3377]155  echo "yes"
[4555]156fi
[3424]157if test x$def_sub_projects = xno; then
[3377]158  echo "no"
159fi
160AM_CONDITIONAL(SUB_PROJECTS, test x$def_sub_projects = xyes)
161
[3788]162#-------------------#
163# Profiling Enabled #
164#-------------------#
165def_profiling=no
166AC_MSG_CHECKING([if Profiling should be enabled])
[4555]167AC_ARG_ENABLE([profile],
[5479]168        AS_HELP_STRING(--enable-profile,builds orxonox with profiling support), [def_profiling=yes])
[3788]169if test x$def_profiling = xyes; then
170  echo "yes"
171  CXXFLAGS="$CXXFLAGS -pg"
[4555]172fi
[3788]173if test x$def_profiling = xno; then
174  echo "no"
175fi
176
[3863]177#----------------#
178# efence Enabled #
179#----------------#
180def_efence=no
181AC_MSG_CHECKING([if efence should be enabled])
[4555]182AC_ARG_ENABLE([efence],
[5479]183        AS_HELP_STRING(--enable-efence,builds orxonox with efence support), [def_efence=yes])
[3863]184if test x$def_efence = xyes; then
185  echo "yes"
[4555]186fi
[3863]187if test x$def_efence = xno; then
188  echo "no"
189fi
190
[3558]191#----------------------#
192# Documentation-enable #
193#----------------------#
194def_documentation=no
195AC_MSG_CHECKING([if the Documentation should be build by default])
[4555]196AC_ARG_ENABLE([documentation],
[5479]197        AS_HELP_STRING(--enable-documentation,also builds the sDocumentation while make from srcdir), [def_documentation=yes])
[3558]198if test x$def_documentation = xyes; then
199  echo "yes"
[4555]200fi
[3558]201if test x$def_documentation = xno; then
202  echo "no"
203fi
204AM_CONDITIONAL(DOCUMENTATION, test x$def_documentation = xyes)
[4774]205
[5467]206#---------------------------#
207# WITH TARDIS (convenience) #
208#---------------------------#
209def_tardis=no
210AC_MSG_CHECKING([convenience flag for working at the taris in the ETH zurich])
[5468]211AC_ARG_WITH([tardis],
[5479]212        AS_HELP_STRING(--with-tardis,sets all the necesary environment flags for linux-TARDIS boxes at the ETH Zurich), [def_tardis=yes])
[5467]213if test x$def_tardis = xyes; then
[5469]214  ARCH=i686-debian-linux3.1
[5470]215   ## GAMELIBS
[5467]216  PREFIX=/usr/pack/gamelibs-1.0-to
[5469]217  CPPFLAGS="${CPPFLAGS} -I${PREFIX}/include"
218  LDFLAGS="${LDFLAGS} -L$PREFIX/${ARCH}/lib -Wl,-rpath -Wl,${PREFIX}/${ARCH}/lib"
[7661]219
[7753]220## QT on Tardis
[7661]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
[5467]225fi
226if test x$def_tardis = xno; then
227  echo "no"
228fi
229
[7661]230
231
[3424]232#######################
233## PROGRAMM CHECKING ##
234## 3. party Programs ##
235#######################
236
237#----------------------#
238# checking for Doxygen #
239#----------------------#
[3219]240AC_PATH_PROG(DOXYGEN, doxygen)
241AM_CONDITIONAL(DOXYGEN, test $DOXYGEN)
242
[3789]243#--------------------#
244# checking for gprof #
245#--------------------#
246AC_PATH_PROG(GPROF, gprof)
247
[4130]248
[3424]249#########################
250## CHECKING FOR SYSTEM ##
251#########################
252## here the system is checked, and openGL is included
253## also checking for SDL on differen Systems
[2701]254
255AC_MSG_CHECKING([for System])
[2980]256## checking for openGL-environment and other sys-specific parameters
257case "$target" in
[4825]258
259###########
[3424]260#---------#
261# WINDOWS #
262#---------#
[4825]263###########
[2980]264  *-*-mingw32*)
[2701]265echo "mingw-WINDOWS detected"
266
[8147]267CPPFLAGS="-I/usr/include -I/mingw/include ${CPPFLAGS}"
[8523]268LDFLAGS="${LDFLAGS} -L/mingw/lib"
[2701]269    mingw="yes"
270    MSBITFIELDS="-mms-bitfields"
271    MWINDOWS="-mwindows"
272
[5276]273#--------#
274# MIN-GW #
275#--------#
[4697]276# checking for mingw32
277    AC_CHECK_LIB([mingw32], [main], FOUND_mingw32=yes)
278    if test x$FOUND_mingw32 = xyes; then
279        LIBS="$LIBS -lmingw32"
280    fi
281
[7919]282    AC_CHECK_LIB([winmm], [main], [FOUND_winmm=yes])
283    if test x${FOUND_winmm} = xyes ; then
[8061]284        LIBS="$LIBS -lwinmm"
[7919]285    fi
286
[4697]287#---------------#
288# open-GL (win) #
289#---------------#
[2925]290# checking gl header
[2879]291   AC_CHECK_HEADERS(GL/gl.h ,,
[5276]292      [AC_MSG_ERROR([cannot find opengl headers])])
[2701]293#   checking for Windows openGl library
[5276]294    AC_CHECK_LIB([opengl32], [main], [FOUND_GL=yes; LIBS="$LIBS -lopengl32"])
295    if test x$FOUND_GL != xyes ; then
[4555]296         echo "------------------"
297         echo "opengl not found."
298         echo "please install the opengl package which can be found at http://www.opengl.org"
299         echo "------------------"
300         exit -1
[1959]301    fi
302
[2701]303# cheking for GLU-header
[3424]304    AC_CHECK_HEADERS([GL/glu.h] ,,
[1971]305      [AC_MSG_ERROR([cannot find opengl headers]) ])
306
[2701]307# checking for libGLU
[5276]308    AC_CHECK_LIB([glu32], [main], [FOUND_GLU=yes; LIBS="$LIBS -lGLU32"])
309    if test x$FOUND_GLU != xyes ; then
[4555]310         echo "------------------"
311         echo "GLU library not found."
312         echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org"
313         echo "------------------"
314         exit -1
[1959]315    fi
[1971]316
[5270]317# checking glew header
318   AC_CHECK_HEADERS(GL/glew.h ,,
319      [AC_MSG_ERROR([cannot find opengl extension wrangler headers]) ])
320#   checking for Windows glew library
[5276]321    AC_CHECK_LIB([glew32], [main], [FOUND_GLEW=yes; LIBS="$LIBS -lglew32"])
322    if test x$FOUND_GLEW != xyes ; then
[5270]323         echo "------------------"
324         echo "opengl extension wrangler not found."
325         echo "please install the glew package which can be found at http://glew.sourceforge.net"
326         echo "------------------"
327         exit -1
328    fi
329
[4697]330#--------#
331# openAL #
332#--------#
[6838]333AX_CHECK_REQUIRED_HEADER_LIB([AL/al.h], [OpenAL32], [main],,, [http://www.openal.org])
[4825]334
[5276]335#-----------#
336# SDL(win) #
337#-----------#
338# checking for SDL-headers
339    AC_CHECK_HEADERS([SDL/SDL.h] ,,
340      [AC_MSG_ERROR([cannot find SDL headers]) ])
341
342#checking for libSDL
343    AC_CHECK_LIB([sdlmain], [main], [FOUND_sdlmain=yes; LIBS="$LIBS -lsdlmain"])
344    if test x$FOUND_sdlmain != xyes ; then
345        echo "------------------"
346        echo "SDL library not found."
347        echo "please install the SDL library, which can be found at http://www.libsdl.org"
348        echo "------------------"
349        exit 1
350    fi
351    AC_CHECK_LIB([sdl], [main], [FOUND_SDL=yes; LIBS="$LIBS -lsdl"])
352    if test x$FOUND_SDL != xyes ; then
353        echo "------------------"
354        echo "SDL library not found."
355        echo "please install the SDL library, which can be found at http://www.libsdl.org"
356        echo "------------------"
357        exit -1
358    fi
359
360  ;;
361
[4825]362#########
[3424]363#-------#
364# LINUX #
365#-------#
[4825]366#########
[2980]367 *-*-linux*)
[2701]368echo "Linux detected"
369
370 Linux="yes"
371
[5265]372##CPPFLAGS="-I/usr/include $CPPFLAGS"
[5224]373##LDFLAGS="-L/usr/lib $LDFLAGS"
[5221]374if test x$SHARED_LIB_PATH != xno; then
[5265]375        echo "setting new LDFLAGS with $SHARED_LIB_PATH"
376        LDFLAGS="-Wl,-rpath,$SHARED_LIB_PATH -L$SHARED_LIB_PATH $LDFLAGS"
[5221]377fi
378
[5277]379#--------#
380# openGL #
381#--------#
[6164]382AX_CHECK_REQUIRED_HEADER_LIB([GL/gl.h], [GL], [main],,, [http://www.opengl.org])
383AX_CHECK_REQUIRED_HEADER_LIB([GL/glu.h], [GLU], [main],,, [http://www.opengl.org])
384AX_CHECK_REQUIRED_HEADER_LIB([GL/glew.h], [GLEW], [main],,, [http://glew.sourceforge.net])
[2701]385
[4697]386#--------#
387# openAL #
388#--------#
[6271]389AX_CHECK_REQUIRED_HEADER_LIB([AL/al.h], [openal], [main],,, [http://www.openal.org])
[6164]390
[5276]391#-----#
392# SDL #
393#-----#
[4664]394# checking for SDL
395  AC_MSG_CHECKING([for SDL-version])
396  SDL_VERSION=`sdl-config --version`
397  echo $SDL_VERSION
[8147]398   CPPFLAGS="${CPPFLAGS} `sdl-config --cflags`"
[2991]399
[6271]400  AX_CHECK_REQUIRED_HEADER_LIB([SDL.h SDL/SDL.h], [SDL], [main],,, [http://www.libsdl.org])
401
[4664]402    ;;
[3140]403
[4825]404#############
[3424]405#-----------#
406# MAC -OS X #
407#-----------#
[4825]408#############
[2995]409 *darwin*)
[3424]410 echo "OS X detected"
[2995]411 osX="yes"
412
[8293]413 QT_PREFIX="$prefix"
414 CPPFLAGS="-I/$prefix/include $CPPFLAGS -F$prefix/lib -I/opt/local"
415 LDFLAGS="$LDFLAGS -L$prefix/lib -F$prefix/lib -L/opt/local"
416 PCK_CONFIG_PATH='/opt/local'
417
[2995]418# checking gl header
[3424]419   AC_CHECK_HEADERS([OpenGL/gl.h] ,,
[2995]420      [AC_MSG_ERROR([cannot find opengl headers]) ])
[8293]421# checking for GLU-header
[3424]422    AC_CHECK_HEADERS([OpenGL/glu.h] ,,
[2995]423      [AC_MSG_ERROR([cannot find opengl headers]) ])
[9406]424        AC_CHECK_LIB( OpenGL, main, , )
[2995]425   LIBS="$LIBS -framework OpenGL"
426
[5279]427
428
429# checking for GLEW-headers
430   AC_CHECK_HEADERS([GL/glew.h] ,,
431      [AC_MSG_ERROR([cannot find glew headers]) ])
432# checking for GLEW-lib
433  AC_CHECK_LIB([GLEW], [main], [FOUND_GLEW=yes; LIBS="$LIBS -lGLEW"])
434   if test x$FOUND_GLEW != xyes ; then
435         echo "------------------"
436         echo "glew not found."
437         echo "please install the glew package which can be found at http://glew.sourceforge.net"
438         echo "------------------"
439         exit -1
440   fi
441
[8293]442 LIBS="$LIBS"
[5278]443   AC_CHECK_HEADERS([OpenAL/al.h] ,,
444      [AC_MSG_ERROR([cannot find opengl headers]) ])
445  HAVE_OPENAL=yes
446  LIBS="$LIBS -framework OpenAL"
[4662]447
[5278]448
[4662]449## SDL-check
[5295]450       SDL_CFLAGS=`sdl-config --cflags`
451       SDL_LIBS=`sdl-config --libs`
[8293]452       CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
[5295]453       LIBS="$LIBS $SDL_LIBS"
[5278]454   AC_CHECK_HEADERS([SDL/SDL.h] ,,
455      [AC_MSG_ERROR([cannot find SDL headers]) ])
456   HAVE_SDL=yes
[5295]457#   LIBS="$LIBS -framework SDL"
[3424]458
[2995]459# checking for SDL-headers
[3001]460#    AC_CHECK_HEADERS(SDL/SDL.h ,,
461#      [AC_MSG_ERROR([cannot find SDL headers]) ])
[2995]462
463## checking for SDL
464#    SDL_VERSION=1.2.7
465#    AM_PATH_SDL($SDL_VERSION,
466#      :,
467#      AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
468#      )
469
[3140]470
[2995]471    ;;
472
[2701]473  *)
474    ;;
475esac
[2968]476
[2701]477AC_SUBST(MSBITFIELDS)
478
[3424]479###################################
480## CHECKING FOR HEADERS AND LIBS ##
481###################################
482
[4665]483#---------#
484# SDL_ttf #
485#---------#
[6271]486AX_CHECK_REQUIRED_HEADER_LIB([SDL_ttf.h SDL/SDL_ttf.h], [SDL_ttf], [TTF_OpenFont],,, [http://www.libsdl.org/projects/SDL_ttf])
[4665]487#-----------#
488# SDL_Image #
489#-----------#
[6271]490AX_CHECK_REQUIRED_HEADER_LIB([SDL_image.h SDL/SDL_image.h], [SDL_image], [main],,, [http://www.libsdl.org/projects/SDL_image])
[5822]491#---------#
492# SDL_Net #
493#---------#
[6271]494AX_CHECK_REQUIRED_HEADER_LIB([SDL_net.h SDL/SDL_net.h], [SDL_net], [main],,, [http://www.libsdl.org/projects/SDL_net])
[5822]495
[4504]496#--------#
[6627]497# FFmpeg #
[6532]498#--------#
499# checking for FFmpeg-headers
[8061]500  AX_CHECK_REQUIRED_HEADER_LIB([avformat.h ffmpeg/avformat.h] ,[avformat], [main],
501   [AX_CHECK_REQUIRED_HEADER_LIB([avcodec.h ffmpeg/avcodec.h], [avcodec], [main],,, [http://ffmpeg.sourceforge.net]) LIBS="${LIBS} -lavformat -lavcodec"],
[8145]502     [AX_GET_INSTALL_NECESSARY_LIB([http://svn.orxonox.net/webdev/develop/ext_libs], [ffmpeg.tar.gz], [ffmpeg], [extern_libs/], [include/*.h lib/*.a])
[8061]503       LIBS="-llualib -llua"  CPPFLAGS="${CPPFLAGS} -I$(top_build_dir)/extern_libs" ],
504  [http://ffmpeg.sourceforge.net])
505
506
[8145]507
508
[6532]509  AC_CHECK_LIB([avutil], [main], [FOUND_avutil=yes; LIBS="$LIBS -lavutil"])
[6877]510  AC_CHECK_LIB([xvid], [main], [FOUND_xvid=yes; LIBS="$LIBS -lxvid"])
[6609]511  AC_CHECK_LIB([gcj], [main], [FOUND_gcj=yes; LIBS="$LIBS -lgcj"])
[6532]512  AC_CHECK_LIB([theora], [main], [FOUND_theora=yes; LIBS="$LIBS -ltheora"])
513  AC_CHECK_LIB([dts], [main], [FOUND_dts=yes; LIBS="$LIBS -ldts"])
514  AC_CHECK_LIB([gsm], [main], [FOUND_gsm=yes; LIBS="$LIBS -lgsm"])
515  AC_CHECK_LIB([dc1394_control], [main], [FOUND_dc1394_control=yes; LIBS="$LIBS -ldc1394_control"])
516  AC_CHECK_LIB([vorbisenc], [main], [FOUND_vorbisenc=yes; LIBS="$LIBS -lvorbisenc"])
517
[6877]518
519#--------#
520# vorbis #
521#--------#
522AX_CHECK_REQUIRED_HEADER_LIB([vorbis/vorbisfile.h], [vorbisfile], [main],,, [http://www.xiph.org/ogg/vorbis/index.html])
523AX_CHECK_REQUIRED_HEADER_LIB([vorbis/codec.h], [vorbis], [main],,, [http://www.xiph.org/ogg/vorbis/index.html])
524
525#-----#
526# ogg #
527#-----#
528AX_CHECK_REQUIRED_HEADER_LIB([ogg/ogg.h], [ogg], [main],,, [http://www.xiph.org/ogg/vorbis/index.html])
529
530
[7661]531#----#
532# QT #
533#----#
[8293]534if test x$osX = xyes ; then
[9406]535#       PKG_CONFIG_PATH="$prefix"
536#       PKG_CHECK_MODULES( QT, QtOpenGL >= 4.01 QtCore >= 4.01 QtGui >= 4.0.1 )
537#       QT_INCLUDE_DIR=`$PKG_CONFIG --variable=includedir QtOpenGL QtCore QtGui`
[8293]538#----------#
[9406]539            AC_PATH_PROG([QT_MOC], [moc], [no], ["${QT_BIN_DIRECTORY}:${PATH}"])
540              if test x${QT_MOC} = xno ; then
541                AC_MSG_ERROR([QT MOC not found])
542              fi
543        AC_SUBST([QT_MOC])
[8293]544
[9406]545        AC_PATH_PROG([QT_UIC], [uic], [no], ["${QT_BIN_DIRECTORY}:${PATH}"])
546        AC_SUBST([QT_UIC])
[8293]547
[9406]548        AC_PATH_PROG([QT_RCC], [rcc], [no], ["${QT_BIN_DIRECTORY}:${PATH}"])
[8293]549
[9406]550        AC_SUBST([QT_RCC])
551        AC_SUBST( QT_INCLUDE_DIR )
552        AC_SUBST( QT_CFLAGS )
553        AC_SUBST( QT_LDFLAGS )
554        AC_SUBST( QT_LIBS )
555        echo "QT_LIBS                   = $QT_LIBS"
556        echo "QT_CFLAGS                 = $QT_CFLAGS"
557        echo "QT_INCLUDE_DIR    = $QT_INCLUDE_DIR"
[8293]558else
[9406]559        AX_CHECK_QT([${QT_PREFIX}], [QtCore QtCore4],, [http://www.trolltech.com])
560        if test x$have_qt = xno ; then
561                WITH_QT=no
562        fi
[7661]563fi
[3423]564
[7661]565#---------#
566# libcURL #
567#---------#
568AX_CHECK_HEADER_LIB([curl/curl.h], [curl], [main], [
569 have_curl=yes
570  CURL_LIBS=`curl-config --libs`
571  CURLCFLAGS=`curl-config --cflags`
572  AC_DEFINE_UNQUOTED(HAVE_CURL, 1, [if we have CURL]) ]
573  ,, [http://curl.haxx.se/])
574
575AC_SUBST(CURL_LIBS)
576AC_SUBST(CURL_CFLAGS)
577AM_CONDITIONAL(HAVE_CURL, test "x$have_curl" = "xyes")
578
[9391]579
580 AX_CHECK_REQUIRED_HEADER_LIB([zlib.h], [z], [zlibVersion],,, [http://www.zlib.net])
581 AX_CHECK_REQUIRED_HEADER_LIB([math.h], [m], [sqrt])
582
583
[8061]584#-----#
585# LUA #
586#-----#
587LUA_DIR="/usr/include/lua"
588AX_CHECK_LUA([${LUA_DIR}])
589
[7661]590#--------#
591# efence #
592#--------#
593if test x$def_efence = xyes ; then
594  AC_CHECK_LIB([efence], [main], [FOUND_efence=yes; LIBS="$LIBS -lefence"])
595   if test x$FOUND_efence != xyes ; then
596     echo "efence was requested, but is not installed!! going on"
597   fi
598fi
599
[1945]600# Checks for header files.
601AC_HEADER_STDC
602AC_CHECK_HEADERS([stdlib.h string.h])
603
604# Checks for typedefs, structures, and compiler characteristics.
605AC_HEADER_STDBOOL
606
607# Checks for library functions.
608AC_FUNC_MALLOC
609AC_CHECK_FUNCS([bzero sqrt])
610
[3424]611######################
612## OUTPUT CONFIGURE ##
613######################
[1946]614AC_CONFIG_FILES([Makefile
[3377]615                 src/Makefile
[4555]616                 src/lib/Makefile
[7033]617                 src/lib/math/Makefile
[9668]618                 src/lib/lang/Makefile
[8367]619                 src/lib/util/Makefile
[4555]620                 src/lib/graphics/Makefile
621                 src/lib/graphics/importer/Makefile
[4789]622                 src/lib/graphics/spatial_separation/Makefile
[4555]623                 src/lib/sound/Makefile
624                 src/lib/event/Makefile
625                 src/lib/physics/Makefile
626                 src/lib/collision_detection/Makefile
[7819]627                 src/lib/collision_reaction/Makefile
[7151]628                 src/lib/network/Makefile
[5160]629                 src/lib/shell/Makefile
[4555]630                 src/lib/gui/Makefile
[8145]631                 src/lib/gui/gl/Makefile
632                 src/lib/gui/qt/Makefile
[8061]633                 src/lib/script_engine/Makefile
[5944]634                 src/lib/parser/Makefile
635                 src/lib/parser/tinyxml/Makefile
636                 src/lib/parser/ini_parser/Makefile
[7256]637                 src/lib/parser/cmdline_parser/Makefile
[7661]638                 src/lib/parser/preferences/Makefile
[5350]639                 src/util/Makefile
[7151]640                 src/world_entities/Makefile
[4662]641                 src/subprojects/Makefile
[4555]642                 src/subprojects/testmain/Makefile
643                 src/subprojects/importer/Makefile
644                 src/subprojects/particles/Makefile
645                 src/subprojects/collision_detection/Makefile
[5822]646                 src/subprojects/network/Makefile
[9406]647                 src/subprojects/recapture_mouse/Makefile
[4555]648                 ])
[3377]649
[1945]650AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.