configure --without-exiv2
authorVladimir Nadvornik <nadvornik@suse.cz>
Sat, 22 Mar 2008 17:09:14 +0000 (17:09 +0000)
committerVladimir Nadvornik <nadvornik@suse.cz>
Sat, 22 Mar 2008 17:09:14 +0000 (17:09 +0000)
configure.in
src/exif.c

index 7feb4f1..242700c 100644 (file)
@@ -49,16 +49,20 @@ if test "x$with_lcms" != "xno"; then
 else
   have_lcms="no (lcms support disabled)"
 fi
+AC_SUBST(LCMS_LIBS)
+AM_CONDITIONAL(HAVE_LCMS, test "$have_lcms" = "yes")
 
+AC_ARG_WITH(exiv2, [  --without-exiv2          build without exiv2 support])
 
-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) ] )
+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
 
-AC_SUBST(LCMS_LIBS)
-AM_CONDITIONAL(HAVE_LCMS, test "$have_lcms" = "yes")
 
 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
index fe151af..768d5bd 100644 (file)
@@ -491,7 +491,7 @@ static void exif_item_free(ExifItem *item)
        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 @@ ExifItem *exif_get_item(ExifData *exif, const gchar *key)
 
 #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 @@ gint exif_item_get_integer(ExifItem *item, gint *value)
        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,32 +1508,8 @@ ExifRational *exif_item_get_rational(ExifItem *item, gint *sign)
        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)
 {
        gint i;