# HG changeset patch # User nadvornik # Date 1206205754 0 # Node ID d324b284e183c3a5448479cf0c12931e31076bb0 # Parent 19df9953a5d1f45819ec98d5e498b0c48dbb9c6e configure --without-exiv2 diff -r 19df9953a5d1 -r d324b284e183 configure.in --- a/configure.in Sat Mar 22 16:43:59 2008 +0000 +++ b/configure.in Sat Mar 22 17:09:14 2008 +0000 @@ -49,17 +49,21 @@ else have_lcms="no (lcms support disabled)" fi - - -PKG_CHECK_MODULES(EXIV2, exiv2 >= 0.11, - [ have_exiv2=yes - AC_DEFINE(HAVE_EXIV2, 1, have exiv2) ], - [ have_exiv2=no - AC_MSG_RESULT($EXIV2_PKG_ERRORS) ] ) - AC_SUBST(LCMS_LIBS) AM_CONDITIONAL(HAVE_LCMS, test "$have_lcms" = "yes") +AC_ARG_WITH(exiv2, [ --without-exiv2 build without exiv2 support]) + +have_exiv2=no + +if test "x$with_exiv2" != "xno"; then + PKG_CHECK_MODULES(EXIV2, exiv2 >= 0.11, + [ have_exiv2=yes + AC_DEFINE(HAVE_EXIV2, 1, have exiv2) ], + [ AC_MSG_RESULT($EXIV2_PKG_ERRORS) ] ) +fi + + ALL_LINGUAS="ar be bg ca cs da de eo es et eu fi fr hu id it ja ko nl no pl pt_BR ro ru sk sl sv th tr uk vi zh_CN.GB2312 zh_TW" GETTEXT_PACKAGE=$PACKAGE AC_SUBST(GETTEXT_PACKAGE) diff -r 19df9953a5d1 -r d324b284e183 src/exif.c --- a/src/exif.c Sat Mar 22 16:43:59 2008 +0000 +++ b/src/exif.c Sat Mar 22 17:09:14 2008 +0000 @@ -491,7 +491,7 @@ g_free(item); } -const char *exif_item_get_tag_name(ExifItem *item) +char *exif_item_get_tag_name(ExifItem *item) { if (!item || !item->marker) return NULL; return g_strdup(item->marker->key); @@ -1322,6 +1322,12 @@ #define EXIF_DATA_AS_TEXT_MAX_COUNT 16 +gchar *exif_item_get_string(ExifItem *item, int idx) +{ + return exif_item_get_data_as_text(item); +} + + gchar *exif_item_get_data_as_text(ExifItem *item) { const ExifMarker *marker; @@ -1487,13 +1493,6 @@ return FALSE; } -gint exif_get_integer(ExifData *exif, const gchar *key, gint *value) -{ - ExifItem *item; - - item = exif_get_item(exif, key); - return exif_item_get_integer(item, value); -} ExifRational *exif_item_get_rational(ExifItem *item, gint *sign) { @@ -1509,31 +1508,7 @@ return NULL; } -ExifRational *exif_get_rational(ExifData *exif, const gchar *key, gint *sign) -{ - ExifItem *item; - item = exif_get_item(exif, key); - return exif_item_get_rational(item, sign); -} - - -gchar *exif_get_data_as_text(ExifData *exif, const gchar *key) -{ - ExifItem *item; - gchar *text; - gint key_valid; - - if (!key) return NULL; - - text = exif_get_formatted_by_key(exif, key, &key_valid); - if (key_valid) return text; - - item = exif_get_item(exif, key); - if (item) return exif_item_get_data_as_text(item); - - return NULL; -} const gchar *exif_get_tag_description_by_key(const gchar *key) {