Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 7367 was 7145, checked in by bensch, 19 years ago

sync

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