[PyKDE] PyQT-3.0-2.3.1 patch
pykde at lists.thewrittenword.com
pykde at lists.thewrittenword.com
Tue Nov 27 01:40:59 GMT 2001
The following adds a --with-zlib=DIR option to configure to specify
the path to the zlib library required by pyuic. This library is not
necessarily installed as part of the OS (e.g. most commercial unices).
--
albert chin (china at thewrittenword.com)
-- snip snip
--- pyuic/Makefile.am.orig Fri Nov 23 13:24:29 2001
+++ pyuic/Makefile.am Fri Nov 23 13:25:51 2001
@@ -3,13 +3,13 @@
# The automake file for pyuic for Qt v2.x.
-AM_CPPFLAGS = -DUIC $(SIP_CPPFLAGS)
-AM_CXXFLAGS = $(SIP_CXXFLAGS)
+AM_CPPFLAGS = -DUIC $(SIP_CPPFLAGS) $(ZLIB_CPPFLAGS)
+AM_CXXFLAGS = $(SIP_CXXFLAGS) $(ZLIB_CPPFLAGS)
bin_PROGRAMS = pyuic
-pyuic_LDFLAGS = $(SIP_LDLIBDIRS)
-pyuic_LDADD = -l$(SIP_QTLIB) $(SIP_LDXFLAGS)
+pyuic_LDFLAGS = $(SIP_LDLIBDIRS) $(ZLIB_LDFLAGS)
+pyuic_LDADD = -l$(SIP_QTLIB) $(SIP_LDXFLAGS) -lz
pyuic_SOURCES = \
globaldefs.h \
--- configure.ac.orig Mon Nov 26 18:38:21 2001
+++ configure.ac Mon Nov 26 18:37:59 2001
@@ -28,6 +28,30 @@
SIP_GET_SIPINSTALLDIR(qt)
SIP_GET_DOCINSTALLDIR(PyQt)
+dnl check for zlib needed by pyuic
+AC_ARG_WITH(zlib,
+AC_HELP_STRING([--with-zlib=DIR], [use libz in DIR]),[
+ if test -d "$with_zlib"; then
+ _cppflags=$CPPFLAGS
+ _ldflags=$LDFLAGS
+
+ CPPFLAGS="$CPPFLAGS -I$with_zlib/include"
+ LDFLAGS="$LDFLAGS -L$with_zlib/lib"
+
+ AC_CHECK_HEADER(zlib.h,
+ AC_CHECK_LIB(z, uncompress,[
+ if test "x$with_zlib" != x; then
+ ZLIB_CPPFLAGS="-I$with_zlib/include"
+ ZLIB_LDFLAGS="-L$with_zlib/lib"
+ fi]))
+
+ CPPFLAGS=$_cppflags
+ LDFLAGS=$_ldflags
+ fi
+])
+
+AC_SUBST(ZLIB_CPPFLAGS)
+AC_SUBST(ZLIB_LDFLAGS)
# Check the Qt version against what the generated code can handle.
More information about the PyQt
mailing list