Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3424 in orxonox.OLD


Ignore:
Timestamp:
Feb 27, 2005, 7:51:36 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: nice-up patch:
configure.ac is now really nice.

  1. Intro
  2. initialization
  3. statement-checking
  4. System check
  5. header/lib-check
  6. output

also redisigned the look of different things so it is more standardized.

Location:
orxonox/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/configure

    r3423 r3424  
    867867  --enable-debug          compiles in debug mode. Lots of debug info about the
    868868                          game.
    869   --enable-sub-projects   also builds the subProjects by default
     869  --enable-sub-projects   also builds the subProjects while make from srcdir
    870870
    871871Optional Packages:
     
    13391339
    13401340
    1341 # Detect the canonical host and target build environment.
     1341## Detect the canonical host and target build environment.
    13421342ac_aux_dir=
    13431343for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
     
    14471447    NONENONEs,x,x, &&
    14481448  program_prefix=${target_alias}-
    1449 
    14501449
    14511450am__api_version="1.8"
     
    18541853
    18551854
    1856 
    1857 # Checks for programs.
     1855#########################
     1856## Checks for programs ##
     1857#########################
    18581858ac_ext=cc
    18591859ac_cpp='$CXXCPP $CPPFLAGS'
     
    38423842
    38433843
    3844 ### CHECKING  OPTIONAT ARGUMENTS
    3845 ## DEBUG-statement
     3844##################################
     3845## CHECKING  OPTIONAL ARGUMENTS ##
     3846##################################
     3847
     3848#-----------------#
     3849# DEBUG-statement #
     3850#-----------------#
    38463851DEBUG=no
    38473852echo "$as_me:$LINENO: checking if DEBUG-mode should be enabled" >&5
     
    38533858fi;
    38543859
    3855 if test "$DEBUG" = "no"; then
     3860if test x$DEBUG = xno; then
    38563861        echo "no"
    3857         echo " -> Setting debuglevel to 1. Like this you can still see errors."
    3858         DEBUG=1
    3859 elif test "$DEBUG" = yes; then
     3862        echo " -> Setting debuglevel to 3. (orxonox is still in Development. It really is needed."
     3863        DEBUG=3
     3864elif test x$DEBUG = xyes; then
    38603865        echo "yes"
    3861         echo " -> Setting debuglevel to 3. HARD DEBUG MODE!!."
    3862         DEBUG=3
    3863 else
    3864         echo "yes set to $DEBUG"
     3866        echo " -> Setting debuglevel to 4. HARD DEBUG MODE!!."
     3867        DEBUG=4
     3868else
     3869        echo "yes: setting debuglevel to to $DEBUG"
    38653870fi
    38663871
     
    38723877
    38733878
    3874 ## GTK-disabled
     3879#--------------#
     3880# GTK-disabled #
     3881#--------------#
    38753882echo "$as_me:$LINENO: checking if gtk should be enabled" >&5
    38763883echo $ECHO_N "checking if gtk should be enabled... $ECHO_C" >&6
     
    38833890  def_gtk=yes
    38843891fi;
    3885 if test "$def_gtk" = yes; then
     3892if test x$def_gtk = xyes; then
    38863893  echo "yes"
    38873894fi
    3888 if test "$def_gtk" = no; then
     3895if test x$def_gtk = xno; then
    38893896  echo "no"
    38903897fi
    38913898
    3892 ## gThread-disabled
     3899#------------------#
     3900# gThread-disabled #
     3901#------------------#
    38933902echo "$as_me:$LINENO: checking if gThread should be enabled" >&5
    38943903echo $ECHO_N "checking if gThread should be enabled... $ECHO_C" >&6
     
    39013910  def_gthread=yes
    39023911fi;
    3903 if test "$def_gthread" = yes; then
     3912if test x$def_gthread = xyes; then
    39043913  echo "yes"
    39053914fi
    3906 if test "$def_gthread" = no; then
     3915if test x$def_gthread = xno; then
    39073916  echo "no"
    39083917fi
    39093918
    3910 ## pthread-disabled
     3919#------------------#
     3920# pthread-disabled #
     3921#------------------#
    39113922echo "$as_me:$LINENO: checking if pthread should be enabled" >&5
    39123923echo $ECHO_N "checking if pthread should be enabled... $ECHO_C" >&6
     
    39193930  def_pthread=yes
    39203931fi;
    3921 if test "$def_pthread" = yes; then
     3932if test x$def_pthread = xyes; then
    39223933  echo "yes"
    39233934fi
    3924 if test "$def_pthread" = no; then
     3935if test x$def_pthread = xno; then
    39253936  echo "no"
    39263937fi
    39273938
    3928 ## libCurl disabled?
     3939#------------------#
     3940# libCurl-disabled #
     3941#------------------#
    39293942echo "$as_me:$LINENO: checking if libcURL should be enabled" >&5
    39303943echo $ECHO_N "checking if libcURL should be enabled... $ECHO_C" >&6
     
    39373950  def_curl=yes
    39383951fi;
    3939 if test "$def_curl" = yes; then
     3952if test x$def_curl = xyes; then
    39403953  echo "yes"
    39413954fi
    3942 if test "$def_curl" = no; then
     3955if test x$def_curl = xno; then
    39433956  echo "no"
    39443957fi
    39453958
    3946 ### SDL_image-disable
     3959#-------------------#
     3960# SDL_image-disable #
     3961#-------------------#
    39473962def_sdl_image=yes
    39483963echo "$as_me:$LINENO: checking if SDL_image should be enabled" >&5
     
    39543969  def_sdl_image=no
    39553970fi;
    3956 if test "$def_sdl_image" = yes; then
     3971if test x$def_sdl_image = xyes; then
    39573972  echo "yes"
    39583973fi
    3959 if test "$def_sdl_image" = no; then
     3974if test x$def_sdl_image = xno; then
    39603975  echo "no"
    39613976fi
    3962 
    3963 
    3964 ### SubProject-enable
    3965 def_sdl_image=yes
     3977#-------------------#
     3978# SubProject-enable #
     3979#-------------------#
     3980def_sub_projects=no
    39663981echo "$as_me:$LINENO: checking if the SubProjects should be built" >&5
    39673982echo $ECHO_N "checking if the SubProjects should be built... $ECHO_C" >&6
     
    39713986  def_sub_projects=yes
    39723987fi;
    3973 if test "$def_sub_projects" = yes; then
     3988if test x$def_sub_projects = xyes; then
    39743989  echo "yes"
    39753990fi
    3976 if test "$def_sub_projects" = no; then
     3991if test x$def_sub_projects = xno; then
    39773992  echo "no"
    39783993fi
     
    39884003
    39894004
    3990 ## PROGRAMM CHECKING
    3991 # checking for Doxygen
     4005#######################
     4006## PROGRAMM CHECKING ##
     4007## 3. party Programs ##
     4008#######################
     4009
     4010#----------------------#
     4011# checking for Doxygen #
     4012#----------------------#
    39924013# Extract the first word of "doxygen", so it can be a program name with args.
    39934014set dummy doxygen; ac_word=$2
     
    40404061
    40414062
    4042 ### CHECKING FOR SYSTEM ###
     4063#########################
     4064## CHECKING FOR SYSTEM ##
     4065#########################
     4066## here the system is checked, and openGL is included
     4067## also checking for SDL on differen Systems
    40434068
    40444069echo "$as_me:$LINENO: checking for System" >&5
     
    40464071## checking for openGL-environment and other sys-specific parameters
    40474072case "$target" in
    4048 ### WINDOWS ###
     4073#---------#
     4074# WINDOWS #
     4075#---------#
    40494076  *-*-mingw32*)
    40504077echo "mingw-WINDOWS detected"
     
    43494376fi
    43504377
    4351     if test "$FOUND_opengl32" = "yes" ; then
     4378    if test x$FOUND_opengl32 = xyes ; then
    43524379        LIBS="$LIBS -lopengl32"
    43534380    else
     
    45784605fi
    45794606
    4580     if test "$FOUND_glu32" = "yes" ; then
     4607    if test x$FOUND_glu32 = xyes ; then
    45814608        LIBS="$LIBS -lGLU32"
    45824609    else
     
    46514678fi
    46524679
    4653     if test $FOUND_mingw32 = "yes"; then
     4680    if test x$FOUND_mingw32 = xyes; then
    46544681        LIBS="$LIBS -lmingw32"
    46554682    fi
     
    48734900fi
    48744901
    4875     if test "$FOUND_sdlmain" = "yes" ; then
     4902    if test x$FOUND_sdlmain = xyes ; then
    48764903       LIBS="$LIBS -lsdlmain"
    48774904    else
     
    49444971fi
    49454972
    4946     if test "$FOUND_sdl" = "yes" ; then
     4973    if test x$FOUND_sdl = xyes ; then
    49474974       LIBS="$LIBS -lsdl"
    49484975    else
     
    49554982
    49564983    ;;
    4957 
    4958 ### LINUX ###
     4984#-------#
     4985# LINUX #
     4986#-------#
    49594987 *-*-linux*)
    49604988echo "Linux detected"
     
    51895217fi
    51905218
    5191    if test "$FOUND_GL" = "yes" ; then
     5219   if test x$FOUND_GL = xyes ; then
    51925220     LIBS="$LIBS -lGL"
    51935221   else
     
    54235451fi
    54245452
    5425     if test "$FOUND_GLU" = "yes" ; then
     5453    if test x$FOUND_GLU = xyes ; then
    54265454      LIBS="$LIBS -lGLU"
    54275455    else
     
    56525680fi
    56535681
    5654      if test "$FOUND_SDL" = "yes" ; then
     5682     if test x$FOUND_SDL = xyes ; then
    56555683       LIBS="$LIBS -lSDL"
    56565684     else
     
    56725700#    LIBS="$LIBS $SDL_LIBS"
    56735701    ;;
    5674 
    5675 ### OS X ###
     5702#-----------#
     5703# MAC -OS X #
     5704#-----------#
    56765705 *darwin*)
    5677 echo "OS X detected"
     5706 echo "OS X detected"
    56785707
    56795708 osX="yes"
     
    59936022   LIBS="$LIBS -framework OpenGL"
    59946023
     6024       SDL_CFLAGS=`sdl-config --cflags`
     6025       SDL_LIBS=`sdl-config --libs`
     6026       CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
     6027       LIBS="$LIBS $SDL_LIBS"
     6028
     6029
    59956030# checking for SDL-headers
    59966031#    AC_CHECK_HEADERS(SDL/SDL.h ,,
     
    60046039#      )
    60056040
    6006        SDL_CFLAGS=`sdl-config --cflags`
    6007        SDL_LIBS=`sdl-config --libs`
    6008        CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
    6009        LIBS="$LIBS $SDL_LIBS"
    60106041
    60116042    ;;
     
    60176048
    60186049
    6019 ## check for SDL_Image
    6020 if test "$def_sdl_image" = "yes"; then
     6050###################################
     6051## CHECKING FOR HEADERS AND LIBS ##
     6052###################################
     6053
     6054#-----------#
     6055# SDL_Image #
     6056#-----------#
     6057if test x$def_sdl_image = xyes; then
    60216058# checking for SDL_image-headers
    60226059
     
    61736210
    61746211fi
    6175 if test "$def_sdl_image" = "yes"; then
     6212if test x$def_sdl_image = xyes; then
    61766213# checking for SDL_image-lib
    61776214  echo "$as_me:$LINENO: checking for main in -lSDL_image" >&5
     
    62376274fi
    62386275
    6239      if test "$FOUND_SDL_image" = "yes" ; then
     6276     if test x$FOUND_SDL_image = xyes ; then
    62406277       LIBS="$LIBS -lSDL_image"
    62416278     else
     
    62486285fi
    62496286
    6250 
    6251 if test "$def_sdl_image" = "no"; then
    6252  ## checking for libjpeg
     6287## case no SDL-image:
     6288if test x$def_sdl_image = xno; then
     6289#---------#
     6290# libjpeg #
     6291#---------#
    62536292
    62546293for ac_header in jpeglib.h
     
    64036442done
    64046443
    6405  if test $jpegHeader = "no"; then
     6444 if test xjpegHeader = xno; then
    64066445        echo " not including jpeg."
    64076446 else
     
    64686507fi
    64696508
    6470     if test "$FOUND_jpeg" = "yes" ; then
     6509    if test x$FOUND_jpeg = xyes ; then
    64716510      LIBS="$LIBS -ljpeg"
    64726511    else
     
    64796518 fi
    64806519
    6481  ## checking for libpng
     6520#--------#
     6521# libpng #
     6522#--------#
    64826523
    64836524for ac_header in png.h
     
    66326673done
    66336674
    6634  if test $pngHeader = "no"; then
     6675 if test x$pngHeader = xno; then
    66356676        echo " not including png."
    66366677 else
     
    66976738fi
    66986739
    6699     if test "$FOUND_png" = "yes" ; then
     6740    if test x$FOUND_png = xyes ; then
    67006741      LIBS="$LIBS -lpng"
    67016742    else
     
    67096750fi
    67106751
    6711 ## checking for GTK
    6712 if test "$def_gtk" = yes; then
     6752#-----#
     6753# GTK #
     6754#-----#
     6755if test x$def_gtk = xyes; then
    67136756
    67146757        #PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3, have_gtk2=yes, have_gtk2=no)
     
    67436786
    67446787
    6745 ## checking for gThread
    6746 if test "$def_gthread" = yes; then
     6788#---------#
     6789# gThread #
     6790#---------#
     6791if test x$def_gthread = xyes; then
    67476792
    67486793        echo "$as_me:$LINENO: checking for gthread" >&5
     
    67766821
    67776822
    6778 ## checking for libcURL
    6779 if test "$def_curl" = yes; then
     6823#---------#
     6824# libcURL #
     6825#---------#
     6826if test x$def_curl = xyes; then
    67806827
    67816828
     
    70207067
    70217068
    7022 
    7023 ##checking for pthread
     7069#---------#
     7070# pthread #
     7071#---------#
    70247072if test x$def_pthread = xyes ; then
    70257073 if test x$have_gthread = xyes ; then
     
    72387286fi
    72397287
    7240    if test "$FOUND_pthread" = "yes" ; then
     7288   if test x$FOUND_pthread = xyes ; then
    72417289      LIBS="$LIBS -lpthread"
    72427290   fi
    72437291 fi
    72447292fi
     7293
     7294
    72457295# FIXME: Replace `main' with a function in `-lm':
    72467296
     
    81298179
    81308180
     8181######################
     8182## OUTPUT CONFIGURE ##
     8183######################
    81318184                                                  ac_config_files="$ac_config_files Makefile src/Makefile src/importer/Makefile src/console/Makefile src/gui/Makefile"
    81328185
  • orxonox/trunk/configure.ac

    r3423 r3424  
    1 #                                               -*- Autoconf -*-
    2 # Process this file with autoconf to produce a configure script.
    3 
     1##########################################################################
     2#   orxonox - the future of 3D-vertical-scrollers                        #
     3#                                                                        #
     4#   Copyright (C) 2004 orx                                               #
     5#                                                                        #
     6#   This program is free software; you can redistribute it and/or modify #
     7#   it under the terms of the GNU General Public License as published by #
     8#   the Free Software Foundation; either version 2, or (at your option)  #
     9#   any later version.                                                   #
     10#                                                                        #
     11#   ### File Specific:                                                   #
     12#   main-programmer: Benjamin Grauer                                     #
     13#   co-programmer: ...                                                   #
     14#                                                                        #
     15#   This is the main configuration File of autoconf.                     #
     16#   Please edit this file only, if you exactly know what you are doing.  #
     17#   It is quite fragile, and compiling orxonox on different Platforms    #
     18#   is only guarantied, if build with the right config.                  #
     19##########################################################################
     20
     21#########################
     22## AUTOCONF INIT PHASE ##
     23#########################
    424AC_PREREQ(2.56)
    525AC_INIT(orxonox, 0.2.1-pre-alpha, [orxonox-dev at mail.datacore.ch])
    626
    7 # Detect the canonical host and target build environment.
     27## Detect the canonical host and target build environment.
    828AC_CANONICAL_BUILD
    929AC_CANONICAL_HOST
    1030AC_CANONICAL_TARGET
    1131
    12 
    1332AM_INIT_AUTOMAKE
    1433
     
    1635AC_CONFIG_HEADER([config.h])
    1736
    18 
    19 # Checks for programs.
     37#########################
     38## Checks for programs ##
     39#########################
    2040AC_PROG_CXX
    2141AC_HEADER_STDC
    2242
    23 ### CHECKING  OPTIONAT ARGUMENTS
    24 ## DEBUG-statement
     43##################################
     44## CHECKING  OPTIONAL ARGUMENTS ##
     45##################################
     46
     47#-----------------#
     48# DEBUG-statement #
     49#-----------------#
    2550DEBUG=no
    2651AC_MSG_CHECKING([if DEBUG-mode should be enabled])
     
    2954         DEBUG=$enableval)
    3055
    31 if test "$DEBUG" = "no"; then
     56if test x$DEBUG = xno; then
    3257        echo "no"
    33         echo " -> Setting debuglevel to 1. Like this you can still see errors."
    34         DEBUG=1
    35 elif test "$DEBUG" = yes; then
     58        echo " -> Setting debuglevel to 3. (orxonox is still in Development. It really is needed."
     59        DEBUG=3
     60elif test x$DEBUG = xyes; then
    3661        echo "yes"
    37         echo " -> Setting debuglevel to 3. HARD DEBUG MODE!!."
    38         DEBUG=3
     62        echo " -> Setting debuglevel to 4. HARD DEBUG MODE!!."
     63        DEBUG=4
    3964else       
    40         echo "yes set to $DEBUG"
     65        echo "yes: setting debuglevel to to $DEBUG"
    4166fi
    4267        AC_DEFINE_UNQUOTED(DEBUG, $DEBUG, [in which debug mode we are])
     
    4469AC_SUBST(DEBUG)
    4570
    46 ## GTK-disabled
     71#--------------#
     72# GTK-disabled #
     73#--------------#
    4774AC_MSG_CHECKING([if gtk should be enabled])
    4875AC_ARG_WITH([gtk],
    4976        AC_HELP_STRING( [--without-gtk],
    5077        [Prevents GTK from being loaded]), [def_gtk=no], [def_gtk=yes])
    51 if test "$def_gtk" = yes; then
     78if test x$def_gtk = xyes; then
    5279  echo "yes"
    5380fi
    54 if test "$def_gtk" = no; then
     81if test x$def_gtk = xno; then
    5582  echo "no"
    5683fi
    5784
    58 ## gThread-disabled
     85#------------------#
     86# gThread-disabled #
     87#------------------#
    5988AC_MSG_CHECKING([if gThread should be enabled])
    6089AC_ARG_WITH([gthread],
    61         AC_HELP_STRING( [--without-gthread], 
     90        AC_HELP_STRING( [--without-gthread],
    6291        [Prevents gThread from being loaded]), [def_gthread=no], [def_gthread=yes])
    63 if test "$def_gthread" = yes; then
     92if test x$def_gthread = xyes; then
    6493  echo "yes"
    6594fi
    66 if test "$def_gthread" = no; then
     95if test x$def_gthread = xno; then
    6796  echo "no"
    6897fi
    6998
    70 ## pthread-disabled
     99#------------------#
     100# pthread-disabled #
     101#------------------#
    71102AC_MSG_CHECKING([if pthread should be enabled])
    72103AC_ARG_WITH([pthread],
    73104        AC_HELP_STRING( [--without-pthread],
    74105        [Prevents pthread from being loaded]), [def_pthread=no], [def_pthread=yes])
    75 if test "$def_pthread" = yes; then
     106if test x$def_pthread = xyes; then
    76107  echo "yes"
    77108fi
    78 if test "$def_pthread" = no; then
     109if test x$def_pthread = xno; then
    79110  echo "no"
    80111fi
    81112
    82 ## libCurl disabled?
     113#------------------#
     114# libCurl-disabled #
     115#------------------#
    83116AC_MSG_CHECKING([if libcURL should be enabled])
    84117AC_ARG_WITH([curl],
    85118        AC_HELP_STRING( [--without-curl],
    86119        [Prevents libcURL from being loaded]), [def_curl=no], [def_curl=yes])
    87 if test "$def_curl" = yes; then
     120if test x$def_curl = xyes; then
    88121  echo "yes"
    89122fi
    90 if test "$def_curl" = no; then
     123if test x$def_curl = xno; then
    91124  echo "no"
    92125fi
    93126
    94 ### SDL_image-disable
     127#-------------------#
     128# SDL_image-disable #
     129#-------------------#
    95130def_sdl_image=yes
    96131AC_MSG_CHECKING([if SDL_image should be enabled])
     
    98133        AC_HELP_STRING( [--without-sdl-image],
    99134        [Prevents SDL_image from being loaded]), [def_sdl_image=no])
    100 if test "$def_sdl_image" = yes; then
     135if test x$def_sdl_image = xyes; then
    101136  echo "yes"
    102137fi
    103 if test "$def_sdl_image" = no; then
     138if test x$def_sdl_image = xno; then
    104139  echo "no"
    105140fi
    106 
    107 
    108 ### SubProject-enable
    109 def_sdl_image=yes
     141#-------------------#
     142# SubProject-enable #
     143#-------------------#
     144def_sub_projects=no
    110145AC_MSG_CHECKING([if the SubProjects should be built])
    111146AC_ARG_ENABLE([sub-projects],
    112147        AC_HELP_STRING( [--enable-sub-projects],
    113         [also builds the subProjects by default]), [def_sub_projects=yes])
    114 if test "$def_sub_projects" = yes; then
     148        [also builds the subProjects while make from srcdir]), [def_sub_projects=yes])
     149if test x$def_sub_projects = xyes; then
    115150  echo "yes"
    116151fi
    117 if test "$def_sub_projects" = no; then
     152if test x$def_sub_projects = xno; then
    118153  echo "no"
    119154fi
    120155AM_CONDITIONAL(SUB_PROJECTS, test x$def_sub_projects = xyes)
    121156
    122 ## PROGRAMM CHECKING
    123 # checking for Doxygen
     157#######################
     158## PROGRAMM CHECKING ##
     159## 3. party Programs ##
     160#######################
     161
     162#----------------------#
     163# checking for Doxygen #
     164#----------------------#
    124165AC_PATH_PROG(DOXYGEN, doxygen)
    125166AM_CONDITIONAL(DOXYGEN, test $DOXYGEN)
    126167
    127 ### CHECKING FOR SYSTEM ###
     168#########################
     169## CHECKING FOR SYSTEM ##
     170#########################
     171## here the system is checked, and openGL is included
     172## also checking for SDL on differen Systems
    128173
    129174AC_MSG_CHECKING([for System])
    130175## checking for openGL-environment and other sys-specific parameters
    131176case "$target" in
    132 ### WINDOWS ###
     177#---------#
     178# WINDOWS #
     179#---------#
    133180  *-*-mingw32*)
    134181echo "mingw-WINDOWS detected"
     
    146193#   checking for Windows openGl library
    147194    AC_CHECK_LIB([opengl32], [main], FOUND_opengl32=yes, "gl/gl.h")
    148     if test "$FOUND_opengl32" = "yes" ; then
     195    if test x$FOUND_opengl32 = xyes ; then
    149196        LIBS="$LIBS -lopengl32"
    150197    else
     
    157204
    158205# cheking for GLU-header
    159     AC_CHECK_HEADERS(GL/glu.h ,,
     206    AC_CHECK_HEADERS([GL/glu.h] ,,
    160207      [AC_MSG_ERROR([cannot find opengl headers]) ])
    161208
    162209# checking for libGLU
    163210    AC_CHECK_LIB([glu32], [main], FOUND_glu32=yes)
    164     if test "$FOUND_glu32" = "yes" ; then
     211    if test x$FOUND_glu32 = xyes ; then
    165212        LIBS="$LIBS -lGLU32"
    166213    else
     
    174221# checking for mingw32
    175222    AC_CHECK_LIB([mingw32], [main], FOUND_mingw32=yes)
    176     if test $FOUND_mingw32 = "yes"; then
     223    if test x$FOUND_mingw32 = xyes; then
    177224        LIBS="$LIBS -lmingw32"
    178225    fi
    179226# checking for SDL-headers
    180     AC_CHECK_HEADERS(SDL/SDL.h ,,
     227    AC_CHECK_HEADERS([SDL/SDL.h] ,,
    181228      [AC_MSG_ERROR([cannot find SDL headers]) ])
    182229
    183230#checking for libSDL
    184231    AC_CHECK_LIB([sdlmain], [main], FOUND_sdlmain=yes)
    185     if test "$FOUND_sdlmain" = "yes" ; then
     232    if test x$FOUND_sdlmain = xyes ; then
    186233       LIBS="$LIBS -lsdlmain"
    187234    else
     
    193240    fi
    194241    AC_CHECK_LIB([sdl], [main], FOUND_sdl=yes)
    195     if test "$FOUND_sdl" = "yes" ; then
     242    if test x$FOUND_sdl = xyes ; then
    196243       LIBS="$LIBS -lsdl"
    197244    else
     
    204251
    205252    ;;
    206 
    207 ### LINUX ###
     253#-------#
     254# LINUX #
     255#-------#
    208256 *-*-linux*)
    209257echo "Linux detected"
     
    214262LDFLAGS="-L/usr/lib/opengl/xorg-x11/lib -L/usr/Mesa-6.0.1/lib -L/usr/X11R6/lib $LDFLAGS"
    215263# checking gl header
    216    AC_CHECK_HEADERS(GL/gl.h ,,
     264   AC_CHECK_HEADERS([GL/gl.h] ,,
    217265      [AC_MSG_ERROR([cannot find opengl headers]) ])
    218266
    219267#  checking for Unix GL
    220268   AC_CHECK_LIB([GL], [glLoadIdentity], FOUND_GL=yes)
    221    if test "$FOUND_GL" = "yes" ; then
     269   if test x$FOUND_GL = xyes ; then
    222270     LIBS="$LIBS -lGL"
    223271   else
     
    230278
    231279# cheking for GLU-header
    232     AC_CHECK_HEADERS(GL/glu.h ,,
     280    AC_CHECK_HEADERS([GL/glu.h] ,,
    233281      [AC_MSG_ERROR([cannot find opengl headers]) ])
    234282
    235283    AC_CHECK_LIB([GLU], [gluProject], FOUND_GLU=yes)
    236     if test "$FOUND_GLU" = "yes" ; then
     284    if test x$FOUND_GLU = xyes ; then
    237285      LIBS="$LIBS -lGLU"
    238286    else
     
    245293
    246294# checking for SDL-headers
    247     AC_CHECK_HEADERS(SDL/SDL.h ,,
     295    AC_CHECK_HEADERS([SDL/SDL.h] ,,
    248296      [AC_MSG_ERROR([cannot find SDL headers]) ])
    249297
    250298# checking for SDL-lib
    251299    AC_CHECK_LIB([SDL], [main], FOUND_SDL=yes)
    252      if test "$FOUND_SDL" = "yes" ; then
     300     if test x$FOUND_SDL = xyes ; then
    253301       LIBS="$LIBS -lSDL"
    254302     else
     
    270318#    LIBS="$LIBS $SDL_LIBS"
    271319    ;;
    272 
    273 ### OS X ###
     320#-----------#
     321# MAC -OS X #
     322#-----------#
    274323 *darwin*)
    275 echo "OS X detected"
     324 echo "OS X detected"
    276325
    277326 osX="yes"
     
    279328 CPPFLAGS="-I/sw/include $CPPFLAGS"
    280329# checking gl header
    281    AC_CHECK_HEADERS(OpenGL/gl.h ,,
     330   AC_CHECK_HEADERS([OpenGL/gl.h] ,,
    282331      [AC_MSG_ERROR([cannot find opengl headers]) ])
    283332# cheking for GLU-header
    284     AC_CHECK_HEADERS(OpenGL/glu.h ,,
     333    AC_CHECK_HEADERS([OpenGL/glu.h] ,,
    285334      [AC_MSG_ERROR([cannot find opengl headers]) ])
    286335
    287336   LIBS="$LIBS -framework OpenGL"
     337
     338       SDL_CFLAGS=`sdl-config --cflags`
     339       SDL_LIBS=`sdl-config --libs`
     340       CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
     341       LIBS="$LIBS $SDL_LIBS"
     342
    288343
    289344# checking for SDL-headers
     
    298353#      )
    299354
    300        SDL_CFLAGS=`sdl-config --cflags`
    301        SDL_LIBS=`sdl-config --libs`
    302        CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
    303        LIBS="$LIBS $SDL_LIBS"
    304355
    305356    ;;
     
    311362AC_SUBST(MSBITFIELDS)
    312363
    313 ## check for SDL_Image
    314 if test "$def_sdl_image" = "yes"; then
     364###################################
     365## CHECKING FOR HEADERS AND LIBS ##
     366###################################
     367
     368#-----------#
     369# SDL_Image #
     370#-----------#
     371if test x$def_sdl_image = xyes; then
    315372# checking for SDL_image-headers
    316   AC_CHECK_HEADERS(SDL/SDL_image.h ,,
     373  AC_CHECK_HEADERS([SDL/SDL_image.h] ,,
    317374      [echo "sdl_image not found. falling back to other options"; def_sdl_image=no ])
    318375fi
    319 if test "$def_sdl_image" = "yes"; then
     376if test x$def_sdl_image = xyes; then
    320377# checking for SDL_image-lib
    321   AC_CHECK_LIB([SDL_image], [main], FOUND_SDL_image=yes)
    322      if test "$FOUND_SDL_image" = "yes" ; then
     378  AC_CHECK_LIB([SDL_image], [main], [FOUND_SDL_image=yes])
     379     if test x$FOUND_SDL_image = xyes ; then
    323380       LIBS="$LIBS -lSDL_image"
    324381     else
     
    331388fi
    332389
    333 
    334 if test "$def_sdl_image" = "no"; then
    335  ## checking for libjpeg
    336  AC_CHECK_HEADERS(jpeglib.h ,jpegHeader="yes",
    337         jpegHeader="no")
    338  if test $jpegHeader = "no"; then
     390## case no SDL-image:
     391if test x$def_sdl_image = xno; then
     392#---------#
     393# libjpeg #
     394#---------#
     395 AC_CHECK_HEADERS([jpeglib.h], [jpegHeader="yes"],
     396        [jpegHeader="no"])
     397 if test xjpegHeader = xno; then
    339398        echo " not including jpeg."
    340399 else
    341   AC_CHECK_LIB([jpeg], [main], FOUND_jpeg=yes)
    342     if test "$FOUND_jpeg" = "yes" ; then
     400  AC_CHECK_LIB([jpeg], [main], [FOUND_jpeg=yes])
     401    if test x$FOUND_jpeg = xyes ; then
    343402      LIBS="$LIBS -ljpeg"
    344403    else
     
    351410 fi
    352411
    353  ## checking for libpng
    354  AC_CHECK_HEADERS(png.h ,pngHeader="yes",
    355         pngHeader="no")
    356  if test $pngHeader = "no"; then
     412#--------#
     413# libpng #
     414#--------#
     415 AC_CHECK_HEADERS([png.h], [pngHeader="yes"],
     416        [pngHeader="no"])
     417 if test x$pngHeader = xno; then
    357418        echo " not including png."
    358419 else
    359420  AC_CHECK_LIB([png], [main], FOUND_png=yes)
    360     if test "$FOUND_png" = "yes" ; then
     421    if test x$FOUND_png = xyes ; then
    361422      LIBS="$LIBS -lpng"
    362423    else
     
    370431fi
    371432
    372 ## checking for GTK
    373 if test "$def_gtk" = yes; then
     433#-----#
     434# GTK #
     435#-----#
     436if test x$def_gtk = xyes; then
    374437
    375438        #PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3, have_gtk2=yes, have_gtk2=no)
     
    390453AM_CONDITIONAL(HAVE_GTK2, test x$have_gtk2 = xyes)
    391454
    392 ## checking for gThread
    393 if test "$def_gthread" = yes; then
     455#---------#
     456# gThread #
     457#---------#
     458if test x$def_gthread = xyes; then
    394459
    395460        AC_MSG_CHECKING([for gthread])
     
    409474AM_CONDITIONAL(HAVE_GTHREAD, test x$have_gthread = xyes)
    410475
    411 ## checking for libcURL
    412 if test "$def_curl" = yes; then
    413 
    414  AC_CHECK_HEADERS([curl/curl.h], curlHeader="yes", curlHeader="no")
     476#---------#
     477# libcURL #
     478#---------#
     479if test x$def_curl = xyes; then
     480
     481 AC_CHECK_HEADERS([curl/curl.h], [curlHeader="yes"], [curlHeader="no"])
    415482 AC_CHECK_LIB([curl], [main], [FOUND_curl=yes])
    416483 if test x$curlHeader = xyes & test x$FOUND_curl = xyes ; then
     
    419486  CURLCFLAGS=`curl-config --cflags`
    420487  AC_DEFINE_UNQUOTED(HAVE_CURL, 1, [if we have CURL])
    421  else 
     488 else
    422489  have_curl=no
    423490 fi
     
    428495AM_CONDITIONAL(HAVE_CURL, test x$have_curl = xyes)
    429496
    430 
    431 ##checking for pthread
     497#---------#
     498# pthread #
     499#---------#
    432500if test x$def_pthread = xyes ; then
    433501 if test x$have_gthread = xyes ; then
    434   AC_CHECK_HEADERS([pthread.h], pthreadHeader="yes", pthreadHeader="no")
    435   AC_CHECK_LIB([pthread], [main], FOUND_pthread=yes)
    436    if test "$FOUND_pthread" = "yes" ; then
     502  AC_CHECK_HEADERS([pthread.h], [pthreadHeader="yes"], [pthreadHeader="no"])
     503  AC_CHECK_LIB([pthread], [main], [FOUND_pthread=yes])
     504   if test x$FOUND_pthread = xyes ; then
    437505      LIBS="$LIBS -lpthread"
    438506   fi
    439507 fi
    440508fi
     509
     510
    441511# FIXME: Replace `main' with a function in `-lm':
    442512 AC_CHECK_LIB([m], [main])
     
    454524AC_CHECK_FUNCS([bzero sqrt])
    455525
     526######################
     527## OUTPUT CONFIGURE ##
     528######################
    456529AC_CONFIG_FILES([Makefile
    457530                 src/Makefile
  • orxonox/trunk/src/Makefile.in

    r3423 r3424  
    318318          esac; \
    319319        done; \
    320         echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/Makefile'; \
     320        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/Makefile'; \
    321321        cd $(top_srcdir) && \
    322           $(AUTOMAKE) --gnu  src/Makefile
     322          $(AUTOMAKE) --foreign  src/Makefile
    323323.PRECIOUS: Makefile
    324324Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/trunk/src/console/Makefile.in

    r3423 r3424  
    203203          esac; \
    204204        done; \
    205         echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/console/Makefile'; \
     205        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/console/Makefile'; \
    206206        cd $(top_srcdir) && \
    207           $(AUTOMAKE) --gnu  src/console/Makefile
     207          $(AUTOMAKE) --foreign  src/console/Makefile
    208208.PRECIOUS: Makefile
    209209Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/trunk/src/gui/Makefile.in

    r3423 r3424  
    234234          esac; \
    235235        done; \
    236         echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/gui/Makefile'; \
     236        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/gui/Makefile'; \
    237237        cd $(top_srcdir) && \
    238           $(AUTOMAKE) --gnu  src/gui/Makefile
     238          $(AUTOMAKE) --foreign  src/gui/Makefile
    239239.PRECIOUS: Makefile
    240240Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/trunk/src/importer/Makefile.in

    r3423 r3424  
    215215          esac; \
    216216        done; \
    217         echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/importer/Makefile'; \
     217        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/importer/Makefile'; \
    218218        cd $(top_srcdir) && \
    219           $(AUTOMAKE) --gnu  src/importer/Makefile
     219          $(AUTOMAKE) --foreign  src/importer/Makefile
    220220.PRECIOUS: Makefile
    221221Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Note: See TracChangeset for help on using the changeset viewer.