On Sun, Dec 03, 2006 at 10:07:50AM +1100, AnĂ­bal Monsalve Salazar wrote:
> On Fri, Dec 01, 2006 at 07:57:34PM -0500, Glenn Randers-Pehrson wrote:
> >Right, it has the same code as libpng-1.2.12 in configure.ac:
> >
> ># Config files, substituting as above
> >AC_CONFIG_FILES([Makefile libpng.pc:scripts/libpng.pc.in])
> >AC_CONFIG_FILES([libpng-config:scripts/libpng-config.in],
> >              [chmod +x libpng-config])
> >
> >This needs to be expanded to include the information from
> >@LIBPNG_DEFINES@ in both libpng.pc and libpng-config.
> >
> >I don't know how to do that.
> >
> >Alternatively, use libpng-1.4.0beta16, which takes a different, probably
> >more robust approach of building pngdefs.h with the information.
> 
> imagemagick builds with libpng-1.4.0beta16, the results are at:
> 
> http://people.debian.org/~anibal/imagemagick/
> 
> I'll intend to upload libpng_1.4.0~beta16-0 to experimental.
> 
> The transition to the new libpng soname will be problematic as there
> is a considerable number of reverse dependencies and there is also
> a number of circular dependencies involving libpng. IMHO, the
> release managers will not approve this transition.

The attached patch implements Glenn's alternative suggestion. It
requires further changes to imagemagick that currently uses neither
libpng-config nor pkg-config, but in principle it does the job. Sorta
kinda.

Regards,

Daniel.

--- libpng-1.2.13.orig/configure
+++ libpng-1.2.13/configure
@@ -20105,7 +20105,7 @@
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG\ -DPNG_NO_ASSEMBLER_CODE
+LIBPNG_DEFINES=-DPNG_NO_ASSEMBLER_CODE
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 if test "$LIBPNG_DEFINES"; then
@@ -20114,7 +20114,6 @@
 else
     echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6
-    LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG
 fi
 
 
only in patch2:
unchanged:
--- libpng-1.2.13.orig/scripts/libpng.pc.in
+++ libpng-1.2.13/scripts/libpng.pc.in
@@ -7,4 +7,4 @@
 Description: Loads and saves PNG files
 Version: 1.2.13
 Libs: -L${libdir} -lpng12
-Cflags: -I${includedir}
+Cflags: -I${includedir} @LIBPNG_DEFINES@
only in patch2:
unchanged:
--- libpng-1.2.13.orig/scripts/libpng-config.in
+++ libpng-1.2.13/scripts/libpng-config.in
@@ -18,7 +18,7 @@
 I_opts="-I${includedir}"
 L_opts="-L${libdir}"
 R_opts=""
-cppflags=""
+cppflags="@LIBPNG_DEFINES@"
 ccopts=""
 ldopts=""
 
only in patch2:
unchanged:
--- libpng-1.2.13.orig/Makefile.am
+++ libpng-1.2.13/Makefile.am
@@ -37,8 +37,8 @@
        png.h pngconf.h
 libpng_la_SOURCES = $(libpng12_la_SOURCES)
 
-libpng_la_CPPFLAGS = @LIBPNG_DEFINES@
-libpng12_la_CPPFLAGS = @LIBPNG_DEFINES@
+libpng_la_CPPFLAGS = @LIBPNG_DEFINES@ -DPNG_CONFIGURE_LIBPNG
+libpng12_la_CPPFLAGS = @LIBPNG_DEFINES@ -DPNG_CONFIGURE_LIBPNG
 
 # MAJOR UPGRADE: the version-number settings below must be changed.
 libpng12_la_LDFLAGS = -no-undefined -export-dynamic \
only in patch2:
unchanged:
--- libpng-1.2.13.orig/Makefile.in
+++ libpng-1.2.13/Makefile.in
@@ -283,8 +283,8 @@
        png.h pngconf.h
 
 libpng_la_SOURCES = $(libpng12_la_SOURCES)
-libpng_la_CPPFLAGS = @LIBPNG_DEFINES@
-libpng12_la_CPPFLAGS = @LIBPNG_DEFINES@
+libpng_la_CPPFLAGS = @LIBPNG_DEFINES@ -DPNG_CONFIGURE_LIBPNG
+libpng12_la_CPPFLAGS = @LIBPNG_DEFINES@ -DPNG_CONFIGURE_LIBPNG
 
 # MAJOR UPGRADE: the version-number settings below must be changed.
 libpng12_la_LDFLAGS = -no-undefined -export-dynamic -version-number \
only in patch2:
unchanged:
--- libpng-1.2.13.orig/configure.ac
+++ libpng-1.2.13/configure.ac
@@ -62,12 +62,11 @@
   [#include "pnggccrd.c"],
   [return 0;],
   LIBPNG_DEFINES=,
-  LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG\ -DPNG_NO_ASSEMBLER_CODE)
+  LIBPNG_DEFINES=-DPNG_NO_ASSEMBLER_CODE)
 if test "$LIBPNG_DEFINES"; then
     AC_MSG_RESULT(no)
 else
     AC_MSG_RESULT(yes)
-    LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG
 fi
 AC_SUBST(LIBPNG_DEFINES)
 

Reply via email to