From 5928ee97ca4ea822aa69bd731d891bd6fd4db715 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Fri, 19 Feb 2010 19:22:08 -0600 Subject: [PATCH] [master] Define _ALL_SOURCE in configure.ac, makefile.aix, and CMakeLists.txt when using the AIX compiler. --- ANNOUNCE | 21 +++++++++++---------- CHANGES | 5 +++-- CMakeLists.txt | 6 +++++- configure | 29 +++++++++++++++++------------ configure.ac | 11 ++++++++--- pngconf.h | 12 +----------- scripts/makefile.aix | 2 +- 7 files changed, 46 insertions(+), 40 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index e4966e7e5..a2da5fb0a 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.4.1rc03 - February 19, 2010 +Libpng 1.4.1rc04 - February 20, 2010 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. @@ -9,20 +9,20 @@ Files available for download: Source files with LF line endings (for Unix/Linux) and with a "configure" script - 1.4.1rc03.tar.xz (LZMA-compressed, recommended) - 1.4.1rc03.tar.gz - 1.4.1rc03.tar.bz2 + 1.4.1rc04.tar.xz (LZMA-compressed, recommended) + 1.4.1rc04.tar.gz + 1.4.1rc04.tar.bz2 Source files with CRLF line endings (for Windows), without the "configure" script - lp141r03.zip - lp141r03.7z + lp141r04.zip + lp141r04.7z Other information: - 1.4.1rc03-README.txt - 1.4.1rc03-LICENSE.txt + 1.4.1rc04-README.txt + 1.4.1rc04-LICENSE.txt Changes since the last public release (1.4.0): @@ -89,11 +89,12 @@ version 1.4.1beta12 [February 14, 2010] version 1.4.1rc02 [February 18, 2010] No changes. -version 1.4.1rc03 [February 19, 2010] +version 1.4.1rc03 [February 20, 2010] Noted in scripts/makefile.mingw that it expects to be run under MSYS. Removed obsolete unused MMX-querying support from contrib/gregbook Removed the AIX redefinition of jmpbuf in png.h - Define _ALLSOURCE in pngconf.h when building with nonANSI AIX compiler. + Define _ALL_SOURCE in configure.ac, makefile.aix, and CMakeLists.txt + when using AIX compiler. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index 435905ce6..1c6d48be8 100644 --- a/CHANGES +++ b/CHANGES @@ -2522,11 +2522,12 @@ version 1.4.1beta12 [February 14, 2010] version 1.4.1rc02 [January 18, 2010] No changes. -version 1.4.1rc03 [February 19, 2010] +version 1.4.1rc03 [February 20, 2010] Noted in scripts/makefile.mingw that it expects to be run under MSYS. Removed obsolete unused MMX-querying support from contrib/gregbook Removed the AIX redefinition of jmpbuf in png.h - Define _ALLSOURCE in pngconf.h when building with nonANSI AIX compiler. + Define _ALL_SOURCE in configure.ac, makefile.aix, and CMakeLists.txt + when using AIX compiler. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CMakeLists.txt b/CMakeLists.txt index ad1628e62..6630ce959 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,6 +125,10 @@ set(pngtest_sources add_definitions(-DPNG_CONFIGURE_LIBPNG) +if(_AIX) + add_definitions(-D_ALL_SOURCE) +endif(_AIX) + if(MSVC) add_definitions(-DPNG_NO_MODULEDEF -D_CRT_SECURE_NO_DEPRECATE) endif(MSVC) @@ -209,7 +213,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in # SET UP LINKS if(PNG_SHARED) set_target_properties(${PNG_LIB_NAME} PROPERTIES -# VERSION 14.${PNGLIB_RELEASE}.1.4.1rc03 +# VERSION 14.${PNGLIB_RELEASE}.1.4.1rc04 VERSION 14.${PNGLIB_RELEASE}.0 SOVERSION 14 CLEAN_DIRECT_OUTPUT 1) diff --git a/configure b/configure index 3b0abea59..a1b69f376 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for libpng 1.4.1rc03. +# Generated by GNU Autoconf 2.65 for libpng 1.4.1rc04. # # Report bugs to . # @@ -701,8 +701,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libpng' PACKAGE_TARNAME='libpng' -PACKAGE_VERSION='1.4.1rc03' -PACKAGE_STRING='libpng 1.4.1rc03' +PACKAGE_VERSION='1.4.1rc04' +PACKAGE_STRING='libpng 1.4.1rc04' PACKAGE_BUGREPORT='png-mng-implement@lists.sourceforge.net' PACKAGE_URL='' @@ -1432,7 +1432,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libpng 1.4.1rc03 to adapt to many kinds of systems. +\`configure' configures libpng 1.4.1rc04 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1502,7 +1502,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libpng 1.4.1rc03:";; + short | recursive ) echo "Configuration of libpng 1.4.1rc04:";; esac cat <<\_ACEOF @@ -1607,7 +1607,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libpng configure 1.4.1rc03 +libpng configure 1.4.1rc04 generated by GNU Autoconf 2.65 Copyright (C) 2009 Free Software Foundation, Inc. @@ -2032,7 +2032,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libpng $as_me 1.4.1rc03, which was +It was created by libpng $as_me 1.4.1rc04, which was generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ @@ -2840,7 +2840,7 @@ fi # Define the identity of the package. PACKAGE='libpng' - VERSION='1.4.1rc03' + VERSION='1.4.1rc04' cat >>confdefs.h <<_ACEOF @@ -2904,7 +2904,7 @@ fi -PNGLIB_VERSION=1.4.1rc03 +PNGLIB_VERSION=1.4.1rc04 PNGLIB_MAJOR=1 PNGLIB_MINOR=4 PNGLIB_RELEASE=1 @@ -11415,7 +11415,12 @@ else fi -LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG +case $host_os in + aix*) + LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG -D_ALL_SOURCE;; + *) + LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG;; +esac LIBPNG_DEFINES=$LIBPNG_DEFINES @@ -12027,7 +12032,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libpng $as_me 1.4.1rc03, which was +This file was extended by libpng $as_me 1.4.1rc04, which was generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12093,7 +12098,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libpng config.status 1.4.1rc03 +libpng config.status 1.4.1rc04 configured by $0, generated by GNU Autoconf 2.65, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 18da0b64c..7606ff2dd 100644 --- a/configure.ac +++ b/configure.ac @@ -18,12 +18,12 @@ AC_PREREQ(2.59) dnl Version number stuff here: -AC_INIT([libpng], [1.4.1rc03], [png-mng-implement@lists.sourceforge.net]) +AC_INIT([libpng], [1.4.1rc04], [png-mng-implement@lists.sourceforge.net]) AM_INIT_AUTOMAKE dnl stop configure from automagically running automake AM_MAINTAINER_MODE -PNGLIB_VERSION=1.4.1rc03 +PNGLIB_VERSION=1.4.1rc04 PNGLIB_MAJOR=1 PNGLIB_MINOR=4 PNGLIB_RELEASE=1 @@ -59,7 +59,12 @@ AC_CHECK_FUNCS([memset], , AC_ERROR([memset not found in libc])) AC_CHECK_FUNCS([pow], , AC_CHECK_LIB(m, pow, , AC_ERROR([cannot find pow])) ) AC_CHECK_LIB(z, zlibVersion, , AC_ERROR([zlib not installed])) -LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG +case $host_os in + aix*) + LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG -D_ALL_SOURCE;; + *) + LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG;; +esac LIBPNG_DEFINES=$LIBPNG_DEFINES AC_SUBST(LIBPNG_DEFINES) diff --git a/pngconf.h b/pngconf.h index f7f59ed81..41d9b59ad 100644 --- a/pngconf.h +++ b/pngconf.h @@ -1,7 +1,7 @@ /* pngconf.h - machine configurable file for libpng * - * libpng version 1.4.1rc03 - February 19, 2010 + * libpng version 1.4.1rc04 - February 20, 2010 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2010 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) @@ -22,16 +22,6 @@ #ifndef PNGCONF_H #define PNGCONF_H -/* Added at libpng-1.4.1 */ -#if ((defined(_AIX)) && \ - (!defined (_XOPEN_SOURCE)) && \ - (!defined (_POSIX_SOURCE)) && \ - (!defined (_ANSI_C_SOURCE))) -# ifndef _ALL_SOURCE -# define _ALL_SOURCE -# endif -#endif - #ifndef PNG_NO_LIMITS_H # include #endif diff --git a/scripts/makefile.aix b/scripts/makefile.aix index 0d894a0ec..f8a7dd1c8 100644 --- a/scripts/makefile.aix +++ b/scripts/makefile.aix @@ -46,7 +46,7 @@ LDDEBUG = CRELEASE = -O2 LDRELEASE = -s WARNMORE=-W -Wall -CFLAGS = -I$(ZLIBINC) $(WARNMORE) $(CRELEASE) +CFLAGS = -D_ALL_SOURCE -I$(ZLIBINC) $(WARNMORE) $(CRELEASE) LDFLAGS = -L. -L$(ZLIBLIB) -lpng14 -lz -lm $(LDRELEASE) # File extensions