[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:37:44 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=64c2182
The following commit has been merged in the master branch:
commit 64c218210dc285edae9430d7cff71636ef890091
Author: Andreas Huggel <ahuggel at gmx.net>
Date: Thu Jun 15 18:03:55 2006 +0000
Added configure switches for zlib, --without-zlib does not compile PNG support.
---
config/aclocal.m4 | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++
config/config.h.in | 2 +-
config/config.mk.in | 3 +-
config/configure.ac | 8 ++---
src/Makefile | 80 ++++++++++++++++++++++-----------------------
src/imgreg.cpp | 6 +++-
6 files changed, 142 insertions(+), 50 deletions(-)
diff --git a/config/aclocal.m4 b/config/aclocal.m4
index 4f5ac79..89b889f 100644
--- a/config/aclocal.m4
+++ b/config/aclocal.m4
@@ -5949,3 +5949,96 @@ SED=$lt_cv_path_SED
])
AC_MSG_RESULT([$SED])
])
+
+dnl @synopsis CHECK_ZLIB()
+dnl
+dnl This macro searches for an installed zlib library. If nothing
+dnl was specified when calling configure, it searches first in /usr/local
+dnl and then in /usr. If the --with-zlib=DIR is specified, it will try
+dnl to find it in DIR/include/zlib.h and DIR/lib/libz.a. If --without-zlib
+dnl is specified, the library is not searched at all.
+dnl
+dnl If either the header file (zlib.h) or the library (libz) is not
+dnl found, the configuration exits on error, asking for a valid
+dnl zlib installation directory or --without-zlib.
+dnl
+dnl The macro defines the symbol HAVE_LIBZ if the library is found. You should
+dnl use autoheader to include a definition for this symbol in a config.h
+dnl file. Sample usage in a C/C++ source is as follows:
+dnl
+dnl #ifdef HAVE_LIBZ
+dnl #include <zlib.h>
+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 at senga.org>
+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
+ /usr/local or /usr if not found in /usr/local]
+ --without-zlib to disable zlib usage completely],
+[if test "$withval" != no ; then
+ AC_MSG_RESULT(yes)
+ ZLIB_HOME="$withval"
+else
+ AC_MSG_RESULT(no)
+fi], [
+AC_MSG_RESULT(yes)
+ZLIB_HOME=/usr/local
+if test ! -f "${ZLIB_HOME}/include/zlib.h"
+then
+ ZLIB_HOME=/usr
+fi
+])
+
+#
+# Locate zlib, if wanted
+#
+if test -n "${ZLIB_HOME}"
+then
+ ZLIB_OLD_LDFLAGS=$LDFLAGS
+ ZLIB_OLD_CPPFLAGS=$LDFLAGS
+ #
+ # Adding /usr/lib or /usr/include to the flags/libs may
+ # hurt if using a compiler not installed in the standard
+ # place.
+ #
+ if test "${ZLIB_HOME}" != "/usr"
+ then
+ LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib"
+ CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include"
+ fi
+ 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_LANG_RESTORE
+ if test "$zlib_cv_libz" = "yes" -a "$zlib_cv_zlib_h" = "yes"
+ then
+ #
+ # If both library and header were found, use them
+ #
+ AC_CHECK_LIB(z, inflateEnd)
+ AC_MSG_CHECKING(zlib in ${ZLIB_HOME})
+ AC_MSG_RESULT(ok)
+ HAVE_LIBZ=1
+ else
+ #
+ # If either header or library was not found, revert and bomb
+ #
+ AC_MSG_CHECKING(zlib in ${ZLIB_HOME})
+ LDFLAGS="$ZLIB_OLD_LDFLAGS"
+ CPPFLAGS="$ZLIB_OLD_CPPFLAGS"
+ AC_MSG_RESULT(failed)
+ AC_MSG_ERROR(either specify a valid zlib installation with --with-zlib=DIR or disable zlib usage with --without-zlib)
+ fi
+fi
+
+])
diff --git a/config/config.h.in b/config/config.h.in
index 52cb7fc..22aef67 100644
--- a/config/config.h.in
+++ b/config/config.h.in
@@ -107,7 +107,7 @@
#undef HAVE_WCHAR_H
/* Define to 1 if you have the `zlib' library. */
-#undef HAVE_ZLIB_H
+#undef HAVE_LIBZ
/* Define to 1 if the system has the type `_Bool'. */
#undef HAVE__BOOL
diff --git a/config/config.mk.in b/config/config.mk.in
index 1476ca8..dec4e75 100644
--- a/config/config.mk.in
+++ b/config/config.mk.in
@@ -99,7 +99,8 @@ LIBS = @LIBS@
DEFS =
# **********************************************************************
-# Functions
+# Libraries and Functions
+HAVE_LIBZ = @HAVE_LIBZ@
HAVE_TIMEGM = @HAVE_TIMEGM@
# **********************************************************************
diff --git a/config/configure.ac b/config/configure.ac
index d8b11fd..ad39a4f 100644
--- a/config/configure.ac
+++ b/config/configure.ac
@@ -22,12 +22,8 @@ AC_PROG_LIBTOOL
# Checks for libraries.
AC_CHECK_LIB(m, exp, , AC_MSG_ERROR([libm not found.]))
-AC_CHECK_LIB(z, uncompress, , found_zlib=no)
-AC_CHECK_HEADERS([zlib.h], , found_zlib=no)
-if test "$found_zlib" = no; then
- AC_MSG_ERROR([I did not find a copy of the zlib library and the zlib.h
-header file on your system. You can get it from http://www.gzip.org/zlib/])
-fi
+CHECK_ZLIB()
+AC_SUBST(HAVE_LIBZ,$HAVE_LIBZ)
# Checks for header files.
AC_HEADER_STDC
diff --git a/src/Makefile b/src/Makefile
index bb545c7..e9f10a7 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -47,45 +47,47 @@ include $(top_srcdir)/config/config.mk
# Source files
# Add standalone C++ header files to this list
-CCHDR = exiv2_version.h \
- exv_conf.h \
- exv_msvc.h \
- mn.hpp \
- rcsid.hpp
+CCHDR = exiv2_version.h \
+ exv_conf.h \
+ exv_msvc.h \
+ mn.hpp \
+ rcsid.hpp
# Add library C++ source files to this list
-CCSRC = basicio.cpp \
- canonmn.cpp \
- crwimage.cpp \
- datasets.cpp \
- error.cpp \
- exif.cpp \
- futils.cpp \
- fujimn.cpp \
- ifd.cpp \
- image.cpp \
- imgreg.cpp \
- iptc.cpp \
- jpgimage.cpp \
- makernote.cpp \
- makernote2.cpp \
- metadatum.cpp \
- minoltamn.cpp \
- mrwimage.cpp \
- nikonmn.cpp \
- olympusmn.cpp \
- panasonicmn.cpp \
- pngimage.cpp \
- pngchunk.cpp \
- sigmamn.cpp \
- sonymn.cpp \
- tags.cpp \
- tiffcomposite.cpp \
- tiffimage.cpp \
- tiffparser.cpp \
- tiffvisitor.cpp \
- types.cpp \
- value.cpp
+CCSRC = basicio.cpp \
+ canonmn.cpp \
+ crwimage.cpp \
+ datasets.cpp \
+ error.cpp \
+ exif.cpp \
+ futils.cpp \
+ fujimn.cpp \
+ ifd.cpp \
+ image.cpp \
+ imgreg.cpp \
+ iptc.cpp \
+ jpgimage.cpp \
+ makernote.cpp \
+ makernote2.cpp \
+ metadatum.cpp \
+ minoltamn.cpp \
+ mrwimage.cpp \
+ nikonmn.cpp \
+ olympusmn.cpp \
+ panasonicmn.cpp
+ifdef HAVE_LIBZ
+CCSRC += pngimage.cpp \
+ pngchunk.cpp
+endif
+CCSRC += sigmamn.cpp \
+ sonymn.cpp \
+ tags.cpp \
+ tiffcomposite.cpp \
+ tiffimage.cpp \
+ tiffparser.cpp \
+ tiffvisitor.cpp \
+ types.cpp \
+ value.cpp
# Add library C source files to this list
ifndef HAVE_TIMEGM
@@ -129,7 +131,6 @@ MCSRC = utils.cpp
# ******************************************************************************
# Library
-
LIBRARY = libexiv2.la
# ******************************************************************************
@@ -138,9 +139,6 @@ CXXDEFS = $(DEFS)
CXXINCS = $(INCS)
# ******************************************************************************
-# ==============================================================================
-# ******************************************************************************
-
# Initialisations
SHELL = /bin/sh
diff --git a/src/imgreg.cpp b/src/imgreg.cpp
index fc308e3..dd8c4c7 100644
--- a/src/imgreg.cpp
+++ b/src/imgreg.cpp
@@ -37,7 +37,9 @@ EXIV2_RCSID("@(#) $Id$");
#include "crwimage.hpp"
#include "mrwimage.hpp"
#include "tiffimage.hpp"
-#include "pngimage.hpp"
+#ifdef EXV_HAVE_LIBZ
+# include "pngimage.hpp"
+#endif // EXV_HAVE_LIBZ
// + standard includes
@@ -52,7 +54,9 @@ namespace Exiv2 {
Registry(ImageType::crw, newCrwInstance, isCrwType),
Registry(ImageType::mrw, newMrwInstance, isMrwType),
Registry(ImageType::tiff, newTiffInstance, isTiffType),
+#ifdef EXV_HAVE_LIBZ
Registry(ImageType::png, newPngInstance, isPngType)
+#endif // EXV_HAVE_LIBZ
};
} // namespace Exiv2
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list