Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/qt_gui/configure.ac @ 7501

Last change on this file since 7501 was 7501, checked in by bensch, 20 years ago

config-work

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