diff --git a/ANNOUNCE b/ANNOUNCE index 1ee9becf4..dbb2aa313 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.6.0beta02 - December 17, 2011 +Libpng 1.6.0beta02 - December 18, 2011 This is not intended to be a public release. It will be replaced within a few weeks by a public version or by another test version. @@ -54,10 +54,10 @@ Version 1.6.0beta01 [December 15, 2011] temporary files for suffix rules to always use $* and ensures that the non-suffix rules use unique file names. -Version 1.6.0beta02 [December 17, 2011] - Added bsconfig.h file. This indirect reference to config.h avoids - problems with build scripts that search for config.h and find an - inappropriate one in the standard paths. +Version 1.6.0beta02 [December 18, 2011] + Correct configure builds where build and source directories are separate. + The include path of 'config.h' was erroneously made relative in pngvalid.c + in libpng 1.5.7. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index 0843e8ef2..c34e0d299 100644 --- a/CHANGES +++ b/CHANGES @@ -3805,10 +3805,10 @@ Version 1.6.0beta01 [December 15, 2011] temporary files for suffix rules to always use $* and ensures that the non-suffix rules use unique file names. -Version 1.6.0beta02 [December 17, 2011] - Added bsconfig.h file. This indirect reference to config.h avoids - problems with build scripts that search for config.h and find an - inappropriate one in the standard paths. +Version 1.6.0beta02 [December 18, 2011] + Correct configure builds where build and source directories are separate. + The include path of 'config.h' was erroneously made relative in pngvalid.c + in libpng 1.5.7. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/Makefile.am b/Makefile.am index 39a840883..634e562ca 100644 --- a/Makefile.am +++ b/Makefile.am @@ -40,7 +40,7 @@ lib_LTLIBRARIES=libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = png.c pngerror.c\ pngget.c pngmem.c pngpread.c pngread.c pngrio.c pngrtran.c pngrutil.c\ pngset.c pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c\ - png.h pngconf.h pngdebug.h pnginfo.h pngpriv.h pngstruct.h bsconfig.h + png.h pngconf.h pngdebug.h pnginfo.h pngpriv.h pngstruct.h if PNG_ARM_NEON libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += arm/filter_neon.S diff --git a/bsconfig.h b/bsconfig.h deleted file mode 100644 index 1fef151bc..000000000 --- a/bsconfig.h +++ /dev/null @@ -1,36 +0,0 @@ - -/* bsconfig.h - Build System CONFIGuration - * - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1998-2011 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) - * - * Last changed in libpng 1.6.0 [(PENDING RELEASE)] - * - * This code is released under the libpng license. - * For conditions of distribution and use, see the disclaimer - * and license in png.h - */ - -/* This file contains includes that provide information itself provided by the - * environment that builds libpng. This file is included by any source file - * that needs build-system specific information, including test programs that - * are not, themselves, installed. - * - * It is provided solely to work round shortcomings in existing build systems; - * do not *define* anything in this file, simply include other files as - * required. - */ - -/* autotools support */ -/* autotools misuse -I to support separate build and source directories, to work - * round this the autotools generated file "config.h" is included by this file. - * - * config.h is created by the "configure" script which also sets HAVE_CONFIG_H. - * It is used to enable optimizations that can only be detected at build time by - * the configure script. - */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif diff --git a/contrib/libtests/config.h b/contrib/libtests/config.h deleted file mode 100644 index 84720a324..000000000 --- a/contrib/libtests/config.h +++ /dev/null @@ -1,17 +0,0 @@ - -/*- - * config.h - * - * Copyright (c) 2011 John Cunningham Bowler - * - * Last changed in libpng 1.6.0 [(PENDING RELEASE)] - * - * This code is released under the libpng license. - * For conditions of distribution and use, see the disclaimer - * and license in png.h - * - * Use the "config.h" generated by configure for libpng. For indpendent - * compilation of the .c files in this directory either make an appropriate - * configure script to generate config.h or do not define HAVE_CONFIG_H. - */ -#include "../../bsconfig.h" diff --git a/contrib/libtests/pngstest.c b/contrib/libtests/pngstest.c index 5fcd3d6de..2c6b6c531 100644 --- a/contrib/libtests/pngstest.c +++ b/contrib/libtests/pngstest.c @@ -22,11 +22,18 @@ #include #include -#ifdef HAVE_CONFIG_H -# include "config.h" +#if (defined HAVE_CONFIG_H) && !(defined PNG_NO_CONFIG_H) +# include #endif -#include "../../png.h" +/* Define the following to use this test against your installed libpng, rather + * than the one being built here: + */ +#ifdef PNG_FREESTANDING_TESTS +# include +#else +# include "../../png.h" +#endif #include "../tools/sRGB.h" diff --git a/contrib/libtests/pngvalid.c b/contrib/libtests/pngvalid.c index 952bdad5a..a22d4dbb4 100644 --- a/contrib/libtests/pngvalid.c +++ b/contrib/libtests/pngvalid.c @@ -25,13 +25,22 @@ #include -#include "config.h" +#if (defined HAVE_CONFIG_H) && !(defined PNG_NO_CONFIG_H) +# include +#endif -#ifdef HAVE_FEENABLEEXCEPT +#ifdef HAVE_FEENABLEEXCEPT /* from config.h, if included */ # include #endif -#include "../../png.h" +/* Define the following to use this test against your installed libpng, rather + * than the one being built here: + */ +#ifdef PNG_FREESTANDING_TESTS +# include +#else +# include "../../png.h" +#endif #if PNG_LIBPNG_VER < 10500 /* This deliberately lacks the PNG_CONST. */ diff --git a/contrib/libtests/timepng.c b/contrib/libtests/timepng.c index f2d607ca4..68f26bab3 100644 --- a/contrib/libtests/timepng.c +++ b/contrib/libtests/timepng.c @@ -22,11 +22,18 @@ #include -#ifdef HAVE_CONFIG_H -# include "config.h" +#if (defined HAVE_CONFIG_H) && !(defined PNG_NO_CONFIG_H) +# include #endif -#include "../../png.h" +/* Define the following to use this test against your installed libpng, rather + * than the one being built here: + */ +#ifdef PNG_FREESTANDING_TESTS +# include +#else +# include "../../png.h" +#endif static int read_png(FILE *fp) { diff --git a/pngpriv.h b/pngpriv.h index 350787f86..cc621c7ff 100644 --- a/pngpriv.h +++ b/pngpriv.h @@ -137,8 +137,18 @@ typedef const png_uint_16p * png_const_uint_16pp; /* Added at libpng-1.2.9 */ /* Moved to pngpriv.h at libpng-1.5.0 */ -/* Extracted to bsconfig.h at libpng-1.6.0 */ -#include "bsconfig.h" +/* If HAVE_CONFIG_H is defined during the build then the build system must + * provide an appropriate "config.h" file on the include path. The header file + * must provide definitions as required below (search for "HAVE_CONFIG_H"); + * see configure.ac for more details of the requirements. The macro + * "PNG_NO_CONFIG_H" is provided for maintainers to test for dependencies on + * 'configure'; define this macro to prevent the configure build including the + * configure generated config.h. Libpng is expected to compile without *any* + * special build system support on a reasonably ANSI-C compliant system. + */ +#if (defined HAVE_CONFIG_H) && !(defined PNG_NO_CONFIG_H) +# include +#endif /* Moved to pngpriv.h at libpng-1.5.0 */ /* NOTE: some of these may have been used in external applications as