Changeset 3110 in orxonox.OLD for orxonox/branches
- Timestamp:
- Dec 6, 2004, 1:11:56 AM (20 years ago)
- Location:
- orxonox/branches/images
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/images/configure
r3108 r3110 5496 5496 osX="yes" 5497 5497 5498 CPPFLAGS="-I/sw/include $CPPFLAGS" 5498 5499 # checking gl header 5499 5500 … … 5825 5826 LIBS="$LIBS $SDL_LIBS" 5826 5827 5827 def_sdl_image=no;5828 5828 ;; 5829 5829 … … 6213 6213 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 6214 6214 _ACEOF 6215 6216 else 6217 { { echo "$as_me:$LINENO: error: cannot find jpeg headers" >&5 6218 echo "$as_me: error: cannot find jpeg headers" >&2;} 6219 { (exit 1); exit 1; }; } 6215 jpegHeader="yes" 6216 else 6217 jpegHeader="no" 6220 6218 fi 6221 6219 6222 6220 done 6223 6221 6224 6225 echo "$as_me:$LINENO: checking for main in -ljpeg" >&5 6222 if test $jpegHeader = "no"; then 6223 echo " not including jpeg." 6224 else 6225 echo "$as_me:$LINENO: checking for main in -ljpeg" >&5 6226 6226 echo $ECHO_N "checking for main in -ljpeg... $ECHO_C" >&6 6227 6227 if test "${ac_cv_lib_jpeg_main+set}" = set; then … … 6294 6294 exit -1 6295 6295 fi 6296 6296 fi 6297 6297 6298 6298 ## checking for libpng … … 6442 6442 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 6443 6443 _ACEOF 6444 6445 else 6446 { { echo "$as_me:$LINENO: error: cannot find jpeg headers" >&5 6447 echo "$as_me: error: cannot find jpeg headers" >&2;} 6448 { (exit 1); exit 1; }; } 6444 pngHeader="yes" 6445 else 6446 pngHeader="no" 6449 6447 fi 6450 6448 6451 6449 done 6452 6450 6453 6454 echo "$as_me:$LINENO: checking for main in -lpng" >&5 6451 if test $pngHeader = "no"; then 6452 echo " not including png." 6453 else 6454 echo "$as_me:$LINENO: checking for main in -lpng" >&5 6455 6455 echo $ECHO_N "checking for main in -lpng... $ECHO_C" >&6 6456 6456 if test "${ac_cv_lib_png_main+set}" = set; then … … 6523 6523 exit -1 6524 6524 fi 6525 fi 6525 6526 fi 6526 6527 -
orxonox/branches/images/configure.ac
r3109 r3110 255 255 if test "$def_sdl_image" = "no"; then 256 256 ## checking for libjpeg 257 AC_CHECK_HEADERS(jpeglib.h ,, 258 [AC_MSG_ERROR([cannot find jpeg headers]) ]) 259 260 AC_CHECK_LIB([jpeg], [main], FOUND_jpeg=yes) 257 AC_CHECK_HEADERS(jpeglib.h ,jpegHeader="yes", 258 jpegHeader="no") 259 if test $jpegHeader = "no"; then 260 echo " not including jpeg." 261 else 262 AC_CHECK_LIB([jpeg], [main], FOUND_jpeg=yes) 261 263 if test "$FOUND_jpeg" = "yes" ; then 262 264 LIBS="$LIBS -ljpeg" … … 268 270 exit -1 269 271 fi 270 272 fi 271 273 272 274 ## checking for libpng 273 AC_CHECK_HEADERS(png.h ,, 274 [AC_MSG_ERROR([cannot find jpeg headers]) ]) 275 276 AC_CHECK_LIB([png], [main], FOUND_png=yes) 275 AC_CHECK_HEADERS(png.h ,pngHeader="yes", 276 pngHeader="no") 277 if test $pngHeader = "no"; then 278 echo " not including png." 279 else 280 AC_CHECK_LIB([png], [main], FOUND_png=yes) 277 281 if test "$FOUND_png" = "yes" ; then 278 282 LIBS="$LIBS -lpng" … … 283 287 echo "------------------" 284 288 exit -1 285 fi 289 fi 290 fi 286 291 fi 287 292 -
orxonox/branches/images/importer/material.cc
r3108 r3110 564 564 bool Material::loadJPG (char* jpgName, GLuint* texture) 565 565 { 566 #ifdef HAVE_JPEGLIB_H 566 567 struct jpeg_decompress_struct cinfo; 567 568 Image *pImage = NULL; … … 649 650 } 650 651 return true; 652 #else /* HAVE_JPEGLIB_H */ 653 if (verbose >=1) 654 printf ("sorry, but you did not compile with jpeg-support.\nEither install SDL_image or jpeglib, and recompile to see the image\n"); 655 return false; 656 #endif /* HAVE_JPEGLIB_H */ 657 651 658 } 652 659 … … 980 987 bool Material::loadPNG(const char* pngName, GLuint* texture) 981 988 { 989 #ifdef HAVE_PNG_H 982 990 Image* pImage = new Image; 983 991 … … 1099 1107 1100 1108 return true; 1109 #else /* HAVE_PNG_H */ 1110 if (verbose >=1) 1111 printf ("sorry, but you did not compile with png-support.\nEither install SDL_image or libpng, and recompile to see the image\n"); 1112 return false; 1113 #endif /* HAVE_PNG_H */ 1114 1101 1115 } 1102 1116 -
orxonox/branches/images/importer/material.h
r3104 r3110 17 17 #if HAVE_CONFIG_H 18 18 #include <config.h> 19 #endif 19 #endif /* HAVE_CONFIG_H */ 20 20 21 21 #ifdef HAVE_SDL_SDL_IMAGE_H … … 23 23 #else 24 24 // IMAGE LIBS // 25 #ifdef HAVE_JPEGLIB_H 25 26 extern "C"{ // This has to be done, because not a c++ lib 26 27 #include <jpeglib.h> 27 28 } 29 #endif /* HAVE_JPEGLIB_H */ 30 #ifdef HAVE_PNG_H 28 31 #include <png.h> 29 #endif 32 #endif /* HAVE_PNG_H */ 33 #endif /* HAVE_SDL_SDL_IMAGE_H */ 30 34 31 35 //! Class to handle Materials.
Note: See TracChangeset
for help on using the changeset viewer.