Improved handling of the CPPFLAGS compiler flag and some minor build env tweaks. Partly fixes bug #490 (the build env related part).

v0.27.3
Andreas Huggel 19 years ago
parent 3d0c461624
commit d2b9563978

8
config/aclocal.m4 vendored

@ -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 <loic@senga.org>
dnl with modifications by Andreas Huggel <ahuggel@gmx.net>
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

@ -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@

@ -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)

@ -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}

@ -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

@ -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()

Loading…
Cancel
Save