Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 7479 was 7442, checked in by bensch, 19 years ago

qt_gui: merged old qt_gui-changes back here.

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