Changeset 3075
- Timestamp:
- Oct 23, 2008, 4:25:09 PM (14 years ago)
- Location:
- libpipi/trunk
- Files:
-
- 4 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
libpipi/trunk/configure.ac
r3074 r3075 184 184 185 185 186 if test "${ac_cv_my_have_il}" = "no" -a "${ac_cv_my_have_ole}" = "no" -a "${ac_cv_my_have_sdl}" = "no" -a "${ac_cv_my_have_imlib2}" = "no" -a "${ac_cv_my_have_opencv}" = "no" -a "${ac_cv_my_have_cocoa}" = "no"; then 186 # Use Modular codecs ? 187 MODULAR_CODEC="" 188 ac_cv_my_have_modular="no" 189 190 ac_cv_my_have_libjpeg="no" 191 AC_CHECK_HEADERS(jpeglib.h, 192 [ac_cv_my_have_libjpeg="yes"], 193 [ac_cv_my_have_libjpeg="no"]) 194 if test "${ac_cv_my_have_libjpeg}" != "no"; then 195 ac_cv_my_have_modular="yes" 196 AC_DEFINE(USE_LIBJPEG, 1, Define to 1 to use libjpeg) 197 AC_DEFINE(USE_MODULAR, 1, Define to 1 to use modular codecs) 198 MODULAR_CODEC="${MODULAR_CODEC} libjpeg" 199 fi 200 AM_CONDITIONAL(USE_LIBJPEG, test "${ac_cv_my_have_libjpeg}" = "yes") 201 AM_CONDITIONAL(USE_MODULAR, test "${ac_cv_my_have_modular}" = "yes") 202 203 AC_MSG_CHECKING(valid modular codecs) 204 if test -z "${MODULAR_CODEC}"; then 205 AC_MSG_RESULT(none) 206 else 207 MODULAR_CODEC="${MODULAR_CODEC# *}" 208 AC_MSG_RESULT([${MODULAR_CODEC}]) 209 fi 210 211 212 213 if test "${ac_cv_my_have_il}" = "no" -a "${ac_cv_my_have_ole}" = "no" -a "${ac_cv_my_have_sdl}" = "no" -a "${ac_cv_my_have_imlib2}" = "no" -a "${ac_cv_my_have_opencv}" = "no" -a "${ac_cv_my_have_cocoa}" = "no" -a "${ac_cv_my_have_modular}" = "no"; then 187 214 AC_MSG_ERROR([[cannot find DevIL, OLE, SDL_Image, Imlib2, Cocoa, or OpenCV, please install one of them]]) 188 215 fi -
libpipi/trunk/pipi/Makefile.am
r3067 r3075 123 123 codec_sources += codec/coreimage.m 124 124 endif 125 126 # Modular codecs 127 if USE_MODULAR 128 codec_sources += codec/modular.c 129 if USE_LIBJPEG 130 codec_libs += -ljpeg 131 codec_sources += codec/modular/jpeg.c 132 endif 133 endif -
libpipi/trunk/pipi/codec.c
r3070 r3075 39 39 ret = pipi_load_oric(name); 40 40 41 #if USE_LIBJPEG 42 if(!ret) 43 ret = pipi_load_modular(name); 44 #endif 41 45 #if USE_IMLIB2 42 46 if(!ret) … … 111 115 ret = pipi_save_coreimage(img, name); 112 116 #endif 113 117 114 118 return ret; 115 119 } -
libpipi/trunk/pipi/pipi_internals.h
r3074 r3075 98 98 #endif 99 99 100 /* Modular codecs */ 101 #ifdef USE_MODULAR 102 pipi_image_t *pipi_load_modular(const char *name); 103 int pipi_save_modular(pipi_image_t *img, const char *name); 104 #endif 105 106 100 107 101 108 pipi_image_t *pipi_load_oric(const char *name);
Note: See TracChangeset
for help on using the changeset viewer.