Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3863 in orxonox.OLD


Ignore:
Timestamp:
Apr 18, 2005, 10:10:26 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: efence compile support, minor changes at animation, and texture has now only support for sdl-image

Location:
orxonox/trunk
Files:
1 added
14 edited

Legend:

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

    r3790 r3863  
    2828#undef HAVE_INTTYPES_H
    2929
    30 /* Define to 1 if you have the <jpeglib.h> header file. */
    31 #undef HAVE_JPEGLIB_H
    32 
    3330/* Define to 1 if you have the `m' library (-lm). */
    3431#undef HAVE_LIBM
     
    4643/* Define to 1 if you have the <OpenGL/gl.h> header file. */
    4744#undef HAVE_OPENGL_GL_H
    48 
    49 /* Define to 1 if you have the <png.h> header file. */
    50 #undef HAVE_PNG_H
    5145
    5246/* Define to 1 if you have the <pthread.h> header file. */
  • orxonox/trunk/configure

    r3790 r3863  
    871871  --enable-sub-projects   also builds the subProjects while make from srcdir
    872872  --enable-profile        builds orxonox with profiling support
     873  --enable-efence         builds orxonox with efence support
    873874  --enable-documentation  also builds the sDocumentation while make from
    874875                          srcdir
     
    881882  --without-pthread       Prevents pthread from being loaded
    882883  --without-curl          Prevents libcURL from being loaded
    883   --without-sdl-image     Prevents SDL_image from being loaded
    884884
    885885Some influential environment variables:
     
    39863986
    39873987#-------------------#
    3988 # SDL_image-disable #
    3989 #-------------------#
    3990 def_sdl_image=yes
    3991 echo "$as_me:$LINENO: checking if SDL_image should be enabled" >&5
    3992 echo $ECHO_N "checking if SDL_image should be enabled... $ECHO_C" >&6
    3993 
    3994 # Check whether --with-sdl_image or --without-sdl_image was given.
    3995 if test "${with_sdl_image+set}" = set; then
    3996   withval="$with_sdl_image"
    3997   def_sdl_image=no
    3998 fi;
    3999 if test x$def_sdl_image = xyes; then
    4000   echo "yes"
    4001 fi
    4002 if test x$def_sdl_image = xno; then
    4003   echo "no"
    4004 fi
    4005 
    4006 #-------------------#
    40073988# SubProject-enable #
    40083989#-------------------#
     
    40444025fi;
    40454026if test x$def_profiling = xyes; then
    4046 
    4047 
    4048 if test x$def_sub_projects = xyes; then
    4049   SUB_PROJECTS_TRUE=
    4050   SUB_PROJECTS_FALSE='#'
    4051 else
    4052   SUB_PROJECTS_TRUE='#'
    4053   SUB_PROJECTS_FALSE=
    4054 fi
    4055 
    40564027  echo "yes"
    40574028  CXXFLAGS="$CXXFLAGS -pg"
    40584029fi
    40594030if test x$def_profiling = xno; then
     4031  echo "no"
     4032fi
     4033
     4034#----------------#
     4035# efence Enabled #
     4036#----------------#
     4037def_efence=no
     4038echo "$as_me:$LINENO: checking if efence should be enabled" >&5
     4039echo $ECHO_N "checking if efence should be enabled... $ECHO_C" >&6
     4040# Check whether --enable-efence or --disable-efence was given.
     4041if test "${enable_efence+set}" = set; then
     4042  enableval="$enable_efence"
     4043  def_efence=yes
     4044fi;
     4045if test x$def_efence = xyes; then
     4046  echo "yes"
     4047fi
     4048if test x$def_efence = xno; then
    40604049  echo "no"
    40614050fi
     
    64176406# SDL_Image #
    64186407#-----------#
    6419 if test x$def_sdl_image = xyes; then
    64206408# checking for SDL_image-headers
    64216409
     
    65666554
    65676555else
    6568   echo "sdl_image not found. falling back to other options"; def_sdl_image=no
     6556  echo "sdl_image header not found."; def_sdl_image=no; exit -1
    65696557fi
    65706558
    65716559done
    65726560
    6573 fi
    6574 if test x$def_sdl_image = xyes; then
    65756561# checking for SDL_image-lib
    6576   echo "$as_me:$LINENO: checking for main in -lSDL_image" >&5
     6562echo "$as_me:$LINENO: checking for main in -lSDL_image" >&5
    65776563echo $ECHO_N "checking for main in -lSDL_image... $ECHO_C" >&6
    65786564if test "${ac_cv_lib_SDL_image_main+set}" = set; then
     
    66366622fi
    66376623
    6638      if test x$FOUND_SDL_image = xyes ; then
    6639        LIBS="$LIBS -lSDL_image"
    6640      else
    6641         echo "------------------"
    6642         echo "SDL_image library not found."
    6643         echo "please install the SDL_image library, which can be found at http://www.libsdl.org/projects/SDL_image/"
    6644         echo "------------------"
    6645         exit -1
    6646      fi
    6647 fi
    6648 
    6649 ## case no SDL-image:
    6650 if test x$def_sdl_image = xno; then
     6624   if test x$FOUND_SDL_image = xyes ; then
     6625     LIBS="$LIBS -lSDL_image"
     6626   else
     6627      echo "------------------"
     6628      echo "SDL_image library not found."
     6629      echo "please install the SDL_image library, which can be found at http://www.libsdl.org/projects/SDL_image/"
     6630      echo "------------------"
     6631      exit -1
     6632   fi
     6633
     6634#-----#
     6635# GTK #
     6636#-----#
     6637if test x$def_gtk = xyes; then
     6638
     6639        #PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3, have_gtk2=yes, have_gtk2=no)
     6640        echo "$as_me:$LINENO: checking for gtk2.0" >&5
     6641echo $ECHO_N "checking for gtk2.0... $ECHO_C" >&6
     6642        if `pkg-config --exists gtk+-2.0`; then
     6643                echo "yes"
     6644                have_gtk2=yes
     6645                GTK2_LIBS=`pkg-config --libs gtk+-2.0`
     6646                GTK2_CFLAGS=`pkg-config --cflags gtk+-2.0`
     6647
     6648cat >>confdefs.h <<_ACEOF
     6649#define HAVE_GTK2 1
     6650_ACEOF
     6651
     6652        else
     6653                echo "no"
     6654        fi
     6655
     6656fi
     6657
     6658
     6659
     6660
     6661if test x$have_gtk2 = xyes; then
     6662  HAVE_GTK2_TRUE=
     6663  HAVE_GTK2_FALSE='#'
     6664else
     6665  HAVE_GTK2_TRUE='#'
     6666  HAVE_GTK2_FALSE=
     6667fi
     6668
     6669
    66516670#---------#
    6652 # libjpeg #
     6671# gThread #
    66536672#---------#
    6654 
    6655 for ac_header in jpeglib.h
     6673if test x$def_gthread = xyes; then
     6674
     6675        echo "$as_me:$LINENO: checking for gthread" >&5
     6676echo $ECHO_N "checking for gthread... $ECHO_C" >&6
     6677        if `pkg-config --exists gthread-2.0`; then
     6678                echo "yes"
     6679                have_gthread=yes
     6680                GTHREAD_LIBS=`pkg-config --libs gthread-2.0`
     6681                GTHREAD_CFLAGS=`pkg-config --cflags gthread-2.0`
     6682
     6683cat >>confdefs.h <<_ACEOF
     6684#define HAVE_GTHREAD 1
     6685_ACEOF
     6686
     6687        else
     6688                echo "no"
     6689        fi
     6690
     6691fi
     6692
     6693
     6694
     6695
     6696if test x$have_gthread = xyes; then
     6697  HAVE_GTHREAD_TRUE=
     6698  HAVE_GTHREAD_FALSE='#'
     6699else
     6700  HAVE_GTHREAD_TRUE='#'
     6701  HAVE_GTHREAD_FALSE=
     6702fi
     6703
     6704
     6705#---------#
     6706# libcURL #
     6707#---------#
     6708if test x$def_curl = xyes; then
     6709
     6710
     6711for ac_header in curl/curl.h
    66566712do
    66576713as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     
    67976853#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
    67986854_ACEOF
    6799  jpegHeader="yes"
    6800 else
    6801   jpegHeader="no"
     6855 curlHeader="yes"
     6856else
     6857  curlHeader="no"
    68026858fi
    68036859
    68046860done
    68056861
    6806  if test x$jpegHeader = xno; then
    6807         echo " not including jpeg."
    6808  else
    6809   echo "$as_me:$LINENO: checking for main in -ljpeg" >&5
    6810 echo $ECHO_N "checking for main in -ljpeg... $ECHO_C" >&6
    6811 if test "${ac_cv_lib_jpeg_main+set}" = set; then
     6862 echo "$as_me:$LINENO: checking for main in -lcurl" >&5
     6863echo $ECHO_N "checking for main in -lcurl... $ECHO_C" >&6
     6864if test "${ac_cv_lib_curl_main+set}" = set; then
    68126865  echo $ECHO_N "(cached) $ECHO_C" >&6
    68136866else
    68146867  ac_check_lib_save_LIBS=$LIBS
    6815 LIBS="-ljpeg  $LIBS"
     6868LIBS="-lcurl  $LIBS"
    68166869cat >conftest.$ac_ext <<_ACEOF
    68176870/* confdefs.h.  */
     
    68526905  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    68536906  (exit $ac_status); }; }; then
    6854   ac_cv_lib_jpeg_main=yes
     6907  ac_cv_lib_curl_main=yes
    68556908else
    68566909  echo "$as_me: failed program was:" >&5
    68576910sed 's/^/| /' conftest.$ac_ext >&5
    68586911
    6859 ac_cv_lib_jpeg_main=no
     6912ac_cv_lib_curl_main=no
    68606913fi
    68616914rm -f conftest.err conftest.$ac_objext \
     
    68636916LIBS=$ac_check_lib_save_LIBS
    68646917fi
    6865 echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_main" >&5
    6866 echo "${ECHO_T}$ac_cv_lib_jpeg_main" >&6
    6867 if test $ac_cv_lib_jpeg_main = yes; then
    6868   FOUND_jpeg=yes
    6869 fi
    6870 
    6871     if test x$FOUND_jpeg = xyes ; then
    6872       LIBS="$LIBS -ljpeg"
    6873     else
    6874          echo "------------------"
    6875          echo "jpeg library not found."
    6876          echo "please install the jpeg library from the Independent JPEG Group, which can be found at http://www.ijg.org"
    6877          echo "------------------"
    6878          exit -1
    6879     fi
     6918echo "$as_me:$LINENO: result: $ac_cv_lib_curl_main" >&5
     6919echo "${ECHO_T}$ac_cv_lib_curl_main" >&6
     6920if test $ac_cv_lib_curl_main = yes; then
     6921  FOUND_curl=yes
     6922fi
     6923
     6924 if test x$curlHeader = xyes & test x$FOUND_curl = xyes ; then
     6925  have_curl=yes
     6926  CURL_LIBS=`curl-config --libs`
     6927  CURLCFLAGS=`curl-config --cflags`
     6928
     6929cat >>confdefs.h <<_ACEOF
     6930#define HAVE_CURL 1
     6931_ACEOF
     6932
     6933 else
     6934  have_curl=no
    68806935 fi
    68816936
    6882 #--------#
    6883 # libpng #
    6884 #--------#
    6885 
    6886 for ac_header in png.h
     6937fi
     6938
     6939
     6940
     6941
     6942if test x$have_curl = xyes; then
     6943  HAVE_CURL_TRUE=
     6944  HAVE_CURL_FALSE='#'
     6945else
     6946  HAVE_CURL_TRUE='#'
     6947  HAVE_CURL_FALSE=
     6948fi
     6949
     6950
     6951#---------#
     6952# pthread #
     6953#---------#
     6954if test x$def_pthread = xyes ; then
     6955 if test x$have_gthread = xyes ; then
     6956
     6957for ac_header in pthread.h
    68876958do
    68886959as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     
    70287099#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
    70297100_ACEOF
    7030  pngHeader="yes"
    7031 else
    7032   pngHeader="no"
     7101 pthreadHeader="yes"
     7102else
     7103  pthreadHeader="no"
    70337104fi
    70347105
    70357106done
    70367107
    7037  if test x$pngHeader = xno; then
    7038         echo " not including png."
    7039  else
    7040   echo "$as_me:$LINENO: checking for main in -lpng" >&5
    7041 echo $ECHO_N "checking for main in -lpng... $ECHO_C" >&6
    7042 if test "${ac_cv_lib_png_main+set}" = set; then
     7108  echo "$as_me:$LINENO: checking for main in -lpthread" >&5
     7109echo $ECHO_N "checking for main in -lpthread... $ECHO_C" >&6
     7110if test "${ac_cv_lib_pthread_main+set}" = set; then
    70437111  echo $ECHO_N "(cached) $ECHO_C" >&6
    70447112else
    70457113  ac_check_lib_save_LIBS=$LIBS
    7046 LIBS="-lpng  $LIBS"
     7114LIBS="-lpthread  $LIBS"
    70477115cat >conftest.$ac_ext <<_ACEOF
    70487116/* confdefs.h.  */
     
    70837151  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    70847152  (exit $ac_status); }; }; then
    7085   ac_cv_lib_png_main=yes
     7153  ac_cv_lib_pthread_main=yes
    70867154else
    70877155  echo "$as_me: failed program was:" >&5
    70887156sed 's/^/| /' conftest.$ac_ext >&5
    70897157
    7090 ac_cv_lib_png_main=no
     7158ac_cv_lib_pthread_main=no
    70917159fi
    70927160rm -f conftest.err conftest.$ac_objext \
     
    70947162LIBS=$ac_check_lib_save_LIBS
    70957163fi
    7096 echo "$as_me:$LINENO: result: $ac_cv_lib_png_main" >&5
    7097 echo "${ECHO_T}$ac_cv_lib_png_main" >&6
    7098 if test $ac_cv_lib_png_main = yes; then
    7099   FOUND_png=yes
    7100 fi
    7101 
    7102     if test x$FOUND_png = xyes ; then
    7103       LIBS="$LIBS -lpng"
    7104     else
    7105          echo "------------------"
    7106          echo "png library not found."
    7107          echo "please install the png library, which can be found at http://libpng.org/pub/png/libpng.html"
    7108          echo "------------------"
    7109          exit -1
    7110     fi
     7164echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_main" >&5
     7165echo "${ECHO_T}$ac_cv_lib_pthread_main" >&6
     7166if test $ac_cv_lib_pthread_main = yes; then
     7167  FOUND_pthread=yes
     7168fi
     7169
     7170   if test x$FOUND_pthread = xyes ; then
     7171      LIBS="$LIBS -lpthread"
     7172   fi
    71117173 fi
    71127174fi
    71137175
    7114 #-----#
    7115 # GTK #
    7116 #-----#
    7117 if test x$def_gtk = xyes; then
    7118 
    7119         #PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3, have_gtk2=yes, have_gtk2=no)
    7120         echo "$as_me:$LINENO: checking for gtk2.0" >&5
    7121 echo $ECHO_N "checking for gtk2.0... $ECHO_C" >&6
    7122         if `pkg-config --exists gtk+-2.0`; then
    7123                 echo "yes"
    7124                 have_gtk2=yes
    7125                 GTK2_LIBS=`pkg-config --libs gtk+-2.0`
    7126                 GTK2_CFLAGS=`pkg-config --cflags gtk+-2.0`
    7127 
    7128 cat >>confdefs.h <<_ACEOF
    7129 #define HAVE_GTK2 1
    7130 _ACEOF
    7131 
    7132         else
    7133                 echo "no"
    7134         fi
    7135 
    7136 fi
    7137 
    7138 
    7139 
    7140 
    7141 if test x$have_gtk2 = xyes; then
    7142   HAVE_GTK2_TRUE=
    7143   HAVE_GTK2_FALSE='#'
    7144 else
    7145   HAVE_GTK2_TRUE='#'
    7146   HAVE_GTK2_FALSE=
    7147 fi
    7148 
    7149 
    7150 #---------#
    7151 # gThread #
    7152 #---------#
    7153 if test x$def_gthread = xyes; then
    7154 
    7155         echo "$as_me:$LINENO: checking for gthread" >&5
    7156 echo $ECHO_N "checking for gthread... $ECHO_C" >&6
    7157         if `pkg-config --exists gthread-2.0`; then
    7158                 echo "yes"
    7159                 have_gthread=yes
    7160                 GTHREAD_LIBS=`pkg-config --libs gthread-2.0`
    7161                 GTHREAD_CFLAGS=`pkg-config --cflags gthread-2.0`
    7162 
    7163 cat >>confdefs.h <<_ACEOF
    7164 #define HAVE_GTHREAD 1
    7165 _ACEOF
    7166 
    7167         else
    7168                 echo "no"
    7169         fi
    7170 
    7171 fi
    7172 
    7173 
    7174 
    7175 
    7176 if test x$have_gthread = xyes; then
    7177   HAVE_GTHREAD_TRUE=
    7178   HAVE_GTHREAD_FALSE='#'
    7179 else
    7180   HAVE_GTHREAD_TRUE='#'
    7181   HAVE_GTHREAD_FALSE=
    7182 fi
    7183 
    7184 
    7185 #---------#
    7186 # libcURL #
    7187 #---------#
    7188 if test x$def_curl = xyes; then
    7189 
    7190 
    7191 for ac_header in curl/curl.h
     7176
     7177#--------#
     7178# efence #
     7179#--------#
     7180if test x$def_efence = xyes ; then
     7181  echo "$as_me:$LINENO: checking for main in -lefence" >&5
     7182echo $ECHO_N "checking for main in -lefence... $ECHO_C" >&6
     7183if test "${ac_cv_lib_efence_main+set}" = set; then
     7184  echo $ECHO_N "(cached) $ECHO_C" >&6
     7185else
     7186  ac_check_lib_save_LIBS=$LIBS
     7187LIBS="-lefence  $LIBS"
     7188cat >conftest.$ac_ext <<_ACEOF
     7189/* confdefs.h.  */
     7190_ACEOF
     7191cat confdefs.h >>conftest.$ac_ext
     7192cat >>conftest.$ac_ext <<_ACEOF
     7193/* end confdefs.h.  */
     7194
     7195
     7196int
     7197main ()
     7198{
     7199main ();
     7200  ;
     7201  return 0;
     7202}
     7203_ACEOF
     7204rm -f conftest.$ac_objext conftest$ac_exeext
     7205if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     7206  (eval $ac_link) 2>conftest.er1
     7207  ac_status=$?
     7208  grep -v '^ *+' conftest.er1 >conftest.err
     7209  rm -f conftest.er1
     7210  cat conftest.err >&5
     7211  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7212  (exit $ac_status); } &&
     7213         { ac_try='test -z "$ac_c_werror_flag"
     7214                         || test ! -s conftest.err'
     7215  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7216  (eval $ac_try) 2>&5
     7217  ac_status=$?
     7218  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7219  (exit $ac_status); }; } &&
     7220         { ac_try='test -s conftest$ac_exeext'
     7221  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7222  (eval $ac_try) 2>&5
     7223  ac_status=$?
     7224  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7225  (exit $ac_status); }; }; then
     7226  ac_cv_lib_efence_main=yes
     7227else
     7228  echo "$as_me: failed program was:" >&5
     7229sed 's/^/| /' conftest.$ac_ext >&5
     7230
     7231ac_cv_lib_efence_main=no
     7232fi
     7233rm -f conftest.err conftest.$ac_objext \
     7234      conftest$ac_exeext conftest.$ac_ext
     7235LIBS=$ac_check_lib_save_LIBS
     7236fi
     7237echo "$as_me:$LINENO: result: $ac_cv_lib_efence_main" >&5
     7238echo "${ECHO_T}$ac_cv_lib_efence_main" >&6
     7239if test $ac_cv_lib_efence_main = yes; then
     7240  FOUND_efence=yes
     7241fi
     7242
     7243   if test x$FOUND_efence = xyes ; then
     7244      LIBS="$LIBS -lefence"
     7245   fi
     7246
     7247fi
     7248
     7249# FIXME: Replace `main' with a function in `-lm':
     7250
     7251echo "$as_me:$LINENO: checking for main in -lm" >&5
     7252echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
     7253if test "${ac_cv_lib_m_main+set}" = set; then
     7254  echo $ECHO_N "(cached) $ECHO_C" >&6
     7255else
     7256  ac_check_lib_save_LIBS=$LIBS
     7257LIBS="-lm  $LIBS"
     7258cat >conftest.$ac_ext <<_ACEOF
     7259/* confdefs.h.  */
     7260_ACEOF
     7261cat confdefs.h >>conftest.$ac_ext
     7262cat >>conftest.$ac_ext <<_ACEOF
     7263/* end confdefs.h.  */
     7264
     7265
     7266int
     7267main ()
     7268{
     7269main ();
     7270  ;
     7271  return 0;
     7272}
     7273_ACEOF
     7274rm -f conftest.$ac_objext conftest$ac_exeext
     7275if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     7276  (eval $ac_link) 2>conftest.er1
     7277  ac_status=$?
     7278  grep -v '^ *+' conftest.er1 >conftest.err
     7279  rm -f conftest.er1
     7280  cat conftest.err >&5
     7281  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7282  (exit $ac_status); } &&
     7283         { ac_try='test -z "$ac_c_werror_flag"
     7284                         || test ! -s conftest.err'
     7285  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7286  (eval $ac_try) 2>&5
     7287  ac_status=$?
     7288  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7289  (exit $ac_status); }; } &&
     7290         { ac_try='test -s conftest$ac_exeext'
     7291  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7292  (eval $ac_try) 2>&5
     7293  ac_status=$?
     7294  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7295  (exit $ac_status); }; }; then
     7296  ac_cv_lib_m_main=yes
     7297else
     7298  echo "$as_me: failed program was:" >&5
     7299sed 's/^/| /' conftest.$ac_ext >&5
     7300
     7301ac_cv_lib_m_main=no
     7302fi
     7303rm -f conftest.err conftest.$ac_objext \
     7304      conftest$ac_exeext conftest.$ac_ext
     7305LIBS=$ac_check_lib_save_LIBS
     7306fi
     7307echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
     7308echo "${ECHO_T}$ac_cv_lib_m_main" >&6
     7309if test $ac_cv_lib_m_main = yes; then
     7310  cat >>confdefs.h <<_ACEOF
     7311#define HAVE_LIBM 1
     7312_ACEOF
     7313
     7314  LIBS="-lm $LIBS"
     7315
     7316fi
     7317
     7318
     7319
     7320# Checks for header files.
     7321echo "$as_me:$LINENO: checking for ANSI C header files" >&5
     7322echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
     7323if test "${ac_cv_header_stdc+set}" = set; then
     7324  echo $ECHO_N "(cached) $ECHO_C" >&6
     7325else
     7326  cat >conftest.$ac_ext <<_ACEOF
     7327/* confdefs.h.  */
     7328_ACEOF
     7329cat confdefs.h >>conftest.$ac_ext
     7330cat >>conftest.$ac_ext <<_ACEOF
     7331/* end confdefs.h.  */
     7332#include <stdlib.h>
     7333#include <stdarg.h>
     7334#include <string.h>
     7335#include <float.h>
     7336
     7337int
     7338main ()
     7339{
     7340
     7341  ;
     7342  return 0;
     7343}
     7344_ACEOF
     7345rm -f conftest.$ac_objext
     7346if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     7347  (eval $ac_compile) 2>conftest.er1
     7348  ac_status=$?
     7349  grep -v '^ *+' conftest.er1 >conftest.err
     7350  rm -f conftest.er1
     7351  cat conftest.err >&5
     7352  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7353  (exit $ac_status); } &&
     7354         { ac_try='test -z "$ac_c_werror_flag"
     7355                         || test ! -s conftest.err'
     7356  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7357  (eval $ac_try) 2>&5
     7358  ac_status=$?
     7359  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7360  (exit $ac_status); }; } &&
     7361         { ac_try='test -s conftest.$ac_objext'
     7362  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7363  (eval $ac_try) 2>&5
     7364  ac_status=$?
     7365  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7366  (exit $ac_status); }; }; then
     7367  ac_cv_header_stdc=yes
     7368else
     7369  echo "$as_me: failed program was:" >&5
     7370sed 's/^/| /' conftest.$ac_ext >&5
     7371
     7372ac_cv_header_stdc=no
     7373fi
     7374rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     7375
     7376if test $ac_cv_header_stdc = yes; then
     7377  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
     7378  cat >conftest.$ac_ext <<_ACEOF
     7379/* confdefs.h.  */
     7380_ACEOF
     7381cat confdefs.h >>conftest.$ac_ext
     7382cat >>conftest.$ac_ext <<_ACEOF
     7383/* end confdefs.h.  */
     7384#include <string.h>
     7385
     7386_ACEOF
     7387if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
     7388  $EGREP "memchr" >/dev/null 2>&1; then
     7389  :
     7390else
     7391  ac_cv_header_stdc=no
     7392fi
     7393rm -f conftest*
     7394
     7395fi
     7396
     7397if test $ac_cv_header_stdc = yes; then
     7398  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
     7399  cat >conftest.$ac_ext <<_ACEOF
     7400/* confdefs.h.  */
     7401_ACEOF
     7402cat confdefs.h >>conftest.$ac_ext
     7403cat >>conftest.$ac_ext <<_ACEOF
     7404/* end confdefs.h.  */
     7405#include <stdlib.h>
     7406
     7407_ACEOF
     7408if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
     7409  $EGREP "free" >/dev/null 2>&1; then
     7410  :
     7411else
     7412  ac_cv_header_stdc=no
     7413fi
     7414rm -f conftest*
     7415
     7416fi
     7417
     7418if test $ac_cv_header_stdc = yes; then
     7419  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
     7420  if test "$cross_compiling" = yes; then
     7421  :
     7422else
     7423  cat >conftest.$ac_ext <<_ACEOF
     7424/* confdefs.h.  */
     7425_ACEOF
     7426cat confdefs.h >>conftest.$ac_ext
     7427cat >>conftest.$ac_ext <<_ACEOF
     7428/* end confdefs.h.  */
     7429#include <ctype.h>
     7430#if ((' ' & 0x0FF) == 0x020)
     7431# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
     7432# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
     7433#else
     7434# define ISLOWER(c) \
     7435                   (('a' <= (c) && (c) <= 'i') \
     7436                     || ('j' <= (c) && (c) <= 'r') \
     7437                     || ('s' <= (c) && (c) <= 'z'))
     7438# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
     7439#endif
     7440
     7441#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
     7442int
     7443main ()
     7444{
     7445  int i;
     7446  for (i = 0; i < 256; i++)
     7447    if (XOR (islower (i), ISLOWER (i))
     7448        || toupper (i) != TOUPPER (i))
     7449      exit(2);
     7450  exit (0);
     7451}
     7452_ACEOF
     7453rm -f conftest$ac_exeext
     7454if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     7455  (eval $ac_link) 2>&5
     7456  ac_status=$?
     7457  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7458  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
     7459  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7460  (eval $ac_try) 2>&5
     7461  ac_status=$?
     7462  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7463  (exit $ac_status); }; }; then
     7464  :
     7465else
     7466  echo "$as_me: program exited with status $ac_status" >&5
     7467echo "$as_me: failed program was:" >&5
     7468sed 's/^/| /' conftest.$ac_ext >&5
     7469
     7470( exit $ac_status )
     7471ac_cv_header_stdc=no
     7472fi
     7473rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
     7474fi
     7475fi
     7476fi
     7477echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
     7478echo "${ECHO_T}$ac_cv_header_stdc" >&6
     7479if test $ac_cv_header_stdc = yes; then
     7480
     7481cat >>confdefs.h <<\_ACEOF
     7482#define STDC_HEADERS 1
     7483_ACEOF
     7484
     7485fi
     7486
     7487
     7488
     7489for ac_header in stdlib.h string.h
    71927490do
    71937491as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     
    73337631#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
    73347632_ACEOF
    7335  curlHeader="yes"
    7336 else
    7337   curlHeader="no"
     7633
    73387634fi
    73397635
    73407636done
    73417637
    7342  echo "$as_me:$LINENO: checking for main in -lcurl" >&5
    7343 echo $ECHO_N "checking for main in -lcurl... $ECHO_C" >&6
    7344 if test "${ac_cv_lib_curl_main+set}" = set; then
     7638
     7639# Checks for typedefs, structures, and compiler characteristics.
     7640echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5
     7641echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6
     7642if test "${ac_cv_header_stdbool_h+set}" = set; then
    73457643  echo $ECHO_N "(cached) $ECHO_C" >&6
    73467644else
    7347   ac_check_lib_save_LIBS=$LIBS
    7348 LIBS="-lcurl  $LIBS"
    7349 cat >conftest.$ac_ext <<_ACEOF
     7645  cat >conftest.$ac_ext <<_ACEOF
    73507646/* confdefs.h.  */
    73517647_ACEOF
     
    73547650/* end confdefs.h.  */
    73557651
     7652#include <stdbool.h>
     7653#ifndef bool
     7654# error bool is not defined
     7655#endif
     7656#ifndef false
     7657# error false is not defined
     7658#endif
     7659#if false
     7660# error false is not 0
     7661#endif
     7662#ifndef true
     7663# error true is not defined
     7664#endif
     7665#if true != 1
     7666# error true is not 1
     7667#endif
     7668#ifndef __bool_true_false_are_defined
     7669# error __bool_true_false_are_defined is not defined
     7670#endif
     7671
     7672        struct s { _Bool s: 1; _Bool t; } s;
     7673
     7674        char a[true == 1 ? 1 : -1];
     7675        char b[false == 0 ? 1 : -1];
     7676        char c[__bool_true_false_are_defined == 1 ? 1 : -1];
     7677        char d[(bool) -0.5 == true ? 1 : -1];
     7678        bool e = &s;
     7679        char f[(_Bool) -0.0 == false ? 1 : -1];
     7680        char g[true];
     7681        char h[sizeof (_Bool)];
     7682        char i[sizeof s.t];
    73567683
    73577684int
    73587685main ()
    73597686{
    7360 main ();
     7687 return !a + !b + !c + !d + !e + !f + !g + !h + !i;
    73617688  ;
    73627689  return 0;
    73637690}
    73647691_ACEOF
    7365 rm -f conftest.$ac_objext conftest$ac_exeext
    7366 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
    7367   (eval $ac_link) 2>conftest.er1
     7692rm -f conftest.$ac_objext
     7693if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     7694  (eval $ac_compile) 2>conftest.er1
    73687695  ac_status=$?
    73697696  grep -v '^ *+' conftest.er1 >conftest.err
     
    73797706  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    73807707  (exit $ac_status); }; } &&
    7381          { ac_try='test -s conftest$ac_exeext'
     7708         { ac_try='test -s conftest.$ac_objext'
    73827709  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    73837710  (eval $ac_try) 2>&5
     
    73857712  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    73867713  (exit $ac_status); }; }; then
    7387   ac_cv_lib_curl_main=yes
     7714  ac_cv_header_stdbool_h=yes
    73887715else
    73897716  echo "$as_me: failed program was:" >&5
    73907717sed 's/^/| /' conftest.$ac_ext >&5
    73917718
    7392 ac_cv_lib_curl_main=no
    7393 fi
    7394 rm -f conftest.err conftest.$ac_objext \
    7395       conftest$ac_exeext conftest.$ac_ext
    7396 LIBS=$ac_check_lib_save_LIBS
    7397 fi
    7398 echo "$as_me:$LINENO: result: $ac_cv_lib_curl_main" >&5
    7399 echo "${ECHO_T}$ac_cv_lib_curl_main" >&6
    7400 if test $ac_cv_lib_curl_main = yes; then
    7401   FOUND_curl=yes
    7402 fi
    7403 
    7404  if test x$curlHeader = xyes & test x$FOUND_curl = xyes ; then
    7405   have_curl=yes
    7406   CURL_LIBS=`curl-config --libs`
    7407   CURLCFLAGS=`curl-config --cflags`
     7719ac_cv_header_stdbool_h=no
     7720fi
     7721rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     7722fi
     7723echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5
     7724echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6
     7725echo "$as_me:$LINENO: checking for _Bool" >&5
     7726echo $ECHO_N "checking for _Bool... $ECHO_C" >&6
     7727if test "${ac_cv_type__Bool+set}" = set; then
     7728  echo $ECHO_N "(cached) $ECHO_C" >&6
     7729else
     7730  cat >conftest.$ac_ext <<_ACEOF
     7731/* confdefs.h.  */
     7732_ACEOF
     7733cat confdefs.h >>conftest.$ac_ext
     7734cat >>conftest.$ac_ext <<_ACEOF
     7735/* end confdefs.h.  */
     7736$ac_includes_default
     7737int
     7738main ()
     7739{
     7740if ((_Bool *) 0)
     7741  return 0;
     7742if (sizeof (_Bool))
     7743  return 0;
     7744  ;
     7745  return 0;
     7746}
     7747_ACEOF
     7748rm -f conftest.$ac_objext
     7749if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     7750  (eval $ac_compile) 2>conftest.er1
     7751  ac_status=$?
     7752  grep -v '^ *+' conftest.er1 >conftest.err
     7753  rm -f conftest.er1
     7754  cat conftest.err >&5
     7755  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7756  (exit $ac_status); } &&
     7757         { ac_try='test -z "$ac_c_werror_flag"
     7758                         || test ! -s conftest.err'
     7759  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7760  (eval $ac_try) 2>&5
     7761  ac_status=$?
     7762  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7763  (exit $ac_status); }; } &&
     7764         { ac_try='test -s conftest.$ac_objext'
     7765  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7766  (eval $ac_try) 2>&5
     7767  ac_status=$?
     7768  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7769  (exit $ac_status); }; }; then
     7770  ac_cv_type__Bool=yes
     7771else
     7772  echo "$as_me: failed program was:" >&5
     7773sed 's/^/| /' conftest.$ac_ext >&5
     7774
     7775ac_cv_type__Bool=no
     7776fi
     7777rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     7778fi
     7779echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
     7780echo "${ECHO_T}$ac_cv_type__Bool" >&6
     7781if test $ac_cv_type__Bool = yes; then
    74087782
    74097783cat >>confdefs.h <<_ACEOF
    7410 #define HAVE_CURL 1
    7411 _ACEOF
    7412 
    7413  else
    7414   have_curl=no
    7415  fi
    7416 
    7417 fi
    7418 
    7419 
    7420 
    7421 
    7422 if test x$have_curl = xyes; then
    7423   HAVE_CURL_TRUE=
    7424   HAVE_CURL_FALSE='#'
    7425 else
    7426   HAVE_CURL_TRUE='#'
    7427   HAVE_CURL_FALSE=
    7428 fi
    7429 
    7430 
    7431 #---------#
    7432 # pthread #
    7433 #---------#
    7434 if test x$def_pthread = xyes ; then
    7435  if test x$have_gthread = xyes ; then
    7436 
    7437 for ac_header in pthread.h
     7784#define HAVE__BOOL 1
     7785_ACEOF
     7786
     7787
     7788fi
     7789
     7790if test $ac_cv_header_stdbool_h = yes; then
     7791
     7792cat >>confdefs.h <<\_ACEOF
     7793#define HAVE_STDBOOL_H 1
     7794_ACEOF
     7795
     7796fi
     7797
     7798
     7799# Checks for library functions.
     7800
     7801for ac_header in stdlib.h
    74387802do
    74397803as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     
    75797943#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
    75807944_ACEOF
    7581  pthreadHeader="yes"
    7582 else
    7583   pthreadHeader="no"
    7584 fi
    7585 
    7586 done
    7587 
    7588   echo "$as_me:$LINENO: checking for main in -lpthread" >&5
    7589 echo $ECHO_N "checking for main in -lpthread... $ECHO_C" >&6
    7590 if test "${ac_cv_lib_pthread_main+set}" = set; then
    7591   echo $ECHO_N "(cached) $ECHO_C" >&6
    7592 else
    7593   ac_check_lib_save_LIBS=$LIBS
    7594 LIBS="-lpthread  $LIBS"
    7595 cat >conftest.$ac_ext <<_ACEOF
    7596 /* confdefs.h.  */
    7597 _ACEOF
    7598 cat confdefs.h >>conftest.$ac_ext
    7599 cat >>conftest.$ac_ext <<_ACEOF
    7600 /* end confdefs.h.  */
    7601 
    7602 
    7603 int
    7604 main ()
    7605 {
    7606 main ();
    7607   ;
    7608   return 0;
    7609 }
    7610 _ACEOF
    7611 rm -f conftest.$ac_objext conftest$ac_exeext
    7612 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
    7613   (eval $ac_link) 2>conftest.er1
    7614   ac_status=$?
    7615   grep -v '^ *+' conftest.er1 >conftest.err
    7616   rm -f conftest.er1
    7617   cat conftest.err >&5
    7618   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    7619   (exit $ac_status); } &&
    7620          { ac_try='test -z "$ac_c_werror_flag"
    7621                          || test ! -s conftest.err'
    7622   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    7623   (eval $ac_try) 2>&5
    7624   ac_status=$?
    7625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    7626   (exit $ac_status); }; } &&
    7627          { ac_try='test -s conftest$ac_exeext'
    7628   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    7629   (eval $ac_try) 2>&5
    7630   ac_status=$?
    7631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    7632   (exit $ac_status); }; }; then
    7633   ac_cv_lib_pthread_main=yes
    7634 else
    7635   echo "$as_me: failed program was:" >&5
    7636 sed 's/^/| /' conftest.$ac_ext >&5
    7637 
    7638 ac_cv_lib_pthread_main=no
    7639 fi
    7640 rm -f conftest.err conftest.$ac_objext \
    7641       conftest$ac_exeext conftest.$ac_ext
    7642 LIBS=$ac_check_lib_save_LIBS
    7643 fi
    7644 echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_main" >&5
    7645 echo "${ECHO_T}$ac_cv_lib_pthread_main" >&6
    7646 if test $ac_cv_lib_pthread_main = yes; then
    7647   FOUND_pthread=yes
    7648 fi
    7649 
    7650    if test x$FOUND_pthread = xyes ; then
    7651       LIBS="$LIBS -lpthread"
    7652    fi
    7653  fi
    7654 fi
    7655 
    7656 
    7657 # FIXME: Replace `main' with a function in `-lm':
    7658 
    7659 echo "$as_me:$LINENO: checking for main in -lm" >&5
    7660 echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
    7661 if test "${ac_cv_lib_m_main+set}" = set; then
    7662   echo $ECHO_N "(cached) $ECHO_C" >&6
    7663 else
    7664   ac_check_lib_save_LIBS=$LIBS
    7665 LIBS="-lm  $LIBS"
    7666 cat >conftest.$ac_ext <<_ACEOF
    7667 /* confdefs.h.  */
    7668 _ACEOF
    7669 cat confdefs.h >>conftest.$ac_ext
    7670 cat >>conftest.$ac_ext <<_ACEOF
    7671 /* end confdefs.h.  */
    7672 
    7673 
    7674 int
    7675 main ()
    7676 {
    7677 main ();
    7678   ;
    7679   return 0;
    7680 }
    7681 _ACEOF
    7682 rm -f conftest.$ac_objext conftest$ac_exeext
    7683 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
    7684   (eval $ac_link) 2>conftest.er1
    7685   ac_status=$?
    7686   grep -v '^ *+' conftest.er1 >conftest.err
    7687   rm -f conftest.er1
    7688   cat conftest.err >&5
    7689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    7690   (exit $ac_status); } &&
    7691          { ac_try='test -z "$ac_c_werror_flag"
    7692                          || test ! -s conftest.err'
    7693   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    7694   (eval $ac_try) 2>&5
    7695   ac_status=$?
    7696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    7697   (exit $ac_status); }; } &&
    7698          { ac_try='test -s conftest$ac_exeext'
    7699   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    7700   (eval $ac_try) 2>&5
    7701   ac_status=$?
    7702   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    7703   (exit $ac_status); }; }; then
    7704   ac_cv_lib_m_main=yes
    7705 else
    7706   echo "$as_me: failed program was:" >&5
    7707 sed 's/^/| /' conftest.$ac_ext >&5
    7708 
    7709 ac_cv_lib_m_main=no
    7710 fi
    7711 rm -f conftest.err conftest.$ac_objext \
    7712       conftest$ac_exeext conftest.$ac_ext
    7713 LIBS=$ac_check_lib_save_LIBS
    7714 fi
    7715 echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
    7716 echo "${ECHO_T}$ac_cv_lib_m_main" >&6
    7717 if test $ac_cv_lib_m_main = yes; then
    7718   cat >>confdefs.h <<_ACEOF
    7719 #define HAVE_LIBM 1
    7720 _ACEOF
    7721 
    7722   LIBS="-lm $LIBS"
    7723 
    7724 fi
    7725 
    7726 
    7727 
    7728 # Checks for header files.
    7729 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
    7730 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
    7731 if test "${ac_cv_header_stdc+set}" = set; then
    7732   echo $ECHO_N "(cached) $ECHO_C" >&6
    7733 else
    7734   cat >conftest.$ac_ext <<_ACEOF
    7735 /* confdefs.h.  */
    7736 _ACEOF
    7737 cat confdefs.h >>conftest.$ac_ext
    7738 cat >>conftest.$ac_ext <<_ACEOF
    7739 /* end confdefs.h.  */
    7740 #include <stdlib.h>
    7741 #include <stdarg.h>
    7742 #include <string.h>
    7743 #include <float.h>
    7744 
    7745 int
    7746 main ()
    7747 {
    7748 
    7749   ;
    7750   return 0;
    7751 }
    7752 _ACEOF
    7753 rm -f conftest.$ac_objext
    7754 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    7755   (eval $ac_compile) 2>conftest.er1
    7756   ac_status=$?
    7757   grep -v '^ *+' conftest.er1 >conftest.err
    7758   rm -f conftest.er1
    7759   cat conftest.err >&5
    7760   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    7761   (exit $ac_status); } &&
    7762          { ac_try='test -z "$ac_c_werror_flag"
    7763                          || test ! -s conftest.err'
    7764   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    7765   (eval $ac_try) 2>&5
    7766   ac_status=$?
    7767   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    7768   (exit $ac_status); }; } &&
    7769          { ac_try='test -s conftest.$ac_objext'
    7770   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    7771   (eval $ac_try) 2>&5
    7772   ac_status=$?
    7773   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    7774   (exit $ac_status); }; }; then
    7775   ac_cv_header_stdc=yes
    7776 else
    7777   echo "$as_me: failed program was:" >&5
    7778 sed 's/^/| /' conftest.$ac_ext >&5
    7779 
    7780 ac_cv_header_stdc=no
    7781 fi
    7782 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    7783 
    7784 if test $ac_cv_header_stdc = yes; then
    7785   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
    7786   cat >conftest.$ac_ext <<_ACEOF
    7787 /* confdefs.h.  */
    7788 _ACEOF
    7789 cat confdefs.h >>conftest.$ac_ext
    7790 cat >>conftest.$ac_ext <<_ACEOF
    7791 /* end confdefs.h.  */
    7792 #include <string.h>
    7793 
    7794 _ACEOF
    7795 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
    7796   $EGREP "memchr" >/dev/null 2>&1; then
    7797   :
    7798 else
    7799   ac_cv_header_stdc=no
    7800 fi
    7801 rm -f conftest*
    7802 
    7803 fi
    7804 
    7805 if test $ac_cv_header_stdc = yes; then
    7806   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
    7807   cat >conftest.$ac_ext <<_ACEOF
    7808 /* confdefs.h.  */
    7809 _ACEOF
    7810 cat confdefs.h >>conftest.$ac_ext
    7811 cat >>conftest.$ac_ext <<_ACEOF
    7812 /* end confdefs.h.  */
    7813 #include <stdlib.h>
    7814 
    7815 _ACEOF
    7816 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
    7817   $EGREP "free" >/dev/null 2>&1; then
    7818   :
    7819 else
    7820   ac_cv_header_stdc=no
    7821 fi
    7822 rm -f conftest*
    7823 
    7824 fi
    7825 
    7826 if test $ac_cv_header_stdc = yes; then
    7827   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
    7828   if test "$cross_compiling" = yes; then
    7829   :
    7830 else
    7831   cat >conftest.$ac_ext <<_ACEOF
    7832 /* confdefs.h.  */
    7833 _ACEOF
    7834 cat confdefs.h >>conftest.$ac_ext
    7835 cat >>conftest.$ac_ext <<_ACEOF
    7836 /* end confdefs.h.  */
    7837 #include <ctype.h>
    7838 #if ((' ' & 0x0FF) == 0x020)
    7839 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
    7840 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
    7841 #else
    7842 # define ISLOWER(c) \
    7843                    (('a' <= (c) && (c) <= 'i') \
    7844                      || ('j' <= (c) && (c) <= 'r') \
    7845                      || ('s' <= (c) && (c) <= 'z'))
    7846 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
    7847 #endif
    7848 
    7849 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
    7850 int
    7851 main ()
    7852 {
    7853   int i;
    7854   for (i = 0; i < 256; i++)
    7855     if (XOR (islower (i), ISLOWER (i))
    7856         || toupper (i) != TOUPPER (i))
    7857       exit(2);
    7858   exit (0);
    7859 }
    7860 _ACEOF
    7861 rm -f conftest$ac_exeext
    7862 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
    7863   (eval $ac_link) 2>&5
    7864   ac_status=$?
    7865   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    7866   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
    7867   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    7868   (eval $ac_try) 2>&5
    7869   ac_status=$?
    7870   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    7871   (exit $ac_status); }; }; then
    7872   :
    7873 else
    7874   echo "$as_me: program exited with status $ac_status" >&5
    7875 echo "$as_me: failed program was:" >&5
    7876 sed 's/^/| /' conftest.$ac_ext >&5
    7877 
    7878 ( exit $ac_status )
    7879 ac_cv_header_stdc=no
    7880 fi
    7881 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
    7882 fi
    7883 fi
    7884 fi
    7885 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
    7886 echo "${ECHO_T}$ac_cv_header_stdc" >&6
    7887 if test $ac_cv_header_stdc = yes; then
    7888 
    7889 cat >>confdefs.h <<\_ACEOF
    7890 #define STDC_HEADERS 1
    7891 _ACEOF
    7892 
    7893 fi
    7894 
    7895 
    7896 
    7897 for ac_header in stdlib.h string.h
    7898 do
    7899 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
    7900 if eval "test \"\${$as_ac_Header+set}\" = set"; then
    7901   echo "$as_me:$LINENO: checking for $ac_header" >&5
    7902 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
    7903 if eval "test \"\${$as_ac_Header+set}\" = set"; then
    7904   echo $ECHO_N "(cached) $ECHO_C" >&6
    7905 fi
    7906 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
    7907 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
    7908 else
    7909   # Is the header compilable?
    7910 echo "$as_me:$LINENO: checking $ac_header usability" >&5
    7911 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
    7912 cat >conftest.$ac_ext <<_ACEOF
    7913 /* confdefs.h.  */
    7914 _ACEOF
    7915 cat confdefs.h >>conftest.$ac_ext
    7916 cat >>conftest.$ac_ext <<_ACEOF
    7917 /* end confdefs.h.  */
    7918 $ac_includes_default
    7919 #include <$ac_header>
    7920 _ACEOF
    7921 rm -f conftest.$ac_objext
    7922 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    7923   (eval $ac_compile) 2>conftest.er1
    7924   ac_status=$?
    7925   grep -v '^ *+' conftest.er1 >conftest.err
    7926   rm -f conftest.er1
    7927   cat conftest.err >&5
    7928   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    7929   (exit $ac_status); } &&
    7930          { ac_try='test -z "$ac_c_werror_flag"
    7931                          || test ! -s conftest.err'
    7932   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    7933   (eval $ac_try) 2>&5
    7934   ac_status=$?
    7935   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    7936   (exit $ac_status); }; } &&
    7937          { ac_try='test -s conftest.$ac_objext'
    7938   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    7939   (eval $ac_try) 2>&5
    7940   ac_status=$?
    7941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    7942   (exit $ac_status); }; }; then
    7943   ac_header_compiler=yes
    7944 else
    7945   echo "$as_me: failed program was:" >&5
    7946 sed 's/^/| /' conftest.$ac_ext >&5
    7947 
    7948 ac_header_compiler=no
    7949 fi
    7950 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    7951 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
    7952 echo "${ECHO_T}$ac_header_compiler" >&6
    7953 
    7954 # Is the header present?
    7955 echo "$as_me:$LINENO: checking $ac_header presence" >&5
    7956 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
    7957 cat >conftest.$ac_ext <<_ACEOF
    7958 /* confdefs.h.  */
    7959 _ACEOF
    7960 cat confdefs.h >>conftest.$ac_ext
    7961 cat >>conftest.$ac_ext <<_ACEOF
    7962 /* end confdefs.h.  */
    7963 #include <$ac_header>
    7964 _ACEOF
    7965 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
    7966   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
    7967   ac_status=$?
    7968   grep -v '^ *+' conftest.er1 >conftest.err
    7969   rm -f conftest.er1
    7970   cat conftest.err >&5
    7971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    7972   (exit $ac_status); } >/dev/null; then
    7973   if test -s conftest.err; then
    7974     ac_cpp_err=$ac_c_preproc_warn_flag
    7975     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
    7976   else
    7977     ac_cpp_err=
    7978   fi
    7979 else
    7980   ac_cpp_err=yes
    7981 fi
    7982 if test -z "$ac_cpp_err"; then
    7983   ac_header_preproc=yes
    7984 else
    7985   echo "$as_me: failed program was:" >&5
    7986 sed 's/^/| /' conftest.$ac_ext >&5
    7987 
    7988   ac_header_preproc=no
    7989 fi
    7990 rm -f conftest.err conftest.$ac_ext
    7991 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
    7992 echo "${ECHO_T}$ac_header_preproc" >&6
    7993 
    7994 # So?  What about this header?
    7995 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
    7996   yes:no: )
    7997     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
    7998 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    7999     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
    8000 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    8001     ac_header_preproc=yes
    8002     ;;
    8003   no:yes:* )
    8004     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
    8005 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    8006     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
    8007 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    8008     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
    8009 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    8010     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
    8011 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    8012     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
    8013 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    8014     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
    8015 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
    8016     (
    8017       cat <<\_ASBOX
    8018 ## ---------------------------------------------- ##
    8019 ## Report this to orxonox-dev at mail.datacore.ch ##
    8020 ## ---------------------------------------------- ##
    8021 _ASBOX
    8022     ) |
    8023       sed "s/^/$as_me: WARNING:     /" >&2
    8024     ;;
    8025 esac
    8026 echo "$as_me:$LINENO: checking for $ac_header" >&5
    8027 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
    8028 if eval "test \"\${$as_ac_Header+set}\" = set"; then
    8029   echo $ECHO_N "(cached) $ECHO_C" >&6
    8030 else
    8031   eval "$as_ac_Header=\$ac_header_preproc"
    8032 fi
    8033 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
    8034 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
    8035 
    8036 fi
    8037 if test `eval echo '${'$as_ac_Header'}'` = yes; then
    8038   cat >>confdefs.h <<_ACEOF
    8039 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
    8040 _ACEOF
    8041 
    8042 fi
    8043 
    8044 done
    8045 
    8046 
    8047 # Checks for typedefs, structures, and compiler characteristics.
    8048 echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5
    8049 echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6
    8050 if test "${ac_cv_header_stdbool_h+set}" = set; then
    8051   echo $ECHO_N "(cached) $ECHO_C" >&6
    8052 else
    8053   cat >conftest.$ac_ext <<_ACEOF
    8054 /* confdefs.h.  */
    8055 _ACEOF
    8056 cat confdefs.h >>conftest.$ac_ext
    8057 cat >>conftest.$ac_ext <<_ACEOF
    8058 /* end confdefs.h.  */
    8059 
    8060 #include <stdbool.h>
    8061 #ifndef bool
    8062 # error bool is not defined
    8063 #endif
    8064 #ifndef false
    8065 # error false is not defined
    8066 #endif
    8067 #if false
    8068 # error false is not 0
    8069 #endif
    8070 #ifndef true
    8071 # error true is not defined
    8072 #endif
    8073 #if true != 1
    8074 # error true is not 1
    8075 #endif
    8076 #ifndef __bool_true_false_are_defined
    8077 # error __bool_true_false_are_defined is not defined
    8078 #endif
    8079 
    8080         struct s { _Bool s: 1; _Bool t; } s;
    8081 
    8082         char a[true == 1 ? 1 : -1];
    8083         char b[false == 0 ? 1 : -1];
    8084         char c[__bool_true_false_are_defined == 1 ? 1 : -1];
    8085         char d[(bool) -0.5 == true ? 1 : -1];
    8086         bool e = &s;
    8087         char f[(_Bool) -0.0 == false ? 1 : -1];
    8088         char g[true];
    8089         char h[sizeof (_Bool)];
    8090         char i[sizeof s.t];
    8091 
    8092 int
    8093 main ()
    8094 {
    8095  return !a + !b + !c + !d + !e + !f + !g + !h + !i;
    8096   ;
    8097   return 0;
    8098 }
    8099 _ACEOF
    8100 rm -f conftest.$ac_objext
    8101 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    8102   (eval $ac_compile) 2>conftest.er1
    8103   ac_status=$?
    8104   grep -v '^ *+' conftest.er1 >conftest.err
    8105   rm -f conftest.er1
    8106   cat conftest.err >&5
    8107   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    8108   (exit $ac_status); } &&
    8109          { ac_try='test -z "$ac_c_werror_flag"
    8110                          || test ! -s conftest.err'
    8111   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    8112   (eval $ac_try) 2>&5
    8113   ac_status=$?
    8114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    8115   (exit $ac_status); }; } &&
    8116          { ac_try='test -s conftest.$ac_objext'
    8117   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    8118   (eval $ac_try) 2>&5
    8119   ac_status=$?
    8120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    8121   (exit $ac_status); }; }; then
    8122   ac_cv_header_stdbool_h=yes
    8123 else
    8124   echo "$as_me: failed program was:" >&5
    8125 sed 's/^/| /' conftest.$ac_ext >&5
    8126 
    8127 ac_cv_header_stdbool_h=no
    8128 fi
    8129 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    8130 fi
    8131 echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5
    8132 echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6
    8133 echo "$as_me:$LINENO: checking for _Bool" >&5
    8134 echo $ECHO_N "checking for _Bool... $ECHO_C" >&6
    8135 if test "${ac_cv_type__Bool+set}" = set; then
    8136   echo $ECHO_N "(cached) $ECHO_C" >&6
    8137 else
    8138   cat >conftest.$ac_ext <<_ACEOF
    8139 /* confdefs.h.  */
    8140 _ACEOF
    8141 cat confdefs.h >>conftest.$ac_ext
    8142 cat >>conftest.$ac_ext <<_ACEOF
    8143 /* end confdefs.h.  */
    8144 $ac_includes_default
    8145 int
    8146 main ()
    8147 {
    8148 if ((_Bool *) 0)
    8149   return 0;
    8150 if (sizeof (_Bool))
    8151   return 0;
    8152   ;
    8153   return 0;
    8154 }
    8155 _ACEOF
    8156 rm -f conftest.$ac_objext
    8157 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    8158   (eval $ac_compile) 2>conftest.er1
    8159   ac_status=$?
    8160   grep -v '^ *+' conftest.er1 >conftest.err
    8161   rm -f conftest.er1
    8162   cat conftest.err >&5
    8163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    8164   (exit $ac_status); } &&
    8165          { ac_try='test -z "$ac_c_werror_flag"
    8166                          || test ! -s conftest.err'
    8167   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    8168   (eval $ac_try) 2>&5
    8169   ac_status=$?
    8170   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    8171   (exit $ac_status); }; } &&
    8172          { ac_try='test -s conftest.$ac_objext'
    8173   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    8174   (eval $ac_try) 2>&5
    8175   ac_status=$?
    8176   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    8177   (exit $ac_status); }; }; then
    8178   ac_cv_type__Bool=yes
    8179 else
    8180   echo "$as_me: failed program was:" >&5
    8181 sed 's/^/| /' conftest.$ac_ext >&5
    8182 
    8183 ac_cv_type__Bool=no
    8184 fi
    8185 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    8186 fi
    8187 echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
    8188 echo "${ECHO_T}$ac_cv_type__Bool" >&6
    8189 if test $ac_cv_type__Bool = yes; then
    8190 
    8191 cat >>confdefs.h <<_ACEOF
    8192 #define HAVE__BOOL 1
    8193 _ACEOF
    8194 
    8195 
    8196 fi
    8197 
    8198 if test $ac_cv_header_stdbool_h = yes; then
    8199 
    8200 cat >>confdefs.h <<\_ACEOF
    8201 #define HAVE_STDBOOL_H 1
    8202 _ACEOF
    8203 
    8204 fi
    8205 
    8206 
    8207 # Checks for library functions.
    8208 
    8209 for ac_header in stdlib.h
    8210 do
    8211 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
    8212 if eval "test \"\${$as_ac_Header+set}\" = set"; then
    8213   echo "$as_me:$LINENO: checking for $ac_header" >&5
    8214 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
    8215 if eval "test \"\${$as_ac_Header+set}\" = set"; then
    8216   echo $ECHO_N "(cached) $ECHO_C" >&6
    8217 fi
    8218 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
    8219 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
    8220 else
    8221   # Is the header compilable?
    8222 echo "$as_me:$LINENO: checking $ac_header usability" >&5
    8223 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
    8224 cat >conftest.$ac_ext <<_ACEOF
    8225 /* confdefs.h.  */
    8226 _ACEOF
    8227 cat confdefs.h >>conftest.$ac_ext
    8228 cat >>conftest.$ac_ext <<_ACEOF
    8229 /* end confdefs.h.  */
    8230 $ac_includes_default
    8231 #include <$ac_header>
    8232 _ACEOF
    8233 rm -f conftest.$ac_objext
    8234 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    8235   (eval $ac_compile) 2>conftest.er1
    8236   ac_status=$?
    8237   grep -v '^ *+' conftest.er1 >conftest.err
    8238   rm -f conftest.er1
    8239   cat conftest.err >&5
    8240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    8241   (exit $ac_status); } &&
    8242          { ac_try='test -z "$ac_c_werror_flag"
    8243                          || test ! -s conftest.err'
    8244   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    8245   (eval $ac_try) 2>&5
    8246   ac_status=$?
    8247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    8248   (exit $ac_status); }; } &&
    8249          { ac_try='test -s conftest.$ac_objext'
    8250   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    8251   (eval $ac_try) 2>&5
    8252   ac_status=$?
    8253   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    8254   (exit $ac_status); }; }; then
    8255   ac_header_compiler=yes
    8256 else
    8257   echo "$as_me: failed program was:" >&5
    8258 sed 's/^/| /' conftest.$ac_ext >&5
    8259 
    8260 ac_header_compiler=no
    8261 fi
    8262 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    8263 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
    8264 echo "${ECHO_T}$ac_header_compiler" >&6
    8265 
    8266 # Is the header present?
    8267 echo "$as_me:$LINENO: checking $ac_header presence" >&5
    8268 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
    8269 cat >conftest.$ac_ext <<_ACEOF
    8270 /* confdefs.h.  */
    8271 _ACEOF
    8272 cat confdefs.h >>conftest.$ac_ext
    8273 cat >>conftest.$ac_ext <<_ACEOF
    8274 /* end confdefs.h.  */
    8275 #include <$ac_header>
    8276 _ACEOF
    8277 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
    8278   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
    8279   ac_status=$?
    8280   grep -v '^ *+' conftest.er1 >conftest.err
    8281   rm -f conftest.er1
    8282   cat conftest.err >&5
    8283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    8284   (exit $ac_status); } >/dev/null; then
    8285   if test -s conftest.err; then
    8286     ac_cpp_err=$ac_c_preproc_warn_flag
    8287     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
    8288   else
    8289     ac_cpp_err=
    8290   fi
    8291 else
    8292   ac_cpp_err=yes
    8293 fi
    8294 if test -z "$ac_cpp_err"; then
    8295   ac_header_preproc=yes
    8296 else
    8297   echo "$as_me: failed program was:" >&5
    8298 sed 's/^/| /' conftest.$ac_ext >&5
    8299 
    8300   ac_header_preproc=no
    8301 fi
    8302 rm -f conftest.err conftest.$ac_ext
    8303 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
    8304 echo "${ECHO_T}$ac_header_preproc" >&6
    8305 
    8306 # So?  What about this header?
    8307 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
    8308   yes:no: )
    8309     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
    8310 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    8311     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
    8312 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    8313     ac_header_preproc=yes
    8314     ;;
    8315   no:yes:* )
    8316     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
    8317 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    8318     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
    8319 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    8320     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
    8321 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    8322     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
    8323 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    8324     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
    8325 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    8326     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
    8327 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
    8328     (
    8329       cat <<\_ASBOX
    8330 ## ---------------------------------------------- ##
    8331 ## Report this to orxonox-dev at mail.datacore.ch ##
    8332 ## ---------------------------------------------- ##
    8333 _ASBOX
    8334     ) |
    8335       sed "s/^/$as_me: WARNING:     /" >&2
    8336     ;;
    8337 esac
    8338 echo "$as_me:$LINENO: checking for $ac_header" >&5
    8339 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
    8340 if eval "test \"\${$as_ac_Header+set}\" = set"; then
    8341   echo $ECHO_N "(cached) $ECHO_C" >&6
    8342 else
    8343   eval "$as_ac_Header=\$ac_header_preproc"
    8344 fi
    8345 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
    8346 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
    8347 
    8348 fi
    8349 if test `eval echo '${'$as_ac_Header'}'` = yes; then
    8350   cat >>confdefs.h <<_ACEOF
    8351 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
    8352 _ACEOF
    83537945
    83547946fi
     
    86568248Usually this means the macro was only invoked conditionally." >&5
    86578249echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
    8658 Usually this means the macro was only invoked conditionally." >&2;}
    8659    { (exit 1); exit 1; }; }
    8660 fi
    8661 if test -z "${SUB_PROJECTS_TRUE}" && test -z "${SUB_PROJECTS_FALSE}"; then
    8662   { { echo "$as_me:$LINENO: error: conditional \"SUB_PROJECTS\" was never defined.
    8663 Usually this means the macro was only invoked conditionally." >&5
    8664 echo "$as_me: error: conditional \"SUB_PROJECTS\" was never defined.
    86658250Usually this means the macro was only invoked conditionally." >&2;}
    86668251   { (exit 1); exit 1; }; }
  • orxonox/trunk/configure.ac

    r3790 r3863  
    142142
    143143#-------------------#
    144 # SDL_image-disable #
    145 #-------------------#
    146 def_sdl_image=yes
    147 AC_MSG_CHECKING([if SDL_image should be enabled])
    148 AC_ARG_WITH([sdl_image],
    149         AC_HELP_STRING( [--without-sdl-image],
    150         [Prevents SDL_image from being loaded]), [def_sdl_image=no])
    151 if test x$def_sdl_image = xyes; then
    152   echo "yes"
    153 fi
    154 if test x$def_sdl_image = xno; then
    155   echo "no"
    156 fi
    157 
    158 #-------------------#
    159144# SubProject-enable #
    160145#-------------------#
     
    181166        [builds orxonox with profiling support]), [def_profiling=yes])
    182167if test x$def_profiling = xyes; then
    183 AM_CONDITIONAL(SUB_PROJECTS, test x$def_sub_projects = xyes)
    184168  echo "yes"
    185169  CXXFLAGS="$CXXFLAGS -pg"
    186170fi
    187171if test x$def_profiling = xno; then
     172  echo "no"
     173fi
     174
     175#----------------#
     176# efence Enabled #
     177#----------------#
     178def_efence=no
     179AC_MSG_CHECKING([if efence should be enabled])
     180AC_ARG_ENABLE([efence],
     181        AC_HELP_STRING( [--enable-efence],
     182        [builds orxonox with efence support]), [def_efence=yes])
     183if test x$def_efence = xyes; then
     184  echo "yes"
     185fi
     186if test x$def_efence = xno; then
    188187  echo "no"
    189188fi
     
    444443# SDL_Image #
    445444#-----------#
    446 if test x$def_sdl_image = xyes; then
    447445# checking for SDL_image-headers
    448   AC_CHECK_HEADERS([SDL_image.h] ,,
    449       [echo "sdl_image not found. falling back to other options"; def_sdl_image=no ])
    450 fi
    451 if test x$def_sdl_image = xyes; then
     446AC_CHECK_HEADERS([SDL_image.h] ,,
     447    [echo "sdl_image header not found."; def_sdl_image=no; exit -1])
    452448# checking for SDL_image-lib
    453   AC_CHECK_LIB([SDL_image], [main], [FOUND_SDL_image=yes])
    454      if test x$FOUND_SDL_image = xyes ; then
    455        LIBS="$LIBS -lSDL_image"
    456      else
    457         echo "------------------"
    458         echo "SDL_image library not found."
    459         echo "please install the SDL_image library, which can be found at http://www.libsdl.org/projects/SDL_image/"
    460         echo "------------------"
    461         exit -1
    462      fi   
    463 fi
    464 
    465 ## case no SDL-image:
    466 if test x$def_sdl_image = xno; then
    467 #---------#
    468 # libjpeg #
    469 #---------#
    470  AC_CHECK_HEADERS([jpeglib.h], [jpegHeader="yes"],
    471         [jpegHeader="no"])
    472  if test x$jpegHeader = xno; then
    473         echo " not including jpeg."
    474  else
    475   AC_CHECK_LIB([jpeg], [main], [FOUND_jpeg=yes])
    476     if test x$FOUND_jpeg = xyes ; then
    477       LIBS="$LIBS -ljpeg"
    478     else
    479          echo "------------------"
    480          echo "jpeg library not found."
    481          echo "please install the jpeg library from the Independent JPEG Group, which can be found at http://www.ijg.org"
    482          echo "------------------"
    483          exit -1
    484     fi   
    485  fi
    486 
    487 #--------#
    488 # libpng #
    489 #--------#
    490  AC_CHECK_HEADERS([png.h], [pngHeader="yes"],
    491         [pngHeader="no"])
    492  if test x$pngHeader = xno; then
    493         echo " not including png."
    494  else
    495   AC_CHECK_LIB([png], [main], FOUND_png=yes)
    496     if test x$FOUND_png = xyes ; then
    497       LIBS="$LIBS -lpng"
    498     else
    499          echo "------------------"
    500          echo "png library not found."
    501          echo "please install the png library, which can be found at http://libpng.org/pub/png/libpng.html"
    502          echo "------------------"
    503          exit -1
    504     fi
    505  fi   
    506 fi
     449AC_CHECK_LIB([SDL_image], [main], [FOUND_SDL_image=yes])
     450   if test x$FOUND_SDL_image = xyes ; then
     451     LIBS="$LIBS -lSDL_image"
     452   else
     453      echo "------------------"
     454      echo "SDL_image library not found."
     455      echo "please install the SDL_image library, which can be found at http://www.libsdl.org/projects/SDL_image/"
     456      echo "------------------"
     457      exit -1
     458   fi
    507459
    508460#-----#
     
    583535fi
    584536
     537
     538#--------#
     539# efence #
     540#--------#
     541if test x$def_efence = xyes ; then
     542  AC_CHECK_LIB([efence], [main], [FOUND_efence=yes])
     543   if test x$FOUND_efence = xyes ; then
     544      LIBS="$LIBS -lefence"
     545   fi
     546 
     547fi
    585548
    586549# FIXME: Replace `main' with a function in `-lm':
  • orxonox/trunk/src/Makefile.am

    r3851 r3863  
    113113                 defs/glincl.h \
    114114                 defs/comincl.h \
     115                 defs/confincl.h \
    115116                 defs/error.h \
    116117                 defs/debug.h \
  • orxonox/trunk/src/Makefile.in

    r3851 r3863  
    326326                 defs/glincl.h \
    327327                 defs/comincl.h \
     328                 defs/confincl.h \
    328329                 defs/error.h \
    329330                 defs/debug.h \
  • orxonox/trunk/src/animation.cc

    r3860 r3863  
    1414*/
    1515
     16#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_ANIM
    1617
    1718#include "animation.h"
     
    8485      this->replay();
    8586      break;
     87    case ANIM_INF_REWIND:
     88      this->stop();
     89      break;
    8690    case ANIM_INF_DELETE: // this will possibly never be made
    8791      this->bDelete = true;
  • orxonox/trunk/src/animation.h

    r3860 r3863  
    99#include "list.h"
    1010#include "base_object.h"
     11#include "confincl.h"  // must be here to determin the DEBUG-level
    1112
    1213// FORWARD DEFINITION
    1314
    1415//! An enumerator of Functions to describe the flow of the Animation
     16/**
     17   \todo check with Patrick it of
     18
     19   description in speed to the next keyframe:
     20   ANIM_CONSTANT: 0, infinity.
     21   ANIM_LINEAR: equal
     22   ANIM_SINE: fast, slow, fast
     23   ANIM_COSINE: slow, fast, slow
     24   ANIM_EXP: fast, slow
     25   ANIM_NEG_EXP: slow fast
     26   ANIM_RANDOM: eratic
     27   
     28   deprecated QUADRATIC
     29*/
    1530typedef enum ANIM_FUNCTION {ANIM_CONSTANT,
    1631                            ANIM_LINEAR,
     
    2540/**
    2641   ANIM_INF_CONSTANT stays at the end of the animation
    27    ANIM_INF_REWIND loops back to the beginning and replays the animation
     42   ANIM_INF_REPLAY loops back to the beginning and replays the animation
     43   ANIM_INF_REWIND loops back to the beginning and then stops the animation
     44   ANIM_INF_DELETE deletes the animation. !! THIS IS DANGEROUS !! only do this with non-class variables
    2845*/
    2946typedef enum ANIM_INFINITY {ANIM_INF_CONSTANT,
    3047                            ANIM_INF_REPLAY,
     48                            ANIM_INF_REWIND,
    3149                            ANIM_INF_DELETE};//, ANIM_INF_LINEAR, ANIM_INF_PINGPONG;
    32 
    33 //! A Struct for Keyframes that simply hold a float
    34 typedef struct KeyFrameF
    35 {
    36   float duration;             //!< duration of this keyframe
    37   float value;                //!< value of this keyframe
    38   ANIM_FUNCTION animFunc;     //!< with whitch function to iterate to the next KeyFrameF
    39 };
    4050
    4151//! A Superclass for describing an animation (all animations will be derived from this one)
  • orxonox/trunk/src/animation3d.cc

    r3858 r3863  
    1717*/
    1818
     19#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_ANIM
    1920
    2021#include "animation3d.h"
  • orxonox/trunk/src/animation3d.h

    r3859 r3863  
    22    \file animation3d.h
    33*/
     4
    45
    56#include "animation.h"
  • orxonox/trunk/src/defs/debug.h

    r3813 r3863  
    1919
    2020    There are two main modes HARD and SOFT. HARD is precessed during compileTime where SOFT is for runtime.
    21     \li HARD: One can choose between different modes. see: // DEFINE_MODULES \\
     21    \li HARD: One can choose between different modes. see: // DEFINE_MODULES
    2222    \li SOFT: If you want each module can have its own variable for processing. just pass it to DEBUG_MODULE_SOFT
    2323*/
     
    2626#define _DEBUG_H
    2727
    28 #if HAVE_CONFIG_H
    29 #include <config.h>
    30 #endif
     28#include "confincl.h"
    3129
    3230#include <stdio.h>
     
    5654#define HARD_DEBUG_LEVEL DEBUG
    5755#else /* DEBUG_SPECIAL_MODULE */
    58 // DEFINE MODULES \\
     56// DEFINE MODULES
    5957#define DEBUG_MODULE_ORXONOX            0
    6058#define DEBUG_MODULE_WORLD              1
  • orxonox/trunk/src/defs/stdincl.h

    r3860 r3863  
    1111typedef unsigned char byte;
    1212
    13 // this includes the information from configure/makefiles
    14 #if HAVE_CONFIG_H
    15 #include <config.h>
    16 #endif
     13#include "confincl.h"
    1714
    1815#ifdef __WIN32__
  • orxonox/trunk/src/lib/graphics/importer/texture.cc

    r3790 r3863  
    1212   main-programmer: Benjamin Grauer
    1313   co-programmer: ...
    14 
    15    TGA-code: borrowed from nehe-Tutorials
    16 
    1714*/
    18 
    1915
    2016#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_IMPORTER
     
    6662   \param b The second value
    6763*/
    68 inline void Texture::swap (unsigned char &a, unsigned char &b)
     64void Texture::swap (unsigned char &a, unsigned char &b)
    6965{
    7066  unsigned char temp;
     
    9894}
    9995
    100 #ifdef HAVE_SDL_IMAGE_H
     96/**
     97   \brief loads an Image from a file to a Texture
     98   \param imageName The image to load
     99*/
    101100bool Texture::loadImage(const char* imageName)
    102101{
     
    138137          this->loadTexToGL (this->pImage);
    139138          SDL_FreeSurface(map);
    140           this->pImage->data = NULL;
     139          pImage->data = NULL;
    141140        }
    142141      else
     
    147146    }
    148147}
    149 
    150 
    151 #else /* HAVE_SDL_IMAGE_H */
    152 /**
    153    \brief Makes the Programm ready to Read-in a texture-File
    154    1. Checks what type of Image should be imported
    155    \todo Checks where to find the Image
    156 */
    157 bool Texture::loadImage(const char* imageName)
    158 {
    159   if (GraphicsEngine::texturesEnabled)
    160     {
    161       if (imageName)
    162         {
    163           if (!strncmp(imageName+strlen(imageName)-4, ".bmp", 4))
    164             {
    165               PRINTF(4)("Requested bmp-image. Trying to Import.\n");
    166               return this->loadBMP(imageName);
    167             }
    168          
    169           else if (!strncmp(imageName+strlen(imageName)-4, ".jpg", 4) || !strncmp(imageName+strlen(imageName)-5, ".jpg", 5))
    170             {
    171               PRINTF(4)("Requested jpeg-image. Trying to Import\n");
    172               return this->loadJPG(imageName);
    173             }
    174           else if (!strncmp(imageName+strlen(imageName)-4, ".tga", 4))
    175             {
    176               PRINTF(4)("Requested tga-image. Trying to Import\n");
    177               return this->loadTGA(imageName);
    178             }
    179           else if (!strncmp(imageName+strlen(imageName)-4, ".png", 4))
    180             {
    181               PRINTF(4)("Requested png-image. Trying to Import\n");
    182               return this->loadPNG(imageName);
    183             }
    184           else
    185             {
    186               PRINTF(2)("Requested Image was not recognized in its type. (Maybe a type-Cast-error.)\n FileName: %s", imageName);
    187               return false;
    188             }
    189         }
    190       else
    191         {
    192           PRINTF(2)("Image not Found: %s\n", imageName);
    193           return false;
    194         }
    195     }
    196 }
    197 /**
    198    \brief reads in a Windows BMP-file, and imports it to openGL.
    199    \param bmpName The name of the Image to load.
    200 */
    201 bool Texture::loadBMP (char* bmpName)
    202 {
    203   FILE *file;
    204   unsigned long size;                 // size of the image in bytes.
    205   unsigned long i;                    // standard counter.
    206   unsigned short int planes;          // number of planes in image (must be 1)
    207   unsigned short int bpp;             // number of bits per pixel (must be 24)
    208   GLuint temp;                          // temporary color storage for bgr-rgb conversion.
    209 
    210   // make sure the file is there.
    211   if ((file = fopen(bmpName, "rb"))==NULL)
    212     {
    213       PRINTF(2)("File Not Found : %s\n",bmpName);
    214       return false;
    215     }
    216   // seek through the bmp header, up to the width/height:
    217   fseek(file, 18, SEEK_CUR);
    218  
    219   // read the width
    220   if ((i = fread(&pImage->width, 4, 1, file)) != 1)
    221     {
    222       PRINTF(2)("Error reading width from %s.\n", bmpName);
    223       return false;
    224     }
    225   // read the height
    226   if ((i = fread(&pImage->height, 4, 1, file)) != 1)
    227     {
    228       PRINTF(2)("Error reading height from %s.\n", bmpName);
    229       return false;
    230     }
    231  
    232   // calculate the size (assuming 24 bits or 3 bytes per pixel).
    233   size = pImage->width * pImage->height * 3;
    234  
    235   // read the planes
    236   if ((fread(&planes, 2, 1, file)) != 1)
    237     {
    238       PRINTF(2)("Error reading planes from %s.\n", bmpName);
    239       return false;
    240     }
    241   if (planes != 1)
    242     {
    243       PRINTF(1)("Planes from %s is not 1: %u\n", bmpName, planes);
    244       return false;
    245     }
    246  
    247   // read the bpp
    248   if ((i = fread(&bpp, 2, 1, file)) != 1)
    249     {
    250       PRINTF(2)("Error reading bpp from %s.\n", bmpName);
    251       return false;
    252     }
    253   if (bpp != 24)
    254     {
    255       PRINTF(2)("Bpp from %s is not 24: %u\n", bmpName, bpp);
    256       return false;
    257     }
    258  
    259   // seek past the rest of the bitmap header.
    260   fseek(file, 24, SEEK_CUR);
    261  
    262   // read the data.
    263   pImage->data = (GLubyte *) malloc(size);
    264   if (pImage->data == NULL)
    265     {
    266       PRINTF(2)("Error allocating memory for color-corrected image data");
    267       return false;     
    268     }
    269  
    270   if ((i = fread(pImage->data, size, 1, file)) != 1)
    271     {
    272       PRINTF(2)("Error reading image data from %s.\n", bmpName);
    273       return false;
    274     }
    275   fclose(file);
    276 
    277   // reverse all of the colors. (bgr -> rgb)
    278   for (i=0;i<size;i+=3)
    279     {
    280       temp = pImage->data[i];
    281       pImage->data[i] = pImage->data[i+2];
    282       pImage->data[i+2] = temp;
    283     }
    284   this->loadTexToGL (pImage);
    285  
    286 
    287   if (pImage)
    288     {
    289       if (pImage->data)
    290         {
    291           free(pImage->data);
    292         }
    293      
    294       free(pImage);
    295     }
    296   return true;
    297 
    298 }
    299 
    300 /**
    301    \brief reads in a jpg-file
    302    \param jpgName the Name of the Image to load
    303 */
    304 bool Texture::loadJPG (char* jpgName)
    305 {
    306 #ifdef HAVE_JPEGLIB_H
    307   struct jpeg_decompress_struct cinfo;
    308   Image *pImage = NULL;
    309   FILE *pFile;
    310  
    311   // Open a file pointer to the jpeg file and check if it was found and opened
    312   if((pFile = fopen(jpgName, "rb")) == NULL)
    313     {
    314       // Display an error message saying the file was not found, then return NULL
    315       PRINTF(2)("Unable to load JPG File %s.\n", jpgName);
    316       return false;
    317     }
    318  
    319   // Create an error handler
    320   jpeg_error_mgr jerr;
    321  
    322   // Have our compression info object point to the error handler address
    323   cinfo.err = jpeg_std_error(&jerr);
    324  
    325   // Initialize the decompression object
    326   jpeg_create_decompress(&cinfo);
    327  
    328   // Specify the data source (Our file pointer)
    329   jpeg_stdio_src(&cinfo, pFile);
    330  
    331   // Allocate the structure that will hold our eventual jpeg data (must free it!)
    332   pImage = (Image*)malloc(sizeof(Image));
    333  
    334   // DECOFING
    335   // Read in the header of the jpeg file
    336   jpeg_read_header(&cinfo, TRUE);
    337  
    338   // Start to decompress the jpeg file with our compression info
    339   jpeg_start_decompress(&cinfo);
    340  
    341   // Get the image dimensions and row span to read in the pixel data
    342   pImage->rowSpan = cinfo.image_width * cinfo.num_components;
    343   pImage->width   = cinfo.image_width;
    344   pImage->height   = cinfo.image_height;
    345  
    346   // Allocate memory for the pixel buffer
    347   pImage->data = new unsigned char[pImage->rowSpan * pImage->height];
    348  
    349   // Here we use the library's state variable cinfo.output_scanline as the
    350   // loop counter, so that we don't have to keep track ourselves.
    351  
    352   // Create an array of row pointers
    353   unsigned char** rowPtr = new unsigned char*[pImage->height];
    354   for (int i = 0; i < pImage->height; i++)
    355     rowPtr[i] = &(pImage->data[i*pImage->rowSpan]);
    356  
    357   // Now comes the juice of our work, here we extract all the pixel data
    358   int rowsRead = 0;
    359   while (cinfo.output_scanline < cinfo.output_height)
    360     {
    361       // Read in the current row of pixels and increase the rowsRead count
    362       rowsRead += jpeg_read_scanlines(&cinfo, &rowPtr[rowsRead], cinfo.output_height - rowsRead);
    363     }
    364  
    365   // Delete the temporary row pointers
    366   delete [] rowPtr;
    367  
    368   // Finish decompressing the data
    369   jpeg_finish_decompress(&cinfo);//  decodeJPG(&cinfo, pImage);
    370  
    371   // This releases all the stored memory for reading and decoding the jpeg
    372   jpeg_destroy_decompress(&cinfo);
    373  
    374   // Close the file pointer that opened the file
    375   fclose(pFile);
    376  
    377 
    378   if(pImage == NULL)
    379     exit(0);
    380  
    381   this->loadTexToGL (pImage);
    382   if (pImage)
    383     {
    384       if (pImage->data)
    385         {
    386           free(pImage->data);
    387         }
    388      
    389       free(pImage);
    390     }
    391   return true;
    392 #else /* HAVE_JPEGLIB_H */
    393   PRINTF(1)("sorry, but you did not compile with jpeg-support.\nEither install SDL_image or jpeglib, and recompile to see the image\n");
    394   return false;
    395 #endif /* HAVE_JPEGLIB_H */
    396 
    397 }
    398 
    399 /**
    400    \brief reads in a tga-file
    401    \param tgaName the Name of the Image to load
    402 */
    403 bool Texture::loadTGA(const char * tgaName)
    404 {
    405   typedef struct
    406   {
    407     GLubyte Header[12];
    408   } TGAHeader;
    409   TGAHeader tgaHeader;                 
    410  
    411   GLubyte uTGAcompare[12] = {0,0,2, 0,0,0,0,0,0,0,0,0}; // Uncompressed TGA Header
    412   GLubyte cTGAcompare[12] = {0,0,10,0,0,0,0,0,0,0,0,0}; // Compressed TGA Header
    413   FILE * fTGA;
    414   fTGA = fopen(tgaName, "rb");
    415 
    416   if(fTGA == NULL)
    417     {
    418       PRINTF(2)("Error could not open texture file: %s\n", tgaName);
    419       return false;
    420     }
    421  
    422   if(fread(&tgaHeader, sizeof(TGAHeader), 1, fTGA) == 0)
    423     {
    424       PRINTF(2)("Error could not read file header of %s\n", tgaName);
    425       if(fTGA != NULL)
    426         {
    427           fclose(fTGA);
    428         }
    429       return false;
    430     }
    431  
    432   if(memcmp(uTGAcompare, &tgaHeader, sizeof(TGAHeader)) == 0)
    433     {
    434       loadUncompressedTGA(tgaName, fTGA);
    435       if (fTGA)
    436         fclose (fTGA);
    437     }
    438   else if(memcmp(cTGAcompare, &tgaHeader, sizeof(TGAHeader)) == 0)
    439     {
    440       loadCompressedTGA(tgaName, fTGA);
    441         if (fTGA)
    442           fclose (fTGA);
    443     }
    444   else
    445     {
    446       PRINTF(2)("Error TGA file be type 2 or type 10\n");
    447       if (fTGA)
    448         fclose(fTGA);
    449       return false;
    450     }
    451   return true;
    452 }
    453 
    454 /**
    455    \brief reads in an uncompressed tga-file
    456    \param filename the Name of the Image to load
    457    \param fTGA a Pointer to a File, that should be read
    458 */
    459 bool Texture::loadUncompressedTGA(const char * filename, FILE * fTGA)
    460 {
    461   GLubyte header[6];      // First 6 Useful Bytes From The Header
    462   GLuint  bytesPerPixel;  // Holds Number Of Bytes Per Pixel Used In The TGA File
    463   GLuint  imageSize;      // Used To Store The Image Size When Setting Aside Ram
    464   GLuint  temp;           // Temporary Variable
    465   GLuint  type;
    466   GLuint  Height;         // Height of Image
    467   GLuint  Width;          // Width of Image
    468   GLuint  Bpp;            // Bits Per Pixel
    469 
    470   GLuint cswap;
    471   if(fread(header, sizeof(header), 1, fTGA) == 0)
    472     {
    473       PRINTF(2)("Error could not read info header\n");
    474       return false;
    475     }
    476  
    477   Width = pImage->width  = header[1] * 256 + header[0];
    478   Height =  pImage->height = header[3] * 256 + header[2];
    479   Bpp = pImage->bpp = header[4];
    480   // Make sure all information is valid
    481   if((pImage->width <= 0) || (pImage->height <= 0) || ((pImage->bpp != 24) && (pImage->bpp !=32)))
    482     {
    483       PRINTF(2)("Error invalid texture information\n");
    484       return false;
    485     }
    486  
    487   if(pImage->bpp == 24)
    488     {
    489       pImage->type = GL_RGB;
    490     }
    491   else
    492     {
    493       pImage->type = GL_RGBA;
    494     }
    495  
    496   bytesPerPixel = (Bpp / 8);
    497   imageSize = (bytesPerPixel * Width * Height);
    498   pImage->data = (GLubyte*) malloc(imageSize);
    499  
    500   if(pImage->data == NULL)
    501     {
    502       PRINTF(2)("Error could not allocate memory for image\n");
    503       return false;
    504     }
    505  
    506   if(fread(pImage->data, 1, imageSize, fTGA) != imageSize)
    507     {
    508       PRINTF(2)("Error could not read image data\n");
    509       if(pImage->data != NULL)
    510         {
    511           free(pImage->data);
    512         }
    513       return false;
    514     }
    515  
    516   for(cswap = 0; cswap < (int)imageSize; cswap += bytesPerPixel)
    517     {
    518       pImage->data[cswap] ^= pImage->data[cswap+2] ^=
    519         pImage->data[cswap] ^= pImage->data[cswap+2];
    520     }
    521  
    522   this->loadTexToGL (pImage);
    523 
    524   return true;
    525 }
    526 
    527 /**
    528    \brief reads in a compressed tga-file
    529    \param filename the Name of the Image to load
    530    \param fTGA a Pointer to a File, that should be read
    531 */
    532 bool Texture::loadCompressedTGA(const char * filename, FILE * fTGA)
    533 {
    534   GLubyte header[6];      // First 6 Useful Bytes From The Header
    535   GLuint  bytesPerPixel;  // Holds Number Of Bytes Per Pixel Used In The TGA File
    536   GLuint  imageSize;      // Used To Store The Image Size When Setting Aside Ram
    537   GLuint  temp;           // Temporary Variable
    538   GLuint  type;
    539   GLuint  Height;         // Height of Image
    540   GLuint  Width;          // Width of Image
    541   GLuint  Bpp;            // Bits Per Pixel
    542 
    543   if(fread(header, sizeof(header), 1, fTGA) == 0)
    544     {
    545       PRINTF(2)("Error could not read info header\n");
    546       return false;
    547     }
    548  
    549   Width = pImage->width  = header[1] * 256 + header[0];
    550   Height = pImage->height = header[3] * 256 + header[2];
    551   Bpp = pImage->bpp     = header[4];
    552 
    553   GLuint pixelcount     = Height * Width;
    554   GLuint currentpixel   = 0;
    555   GLuint currentbyte    = 0;
    556   GLubyte * colorbuffer = (GLubyte *)malloc(bytesPerPixel);
    557 
    558   //Make sure all pImage info is ok
    559   if((pImage->width <= 0) || (pImage->height <= 0) || ((pImage->bpp != 24) && (pImage->bpp !=32)))
    560     {
    561       PRINTF(2)("Error Invalid pImage information\n");
    562       return false;
    563     }
    564  
    565   bytesPerPixel = (Bpp / 8);
    566   imageSize             = (bytesPerPixel * Width * Height);
    567   pImage->data  = (GLubyte*) malloc(imageSize);
    568  
    569   if(pImage->data == NULL)
    570     {
    571       PRINTF(2)("Error could not allocate memory for image\n");
    572       return false;
    573     }
    574  
    575   do
    576     {
    577       GLubyte chunkheader = 0;
    578      
    579       if(fread(&chunkheader, sizeof(GLubyte), 1, fTGA) == 0)
    580         {
    581           PRINTF(2)("Error could not read RLE header\n");
    582           if(pImage->data != NULL)
    583             {
    584               free(pImage->data);
    585             }
    586           return false;
    587         }
    588       // If the ehader is < 128, it means the that is the number of RAW color packets minus 1
    589       if(chunkheader < 128)
    590         {
    591           short counter;
    592           chunkheader++;
    593           // Read RAW color values
    594           for(counter = 0; counter < chunkheader; counter++)
    595             {
    596               // Try to read 1 pixel
    597               if(fread(colorbuffer, 1, bytesPerPixel, fTGA) != bytesPerPixel)
    598                 {
    599                   PRINTF(2)("Error could not read image data\n");
    600                   if(colorbuffer != NULL)
    601                     {
    602                       free(colorbuffer);
    603                     }
    604                  
    605                   if(pImage->data != NULL)
    606                     {
    607                       free(pImage->data);
    608                     }
    609                  
    610                   return false;
    611                 }
    612               // write to memory
    613               // Flip R and B vcolor values around in the process
    614               pImage->data[currentbyte    ] = colorbuffer[2];                               
    615               pImage->data[currentbyte + 1] = colorbuffer[1];
    616               pImage->data[currentbyte + 2] = colorbuffer[0];
    617              
    618               if(bytesPerPixel == 4) // if its a 32 bpp image
    619                 {
    620                   pImage->data[currentbyte + 3] = colorbuffer[3];// copy the 4th byte
    621                 }
    622              
    623               currentbyte += bytesPerPixel;
    624               currentpixel++;
    625 
    626               // Make sure we haven't read too many pixels
    627               if(currentpixel > pixelcount)     
    628                 {
    629                   PRINTF(2)("Error too many pixels read\n");
    630                   if(colorbuffer != NULL)
    631                     {
    632                       free(colorbuffer);
    633                     }
    634                  
    635                   if(pImage->data != NULL)
    636                     {
    637                       free(pImage->data);
    638                     }
    639                  
    640                   return false;
    641                 }
    642             }
    643         }
    644       // chunkheader > 128 RLE data, next color  reapeated chunkheader - 127 times
    645       else
    646         {
    647           short counter;
    648           chunkheader -= 127;   // Subteact 127 to get rid of the ID bit
    649           if(fread(colorbuffer, 1, bytesPerPixel, fTGA) != bytesPerPixel) // Attempt to read following color values
    650             {
    651               PRINTF(2)("Error could not read from file");
    652               if(colorbuffer != NULL)
    653                 {
    654                   free(colorbuffer);
    655                 }
    656              
    657               if(pImage->data != NULL)
    658                 {
    659                   free(pImage->data);
    660                 }
    661              
    662               return false;
    663             }
    664          
    665           for(counter = 0; counter < chunkheader; counter++) //copy the color into the image data as many times as dictated
    666             {                                                   
    667               // switch R and B bytes areound while copying
    668               pImage->data[currentbyte    ] = colorbuffer[2];
    669               pImage->data[currentbyte + 1] = colorbuffer[1];
    670               pImage->data[currentbyte + 2] = colorbuffer[0];
    671              
    672               if(bytesPerPixel == 4)
    673                 {
    674                   pImage->data[currentbyte + 3] = colorbuffer[3];
    675                 }
    676              
    677               currentbyte += bytesPerPixel;
    678               currentpixel++;
    679              
    680               if(currentpixel > pixelcount)
    681                 {
    682                   PRINTF(2)("Error too many pixels read\n");
    683                   if(colorbuffer != NULL)
    684                     {
    685                       free(colorbuffer);
    686                     }
    687                  
    688                   if(pImage->data != NULL)
    689                     {
    690                       free(pImage->data);
    691                     }
    692                  
    693                   return false;
    694                 }
    695             }
    696         }
    697     }
    698  
    699   while(currentpixel < pixelcount);     // Loop while there are still pixels left
    700 
    701   this->loadTexToGL (pImage);
    702 
    703   return true;
    704 }
    705 
    706 
    707 /**
    708    \brief reads in a png-file
    709    \param pngName the Name of the Image to load
    710 */
    711 bool Texture::loadPNG(const char* pngName)
    712 {
    713 #ifdef HAVE_PNG_H
    714 
    715   FILE *PNG_file = fopen(pngName, "rb");
    716   if (PNG_file == NULL)
    717     {
    718       return 0;
    719     }
    720  
    721   GLubyte PNG_header[8];
    722  
    723   fread(PNG_header, 1, 8, PNG_file);
    724   if (png_sig_cmp(PNG_header, 0, 8) != 0)
    725     {
    726       PRINTF(2)("Not Recognized as a pngFile\n");
    727       fclose (PNG_file);
    728       return 0;
    729     }
    730  
    731   png_structp PNG_reader = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
    732   if (PNG_reader == NULL)
    733     {
    734       fclose(PNG_file);
    735       return 0;
    736     }
    737  
    738   png_infop PNG_info = png_create_info_struct(PNG_reader);
    739   if (PNG_info == NULL)
    740     {
    741       png_destroy_read_struct(&PNG_reader, NULL, NULL);
    742       fclose(PNG_file);
    743       return 0;
    744     }
    745  
    746   png_infop PNG_end_info = png_create_info_struct(PNG_reader);
    747   if (PNG_end_info == NULL)
    748     {
    749       png_destroy_read_struct(&PNG_reader, &PNG_info, NULL);
    750       fclose(PNG_file);
    751       return 0;
    752     }
    753  
    754   if (setjmp(png_jmpbuf(PNG_reader)))
    755     {
    756       png_destroy_read_struct(&PNG_reader, &PNG_info, &PNG_end_info);
    757       fclose(PNG_file);
    758       return (0);
    759     }
    760  
    761   png_init_io(PNG_reader, PNG_file);
    762   png_set_sig_bytes(PNG_reader, 8);
    763  
    764   png_read_info(PNG_reader, PNG_info);
    765  
    766   pImage->width = png_get_image_width(PNG_reader, PNG_info);
    767   pImage->height = png_get_image_height(PNG_reader, PNG_info);
    768  
    769   png_uint_32 bit_depth, color_type;
    770   bit_depth = png_get_bit_depth(PNG_reader, PNG_info);
    771   color_type = png_get_color_type(PNG_reader, PNG_info);
    772  
    773   if (color_type == PNG_COLOR_TYPE_PALETTE)
    774     {
    775       png_set_palette_to_rgb(PNG_reader);
    776     }
    777  
    778   if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
    779     {
    780       png_set_gray_1_2_4_to_8(PNG_reader);
    781     }
    782  
    783   if (color_type == PNG_COLOR_TYPE_GRAY || color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
    784     {
    785       png_set_gray_to_rgb(PNG_reader);
    786     }
    787  
    788   if (png_get_valid(PNG_reader, PNG_info, PNG_INFO_tRNS))
    789     {
    790       png_set_tRNS_to_alpha(PNG_reader);
    791     }
    792   else
    793     {
    794       png_set_filler(PNG_reader, 0xff, PNG_FILLER_AFTER);
    795     }
    796  
    797   if (bit_depth == 16)
    798     {
    799       png_set_strip_16(PNG_reader);
    800     }
    801  
    802   png_read_update_info(PNG_reader, PNG_info);
    803  
    804   pImage->data = (png_byte*)malloc(4 * pImage->width * pImage->height);
    805   png_byte** PNG_rows = (png_byte**)malloc(pImage->height * sizeof(png_byte*));
    806  
    807   unsigned int row;
    808   for (row = 0; row < pImage->height; ++row)
    809     {
    810       PNG_rows[pImage->height - 1 - row] = pImage->data + (row * 4 * pImage->width);
    811     }
    812  
    813   png_read_image(PNG_reader, PNG_rows);
    814  
    815   free(PNG_rows);
    816  
    817   png_destroy_read_struct(&PNG_reader, &PNG_info, &PNG_end_info);
    818   fclose(PNG_file);
    819  
    820   /*  if (!ST_is_power_of_two(pImage->width) || !ST_is_power_of_two(pImage->height))
    821     {
    822       free(pImage->data);
    823       return 0;
    824     }
    825   */
    826   this->loadTexToGL (pImage); 
    827  
    828   free(pImage->data);
    829  
    830   return true;
    831 #else /* HAVE_PNG_H */
    832   PRINTF(1)("sorry, but you did not compile with png-support.\nEither install SDL_image or libpng, and recompile to see the image\n");
    833   return false;
    834 #endif /* HAVE_PNG_H */
    835 
    836 }
    837 #endif /* HAVE_SDL_IMAGE_H */
  • orxonox/trunk/src/lib/graphics/importer/texture.h

    r3790 r3863  
    1414#include "debug.h"
    1515
    16 #ifdef HAVE_SDL_IMAGE_H
    1716#include <SDL_image.h>
    18 #else
    19 // IMAGE LIBS //
    20 #ifdef HAVE_JPEGLIB_H
    21 extern "C"{         // This has to be done, because not a c++ lib
    22 #include <jpeglib.h>
    23 }
    24 #endif /* HAVE_JPEGLIB_H */
    25 #ifdef HAVE_PNG_H
    26 #include <png.h>
    27 #endif /* HAVE_PNG_H */
    28 #endif /* HAVE_SDL_IMAGE_H */
    2917
    3018//! A Class, that reads in Textures from different fileformats.
     
    4735  SDL_Surface* map; //!< The map SDL initializes for this element.
    4836  char* searchTextureInPaths(const char* texName) const;
    49   inline void swap(unsigned char &a, unsigned char &b);
     37  void swap(unsigned char &a, unsigned char &b);
    5038 public:
    5139  Texture(void);
     
    5745
    5846  bool loadImage(const char* imageName);
    59 #ifndef HAVE_SDL_IMAGE_H
     47};
    6048
    61   bool loadBMP (char* bmpName);
    62 
    63   bool loadJPG (char* jpgName);
    64 
    65   /// TGA ///
    66 
    67   bool loadTGA(const char * tgaName);
    68   bool loadUncompressedTGA(const char * filename, FILE * fTGA);
    69   bool loadCompressedTGA(const char * filename, FILE * fTGA);
    70 
    71   bool loadPNG(const char* pngName);
    72 #endif
    73 
    74 
    75 };
    7649#endif /* _TEXTURE_H */
  • orxonox/trunk/src/t_animation.h

    r3860 r3863  
    2121#define _T_ANIMATION_H
    2222
     23
    2324#include "animation.h"
    2425
    2526#define DELTA_X 0.05  //!< the percentag of the distance that doesnt have to be done by neg_exp (asymptotical) ~ maschinendelta
     27
     28//! A Struct for Keyframes that simply hold a float
     29typedef struct KeyFrameF
     30{
     31  float duration;             //!< duration of this keyframe
     32  float value;                //!< value of this keyframe
     33  ANIM_FUNCTION animFunc;     //!< with whitch function to iterate to the next KeyFrameF
     34};
     35
    2636
    2737//! A Class to handle some animation for single floated values.
Note: See TracChangeset for help on using the changeset viewer.