Hi, FWIW, the solution we're planning for Red Hat is to create a symlink "libpng10.so" to the old libpng, then link imlib and gnome-libs against -lpng10. This way the ABI of imlib/gnome-libs is preserved, but -lpng can be moved to libpng3.
I'll attach the imlib and gnome-libs patches. (This step also requires creating /usr/include/png-1.0/png.h and killing off all -I/usr/include in imlib.) It would be nice to encourage the upstream png maintainer to support parallel install as the GNOME 1/2 platforms do, but I haven't yet had a chance to write a long explanation of how and why in order to send that off to him. I think it would be bad for Debian to break the GNOME 1 ABI for this trivial reason, since GNOME upstream has gone to huge lengths not to break it. And the libpng ABI changes are really trivial (renamed a global variable, added a struct field, I think - very small changes). After the enormous effort of upstream GNOME to maintain ABI it'd be pretty lame to break ABI because of a variable rename or two in libpng. Havoc --- imlib-1.9.10/configure.in.png10 Mon Jan 7 18:34:18 2002 +++ imlib-1.9.10/configure.in Mon Jan 7 18:36:56 2002 @@ -40,6 +40,8 @@ else AC_MSG_RESULT(yes) +CFLAGS="-I /usr/include/png-1.0 $CFLAGS" + if test "x$GDK_IMLIB" != x; then oLIBS="$LIBS" oCFLAGS="$CFLAGS" @@ -280,7 +282,7 @@ $GX_LIBS), AC_MSG_WARN(*** Native GIF support will not be built (GIF header not found) ***)) -AC_CHECK_LIB(png, png_read_info, +AC_CHECK_LIB(png10, png_read_info, AC_CHECK_HEADER(png.h, png_ok=yes, png_ok=no), @@ -310,9 +312,9 @@ #fi if test "$png_ok" = yes; then - PNGLIBS="-lpng -lz" + PNGLIBS="-lpng10 -lz" AC_SUBST(HAVE_LIBPNG) - SUPPORT_LIBS="$SUPPORT_LIBS -lpng -lz"; AC_DEFINE(HAVE_LIBPNG) + SUPPORT_LIBS="$SUPPORT_LIBS -lpng10 -lz"; AC_DEFINE(HAVE_LIBPNG) else AC_MSG_WARN(*** Native PNG support will NOT be built (PNG version us 1.0.2, get 1.0.3) ***) fi --- imlib-1.9.10/configure.in.cppflags Tue Jan 8 15:05:58 2002 +++ imlib-1.9.10/configure.in Tue Jan 8 15:06:11 2002 @@ -160,8 +160,6 @@ GX_LIBS="$GTK_LIBS" fi -CPPFLAGS="$CPPFLAGS -I$includedir -I$prefix/include" - SUPPORT_LIBS="" dnl Test for shared memory headers and semantics, unless we are --- gnome-libs-1.4.1.2.90/configure.in.png10 Tue Jan 8 14:25:31 2002 +++ gnome-libs-1.4.1.2.90/configure.in Tue Jan 8 14:49:16 2002 @@ -296,7 +296,7 @@ png_ok=yes,png_ok=no) AC_MSG_RESULT($png_ok) if test "$png_ok" = yes; then - PNG_LIBS="-lpng $Z_LIBS"; AC_DEFINE(HAVE_LIBPNG) + PNG_LIBS="-lpng10 $Z_LIBS"; AC_DEFINE(HAVE_LIBPNG) fi fi