commit ae26dd02695fed341674da34fe7ec1acbbac4ae0
Author: Martin Aumueller <[email protected]>
Date: Sun Jul 26 15:32:24 2009 +0200
check for libz availability in configure.ac
configure.ac | 20 ++++++++++++++++++++
src/Makefile.am | 2 +-
2 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index b503b8e..704644c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -93,6 +93,26 @@ fi
AC_SUBST(SGUTILS_LIBS)
AM_CONDITIONAL(HAVE_SGUTILS, test x"$have_sgutils" = xyes)
+dnl **************************************************
+dnl * zlib is neeeded for handling compressed iTunesCDB files
+dnl **************************************************
+AC_CHECK_LIB(z, inflate,
+ [Z_LIBS="-lz"; have_zlib=yes],
+ have_zlib=no)
+if test "x$have_zlib" != xyes; then
+ AC_CHECK_LIB(zlib, inflate,
+ [Z_LIBS="-lzlib"; have_zlib=yes],
+ have_zlib=no)
+fi
+if test x"$have_zlib" = xyes; then
+ AH_TEMPLATE([HAVE_ZLIB], [Whether zlib is installed, it's used for
compressed iTunesCDB])
+ AC_DEFINE_UNQUOTED(HAVE_ZLIB, 1)
+else
+ AC_MSG_ERROR([couldn't find zlib, please install zlib development headers])
+fi
+AC_SUBST(Z_LIBS)
+AM_CONDITIONAL(HAVE_ZLIB, test x"$have_zlib" = xyes)
+
dnl ***********************************************************************
dnl * HAL is optional, but is required if you want things to "just work"
dnl * when a recent iPod is plugged in
diff --git a/src/Makefile.am b/src/Makefile.am
index 4c3fa31..9cfdbd4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -50,7 +50,7 @@ noinst_HEADERS = \
sha1.h
INCLUDES=$(LIBGPOD_CFLAGS)
-LIBS=$(LIBGPOD_LIBS) -lm -lz
+LIBS=$(LIBGPOD_LIBS) $(Z_LIBS) -lm
uninstall-hook:
-rmdir --ignore-fail-on-non-empty $(DESTDIR)$(libgpodincludedir)
------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2