VirtualBox

Changeset 105469 in vbox


Ignore:
Timestamp:
Jul 24, 2024 10:11:32 AM (10 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
164130
Message:

libpng-1.6.43: Applied and adjusted our libpng changes to 1.6.43. bugref:8515

Location:
trunk/src/libs/libpng-1.6.43
Files:
1 deleted
54 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/libpng-1.6.43/ANNOUNCE

    r103316 r105469  
    1 libpng 1.6.42 - January 29, 2024
    2 ================================
     1libpng 1.6.43 - February 23, 2024
     2=================================
    33
    44This is a public release of libpng, intended for use in production code.
     
    1010Source files with LF line endings (for Unix/Linux):
    1111
    12  * libpng-1.6.42.tar.xz (LZMA-compressed, recommended)
    13  * libpng-1.6.42.tar.gz (deflate-compressed)
     12 * libpng-1.6.43.tar.xz (LZMA-compressed, recommended)
     13 * libpng-1.6.43.tar.gz (deflate-compressed)
    1414
    1515Source files with CRLF line endings (for Windows):
    1616
    17  * lpng1642.7z (LZMA-compressed, recommended)
    18  * lpng1642.zip (deflate-compressed)
     17 * lpng1643.7z (LZMA-compressed, recommended)
     18 * lpng1643.zip (deflate-compressed)
    1919
    2020Other information:
     
    2626
    2727
    28 Changes from version 1.6.41 to version 1.6.42
     28Changes from version 1.6.42 to version 1.6.43
    2929---------------------------------------------
    3030
    31  * Fixed the implementation of the macro function `png_check_sig`.
    32    This was an API regression, introduced in libpng-1.6.41.
    33    (Reported by Matthieu Darbois)
    34 
    35 
    36 Changes from version 1.6.40 to version 1.6.41
    37 ---------------------------------------------
    38 
    39  * Added SIMD-optimized code for the Loongarch LSX hardware.
    40    (Contributed by GuXiWei, JinBo and ZhangLixia)
    41  * Fixed the run-time discovery of MIPS MSA hardware.
    42    (Contributed by Sui Jingfeng)
    43  * Fixed an off-by-one error in the function `png_do_check_palette_indexes`,
    44    which failed to recognize errors that might have existed in the first
    45    column of a broken palette-encoded image. This was a benign regression
    46    accidentally introduced in libpng-1.6.33. No pixel was harmed.
    47    (Contributed by Adam Richter; reviewed by John Bowler)
    48  * Fixed, improved and modernized the contrib/pngminus programs, i.e.,
    49    png2pnm.c and pnm2png.c
    50  * Removed old and peculiar portability hacks that were meant to silence
    51    warnings issued by gcc version 7.1 alone.
     31 * Fixed the row width check in png_check_IHDR().
     32   This corrected a bug that was specific to the 16-bit platforms,
     33   and removed a spurious compiler warning from the 64-bit builds.
     34   (Reported by Jacek Caban; fixed by John Bowler)
     35 * Added eXIf chunk support to the push-mode reader in pngpread.c.
     36   (Contributed by Chris Blume)
     37 * Added contrib/pngexif for the benefit of the users who would like
     38   to inspect the content of eXIf chunks.
     39 * Added contrib/conftest/basic.dfa, a basic build-time configuration.
    5240   (Contributed by John Bowler)
    53  * Fixed and modernized the CMake file, and raised the minimum required
    54    CMake version from 3.1 to 3.6.
    55    (Contributed by Clinton Ingram, Timothy Lyanguzov, Tyler Kropp, et al.)
    56  * Allowed the configure script to disable the building of auxiliary tools
    57    and tests, thus catching up with the CMake file.
    58    (Contributed by Carlo Bramini)
    59  * Fixed a build issue on Mac.
    60    (Contributed by Zixu Wang)
    61  * Moved the Autoconf macro files to scripts/autoconf.
    62  * Moved the CMake files (except for the main CMakeLists.txt) to
    63    scripts/cmake and moved the list of their contributing authors to
    64    scripts/cmake/AUTHORS.md
    65  * Updated the CI configurations and scripts.
    66  * Relicensed the CI scripts to the MIT License.
    67  * Improved the test coverage.
     41 * Fixed a preprocessor condition in pngread.c that broke build-time
     42   configurations like contrib/conftest/pngcp.dfa.
    6843   (Contributed by John Bowler)
     44 * Added CMake build support for LoongArch LSX.
     45   (Contributed by GuXiWei)
     46 * Fixed a CMake build error that occurred under a peculiar state of the
     47   dependency tree. This was a regression introduced in libpng-1.6.41.
     48   (Contributed by Dan Rosser)
     49 * Marked the installed libpng headers as system headers in CMake.
     50   (Contributed by Benjamin Buch)
     51 * Updated the build support for RISCOS.
     52   (Contributed by Cameron Cawley)
     53 * Updated the makefiles to allow cross-platform builds to initialize
     54   conventional make variables like AR and ARFLAGS.
     55 * Added various improvements to the CI scripts in areas like version
     56   consistency verification and text linting.
     57 * Added version consistency verification to pngtest.c also.
    6958
    7059
  • trunk/src/libs/libpng-1.6.43/AUTHORS

    r103316 r105469  
    77 * Adam Richter
    88 * Andreas Dilger
     9 * Chris Blume
    910 * Cosmin Truta
    1011 * Dave Martindale
  • trunk/src/libs/libpng-1.6.43/CHANGES

    r103316 r105469  
    61316131
    61326132Version 1.6.41 [January 24, 2024]
    6133   Added SIMD-optimized code for the Loongarch LSX hardware.
     6133  Added SIMD-optimized code for the LoongArch LSX hardware.
    61346134    (Contributed by GuXiWei, JinBo and ZhangLixia)
    61356135  Fixed the run-time discovery of MIPS MSA hardware.
     
    61666166    This was an API regression, introduced in libpng-1.6.41.
    61676167    (Reported by Matthieu Darbois)
     6168  Fixed and updated the libpng manual.
     6169
     6170Version 1.6.43 [February 23, 2024]
     6171  Fixed the row width check in png_check_IHDR().
     6172    This corrected a bug that was specific to the 16-bit platforms,
     6173    and removed a spurious compiler warning from the 64-bit builds.
     6174    (Reported by Jacek Caban; fixed by John Bowler)
     6175  Added eXIf chunk support to the push-mode reader in pngpread.c.
     6176    (Contributed by Chris Blume)
     6177  Added contrib/pngexif for the benefit of the users who would like
     6178    to inspect the content of eXIf chunks.
     6179  Added contrib/conftest/basic.dfa, a basic build-time configuration.
     6180    (Contributed by John Bowler)
     6181  Fixed a preprocessor condition in pngread.c that broke build-time
     6182    configurations like contrib/conftest/pngcp.dfa.
     6183    (Contributed by John Bowler)
     6184  Added CMake build support for LoongArch LSX.
     6185    (Contributed by GuXiWei)
     6186  Fixed a CMake build error that occurred under a peculiar state of the
     6187    dependency tree. This was a regression introduced in libpng-1.6.41.
     6188    (Contributed by Dan Rosser)
     6189  Marked the installed libpng headers as system headers in CMake.
     6190    (Contributed by Benjamin Buch)
     6191  Updated the build support for RISCOS.
     6192    (Contributed by Cameron Cawley)
     6193  Updated the makefiles to allow cross-platform builds to initialize
     6194    conventional make variables like AR and ARFLAGS.
     6195  Added various improvements to the CI scripts in areas like version
     6196    consistency verification and text linting.
     6197  Added version consistency verification to pngtest.c also.
    61686198
    61696199Send comments/corrections/commendations to png-mng-implement at lists.sf.net.
  • trunk/src/libs/libpng-1.6.43/CMakeLists.txt

    r103316 r105469  
    2020set(PNGLIB_MAJOR 1)
    2121set(PNGLIB_MINOR 6)
    22 set(PNGLIB_REVISION 41)
     22set(PNGLIB_REVISION 43)
    2323set(PNGLIB_SUBREVISION 0)
    2424#set(PNGLIB_SUBREVISION "git")
     
    6363
    6464# Allow the users to switch on/off the auxiliary build and test artifacts.
    65 # NOTE: These artifacts are NOT part of libpng proper, and are subject to change at any time.
     65# These artifacts are NOT part of libpng proper, and are subject to change
     66# at any time.
    6667option(PNG_TESTS "Build the libpng tests" ON)
    67 option(PNG_TOOLS "Build the libpng tools" ON)
     68
     69# Same as above, but for the third-party tools.
     70# Although these tools are targetted at development environments only,
     71# the users are allowed to override the option to build by default.
     72if (ANDROID OR IOS)
     73  option(PNG_TOOLS "Build the libpng tools" OFF)
     74else()
     75  option(PNG_TOOLS "Build the libpng tools" ON)
     76endif()
    6877
    6978# Maintain backwards compatibility with the deprecated option PNG_EXECUTABLES.
     
    9099  find_package(ZLIB REQUIRED)
    91100elseif(POLICY CMP0074)
    92   # TODO: Remove the policy check if CMake version 3.12 or greater becomes the minimum required.
    93101  if("x${ZLIB_ROOT}" STREQUAL "x")
    94102    message(DEPRECATION
     
    250258endif()
    251259
     260# Set definitions and sources for LoongArch.
     261if(TARGET_ARCH MATCHES "^(loongarch)")
     262  include(CheckCCompilerFlag)
     263  set(PNG_LOONGARCH_LSX_POSSIBLE_VALUES on off)
     264  set(PNG_LOONGARCH_LSX "on"
     265      CACHE STRING "Enable LOONGARCH_LSX optimizations: on|off; on is default")
     266  set_property(CACHE PNG_LOONGARCH_LSX
     267               PROPERTY STRINGS ${PNG_LOONGARCH_LSX_POSSIBLE_VALUES})
     268  list(FIND PNG_LOONGARCH_LSX_POSSIBLE_VALUES ${PNG_LOONGARCH_LSX} index)
     269  if(index EQUAL -1)
     270    message(FATAL_ERROR "PNG_LOONGARCH_LSX must be one of [${PNG_LOONGARCH_LSX_POSSIBLE_VALUES}]")
     271  elseif(NOT PNG_LOONGARCH_LSX STREQUAL "off")
     272    CHECK_C_COMPILER_FLAG("-mlsx" COMPILER_SUPPORTS_LSX)
     273    if(COMPILER_SUPPORTS_LSX)
     274      set(libpng_loongarch_sources
     275          loongarch/loongarch_lsx_init.c
     276          loongarch/filter_lsx_intrinsics.c)
     277      set_source_files_properties(${libpng_loongarch_sources}
     278                                  PROPERTIES
     279                                  COMPILE_FLAGS "-mlsx")
     280      add_definitions(-DPNG_LOONGARCH_LSX_OPT=1)
     281    else()
     282      message(FATAL_ERROR "Compiler does not support -mlsx option")
     283    endif()
     284  else()
     285    add_definitions(-DPNG_LOONGARCH_LSX_OPT=0)
     286  endif()
     287endif()
     288
    252289else(PNG_HARDWARE_OPTIMIZATIONS)
    253290
     
    270307if(TARGET_ARCH MATCHES "^(mipsel|mips64el)")
    271308  add_definitions(-DPNG_MIPS_MSA_OPT=0)
     309endif()
     310
     311# Set definitions and sources for LoongArch.
     312if(TARGET_ARCH MATCHES "^(loongarch)")
     313  add_definitions(-DPNG_LOONGARCH_LSX_OPT=0)
    272314endif()
    273315
     
    311353endif()
    312354
    313 find_program(AWK NAMES gawk awk)
     355# Find an AWK language processor.
     356# Start with specific AWK implementations like gawk and nawk, which are
     357# known to work with our scripts, then fall back to the system awk.
     358find_program(AWK NAMES gawk nawk awk)
     359if(AWK)
     360  message(STATUS "Found AWK program: ${AWK}")
     361else()
     362  message(STATUS "Could not find an AWK-compatible program")
     363endif()
    314364
    315365include_directories(${CMAKE_CURRENT_BINARY_DIR})
     
    353403                               "-DINPUT=${_GC_INPUT}"
    354404                               "-DOUTPUT=${_GC_OUTPUT}"
    355                                -P "${CMAKE_CURRENT_BINARY_DIR}/genchk.cmake"
     405                               -P "${CMAKE_CURRENT_BINARY_DIR}/scripts/cmake/genchk.cmake"
    356406                       DEPENDS "${_GC_INPUT}" ${_GC_DEPENDS}
    357407                       WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
     
    376426                               "-DINPUT=${_GO_INPUT}"
    377427                               "-DOUTPUT=${_GO_OUTPUT}"
    378                                -P "${CMAKE_CURRENT_BINARY_DIR}/genout.cmake"
     428                               -P "${CMAKE_CURRENT_BINARY_DIR}/scripts/cmake/genout.cmake"
    379429                       DEPENDS "${_GO_INPUT}" ${_GO_DEPENDS}
    380430                       WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
     
    395445                       COMMAND "${CMAKE_COMMAND}"
    396446                               "-DOUTPUT=${_GSO_OUTPUT}"
    397                                -P "${CMAKE_CURRENT_BINARY_DIR}/gensrc.cmake"
     447                               -P "${CMAKE_CURRENT_BINARY_DIR}/scripts/cmake/gensrc.cmake"
    398448                       DEPENDS ${_GSO_DEPENDS}
    399449                       WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
     
    525575                    COMMAND "${CMAKE_COMMAND}"
    526576                            "-DOUTPUT=scripts/pnglibconf.h.prebuilt"
    527                             -P "${CMAKE_CURRENT_BINARY_DIR}/gensrc.cmake"
     577                            -P "${CMAKE_CURRENT_BINARY_DIR}/scripts/cmake/gensrc.cmake"
    528578                    WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
    529579
     
    582632    ${libpng_mips_sources}
    583633    ${libpng_powerpc_sources}
     634    ${libpng_loongarch_sources}
    584635)
    585636set(pngtest_sources
     
    663714  endif()
    664715  target_include_directories(png_shared
    665                              PUBLIC
    666                                $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/libpng${PNGLIB_ABI_VERSION}>
    667                                $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
    668                              PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
     716                             PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
     717  target_include_directories(png_shared SYSTEM
     718                             INTERFACE $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/libpng${PNGLIB_ABI_VERSION}>)
    669719  target_link_libraries(png_shared PUBLIC ZLIB::ZLIB ${M_LIBRARY})
    670720endif()
     
    678728                        DEBUG_POSTFIX "${PNG_DEBUG_POSTFIX}")
    679729  target_include_directories(png_static
    680                              PUBLIC
    681                                $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/libpng${PNGLIB_ABI_VERSION}>
    682                                $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
    683                              PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
     730                             PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
     731  target_include_directories(png_static SYSTEM
     732                             INTERFACE $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/libpng${PNGLIB_ABI_VERSION}>)
    684733  target_link_libraries(png_static PUBLIC ZLIB::ZLIB ${M_LIBRARY})
    685734endif()
    686735
    687 if(PNG_FRAMEWORK AND APPLE)
     736if(PNG_FRAMEWORK AND NOT APPLE)
     737  message(AUTHOR_WARNING
     738          "Setting PNG_FRAMEWORK to OFF, as it only applies to Apple systems")
     739  set(PNG_FRAMEWORK OFF)
     740endif()
     741
     742if(PNG_FRAMEWORK)
    688743  add_library(png_framework SHARED ${libpng_sources})
    689744  add_dependencies(png_framework png_genfiles)
     
    702757  set_target_properties(png_framework PROPERTIES DEFINE_SYMBOL "")
    703758  target_include_directories(png_framework
    704                              PUBLIC
    705                                $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/libpng${PNGLIB_ABI_VERSION}>
    706                                $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
    707                              PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
     759                             PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
     760  target_include_directories(png_framework SYSTEM
     761                             INTERFACE $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/libpng${PNGLIB_ABI_VERSION}>)
    708762  target_link_libraries(png_framework PUBLIC ZLIB::ZLIB ${M_LIBRARY})
    709763endif()
     
    9681022# Create source generation scripts.
    9691023configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/cmake/genchk.cmake.in
    970                ${CMAKE_CURRENT_BINARY_DIR}/genchk.cmake
     1024               ${CMAKE_CURRENT_BINARY_DIR}/scripts/cmake/genchk.cmake
    9711025               @ONLY)
    9721026configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/cmake/genout.cmake.in
    973                ${CMAKE_CURRENT_BINARY_DIR}/genout.cmake
     1027               ${CMAKE_CURRENT_BINARY_DIR}/scripts/cmake/genout.cmake
    9741028               @ONLY)
    9751029configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/cmake/gensrc.cmake.in
    976                ${CMAKE_CURRENT_BINARY_DIR}/gensrc.cmake
     1030               ${CMAKE_CURRENT_BINARY_DIR}/scripts/cmake/gensrc.cmake
    9771031               @ONLY)
    9781032
  • trunk/src/libs/libpng-1.6.43/README

    r103316 r105469  
    1 README for libpng version 1.6.42
     1README for libpng version 1.6.43
    22================================
    33
     
    143143    pngwtran.c    =>  Write data transformations
    144144    pngwutil.c    =>  Write utility functions
    145     arm/          =>  Optimized code for the ARM platform
    146     intel/        =>  Optimized code for the INTEL-SSE2 platform
    147     mips/         =>  Optimized code for the MIPS platform
    148     powerpc/      =>  Optimized code for the PowerPC platform
     145    arm/          =>  Optimized code for ARM Neon
     146    intel/        =>  Optimized code for INTEL SSE2
     147    loongarch/    =>  Optimized code for LoongArch LSX
     148    mips/         =>  Optimized code for MIPS MSA and MIPS MMI
     149    powerpc/      =>  Optimized code for PowerPC VSX
    149150    ci/           =>  Scripts for continuous integration
    150151    contrib/      =>  External contributions
     
    159160        oss-fuzz/     =>  Files used by the OSS-Fuzz project for fuzz-testing
    160161                          libpng
     162        pngexif/      =>  Program to inspect the EXIF information in PNG files
    161163        pngminim/     =>  Minimal decoder, encoder, and progressive decoder
    162164                          programs demonstrating the use of pngusr.dfa
  • trunk/src/libs/libpng-1.6.43/configure

    r103316 r105469  
    11#! /bin/sh
    22# Guess values for system-dependent variables and create Makefiles.
    3 # Generated by GNU Autoconf 2.72 for libpng 1.6.42.
     3# Generated by GNU Autoconf 2.72 for libpng 1.6.43.
    44#
    55# Report bugs to <[email protected]>.
     
    615615PACKAGE_NAME='libpng'
    616616PACKAGE_TARNAME='libpng'
    617 PACKAGE_VERSION='1.6.42'
    618 PACKAGE_STRING='libpng 1.6.42'
     617PACKAGE_VERSION='1.6.43'
     618PACKAGE_STRING='libpng 1.6.43'
    619619PACKAGE_BUGREPORT='[email protected]'
    620620PACKAGE_URL=''
     
    868868CPP
    869869LT_SYS_LIBRARY_PATH
     870AWK
    870871PNG_COPTS'
    871872
     
    14171418  # This message is too long to be a string in the A/UX 3.1 sh.
    14181419  cat <<_ACEOF
    1419 'configure' configures libpng 1.6.42 to adapt to many kinds of systems.
     1420'configure' configures libpng 1.6.43 to adapt to many kinds of systems.
    14201421
    14211422Usage: $0 [OPTION]... [VAR=VALUE]...
     
    14881489if test -n "$ac_init_help"; then
    14891490  case $ac_init_help in
    1490      short | recursive ) echo "Configuration of libpng 1.6.42:";;
     1491     short | recursive ) echo "Configuration of libpng 1.6.43:";;
    14911492   esac
    14921493  cat <<\_ACEOF
     
    15441545                          change this.
    15451546  --enable-hardware-optimizations
    1546                           Enable hardware optimizations: =no/off, yes/on:
     1547                          Enable hardware optimizations: =no/off, yes/on.
    15471548  --enable-arm-neon     Enable ARM NEON optimizations: =no/off, check, api,
    1548                           yes/on: no/off: disable the optimizations; check:
     1549                          yes/on. no/off: disable the optimizations; check:
    15491550                          use internal checking code (deprecated and poorly
    15501551                          supported); api: disable by default, enable by a
     
    15531554                          compiler.
    15541555  --enable-mips-msa     Enable MIPS MSA optimizations: =no/off, check, api,
    1555                           yes/on: no/off: disable the optimizations; check:
     1556                          yes/on. no/off: disable the optimizations; check:
    15561557                          use internal checking code (deprecated and poorly
    15571558                          supported); api: disable by default, enable by a
     
    15601561                          compiler.
    15611562  --enable-mips-mmi     Enable MIPS MMI optimizations: =no/off, check, api,
    1562                           yes/on: no/off: disable the optimizations; check:
     1563                          yes/on. no/off: disable the optimizations; check:
    15631564                          use internal checking code (deprecated and poorly
    15641565                          supported); api: disable by default, enable by a
     
    15661567                          unconditionally. If not specified: determined by the
    15671568                          compiler.
    1568   --enable-intel-sse    Enable Intel SSE optimizations: =no/off, yes/on:
     1569  --enable-intel-sse    Enable Intel SSE optimizations: =no/off, yes/on.
    15691570                          no/off: disable the optimizations; yes/on: enable
    15701571                          the optimizations. If not specified: determined by
    15711572                          the compiler.
    15721573  --enable-powerpc-vsx  Enable POWERPC VSX optimizations: =no/off, check,
    1573                           api, yes/on: no/off: disable the optimizations;
    1574                           check: use internal checking code api: disable by
    1575                           default, enable by a call to png_set_option yes/on:
     1574                          api, yes/on. no/off: disable the optimizations;
     1575                          check: use internal checking code; api: disable by
     1576                          default, enable by a call to png_set_option; yes/on:
    15761577                          turn on unconditionally. If not specified:
    15771578                          determined by the compiler.
     
    16141615  LT_SYS_LIBRARY_PATH
    16151616              User-defined run-time library search path.
    1616   PNG_COPTS   additional flags for the C compiler, use this for options that
     1617  AWK         AWK language processor
     1618  PNG_COPTS   additional flags for the C compiler, to be used for options that
    16171619              would cause configure itself to fail
    16181620
     
    16841686if $ac_init_version; then
    16851687  cat <<\_ACEOF
    1686 libpng configure 1.6.42
     1688libpng configure 1.6.43
    16871689generated by GNU Autoconf 2.72
    16881690
     
    19471949running configure, to aid debugging if configure makes a mistake.
    19481950
    1949 It was created by libpng $as_me 1.6.42, which was
     1951It was created by libpng $as_me 1.6.43, which was
    19501952generated by GNU Autoconf 2.72.  Invocation command line was
    19511953
     
    32473249# Define the identity of the package.
    32483250 PACKAGE='libpng'
    3249  VERSION='1.6.42'
     3251 VERSION='1.6.43'
    32503252
    32513253
     
    33803382
    33813383
    3382 PNGLIB_VERSION=1.6.42
     3384PNGLIB_VERSION=1.6.43
    33833385PNGLIB_MAJOR=1
    33843386PNGLIB_MINOR=6
    3385 PNGLIB_RELEASE=41
     3387PNGLIB_RELEASE=43
    33863388
    33873389
     
    33903392
    33913393
    3392 # Checks for programs.
     3394# Check for basic programs.
    33933395ac_ext=c
    33943396ac_cpp='$CPP $CPPFLAGS'
     
    1366013662
    1366113663
    13662 # Some awks crash when confronted with pnglibconf.dfa, do a test run now
    13663 # to make sure this doesn't happen
    13664 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that AWK works" >&5
    13665 printf %s "checking that AWK works... " >&6; }
     13664
     13665
     13666# Some awk implementations crash when confronted with pnglibconf.dfa.
     13667# Run a test now, to make sure this doesn't happen.
     13668{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if awk ($AWK) works" >&5
     13669printf %s "checking if awk ($AWK) works... " >&6; }
    1366613670if ${AWK} -f ${srcdir}/scripts/options.awk out="/dev/null" version=search\
    1366713671   ${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\
    1366813672   ${srcdir}/pngusr.dfa 1>&2
    1366913673then
    13670    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
    13671 printf "%s\n" "ok" >&6; }
     13674   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
     13675printf "%s\n" "yes" >&6; }
    1367213676else
    1367313677   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
    1367413678printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
    13675 as_fn_error 1 "failed
     13679as_fn_error 1 "no
    1367613680See 'config.log' for more details" "$LINENO" 5; }
    1367713681fi
     
    1422414228printf %s "checking for symbol prefix... " >&6; }
    1422514229    SYMBOL_PREFIX=`echo "PREFIX=__USER_LABEL_PREFIX__" \
    14226                   | ${CPP-${CC-gcc} -E} - 2>&1 \
    14227                   | ${EGREP-grep} "^PREFIX=" \
    14228                   | ${SED-sed} -e "s:^PREFIX=::" -e "s:__USER_LABEL_PREFIX__::"`
     14230                  | ${CPP:-${CC:-gcc} -E} - 2>&1 \
     14231                  | ${EGREP:-grep} "^PREFIX=" \
     14232                  | ${SED:-sed} -e "s:^PREFIX=::" -e "s:__USER_LABEL_PREFIX__::"`
    1422914233
    1423014234    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SYMBOL_PREFIX" >&5
     
    1442614430
    1442714431
    14428 # ARM
    14429 # ===
    14430 #
    14431 # ARM NEON (SIMD) support.
     14432# ARM NEON
     14433# ========
    1443214434
    1443314435# Check whether --enable-arm-neon was given.
     
    1445414456printf "%s\n" "#define PNG_ARM_NEON_OPT 2" >>confdefs.h
    1445514457
    14456          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable-arm-neon: please specify 'check' or 'api', if
    14457             you want the optimizations unconditionally pass -mfpu=neon
    14458             to the compiler." >&5
    14459 printf "%s\n" "$as_me: WARNING: --enable-arm-neon: please specify 'check' or 'api', if
    14460             you want the optimizations unconditionally pass -mfpu=neon
    14461             to the compiler." >&2;};;
     14458         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable-arm-neon: please specify 'check' or 'api';
     14459            if you want the optimizations unconditionally,
     14460            pass '-mfpu=neon' to the compiler." >&5
     14461printf "%s\n" "$as_me: WARNING: --enable-arm-neon: please specify 'check' or 'api';
     14462            if you want the optimizations unconditionally,
     14463            pass '-mfpu=neon' to the compiler." >&2;};;
    1446214464      *)
    14463          as_fn_error $? "--enable-arm-neon=${enable_arm_neon}: invalid value" "$LINENO" 5
     14465         as_fn_error $? "--enable-arm-neon=${enable_arm_neon}:
     14466                      invalid argument" "$LINENO" 5
    1446414467   esac
    1446514468fi
     
    1446714470
    1446814471# Add ARM-specific files to all builds where $host_cpu is arm ('arm*') or
    14469 # where ARM optimizations were explicitly requested (this allows a fallback
    14470 # if a future host CPU does not match 'arm*')
     14472# where ARM optimizations were explicitly requested. (This allows a fallback
     14473# if a future host CPU does not match 'arm*'.)
    1447114474
    1447214475 if test "$enable_arm_neon" != 'no' &&
     
    1448314486
    1448414487
    14485 # MIPS
    14486 # ====
    14487 #
    14488 # MIPS MSA (SIMD) support.
     14488# MIPS MSA
     14489# ========
    1448914490
    1449014491# Check whether --enable-mips-msa was given.
     
    1451114512printf "%s\n" "#define PNG_MIPS_MSA_OPT 2" >>confdefs.h
    1451214513
    14513          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable-mips-msa: please specify 'check' or 'api', if
    14514             you want the optimizations unconditionally pass '-mmsa -mfp64'
    14515             to the compiler." >&5
    14516 printf "%s\n" "$as_me: WARNING: --enable-mips-msa: please specify 'check' or 'api', if
    14517             you want the optimizations unconditionally pass '-mmsa -mfp64'
    14518             to the compiler." >&2;};;
     14514         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable-mips-msa: please specify 'check' or 'api';
     14515            if you want the optimizations unconditionally,
     14516            pass '-mmsa -mfp64' to the compiler." >&5
     14517printf "%s\n" "$as_me: WARNING: --enable-mips-msa: please specify 'check' or 'api';
     14518            if you want the optimizations unconditionally,
     14519            pass '-mmsa -mfp64' to the compiler." >&2;};;
    1451914520      *)
    14520          as_fn_error $? "--enable-mips-msa=${enable_mips_msa}: invalid value" "$LINENO" 5
     14521         as_fn_error $? "--enable-mips-msa=${enable_mips_msa}:
     14522                      invalid argument" "$LINENO" 5
    1452114523   esac
    1452214524fi
     
    1452414526
    1452514527# Add MIPS-specific files to all builds where $host_cpu is mips ('mips*') or
    14526 # where MIPS optimizations were explicitly requested (this allows a fallback
    14527 # if a future host CPU does not match 'mips*')
     14528# where MIPS optimizations were explicitly requested. (This allows a fallback
     14529# if a future host CPU does not match 'mips*'.)
    1452814530
    1452914531 if test "$enable_mips_msa" != 'no' &&
     
    1453914541
    1454014542
    14541 # MIPS
    14542 # ===
    14543 #
    14544 # MIPS MMI (SIMD) support.
     14543# MIPS MMI
     14544# ========
    1454514545
    1454614546# Check whether --enable-mips-mmi was given.
     
    1456714567printf "%s\n" "#define PNG_MIPS_MMI_OPT 1" >>confdefs.h
    1456814568
    14569          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable-mips-mmi: please specify 'check' or 'api', if
    14570             you want the optimizations unconditionally pass '-mloongson-mmi -march=loongson3a'
    14571             to the compiler." >&5
    14572 printf "%s\n" "$as_me: WARNING: --enable-mips-mmi: please specify 'check' or 'api', if
    14573             you want the optimizations unconditionally pass '-mloongson-mmi -march=loongson3a'
    14574             to the compiler." >&2;};;
     14569         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable-mips-mmi: please specify 'check' or 'api';
     14570            if you want the optimizations unconditionally
     14571            pass '-mloongson-mmi -march=loongson3a' to the compiler." >&5
     14572printf "%s\n" "$as_me: WARNING: --enable-mips-mmi: please specify 'check' or 'api';
     14573            if you want the optimizations unconditionally
     14574            pass '-mloongson-mmi -march=loongson3a' to the compiler." >&2;};;
    1457514575      *)
    14576          as_fn_error $? "--enable-mips-mmi=${enable_mips_mmi}: invalid value" "$LINENO" 5
     14576         as_fn_error $? "--enable-mips-mmi=${enable_mips_mmi}:
     14577                      invalid argument" "$LINENO" 5
    1457714578   esac
    1457814579fi
     
    1458014581
    1458114582# Add MIPS specific files to all builds where the host_cpu is mips ('mips*') or
    14582 # where MIPS optimizations were explicitly requested (this allows a fallback if a
    14583 # future host CPU does not match 'mips*')
     14583# where MIPS optimizations were explicitly requested. (This allows a fallback
     14584# if a future host CPU does not match 'mips*'.)
    1458414585
    1458514586 if test "$enable_mips_mmi" != 'no' &&
    1458614587    case "$host_cpu" in
    14587       mipsel*|mips64el*) :;;
     14588      mipsel*|mips64el*) : ;;
    1458814589    esac; then
    1458914590  PNG_MIPS_MMI_TRUE=
     
    1459514596
    1459614597
    14597 # INTEL
    14598 # =====
    14599 #
    14600 # INTEL SSE (SIMD) support.
     14598# INTEL SSE
     14599# =========
    1460114600
    1460214601# Check whether --enable-intel-sse was given.
     
    1461614615;;
    1461714616      *)
    14618          as_fn_error $? "--enable-intel-sse=${enable_intel_sse}: invalid value" "$LINENO" 5
     14617         as_fn_error $? "--enable-intel-sse=${enable_intel_sse}:
     14618                      invalid argument" "$LINENO" 5
    1461914619   esac
    1462014620fi
     
    1462214622
    1462314623# Add Intel-specific files to all builds where $host_cpu is Intel ('x86*') or
    14624 # where Intel optimizations were explicitly requested (this allows a fallback
    14625 # if a future host CPU does not match 'x86*')
     14624# where Intel optimizations were explicitly requested. (This allows a fallback
     14625# if a future host CPU does not match 'x86*'.)
    1462614626 if test "$enable_intel_sse" != 'no' &&
    1462714627    case "$host_cpu" in
     
    1463714637
    1463814638
    14639 # PowerPC
    14640 # =======
    14641 #
    14642 # PowerPC VSX (SIMD) support.
     14639# POWERPC VSX
     14640# ===========
    1464314641
    1464414642# Check whether --enable-powerpc-vsx was given.
     
    1465714655printf "%s\n" "#define PNG_POWERPC_VSX_CHECK_SUPPORTED /**/" >>confdefs.h
    1465814656
    14659          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable-powerpc-vsx Please check contrib/powerpc/README file
    14660             for the list of supported OSes." >&5
    14661 printf "%s\n" "$as_me: WARNING: --enable-powerpc-vsx Please check contrib/powerpc/README file
    14662             for the list of supported OSes." >&2;};;
     14657         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable-powerpc-vsx: please see contrib/powerpc/README
     14658                     for the list of supported systems." >&5
     14659printf "%s\n" "$as_me: WARNING: --enable-powerpc-vsx: please see contrib/powerpc/README
     14660                     for the list of supported systems." >&2;};;
    1466314661      api)
    1466414662
     
    1466914667printf "%s\n" "#define PNG_POWERPC_VSX_OPT 2" >>confdefs.h
    1467014668
    14671          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable-powerpc-vsx: please specify 'check' or 'api', if
    14672             you want the optimizations unconditionally pass '-maltivec -mvsx'
    14673             or '-mcpu=power8' to the compiler." >&5
    14674 printf "%s\n" "$as_me: WARNING: --enable-powerpc-vsx: please specify 'check' or 'api', if
    14675             you want the optimizations unconditionally pass '-maltivec -mvsx'
    14676             or '-mcpu=power8' to the compiler." >&2;};;
     14669         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable-powerpc-vsx: please specify 'check' or 'api';
     14670            if you want the optimizations unconditionally,
     14671            pass '-maltivec -mvsx' or '-mcpu=power8' to the compiler." >&5
     14672printf "%s\n" "$as_me: WARNING: --enable-powerpc-vsx: please specify 'check' or 'api';
     14673            if you want the optimizations unconditionally,
     14674            pass '-maltivec -mvsx' or '-mcpu=power8' to the compiler." >&2;};;
    1467714675      *)
    14678          as_fn_error $? "--enable-powerpc-vsx=${enable_powerpc_vsx}: invalid value" "$LINENO" 5
     14676         as_fn_error $? "--enable-powerpc-vsx=${enable_powerpc_vsx}:
     14677                      invalid argument" "$LINENO" 5
    1467914678   esac
    1468014679fi
    1468114680
    1468214681
    14683 # Add PowerPC-specific files to all builds where $host_cpu is powerpc('powerpc*')
    14684 # or where PowerPC optimizations were explicitly requested (this allows a fallback
    14685 # if a future host CPU does not match 'powerpc*')
     14682# Add PowerPC-specific files to all builds where $host_cpu is powerpc
     14683# ('powerpc*') or where PowerPC optimizations were explicitly requested.
     14684# (This allows a fallback if a future host CPU does not match 'powerpc*'.)
    1468614685
    1468714686 if test "$enable_powerpc_vsx" != 'no' &&
     
    1469714696
    1469814697
    14699 # LOONGARCH
    14700 # ===
    14701 #
    14702 # LOONGARCH LSX (SIMD) support
    14703 
    14704 if test "$LSX_CFLAGS" = ''; then
    14705     LSX_CFLAGS="-mlsx"
    14706 fi
    14707 
    14708 compiler_support_loongarch_lsx=no
    14709 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use loongarch LSX intrinsics" >&5
    14710 printf %s "checking whether to use loongarch LSX intrinsics... " >&6; }
    14711 save_CFLAGS=$CFLAGS
    14712 CFLAGS="$CFLAGS $LSX_CFLAGS"
    14713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     14698# LOONGARCH LSX
     14699# =============
     14700
     14701# Check whether --enable-loongarch-lsx was given.
     14702if test ${enable_loongarch_lsx+y}
     14703then :
     14704  enableval=$enable_loongarch_lsx; case "$enableval" in
     14705      no|off)
     14706         # disable the default enabling on __loongarch_simd systems:
     14707
     14708printf "%s\n" "#define PNG_LOONGARCH_LSX_OPT 0" >>confdefs.h
     14709
     14710         # Prevent inclusion of the assembler files below:
     14711         enable_loongarch_lsx=no;;
     14712      yes|on)
     14713
     14714printf "%s\n" "#define PNG_LOONGARCH_LSX_OPT 1" >>confdefs.h
     14715
     14716         ;;
     14717      *)
     14718         as_fn_error $? "--enable-loongarch-lsx=${enable_loongarch_lsx}:
     14719                      invalid argument" "$LINENO" 5
     14720   esac
     14721fi
     14722
     14723
     14724if test "$enable_loongarch_lsx" != "no" &&
     14725   case "$host_cpu" in
     14726      loongarch*) : ;;
     14727      *)    test "$enable_loongarch_lsx" != '' ;;
     14728   esac
     14729then
     14730   compiler_support_loongarch_lsx=no
     14731   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use LoongArch LSX intrinsics" >&5
     14732printf %s "checking whether to use LoongArch LSX intrinsics... " >&6; }
     14733   save_CFLAGS="$CFLAGS"
     14734   LSX_CFLAGS="${LSX_CFLAGS:-"-mlsx"}"
     14735   CFLAGS="$CFLAGS $LSX_CFLAGS"
     14736   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    1471414737/* end confdefs.h.  */
    1471514738
    14716 #include<lsxintrin.h>
     14739#include <lsxintrin.h>
    1471714740int main(){
    14718     __m128i a, b, c;
    14719     a = __lsx_vadd_w(b, c);
    14720     return 0;
     14741   __m128i a, b, c;
     14742   a = __lsx_vadd_w(b, c);
     14743   return 0;
    1472114744}
    1472214745_ACEOF
     
    1472614749fi
    1472714750rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
    14728 CFLAGS=$save_CFLAGS
    14729 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $compiler_support_loongarch_lsx" >&5
     14751   CFLAGS="$save_CFLAGS"
     14752   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $compiler_support_loongarch_lsx" >&5
    1473014753printf "%s\n" "$compiler_support_loongarch_lsx" >&6; }
    14731 
    14732 # Check whether --enable-loongarch-lsx was given.
    14733 if test ${enable_loongarch_lsx+y}
    14734 then :
    14735   enableval=$enable_loongarch_lsx; case "$enableval" in
    14736       no|off)
    14737          # disable the default enabling on __loongarch_simd systems:
    14738 
    14739 printf "%s\n" "#define PNG_LOONGARCH_LSX_OPT 0" >>confdefs.h
    14740 
    14741          # Prevent inclusion of the assembler files below:
    14742          enable_loongarch_lsx=no;;
    14743       yes|on)
    14744 
    14745 printf "%s\n" "#define PNG_LOONGARCH_LSX_OPT 1" >>confdefs.h
    14746 
    14747          ;;
    14748       *)
    14749          as_fn_error $? "--enable-loongarch-lsx=${enable_loongarch_lsx}: invalid value" "$LINENO" 5
    14750    esac
    14751 fi
    14752 
    14753 
    14754 if test "$enable_loongarch_lsx" != 'no'; then
    14755    if test $compiler_support_loongarch_lsx = yes; then
     14754   if test "$compiler_support_loongarch_lsx" = "yes"; then
    1475614755
    1475714756printf "%s\n" "#define PNG_LOONGARCH_LSX_OPT 1" >>confdefs.h
     
    1476314762fi
    1476414763
    14765 # Add LOONGARCH specific files to all builds where the host_cpu is loongarch ('loongarch*') or
    14766 # where LOONGARCH optimizations were explicitly requested (this allows a fallback if a
    14767 # future host CPU does not match 'loongarch*')
    14768 
    14769  if test "$enable_loongarch_lsx" != 'no' && test $compiler_support_loongarch_lsx = yes &&
     14764# Add LoongArch specific files to all builds where the host_cpu is loongarch
     14765# ('loongarch*') or where LoongArch optimizations were explicitly requested.
     14766# (This allows a fallback if a future host CPU does not match 'loongarch*'.)
     14767
     14768 if test "$enable_loongarch_lsx" != "no" &&
     14769    test "$compiler_support_loongarch_lsx" = "yes" &&
    1477014770    case "$host_cpu" in
    14771       loongarch*) :;;
    14772       *)    test "$enable_loongarch_lsx" != '';;
     14771      loongarch*) : ;;
     14772      *)    test "$enable_loongarch_lsx" != '' ;;
    1477314773    esac; then
    1477414774  PNG_LOONGARCH_LSX_TRUE=
     
    1538315383# values after options handling.
    1538415384ac_log="
    15385 This file was extended by libpng $as_me 1.6.42, which was
     15385This file was extended by libpng $as_me 1.6.43, which was
    1538615386generated by GNU Autoconf 2.72.  Invocation command line was
    1538715387
     
    1545115451ac_cs_config='$ac_cs_config_escaped'
    1545215452ac_cs_version="\\
    15453 libpng config.status 1.6.42
     15453libpng config.status 1.6.43
    1545415454configured by $0, generated by GNU Autoconf 2.72,
    1545515455  with options \\"\$ac_cs_config\\"
  • trunk/src/libs/libpng-1.6.43/configure.ac

    r103316 r105469  
    2626dnl Version number stuff here:
    2727
    28 AC_INIT([libpng],[1.6.42],[[email protected]])
     28AC_INIT([libpng],[1.6.43],[[email protected]])
    2929AC_CONFIG_MACRO_DIR([scripts/autoconf])
    3030
     
    4747dnl stop configure from automagically running automake
    4848
    49 PNGLIB_VERSION=1.6.42
     49PNGLIB_VERSION=1.6.43
    5050PNGLIB_MAJOR=1
    5151PNGLIB_MINOR=6
    52 PNGLIB_RELEASE=41
     52PNGLIB_RELEASE=43
    5353
    5454dnl End of version number stuff
     
    5757AC_CONFIG_HEADERS([config.h])
    5858
    59 # Checks for programs.
     59# Check for basic programs.
    6060AC_LANG([C])
    6161AC_PROG_CC
     
    7373LT_PREREQ([2.4.2])
    7474
    75 # Some awks crash when confronted with pnglibconf.dfa, do a test run now
    76 # to make sure this doesn't happen
    77 AC_MSG_CHECKING([that AWK works])
     75dnl Declare the AWK variable.
     76AC_ARG_VAR(AWK, [AWK language processor])
     77
     78# Some awk implementations crash when confronted with pnglibconf.dfa.
     79# Run a test now, to make sure this doesn't happen.
     80AC_MSG_CHECKING([if awk ($AWK) works])
    7881if ${AWK} -f ${srcdir}/scripts/options.awk out="/dev/null" version=search\
    7982   ${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\
    8083   ${srcdir}/pngusr.dfa 1>&2
    8184then
    82    AC_MSG_RESULT([ok])
     85   AC_MSG_RESULT([yes])
    8386else
    84    AC_MSG_FAILURE([failed], 1)
     87   AC_MSG_FAILURE([no], 1)
    8588fi
    8689
     
    112115# Add the following option to deal with this:
    113116AC_ARG_VAR(PNG_COPTS,
    114    [additional flags for the C compiler, use this for options that would]
     117   [additional flags for the C compiler, to be used for options that would]
    115118   [cause configure itself to fail])
    116119AC_ARG_ENABLE(werror,
     
    224227    AC_MSG_CHECKING([for symbol prefix])
    225228    SYMBOL_PREFIX=`echo "PREFIX=__USER_LABEL_PREFIX__" \
    226                   | ${CPP-${CC-gcc} -E} - 2>&1 \
    227                   | ${EGREP-grep} "^PREFIX=" \
    228                   | ${SED-sed} -e "s:^PREFIX=::" -e "s:__USER_LABEL_PREFIX__::"`
     229                  | ${CPP:-${CC:-gcc} -E} - 2>&1 \
     230                  | ${EGREP:-grep} "^PREFIX=" \
     231                  | ${SED:-sed} -e "s:^PREFIX=::" -e "s:__USER_LABEL_PREFIX__::"`
    229232    AC_SUBST(SYMBOL_PREFIX)
    230233    AC_MSG_RESULT($SYMBOL_PREFIX)
     
    319322AC_ARG_ENABLE([hardware-optimizations],
    320323   AS_HELP_STRING([[[--enable-hardware-optimizations]]],
    321       [Enable hardware optimizations: =no/off, yes/on:]),
     324      [Enable hardware optimizations: =no/off, yes/on.]),
    322325   [case "$enableval" in
    323326      no|off)
     
    377380   esac])
    378381
    379 # ARM
    380 # ===
    381 #
    382 # ARM NEON (SIMD) support.
     382# ARM NEON
     383# ========
    383384
    384385AC_ARG_ENABLE([arm-neon],
    385386   AS_HELP_STRING([[[--enable-arm-neon]]],
    386       [Enable ARM NEON optimizations: =no/off, check, api, yes/on:]
    387       [no/off: disable the optimizations; check: use internal checking code]
    388       [(deprecated and poorly supported); api: disable by default, enable by]
    389       [a call to png_set_option; yes/on: turn on unconditionally.]
     387      [Enable ARM NEON optimizations: =no/off, check, api, yes/on.]
     388      [no/off: disable the optimizations;]
     389      [check: use internal checking code (deprecated and poorly supported);]
     390      [api: disable by default, enable by a call to png_set_option;]
     391      [yes/on: turn on unconditionally.]
    390392      [If not specified: determined by the compiler.]),
    391393   [case "$enableval" in
     
    405407         AC_DEFINE([PNG_ARM_NEON_OPT], [2],
    406408                   [Enable ARM Neon optimizations])
    407          AC_MSG_WARN([--enable-arm-neon: please specify 'check' or 'api', if]
    408             [you want the optimizations unconditionally pass -mfpu=neon]
    409             [to the compiler.]);;
     409         AC_MSG_WARN([--enable-arm-neon: please specify 'check' or 'api';]
     410            [if you want the optimizations unconditionally,]
     411            [pass '-mfpu=neon' to the compiler.]);;
    410412      *)
    411          AC_MSG_ERROR([--enable-arm-neon=${enable_arm_neon}: invalid value])
     413         AC_MSG_ERROR([--enable-arm-neon=${enable_arm_neon}:]
     414                      [invalid argument])
    412415   esac])
    413416
    414417# Add ARM-specific files to all builds where $host_cpu is arm ('arm*') or
    415 # where ARM optimizations were explicitly requested (this allows a fallback
    416 # if a future host CPU does not match 'arm*')
     418# where ARM optimizations were explicitly requested. (This allows a fallback
     419# if a future host CPU does not match 'arm*'.)
    417420
    418421AM_CONDITIONAL([PNG_ARM_NEON],
     
    423426    esac])
    424427
    425 # MIPS
    426 # ====
    427 #
    428 # MIPS MSA (SIMD) support.
     428# MIPS MSA
     429# ========
    429430
    430431AC_ARG_ENABLE([mips-msa],
    431432   AS_HELP_STRING([[[--enable-mips-msa]]],
    432       [Enable MIPS MSA optimizations: =no/off, check, api, yes/on:]
    433       [no/off: disable the optimizations; check: use internal checking code]
    434       [(deprecated and poorly supported); api: disable by default, enable by]
    435       [a call to png_set_option; yes/on: turn on unconditionally.]
     433      [Enable MIPS MSA optimizations: =no/off, check, api, yes/on.]
     434      [no/off: disable the optimizations;]
     435      [check: use internal checking code (deprecated and poorly supported);]
     436      [api: disable by default, enable by a call to png_set_option;]
     437      [yes/on: turn on unconditionally.]
    436438      [If not specified: determined by the compiler.]),
    437439   [case "$enableval" in
     
    451453         AC_DEFINE([PNG_MIPS_MSA_OPT], [2],
    452454                   [Enable MIPS MSA optimizations])
    453          AC_MSG_WARN([--enable-mips-msa: please specify 'check' or 'api', if]
    454             [you want the optimizations unconditionally pass '-mmsa -mfp64']
    455             [to the compiler.]);;
     455         AC_MSG_WARN([--enable-mips-msa: please specify 'check' or 'api';]
     456            [if you want the optimizations unconditionally,]
     457            [pass '-mmsa -mfp64' to the compiler.]);;
    456458      *)
    457          AC_MSG_ERROR([--enable-mips-msa=${enable_mips_msa}: invalid value])
     459         AC_MSG_ERROR([--enable-mips-msa=${enable_mips_msa}:]
     460                      [invalid argument])
    458461   esac])
    459462
    460463# Add MIPS-specific files to all builds where $host_cpu is mips ('mips*') or
    461 # where MIPS optimizations were explicitly requested (this allows a fallback
    462 # if a future host CPU does not match 'mips*')
     464# where MIPS optimizations were explicitly requested. (This allows a fallback
     465# if a future host CPU does not match 'mips*'.)
    463466
    464467AM_CONDITIONAL([PNG_MIPS_MSA],
     
    468471    esac])
    469472
    470 # MIPS
    471 # ===
    472 #
    473 # MIPS MMI (SIMD) support.
     473# MIPS MMI
     474# ========
    474475
    475476AC_ARG_ENABLE([mips-mmi],
    476477   AS_HELP_STRING([[[--enable-mips-mmi]]],
    477       [Enable MIPS MMI optimizations: =no/off, check, api, yes/on:]
    478       [no/off: disable the optimizations; check: use internal checking code]
    479       [(deprecated and poorly supported); api: disable by default, enable by]
    480       [a call to png_set_option; yes/on: turn on unconditionally.]
     478      [Enable MIPS MMI optimizations: =no/off, check, api, yes/on.]
     479      [no/off: disable the optimizations;]
     480      [check: use internal checking code (deprecated and poorly supported);]
     481      [api: disable by default, enable by a call to png_set_option;]
     482      [yes/on: turn on unconditionally.]
    481483      [If not specified: determined by the compiler.]),
    482484   [case "$enableval" in
     
    496498         AC_DEFINE([PNG_MIPS_MMI_OPT], [1],
    497499                   [Enable MIPS MMI optimizations])
    498          AC_MSG_WARN([--enable-mips-mmi: please specify 'check' or 'api', if]
    499             [you want the optimizations unconditionally pass '-mloongson-mmi -march=loongson3a']
    500             [to the compiler.]);;
     500         AC_MSG_WARN([--enable-mips-mmi: please specify 'check' or 'api';]
     501            [if you want the optimizations unconditionally]
     502            [pass '-mloongson-mmi -march=loongson3a' to the compiler.]);;
    501503      *)
    502          AC_MSG_ERROR([--enable-mips-mmi=${enable_mips_mmi}: invalid value])
     504         AC_MSG_ERROR([--enable-mips-mmi=${enable_mips_mmi}:]
     505                      [invalid argument])
    503506   esac])
    504507
    505508# Add MIPS specific files to all builds where the host_cpu is mips ('mips*') or
    506 # where MIPS optimizations were explicitly requested (this allows a fallback if a
    507 # future host CPU does not match 'mips*')
     509# where MIPS optimizations were explicitly requested. (This allows a fallback
     510# if a future host CPU does not match 'mips*'.)
    508511
    509512AM_CONDITIONAL([PNG_MIPS_MMI],
    510513   [test "$enable_mips_mmi" != 'no' &&
    511514    case "$host_cpu" in
    512       mipsel*|mips64el*) :;;
     515      mipsel*|mips64el*) : ;;
    513516    esac])
    514517
    515 # INTEL
    516 # =====
    517 #
    518 # INTEL SSE (SIMD) support.
     518# INTEL SSE
     519# =========
    519520
    520521AC_ARG_ENABLE([intel-sse],
    521522   AS_HELP_STRING([[[--enable-intel-sse]]],
    522       [Enable Intel SSE optimizations: =no/off, yes/on:]
     523      [Enable Intel SSE optimizations: =no/off, yes/on.]
    523524      [no/off: disable the optimizations;]
    524525      [yes/on: enable the optimizations.]
     
    535536                   [Enable Intel SSE optimizations]);;
    536537      *)
    537          AC_MSG_ERROR([--enable-intel-sse=${enable_intel_sse}: invalid value])
     538         AC_MSG_ERROR([--enable-intel-sse=${enable_intel_sse}:]
     539                      [invalid argument])
    538540   esac])
    539541
    540542# Add Intel-specific files to all builds where $host_cpu is Intel ('x86*') or
    541 # where Intel optimizations were explicitly requested (this allows a fallback
    542 # if a future host CPU does not match 'x86*')
     543# where Intel optimizations were explicitly requested. (This allows a fallback
     544# if a future host CPU does not match 'x86*'.)
    543545AM_CONDITIONAL([PNG_INTEL_SSE],
    544546   [test "$enable_intel_sse" != 'no' &&
     
    548550    esac])
    549551
    550 # PowerPC
    551 # =======
    552 #
    553 # PowerPC VSX (SIMD) support.
     552# POWERPC VSX
     553# ===========
    554554
    555555AC_ARG_ENABLE([powerpc-vsx],
    556556AS_HELP_STRING([[[--enable-powerpc-vsx]]],
    557       [Enable POWERPC VSX optimizations: =no/off, check, api, yes/on:]
    558       [no/off: disable the optimizations; check: use internal checking code]
    559       [api: disable by default, enable by a call to png_set_option]
     557      [Enable POWERPC VSX optimizations: =no/off, check, api, yes/on.]
     558      [no/off: disable the optimizations;]
     559      [check: use internal checking code;]
     560      [api: disable by default, enable by a call to png_set_option;]
    560561      [yes/on: turn on unconditionally.]
    561562      [If not specified: determined by the compiler.]),
     
    570571         AC_DEFINE([PNG_POWERPC_VSX_CHECK_SUPPORTED], [],
    571572                   [Check for POWERPC VSX support at run-time])
    572          AC_MSG_WARN([--enable-powerpc-vsx Please check contrib/powerpc/README file]
    573             [for the list of supported OSes.]);;
     573         AC_MSG_WARN([--enable-powerpc-vsx: please see contrib/powerpc/README]
     574                     [for the list of supported systems.]);;
    574575      api)
    575576         AC_DEFINE([PNG_POWERPC_VSX_API_SUPPORTED], [],
     
    578579         AC_DEFINE([PNG_POWERPC_VSX_OPT], [2],
    579580                   [Enable POWERPC VSX optimizations])
    580          AC_MSG_WARN([--enable-powerpc-vsx: please specify 'check' or 'api', if]
    581             [you want the optimizations unconditionally pass '-maltivec -mvsx']
    582             [or '-mcpu=power8' to the compiler.]);;
     581         AC_MSG_WARN([--enable-powerpc-vsx: please specify 'check' or 'api';]
     582            [if you want the optimizations unconditionally,]
     583            [pass '-maltivec -mvsx' or '-mcpu=power8' to the compiler.]);;
    583584      *)
    584          AC_MSG_ERROR([--enable-powerpc-vsx=${enable_powerpc_vsx}: invalid value])
     585         AC_MSG_ERROR([--enable-powerpc-vsx=${enable_powerpc_vsx}:]
     586                      [invalid argument])
    585587   esac])
    586588
    587 # Add PowerPC-specific files to all builds where $host_cpu is powerpc('powerpc*')
    588 # or where PowerPC optimizations were explicitly requested (this allows a fallback
    589 # if a future host CPU does not match 'powerpc*')
     589# Add PowerPC-specific files to all builds where $host_cpu is powerpc
     590# ('powerpc*') or where PowerPC optimizations were explicitly requested.
     591# (This allows a fallback if a future host CPU does not match 'powerpc*'.)
    590592
    591593AM_CONDITIONAL([PNG_POWERPC_VSX],
     
    595597    esac])
    596598
    597 # LOONGARCH
    598 # ===
    599 #
    600 # LOONGARCH LSX (SIMD) support
    601 
    602 if test "$LSX_CFLAGS" = ''; then
    603     LSX_CFLAGS="-mlsx"
    604 fi
    605 
    606 compiler_support_loongarch_lsx=no
    607 AC_MSG_CHECKING(whether to use loongarch LSX intrinsics)
    608 save_CFLAGS=$CFLAGS
    609 CFLAGS="$CFLAGS $LSX_CFLAGS"
    610 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
    611 #include<lsxintrin.h>
    612 int main(){
    613     __m128i a, b, c;
    614     a = __lsx_vadd_w(b, c);
    615     return 0;
    616 }]])],compiler_support_loongarch_lsx=yes)
    617 CFLAGS=$save_CFLAGS
    618 AC_MSG_RESULT($compiler_support_loongarch_lsx)
     599# LOONGARCH LSX
     600# =============
    619601
    620602AC_ARG_ENABLE([loongarch-lsx],
     
    636618         ;;
    637619      *)
    638          AC_MSG_ERROR([--enable-loongarch-lsx=${enable_loongarch_lsx}: invalid value])
     620         AC_MSG_ERROR([--enable-loongarch-lsx=${enable_loongarch_lsx}:]
     621                      [invalid argument])
    639622   esac])
    640623
    641 if test "$enable_loongarch_lsx" != 'no'; then
    642    if test $compiler_support_loongarch_lsx = yes; then
    643       AC_DEFINE([PNG_LOONGARCH_LSX_OPT], [1], [Enable LOONGARCH LSX optimizations])
     624if test "$enable_loongarch_lsx" != "no" &&
     625   case "$host_cpu" in
     626      loongarch*) : ;;
     627      *)    test "$enable_loongarch_lsx" != '' ;;
     628   esac
     629then
     630   compiler_support_loongarch_lsx=no
     631   AC_MSG_CHECKING(whether to use LoongArch LSX intrinsics)
     632   save_CFLAGS="$CFLAGS"
     633   LSX_CFLAGS="${LSX_CFLAGS:-"-mlsx"}"
     634   CFLAGS="$CFLAGS $LSX_CFLAGS"
     635   AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
     636#include <lsxintrin.h>
     637int main(){
     638   __m128i a, b, c;
     639   a = __lsx_vadd_w(b, c);
     640   return 0;
     641}]])],compiler_support_loongarch_lsx=yes)
     642   CFLAGS="$save_CFLAGS"
     643   AC_MSG_RESULT($compiler_support_loongarch_lsx)
     644   if test "$compiler_support_loongarch_lsx" = "yes"; then
     645      AC_DEFINE([PNG_LOONGARCH_LSX_OPT], [1],
     646                [Enable LOONGARCH LSX optimizations])
    644647   else
    645648      AC_MSG_WARN([Compiler does not support loongarch LSX.])
     
    647650fi
    648651
    649 # Add LOONGARCH specific files to all builds where the host_cpu is loongarch ('loongarch*') or
    650 # where LOONGARCH optimizations were explicitly requested (this allows a fallback if a
    651 # future host CPU does not match 'loongarch*')
     652# Add LoongArch specific files to all builds where the host_cpu is loongarch
     653# ('loongarch*') or where LoongArch optimizations were explicitly requested.
     654# (This allows a fallback if a future host CPU does not match 'loongarch*'.)
    652655
    653656AM_CONDITIONAL([PNG_LOONGARCH_LSX],
    654    [test "$enable_loongarch_lsx" != 'no' && test $compiler_support_loongarch_lsx = yes &&
     657   [test "$enable_loongarch_lsx" != "no" &&
     658    test "$compiler_support_loongarch_lsx" = "yes" &&
    655659    case "$host_cpu" in
    656       loongarch*) :;;
    657       *)    test "$enable_loongarch_lsx" != '';;
     660      loongarch*) : ;;
     661      *)    test "$enable_loongarch_lsx" != '' ;;
    658662    esac])
    659663
  • trunk/src/libs/libpng-1.6.43/contrib/examples/iccfrompng.c

    r96425 r105469  
    8181
    8282      else
    83         result = no_profile;
     83         result = no_profile;
    8484   }
    8585
     
    156156
    157157      else if (verbose && profile == no_profile)
    158         printf("%s has no profile\n", filename);
     158         printf("%s has no profile\n", filename);
    159159   }
    160160
  • trunk/src/libs/libpng-1.6.43/contrib/libtests/pngvalid.c

    r103316 r105469  
    7171
    7272/* pngvalid requires write support and one of the fixed or floating point APIs.
     73 * progressive read is also required currently as the progressive read pointer
     74 * is used to record the 'display' structure.
    7375 */
    74 #if defined(PNG_WRITE_SUPPORTED) &&\
    75    (defined(PNG_FIXED_POINT_SUPPORTED) || defined(PNG_FLOATING_POINT_SUPPORTED))
     76#if defined PNG_WRITE_SUPPORTED &&\
     77   (defined PNG_PROGRESSIVE_READ_SUPPORTED) &&\
     78   (defined PNG_FIXED_POINT_SUPPORTED || defined PNG_FLOATING_POINT_SUPPORTED)
    7679
    7780#if PNG_LIBPNG_VER < 10500
     
    1001010013               case ALPHA_MODE_OFFSET + PNG_ALPHA_OPTIMIZED:
    1001110014#           endif /* ALPHA_MODE_SUPPORTED */
     10015#           if (defined PNG_READ_BACKGROUND_SUPPORTED) ||\
     10016               (defined PNG_READ_ALPHA_MODE_SUPPORTED)
    1001210017               do_compose = (alpha > 0 && alpha < 1);
    1001310018               use_input = (alpha != 0);
    1001410019               break;
     10020#           endif
    1001510021
    1001610022            default:
     
    1192511931
    1192611932      else if (strcmp(*argv, "--expand16") == 0)
    11927          pm.test_gamma_expand16 = 1;
     11933      {
     11934#        ifdef PNG_READ_EXPAND_16_SUPPORTED
     11935            pm.test_gamma_expand16 = 1;
     11936#        else
     11937            fprintf(stderr, "pngvalid: --expand16: no read support\n");
     11938            return SKIP;
     11939#        endif
     11940      }
    1192811941
    1192911942      else if (strcmp(*argv, "--noexpand16") == 0)
     
    1194011953            pm.test_lbg_gamma_composition = 0;
    1194111954
    11942 #     ifdef PNG_WRITE_tRNS_SUPPORTED
    11943          else if (strcmp(*argv, "--tRNS") == 0)
     11955      else if (strcmp(*argv, "--tRNS") == 0)
     11956      {
     11957#        ifdef PNG_WRITE_tRNS_SUPPORTED
    1194411958            pm.test_tRNS = 1;
    11945 #     endif
     11959#        else
     11960            fprintf(stderr, "pngvalid: --tRNS: no write support\n");
     11961            return SKIP;
     11962#        endif
     11963      }
    1194611964
    1194711965      else if (strcmp(*argv, "--notRNS") == 0)
  • trunk/src/libs/libpng-1.6.43/contrib/pngminim/decoder/makefile

    r96425 r105469  
    5555        pngread$(C) pngrio$(C) pngrtran$(C) pngrutil$(C) \
    5656        pngset$(C) pngtrans$(C)
    57        
     57
    5858# Standard headers
    5959PNGH   =png.h pngconf.h pngdebug.h pnginfo.h pngpriv.h pngstruct.h
  • trunk/src/libs/libpng-1.6.43/contrib/tools/pngfix.c

    r103316 r105469  
    133133/* Is it safe to copy? */
    134134#define SAFE_TO_COPY(chunk) (((chunk) & PNG_U32(0,0,0,32)) != 0)
    135 
    136 /* Fix ups for builds with limited read support */
    137 #ifndef PNG_ERROR_TEXT_SUPPORTED
    138 #  define png_error(a,b) png_err(a)
    139 #endif
    140135
    141136/********************************* UTILITIES **********************************/
  • trunk/src/libs/libpng-1.6.43/libpng-manual.txt

    r103316 r105469  
    1010 Based on:
    1111
    12  libpng version 1.6.36, December 2018, through 1.6.42 - January 2024
     12 libpng version 1.6.36, December 2018, through 1.6.43 - February 2024
    1313 Updated and distributed by Cosmin Truta
    1414 Copyright (c) 2018-2024 Cosmin Truta
     
    11791179row_pointers prior to calling png_read_png() with
    11801180
    1181    if (height > PNG_UINT_32_MAX/(sizeof (png_byte)))
     1181   if (height > PNG_UINT_32_MAX / (sizeof (png_bytep)))
    11821182      png_error(png_ptr,
    11831183          "Image is too tall to process in memory");
    11841184
    1185    if (width > PNG_UINT_32_MAX/pixel_size)
     1185   if (width > PNG_UINT_32_MAX / pixel_size)
    11861186      png_error(png_ptr,
    11871187          "Image is too wide to process in memory");
  • trunk/src/libs/libpng-1.6.43/libpng.3

    r103316 r105469  
    1 .TH LIBPNG 3 "January 29, 2024"
     1.TH LIBPNG 3 "February 23, 2024"
    22.SH NAME
    3 libpng \- Portable Network Graphics (PNG) Reference Library 1.6.42
     3libpng \- Portable Network Graphics (PNG) Reference Library 1.6.43
    44
    55.SH SYNOPSIS
     
    529529 Based on:
    530530
    531  libpng version 1.6.36, December 2018, through 1.6.42 - January 2024
     531 libpng version 1.6.36, December 2018, through 1.6.43 - February 2024
    532532 Updated and distributed by Cosmin Truta
    533533 Copyright (c) 2018-2024 Cosmin Truta
     
    16981698row_pointers prior to calling png_read_png() with
    16991699
    1700    if (height > PNG_UINT_32_MAX/(sizeof (png_byte)))
     1700   if (height > PNG_UINT_32_MAX / (sizeof (png_bytep)))
    17011701      png_error(png_ptr,
    17021702          "Image is too tall to process in memory");
    17031703
    1704    if (width > PNG_UINT_32_MAX/pixel_size)
     1704   if (width > PNG_UINT_32_MAX / pixel_size)
    17051705      png_error(png_ptr,
    17061706          "Image is too wide to process in memory");
  • trunk/src/libs/libpng-1.6.43/libpngpf.3

    r103316 r105469  
    1 .TH LIBPNGPF 3 "January 29, 2024"
     1.TH LIBPNGPF 3 "February 23, 2024"
    22.SH NAME
    3 libpng \- Portable Network Graphics (PNG) Reference Library 1.6.42
     3libpng \- Portable Network Graphics (PNG) Reference Library 1.6.43
    44(private functions)
    55
  • trunk/src/libs/libpng-1.6.43/png.5

    r103316 r105469  
    1 .TH PNG 5 "January 29, 2024"
     1.TH PNG 5 "February 23, 2024"
    22.SH NAME
    33png \- Portable Network Graphics (PNG) format
  • trunk/src/libs/libpng-1.6.43/png.c

    r103316 r105469  
    1515
    1616/* Generate a compiler error if there is an old png.h in the search path. */
    17 typedef png_libpng_version_1_6_42 Your_png_h_is_not_version_1_6_42;
     17typedef png_libpng_version_1_6_43 Your_png_h_is_not_version_1_6_43;
    1818
    1919/* Tells libpng that we have already handled the first "num_bytes" bytes
     
    795795#else
    796796   return PNG_STRING_NEWLINE \
    797       "libpng version 1.6.42" PNG_STRING_NEWLINE \
     797      "libpng version 1.6.43" PNG_STRING_NEWLINE \
    798798      "Copyright (c) 2018-2024 Cosmin Truta" PNG_STRING_NEWLINE \
    799799      "Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson" \
     
    18221822#  ifdef PNG_WARNINGS_SUPPORTED
    18231823   else
    1824       {
    1825          char number[PNG_NUMBER_BUFFER_SIZE]; /* +24 = 114 */
    1826 
    1827          pos = png_safecat(message, (sizeof message), pos,
    1828              png_format_number(number, number+(sizeof number),
    1829              PNG_NUMBER_FORMAT_x, value));
    1830          pos = png_safecat(message, (sizeof message), pos, "h: "); /* +2 = 116 */
    1831       }
     1824   {
     1825      char number[PNG_NUMBER_BUFFER_SIZE]; /* +24 = 114 */
     1826
     1827      pos = png_safecat(message, (sizeof message), pos,
     1828          png_format_number(number, number+(sizeof number),
     1829          PNG_NUMBER_FORMAT_x, value));
     1830      pos = png_safecat(message, (sizeof message), pos, "h: "); /* +2 = 116 */
     1831   }
    18321832#  endif
    18331833   /* The 'reason' is an arbitrary message, allow +79 maximum 195 */
     
    25122512#endif /* COLORSPACE */
    25132513
    2514 #ifdef __GNUC__
    2515 /* This exists solely to work round a warning from GNU C. */
    2516 static int /* PRIVATE */
    2517 png_gt(size_t a, size_t b)
    2518 {
    2519    return a > b;
    2520 }
    2521 #else
    2522 #   define png_gt(a,b) ((a) > (b))
    2523 #endif
    2524 
    25252514void /* PRIVATE */
    25262515png_check_IHDR(png_const_structrp png_ptr,
     
    25442533   }
    25452534
    2546    if (png_gt(((width + 7) & (~7U)),
    2547        ((PNG_SIZE_MAX
     2535   /* The bit mask on the first line below must be at least as big as a
     2536    * png_uint_32.  "~7U" is not adequate on 16-bit systems because it will
     2537    * be an unsigned 16-bit value.  Casting to (png_alloc_size_t) makes the
     2538    * type of the result at least as bit (in bits) as the RHS of the > operator
     2539    * which also avoids a common warning on 64-bit systems that the comparison
     2540    * of (png_uint_32) against the constant value on the RHS will always be
     2541    * false.
     2542    */
     2543   if (((width + 7) & ~(png_alloc_size_t)7) >
     2544       (((PNG_SIZE_MAX
    25482545           - 48        /* big_row_buf hack */
    25492546           - 1)        /* filter byte */
  • trunk/src/libs/libpng-1.6.43/png.h

    r103316 r105469  
    22/* png.h - header file for PNG reference library
    33 *
    4  * libpng version 1.6.42
     4 * libpng version 1.6.43
    55 *
    66 * Copyright (c) 2018-2024 Cosmin Truta
     
    1616 *   libpng versions 0.97, January 1998, through 1.6.35, July 2018:
    1717 *     Glenn Randers-Pehrson
    18  *   libpng versions 1.6.36, December 2018, through 1.6.42, January 2024:
     18 *   libpng versions 1.6.36, December 2018, through 1.6.43, February 2024:
    1919 *     Cosmin Truta
    2020 *   See also "Contributing Authors", below.
     
    240240 *    1.5.30                  15    10530  15.so.15.30[.0]
    241241 *    ...
    242  *    1.6.42                  16    10641  16.so.16.41[.0]
     242 *    1.6.43                  16    10643  16.so.16.43[.0]
    243243 *
    244244 *    Henceforth the source version will match the shared-library major and
     
    256256 *    application is loaded with a different version of the library.
    257257 *
    258  *    DLLNUM will change each time there are forward or backward changes
    259  *    in binary compatibility (e.g., when a new feature is added).
    260  *
    261258 * See libpng.txt or libpng.3 for more information.  The PNG specification
    262259 * is available as a W3C Recommendation and as an ISO/IEC Standard; see
     
    279276
    280277/* Version information for png.h - this should match the version in png.c */
    281 #define PNG_LIBPNG_VER_STRING "1.6.42"
     278#define PNG_LIBPNG_VER_STRING "1.6.43"
    282279#define PNG_HEADER_VERSION_STRING " libpng version " PNG_LIBPNG_VER_STRING "\n"
    283280
    284 #define PNG_LIBPNG_VER_SONUM   16
    285 #define PNG_LIBPNG_VER_DLLNUM  16
     281/* The versions of shared library builds should stay in sync, going forward */
     282#define PNG_LIBPNG_VER_SHAREDLIB 16
     283#define PNG_LIBPNG_VER_SONUM     PNG_LIBPNG_VER_SHAREDLIB /* [Deprecated] */
     284#define PNG_LIBPNG_VER_DLLNUM    PNG_LIBPNG_VER_SHAREDLIB /* [Deprecated] */
    286285
    287286/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
    288287#define PNG_LIBPNG_VER_MAJOR   1
    289288#define PNG_LIBPNG_VER_MINOR   6
    290 #define PNG_LIBPNG_VER_RELEASE 41
     289#define PNG_LIBPNG_VER_RELEASE 43
    291290
    292291/* This should be zero for a public release, or non-zero for a
    293  * development version.  [Deprecated]
     292 * development version.
    294293 */
    295294#define PNG_LIBPNG_VER_BUILD  0
     
    319318 * XXYYZZ, where XX=major, YY=minor, ZZ=release
    320319 */
    321 #define PNG_LIBPNG_VER 10641 /* 1.6.42 */
     320#define PNG_LIBPNG_VER 10643 /* 1.6.43 */
    322321
    323322/* Library configuration: these options cannot be changed after
     
    429428 * do not agree upon the version number.
    430429 */
    431 typedef char* png_libpng_version_1_6_42;
     430typedef char* png_libpng_version_1_6_43;
    432431
    433432/* Basic control structions.  Read libpng-manual.txt or libpng.3 for more info.
  • trunk/src/libs/libpng-1.6.43/pngconf.h

    r103316 r105469  
    22/* pngconf.h - machine-configurable file for libpng
    33 *
    4  * libpng version 1.6.42
     4 * libpng version 1.6.43
    55 *
    66 * Copyright (c) 2018-2024 Cosmin Truta
  • trunk/src/libs/libpng-1.6.43/pngpread.c

    r103316 r105469  
    296296
    297297#endif
     298#ifdef PNG_READ_eXIf_SUPPORTED
     299   else if (png_ptr->chunk_name == png_eXIf)
     300   {
     301      PNG_PUSH_SAVE_BUFFER_IF_FULL
     302      png_handle_eXIf(png_ptr, info_ptr, png_ptr->push_length);
     303   }
     304
     305#endif
    298306#ifdef PNG_READ_sRGB_SUPPORTED
    299307   else if (chunk_name == png_sRGB)
  • trunk/src/libs/libpng-1.6.43/pngread.c

    r103316 r105469  
    569569
    570570#ifdef PNG_READ_TRANSFORMS_SUPPORTED
    571    if (png_ptr->transformations || png_ptr->num_palette_max >= 0)
     571   if (png_ptr->transformations
     572#     ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
     573         || png_ptr->num_palette_max >= 0
     574#     endif
     575      )
    572576      png_do_read_transformations(png_ptr, &row_info);
    573577#endif
  • trunk/src/libs/libpng-1.6.43/pngrtran.c

    r103316 r105469  
    298298   output_gamma = translate_gamma_flags(png_ptr, output_gamma, 1/*screen*/);
    299299
    300    /* Validate the value to ensure it is in a reasonable range. The value
     300   /* Validate the value to ensure it is in a reasonable range.  The value
    301301    * is expected to be 1 or greater, but this range test allows for some
    302     * viewing correction values.  The intent is to weed out users of this API
    303     * who use the inverse of the gamma value accidentally!  Since some of these
    304     * values are reasonable this may have to be changed:
     302    * viewing correction values.  The intent is to weed out the API users
     303    * who might use the inverse of the gamma value accidentally!
    305304    *
    306     * 1.6.x: changed from 0.07..3 to 0.01..100 (to accommodate the optimal 16-bit
    307     * gamma of 36, and its reciprocal.)
     305    * In libpng 1.6.0, we changed from 0.07..3 to 0.01..100, to accommodate
     306    * the optimal 16-bit gamma of 36 and its reciprocal.
    308307    */
    309308   if (output_gamma < 1000 || output_gamma > 10000000)
     
    442441
    443442      png_ptr->quantize_index = (png_bytep)png_malloc(png_ptr,
    444           (png_alloc_size_t)((png_uint_32)num_palette * (sizeof (png_byte))));
     443          (png_alloc_size_t)num_palette);
    445444      for (i = 0; i < num_palette; i++)
    446445         png_ptr->quantize_index[i] = (png_byte)i;
     
    459458         /* Initialize an array to sort colors */
    460459         png_ptr->quantize_sort = (png_bytep)png_malloc(png_ptr,
    461              (png_alloc_size_t)((png_uint_32)num_palette * (sizeof (png_byte))));
     460             (png_alloc_size_t)num_palette);
    462461
    463462         /* Initialize the quantize_sort array */
     
    593592         /* Initialize palette index arrays */
    594593         png_ptr->index_to_palette = (png_bytep)png_malloc(png_ptr,
    595              (png_alloc_size_t)((png_uint_32)num_palette *
    596              (sizeof (png_byte))));
     594             (png_alloc_size_t)num_palette);
    597595         png_ptr->palette_to_index = (png_bytep)png_malloc(png_ptr,
    598              (png_alloc_size_t)((png_uint_32)num_palette *
    599              (sizeof (png_byte))));
     596             (png_alloc_size_t)num_palette);
    600597
    601598         /* Initialize the sort array */
     
    762759
    763760      png_ptr->palette_lookup = (png_bytep)png_calloc(png_ptr,
    764           (png_alloc_size_t)(num_entries * (sizeof (png_byte))));
    765 
    766       distance = (png_bytep)png_malloc(png_ptr, (png_alloc_size_t)(num_entries *
    767           (sizeof (png_byte))));
    768 
    769       memset(distance, 0xff, num_entries * (sizeof (png_byte)));
     761          (png_alloc_size_t)(num_entries));
     762
     763      distance = (png_bytep)png_malloc(png_ptr, (png_alloc_size_t)num_entries);
     764
     765      memset(distance, 0xff, num_entries);
    770766
    771767      for (i = 0; i < num_palette; i++)
  • trunk/src/libs/libpng-1.6.43/pngtest.c

    r103316 r105469  
    11
    2 /* pngtest.c - a simple test program to test libpng
     2/* pngtest.c - a test program for libpng
    33 *
    44 * Copyright (c) 2018-2024 Cosmin Truta
     
    3838#include <string.h>
    3939
    40 /* Defined so I can write to a file on gui/windowing platforms */
    41 /*  #define STDERR stderr  */
    42 #define STDERR stdout   /* For DOS */
     40#ifdef PNG_ZLIB_HEADER
     41#  include PNG_ZLIB_HEADER /* defined by pnglibconf.h from 1.7 */
     42#else
     43#  include <zlib.h>
     44#endif
    4345
    4446#include "png.h"
    4547
    46 /* Known chunks that exist in pngtest.png must be supported or pngtest will fail
    47  * simply as a result of re-ordering them.  This may be fixed in 1.7
     48/* Generate a compiler error if there is an old png.h in the search path. */
     49typedef png_libpng_version_1_6_43 Your_png_h_is_not_version_1_6_43;
     50
     51/* Ensure that all version numbers in png.h are consistent with one another. */
     52#if (PNG_LIBPNG_VER != PNG_LIBPNG_VER_MAJOR * 10000 + \
     53                       PNG_LIBPNG_VER_MINOR * 100 + \
     54                       PNG_LIBPNG_VER_RELEASE) || \
     55    (PNG_LIBPNG_VER_SHAREDLIB != PNG_LIBPNG_VER_MAJOR * 10 + \
     56                                 PNG_LIBPNG_VER_MINOR) || \
     57    (PNG_LIBPNG_VER_SHAREDLIB != PNG_LIBPNG_VER_SONUM) || \
     58    (PNG_LIBPNG_VER_SHAREDLIB != PNG_LIBPNG_VER_DLLNUM)
     59#  error "Inconsistent version numbers in png.h"
     60#endif
     61
     62/* In version 1.6.1, we added support for the configure test harness, which
     63 * uses 77 to indicate a skipped test. On the other hand, in cmake build tests,
     64 * we still need to succeed on a skipped test, so:
     65 */
     66#if defined(HAVE_CONFIG_H)
     67#  define SKIP 77
     68#else
     69#  define SKIP 0
     70#endif
     71
     72/* Known chunks that exist in pngtest.png must be supported, or pngtest will
     73 * fail simply as a result of re-ordering them.  This may be fixed in the next
     74 * generation of libpng.
    4875 *
    4976 * pngtest allocates a single row buffer for each row and overwrites it,
     
    5279 * horribly trying to write extra data after writing garbage).
    5380 */
    54 #if defined PNG_READ_SUPPORTED && /* else nothing can be done */\
    55    defined PNG_READ_bKGD_SUPPORTED &&\
    56    defined PNG_READ_cHRM_SUPPORTED &&\
    57    defined PNG_READ_gAMA_SUPPORTED &&\
    58    defined PNG_READ_oFFs_SUPPORTED &&\
    59    defined PNG_READ_pCAL_SUPPORTED &&\
    60    defined PNG_READ_pHYs_SUPPORTED &&\
    61    defined PNG_READ_sBIT_SUPPORTED &&\
    62    defined PNG_READ_sCAL_SUPPORTED &&\
    63    defined PNG_READ_sRGB_SUPPORTED &&\
    64    defined PNG_READ_sPLT_SUPPORTED &&\
    65    defined PNG_READ_tEXt_SUPPORTED &&\
    66    defined PNG_READ_tIME_SUPPORTED &&\
    67    defined PNG_READ_zTXt_SUPPORTED &&\
    68    (defined PNG_WRITE_INTERLACING_SUPPORTED || PNG_LIBPNG_VER >= 10700)
    69 
    70 #ifdef PNG_ZLIB_HEADER
    71 #  include PNG_ZLIB_HEADER /* defined by pnglibconf.h from 1.7 */
    72 #else
    73 #  include "zlib.h"
    74 #endif
     81#if defined PNG_READ_SUPPORTED && /* else nothing can be done */ \
     82    defined PNG_READ_bKGD_SUPPORTED && \
     83    defined PNG_READ_cHRM_SUPPORTED && \
     84    defined PNG_READ_gAMA_SUPPORTED && \
     85    defined PNG_READ_oFFs_SUPPORTED && \
     86    defined PNG_READ_pCAL_SUPPORTED && \
     87    defined PNG_READ_pHYs_SUPPORTED && \
     88    defined PNG_READ_sBIT_SUPPORTED && \
     89    defined PNG_READ_sCAL_SUPPORTED && \
     90    defined PNG_READ_sRGB_SUPPORTED && \
     91    defined PNG_READ_sPLT_SUPPORTED && \
     92    defined PNG_READ_tEXt_SUPPORTED && \
     93    defined PNG_READ_tIME_SUPPORTED && \
     94    defined PNG_READ_zTXt_SUPPORTED && \
     95    (defined PNG_WRITE_INTERLACING_SUPPORTED || PNG_LIBPNG_VER >= 10700)
    7596
    7697/* Copied from pngpriv.h but only used in error messages below. */
     
    7899#  define PNG_ZBUF_SIZE 8192
    79100#endif
    80 #define FCLOSE(file) fclose(file)
    81101
    82102#ifndef PNG_STDIO_SUPPORTED
    83 typedef FILE                * png_FILE_p;
    84 #endif
    85 
    86 /* Makes pngtest verbose so we can find problems. */
     103typedef FILE * png_FILE_p;
     104#endif
     105
     106/* This hack was introduced for historical reasons, and we are
     107 * still keeping it in libpng-1.6.x for compatibility reasons.
     108 */
     109#define STDERR stdout
     110
    87111#ifndef PNG_DEBUG
    88112#  define PNG_DEBUG 0
     
    90114
    91115#if PNG_DEBUG > 1
    92 #  define pngtest_debug(m)        ((void)fprintf(stderr, m "\n"))
    93 #  define pngtest_debug1(m,p1)    ((void)fprintf(stderr, m "\n", p1))
    94 #  define pngtest_debug2(m,p1,p2) ((void)fprintf(stderr, m "\n", p1, p2))
    95 #else
    96 #  define pngtest_debug(m)        ((void)0)
    97 #  define pngtest_debug1(m,p1)    ((void)0)
    98 #  define pngtest_debug2(m,p1,p2) ((void)0)
    99 #endif
    100 
    101 #if !PNG_DEBUG
    102 #  define SINGLE_ROWBUF_ALLOC  /* Makes buffer overruns easier to nail */
    103 #endif
    104 
    105 #ifndef PNG_UNUSED
    106 #  define PNG_UNUSED(param) (void)param;
     116#  define pngtest_debug(m)          ((void)fprintf(stderr, m "\n"))
     117#  define pngtest_debug1(m, p1)     ((void)fprintf(stderr, m "\n", p1))
     118#  define pngtest_debug2(m, p1, p2) ((void)fprintf(stderr, m "\n", p1, p2))
     119#elif PNG_DEBUG == 0 || PNG_DEBUG == 1
     120#  define pngtest_debug(m)          ((void)0)
     121#  define pngtest_debug1(m, p1)     ((void)0)
     122#  define pngtest_debug2(m, p1, p2) ((void)0)
     123#else /* PNG_DEBUG < 0 */
     124#  error "Bad PNG_DEBUG value"
    107125#endif
    108126
     
    121139
    122140#ifdef PNG_TIME_RFC1123_SUPPORTED
    123 #define PNG_tIME_STRING_LENGTH 29
    124141static int tIME_chunk_present = 0;
    125 static char tIME_string[PNG_tIME_STRING_LENGTH] = "tIME chunk is not present";
    126 
    127 #if PNG_LIBPNG_VER < 10619
    128 #define png_convert_to_rfc1123_buffer(ts, t) tIME_to_str(read_ptr, ts, t)
    129 
    130 static int
    131 tIME_to_str(png_structp png_ptr, png_charp ts, png_const_timep t)
    132 {
    133    png_const_charp str = png_convert_to_rfc1123(png_ptr, t);
    134 
    135    if (str == NULL)
    136        return 0;
    137 
    138    strcpy(ts, str);
    139    return 1;
    140 }
    141 #endif /* older libpng */
     142static char tIME_string[29] = "tIME chunk is not present";
     143/* This use case is deprecated.
     144 * See the declaration of png_convert_to_rfc1123_buffer for more details.
     145 */
    142146#endif
    143147
     
    150154static int warning_count = 0; /* count calls to png_warning */
    151155
    152 /* Define png_jmpbuf() in case we are using a pre-1.0.6 version of libpng */
    153 #ifndef png_jmpbuf
    154 #  define png_jmpbuf(png_ptr) png_ptr->jmpbuf
    155 #endif
    156 
    157 /* Defines for unknown chunk handling if required. */
    158 #ifndef PNG_HANDLE_CHUNK_ALWAYS
    159 #  define PNG_HANDLE_CHUNK_ALWAYS       3
    160 #endif
    161 #ifndef PNG_HANDLE_CHUNK_IF_SAFE
    162 #  define PNG_HANDLE_CHUNK_IF_SAFE      2
    163 #endif
    164 
    165 /* Utility to save typing/errors, the argument must be a name */
    166 #define MEMZERO(var) ((void)memset(&var, 0, sizeof var))
    167 
    168156/* Example of using row callbacks to make a simple progress meter */
    169157static int status_pass = 1;
     
    174162read_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass)
    175163{
    176    if (png_ptr == NULL || row_number > PNG_UINT_31_MAX)
    177       return;
     164   /* The callback should always receive correct parameters. */
     165   if (png_ptr == NULL)
     166      png_error(png_ptr, "read_row_callback: bad png_ptr");
     167   if (row_number > PNG_UINT_31_MAX)
     168      png_error(png_ptr, "read_row_callback: bad row number");
     169   if (pass < 0 || pass > 7)
     170      png_error(png_ptr, "read_row_callback: bad pass");
    178171
    179172   if (status_pass != pass)
     
    189182   {
    190183      fprintf(stdout, "\n         ");
    191       status_dots=30;
     184      status_dots = 30;
    192185   }
    193186
     
    199192write_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass)
    200193{
    201    if (png_ptr == NULL || row_number > PNG_UINT_31_MAX || pass > 7)
    202       return;
     194   /* The callback should always receive correct parameters. */
     195   if (png_ptr == NULL)
     196      png_error(png_ptr, "write_row_callback: bad png_ptr");
     197   if (row_number > PNG_UINT_31_MAX)
     198      png_error(png_ptr, "write_row_callback: bad row number");
     199   if (pass < 0 || pass > 7)
     200      png_error(png_ptr, "write_row_callback: bad pass");
    203201
    204202   fprintf(stdout, "w");
     
    213211read_user_callback(png_structp png_ptr, png_row_infop row_info, png_bytep data)
    214212{
    215    PNG_UNUSED(png_ptr)
    216    PNG_UNUSED(row_info)
    217    PNG_UNUSED(data)
     213   /* The callback should always receive correct parameters. */
     214   if (png_ptr == NULL)
     215      png_error(png_ptr, "read_user_callback: bad png_ptr");
     216   if (row_info == NULL)
     217      png_error(png_ptr, "read_user_callback: bad row info");
     218   if (data == NULL)
     219      png_error(png_ptr, "read_user_callback: bad data");
    218220}
    219221#endif
     
    230232{
    231233   png_bytep dp = data;
     234
     235   /* The callback should always receive correct parameters. */
    232236   if (png_ptr == NULL)
    233       return;
     237      png_error(png_ptr, "count_zero_samples: bad png_ptr");
     238   if (row_info == NULL)
     239      png_error(png_ptr, "count_zero_samples: bad row info");
     240   if (data == NULL)
     241      png_error(png_ptr, "count_zero_samples: bad data");
    234242
    235243   /* Contents of row_info:
     
    249257      png_uint_32 n, nstop;
    250258
    251       for (n = 0, nstop=row_info->width; n<nstop; n++)
     259      for (n = 0, nstop = row_info->width; n < nstop; n++)
    252260      {
    253261         if (row_info->bit_depth == 1)
     
    295303            if ((*dp | *(dp+1)) == 0)
    296304               zero_samples++;
    297             dp+=2;
     305            dp += 2;
    298306         }
    299307      }
     
    307315         color_channels--;
    308316
    309       for (n = 0, nstop=row_info->width; n<nstop; n++)
     317      for (n = 0, nstop = row_info->width; n < nstop; n++)
    310318      {
    311319         for (channel = 0; channel < color_channels; channel++)
     
    320328                  zero_samples++;
    321329
    322                dp+=2;
     330               dp += 2;
    323331            }
    324332         }
     
    347355void
    348356pngtest_check_io_state(png_structp png_ptr, size_t data_length,
    349     png_uint_32 io_op);
    350 void
    351 pngtest_check_io_state(png_structp png_ptr, size_t data_length,
    352357    png_uint_32 io_op)
    353358{
     
    362367    * (file signature / header / data / crc) is as expected.
    363368    */
    364    switch (io_state & PNG_IO_MASK_LOC)
     369   switch ((io_state & PNG_IO_MASK_LOC) != 0)
    365370   {
    366371   case PNG_IO_SIGNATURE:
     
    392397   png_voidp io_ptr;
    393398
     399   if (png_ptr == NULL)
     400      png_error(png_ptr, "pngtest_read_data: bad png_ptr");
     401
    394402   /* fread() returns 0 on error, so it is OK to store this in a size_t
    395403    * instead of an int, which is what fread() actually returns.
     
    397405   io_ptr = png_get_io_ptr(png_ptr);
    398406   if (io_ptr != NULL)
    399    {
    400407      check = fread(data, 1, length, (png_FILE_p)io_ptr);
    401    }
    402408
    403409   if (check != length)
    404    {
    405410      png_error(png_ptr, "Read Error");
    406    }
    407411
    408412#ifdef PNG_IO_STATE_SUPPORTED
     
    415419pngtest_flush(png_structp png_ptr)
    416420{
     421   if (png_ptr == NULL)
     422      png_error(png_ptr, "pngtest_flush: bad png_ptr");
     423
    417424   /* Do nothing; fflush() is said to be just a waste of energy. */
    418    PNG_UNUSED(png_ptr)   /* Stifle compiler warning */
    419425}
    420426#endif
     
    430436   size_t check;
    431437
     438   if (png_ptr == NULL)
     439      png_error(png_ptr, "pngtest_write_data: bad png_ptr");
     440
    432441   check = fwrite(data, 1, length, (png_FILE_p)png_get_io_ptr(png_ptr));
    433442
    434443   if (check != length)
    435    {
    436444      png_error(png_ptr, "Write Error");
    437    }
    438445
    439446#ifdef PNG_IO_STATE_SUPPORTED
     
    538545      current_allocation += size;
    539546      total_allocation += size;
    540       num_allocations ++;
     547      ++num_allocations;
    541548
    542549      if (current_allocation > maximum_allocation)
     
    636643chunk used in ImageMagick to store "virtual page" size).  */
    637644
    638 static struct user_chunk_data
     645typedef struct user_chunk_info_def
    639646{
    640647   png_const_infop info_ptr;
     
    643650   png_byte        sTER_mode;
    644651   int             location[2];
    645 }
    646 user_chunk_data;
     652} user_chunk_info;
    647653
    648654/* Used for location and order; zero means nothing. */
     
    654660
    655661static void
    656 init_callback_info(png_const_infop info_ptr)
    657 {
    658    MEMZERO(user_chunk_data);
    659    user_chunk_data.info_ptr = info_ptr;
     662init_user_chunk_info(png_const_infop info_ptr, user_chunk_info *chunk_data)
     663{
     664   memset(chunk_data, 0, sizeof(*chunk_data));
     665   chunk_data->info_ptr = info_ptr;
    660666}
    661667
    662668static int
    663 set_location(png_structp png_ptr, struct user_chunk_data *data, int what)
     669set_chunk_location(png_structp png_ptr, user_chunk_info *chunk_data, int what)
    664670{
    665671   int location;
    666672
    667    if ((data->location[0] & what) != 0 || (data->location[1] & what) != 0)
    668       return 0; /* already have one of these */
     673   if ((chunk_data->location[0] & what) != 0 ||
     674       (chunk_data->location[1] & what) != 0)
     675      return 0; /* we already have one of these */
    669676
    670677   /* Find where we are (the code below zeroes info_ptr to indicate that the
    671678    * chunks before the first IDAT have been read.)
    672679    */
    673    if (data->info_ptr == NULL) /* after IDAT */
     680   if (chunk_data->info_ptr == NULL) /* after IDAT */
    674681      location = what | after_IDAT;
    675682
    676    else if (png_get_valid(png_ptr, data->info_ptr, PNG_INFO_PLTE) != 0)
     683   else if (png_get_valid(png_ptr, chunk_data->info_ptr, PNG_INFO_PLTE) != 0)
    677684      location = what | before_IDAT;
    678685
     
    680687      location = what | before_PLTE;
    681688
    682    if (data->location[0] == 0)
    683       data->location[0] = location;
     689   if (chunk_data->location[0] == 0)
     690      chunk_data->location[0] = location;
    684691
    685692   else
    686       data->location[1] = location;
     693      chunk_data->location[1] = location;
    687694
    688695   return 1; /* handled */
     
    692699read_user_chunk_callback(png_struct *png_ptr, png_unknown_chunkp chunk)
    693700{
    694    struct user_chunk_data *my_user_chunk_data =
    695       (struct user_chunk_data*)png_get_user_chunk_ptr(png_ptr);
     701   user_chunk_info *my_user_chunk_data =
     702      (user_chunk_info*)png_get_user_chunk_ptr(png_ptr);
    696703
    697704   if (my_user_chunk_data == NULL)
    698       png_error(png_ptr, "lost user chunk pointer");
     705      png_error(png_ptr, "lost pointer to user chunk data");
    699706
    700707   /* Return one of the following:
     
    721728            return -1;  /* Invalid mode */
    722729
    723          if (set_location(png_ptr, my_user_chunk_data, have_sTER) != 0)
    724          {
    725             my_user_chunk_data->sTER_mode=chunk->data[0];
     730         if (set_chunk_location(png_ptr, my_user_chunk_data, have_sTER) != 0)
     731         {
     732            my_user_chunk_data->sTER_mode = chunk->data[0];
    726733            return 1;
    727734         }
     
    740747      return -1; /* Error return */
    741748
    742    if (set_location(png_ptr, my_user_chunk_data, have_vpAg) == 0)
     749   if (set_chunk_location(png_ptr, my_user_chunk_data, have_vpAg) == 0)
    743750      return 0;  /* duplicate vpAg */
    744751
     
    752759#ifdef PNG_WRITE_SUPPORTED
    753760static void
    754 write_sTER_chunk(png_structp write_ptr)
     761write_sTER_chunk(png_structp write_ptr, user_chunk_info *data)
    755762{
    756763   png_byte sTER[5] = {115,  84,  69,  82, '\0'};
    757764
    758765   if (verbose != 0)
    759       fprintf(STDERR, "\n stereo mode = %d\n", user_chunk_data.sTER_mode);
    760 
    761    png_write_chunk(write_ptr, sTER, &user_chunk_data.sTER_mode, 1);
     766      fprintf(STDERR, "\n stereo mode = %d\n", data->sTER_mode);
     767
     768   png_write_chunk(write_ptr, sTER, &data->sTER_mode, 1);
    762769}
    763770
    764771static void
    765 write_vpAg_chunk(png_structp write_ptr)
     772write_vpAg_chunk(png_structp write_ptr, user_chunk_info *data)
    766773{
    767774   png_byte vpAg[5] = {118, 112,  65, 103, '\0'};
     
    771778   if (verbose != 0)
    772779      fprintf(STDERR, " vpAg = %lu x %lu, units = %d\n",
    773           (unsigned long)user_chunk_data.vpAg_width,
    774           (unsigned long)user_chunk_data.vpAg_height,
    775           user_chunk_data.vpAg_units);
    776 
    777    png_save_uint_32(vpag_chunk_data, user_chunk_data.vpAg_width);
    778    png_save_uint_32(vpag_chunk_data + 4, user_chunk_data.vpAg_height);
    779    vpag_chunk_data[8] = user_chunk_data.vpAg_units;
     780          (unsigned long)data->vpAg_width,
     781          (unsigned long)data->vpAg_height,
     782          data->vpAg_units);
     783
     784   png_save_uint_32(vpag_chunk_data, data->vpAg_width);
     785   png_save_uint_32(vpag_chunk_data + 4, data->vpAg_height);
     786   vpag_chunk_data[8] = data->vpAg_units;
    780787   png_write_chunk(write_ptr, vpAg, vpag_chunk_data, 9);
    781788}
    782789
    783790static void
    784 write_chunks(png_structp write_ptr, int location)
     791write_chunks(png_structp write_ptr, user_chunk_info *data, int location)
    785792{
    786793   int i;
     
    792799    * about - the chunks should not be duplicated!
    793800    */
    794    for (i=0; i<2; ++i)
    795    {
    796       if (user_chunk_data.location[i] == (location | have_sTER))
    797          write_sTER_chunk(write_ptr);
    798 
    799       else if (user_chunk_data.location[i] == (location | have_vpAg))
    800          write_vpAg_chunk(write_ptr);
     801   for (i = 0; i < 2; ++i)
     802   {
     803      if (data->location[i] == (location | have_sTER))
     804         write_sTER_chunk(write_ptr, data);
     805
     806      else if (data->location[i] == (location | have_vpAg))
     807         write_vpAg_chunk(write_ptr, data);
    801808   }
    802809}
     
    873880   png_uint_32 y;
    874881   png_uint_32 width, height;
    875    volatile int num_passes;
    876    int pass;
    877882   int bit_depth, color_type;
     883   user_chunk_info my_user_chunk_data;
     884   int pass, num_passes;
    878885
    879886   row_buf = NULL;
     
    889896   {
    890897      fprintf(STDERR, "Could not open output file %s\n", outname);
    891       FCLOSE(fpin);
     898      fclose(fpin);
    892899      return 1;
    893900   }
     
    926933
    927934#ifdef PNG_READ_USER_CHUNKS_SUPPORTED
    928    init_callback_info(read_info_ptr);
    929    png_set_read_user_chunk_fn(read_ptr, &user_chunk_data,
     935   init_user_chunk_info(read_info_ptr, &my_user_chunk_data);
     936   png_set_read_user_chunk_fn(read_ptr, &my_user_chunk_data,
    930937       read_user_chunk_callback);
    931938#endif
     
    947954      png_destroy_write_struct(&write_ptr, &write_info_ptr);
    948955#endif
    949       FCLOSE(fpin);
    950       FCLOSE(fpout);
     956      fclose(fpin);
     957      fclose(fpout);
    951958      return 1;
    952959   }
     
    967974      png_destroy_info_struct(write_ptr, &write_end_info_ptr);
    968975      png_destroy_write_struct(&write_ptr, &write_info_ptr);
    969       FCLOSE(fpin);
    970       FCLOSE(fpout);
     976      fclose(fpin);
     977      fclose(fpout);
    971978      return 1;
    972979   }
     
    10541061
    10551062#ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED
    1056    /* Preserve all the unknown chunks, if possible.  If this is disabled then,
     1063   /* Preserve all the unknown chunks, if possible.  If this is disabled, then
    10571064    * even if the png_{get,set}_unknown_chunks stuff is enabled, we can't use
    10581065    * libpng to *save* the unknown chunks on read (because we can't switch the
    10591066    * save option on!)
    10601067    *
    1061     * Notice that if SET_UNKNOWN_CHUNKS is *not* supported read will discard all
    1062     * unknown chunks and write will write them all.
     1068    * Notice that if SET_UNKNOWN_CHUNKS is *not* supported, the reader will
     1069    * discard all unknown chunks, and the writer will write them all.
    10631070    */
    10641071#ifdef PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED
     
    10811088    * PLTE) here to indicate that we are after the IDAT.
    10821089    */
    1083    user_chunk_data.info_ptr = NULL;
     1090   my_user_chunk_data.info_ptr = NULL;
    10841091#endif
    10851092
     
    11971204
    11981205      if (png_get_bKGD(read_ptr, read_info_ptr, &background) != 0)
    1199       {
    12001206         png_set_bKGD(write_ptr, write_info_ptr, background);
    1201       }
    12021207   }
    12031208#endif
    12041209#ifdef PNG_READ_eXIf_SUPPORTED
    12051210   {
    1206       png_bytep exif=NULL;
     1211      png_bytep exif = NULL;
    12071212      png_uint_32 exif_length;
    12081213
     
    12331238      if (png_get_oFFs(read_ptr, read_info_ptr, &offset_x, &offset_y,
    12341239          &unit_type) != 0)
    1235       {
    12361240         png_set_oFFs(write_ptr, write_info_ptr, offset_x, offset_y, unit_type);
    1237       }
    12381241   }
    12391242#endif
     
    12471250      if (png_get_pCAL(read_ptr, read_info_ptr, &purpose, &X0, &X1, &type,
    12481251          &nparams, &units, &params) != 0)
    1249       {
    12501252         png_set_pCAL(write_ptr, write_info_ptr, purpose, X0, X1, type,
    12511253             nparams, units, params);
    1252       }
    12531254   }
    12541255#endif
     
    12801281      if (png_get_sCAL(read_ptr, read_info_ptr, &unit, &scal_width,
    12811282          &scal_height) != 0)
    1282       {
    12831283         png_set_sCAL(write_ptr, write_info_ptr, unit, scal_width, scal_height);
    1284       }
    12851284   }
    12861285#else
     
    13051304       png_sPLT_tp entries;
    13061305
    1307        int num_entries = (int) png_get_sPLT(read_ptr, read_info_ptr, &entries);
    1308        if (num_entries)
    1309        {
     1306       int num_entries = png_get_sPLT(read_ptr, read_info_ptr, &entries);
     1307       if (num_entries != 0)
    13101308           png_set_sPLT(write_ptr, write_info_ptr, entries, num_entries);
    1311        }
    13121309   }
    13131310#endif
     
    13291326
    13301327            fprintf(STDERR,"\n");
    1331             for (i=0; i<num_text; i++)
     1328            for (i = 0; i < num_text; i++)
    13321329            {
    13331330               fprintf(STDERR,"   Text compression[%d]=%d\n",
     
    13911388
    13921389      if (num_unknowns != 0)
    1393       {
    13941390         png_set_unknown_chunks(write_ptr, write_info_ptr, unknowns,
    13951391             num_unknowns);
    1396 #if PNG_LIBPNG_VER < 10600
    1397          /* Copy the locations from the read_info_ptr.  The automatically
    1398           * generated locations in write_end_info_ptr are wrong prior to 1.6.0
    1399           * because they are reset from the write pointer (removed in 1.6.0).
    1400           */
    1401          {
    1402             int i;
    1403             for (i = 0; i < num_unknowns; i++)
    1404               png_set_unknown_chunk_location(write_ptr, write_info_ptr, i,
    1405                   unknowns[i].location);
    1406          }
    1407 #endif
    1408       }
    14091392   }
    14101393#endif
     
    14181401   png_write_info_before_PLTE(write_ptr, write_info_ptr);
    14191402
    1420    write_chunks(write_ptr, before_PLTE); /* before PLTE */
     1403   write_chunks(write_ptr, &my_user_chunk_data, before_PLTE); /* before PLTE */
    14211404
    14221405   png_write_info(write_ptr, write_info_ptr);
    14231406
    1424    write_chunks(write_ptr, before_IDAT); /* after PLTE */
     1407   write_chunks(write_ptr, &my_user_chunk_data, before_IDAT); /* after PLTE */
    14251408
    14261409   png_write_info(write_ptr, write_end_info_ptr);
    14271410
    1428    write_chunks(write_ptr, after_IDAT); /* after IDAT */
     1411   write_chunks(write_ptr, &my_user_chunk_data, after_IDAT); /* after IDAT */
    14291412
    14301413#ifdef PNG_COMPRESSION_COMPAT
     
    14341417#endif
    14351418
    1436 #ifdef SINGLE_ROWBUF_ALLOC
    1437    pngtest_debug("Allocating row buffer...");
    1438    row_buf = (png_bytep)png_malloc(read_ptr,
    1439        png_get_rowbytes(read_ptr, read_info_ptr));
    1440 
    1441    pngtest_debug1("\t%p", row_buf);
    1442 #endif /* SINGLE_ROWBUF_ALLOC */
    14431419   pngtest_debug("Writing row data");
    14441420
     
    14871463      for (y = 0; y < pass_height; y++)
    14881464      {
    1489 #ifndef SINGLE_ROWBUF_ALLOC
    14901465         pngtest_debug2("Allocating row buffer (pass %d, y = %u)...", pass, y);
    14911466
     
    14961471             (unsigned long)png_get_rowbytes(read_ptr, read_info_ptr));
    14971472
    1498 #endif /* !SINGLE_ROWBUF_ALLOC */
    14991473         png_read_rows(read_ptr, (png_bytepp)&row_buf, NULL, 1);
    15001474
     
    15131487#endif /* WRITE */
    15141488
    1515 #ifndef SINGLE_ROWBUF_ALLOC
    15161489         pngtest_debug2("Freeing row buffer (pass %d, y = %u)", pass, y);
    15171490         png_free(read_ptr, row_buf);
    15181491         row_buf = NULL;
    1519 #endif /* !SINGLE_ROWBUF_ALLOC */
    15201492      }
    15211493   }
     
    15491521
    15501522            fprintf(STDERR,"\n");
    1551             for (i=0; i<num_text; i++)
     1523            for (i = 0; i < num_text; i++)
    15521524            {
    15531525               fprintf(STDERR,"   Text compression[%d]=%d\n",
     
    15621534#ifdef PNG_READ_eXIf_SUPPORTED
    15631535   {
    1564       png_bytep exif=NULL;
     1536      png_bytep exif = NULL;
    15651537      png_uint_32 exif_length;
    15661538
     
    16051577
    16061578      if (num_unknowns != 0)
    1607       {
    16081579         png_set_unknown_chunks(write_ptr, write_end_info_ptr, unknowns,
    16091580             num_unknowns);
    1610 #if PNG_LIBPNG_VER < 10600
    1611          /* Copy the locations from the read_info_ptr.  The automatically
    1612           * generated locations in write_end_info_ptr are wrong prior to 1.6.0
    1613           * because they are reset from the write pointer (removed in 1.6.0).
    1614           */
    1615          {
    1616             int i;
    1617             for (i = 0; i < num_unknowns; i++)
    1618               png_set_unknown_chunk_location(write_ptr, write_end_info_ptr, i,
    1619                   unknowns[i].location);
    1620          }
    1621 #endif
    1622       }
    16231581   }
    16241582#endif
     
    16391597    * after IDAT.
    16401598    */
    1641    write_chunks(write_ptr, after_IDAT);
     1599   write_chunks(write_ptr, &my_user_chunk_data, after_IDAT);
    16421600
    16431601   png_write_end(write_ptr, write_end_info_ptr);
     
    16561614
    16571615   pngtest_debug("Destroying data structs");
    1658 #ifdef SINGLE_ROWBUF_ALLOC
    1659    pngtest_debug("Destroying row_buf for read_ptr");
    1660    png_free(read_ptr, row_buf);
    1661    row_buf = NULL;
    1662 #endif /* SINGLE_ROWBUF_ALLOC */
    16631616   pngtest_debug("Destroying read_ptr, read_info_ptr, end_info_ptr");
    16641617   png_destroy_read_struct(&read_ptr, &read_info_ptr, &end_info_ptr);
     
    16711624   pngtest_debug("Destruction complete.");
    16721625
    1673    FCLOSE(fpin);
    1674    FCLOSE(fpout);
     1626   fclose(fpin);
     1627   fclose(fpout);
    16751628
    16761629   /* Summarize any warnings or errors and in 'strict' mode fail the test.
     
    17181671   {
    17191672      fprintf(STDERR, "Could not find file %s\n", outname);
    1720       FCLOSE(fpin);
     1673      fclose(fpin);
    17211674      return 1;
    17221675   }
     
    17541707            }
    17551708
    1756             FCLOSE(fpin);
    1757             FCLOSE(fpout);
     1709            fclose(fpin);
     1710            fclose(fpout);
    17581711
    17591712            if (strict != 0 && unsupported_chunks == 0)
     
    17861739            }
    17871740
    1788             FCLOSE(fpin);
    1789             FCLOSE(fpout);
     1741            fclose(fpin);
     1742            fclose(fpout);
    17901743
    17911744            /* NOTE: the unsupported_chunks escape is permitted here because
     
    18041757#endif /* WRITE && WRITE_FILTER */
    18051758
    1806    FCLOSE(fpin);
    1807    FCLOSE(fpout);
     1759   fclose(fpin);
     1760   fclose(fpout);
    18081761
    18091762   return 0;
     
    18521805#endif
    18531806
    1854    if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING))
    1855    {
    1856       fprintf(STDERR,
    1857           "Warning: versions are different between png.h and png.c\n");
    1858       fprintf(STDERR, "  png.h version: %s\n", PNG_LIBPNG_VER_STRING);
    1859       fprintf(STDERR, "  png.c version: %s\n\n", png_libpng_ver);
     1807   if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0)
     1808   {
     1809      fprintf(STDERR, "Warning: mismatching versions of png.h and png.c\n");
     1810      fprintf(STDERR, "  png.h version string: %s\n", PNG_LIBPNG_VER_STRING);
     1811      fprintf(STDERR, "  png.c version string: %s\n\n", png_libpng_ver);
    18601812      ++ierror;
    18611813   }
     
    18911843         strict++;
    18921844         relaxed = 0;
    1893          multiple=1;
     1845         multiple = 1;
    18941846      }
    18951847
     
    19011853         strict = 0;
    19021854         relaxed++;
    1903          multiple=1;
     1855         multiple = 1;
    19041856      }
    19051857      else if (strcmp(argv[1], "--xfail") == 0)
     
    19111863         xfail++;
    19121864         relaxed++;
    1913          multiple=1;
     1865         multiple = 1;
    19141866      }
    19151867
     
    19431895      int allocation_now = current_allocation;
    19441896#endif
    1945       for (i=2; i<argc; ++i)
     1897      for (i = 2; i < argc; ++i)
    19461898      {
    19471899         int kerror;
     
    20141966   {
    20151967      int i;
    2016       for (i = 0; i<3; ++i)
     1968      for (i = 0; i < 3; ++i)
    20171969      {
    20181970         int kerror;
     
    21422094   png_destroy_read_struct(&dummy_ptr, NULL, NULL);
    21432095
    2144    return (int)(ierror != 0);
     2096   return (ierror != 0);
    21452097}
    21462098#else
     
    21512103       " test ignored because libpng was not built with read support\n");
    21522104   /* And skip this test */
    2153    return PNG_LIBPNG_VER < 10600 ? 0 : 77;
     2105   return SKIP;
    21542106}
    21552107#endif
    2156 
    2157 /* Generate a compiler error if there is an old png.h in the search path. */
    2158 typedef png_libpng_version_1_6_42 Your_png_h_is_not_version_1_6_42;
  • trunk/src/libs/libpng-1.6.43/scripts/checksym.awk

    r103316 r105469  
    107107END{
    108108   if (symbolo > lasto) {
    109       print "highest symbol ordinal in png.h,", symbolo ", exceeds last ordinal from png.h", lasto
     109      print "highest symbol ordinal in png.h,",
     110            symbolo ", exceeds last ordinal from png.h", lasto
    110111      err = 1
    111112   }
    112113   if (mastero > lasto) {
    113       print "highest symbol ordinal in", master ",", mastero ", exceeds last ordinal from png.h", lasto
     114      print "highest symbol ordinal in", master ",",
     115            mastero ", exceeds last ordinal from png.h", lasto
    114116      err = 1
    115117   }
     
    150152      }
    151153      if (symbol[o] != "" && removed[o] != "") {
    152          print "png.h: symbol", o, "both exported as '" symbol[o] "' and removed as '" removed[o] "'"
     154         print "png.h: symbol", o,
     155               "both exported as '" symbol[o] "' and removed as '" removed[o] "'"
    153156         err = 1
    154157      } else if (symbol[o] != official[o]) {
     
    156159         err = 1
    157160         if (symbol[o] == "")
    158             print "png.h: symbol", o, "is exported as '" official[o] "' in", master
     161            print "png.h: symbol", o,
     162                  "is exported as '" official[o] "' in", master
    159163         else if (official[o] == "")
    160             print "png.h: exported symbol", o, "'" symbol[o] "' not present in", master
     164            print "png.h: exported symbol", o,
     165                  "'" symbol[o] "' not present in", master
    161166         else
    162             print "png.h: exported symbol", o, "'" symbol[o] "' exists as '" official[o] "' in", master
     167            print "png.h: exported symbol", o,
     168                  "'" symbol[o] "' exists as '" official[o] "' in", master
    163169      }
    164170
  • trunk/src/libs/libpng-1.6.43/scripts/libpng-config-head.in

    r103316 r105469  
    1212# Modeled after libxml-config.
    1313
    14 version=1.6.42
     14version=1.6.43
    1515prefix=""
    1616libdir=""
  • trunk/src/libs/libpng-1.6.43/scripts/libpng.pc.in

    r103316 r105469  
    66Name: libpng
    77Description: Loads and saves PNG files
    8 Version: 1.6.42
     8Version: 1.6.43
    99Libs: -L${libdir} -lpng16
    1010Cflags: -I${includedir}
  • trunk/src/libs/libpng-1.6.43/scripts/makefile.32sunu

    r103316 r105469  
    11# makefile for libpng on Solaris 2.x with cc
    22# Contributed by William L. Sebok, based on makefile.linux
    3 # Copyright (C) 2020-2022 Cosmin Truta
     3# Copyright (C) 2020-2024 Cosmin Truta
    44# Copyright (C) 2002, 2006, 2010-2014 Glenn Randers-Pehrson
    55# Copyright (C) 1998 Greg Roelofs
     
    2020# Utilities:
    2121CC=cc
    22 AR_RC=ar rc
     22AR=ar
    2323RANLIB=echo
    24 MKDIR_P=mkdir -p
    2524LN_SF=ln -f -s
    2625RM_F=/bin/rm -f
     
    4342CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
    4443CFLAGS=$(SUN_CC_FLAGS) # $(WARNMORE) -g
     44ARFLAGS=rc
    4545LDFLAGS=$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) libpng.a -lz -lm
    4646
     
    6666
    6767libpng.a: $(OBJS)
    68         $(AR_RC) $@ $(OBJS)
     68        $(AR) $(ARFLAGS) $@ $(OBJS)
    6969        $(RANLIB) $@
    7070
  • trunk/src/libs/libpng-1.6.43/scripts/makefile.64sunu

    r103316 r105469  
    11# makefile for libpng on Solaris 2.x with cc
    22# Contributed by William L. Sebok, based on makefile.linux
    3 # Copyright (C) 2020-2022 Cosmin Truta
     3# Copyright (C) 2020-2024 Cosmin Truta
    44# Copyright (C) 2002, 2006, 2010-2014 Glenn Randers-Pehrson
    55# Copyright (C) 1998 Greg Roelofs
     
    2020# Utilities:
    2121CC=cc
    22 AR_RC=ar rc
     22AR=ar
    2323RANLIB=echo
    24 MKDIR_P=mkdir -p
    2524LN_SF=ln -f -s
    2625RM_F=/bin/rm -f
     
    4241        -Wstrict-prototypes -Wmissing-prototypes # -Wconversion
    4342CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
    44 CFLAGS= $(SUN_CC_FLAGS) # $(WARNMORE) -g
     43CFLAGS=$(SUN_CC_FLAGS) # $(WARNMORE) -g
     44ARFLAGS=rc
    4545LDFLAGS=-L. -R. $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm
    4646
     
    6666
    6767libpng.a: $(OBJS)
    68         $(AR_RC) $@ $(OBJS)
     68        $(AR) $(ARFLAGS) $@ $(OBJS)
    6969        $(RANLIB) $@
    7070
  • trunk/src/libs/libpng-1.6.43/scripts/makefile.aix

    r103316 r105469  
    11# makefile for libpng using gcc (generic, static library)
    2 # Copyright (C) 2000, 2022 Cosmin Truta
     2# Copyright (C) 2000, 2020-2024 Cosmin Truta
    33# Copyright (C) 2002, 2006-2009, 2014 Glenn Randers-Pehrson
    44# Copyright (C) 2000 Marc O. Gloor (AIX support added, from makefile.gcc)
     
    1616CC = gcc
    1717LD = $(CC)
    18 AR_RC = ar rcs
     18AR = ar
    1919RANLIB = ranlib
    20 MKDIR_P = mkdir -p
    2120RM_F = rm -f
    2221
     
    2726CPPFLAGS = -I$(ZLIBINC) # -DPNG_DEBUG=5
    2827CFLAGS = -O2 -Wall -Wextra -Wundef # $(WARNMORE) -g
     28ARFLAGS = rc
    2929LDFLAGS = -L. -L$(ZLIBLIB) -lpng16 -lz -lm # -g
    3030
     
    4545
    4646$(LIBNAME).a: $(OBJS)
    47         $(AR_RC) $@ $(OBJS)
     47        $(AR) $(ARFLAGS) $@ $(OBJS)
    4848        $(RANLIB) $@
    4949
  • trunk/src/libs/libpng-1.6.43/scripts/makefile.amiga

    r103316 r105469  
    2727# library (.lib) file creation command
    2828AR= oml
    29 # make directory command
    30 MKDIR= makedir
    3129
    3230# Pre-built configuration
  • trunk/src/libs/libpng-1.6.43/scripts/makefile.beos

    r103316 r105469  
    11# makefile for libpng on BeOS x86 ELF with gcc
    22# modified from makefile.linux by Sander Stoks
    3 # Copyright (C) 2020-2022 Cosmin Truta
     3# Copyright (C) 2020-2024 Cosmin Truta
    44# Copyright (C) 2002, 2006, 2008, 2010-2014 Glenn Randers-Pehrson
    55# Copyright (C) 1999 Greg Roelofs
     
    2020# Utilities:
    2121CC=gcc
    22 AR_RC=ar rc
     22AR=ar
    2323RANLIB=ranlib
    24 MKDIR_P=mkdir -p
    2524LN_SF=ln -sf
    2625CP=cp
     
    4342CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
    4443CFLAGS=-O1 -funroll-loops $(ALIGN) -Wall -Wextra -Wundef # $(WARNMORE) -g
     44ARFLAGS=rc
    4545# LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz
    4646LDFLAGS=-L. -Wl,-soname=$(LIBSOMAJ) -L$(ZLIBLIB) -lz # -g
     
    6767
    6868libpng.a: $(OBJS)
    69         $(AR_RC) $@ $(OBJS)
     69        $(AR) $(ARFLAGS) $@ $(OBJS)
    7070        $(RANLIB) $@
    7171
  • trunk/src/libs/libpng-1.6.43/scripts/makefile.clang

    r103316 r105469  
    11# makefile for libpng using clang (generic, static library)
    2 # Copyright (C) 2000, 2014, 2019-2022 Cosmin Truta
     2# Copyright (C) 2000, 2014, 2019-2024 Cosmin Truta
    33# Copyright (C) 2008, 2014 Glenn Randers-Pehrson
    44# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
     
    1515CC = clang
    1616LD = $(CC)
    17 AR_RC = ar rcs
     17AR = ar
    1818RANLIB = ranlib
    1919CP = cp
     
    2929CPPFLAGS = -I$(ZLIBINC) $(DEFS) # -DPNG_DEBUG=5
    3030CFLAGS = -O2 -Wall -Wextra -Wundef # $(WARNMORE) -g
     31ARFLAGS = rc
    3132LDFLAGS = -L$(ZLIBLIB) # -g
    3233LIBS = -lz -lm
     
    6162
    6263libpng.a: $(OBJS)
    63         $(AR_RC) $@ $(OBJS)
     64        $(AR) $(ARFLAGS) $@ $(OBJS)
    6465        $(RANLIB) $@
    6566
  • trunk/src/libs/libpng-1.6.43/scripts/makefile.darwin

    r103316 r105469  
    11# makefile for libpng on Darwin / macOS
    2 # Copyright (C) 2020-2022 Cosmin Truta
     2# Copyright (C) 2020-2024 Cosmin Truta
    33# Copyright (C) 2002, 2004, 2006, 2008, 2010-2014 Glenn Randers-Pehrson
    44# Copyright (C) 2001 Christoph Pfisterer
     
    2525# Utilities:
    2626CC=cc
    27 AR_RC=ar rc
     27AR=ar
    2828RANLIB=ranlib
    29 MKDIR_P=mkdir -p
    3029LN_SF=ln -sf
    3130CP=cp
     
    3736CPPFLAGS=-I$(ZLIBINC) $(DEFS)
    3837CFLAGS=-O3 -funroll-loops -Wall -Wextra -Wundef
     38ARFLAGS=rc
    3939LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz
    4040
     
    6464
    6565libpng.a: $(OBJS)
    66         $(AR_RC) $@ $(OBJS)
     66        $(AR) $(ARFLAGS) $@ $(OBJS)
    6767        $(RANLIB) $@
    6868
  • trunk/src/libs/libpng-1.6.43/scripts/makefile.dec

    r103316 r105469  
    11# makefile for libpng on DEC Alpha Unix
    2 # Copyright (C) 2020-2022 Cosmin Truta
     2# Copyright (C) 2020-2024 Cosmin Truta
    33# Copyright (C) 2000-2002, 2006, 2010-2014 Glenn Randers-Pehrson
    44# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
     
    1818# Utilities:
    1919CC=cc
    20 AR_RC=ar rc
     20AR=ar
    2121RANLIB=ranlib
    22 MKDIR_P=mkdir
    2322LN_SF=ln -f -s
    2423CP=cp
     
    3332CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
    3433CFLAGS=-std -w1 -O # -g
     34ARFLAGS=rc
    3535LDFLAGS=-L$(ZLIBLIB) -rpath $(ZLIBLIB) libpng.a -lz -lm
    3636
     
    5252
    5353libpng.a: $(OBJS)
    54         $(AR_RC) $@ $(OBJS)
     54        $(AR) $(ARFLAGS) $@ $(OBJS)
    5555        $(RANLIB) $@
    5656
  • trunk/src/libs/libpng-1.6.43/scripts/makefile.dj2

    r103316 r105469  
    11# DJGPP (DOS gcc) makefile for libpng
    2 # Copyright (C) 2020-2022 Cosmin Truta
     2# Copyright (C) 2020-2024 Cosmin Truta
    33# Copyright (C) 2002, 2006, 2009-2014 Glenn Randers-Pehrson
    44# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
     
    99
    1010CC=gcc
     11AR=ar
     12RANLIB=ranlib
    1113CPPFLAGS=-I../zlib -DPNG_NO_SNPRINTF
    1214CFLAGS=-O
     15ARFLAGS=rc
    1316LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
    1417
     
    3336
    3437libpng.a: $(OBJS)
    35         ar rc $@ $(OBJS)
    36         ranlib $@
     38        $(AR) $(ARFLAGS) $@ $(OBJS)
     39        $(RANLIB) $@
    3740
    3841pngtest: pngtest.o libpng.a
  • trunk/src/libs/libpng-1.6.43/scripts/makefile.gcc

    r103316 r105469  
    11# makefile for libpng using gcc (generic, static library)
    2 # Copyright (C) 2000, 2014, 2019-2022 Cosmin Truta
     2# Copyright (C) 2000, 2014, 2019-2024 Cosmin Truta
    33# Copyright (C) 2008, 2014 Glenn Randers-Pehrson
    44# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
     
    1515CC = gcc
    1616LD = $(CC)
    17 AR_RC = ar rcs
     17AR = ar
    1818RANLIB = ranlib
    1919CP = cp
     
    2929CPPFLAGS = -I$(ZLIBINC) $(DEFS) # -DPNG_DEBUG=5
    3030CFLAGS = -O2 -Wall -Wextra -Wundef # $(WARNMORE) -g
     31ARFLAGS = rc
    3132LDFLAGS = -L$(ZLIBLIB) # -g
    3233LIBS = -lz -lm
     
    6162
    6263libpng.a: $(OBJS)
    63         $(AR_RC) $@ $(OBJS)
     64        $(AR) $(ARFLAGS) $@ $(OBJS)
    6465        $(RANLIB) $@
    6566
  • trunk/src/libs/libpng-1.6.43/scripts/makefile.hp64

    r103316 r105469  
    11# makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product.
    2 # Copyright (C) 2020-2022 Cosmin Truta
     2# Copyright (C) 2020-2024 Cosmin Truta
    33# Copyright (C) 1999-2002, 2006, 2009, 2010-2014 Glenn Randers-Pehrson
    44# Copyright (C) 1995 Guy Eric Schalnat, Group 42
     
    3030# Utilities:
    3131CC=cc
    32 AR_RC=ar rc
     32AR=ar
    3333RANLIB=ranlib
    34 MKDIR_P=mkdir -p
    3534LN_SF=ln -sf
    3635CP=cp
     
    4241# Caution: be sure you have built zlib with the same CFLAGS.
    4342CCFLAGS=-O -Ae -Wl,+vnocompatwarnings +DD64 +Z
    44 
     43ARFLAGS=rc
    4544LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
    4645
     
    6968
    7069libpng.a: $(OBJS)
    71         $(AR_RC) $@ $(OBJS)
     70        $(AR) $(ARFLAGS) $@ $(OBJS)
    7271        $(RANLIB) $@
    7372
  • trunk/src/libs/libpng-1.6.43/scripts/makefile.hpgcc

    r103316 r105469  
    11# makefile for libpng on HP-UX using GCC with the HP ANSI/C linker.
    2 # Copyright (C) 2020-2022 Cosmin Truta
     2# Copyright (C) 2020-2024 Cosmin Truta
    33# Copyright (C) 2002, 2006-2008, 2010-2014 Glenn Randers-Pehrson
    44# Copyright (C) 2001, Laurent faillie
     
    2020# Utilities:
    2121CC=gcc
     22AR=ar
     23RANLIB=ranlib
    2224LD=ld
    23 AR_RC=ar rc
    24 RANLIB=ranlib
    25 MKDIR_P=mkdir -p
    2625LN_SF=ln -sf
    2726CP=cp
     
    4544CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
    4645CFLAGS=-O3 -funroll-loops -Wall -Wextra -Wundef # $(WARNMORE) -g
     46ARFLAGS=rc
    4747#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng16 -lz -lm # -g
    4848LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz -lm # -g
     
    6565
    6666libpng.a: $(OBJS)
    67         $(AR_RC) $@ $(OBJS)
     67        $(AR) $(ARFLAGS) $@ $(OBJS)
    6868        $(RANLIB) $@
    6969
  • trunk/src/libs/libpng-1.6.43/scripts/makefile.hpux

    r103316 r105469  
    11# makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product.
    2 # Copyright (C) 2020-2022 Cosmin Truta
     2# Copyright (C) 2020-2024 Cosmin Truta
    33# Copyright (C) 1999-2002, 2006, 2010-2014 Glenn Randers-Pehrson
    44# Copyright (C) 1995 Guy Eric Schalnat, Group 42
     
    3131# Utilities:
    3232CC=cc
    33 AR_RC=ar rc
     33AR=ar
    3434RANLIB=ranlib
    35 MKDIR_P=mkdir -p
    3635LN_SF=ln -sf
    3736RM_F=/bin/rm -f
     
    4140# Caution: be sure you have built zlib with the same CFLAGS.
    4241CCFLAGS=-O -Ae +DA1.1 +DS2.0
     42ARFLAGS=rc
    4343LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
    4444
     
    6767
    6868libpng.a: $(OBJS)
    69         $(AR_RC) $@ $(OBJS)
     69        $(AR) $(ARFLAGS) $@ $(OBJS)
    7070        $(RANLIB) $@
    7171
  • trunk/src/libs/libpng-1.6.43/scripts/makefile.linux

    r103316 r105469  
    11# makefile for libpng.a and libpng16.so on Linux ELF with gcc
    2 # Copyright (C) 2020-2022 Cosmin Truta
     2# Copyright (C) 2020-2024 Cosmin Truta
    33# Copyright (C) 1998, 1999, 2002, 2006, 2008, 2010-2014 Greg Roelofs and
    44# Glenn Randers-Pehrson
     
    1919# Utilities:
    2020CC=gcc
    21 AR_RC=ar rc
     21AR=ar
    2222RANLIB=ranlib
    23 MKDIR_P=mkdir -p
    2423LN_SF=ln -sf
    2524CP=cp
     
    4140CPPFLAGS=-I$(ZLIBINC) $(DEFS) # -DPNG_DEBUG=5
    4241CFLAGS=-O3 -funroll-loops -Wall -Wextra -Wundef # $(WARNMORE) -g
     42ARFLAGS=rc
    4343LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng16 -lz -lm # -g
    4444LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm # -g
     
    6969
    7070libpng.a: $(OBJS)
    71         $(AR_RC) $@ $(OBJS)
     71        $(AR) $(ARFLAGS) $@ $(OBJS)
    7272        $(RANLIB) $@
    7373
  • trunk/src/libs/libpng-1.6.43/scripts/makefile.mips

    r103316 r105469  
    11# makefile for libpng
    2 # Copyright (C) 2020-2022 Cosmin Truta
     2# Copyright (C) 2020-2024 Cosmin Truta
    33# Copyright (C) 1998-2014 Glenn Randers-Pehrson
    44# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
     
    99
    1010CC=cc
     11AR=ar
     12#RANLIB=ranlib
     13RANLIB=echo
    1114CPPFLAGS=-I../zlib -DSYSV -Dmips
    1215CFLAGS=-O -systype sysv -w
    1316#CFLAGS=-O
     17ARFLAGS=rc
    1418LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
    15 
    16 AR_RC=ar rc
    17 #RANLIB=ranlib
    18 RANLIB=echo
    1919
    2020# Pre-built configuration
     
    3535
    3636libpng.a: $(OBJS)
    37         $(AR_RC) $@ $(OBJS)
     37        $(AR) $(ARFLAGS) $@ $(OBJS)
    3838        $(RANLIB) $@
    3939
  • trunk/src/libs/libpng-1.6.43/scripts/makefile.msys

    r103316 r105469  
    11# makefile for libpng using MSYS/gcc (shared, static library)
    2 # Copyright (C) 2019-2022 Cosmin Truta
     2# Copyright (C) 2000, 2019-2024 Cosmin Truta
    33# Copyright (C) 2012 Glenn Randers-Pehrson and Christopher M. Wheeler
    44#
     
    3131CC = gcc
    3232LD = $(CC)
    33 AR_RC = ar rcs
     33AR = ar
    3434RANLIB = ranlib
    3535CP = cp
    3636RM_F = rm -rf
    37 MKDIR_P=mkdir -p
    38 LN_SF=ln -sf
     37LN_SF = ln -sf
    3938
    4039CPPFLAGS = # -DPNG_DEBUG=5
    4140CFLAGS = -O2 -Wall -Wextra -Wundef # -g
     41ARFLAGS = rc
    4242LDFLAGS = # -g
    4343LIBS = -lz -lm
    4444
    4545# File extensions
    46 EXEEXT=.exe
     46EXEEXT = .exe
    4747
    4848# Pre-built configuration
     
    7676
    7777libpng.a: $(OBJS)
    78         $(AR_RC) $@ $(OBJS)
     78        $(AR) $(ARFLAGS) $@ $(OBJS)
    7979        $(RANLIB) $@
    8080
  • trunk/src/libs/libpng-1.6.43/scripts/makefile.sco

    r103316 r105469  
    22# Contributed by Mike Hopkirk (hops at sco.com) modified from Makefile.lnx
    33#   force ELF build dynamic linking, SONAME setting in lib and RPATH in app
    4 # Copyright (C) 2020-2022 Cosmin Truta
     4# Copyright (C) 2020-2024 Cosmin Truta
    55# Copyright (C) 2002, 2006, 2010-2014 Glenn Randers-Pehrson
    66# Copyright (C) 1998 Greg Roelofs
     
    2121# Utilities:
    2222CC=cc
    23 AR_RC=ar rc
     23AR=ar
    2424RANLIB=echo
    25 MKDIR_P=mkdir
    2625LN_SF=ln -f -s
    2726CP=cp
     
    3534
    3635CPPFLAGS=-I$(ZLIBINC)
    37 CFLAGS= -dy -belf -O3
     36CFLAGS=-dy -belf -O3
     37ARFLAGS=rc
    3838LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz -lm
    3939
     
    6262
    6363libpng.a: $(OBJS)
    64         $(AR_RC) $@ $(OBJS)
     64        $(AR) $(ARFLAGS) $@ $(OBJS)
    6565        $(RANLIB) $@
    6666
  • trunk/src/libs/libpng-1.6.43/scripts/makefile.sggcc

    r103316 r105469  
    11# makefile for libpng.a and libpng16.so, SGI IRIX with 'cc'
    2 # Copyright (C) 2020-2022 Cosmin Truta
     2# Copyright (C) 2020-2024 Cosmin Truta
    33# Copyright (C) 2001-2002, 2006, 2010-2014 Glenn Randers-Pehrson
    44# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
     
    1818# Utilities:
    1919CC=gcc
    20 AR_RC=ar rc
     20AR=ar
    2121RANLIB=echo
    22 MKDIR_P=mkdir -p
    2322LN_SF=ln -sf
    2423CP=cp
     
    4039CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
    4140CFLAGS=$(ABI) -O $(WARNMORE) -fPIC -mabi=n32 # -g
     41ARFLAGS=rc
    4242LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm # -g
    4343LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
     
    6262
    6363libpng.a: $(OBJS)
    64         $(AR_RC) $@ $(OBJS)
     64        $(AR) $(ARFLAGS) $@ $(OBJS)
    6565        $(RANLIB) $@
    6666
  • trunk/src/libs/libpng-1.6.43/scripts/makefile.sgi

    r103316 r105469  
    11# makefile for libpng.a and libpng16.so, SGI IRIX with 'cc'
    2 # Copyright (C) 2020-2022 Cosmin Truta
     2# Copyright (C) 2020-2024 Cosmin Truta
    33# Copyright (C) 2001-2002, 2006, 2007, 2010-2014 Glenn Randers-Pehrson
    44# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
     
    1818# Utilities:
    1919CC=cc
    20 AR_RC=ar rc
     20AR=ar
    2121RANLIB=echo
    22 MKDIR_P=mkdir -p
    2322LN_SF=ln -sf
    2423CP=cp
     
    4241#CFLAGS= $(ABI) -O $(WARNMORE) -KPIC # -g
    4342CFLAGS=$(ABI) -O $(WARNMORE) # -g
     43ARFLAGS=rc
    4444LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng16 -lz -lm # -g
    4545LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm # -g
     
    6565
    6666libpng.a: $(OBJS)
    67         $(AR_RC) $@ $(OBJS)
     67        $(AR) $(ARFLAGS) $@ $(OBJS)
    6868        $(RANLIB) $@
    6969
  • trunk/src/libs/libpng-1.6.43/scripts/makefile.so9

    r103316 r105469  
    22# Updated by Chad Schrock for Solaris 9
    33# Contributed by William L. Sebok, based on makefile.linux
    4 # Copyright (C) 2020-2022 Cosmin Truta
     4# Copyright (C) 2020-2024 Cosmin Truta
    55# Copyright (C) 2002, 2006, 2008, 2010-2014 Glenn Randers-Pehrson
    66# Copyright (C) 1998-2001 Greg Roelofs
     
    2222# gcc 2.95 doesn't work.
    2323CC=cc
    24 AR_RC=ar rc
     24AR=ar
    2525RANLIB=echo
    26 MKDIR_P=mkdir -p
    2726LN_SF=ln -f -s
    2827CP=cp
     
    4241CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
    4342CFLAGS=-O3
     43ARFLAGS=rc
    4444LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm
    4545
     
    6868
    6969libpng.a: $(OBJS)
    70         $(AR_RC) $@ $(OBJS)
     70        $(AR) $(ARFLAGS) $@ $(OBJS)
    7171        $(RANLIB) $@
    7272
  • trunk/src/libs/libpng-1.6.43/scripts/makefile.solaris

    r103316 r105469  
    11# makefile for libpng on Solaris 2.x with gcc
    2 # Copyright (C) 2020-2022 Cosmin Truta
     2# Copyright (C) 2020-2024 Cosmin Truta
    33# Copyright (C) 2004, 2006-2008, 2010-2014 Glenn Randers-Pehrson
    44# Contributed by William L. Sebok, based on makefile.linux
     
    2020# Utilities:
    2121CC=gcc
    22 AR_RC=ar rc
     22AR=ar
    2323RANLIB=echo
    24 MKDIR_P=mkdir -p
    2524LN_SF=ln -f -s
    2625CP=cp
     
    4140CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
    4241CFLAGS=-O -Wall -Wextra -Wundef # $(WARNMORE) -g
     42ARFLAGS=rc
    4343LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm # -g
    4444
     
    6767
    6868libpng.a: $(OBJS)
    69         $(AR_RC) $@ $(OBJS)
     69        $(AR) $(ARFLAGS) $@ $(OBJS)
    7070        $(RANLIB) $@
    7171
  • trunk/src/libs/libpng-1.6.43/scripts/makefile.std

    r103316 r105469  
    11# makefile for libpng
    2 # Copyright (C) 2020-2022 Cosmin Truta
     2# Copyright (C) 2020-2024 Cosmin Truta
    33# Copyright (C) 2002, 2006, 2014 Glenn Randers-Pehrson
    44# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
     
    1717CPP = $(CC) -E
    1818LD = $(CC)
    19 AR_RC = ar rc
     19AR = ar
    2020RANLIB = ranlib
    21 MKDIR_P = mkdir
    2221MV_F = mv -f
    2322RM_F = rm -f
     
    3029CPPFLAGS = -I$(ZLIBINC) $(NOHWOPT) # -DPNG_DEBUG=5
    3130CFLAGS = -O # -g
     31ARFLAGS = rc
    3232LDFLAGS = -L$(ZLIBLIB) # -g
    3333LIBS = -lz -lm
     
    6767
    6868libpng.a: $(OBJS)
    69         $(AR_RC) $@ $(OBJS)
     69        $(AR) $(ARFLAGS) $@ $(OBJS)
    7070        $(RANLIB) $@
    7171
  • trunk/src/libs/libpng-1.6.43/scripts/makefile.sunos

    r103316 r105469  
    11# makefile for libpng
    2 # Copyright (C) 2020-2022 Cosmin Truta
     2# Copyright (C) 2020-2024 Cosmin Truta
    33# Copyright (C) 2002, 2006, 2014 Glenn Randers-Pehrson
    44# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
     
    1515
    1616CC=gcc
    17 AR_RC=ar rc
     17AR=ar
    1818RANLIB=ranlib
    19 MKDIR_P=mkdir -p
    2019CP=cp
    2120RM_F=/bin/rm -f
     
    2322CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
    2423CFLAGS=-O
     24ARFLAGS=rc
    2525LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
    2626
     
    4242
    4343libpng.a: $(OBJS)
    44         $(AR_RC) $@ $(OBJS)
     44        $(AR) $(ARFLAGS) $@ $(OBJS)
    4545        $(RANLIB) $@
    4646
  • trunk/src/libs/libpng-1.6.43/scripts/makefile.vcwin32

    r103316 r105469  
    3131
    3232# File extensions
    33 O=.obj
     33O = .obj
    3434
    3535# File lists
  • trunk/src/libs/libpng-1.6.43/scripts/options.awk

    r103316 r105469  
    402402   if (i > NF) {
    403403      # Output new 'option' lines to the intermediate file (out)
    404       print "option READ_" opt, "requires READ_ANCILLARY_CHUNKS" reqread, "enables", opt enables , onoff >out
    405       print "option WRITE_" opt, "requires WRITE_ANCILLARY_CHUNKS" reqwrite, "enables", opt enables, onoff >out
     404      print "option READ_" opt, "requires READ_ANCILLARY_CHUNKS" reqread,
     405            "enables", opt enables , onoff >out
     406      print "option WRITE_" opt, "requires WRITE_ANCILLARY_CHUNKS" reqwrite,
     407            "enables", opt enables, onoff >out
    406408      next
    407409   }
     
    732734         # an otherwise enabled option to turn it on; otherwise the 'if'
    733735         # handling is effectively disabled by 'everything = off'
    734          if (option[i] == "off" || option[i] == "disabled" && everything != "on" || option[i] == "enabled" && everything == "off" && !have_ifs) {
     736         if ((option[i] == "off") ||
     737             (option[i] == "disabled" && everything != "on") ||
     738             (option[i] == "enabled" && everything == "off" && !have_ifs)) {
    735739            print "#      undef PNG_on /*default off*/" >out
    736740         } else {
     
    753757         print "#   ifdef PNG_on" >out
    754758         if (i ~ /^fail_/) {
    755             print error, i, "is on: enabled by:" iffs[i] enabledby[i] ", requires" requires[i] end >out
     759            print error, i, "is on:",
     760                  "enabled by:" iffs[i] enabledby[i] ", requires" requires[i] end >out
    756761         } else if (i !~ /^ok_/) {
    757762            print def i sup >out
     
    780785            }
    781786            if (i ~ /^ok_/) {
    782                print error, i, "not enabled: requires:" requires[i] ", enabled by:" iffs[i] enabledby[i] end >out
     787               print error, i, "not enabled: ",
     788                     "requires:" requires[i] ", enabled by:" iffs[i] enabledby[i] end >out
    783789            }
    784790            print "#endif" >out
  • trunk/src/libs/libpng-1.6.43/scripts/pnglibconf.dfa

    r103316 r105469  
    205205# These options are specific to the ARM NEON hardware optimizations.  At present
    206206# these optimizations depend on GCC specific pre-processing of an assembler (.S)
    207 # file so they probably won't work with other compilers.
    208 #
    209 # ARM_NEON_OPT: unset: check at compile time (__ARM_NEON__ must be defined by
    210 #                      the compiler, typically as a result of specifying
    211 #                      CC="gcc -mfpu=neon".)
    212 #                   0: disable (even if the CPU has a NEON FPU.)
    213 #                   1: check at run time (via ARM_NEON_{API,CHECK})
    214 #                   2: switch on unconditionally (inadvisable - instead pass
    215 #                      -mfpu=neon to GCC in CC)
    216 #           When building libpng avoid using any setting other than '0'; '1' is
    217 #           set automatically when either 'API' or 'CHECK' are configured in,
    218 #           '2' should not be necessary as -mfpu=neon will achieve the same
    219 #           effect as well as applying NEON optimizations to the rest of the
    220 #           libpng code.
    221 #           NOTE: any setting other than '0' requires ALIGNED_MEMORY
    222 # ARM_NEON_API:   (PNG_ARM_NEON == 1) allow the optimization to be switched on
    223 #                 with png_set_option
    224 # ARM_NEON_CHECK: (PNG_ARM_NEON == 1) compile a run-time check to see if Neon
    225 #                 extensions are supported. This is poorly supported and
    226 #                 deprecated - use the png_set_option API.
     207# file, so they probably won't work with other compilers.
     208#
     209# ARM_NEON_OPT:
     210#   unset: check at compile time
     211#          (__ARM_NEON__ must be predefined by the compiler, as a result of
     212#          passing "-mfpu=neon" to the compiler options)
     213#   0: disable (even if the CPU has a NEON FPU)
     214#   1: check at run time (via ARM_NEON_{API,CHECK})
     215#   2: switch on unconditionally
     216#      (inadvisable - instead, pass "-mfpu=neon" to the compiler)
     217#   NOTE:
     218#     When building libpng, avoid using any setting other than '0';
     219#     '1' is set automatically when either 'API' or 'CHECK' are configured in;
     220#     '2' should not be necessary, as "-mfpu=neon" will achieve the same effect
     221#     as well as applying the NEON optimizations to the rest of libpng.
     222#   NOTE:
     223#     Any setting other than '0' requires ALIGNED_MEMORY.
     224#
     225# ARM_NEON_API:
     226#   (PNG_ARM_NEON == 1)
     227#   Allow the optimization to be switched on with png_set_option.
     228#
     229# ARM_NEON_CHECK:
     230#   (PNG_ARM_NEON == 1)
     231#   Compile a run-time check to see if Neon extensions are supported.
     232#   This is poorly supported and deprecated - use the png_set_option API.
     233#
    227234setting ARM_NEON_OPT
    228235option ARM_NEON_API disabled requires ALIGNED_MEMORY enables SET_OPTION,
     
    233240# These options are specific to the PowerPC VSX hardware optimizations.
    234241#
    235 # POWERPC_VSX_OPT: unset: check at compile time (__PPC64__,__ALTIVEC__,__VSX__
    236 #                      must be defined by the compiler, typically as a result
    237 #                      of specifying
    238 #                      "-mvsx -maltivec" compiler flags)
    239 #                   0: disable (even if the CPU supports VSX.)
    240 #                   1: check at run time (via POWERPC_VSX_{API,CHECK})
    241 #                   2: switch on unconditionally (inadvisable - instead pass
    242 #                      -mvsx -maltivec to compiler options)
    243 #           When building libpng avoid using any setting other than '0'; '1' is
    244 #           set automatically when either 'API' or 'CHECK' are configured in,
    245 #           '2' should not be necessary as "-mvsx -maltivec" will achieve the same
    246 #           effect as well as applying VSX optimizations to the rest of the
    247 #           libpng code.
    248 # POWERPC_VSX_API:   (PNG_POWERPC_VSX == 1) allow the optimization to be switched on
    249 #                 with png_set_option
    250 # POWERPC_VSX_CHECK: (PNG_POWERPC_VSX == 1) compile a run-time check to see if VSX
    251 #                 extensions are supported. This is supported not for all OSes
    252 #                 (see contrib/powerpc/README)
     242# POWERPC_VSX_OPT:
     243#   unset: check at compile time
     244#          (__PPC64__,__ALTIVEC__,__VSX__ must be predefined by the compiler,
     245#          as a result of passing "-mvsx -maltivec" to the compiler options)
     246#   0: disable (even if the CPU supports VSX)
     247#   1: check at run time (via POWERPC_VSX_{API,CHECK})
     248#   2: switch on unconditionally
     249#      (inadvisable - instead, pass "-mvsx -maltivec" to the compiler)
     250#   NOTE:
     251#     When building libpng, avoid using any setting other than '0';
     252#     '1' is set automatically when either 'API' or 'CHECK' are configured in;
     253#     '2' should not be necessary, as "-mvsx -maltivec" will achieve the same
     254#     effect as well as applying the VSX optimizations to the rest of libpng.
     255#
     256# POWERPC_VSX_API:
     257#   (PNG_POWERPC_VSX == 1)
     258#   Allow the optimization to be switched on with png_set_option.
     259#
     260# POWERPC_VSX_CHECK:
     261#   (PNG_POWERPC_VSX == 1)
     262#   Compile a run-time check to see if VSX extensions are supported.
     263#   This is not supported on all systems. See contrib/powerpc-vsx/README.
     264#
    253265setting POWERPC_VSX_OPT
    254266option POWERPC_VSX_API disabled enables SET_OPTION,
     
    259271# These options are specific to the MIPS MSA hardware optimizations.
    260272#
    261 # MIPS_MSA_OPT: unset: check at compile time (__mips_msa must be defined by
    262 #                      the compiler, typically as a result of specifying
    263 #                      "-mmsa -mfp64" compiler flags)
    264 #                   0: disable (even if the CPU supports MSA.)
    265 #                   1: check at run time (via MIPS_MSA_{API,CHECK})
    266 #                   2: switch on unconditionally (inadvisable - instead pass
    267 #                      -mmsa -mfp64 to compiler options)
    268 #           When building libpng avoid using any setting other than '0'; '1' is
    269 #           set automatically when either 'API' or 'CHECK' are configured in,
    270 #           '2' should not be necessary as "-mmsa -mfp64" will achieve the same
    271 #           effect as well as applying MSA optimizations to the rest of the
    272 #           libpng code.
    273 #           NOTE: any setting other than '0' requires ALIGNED_MEMORY
    274 # MIPS_MSA_API:   (PNG_MIPS_MSA == 1) allow the optimization to be switched on
    275 #                 with png_set_option.
    276 # MIPS_MSA_CHECK: (PNG_MIPS_MSA == 1) compile a run-time check to see if MSA
    277 #                 extensions are supported.
     273# MIPS_MSA_OPT:
     274#   unset: check at compile time
     275#          (__mips_msa must be predefined by the compiler, as a result of
     276#          passing "-mmsa -mfp64" to the compiler options)
     277#   0: disable (even if the CPU supports MSA)
     278#   1: check at run time (via MIPS_MSA_{API,CHECK})
     279#   2: switch on unconditionally
     280#      (inadvisable - instead, pass "-mmsa -mfp64" to the compiler)
     281#   NOTE:
     282#     When building libpng, avoid using any setting other than '0';
     283#     '1' is set automatically when either 'API' or 'CHECK' are configured in;
     284#     '2' should not be necessary, as "-mmsa -mfp64" will achieve the same
     285#     effect as well as applying the MSA optimizations to the rest of libpng.
     286#   NOTE:
     287#     Any setting other than '0' requires ALIGNED_MEMORY.
     288#
     289# MIPS_MSA_API:
     290#   (PNG_MIPS_MSA == 1)
     291#   Allow the optimization to be switched on with png_set_option.
     292#
     293# MIPS_MSA_CHECK:
     294#   (PNG_MIPS_MSA == 1)
     295#   Compile a run-time check to see if MSA extensions are supported.
     296#
    278297setting MIPS_MSA_OPT
    279298option MIPS_MSA_API disabled requires ALIGNED_MEMORY enables SET_OPTION,
     
    284303# These options are specific to the MIPS MMI hardware optimizations.
    285304#
    286 # MIPS_MMI_OPT: unset: check at compile time (__mips_loongson_mmi must be defined by
    287 #                      the compiler, typically as a result of specifying
    288 #                      "-mloongson-mmi -march=loongson3a" compiler flags)
    289 #                   0: disable (even if the CPU supports MMI.)
    290 #                   1: check at run time (via MIPS_MMI_{API,CHECK})
    291 #                   2: switch on unconditionally (inadvisable - instead pass
    292 #                      -mloongson-mmi -march=loongson3a to compiler options)
    293 #           When building libpng avoid using any setting other than '0'; '1' is
    294 #           set automatically when either 'API' or 'CHECK' are configured in,
    295 #           '2' should not be necessary as "-mloongson-mmi -march=loongson3a" will achieve the same
    296 #           effect as well as applying MMI optimizations to the rest of the
    297 #           libpng code.
    298 # MIPS_MMI_API:   (PNG_MIPS_MMI == 1) allow the optimization to be switched on
    299 #                 with png_set_option
    300 # MIPS_MMI_CHECK: (PNG_MIPS_MMI == 1) compile a run-time check to see if MMI
    301 #                 extensions are supported.
     305# MIPS_MMI_OPT:
     306#   unset: check at compile time
     307#          (__mips_loongson_mmi must be defined by the compiler, as a result of
     308#          passing "-mloongson-mmi -march=loongson3a" to the compiler options)
     309#   0: disable (even if the CPU supports MMI)
     310#   1: check at run time (via MIPS_MMI_{API,CHECK})
     311#   2: switch on unconditionally
     312#      (inadvisable - instead, pass "-mloongson-mmi -march=loongson3a" to the
     313#      compiler)
     314#   NOTE:
     315#     When building libpng, avoid using any setting other than '0';
     316#     '1' is set automatically when either 'API' or 'CHECK' are configured in;
     317#     '2' should not be necessary, as "-mloongson-mmi -march=loongson3a" will
     318#     achieve the same effect as well as applying the MMI optimizations to the
     319#     rest of libpng.
     320#
     321# MIPS_MMI_API:
     322#   (PNG_MIPS_MMI == 1)
     323#   Allow the optimization to be switched on with png_set_option.
     324#
     325# MIPS_MMI_CHECK:
     326#   (PNG_MIPS_MMI == 1)
     327#   Compile a run-time check to see if MMI extensions are supported.
     328#
    302329setting MIPS_MMI_OPT
    303330option MIPS_MMI_API disabled requires ALIGNED_MEMORY enables SET_OPTION,
  • trunk/src/libs/libpng-1.6.43/scripts/pnglibconf.h.prebuilt

    r103316 r105469  
    11/* pnglibconf.h - library build configuration */
    22
    3 /* libpng version 1.6.42 */
     3/* libpng version 1.6.43 */
    44
    55/* Copyright (c) 2018-2024 Cosmin Truta */
  • trunk/src/libs/libpng-1.6.43/scripts/pngwin.rc

    r96425 r105469  
    9090      VALUE "FileDescription", "PNG image compression library\000"
    9191      VALUE "FileVersion", PNG_LIBPNG_VER_STRING "\000"
    92       VALUE "InternalName", PNG_LIBPNG_DLLFNAME QUOTE(PNG_LIBPNG_VER_DLLNUM) PNG_LIBPNG_DLLFNAME_POSTFIX " (Windows 32 bit)\000"
    93       VALUE "LegalCopyright", "\251 1998-2009 Glenn Randers-Pehrson et al.\000"
     92      VALUE "InternalName", PNG_LIBPNG_DLLFNAME QUOTE(PNG_LIBPNG_VER_SHAREDLIB) PNG_LIBPNG_DLLFNAME_POSTFIX " (Windows)\000"
     93      VALUE "LegalCopyright", "\251 1998-2024 PNG Reference Library Authors\000"
    9494#ifdef PNG_USER_VERSIONINFO_LEGALTRADEMARKS
    9595      VALUE "LegalTrademarks", PNG_USER_VERSIONINFO_LEGALTRADEMARKS "\000"
    9696#endif /* PNG_USER_VERSIONINFO_LEGALTRADEMARKS */
    97       VALUE "OriginalFilename", PNG_LIBPNG_DLLFNAME QUOTE(PNG_LIBPNG_VER_DLLNUM) PNG_LIBPNG_DLLFNAME_POSTFIX ".DLL\000"
     97      VALUE "OriginalFilename", PNG_LIBPNG_DLLFNAME QUOTE(PNG_LIBPNG_VER_SHAREDLIB) PNG_LIBPNG_DLLFNAME_POSTFIX ".DLL\000"
    9898#ifdef PNG_USER_PRIVATEBUILD
    9999      VALUE "PrivateBuild", PNG_USER_PRIVATEBUILD "\000"
  • trunk/src/libs/libpng-1.6.43/scripts/smakefile.ppc

    r103316 r105469  
    1212LIBNAME  = libpng.a
    1313AR       = ppc-amigaos-ar
    14 AR_FLAGS = cr
     14ARFLAGS = cr
    1515RANLIB   = ppc-amigaos-ranlib
    1616LDFLAGS  = -r -o
     
    1818LN       = ppc-amigaos-ld
    1919RM       = delete quiet
    20 MKDIR    = makedir
    2120
    2221OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
     
    2726
    2827$(LIBNAME): $(OBJS)
    29             $(AR) $(AR_FLAGS) $@ $(OBJS)
     28            $(AR) $(ARFLAGS) $@ $(OBJS)
    3029            $(RANLIB) $@
    3130
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette