From: Udi F. <udi...@us...> - 2005-11-06 23:01:31
|
Update of /cvsroot/ufraw/ufraw In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24182 Modified Files: Makefile.am configure.ac ufraw-gimp.c ufraw.c ufraw_exif.c Log Message: Link each executable only with the libraries that it uses. Fix EXIF support to work with libtiff 3.7.4. Change default language for RTL languages from "en_US" to "C". Index: ufraw.c =================================================================== RCS file: /cvsroot/ufraw/ufraw/ufraw.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** ufraw.c 8 Oct 2005 08:34:15 -0000 1.15 --- ufraw.c 6 Nov 2005 23:01:23 -0000 1.16 *************** *** 43,50 **** !strncmp(locale, "Hebrew", 6) || !strncmp(locale, "Arabic", 6) ) ) { /* I'm not sure why the following doesn't work (on Windows at least) */ ! /* locale = setlocale(LC_ALL, "en_US"); * gtk_disable_setlocale(); */ /* so I'm using setenv */ ! g_setenv("LC_ALL", "en_US", TRUE); } gtk_init(&argc, &argv); --- 43,50 ---- !strncmp(locale, "Hebrew", 6) || !strncmp(locale, "Arabic", 6) ) ) { /* I'm not sure why the following doesn't work (on Windows at least) */ ! /* locale = setlocale(LC_ALL, "C"); * gtk_disable_setlocale(); */ /* so I'm using setenv */ ! g_setenv("LC_ALL", "C", TRUE); } gtk_init(&argc, &argv); Index: configure.ac =================================================================== RCS file: /cvsroot/ufraw/ufraw/configure.ac,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** configure.ac 21 Oct 2005 05:50:41 -0000 1.20 --- configure.ac 6 Nov 2005 23:01:23 -0000 1.21 *************** *** 37,42 **** # Uncomment next line for release to strip the binaries of debug information #LDFLAGS="$LDFLAGS -s" - # Uncomment next line to make ufraw-batch independent of gtk shared libraries - #LDFLAGS="$LDFLAGS -Wl,--as-needed" # Set default PREFIX, if not already defined according to os. --- 37,40 ---- *************** *** 66,73 **** CFLAGS="$CFLAGS -mno-cygwin -mwindows -mms-bitfields" CONSOLE="-mconsole" - AC_SUBST(CONSOLE) #AC_PREFIX_DEFAULT($PREFIX) # this ac macro ignores the test condition prefix=$PREFIX fi # If prefix is non-empty, add prefix's pkgconfig dir to the pkgconfig search --- 64,73 ---- CFLAGS="$CFLAGS -mno-cygwin -mwindows -mms-bitfields" CONSOLE="-mconsole" #AC_PREFIX_DEFAULT($PREFIX) # this ac macro ignores the test condition prefix=$PREFIX + else + CONSOLE= fi + AC_SUBST(CONSOLE) # If prefix is non-empty, add prefix's pkgconfig dir to the pkgconfig search *************** *** 83,86 **** --- 83,91 ---- fi + PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.4) + AC_SUBST(GTK_LIBS) + PKG_CHECK_MODULES(GLIB, glib-2.0) + PKG_CHECK_MODULES(LCMS, lcms) + # If the gimp plug-in is not built, UFRaw is completely independent of # the gimp. *************** *** 92,100 **** AC_MSG_RESULT($enable_gimp) if test $enable_gimp = yes; then ! gimp_pkg=gimpui-2.0 fi ! ! # DEPS packages must exist to build UFRaw ! PKG_CHECK_MODULES(DEPS, $gimp_pkg gtk+-2.0 >= 2.4 lcms) # Disable deprecated functions on tested versions of GTK --- 97,106 ---- AC_MSG_RESULT($enable_gimp) if test $enable_gimp = yes; then ! PKG_CHECK_MODULES(GIMP, gimpui-2.0) ! else ! GIMP_CFLAGS= ! GIMP_LIBS= fi ! AC_SUBST(GIMP_LIBS) # Disable deprecated functions on tested versions of GTK *************** *** 173,182 **** fi ! UFRAW_CFLAGS="$EXIF_CFLAGS $DEPS_CFLAGS" if test $have_jpeg = no; then # DCRaw assumes jpeg unless NO_JPEG, rather than using HAVE_LIBJPEG UFRAW_CFLAGS="$UFRAW_CFLAGS -DNO_JPEG" fi ! UFRAW_LDADD="$EXIF_LIBS $DEPS_LIBS" AC_SUBST(UFRAW_CFLAGS) AC_SUBST(UFRAW_LDADD) --- 179,188 ---- fi ! UFRAW_CFLAGS="$EXIF_CFLAGS $GIMP_CFLAGS $GTK_CFLAGS $GLIB_CFLAGS $LCMS_CFLAGS" if test $have_jpeg = no; then # DCRaw assumes jpeg unless NO_JPEG, rather than using HAVE_LIBJPEG UFRAW_CFLAGS="$UFRAW_CFLAGS -DNO_JPEG" fi ! UFRAW_LDADD="$EXIF_LIBS $GLIB_LIBS $LCMS_LIBS" AC_SUBST(UFRAW_CFLAGS) AC_SUBST(UFRAW_LDADD) Index: Makefile.am =================================================================== RCS file: /cvsroot/ufraw/ufraw/Makefile.am,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Makefile.am 26 Sep 2005 23:42:05 -0000 1.10 --- Makefile.am 6 Nov 2005 23:01:22 -0000 1.11 *************** *** 46,55 **** ufraw_SOURCES = ufraw.c $(UFRAW_GTK_COMMON) ufraw_batch_SOURCES = ufraw-batch.c $(UFRAW_COMMON) ! ufraw_batch_LDFLAGS = $(CONSOLE) if MAKE_GIMP ufraw_gimp_SOURCES = ufraw-gimp.c $(UFRAW_GTK_COMMON) endif --- 46,57 ---- ufraw_SOURCES = ufraw.c $(UFRAW_GTK_COMMON) + ufraw_LDADD = dcraw_nomain.o $(UFRAW_ICON) $(UFRAW_LDADD) $(GTK_LIBS) ufraw_batch_SOURCES = ufraw-batch.c $(UFRAW_COMMON) ! ufraw_batch_LDFLAGS = @CONSOLE@ if MAKE_GIMP ufraw_gimp_SOURCES = ufraw-gimp.c $(UFRAW_GTK_COMMON) + ufraw_gimp_LDADD = dcraw_nomain.o $(UFRAW_ICON) $(UFRAW_LDADD) $(GIMP_LIBS) endif *************** *** 60,74 **** dcraw_SOURCES = dcraw.c dcraw_CFLAGS = $(UFRAW_CFLAGS) $(DCRAW_CFLAGS) -DUSE_LCMS ! dcraw_LDFLAGS = $(CONSOLE) dcraw_LDADD = $(UFRAW_LDADD) nikon_curve_SOURCES = nikon_curve.c nikon_curve_CFLAGS = $(UFRAW_CFLAGS) -D_STAND_ALONE_ ! nikon_curve_LDFLAGS = $(CONSOLE) nikon_curve_LDADD = $(UFRAW_LDADD) ufraw_exif_SOURCES = ufraw_exif.c ufraw_exif_CFLAGS = $(UFRAW_CFLAGS) -D_STAND_ALONE_ ! ufraw_exif_LDFLAGS = $(CONSOLE) ufraw_exif_LDADD = $(UFRAW_LDADD) endif --- 62,76 ---- dcraw_SOURCES = dcraw.c dcraw_CFLAGS = $(UFRAW_CFLAGS) $(DCRAW_CFLAGS) -DUSE_LCMS ! dcraw_LDFLAGS = @CONSOLE@ dcraw_LDADD = $(UFRAW_LDADD) nikon_curve_SOURCES = nikon_curve.c nikon_curve_CFLAGS = $(UFRAW_CFLAGS) -D_STAND_ALONE_ ! nikon_curve_LDFLAGS = @CONSOLE@ nikon_curve_LDADD = $(UFRAW_LDADD) ufraw_exif_SOURCES = ufraw_exif.c ufraw_exif_CFLAGS = $(UFRAW_CFLAGS) -D_STAND_ALONE_ ! ufraw_exif_LDFLAGS = @CONSOLE@ ufraw_exif_LDADD = $(UFRAW_LDADD) endif Index: ufraw-gimp.c =================================================================== RCS file: /cvsroot/ufraw/ufraw/ufraw-gimp.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** ufraw-gimp.c 8 Oct 2005 08:34:15 -0000 1.13 --- ufraw-gimp.c 6 Nov 2005 23:01:23 -0000 1.14 *************** *** 144,151 **** !strncmp(locale, "Hebrew", 6) || !strncmp(locale, "Arabic", 6) ) ) { /* I'm not sure why the following doesn't work (on Windows at least) */ ! /* setlocale(LC_ALL, "en_US"); gtk_disable_setlocale(); */ /* so I'm using setenv */ ! g_setenv("LC_ALL", "en_US", TRUE); } gimp_ui_init("ufraw-gimp", TRUE); --- 144,151 ---- !strncmp(locale, "Hebrew", 6) || !strncmp(locale, "Arabic", 6) ) ) { /* I'm not sure why the following doesn't work (on Windows at least) */ ! /* setlocale(LC_ALL, "C"); gtk_disable_setlocale(); */ /* so I'm using setenv */ ! g_setenv("LC_ALL", "C", TRUE); } gimp_ui_init("ufraw-gimp", TRUE); Index: ufraw_exif.c =================================================================== RCS file: /cvsroot/ufraw/ufraw/ufraw_exif.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ufraw_exif.c 8 Oct 2005 08:34:15 -0000 1.6 --- ufraw_exif.c 6 Nov 2005 23:01:23 -0000 1.7 *************** *** 74,80 **** #ifdef HAVE_LIBEXIF TIFF *tiff; - short tiffCount; // unsigned short tiffOrientation; ! int *tiffData, tiffFd, exifOffset; ExifData *exifData; ExifEntry *entry; --- 74,79 ---- #ifdef HAVE_LIBEXIF TIFF *tiff; // unsigned short tiffOrientation; ! int tiffFd, exifOffset; ExifData *exifData; ExifEntry *entry; *************** *** 98,101 **** --- 97,108 ---- /* Look for the EXIF tag */ + /* EXIFIFD became an official libtiff tag since version 3.7.4 */ + /* that requires different handling. */ + #ifdef TIFFTAG_EXIFIFD + if (TIFFGetField(tiff, TIFFTAG_EXIFIFD, &exifOffset)!= 1) + return UFRAW_ERROR; + #else + short tiffCount; + int *tiffData; if (TIFFGetField(tiff, 34665, &tiffCount, &tiffData)!= 1 || tiffCount != 1) return UFRAW_ERROR; *************** *** 103,106 **** --- 110,114 ---- /* Get the offset of the EXIF data in the TIFF */ exifOffset = *tiffData; + #endif /* Get the underlying file descriptor for the TIFF file */ |