On Tue, 2008-02-12 at 15:17:39 +0100, Denis Oliver Kropp wrote:
> Do you have more information about this?

Sure.

> Guillem Jover wrote:
> > diff --git a/configure.in b/configure.in
> > index 3d30ef5..968a85b 100644
> > --- a/configure.in
> > +++ b/configure.in
> > @@ -726,19 +726,6 @@ AC_ARG_ENABLE(png,
> >    enable_png="$enableval", enable_png=yes)
> >  
> >  if test "$enable_png" = "yes"; then
> > -  dnl Test for libz
> > -  if test -z "$ZLIB_LIBS"; then
> > -    AC_CHECK_LIB(z, gzsetparams,
> > -      [
> > -   AC_CHECK_HEADER(zlib.h,
> > -     ZLIB_LIBS='-lz',
> > -     AC_MSG_WARN([
> > -*** libz header files not found. PNG image provider will not be built.]))
> > -      ],[
> > -        AC_MSG_WARN([ *** libz not found. PNG image provider will not be 
> > built.])
> > -      ])
> > -  fi
> > -
> 
> We still use zlib in the core IF ENABLED.

Yes, there's another check for that purpose around line 700. This one
is just redundant.

> >    AC_PATH_PROG(LIBPNG_CONFIG, libpng-config, no)
> >    if test "$LIBPNG_CONFIG" = no; then
> >        PNG=no
> > @@ -750,7 +737,7 @@ if test "$enable_png" = "yes"; then
> >    fi
> >  
> >    dnl Test for libpng
> > -  if test -z "$LIBPNG" && test -n "$ZLIB_LIBS"; then
> > +  if test -z "$LIBPNG"; then
> >      AC_CHECK_LIB(png, png_read_info,
> >        [
> >     AC_CHECK_HEADER(png.h,
> > @@ -761,7 +748,7 @@ if test "$enable_png" = "yes"; then
> >          AC_MSG_WARN([
> >  *** PNG library not found. PNG image provider will not be built.])
> >     ],
> > -      $ZLIB_LIBS -lm)
> > +      -lm)
> 
> Does this work by automatic library dependencies now?

Those should be pulled automatically by libpng.so if it needs them.

> Why is -lm still in there then?

Oh, yes -lm should go as well, can fix the patch and resend.

> And what in the static case?

The static case is handled by directfb-config, and that one includes
all the indirect dependencies, would be better to switch it to use
pkg-config, though.

> > diff --git a/directfb-config.in b/directfb-config.in
> > index 568831b..5bd4b91 100644
> > --- a/directfb-config.in
> > +++ b/directfb-config.in
> > @@ -189,7 +189,7 @@ while test $# -gt 0; do
> >              echo_videoprovider="$echo_videoprovider -lmpeg3"
> >              ;;
> >            swf)
> > -            echo_videoprovider="$echo_videoprovider -ljpeg -lz"
> > +            echo_videoprovider="$echo_videoprovider -ljpeg"
> 
> same as with libpng

This one is only relevant for the static linking case, but I removed it
because I don't see on my system that libjpeg.so.* is using libz.so.*.
I can check the source code in case it could be possible that it could
use it, in that case it will be safer to just re-add it. Unfortunately
libjpeg does not have a pkg-config file.

> > diff --git a/src/core/Makefile.am b/src/core/Makefile.am
> > index bfeba0d..a1095be 100644
> > --- a/src/core/Makefile.am
> > +++ b/src/core/Makefile.am
> > @@ -80,3 +80,6 @@ libdirectfb_core_la_SOURCES = \
> >     windows.c               \
> >     windowstack.c           \
> >     wm.c
> > +
> > +libdirectfb_core_la_LIBADD = @ZLIB_LIBS@
> > +
> 
> This should only be done if zlib support (usage actually) is enabled.

This is substituted by configure on Makefile.in -> Makefile. And it
will expand to either -lz or the empty string, so should be fine.

regards,
guillem

_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to