changeset 192:d324b284e183

configure --without-exiv2
author nadvornik
date Sat, 22 Mar 2008 17:09:14 +0000
parents 19df9953a5d1
children 50d7a137ea93
files configure.in src/exif.c
diffstat 2 files changed, 19 insertions(+), 40 deletions(-) [+]
line wrap: on
line diff
--- 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)
--- 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)
 {