Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4664 in orxonox.OLD for orxonox/trunk


Ignore:
Timestamp:
Jun 23, 2005, 2:59:23 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: better check for SDL (on linux)

Location:
orxonox/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/config.h.in

    r4662 r4664  
    4646/* Define to 1 if you have the <OpenGL/gl.h> header file. */
    4747#undef HAVE_OPENGL_GL_H
     48
     49/* Define to 1 if you have the <SDL.h> header file. */
     50#undef HAVE_SDL_H
    4851
    4952/* Define to 1 if you have the <SDL_image.h> header file. */
  • orxonox/trunk/configure

    r4662 r4664  
    56645664    fi
    56655665
    5666 # checking for SDL-headers
     5666# checking for SDL
     5667  echo "$as_me:$LINENO: checking for SDL-version" >&5
     5668echo $ECHO_N "checking for SDL-version... $ECHO_C" >&6
     5669  SDL_VERSION=`sdl-config --version`
     5670  echo $SDL_VERSION
     5671
     5672   CPPFLAGS="`sdl-config --cflags` $CPPFLAGS"
    56675673
    56685674for ac_header in SDL/SDL.h
     
    58125818
    58135819else
    5814   { { echo "$as_me:$LINENO: error: cannot find SDL headers" >&5
    5815 echo "$as_me: error: cannot find SDL headers" >&2;}
    5816    { (exit 1); exit 1; }; }
    5817 fi
    5818 
    5819 done
    5820 
    5821 
    5822 # checking for SDL-lib
    5823     echo "$as_me:$LINENO: checking for main in -lSDL" >&5
    5824 echo $ECHO_N "checking for main in -lSDL... $ECHO_C" >&6
    5825 if test "${ac_cv_lib_SDL_main+set}" = set; then
     5820
     5821for ac_header in SDL.h
     5822do
     5823as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     5824if eval "test \"\${$as_ac_Header+set}\" = set"; then
     5825  echo "$as_me:$LINENO: checking for $ac_header" >&5
     5826echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     5827if eval "test \"\${$as_ac_Header+set}\" = set"; then
    58265828  echo $ECHO_N "(cached) $ECHO_C" >&6
    5827 else
    5828   ac_check_lib_save_LIBS=$LIBS
    5829 LIBS="-lSDL  $LIBS"
     5829fi
     5830echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     5831echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     5832else
     5833  # Is the header compilable?
     5834echo "$as_me:$LINENO: checking $ac_header usability" >&5
     5835echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
    58305836cat >conftest.$ac_ext <<_ACEOF
    58315837/* confdefs.h.  */
     
    58345840cat >>conftest.$ac_ext <<_ACEOF
    58355841/* end confdefs.h.  */
    5836 
    5837 
    5838 int
    5839 main ()
    5840 {
    5841 main ();
    5842   ;
    5843   return 0;
    5844 }
    5845 _ACEOF
    5846 rm -f conftest.$ac_objext conftest$ac_exeext
    5847 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
    5848   (eval $ac_link) 2>conftest.er1
     5842$ac_includes_default
     5843#include <$ac_header>
     5844_ACEOF
     5845rm -f conftest.$ac_objext
     5846if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     5847  (eval $ac_compile) 2>conftest.er1
    58495848  ac_status=$?
    58505849  grep -v '^ *+' conftest.er1 >conftest.err
     
    58605859  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    58615860  (exit $ac_status); }; } &&
    5862          { ac_try='test -s conftest$ac_exeext'
     5861         { ac_try='test -s conftest.$ac_objext'
    58635862  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    58645863  (eval $ac_try) 2>&5
     
    58665865  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    58675866  (exit $ac_status); }; }; then
    5868   ac_cv_lib_SDL_main=yes
     5867  ac_header_compiler=yes
    58695868else
    58705869  echo "$as_me: failed program was:" >&5
    58715870sed 's/^/| /' conftest.$ac_ext >&5
    58725871
    5873 ac_cv_lib_SDL_main=no
    5874 fi
    5875 rm -f conftest.err conftest.$ac_objext \
    5876       conftest$ac_exeext conftest.$ac_ext
    5877 LIBS=$ac_check_lib_save_LIBS
    5878 fi
    5879 echo "$as_me:$LINENO: result: $ac_cv_lib_SDL_main" >&5
    5880 echo "${ECHO_T}$ac_cv_lib_SDL_main" >&6
    5881 if test $ac_cv_lib_SDL_main = yes; then
    5882   FOUND_SDL=yes
    5883 fi
    5884 
    5885      if test x$FOUND_SDL = xyes ; then
    5886        LIBS="$LIBS -lSDL"
    5887      else
    5888         echo "------------------"
    5889         echo "SDL library not found."
    5890         echo "please install the SDL library, which can be found at http://www.libsdl.org"
    5891         echo "------------------"
    5892         exit -1
    5893      fi
    5894 
    5895 
    5896 ## checking for SDL
    5897 #    SDL_VERSION=1.2.7
    5898 #    AM_PATH_SDL($SDL_VERSION,
    5899 #      :,
    5900 #      AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
    5901 #      )
    5902 #    CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
    5903 #    LIBS="$LIBS $SDL_LIBS"
     5872ac_header_compiler=no
     5873fi
     5874rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     5875echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     5876echo "${ECHO_T}$ac_header_compiler" >&6
     5877
     5878# Is the header present?
     5879echo "$as_me:$LINENO: checking $ac_header presence" >&5
     5880echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
     5881cat >conftest.$ac_ext <<_ACEOF
     5882/* confdefs.h.  */
     5883_ACEOF
     5884cat confdefs.h >>conftest.$ac_ext
     5885cat >>conftest.$ac_ext <<_ACEOF
     5886/* end confdefs.h.  */
     5887#include <$ac_header>
     5888_ACEOF
     5889if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
     5890  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     5891  ac_status=$?
     5892  grep -v '^ *+' conftest.er1 >conftest.err
     5893  rm -f conftest.er1
     5894  cat conftest.err >&5
     5895  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5896  (exit $ac_status); } >/dev/null; then
     5897  if test -s conftest.err; then
     5898    ac_cpp_err=$ac_c_preproc_warn_flag
     5899    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
     5900  else
     5901    ac_cpp_err=
     5902  fi
     5903else
     5904  ac_cpp_err=yes
     5905fi
     5906if test -z "$ac_cpp_err"; then
     5907  ac_header_preproc=yes
     5908else
     5909  echo "$as_me: failed program was:" >&5
     5910sed 's/^/| /' conftest.$ac_ext >&5
     5911
     5912  ac_header_preproc=no
     5913fi
     5914rm -f conftest.err conftest.$ac_ext
     5915echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     5916echo "${ECHO_T}$ac_header_preproc" >&6
     5917
     5918# So?  What about this header?
     5919case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
     5920  yes:no: )
     5921    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
     5922echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
     5923    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
     5924echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
     5925    ac_header_preproc=yes
    59045926    ;;
     5927  no:yes:* )
     5928    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
     5929echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
     5930    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
     5931echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
     5932    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
     5933echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
     5934    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
     5935echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
     5936    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
     5937echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     5938    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
     5939echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
     5940    (
     5941      cat <<\_ASBOX
     5942## ---------------------------------------------- ##
     5943## Report this to orxonox-dev at mail.datacore.ch ##
     5944## ---------------------------------------------- ##
     5945_ASBOX
     5946    ) |
     5947      sed "s/^/$as_me: WARNING:     /" >&2
     5948    ;;
     5949esac
     5950echo "$as_me:$LINENO: checking for $ac_header" >&5
     5951echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     5952if eval "test \"\${$as_ac_Header+set}\" = set"; then
     5953  echo $ECHO_N "(cached) $ECHO_C" >&6
     5954else
     5955  eval "$as_ac_Header=\$ac_header_preproc"
     5956fi
     5957echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     5958echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     5959
     5960fi
     5961if test `eval echo '${'$as_ac_Header'}'` = yes; then
     5962  cat >>confdefs.h <<_ACEOF
     5963#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
     5964_ACEOF
     5965
     5966else
     5967  { { echo "$as_me:$LINENO: error: cannot find SDL header. please download from libsdl.org" >&5
     5968echo "$as_me: error: cannot find SDL header. please download from libsdl.org" >&2;}
     5969   { (exit 1); exit 1; }; }
     5970fi
     5971
     5972done
     5973
     5974fi
     5975
     5976done
     5977
     5978
     5979   LIBS="`sdl-config --libs` $LIBS"
     5980    ;;
     5981
    59055982#-----------#
    59065983# MAC -OS X #
  • orxonox/trunk/configure.ac

    r4662 r4664  
    328328    fi
    329329
    330 # checking for SDL-headers
    331     AC_CHECK_HEADERS([SDL/SDL.h] ,,
    332       [AC_MSG_ERROR([cannot find SDL headers]) ])
    333 
    334 # checking for SDL-lib
    335     AC_CHECK_LIB([SDL], [main], FOUND_SDL=yes)
    336      if test x$FOUND_SDL = xyes ; then
    337        LIBS="$LIBS -lSDL"
    338      else
    339         echo "------------------"
    340         echo "SDL library not found."
    341         echo "please install the SDL library, which can be found at http://www.libsdl.org"
    342         echo "------------------"
    343         exit -1
    344      fi
    345 
    346 
    347 ## checking for SDL
    348 #    SDL_VERSION=1.2.7
    349 #    AM_PATH_SDL($SDL_VERSION,
    350 #      :,
    351 #      AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
    352 #      )
    353 #    CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
    354 #    LIBS="$LIBS $SDL_LIBS"
     330# checking for SDL
     331  AC_MSG_CHECKING([for SDL-version])
     332  SDL_VERSION=`sdl-config --version`
     333  echo $SDL_VERSION
     334
     335   CPPFLAGS="`sdl-config --cflags` $CPPFLAGS"
     336   AC_CHECK_HEADERS([SDL/SDL.h] ,,
     337      [AC_CHECK_HEADERS([SDL.h] ,,AC_MSG_ERROR([cannot find SDL header. please download from libsdl.org])]))
     338
     339   LIBS="`sdl-config --libs` $LIBS"
    355340    ;;
     341
    356342#-----------#
    357343# MAC -OS X #
  • orxonox/trunk/src/story_entities/world.cc

    r4663 r4664  
    483483  system->setRadius(1.0, 0.0, .0);
    484484  system->setMass (0.0, 1.0);
    485   system->setModel(ResourceManager::getFullName("models/orx-rocket.obj"));
     485  //system->setModel(ResourceManager::getFullName("models/orx-rocket.obj"));
    486486
    487487  system->setColor(0, .5, 0, 0, 1);
     
    491491
    492492  // Creating a Test Particle Emitter
    493   ParticleEmitter* emitter = new ParticleEmitter(Vector(-1, 0, 0), M_PI_4, 40, .5);
     493  ParticleEmitter* emitter = new ParticleEmitter(Vector(-1, 0, 0), M_PI_4, 400, .5);
    494494  emitter->setType(EMITTER_DOT);
    495495  emitter->setSize(20);
Note: See TracChangeset for help on using the changeset viewer.