diff --git a/config/aclocal.m4 b/config/aclocal.m4 index 89b889f2..ec210361 100644 --- a/config/aclocal.m4 +++ b/config/aclocal.m4 @@ -5972,13 +5972,12 @@ dnl #endif /* HAVE_LIBZ */ dnl dnl @version $Id: aclocal.m4,v 1.7 2000/06/26 10:04:08 loic dead $ dnl @author Loic Dachary +dnl with modifications by Andreas Huggel dnl - AC_DEFUN([CHECK_ZLIB], # # Handle user hints # - [AC_MSG_CHECKING(if zlib is wanted) AC_ARG_WITH(zlib, [ --with-zlib=DIR root directory path of zlib installation [defaults to @@ -5997,14 +5996,13 @@ then ZLIB_HOME=/usr fi ]) - # # Locate zlib, if wanted # if test -n "${ZLIB_HOME}" then ZLIB_OLD_LDFLAGS=$LDFLAGS - ZLIB_OLD_CPPFLAGS=$LDFLAGS + ZLIB_OLD_CPPFLAGS=$CPPFLAGS # # Adding /usr/lib or /usr/include to the flags/libs may # hurt if using a compiler not installed in the standard @@ -6018,7 +6016,7 @@ then AC_LANG_SAVE AC_LANG_C AC_CHECK_LIB(z, inflateEnd, [zlib_cv_libz=yes], [zlib_cv_libz=no]) - AC_CHECK_HEADER(zlib.h, [zlib_cv_zlib_h=yes], [zlib_cvs_zlib_h=no]) + AC_CHECK_HEADER(zlib.h, [zlib_cv_zlib_h=yes], [zlib_cv_zlib_h=no]) AC_LANG_RESTORE if test "$zlib_cv_libz" = "yes" -a "$zlib_cv_zlib_h" = "yes" then diff --git a/config/config.mk.in b/config/config.mk.in index 672652fb..63a8ef17 100644 --- a/config/config.mk.in +++ b/config/config.mk.in @@ -51,10 +51,11 @@ endif CXXCPP = @CXXCPP@ # Preprocessor flags -CPPFLAGS = @CPPFLAGS@ +CPPFLAGS = -I. @CPPFLAGS@ -# Linker flags +# Linker flags and libraries LDFLAGS = @LDFLAGS@ +LIBS = @LIBS@ # Suffix of executables EXEEXT := @EXEEXT@ @@ -69,10 +70,14 @@ ifeq ($(GCC),yes) CFLAGS += -Wall endif +# ********************************************************************** +# Libraries and Functions +HAVE_LIBZ = @HAVE_LIBZ@ +HAVE_TIMEGM = @HAVE_TIMEGM@ + # ********************************************************************** # Advanced auto-dependency generation # http://make.paulandlesley.org/autodep.html - DEP_TRACKING = @DEP_TRACKING@ ifdef DEP_TRACKING @@ -92,17 +97,6 @@ endif endif -# ********************************************************************** -# Global includes, libraries and defines -INCS = -I. -LIBS = @LIBS@ -DEFS = - -# ********************************************************************** -# Libraries and Functions -HAVE_LIBZ = @HAVE_LIBZ@ -HAVE_TIMEGM = @HAVE_TIMEGM@ - # ********************************************************************** # Installation programs INSTALL_EXE = @INSTALL@ diff --git a/config/configure.ac b/config/configure.ac index 50c4bc7d..14845817 100644 --- a/config/configure.ac +++ b/config/configure.ac @@ -21,7 +21,8 @@ AC_PROG_RANLIB AC_PROG_LIBTOOL # Checks for libraries. -AC_CHECK_LIB(m, exp, , AC_MSG_ERROR([libm not found.])) +AC_CHECK_LIBM() +LIBS="$LIBS $LIBM" CHECK_ZLIB() AC_SUBST(HAVE_LIBZ,$HAVE_LIBZ) diff --git a/config/exiv2.pc.in b/config/exiv2.pc.in index 4dcce031..9570bd47 100644 --- a/config/exiv2.pc.in +++ b/config/exiv2.pc.in @@ -8,5 +8,5 @@ Description: Exif and IPTC metadata library and tools Version: @PACKAGE_VERSION@ URL: http://www.exiv2.org Libs: -L${libdir} -lexiv2 -Libs.private: @LIBS@ +Libs.private: @LDFLAGS@ @LIBS@ Cflags: -I${includedir} diff --git a/src/Makefile b/src/Makefile index d533d7e6..d998167f 100644 --- a/src/Makefile +++ b/src/Makefile @@ -136,11 +136,6 @@ MCSRC = utils.cpp # Library LIBRARY = libexiv2.la -# ****************************************************************************** -# Defines, Includes and Libraries -CXXDEFS = $(DEFS) -CXXINCS = $(INCS) - # ****************************************************************************** # Initialisations SHELL = /bin/sh @@ -193,8 +188,8 @@ POSTDEPEND = if test ! -d $(DEPDIR); then mkdir $(DEPDIR); fi; \ endif # Compilation shortcuts -COMPILE.cc = $(CXX) $(CXXFLAGS) $(CXXDEFS) $(CXXINCS) -c -COMPILE.c = $(CC) $(CFLAGS) $(DEFS) $(INCS) -c +COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c +COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c # LINK.cc does not need $(LIBS), libtool's dark magic takes care of that LINK.cc = $(CXX) $(CXXFLAGS) $(LIBRARY) $(LDFLAGS) -rpath $(libdir) @@ -222,7 +217,7 @@ $(sort $(BINOBJ) $(EXIV2OBJ) $(MCOBJ) path-test.o): %.o: %.cpp %.ii: %.cpp set -e; \ - $(CXXCPP) $(CPPFLAGS) $(CXXDEFS) $(CXXINCS) $< | sed '/^[ ]*$$/d' > $@ + $(CXXCPP) $(CPPFLAGS) $< | sed '/^[ ]*$$/d' > $@ # ****************************************************************************** # Targets diff --git a/src/pngimage.cpp b/src/pngimage.cpp index a5d692e2..029b5f98 100644 --- a/src/pngimage.cpp +++ b/src/pngimage.cpp @@ -135,6 +135,18 @@ namespace Exiv2 { clearMetadata(); PngChunk::decode(this, io_->mmap(), io_->size()); + /* + Todo: + + - readMetadata implements the loop over the chunks in the image and + makes decisions what to do. It reads only one chunk at a time + instead of the whole file. + + - new class PngChunk, initialized with the memory of one chunk and + has all the access methods required to determine the field, key, + to access and decompress data etc. + */ + } // PngImage::readMetadata void PngImage::writeMetadata()