From ecacdbc7cd9b76b6d7de2ff7a4eef244419a9855 Mon Sep 17 00:00:00 2001 From: Mukund Sivaraman Date: Sun, 18 Sep 2011 08:09:03 +0530 Subject: [PATCH] file-jpeg: Conditionally compile files with EXIF related code --- plug-ins/file-jpeg/Makefile.am | 15 +++++++++++---- plug-ins/file-jpeg/gimpexif.c | 5 ----- plug-ins/file-jpeg/gimpexif.h | 4 ---- plug-ins/file-jpeg/jpeg-exif.c | 5 ----- plug-ins/file-jpeg/jpeg-exif.h | 4 ---- 5 files changed, 11 insertions(+), 22 deletions(-) diff --git a/plug-ins/file-jpeg/Makefile.am b/plug-ins/file-jpeg/Makefile.am index 4e266bfeb3..8861f5d318 100644 --- a/plug-ins/file-jpeg/Makefile.am +++ b/plug-ins/file-jpeg/Makefile.am @@ -33,8 +33,6 @@ libexec_PROGRAMS = file-jpeg file_jpeg_SOURCES = \ jpeg.c \ jpeg.h \ - jpeg-exif.c \ - jpeg-exif.h \ jpeg-icc.c \ jpeg-icc.h \ jpeg-load.c \ @@ -44,9 +42,15 @@ file_jpeg_SOURCES = \ jpeg-quality.c \ jpeg-quality.h \ jpeg-settings.c \ - jpeg-settings.h \ + jpeg-settings.h + +if HAVE_LIBEXIF +file_jpeg_SOURCES += \ + jpeg-exif.c \ + jpeg-exif.h \ gimpexif.c \ gimpexif.h +endif file_jpeg_LDADD = \ $(libgimpui) \ @@ -59,11 +63,14 @@ file_jpeg_LDADD = \ $(JPEG_LIBS) \ $(LCMS_LIBS) \ $(GTK_LIBS) \ - $(EXIF_LIBS) \ $(RT_LIBS) \ $(INTLLIBS) \ $(file_jpeg_RC) +if HAVE_LIBEXIF +file_jpeg_LDADD += \ + $(EXIF_LIBS) +endif noinst_PROGRAMS = jpegqual diff --git a/plug-ins/file-jpeg/gimpexif.c b/plug-ins/file-jpeg/gimpexif.c index af51bd9713..acf6077ea5 100644 --- a/plug-ins/file-jpeg/gimpexif.c +++ b/plug-ins/file-jpeg/gimpexif.c @@ -25,8 +25,6 @@ #include -#ifdef HAVE_LIBEXIF - #include #include #include @@ -160,6 +158,3 @@ gimp_exif_data_remove_entry (ExifData *exif_data, if (entry) exif_content_remove_entry (exif_data->ifd[ifd], entry); } - - -#endif /* HAVE_LIBEXIF */ diff --git a/plug-ins/file-jpeg/gimpexif.h b/plug-ins/file-jpeg/gimpexif.h index 65b9986d19..5ceaaef1e2 100644 --- a/plug-ins/file-jpeg/gimpexif.h +++ b/plug-ins/file-jpeg/gimpexif.h @@ -22,8 +22,6 @@ #ifndef __GIMP_EXIF_H__ #define __GIMP_EXIF_H__ -#ifdef HAVE_LIBEXIF - void gimp_metadata_store_exif (gint32 image_ID, ExifData *exif_data); @@ -38,6 +36,4 @@ void gimp_exif_data_remove_entry (ExifData *exif_data, ExifIfd ifd, ExifTag tag); -#endif /* HAVE_LIBEXIF */ - #endif /* __GIMP_EXIF_H__ */ diff --git a/plug-ins/file-jpeg/jpeg-exif.c b/plug-ins/file-jpeg/jpeg-exif.c index 30caf53b03..c49e464db8 100644 --- a/plug-ins/file-jpeg/jpeg-exif.c +++ b/plug-ins/file-jpeg/jpeg-exif.c @@ -30,8 +30,6 @@ #include #include -#ifdef HAVE_LIBEXIF - #include #include #include @@ -458,6 +456,3 @@ jpeg_exif_rotate_query_dialog (gint32 image_ID) return (response == GTK_RESPONSE_OK); } - - -#endif /* HAVE_LIBEXIF */ diff --git a/plug-ins/file-jpeg/jpeg-exif.h b/plug-ins/file-jpeg/jpeg-exif.h index 57fe730b64..3e9a29f234 100644 --- a/plug-ins/file-jpeg/jpeg-exif.h +++ b/plug-ins/file-jpeg/jpeg-exif.h @@ -18,8 +18,6 @@ #ifndef __JPEG_EXIF_H__ #define __JPEG_EXIF_H__ -#ifdef HAVE_LIBEXIF - extern ExifData *exif_data; ExifData * jpeg_exif_data_new_from_file (const gchar *filename, @@ -40,6 +38,4 @@ void jpeg_exif_rotate (gint32 image_ID, void jpeg_exif_rotate_query (gint32 image_ID, gint orientation); -#endif /* HAVE_LIBEXIF */ - #endif /* __JPEG_EXIF_H__ */