Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4662 in orxonox.OLD for orxonox/trunk


Ignore:
Timestamp:
Jun 23, 2005, 2:09:07 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: safer compile support

Location:
orxonox/trunk
Files:
9 edited

Legend:

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

    r4504 r4662  
    4747#undef HAVE_OPENGL_GL_H
    4848
    49 /* Define to 1 if you have the <SDL.h> header file. */
    50 #undef HAVE_SDL_H
    51 
    5249/* Define to 1 if you have the <SDL_image.h> header file. */
    5350#undef HAVE_SDL_IMAGE_H
     51
     52/* Define to 1 if you have the <SDL/SDL.h> header file. */
     53#undef HAVE_SDL_SDL_H
     54
     55/* Define to 1 if you have the <SDL/SDL_image.h> header file. */
     56#undef HAVE_SDL_SDL_IMAGE_H
     57
     58/* Define to 1 if you have the <SDL/SDL_ttf.h> header file. */
     59#undef HAVE_SDL_SDL_TTF_H
    5460
    5561/* Define to 1 if you have the <SDL_ttf.h> header file. */
  • orxonox/trunk/configure

    r4644 r4662  
    42784278echo "mingw-WINDOWS detected"
    42794279
    4280 CPPFLAGS="-I/usr/include/SDL -I/mingw/include/SDL"
     4280CPPFLAGS="-I/usr/include -I/mingw/include"
    42814281
    42824282    mingw="yes"
     
    48864886# checking for SDL-headers
    48874887
    4888 for ac_header in SDL.h
     4888for ac_header in SDL/SDL.h
    48894889do
    48904890as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     
    51935193 Linux="yes"
    51945194
    5195 CPPFLAGS="-I/usr/X11R6/include -I/usr/include/SDL"
     5195CPPFLAGS="-I/usr/X11R6/include -I/usr/include"
    51965196LDFLAGS="-L/usr/lib/opengl/xorg-x11/lib -L/usr/Mesa-6.0.1/lib -L/usr/X11R6/lib $LDFLAGS"
    51975197# checking gl header
     
    56665666# checking for SDL-headers
    56675667
    5668 for ac_header in SDL.h
     5668for ac_header in SDL/SDL.h
    56695669do
    56705670as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     
    59115911 osX="yes"
    59125912
    5913  CPPFLAGS="-I/sw/include -I/sw/include/SDL $CPPFLAGS"
     5913 CPPFLAGS="-I/sw/include -I/sw/include $CPPFLAGS"
    59145914# checking gl header
    59155915
     
    62256225   LIBS="$LIBS -framework OpenGL"
    62266226
     6227
     6228## SDL-check
    62276229       SDL_CFLAGS=`sdl-config --cflags`
    62286230       SDL_LIBS=`sdl-config --libs`
     
    70297031# checking for SDL_ttf-headers
    70307032
    7031 for ac_header in SDL_ttf.h
     7033for ac_header in SDL/SDL_ttf.h
    70327034do
    70337035as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     
    71757177
    71767178else
    7177   { { echo "$as_me:$LINENO: error: cannot find SDL_ttf header." >&5
    7178 echo "$as_me: error: cannot find SDL_ttf header." >&2;}
    7179    { (exit 1); exit 1; }; }
    7180 fi
    7181 
    7182 done
    7183 
    7184 #fi
    7185 # checking for SDL_ttf-lib
    7186   echo "$as_me:$LINENO: checking for main in -lSDL_ttf" >&5
    7187 echo $ECHO_N "checking for main in -lSDL_ttf... $ECHO_C" >&6
    7188 if test "${ac_cv_lib_SDL_ttf_main+set}" = set; then
    7189   echo $ECHO_N "(cached) $ECHO_C" >&6
    7190 else
    7191   ac_check_lib_save_LIBS=$LIBS
    7192 LIBS="-lSDL_ttf  $LIBS"
    7193 cat >conftest.$ac_ext <<_ACEOF
    7194 /* confdefs.h.  */
    7195 _ACEOF
    7196 cat confdefs.h >>conftest.$ac_ext
    7197 cat >>conftest.$ac_ext <<_ACEOF
    7198 /* end confdefs.h.  */
    7199 
    7200 
    7201 int
    7202 main ()
    7203 {
    7204 main ();
    7205   ;
    7206   return 0;
    7207 }
    7208 _ACEOF
    7209 rm -f conftest.$ac_objext conftest$ac_exeext
    7210 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
    7211   (eval $ac_link) 2>conftest.er1
    7212   ac_status=$?
    7213   grep -v '^ *+' conftest.er1 >conftest.err
    7214   rm -f conftest.er1
    7215   cat conftest.err >&5
    7216   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    7217   (exit $ac_status); } &&
    7218          { ac_try='test -z "$ac_c_werror_flag"
    7219                          || test ! -s conftest.err'
    7220   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    7221   (eval $ac_try) 2>&5
    7222   ac_status=$?
    7223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    7224   (exit $ac_status); }; } &&
    7225          { ac_try='test -s conftest$ac_exeext'
    7226   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    7227   (eval $ac_try) 2>&5
    7228   ac_status=$?
    7229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    7230   (exit $ac_status); }; }; then
    7231   ac_cv_lib_SDL_ttf_main=yes
    7232 else
    7233   echo "$as_me: failed program was:" >&5
    7234 sed 's/^/| /' conftest.$ac_ext >&5
    7235 
    7236 ac_cv_lib_SDL_ttf_main=no
    7237 fi
    7238 rm -f conftest.err conftest.$ac_objext \
    7239       conftest$ac_exeext conftest.$ac_ext
    7240 LIBS=$ac_check_lib_save_LIBS
    7241 fi
    7242 echo "$as_me:$LINENO: result: $ac_cv_lib_SDL_ttf_main" >&5
    7243 echo "${ECHO_T}$ac_cv_lib_SDL_ttf_main" >&6
    7244 if test $ac_cv_lib_SDL_ttf_main = yes; then
    7245   FOUND_SDL_ttf=yes
    7246 fi
    7247 
    7248      if test x$FOUND_SDL_ttf = xyes ; then
    7249        LIBS="$LIBS -lSDL_ttf"
    7250      else
    7251         echo "------------------"
    7252         echo "SDL_ttf library not found."
    7253         echo "please install the SDL_ttf library, which can be found at http://www.libsdl.org/projects/SDL_ttf/"
    7254         echo "------------------"
    7255         exit -1
    7256      fi
    7257 
    7258 
    7259 #-----------#
    7260 # SDL_Image #
    7261 #-----------#
    7262 # checking for SDL_image-headers
    7263 
    7264 for ac_header in SDL_image.h
     7179
     7180for ac_header in SDL_ttf.h
    72657181do
    72667182as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     
    74087324
    74097325else
    7410   echo "sdl_image header not found."; def_sdl_image=no; exit -1
     7326  { { echo "$as_me:$LINENO: error: cannot find SDL_ttf header." >&5
     7327echo "$as_me: error: cannot find SDL_ttf header." >&2;}
     7328   { (exit 1); exit 1; }; }
     7329fi
     7330
     7331done
     7332
     7333fi
     7334
     7335done
     7336
     7337#fi
     7338# checking for SDL_ttf-lib
     7339  echo "$as_me:$LINENO: checking for main in -lSDL_ttf" >&5
     7340echo $ECHO_N "checking for main in -lSDL_ttf... $ECHO_C" >&6
     7341if test "${ac_cv_lib_SDL_ttf_main+set}" = set; then
     7342  echo $ECHO_N "(cached) $ECHO_C" >&6
     7343else
     7344  ac_check_lib_save_LIBS=$LIBS
     7345LIBS="-lSDL_ttf  $LIBS"
     7346cat >conftest.$ac_ext <<_ACEOF
     7347/* confdefs.h.  */
     7348_ACEOF
     7349cat confdefs.h >>conftest.$ac_ext
     7350cat >>conftest.$ac_ext <<_ACEOF
     7351/* end confdefs.h.  */
     7352
     7353
     7354int
     7355main ()
     7356{
     7357main ();
     7358  ;
     7359  return 0;
     7360}
     7361_ACEOF
     7362rm -f conftest.$ac_objext conftest$ac_exeext
     7363if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     7364  (eval $ac_link) 2>conftest.er1
     7365  ac_status=$?
     7366  grep -v '^ *+' conftest.er1 >conftest.err
     7367  rm -f conftest.er1
     7368  cat conftest.err >&5
     7369  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7370  (exit $ac_status); } &&
     7371         { ac_try='test -z "$ac_c_werror_flag"
     7372                         || test ! -s conftest.err'
     7373  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7374  (eval $ac_try) 2>&5
     7375  ac_status=$?
     7376  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7377  (exit $ac_status); }; } &&
     7378         { ac_try='test -s conftest$ac_exeext'
     7379  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7380  (eval $ac_try) 2>&5
     7381  ac_status=$?
     7382  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7383  (exit $ac_status); }; }; then
     7384  ac_cv_lib_SDL_ttf_main=yes
     7385else
     7386  echo "$as_me: failed program was:" >&5
     7387sed 's/^/| /' conftest.$ac_ext >&5
     7388
     7389ac_cv_lib_SDL_ttf_main=no
     7390fi
     7391rm -f conftest.err conftest.$ac_objext \
     7392      conftest$ac_exeext conftest.$ac_ext
     7393LIBS=$ac_check_lib_save_LIBS
     7394fi
     7395echo "$as_me:$LINENO: result: $ac_cv_lib_SDL_ttf_main" >&5
     7396echo "${ECHO_T}$ac_cv_lib_SDL_ttf_main" >&6
     7397if test $ac_cv_lib_SDL_ttf_main = yes; then
     7398  FOUND_SDL_ttf=yes
     7399fi
     7400
     7401     if test x$FOUND_SDL_ttf = xyes ; then
     7402       LIBS="$LIBS -lSDL_ttf"
     7403     else
     7404        echo "------------------"
     7405        echo "SDL_ttf library not found."
     7406        echo "please install the SDL_ttf library, which can be found at http://www.libsdl.org/projects/SDL_ttf/"
     7407        echo "------------------"
     7408        exit -1
     7409     fi
     7410
     7411
     7412#-----------#
     7413# SDL_Image #
     7414#-----------#
     7415# checking for SDL_image-headers
     7416
     7417for ac_header in SDL_image.h
     7418do
     7419as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     7420if eval "test \"\${$as_ac_Header+set}\" = set"; then
     7421  echo "$as_me:$LINENO: checking for $ac_header" >&5
     7422echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     7423if eval "test \"\${$as_ac_Header+set}\" = set"; then
     7424  echo $ECHO_N "(cached) $ECHO_C" >&6
     7425fi
     7426echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     7427echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     7428else
     7429  # Is the header compilable?
     7430echo "$as_me:$LINENO: checking $ac_header usability" >&5
     7431echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
     7432cat >conftest.$ac_ext <<_ACEOF
     7433/* confdefs.h.  */
     7434_ACEOF
     7435cat confdefs.h >>conftest.$ac_ext
     7436cat >>conftest.$ac_ext <<_ACEOF
     7437/* end confdefs.h.  */
     7438$ac_includes_default
     7439#include <$ac_header>
     7440_ACEOF
     7441rm -f conftest.$ac_objext
     7442if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     7443  (eval $ac_compile) 2>conftest.er1
     7444  ac_status=$?
     7445  grep -v '^ *+' conftest.er1 >conftest.err
     7446  rm -f conftest.er1
     7447  cat conftest.err >&5
     7448  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7449  (exit $ac_status); } &&
     7450         { ac_try='test -z "$ac_c_werror_flag"
     7451                         || test ! -s conftest.err'
     7452  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7453  (eval $ac_try) 2>&5
     7454  ac_status=$?
     7455  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7456  (exit $ac_status); }; } &&
     7457         { ac_try='test -s conftest.$ac_objext'
     7458  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7459  (eval $ac_try) 2>&5
     7460  ac_status=$?
     7461  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7462  (exit $ac_status); }; }; then
     7463  ac_header_compiler=yes
     7464else
     7465  echo "$as_me: failed program was:" >&5
     7466sed 's/^/| /' conftest.$ac_ext >&5
     7467
     7468ac_header_compiler=no
     7469fi
     7470rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     7471echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     7472echo "${ECHO_T}$ac_header_compiler" >&6
     7473
     7474# Is the header present?
     7475echo "$as_me:$LINENO: checking $ac_header presence" >&5
     7476echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
     7477cat >conftest.$ac_ext <<_ACEOF
     7478/* confdefs.h.  */
     7479_ACEOF
     7480cat confdefs.h >>conftest.$ac_ext
     7481cat >>conftest.$ac_ext <<_ACEOF
     7482/* end confdefs.h.  */
     7483#include <$ac_header>
     7484_ACEOF
     7485if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
     7486  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     7487  ac_status=$?
     7488  grep -v '^ *+' conftest.er1 >conftest.err
     7489  rm -f conftest.er1
     7490  cat conftest.err >&5
     7491  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7492  (exit $ac_status); } >/dev/null; then
     7493  if test -s conftest.err; then
     7494    ac_cpp_err=$ac_c_preproc_warn_flag
     7495    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
     7496  else
     7497    ac_cpp_err=
     7498  fi
     7499else
     7500  ac_cpp_err=yes
     7501fi
     7502if test -z "$ac_cpp_err"; then
     7503  ac_header_preproc=yes
     7504else
     7505  echo "$as_me: failed program was:" >&5
     7506sed 's/^/| /' conftest.$ac_ext >&5
     7507
     7508  ac_header_preproc=no
     7509fi
     7510rm -f conftest.err conftest.$ac_ext
     7511echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     7512echo "${ECHO_T}$ac_header_preproc" >&6
     7513
     7514# So?  What about this header?
     7515case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
     7516  yes:no: )
     7517    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
     7518echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
     7519    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
     7520echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
     7521    ac_header_preproc=yes
     7522    ;;
     7523  no:yes:* )
     7524    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
     7525echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
     7526    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
     7527echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
     7528    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
     7529echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
     7530    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
     7531echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
     7532    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
     7533echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     7534    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
     7535echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
     7536    (
     7537      cat <<\_ASBOX
     7538## ---------------------------------------------- ##
     7539## Report this to orxonox-dev at mail.datacore.ch ##
     7540## ---------------------------------------------- ##
     7541_ASBOX
     7542    ) |
     7543      sed "s/^/$as_me: WARNING:     /" >&2
     7544    ;;
     7545esac
     7546echo "$as_me:$LINENO: checking for $ac_header" >&5
     7547echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     7548if eval "test \"\${$as_ac_Header+set}\" = set"; then
     7549  echo $ECHO_N "(cached) $ECHO_C" >&6
     7550else
     7551  eval "$as_ac_Header=\$ac_header_preproc"
     7552fi
     7553echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     7554echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     7555
     7556fi
     7557if test `eval echo '${'$as_ac_Header'}'` = yes; then
     7558  cat >>confdefs.h <<_ACEOF
     7559#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
     7560_ACEOF
     7561
     7562else
     7563
     7564for ac_header in SDL/SDL_image.h
     7565do
     7566as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     7567if eval "test \"\${$as_ac_Header+set}\" = set"; then
     7568  echo "$as_me:$LINENO: checking for $ac_header" >&5
     7569echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     7570if eval "test \"\${$as_ac_Header+set}\" = set"; then
     7571  echo $ECHO_N "(cached) $ECHO_C" >&6
     7572fi
     7573echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     7574echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     7575else
     7576  # Is the header compilable?
     7577echo "$as_me:$LINENO: checking $ac_header usability" >&5
     7578echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
     7579cat >conftest.$ac_ext <<_ACEOF
     7580/* confdefs.h.  */
     7581_ACEOF
     7582cat confdefs.h >>conftest.$ac_ext
     7583cat >>conftest.$ac_ext <<_ACEOF
     7584/* end confdefs.h.  */
     7585$ac_includes_default
     7586#include <$ac_header>
     7587_ACEOF
     7588rm -f conftest.$ac_objext
     7589if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     7590  (eval $ac_compile) 2>conftest.er1
     7591  ac_status=$?
     7592  grep -v '^ *+' conftest.er1 >conftest.err
     7593  rm -f conftest.er1
     7594  cat conftest.err >&5
     7595  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7596  (exit $ac_status); } &&
     7597         { ac_try='test -z "$ac_c_werror_flag"
     7598                         || test ! -s conftest.err'
     7599  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7600  (eval $ac_try) 2>&5
     7601  ac_status=$?
     7602  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7603  (exit $ac_status); }; } &&
     7604         { ac_try='test -s conftest.$ac_objext'
     7605  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7606  (eval $ac_try) 2>&5
     7607  ac_status=$?
     7608  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7609  (exit $ac_status); }; }; then
     7610  ac_header_compiler=yes
     7611else
     7612  echo "$as_me: failed program was:" >&5
     7613sed 's/^/| /' conftest.$ac_ext >&5
     7614
     7615ac_header_compiler=no
     7616fi
     7617rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     7618echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     7619echo "${ECHO_T}$ac_header_compiler" >&6
     7620
     7621# Is the header present?
     7622echo "$as_me:$LINENO: checking $ac_header presence" >&5
     7623echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
     7624cat >conftest.$ac_ext <<_ACEOF
     7625/* confdefs.h.  */
     7626_ACEOF
     7627cat confdefs.h >>conftest.$ac_ext
     7628cat >>conftest.$ac_ext <<_ACEOF
     7629/* end confdefs.h.  */
     7630#include <$ac_header>
     7631_ACEOF
     7632if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
     7633  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     7634  ac_status=$?
     7635  grep -v '^ *+' conftest.er1 >conftest.err
     7636  rm -f conftest.er1
     7637  cat conftest.err >&5
     7638  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7639  (exit $ac_status); } >/dev/null; then
     7640  if test -s conftest.err; then
     7641    ac_cpp_err=$ac_c_preproc_warn_flag
     7642    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
     7643  else
     7644    ac_cpp_err=
     7645  fi
     7646else
     7647  ac_cpp_err=yes
     7648fi
     7649if test -z "$ac_cpp_err"; then
     7650  ac_header_preproc=yes
     7651else
     7652  echo "$as_me: failed program was:" >&5
     7653sed 's/^/| /' conftest.$ac_ext >&5
     7654
     7655  ac_header_preproc=no
     7656fi
     7657rm -f conftest.err conftest.$ac_ext
     7658echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     7659echo "${ECHO_T}$ac_header_preproc" >&6
     7660
     7661# So?  What about this header?
     7662case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
     7663  yes:no: )
     7664    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
     7665echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
     7666    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
     7667echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
     7668    ac_header_preproc=yes
     7669    ;;
     7670  no:yes:* )
     7671    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
     7672echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
     7673    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
     7674echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
     7675    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
     7676echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
     7677    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
     7678echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
     7679    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
     7680echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     7681    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
     7682echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
     7683    (
     7684      cat <<\_ASBOX
     7685## ---------------------------------------------- ##
     7686## Report this to orxonox-dev at mail.datacore.ch ##
     7687## ---------------------------------------------- ##
     7688_ASBOX
     7689    ) |
     7690      sed "s/^/$as_me: WARNING:     /" >&2
     7691    ;;
     7692esac
     7693echo "$as_me:$LINENO: checking for $ac_header" >&5
     7694echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     7695if eval "test \"\${$as_ac_Header+set}\" = set"; then
     7696  echo $ECHO_N "(cached) $ECHO_C" >&6
     7697else
     7698  eval "$as_ac_Header=\$ac_header_preproc"
     7699fi
     7700echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     7701echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     7702
     7703fi
     7704if test `eval echo '${'$as_ac_Header'}'` = yes; then
     7705  cat >>confdefs.h <<_ACEOF
     7706#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
     7707_ACEOF
     7708
     7709else
     7710  { { echo "$as_me:$LINENO: error: sdl_image header not found." >&5
     7711echo "$as_me: error: sdl_image header not found." >&2;}
     7712   { (exit 1); exit 1; }; }
     7713fi
     7714
     7715done
     7716
    74117717fi
    74127718
  • orxonox/trunk/configure.ac

    r4644 r4662  
    215215echo "mingw-WINDOWS detected"
    216216
    217 CPPFLAGS="-I/usr/include/SDL -I/mingw/include/SDL"
     217CPPFLAGS="-I/usr/include -I/mingw/include"
    218218
    219219    mingw="yes"
     
    261261    fi
    262262# checking for SDL-headers
    263     AC_CHECK_HEADERS([SDL.h] ,,
     263    AC_CHECK_HEADERS([SDL/SDL.h] ,,
    264264      [AC_MSG_ERROR([cannot find SDL headers]) ])
    265265
     
    295295 Linux="yes"
    296296
    297 CPPFLAGS="-I/usr/X11R6/include -I/usr/include/SDL"
     297CPPFLAGS="-I/usr/X11R6/include -I/usr/include"
    298298LDFLAGS="-L/usr/lib/opengl/xorg-x11/lib -L/usr/Mesa-6.0.1/lib -L/usr/X11R6/lib $LDFLAGS"
    299299# checking gl header
     
    329329
    330330# checking for SDL-headers
    331     AC_CHECK_HEADERS([SDL.h] ,,
     331    AC_CHECK_HEADERS([SDL/SDL.h] ,,
    332332      [AC_MSG_ERROR([cannot find SDL headers]) ])
    333333
     
    362362 osX="yes"
    363363
    364  CPPFLAGS="-I/sw/include -I/sw/include/SDL $CPPFLAGS"
     364 CPPFLAGS="-I/sw/include -I/sw/include $CPPFLAGS"
    365365# checking gl header
    366366   AC_CHECK_HEADERS([OpenGL/gl.h] ,,
     
    372372   LIBS="$LIBS -framework OpenGL"
    373373
     374
     375## SDL-check
    374376       SDL_CFLAGS=`sdl-config --cflags`
    375377       SDL_LIBS=`sdl-config --libs`
     
    475477#---------#
    476478# checking for SDL_ttf-headers
    477   AC_CHECK_HEADERS([SDL_ttf.h] ,,
    478       [AC_MSG_ERROR([cannot find SDL_ttf header.])])
     479  AC_CHECK_HEADERS([SDL/SDL_ttf.h] ,,
     480      [AC_CHECK_HEADERS([SDL_ttf.h] ,,AC_MSG_ERROR([cannot find SDL_ttf header.])]))
    479481#fi
    480482# checking for SDL_ttf-lib
     
    496498# checking for SDL_image-headers
    497499AC_CHECK_HEADERS([SDL_image.h] ,,
    498     [echo "sdl_image header not found."; def_sdl_image=no; exit -1])
     500    [AC_CHECK_HEADERS([SDL/SDL_image.h],, AC_MSG_ERROR([sdl_image header not found.]))])
    499501# checking for SDL_image-lib
    500502AC_CHECK_LIB([SDL_image], [main], [FOUND_SDL_image=yes])
     
    596598                 src/lib/gui/Makefile
    597599                 src/lib/tinyxml/Makefile
    598                 src/subprojects/Makefile
     600                src/subprojects/Makefile
    599601                 src/subprojects/testmain/Makefile
    600602                 src/subprojects/importer/Makefile
  • orxonox/trunk/orxonox.kdevelop

    r4643 r4662  
    165165    </groups>
    166166    <tree>
    167       <hidepatterns>*.o</hidepatterns>
     167      <hidepatterns>*.o,*~</hidepatterns>
    168168      <hidenonprojectfiles>false</hidenonprojectfiles>
    169169    </tree>
  • orxonox/trunk/src/defs/sdlincl.h

    r4381 r4662  
    22  \file sdlincl.h
    33  \brief This file includes sdl Headers.
    4  
     4
    55  no Class is defined here, but the SDL Headers
    66*/
     
    99#define _SDLINCL_H
    1010
    11 #include <SDL.h>
     11#include <SDL/SDL.h>
    1212
    1313#endif /* _SDLINCL_H */
  • orxonox/trunk/src/lib/event/event_def.h

    r4457 r4662  
    1 /*! 
     1/*!
    22    \file event_def.h
    33    \brief some central definitions
     
    88#define _EVENT_DEF_H
    99
     10#ifdef HAVE_SDL_H
    1011#include "SDL_keysym.h"
     12#else
     13#include "SDL/SDL_keysym.h"
     14#endif
    1115#include "stdincl.h"
    1216
  • orxonox/trunk/src/lib/graphics/importer/texture.cc

    r4370 r4662  
    1 /* 
     1/*
    22   orxonox - the future of 3D-vertical-scrollers
    33
     
    2121#include "graphics_engine.h"
    2222
     23#ifdef HAVE_SDL_IMAGE_H
    2324#include <SDL_image.h>
     25#else
     26#include <SDL/SDL_image.h>
     27#endif
    2428
    2529/**
     
    3236  if (imageName)
    3337    this->loadImage(imageName);
    34 } 
     38}
    3539
    3640/**
    3741   \brief Destructor of a Texture
    38    
     42
    3943   Frees Data, and deletes the textures from GL
    4044*/
     
    6266      Uint32 saved_flags;
    6367      Uint8  saved_alpha;
    64      
     68
    6569      w = surface->w;
    6670      h = surface->h;
    67      
     71
    6872      image = SDL_CreateRGBSurface(SDL_SWSURFACE,
    69                                    w, h,
    70                                    32,
     73                                   w, h,
     74                                   32,
    7175#if SDL_BYTEORDER == SDL_LIL_ENDIAN /* OpenGL RGBA masks */
    72                                    0x000000FF,
    73                                    0x0000FF00,
    74                                    0x00FF0000,
    75                                    0xFF000000
     76                                   0x000000FF,
     77                                   0x0000FF00,
     78                                   0x00FF0000,
     79                                   0xFF000000
    7680#else
    77                                    0xFF000000,
    78                                    0x00FF0000,
    79                                    0x0000FF00,
    80                                    0x000000FF
     81                                   0xFF000000,
     82                                   0x00FF0000,
     83                                   0x0000FF00,
     84                                   0x000000FF
    8185#endif
    82                                    );
     86                                   );
    8387      if ( image == NULL ) {
    84         return 0;
     88        return 0;
    8589      }
    86      
     90
    8791      /* Save the alpha blending attributes */
    8892      saved_flags = surface->flags&(SDL_SRCALPHA|SDL_RLEACCELOK);
    8993      saved_alpha = surface->format->alpha;
    9094      if ( (saved_flags & SDL_SRCALPHA) == SDL_SRCALPHA ) {
    91         SDL_SetAlpha(surface, 0, 0);
     95        SDL_SetAlpha(surface, 0, 0);
    9296      }
    93      
     97
    9498      /* Copy the surface into the GL texture image */
    9599      area.x = 0;
     
    98102      area.h = surface->h;
    99103      SDL_BlitSurface(surface, &area, image, &area);
    100      
     104
    101105      /* Restore the alpha blending attributes */
    102106      if ( (saved_flags & SDL_SRCALPHA) == SDL_SRCALPHA ) {
    103         SDL_SetAlpha(surface, saved_flags | SDL_OPENGL, saved_alpha);
    104         this->bAlpha = true;
     107        SDL_SetAlpha(surface, saved_flags | SDL_OPENGL, saved_alpha);
     108        this->bAlpha = true;
    105109      }
    106      
     110
    107111      /* Create an OpenGL texture for the image */
    108112      glGenTextures(1, &texture);
     
    112116      // build the Texture
    113117      glTexImage2D(GL_TEXTURE_2D,
    114                    0,
    115                    GL_RGBA,
    116                    w, h,
    117                    0,
    118                    GL_RGBA,
    119                    GL_UNSIGNED_BYTE,
    120                    image->pixels);
     118                   0,
     119                   GL_RGBA,
     120                   w, h,
     121                   0,
     122                   GL_RGBA,
     123                   GL_UNSIGNED_BYTE,
     124                   image->pixels);
    121125      // build the MipMaps
    122126      gluBuild2DMipmaps(GL_TEXTURE_2D,
    123                         GL_RGBA,
    124                         w,
    125                         h,
    126                         GL_RGBA,
    127                         GL_UNSIGNED_BYTE,
    128                         image->pixels);
    129      
     127                        GL_RGBA,
     128                        w,
     129                        h,
     130                        GL_RGBA,
     131                        GL_UNSIGNED_BYTE,
     132                        image->pixels);
     133
    130134      SDL_FreeSurface(image); /* No longer needed */
    131      
     135
    132136      return texture;
    133137    }
     
    143147    {
    144148      if (imageName)
    145         {
    146           SDL_Surface* tmpSurf;
    147           if (this->texture)
    148             glDeleteTextures(1, &this->texture);
    149           // load the new Image to memory
    150           tmpSurf = IMG_Load(imageName);
    151           if(!tmpSurf)
    152             {
    153               PRINTF(1)("IMG_Load: %s\n", IMG_GetError());
    154               return false;
    155             }
     149        {
     150          SDL_Surface* tmpSurf;
     151          if (this->texture)
     152            glDeleteTextures(1, &this->texture);
     153          // load the new Image to memory
     154          tmpSurf = IMG_Load(imageName);
     155          if(!tmpSurf)
     156            {
     157              PRINTF(1)("IMG_Load: %s\n", IMG_GetError());
     158              return false;
     159            }
    156160
    157           GLubyte* pixels = (GLubyte*)tmpSurf->pixels;
     161          GLubyte* pixels = (GLubyte*)tmpSurf->pixels;
    158162
    159           PRINTF(3)("loading Image %s\n", imageName);
    160           if (tmpSurf)
    161             this->texture = loadTexToGL(tmpSurf);
     163          PRINTF(3)("loading Image %s\n", imageName);
     164          if (tmpSurf)
     165            this->texture = loadTexToGL(tmpSurf);
    162166
    163          
    164           SDL_FreeSurface(tmpSurf);
    165           return true;
    166         }
     167
     168          SDL_FreeSurface(tmpSurf);
     169          return true;
     170        }
    167171      else
    168         {
    169           PRINTF(2)("Image not Found: %s\n", imageName);
    170           return false;
    171         }
     172        {
     173          PRINTF(2)("Image not Found: %s\n", imageName);
     174          return false;
     175        }
    172176    }
    173177}
  • orxonox/trunk/src/lib/graphics/text_engine.h

    r4597 r4662  
    1919
    2020#include "glincl.h"
     21
     22#ifdef HAVE_SDL_IMAGE_H
    2123#include "SDL_ttf.h"
     24#else
     25#include "SDL/SDL_ttf.h"
     26#endif
    2227
    2328#include "vector.h"
  • orxonox/trunk/src/subprojects/framework.h

    r4651 r4662  
    44#include "vector.h"
    55#include "glincl.h"
    6 #include "SDL_events.h"
    76#include "debug.h"
    87#include "graphics_engine.h"
Note: See TracChangeset for help on using the changeset viewer.