- Timestamp:
- Apr 18, 2005, 10:10:26 AM (20 years ago)
- Location:
- orxonox/trunk
- Files:
-
- 1 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/config.h.in
r3790 r3863 28 28 #undef HAVE_INTTYPES_H 29 29 30 /* Define to 1 if you have the <jpeglib.h> header file. */31 #undef HAVE_JPEGLIB_H32 33 30 /* Define to 1 if you have the `m' library (-lm). */ 34 31 #undef HAVE_LIBM … … 46 43 /* Define to 1 if you have the <OpenGL/gl.h> header file. */ 47 44 #undef HAVE_OPENGL_GL_H 48 49 /* Define to 1 if you have the <png.h> header file. */50 #undef HAVE_PNG_H51 45 52 46 /* Define to 1 if you have the <pthread.h> header file. */ -
orxonox/trunk/configure
r3790 r3863 871 871 --enable-sub-projects also builds the subProjects while make from srcdir 872 872 --enable-profile builds orxonox with profiling support 873 --enable-efence builds orxonox with efence support 873 874 --enable-documentation also builds the sDocumentation while make from 874 875 srcdir … … 881 882 --without-pthread Prevents pthread from being loaded 882 883 --without-curl Prevents libcURL from being loaded 883 --without-sdl-image Prevents SDL_image from being loaded884 884 885 885 Some influential environment variables: … … 3986 3986 3987 3987 #-------------------# 3988 # SDL_image-disable #3989 #-------------------#3990 def_sdl_image=yes3991 echo "$as_me:$LINENO: checking if SDL_image should be enabled" >&53992 echo $ECHO_N "checking if SDL_image should be enabled... $ECHO_C" >&63993 3994 # Check whether --with-sdl_image or --without-sdl_image was given.3995 if test "${with_sdl_image+set}" = set; then3996 withval="$with_sdl_image"3997 def_sdl_image=no3998 fi;3999 if test x$def_sdl_image = xyes; then4000 echo "yes"4001 fi4002 if test x$def_sdl_image = xno; then4003 echo "no"4004 fi4005 4006 #-------------------#4007 3988 # SubProject-enable # 4008 3989 #-------------------# … … 4044 4025 fi; 4045 4026 if test x$def_profiling = xyes; then 4046 4047 4048 if test x$def_sub_projects = xyes; then4049 SUB_PROJECTS_TRUE=4050 SUB_PROJECTS_FALSE='#'4051 else4052 SUB_PROJECTS_TRUE='#'4053 SUB_PROJECTS_FALSE=4054 fi4055 4056 4027 echo "yes" 4057 4028 CXXFLAGS="$CXXFLAGS -pg" 4058 4029 fi 4059 4030 if test x$def_profiling = xno; then 4031 echo "no" 4032 fi 4033 4034 #----------------# 4035 # efence Enabled # 4036 #----------------# 4037 def_efence=no 4038 echo "$as_me:$LINENO: checking if efence should be enabled" >&5 4039 echo $ECHO_N "checking if efence should be enabled... $ECHO_C" >&6 4040 # Check whether --enable-efence or --disable-efence was given. 4041 if test "${enable_efence+set}" = set; then 4042 enableval="$enable_efence" 4043 def_efence=yes 4044 fi; 4045 if test x$def_efence = xyes; then 4046 echo "yes" 4047 fi 4048 if test x$def_efence = xno; then 4060 4049 echo "no" 4061 4050 fi … … 6417 6406 # SDL_Image # 6418 6407 #-----------# 6419 if test x$def_sdl_image = xyes; then6420 6408 # checking for SDL_image-headers 6421 6409 … … 6566 6554 6567 6555 else 6568 echo "sdl_image not found. falling back to other options"; def_sdl_image=no6556 echo "sdl_image header not found."; def_sdl_image=no; exit -1 6569 6557 fi 6570 6558 6571 6559 done 6572 6560 6573 fi6574 if test x$def_sdl_image = xyes; then6575 6561 # checking for SDL_image-lib 6576 6562 echo "$as_me:$LINENO: checking for main in -lSDL_image" >&5 6577 6563 echo $ECHO_N "checking for main in -lSDL_image... $ECHO_C" >&6 6578 6564 if test "${ac_cv_lib_SDL_image_main+set}" = set; then … … 6636 6622 fi 6637 6623 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 #-----# 6637 if 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 6641 echo $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 6648 cat >>confdefs.h <<_ACEOF 6649 #define HAVE_GTK2 1 6650 _ACEOF 6651 6652 else 6653 echo "no" 6654 fi 6655 6656 fi 6657 6658 6659 6660 6661 if test x$have_gtk2 = xyes; then 6662 HAVE_GTK2_TRUE= 6663 HAVE_GTK2_FALSE='#' 6664 else 6665 HAVE_GTK2_TRUE='#' 6666 HAVE_GTK2_FALSE= 6667 fi 6668 6669 6651 6670 #---------# 6652 # libjpeg#6671 # gThread # 6653 6672 #---------# 6654 6655 for ac_header in jpeglib.h 6673 if test x$def_gthread = xyes; then 6674 6675 echo "$as_me:$LINENO: checking for gthread" >&5 6676 echo $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 6683 cat >>confdefs.h <<_ACEOF 6684 #define HAVE_GTHREAD 1 6685 _ACEOF 6686 6687 else 6688 echo "no" 6689 fi 6690 6691 fi 6692 6693 6694 6695 6696 if test x$have_gthread = xyes; then 6697 HAVE_GTHREAD_TRUE= 6698 HAVE_GTHREAD_FALSE='#' 6699 else 6700 HAVE_GTHREAD_TRUE='#' 6701 HAVE_GTHREAD_FALSE= 6702 fi 6703 6704 6705 #---------# 6706 # libcURL # 6707 #---------# 6708 if test x$def_curl = xyes; then 6709 6710 6711 for ac_header in curl/curl.h 6656 6712 do 6657 6713 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` … … 6797 6853 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 6798 6854 _ACEOF 6799 jpegHeader="yes"6800 else 6801 jpegHeader="no"6855 curlHeader="yes" 6856 else 6857 curlHeader="no" 6802 6858 fi 6803 6859 6804 6860 done 6805 6861 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 6863 echo $ECHO_N "checking for main in -lcurl... $ECHO_C" >&6 6864 if test "${ac_cv_lib_curl_main+set}" = set; then 6812 6865 echo $ECHO_N "(cached) $ECHO_C" >&6 6813 6866 else 6814 6867 ac_check_lib_save_LIBS=$LIBS 6815 LIBS="-l jpeg$LIBS"6868 LIBS="-lcurl $LIBS" 6816 6869 cat >conftest.$ac_ext <<_ACEOF 6817 6870 /* confdefs.h. */ … … 6852 6905 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6853 6906 (exit $ac_status); }; }; then 6854 ac_cv_lib_ jpeg_main=yes6907 ac_cv_lib_curl_main=yes 6855 6908 else 6856 6909 echo "$as_me: failed program was:" >&5 6857 6910 sed 's/^/| /' conftest.$ac_ext >&5 6858 6911 6859 ac_cv_lib_ jpeg_main=no6912 ac_cv_lib_curl_main=no 6860 6913 fi 6861 6914 rm -f conftest.err conftest.$ac_objext \ … … 6863 6916 LIBS=$ac_check_lib_save_LIBS 6864 6917 fi 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 6918 echo "$as_me:$LINENO: result: $ac_cv_lib_curl_main" >&5 6919 echo "${ECHO_T}$ac_cv_lib_curl_main" >&6 6920 if test $ac_cv_lib_curl_main = yes; then 6921 FOUND_curl=yes 6922 fi 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 6929 cat >>confdefs.h <<_ACEOF 6930 #define HAVE_CURL 1 6931 _ACEOF 6932 6933 else 6934 have_curl=no 6880 6935 fi 6881 6936 6882 #--------# 6883 # libpng # 6884 #--------# 6885 6886 for ac_header in png.h 6937 fi 6938 6939 6940 6941 6942 if test x$have_curl = xyes; then 6943 HAVE_CURL_TRUE= 6944 HAVE_CURL_FALSE='#' 6945 else 6946 HAVE_CURL_TRUE='#' 6947 HAVE_CURL_FALSE= 6948 fi 6949 6950 6951 #---------# 6952 # pthread # 6953 #---------# 6954 if test x$def_pthread = xyes ; then 6955 if test x$have_gthread = xyes ; then 6956 6957 for ac_header in pthread.h 6887 6958 do 6888 6959 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` … … 7028 7099 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 7029 7100 _ACEOF 7030 p ngHeader="yes"7031 else 7032 p ngHeader="no"7101 pthreadHeader="yes" 7102 else 7103 pthreadHeader="no" 7033 7104 fi 7034 7105 7035 7106 done 7036 7107 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 7109 echo $ECHO_N "checking for main in -lpthread... $ECHO_C" >&6 7110 if test "${ac_cv_lib_pthread_main+set}" = set; then 7043 7111 echo $ECHO_N "(cached) $ECHO_C" >&6 7044 7112 else 7045 7113 ac_check_lib_save_LIBS=$LIBS 7046 LIBS="-lp ng$LIBS"7114 LIBS="-lpthread $LIBS" 7047 7115 cat >conftest.$ac_ext <<_ACEOF 7048 7116 /* confdefs.h. */ … … 7083 7151 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7084 7152 (exit $ac_status); }; }; then 7085 ac_cv_lib_p ng_main=yes7153 ac_cv_lib_pthread_main=yes 7086 7154 else 7087 7155 echo "$as_me: failed program was:" >&5 7088 7156 sed 's/^/| /' conftest.$ac_ext >&5 7089 7157 7090 ac_cv_lib_p ng_main=no7158 ac_cv_lib_pthread_main=no 7091 7159 fi 7092 7160 rm -f conftest.err conftest.$ac_objext \ … … 7094 7162 LIBS=$ac_check_lib_save_LIBS 7095 7163 fi 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 7164 echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_main" >&5 7165 echo "${ECHO_T}$ac_cv_lib_pthread_main" >&6 7166 if test $ac_cv_lib_pthread_main = yes; then 7167 FOUND_pthread=yes 7168 fi 7169 7170 if test x$FOUND_pthread = xyes ; then 7171 LIBS="$LIBS -lpthread" 7172 fi 7111 7173 fi 7112 7174 fi 7113 7175 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 #--------# 7180 if test x$def_efence = xyes ; then 7181 echo "$as_me:$LINENO: checking for main in -lefence" >&5 7182 echo $ECHO_N "checking for main in -lefence... $ECHO_C" >&6 7183 if test "${ac_cv_lib_efence_main+set}" = set; then 7184 echo $ECHO_N "(cached) $ECHO_C" >&6 7185 else 7186 ac_check_lib_save_LIBS=$LIBS 7187 LIBS="-lefence $LIBS" 7188 cat >conftest.$ac_ext <<_ACEOF 7189 /* confdefs.h. */ 7190 _ACEOF 7191 cat confdefs.h >>conftest.$ac_ext 7192 cat >>conftest.$ac_ext <<_ACEOF 7193 /* end confdefs.h. */ 7194 7195 7196 int 7197 main () 7198 { 7199 main (); 7200 ; 7201 return 0; 7202 } 7203 _ACEOF 7204 rm -f conftest.$ac_objext conftest$ac_exeext 7205 if { (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 7227 else 7228 echo "$as_me: failed program was:" >&5 7229 sed 's/^/| /' conftest.$ac_ext >&5 7230 7231 ac_cv_lib_efence_main=no 7232 fi 7233 rm -f conftest.err conftest.$ac_objext \ 7234 conftest$ac_exeext conftest.$ac_ext 7235 LIBS=$ac_check_lib_save_LIBS 7236 fi 7237 echo "$as_me:$LINENO: result: $ac_cv_lib_efence_main" >&5 7238 echo "${ECHO_T}$ac_cv_lib_efence_main" >&6 7239 if test $ac_cv_lib_efence_main = yes; then 7240 FOUND_efence=yes 7241 fi 7242 7243 if test x$FOUND_efence = xyes ; then 7244 LIBS="$LIBS -lefence" 7245 fi 7246 7247 fi 7248 7249 # FIXME: Replace `main' with a function in `-lm': 7250 7251 echo "$as_me:$LINENO: checking for main in -lm" >&5 7252 echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6 7253 if test "${ac_cv_lib_m_main+set}" = set; then 7254 echo $ECHO_N "(cached) $ECHO_C" >&6 7255 else 7256 ac_check_lib_save_LIBS=$LIBS 7257 LIBS="-lm $LIBS" 7258 cat >conftest.$ac_ext <<_ACEOF 7259 /* confdefs.h. */ 7260 _ACEOF 7261 cat confdefs.h >>conftest.$ac_ext 7262 cat >>conftest.$ac_ext <<_ACEOF 7263 /* end confdefs.h. */ 7264 7265 7266 int 7267 main () 7268 { 7269 main (); 7270 ; 7271 return 0; 7272 } 7273 _ACEOF 7274 rm -f conftest.$ac_objext conftest$ac_exeext 7275 if { (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 7297 else 7298 echo "$as_me: failed program was:" >&5 7299 sed 's/^/| /' conftest.$ac_ext >&5 7300 7301 ac_cv_lib_m_main=no 7302 fi 7303 rm -f conftest.err conftest.$ac_objext \ 7304 conftest$ac_exeext conftest.$ac_ext 7305 LIBS=$ac_check_lib_save_LIBS 7306 fi 7307 echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5 7308 echo "${ECHO_T}$ac_cv_lib_m_main" >&6 7309 if 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 7316 fi 7317 7318 7319 7320 # Checks for header files. 7321 echo "$as_me:$LINENO: checking for ANSI C header files" >&5 7322 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 7323 if test "${ac_cv_header_stdc+set}" = set; then 7324 echo $ECHO_N "(cached) $ECHO_C" >&6 7325 else 7326 cat >conftest.$ac_ext <<_ACEOF 7327 /* confdefs.h. */ 7328 _ACEOF 7329 cat confdefs.h >>conftest.$ac_ext 7330 cat >>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 7337 int 7338 main () 7339 { 7340 7341 ; 7342 return 0; 7343 } 7344 _ACEOF 7345 rm -f conftest.$ac_objext 7346 if { (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 7368 else 7369 echo "$as_me: failed program was:" >&5 7370 sed 's/^/| /' conftest.$ac_ext >&5 7371 7372 ac_cv_header_stdc=no 7373 fi 7374 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 7375 7376 if 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 7381 cat confdefs.h >>conftest.$ac_ext 7382 cat >>conftest.$ac_ext <<_ACEOF 7383 /* end confdefs.h. */ 7384 #include <string.h> 7385 7386 _ACEOF 7387 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 7388 $EGREP "memchr" >/dev/null 2>&1; then 7389 : 7390 else 7391 ac_cv_header_stdc=no 7392 fi 7393 rm -f conftest* 7394 7395 fi 7396 7397 if 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 7402 cat confdefs.h >>conftest.$ac_ext 7403 cat >>conftest.$ac_ext <<_ACEOF 7404 /* end confdefs.h. */ 7405 #include <stdlib.h> 7406 7407 _ACEOF 7408 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 7409 $EGREP "free" >/dev/null 2>&1; then 7410 : 7411 else 7412 ac_cv_header_stdc=no 7413 fi 7414 rm -f conftest* 7415 7416 fi 7417 7418 if 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 : 7422 else 7423 cat >conftest.$ac_ext <<_ACEOF 7424 /* confdefs.h. */ 7425 _ACEOF 7426 cat confdefs.h >>conftest.$ac_ext 7427 cat >>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))) 7442 int 7443 main () 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 7453 rm -f conftest$ac_exeext 7454 if { (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 : 7465 else 7466 echo "$as_me: program exited with status $ac_status" >&5 7467 echo "$as_me: failed program was:" >&5 7468 sed 's/^/| /' conftest.$ac_ext >&5 7469 7470 ( exit $ac_status ) 7471 ac_cv_header_stdc=no 7472 fi 7473 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 7474 fi 7475 fi 7476 fi 7477 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 7478 echo "${ECHO_T}$ac_cv_header_stdc" >&6 7479 if test $ac_cv_header_stdc = yes; then 7480 7481 cat >>confdefs.h <<\_ACEOF 7482 #define STDC_HEADERS 1 7483 _ACEOF 7484 7485 fi 7486 7487 7488 7489 for ac_header in stdlib.h string.h 7192 7490 do 7193 7491 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` … … 7333 7631 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 7334 7632 _ACEOF 7335 curlHeader="yes" 7336 else 7337 curlHeader="no" 7633 7338 7634 fi 7339 7635 7340 7636 done 7341 7637 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. 7640 echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5 7641 echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6 7642 if test "${ac_cv_header_stdbool_h+set}" = set; then 7345 7643 echo $ECHO_N "(cached) $ECHO_C" >&6 7346 7644 else 7347 ac_check_lib_save_LIBS=$LIBS 7348 LIBS="-lcurl $LIBS" 7349 cat >conftest.$ac_ext <<_ACEOF 7645 cat >conftest.$ac_ext <<_ACEOF 7350 7646 /* confdefs.h. */ 7351 7647 _ACEOF … … 7354 7650 /* end confdefs.h. */ 7355 7651 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]; 7356 7683 7357 7684 int 7358 7685 main () 7359 7686 { 7360 main ();7687 return !a + !b + !c + !d + !e + !f + !g + !h + !i; 7361 7688 ; 7362 7689 return 0; 7363 7690 } 7364 7691 _ACEOF 7365 rm -f conftest.$ac_objext conftest$ac_exeext7366 if { (eval echo "$as_me:$LINENO: \"$ac_ link\"") >&57367 (eval $ac_ link) 2>conftest.er17692 rm -f conftest.$ac_objext 7693 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 7694 (eval $ac_compile) 2>conftest.er1 7368 7695 ac_status=$? 7369 7696 grep -v '^ *+' conftest.er1 >conftest.err … … 7379 7706 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7380 7707 (exit $ac_status); }; } && 7381 { ac_try='test -s conftest $ac_exeext'7708 { ac_try='test -s conftest.$ac_objext' 7382 7709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7383 7710 (eval $ac_try) 2>&5 … … 7385 7712 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7386 7713 (exit $ac_status); }; }; then 7387 ac_cv_ lib_curl_main=yes7714 ac_cv_header_stdbool_h=yes 7388 7715 else 7389 7716 echo "$as_me: failed program was:" >&5 7390 7717 sed 's/^/| /' conftest.$ac_ext >&5 7391 7718 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` 7719 ac_cv_header_stdbool_h=no 7720 fi 7721 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 7722 fi 7723 echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 7724 echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6 7725 echo "$as_me:$LINENO: checking for _Bool" >&5 7726 echo $ECHO_N "checking for _Bool... $ECHO_C" >&6 7727 if test "${ac_cv_type__Bool+set}" = set; then 7728 echo $ECHO_N "(cached) $ECHO_C" >&6 7729 else 7730 cat >conftest.$ac_ext <<_ACEOF 7731 /* confdefs.h. */ 7732 _ACEOF 7733 cat confdefs.h >>conftest.$ac_ext 7734 cat >>conftest.$ac_ext <<_ACEOF 7735 /* end confdefs.h. */ 7736 $ac_includes_default 7737 int 7738 main () 7739 { 7740 if ((_Bool *) 0) 7741 return 0; 7742 if (sizeof (_Bool)) 7743 return 0; 7744 ; 7745 return 0; 7746 } 7747 _ACEOF 7748 rm -f conftest.$ac_objext 7749 if { (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 7771 else 7772 echo "$as_me: failed program was:" >&5 7773 sed 's/^/| /' conftest.$ac_ext >&5 7774 7775 ac_cv_type__Bool=no 7776 fi 7777 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 7778 fi 7779 echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 7780 echo "${ECHO_T}$ac_cv_type__Bool" >&6 7781 if test $ac_cv_type__Bool = yes; then 7408 7782 7409 7783 cat >>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 7788 fi 7789 7790 if test $ac_cv_header_stdbool_h = yes; then 7791 7792 cat >>confdefs.h <<\_ACEOF 7793 #define HAVE_STDBOOL_H 1 7794 _ACEOF 7795 7796 fi 7797 7798 7799 # Checks for library functions. 7800 7801 for ac_header in stdlib.h 7438 7802 do 7439 7803 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` … … 7579 7943 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 7580 7944 _ACEOF 7581 pthreadHeader="yes"7582 else7583 pthreadHeader="no"7584 fi7585 7586 done7587 7588 echo "$as_me:$LINENO: checking for main in -lpthread" >&57589 echo $ECHO_N "checking for main in -lpthread... $ECHO_C" >&67590 if test "${ac_cv_lib_pthread_main+set}" = set; then7591 echo $ECHO_N "(cached) $ECHO_C" >&67592 else7593 ac_check_lib_save_LIBS=$LIBS7594 LIBS="-lpthread $LIBS"7595 cat >conftest.$ac_ext <<_ACEOF7596 /* confdefs.h. */7597 _ACEOF7598 cat confdefs.h >>conftest.$ac_ext7599 cat >>conftest.$ac_ext <<_ACEOF7600 /* end confdefs.h. */7601 7602 7603 int7604 main ()7605 {7606 main ();7607 ;7608 return 0;7609 }7610 _ACEOF7611 rm -f conftest.$ac_objext conftest$ac_exeext7612 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&57613 (eval $ac_link) 2>conftest.er17614 ac_status=$?7615 grep -v '^ *+' conftest.er1 >conftest.err7616 rm -f conftest.er17617 cat conftest.err >&57618 echo "$as_me:$LINENO: \$? = $ac_status" >&57619 (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\"") >&57623 (eval $ac_try) 2>&57624 ac_status=$?7625 echo "$as_me:$LINENO: \$? = $ac_status" >&57626 (exit $ac_status); }; } &&7627 { ac_try='test -s conftest$ac_exeext'7628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&57629 (eval $ac_try) 2>&57630 ac_status=$?7631 echo "$as_me:$LINENO: \$? = $ac_status" >&57632 (exit $ac_status); }; }; then7633 ac_cv_lib_pthread_main=yes7634 else7635 echo "$as_me: failed program was:" >&57636 sed 's/^/| /' conftest.$ac_ext >&57637 7638 ac_cv_lib_pthread_main=no7639 fi7640 rm -f conftest.err conftest.$ac_objext \7641 conftest$ac_exeext conftest.$ac_ext7642 LIBS=$ac_check_lib_save_LIBS7643 fi7644 echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_main" >&57645 echo "${ECHO_T}$ac_cv_lib_pthread_main" >&67646 if test $ac_cv_lib_pthread_main = yes; then7647 FOUND_pthread=yes7648 fi7649 7650 if test x$FOUND_pthread = xyes ; then7651 LIBS="$LIBS -lpthread"7652 fi7653 fi7654 fi7655 7656 7657 # FIXME: Replace `main' with a function in `-lm':7658 7659 echo "$as_me:$LINENO: checking for main in -lm" >&57660 echo $ECHO_N "checking for main in -lm... $ECHO_C" >&67661 if test "${ac_cv_lib_m_main+set}" = set; then7662 echo $ECHO_N "(cached) $ECHO_C" >&67663 else7664 ac_check_lib_save_LIBS=$LIBS7665 LIBS="-lm $LIBS"7666 cat >conftest.$ac_ext <<_ACEOF7667 /* confdefs.h. */7668 _ACEOF7669 cat confdefs.h >>conftest.$ac_ext7670 cat >>conftest.$ac_ext <<_ACEOF7671 /* end confdefs.h. */7672 7673 7674 int7675 main ()7676 {7677 main ();7678 ;7679 return 0;7680 }7681 _ACEOF7682 rm -f conftest.$ac_objext conftest$ac_exeext7683 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&57684 (eval $ac_link) 2>conftest.er17685 ac_status=$?7686 grep -v '^ *+' conftest.er1 >conftest.err7687 rm -f conftest.er17688 cat conftest.err >&57689 echo "$as_me:$LINENO: \$? = $ac_status" >&57690 (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\"") >&57694 (eval $ac_try) 2>&57695 ac_status=$?7696 echo "$as_me:$LINENO: \$? = $ac_status" >&57697 (exit $ac_status); }; } &&7698 { ac_try='test -s conftest$ac_exeext'7699 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&57700 (eval $ac_try) 2>&57701 ac_status=$?7702 echo "$as_me:$LINENO: \$? = $ac_status" >&57703 (exit $ac_status); }; }; then7704 ac_cv_lib_m_main=yes7705 else7706 echo "$as_me: failed program was:" >&57707 sed 's/^/| /' conftest.$ac_ext >&57708 7709 ac_cv_lib_m_main=no7710 fi7711 rm -f conftest.err conftest.$ac_objext \7712 conftest$ac_exeext conftest.$ac_ext7713 LIBS=$ac_check_lib_save_LIBS7714 fi7715 echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&57716 echo "${ECHO_T}$ac_cv_lib_m_main" >&67717 if test $ac_cv_lib_m_main = yes; then7718 cat >>confdefs.h <<_ACEOF7719 #define HAVE_LIBM 17720 _ACEOF7721 7722 LIBS="-lm $LIBS"7723 7724 fi7725 7726 7727 7728 # Checks for header files.7729 echo "$as_me:$LINENO: checking for ANSI C header files" >&57730 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&67731 if test "${ac_cv_header_stdc+set}" = set; then7732 echo $ECHO_N "(cached) $ECHO_C" >&67733 else7734 cat >conftest.$ac_ext <<_ACEOF7735 /* confdefs.h. */7736 _ACEOF7737 cat confdefs.h >>conftest.$ac_ext7738 cat >>conftest.$ac_ext <<_ACEOF7739 /* end confdefs.h. */7740 #include <stdlib.h>7741 #include <stdarg.h>7742 #include <string.h>7743 #include <float.h>7744 7745 int7746 main ()7747 {7748 7749 ;7750 return 0;7751 }7752 _ACEOF7753 rm -f conftest.$ac_objext7754 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&57755 (eval $ac_compile) 2>conftest.er17756 ac_status=$?7757 grep -v '^ *+' conftest.er1 >conftest.err7758 rm -f conftest.er17759 cat conftest.err >&57760 echo "$as_me:$LINENO: \$? = $ac_status" >&57761 (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\"") >&57765 (eval $ac_try) 2>&57766 ac_status=$?7767 echo "$as_me:$LINENO: \$? = $ac_status" >&57768 (exit $ac_status); }; } &&7769 { ac_try='test -s conftest.$ac_objext'7770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&57771 (eval $ac_try) 2>&57772 ac_status=$?7773 echo "$as_me:$LINENO: \$? = $ac_status" >&57774 (exit $ac_status); }; }; then7775 ac_cv_header_stdc=yes7776 else7777 echo "$as_me: failed program was:" >&57778 sed 's/^/| /' conftest.$ac_ext >&57779 7780 ac_cv_header_stdc=no7781 fi7782 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext7783 7784 if test $ac_cv_header_stdc = yes; then7785 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.7786 cat >conftest.$ac_ext <<_ACEOF7787 /* confdefs.h. */7788 _ACEOF7789 cat confdefs.h >>conftest.$ac_ext7790 cat >>conftest.$ac_ext <<_ACEOF7791 /* end confdefs.h. */7792 #include <string.h>7793 7794 _ACEOF7795 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |7796 $EGREP "memchr" >/dev/null 2>&1; then7797 :7798 else7799 ac_cv_header_stdc=no7800 fi7801 rm -f conftest*7802 7803 fi7804 7805 if test $ac_cv_header_stdc = yes; then7806 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.7807 cat >conftest.$ac_ext <<_ACEOF7808 /* confdefs.h. */7809 _ACEOF7810 cat confdefs.h >>conftest.$ac_ext7811 cat >>conftest.$ac_ext <<_ACEOF7812 /* end confdefs.h. */7813 #include <stdlib.h>7814 7815 _ACEOF7816 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |7817 $EGREP "free" >/dev/null 2>&1; then7818 :7819 else7820 ac_cv_header_stdc=no7821 fi7822 rm -f conftest*7823 7824 fi7825 7826 if test $ac_cv_header_stdc = yes; then7827 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.7828 if test "$cross_compiling" = yes; then7829 :7830 else7831 cat >conftest.$ac_ext <<_ACEOF7832 /* confdefs.h. */7833 _ACEOF7834 cat confdefs.h >>conftest.$ac_ext7835 cat >>conftest.$ac_ext <<_ACEOF7836 /* 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 #else7842 # 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 #endif7848 7849 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))7850 int7851 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 _ACEOF7861 rm -f conftest$ac_exeext7862 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&57863 (eval $ac_link) 2>&57864 ac_status=$?7865 echo "$as_me:$LINENO: \$? = $ac_status" >&57866 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'7867 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&57868 (eval $ac_try) 2>&57869 ac_status=$?7870 echo "$as_me:$LINENO: \$? = $ac_status" >&57871 (exit $ac_status); }; }; then7872 :7873 else7874 echo "$as_me: program exited with status $ac_status" >&57875 echo "$as_me: failed program was:" >&57876 sed 's/^/| /' conftest.$ac_ext >&57877 7878 ( exit $ac_status )7879 ac_cv_header_stdc=no7880 fi7881 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext7882 fi7883 fi7884 fi7885 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&57886 echo "${ECHO_T}$ac_cv_header_stdc" >&67887 if test $ac_cv_header_stdc = yes; then7888 7889 cat >>confdefs.h <<\_ACEOF7890 #define STDC_HEADERS 17891 _ACEOF7892 7893 fi7894 7895 7896 7897 for ac_header in stdlib.h string.h7898 do7899 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`7900 if eval "test \"\${$as_ac_Header+set}\" = set"; then7901 echo "$as_me:$LINENO: checking for $ac_header" >&57902 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&67903 if eval "test \"\${$as_ac_Header+set}\" = set"; then7904 echo $ECHO_N "(cached) $ECHO_C" >&67905 fi7906 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&57907 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&67908 else7909 # Is the header compilable?7910 echo "$as_me:$LINENO: checking $ac_header usability" >&57911 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&67912 cat >conftest.$ac_ext <<_ACEOF7913 /* confdefs.h. */7914 _ACEOF7915 cat confdefs.h >>conftest.$ac_ext7916 cat >>conftest.$ac_ext <<_ACEOF7917 /* end confdefs.h. */7918 $ac_includes_default7919 #include <$ac_header>7920 _ACEOF7921 rm -f conftest.$ac_objext7922 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&57923 (eval $ac_compile) 2>conftest.er17924 ac_status=$?7925 grep -v '^ *+' conftest.er1 >conftest.err7926 rm -f conftest.er17927 cat conftest.err >&57928 echo "$as_me:$LINENO: \$? = $ac_status" >&57929 (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\"") >&57933 (eval $ac_try) 2>&57934 ac_status=$?7935 echo "$as_me:$LINENO: \$? = $ac_status" >&57936 (exit $ac_status); }; } &&7937 { ac_try='test -s conftest.$ac_objext'7938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&57939 (eval $ac_try) 2>&57940 ac_status=$?7941 echo "$as_me:$LINENO: \$? = $ac_status" >&57942 (exit $ac_status); }; }; then7943 ac_header_compiler=yes7944 else7945 echo "$as_me: failed program was:" >&57946 sed 's/^/| /' conftest.$ac_ext >&57947 7948 ac_header_compiler=no7949 fi7950 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext7951 echo "$as_me:$LINENO: result: $ac_header_compiler" >&57952 echo "${ECHO_T}$ac_header_compiler" >&67953 7954 # Is the header present?7955 echo "$as_me:$LINENO: checking $ac_header presence" >&57956 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&67957 cat >conftest.$ac_ext <<_ACEOF7958 /* confdefs.h. */7959 _ACEOF7960 cat confdefs.h >>conftest.$ac_ext7961 cat >>conftest.$ac_ext <<_ACEOF7962 /* end confdefs.h. */7963 #include <$ac_header>7964 _ACEOF7965 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&57966 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er17967 ac_status=$?7968 grep -v '^ *+' conftest.er1 >conftest.err7969 rm -f conftest.er17970 cat conftest.err >&57971 echo "$as_me:$LINENO: \$? = $ac_status" >&57972 (exit $ac_status); } >/dev/null; then7973 if test -s conftest.err; then7974 ac_cpp_err=$ac_c_preproc_warn_flag7975 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag7976 else7977 ac_cpp_err=7978 fi7979 else7980 ac_cpp_err=yes7981 fi7982 if test -z "$ac_cpp_err"; then7983 ac_header_preproc=yes7984 else7985 echo "$as_me: failed program was:" >&57986 sed 's/^/| /' conftest.$ac_ext >&57987 7988 ac_header_preproc=no7989 fi7990 rm -f conftest.err conftest.$ac_ext7991 echo "$as_me:$LINENO: result: $ac_header_preproc" >&57992 echo "${ECHO_T}$ac_header_preproc" >&67993 7994 # So? What about this header?7995 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in7996 yes:no: )7997 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&57998 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" >&58000 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}8001 ac_header_preproc=yes8002 ;;8003 no:yes:* )8004 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&58005 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?" >&58007 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}8008 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&58009 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\"" >&58011 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" >&58013 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" >&58015 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}8016 (8017 cat <<\_ASBOX8018 ## ---------------------------------------------- ##8019 ## Report this to orxonox-dev at mail.datacore.ch ##8020 ## ---------------------------------------------- ##8021 _ASBOX8022 ) |8023 sed "s/^/$as_me: WARNING: /" >&28024 ;;8025 esac8026 echo "$as_me:$LINENO: checking for $ac_header" >&58027 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&68028 if eval "test \"\${$as_ac_Header+set}\" = set"; then8029 echo $ECHO_N "(cached) $ECHO_C" >&68030 else8031 eval "$as_ac_Header=\$ac_header_preproc"8032 fi8033 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&58034 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&68035 8036 fi8037 if test `eval echo '${'$as_ac_Header'}'` = yes; then8038 cat >>confdefs.h <<_ACEOF8039 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 18040 _ACEOF8041 8042 fi8043 8044 done8045 8046 8047 # Checks for typedefs, structures, and compiler characteristics.8048 echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&58049 echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&68050 if test "${ac_cv_header_stdbool_h+set}" = set; then8051 echo $ECHO_N "(cached) $ECHO_C" >&68052 else8053 cat >conftest.$ac_ext <<_ACEOF8054 /* confdefs.h. */8055 _ACEOF8056 cat confdefs.h >>conftest.$ac_ext8057 cat >>conftest.$ac_ext <<_ACEOF8058 /* end confdefs.h. */8059 8060 #include <stdbool.h>8061 #ifndef bool8062 # error bool is not defined8063 #endif8064 #ifndef false8065 # error false is not defined8066 #endif8067 #if false8068 # error false is not 08069 #endif8070 #ifndef true8071 # error true is not defined8072 #endif8073 #if true != 18074 # error true is not 18075 #endif8076 #ifndef __bool_true_false_are_defined8077 # error __bool_true_false_are_defined is not defined8078 #endif8079 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 int8093 main ()8094 {8095 return !a + !b + !c + !d + !e + !f + !g + !h + !i;8096 ;8097 return 0;8098 }8099 _ACEOF8100 rm -f conftest.$ac_objext8101 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&58102 (eval $ac_compile) 2>conftest.er18103 ac_status=$?8104 grep -v '^ *+' conftest.er1 >conftest.err8105 rm -f conftest.er18106 cat conftest.err >&58107 echo "$as_me:$LINENO: \$? = $ac_status" >&58108 (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\"") >&58112 (eval $ac_try) 2>&58113 ac_status=$?8114 echo "$as_me:$LINENO: \$? = $ac_status" >&58115 (exit $ac_status); }; } &&8116 { ac_try='test -s conftest.$ac_objext'8117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&58118 (eval $ac_try) 2>&58119 ac_status=$?8120 echo "$as_me:$LINENO: \$? = $ac_status" >&58121 (exit $ac_status); }; }; then8122 ac_cv_header_stdbool_h=yes8123 else8124 echo "$as_me: failed program was:" >&58125 sed 's/^/| /' conftest.$ac_ext >&58126 8127 ac_cv_header_stdbool_h=no8128 fi8129 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext8130 fi8131 echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&58132 echo "${ECHO_T}$ac_cv_header_stdbool_h" >&68133 echo "$as_me:$LINENO: checking for _Bool" >&58134 echo $ECHO_N "checking for _Bool... $ECHO_C" >&68135 if test "${ac_cv_type__Bool+set}" = set; then8136 echo $ECHO_N "(cached) $ECHO_C" >&68137 else8138 cat >conftest.$ac_ext <<_ACEOF8139 /* confdefs.h. */8140 _ACEOF8141 cat confdefs.h >>conftest.$ac_ext8142 cat >>conftest.$ac_ext <<_ACEOF8143 /* end confdefs.h. */8144 $ac_includes_default8145 int8146 main ()8147 {8148 if ((_Bool *) 0)8149 return 0;8150 if (sizeof (_Bool))8151 return 0;8152 ;8153 return 0;8154 }8155 _ACEOF8156 rm -f conftest.$ac_objext8157 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&58158 (eval $ac_compile) 2>conftest.er18159 ac_status=$?8160 grep -v '^ *+' conftest.er1 >conftest.err8161 rm -f conftest.er18162 cat conftest.err >&58163 echo "$as_me:$LINENO: \$? = $ac_status" >&58164 (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\"") >&58168 (eval $ac_try) 2>&58169 ac_status=$?8170 echo "$as_me:$LINENO: \$? = $ac_status" >&58171 (exit $ac_status); }; } &&8172 { ac_try='test -s conftest.$ac_objext'8173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&58174 (eval $ac_try) 2>&58175 ac_status=$?8176 echo "$as_me:$LINENO: \$? = $ac_status" >&58177 (exit $ac_status); }; }; then8178 ac_cv_type__Bool=yes8179 else8180 echo "$as_me: failed program was:" >&58181 sed 's/^/| /' conftest.$ac_ext >&58182 8183 ac_cv_type__Bool=no8184 fi8185 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext8186 fi8187 echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&58188 echo "${ECHO_T}$ac_cv_type__Bool" >&68189 if test $ac_cv_type__Bool = yes; then8190 8191 cat >>confdefs.h <<_ACEOF8192 #define HAVE__BOOL 18193 _ACEOF8194 8195 8196 fi8197 8198 if test $ac_cv_header_stdbool_h = yes; then8199 8200 cat >>confdefs.h <<\_ACEOF8201 #define HAVE_STDBOOL_H 18202 _ACEOF8203 8204 fi8205 8206 8207 # Checks for library functions.8208 8209 for ac_header in stdlib.h8210 do8211 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`8212 if eval "test \"\${$as_ac_Header+set}\" = set"; then8213 echo "$as_me:$LINENO: checking for $ac_header" >&58214 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&68215 if eval "test \"\${$as_ac_Header+set}\" = set"; then8216 echo $ECHO_N "(cached) $ECHO_C" >&68217 fi8218 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&58219 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&68220 else8221 # Is the header compilable?8222 echo "$as_me:$LINENO: checking $ac_header usability" >&58223 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&68224 cat >conftest.$ac_ext <<_ACEOF8225 /* confdefs.h. */8226 _ACEOF8227 cat confdefs.h >>conftest.$ac_ext8228 cat >>conftest.$ac_ext <<_ACEOF8229 /* end confdefs.h. */8230 $ac_includes_default8231 #include <$ac_header>8232 _ACEOF8233 rm -f conftest.$ac_objext8234 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&58235 (eval $ac_compile) 2>conftest.er18236 ac_status=$?8237 grep -v '^ *+' conftest.er1 >conftest.err8238 rm -f conftest.er18239 cat conftest.err >&58240 echo "$as_me:$LINENO: \$? = $ac_status" >&58241 (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\"") >&58245 (eval $ac_try) 2>&58246 ac_status=$?8247 echo "$as_me:$LINENO: \$? = $ac_status" >&58248 (exit $ac_status); }; } &&8249 { ac_try='test -s conftest.$ac_objext'8250 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&58251 (eval $ac_try) 2>&58252 ac_status=$?8253 echo "$as_me:$LINENO: \$? = $ac_status" >&58254 (exit $ac_status); }; }; then8255 ac_header_compiler=yes8256 else8257 echo "$as_me: failed program was:" >&58258 sed 's/^/| /' conftest.$ac_ext >&58259 8260 ac_header_compiler=no8261 fi8262 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext8263 echo "$as_me:$LINENO: result: $ac_header_compiler" >&58264 echo "${ECHO_T}$ac_header_compiler" >&68265 8266 # Is the header present?8267 echo "$as_me:$LINENO: checking $ac_header presence" >&58268 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&68269 cat >conftest.$ac_ext <<_ACEOF8270 /* confdefs.h. */8271 _ACEOF8272 cat confdefs.h >>conftest.$ac_ext8273 cat >>conftest.$ac_ext <<_ACEOF8274 /* end confdefs.h. */8275 #include <$ac_header>8276 _ACEOF8277 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&58278 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er18279 ac_status=$?8280 grep -v '^ *+' conftest.er1 >conftest.err8281 rm -f conftest.er18282 cat conftest.err >&58283 echo "$as_me:$LINENO: \$? = $ac_status" >&58284 (exit $ac_status); } >/dev/null; then8285 if test -s conftest.err; then8286 ac_cpp_err=$ac_c_preproc_warn_flag8287 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag8288 else8289 ac_cpp_err=8290 fi8291 else8292 ac_cpp_err=yes8293 fi8294 if test -z "$ac_cpp_err"; then8295 ac_header_preproc=yes8296 else8297 echo "$as_me: failed program was:" >&58298 sed 's/^/| /' conftest.$ac_ext >&58299 8300 ac_header_preproc=no8301 fi8302 rm -f conftest.err conftest.$ac_ext8303 echo "$as_me:$LINENO: result: $ac_header_preproc" >&58304 echo "${ECHO_T}$ac_header_preproc" >&68305 8306 # So? What about this header?8307 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in8308 yes:no: )8309 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&58310 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" >&58312 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}8313 ac_header_preproc=yes8314 ;;8315 no:yes:* )8316 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&58317 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?" >&58319 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}8320 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&58321 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\"" >&58323 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" >&58325 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" >&58327 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}8328 (8329 cat <<\_ASBOX8330 ## ---------------------------------------------- ##8331 ## Report this to orxonox-dev at mail.datacore.ch ##8332 ## ---------------------------------------------- ##8333 _ASBOX8334 ) |8335 sed "s/^/$as_me: WARNING: /" >&28336 ;;8337 esac8338 echo "$as_me:$LINENO: checking for $ac_header" >&58339 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&68340 if eval "test \"\${$as_ac_Header+set}\" = set"; then8341 echo $ECHO_N "(cached) $ECHO_C" >&68342 else8343 eval "$as_ac_Header=\$ac_header_preproc"8344 fi8345 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&58346 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&68347 8348 fi8349 if test `eval echo '${'$as_ac_Header'}'` = yes; then8350 cat >>confdefs.h <<_ACEOF8351 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 18352 _ACEOF8353 7945 8354 7946 fi … … 8656 8248 Usually this means the macro was only invoked conditionally." >&5 8657 8249 echo "$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 fi8661 if test -z "${SUB_PROJECTS_TRUE}" && test -z "${SUB_PROJECTS_FALSE}"; then8662 { { echo "$as_me:$LINENO: error: conditional \"SUB_PROJECTS\" was never defined.8663 Usually this means the macro was only invoked conditionally." >&58664 echo "$as_me: error: conditional \"SUB_PROJECTS\" was never defined.8665 8250 Usually this means the macro was only invoked conditionally." >&2;} 8666 8251 { (exit 1); exit 1; }; } -
orxonox/trunk/configure.ac
r3790 r3863 142 142 143 143 #-------------------# 144 # SDL_image-disable #145 #-------------------#146 def_sdl_image=yes147 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; then152 echo "yes"153 fi154 if test x$def_sdl_image = xno; then155 echo "no"156 fi157 158 #-------------------#159 144 # SubProject-enable # 160 145 #-------------------# … … 181 166 [builds orxonox with profiling support]), [def_profiling=yes]) 182 167 if test x$def_profiling = xyes; then 183 AM_CONDITIONAL(SUB_PROJECTS, test x$def_sub_projects = xyes)184 168 echo "yes" 185 169 CXXFLAGS="$CXXFLAGS -pg" 186 170 fi 187 171 if test x$def_profiling = xno; then 172 echo "no" 173 fi 174 175 #----------------# 176 # efence Enabled # 177 #----------------# 178 def_efence=no 179 AC_MSG_CHECKING([if efence should be enabled]) 180 AC_ARG_ENABLE([efence], 181 AC_HELP_STRING( [--enable-efence], 182 [builds orxonox with efence support]), [def_efence=yes]) 183 if test x$def_efence = xyes; then 184 echo "yes" 185 fi 186 if test x$def_efence = xno; then 188 187 echo "no" 189 188 fi … … 444 443 # SDL_Image # 445 444 #-----------# 446 if test x$def_sdl_image = xyes; then447 445 # 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 446 AC_CHECK_HEADERS([SDL_image.h] ,, 447 [echo "sdl_image header not found."; def_sdl_image=no; exit -1]) 452 448 # 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 449 AC_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 507 459 508 460 #-----# … … 583 535 fi 584 536 537 538 #--------# 539 # efence # 540 #--------# 541 if 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 547 fi 585 548 586 549 # FIXME: Replace `main' with a function in `-lm': -
orxonox/trunk/src/Makefile.am
r3851 r3863 113 113 defs/glincl.h \ 114 114 defs/comincl.h \ 115 defs/confincl.h \ 115 116 defs/error.h \ 116 117 defs/debug.h \ -
orxonox/trunk/src/Makefile.in
r3851 r3863 326 326 defs/glincl.h \ 327 327 defs/comincl.h \ 328 defs/confincl.h \ 328 329 defs/error.h \ 329 330 defs/debug.h \ -
orxonox/trunk/src/animation.cc
r3860 r3863 14 14 */ 15 15 16 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_ANIM 16 17 17 18 #include "animation.h" … … 84 85 this->replay(); 85 86 break; 87 case ANIM_INF_REWIND: 88 this->stop(); 89 break; 86 90 case ANIM_INF_DELETE: // this will possibly never be made 87 91 this->bDelete = true; -
orxonox/trunk/src/animation.h
r3860 r3863 9 9 #include "list.h" 10 10 #include "base_object.h" 11 #include "confincl.h" // must be here to determin the DEBUG-level 11 12 12 13 // FORWARD DEFINITION 13 14 14 15 //! 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 */ 15 30 typedef enum ANIM_FUNCTION {ANIM_CONSTANT, 16 31 ANIM_LINEAR, … … 25 40 /** 26 41 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 28 45 */ 29 46 typedef enum ANIM_INFINITY {ANIM_INF_CONSTANT, 30 47 ANIM_INF_REPLAY, 48 ANIM_INF_REWIND, 31 49 ANIM_INF_DELETE};//, ANIM_INF_LINEAR, ANIM_INF_PINGPONG; 32 33 //! A Struct for Keyframes that simply hold a float34 typedef struct KeyFrameF35 {36 float duration; //!< duration of this keyframe37 float value; //!< value of this keyframe38 ANIM_FUNCTION animFunc; //!< with whitch function to iterate to the next KeyFrameF39 };40 50 41 51 //! A Superclass for describing an animation (all animations will be derived from this one) -
orxonox/trunk/src/animation3d.cc
r3858 r3863 17 17 */ 18 18 19 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_ANIM 19 20 20 21 #include "animation3d.h" -
orxonox/trunk/src/animation3d.h
r3859 r3863 2 2 \file animation3d.h 3 3 */ 4 4 5 5 6 #include "animation.h" -
orxonox/trunk/src/defs/debug.h
r3813 r3863 19 19 20 20 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 22 22 \li SOFT: If you want each module can have its own variable for processing. just pass it to DEBUG_MODULE_SOFT 23 23 */ … … 26 26 #define _DEBUG_H 27 27 28 #if HAVE_CONFIG_H 29 #include <config.h> 30 #endif 28 #include "confincl.h" 31 29 32 30 #include <stdio.h> … … 56 54 #define HARD_DEBUG_LEVEL DEBUG 57 55 #else /* DEBUG_SPECIAL_MODULE */ 58 // DEFINE MODULES \\56 // DEFINE MODULES 59 57 #define DEBUG_MODULE_ORXONOX 0 60 58 #define DEBUG_MODULE_WORLD 1 -
orxonox/trunk/src/defs/stdincl.h
r3860 r3863 11 11 typedef unsigned char byte; 12 12 13 // this includes the information from configure/makefiles 14 #if HAVE_CONFIG_H 15 #include <config.h> 16 #endif 13 #include "confincl.h" 17 14 18 15 #ifdef __WIN32__ -
orxonox/trunk/src/lib/graphics/importer/texture.cc
r3790 r3863 12 12 main-programmer: Benjamin Grauer 13 13 co-programmer: ... 14 15 TGA-code: borrowed from nehe-Tutorials16 17 14 */ 18 19 15 20 16 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_IMPORTER … … 66 62 \param b The second value 67 63 */ 68 inlinevoid Texture::swap (unsigned char &a, unsigned char &b)64 void Texture::swap (unsigned char &a, unsigned char &b) 69 65 { 70 66 unsigned char temp; … … 98 94 } 99 95 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 */ 101 100 bool Texture::loadImage(const char* imageName) 102 101 { … … 138 137 this->loadTexToGL (this->pImage); 139 138 SDL_FreeSurface(map); 140 this->pImage->data = NULL;139 pImage->data = NULL; 141 140 } 142 141 else … … 147 146 } 148 147 } 149 150 151 #else /* HAVE_SDL_IMAGE_H */152 /**153 \brief Makes the Programm ready to Read-in a texture-File154 1. Checks what type of Image should be imported155 \todo Checks where to find the Image156 */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 else185 {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 else191 {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 width220 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 height226 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 planes236 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 bpp248 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-file302 \param jpgName the Name of the Image to load303 */304 bool Texture::loadJPG (char* jpgName)305 {306 #ifdef HAVE_JPEGLIB_H307 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 opened312 if((pFile = fopen(jpgName, "rb")) == NULL)313 {314 // Display an error message saying the file was not found, then return NULL315 PRINTF(2)("Unable to load JPG File %s.\n", jpgName);316 return false;317 }318 319 // Create an error handler320 jpeg_error_mgr jerr;321 322 // Have our compression info object point to the error handler address323 cinfo.err = jpeg_std_error(&jerr);324 325 // Initialize the decompression object326 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 // DECOFING335 // Read in the header of the jpeg file336 jpeg_read_header(&cinfo, TRUE);337 338 // Start to decompress the jpeg file with our compression info339 jpeg_start_decompress(&cinfo);340 341 // Get the image dimensions and row span to read in the pixel data342 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 buffer347 pImage->data = new unsigned char[pImage->rowSpan * pImage->height];348 349 // Here we use the library's state variable cinfo.output_scanline as the350 // loop counter, so that we don't have to keep track ourselves.351 352 // Create an array of row pointers353 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 data358 int rowsRead = 0;359 while (cinfo.output_scanline < cinfo.output_height)360 {361 // Read in the current row of pixels and increase the rowsRead count362 rowsRead += jpeg_read_scanlines(&cinfo, &rowPtr[rowsRead], cinfo.output_height - rowsRead);363 }364 365 // Delete the temporary row pointers366 delete [] rowPtr;367 368 // Finish decompressing the data369 jpeg_finish_decompress(&cinfo);// decodeJPG(&cinfo, pImage);370 371 // This releases all the stored memory for reading and decoding the jpeg372 jpeg_destroy_decompress(&cinfo);373 374 // Close the file pointer that opened the file375 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-file401 \param tgaName the Name of the Image to load402 */403 bool Texture::loadTGA(const char * tgaName)404 {405 typedef struct406 {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 Header412 GLubyte cTGAcompare[12] = {0,0,10,0,0,0,0,0,0,0,0,0}; // Compressed TGA Header413 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 else445 {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-file456 \param filename the Name of the Image to load457 \param fTGA a Pointer to a File, that should be read458 */459 bool Texture::loadUncompressedTGA(const char * filename, FILE * fTGA)460 {461 GLubyte header[6]; // First 6 Useful Bytes From The Header462 GLuint bytesPerPixel; // Holds Number Of Bytes Per Pixel Used In The TGA File463 GLuint imageSize; // Used To Store The Image Size When Setting Aside Ram464 GLuint temp; // Temporary Variable465 GLuint type;466 GLuint Height; // Height of Image467 GLuint Width; // Width of Image468 GLuint Bpp; // Bits Per Pixel469 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 valid481 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 else492 {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-file529 \param filename the Name of the Image to load530 \param fTGA a Pointer to a File, that should be read531 */532 bool Texture::loadCompressedTGA(const char * filename, FILE * fTGA)533 {534 GLubyte header[6]; // First 6 Useful Bytes From The Header535 GLuint bytesPerPixel; // Holds Number Of Bytes Per Pixel Used In The TGA File536 GLuint imageSize; // Used To Store The Image Size When Setting Aside Ram537 GLuint temp; // Temporary Variable538 GLuint type;539 GLuint Height; // Height of Image540 GLuint Width; // Width of Image541 GLuint Bpp; // Bits Per Pixel542 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 ok559 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 do576 {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 1589 if(chunkheader < 128)590 {591 short counter;592 chunkheader++;593 // Read RAW color values594 for(counter = 0; counter < chunkheader; counter++)595 {596 // Try to read 1 pixel597 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 memory613 // Flip R and B vcolor values around in the process614 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 image619 {620 pImage->data[currentbyte + 3] = colorbuffer[3];// copy the 4th byte621 }622 623 currentbyte += bytesPerPixel;624 currentpixel++;625 626 // Make sure we haven't read too many pixels627 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 times645 else646 {647 short counter;648 chunkheader -= 127; // Subteact 127 to get rid of the ID bit649 if(fread(colorbuffer, 1, bytesPerPixel, fTGA) != bytesPerPixel) // Attempt to read following color values650 {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 dictated666 {667 // switch R and B bytes areound while copying668 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 left700 701 this->loadTexToGL (pImage);702 703 return true;704 }705 706 707 /**708 \brief reads in a png-file709 \param pngName the Name of the Image to load710 */711 bool Texture::loadPNG(const char* pngName)712 {713 #ifdef HAVE_PNG_H714 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 else793 {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 14 14 #include "debug.h" 15 15 16 #ifdef HAVE_SDL_IMAGE_H17 16 #include <SDL_image.h> 18 #else19 // IMAGE LIBS //20 #ifdef HAVE_JPEGLIB_H21 extern "C"{ // This has to be done, because not a c++ lib22 #include <jpeglib.h>23 }24 #endif /* HAVE_JPEGLIB_H */25 #ifdef HAVE_PNG_H26 #include <png.h>27 #endif /* HAVE_PNG_H */28 #endif /* HAVE_SDL_IMAGE_H */29 17 30 18 //! A Class, that reads in Textures from different fileformats. … … 47 35 SDL_Surface* map; //!< The map SDL initializes for this element. 48 36 char* searchTextureInPaths(const char* texName) const; 49 inlinevoid swap(unsigned char &a, unsigned char &b);37 void swap(unsigned char &a, unsigned char &b); 50 38 public: 51 39 Texture(void); … … 57 45 58 46 bool loadImage(const char* imageName); 59 #ifndef HAVE_SDL_IMAGE_H 47 }; 60 48 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 #endif73 74 75 };76 49 #endif /* _TEXTURE_H */ -
orxonox/trunk/src/t_animation.h
r3860 r3863 21 21 #define _T_ANIMATION_H 22 22 23 23 24 #include "animation.h" 24 25 25 26 #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 29 typedef 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 26 36 27 37 //! A Class to handle some animation for single floated values.
Note: See TracChangeset
for help on using the changeset viewer.