VirtualBox

Changeset 103316 in vbox


Ignore:
Timestamp:
Feb 12, 2024 3:57:56 PM (14 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
161613
Message:

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

Location:
trunk/src/libs/libpng-1.6.42
Files:
23 deleted
141 edited

Legend:

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

    r96425 r103316  
    1 libpng 1.6.37 - April 14, 2019
    2 ==============================
     1libpng 1.6.42 - January 29, 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.37.tar.xz (LZMA-compressed, recommended)
    13  * libpng-1.6.37.tar.gz
     12 * libpng-1.6.42.tar.xz (LZMA-compressed, recommended)
     13 * libpng-1.6.42.tar.gz (deflate-compressed)
    1414
    1515Source files with CRLF line endings (for Windows):
    1616
    17  * lp1637.7z (LZMA-compressed, recommended)
    18  * lp1637.zip
     17 * lpng1642.7z (LZMA-compressed, recommended)
     18 * lpng1642.zip (deflate-compressed)
    1919
    2020Other information:
     
    2626
    2727
    28 Changes since the previous public release (version 1.6.36)
    29 ----------------------------------------------------------
     28Changes from version 1.6.41 to version 1.6.42
     29---------------------------------------------
    3030
    31  * Fixed a use-after-free vulnerability (CVE-2019-7317) in png_image_free.
    32  * Fixed a memory leak in the ARM NEON implementation of png_do_expand_palette.
    33  * Fixed a memory leak in pngtest.c.
    34  * Fixed two vulnerabilities (CVE-2018-14048, CVE-2018-14550) in
    35    contrib/pngminus; refactor.
    36  * Changed the license of contrib/pngminus to MIT; refresh makefile and docs.
    37    (Contributed by Willem van Schaik)
    38  * Fixed a typo in the libpng license v2.
    39    (Contributed by Miguel Ojeda)
    40  * Added makefiles for AddressSanitizer-enabled builds.
    41  * Cleaned up various makefiles.
     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
     36Changes 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.
     52   (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.
     68   (Contributed by John Bowler)
    4269
    4370
  • trunk/src/libs/libpng-1.6.42/AUTHORS

    r96425 r103316  
    55Authors, for copyright and licensing purposes.
    66
     7 * Adam Richter
    78 * Andreas Dilger
    89 * Cosmin Truta
     
    2122 * Matt Sarett
    2223 * Mike Klein
     24 * Pascal Massimino
    2325 * Paul Schmidt
     26 * Philippe Antoine
     27 * Qiang Zhou
    2428 * Sam Bushell
    2529 * Samuel Williams
     
    3135 * Willem van Schaik
    3236 * Zhijie Liang
     37 * Apple Inc.
     38    - Zixu Wang (王子旭)
    3339 * Arm Holdings
    34    - Richard Townsend
     40    - Richard Townsend
    3541 * Google Inc.
    36    - Matt Sarett
    37    - Mike Klein
     42    - Dan Field
     43    - Leon Scroggins III
     44    - Matt Sarett
     45    - Mike Klein
     46    - Sami Boukortt
     47    - Wan-Teh Chang
     48 * Loongson Technology Corporation Ltd.
     49    - GuXiWei (顾希伟)
     50    - JinBo (金波)
     51    - ZhangLixia (张利霞)
    3852
    3953The build projects, the build scripts, the test scripts, and other
    40 files in the "projects", "scripts" and "tests" directories, have other
    41 copyright owners, but are released under the libpng license.
     54files in the "projects", "scripts" and "tests" directories, have
     55other copyright owners, but are released under the libpng license.
    4256
    43 Some files in the "contrib" directory, and some tools-generated files
    44 that are distributed with libpng, have other copyright owners, and are
    45 released under other open source licenses.
     57Some files in the "ci" and "contrib" directories, as well as some
     58of the tools-generated files that are distributed with libpng, have
     59other copyright owners, and are released under other open source
     60licenses.
  • trunk/src/libs/libpng-1.6.42/CHANGES

    r96425 r103316  
    205205  Easier conditional compiling, e.g.,
    206206    define PNG_READ/WRITE_NOT_FULLY_SUPPORTED;
    207     all configurable options can be selected from command-line instead
     207    all configurable options can be selected from command line instead
    208208    of having to edit pngconf.h (Glenn R-P)
    209209  Fixed memory leak in pngwrite.c (free info_ptr->text) (Glenn R-P)
     
    943943  Fixed typo in scripts/makefile.hpux
    944944  Updated makevms.com in scripts and contrib/* and contrib/* (Martin Zinser)
    945   Fixed seqence-point bug in contrib/pngminus/png2pnm (Martin Zinser)
     945  Fixed sequence-point bug in contrib/pngminus/png2pnm (Martin Zinser)
    946946  Changed "cdrom.com" in documentation to "libpng.org"
    947947  Revised pnggccrd.c to get it all working, and updated makefile.gcmmx (Greg).
     
    22962296
    22972297Version 1.4.0beta59 [May 15, 2009]
    2298   Reformated sources in libpng style (3-space intentation, comment format)
     2298  Reformatted sources in libpng style (3-space indentation, comment format)
    22992299  Fixed typo in libpng docs (PNG_FILTER_AVE should be PNG_FILTER_AVG)
    23002300  Added sections about the git repository and our coding style to the
     
    26622662Version 1.4.1beta07 [February 6, 2010]
    26632663  Folded some long lines in the source files.
    2664   Added defineable PNG_USER_CHUNK_CACHE_MAX, PNG_USER_CHUNK_MALLOC_MAX,
     2664  Added definable PNG_USER_CHUNK_CACHE_MAX, PNG_USER_CHUNK_MALLOC_MAX,
    26652665    and a PNG_USER_LIMITS_SUPPORTED flag.
    26662666  Eliminated use of png_ptr->irowbytes and reused the slot in png_ptr as
     
    38873887  Eliminated Intel icc/icl compiler warnings. The Intel (GCC derived)
    38883888    compiler issues slightly different warnings from those issued by the
    3889     current vesions of GCC. This eliminates those warnings by
     3889    current versions of GCC. This eliminates those warnings by
    38903890    adding/removing casts and small code rewrites.
    38913891  Updated configure.ac from autoupdate: added --enable-werror option.
     
    39203920  Improved pngstest speed by not doing redundant tests and add const to
    39213921    the background parameter of png_image_finish_read. The --background
    3922     option is now done automagically only when required, so that commandline
     3922    option is now done automagically only when required, so that command-line
    39233923    option no longer exists.
    39243924  Cleaned up pngpriv.h to consistently declare all functions and data.
     
    40534053
    40544054Version 1.6.0beta17 [March 10, 2012]
    4055   Fixed PNG_LIBPNG_BUILD_BASE_TYPE definition. 
     4055  Fixed PNG_LIBPNG_BUILD_BASE_TYPE definition.
    40564056  Reject all iCCP chunks after the first, even if the first one is invalid.
    40574057  Deflate/inflate was reworked to move common zlib calls into single
     
    49634963    "if (defined(__ARM_NEON__) || defined(__ARM_NEON))" (James Wu).
    49644964  Fixed clang no-warning builds: png_digit was defined but never used.
    4965    
     4965
    49664966Version 1.6.13beta02 [July 21, 2014]
    49674967  Fixed an incorrect separator ("/" should be "\") in scripts/makefile.vcwin32
     
    54545454  Moved png_check_keyword() from pngwutil.c to pngset.c
    54555455  Removed LE/BE dependencies in pngvalid, to 'fix' the current problem
    5456     in the BigEndian tests by not testing it, making the BE code the same 
     5456    in the BigEndian tests by not testing it, making the BE code the same
    54575457    as the LE version.
    54585458  Fixes to pngvalid for various reduced build configurations (eliminate unused
     
    55185518    to the LICENSE file, png.h, and the man page.
    55195519  Restored "& 0xff" in png_save_uint_16() and png_save_uint_32() that
    5520     were accidentally removed from libpng-1.6.17. 
     5520    were accidentally removed from libpng-1.6.17.
    55215521  Changed PNG_INFO_cHNK and PNG_FREE_cHNK from 0xnnnn to 0xnnnnU in png.h
    55225522    (Robert C. Seacord).
     
    59285928
    59295929Version 1.6.32beta04 [August 2, 2017]
    5930   Replaced local eXIf_buf with info_ptr-eXIf_buf in png_handle_eXIf().
     5930  Replaced local eXIf_buf with info_ptr->eXIf_buf in png_handle_eXIf().
    59315931  Update libpng.3 and libpng-manual.txt about eXIf functions.
    59325932
     
    59515951    no longer using deprecated cmake LOCATION feature (Clifford Yapp).
    59525952  Fixed five-byte error in the calculation of IDAT maximum possible size.
    5953  
     5953
    59545954Version 1.6.32beta10 [August 5, 2017]
    59555955  Moved chunk-length check into a png_check_chunk_length() private
     
    61046104  Cleaned up various makefiles.
    61056105
     6106Version 1.6.38 [September 14, 2022]
     6107  Added configurations and scripts for continuous integration.
     6108  Fixed various errors in the handling of tRNS, hIST and eXIf.
     6109  Implemented many stability improvements across all platforms.
     6110  Updated the internal documentation.
     6111
     6112Version 1.6.39 [November 20, 2022]
     6113  Changed the error handler of oversized chunks (i.e. larger than
     6114    PNG_USER_CHUNK_MALLOC_MAX) from png_chunk_error to png_benign_error.
     6115  Fixed a buffer overflow error in contrib/tools/pngfix.
     6116  Fixed a memory leak (CVE-2019-6129) in contrib/tools/pngcp.
     6117  Disabled the ARM Neon optimizations by default in the CMake file,
     6118    following the default behavior of the configure script.
     6119  Allowed configure.ac to work with the trunk version of autoconf.
     6120  Removed the support for "install" targets from the legacy makefiles;
     6121    removed the obsolete makefile.cegcc.
     6122  Cleaned up the code and updated the internal documentation.
     6123
     6124Version 1.6.40 [June 21, 2023]
     6125  Fixed the eXIf chunk multiplicity checks.
     6126  Fixed a memory leak in pCAL processing.
     6127  Corrected the validity report about tRNS inside png_get_valid().
     6128  Fixed various build issues on *BSD, Mac and Windows.
     6129  Updated the configurations and the scripts for continuous integration.
     6130  Cleaned up the code, the build scripts, and the documentation.
     6131
     6132Version 1.6.41 [January 24, 2024]
     6133  Added SIMD-optimized code for the Loongarch LSX hardware.
     6134    (Contributed by GuXiWei, JinBo and ZhangLixia)
     6135  Fixed the run-time discovery of MIPS MSA hardware.
     6136    (Contributed by Sui Jingfeng)
     6137  Fixed an off-by-one error in the function png_do_check_palette_indexes(),
     6138    which failed to recognize errors that might have existed in the first
     6139    column of a broken palette-encoded image. This was a benign regression
     6140    accidentally introduced in libpng-1.6.33. No pixel was harmed.
     6141    (Contributed by Adam Richter; reviewed by John Bowler)
     6142  Fixed, improved and modernized the contrib/pngminus programs, i.e.,
     6143    png2pnm.c and pnm2png.c
     6144  Removed old and peculiar portability hacks that were meant to silence
     6145    warnings issued by gcc version 7.1 alone.
     6146    (Contributed by John Bowler)
     6147  Fixed and modernized the CMake file, and raised the minimum required
     6148    CMake version from 3.1 to 3.6.
     6149    (Contributed by Clinton Ingram, Timothy Lyanguzov, Tyler Kropp, et al.)
     6150  Allowed the configure script to disable the building of auxiliary tools
     6151    and tests, thus catching up with the CMake file.
     6152    (Contributed by Carlo Bramini)
     6153  Fixed a build issue on Mac.
     6154    (Contributed by Zixu Wang)
     6155  Moved the Autoconf macro files to scripts/autoconf.
     6156  Moved the CMake files (except for the main CMakeLists.txt) to
     6157    scripts/cmake and moved the list of their contributing authors to
     6158    scripts/cmake/AUTHORS.md
     6159  Updated the CI configurations and scripts.
     6160  Relicensed the CI scripts to the MIT License.
     6161  Improved the test coverage.
     6162    (Contributed by John Bowler)
     6163
     6164Version 1.6.42 [January 29, 2024]
     6165  Fixed the implementation of the macro function png_check_sig().
     6166    This was an API regression, introduced in libpng-1.6.41.
     6167    (Reported by Matthieu Darbois)
     6168
    61066169Send comments/corrections/commendations to png-mng-implement at lists.sf.net.
    61076170Subscription is required; visit
  • trunk/src/libs/libpng-1.6.42/CMakeLists.txt

    r96425 r103316  
    1 # CMakeLists.txt
    2 
    3 # Copyright (C) 2018 Cosmin Truta
    4 # Copyright (C) 2007,2009-2018 Glenn Randers-Pehrson
    5 # Written by Christian Ehrlicher, 2007
    6 # Revised by Roger Lowman, 2009-2010
    7 # Revised by Clifford Yapp, 2011-2012,2017
    8 # Revised by Roger Leigh, 2016
    9 # Revised by Andreas Franek, 2016
    10 # Revised by Sam Serrels, 2017
    11 # Revised by Vadim Barkov, 2017
    12 # Revised by Vicky Pfau, 2018
    13 # Revised by Cameron Cawley, 2018
    14 # Revised by Cosmin Truta, 2018
    15 # Revised by Kyle Bentley, 2018
    16 
    17 # This code is released under the libpng license.
    18 # For conditions of distribution and use, see the disclaimer
    19 # and license in png.h
    20 
    21 cmake_minimum_required(VERSION 3.1)
    22 cmake_policy(VERSION 3.1)
    23 
    24 project(libpng C ASM)
    25 enable_testing()
     1
     2# CMakeLists.txt - CMake lists for libpng
     3#
     4# Copyright (c) 2018-2024 Cosmin Truta.
     5# Copyright (c) 2007-2018 Glenn Randers-Pehrson.
     6# Originally written by Christian Ehrlicher, 2007.
     7#
     8# Use, modification and distribution are subject to
     9# the same licensing terms and conditions as libpng.
     10# Please see the copyright notice in png.h or visit
     11# http://libpng.org/pub/png/src/libpng-LICENSE.txt
     12#
     13# For copyright and licensing purposes, please see
     14# the accompanying file scripts/cmake/AUTHORS.md
     15#
     16# SPDX-License-Identifier: libpng-2.0
     17
     18cmake_minimum_required(VERSION 3.6)
    2619
    2720set(PNGLIB_MAJOR 1)
    2821set(PNGLIB_MINOR 6)
    29 set(PNGLIB_RELEASE 37)
    30 set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
    31 set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
    32 
     22set(PNGLIB_REVISION 41)
     23set(PNGLIB_SUBREVISION 0)
     24#set(PNGLIB_SUBREVISION "git")
     25set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_REVISION})
     26set(PNGLIB_ABI_VERSION ${PNGLIB_MAJOR}${PNGLIB_MINOR})
     27set(PNGLIB_SHARED_VERSION ${PNGLIB_ABI_VERSION}.${PNGLIB_REVISION}.${PNGLIB_SUBREVISION})
     28
     29project(libpng
     30        VERSION ${PNGLIB_VERSION}
     31        LANGUAGES C ASM)
     32
     33if(POLICY CMP0074)
     34  # Allow find_package() to use the ZLIB_ROOT variable, if available.
     35  cmake_policy(SET CMP0074 NEW)
     36endif()
     37
     38include(CheckCSourceCompiles)
    3339include(GNUInstallDirs)
    3440
    35 # needed packages
    36 
    37 # Allow users to specify location of Zlib.
    38 # Useful if zlib is being built alongside this as a sub-project.
    39 option(PNG_BUILD_ZLIB "Custom zlib Location, else find_package is used" OFF)
    40 
     41# Allow the users to specify an application-specific API prefix for libpng
     42# vendoring purposes. A standard libpng build should have no such prefix.
     43set(PNG_PREFIX ""
     44    CACHE STRING "Prefix to prepend to the API function names")
     45
     46# Allow the users to override the postfix appended to debug library file names.
     47# Previously, we used to set CMAKE_DEBUG_POSTFIX globally. That variable should
     48# not be cached, however, because doing so would affect all projects processed
     49# after libpng, in unexpected and undesirable ways.
     50set(PNG_DEBUG_POSTFIX "d"
     51    CACHE STRING "Postfix to append to library file names under the Debug configuration")
     52
     53# Allow the users to import their own extra configuration settings.
     54set(DFA_XTRA ""
     55    CACHE FILEPATH "File containing extra configuration settings")
     56
     57# Allow the users to switch on/off various library build types.
     58option(PNG_SHARED "Build libpng as a shared library" ON)
     59option(PNG_STATIC "Build libpng as a static library" ON)
     60if(APPLE)
     61  option(PNG_FRAMEWORK "Build libpng as a framework bundle" ON)
     62endif()
     63
     64# 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.
     66option(PNG_TESTS "Build the libpng tests" ON)
     67option(PNG_TOOLS "Build the libpng tools" ON)
     68
     69# Maintain backwards compatibility with the deprecated option PNG_EXECUTABLES.
     70option(PNG_EXECUTABLES "[Deprecated; please use PNG_TOOLS]" ON)
     71if(NOT PNG_EXECUTABLES)
     72  message(DEPRECATION "The option PNG_EXECUTABLES has been deprecated in favour of PNG_TOOLS")
     73  if(PNG_TOOLS)
     74    message(AUTHOR_WARNING
     75            "Setting PNG_TOOLS to ${PNG_EXECUTABLES}, to stay compatible with PNG_EXECUTABLES")
     76    set(PNG_TOOLS "${PNG_EXECUTABLES}")
     77  endif()
     78endif()
     79
     80# Allow the users to configure various compilation options.
     81option(PNG_DEBUG "Enable debug output" OFF)
     82option(PNG_HARDWARE_OPTIMIZATIONS "Enable hardware optimizations" ON)
     83
     84# Allow the users to specify a custom location of zlib.
     85# This option is deprecated, and no longer needed with CMake 3.12 and newer.
     86# Under the CMake policy CMP0074, if zlib is being built alongside libpng as a
     87# subproject, its location can be passed on to CMake via the ZLIB_ROOT variable.
     88option(PNG_BUILD_ZLIB "Custom zlib location, else find_package is used" OFF)
    4189if(NOT PNG_BUILD_ZLIB)
    4290  find_package(ZLIB REQUIRED)
    43   include_directories(${ZLIB_INCLUDE_DIR})
    44 endif()
    45 
    46 if(UNIX AND NOT APPLE AND NOT BEOS AND NOT HAIKU)
     91elseif(POLICY CMP0074)
     92  # TODO: Remove the policy check if CMake version 3.12 or greater becomes the minimum required.
     93  if("x${ZLIB_ROOT}" STREQUAL "x")
     94    message(DEPRECATION
     95            "The option PNG_BUILD_ZLIB has been deprecated; please use ZLIB_ROOT instead")
     96  else()
     97    message(SEND_ERROR
     98            "The option PNG_BUILD_ZLIB=${PNG_BUILD_ZLIB} and "
     99            "the variable ZLIB_ROOT=\"${ZLIB_ROOT}\" are mutually exclusive")
     100  endif()
     101endif()
     102
     103if(UNIX AND NOT APPLE AND NOT BEOS AND NOT HAIKU AND NOT EMSCRIPTEN)
    47104  find_library(M_LIBRARY m)
     105  if(M_LIBRARY)
     106    set(M_LIBRARY m)
     107  else()
     108    set(M_LIBRARY "")
     109  endif()
    48110else()
    49   # libm is not needed and/or not available
    50   set(M_LIBRARY "")
    51 endif()
    52 
    53 # COMMAND LINE OPTIONS
    54 option(PNG_SHARED "Build shared lib" ON)
    55 option(PNG_STATIC "Build static lib" ON)
    56 option(PNG_TESTS  "Build libpng tests" ON)
    57 
    58 # Many more configuration options could be added here
    59 option(PNG_FRAMEWORK "Build OS X framework" OFF)
    60 option(PNG_DEBUG "Build with debug output" OFF)
    61 option(PNG_HARDWARE_OPTIMIZATIONS "Enable hardware optimizations" ON)
    62 
    63 set(PNG_PREFIX "" CACHE STRING "Prefix to add to the API function names")
    64 set(DFA_XTRA "" CACHE FILEPATH "File containing extra configuration settings")
     111  # libm is not available or not needed.
     112endif()
     113
     114# CMake currently sets CMAKE_SYSTEM_PROCESSOR to one of x86_64 or arm64 on macOS,
     115# based upon the OS architecture, not the target architecture. As such, we need
     116# to check CMAKE_OSX_ARCHITECTURES to identify which hardware-specific flags to
     117# enable. Note that this will fail if you attempt to build a universal binary in
     118# a single CMake invocation.
     119if (APPLE AND CMAKE_OSX_ARCHITECTURES)
     120  set(TARGET_ARCH ${CMAKE_OSX_ARCHITECTURES})
     121else()
     122  set(TARGET_ARCH ${CMAKE_SYSTEM_PROCESSOR})
     123endif()
    65124
    66125if(PNG_HARDWARE_OPTIMIZATIONS)
    67126
    68 # set definitions and sources for arm
    69 if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" OR
    70   CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64")
    71   set(PNG_ARM_NEON_POSSIBLE_VALUES check on off)
    72   set(PNG_ARM_NEON "check" CACHE STRING "Enable ARM NEON optimizations:
    73      check: (default) use internal checking code;
    74      off: disable the optimizations;
    75      on: turn on unconditionally.")
    76   set_property(CACHE PNG_ARM_NEON PROPERTY STRINGS
    77      ${PNG_ARM_NEON_POSSIBLE_VALUES})
     127# Set definitions and sources for ARM.
     128if(TARGET_ARCH MATCHES "^(ARM|arm|aarch)")
     129  if(TARGET_ARCH MATCHES "^(ARM64|arm64|aarch64)")
     130    set(PNG_ARM_NEON_POSSIBLE_VALUES on off)
     131    set(PNG_ARM_NEON "on"
     132        CACHE STRING "Enable ARM NEON optimizations: on|off; on is default")
     133  else()
     134    set(PNG_ARM_NEON_POSSIBLE_VALUES check on off)
     135    set(PNG_ARM_NEON "off"
     136        CACHE STRING "Enable ARM NEON optimizations: check|on|off; off is default")
     137  endif()
     138  set_property(CACHE PNG_ARM_NEON
     139               PROPERTY STRINGS ${PNG_ARM_NEON_POSSIBLE_VALUES})
    78140  list(FIND PNG_ARM_NEON_POSSIBLE_VALUES ${PNG_ARM_NEON} index)
    79141  if(index EQUAL -1)
    80     message(FATAL_ERROR
    81             "PNG_ARM_NEON must be one of [${PNG_ARM_NEON_POSSIBLE_VALUES}]")
    82   elseif(NOT ${PNG_ARM_NEON} STREQUAL "off")
     142    message(FATAL_ERROR "PNG_ARM_NEON must be one of [${PNG_ARM_NEON_POSSIBLE_VALUES}]")
     143  elseif(NOT PNG_ARM_NEON STREQUAL "off")
    83144    set(libpng_arm_sources
    84       arm/arm_init.c
    85       arm/filter_neon.S
    86       arm/filter_neon_intrinsics.c
    87       arm/palette_neon_intrinsics.c)
    88 
    89     if(${PNG_ARM_NEON} STREQUAL "on")
     145        arm/arm_init.c
     146        arm/filter_neon_intrinsics.c
     147        arm/palette_neon_intrinsics.c)
     148    if(NOT MSVC)
     149      list(APPEND libpng_arm_sources arm/filter_neon.S)
     150    endif()
     151    if(PNG_ARM_NEON STREQUAL "on")
    90152      add_definitions(-DPNG_ARM_NEON_OPT=2)
    91     elseif(${PNG_ARM_NEON} STREQUAL "check")
     153    elseif(PNG_ARM_NEON STREQUAL "check")
    92154      add_definitions(-DPNG_ARM_NEON_CHECK_SUPPORTED)
    93155    endif()
     
    97159endif()
    98160
    99 # set definitions and sources for powerpc
    100 if(CMAKE_SYSTEM_PROCESSOR MATCHES "^powerpc*" OR
    101    CMAKE_SYSTEM_PROCESSOR MATCHES "^ppc64*")
     161# Set definitions and sources for PowerPC.
     162if(TARGET_ARCH MATCHES "^(powerpc|ppc64)")
    102163  set(PNG_POWERPC_VSX_POSSIBLE_VALUES on off)
    103   set(PNG_POWERPC_VSX "on" CACHE STRING "Enable POWERPC VSX optimizations:
    104      off: disable the optimizations.")
    105   set_property(CACHE PNG_POWERPC_VSX PROPERTY STRINGS
    106      ${PNG_POWERPC_VSX_POSSIBLE_VALUES})
     164  set(PNG_POWERPC_VSX "on"
     165      CACHE STRING "Enable POWERPC VSX optimizations: on|off; on is default")
     166  set_property(CACHE PNG_POWERPC_VSX
     167               PROPERTY STRINGS ${PNG_POWERPC_VSX_POSSIBLE_VALUES})
    107168  list(FIND PNG_POWERPC_VSX_POSSIBLE_VALUES ${PNG_POWERPC_VSX} index)
    108169  if(index EQUAL -1)
    109     message(FATAL_ERROR
    110             "PNG_POWERPC_VSX must be one of [${PNG_POWERPC_VSX_POSSIBLE_VALUES}]")
    111   elseif(NOT ${PNG_POWERPC_VSX} STREQUAL "off")
     170    message(FATAL_ERROR "PNG_POWERPC_VSX must be one of [${PNG_POWERPC_VSX_POSSIBLE_VALUES}]")
     171  elseif(NOT PNG_POWERPC_VSX STREQUAL "off")
    112172    set(libpng_powerpc_sources
    113       powerpc/powerpc_init.c
    114       powerpc/filter_vsx_intrinsics.c)
    115     if(${PNG_POWERPC_VSX} STREQUAL "on")
     173        powerpc/powerpc_init.c
     174        powerpc/filter_vsx_intrinsics.c)
     175    if(PNG_POWERPC_VSX STREQUAL "on")
    116176      add_definitions(-DPNG_POWERPC_VSX_OPT=2)
    117177    endif()
     
    121181endif()
    122182
    123 # set definitions and sources for intel
    124 if(CMAKE_SYSTEM_PROCESSOR MATCHES "^i?86" OR
    125    CMAKE_SYSTEM_PROCESSOR MATCHES "^x86_64*")
     183# Set definitions and sources for Intel.
     184if(TARGET_ARCH MATCHES "^(i[3-6]86|x86|AMD64)")
    126185  set(PNG_INTEL_SSE_POSSIBLE_VALUES on off)
    127   set(PNG_INTEL_SSE "on" CACHE STRING "Enable INTEL_SSE optimizations:
    128      off: disable the optimizations")
    129   set_property(CACHE PNG_INTEL_SSE PROPERTY STRINGS
    130      ${PNG_INTEL_SSE_POSSIBLE_VALUES})
     186  set(PNG_INTEL_SSE "on"
     187      CACHE STRING "Enable INTEL_SSE optimizations: on|off; on is default")
     188  set_property(CACHE PNG_INTEL_SSE
     189               PROPERTY STRINGS ${PNG_INTEL_SSE_POSSIBLE_VALUES})
    131190  list(FIND PNG_INTEL_SSE_POSSIBLE_VALUES ${PNG_INTEL_SSE} index)
    132191  if(index EQUAL -1)
    133     message(FATAL_ERROR
    134             "PNG_INTEL_SSE must be one of [${PNG_INTEL_SSE_POSSIBLE_VALUES}]")
    135   elseif(NOT ${PNG_INTEL_SSE} STREQUAL "off")
     192    message(FATAL_ERROR "PNG_INTEL_SSE must be one of [${PNG_INTEL_SSE_POSSIBLE_VALUES}]")
     193  elseif(NOT PNG_INTEL_SSE STREQUAL "off")
    136194    set(libpng_intel_sources
    137       intel/intel_init.c
    138       intel/filter_sse2_intrinsics.c)
    139     if(${PNG_INTEL_SSE} STREQUAL "on")
     195        intel/intel_init.c
     196        intel/filter_sse2_intrinsics.c)
     197    if(PNG_INTEL_SSE STREQUAL "on")
    140198      add_definitions(-DPNG_INTEL_SSE_OPT=1)
    141199    endif()
     
    145203endif()
    146204
    147 # set definitions and sources for MIPS
    148 if(CMAKE_SYSTEM_PROCESSOR MATCHES "mipsel*" OR
    149    CMAKE_SYSTEM_PROCESSOR MATCHES "mips64el*")
     205# Set definitions and sources for MIPS.
     206if(TARGET_ARCH MATCHES "^(mipsel|mips64el)")
    150207  set(PNG_MIPS_MSA_POSSIBLE_VALUES on off)
    151   set(PNG_MIPS_MSA "on" CACHE STRING "Enable MIPS_MSA optimizations:
    152      off: disable the optimizations")
    153   set_property(CACHE PNG_MIPS_MSA PROPERTY STRINGS
    154      ${PNG_MIPS_MSA_POSSIBLE_VALUES})
    155   list(FIND PNG_MIPS_MSA_POSSIBLE_VALUES ${PNG_MIPS_MSA} index)
    156   if(index EQUAL -1)
    157     message(FATAL_ERROR
    158             "PNG_MIPS_MSA must be one of [${PNG_MIPS_MSA_POSSIBLE_VALUES}]")
    159   elseif(NOT ${PNG_MIPS_MSA} STREQUAL "off")
     208  set(PNG_MIPS_MSA "on"
     209      CACHE STRING "Enable MIPS_MSA optimizations: on|off; on is default")
     210  set_property(CACHE PNG_MIPS_MSA
     211               PROPERTY STRINGS ${PNG_MIPS_MSA_POSSIBLE_VALUES})
     212  list(FIND PNG_MIPS_MSA_POSSIBLE_VALUES ${PNG_MIPS_MSA} index_msa)
     213  if(index_msa EQUAL -1)
     214    message(FATAL_ERROR "PNG_MIPS_MSA must be one of [${PNG_MIPS_MSA_POSSIBLE_VALUES}]")
     215  endif()
     216
     217  set(PNG_MIPS_MMI_POSSIBLE_VALUES on off)
     218  set(PNG_MIPS_MMI "on"
     219      CACHE STRING "Enable MIPS_MMI optimizations: on|off; on is default")
     220  set_property(CACHE PNG_MIPS_MMI
     221               PROPERTY STRINGS ${PNG_MIPS_MMI_POSSIBLE_VALUES})
     222  list(FIND PNG_MIPS_MMI_POSSIBLE_VALUES ${PNG_MIPS_MMI} index_mmi)
     223  if(index_mmi EQUAL -1)
     224    message(FATAL_ERROR "PNG_MIPS_MMI must be one of [${PNG_MIPS_MMI_POSSIBLE_VALUES}]")
     225  endif()
     226
     227  if(PNG_MIPS_MSA STREQUAL "on" AND PNG_MIPS_MMI STREQUAL "on")
    160228    set(libpng_mips_sources
    161       mips/mips_init.c
    162       mips/filter_msa_intrinsics.c)
    163     if(${PNG_MIPS_MSA} STREQUAL "on")
    164       add_definitions(-DPNG_MIPS_MSA_OPT=2)
    165     endif()
    166   else()
     229        mips/mips_init.c
     230        mips/filter_msa_intrinsics.c
     231        mips/filter_mmi_inline_assembly.c)
     232    add_definitions(-DPNG_MIPS_MSA_OPT=2)
     233    add_definitions(-DPNG_MIPS_MMI_OPT=1)
     234  elseif(PNG_MIPS_MSA STREQUAL "on")
     235    set(libpng_mips_sources
     236        mips/mips_init.c
     237        mips/filter_msa_intrinsics.c)
     238    add_definitions(-DPNG_MIPS_MSA_OPT=2)
     239    add_definitions(-DPNG_MIPS_MMI_OPT=0)
     240  elseif(PNG_MIPS_MMI STREQUAL "on")
     241    set(libpng_mips_sources
     242        mips/mips_init.c
     243        mips/filter_mmi_inline_assembly.c)
    167244    add_definitions(-DPNG_MIPS_MSA_OPT=0)
    168   endif()
     245    add_definitions(-DPNG_MIPS_MMI_OPT=1)
     246    else()
     247    add_definitions(-DPNG_MIPS_MSA_OPT=0)
     248    add_definitions(-DPNG_MIPS_MMI_OPT=0)
     249    endif()
    169250endif()
    170251
    171252else(PNG_HARDWARE_OPTIMIZATIONS)
    172253
    173 # set definitions and sources for arm
    174 if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" OR
    175    CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64")
     254# Set definitions and sources for ARM.
     255if(TARGET_ARCH MATCHES "^(ARM|arm|aarch)")
    176256  add_definitions(-DPNG_ARM_NEON_OPT=0)
    177257endif()
    178258
    179 # set definitions and sources for powerpc
    180 if(CMAKE_SYSTEM_PROCESSOR MATCHES "^powerpc*" OR
    181    CMAKE_SYSTEM_PROCESSOR MATCHES "^ppc64*")
     259# Set definitions and sources for PowerPC.
     260if(TARGET_ARCH MATCHES "^(powerpc|ppc64)")
    182261  add_definitions(-DPNG_POWERPC_VSX_OPT=0)
    183262endif()
    184263
    185 # set definitions and sources for intel
    186 if(CMAKE_SYSTEM_PROCESSOR MATCHES "^i?86" OR
    187    CMAKE_SYSTEM_PROCESSOR MATCHES "^x86_64*")
     264# Set definitions and sources for Intel.
     265if(TARGET_ARCH MATCHES "^(i[3-6]86|x86|AMD64)")
    188266  add_definitions(-DPNG_INTEL_SSE_OPT=0)
    189267endif()
    190268
    191 # set definitions and sources for MIPS
    192 if(CMAKE_SYSTEM_PROCESSOR MATCHES "mipsel*" OR
    193    CMAKE_SYSTEM_PROCESSOR MATCHES "mips64el*")
     269# Set definitions and sources for MIPS.
     270if(TARGET_ARCH MATCHES "^(mipsel|mips64el)")
    194271  add_definitions(-DPNG_MIPS_MSA_OPT=0)
    195272endif()
     
    197274endif(PNG_HARDWARE_OPTIMIZATIONS)
    198275
    199 # SET LIBNAME
    200 set(PNG_LIB_NAME png${PNGLIB_MAJOR}${PNGLIB_MINOR})
    201 
    202 # to distinguish between debug and release lib
    203 set(CMAKE_DEBUG_POSTFIX "d")
    204 
    205 include(CheckCSourceCompiles)
    206276option(ld-version-script "Enable linker version script" ON)
    207 if(ld-version-script AND NOT APPLE)
     277if(ld-version-script AND NOT ANDROID AND NOT APPLE)
    208278  # Check if LD supports linker scripts.
    209   file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map" "VERS_1 {
    210         global: sym;
    211         local: *;
    212 };
    213 
    214 VERS_2 {
    215         global: sym2;
    216                 main;
    217 } VERS_1;
     279  file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map" "
     280VERS_1 { global: sym1; local: *; };
     281VERS_2 { global: sym2; main; } VERS_1;
    218282")
    219   set(CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS})
    220   set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-Wl,--version-script='${CMAKE_CURRENT_BINARY_DIR}/conftest.map'")
    221   check_c_source_compiles("void sym(void) {}
     283  set(_SAVED_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
     284  if(NOT CMAKE_HOST_SOLARIS)
     285    # Avoid using CMAKE_SHARED_LIBRARY_C_FLAGS in version script checks on
     286    # Solaris, because of an incompatibility with the Solaris link editor.
     287    list(APPEND CMAKE_REQUIRED_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
     288  endif()
     289  list(APPEND CMAKE_REQUIRED_FLAGS "-Wl,--version-script='${CMAKE_CURRENT_BINARY_DIR}/conftest.map'")
     290  check_c_source_compiles("
     291void sym1(void) {}
    222292void sym2(void) {}
    223 int main(void) {return 0;}
     293int main(void) { return 0; }
    224294" HAVE_LD_VERSION_SCRIPT)
    225295  if(NOT HAVE_LD_VERSION_SCRIPT)
    226     set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE} "-Wl,-M -Wl,${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
    227   check_c_source_compiles("void sym(void) {}
     296    set(CMAKE_REQUIRED_FLAGS ${_SAVED_CMAKE_REQUIRED_FLAGS})
     297    if(NOT CMAKE_HOST_SOLARIS)
     298      # Again, avoid using CMAKE_SHARED_LIBRARY_C_FLAGS in version script
     299      # checks on Solaris.
     300      list(APPEND CMAKE_REQUIRED_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
     301    endif()
     302    list(APPEND CMAKE_REQUIRED_FLAGS "-Wl,-M -Wl,${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
     303    check_c_source_compiles("
     304void sym1(void) {}
    228305void sym2(void) {}
    229 int main(void) {return 0;}
     306int main(void) { return 0; }
    230307" HAVE_SOLARIS_LD_VERSION_SCRIPT)
    231308  endif()
    232   set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE})
     309  set(CMAKE_REQUIRED_FLAGS ${_SAVED_CMAKE_REQUIRED_FLAGS})
    233310  file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
    234311endif()
    235312
    236 # Find symbol prefix.  Likely obsolete and unnecessary with recent
    237 # toolchains (it's not done in many other projects).
    238 function(symbol_prefix)
    239   set(SYMBOL_PREFIX)
    240 
    241   execute_process(COMMAND "${CMAKE_C_COMPILER}" "-E" "-"
    242                   INPUT_FILE /dev/null
    243                   OUTPUT_VARIABLE OUT
    244                   RESULT_VARIABLE STATUS)
    245 
    246   if(CPP_FAIL)
    247     message(WARNING "Failed to run the C preprocessor")
    248   endif()
    249 
    250   string(REPLACE "\n" ";" OUT "${OUT}")
    251   foreach(line ${OUT})
    252     string(REGEX MATCH "^PREFIX=" found_match "${line}")
    253     if(found_match)
    254       string(REGEX REPLACE "^PREFIX=(.*\)" "\\1" prefix "${line}")
    255       string(REGEX MATCH "__USER_LABEL_PREFIX__" found_match "${prefix}")
    256       if(found_match)
    257         string(REGEX REPLACE "(.*)__USER_LABEL_PREFIX__(.*)" "\\1\\2" prefix "${prefix}")
    258       endif()
    259       set(SYMBOL_PREFIX "${prefix}")
    260     endif()
    261   endforeach()
    262 
    263   message(STATUS "Symbol prefix: ${SYMBOL_PREFIX}")
    264   set(SYMBOL_PREFIX "${SYMBOL_PREFIX}" PARENT_SCOPE)
    265 endfunction()
    266 
    267 if(UNIX)
    268   symbol_prefix()
    269 endif()
    270 
    271313find_program(AWK NAMES gawk awk)
    272314
    273315include_directories(${CMAKE_CURRENT_BINARY_DIR})
    274316
    275 if(NOT AWK OR ANDROID)
     317if(NOT AWK OR ANDROID OR IOS)
    276318  # No awk available to generate sources; use pre-built pnglibconf.h
    277319  configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.h.prebuilt
    278320                 ${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h)
    279   add_custom_target(genfiles) # Dummy
     321  add_custom_target(png_genfiles)
    280322else()
    281   include(CMakeParseArguments)
    282   # Generate .chk from .out with awk
     323  # Copy the awk scripts, converting their line endings to Unix (LF)
     324  configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/checksym.awk
     325                 ${CMAKE_CURRENT_BINARY_DIR}/scripts/checksym.awk
     326                 @ONLY
     327                 NEWLINE_STYLE LF)
     328  configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/options.awk
     329                 ${CMAKE_CURRENT_BINARY_DIR}/scripts/options.awk
     330                 @ONLY
     331                 NEWLINE_STYLE LF)
     332  configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/dfn.awk
     333                 ${CMAKE_CURRENT_BINARY_DIR}/scripts/dfn.awk
     334                 @ONLY
     335                 NEWLINE_STYLE LF)
     336
     337  # Generate .chk from .out with awk:
    283338  # generate_chk(INPUT inputfile OUTPUT outputfile [DEPENDS dep1 [dep2...]])
    284339  function(generate_chk)
     
    298353                               "-DINPUT=${_GC_INPUT}"
    299354                               "-DOUTPUT=${_GC_OUTPUT}"
    300                                -P "${CMAKE_CURRENT_BINARY_DIR}/scripts/genchk.cmake"
     355                               -P "${CMAKE_CURRENT_BINARY_DIR}/genchk.cmake"
    301356                       DEPENDS "${_GC_INPUT}" ${_GC_DEPENDS}
    302357                       WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
     
    321376                               "-DINPUT=${_GO_INPUT}"
    322377                               "-DOUTPUT=${_GO_OUTPUT}"
    323                                -P "${CMAKE_CURRENT_BINARY_DIR}/scripts/genout.cmake"
     378                               -P "${CMAKE_CURRENT_BINARY_DIR}/genout.cmake"
    324379                       DEPENDS "${_GO_INPUT}" ${_GO_DEPENDS}
    325380                       WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
     
    340395                       COMMAND "${CMAKE_COMMAND}"
    341396                               "-DOUTPUT=${_GSO_OUTPUT}"
    342                                -P "${CMAKE_CURRENT_BINARY_DIR}/scripts/gensrc.cmake"
     397                               -P "${CMAKE_CURRENT_BINARY_DIR}/gensrc.cmake"
    343398                       DEPENDS ${_GSO_DEPENDS}
    344399                       WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
     
    346401
    347402  # Copy file
    348   function(generate_copy source destination)
    349     add_custom_command(OUTPUT "${destination}"
    350                        COMMAND "${CMAKE_COMMAND}" -E remove "${destination}"
    351                        COMMAND "${CMAKE_COMMAND}" -E copy "${source}"
    352                                                           "${destination}"
    353                        DEPENDS "${source}")
     403  # generate_copy(INPUT inputfile OUTPUT outputfile [DEPENDS dep1 [dep2...]])
     404  function(generate_copy)
     405    set(options)
     406    set(oneValueArgs INPUT OUTPUT)
     407    set(multiValueArgs DEPENDS)
     408    cmake_parse_arguments(_GCO "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
     409    if(NOT _GCO_INPUT)
     410      message(FATAL_ERROR "generate_copy: Missing INPUT argument")
     411    endif()
     412    if(NOT _GCO_OUTPUT)
     413      message(FATAL_ERROR "generate_copy: Missing OUTPUT argument")
     414    endif()
     415
     416    add_custom_command(OUTPUT "${_GCO_OUTPUT}"
     417                       COMMAND "${CMAKE_COMMAND}"
     418                               -E remove "${_GCO_OUTPUT}"
     419                       COMMAND "${CMAKE_COMMAND}"
     420                               -E copy "${_GCO_INPUT}" "${_GCO_OUTPUT}"
     421                       DEPENDS "${source}" ${_GCO_DEPENDS})
    354422  endfunction()
    355423
     
    357425  generate_source(OUTPUT "scripts/pnglibconf.c"
    358426                  DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.dfa"
    359                           "${CMAKE_CURRENT_SOURCE_DIR}/scripts/options.awk"
     427                          "${CMAKE_CURRENT_BINARY_DIR}/scripts/options.awk"
    360428                          "${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h")
     429  add_custom_target(png_scripts_pnglibconf_c
     430                    DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf.c")
    361431
    362432  # Generate pnglibconf.c
    363433  generate_source(OUTPUT "pnglibconf.c"
    364434                  DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.dfa"
    365                           "${CMAKE_CURRENT_SOURCE_DIR}/scripts/options.awk"
     435                          "${CMAKE_CURRENT_BINARY_DIR}/scripts/options.awk"
    366436                          "${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h")
     437  add_custom_target(pnglibconf_c
     438                    DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.c")
    367439
    368440  if(PNG_PREFIX)
     
    375447
    376448  generate_out(INPUT "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.c"
    377                OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out")
     449               OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out"
     450               DEPENDS pnglibconf_c)
     451  add_custom_target(pnglibconf_out
     452                    DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out")
    378453
    379454  # Generate pnglibconf.h
    380455  generate_source(OUTPUT "pnglibconf.h"
    381                   DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out"
     456                  DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out" pnglibconf_out
    382457                          ${PNGLIBCONF_H_EXTRA_DEPENDS})
     458  add_custom_target(pnglibconf_h
     459                    DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h")
    383460
    384461  generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/intprefix.c"
    385462               OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/intprefix.out"
    386                DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h")
     463               DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h" pnglibconf_h)
     464  add_custom_target(png_scripts_intprefix_out
     465                    DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/scripts/intprefix.out")
    387466
    388467  generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/prefix.c"
     
    390469               DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/png.h"
    391470                       "${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h"
    392                        "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out")
     471                       "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out" pnglibconf_out)
     472  add_custom_target(png_scripts_prefix_out
     473                    DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/scripts/prefix.out")
    393474
    394475  # Generate pngprefix.h
    395476  generate_source(OUTPUT "pngprefix.h"
    396477                  DEPENDS ${PNGPREFIX_H_EXTRA_DEPENDS})
     478  add_custom_target(pngprefix_h
     479                    DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pngprefix.h")
    397480
    398481  generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/sym.c"
    399482               OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/sym.out"
    400                DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h")
     483               DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h" pnglibconf_h)
     484  add_custom_target(png_scripts_sym_out
     485                    DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/scripts/sym.out")
    401486
    402487  generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/symbols.c"
     
    405490                       "${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h"
    406491                       "${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.h.prebuilt")
     492  add_custom_target(png_scripts_symbols_out
     493                    DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.out")
    407494
    408495  generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/vers.c"
     
    410497               DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/png.h"
    411498                       "${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h"
    412                        "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h")
     499                       "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h" pnglibconf_h)
     500  add_custom_target(png_scripts_vers_out
     501                    DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/scripts/vers.out")
    413502
    414503  generate_chk(INPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.out"
    415504               OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.chk"
    416                DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/scripts/checksym.awk"
     505               DEPENDS png_scripts_symbols_out
     506                       "${CMAKE_CURRENT_BINARY_DIR}/scripts/checksym.awk"
    417507                       "${CMAKE_CURRENT_SOURCE_DIR}/scripts/symbols.def")
    418508
    419   add_custom_target(symbol-check DEPENDS
    420                     "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.chk")
    421 
    422   generate_copy("${CMAKE_CURRENT_BINARY_DIR}/scripts/sym.out"
    423                 "${CMAKE_CURRENT_BINARY_DIR}/libpng.sym")
    424   generate_copy("${CMAKE_CURRENT_BINARY_DIR}/scripts/vers.out"
    425                 "${CMAKE_CURRENT_BINARY_DIR}/libpng.vers")
    426 
    427   add_custom_target(genvers DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/libpng.vers")
    428   add_custom_target(gensym DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/libpng.sym")
    429 
    430   add_custom_target("genprebuilt"
     509  add_custom_target(png_scripts_symbols_chk
     510                    DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.chk")
     511
     512  generate_copy(INPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/sym.out"
     513                OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/libpng.sym"
     514                DEPENDS png_scripts_sym_out)
     515  generate_copy(INPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/vers.out"
     516                OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/libpng.vers"
     517                DEPENDS png_scripts_vers_out)
     518
     519  add_custom_target(png_genvers
     520                    DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/libpng.vers")
     521  add_custom_target(png_gensym
     522                    DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/libpng.sym")
     523
     524  add_custom_target(png_genprebuilt
    431525                    COMMAND "${CMAKE_COMMAND}"
    432526                            "-DOUTPUT=scripts/pnglibconf.h.prebuilt"
    433                             -P "${CMAKE_CURRENT_BINARY_DIR}/scripts/gensrc.cmake"
     527                            -P "${CMAKE_CURRENT_BINARY_DIR}/gensrc.cmake"
    434528                    WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
    435529
    436   # A single target handles generation of all generated files.  If
    437   # they are depended upon separately by multiple targets, this
    438   # confuses parallel make (it would require a separate top-level
    439   # target for each file to track the dependencies properly).
    440   add_custom_target(genfiles DEPENDS
    441     "${CMAKE_CURRENT_BINARY_DIR}/libpng.sym"
    442     "${CMAKE_CURRENT_BINARY_DIR}/libpng.vers"
    443     "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.c"
     530  # A single target handles generation of all generated files.
     531  add_custom_target(png_genfiles
     532                    DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/libpng.sym" png_gensym
     533                            "${CMAKE_CURRENT_BINARY_DIR}/libpng.vers" png_genvers
     534                            "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.c" pnglibconf_c
     535                            "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h" pnglibconf_h
     536                            "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out" pnglibconf_out
     537                            "${CMAKE_CURRENT_BINARY_DIR}/pngprefix.h" pngprefix_h
     538                            "${CMAKE_CURRENT_BINARY_DIR}/scripts/intprefix.out" png_scripts_intprefix_out
     539                            "${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf.c" png_scripts_pnglibconf_c
     540                            "${CMAKE_CURRENT_BINARY_DIR}/scripts/prefix.out" png_scripts_prefix_out
     541                            "${CMAKE_CURRENT_BINARY_DIR}/scripts/sym.out" png_scripts_sym_out
     542                            "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.chk" png_scripts_symbols_chk
     543                            "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.out" png_scripts_symbols_out
     544                            "${CMAKE_CURRENT_BINARY_DIR}/scripts/vers.out" png_scripts_vers_out)
     545endif(NOT AWK OR ANDROID OR IOS)
     546
     547# List the source code files.
     548set(libpng_public_hdrs
     549    png.h
     550    pngconf.h
    444551    "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h"
    445     "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out"
    446     "${CMAKE_CURRENT_BINARY_DIR}/pngprefix.h"
    447     "${CMAKE_CURRENT_BINARY_DIR}/scripts/intprefix.out"
    448     "${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf.c"
    449     "${CMAKE_CURRENT_BINARY_DIR}/scripts/prefix.out"
    450     "${CMAKE_CURRENT_BINARY_DIR}/scripts/sym.out"
    451     "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.chk"
    452     "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.out"
    453     "${CMAKE_CURRENT_BINARY_DIR}/scripts/vers.out")
    454 endif(NOT AWK OR ANDROID)
    455 
    456 # OUR SOURCES
    457 set(libpng_public_hdrs
    458   png.h
    459   pngconf.h
    460   "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h"
    461552)
    462553set(libpng_private_hdrs
    463   pngpriv.h
    464   pngdebug.h
    465   pnginfo.h
    466   pngstruct.h
     554    pngpriv.h
     555    pngdebug.h
     556    pnginfo.h
     557    pngstruct.h
    467558)
    468 if(AWK AND NOT ANDROID)
     559if(AWK AND NOT ANDROID AND NOT IOS)
    469560  list(APPEND libpng_private_hdrs "${CMAKE_CURRENT_BINARY_DIR}/pngprefix.h")
    470561endif()
    471562set(libpng_sources
    472   ${libpng_public_hdrs}
    473   ${libpng_private_hdrs}
    474   png.c
    475   pngerror.c
    476   pngget.c
    477   pngmem.c
    478   pngpread.c
    479   pngread.c
    480   pngrio.c
    481   pngrtran.c
    482   pngrutil.c
    483   pngset.c
    484   pngtrans.c
    485   pngwio.c
    486   pngwrite.c
    487   pngwtran.c
    488   pngwutil.c
    489   ${libpng_arm_sources}
    490   ${libpng_intel_sources}
    491   ${libpng_mips_sources}
    492   ${libpng_powerpc_sources}
     563    ${libpng_public_hdrs}
     564    ${libpng_private_hdrs}
     565    png.c
     566    pngerror.c
     567    pngget.c
     568    pngmem.c
     569    pngpread.c
     570    pngread.c
     571    pngrio.c
     572    pngrtran.c
     573    pngrutil.c
     574    pngset.c
     575    pngtrans.c
     576    pngwio.c
     577    pngwrite.c
     578    pngwtran.c
     579    pngwutil.c
     580    ${libpng_arm_sources}
     581    ${libpng_intel_sources}
     582    ${libpng_mips_sources}
     583    ${libpng_powerpc_sources}
    493584)
    494585set(pngtest_sources
    495   pngtest.c
     586    pngtest.c
    496587)
    497588set(pngvalid_sources
    498   contrib/libtests/pngvalid.c
     589    contrib/libtests/pngvalid.c
    499590)
    500591set(pngstest_sources
    501   contrib/libtests/pngstest.c
     592    contrib/libtests/pngstest.c
    502593)
    503594set(pngunknown_sources
    504   contrib/libtests/pngunknown.c
     595    contrib/libtests/pngunknown.c
    505596)
    506597set(pngimage_sources
    507   contrib/libtests/pngimage.c
     598    contrib/libtests/pngimage.c
    508599)
    509600set(pngfix_sources
    510   contrib/tools/pngfix.c
     601    contrib/tools/pngfix.c
    511602)
    512603set(png_fix_itxt_sources
    513   contrib/tools/png-fix-itxt.c
     604    contrib/tools/png-fix-itxt.c
    514605)
    515606
    516 if(MSVC)
     607if(MSVC OR (WIN32 AND (CMAKE_C_COMPILER_ID MATCHES "Clang")))
     608  add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
    517609  add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
    518610endif()
     
    522614endif()
    523615
    524 # NOW BUILD OUR TARGET
    525 include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${ZLIB_INCLUDE_DIR})
    526 
    527 unset(PNG_LIB_TARGETS)
     616# Now build our targets.
     617
     618# Initialize the list of libpng library targets.
     619set(PNG_LIBRARY_TARGETS "")
     620
     621# Initialize the libpng library file names.
     622if(UNIX
     623   OR (WIN32 AND NOT CMAKE_SHARED_LIBRARY_PREFIX STREQUAL "")
     624   OR (WIN32 AND NOT CMAKE_STATIC_LIBRARY_PREFIX STREQUAL ""))
     625  # We are on a Unix or Unix-like toolchain like the GNU toolchain on Windows.
     626  # Library file names are expected to have an implicit prefix such as "lib".
     627  # Let CMake prepend and append its usual prefixes and suffixes by default.
     628  set(PNG_SHARED_OUTPUT_NAME "png${PNGLIB_ABI_VERSION}")
     629  set(PNG_STATIC_OUTPUT_NAME "png${PNGLIB_ABI_VERSION}")
     630else()
     631  # We are, most likely, on a Windows toolchain like MSVC, Clang on Windows,
     632  # Borland/Embarcadero, etc. We need to specify the "libpng" name explicitly.
     633  # We also need to use a custom suffix, in order to distinguish between the
     634  # shared import library name and the static library name.
     635  set(PNG_SHARED_OUTPUT_NAME "libpng${PNGLIB_ABI_VERSION}")
     636  set(PNG_STATIC_OUTPUT_NAME "libpng${PNGLIB_ABI_VERSION}_static")
     637endif()
    528638
    529639if(PNG_SHARED)
    530   add_library(png SHARED ${libpng_sources})
    531   set(PNG_LIB_TARGETS png)
    532   set_target_properties(png PROPERTIES OUTPUT_NAME ${PNG_LIB_NAME})
    533   add_dependencies(png genfiles)
    534   if(MSVC)
    535     # msvc does not append 'lib' - do it here to have consistent name
    536     set_target_properties(png PROPERTIES PREFIX "lib")
    537     set_target_properties(png PROPERTIES IMPORT_PREFIX "lib")
    538   endif()
    539   target_link_libraries(png ${ZLIB_LIBRARY} ${M_LIBRARY})
    540 
     640  add_library(png_shared SHARED ${libpng_sources})
     641  add_dependencies(png_shared png_genfiles)
     642  list(APPEND PNG_LIBRARY_TARGETS png_shared)
     643  set_target_properties(png_shared PROPERTIES
     644                        OUTPUT_NAME "${PNG_SHARED_OUTPUT_NAME}"
     645                        DEBUG_POSTFIX "${PNG_DEBUG_POSTFIX}"
     646                        VERSION "${PNGLIB_SHARED_VERSION}"
     647                        SOVERSION "${PNGLIB_ABI_VERSION}")
    541648  if(UNIX AND AWK)
    542649    if(HAVE_LD_VERSION_SCRIPT)
    543       set_target_properties(png PROPERTIES LINK_FLAGS
    544         "-Wl,--version-script='${CMAKE_CURRENT_BINARY_DIR}/libpng.vers'")
     650      set_target_properties(png_shared PROPERTIES
     651                            LINK_FLAGS "-Wl,--version-script='${CMAKE_CURRENT_BINARY_DIR}/libpng.vers'")
    545652    elseif(HAVE_SOLARIS_LD_VERSION_SCRIPT)
    546       set_target_properties(png PROPERTIES LINK_FLAGS
    547         "-Wl,-M -Wl,'${CMAKE_CURRENT_BINARY_DIR}/libpng.vers'")
    548     endif()
    549   endif()
     653      set_target_properties(png_shared PROPERTIES
     654                            LINK_FLAGS "-Wl,-M -Wl,'${CMAKE_CURRENT_BINARY_DIR}/libpng.vers'")
     655    endif()
     656  endif()
     657  if(APPLE)
     658    # Avoid CMake's implicit compile definition "png_shared_EXPORTS".
     659    set_target_properties(png_shared PROPERTIES DEFINE_SYMBOL "")
     660  elseif(WIN32)
     661    # Use the explicit compile definition "PNG_BUILD_DLL" for Windows DLLs.
     662    set_target_properties(png_shared PROPERTIES DEFINE_SYMBOL PNG_BUILD_DLL)
     663  endif()
     664  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})
     669  target_link_libraries(png_shared PUBLIC ZLIB::ZLIB ${M_LIBRARY})
    550670endif()
    551671
    552672if(PNG_STATIC)
    553   # does not work without changing name
    554   set(PNG_LIB_NAME_STATIC png_static)
    555673  add_library(png_static STATIC ${libpng_sources})
    556   add_dependencies(png_static genfiles)
    557   # MSVC doesn't use a different file extension for shared vs. static
    558   # libs.  We are able to change OUTPUT_NAME to remove the _static
    559   # for all other platforms.
    560   if(NOT MSVC)
    561     set_target_properties(png_static PROPERTIES
    562       OUTPUT_NAME "${PNG_LIB_NAME}"
    563       CLEAN_DIRECT_OUTPUT 1)
    564   else()
    565     set_target_properties(png_static PROPERTIES
    566       OUTPUT_NAME "${PNG_LIB_NAME}_static"
    567       CLEAN_DIRECT_OUTPUT 1)
    568   endif()
    569   list(APPEND PNG_LIB_TARGETS png_static)
    570   if(MSVC)
    571     # msvc does not append 'lib' - do it here to have consistent name
    572     set_target_properties(png_static PROPERTIES PREFIX "lib")
    573   endif()
    574   target_link_libraries(png_static ${ZLIB_LIBRARY} ${M_LIBRARY})
    575 endif()
    576 
    577 if(PNG_FRAMEWORK)
    578   set(PNG_LIB_NAME_FRAMEWORK png_framework)
     674  add_dependencies(png_static png_genfiles)
     675  list(APPEND PNG_LIBRARY_TARGETS png_static)
     676  set_target_properties(png_static PROPERTIES
     677                        OUTPUT_NAME "${PNG_STATIC_OUTPUT_NAME}"
     678                        DEBUG_POSTFIX "${PNG_DEBUG_POSTFIX}")
     679  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})
     684  target_link_libraries(png_static PUBLIC ZLIB::ZLIB ${M_LIBRARY})
     685endif()
     686
     687if(PNG_FRAMEWORK AND APPLE)
    579688  add_library(png_framework SHARED ${libpng_sources})
    580   add_dependencies(png_framework genfiles)
    581   list(APPEND PNG_LIB_TARGETS png_framework)
     689  add_dependencies(png_framework png_genfiles)
     690  list(APPEND PNG_LIBRARY_TARGETS png_framework)
    582691  set_target_properties(png_framework PROPERTIES
    583     FRAMEWORK TRUE
    584     FRAMEWORK_VERSION ${PNGLIB_VERSION}
    585     MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${PNGLIB_MAJOR}.${PNGLIB_MINOR}
    586     MACOSX_FRAMEWORK_BUNDLE_VERSION ${PNGLIB_VERSION}
    587     MACOSX_FRAMEWORK_IDENTIFIER org.libpng.libpng
    588     XCODE_ATTRIBUTE_INSTALL_PATH "@rpath"
    589     PUBLIC_HEADER "${libpng_public_hdrs}"
    590     OUTPUT_NAME png)
    591   target_link_libraries(png_framework ${ZLIB_LIBRARY} ${M_LIBRARY})
    592 endif()
    593 
    594 if(NOT PNG_LIB_TARGETS)
    595   message(SEND_ERROR
    596     "No library variant selected to build. "
    597     "Please enable at least one of the following options: "
    598     "PNG_STATIC, PNG_SHARED, PNG_FRAMEWORK")
    599 endif()
    600 
    601 if(PNG_SHARED AND WIN32)
    602   set_target_properties(png PROPERTIES DEFINE_SYMBOL PNG_BUILD_DLL)
    603 endif()
    604 
    605 function(png_add_test)
    606   set(options)
    607   set(oneValueArgs NAME COMMAND)
    608   set(multiValueArgs OPTIONS FILES)
    609   cmake_parse_arguments(_PAT "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
    610 
    611   if(NOT _PAT_NAME)
    612     message(FATAL_ERROR "png_add_test: Missing NAME argument")
    613   endif()
    614   if(NOT _PAT_COMMAND)
    615     message(FATAL_ERROR "png_add_test: Missing COMMAND argument")
    616   endif()
    617 
    618   set(TEST_OPTIONS "${_PAT_OPTIONS}")
    619   set(TEST_FILES "${_PAT_FILES}")
    620 
    621   configure_file("${CMAKE_CURRENT_SOURCE_DIR}/scripts/test.cmake.in"
    622                  "${CMAKE_CURRENT_BINARY_DIR}/tests/${_PAT_NAME}.cmake" @ONLY)
    623   add_test(NAME "${_PAT_NAME}"
    624            COMMAND "${CMAKE_COMMAND}"
    625            "-DLIBPNG=$<TARGET_FILE:png>"
    626            "-DTEST_COMMAND=$<TARGET_FILE:${_PAT_COMMAND}>"
    627            -P "${CMAKE_CURRENT_BINARY_DIR}/tests/${_PAT_NAME}.cmake")
    628 endfunction()
     692                        FRAMEWORK TRUE
     693                        FRAMEWORK_VERSION "${PNGLIB_VERSION}"
     694                        MACOSX_FRAMEWORK_SHORT_VERSION_STRING "${PNGLIB_MAJOR}.${PNGLIB_MINOR}"
     695                        MACOSX_FRAMEWORK_BUNDLE_VERSION "${PNGLIB_VERSION}"
     696                        MACOSX_FRAMEWORK_IDENTIFIER "org.libpng.libpng"
     697                        XCODE_ATTRIBUTE_INSTALL_PATH "@rpath"
     698                        PUBLIC_HEADER "${libpng_public_hdrs}"
     699                        OUTPUT_NAME "png"
     700                        DEBUG_POSTFIX "${PNG_DEBUG_POSTFIX}")
     701  # Avoid CMake's implicit compile definition "-Dpng_framework_EXPORTS".
     702  set_target_properties(png_framework PROPERTIES DEFINE_SYMBOL "")
     703  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})
     708  target_link_libraries(png_framework PUBLIC ZLIB::ZLIB ${M_LIBRARY})
     709endif()
     710
     711if(NOT PNG_LIBRARY_TARGETS)
     712  message(SEND_ERROR "No library variant selected to build. "
     713                     "Please enable at least one of the following options: "
     714                     "PNG_SHARED, PNG_STATIC, PNG_FRAMEWORK")
     715endif()
    629716
    630717if(PNG_TESTS AND PNG_SHARED)
     718  enable_testing()
     719
     720  function(png_add_test)
     721    set(options)
     722    set(oneValueArgs NAME COMMAND)
     723    set(multiValueArgs OPTIONS FILES)
     724    cmake_parse_arguments(_PAT "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
     725    if(NOT _PAT_NAME)
     726      message(FATAL_ERROR "png_add_test: Missing NAME argument")
     727    endif()
     728    if(NOT _PAT_COMMAND)
     729      message(FATAL_ERROR "png_add_test: Missing COMMAND argument")
     730    endif()
     731
     732    set(TEST_OPTIONS "${_PAT_OPTIONS}")
     733    set(TEST_FILES "${_PAT_FILES}")
     734
     735    configure_file("${CMAKE_CURRENT_SOURCE_DIR}/scripts/cmake/test.cmake.in"
     736                   "${CMAKE_CURRENT_BINARY_DIR}/tests/${_PAT_NAME}.cmake"
     737                   @ONLY)
     738    add_test(NAME "${_PAT_NAME}"
     739             COMMAND "${CMAKE_COMMAND}"
     740                     "-DLIBPNG=$<TARGET_FILE:png_shared>"
     741                     "-DTEST_COMMAND=$<TARGET_FILE:${_PAT_COMMAND}>"
     742                     -P "${CMAKE_CURRENT_BINARY_DIR}/tests/${_PAT_NAME}.cmake")
     743  endfunction()
     744
    631745  # Find test PNG files by globbing, but sort lists to ensure
    632746  # consistency between different filesystems.
     
    639753
    640754  add_executable(pngtest ${pngtest_sources})
    641   target_link_libraries(pngtest png)
    642 
    643   png_add_test(NAME pngtest COMMAND pngtest FILES "${PNGTEST_PNG}")
     755  target_link_libraries(pngtest PRIVATE png_shared)
     756
     757  png_add_test(NAME pngtest
     758               COMMAND pngtest
     759               FILES "${PNGTEST_PNG}")
    644760
    645761  add_executable(pngvalid ${pngvalid_sources})
    646   target_link_libraries(pngvalid png)
     762  target_link_libraries(pngvalid PRIVATE png_shared)
    647763
    648764  png_add_test(NAME pngvalid-gamma-16-to-8
    649                COMMAND pngvalid OPTIONS --gamma-16-to-8)
     765               COMMAND pngvalid
     766               OPTIONS --gamma-16-to-8)
    650767  png_add_test(NAME pngvalid-gamma-alpha-mode
    651                COMMAND pngvalid OPTIONS --gamma-alpha-mode)
     768               COMMAND pngvalid
     769               OPTIONS --gamma-alpha-mode)
    652770  png_add_test(NAME pngvalid-gamma-background
    653                COMMAND pngvalid OPTIONS --gamma-background)
     771               COMMAND pngvalid
     772               OPTIONS --gamma-background)
    654773  png_add_test(NAME pngvalid-gamma-expand16-alpha-mode
    655                COMMAND pngvalid OPTIONS --gamma-alpha-mode --expand16)
     774               COMMAND pngvalid
     775               OPTIONS --gamma-alpha-mode --expand16)
    656776  png_add_test(NAME pngvalid-gamma-expand16-background
    657                COMMAND pngvalid OPTIONS --gamma-background --expand16)
     777               COMMAND pngvalid
     778               OPTIONS --gamma-background --expand16)
    658779  png_add_test(NAME pngvalid-gamma-expand16-transform
    659                COMMAND pngvalid OPTIONS --gamma-transform --expand16)
     780               COMMAND pngvalid
     781               OPTIONS --gamma-transform --expand16)
    660782  png_add_test(NAME pngvalid-gamma-sbit
    661                COMMAND pngvalid OPTIONS --gamma-sbit)
     783               COMMAND pngvalid
     784               OPTIONS --gamma-sbit)
    662785  png_add_test(NAME pngvalid-gamma-threshold
    663                COMMAND pngvalid OPTIONS --gamma-threshold)
     786               COMMAND pngvalid
     787               OPTIONS --gamma-threshold)
    664788  png_add_test(NAME pngvalid-gamma-transform
    665                COMMAND pngvalid OPTIONS --gamma-transform)
     789               COMMAND pngvalid
     790               OPTIONS --gamma-transform)
    666791  png_add_test(NAME pngvalid-progressive-interlace-standard
    667                COMMAND pngvalid OPTIONS --standard --progressive-read --interlace)
     792               COMMAND pngvalid
     793               OPTIONS --standard --progressive-read --interlace)
    668794  png_add_test(NAME pngvalid-progressive-size
    669                COMMAND pngvalid OPTIONS --size --progressive-read)
     795               COMMAND pngvalid
     796               OPTIONS --size --progressive-read)
    670797  png_add_test(NAME pngvalid-progressive-standard
    671                COMMAND pngvalid OPTIONS --standard --progressive-read)
     798               COMMAND pngvalid
     799               OPTIONS --standard --progressive-read)
    672800  png_add_test(NAME pngvalid-standard
    673                COMMAND pngvalid OPTIONS --standard)
     801               COMMAND pngvalid
     802               OPTIONS --standard)
    674803  png_add_test(NAME pngvalid-transform
    675                COMMAND pngvalid OPTIONS --transform)
     804               COMMAND pngvalid
     805               OPTIONS --transform)
    676806
    677807  add_executable(pngstest ${pngstest_sources})
    678   target_link_libraries(pngstest png)
     808  target_link_libraries(pngstest PRIVATE png_shared)
    679809
    680810  foreach(gamma_type 1.8 linear none sRGB)
     
    682812      set(PNGSTEST_FILES)
    683813      foreach(test_png ${TEST_PNGS})
    684         string(REGEX MATCH ".*-linear[-.].*" TEST_PNG_LINEAR "${test_png}")
    685         string(REGEX MATCH ".*-sRGB[-.].*" TEST_PNG_SRGB "${test_png}")
    686         string(REGEX MATCH ".*-1.8[-.].*" TEST_PNG_G18 "${test_png}")
    687         string(REGEX MATCH ".*-alpha-.*" TEST_PNG_ALPHA "${test_png}")
     814        string(REGEX MATCH "-linear[-.]" TEST_PNG_LINEAR "${test_png}")
     815        string(REGEX MATCH "-sRGB[-.]" TEST_PNG_SRGB "${test_png}")
     816        string(REGEX MATCH "-1.8[-.]" TEST_PNG_G18 "${test_png}")
     817        string(REGEX MATCH "-alpha-" TEST_PNG_ALPHA "${test_png}")
    688818
    689819        set(TEST_PNG_VALID TRUE)
    690820
    691821        if(TEST_PNG_ALPHA)
    692           if(NOT "${alpha_type}" STREQUAL "alpha")
     822          if(NOT alpha_type STREQUAL "alpha")
    693823            set(TEST_PNG_VALID FALSE)
    694824          endif()
    695825        else()
    696           if("${alpha_type}" STREQUAL "alpha")
     826          if(alpha_type STREQUAL "alpha")
    697827            set(TEST_PNG_VALID FALSE)
    698828          endif()
     
    700830
    701831        if(TEST_PNG_LINEAR)
    702           if(NOT "${gamma_type}" STREQUAL "linear")
     832          if(NOT gamma_type STREQUAL "linear")
    703833            set(TEST_PNG_VALID FALSE)
    704834          endif()
    705835        elseif(TEST_PNG_SRGB)
    706           if(NOT "${gamma_type}" STREQUAL "sRGB")
     836          if(NOT gamma_type STREQUAL "sRGB")
    707837            set(TEST_PNG_VALID FALSE)
    708838          endif()
    709839        elseif(TEST_PNG_G18)
    710           if(NOT "${gamma_type}" STREQUAL "1.8")
     840          if(NOT gamma_type STREQUAL "1.8")
    711841            set(TEST_PNG_VALID FALSE)
    712842          endif()
    713843        else()
    714           if(NOT "${gamma_type}" STREQUAL "none")
     844          if(NOT gamma_type STREQUAL "none")
    715845            set(TEST_PNG_VALID FALSE)
    716846          endif()
     
    731861
    732862  add_executable(pngunknown ${pngunknown_sources})
    733   target_link_libraries(pngunknown png)
    734 
    735   png_add_test(NAME pngunknown-discard COMMAND pngunknown OPTIONS --strict default=discard FILES "${PNGTEST_PNG}")
    736   png_add_test(NAME pngunknown-IDAT COMMAND pngunknown OPTIONS --strict default=discard IDAT=save FILES "${PNGTEST_PNG}")
    737   png_add_test(NAME pngunknown-if-safe COMMAND pngunknown OPTIONS --strict default=if-safe FILES "${PNGTEST_PNG}")
    738   png_add_test(NAME pngunknown-sAPI COMMAND pngunknown OPTIONS --strict bKGD=save cHRM=save gAMA=save all=discard iCCP=save sBIT=save sRGB=save FILES "${PNGTEST_PNG}")
    739   png_add_test(NAME pngunknown-save COMMAND pngunknown OPTIONS --strict default=save FILES "${PNGTEST_PNG}")
    740   png_add_test(NAME pngunknown-sTER COMMAND pngunknown OPTIONS --strict sTER=if-safe FILES "${PNGTEST_PNG}")
    741   png_add_test(NAME pngunknown-vpAg COMMAND pngunknown OPTIONS --strict vpAg=if-safe FILES "${PNGTEST_PNG}")
     863  target_link_libraries(pngunknown PRIVATE png_shared)
     864
     865  png_add_test(NAME pngunknown-discard
     866               COMMAND pngunknown
     867               OPTIONS --strict default=discard
     868               FILES "${PNGTEST_PNG}")
     869  png_add_test(NAME pngunknown-IDAT
     870               COMMAND pngunknown
     871               OPTIONS --strict default=discard IDAT=save
     872               FILES "${PNGTEST_PNG}")
     873  png_add_test(NAME pngunknown-if-safe
     874               COMMAND pngunknown
     875               OPTIONS --strict default=if-safe
     876               FILES "${PNGTEST_PNG}")
     877  png_add_test(NAME pngunknown-sAPI
     878               COMMAND pngunknown
     879               OPTIONS --strict bKGD=save cHRM=save gAMA=save all=discard iCCP=save sBIT=save sRGB=save
     880               FILES "${PNGTEST_PNG}")
     881  png_add_test(NAME pngunknown-save
     882               COMMAND pngunknown
     883               OPTIONS --strict default=save
     884               FILES "${PNGTEST_PNG}")
     885  png_add_test(NAME pngunknown-sTER
     886               COMMAND pngunknown
     887               OPTIONS --strict sTER=if-safe
     888               FILES "${PNGTEST_PNG}")
     889  png_add_test(NAME pngunknown-vpAg
     890               COMMAND pngunknown
     891               OPTIONS --strict vpAg=if-safe
     892               FILES "${PNGTEST_PNG}")
    742893
    743894  add_executable(pngimage ${pngimage_sources})
    744   target_link_libraries(pngimage png)
    745 
    746   png_add_test(NAME pngimage-quick COMMAND pngimage OPTIONS --list-combos --log FILES ${PNGSUITE_PNGS})
    747   png_add_test(NAME pngimage-full COMMAND pngimage OPTIONS --exhaustive --list-combos --log FILES ${PNGSUITE_PNGS})
    748 endif()
    749 
    750 if(PNG_SHARED)
     895  target_link_libraries(pngimage PRIVATE png_shared)
     896
     897  png_add_test(NAME pngimage-quick
     898               COMMAND pngimage
     899               OPTIONS --list-combos --log
     900               FILES ${PNGSUITE_PNGS})
     901  png_add_test(NAME pngimage-full
     902               COMMAND pngimage
     903               OPTIONS --exhaustive --list-combos --log
     904               FILES ${PNGSUITE_PNGS})
     905endif()
     906
     907if(PNG_SHARED AND PNG_TOOLS)
    751908  add_executable(pngfix ${pngfix_sources})
    752   target_link_libraries(pngfix png)
     909  target_link_libraries(pngfix PRIVATE png_shared)
    753910  set(PNG_BIN_TARGETS pngfix)
    754911
    755912  add_executable(png-fix-itxt ${png_fix_itxt_sources})
    756   target_link_libraries(png-fix-itxt ${ZLIB_LIBRARY} ${M_LIBRARY})
     913  target_link_libraries(png-fix-itxt PRIVATE ZLIB::ZLIB ${M_LIBRARY})
    757914  list(APPEND PNG_BIN_TARGETS png-fix-itxt)
    758915endif()
    759916
    760 # Set a variable with CMake code which:
    761 # Creates a symlink from src to dest (if possible) or alternatively
    762 # copies if different.
    763 include(CMakeParseArguments)
    764 
     917# Create a symlink from src to dest (if possible), or, alternatively,
     918# copy src to dest if different.
    765919function(create_symlink DEST_FILE)
    766 
    767   cmake_parse_arguments(S "" "FILE;TARGET" "" ${ARGN})
    768 
    769   if(NOT S_TARGET AND NOT S_FILE)
    770     message(FATAL_ERROR "create_symlink: Missing TARGET or FILE argument")
    771   endif()
    772 
    773   if(S_TARGET AND S_FILE)
    774     message(FATAL_ERROR "create_symlink: Both source file ${S_FILE} and build target ${S_TARGET} arguments are present; can only have one.")
    775   endif()
    776 
    777   if(S_FILE)
     920  cmake_parse_arguments(_SYM "" "FILE;TARGET" "" ${ARGN})
     921  if(NOT _SYM_FILE AND NOT _SYM_TARGET)
     922    message(FATAL_ERROR "create_symlink: Missing FILE or TARGET argument")
     923  endif()
     924  if(_SYM_FILE AND _SYM_TARGET)
     925    message(FATAL_ERROR "create_symlink: "
     926                        "The arguments FILE (${_SYM_FILE}) and TARGET (${_SYM_TARGET}) "
     927                        "are mutually-exclusive")
     928  endif()
     929
     930  if(_SYM_FILE)
    778931    # If we don't need to symlink something that's coming from a build target,
    779932    # we can go ahead and symlink/copy at configure time.
    780933    if(CMAKE_HOST_WIN32 AND NOT CYGWIN)
    781       execute_process(
    782         COMMAND "${CMAKE_COMMAND}" -E copy_if_different ${S_FILE} ${DEST_FILE}
    783         WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
     934      execute_process(COMMAND "${CMAKE_COMMAND}"
     935                              -E copy_if_different
     936                              ${_SYM_FILE} ${DEST_FILE}
     937                      WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
    784938    else()
    785       execute_process(
    786         COMMAND ${CMAKE_COMMAND} -E create_symlink ${S_FILE} ${DEST_FILE}
    787         WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
    788     endif()
    789   endif()
    790 
    791   if(S_TARGET)
    792     # We need to use generator expressions, which can be a bit tricky, so for
    793     # simplicity make the symlink a POST_BUILD step and use the TARGET
     939      execute_process(COMMAND "${CMAKE_COMMAND}"
     940                              -E create_symlink
     941                              ${_SYM_FILE} ${DEST_FILE}
     942                      WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
     943    endif()
     944  endif()
     945
     946  if(_SYM_TARGET)
     947    # We need to use generator expressions, which can be a bit tricky.
     948    # For simplicity, make the symlink a POST_BUILD step, and use the TARGET
    794949    # signature of add_custom_command.
    795950    if(CMAKE_HOST_WIN32 AND NOT CYGWIN)
    796       add_custom_command(TARGET ${S_TARGET} POST_BUILD
    797         COMMAND "${CMAKE_COMMAND}" -E copy_if_different $<TARGET_LINKER_FILE_NAME:${S_TARGET}> $<TARGET_LINKER_FILE_DIR:${S_TARGET}>/${DEST_FILE})
     951      add_custom_command(TARGET ${_SYM_TARGET}
     952                         POST_BUILD
     953                         COMMAND "${CMAKE_COMMAND}"
     954                                 -E copy_if_different
     955                                 $<TARGET_LINKER_FILE_DIR:${_SYM_TARGET}>/$<TARGET_LINKER_FILE_NAME:${_SYM_TARGET}>
     956                                 $<TARGET_LINKER_FILE_DIR:${_SYM_TARGET}>/${DEST_FILE})
    798957    else()
    799       add_custom_command(TARGET ${S_TARGET} POST_BUILD
    800         COMMAND "${CMAKE_COMMAND}" -E create_symlink $<TARGET_LINKER_FILE_NAME:${S_TARGET}> $<TARGET_LINKER_FILE_DIR:${S_TARGET}>/${DEST_FILE})
    801     endif()
    802   endif()
    803 
     958      add_custom_command(TARGET ${_SYM_TARGET}
     959                         POST_BUILD
     960                         COMMAND "${CMAKE_COMMAND}"
     961                                 -E create_symlink
     962                                 $<TARGET_LINKER_FILE_NAME:${_SYM_TARGET}>
     963                                 $<TARGET_LINKER_FILE_DIR:${_SYM_TARGET}>/${DEST_FILE})
     964    endif()
     965  endif()
    804966endfunction()
    805967
    806968# Create source generation scripts.
    807 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/genchk.cmake.in
    808                ${CMAKE_CURRENT_BINARY_DIR}/scripts/genchk.cmake @ONLY)
    809 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/genout.cmake.in
    810                ${CMAKE_CURRENT_BINARY_DIR}/scripts/genout.cmake @ONLY)
    811 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/gensrc.cmake.in
    812                ${CMAKE_CURRENT_BINARY_DIR}/scripts/gensrc.cmake @ONLY)
     969configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/cmake/genchk.cmake.in
     970               ${CMAKE_CURRENT_BINARY_DIR}/genchk.cmake
     971               @ONLY)
     972configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/cmake/genout.cmake.in
     973               ${CMAKE_CURRENT_BINARY_DIR}/genout.cmake
     974               @ONLY)
     975configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/cmake/gensrc.cmake.in
     976               ${CMAKE_CURRENT_BINARY_DIR}/gensrc.cmake
     977               @ONLY)
    813978
    814979# libpng is a library so default to 'lib'
     
    817982endif()
    818983
    819 # CREATE PKGCONFIG FILES
     984# Create pkgconfig files.
    820985# We use the same files like ./configure, so we have to set its vars.
    821 # Only do this on Windows for Cygwin - the files don't make much sense outside
    822 # of a UNIX look-alike.
     986# Only do this on Windows for Cygwin - the files don't make much sense
     987# outside of a UNIX look-alike.
    823988if(NOT WIN32 OR CYGWIN OR MINGW)
    824989  set(prefix      ${CMAKE_INSTALL_PREFIX})
     
    828993  set(LIBS        "-lz -lm")
    829994  configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in
    830     ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc @ONLY)
    831   create_symlink(libpng.pc FILE ${PNGLIB_NAME}.pc)
    832 
     995                 ${CMAKE_CURRENT_BINARY_DIR}/libpng${PNGLIB_ABI_VERSION}.pc
     996                 @ONLY)
     997  create_symlink(libpng.pc FILE libpng${PNGLIB_ABI_VERSION}.pc)
    833998  configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in
    834     ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config @ONLY)
    835   create_symlink(libpng-config FILE ${PNGLIB_NAME}-config)
    836 endif()
    837 
    838 # SET UP LINKS
    839 if(PNG_SHARED)
    840   set_target_properties(png PROPERTIES
    841 #   VERSION 16.${PNGLIB_RELEASE}.1.6.37
    842     VERSION 16.${PNGLIB_RELEASE}.0
    843     SOVERSION 16
    844     CLEAN_DIRECT_OUTPUT 1)
    845 endif()
    846 
    847 # INSTALL
     999                 ${CMAKE_CURRENT_BINARY_DIR}/libpng${PNGLIB_ABI_VERSION}-config
     1000                 @ONLY)
     1001  create_symlink(libpng-config FILE libpng${PNGLIB_ABI_VERSION}-config)
     1002endif()
     1003
     1004# Install.
    8481005if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
    849   install(TARGETS ${PNG_LIB_TARGETS}
     1006  install(TARGETS ${PNG_LIBRARY_TARGETS}
    8501007          EXPORT libpng
    851           RUNTIME DESTINATION bin
     1008          RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
    8521009          LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
    8531010          ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
     
    8561013  if(PNG_SHARED)
    8571014    # Create a symlink for libpng.dll.a => libpng16.dll.a on Cygwin
    858     if(CYGWIN OR MINGW)
    859       create_symlink(libpng${CMAKE_IMPORT_LIBRARY_SUFFIX} TARGET png)
    860       install(FILES $<TARGET_LINKER_FILE_DIR:png>/libpng${CMAKE_IMPORT_LIBRARY_SUFFIX}
    861               DESTINATION ${CMAKE_INSTALL_LIBDIR})
    862     endif()
    863 
    864     if(NOT WIN32)
    865       create_symlink(libpng${CMAKE_SHARED_LIBRARY_SUFFIX} TARGET png)
    866       install(FILES $<TARGET_LINKER_FILE_DIR:png>/libpng${CMAKE_SHARED_LIBRARY_SUFFIX}
     1015    if(NOT WIN32 OR CYGWIN OR MINGW)
     1016      create_symlink(libpng${CMAKE_SHARED_LIBRARY_SUFFIX} TARGET png_shared)
     1017      install(FILES $<TARGET_LINKER_FILE_DIR:png_shared>/libpng${CMAKE_SHARED_LIBRARY_SUFFIX}
    8671018              DESTINATION ${CMAKE_INSTALL_LIBDIR})
    8681019    endif()
     
    8791030
    8801031if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL)
    881   install(FILES ${libpng_public_hdrs} DESTINATION include)
    882   install(FILES ${libpng_public_hdrs} DESTINATION include/${PNGLIB_NAME})
     1032  install(FILES ${libpng_public_hdrs}
     1033          DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
     1034  install(FILES ${libpng_public_hdrs}
     1035          DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libpng${PNGLIB_ABI_VERSION})
    8831036endif()
    8841037if(NOT SKIP_INSTALL_EXECUTABLES AND NOT SKIP_INSTALL_ALL)
    8851038  if(NOT WIN32 OR CYGWIN OR MINGW)
    886     install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config DESTINATION bin)
    887     install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config DESTINATION bin)
     1039    install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config
     1040            DESTINATION ${CMAKE_INSTALL_BINDIR})
     1041    install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng${PNGLIB_ABI_VERSION}-config
     1042            DESTINATION ${CMAKE_INSTALL_BINDIR})
    8881043  endif()
    8891044endif()
     
    8911046if(NOT SKIP_INSTALL_PROGRAMS AND NOT SKIP_INSTALL_ALL)
    8921047  install(TARGETS ${PNG_BIN_TARGETS}
    893           RUNTIME DESTINATION bin)
     1048          RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
    8941049endif()
    8951050
    8961051if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL)
    897   # Install man pages
    898   if(NOT PNG_MAN_DIR)
    899     set(PNG_MAN_DIR "share/man")
    900   endif()
    901   install(FILES libpng.3 libpngpf.3 DESTINATION ${PNG_MAN_DIR}/man3)
    902   install(FILES png.5 DESTINATION ${PNG_MAN_DIR}/man5)
    903   # Install pkg-config files
     1052  # Install the man pages.
     1053  install(FILES libpng.3 libpngpf.3
     1054          DESTINATION ${CMAKE_INSTALL_MANDIR}/man3)
     1055  install(FILES png.5
     1056          DESTINATION ${CMAKE_INSTALL_MANDIR}/man5)
     1057  # Install the pkg-config files.
    9041058  if(NOT CMAKE_HOST_WIN32 OR CYGWIN OR MINGW)
    9051059    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng.pc
    9061060            DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
    9071061    install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config
    908             DESTINATION bin)
    909     install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc
     1062            DESTINATION ${CMAKE_INSTALL_BINDIR})
     1063    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng${PNGLIB_ABI_VERSION}.pc
    9101064            DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
    911     install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config
    912             DESTINATION bin)
     1065    install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng${PNGLIB_ABI_VERSION}-config
     1066            DESTINATION ${CMAKE_INSTALL_BINDIR})
    9131067  endif()
    9141068endif()
     
    9161070# Create an export file that CMake users can include() to import our targets.
    9171071if(NOT SKIP_INSTALL_EXPORT AND NOT SKIP_INSTALL_ALL)
    918   install(EXPORT libpng DESTINATION lib/libpng FILE lib${PNG_LIB_NAME}.cmake)
    919 endif()
    920 
    921 # what's with libpng-manual.txt and all the extra files?
    922 
    923 # UNINSTALL
    924 # do we need this?
    925 
    926 # DIST
    927 # do we need this?
    928 
    929 # to create msvc import lib for mingw compiled shared lib
     1072  install(EXPORT libpng
     1073          DESTINATION ${CMAKE_INSTALL_LIBDIR}/libpng
     1074          FILE libpng${PNGLIB_ABI_VERSION}.cmake)
     1075endif()
     1076
     1077# TODO: Create MSVC import lib for MinGW-compiled shared lib.
    9301078# pexports libpng.dll > libpng.def
    9311079# lib /def:libpng.def /machine:x86
  • trunk/src/libs/libpng-1.6.42/INSTALL

    r96425 r103316  
    129129          *.h, *.c  => libpng source files
    130130          CMakeLists.txt    =>  "cmake" script
     131          ci
     132             ci_*.sh
    131133          configuration files:
    132134             configure.ac, configure, Makefile.am, Makefile.in,
    133135             autogen.sh, config.guess, ltmain.sh, missing, libpng.pc.in,
    134136             libpng-config.in, aclocal.m4, config.h.in, config.sub,
    135              depcomp, install-sh, mkinstalldirs, test-pngtest.sh
     137             depcomp, install-sh, mkinstalldirs, test-pngtest.sh, etc.
    136138          contrib
    137139             arm-neon, conftest, examples, gregbook, libtests, pngminim,
    138140             pngminus, pngsuite, tools, visupng
    139141          projects
    140              cbuilder5, owatcom, visualc71, vstudio, xcode
     142             owatcom, visualc71, vstudio
    141143          scripts
    142144             makefile.*
     
    146148          etc.
    147149      zlib
    148           README, *.h, *.c contrib, etc.
     150          README, *.h, *.c, contrib, etc.
    149151
    150152If the line endings in the files look funny, you may wish to get the other
     
    154156VI. Building with project files
    155157
    156 If you are building libpng with MSVC, you can enter the
    157 libpng projects\visualc71 or vstudio directory and follow the instructions
    158 in README.txt.
    159 
    160 Otherwise enter the zlib directory and follow the instructions in zlib/README,
    161 then come back here and run "configure" or choose the appropriate
    162 makefile.sys in the scripts directory.
     158If you are building libpng with Microsoft Visual Studio, you can enter
     159the directory projects\visualc71 or projects\vstudio and follow the
     160instructions in README.txt.
     161
     162Otherwise, enter the zlib directory and follow the instructions in
     163zlib/README, then come back here and run "configure" or choose the
     164appropriate makefile in the scripts directory.
    163165
    164166VII. Building with makefiles
     
    167169scripts directory into this directory, for example
    168170
    169 MSDOS example:
    170 
    171     copy scripts\makefile.msc makefile
    172     copy scripts\pnglibconf.h.prebuilt pnglibconf.h
    173 
    174171UNIX example:
    175172
    176     cp scripts/makefile.std makefile
    177     cp scripts/pnglibconf.h.prebuilt pnglibconf.h
     173    cp scripts/makefile.std Makefile
     174    make
     175
     176Windows example:
     177
     178    nmake -f scripts\makefile.vcwin32
    178179
    179180Read the makefile to see if you need to change any source or
     
    192193your output with the result shown in contrib/pngsuite/README.
    193194
    194 Most of the makefiles will allow you to run "make install" to
    195 put the library in its final resting place (if you want to
    196 do that, run "make install" in the zlib directory first if necessary).
    197 Some also allow you to run "make test-installed" after you have
    198 run "make install".
    199 
    200 VIII. Configuring libpng for 16-bit platforms
    201 
    202 You will want to look into zconf.h to tell zlib (and thus libpng) that
    203 it cannot allocate more than 64K at a time.  Even if you can, the memory
    204 won't be accessible.  So limit zlib and libpng to 64K by defining MAXSEG_64K.
    205 
    206 IX. Configuring for DOS
     195Most of the makefiles used to allow you to run "make install" to put
     196the library in its final resting place, but that feature is no longer
     197supported.  The only tested and supported manners to install libpng are
     198the conventional build and install procedures driven by the configure
     199script or by the CMake file.
     200
     201VIII. Configuring for DOS and other 16-bit platforms
     202
     203Officially, the support for 16-bit platforms has been removed.
    207204
    208205For DOS users who only have access to the lower 640K, you will
     
    210207call.  See zlib.h or zconf.h in the zlib library for more information.
    211208
    212 X. Configuring for Medium Model
    213 
    214 Libpng's support for medium model has been tested on most of the popular
    215 compilers.  Make sure MAXSEG_64K gets defined, USE_FAR_KEYWORD gets
    216 defined, and FAR gets defined to far in pngconf.h, and you should be
    217 all set.  Everything in the library (except for zlib's structure) is
    218 expecting far data.  You must use the typedefs with the p or pp on
    219 the end for pointers (or at least look at them and be careful).  Make
    220 note that the rows of data are defined as png_bytepp, which is
    221 an "unsigned char far * far *".
    222 
    223 XI. Prepending a prefix to exported symbols
     209You may be or may not be in luck if you target the "large" memory model,
     210but all the smaller models ("small", "compact" and "medium") are known
     211to be unworkable.  For DOS users who have access beyond the lower 640K,
     212a "flat" 32-bit DOS model (such as DJGPP) is strongly recommended.
     213
     214For DOS users who only have access to the lower 640K, you will have to
     215limit zlib's memory usage via a png_set_compression_mem_level() call.
     216You will also have to look into zconf.h to tell zlib (and thus libpng)
     217that it cannot allocate more than 64K at a time.  Even if you can, the
     218memory won't be accessible.  Therefore, you should limit zlib and libpng
     219to 64K by defining MAXSEG_64K.
     220
     221IX. Prepending a prefix to exported symbols
    224222
    225223Starting with libpng-1.6.0, you can configure libpng (when using the
     
    232230the macros to use the modified names.
    233231
    234 XII. Configuring for compiler xxx:
     232X. Configuring for compiler xxx:
    235233
    236234All includes for libpng are in pngconf.h.  If you need to add, change
     
    244242that previously appeared in the public headers.
    245243
    246 XIII. Removing unwanted object code
     244XI. Removing unwanted object code
    247245
    248246There are a bunch of #define's in pngconf.h that control what parts of
     
    283281those sections that are actually used will be loaded into memory.
    284282
    285 XIV. Enabling or disabling hardware optimizations
     283XII. Enabling or disabling hardware optimizations
    286284
    287285Certain hardware capabilities, such as the Intel SSE instructions,
     
    333331    cmake . -DPNG_HARDWARE_OPTIMIZATIONS=no
    334332
    335 XV. Changes to the build and configuration of libpng in libpng-1.5.x
     333XIII. Changes to the build and configuration of libpng in libpng-1.5.x
    336334
    337335Details of internal changes to the library code can be found in the CHANGES
     
    424422that were used to build libpng.
    425423
    426 XVI. Setjmp/longjmp issues
     424XIV. Setjmp/longjmp issues
    427425
    428426Libpng uses setjmp()/longjmp() for error handling.  Unfortunately setjmp()
     
    442440and PNG_SIMPLIFIED_WRITE_SUPPORTED undefined.
    443441
    444 XVII. Common linking failures
     442XV. Common linking failures
    445443
    446444If your application fails to find libpng or zlib entries while linking:
     
    454452  project/vstudio/README.txt.
    455453
    456 XVIII. Other sources of information about libpng:
     454XVI. Other sources of information about libpng:
    457455
    458456Further information can be found in the README and libpng-manual.txt
     
    460458libpng.3 and png.5.
    461459
     460Copyright (c) 2022 Cosmin Truta
    462461Copyright (c) 1998-2002,2006-2016 Glenn Randers-Pehrson
    463462This document is released under the libpng license.
  • trunk/src/libs/libpng-1.6.42/LICENSE

    r96425 r103316  
    55---------------------------------------
    66
    7  * Copyright (c) 1995-2019 The PNG Reference Library Authors.
    8  * Copyright (c) 2018-2019 Cosmin Truta.
     7 * Copyright (c) 1995-2024 The PNG Reference Library Authors.
     8 * Copyright (c) 2018-2024 Cosmin Truta.
    99 * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
    1010 * Copyright (c) 1996-1997 Andreas Dilger.
  • trunk/src/libs/libpng-1.6.42/Makefile.am

    r96425 r103316  
    11# Makefile.am, the source file for Makefile.in (and hence Makefile), is
    22#
    3 # Copyright (c) 2018 Cosmin Truta
     3# Copyright (c) 2018-2024 Cosmin Truta
    44# Copyright (c) 2004-2016 Glenn Randers-Pehrson
    55#
     
    1010PNGLIB_BASENAME= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@
    1111
    12 ACLOCAL_AMFLAGS = -I scripts
     12ACLOCAL_AMFLAGS = -I scripts/autoconf
    1313
    1414# test programs - run on make check, make distcheck
     15if ENABLE_TESTS
    1516check_PROGRAMS= pngtest pngunknown pngstest pngvalid pngimage pngcp
    1617if HAVE_CLOCK_GETTIME
    1718check_PROGRAMS += timepng
    1819endif
     20else
     21check_PROGRAMS=
     22endif
    1923
    2024# Utilities - installed
     25if ENABLE_TOOLS
    2126bin_PROGRAMS= pngfix png-fix-itxt
     27else
     28bin_PROGRAMS=
     29endif
    2230
    2331# This ensures that pnglibconf.h gets built at the start of 'make all' or
     
    3139BUILT_SOURCES = pnglibconf.h
    3240
     41if ENABLE_TESTS
    3342pngtest_SOURCES = pngtest.c
    3443pngtest_LDADD = libpng@PNGLIB_MAJOR@@[email protected]
     
    4958timepng_LDADD = libpng@PNGLIB_MAJOR@@[email protected]
    5059
     60pngcp_SOURCES = contrib/tools/pngcp.c
     61pngcp_LDADD = libpng@PNGLIB_MAJOR@@[email protected]
     62endif
     63
     64if ENABLE_TOOLS
    5165pngfix_SOURCES = contrib/tools/pngfix.c
    5266pngfix_LDADD = libpng@PNGLIB_MAJOR@@[email protected]
    5367
    5468png_fix_itxt_SOURCES = contrib/tools/png-fix-itxt.c
    55 
    56 pngcp_SOURCES = contrib/tools/pngcp.c
    57 pngcp_LDADD = libpng@PNGLIB_MAJOR@@[email protected]
     69endif
    5870
    5971# Generally these are single line shell scripts to run a test with a particular
    6072# set of parameters:
     73if ENABLE_TESTS
    6174TESTS =\
    62    tests/pngtest\
    63    tests/pngtest-badpngs\
     75   tests/pngtest-all\
    6476   tests/pngvalid-gamma-16-to-8 tests/pngvalid-gamma-alpha-mode\
    6577   tests/pngvalid-gamma-background tests/pngvalid-gamma-expand16-alpha-mode\
     
    7789   tests/pngunknown-sTER tests/pngunknown-save tests/pngunknown-vpAg\
    7890   tests/pngimage-quick tests/pngimage-full
     91endif
    7992
    8093# man pages
     
    105118endif
    106119
     120if PNG_MIPS_MMI
     121if !PNG_MIPS_MSA
     122libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += mips/mips_init.c
     123endif
     124libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += mips/filter_mmi_inline_assembly.c
     125endif
     126
    107127if PNG_INTEL_SSE
    108128libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += intel/intel_init.c\
     
    113133libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += powerpc/powerpc_init.c\
    114134        powerpc/filter_vsx_intrinsics.c
     135endif
     136
     137if PNG_LOONGARCH_LSX
     138noinst_LTLIBRARIES= libpng@PNGLIB_MAJOR@@[email protected]
     139libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_SOURCES = loongarch/loongarch_lsx_init.c\
     140        loongarch/filter_lsx_intrinsics.c
     141libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_CFLAGS = -mlsx
     142libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LIBADD = libpng@PNGLIB_MAJOR@@[email protected]
     143# libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng@PNGLIB_MAJOR@@[email protected]
    115144endif
    116145
     
    135164endif
    136165
     166if PNG_LOONGARCH_LSX
     167  libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES += libpng@PNGLIB_MAJOR@@[email protected]
     168endif
     169
    137170#distribute headers in /usr/include/libpng/*
    138171pkgincludedir= $(includedir)/$(PNGLIB_BASENAME)
     
    151184        ANNOUNCE AUTHORS CHANGES INSTALL LICENSE README TODO TRADEMARK \
    152185        pngtest.png pngbar.png pngnow.png pngbar.jpg autogen.sh \
    153         ${srcdir}/contrib ${srcdir}/projects ${srcdir}/scripts \
     186        ${srcdir}/ci ${srcdir}/contrib ${srcdir}/projects ${srcdir}/scripts \
    154187        $(TESTS) $(XFAIL_TESTS) tests/pngstest \
    155188        CMakeLists.txt example.c libpng-manual.txt
  • trunk/src/libs/libpng-1.6.42/Makefile.in

    r96425 r103316  
    1 # Makefile.in generated by automake 1.16.1 from Makefile.am.
     1# Makefile.in generated by automake 1.16.5 from Makefile.am.
    22# @configure_input@
    33
    4 # Copyright (C) 1994-2018 Free Software Foundation, Inc.
     4# Copyright (C) 1994-2021 Free Software Foundation, Inc.
    55
    66# This Makefile.in is free software; the Free Software Foundation
     
    1717# Makefile.am, the source file for Makefile.in (and hence Makefile), is
    1818#
    19 # Copyright (c) 2018 Cosmin Truta
     19# Copyright (c) 2018-2024 Cosmin Truta
    2020# Copyright (c) 2004-2016 Glenn Randers-Pehrson
    2121#
     
    101101build_triplet = @build@
    102102host_triplet = @host@
    103 check_PROGRAMS = pngtest$(EXEEXT) pngunknown$(EXEEXT) \
    104         pngstest$(EXEEXT) pngvalid$(EXEEXT) pngimage$(EXEEXT) \
    105         pngcp$(EXEEXT) $(am__EXEEXT_1)
    106 @HAVE_CLOCK_GETTIME_TRUE@am__append_1 = timepng
    107 bin_PROGRAMS = pngfix$(EXEEXT) png-fix-itxt$(EXEEXT)
     103@ENABLE_TESTS_TRUE@check_PROGRAMS = pngtest$(EXEEXT) \
     104@ENABLE_TESTS_TRUE@     pngunknown$(EXEEXT) pngstest$(EXEEXT) \
     105@ENABLE_TESTS_TRUE@     pngvalid$(EXEEXT) pngimage$(EXEEXT) \
     106@ENABLE_TESTS_TRUE@     pngcp$(EXEEXT) $(am__EXEEXT_1)
     107@ENABLE_TESTS_TRUE@@HAVE_CLOCK_GETTIME_TRUE@am__append_1 = timepng
     108@ENABLE_TOOLS_TRUE@bin_PROGRAMS = pngfix$(EXEEXT) \
     109@ENABLE_TOOLS_TRUE@     png-fix-itxt$(EXEEXT)
    108110@PNG_ARM_NEON_TRUE@am__append_2 = arm/arm_init.c\
    109111@PNG_ARM_NEON_TRUE@     arm/filter_neon.S arm/filter_neon_intrinsics.c \
     
    113115@PNG_MIPS_MSA_TRUE@     mips/filter_msa_intrinsics.c
    114116
    115 @PNG_INTEL_SSE_TRUE@am__append_4 = intel/intel_init.c\
     117@PNG_MIPS_MMI_TRUE@@PNG_MIPS_MSA_FALSE@am__append_4 = mips/mips_init.c
     118@PNG_MIPS_MMI_TRUE@am__append_5 = mips/filter_mmi_inline_assembly.c
     119@PNG_INTEL_SSE_TRUE@am__append_6 = intel/intel_init.c\
    116120@PNG_INTEL_SSE_TRUE@    intel/filter_sse2_intrinsics.c
    117121
    118 @PNG_POWERPC_VSX_TRUE@am__append_5 = powerpc/powerpc_init.c\
     122@PNG_POWERPC_VSX_TRUE@am__append_7 = powerpc/powerpc_init.c\
    119123@PNG_POWERPC_VSX_TRUE@        powerpc/filter_vsx_intrinsics.c
    120124
    121125
    122126#   Versioned symbols and restricted exports
    123 @HAVE_LD_VERSION_SCRIPT_TRUE@@HAVE_SOLARIS_LD_TRUE@am__append_6 = -Wl,-M -Wl,libpng.vers
    124 @HAVE_LD_VERSION_SCRIPT_TRUE@@HAVE_SOLARIS_LD_FALSE@am__append_7 = -Wl,--version-script=libpng.vers
     127@HAVE_LD_VERSION_SCRIPT_TRUE@@HAVE_SOLARIS_LD_TRUE@am__append_8 = -Wl,-M -Wl,libpng.vers
     128@HAVE_LD_VERSION_SCRIPT_TRUE@@HAVE_SOLARIS_LD_FALSE@am__append_9 = -Wl,--version-script=libpng.vers
    125129#   Only restricted exports when possible
    126 @HAVE_LD_VERSION_SCRIPT_FALSE@am__append_8 = -export-symbols libpng.sym
    127 @DO_PNG_PREFIX_TRUE@am__append_9 = -DPNG_PREFIX='@PNG_PREFIX@'
     130@HAVE_LD_VERSION_SCRIPT_FALSE@am__append_10 = -export-symbols libpng.sym
     131@PNG_LOONGARCH_LSX_TRUE@am__append_11 = libpng@PNGLIB_MAJOR@@[email protected]
     132@DO_PNG_PREFIX_TRUE@am__append_12 = -DPNG_PREFIX='@PNG_PREFIX@'
    128133subdir = .
    129134ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
    130 am__aclocal_m4_deps = $(top_srcdir)/scripts/libtool.m4 \
    131         $(top_srcdir)/scripts/ltoptions.m4 \
    132         $(top_srcdir)/scripts/ltsugar.m4 \
    133         $(top_srcdir)/scripts/ltversion.m4 \
    134         $(top_srcdir)/scripts/lt~obsolete.m4 \
     135am__aclocal_m4_deps = $(top_srcdir)/scripts/autoconf/libtool.m4 \
     136        $(top_srcdir)/scripts/autoconf/ltoptions.m4 \
     137        $(top_srcdir)/scripts/autoconf/ltsugar.m4 \
     138        $(top_srcdir)/scripts/autoconf/ltversion.m4 \
     139        $(top_srcdir)/scripts/autoconf/lt~obsolete.m4 \
    135140        $(top_srcdir)/configure.ac
    136141am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
     
    148153        "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(pkgconfigdir)" \
    149154        "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(pkgincludedir)"
    150 @HAVE_CLOCK_GETTIME_TRUE@am__EXEEXT_1 = timepng$(EXEEXT)
     155@ENABLE_TESTS_TRUE@@HAVE_CLOCK_GETTIME_TRUE@am__EXEEXT_1 =  \
     156@ENABLE_TESTS_TRUE@@HAVE_CLOCK_GETTIME_TRUE@    timepng$(EXEEXT)
    151157PROGRAMS = $(bin_PROGRAMS)
    152158am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
     
    177183         $(am__cd) "$$dir" && rm -f $$files; }; \
    178184  }
    179 LTLIBRARIES = $(lib_LTLIBRARIES)
    180 libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LIBADD =
     185LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
    181186am__libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES_DIST = png.c \
    182187        pngerror.c pngget.c pngmem.c pngpread.c pngread.c pngrio.c \
     
    186191        arm/filter_neon.S arm/filter_neon_intrinsics.c \
    187192        arm/palette_neon_intrinsics.c mips/mips_init.c \
    188         mips/filter_msa_intrinsics.c intel/intel_init.c \
    189         intel/filter_sse2_intrinsics.c powerpc/powerpc_init.c \
    190         powerpc/filter_vsx_intrinsics.c
     193        mips/filter_msa_intrinsics.c mips/filter_mmi_inline_assembly.c \
     194        intel/intel_init.c intel/filter_sse2_intrinsics.c \
     195        powerpc/powerpc_init.c powerpc/filter_vsx_intrinsics.c
    191196am__dirstamp = $(am__leading_dot)dirstamp
    192197@PNG_ARM_NEON_TRUE@am__objects_1 = arm/arm_init.lo arm/filter_neon.lo \
     
    195200@PNG_MIPS_MSA_TRUE@am__objects_2 = mips/mips_init.lo \
    196201@PNG_MIPS_MSA_TRUE@     mips/filter_msa_intrinsics.lo
    197 @PNG_INTEL_SSE_TRUE@am__objects_3 = intel/intel_init.lo \
     202@PNG_MIPS_MMI_TRUE@@PNG_MIPS_MSA_FALSE@am__objects_3 =  \
     203@PNG_MIPS_MMI_TRUE@@PNG_MIPS_MSA_FALSE@ mips/mips_init.lo
     204@PNG_MIPS_MMI_TRUE@am__objects_4 = mips/filter_mmi_inline_assembly.lo
     205@PNG_INTEL_SSE_TRUE@am__objects_5 = intel/intel_init.lo \
    198206@PNG_INTEL_SSE_TRUE@    intel/filter_sse2_intrinsics.lo
    199 @PNG_POWERPC_VSX_TRUE@am__objects_4 = powerpc/powerpc_init.lo \
     207@PNG_POWERPC_VSX_TRUE@am__objects_6 = powerpc/powerpc_init.lo \
    200208@PNG_POWERPC_VSX_TRUE@  powerpc/filter_vsx_intrinsics.lo
    201209am_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS = png.lo pngerror.lo \
     
    203211        pngrtran.lo pngrutil.lo pngset.lo pngtrans.lo pngwio.lo \
    204212        pngwrite.lo pngwtran.lo pngwutil.lo $(am__objects_1) \
    205         $(am__objects_2) $(am__objects_3) $(am__objects_4)
     213        $(am__objects_2) $(am__objects_3) $(am__objects_4) \
     214        $(am__objects_5) $(am__objects_6)
    206215nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS =
    207216libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS =  \
     
    217226        $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS) $(LDFLAGS) -o \
    218227        $@
    219 am_png_fix_itxt_OBJECTS = contrib/tools/png-fix-itxt.$(OBJEXT)
     228libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_LIBADD =
     229am__libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_SOURCES_DIST =  \
     230        loongarch/loongarch_lsx_init.c \
     231        loongarch/filter_lsx_intrinsics.c
     232@PNG_LOONGARCH_LSX_TRUE@am_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_OBJECTS = loongarch/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-loongarch_lsx_init.lo \
     233@PNG_LOONGARCH_LSX_TRUE@        loongarch/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-filter_lsx_intrinsics.lo
     234libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_OBJECTS =  \
     235        $(am_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_OBJECTS)
     236libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_LINK = $(LIBTOOL) $(AM_V_lt) \
     237        --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
     238        $(CCLD) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_CFLAGS) \
     239        $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
     240@PNG_LOONGARCH_LSX_TRUE@am_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_rpath =
     241am__png_fix_itxt_SOURCES_DIST = contrib/tools/png-fix-itxt.c
     242@ENABLE_TOOLS_TRUE@am_png_fix_itxt_OBJECTS =  \
     243@ENABLE_TOOLS_TRUE@     contrib/tools/png-fix-itxt.$(OBJEXT)
    220244png_fix_itxt_OBJECTS = $(am_png_fix_itxt_OBJECTS)
    221245png_fix_itxt_LDADD = $(LDADD)
    222 am_pngcp_OBJECTS = contrib/tools/pngcp.$(OBJEXT)
     246am__pngcp_SOURCES_DIST = contrib/tools/pngcp.c
     247@ENABLE_TESTS_TRUE@am_pngcp_OBJECTS = contrib/tools/pngcp.$(OBJEXT)
    223248pngcp_OBJECTS = $(am_pngcp_OBJECTS)
    224 pngcp_DEPENDENCIES = libpng@PNGLIB_MAJOR@@[email protected]
    225 am_pngfix_OBJECTS = contrib/tools/pngfix.$(OBJEXT)
     249@ENABLE_TESTS_TRUE@pngcp_DEPENDENCIES =  \
     250@ENABLE_TESTS_TRUE@     libpng@PNGLIB_MAJOR@@[email protected]
     251am__pngfix_SOURCES_DIST = contrib/tools/pngfix.c
     252@ENABLE_TOOLS_TRUE@am_pngfix_OBJECTS = contrib/tools/pngfix.$(OBJEXT)
    226253pngfix_OBJECTS = $(am_pngfix_OBJECTS)
    227 pngfix_DEPENDENCIES = libpng@PNGLIB_MAJOR@@[email protected]
    228 am_pngimage_OBJECTS = contrib/libtests/pngimage.$(OBJEXT)
     254@ENABLE_TOOLS_TRUE@pngfix_DEPENDENCIES =  \
     255@ENABLE_TOOLS_TRUE@     libpng@PNGLIB_MAJOR@@[email protected]
     256am__pngimage_SOURCES_DIST = contrib/libtests/pngimage.c
     257@ENABLE_TESTS_TRUE@am_pngimage_OBJECTS =  \
     258@ENABLE_TESTS_TRUE@     contrib/libtests/pngimage.$(OBJEXT)
    229259pngimage_OBJECTS = $(am_pngimage_OBJECTS)
    230 pngimage_DEPENDENCIES = libpng@PNGLIB_MAJOR@@[email protected]
    231 am_pngstest_OBJECTS = contrib/libtests/pngstest.$(OBJEXT)
     260@ENABLE_TESTS_TRUE@pngimage_DEPENDENCIES =  \
     261@ENABLE_TESTS_TRUE@     libpng@PNGLIB_MAJOR@@[email protected]
     262am__pngstest_SOURCES_DIST = contrib/libtests/pngstest.c
     263@ENABLE_TESTS_TRUE@am_pngstest_OBJECTS =  \
     264@ENABLE_TESTS_TRUE@     contrib/libtests/pngstest.$(OBJEXT)
    232265pngstest_OBJECTS = $(am_pngstest_OBJECTS)
    233 pngstest_DEPENDENCIES = libpng@PNGLIB_MAJOR@@[email protected]
    234 am_pngtest_OBJECTS = pngtest.$(OBJEXT)
     266@ENABLE_TESTS_TRUE@pngstest_DEPENDENCIES =  \
     267@ENABLE_TESTS_TRUE@     libpng@PNGLIB_MAJOR@@[email protected]
     268am__pngtest_SOURCES_DIST = pngtest.c
     269@ENABLE_TESTS_TRUE@am_pngtest_OBJECTS = pngtest.$(OBJEXT)
    235270pngtest_OBJECTS = $(am_pngtest_OBJECTS)
    236 pngtest_DEPENDENCIES = libpng@PNGLIB_MAJOR@@[email protected]
    237 am_pngunknown_OBJECTS = contrib/libtests/pngunknown.$(OBJEXT)
     271@ENABLE_TESTS_TRUE@pngtest_DEPENDENCIES =  \
     272@ENABLE_TESTS_TRUE@     libpng@PNGLIB_MAJOR@@[email protected]
     273am__pngunknown_SOURCES_DIST = contrib/libtests/pngunknown.c
     274@ENABLE_TESTS_TRUE@am_pngunknown_OBJECTS =  \
     275@ENABLE_TESTS_TRUE@     contrib/libtests/pngunknown.$(OBJEXT)
    238276pngunknown_OBJECTS = $(am_pngunknown_OBJECTS)
    239 pngunknown_DEPENDENCIES = libpng@PNGLIB_MAJOR@@[email protected]
    240 am_pngvalid_OBJECTS = contrib/libtests/pngvalid.$(OBJEXT)
     277@ENABLE_TESTS_TRUE@pngunknown_DEPENDENCIES =  \
     278@ENABLE_TESTS_TRUE@     libpng@PNGLIB_MAJOR@@[email protected]
     279am__pngvalid_SOURCES_DIST = contrib/libtests/pngvalid.c
     280@ENABLE_TESTS_TRUE@am_pngvalid_OBJECTS =  \
     281@ENABLE_TESTS_TRUE@     contrib/libtests/pngvalid.$(OBJEXT)
    241282pngvalid_OBJECTS = $(am_pngvalid_OBJECTS)
    242 pngvalid_DEPENDENCIES = libpng@PNGLIB_MAJOR@@[email protected]
    243 am_timepng_OBJECTS = contrib/libtests/timepng.$(OBJEXT)
     283@ENABLE_TESTS_TRUE@pngvalid_DEPENDENCIES =  \
     284@ENABLE_TESTS_TRUE@     libpng@PNGLIB_MAJOR@@[email protected]
     285am__timepng_SOURCES_DIST = contrib/libtests/timepng.c
     286@ENABLE_TESTS_TRUE@am_timepng_OBJECTS =  \
     287@ENABLE_TESTS_TRUE@     contrib/libtests/timepng.$(OBJEXT)
    244288timepng_OBJECTS = $(am_timepng_OBJECTS)
    245 timepng_DEPENDENCIES = libpng@PNGLIB_MAJOR@@[email protected]
     289@ENABLE_TESTS_TRUE@timepng_DEPENDENCIES =  \
     290@ENABLE_TESTS_TRUE@     libpng@PNGLIB_MAJOR@@[email protected]
    246291SCRIPTS = $(bin_SCRIPTS)
    247292AM_V_P = $(am__v_P_@AM_V@)
     
    281326        intel/$(DEPDIR)/filter_sse2_intrinsics.Plo \
    282327        intel/$(DEPDIR)/intel_init.Plo \
     328        loongarch/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-filter_lsx_intrinsics.Plo \
     329        loongarch/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-loongarch_lsx_init.Plo \
     330        mips/$(DEPDIR)/filter_mmi_inline_assembly.Plo \
    283331        mips/$(DEPDIR)/filter_msa_intrinsics.Plo \
    284332        mips/$(DEPDIR)/mips_init.Plo \
     
    316364SOURCES = $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES) \
    317365        $(nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES) \
     366        $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_SOURCES) \
    318367        $(png_fix_itxt_SOURCES) $(pngcp_SOURCES) $(pngfix_SOURCES) \
    319368        $(pngimage_SOURCES) $(pngstest_SOURCES) $(pngtest_SOURCES) \
     
    321370DIST_SOURCES =  \
    322371        $(am__libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES_DIST) \
    323         $(png_fix_itxt_SOURCES) $(pngcp_SOURCES) $(pngfix_SOURCES) \
    324         $(pngimage_SOURCES) $(pngstest_SOURCES) $(pngtest_SOURCES) \
    325         $(pngunknown_SOURCES) $(pngvalid_SOURCES) $(timepng_SOURCES)
     372        $(am__libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_SOURCES_DIST) \
     373        $(am__png_fix_itxt_SOURCES_DIST) $(am__pngcp_SOURCES_DIST) \
     374        $(am__pngfix_SOURCES_DIST) $(am__pngimage_SOURCES_DIST) \
     375        $(am__pngstest_SOURCES_DIST) $(am__pngtest_SOURCES_DIST) \
     376        $(am__pngunknown_SOURCES_DIST) $(am__pngvalid_SOURCES_DIST) \
     377        $(am__timepng_SOURCES_DIST)
    326378am__can_run_installinfo = \
    327379  case $$AM_UPDATE_INFO_DIR in \
     
    335387DATA = $(pkgconfig_DATA)
    336388HEADERS = $(nodist_pkginclude_HEADERS) $(pkginclude_HEADERS)
    337 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
    338         $(LISP)config.h.in
     389am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \
     390        config.h.in
    339391# Read a list of newline-separated strings from the standard input,
    340392# and print each of them once, without duplicates.  Input order is
     
    353405    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
    354406  done | $(am__uniquify_input)`
    355 ETAGS = etags
    356 CTAGS = ctags
    357 CSCOPE = cscope
    358407AM_RECURSIVE_TARGETS = cscope check recheck
    359408am__tty_colors_dummy = \
     
    512561  bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
    513562  bases=`echo $$bases`
     563AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)'
    514564RECHECK_LOGS = $(TEST_LOGS)
    515565TEST_SUITE_LOG = test-suite.log
     
    551601GZIP_ENV = --best
    552602DIST_TARGETS = dist-xz dist-gzip
     603# Exists only to be overridden by the user if desired.
     604AM_DISTCHECK_DVI_TARGET = dvi
    553605distuninstallcheck_listfiles = find . -type f -print
    554606am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
     
    575627CPP = @CPP@
    576628CPPFLAGS = @CPPFLAGS@
     629CSCOPE = @CSCOPE@
     630CTAGS = @CTAGS@
    577631CYGPATH_W = @CYGPATH_W@
    578632DEFS = @DEFS@
     
    592646ECHO_T = @ECHO_T@
    593647EGREP = @EGREP@
     648ETAGS = @ETAGS@
    594649EXEEXT = @EXEEXT@
    595650FGREP = @FGREP@
     651FILECMD = @FILECMD@
    596652GREP = @GREP@
    597653INSTALL = @INSTALL@
     
    637693PNG_COPTS = @PNG_COPTS@
    638694PNG_PREFIX = @PNG_PREFIX@
    639 POW_LIB = @POW_LIB@
    640695RANLIB = @RANLIB@
    641696SED = @SED@
     
    696751program_transform_name = @program_transform_name@
    697752psdir = @psdir@
     753runstatedir = @runstatedir@
    698754sbindir = @sbindir@
    699755sharedstatedir = @sharedstatedir@
     
    705761top_srcdir = @top_srcdir@
    706762PNGLIB_BASENAME = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@
    707 ACLOCAL_AMFLAGS = -I scripts
     763ACLOCAL_AMFLAGS = -I scripts/autoconf
    708764
    709765# This ensures that pnglibconf.h gets built at the start of 'make all' or
     
    716772# always wrong and always very confusing.
    717773BUILT_SOURCES = pnglibconf.h
    718 pngtest_SOURCES = pngtest.c
    719 pngtest_LDADD = libpng@PNGLIB_MAJOR@@[email protected]
    720 pngvalid_SOURCES = contrib/libtests/pngvalid.c
    721 pngvalid_LDADD = libpng@PNGLIB_MAJOR@@[email protected]
    722 pngstest_SOURCES = contrib/libtests/pngstest.c
    723 pngstest_LDADD = libpng@PNGLIB_MAJOR@@[email protected]
    724 pngunknown_SOURCES = contrib/libtests/pngunknown.c
    725 pngunknown_LDADD = libpng@PNGLIB_MAJOR@@[email protected]
    726 pngimage_SOURCES = contrib/libtests/pngimage.c
    727 pngimage_LDADD = libpng@PNGLIB_MAJOR@@[email protected]
    728 timepng_SOURCES = contrib/libtests/timepng.c
    729 timepng_LDADD = libpng@PNGLIB_MAJOR@@[email protected]
    730 pngfix_SOURCES = contrib/tools/pngfix.c
    731 pngfix_LDADD = libpng@PNGLIB_MAJOR@@[email protected]
    732 png_fix_itxt_SOURCES = contrib/tools/png-fix-itxt.c
    733 pngcp_SOURCES = contrib/tools/pngcp.c
    734 pngcp_LDADD = libpng@PNGLIB_MAJOR@@[email protected]
     774@ENABLE_TESTS_TRUE@pngtest_SOURCES = pngtest.c
     775@ENABLE_TESTS_TRUE@pngtest_LDADD = libpng@PNGLIB_MAJOR@@[email protected]
     776@ENABLE_TESTS_TRUE@pngvalid_SOURCES = contrib/libtests/pngvalid.c
     777@ENABLE_TESTS_TRUE@pngvalid_LDADD = libpng@PNGLIB_MAJOR@@[email protected]
     778@ENABLE_TESTS_TRUE@pngstest_SOURCES = contrib/libtests/pngstest.c
     779@ENABLE_TESTS_TRUE@pngstest_LDADD = libpng@PNGLIB_MAJOR@@[email protected]
     780@ENABLE_TESTS_TRUE@pngunknown_SOURCES = contrib/libtests/pngunknown.c
     781@ENABLE_TESTS_TRUE@pngunknown_LDADD = libpng@PNGLIB_MAJOR@@[email protected]
     782@ENABLE_TESTS_TRUE@pngimage_SOURCES = contrib/libtests/pngimage.c
     783@ENABLE_TESTS_TRUE@pngimage_LDADD = libpng@PNGLIB_MAJOR@@[email protected]
     784@ENABLE_TESTS_TRUE@timepng_SOURCES = contrib/libtests/timepng.c
     785@ENABLE_TESTS_TRUE@timepng_LDADD = libpng@PNGLIB_MAJOR@@[email protected]
     786@ENABLE_TESTS_TRUE@pngcp_SOURCES = contrib/tools/pngcp.c
     787@ENABLE_TESTS_TRUE@pngcp_LDADD = libpng@PNGLIB_MAJOR@@[email protected]
     788@ENABLE_TOOLS_TRUE@pngfix_SOURCES = contrib/tools/pngfix.c
     789@ENABLE_TOOLS_TRUE@pngfix_LDADD = libpng@PNGLIB_MAJOR@@[email protected]
     790@ENABLE_TOOLS_TRUE@png_fix_itxt_SOURCES = contrib/tools/png-fix-itxt.c
    735791
    736792# Generally these are single line shell scripts to run a test with a particular
    737793# set of parameters:
    738 TESTS = \
    739    tests/pngtest\
    740    tests/pngtest-badpngs\
    741    tests/pngvalid-gamma-16-to-8 tests/pngvalid-gamma-alpha-mode\
    742    tests/pngvalid-gamma-background tests/pngvalid-gamma-expand16-alpha-mode\
    743    tests/pngvalid-gamma-expand16-background\
    744    tests/pngvalid-gamma-expand16-transform tests/pngvalid-gamma-sbit\
    745    tests/pngvalid-gamma-threshold tests/pngvalid-gamma-transform\
    746    tests/pngvalid-progressive-size\
    747    tests/pngvalid-progressive-interlace-standard\
    748    tests/pngvalid-transform\
    749    tests/pngvalid-progressive-standard tests/pngvalid-standard\
    750    tests/pngstest-1.8 tests/pngstest-1.8-alpha tests/pngstest-linear\
    751    tests/pngstest-linear-alpha tests/pngstest-none tests/pngstest-none-alpha\
    752    tests/pngstest-sRGB tests/pngstest-sRGB-alpha tests/pngunknown-IDAT\
    753    tests/pngunknown-discard tests/pngunknown-if-safe tests/pngunknown-sAPI\
    754    tests/pngunknown-sTER tests/pngunknown-save tests/pngunknown-vpAg\
    755    tests/pngimage-quick tests/pngimage-full
     794@ENABLE_TESTS_TRUE@TESTS = \
     795@ENABLE_TESTS_TRUE@   tests/pngtest-all\
     796@ENABLE_TESTS_TRUE@   tests/pngvalid-gamma-16-to-8 tests/pngvalid-gamma-alpha-mode\
     797@ENABLE_TESTS_TRUE@   tests/pngvalid-gamma-background tests/pngvalid-gamma-expand16-alpha-mode\
     798@ENABLE_TESTS_TRUE@   tests/pngvalid-gamma-expand16-background\
     799@ENABLE_TESTS_TRUE@   tests/pngvalid-gamma-expand16-transform tests/pngvalid-gamma-sbit\
     800@ENABLE_TESTS_TRUE@   tests/pngvalid-gamma-threshold tests/pngvalid-gamma-transform\
     801@ENABLE_TESTS_TRUE@   tests/pngvalid-progressive-size\
     802@ENABLE_TESTS_TRUE@   tests/pngvalid-progressive-interlace-standard\
     803@ENABLE_TESTS_TRUE@   tests/pngvalid-transform\
     804@ENABLE_TESTS_TRUE@   tests/pngvalid-progressive-standard tests/pngvalid-standard\
     805@ENABLE_TESTS_TRUE@   tests/pngstest-1.8 tests/pngstest-1.8-alpha tests/pngstest-linear\
     806@ENABLE_TESTS_TRUE@   tests/pngstest-linear-alpha tests/pngstest-none tests/pngstest-none-alpha\
     807@ENABLE_TESTS_TRUE@   tests/pngstest-sRGB tests/pngstest-sRGB-alpha tests/pngunknown-IDAT\
     808@ENABLE_TESTS_TRUE@   tests/pngunknown-discard tests/pngunknown-if-safe tests/pngunknown-sAPI\
     809@ENABLE_TESTS_TRUE@   tests/pngunknown-sTER tests/pngunknown-save tests/pngunknown-vpAg\
     810@ENABLE_TESTS_TRUE@   tests/pngimage-quick tests/pngimage-full
    756811
    757812
     
    769824        pngwutil.c png.h pngconf.h pngdebug.h pnginfo.h pngpriv.h \
    770825        pngstruct.h pngusr.dfa $(am__append_2) $(am__append_3) \
    771         $(am__append_4) $(am__append_5)
     826        $(am__append_4) $(am__append_5) $(am__append_6) \
     827        $(am__append_7)
     828@PNG_LOONGARCH_LSX_TRUE@noinst_LTLIBRARIES = libpng@PNGLIB_MAJOR@@[email protected]
     829@PNG_LOONGARCH_LSX_TRUE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_SOURCES = loongarch/loongarch_lsx_init.c\
     830@PNG_LOONGARCH_LSX_TRUE@        loongarch/filter_lsx_intrinsics.c
     831
     832@PNG_LOONGARCH_LSX_TRUE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_CFLAGS = -mlsx
     833@PNG_LOONGARCH_LSX_TRUE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LIBADD = libpng@PNGLIB_MAJOR@@[email protected]
     834# libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng@PNGLIB_MAJOR@@[email protected]
    772835nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = pnglibconf.h
    773836libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS = -no-undefined \
    774837        -export-dynamic -version-number \
    775838        @PNGLIB_MAJOR@@PNGLIB_MINOR@:@PNGLIB_RELEASE@:0 \
    776         $(am__append_6) $(am__append_7) $(am__append_8)
    777 @HAVE_LD_VERSION_SCRIPT_FALSE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.sym
    778 @HAVE_LD_VERSION_SCRIPT_TRUE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.vers
     839        $(am__append_8) $(am__append_9) $(am__append_10)
     840@HAVE_LD_VERSION_SCRIPT_FALSE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES =  \
     841@HAVE_LD_VERSION_SCRIPT_FALSE@  libpng.sym $(am__append_11)
     842@HAVE_LD_VERSION_SCRIPT_TRUE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES =  \
     843@HAVE_LD_VERSION_SCRIPT_TRUE@   libpng.vers $(am__append_11)
    779844pkginclude_HEADERS = png.h pngconf.h
    780845nodist_pkginclude_HEADERS = pnglibconf.h
     
    787852        ANNOUNCE AUTHORS CHANGES INSTALL LICENSE README TODO TRADEMARK \
    788853        pngtest.png pngbar.png pngnow.png pngbar.jpg autogen.sh \
    789         ${srcdir}/contrib ${srcdir}/projects ${srcdir}/scripts \
     854        ${srcdir}/ci ${srcdir}/contrib ${srcdir}/projects ${srcdir}/scripts \
    790855        $(TESTS) $(XFAIL_TESTS) tests/pngstest \
    791856        CMakeLists.txt example.c libpng-manual.txt
     
    810875        -DPNGLIB_VERSION='@PNGLIB_VERSION@' \
    811876        -DSYMBOL_PREFIX='$(SYMBOL_PREFIX)' -DPNG_NO_USE_READ_MACROS \
    812         -DPNG_BUILDING_SYMBOL_TABLE $(am__append_9)
     877        -DPNG_BUILDING_SYMBOL_TABLE $(am__append_12)
    813878
    814879# EXT_LIST is a list of the possibly library directory extensions, this exists
     
    9671032          rm -f $${locs}; \
    9681033        }
     1034
     1035clean-noinstLTLIBRARIES:
     1036        -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
     1037        @list='$(noinst_LTLIBRARIES)'; \
     1038        locs=`for p in $$list; do echo $$p; done | \
     1039              sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
     1040              sort -u`; \
     1041        test -z "$$locs" || { \
     1042          echo rm -f $${locs}; \
     1043          rm -f $${locs}; \
     1044        }
    9691045arm/$(am__dirstamp):
    9701046        @$(MKDIR_P) arm
     
    9881064mips/filter_msa_intrinsics.lo: mips/$(am__dirstamp) \
    9891065        mips/$(DEPDIR)/$(am__dirstamp)
     1066mips/filter_mmi_inline_assembly.lo: mips/$(am__dirstamp) \
     1067        mips/$(DEPDIR)/$(am__dirstamp)
    9901068intel/$(am__dirstamp):
    9911069        @$(MKDIR_P) intel
     
    10111089libpng@PNGLIB_MAJOR@@[email protected]: $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES) $(EXTRA_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES)
    10121090        $(AM_V_CCLD)$(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LINK) -rpath $(libdir) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LIBADD) $(LIBS)
     1091loongarch/$(am__dirstamp):
     1092        @$(MKDIR_P) loongarch
     1093        @: > loongarch/$(am__dirstamp)
     1094loongarch/$(DEPDIR)/$(am__dirstamp):
     1095        @$(MKDIR_P) loongarch/$(DEPDIR)
     1096        @: > loongarch/$(DEPDIR)/$(am__dirstamp)
     1097loongarch/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-loongarch_lsx_init.lo:  \
     1098        loongarch/$(am__dirstamp) loongarch/$(DEPDIR)/$(am__dirstamp)
     1099loongarch/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-filter_lsx_intrinsics.lo:  \
     1100        loongarch/$(am__dirstamp) loongarch/$(DEPDIR)/$(am__dirstamp)
     1101
     1102libpng@PNGLIB_MAJOR@@[email protected]: $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_OBJECTS) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_DEPENDENCIES) $(EXTRA_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_DEPENDENCIES)
     1103        $(AM_V_CCLD)$(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_LINK) $(am_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_rpath) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_OBJECTS) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_LIBADD) $(LIBS)
    10131104contrib/tools/$(am__dirstamp):
    10141105        @$(MKDIR_P) contrib/tools
     
    11201211        -rm -f intel/*.$(OBJEXT)
    11211212        -rm -f intel/*.lo
     1213        -rm -f loongarch/*.$(OBJEXT)
     1214        -rm -f loongarch/*.lo
    11221215        -rm -f mips/*.$(OBJEXT)
    11231216        -rm -f mips/*.lo
     
    11581251@AMDEP_TRUE@@am__include@ @am__quote@intel/$(DEPDIR)/filter_sse2_intrinsics.Plo@am__quote@ # am--include-marker
    11591252@AMDEP_TRUE@@am__include@ @am__quote@intel/$(DEPDIR)/intel_init.Plo@am__quote@ # am--include-marker
     1253@AMDEP_TRUE@@am__include@ @am__quote@loongarch/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-filter_lsx_intrinsics.Plo@am__quote@ # am--include-marker
     1254@AMDEP_TRUE@@am__include@ @am__quote@loongarch/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-loongarch_lsx_init.Plo@am__quote@ # am--include-marker
     1255@AMDEP_TRUE@@am__include@ @am__quote@mips/$(DEPDIR)/filter_mmi_inline_assembly.Plo@am__quote@ # am--include-marker
    11601256@AMDEP_TRUE@@am__include@ @am__quote@mips/$(DEPDIR)/filter_msa_intrinsics.Plo@am__quote@ # am--include-marker
    11611257@AMDEP_TRUE@@am__include@ @am__quote@mips/$(DEPDIR)/mips_init.Plo@am__quote@ # am--include-marker
     
    12171313@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
    12181314
     1315loongarch/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-loongarch_lsx_init.lo: loongarch/loongarch_lsx_init.c
     1316@am__fastdepCC_TRUE@    $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_CFLAGS) $(CFLAGS) -MT loongarch/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-loongarch_lsx_init.lo -MD -MP -MF loongarch/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-loongarch_lsx_init.Tpo -c -o loongarch/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-loongarch_lsx_init.lo `test -f 'loongarch/loongarch_lsx_init.c' || echo '$(srcdir)/'`loongarch/loongarch_lsx_init.c
     1317@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) loongarch/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-loongarch_lsx_init.Tpo loongarch/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-loongarch_lsx_init.Plo
     1318@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='loongarch/loongarch_lsx_init.c' object='loongarch/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-loongarch_lsx_init.lo' libtool=yes @AMDEPBACKSLASH@
     1319@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1320@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_CFLAGS) $(CFLAGS) -c -o loongarch/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-loongarch_lsx_init.lo `test -f 'loongarch/loongarch_lsx_init.c' || echo '$(srcdir)/'`loongarch/loongarch_lsx_init.c
     1321
     1322loongarch/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-filter_lsx_intrinsics.lo: loongarch/filter_lsx_intrinsics.c
     1323@am__fastdepCC_TRUE@    $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_CFLAGS) $(CFLAGS) -MT loongarch/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-filter_lsx_intrinsics.lo -MD -MP -MF loongarch/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-filter_lsx_intrinsics.Tpo -c -o loongarch/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-filter_lsx_intrinsics.lo `test -f 'loongarch/filter_lsx_intrinsics.c' || echo '$(srcdir)/'`loongarch/filter_lsx_intrinsics.c
     1324@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) loongarch/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-filter_lsx_intrinsics.Tpo loongarch/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-filter_lsx_intrinsics.Plo
     1325@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='loongarch/filter_lsx_intrinsics.c' object='loongarch/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-filter_lsx_intrinsics.lo' libtool=yes @AMDEPBACKSLASH@
     1326@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1327@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_CFLAGS) $(CFLAGS) -c -o loongarch/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-filter_lsx_intrinsics.lo `test -f 'loongarch/filter_lsx_intrinsics.c' || echo '$(srcdir)/'`loongarch/filter_lsx_intrinsics.c
     1328
    12191329mostlyclean-libtool:
    12201330        -rm -f *.lo
     
    12241334        -rm -rf arm/.libs arm/_libs
    12251335        -rm -rf intel/.libs intel/_libs
     1336        -rm -rf loongarch/.libs loongarch/_libs
    12261337        -rm -rf mips/.libs mips/_libs
    12271338        -rm -rf powerpc/.libs powerpc/_libs
     
    15451656        fi;                                                             \
    15461657        echo "$${col}$$br$${std}";                                      \
    1547         echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}";   \
     1658        echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \
    15481659        echo "$${col}$$br$${std}";                                      \
    15491660        create_testsuite_report --maybe-color;                          \
     
    15791690                TEST_LOGS="$$log_list"; \
    15801691        exit $$?
    1581 tests/pngtest.log: tests/pngtest
    1582         @p='tests/pngtest'; \
    1583         b='tests/pngtest'; \
    1584         $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
    1585         --log-file $$b.log --trs-file $$b.trs \
    1586         $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
    1587         "$$tst" $(AM_TESTS_FD_REDIRECT)
    1588 tests/pngtest-badpngs.log: tests/pngtest-badpngs
    1589         @p='tests/pngtest-badpngs'; \
    1590         b='tests/pngtest-badpngs'; \
     1692tests/pngtest-all.log: tests/pngtest-all
     1693        @p='tests/pngtest-all'; \
     1694        b='tests/pngtest-all'; \
    15911695        $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
    15921696        --log-file $$b.log --trs-file $$b.trs \
     
    18241928@am__EXEEXT_TRUE@       $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
    18251929@am__EXEEXT_TRUE@       "$$tst" $(AM_TESTS_FD_REDIRECT)
    1826 
    18271930distdir: $(BUILT_SOURCES)
    18281931        $(MAKE) $(AM_MAKEFLAGS) distdir-am
     
    18851988        $(am__post_remove_distdir)
    18861989
     1990dist-zstd: distdir
     1991        tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst
     1992        $(am__post_remove_distdir)
     1993
    18871994dist-tarZ: distdir
    18881995        @echo WARNING: "Support for distribution archives compressed with" \
     
    19272034        *.zip*) \
    19282035          unzip $(distdir).zip ;;\
     2036        *.tar.zst*) \
     2037          zstd -dc $(distdir).tar.zst | $(am__untar) ;;\
    19292038        esac
    19302039        chmod -R a-w $(distdir)
     
    19422051            --srcdir=../.. --prefix="$$dc_install_base" \
    19432052          && $(MAKE) $(AM_MAKEFLAGS) \
    1944           && $(MAKE) $(AM_MAKEFLAGS) dvi \
     2053          && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \
    19452054          && $(MAKE) $(AM_MAKEFLAGS) check \
    19462055          && $(MAKE) $(AM_MAKEFLAGS) install \
     
    20022111install-binPROGRAMS: install-libLTLIBRARIES
    20032112
     2113install-checkPROGRAMS: install-libLTLIBRARIES
     2114
    20042115installdirs:
    20052116        for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(pkgincludedir)"; do \
     
    20082119install: $(BUILT_SOURCES)
    20092120        $(MAKE) $(AM_MAKEFLAGS) install-am
    2010 install-exec: install-exec-am
     2121install-exec: $(BUILT_SOURCES)
     2122        $(MAKE) $(AM_MAKEFLAGS) install-exec-am
    20112123install-data: install-data-am
    20122124uninstall: uninstall-am
     
    20452157        -rm -f intel/$(DEPDIR)/$(am__dirstamp)
    20462158        -rm -f intel/$(am__dirstamp)
     2159        -rm -f loongarch/$(DEPDIR)/$(am__dirstamp)
     2160        -rm -f loongarch/$(am__dirstamp)
    20472161        -rm -f mips/$(DEPDIR)/$(am__dirstamp)
    20482162        -rm -f mips/$(am__dirstamp)
     
    20612175
    20622176clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
    2063         clean-libLTLIBRARIES clean-libtool mostlyclean-am
     2177        clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \
     2178        mostlyclean-am
    20642179
    20652180distclean: distclean-am
     
    20952210        -rm -f intel/$(DEPDIR)/filter_sse2_intrinsics.Plo
    20962211        -rm -f intel/$(DEPDIR)/intel_init.Plo
     2212        -rm -f loongarch/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-filter_lsx_intrinsics.Plo
     2213        -rm -f loongarch/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-loongarch_lsx_init.Plo
     2214        -rm -f mips/$(DEPDIR)/filter_mmi_inline_assembly.Plo
    20972215        -rm -f mips/$(DEPDIR)/filter_msa_intrinsics.Plo
    20982216        -rm -f mips/$(DEPDIR)/mips_init.Plo
     
    21802298        -rm -f intel/$(DEPDIR)/filter_sse2_intrinsics.Plo
    21812299        -rm -f intel/$(DEPDIR)/intel_init.Plo
     2300        -rm -f loongarch/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-filter_lsx_intrinsics.Plo
     2301        -rm -f loongarch/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-loongarch_lsx_init.Plo
     2302        -rm -f mips/$(DEPDIR)/filter_mmi_inline_assembly.Plo
    21822303        -rm -f mips/$(DEPDIR)/filter_msa_intrinsics.Plo
    21832304        -rm -f mips/$(DEPDIR)/mips_init.Plo
     
    22092330
    22102331.MAKE: all check check-am install install-am install-data-am \
    2211         install-exec-am install-strip uninstall-am
     2332        install-exec install-exec-am install-strip uninstall-am
    22122333
    22132334.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles am--refresh check \
    22142335        check-TESTS check-am clean clean-binPROGRAMS \
    22152336        clean-checkPROGRAMS clean-cscope clean-generic \
    2216         clean-libLTLIBRARIES clean-libtool cscope cscopelist-am ctags \
    2217         ctags-am dist dist-all dist-bzip2 dist-gzip dist-hook \
    2218         dist-lzip dist-shar dist-tarZ dist-xz dist-zip distcheck \
    2219         distclean distclean-compile distclean-generic distclean-hdr \
    2220         distclean-libtool distclean-tags distcleancheck distdir \
    2221         distuninstallcheck dvi dvi-am html html-am info info-am \
    2222         install install-am install-binPROGRAMS install-binSCRIPTS \
    2223         install-data install-data-am install-data-hook install-dvi \
    2224         install-dvi-am install-exec install-exec-am install-exec-hook \
    2225         install-html install-html-am install-info install-info-am \
     2337        clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \
     2338        cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
     2339        dist-gzip dist-hook dist-lzip dist-shar dist-tarZ dist-xz \
     2340        dist-zip dist-zstd distcheck distclean distclean-compile \
     2341        distclean-generic distclean-hdr distclean-libtool \
     2342        distclean-tags distcleancheck distdir distuninstallcheck dvi \
     2343        dvi-am html html-am info info-am install install-am \
     2344        install-binPROGRAMS install-binSCRIPTS install-data \
     2345        install-data-am install-data-hook install-dvi install-dvi-am \
     2346        install-exec install-exec-am install-exec-hook install-html \
     2347        install-html-am install-info install-info-am \
    22262348        install-libLTLIBRARIES install-man install-man3 install-man5 \
    22272349        install-nodist_pkgincludeHEADERS install-pdf install-pdf-am \
  • trunk/src/libs/libpng-1.6.42/README

    r96425 r103316  
    1 README for libpng version 1.6.37 - April 14, 2019
    2 =================================================
     1README for libpng version 1.6.42
     2================================
    33
    4 See the note about version numbers near the top of png.h.
    5 See INSTALL for instructions on how to install libpng.
     4See the note about version numbers near the top of `png.h`.
     5See `INSTALL` for instructions on how to install libpng.
    66
    7 Libpng comes in several distribution formats.  Get libpng-*.tar.gz or
    8 libpng-*.tar.xz or if you want UNIX-style line endings in the text
    9 files, or lpng*.7z or lpng*.zip if you want DOS-style line endings.
     7Libpng comes in several distribution formats.  Get `libpng-*.tar.gz`
     8or `libpng-*.tar.xz` if you want UNIX-style line endings in the text
     9files, or `lpng*.7z` or `lpng*.zip` if you want DOS-style line endings.
    1010
    11 Version 0.89 was the first official release of libpng.  Don't let the
    12 fact that it's the first release fool you.  The libpng library has been
    13 in extensive use and testing since mid-1995.  By late 1997 it had
    14 finally gotten to the stage where there hadn't been significant
    15 changes to the API in some time, and people have a bad feeling about
    16 libraries with versions < 1.0.  Version 1.0.0 was released in
    17 March 1998.
     11For a detailed description on using libpng, read `libpng-manual.txt`.
     12For examples of libpng in a program, see `example.c` and `pngtest.c`.
     13For usage information and restrictions (what little they are) on libpng,
     14see `png.h`.  For a description on using zlib (the compression library
     15used by libpng) and zlib's restrictions, see `zlib.h`.
    1816
    19 ****
    20 Note that some of the changes to the png_info structure render this
     17You should use zlib 1.0.4 or later to run this, but it _may_ work with
     18versions as old as zlib 0.95.  Even so, there are bugs in older zlib
     19versions which can cause the output of invalid compression streams for
     20some images.
     21
     22You should also note that zlib is a compression library that is useful
     23for more things than just PNG files.  You can use zlib as a drop-in
     24replacement for `fread()` and `fwrite()`, if you are so inclined.
     25
     26zlib should be available at the same place that libpng is, or at
     27https://zlib.net .
     28
     29You may also want a copy of the PNG specification.  It is available
     30as an RFC, a W3C Recommendation, and an ISO/IEC Standard.  You can find
     31these at http://www.libpng.org/pub/png/pngdocs.html .
     32
     33This code is currently being archived at https://libpng.sourceforge.io
     34in the download area, and at http://libpng.download/src .
     35
     36This release, based in a large way on Glenn's, Guy's and Andreas'
     37earlier work, was created and will be supported by myself and the PNG
     38development group.
     39
     40Send comments, corrections and commendations to `png-mng-implement`
     41at `lists.sourceforge.net`.  (Subscription is required; visit
     42https://lists.sourceforge.net/lists/listinfo/png-mng-implement
     43to subscribe.)
     44
     45Send general questions about the PNG specification to `png-mng-misc`
     46at `lists.sourceforge.net`.  (Subscription is required; visit
     47https://lists.sourceforge.net/lists/listinfo/png-mng-misc
     48to subscribe.)
     49
     50Historical notes
     51----------------
     52
     53The libpng library has been in extensive use and testing since mid-1995.
     54Version 0.89, published a year later, was the first official release.
     55By late 1997, it had finally gotten to the stage where there hadn't
     56been significant changes to the API in some time, and people have a bad
     57feeling about libraries with versions below 1.0.  Version 1.0.0 was
     58released in March 1998.
     59
     60Note that some of the changes to the `png_info` structure render this
    2161version of the library binary incompatible with libpng-0.89 or
    2262earlier versions if you are using a shared library.  The type of the
    23 "filler" parameter for png_set_filler() has changed from png_byte to
    24 png_uint_32, which will affect shared-library applications that use
    25 this function.
     63`filler` parameter for `png_set_filler()` has changed from `png_byte`
     64to `png_uint_32`, which will affect shared-library applications that
     65use this function.
    2666
    27 To avoid problems with changes to the internals of the png info_struct,
     67To avoid problems with changes to the internals of the `info_struct`,
    2868new APIs have been made available in 0.95 to avoid direct application
    29 access to info_ptr.  These functions are the png_set_<chunk> and
    30 png_get_<chunk> functions.  These functions should be used when
    31 accessing/storing the info_struct data, rather than manipulating it
     69access to `info_ptr`.  These functions are the `png_set_<chunk>` and
     70`png_get_<chunk>` functions.  These functions should be used when
     71accessing/storing the `info_struct` data, rather than manipulating it
    3272directly, to avoid such problems in the future.
    3373
     
    3575that access the info struct directly incompatible with the new
    3676library, through libpng-1.2.x.  In libpng-1.4.x, which was meant to
    37 be a transitional release, members of the png_struct and the
    38 info_struct can still be accessed, but the compiler will issue a
     77be a transitional release, members of the `png_struct` and the
     78`info_struct` can still be accessed, but the compiler will issue a
    3979warning about deprecated usage.  Since libpng-1.5.0, direct access
    4080to these structs is not allowed, and the definitions of the structs
    41 reside in private pngstruct.h and pnginfo.h header files that are not
    42 accessible to applications.  It is strongly suggested that new
    43 programs use the new APIs (as shown in example.c and pngtest.c), and
    44 older programs be converted to the new format, to facilitate upgrades
    45 in the future.
    46 ****
    47 
    48 Additions since 0.90 include the ability to compile libpng as a
    49 Windows DLL, and new APIs for accessing data in the info struct.
    50 Experimental functions include the ability to set weighting and cost
    51 factors for row filter selection, direct reads of integers from buffers
    52 on big-endian processors that support misaligned data access, faster
    53 methods of doing alpha composition, and more accurate 16->8 bit color
    54 conversion.
     81reside in private `pngstruct.h` and `pnginfo.h` header files that are
     82not accessible to applications.  It is strongly suggested that new
     83programs use the new APIs (as shown in `example.c` and `pngtest.c`),
     84and older programs be converted to the new format, to facilitate
     85upgrades in the future.
    5586
    5687The additions since 0.89 include the ability to read from a PNG stream
     
    6293critical or an ancillary chunk.
    6394
    64 For a detailed description on using libpng, read libpng-manual.txt.
    65 For examples of libpng in a program, see example.c and pngtest.c.  For
    66 usage information and restrictions (what little they are) on libpng,
    67 see png.h.  For a description on using zlib (the compression library
    68 used by libpng) and zlib's restrictions, see zlib.h
     95The additions since 0.90 include the ability to compile libpng as a
     96Windows DLL, and new APIs for accessing data in the `info_struct`.
     97Experimental functions included the ability to set weighting and cost
     98factors for row filter selection, direct reads of integers from buffers
     99on big-endian processors that support misaligned data access, faster
     100methods of doing alpha composition, and more accurate 16-to-8 bit color
     101conversion.  Some of these experimental functions, such as the weighted
     102filter heuristics, have since been removed.
    69103
    70 I have included a general makefile, as well as several machine and
    71 compiler specific ones, but you may have to modify one for your own
    72 needs.
     104Files included in this distribution
     105-----------------------------------
    73106
    74 You should use zlib 1.0.4 or later to run this, but it MAY work with
    75 versions as old as zlib 0.95.  Even so, there are bugs in older zlib
    76 versions which can cause the output of invalid compression streams for
    77 some images.
    78 
    79 You should also note that zlib is a compression library that is useful
    80 for more things than just PNG files.  You can use zlib as a drop-in
    81 replacement for fread() and fwrite(), if you are so inclined.
    82 
    83 zlib should be available at the same place that libpng is, or at
    84 https://zlib.net.
    85 
    86 You may also want a copy of the PNG specification.  It is available
    87 as an RFC, a W3C Recommendation, and an ISO/IEC Standard.  You can find
    88 these at http://www.libpng.org/pub/png/pngdocs.html .
    89 
    90 This code is currently being archived at libpng.sourceforge.io in the
    91 [DOWNLOAD] area, and at http://libpng.download/src .
    92 
    93 This release, based in a large way on Glenn's, Guy's and Andreas'
    94 earlier work, was created and will be supported by myself and the PNG
    95 development group.
    96 
    97 Send comments/corrections/commendations to png-mng-implement at
    98 lists.sourceforge.net (subscription required; visit
    99 https://lists.sourceforge.net/lists/listinfo/png-mng-implement
    100 to subscribe).
    101 
    102 Send general questions about the PNG specification to png-mng-misc
    103 at lists.sourceforge.net (subscription required; visit
    104 https://lists.sourceforge.net/lists/listinfo/png-mng-misc to
    105 subscribe).
    106 
    107 Files in this distribution:
    108 
    109       ANNOUNCE      =>  Announcement of this version, with recent changes
    110       AUTHORS       =>  List of contributing authors
    111       CHANGES       =>  Description of changes between libpng versions
    112       KNOWNBUG      =>  List of known bugs and deficiencies
    113       LICENSE       =>  License to use and redistribute libpng
    114       README        =>  This file
    115       TODO          =>  Things not implemented in the current library
    116       TRADEMARK     =>  Trademark information
    117       example.c     =>  Example code for using libpng functions
    118       libpng.3      =>  manual page for libpng (includes libpng-manual.txt)
    119       libpng-manual.txt  =>  Description of libpng and its functions
    120       libpngpf.3    =>  manual page for libpng's private functions
    121       png.5         =>  manual page for the PNG format
    122       png.c         =>  Basic interface functions common to library
    123       png.h         =>  Library function and interface declarations (public)
    124       pngpriv.h     =>  Library function and interface declarations (private)
    125       pngconf.h     =>  System specific library configuration (public)
    126       pngstruct.h   =>  png_struct declaration (private)
    127       pnginfo.h     =>  png_info struct declaration (private)
    128       pngdebug.h    =>  debugging macros (private)
    129       pngerror.c    =>  Error/warning message I/O functions
    130       pngget.c      =>  Functions for retrieving info from struct
    131       pngmem.c      =>  Memory handling functions
    132       pngbar.png    =>  PNG logo, 88x31
    133       pngnow.png    =>  PNG logo, 98x31
    134       pngpread.c    =>  Progressive reading functions
    135       pngread.c     =>  Read data/helper high-level functions
    136       pngrio.c      =>  Lowest-level data read I/O functions
    137       pngrtran.c    =>  Read data transformation functions
    138       pngrutil.c    =>  Read data utility functions
    139       pngset.c      =>  Functions for storing data into the info_struct
    140       pngtest.c     =>  Library test program
    141       pngtest.png   =>  Library test sample image
    142       pngtrans.c    =>  Common data transformation functions
    143       pngwio.c      =>  Lowest-level write I/O functions
    144       pngwrite.c    =>  High-level write functions
    145       pngwtran.c    =>  Write data transformations
    146       pngwutil.c    =>  Write utility functions
    147       arm           =>  Contains optimized code for the ARM platform
    148       powerpc       =>  Contains optimized code for the PowerPC platform
    149       contrib       =>  Contributions
    150        arm-neon         =>  Optimized code for ARM-NEON platform
    151        powerpc-vsx      =>  Optimized code for POWERPC-VSX platform
    152        examples         =>  Example programs
    153        gregbook         =>  source code for PNG reading and writing, from
    154                             Greg Roelofs' "PNG: The Definitive Guide",
    155                             O'Reilly, 1999
    156        libtests         =>  Test programs
    157        mips-msa         =>  Optimized code for MIPS-MSA platform
    158        pngminim         =>  Minimal decoder, encoder, and progressive decoder
    159                             programs demonstrating use of pngusr.dfa
    160        pngminus         =>  Simple pnm2png and png2pnm programs
    161        pngsuite         =>  Test images
    162        testpngs
    163        tools            =>  Various tools
    164        visupng          =>  Contains a MSVC workspace for VisualPng
    165       intel             =>  Optimized code for INTEL-SSE2 platform
    166       mips              =>  Optimized code for MIPS platform
    167       projects      =>  Contains project files and workspaces for
    168                         building a DLL
    169        owatcom          =>  Contains a WATCOM project for building libpng
    170        visualc71        =>  Contains a Microsoft Visual C++ (MSVC)
    171                             workspace for building libpng and zlib
    172        vstudio          =>  Contains a Microsoft Visual C++ (MSVC)
    173                             workspace for building libpng and zlib
    174       scripts       =>  Directory containing scripts for building libpng:
    175                             (see scripts/README.txt for the list of scripts)
     107    ANNOUNCE      =>  Announcement of this version, with recent changes
     108    AUTHORS       =>  List of contributing authors
     109    CHANGES       =>  Description of changes between libpng versions
     110    INSTALL       =>  Instructions to install libpng
     111    LICENSE       =>  License to use and redistribute libpng
     112    README        =>  This file
     113    TODO          =>  Things not implemented in the current library
     114    TRADEMARK     =>  Trademark information
     115    example.c     =>  Example code for using libpng functions
     116    libpng.3      =>  Manual page for libpng (includes libpng-manual.txt)
     117    libpng-manual.txt  =>  Description of libpng and its functions
     118    libpngpf.3    =>  Manual page for libpng's private functions (deprecated)
     119    png.5         =>  Manual page for the PNG format
     120    png.c         =>  Basic interface functions common to library
     121    png.h         =>  Library function and interface declarations (public)
     122    pngpriv.h     =>  Library function and interface declarations (private)
     123    pngconf.h     =>  System specific library configuration (public)
     124    pngstruct.h   =>  png_struct declaration (private)
     125    pnginfo.h     =>  png_info struct declaration (private)
     126    pngdebug.h    =>  debugging macros (private)
     127    pngerror.c    =>  Error/warning message I/O functions
     128    pngget.c      =>  Functions for retrieving info from struct
     129    pngmem.c      =>  Memory handling functions
     130    pngbar.png    =>  PNG logo, 88x31
     131    pngnow.png    =>  PNG logo, 98x31
     132    pngpread.c    =>  Progressive reading functions
     133    pngread.c     =>  Read data/helper high-level functions
     134    pngrio.c      =>  Lowest-level data read I/O functions
     135    pngrtran.c    =>  Read data transformation functions
     136    pngrutil.c    =>  Read data utility functions
     137    pngset.c      =>  Functions for storing data into the info_struct
     138    pngtest.c     =>  Library test program
     139    pngtest.png   =>  Library test sample image
     140    pngtrans.c    =>  Common data transformation functions
     141    pngwio.c      =>  Lowest-level write I/O functions
     142    pngwrite.c    =>  High-level write functions
     143    pngwtran.c    =>  Write data transformations
     144    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
     149    ci/           =>  Scripts for continuous integration
     150    contrib/      =>  External contributions
     151        arm-neon/     =>  Optimized code for the ARM-NEON platform
     152        mips-msa/     =>  Optimized code for the MIPS-MSA platform
     153        powerpc-vsx/  =>  Optimized code for the POWERPC-VSX platform
     154        examples/     =>  Examples of libpng usage
     155        gregbook/     =>  Source code for PNG reading and writing, from
     156                          "PNG: The Definitive Guide" by Greg Roelofs,
     157                          O'Reilly, 1999
     158        libtests/     =>  Test programs
     159        oss-fuzz/     =>  Files used by the OSS-Fuzz project for fuzz-testing
     160                          libpng
     161        pngminim/     =>  Minimal decoder, encoder, and progressive decoder
     162                          programs demonstrating the use of pngusr.dfa
     163        pngminus/     =>  Simple pnm2png and png2pnm programs
     164        pngsuite/     =>  Test images
     165        testpngs/     =>  Test images
     166        tools/        =>  Various tools
     167        visupng/      =>  VisualPng, a Windows viewer for PNG images
     168    projects/     =>  Project files and workspaces for various IDEs
     169        owatcom/      =>  OpenWatcom project
     170        visualc71/    =>  Microsoft Visual C++ 7.1 workspace
     171        vstudio/      =>  Microsoft Visual Studio workspace
     172    scripts/      =>  Scripts and makefiles for building libpng
     173                      (see scripts/README.txt for the complete list)
     174    tests/        =>  Test scripts
    176175
    177176Good luck, and happy coding!
  • trunk/src/libs/libpng-1.6.42/aclocal.m4

    r96425 r103316  
    1 # generated automatically by aclocal 1.16.1 -*- Autoconf -*-
    2 
    3 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
     1# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
     2
     3# Copyright (C) 1996-2021 Free Software Foundation, Inc.
    44
    55# This file is free software; the Free Software Foundation
     
    1515m4_ifndef([AC_AUTOCONF_VERSION],
    1616  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
    17 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
    18 [m4_warning([this file was generated for autoconf 2.69.
     17m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.72],,
     18[m4_warning([this file was generated for autoconf 2.72.
    1919You have another version of autoconf.  It may work, but is not guaranteed to.
    2020If you have problems, you may need to regenerate the build system entirely.
    2121To do so, use the procedure documented by the package, typically 'autoreconf'.])])
    2222
    23 # Copyright (C) 2002-2018 Free Software Foundation, Inc.
     23# Copyright (C) 2002-2021 Free Software Foundation, Inc.
    2424#
    2525# This file is free software; the Free Software Foundation
     
    3636dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
    3737dnl require some minimum version.  Point them to the right macro.
    38 m4_if([$1], [1.16.1], [],
     38m4_if([$1], [1.16.5], [],
    3939      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
    4040])
     
    5252# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
    5353AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
    54 [AM_AUTOMAKE_VERSION([1.16.1])dnl
     54[AM_AUTOMAKE_VERSION([1.16.5])dnl
    5555m4_ifndef([AC_AUTOCONF_VERSION],
    5656  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
     
    5959# Figure out how to run the assembler.                      -*- Autoconf -*-
    6060
    61 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
     61# Copyright (C) 2001-2021 Free Software Foundation, Inc.
    6262#
    6363# This file is free software; the Free Software Foundation
     
    7979# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
    8080
    81 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
     81# Copyright (C) 2001-2021 Free Software Foundation, Inc.
    8282#
    8383# This file is free software; the Free Software Foundation
     
    131131# AM_CONDITIONAL                                            -*- Autoconf -*-
    132132
    133 # Copyright (C) 1997-2018 Free Software Foundation, Inc.
     133# Copyright (C) 1997-2021 Free Software Foundation, Inc.
    134134#
    135135# This file is free software; the Free Software Foundation
     
    162162fi])])
    163163
    164 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
     164# Copyright (C) 1999-2021 Free Software Foundation, Inc.
    165165#
    166166# This file is free software; the Free Software Foundation
     
    353353# Generate code to set up dependency tracking.              -*- Autoconf -*-
    354354
    355 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
     355# Copyright (C) 1999-2021 Free Software Foundation, Inc.
    356356#
    357357# This file is free software; the Free Software Foundation
     
    392392  if test $am_rc -ne 0; then
    393393    AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
    394     for automatic dependency tracking.  Try re-running configure with the
     394    for automatic dependency tracking.  If GNU make was not used, consider
     395    re-running the configure script with MAKE="gmake" (or whatever is
     396    necessary).  You can also try re-running configure with the
    395397    '--disable-dependency-tracking' option to at least be able to build
    396398    the package (albeit without support for automatic dependency tracking).])
     
    419421# Do all the work for Automake.                             -*- Autoconf -*-
    420422
    421 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
     423# Copyright (C) 1996-2021 Free Software Foundation, Inc.
    422424#
    423425# This file is free software; the Free Software Foundation
     
    447449AC_DEFUN([AM_INIT_AUTOMAKE],
    448450[AC_PREREQ([2.65])dnl
     451m4_ifdef([_$0_ALREADY_INIT],
     452  [m4_fatal([$0 expanded multiple times
     453]m4_defn([_$0_ALREADY_INIT]))],
     454  [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl
    449455dnl Autoconf wants to disallow AM_ names.  We explicitly allow
    450456dnl the ones we care about.
     
    483489dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
    484490m4_if(
    485   m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
     491  m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
    486492  [ok:ok],,
    487493  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
     
    535541                             m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
    536542])
     543# Variables for tags utilities; see am/tags.am
     544if test -z "$CTAGS"; then
     545  CTAGS=ctags
     546fi
     547AC_SUBST([CTAGS])
     548if test -z "$ETAGS"; then
     549  ETAGS=etags
     550fi
     551AC_SUBST([ETAGS])
     552if test -z "$CSCOPE"; then
     553  CSCOPE=cscope
     554fi
     555AC_SUBST([CSCOPE])
     556
    537557AC_REQUIRE([AM_SILENT_RULES])dnl
    538558dnl The testsuite driver may need to know about EXEEXT, so add the
     
    616636echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
    617637
    618 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
     638# Copyright (C) 2001-2021 Free Software Foundation, Inc.
    619639#
    620640# This file is free software; the Free Software Foundation
     
    637657AC_SUBST([install_sh])])
    638658
    639 # Copyright (C) 2003-2018 Free Software Foundation, Inc.
     659# Copyright (C) 2003-2021 Free Software Foundation, Inc.
    640660#
    641661# This file is free software; the Free Software Foundation
     
    659679# From Jim Meyering
    660680
    661 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
     681# Copyright (C) 1996-2021 Free Software Foundation, Inc.
    662682#
    663683# This file is free software; the Free Software Foundation
     
    694714# Check to see how 'make' treats includes.                  -*- Autoconf -*-
    695715
    696 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
     716# Copyright (C) 2001-2021 Free Software Foundation, Inc.
    697717#
    698718# This file is free software; the Free Software Foundation
     
    737757# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
    738758
    739 # Copyright (C) 1997-2018 Free Software Foundation, Inc.
     759# Copyright (C) 1997-2021 Free Software Foundation, Inc.
    740760#
    741761# This file is free software; the Free Software Foundation
     
    758778AC_REQUIRE_AUX_FILE([missing])dnl
    759779if test x"${MISSING+set}" != xset; then
    760   case $am_aux_dir in
    761   *\ * | *\     *)
    762     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
    763   *)
    764     MISSING="\${SHELL} $am_aux_dir/missing" ;;
    765   esac
     780  MISSING="\${SHELL} '$am_aux_dir/missing'"
    766781fi
    767782# Use eval to expand $SHELL
     
    776791# Helper functions for option handling.                     -*- Autoconf -*-
    777792
    778 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
     793# Copyright (C) 2001-2021 Free Software Foundation, Inc.
    779794#
    780795# This file is free software; the Free Software Foundation
     
    805820[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
    806821
    807 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
     822# Copyright (C) 1999-2021 Free Software Foundation, Inc.
    808823#
    809824# This file is free software; the Free Software Foundation
     
    852867AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
    853868
    854 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
     869# Copyright (C) 2001-2021 Free Software Foundation, Inc.
    855870#
    856871# This file is free software; the Free Software Foundation
     
    871886# Check to make sure that the build environment is sane.    -*- Autoconf -*-
    872887
    873 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
     888# Copyright (C) 1996-2021 Free Software Foundation, Inc.
    874889#
    875890# This file is free software; the Free Software Foundation
     
    952967])
    953968
    954 # Copyright (C) 2009-2018 Free Software Foundation, Inc.
     969# Copyright (C) 2009-2021 Free Software Foundation, Inc.
    955970#
    956971# This file is free software; the Free Software Foundation
     
    10121027])
    10131028
    1014 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
     1029# Copyright (C) 2001-2021 Free Software Foundation, Inc.
    10151030#
    10161031# This file is free software; the Free Software Foundation
     
    10401055AC_SUBST([INSTALL_STRIP_PROGRAM])])
    10411056
    1042 # Copyright (C) 2006-2018 Free Software Foundation, Inc.
     1057# Copyright (C) 2006-2021 Free Software Foundation, Inc.
    10431058#
    10441059# This file is free software; the Free Software Foundation
     
    10591074# Check how to create a tarball.                            -*- Autoconf -*-
    10601075
    1061 # Copyright (C) 2004-2018 Free Software Foundation, Inc.
     1076# Copyright (C) 2004-2021 Free Software Foundation, Inc.
    10621077#
    10631078# This file is free software; the Free Software Foundation
     
    11901205]) # _AM_PROG_TAR
    11911206
    1192 m4_include([scripts/libtool.m4])
    1193 m4_include([scripts/ltoptions.m4])
    1194 m4_include([scripts/ltsugar.m4])
    1195 m4_include([scripts/ltversion.m4])
    1196 m4_include([scripts/lt~obsolete.m4])
     1207m4_include([scripts/autoconf/libtool.m4])
     1208m4_include([scripts/autoconf/ltoptions.m4])
     1209m4_include([scripts/autoconf/ltsugar.m4])
     1210m4_include([scripts/autoconf/ltversion.m4])
     1211m4_include([scripts/autoconf/lt~obsolete.m4])
  • trunk/src/libs/libpng-1.6.42/arm/arm_init.c

    r96425 r103316  
    22/* arm_init.c - NEON optimised filter functions
    33 *
    4  * Copyright (c) 2018 Cosmin Truta
     4 * Copyright (c) 2018-2022 Cosmin Truta
    55 * Copyright (c) 2014,2016 Glenn Randers-Pehrson
    66 * Written by Mans Rullgard, 2011.
     
    1111 */
    1212
    13 /* Below, after checking __linux__, various non-C90 POSIX 1003.1 functions are
    14  * called.
    15  */
     13/* This module requires POSIX 1003.1 functions. */
    1614#define _POSIX_SOURCE 1
    1715
     
    3432 * implementation which reads /proc/cpufino.
    3533 */
     34#include <signal.h> /* for sig_atomic_t */
     35
    3636#ifndef PNG_ARM_NEON_FILE
    37 #  ifdef __linux__
    38 #     define PNG_ARM_NEON_FILE "contrib/arm-neon/linux.c"
     37#  if defined(__aarch64__) || defined(_M_ARM64)
     38     /* ARM Neon is expected to be unconditionally available on ARM64. */
     39#    error "PNG_ARM_NEON_CHECK_SUPPORTED must not be defined on ARM64"
     40#  elif defined(__ARM_NEON__) || defined(__ARM_NEON)
     41     /* ARM Neon is expected to be available on the target CPU architecture. */
     42#    error "PNG_ARM_NEON_CHECK_SUPPORTED must not be defined on this CPU arch"
     43#  elif defined(__linux__)
     44#    define PNG_ARM_NEON_FILE "contrib/arm-neon/linux.c"
     45#  else
     46#    error "No support for run-time ARM Neon checking; use compile-time options"
    3947#  endif
    4048#endif
    4149
     50static int png_have_neon(png_structp png_ptr);
    4251#ifdef PNG_ARM_NEON_FILE
    43 
    44 #include <signal.h> /* for sig_atomic_t */
    45 static int png_have_neon(png_structp png_ptr);
    46 #include PNG_ARM_NEON_FILE
    47 
    48 #else  /* PNG_ARM_NEON_FILE */
    49 #  error "PNG_ARM_NEON_FILE undefined: no support for run-time ARM NEON checks"
    50 #endif /* PNG_ARM_NEON_FILE */
     52#  include PNG_ARM_NEON_FILE
     53#endif
    5154#endif /* PNG_ARM_NEON_CHECK_SUPPORTED */
    5255
  • trunk/src/libs/libpng-1.6.42/arm/filter_neon_intrinsics.c

    r96425 r103316  
    1919#if PNG_ARM_NEON_IMPLEMENTATION == 1 /* intrinsics code from pngpriv.h */
    2020
    21 #if defined(_MSC_VER) && defined(_M_ARM64)
     21#if defined(_MSC_VER) && !defined(__clang__) && defined(_M_ARM64)
    2222#  include <arm64_neon.h>
    2323#else
  • trunk/src/libs/libpng-1.6.42/arm/palette_neon_intrinsics.c

    r96425 r103316  
    1515#if PNG_ARM_NEON_IMPLEMENTATION == 1
    1616
    17 #if defined(_MSC_VER) && defined(_M_ARM64)
     17#if defined(_MSC_VER) && !defined(__clang__) && defined(_M_ARM64)
    1818#  include <arm64_neon.h>
    1919#else
     
    3131   int i;
    3232
    33    png_debug(1, "in png_riffle_palette_neon");
    34 
    3533   /* Initially black, opaque. */
    3634   uint8x16x4_t w = {{
     
    4038      vdupq_n_u8(0xff),
    4139   }};
     40
     41   png_debug(1, "in png_riffle_palette_neon");
    4242
    4343   /* First, riffle the RGB colours into an RGBA8 palette.
     
    6666   const png_uint_32 *riffled_palette =
    6767      (const png_uint_32 *)png_ptr->riffled_palette;
    68    const png_int_32 pixels_per_chunk = 4;
    69    int i;
     68   const png_uint_32 pixels_per_chunk = 4;
     69   png_uint_32 i;
    7070
    7171   png_debug(1, "in png_do_expand_palette_rgba8_neon");
    7272
     73   PNG_UNUSED(row)
    7374   if (row_width < pixels_per_chunk)
    7475      return 0;
     
    110111   png_const_bytep palette = (png_const_bytep)png_ptr->palette;
    111112   const png_uint_32 pixels_per_chunk = 8;
    112    int i;
     113   png_uint_32 i;
    113114
    114115   png_debug(1, "in png_do_expand_palette_rgb8_neon");
    115116
     117   PNG_UNUSED(row)
    116118   if (row_width <= pixels_per_chunk)
    117119      return 0;
  • trunk/src/libs/libpng-1.6.42/autogen.sh

    r96425 r103316  
    7878   test-driver"
    7979#
    80 # Files generated by versions of configue >2.68 or automake >1.13 (i.e. later
     80# Files generated by versions of autoconf >2.68 or automake >1.13 (i.e. later
    8181# versions than those required by configure.ac):
    8282libpng_autotools_extra="compile config.h.in~"
    8383#
    8484# These are separate because 'maintainer-clean' does not remove them.
    85 libpng_libtool_files="scripts/libtool.m4 scripts/ltoptions.m4\
    86    scripts/ltsugar.m4 scripts/ltversion.m4 scripts/lt~obsolete.m4"
     85libpng_libtool_files="scripts/autoconf/libtool.m4 scripts/autoconf/ltoptions.m4\
     86   scripts/autoconf/ltsugar.m4 scripts/autoconf/ltversion.m4\
     87   scripts/autoconf/lt~obsolete.m4"
    8788
    8889libpng_autotools_dirs="autom4te.cache" # not required
  • trunk/src/libs/libpng-1.6.42/compile

    r96425 r103316  
    44scriptversion=2018-03-07.03; # UTC
    55
    6 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
     6# Copyright (C) 1999-2021 Free Software Foundation, Inc.
    77# Written by Tom Tromey <[email protected]>.
    88#
     
    5454            file_conv=mingw
    5555            ;;
    56           CYGWIN*)
     56          CYGWIN* | MSYS*)
    5757            file_conv=cygwin
    5858            ;;
     
    6868          file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
    6969          ;;
    70         cygwin/*)
     70        cygwin/* | msys/*)
    7171          file=`cygpath -m "$file" || echo "$file"`
    7272          ;;
  • trunk/src/libs/libpng-1.6.42/config.guess

    r96425 r103316  
    11#! /bin/sh
    22# Attempt to guess a canonical system name.
    3 #   Copyright 1992-2018 Free Software Foundation, Inc.
    4 
    5 timestamp='2018-03-08'
     3#   Copyright 1992-2023 Free Software Foundation, Inc.
     4
     5# shellcheck disable=SC2006,SC2268 # see below for rationale
     6
     7timestamp='2023-08-22'
    68
    79# This file is free software; you can redistribute it and/or modify it
    810# under the terms of the GNU General Public License as published by
    9 # the Free Software Foundation; either version 3 of the License, or
     11# the Free Software Foundation, either version 3 of the License, or
    1012# (at your option) any later version.
    1113#
     
    2830#
    2931# You can get the latest version of this script from:
    30 # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
     32# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
    3133#
    3234# Please send patches to <[email protected]>.
    3335
    3436
     37# The "shellcheck disable" line above the timestamp inhibits complaints
     38# about features and limitations of the classic Bourne shell that were
     39# superseded or lifted in POSIX.  However, this script identifies a wide
     40# variety of pre-POSIX systems that do not have POSIX shells at all, and
     41# even some reasonably current systems (Solaris 10 as case-in-point) still
     42# have a pre-POSIX /bin/sh.
     43
     44
    3545me=`echo "$0" | sed -e 's,.*/,,'`
    3646
     
    3848Usage: $0 [OPTION]
    3949
    40 Output the configuration name of the system \`$me' is run on.
     50Output the configuration name of the system '$me' is run on.
    4151
    4252Options:
     
    5161
    5262Originally written by Per Bothner.
    53 Copyright 1992-2018 Free Software Foundation, Inc.
     63Copyright 1992-2023 Free Software Foundation, Inc.
    5464
    5565This is free software; see the source for copying conditions.  There is NO
     
    5767
    5868help="
    59 Try \`$me --help' for more information."
     69Try '$me --help' for more information."
    6070
    6171# Parse command line
     
    8595fi
    8696
    87 trap 'exit 1' 1 2 15
     97# Just in case it came from the environment.
     98GUESS=
    8899
    89100# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
     
    92103# headache to deal with in a portable fashion.
    93104
    94 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
    95 # use `HOST_CC' if defined, but it is deprecated.
     105# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still
     106# use 'HOST_CC' if defined, but it is deprecated.
    96107
    97108# Portable tmp directory creation inspired by the Autoconf team.
    98109
    99 set_cc_for_build='
    100 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
    101 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
    102 : ${TMPDIR=/tmp} ;
    103  { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
    104  { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
    105  { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
    106  { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
    107 dummy=$tmp/dummy ;
    108 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
    109 case $CC_FOR_BUILD,$HOST_CC,$CC in
    110  ,,)    echo "int x;" > "$dummy.c" ;
    111         for c in cc gcc c89 c99 ; do
    112           if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
    113              CC_FOR_BUILD="$c"; break ;
    114           fi ;
    115         done ;
    116         if test x"$CC_FOR_BUILD" = x ; then
    117           CC_FOR_BUILD=no_compiler_found ;
    118         fi
    119         ;;
    120  ,,*)   CC_FOR_BUILD=$CC ;;
    121  ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
    122 esac ; set_cc_for_build= ;'
     110tmp=
     111# shellcheck disable=SC2172
     112trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
     113
     114set_cc_for_build() {
     115    # prevent multiple calls if $tmp is already set
     116    test "$tmp" && return 0
     117    : "${TMPDIR=/tmp}"
     118    # shellcheck disable=SC2039,SC3028
     119    { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
     120        { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
     121        { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
     122        { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
     123    dummy=$tmp/dummy
     124    case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
     125        ,,)    echo "int x;" > "$dummy.c"
     126               for driver in cc gcc c89 c99 ; do
     127                   if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
     128                       CC_FOR_BUILD=$driver
     129                       break
     130                   fi
     131               done
     132               if test x"$CC_FOR_BUILD" = x ; then
     133                   CC_FOR_BUILD=no_compiler_found
     134               fi
     135               ;;
     136        ,,*)   CC_FOR_BUILD=$CC ;;
     137        ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
     138    esac
     139}
    123140
    124141# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
    125142# ([email protected] 1994-08-24)
    126 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
     143if test -f /.attbin/uname ; then
    127144        PATH=$PATH:/.attbin ; export PATH
    128145fi
     
    130147UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
    131148UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
    132 UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
     149UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
    133150UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
    134151
    135 case "$UNAME_SYSTEM" in
     152case $UNAME_SYSTEM in
    136153Linux|GNU|GNU/*)
    137         # If the system lacks a compiler, then just pick glibc.
    138         # We could probably try harder.
    139         LIBC=gnu
    140 
    141         eval "$set_cc_for_build"
     154        LIBC=unknown
     155
     156        set_cc_for_build
    142157        cat <<-EOF > "$dummy.c"
     158        #if defined(__ANDROID__)
     159        LIBC=android
     160        #else
    143161        #include <features.h>
    144162        #if defined(__UCLIBC__)
     
    146164        #elif defined(__dietlibc__)
    147165        LIBC=dietlibc
     166        #elif defined(__GLIBC__)
     167        LIBC=gnu
    148168        #else
    149         LIBC=gnu
     169        #include <stdarg.h>
     170        /* First heuristic to detect musl libc.  */
     171        #ifdef __DEFINED_va_list
     172        LIBC=musl
     173        #endif
     174        #endif
    150175        #endif
    151176        EOF
    152         eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
    153 
    154         # If ldd exists, use it to detect musl libc.
    155         if command -v ldd >/dev/null && \
    156                 ldd --version 2>&1 | grep -q ^musl
    157         then
    158             LIBC=musl
     177        cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
     178        eval "$cc_set_libc"
     179
     180        # Second heuristic to detect musl libc.
     181        if [ "$LIBC" = unknown ] &&
     182           command -v ldd >/dev/null &&
     183           ldd --version 2>&1 | grep -q ^musl; then
     184                LIBC=musl
     185        fi
     186
     187        # If the system lacks a compiler, then just pick glibc.
     188        # We could probably try harder.
     189        if [ "$LIBC" = unknown ]; then
     190                LIBC=gnu
    159191        fi
    160192        ;;
     
    163195# Note: order is significant - the case branches are not exclusive.
    164196
    165 case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
     197case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
    166198    *:NetBSD:*:*)
    167199        # NetBSD (nbsd) targets should (where applicable) match one or
     
    175207        # Note: NetBSD doesn't particularly care about the vendor
    176208        # portion of the name.  We always set it to "unknown".
    177         sysctl="sysctl -n hw.machine_arch"
    178209        UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
    179             "/sbin/$sysctl" 2>/dev/null || \
    180             "/usr/sbin/$sysctl" 2>/dev/null || \
     210            /sbin/sysctl -n hw.machine_arch 2>/dev/null || \
     211            /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \
    181212            echo unknown)`
    182         case "$UNAME_MACHINE_ARCH" in
     213        case $UNAME_MACHINE_ARCH in
     214            aarch64eb) machine=aarch64_be-unknown ;;
    183215            armeb) machine=armeb-unknown ;;
    184216            arm*) machine=arm-unknown ;;
     
    189221                arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
    190222                endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
    191                 machine="${arch}${endian}"-unknown
     223                machine=${arch}${endian}-unknown
    192224                ;;
    193             *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
     225            *) machine=$UNAME_MACHINE_ARCH-unknown ;;
    194226        esac
    195227        # The Operating System including object format, if it has switched
    196228        # to ELF recently (or will in the future) and ABI.
    197         case "$UNAME_MACHINE_ARCH" in
     229        case $UNAME_MACHINE_ARCH in
    198230            earm*)
    199231                os=netbsdelf
    200232                ;;
    201233            arm*|i386|m68k|ns32k|sh3*|sparc|vax)
    202                 eval "$set_cc_for_build"
     234                set_cc_for_build
    203235                if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
    204236                        | grep -q __ELF__
     
    216248        esac
    217249        # Determine ABI tags.
    218         case "$UNAME_MACHINE_ARCH" in
     250        case $UNAME_MACHINE_ARCH in
    219251            earm*)
    220252                expr='s/^earmv[0-9]/-eabi/;s/eb$//'
     
    227259        # kernel version information, so it can be replaced with a
    228260        # suitable tag, in the style of linux-gnu.
    229         case "$UNAME_VERSION" in
     261        case $UNAME_VERSION in
    230262            Debian*)
    231263                release='-gnu'
     
    238270        # contains redundant information, the shorter form:
    239271        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
    240         echo "$machine-${os}${release}${abi}"
    241         exit ;;
     272        GUESS=$machine-${os}${release}${abi-}
     273        ;;
    242274    *:Bitrig:*:*)
    243275        UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
    244         echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
    245         exit ;;
     276        GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE
     277        ;;
    246278    *:OpenBSD:*:*)
    247279        UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
    248         echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
    249         exit ;;
     280        GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE
     281        ;;
     282    *:SecBSD:*:*)
     283        UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'`
     284        GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE
     285        ;;
    250286    *:LibertyBSD:*:*)
    251287        UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
    252         echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
    253         exit ;;
     288        GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE
     289        ;;
    254290    *:MidnightBSD:*:*)
    255         echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
    256         exit ;;
     291        GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE
     292        ;;
    257293    *:ekkoBSD:*:*)
    258         echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
    259         exit ;;
     294        GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE
     295        ;;
    260296    *:SolidBSD:*:*)
    261         echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
    262         exit ;;
     297        GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE
     298        ;;
     299    *:OS108:*:*)
     300        GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE
     301        ;;
    263302    macppc:MirBSD:*:*)
    264         echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
    265         exit ;;
     303        GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE
     304        ;;
    266305    *:MirBSD:*:*)
    267         echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
    268         exit ;;
     306        GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE
     307        ;;
    269308    *:Sortix:*:*)
    270         echo "$UNAME_MACHINE"-unknown-sortix
    271         exit ;;
     309        GUESS=$UNAME_MACHINE-unknown-sortix
     310        ;;
     311    *:Twizzler:*:*)
     312        GUESS=$UNAME_MACHINE-unknown-twizzler
     313        ;;
    272314    *:Redox:*:*)
    273         echo "$UNAME_MACHINE"-unknown-redox
    274         exit ;;
     315        GUESS=$UNAME_MACHINE-unknown-redox
     316        ;;
    275317    mips:OSF1:*.*)
    276         echo mips-dec-osf1
    277         exit ;;
     318        GUESS=mips-dec-osf1
     319        ;;
    278320    alpha:OSF1:*:*)
     321        # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
     322        trap '' 0
    279323        case $UNAME_RELEASE in
    280324        *4.0)
     
    290334        # types through head -n 1, so we only detect the type of CPU 0.
    291335        ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
    292         case "$ALPHA_CPU_TYPE" in
     336        case $ALPHA_CPU_TYPE in
    293337            "EV4 (21064)")
    294338                UNAME_MACHINE=alpha ;;
     
    327371        # A Xn.n version is an unreleased experimental baselevel.
    328372        # 1.2 uses "1.2" for uname -r.
    329         echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
    330         # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
    331         exitcode=$?
    332         trap '' 0
    333         exit $exitcode ;;
     373        OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
     374        GUESS=$UNAME_MACHINE-dec-osf$OSF_REL
     375        ;;
    334376    Amiga*:UNIX_System_V:4.0:*)
    335         echo m68k-unknown-sysv4
    336         exit ;;
     377        GUESS=m68k-unknown-sysv4
     378        ;;
    337379    *:[Aa]miga[Oo][Ss]:*:*)
    338         echo "$UNAME_MACHINE"-unknown-amigaos
    339         exit ;;
     380        GUESS=$UNAME_MACHINE-unknown-amigaos
     381        ;;
    340382    *:[Mm]orph[Oo][Ss]:*:*)
    341         echo "$UNAME_MACHINE"-unknown-morphos
    342         exit ;;
     383        GUESS=$UNAME_MACHINE-unknown-morphos
     384        ;;
    343385    *:OS/390:*:*)
    344         echo i370-ibm-openedition
    345         exit ;;
     386        GUESS=i370-ibm-openedition
     387        ;;
    346388    *:z/VM:*:*)
    347         echo s390-ibm-zvmoe
    348         exit ;;
     389        GUESS=s390-ibm-zvmoe
     390        ;;
    349391    *:OS400:*:*)
    350         echo powerpc-ibm-os400
    351         exit ;;
     392        GUESS=powerpc-ibm-os400
     393        ;;
    352394    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
    353         echo arm-acorn-riscix"$UNAME_RELEASE"
    354         exit ;;
     395        GUESS=arm-acorn-riscix$UNAME_RELEASE
     396        ;;
    355397    arm*:riscos:*:*|arm*:RISCOS:*:*)
    356         echo arm-unknown-riscos
    357         exit ;;
     398        GUESS=arm-unknown-riscos
     399        ;;
    358400    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
    359         echo hppa1.1-hitachi-hiuxmpp
    360         exit ;;
     401        GUESS=hppa1.1-hitachi-hiuxmpp
     402        ;;
    361403    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
    362404        # [email protected] (Earle F. Ake) contributed MIS and NILE.
    363         if test "`(/bin/universe) 2>/dev/null`" = att ; then
    364                 echo pyramid-pyramid-sysv3
    365         else
    366                 echo pyramid-pyramid-bsd
    367         fi
    368         exit ;;
     405        case `(/bin/universe) 2>/dev/null` in
     406            att) GUESS=pyramid-pyramid-sysv3 ;;
     407            *)   GUESS=pyramid-pyramid-bsd   ;;
     408        esac
     409        ;;
    369410    NILE*:*:*:dcosx)
    370         echo pyramid-pyramid-svr4
    371         exit ;;
     411        GUESS=pyramid-pyramid-svr4
     412        ;;
    372413    DRS?6000:unix:4.0:6*)
    373         echo sparc-icl-nx6
    374         exit ;;
     414        GUESS=sparc-icl-nx6
     415        ;;
    375416    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
    376417        case `/usr/bin/uname -p` in
    377             sparc) echo sparc-icl-nx7; exit ;;
    378         esac ;;
     418            sparc) GUESS=sparc-icl-nx7 ;;
     419        esac
     420        ;;
    379421    s390x:SunOS:*:*)
    380         echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
    381         exit ;;
     422        SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
     423        GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL
     424        ;;
    382425    sun4H:SunOS:5.*:*)
    383         echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
    384         exit ;;
     426        SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
     427        GUESS=sparc-hal-solaris2$SUN_REL
     428        ;;
    385429    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
    386         echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
    387         exit ;;
     430        SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
     431        GUESS=sparc-sun-solaris2$SUN_REL
     432        ;;
    388433    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
    389         echo i386-pc-auroraux"$UNAME_RELEASE"
    390         exit ;;
     434        GUESS=i386-pc-auroraux$UNAME_RELEASE
     435        ;;
    391436    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
    392         eval "$set_cc_for_build"
     437        set_cc_for_build
    393438        SUN_ARCH=i386
    394439        # If there is a compiler, see if it is configured for 64-bit objects.
    395440        # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
    396441        # This test works for both compilers.
    397         if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
     442        if test "$CC_FOR_BUILD" != no_compiler_found; then
    398443            if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
    399                 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
     444                (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \
    400445                grep IS_64BIT_ARCH >/dev/null
    401446            then
     
    403448            fi
    404449        fi
    405         echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
    406         exit ;;
     450        SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
     451        GUESS=$SUN_ARCH-pc-solaris2$SUN_REL
     452        ;;
    407453    sun4*:SunOS:6*:*)
    408454        # According to config.sub, this is the proper way to canonicalize
    409455        # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
    410456        # it's likely to be more like Solaris than SunOS4.
    411         echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
    412         exit ;;
     457        SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
     458        GUESS=sparc-sun-solaris3$SUN_REL
     459        ;;
    413460    sun4*:SunOS:*:*)
    414         case "`/usr/bin/arch -k`" in
     461        case `/usr/bin/arch -k` in
    415462            Series*|S4*)
    416463                UNAME_RELEASE=`uname -v`
    417464                ;;
    418465        esac
    419         # Japanese Language versions have a version number like `4.1.3-JL'.
    420         echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
    421         exit ;;
     466        # Japanese Language versions have a version number like '4.1.3-JL'.
     467        SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
     468        GUESS=sparc-sun-sunos$SUN_REL
     469        ;;
    422470    sun3*:SunOS:*:*)
    423         echo m68k-sun-sunos"$UNAME_RELEASE"
    424         exit ;;
     471        GUESS=m68k-sun-sunos$UNAME_RELEASE
     472        ;;
    425473    sun*:*:4.2BSD:*)
    426474        UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
    427475        test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
    428         case "`/bin/arch`" in
     476        case `/bin/arch` in
    429477            sun3)
    430                 echo m68k-sun-sunos"$UNAME_RELEASE"
     478                GUESS=m68k-sun-sunos$UNAME_RELEASE
    431479                ;;
    432480            sun4)
    433                 echo sparc-sun-sunos"$UNAME_RELEASE"
     481                GUESS=sparc-sun-sunos$UNAME_RELEASE
    434482                ;;
    435483        esac
    436         exit ;;
     484        ;;
    437485    aushp:SunOS:*:*)
    438         echo sparc-auspex-sunos"$UNAME_RELEASE"
    439         exit ;;
     486        GUESS=sparc-auspex-sunos$UNAME_RELEASE
     487        ;;
    440488    # The situation for MiNT is a little confusing.  The machine name
    441489    # can be virtually everything (everything which is not
     
    447495    # be no problem.
    448496    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
    449         echo m68k-atari-mint"$UNAME_RELEASE"
    450         exit ;;
     497        GUESS=m68k-atari-mint$UNAME_RELEASE
     498        ;;
    451499    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
    452         echo m68k-atari-mint"$UNAME_RELEASE"
    453         exit ;;
     500        GUESS=m68k-atari-mint$UNAME_RELEASE
     501        ;;
    454502    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
    455         echo m68k-atari-mint"$UNAME_RELEASE"
    456         exit ;;
     503        GUESS=m68k-atari-mint$UNAME_RELEASE
     504        ;;
    457505    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
    458         echo m68k-milan-mint"$UNAME_RELEASE"
    459         exit ;;
     506        GUESS=m68k-milan-mint$UNAME_RELEASE
     507        ;;
    460508    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
    461         echo m68k-hades-mint"$UNAME_RELEASE"
    462         exit ;;
     509        GUESS=m68k-hades-mint$UNAME_RELEASE
     510        ;;
    463511    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
    464         echo m68k-unknown-mint"$UNAME_RELEASE"
    465         exit ;;
     512        GUESS=m68k-unknown-mint$UNAME_RELEASE
     513        ;;
    466514    m68k:machten:*:*)
    467         echo m68k-apple-machten"$UNAME_RELEASE"
    468         exit ;;
     515        GUESS=m68k-apple-machten$UNAME_RELEASE
     516        ;;
    469517    powerpc:machten:*:*)
    470         echo powerpc-apple-machten"$UNAME_RELEASE"
    471         exit ;;
     518        GUESS=powerpc-apple-machten$UNAME_RELEASE
     519        ;;
    472520    RISC*:Mach:*:*)
    473         echo mips-dec-mach_bsd4.3
    474         exit ;;
     521        GUESS=mips-dec-mach_bsd4.3
     522        ;;
    475523    RISC*:ULTRIX:*:*)
    476         echo mips-dec-ultrix"$UNAME_RELEASE"
    477         exit ;;
     524        GUESS=mips-dec-ultrix$UNAME_RELEASE
     525        ;;
    478526    VAX*:ULTRIX*:*:*)
    479         echo vax-dec-ultrix"$UNAME_RELEASE"
    480         exit ;;
     527        GUESS=vax-dec-ultrix$UNAME_RELEASE
     528        ;;
    481529    2020:CLIX:*:* | 2430:CLIX:*:*)
    482         echo clipper-intergraph-clix"$UNAME_RELEASE"
    483         exit ;;
     530        GUESS=clipper-intergraph-clix$UNAME_RELEASE
     531        ;;
    484532    mips:*:*:UMIPS | mips:*:*:RISCos)
    485         eval "$set_cc_for_build"
     533        set_cc_for_build
    486534        sed 's/^        //' << EOF > "$dummy.c"
    487535#ifdef __cplusplus
     
    509557          SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
    510558            { echo "$SYSTEM_NAME"; exit; }
    511         echo mips-mips-riscos"$UNAME_RELEASE"
    512         exit ;;
     559        GUESS=mips-mips-riscos$UNAME_RELEASE
     560        ;;
    513561    Motorola:PowerMAX_OS:*:*)
    514         echo powerpc-motorola-powermax
    515         exit ;;
     562        GUESS=powerpc-motorola-powermax
     563        ;;
    516564    Motorola:*:4.3:PL8-*)
    517         echo powerpc-harris-powermax
    518         exit ;;
     565        GUESS=powerpc-harris-powermax
     566        ;;
    519567    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
    520         echo powerpc-harris-powermax
    521         exit ;;
     568        GUESS=powerpc-harris-powermax
     569        ;;
    522570    Night_Hawk:Power_UNIX:*:*)
    523         echo powerpc-harris-powerunix
    524         exit ;;
     571        GUESS=powerpc-harris-powerunix
     572        ;;
    525573    m88k:CX/UX:7*:*)
    526         echo m88k-harris-cxux7
    527         exit ;;
     574        GUESS=m88k-harris-cxux7
     575        ;;
    528576    m88k:*:4*:R4*)
    529         echo m88k-motorola-sysv4
    530         exit ;;
     577        GUESS=m88k-motorola-sysv4
     578        ;;
    531579    m88k:*:3*:R3*)
    532         echo m88k-motorola-sysv3
    533         exit ;;
     580        GUESS=m88k-motorola-sysv3
     581        ;;
    534582    AViiON:dgux:*:*)
    535583        # DG/UX returns AViiON for all architectures
    536584        UNAME_PROCESSOR=`/usr/bin/uname -p`
    537         if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
     585        if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110
    538586        then
    539             if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
    540                [ "$TARGET_BINARY_INTERFACE"x = x ]
     587            if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \
     588               test "$TARGET_BINARY_INTERFACE"x = x
    541589            then
    542                 echo m88k-dg-dgux"$UNAME_RELEASE"
     590                GUESS=m88k-dg-dgux$UNAME_RELEASE
    543591            else
    544                 echo m88k-dg-dguxbcs"$UNAME_RELEASE"
     592                GUESS=m88k-dg-dguxbcs$UNAME_RELEASE
    545593            fi
    546594        else
    547             echo i586-dg-dgux"$UNAME_RELEASE"
    548         fi
    549         exit ;;
     595            GUESS=i586-dg-dgux$UNAME_RELEASE
     596        fi
     597        ;;
    550598    M88*:DolphinOS:*:*) # DolphinOS (SVR3)
    551         echo m88k-dolphin-sysv3
    552         exit ;;
     599        GUESS=m88k-dolphin-sysv3
     600        ;;
    553601    M88*:*:R3*:*)
    554602        # Delta 88k system running SVR3
    555         echo m88k-motorola-sysv3
    556         exit ;;
     603        GUESS=m88k-motorola-sysv3
     604        ;;
    557605    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
    558         echo m88k-tektronix-sysv3
    559         exit ;;
     606        GUESS=m88k-tektronix-sysv3
     607        ;;
    560608    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
    561         echo m68k-tektronix-bsd
    562         exit ;;
     609        GUESS=m68k-tektronix-bsd
     610        ;;
    563611    *:IRIX*:*:*)
    564         echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
    565         exit ;;
     612        IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'`
     613        GUESS=mips-sgi-irix$IRIX_REL
     614        ;;
    566615    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
    567         echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
    568         exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
     616        GUESS=romp-ibm-aix    # uname -m gives an 8 hex-code CPU id
     617        ;;                    # Note that: echo "'`uname -s`'" gives 'AIX '
    569618    i*86:AIX:*:*)
    570         echo i386-ibm-aix
    571         exit ;;
     619        GUESS=i386-ibm-aix
     620        ;;
    572621    ia64:AIX:*:*)
    573         if [ -x /usr/bin/oslevel ] ; then
     622        if test -x /usr/bin/oslevel ; then
    574623                IBM_REV=`/usr/bin/oslevel`
    575624        else
    576                 IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
    577         fi
    578         echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
    579         exit ;;
     625                IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
     626        fi
     627        GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV
     628        ;;
    580629    *:AIX:2:3)
    581630        if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
    582                 eval "$set_cc_for_build"
     631                set_cc_for_build
    583632                sed 's/^                //' << EOF > "$dummy.c"
    584633                #include <sys/systemcfg.h>
     
    594643                if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
    595644                then
    596                         echo "$SYSTEM_NAME"
     645                        GUESS=$SYSTEM_NAME
    597646                else
    598                         echo rs6000-ibm-aix3.2.5
     647                        GUESS=rs6000-ibm-aix3.2.5
    599648                fi
    600649        elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
    601                 echo rs6000-ibm-aix3.2.4
     650                GUESS=rs6000-ibm-aix3.2.4
    602651        else
    603                 echo rs6000-ibm-aix3.2
    604         fi
    605         exit ;;
     652                GUESS=rs6000-ibm-aix3.2
     653        fi
     654        ;;
    606655    *:AIX:*:[4567])
    607656        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
     
    611660                IBM_ARCH=powerpc
    612661        fi
    613         if [ -x /usr/bin/lslpp ] ; then
    614                 IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
     662        if test -x /usr/bin/lslpp ; then
     663                IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \
    615664                           awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
    616665        else
    617                 IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
    618         fi
    619         echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
    620         exit ;;
     666                IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
     667        fi
     668        GUESS=$IBM_ARCH-ibm-aix$IBM_REV
     669        ;;
    621670    *:AIX:*:*)
    622         echo rs6000-ibm-aix
    623         exit ;;
     671        GUESS=rs6000-ibm-aix
     672        ;;
    624673    ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
    625         echo romp-ibm-bsd4.4
    626         exit ;;
     674        GUESS=romp-ibm-bsd4.4
     675        ;;
    627676    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
    628         echo romp-ibm-bsd"$UNAME_RELEASE"   # 4.3 with uname added to
    629         exit ;;                             # report: romp-ibm BSD 4.3
     677        GUESS=romp-ibm-bsd$UNAME_RELEASE    # 4.3 with uname added to
     678        ;;                                  # report: romp-ibm BSD 4.3
    630679    *:BOSX:*:*)
    631         echo rs6000-bull-bosx
    632         exit ;;
     680        GUESS=rs6000-bull-bosx
     681        ;;
    633682    DPX/2?00:B.O.S.:*:*)
    634         echo m68k-bull-sysv3
    635         exit ;;
     683        GUESS=m68k-bull-sysv3
     684        ;;
    636685    9000/[34]??:4.3bsd:1.*:*)
    637         echo m68k-hp-bsd
    638         exit ;;
     686        GUESS=m68k-hp-bsd
     687        ;;
    639688    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
    640         echo m68k-hp-bsd4.4
    641         exit ;;
     689        GUESS=m68k-hp-bsd4.4
     690        ;;
    642691    9000/[34678]??:HP-UX:*:*)
    643         HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
    644         case "$UNAME_MACHINE" in
     692        HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
     693        case $UNAME_MACHINE in
    645694            9000/31?)            HP_ARCH=m68000 ;;
    646695            9000/[34]??)         HP_ARCH=m68k ;;
    647696            9000/[678][0-9][0-9])
    648                 if [ -x /usr/bin/getconf ]; then
     697                if test -x /usr/bin/getconf; then
    649698                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
    650699                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
    651                     case "$sc_cpu_version" in
     700                    case $sc_cpu_version in
    652701                      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
    653702                      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
    654703                      532)                      # CPU_PA_RISC2_0
    655                         case "$sc_kernel_bits" in
     704                        case $sc_kernel_bits in
    656705                          32) HP_ARCH=hppa2.0n ;;
    657706                          64) HP_ARCH=hppa2.0w ;;
     
    660709                    esac
    661710                fi
    662                 if [ "$HP_ARCH" = "" ]; then
    663                     eval "$set_cc_for_build"
     711                if test "$HP_ARCH" = ""; then
     712                    set_cc_for_build
    664713                    sed 's/^            //' << EOF > "$dummy.c"
    665714
     
    699748                fi ;;
    700749        esac
    701         if [ "$HP_ARCH" = hppa2.0w ]
     750        if test "$HP_ARCH" = hppa2.0w
    702751        then
    703             eval "$set_cc_for_build"
     752            set_cc_for_build
    704753
    705754            # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
     
    720769            fi
    721770        fi
    722         echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
    723         exit ;;
     771        GUESS=$HP_ARCH-hp-hpux$HPUX_REV
     772        ;;
    724773    ia64:HP-UX:*:*)
    725         HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
    726         echo ia64-hp-hpux"$HPUX_REV"
    727         exit ;;
     774        HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
     775        GUESS=ia64-hp-hpux$HPUX_REV
     776        ;;
    728777    3050*:HI-UX:*:*)
    729         eval "$set_cc_for_build"
     778        set_cc_for_build
    730779        sed 's/^        //' << EOF > "$dummy.c"
    731780        #include <unistd.h>
     
    755804        $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
    756805                { echo "$SYSTEM_NAME"; exit; }
    757         echo unknown-hitachi-hiuxwe2
    758         exit ;;
     806        GUESS=unknown-hitachi-hiuxwe2
     807        ;;
    759808    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
    760         echo hppa1.1-hp-bsd
    761         exit ;;
     809        GUESS=hppa1.1-hp-bsd
     810        ;;
    762811    9000/8??:4.3bsd:*:*)
    763         echo hppa1.0-hp-bsd
    764         exit ;;
     812        GUESS=hppa1.0-hp-bsd
     813        ;;
    765814    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
    766         echo hppa1.0-hp-mpeix
    767         exit ;;
     815        GUESS=hppa1.0-hp-mpeix
     816        ;;
    768817    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
    769         echo hppa1.1-hp-osf
    770         exit ;;
     818        GUESS=hppa1.1-hp-osf
     819        ;;
    771820    hp8??:OSF1:*:*)
    772         echo hppa1.0-hp-osf
    773         exit ;;
     821        GUESS=hppa1.0-hp-osf
     822        ;;
    774823    i*86:OSF1:*:*)
    775         if [ -x /usr/sbin/sysversion ] ; then
    776             echo "$UNAME_MACHINE"-unknown-osf1mk
     824        if test -x /usr/sbin/sysversion ; then
     825            GUESS=$UNAME_MACHINE-unknown-osf1mk
    777826        else
    778             echo "$UNAME_MACHINE"-unknown-osf1
    779         fi
    780         exit ;;
     827            GUESS=$UNAME_MACHINE-unknown-osf1
     828        fi
     829        ;;
    781830    parisc*:Lites*:*:*)
    782         echo hppa1.1-hp-lites
    783         exit ;;
     831        GUESS=hppa1.1-hp-lites
     832        ;;
    784833    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
    785         echo c1-convex-bsd
    786         exit ;;
     834        GUESS=c1-convex-bsd
     835        ;;
    787836    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
    788837        if getsysinfo -f scalar_acc
     
    792841        exit ;;
    793842    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
    794         echo c34-convex-bsd
    795         exit ;;
     843        GUESS=c34-convex-bsd
     844        ;;
    796845    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
    797         echo c38-convex-bsd
    798         exit ;;
     846        GUESS=c38-convex-bsd
     847        ;;
    799848    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
    800         echo c4-convex-bsd
    801         exit ;;
     849        GUESS=c4-convex-bsd
     850        ;;
    802851    CRAY*Y-MP:*:*:*)
    803         echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
    804         exit ;;
     852        CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
     853        GUESS=ymp-cray-unicos$CRAY_REL
     854        ;;
    805855    CRAY*[A-Z]90:*:*:*)
    806856        echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
     
    810860        exit ;;
    811861    CRAY*TS:*:*:*)
    812         echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
    813         exit ;;
     862        CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
     863        GUESS=t90-cray-unicos$CRAY_REL
     864        ;;
    814865    CRAY*T3E:*:*:*)
    815         echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
    816         exit ;;
     866        CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
     867        GUESS=alphaev5-cray-unicosmk$CRAY_REL
     868        ;;
    817869    CRAY*SV1:*:*:*)
    818         echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
    819         exit ;;
     870        CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
     871        GUESS=sv1-cray-unicos$CRAY_REL
     872        ;;
    820873    *:UNICOS/mp:*:*)
    821         echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
    822         exit ;;
     874        CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
     875        GUESS=craynv-cray-unicosmp$CRAY_REL
     876        ;;
    823877    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
    824878        FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
    825879        FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
    826880        FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
    827         echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
    828         exit ;;
     881        GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
     882        ;;
    829883    5000:UNIX_System_V:4.*:*)
    830884        FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
    831885        FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
    832         echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
    833         exit ;;
     886        GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
     887        ;;
    834888    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
    835         echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
    836         exit ;;
     889        GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE
     890        ;;
    837891    sparc*:BSD/OS:*:*)
    838         echo sparc-unknown-bsdi"$UNAME_RELEASE"
    839         exit ;;
     892        GUESS=sparc-unknown-bsdi$UNAME_RELEASE
     893        ;;
    840894    *:BSD/OS:*:*)
    841         echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
    842         exit ;;
     895        GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE
     896        ;;
     897    arm:FreeBSD:*:*)
     898        UNAME_PROCESSOR=`uname -p`
     899        set_cc_for_build
     900        if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
     901            | grep -q __ARM_PCS_VFP
     902        then
     903            FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
     904            GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi
     905        else
     906            FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
     907            GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf
     908        fi
     909        ;;
    843910    *:FreeBSD:*:*)
    844         UNAME_PROCESSOR=`/usr/bin/uname -p`
    845         case "$UNAME_PROCESSOR" in
     911        UNAME_PROCESSOR=`uname -p`
     912        case $UNAME_PROCESSOR in
    846913            amd64)
    847914                UNAME_PROCESSOR=x86_64 ;;
     
    849916                UNAME_PROCESSOR=i586 ;;
    850917        esac
    851         echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
    852         exit ;;
     918        FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
     919        GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL
     920        ;;
    853921    i*:CYGWIN*:*)
    854         echo "$UNAME_MACHINE"-pc-cygwin
    855         exit ;;
     922        GUESS=$UNAME_MACHINE-pc-cygwin
     923        ;;
    856924    *:MINGW64*:*)
    857         echo "$UNAME_MACHINE"-pc-mingw64
    858         exit ;;
     925        GUESS=$UNAME_MACHINE-pc-mingw64
     926        ;;
    859927    *:MINGW*:*)
    860         echo "$UNAME_MACHINE"-pc-mingw32
    861         exit ;;
     928        GUESS=$UNAME_MACHINE-pc-mingw32
     929        ;;
    862930    *:MSYS*:*)
    863         echo "$UNAME_MACHINE"-pc-msys
    864         exit ;;
     931        GUESS=$UNAME_MACHINE-pc-msys
     932        ;;
    865933    i*:PW*:*)
    866         echo "$UNAME_MACHINE"-pc-pw32
    867         exit ;;
     934        GUESS=$UNAME_MACHINE-pc-pw32
     935        ;;
     936    *:SerenityOS:*:*)
     937        GUESS=$UNAME_MACHINE-pc-serenity
     938        ;;
    868939    *:Interix*:*)
    869         case "$UNAME_MACHINE" in
     940        case $UNAME_MACHINE in
    870941            x86)
    871                 echo i586-pc-interix"$UNAME_RELEASE"
    872                 exit ;;
     942                GUESS=i586-pc-interix$UNAME_RELEASE
     943                ;;
    873944            authenticamd | genuineintel | EM64T)
    874                 echo x86_64-unknown-interix"$UNAME_RELEASE"
    875                 exit ;;
     945                GUESS=x86_64-unknown-interix$UNAME_RELEASE
     946                ;;
    876947            IA64)
    877                 echo ia64-unknown-interix"$UNAME_RELEASE"
    878                 exit ;;
     948                GUESS=ia64-unknown-interix$UNAME_RELEASE
     949                ;;
    879950        esac ;;
    880951    i*:UWIN*:*)
    881         echo "$UNAME_MACHINE"-pc-uwin
    882         exit ;;
     952        GUESS=$UNAME_MACHINE-pc-uwin
     953        ;;
    883954    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
    884         echo x86_64-unknown-cygwin
    885         exit ;;
     955        GUESS=x86_64-pc-cygwin
     956        ;;
    886957    prep*:SunOS:5.*:*)
    887         echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
    888         exit ;;
     958        SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
     959        GUESS=powerpcle-unknown-solaris2$SUN_REL
     960        ;;
    889961    *:GNU:*:*)
    890962        # the GNU system
    891         echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
    892         exit ;;
     963        GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'`
     964        GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'`
     965        GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL
     966        ;;
    893967    *:GNU/*:*:*)
    894968        # other systems with GNU libc and userland
    895         echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
    896         exit ;;
    897     i*86:Minix:*:*)
    898         echo "$UNAME_MACHINE"-pc-minix
    899         exit ;;
     969        GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"`
     970        GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
     971        GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
     972        ;;
     973    x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*)
     974        GUESS="$UNAME_MACHINE-pc-managarm-mlibc"
     975        ;;
     976    *:[Mm]anagarm:*:*)
     977        GUESS="$UNAME_MACHINE-unknown-managarm-mlibc"
     978        ;;
     979    *:Minix:*:*)
     980        GUESS=$UNAME_MACHINE-unknown-minix
     981        ;;
    900982    aarch64:Linux:*:*)
    901         echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    902         exit ;;
     983        set_cc_for_build
     984        CPU=$UNAME_MACHINE
     985        LIBCABI=$LIBC
     986        if test "$CC_FOR_BUILD" != no_compiler_found; then
     987            ABI=64
     988            sed 's/^        //' << EOF > "$dummy.c"
     989            #ifdef __ARM_EABI__
     990            #ifdef __ARM_PCS_VFP
     991            ABI=eabihf
     992            #else
     993            ABI=eabi
     994            #endif
     995            #endif
     996EOF
     997            cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
     998            eval "$cc_set_abi"
     999            case $ABI in
     1000                eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;;
     1001            esac
     1002        fi
     1003        GUESS=$CPU-unknown-linux-$LIBCABI
     1004        ;;
    9031005    aarch64_be:Linux:*:*)
    9041006        UNAME_MACHINE=aarch64_be
    905         echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    906         exit ;;
     1007        GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
     1008        ;;
    9071009    alpha:Linux:*:*)
    908         case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
     1010        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
    9091011          EV5)   UNAME_MACHINE=alphaev5 ;;
    9101012          EV56)  UNAME_MACHINE=alphaev56 ;;
     
    9171019        objdump --private-headers /bin/sh | grep -q ld.so.1
    9181020        if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
    919         echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    920         exit ;;
    921     arc:Linux:*:* | arceb:Linux:*:*)
    922         echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    923         exit ;;
     1021        GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
     1022        ;;
     1023    arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*)
     1024        GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
     1025        ;;
    9241026    arm*:Linux:*:*)
    925         eval "$set_cc_for_build"
     1027        set_cc_for_build
    9261028        if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
    9271029            | grep -q __ARM_EABI__
    9281030        then
    929             echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
     1031            GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
    9301032        else
    9311033            if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
    9321034                | grep -q __ARM_PCS_VFP
    9331035            then
    934                 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
     1036                GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi
    9351037            else
    936                 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
     1038                GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf
    9371039            fi
    9381040        fi
    939         exit ;;
     1041        ;;
    9401042    avr32*:Linux:*:*)
    941         echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    942         exit ;;
     1043        GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
     1044        ;;
    9431045    cris:Linux:*:*)
    944         echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
    945         exit ;;
     1046        GUESS=$UNAME_MACHINE-axis-linux-$LIBC
     1047        ;;
    9461048    crisv32:Linux:*:*)
    947         echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
    948         exit ;;
     1049        GUESS=$UNAME_MACHINE-axis-linux-$LIBC
     1050        ;;
    9491051    e2k:Linux:*:*)
    950         echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    951         exit ;;
     1052        GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
     1053        ;;
    9521054    frv:Linux:*:*)
    953         echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    954         exit ;;
     1055        GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
     1056        ;;
    9551057    hexagon:Linux:*:*)
    956         echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    957         exit ;;
     1058        GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
     1059        ;;
    9581060    i*86:Linux:*:*)
    959         echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
    960         exit ;;
     1061        GUESS=$UNAME_MACHINE-pc-linux-$LIBC
     1062        ;;
    9611063    ia64:Linux:*:*)
    962         echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    963         exit ;;
     1064        GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
     1065        ;;
    9641066    k1om:Linux:*:*)
    965         echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    966         exit ;;
     1067        GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
     1068        ;;
     1069    kvx:Linux:*:*)
     1070        GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
     1071        ;;
     1072    kvx:cos:*:*)
     1073        GUESS=$UNAME_MACHINE-unknown-cos
     1074        ;;
     1075    kvx:mbr:*:*)
     1076        GUESS=$UNAME_MACHINE-unknown-mbr
     1077        ;;
     1078    loongarch32:Linux:*:* | loongarch64:Linux:*:*)
     1079        GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
     1080        ;;
    9671081    m32r*:Linux:*:*)
    968         echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    969         exit ;;
     1082        GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
     1083        ;;
    9701084    m68*:Linux:*:*)
    971         echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    972         exit ;;
     1085        GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
     1086        ;;
    9731087    mips:Linux:*:* | mips64:Linux:*:*)
    974         eval "$set_cc_for_build"
     1088        set_cc_for_build
     1089        IS_GLIBC=0
     1090        test x"${LIBC}" = xgnu && IS_GLIBC=1
    9751091        sed 's/^        //' << EOF > "$dummy.c"
    9761092        #undef CPU
    977         #undef ${UNAME_MACHINE}
    978         #undef ${UNAME_MACHINE}el
     1093        #undef mips
     1094        #undef mipsel
     1095        #undef mips64
     1096        #undef mips64el
     1097        #if ${IS_GLIBC} && defined(_ABI64)
     1098        LIBCABI=gnuabi64
     1099        #else
     1100        #if ${IS_GLIBC} && defined(_ABIN32)
     1101        LIBCABI=gnuabin32
     1102        #else
     1103        LIBCABI=${LIBC}
     1104        #endif
     1105        #endif
     1106
     1107        #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
     1108        CPU=mipsisa64r6
     1109        #else
     1110        #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
     1111        CPU=mipsisa32r6
     1112        #else
     1113        #if defined(__mips64)
     1114        CPU=mips64
     1115        #else
     1116        CPU=mips
     1117        #endif
     1118        #endif
     1119        #endif
     1120
    9791121        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
    980         CPU=${UNAME_MACHINE}el
     1122        MIPS_ENDIAN=el
    9811123        #else
    9821124        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
    983         CPU=${UNAME_MACHINE}
     1125        MIPS_ENDIAN=
    9841126        #else
    985         CPU=
     1127        MIPS_ENDIAN=
    9861128        #endif
    9871129        #endif
    9881130EOF
    989         eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
    990         test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
     1131        cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`
     1132        eval "$cc_set_vars"
     1133        test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
    9911134        ;;
    9921135    mips64el:Linux:*:*)
    993         echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    994         exit ;;
     1136        GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
     1137        ;;
    9951138    openrisc*:Linux:*:*)
    996         echo or1k-unknown-linux-"$LIBC"
    997         exit ;;
     1139        GUESS=or1k-unknown-linux-$LIBC
     1140        ;;
    9981141    or32:Linux:*:* | or1k*:Linux:*:*)
    999         echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    1000         exit ;;
     1142        GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
     1143        ;;
    10011144    padre:Linux:*:*)
    1002         echo sparc-unknown-linux-"$LIBC"
    1003         exit ;;
     1145        GUESS=sparc-unknown-linux-$LIBC
     1146        ;;
    10041147    parisc64:Linux:*:* | hppa64:Linux:*:*)
    1005         echo hppa64-unknown-linux-"$LIBC"
    1006         exit ;;
     1148        GUESS=hppa64-unknown-linux-$LIBC
     1149        ;;
    10071150    parisc:Linux:*:* | hppa:Linux:*:*)
    10081151        # Look for CPU level
    10091152        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
    1010           PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
    1011           PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
    1012           *)    echo hppa-unknown-linux-"$LIBC" ;;
     1153          PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;;
     1154          PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;;
     1155          *)    GUESS=hppa-unknown-linux-$LIBC ;;
    10131156        esac
    1014         exit ;;
     1157        ;;
    10151158    ppc64:Linux:*:*)
    1016         echo powerpc64-unknown-linux-"$LIBC"
    1017         exit ;;
     1159        GUESS=powerpc64-unknown-linux-$LIBC
     1160        ;;
    10181161    ppc:Linux:*:*)
    1019         echo powerpc-unknown-linux-"$LIBC"
    1020         exit ;;
     1162        GUESS=powerpc-unknown-linux-$LIBC
     1163        ;;
    10211164    ppc64le:Linux:*:*)
    1022         echo powerpc64le-unknown-linux-"$LIBC"
    1023         exit ;;
     1165        GUESS=powerpc64le-unknown-linux-$LIBC
     1166        ;;
    10241167    ppcle:Linux:*:*)
    1025         echo powerpcle-unknown-linux-"$LIBC"
    1026         exit ;;
    1027     riscv32:Linux:*:* | riscv64:Linux:*:*)
    1028         echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    1029         exit ;;
     1168        GUESS=powerpcle-unknown-linux-$LIBC
     1169        ;;
     1170    riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
     1171        GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
     1172        ;;
    10301173    s390:Linux:*:* | s390x:Linux:*:*)
    1031         echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
    1032         exit ;;
     1174        GUESS=$UNAME_MACHINE-ibm-linux-$LIBC
     1175        ;;
    10331176    sh64*:Linux:*:*)
    1034         echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    1035         exit ;;
     1177        GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
     1178        ;;
    10361179    sh*:Linux:*:*)
    1037         echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    1038         exit ;;
     1180        GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
     1181        ;;
    10391182    sparc:Linux:*:* | sparc64:Linux:*:*)
    1040         echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    1041         exit ;;
     1183        GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
     1184        ;;
    10421185    tile*:Linux:*:*)
    1043         echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    1044         exit ;;
     1186        GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
     1187        ;;
    10451188    vax:Linux:*:*)
    1046         echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
    1047         exit ;;
     1189        GUESS=$UNAME_MACHINE-dec-linux-$LIBC
     1190        ;;
    10481191    x86_64:Linux:*:*)
    1049         echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
    1050         exit ;;
     1192        set_cc_for_build
     1193        CPU=$UNAME_MACHINE
     1194        LIBCABI=$LIBC
     1195        if test "$CC_FOR_BUILD" != no_compiler_found; then
     1196            ABI=64
     1197            sed 's/^        //' << EOF > "$dummy.c"
     1198            #ifdef __i386__
     1199            ABI=x86
     1200            #else
     1201            #ifdef __ILP32__
     1202            ABI=x32
     1203            #endif
     1204            #endif
     1205EOF
     1206            cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
     1207            eval "$cc_set_abi"
     1208            case $ABI in
     1209                x86) CPU=i686 ;;
     1210                x32) LIBCABI=${LIBC}x32 ;;
     1211            esac
     1212        fi
     1213        GUESS=$CPU-pc-linux-$LIBCABI
     1214        ;;
    10511215    xtensa*:Linux:*:*)
    1052         echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
    1053         exit ;;
     1216        GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
     1217        ;;
    10541218    i*86:DYNIX/ptx:4*:*)
    10551219        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
    10561220        # earlier versions are messed up and put the nodename in both
    10571221        # sysname and nodename.
    1058         echo i386-sequent-sysv4
    1059         exit ;;
     1222        GUESS=i386-sequent-sysv4
     1223        ;;
    10601224    i*86:UNIX_SV:4.2MP:2.*)
    10611225        # Unixware is an offshoot of SVR4, but it has its own version
     
    10641228        # I just have to hope.  -- rms.
    10651229        # Use sysv4.2uw... so that sysv4* matches it.
    1066         echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
    1067         exit ;;
     1230        GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
     1231        ;;
    10681232    i*86:OS/2:*:*)
    1069         # If we were able to find `uname', then EMX Unix compatibility
     1233        # If we were able to find 'uname', then EMX Unix compatibility
    10701234        # is probably installed.
    1071         echo "$UNAME_MACHINE"-pc-os2-emx
    1072         exit ;;
     1235        GUESS=$UNAME_MACHINE-pc-os2-emx
     1236        ;;
    10731237    i*86:XTS-300:*:STOP)
    1074         echo "$UNAME_MACHINE"-unknown-stop
    1075         exit ;;
     1238        GUESS=$UNAME_MACHINE-unknown-stop
     1239        ;;
    10761240    i*86:atheos:*:*)
    1077         echo "$UNAME_MACHINE"-unknown-atheos
    1078         exit ;;
     1241        GUESS=$UNAME_MACHINE-unknown-atheos
     1242        ;;
    10791243    i*86:syllable:*:*)
    1080         echo "$UNAME_MACHINE"-pc-syllable
    1081         exit ;;
     1244        GUESS=$UNAME_MACHINE-pc-syllable
     1245        ;;
    10821246    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
    1083         echo i386-unknown-lynxos"$UNAME_RELEASE"
    1084         exit ;;
     1247        GUESS=i386-unknown-lynxos$UNAME_RELEASE
     1248        ;;
    10851249    i*86:*DOS:*:*)
    1086         echo "$UNAME_MACHINE"-pc-msdosdjgpp
    1087         exit ;;
     1250        GUESS=$UNAME_MACHINE-pc-msdosdjgpp
     1251        ;;
    10881252    i*86:*:4.*:*)
    10891253        UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
    10901254        if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
    1091                 echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
     1255                GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL
    10921256        else
    1093                 echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
    1094         fi
    1095         exit ;;
     1257                GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL
     1258        fi
     1259        ;;
    10961260    i*86:*:5:[678]*)
    10971261        # UnixWare 7.x, OpenUNIX and OpenServer 6.
     
    11011265            *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
    11021266        esac
    1103         echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
    1104         exit ;;
     1267        GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
     1268        ;;
    11051269    i*86:*:3.2:*)
    11061270        if test -f /usr/options/cb.name; then
    11071271                UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
    1108                 echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
     1272                GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL
    11091273        elif /bin/uname -X 2>/dev/null >/dev/null ; then
    11101274                UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
     
    11161280                (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
    11171281                        && UNAME_MACHINE=i686
    1118                 echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
     1282                GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL
    11191283        else
    1120                 echo "$UNAME_MACHINE"-pc-sysv32
    1121         fi
    1122         exit ;;
     1284                GUESS=$UNAME_MACHINE-pc-sysv32
     1285        fi
     1286        ;;
    11231287    pc:*:*:*)
    11241288        # Left here for compatibility:
     
    11281292        # prints for the "djgpp" host, or else GDB configure will decide that
    11291293        # this is a cross-build.
    1130         echo i586-pc-msdosdjgpp
    1131         exit ;;
     1294        GUESS=i586-pc-msdosdjgpp
     1295        ;;
    11321296    Intel:Mach:3*:*)
    1133         echo i386-pc-mach3
    1134         exit ;;
     1297        GUESS=i386-pc-mach3
     1298        ;;
    11351299    paragon:*:*:*)
    1136         echo i860-intel-osf1
    1137         exit ;;
     1300        GUESS=i860-intel-osf1
     1301        ;;
    11381302    i860:*:4.*:*) # i860-SVR4
    11391303        if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
    1140           echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
     1304          GUESS=i860-stardent-sysv$UNAME_RELEASE    # Stardent Vistra i860-SVR4
    11411305        else # Add other i860-SVR4 vendors below as they are discovered.
    1142           echo i860-unknown-sysv"$UNAME_RELEASE"  # Unknown i860-SVR4
    1143         fi
    1144         exit ;;
     1306          GUESS=i860-unknown-sysv$UNAME_RELEASE     # Unknown i860-SVR4
     1307        fi
     1308        ;;
    11451309    mini*:CTIX:SYS*5:*)
    11461310        # "miniframe"
    1147         echo m68010-convergent-sysv
    1148         exit ;;
     1311        GUESS=m68010-convergent-sysv
     1312        ;;
    11491313    mc68k:UNIX:SYSTEM5:3.51m)
    1150         echo m68k-convergent-sysv
    1151         exit ;;
     1314        GUESS=m68k-convergent-sysv
     1315        ;;
    11521316    M680?0:D-NIX:5.3:*)
    1153         echo m68k-diab-dnix
    1154         exit ;;
     1317        GUESS=m68k-diab-dnix
     1318        ;;
    11551319    M68*:*:R3V[5678]*:*)
    11561320        test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
     
    11771341            && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
    11781342    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
    1179         echo m68k-unknown-lynxos"$UNAME_RELEASE"
    1180         exit ;;
     1343        GUESS=m68k-unknown-lynxos$UNAME_RELEASE
     1344        ;;
    11811345    mc68030:UNIX_System_V:4.*:*)
    1182         echo m68k-atari-sysv4
    1183         exit ;;
     1346        GUESS=m68k-atari-sysv4
     1347        ;;
    11841348    TSUNAMI:LynxOS:2.*:*)
    1185         echo sparc-unknown-lynxos"$UNAME_RELEASE"
    1186         exit ;;
     1349        GUESS=sparc-unknown-lynxos$UNAME_RELEASE
     1350        ;;
    11871351    rs6000:LynxOS:2.*:*)
    1188         echo rs6000-unknown-lynxos"$UNAME_RELEASE"
    1189         exit ;;
     1352        GUESS=rs6000-unknown-lynxos$UNAME_RELEASE
     1353        ;;
    11901354    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
    1191         echo powerpc-unknown-lynxos"$UNAME_RELEASE"
    1192         exit ;;
     1355        GUESS=powerpc-unknown-lynxos$UNAME_RELEASE
     1356        ;;
    11931357    SM[BE]S:UNIX_SV:*:*)
    1194         echo mips-dde-sysv"$UNAME_RELEASE"
    1195         exit ;;
     1358        GUESS=mips-dde-sysv$UNAME_RELEASE
     1359        ;;
    11961360    RM*:ReliantUNIX-*:*:*)
    1197         echo mips-sni-sysv4
    1198         exit ;;
     1361        GUESS=mips-sni-sysv4
     1362        ;;
    11991363    RM*:SINIX-*:*:*)
    1200         echo mips-sni-sysv4
    1201         exit ;;
     1364        GUESS=mips-sni-sysv4
     1365        ;;
    12021366    *:SINIX-*:*:*)
    12031367        if uname -p 2>/dev/null >/dev/null ; then
    12041368                UNAME_MACHINE=`(uname -p) 2>/dev/null`
    1205                 echo "$UNAME_MACHINE"-sni-sysv4
     1369                GUESS=$UNAME_MACHINE-sni-sysv4
    12061370        else
    1207                 echo ns32k-sni-sysv
    1208         fi
    1209         exit ;;
    1210     PENTIUM:*:4.0*:*)   # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
     1371                GUESS=ns32k-sni-sysv
     1372        fi
     1373        ;;
     1374    PENTIUM:*:4.0*:*)   # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort
    12111375                        # says <[email protected]>
    1212         echo i586-unisys-sysv4
    1213         exit ;;
     1376        GUESS=i586-unisys-sysv4
     1377        ;;
    12141378    *:UNIX_System_V:4*:FTX*)
    12151379        # From Gerald Hewes <[email protected]>.
    12161380        # How about differentiating between stratus architectures? -djm
    1217         echo hppa1.1-stratus-sysv4
    1218         exit ;;
     1381        GUESS=hppa1.1-stratus-sysv4
     1382        ;;
    12191383    *:*:*:FTX*)
    12201384        # From [email protected].
    1221         echo i860-stratus-sysv4
    1222         exit ;;
     1385        GUESS=i860-stratus-sysv4
     1386        ;;
    12231387    i*86:VOS:*:*)
    12241388        # From [email protected].
    1225         echo "$UNAME_MACHINE"-stratus-vos
    1226         exit ;;
     1389        GUESS=$UNAME_MACHINE-stratus-vos
     1390        ;;
    12271391    *:VOS:*:*)
    12281392        # From [email protected].
    1229         echo hppa1.1-stratus-vos
    1230         exit ;;
     1393        GUESS=hppa1.1-stratus-vos
     1394        ;;
    12311395    mc68*:A/UX:*:*)
    1232         echo m68k-apple-aux"$UNAME_RELEASE"
    1233         exit ;;
     1396        GUESS=m68k-apple-aux$UNAME_RELEASE
     1397        ;;
    12341398    news*:NEWS-OS:6*:*)
    1235         echo mips-sony-newsos6
    1236         exit ;;
     1399        GUESS=mips-sony-newsos6
     1400        ;;
    12371401    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
    1238         if [ -d /usr/nec ]; then
    1239                 echo mips-nec-sysv"$UNAME_RELEASE"
     1402        if test -d /usr/nec; then
     1403                GUESS=mips-nec-sysv$UNAME_RELEASE
    12401404        else
    1241                 echo mips-unknown-sysv"$UNAME_RELEASE"
    1242         fi
    1243         exit ;;
     1405                GUESS=mips-unknown-sysv$UNAME_RELEASE
     1406        fi
     1407        ;;
    12441408    BeBox:BeOS:*:*)     # BeOS running on hardware made by Be, PPC only.
    1245         echo powerpc-be-beos
    1246         exit ;;
     1409        GUESS=powerpc-be-beos
     1410        ;;
    12471411    BeMac:BeOS:*:*)     # BeOS running on Mac or Mac clone, PPC only.
    1248         echo powerpc-apple-beos
    1249         exit ;;
     1412        GUESS=powerpc-apple-beos
     1413        ;;
    12501414    BePC:BeOS:*:*)      # BeOS running on Intel PC compatible.
    1251         echo i586-pc-beos
    1252         exit ;;
     1415        GUESS=i586-pc-beos
     1416        ;;
    12531417    BePC:Haiku:*:*)     # Haiku running on Intel PC compatible.
    1254         echo i586-pc-haiku
    1255         exit ;;
    1256     x86_64:Haiku:*:*)
    1257         echo x86_64-unknown-haiku
    1258         exit ;;
     1418        GUESS=i586-pc-haiku
     1419        ;;
     1420    ppc:Haiku:*:*)      # Haiku running on Apple PowerPC
     1421        GUESS=powerpc-apple-haiku
     1422        ;;
     1423    *:Haiku:*:*)        # Haiku modern gcc (not bound by BeOS compat)
     1424        GUESS=$UNAME_MACHINE-unknown-haiku
     1425        ;;
    12591426    SX-4:SUPER-UX:*:*)
    1260         echo sx4-nec-superux"$UNAME_RELEASE"
    1261         exit ;;
     1427        GUESS=sx4-nec-superux$UNAME_RELEASE
     1428        ;;
    12621429    SX-5:SUPER-UX:*:*)
    1263         echo sx5-nec-superux"$UNAME_RELEASE"
    1264         exit ;;
     1430        GUESS=sx5-nec-superux$UNAME_RELEASE
     1431        ;;
    12651432    SX-6:SUPER-UX:*:*)
    1266         echo sx6-nec-superux"$UNAME_RELEASE"
    1267         exit ;;
     1433        GUESS=sx6-nec-superux$UNAME_RELEASE
     1434        ;;
    12681435    SX-7:SUPER-UX:*:*)
    1269         echo sx7-nec-superux"$UNAME_RELEASE"
    1270         exit ;;
     1436        GUESS=sx7-nec-superux$UNAME_RELEASE
     1437        ;;
    12711438    SX-8:SUPER-UX:*:*)
    1272         echo sx8-nec-superux"$UNAME_RELEASE"
    1273         exit ;;
     1439        GUESS=sx8-nec-superux$UNAME_RELEASE
     1440        ;;
    12741441    SX-8R:SUPER-UX:*:*)
    1275         echo sx8r-nec-superux"$UNAME_RELEASE"
    1276         exit ;;
     1442        GUESS=sx8r-nec-superux$UNAME_RELEASE
     1443        ;;
    12771444    SX-ACE:SUPER-UX:*:*)
    1278         echo sxace-nec-superux"$UNAME_RELEASE"
    1279         exit ;;
     1445        GUESS=sxace-nec-superux$UNAME_RELEASE
     1446        ;;
    12801447    Power*:Rhapsody:*:*)
    1281         echo powerpc-apple-rhapsody"$UNAME_RELEASE"
    1282         exit ;;
     1448        GUESS=powerpc-apple-rhapsody$UNAME_RELEASE
     1449        ;;
    12831450    *:Rhapsody:*:*)
    1284         echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
    1285         exit ;;
     1451        GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE
     1452        ;;
     1453    arm64:Darwin:*:*)
     1454        GUESS=aarch64-apple-darwin$UNAME_RELEASE
     1455        ;;
    12861456    *:Darwin:*:*)
    1287         UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
    1288         eval "$set_cc_for_build"
    1289         if test "$UNAME_PROCESSOR" = unknown ; then
    1290             UNAME_PROCESSOR=powerpc
    1291         fi
    1292         if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
    1293             if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
    1294                 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
    1295                        (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
    1296                        grep IS_64BIT_ARCH >/dev/null
    1297                 then
    1298                     case $UNAME_PROCESSOR in
    1299                         i386) UNAME_PROCESSOR=x86_64 ;;
    1300                         powerpc) UNAME_PROCESSOR=powerpc64 ;;
    1301                     esac
    1302                 fi
    1303                 # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
    1304                 if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
    1305                        (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
    1306                        grep IS_PPC >/dev/null
    1307                 then
    1308                     UNAME_PROCESSOR=powerpc
    1309                 fi
     1457        UNAME_PROCESSOR=`uname -p`
     1458        case $UNAME_PROCESSOR in
     1459            unknown) UNAME_PROCESSOR=powerpc ;;
     1460        esac
     1461        if command -v xcode-select > /dev/null 2> /dev/null && \
     1462                ! xcode-select --print-path > /dev/null 2> /dev/null ; then
     1463            # Avoid executing cc if there is no toolchain installed as
     1464            # cc will be a stub that puts up a graphical alert
     1465            # prompting the user to install developer tools.
     1466            CC_FOR_BUILD=no_compiler_found
     1467        else
     1468            set_cc_for_build
     1469        fi
     1470        if test "$CC_FOR_BUILD" != no_compiler_found; then
     1471            if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
     1472                   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
     1473                   grep IS_64BIT_ARCH >/dev/null
     1474            then
     1475                case $UNAME_PROCESSOR in
     1476                    i386) UNAME_PROCESSOR=x86_64 ;;
     1477                    powerpc) UNAME_PROCESSOR=powerpc64 ;;
     1478                esac
     1479            fi
     1480            # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
     1481            if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
     1482                   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
     1483                   grep IS_PPC >/dev/null
     1484            then
     1485                UNAME_PROCESSOR=powerpc
    13101486            fi
    13111487        elif test "$UNAME_PROCESSOR" = i386 ; then
    1312             # Avoid executing cc on OS X 10.9, as it ships with a stub
    1313             # that puts up a graphical alert prompting to install
    1314             # developer tools.  Any system running Mac OS X 10.7 or
    1315             # later (Darwin 11 and later) is required to have a 64-bit
    1316             # processor. This is not true of the ARM version of Darwin
    1317             # that Apple uses in portable devices.
    1318             UNAME_PROCESSOR=x86_64
    1319         fi
    1320         echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
    1321         exit ;;
     1488            # uname -m returns i386 or x86_64
     1489            UNAME_PROCESSOR=$UNAME_MACHINE
     1490        fi
     1491        GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE
     1492        ;;
    13221493    *:procnto*:*:* | *:QNX:[0123456789]*:*)
    13231494        UNAME_PROCESSOR=`uname -p`
     
    13261497                UNAME_MACHINE=pc
    13271498        fi
    1328         echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
    1329         exit ;;
     1499        GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE
     1500        ;;
    13301501    *:QNX:*:4*)
    1331         echo i386-pc-qnx
    1332         exit ;;
     1502        GUESS=i386-pc-qnx
     1503        ;;
    13331504    NEO-*:NONSTOP_KERNEL:*:*)
    1334         echo neo-tandem-nsk"$UNAME_RELEASE"
    1335         exit ;;
     1505        GUESS=neo-tandem-nsk$UNAME_RELEASE
     1506        ;;
    13361507    NSE-*:NONSTOP_KERNEL:*:*)
    1337         echo nse-tandem-nsk"$UNAME_RELEASE"
    1338         exit ;;
     1508        GUESS=nse-tandem-nsk$UNAME_RELEASE
     1509        ;;
    13391510    NSR-*:NONSTOP_KERNEL:*:*)
    1340         echo nsr-tandem-nsk"$UNAME_RELEASE"
    1341         exit ;;
     1511        GUESS=nsr-tandem-nsk$UNAME_RELEASE
     1512        ;;
    13421513    NSV-*:NONSTOP_KERNEL:*:*)
    1343         echo nsv-tandem-nsk"$UNAME_RELEASE"
    1344         exit ;;
     1514        GUESS=nsv-tandem-nsk$UNAME_RELEASE
     1515        ;;
    13451516    NSX-*:NONSTOP_KERNEL:*:*)
    1346         echo nsx-tandem-nsk"$UNAME_RELEASE"
    1347         exit ;;
     1517        GUESS=nsx-tandem-nsk$UNAME_RELEASE
     1518        ;;
    13481519    *:NonStop-UX:*:*)
    1349         echo mips-compaq-nonstopux
    1350         exit ;;
     1520        GUESS=mips-compaq-nonstopux
     1521        ;;
    13511522    BS2000:POSIX*:*:*)
    1352         echo bs2000-siemens-sysv
    1353         exit ;;
     1523        GUESS=bs2000-siemens-sysv
     1524        ;;
    13541525    DS/*:UNIX_System_V:*:*)
    1355         echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
    1356         exit ;;
     1526        GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE
     1527        ;;
    13571528    *:Plan9:*:*)
    13581529        # "uname -m" is not consistent, so use $cputype instead. 386
    13591530        # is converted to i386 for consistency with other x86
    13601531        # operating systems.
    1361         if test "$cputype" = 386; then
     1532        if test "${cputype-}" = 386; then
    13621533            UNAME_MACHINE=i386
    1363         else
    1364             UNAME_MACHINE="$cputype"
    1365         fi
    1366         echo "$UNAME_MACHINE"-unknown-plan9
    1367         exit ;;
     1534        elif test "x${cputype-}" != x; then
     1535            UNAME_MACHINE=$cputype
     1536        fi
     1537        GUESS=$UNAME_MACHINE-unknown-plan9
     1538        ;;
    13681539    *:TOPS-10:*:*)
    1369         echo pdp10-unknown-tops10
    1370         exit ;;
     1540        GUESS=pdp10-unknown-tops10
     1541        ;;
    13711542    *:TENEX:*:*)
    1372         echo pdp10-unknown-tenex
    1373         exit ;;
     1543        GUESS=pdp10-unknown-tenex
     1544        ;;
    13741545    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
    1375         echo pdp10-dec-tops20
    1376         exit ;;
     1546        GUESS=pdp10-dec-tops20
     1547        ;;
    13771548    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
    1378         echo pdp10-xkl-tops20
    1379         exit ;;
     1549        GUESS=pdp10-xkl-tops20
     1550        ;;
    13801551    *:TOPS-20:*:*)
    1381         echo pdp10-unknown-tops20
    1382         exit ;;
     1552        GUESS=pdp10-unknown-tops20
     1553        ;;
    13831554    *:ITS:*:*)
    1384         echo pdp10-unknown-its
    1385         exit ;;
     1555        GUESS=pdp10-unknown-its
     1556        ;;
    13861557    SEI:*:*:SEIUX)
    1387         echo mips-sei-seiux"$UNAME_RELEASE"
    1388         exit ;;
     1558        GUESS=mips-sei-seiux$UNAME_RELEASE
     1559        ;;
    13891560    *:DragonFly:*:*)
    1390         echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
    1391         exit ;;
     1561        DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
     1562        GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL
     1563        ;;
    13921564    *:*VMS:*:*)
    13931565        UNAME_MACHINE=`(uname -p) 2>/dev/null`
    1394         case "$UNAME_MACHINE" in
    1395             A*) echo alpha-dec-vms ; exit ;;
    1396             I*) echo ia64-dec-vms ; exit ;;
    1397             V*) echo vax-dec-vms ; exit ;;
     1566        case $UNAME_MACHINE in
     1567            A*) GUESS=alpha-dec-vms ;;
     1568            I*) GUESS=ia64-dec-vms ;;
     1569            V*) GUESS=vax-dec-vms ;;
    13981570        esac ;;
    13991571    *:XENIX:*:SysV)
    1400         echo i386-pc-xenix
    1401         exit ;;
     1572        GUESS=i386-pc-xenix
     1573        ;;
    14021574    i*86:skyos:*:*)
    1403         echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
    1404         exit ;;
     1575        SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`
     1576        GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL
     1577        ;;
    14051578    i*86:rdos:*:*)
    1406         echo "$UNAME_MACHINE"-pc-rdos
    1407         exit ;;
    1408     i*86:AROS:*:*)
    1409         echo "$UNAME_MACHINE"-pc-aros
    1410         exit ;;
     1579        GUESS=$UNAME_MACHINE-pc-rdos
     1580        ;;
     1581    i*86:Fiwix:*:*)
     1582        GUESS=$UNAME_MACHINE-pc-fiwix
     1583        ;;
     1584    *:AROS:*:*)
     1585        GUESS=$UNAME_MACHINE-unknown-aros
     1586        ;;
    14111587    x86_64:VMkernel:*:*)
    1412         echo "$UNAME_MACHINE"-unknown-esx
    1413         exit ;;
     1588        GUESS=$UNAME_MACHINE-unknown-esx
     1589        ;;
    14141590    amd64:Isilon\ OneFS:*:*)
    1415         echo x86_64-unknown-onefs
    1416         exit ;;
     1591        GUESS=x86_64-unknown-onefs
     1592        ;;
     1593    *:Unleashed:*:*)
     1594        GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
     1595        ;;
    14171596esac
    14181597
     1598# Do we have a guess based on uname results?
     1599if test "x$GUESS" != x; then
     1600    echo "$GUESS"
     1601    exit
     1602fi
     1603
     1604# No uname command or uname output not recognized.
     1605set_cc_for_build
     1606cat > "$dummy.c" <<EOF
     1607#ifdef _SEQUENT_
     1608#include <sys/types.h>
     1609#include <sys/utsname.h>
     1610#endif
     1611#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
     1612#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
     1613#include <signal.h>
     1614#if defined(_SIZE_T_) || defined(SIGLOST)
     1615#include <sys/utsname.h>
     1616#endif
     1617#endif
     1618#endif
     1619main ()
     1620{
     1621#if defined (sony)
     1622#if defined (MIPSEB)
     1623  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
     1624     I don't know....  */
     1625  printf ("mips-sony-bsd\n"); exit (0);
     1626#else
     1627#include <sys/param.h>
     1628  printf ("m68k-sony-newsos%s\n",
     1629#ifdef NEWSOS4
     1630  "4"
     1631#else
     1632  ""
     1633#endif
     1634  ); exit (0);
     1635#endif
     1636#endif
     1637
     1638#if defined (NeXT)
     1639#if !defined (__ARCHITECTURE__)
     1640#define __ARCHITECTURE__ "m68k"
     1641#endif
     1642  int version;
     1643  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
     1644  if (version < 4)
     1645    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
     1646  else
     1647    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
     1648  exit (0);
     1649#endif
     1650
     1651#if defined (MULTIMAX) || defined (n16)
     1652#if defined (UMAXV)
     1653  printf ("ns32k-encore-sysv\n"); exit (0);
     1654#else
     1655#if defined (CMU)
     1656  printf ("ns32k-encore-mach\n"); exit (0);
     1657#else
     1658  printf ("ns32k-encore-bsd\n"); exit (0);
     1659#endif
     1660#endif
     1661#endif
     1662
     1663#if defined (__386BSD__)
     1664  printf ("i386-pc-bsd\n"); exit (0);
     1665#endif
     1666
     1667#if defined (sequent)
     1668#if defined (i386)
     1669  printf ("i386-sequent-dynix\n"); exit (0);
     1670#endif
     1671#if defined (ns32000)
     1672  printf ("ns32k-sequent-dynix\n"); exit (0);
     1673#endif
     1674#endif
     1675
     1676#if defined (_SEQUENT_)
     1677  struct utsname un;
     1678
     1679  uname(&un);
     1680  if (strncmp(un.version, "V2", 2) == 0) {
     1681    printf ("i386-sequent-ptx2\n"); exit (0);
     1682  }
     1683  if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
     1684    printf ("i386-sequent-ptx1\n"); exit (0);
     1685  }
     1686  printf ("i386-sequent-ptx\n"); exit (0);
     1687#endif
     1688
     1689#if defined (vax)
     1690#if !defined (ultrix)
     1691#include <sys/param.h>
     1692#if defined (BSD)
     1693#if BSD == 43
     1694  printf ("vax-dec-bsd4.3\n"); exit (0);
     1695#else
     1696#if BSD == 199006
     1697  printf ("vax-dec-bsd4.3reno\n"); exit (0);
     1698#else
     1699  printf ("vax-dec-bsd\n"); exit (0);
     1700#endif
     1701#endif
     1702#else
     1703  printf ("vax-dec-bsd\n"); exit (0);
     1704#endif
     1705#else
     1706#if defined(_SIZE_T_) || defined(SIGLOST)
     1707  struct utsname un;
     1708  uname (&un);
     1709  printf ("vax-dec-ultrix%s\n", un.release); exit (0);
     1710#else
     1711  printf ("vax-dec-ultrix\n"); exit (0);
     1712#endif
     1713#endif
     1714#endif
     1715#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
     1716#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
     1717#if defined(_SIZE_T_) || defined(SIGLOST)
     1718  struct utsname *un;
     1719  uname (&un);
     1720  printf ("mips-dec-ultrix%s\n", un.release); exit (0);
     1721#else
     1722  printf ("mips-dec-ultrix\n"); exit (0);
     1723#endif
     1724#endif
     1725#endif
     1726
     1727#if defined (alliant) && defined (i860)
     1728  printf ("i860-alliant-bsd\n"); exit (0);
     1729#endif
     1730
     1731  exit (1);
     1732}
     1733EOF
     1734
     1735$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` &&
     1736        { echo "$SYSTEM_NAME"; exit; }
     1737
     1738# Apollos put the system type in the environment.
     1739test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
     1740
    14191741echo "$0: unable to guess system type" >&2
    14201742
    1421 case "$UNAME_MACHINE:$UNAME_SYSTEM" in
     1743case $UNAME_MACHINE:$UNAME_SYSTEM in
    14221744    mips:Linux | mips64:Linux)
    14231745        # If we got here on MIPS GNU/Linux, output extra information.
     
    14361758copies of config.guess and config.sub with the latest versions from:
    14371759
    1438   https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
     1760  https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
    14391761and
    1440   https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
     1762  https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
     1763EOF
     1764
     1765our_year=`echo $timestamp | sed 's,-.*,,'`
     1766thisyear=`date +%Y`
     1767# shellcheck disable=SC2003
     1768script_age=`expr "$thisyear" - "$our_year"`
     1769if test "$script_age" -lt 3 ; then
     1770   cat >&2 <<EOF
    14411771
    14421772If $0 has already been updated, send the following data and any
     
    14661796UNAME_VERSION = "$UNAME_VERSION"
    14671797EOF
     1798fi
    14681799
    14691800exit 1
  • trunk/src/libs/libpng-1.6.42/config.h.in

    r96425 r103316  
    44#undef HAVE_DLFCN_H
    55
    6 /* Define to 1 if you have the `feenableexcept' function. */
     6/* Define to 1 if you have the 'feenableexcept' function. */
    77#undef HAVE_FEENABLEEXCEPT
    88
     
    1010#undef HAVE_INTTYPES_H
    1111
    12 /* Define to 1 if you have the `m' library (-lm). */
     12/* Define to 1 if you have the 'm' library (-lm). */
    1313#undef HAVE_LIBM
    1414
    15 /* Define to 1 if you have the `z' library (-lz). */
     15/* Define to 1 if you have the 'z' library (-lz). */
    1616#undef HAVE_LIBZ
    1717
    18 /* Define to 1 if you have the <memory.h> header file. */
    19 #undef HAVE_MEMORY_H
    20 
    21 /* Define to 1 if you have the `pow' function. */
     18/* Define to 1 if you have the 'pow' function. */
    2219#undef HAVE_POW
    2320
    2421/* Define to 1 if you have the <stdint.h> header file. */
    2522#undef HAVE_STDINT_H
     23
     24/* Define to 1 if you have the <stdio.h> header file. */
     25#undef HAVE_STDIO_H
    2626
    2727/* Define to 1 if you have the <stdlib.h> header file. */
     
    7979#undef PNG_INTEL_SSE_OPT
    8080
     81/* Enable LOONGARCH LSX optimizations */
     82#undef PNG_LOONGARCH_LSX_OPT
     83
     84/* Turn on MIPS MMI optimizations at run-time */
     85#undef PNG_MIPS_MMI_API_SUPPORTED
     86
     87/* Check for MIPS MMI support at run-time */
     88#undef PNG_MIPS_MMI_CHECK_SUPPORTED
     89
     90/* Enable MIPS MMI optimizations */
     91#undef PNG_MIPS_MMI_OPT
     92
    8193/* Turn on MIPS MSA optimizations at run-time */
    8294#undef PNG_MIPS_MSA_API_SUPPORTED
     
    97109#undef PNG_POWERPC_VSX_OPT
    98110
    99 /* Define to 1 if you have the ANSI C header files. */
     111/* Define to 1 if all of the C89 standard headers exist (not just the ones
     112   required in a freestanding environment). This macro is provided for
     113   backward compatibility; new code need not use it. */
    100114#undef STDC_HEADERS
    101115
    102 /* Define to 1 if your <sys/time.h> declares `struct tm'. */
     116/* Define to 1 if your <sys/time.h> declares 'struct tm'. */
    103117#undef TM_IN_SYS_TIME
    104118
     
    106120#undef VERSION
    107121
    108 /* Define to empty if `const' does not conform to ANSI C. */
    109 #undef const
    110 
    111122/* Define to the equivalent of the C99 'restrict' keyword, or to
    112123   nothing if this is not supported.  Do not define if restrict is
    113    supported directly.  */
     124   supported only directly.  */
    114125#undef restrict
    115 /* Work around a bug in Sun C++: it does not support _Restrict or
    116    __restrict__, even though the corresponding Sun C compiler ends up with
    117    "#define restrict _Restrict" or "#define restrict __restrict__" in the
    118    previous line.  Perhaps some future version of Sun C++ will work with
    119    restrict; if so, hopefully it defines __RESTRICT like Sun C does.  */
    120 #if defined __SUNPRO_CC && !defined __RESTRICT
     126/* Work around a bug in older versions of Sun C++, which did not
     127   #define __restrict__ or support _Restrict or __restrict__
     128   even though the corresponding Sun C compiler ended up with
     129   "#define restrict _Restrict" or "#define restrict __restrict__"
     130   in the previous line.  This workaround can be removed once
     131   we assume Oracle Developer Studio 12.5 (2016) or later.  */
     132#if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__
    121133# define _Restrict
    122134# define __restrict__
    123135#endif
    124 
    125 /* Define to `unsigned int' if <sys/types.h> does not define. */
    126 #undef size_t
  • trunk/src/libs/libpng-1.6.42/config.sub

    r96425 r103316  
    11#! /bin/sh
    22# Configuration validation subroutine script.
    3 #   Copyright 1992-2018 Free Software Foundation, Inc.
    4 
    5 timestamp='2018-03-08'
     3#   Copyright 1992-2023 Free Software Foundation, Inc.
     4
     5# shellcheck disable=SC2006,SC2268 # see below for rationale
     6
     7timestamp='2023-09-19'
    68
    79# This file is free software; you can redistribute it and/or modify it
    810# under the terms of the GNU General Public License as published by
    9 # the Free Software Foundation; either version 3 of the License, or
     11# the Free Software Foundation, either version 3 of the License, or
    1012# (at your option) any later version.
    1113#
     
    3436
    3537# You can get the latest version of this script from:
    36 # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
     38# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
    3739
    3840# This file is supposed to be the same for all GNU packages
     
    5153# It is wrong to echo any other type of specification.
    5254
     55# The "shellcheck disable" line above the timestamp inhibits complaints
     56# about features and limitations of the classic Bourne shell that were
     57# superseded or lifted in POSIX.  However, this script identifies a wide
     58# variety of pre-POSIX systems that do not have POSIX shells at all, and
     59# even some reasonably current systems (Solaris 10 as case-in-point) still
     60# have a pre-POSIX /bin/sh.
     61
    5362me=`echo "$0" | sed -e 's,.*/,,'`
    5463
     
    6877GNU config.sub ($timestamp)
    6978
    70 Copyright 1992-2018 Free Software Foundation, Inc.
     79Copyright 1992-2023 Free Software Foundation, Inc.
    7180
    7281This is free software; see the source for copying conditions.  There is NO
     
    7483
    7584help="
    76 Try \`$me --help' for more information."
     85Try '$me --help' for more information."
    7786
    7887# Parse command line
     
    9099       break ;;
    91100    -* )
    92        echo "$me: invalid option $1$help"
     101       echo "$me: invalid option $1$help" >&2
    93102       exit 1 ;;
    94103
     
    111120esac
    112121
    113 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
    114 # Here we must recognize all the valid KERNEL-OS combinations.
    115 maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
    116 case $maybe_os in
    117   nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
    118   linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
    119   knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
    120   kopensolaris*-gnu* | cloudabi*-eabi* | \
    121   storm-chaos* | os2-emx* | rtmk-nova*)
    122     os=-$maybe_os
    123     basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
    124     ;;
    125   android-linux)
    126     os=-linux-android
    127     basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
    128     ;;
    129   *)
    130     basic_machine=`echo "$1" | sed 's/-[^-]*$//'`
    131     if [ "$basic_machine" != "$1" ]
    132     then os=`echo "$1" | sed 's/.*-/-/'`
    133     else os=; fi
    134     ;;
     122# Split fields of configuration type
     123# shellcheck disable=SC2162
     124saved_IFS=$IFS
     125IFS="-" read field1 field2 field3 field4 <<EOF
     126$1
     127EOF
     128IFS=$saved_IFS
     129
     130# Separate into logical components for further validation
     131case $1 in
     132        *-*-*-*-*)
     133                echo "Invalid configuration '$1': more than four components" >&2
     134                exit 1
     135                ;;
     136        *-*-*-*)
     137                basic_machine=$field1-$field2
     138                basic_os=$field3-$field4
     139                ;;
     140        *-*-*)
     141                # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
     142                # parts
     143                maybe_os=$field2-$field3
     144                case $maybe_os in
     145                        nto-qnx* | linux-* | uclinux-uclibc* \
     146                        | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
     147                        | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
     148                        | storm-chaos* | os2-emx* | rtmk-nova* | managarm-* \
     149                        | windows-* )
     150                                basic_machine=$field1
     151                                basic_os=$maybe_os
     152                                ;;
     153                        android-linux)
     154                                basic_machine=$field1-unknown
     155                                basic_os=linux-android
     156                                ;;
     157                        *)
     158                                basic_machine=$field1-$field2
     159                                basic_os=$field3
     160                                ;;
     161                esac
     162                ;;
     163        *-*)
     164                # A lone config we happen to match not fitting any pattern
     165                case $field1-$field2 in
     166                        decstation-3100)
     167                                basic_machine=mips-dec
     168                                basic_os=
     169                                ;;
     170                        *-*)
     171                                # Second component is usually, but not always the OS
     172                                case $field2 in
     173                                        # Prevent following clause from handling this valid os
     174                                        sun*os*)
     175                                                basic_machine=$field1
     176                                                basic_os=$field2
     177                                                ;;
     178                                        zephyr*)
     179                                                basic_machine=$field1-unknown
     180                                                basic_os=$field2
     181                                                ;;
     182                                        # Manufacturers
     183                                        dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
     184                                        | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
     185                                        | unicom* | ibm* | next | hp | isi* | apollo | altos* \
     186                                        | convergent* | ncr* | news | 32* | 3600* | 3100* \
     187                                        | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
     188                                        | ultra | tti* | harris | dolphin | highlevel | gould \
     189                                        | cbm | ns | masscomp | apple | axis | knuth | cray \
     190                                        | microblaze* | sim | cisco \
     191                                        | oki | wec | wrs | winbond)
     192                                                basic_machine=$field1-$field2
     193                                                basic_os=
     194                                                ;;
     195                                        *)
     196                                                basic_machine=$field1
     197                                                basic_os=$field2
     198                                                ;;
     199                                esac
     200                        ;;
     201                esac
     202                ;;
     203        *)
     204                # Convert single-component short-hands not valid as part of
     205                # multi-component configurations.
     206                case $field1 in
     207                        386bsd)
     208                                basic_machine=i386-pc
     209                                basic_os=bsd
     210                                ;;
     211                        a29khif)
     212                                basic_machine=a29k-amd
     213                                basic_os=udi
     214                                ;;
     215                        adobe68k)
     216                                basic_machine=m68010-adobe
     217                                basic_os=scout
     218                                ;;
     219                        alliant)
     220                                basic_machine=fx80-alliant
     221                                basic_os=
     222                                ;;
     223                        altos | altos3068)
     224                                basic_machine=m68k-altos
     225                                basic_os=
     226                                ;;
     227                        am29k)
     228                                basic_machine=a29k-none
     229                                basic_os=bsd
     230                                ;;
     231                        amdahl)
     232                                basic_machine=580-amdahl
     233                                basic_os=sysv
     234                                ;;
     235                        amiga)
     236                                basic_machine=m68k-unknown
     237                                basic_os=
     238                                ;;
     239                        amigaos | amigados)
     240                                basic_machine=m68k-unknown
     241                                basic_os=amigaos
     242                                ;;
     243                        amigaunix | amix)
     244                                basic_machine=m68k-unknown
     245                                basic_os=sysv4
     246                                ;;
     247                        apollo68)
     248                                basic_machine=m68k-apollo
     249                                basic_os=sysv
     250                                ;;
     251                        apollo68bsd)
     252                                basic_machine=m68k-apollo
     253                                basic_os=bsd
     254                                ;;
     255                        aros)
     256                                basic_machine=i386-pc
     257                                basic_os=aros
     258                                ;;
     259                        aux)
     260                                basic_machine=m68k-apple
     261                                basic_os=aux
     262                                ;;
     263                        balance)
     264                                basic_machine=ns32k-sequent
     265                                basic_os=dynix
     266                                ;;
     267                        blackfin)
     268                                basic_machine=bfin-unknown
     269                                basic_os=linux
     270                                ;;
     271                        cegcc)
     272                                basic_machine=arm-unknown
     273                                basic_os=cegcc
     274                                ;;
     275                        convex-c1)
     276                                basic_machine=c1-convex
     277                                basic_os=bsd
     278                                ;;
     279                        convex-c2)
     280                                basic_machine=c2-convex
     281                                basic_os=bsd
     282                                ;;
     283                        convex-c32)
     284                                basic_machine=c32-convex
     285                                basic_os=bsd
     286                                ;;
     287                        convex-c34)
     288                                basic_machine=c34-convex
     289                                basic_os=bsd
     290                                ;;
     291                        convex-c38)
     292                                basic_machine=c38-convex
     293                                basic_os=bsd
     294                                ;;
     295                        cray)
     296                                basic_machine=j90-cray
     297                                basic_os=unicos
     298                                ;;
     299                        crds | unos)
     300                                basic_machine=m68k-crds
     301                                basic_os=
     302                                ;;
     303                        da30)
     304                                basic_machine=m68k-da30
     305                                basic_os=
     306                                ;;
     307                        decstation | pmax | pmin | dec3100 | decstatn)
     308                                basic_machine=mips-dec
     309                                basic_os=
     310                                ;;
     311                        delta88)
     312                                basic_machine=m88k-motorola
     313                                basic_os=sysv3
     314                                ;;
     315                        dicos)
     316                                basic_machine=i686-pc
     317                                basic_os=dicos
     318                                ;;
     319                        djgpp)
     320                                basic_machine=i586-pc
     321                                basic_os=msdosdjgpp
     322                                ;;
     323                        ebmon29k)
     324                                basic_machine=a29k-amd
     325                                basic_os=ebmon
     326                                ;;
     327                        es1800 | OSE68k | ose68k | ose | OSE)
     328                                basic_machine=m68k-ericsson
     329                                basic_os=ose
     330                                ;;
     331                        gmicro)
     332                                basic_machine=tron-gmicro
     333                                basic_os=sysv
     334                                ;;
     335                        go32)
     336                                basic_machine=i386-pc
     337                                basic_os=go32
     338                                ;;
     339                        h8300hms)
     340                                basic_machine=h8300-hitachi
     341                                basic_os=hms
     342                                ;;
     343                        h8300xray)
     344                                basic_machine=h8300-hitachi
     345                                basic_os=xray
     346                                ;;
     347                        h8500hms)
     348                                basic_machine=h8500-hitachi
     349                                basic_os=hms
     350                                ;;
     351                        harris)
     352                                basic_machine=m88k-harris
     353                                basic_os=sysv3
     354                                ;;
     355                        hp300 | hp300hpux)
     356                                basic_machine=m68k-hp
     357                                basic_os=hpux
     358                                ;;
     359                        hp300bsd)
     360                                basic_machine=m68k-hp
     361                                basic_os=bsd
     362                                ;;
     363                        hppaosf)
     364                                basic_machine=hppa1.1-hp
     365                                basic_os=osf
     366                                ;;
     367                        hppro)
     368                                basic_machine=hppa1.1-hp
     369                                basic_os=proelf
     370                                ;;
     371                        i386mach)
     372                                basic_machine=i386-mach
     373                                basic_os=mach
     374                                ;;
     375                        isi68 | isi)
     376                                basic_machine=m68k-isi
     377                                basic_os=sysv
     378                                ;;
     379                        m68knommu)
     380                                basic_machine=m68k-unknown
     381                                basic_os=linux
     382                                ;;
     383                        magnum | m3230)
     384                                basic_machine=mips-mips
     385                                basic_os=sysv
     386                                ;;
     387                        merlin)
     388                                basic_machine=ns32k-utek
     389                                basic_os=sysv
     390                                ;;
     391                        mingw64)
     392                                basic_machine=x86_64-pc
     393                                basic_os=mingw64
     394                                ;;
     395                        mingw32)
     396                                basic_machine=i686-pc
     397                                basic_os=mingw32
     398                                ;;
     399                        mingw32ce)
     400                                basic_machine=arm-unknown
     401                                basic_os=mingw32ce
     402                                ;;
     403                        monitor)
     404                                basic_machine=m68k-rom68k
     405                                basic_os=coff
     406                                ;;
     407                        morphos)
     408                                basic_machine=powerpc-unknown
     409                                basic_os=morphos
     410                                ;;
     411                        moxiebox)
     412                                basic_machine=moxie-unknown
     413                                basic_os=moxiebox
     414                                ;;
     415                        msdos)
     416                                basic_machine=i386-pc
     417                                basic_os=msdos
     418                                ;;
     419                        msys)
     420                                basic_machine=i686-pc
     421                                basic_os=msys
     422                                ;;
     423                        mvs)
     424                                basic_machine=i370-ibm
     425                                basic_os=mvs
     426                                ;;
     427                        nacl)
     428                                basic_machine=le32-unknown
     429                                basic_os=nacl
     430                                ;;
     431                        ncr3000)
     432                                basic_machine=i486-ncr
     433                                basic_os=sysv4
     434                                ;;
     435                        netbsd386)
     436                                basic_machine=i386-pc
     437                                basic_os=netbsd
     438                                ;;
     439                        netwinder)
     440                                basic_machine=armv4l-rebel
     441                                basic_os=linux
     442                                ;;
     443                        news | news700 | news800 | news900)
     444                                basic_machine=m68k-sony
     445                                basic_os=newsos
     446                                ;;
     447                        news1000)
     448                                basic_machine=m68030-sony
     449                                basic_os=newsos
     450                                ;;
     451                        necv70)
     452                                basic_machine=v70-nec
     453                                basic_os=sysv
     454                                ;;
     455                        nh3000)
     456                                basic_machine=m68k-harris
     457                                basic_os=cxux
     458                                ;;
     459                        nh[45]000)
     460                                basic_machine=m88k-harris
     461                                basic_os=cxux
     462                                ;;
     463                        nindy960)
     464                                basic_machine=i960-intel
     465                                basic_os=nindy
     466                                ;;
     467                        mon960)
     468                                basic_machine=i960-intel
     469                                basic_os=mon960
     470                                ;;
     471                        nonstopux)
     472                                basic_machine=mips-compaq
     473                                basic_os=nonstopux
     474                                ;;
     475                        os400)
     476                                basic_machine=powerpc-ibm
     477                                basic_os=os400
     478                                ;;
     479                        OSE68000 | ose68000)
     480                                basic_machine=m68000-ericsson
     481                                basic_os=ose
     482                                ;;
     483                        os68k)
     484                                basic_machine=m68k-none
     485                                basic_os=os68k
     486                                ;;
     487                        paragon)
     488                                basic_machine=i860-intel
     489                                basic_os=osf
     490                                ;;
     491                        parisc)
     492                                basic_machine=hppa-unknown
     493                                basic_os=linux
     494                                ;;
     495                        psp)
     496                                basic_machine=mipsallegrexel-sony
     497                                basic_os=psp
     498                                ;;
     499                        pw32)
     500                                basic_machine=i586-unknown
     501                                basic_os=pw32
     502                                ;;
     503                        rdos | rdos64)
     504                                basic_machine=x86_64-pc
     505                                basic_os=rdos
     506                                ;;
     507                        rdos32)
     508                                basic_machine=i386-pc
     509                                basic_os=rdos
     510                                ;;
     511                        rom68k)
     512                                basic_machine=m68k-rom68k
     513                                basic_os=coff
     514                                ;;
     515                        sa29200)
     516                                basic_machine=a29k-amd
     517                                basic_os=udi
     518                                ;;
     519                        sei)
     520                                basic_machine=mips-sei
     521                                basic_os=seiux
     522                                ;;
     523                        sequent)
     524                                basic_machine=i386-sequent
     525                                basic_os=
     526                                ;;
     527                        sps7)
     528                                basic_machine=m68k-bull
     529                                basic_os=sysv2
     530                                ;;
     531                        st2000)
     532                                basic_machine=m68k-tandem
     533                                basic_os=
     534                                ;;
     535                        stratus)
     536                                basic_machine=i860-stratus
     537                                basic_os=sysv4
     538                                ;;
     539                        sun2)
     540                                basic_machine=m68000-sun
     541                                basic_os=
     542                                ;;
     543                        sun2os3)
     544                                basic_machine=m68000-sun
     545                                basic_os=sunos3
     546                                ;;
     547                        sun2os4)
     548                                basic_machine=m68000-sun
     549                                basic_os=sunos4
     550                                ;;
     551                        sun3)
     552                                basic_machine=m68k-sun
     553                                basic_os=
     554                                ;;
     555                        sun3os3)
     556                                basic_machine=m68k-sun
     557                                basic_os=sunos3
     558                                ;;
     559                        sun3os4)
     560                                basic_machine=m68k-sun
     561                                basic_os=sunos4
     562                                ;;
     563                        sun4)
     564                                basic_machine=sparc-sun
     565                                basic_os=
     566                                ;;
     567                        sun4os3)
     568                                basic_machine=sparc-sun
     569                                basic_os=sunos3
     570                                ;;
     571                        sun4os4)
     572                                basic_machine=sparc-sun
     573                                basic_os=sunos4
     574                                ;;
     575                        sun4sol2)
     576                                basic_machine=sparc-sun
     577                                basic_os=solaris2
     578                                ;;
     579                        sun386 | sun386i | roadrunner)
     580                                basic_machine=i386-sun
     581                                basic_os=
     582                                ;;
     583                        sv1)
     584                                basic_machine=sv1-cray
     585                                basic_os=unicos
     586                                ;;
     587                        symmetry)
     588                                basic_machine=i386-sequent
     589                                basic_os=dynix
     590                                ;;
     591                        t3e)
     592                                basic_machine=alphaev5-cray
     593                                basic_os=unicos
     594                                ;;
     595                        t90)
     596                                basic_machine=t90-cray
     597                                basic_os=unicos
     598                                ;;
     599                        toad1)
     600                                basic_machine=pdp10-xkl
     601                                basic_os=tops20
     602                                ;;
     603                        tpf)
     604                                basic_machine=s390x-ibm
     605                                basic_os=tpf
     606                                ;;
     607                        udi29k)
     608                                basic_machine=a29k-amd
     609                                basic_os=udi
     610                                ;;
     611                        ultra3)
     612                                basic_machine=a29k-nyu
     613                                basic_os=sym1
     614                                ;;
     615                        v810 | necv810)
     616                                basic_machine=v810-nec
     617                                basic_os=none
     618                                ;;
     619                        vaxv)
     620                                basic_machine=vax-dec
     621                                basic_os=sysv
     622                                ;;
     623                        vms)
     624                                basic_machine=vax-dec
     625                                basic_os=vms
     626                                ;;
     627                        vsta)
     628                                basic_machine=i386-pc
     629                                basic_os=vsta
     630                                ;;
     631                        vxworks960)
     632                                basic_machine=i960-wrs
     633                                basic_os=vxworks
     634                                ;;
     635                        vxworks68)
     636                                basic_machine=m68k-wrs
     637                                basic_os=vxworks
     638                                ;;
     639                        vxworks29k)
     640                                basic_machine=a29k-wrs
     641                                basic_os=vxworks
     642                                ;;
     643                        xbox)
     644                                basic_machine=i686-pc
     645                                basic_os=mingw32
     646                                ;;
     647                        ymp)
     648                                basic_machine=ymp-cray
     649                                basic_os=unicos
     650                                ;;
     651                        *)
     652                                basic_machine=$1
     653                                basic_os=
     654                                ;;
     655                esac
     656                ;;
    135657esac
    136658
    137 ### Let's recognize common machines as not being operating systems so
    138 ### that things like config.sub decstation-3100 work.  We also
    139 ### recognize some manufacturers as not being operating systems, so we
    140 ### can provide default operating systems below.
    141 case $os in
    142         -sun*os*)
    143                 # Prevent following clause from handling this invalid input.
    144                 ;;
    145         -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
    146         -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
    147         -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
    148         -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
    149         -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
    150         -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
    151         -apple | -axis | -knuth | -cray | -microblaze*)
    152                 os=
    153                 basic_machine=$1
    154                 ;;
    155         -bluegene*)
    156                 os=-cnk
    157                 ;;
    158         -sim | -cisco | -oki | -wec | -winbond)
    159                 os=
    160                 basic_machine=$1
    161                 ;;
    162         -scout)
    163                 ;;
    164         -wrs)
    165                 os=-vxworks
    166                 basic_machine=$1
    167                 ;;
    168         -chorusos*)
    169                 os=-chorusos
    170                 basic_machine=$1
    171                 ;;
    172         -chorusrdb)
    173                 os=-chorusrdb
    174                 basic_machine=$1
    175                 ;;
    176         -hiux*)
    177                 os=-hiuxwe2
    178                 ;;
    179         -sco6)
    180                 os=-sco5v6
    181                 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
    182                 ;;
    183         -sco5)
    184                 os=-sco3.2v5
    185                 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
    186                 ;;
    187         -sco4)
    188                 os=-sco3.2v4
    189                 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
    190                 ;;
    191         -sco3.2.[4-9]*)
    192                 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
    193                 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
    194                 ;;
    195         -sco3.2v[4-9]*)
    196                 # Don't forget version if it is 3.2v4 or newer.
    197                 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
    198                 ;;
    199         -sco5v6*)
    200                 # Don't forget version if it is 3.2v4 or newer.
    201                 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
    202                 ;;
    203         -sco*)
    204                 os=-sco3.2v2
    205                 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
    206                 ;;
    207         -udk*)
    208                 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
    209                 ;;
    210         -isc)
    211                 os=-isc2.2
    212                 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
    213                 ;;
    214         -clix*)
    215                 basic_machine=clipper-intergraph
    216                 ;;
    217         -isc*)
    218                 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
    219                 ;;
    220         -lynx*178)
    221                 os=-lynxos178
    222                 ;;
    223         -lynx*5)
    224                 os=-lynxos5
    225                 ;;
    226         -lynx*)
    227                 os=-lynxos
    228                 ;;
    229         -ptx*)
    230                 basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'`
    231                 ;;
    232         -psos*)
    233                 os=-psos
    234                 ;;
    235         -mint | -mint[0-9]*)
    236                 basic_machine=m68k-atari
    237                 os=-mint
    238                 ;;
    239 esac
    240 
    241 # Decode aliases for certain CPU-COMPANY combinations.
     659# Decode 1-component or ad-hoc basic machines
    242660case $basic_machine in
    243         # Recognize the basic CPU types without company name.
    244         # Some are omitted here because they have special meanings below.
    245         1750a | 580 \
    246         | a29k \
    247         | aarch64 | aarch64_be \
    248         | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
    249         | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
    250         | am33_2.0 \
    251         | arc | arceb \
    252         | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
    253         | avr | avr32 \
    254         | ba \
    255         | be32 | be64 \
    256         | bfin \
    257         | c4x | c8051 | clipper \
    258         | d10v | d30v | dlx | dsp16xx \
    259         | e2k | epiphany \
    260         | fido | fr30 | frv | ft32 \
    261         | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
    262         | hexagon \
    263         | i370 | i860 | i960 | ia16 | ia64 \
    264         | ip2k | iq2000 \
    265         | k1om \
    266         | le32 | le64 \
    267         | lm32 \
    268         | m32c | m32r | m32rle | m68000 | m68k | m88k \
    269         | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
    270         | mips | mipsbe | mipseb | mipsel | mipsle \
    271         | mips16 \
    272         | mips64 | mips64el \
    273         | mips64octeon | mips64octeonel \
    274         | mips64orion | mips64orionel \
    275         | mips64r5900 | mips64r5900el \
    276         | mips64vr | mips64vrel \
    277         | mips64vr4100 | mips64vr4100el \
    278         | mips64vr4300 | mips64vr4300el \
    279         | mips64vr5000 | mips64vr5000el \
    280         | mips64vr5900 | mips64vr5900el \
    281         | mipsisa32 | mipsisa32el \
    282         | mipsisa32r2 | mipsisa32r2el \
    283         | mipsisa32r6 | mipsisa32r6el \
    284         | mipsisa64 | mipsisa64el \
    285         | mipsisa64r2 | mipsisa64r2el \
    286         | mipsisa64r6 | mipsisa64r6el \
    287         | mipsisa64sb1 | mipsisa64sb1el \
    288         | mipsisa64sr71k | mipsisa64sr71kel \
    289         | mipsr5900 | mipsr5900el \
    290         | mipstx39 | mipstx39el \
    291         | mn10200 | mn10300 \
    292         | moxie \
    293         | mt \
    294         | msp430 \
    295         | nds32 | nds32le | nds32be \
    296         | nios | nios2 | nios2eb | nios2el \
    297         | ns16k | ns32k \
    298         | open8 | or1k | or1knd | or32 \
    299         | pdp10 | pj | pjl \
    300         | powerpc | powerpc64 | powerpc64le | powerpcle \
    301         | pru \
    302         | pyramid \
    303         | riscv32 | riscv64 \
    304         | rl78 | rx \
    305         | score \
    306         | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
    307         | sh64 | sh64le \
    308         | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
    309         | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
    310         | spu \
    311         | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
    312         | ubicom32 \
    313         | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
    314         | visium \
    315         | wasm32 \
    316         | x86 | xc16x | xstormy16 | xtensa \
    317         | z8k | z80)
    318                 basic_machine=$basic_machine-unknown
    319                 ;;
    320         c54x)
    321                 basic_machine=tic54x-unknown
    322                 ;;
    323         c55x)
    324                 basic_machine=tic55x-unknown
    325                 ;;
    326         c6x)
    327                 basic_machine=tic6x-unknown
     661        # Here we handle the default manufacturer of certain CPU types.  It is in
     662        # some cases the only manufacturer, in others, it is the most popular.
     663        w89k)
     664                cpu=hppa1.1
     665                vendor=winbond
     666                ;;
     667        op50n)
     668                cpu=hppa1.1
     669                vendor=oki
     670                ;;
     671        op60c)
     672                cpu=hppa1.1
     673                vendor=oki
     674                ;;
     675        ibm*)
     676                cpu=i370
     677                vendor=ibm
     678                ;;
     679        orion105)
     680                cpu=clipper
     681                vendor=highlevel
     682                ;;
     683        mac | mpw | mac-mpw)
     684                cpu=m68k
     685                vendor=apple
     686                ;;
     687        pmac | pmac-mpw)
     688                cpu=powerpc
     689                vendor=apple
     690                ;;
     691
     692        # Recognize the various machine names and aliases which stand
     693        # for a CPU type and a company and sometimes even an OS.
     694        3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
     695                cpu=m68000
     696                vendor=att
     697                ;;
     698        3b*)
     699                cpu=we32k
     700                vendor=att
     701                ;;
     702        bluegene*)
     703                cpu=powerpc
     704                vendor=ibm
     705                basic_os=cnk
     706                ;;
     707        decsystem10* | dec10*)
     708                cpu=pdp10
     709                vendor=dec
     710                basic_os=tops10
     711                ;;
     712        decsystem20* | dec20*)
     713                cpu=pdp10
     714                vendor=dec
     715                basic_os=tops20
     716                ;;
     717        delta | 3300 | motorola-3300 | motorola-delta \
     718              | 3300-motorola | delta-motorola)
     719                cpu=m68k
     720                vendor=motorola
     721                ;;
     722        dpx2*)
     723                cpu=m68k
     724                vendor=bull
     725                basic_os=sysv3
     726                ;;
     727        encore | umax | mmax)
     728                cpu=ns32k
     729                vendor=encore
     730                ;;
     731        elxsi)
     732                cpu=elxsi
     733                vendor=elxsi
     734                basic_os=${basic_os:-bsd}
     735                ;;
     736        fx2800)
     737                cpu=i860
     738                vendor=alliant
     739                ;;
     740        genix)
     741                cpu=ns32k
     742                vendor=ns
     743                ;;
     744        h3050r* | hiux*)
     745                cpu=hppa1.1
     746                vendor=hitachi
     747                basic_os=hiuxwe2
     748                ;;
     749        hp3k9[0-9][0-9] | hp9[0-9][0-9])
     750                cpu=hppa1.0
     751                vendor=hp
     752                ;;
     753        hp9k2[0-9][0-9] | hp9k31[0-9])
     754                cpu=m68000
     755                vendor=hp
     756                ;;
     757        hp9k3[2-9][0-9])
     758                cpu=m68k
     759                vendor=hp
     760                ;;
     761        hp9k6[0-9][0-9] | hp6[0-9][0-9])
     762                cpu=hppa1.0
     763                vendor=hp
     764                ;;
     765        hp9k7[0-79][0-9] | hp7[0-79][0-9])
     766                cpu=hppa1.1
     767                vendor=hp
     768                ;;
     769        hp9k78[0-9] | hp78[0-9])
     770                # FIXME: really hppa2.0-hp
     771                cpu=hppa1.1
     772                vendor=hp
     773                ;;
     774        hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
     775                # FIXME: really hppa2.0-hp
     776                cpu=hppa1.1
     777                vendor=hp
     778                ;;
     779        hp9k8[0-9][13679] | hp8[0-9][13679])
     780                cpu=hppa1.1
     781                vendor=hp
     782                ;;
     783        hp9k8[0-9][0-9] | hp8[0-9][0-9])
     784                cpu=hppa1.0
     785                vendor=hp
     786                ;;
     787        i*86v32)
     788                cpu=`echo "$1" | sed -e 's/86.*/86/'`
     789                vendor=pc
     790                basic_os=sysv32
     791                ;;
     792        i*86v4*)
     793                cpu=`echo "$1" | sed -e 's/86.*/86/'`
     794                vendor=pc
     795                basic_os=sysv4
     796                ;;
     797        i*86v)
     798                cpu=`echo "$1" | sed -e 's/86.*/86/'`
     799                vendor=pc
     800                basic_os=sysv
     801                ;;
     802        i*86sol2)
     803                cpu=`echo "$1" | sed -e 's/86.*/86/'`
     804                vendor=pc
     805                basic_os=solaris2
     806                ;;
     807        j90 | j90-cray)
     808                cpu=j90
     809                vendor=cray
     810                basic_os=${basic_os:-unicos}
     811                ;;
     812        iris | iris4d)
     813                cpu=mips
     814                vendor=sgi
     815                case $basic_os in
     816                    irix*)
     817                        ;;
     818                    *)
     819                        basic_os=irix4
     820                        ;;
     821                esac
     822                ;;
     823        miniframe)
     824                cpu=m68000
     825                vendor=convergent
     826                ;;
     827        *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
     828                cpu=m68k
     829                vendor=atari
     830                basic_os=mint
     831                ;;
     832        news-3600 | risc-news)
     833                cpu=mips
     834                vendor=sony
     835                basic_os=newsos
     836                ;;
     837        next | m*-next)
     838                cpu=m68k
     839                vendor=next
     840                case $basic_os in
     841                    openstep*)
     842                        ;;
     843                    nextstep*)
     844                        ;;
     845                    ns2*)
     846                      basic_os=nextstep2
     847                        ;;
     848                    *)
     849                      basic_os=nextstep3
     850                        ;;
     851                esac
     852                ;;
     853        np1)
     854                cpu=np1
     855                vendor=gould
     856                ;;
     857        op50n-* | op60c-*)
     858                cpu=hppa1.1
     859                vendor=oki
     860                basic_os=proelf
     861                ;;
     862        pa-hitachi)
     863                cpu=hppa1.1
     864                vendor=hitachi
     865                basic_os=hiuxwe2
     866                ;;
     867        pbd)
     868                cpu=sparc
     869                vendor=tti
     870                ;;
     871        pbb)
     872                cpu=m68k
     873                vendor=tti
     874                ;;
     875        pc532)
     876                cpu=ns32k
     877                vendor=pc532
     878                ;;
     879        pn)
     880                cpu=pn
     881                vendor=gould
     882                ;;
     883        power)
     884                cpu=power
     885                vendor=ibm
     886                ;;
     887        ps2)
     888                cpu=i386
     889                vendor=ibm
     890                ;;
     891        rm[46]00)
     892                cpu=mips
     893                vendor=siemens
     894                ;;
     895        rtpc | rtpc-*)
     896                cpu=romp
     897                vendor=ibm
     898                ;;
     899        sde)
     900                cpu=mipsisa32
     901                vendor=sde
     902                basic_os=${basic_os:-elf}
     903                ;;
     904        simso-wrs)
     905                cpu=sparclite
     906                vendor=wrs
     907                basic_os=vxworks
     908                ;;
     909        tower | tower-32)
     910                cpu=m68k
     911                vendor=ncr
     912                ;;
     913        vpp*|vx|vx-*)
     914                cpu=f301
     915                vendor=fujitsu
     916                ;;
     917        w65)
     918                cpu=w65
     919                vendor=wdc
     920                ;;
     921        w89k-*)
     922                cpu=hppa1.1
     923                vendor=winbond
     924                basic_os=proelf
     925                ;;
     926        none)
     927                cpu=none
     928                vendor=none
    328929                ;;
    329930        leon|leon[3-9])
    330                 basic_machine=sparc-$basic_machine
    331                 ;;
    332         m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
    333                 basic_machine=$basic_machine-unknown
    334                 os=-none
    335                 ;;
    336         m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65)
    337                 ;;
    338         ms1)
    339                 basic_machine=mt-unknown
    340                 ;;
    341 
    342         strongarm | thumb | xscale)
    343                 basic_machine=arm-unknown
    344                 ;;
    345         xgate)
    346                 basic_machine=$basic_machine-unknown
    347                 os=-none
    348                 ;;
    349         xscaleeb)
    350                 basic_machine=armeb-unknown
    351                 ;;
    352 
    353         xscaleel)
    354                 basic_machine=armel-unknown
    355                 ;;
    356 
    357         # We use `pc' rather than `unknown'
     931                cpu=sparc
     932                vendor=$basic_machine
     933                ;;
     934        leon-*|leon[3-9]-*)
     935                cpu=sparc
     936                vendor=`echo "$basic_machine" | sed 's/-.*//'`
     937                ;;
     938
     939        *-*)
     940                # shellcheck disable=SC2162
     941                saved_IFS=$IFS
     942                IFS="-" read cpu vendor <<EOF
     943$basic_machine
     944EOF
     945                IFS=$saved_IFS
     946                ;;
     947        # We use 'pc' rather than 'unknown'
    358948        # because (1) that's what they normally are, and
    359949        # (2) the word "unknown" tends to confuse beginning users.
    360950        i*86 | x86_64)
    361           basic_machine=$basic_machine-pc
    362           ;;
    363         # Object if more than one company name word.
    364         *-*-*)
    365                 echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
    366                 exit 1
    367                 ;;
    368         # Recognize the basic CPU types with company name.
    369         580-* \
    370         | a29k-* \
    371         | aarch64-* | aarch64_be-* \
    372         | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
    373         | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
    374         | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
    375         | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
    376         | avr-* | avr32-* \
    377         | ba-* \
    378         | be32-* | be64-* \
    379         | bfin-* | bs2000-* \
    380         | c[123]* | c30-* | [cjt]90-* | c4x-* \
    381         | c8051-* | clipper-* | craynv-* | cydra-* \
    382         | d10v-* | d30v-* | dlx-* \
    383         | e2k-* | elxsi-* \
    384         | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
    385         | h8300-* | h8500-* \
    386         | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
    387         | hexagon-* \
    388         | i*86-* | i860-* | i960-* | ia16-* | ia64-* \
    389         | ip2k-* | iq2000-* \
    390         | k1om-* \
    391         | le32-* | le64-* \
    392         | lm32-* \
    393         | m32c-* | m32r-* | m32rle-* \
    394         | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
    395         | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
    396         | microblaze-* | microblazeel-* \
    397         | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
    398         | mips16-* \
    399         | mips64-* | mips64el-* \
    400         | mips64octeon-* | mips64octeonel-* \
    401         | mips64orion-* | mips64orionel-* \
    402         | mips64r5900-* | mips64r5900el-* \
    403         | mips64vr-* | mips64vrel-* \
    404         | mips64vr4100-* | mips64vr4100el-* \
    405         | mips64vr4300-* | mips64vr4300el-* \
    406         | mips64vr5000-* | mips64vr5000el-* \
    407         | mips64vr5900-* | mips64vr5900el-* \
    408         | mipsisa32-* | mipsisa32el-* \
    409         | mipsisa32r2-* | mipsisa32r2el-* \
    410         | mipsisa32r6-* | mipsisa32r6el-* \
    411         | mipsisa64-* | mipsisa64el-* \
    412         | mipsisa64r2-* | mipsisa64r2el-* \
    413         | mipsisa64r6-* | mipsisa64r6el-* \
    414         | mipsisa64sb1-* | mipsisa64sb1el-* \
    415         | mipsisa64sr71k-* | mipsisa64sr71kel-* \
    416         | mipsr5900-* | mipsr5900el-* \
    417         | mipstx39-* | mipstx39el-* \
    418         | mmix-* \
    419         | mt-* \
    420         | msp430-* \
    421         | nds32-* | nds32le-* | nds32be-* \
    422         | nios-* | nios2-* | nios2eb-* | nios2el-* \
    423         | none-* | np1-* | ns16k-* | ns32k-* \
    424         | open8-* \
    425         | or1k*-* \
    426         | orion-* \
    427         | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
    428         | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
    429         | pru-* \
    430         | pyramid-* \
    431         | riscv32-* | riscv64-* \
    432         | rl78-* | romp-* | rs6000-* | rx-* \
    433         | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
    434         | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
    435         | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
    436         | sparclite-* \
    437         | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
    438         | tahoe-* \
    439         | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
    440         | tile*-* \
    441         | tron-* \
    442         | ubicom32-* \
    443         | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
    444         | vax-* \
    445         | visium-* \
    446         | wasm32-* \
    447         | we32k-* \
    448         | x86-* | x86_64-* | xc16x-* | xps100-* \
    449         | xstormy16-* | xtensa*-* \
    450         | ymp-* \
    451         | z8k-* | z80-*)
    452                 ;;
    453         # Recognize the basic CPU types without company name, with glob match.
    454         xtensa*)
    455                 basic_machine=$basic_machine-unknown
    456                 ;;
    457         # Recognize the various machine names and aliases which stand
    458         # for a CPU type and a company and sometimes even an OS.
    459         386bsd)
    460                 basic_machine=i386-pc
    461                 os=-bsd
    462                 ;;
    463         3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
    464                 basic_machine=m68000-att
    465                 ;;
    466         3b*)
    467                 basic_machine=we32k-att
    468                 ;;
    469         a29khif)
    470                 basic_machine=a29k-amd
    471                 os=-udi
    472                 ;;
    473         abacus)
    474                 basic_machine=abacus-unknown
    475                 ;;
    476         adobe68k)
    477                 basic_machine=m68010-adobe
    478                 os=-scout
    479                 ;;
    480         alliant | fx80)
    481                 basic_machine=fx80-alliant
    482                 ;;
    483         altos | altos3068)
    484                 basic_machine=m68k-altos
    485                 ;;
    486         am29k)
    487                 basic_machine=a29k-none
    488                 os=-bsd
    489                 ;;
    490         amd64)
    491                 basic_machine=x86_64-pc
    492                 ;;
     951                cpu=$basic_machine
     952                vendor=pc
     953                ;;
     954        # These rules are duplicated from below for sake of the special case above;
     955        # i.e. things that normalized to x86 arches should also default to "pc"
     956        pc98)
     957                cpu=i386
     958                vendor=pc
     959                ;;
     960        x64 | amd64)
     961                cpu=x86_64
     962                vendor=pc
     963                ;;
     964        # Recognize the basic CPU types without company name.
     965        *)
     966                cpu=$basic_machine
     967                vendor=unknown
     968                ;;
     969esac
     970
     971unset -v basic_machine
     972
     973# Decode basic machines in the full and proper CPU-Company form.
     974case $cpu-$vendor in
     975        # Here we handle the default manufacturer of certain CPU types in canonical form. It is in
     976        # some cases the only manufacturer, in others, it is the most popular.
     977        craynv-unknown)
     978                vendor=cray
     979                basic_os=${basic_os:-unicosmp}
     980                ;;
     981        c90-unknown | c90-cray)
     982                vendor=cray
     983                basic_os=${Basic_os:-unicos}
     984                ;;
     985        fx80-unknown)
     986                vendor=alliant
     987                ;;
     988        romp-unknown)
     989                vendor=ibm
     990                ;;
     991        mmix-unknown)
     992                vendor=knuth
     993                ;;
     994        microblaze-unknown | microblazeel-unknown)
     995                vendor=xilinx
     996                ;;
     997        rs6000-unknown)
     998                vendor=ibm
     999                ;;
     1000        vax-unknown)
     1001                vendor=dec
     1002                ;;
     1003        pdp11-unknown)
     1004                vendor=dec
     1005                ;;
     1006        we32k-unknown)
     1007                vendor=att
     1008                ;;
     1009        cydra-unknown)
     1010                vendor=cydrome
     1011                ;;
     1012        i370-ibm*)
     1013                vendor=ibm
     1014                ;;
     1015        orion-unknown)
     1016                vendor=highlevel
     1017                ;;
     1018        xps-unknown | xps100-unknown)
     1019                cpu=xps100
     1020                vendor=honeywell
     1021                ;;
     1022
     1023        # Here we normalize CPU types with a missing or matching vendor
     1024        armh-unknown | armh-alt)
     1025                cpu=armv7l
     1026                vendor=alt
     1027                basic_os=${basic_os:-linux-gnueabihf}
     1028                ;;
     1029        dpx20-unknown | dpx20-bull)
     1030                cpu=rs6000
     1031                vendor=bull
     1032                basic_os=${basic_os:-bosx}
     1033                ;;
     1034
     1035        # Here we normalize CPU types irrespective of the vendor
    4931036        amd64-*)
    494                 basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
    495                 ;;
    496         amdahl)
    497                 basic_machine=580-amdahl
    498                 os=-sysv
    499                 ;;
    500         amiga | amiga-*)
    501                 basic_machine=m68k-unknown
    502                 ;;
    503         amigaos | amigados)
    504                 basic_machine=m68k-unknown
    505                 os=-amigaos
    506                 ;;
    507         amigaunix | amix)
    508                 basic_machine=m68k-unknown
    509                 os=-sysv4
    510                 ;;
    511         apollo68)
    512                 basic_machine=m68k-apollo
    513                 os=-sysv
    514                 ;;
    515         apollo68bsd)
    516                 basic_machine=m68k-apollo
    517                 os=-bsd
    518                 ;;
    519         aros)
    520                 basic_machine=i386-pc
    521                 os=-aros
    522                 ;;
    523         asmjs)
    524                 basic_machine=asmjs-unknown
    525                 ;;
    526         aux)
    527                 basic_machine=m68k-apple
    528                 os=-aux
    529                 ;;
    530         balance)
    531                 basic_machine=ns32k-sequent
    532                 os=-dynix
    533                 ;;
    534         blackfin)
    535                 basic_machine=bfin-unknown
    536                 os=-linux
     1037                cpu=x86_64
    5371038                ;;
    5381039        blackfin-*)
    539                 basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'`
    540                 os=-linux
    541                 ;;
    542         bluegene*)
    543                 basic_machine=powerpc-ibm
    544                 os=-cnk
     1040                cpu=bfin
     1041                basic_os=linux
    5451042                ;;
    5461043        c54x-*)
    547                 basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
     1044                cpu=tic54x
    5481045                ;;
    5491046        c55x-*)
    550                 basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
     1047                cpu=tic55x
    5511048                ;;
    5521049        c6x-*)
    553                 basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
    554                 ;;
    555         c90)
    556                 basic_machine=c90-cray
    557                 os=-unicos
    558                 ;;
    559         cegcc)
    560                 basic_machine=arm-unknown
    561                 os=-cegcc
    562                 ;;
    563         convex-c1)
    564                 basic_machine=c1-convex
    565                 os=-bsd
    566                 ;;
    567         convex-c2)
    568                 basic_machine=c2-convex
    569                 os=-bsd
    570                 ;;
    571         convex-c32)
    572                 basic_machine=c32-convex
    573                 os=-bsd
    574                 ;;
    575         convex-c34)
    576                 basic_machine=c34-convex
    577                 os=-bsd
    578                 ;;
    579         convex-c38)
    580                 basic_machine=c38-convex
    581                 os=-bsd
    582                 ;;
    583         cray | j90)
    584                 basic_machine=j90-cray
    585                 os=-unicos
    586                 ;;
    587         craynv)
    588                 basic_machine=craynv-cray
    589                 os=-unicosmp
    590                 ;;
    591         cr16 | cr16-*)
    592                 basic_machine=cr16-unknown
    593                 os=-elf
    594                 ;;
    595         crds | unos)
    596                 basic_machine=m68k-crds
    597                 ;;
    598         crisv32 | crisv32-* | etraxfs*)
    599                 basic_machine=crisv32-axis
    600                 ;;
    601         cris | cris-* | etrax*)
    602                 basic_machine=cris-axis
    603                 ;;
    604         crx)
    605                 basic_machine=crx-unknown
    606                 os=-elf
    607                 ;;
    608         da30 | da30-*)
    609                 basic_machine=m68k-da30
    610                 ;;
    611         decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
    612                 basic_machine=mips-dec
    613                 ;;
    614         decsystem10* | dec10*)
    615                 basic_machine=pdp10-dec
    616                 os=-tops10
    617                 ;;
    618         decsystem20* | dec20*)
    619                 basic_machine=pdp10-dec
    620                 os=-tops20
    621                 ;;
    622         delta | 3300 | motorola-3300 | motorola-delta \
    623               | 3300-motorola | delta-motorola)
    624                 basic_machine=m68k-motorola
    625                 ;;
    626         delta88)
    627                 basic_machine=m88k-motorola
    628                 os=-sysv3
    629                 ;;
    630         dicos)
    631                 basic_machine=i686-pc
    632                 os=-dicos
    633                 ;;
    634         djgpp)
    635                 basic_machine=i586-pc
    636                 os=-msdosdjgpp
    637                 ;;
    638         dpx20 | dpx20-*)
    639                 basic_machine=rs6000-bull
    640                 os=-bosx
    641                 ;;
    642         dpx2*)
    643                 basic_machine=m68k-bull
    644                 os=-sysv3
    645                 ;;
    646         e500v[12])
    647                 basic_machine=powerpc-unknown
    648                 os=$os"spe"
     1050                cpu=tic6x
    6491051                ;;
    6501052        e500v[12]-*)
    651                 basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
    652                 os=$os"spe"
    653                 ;;
    654         ebmon29k)
    655                 basic_machine=a29k-amd
    656                 os=-ebmon
    657                 ;;
    658         elxsi)
    659                 basic_machine=elxsi-elxsi
    660                 os=-bsd
    661                 ;;
    662         encore | umax | mmax)
    663                 basic_machine=ns32k-encore
    664                 ;;
    665         es1800 | OSE68k | ose68k | ose | OSE)
    666                 basic_machine=m68k-ericsson
    667                 os=-ose
    668                 ;;
    669         fx2800)
    670                 basic_machine=i860-alliant
    671                 ;;
    672         genix)
    673                 basic_machine=ns32k-ns
    674                 ;;
    675         gmicro)
    676                 basic_machine=tron-gmicro
    677                 os=-sysv
    678                 ;;
    679         go32)
    680                 basic_machine=i386-pc
    681                 os=-go32
    682                 ;;
    683         h3050r* | hiux*)
    684                 basic_machine=hppa1.1-hitachi
    685                 os=-hiuxwe2
    686                 ;;
    687         h8300hms)
    688                 basic_machine=h8300-hitachi
    689                 os=-hms
    690                 ;;
    691         h8300xray)
    692                 basic_machine=h8300-hitachi
    693                 os=-xray
    694                 ;;
    695         h8500hms)
    696                 basic_machine=h8500-hitachi
    697                 os=-hms
    698                 ;;
    699         harris)
    700                 basic_machine=m88k-harris
    701                 os=-sysv3
    702                 ;;
    703         hp300-*)
    704                 basic_machine=m68k-hp
    705                 ;;
    706         hp300bsd)
    707                 basic_machine=m68k-hp
    708                 os=-bsd
    709                 ;;
    710         hp300hpux)
    711                 basic_machine=m68k-hp
    712                 os=-hpux
    713                 ;;
    714         hp3k9[0-9][0-9] | hp9[0-9][0-9])
    715                 basic_machine=hppa1.0-hp
    716                 ;;
    717         hp9k2[0-9][0-9] | hp9k31[0-9])
    718                 basic_machine=m68000-hp
    719                 ;;
    720         hp9k3[2-9][0-9])
    721                 basic_machine=m68k-hp
    722                 ;;
    723         hp9k6[0-9][0-9] | hp6[0-9][0-9])
    724                 basic_machine=hppa1.0-hp
    725                 ;;
    726         hp9k7[0-79][0-9] | hp7[0-79][0-9])
    727                 basic_machine=hppa1.1-hp
    728                 ;;
    729         hp9k78[0-9] | hp78[0-9])
    730                 # FIXME: really hppa2.0-hp
    731                 basic_machine=hppa1.1-hp
    732                 ;;
    733         hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
    734                 # FIXME: really hppa2.0-hp
    735                 basic_machine=hppa1.1-hp
    736                 ;;
    737         hp9k8[0-9][13679] | hp8[0-9][13679])
    738                 basic_machine=hppa1.1-hp
    739                 ;;
    740         hp9k8[0-9][0-9] | hp8[0-9][0-9])
    741                 basic_machine=hppa1.0-hp
    742                 ;;
    743         hppaosf)
    744                 basic_machine=hppa1.1-hp
    745                 os=-osf
    746                 ;;
    747         hppro)
    748                 basic_machine=hppa1.1-hp
    749                 os=-proelf
    750                 ;;
    751         i370-ibm* | ibm*)
    752                 basic_machine=i370-ibm
    753                 ;;
    754         i*86v32)
    755                 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
    756                 os=-sysv32
    757                 ;;
    758         i*86v4*)
    759                 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
    760                 os=-sysv4
    761                 ;;
    762         i*86v)
    763                 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
    764                 os=-sysv
    765                 ;;
    766         i*86sol2)
    767                 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
    768                 os=-solaris2
    769                 ;;
    770         i386mach)
    771                 basic_machine=i386-mach
    772                 os=-mach
    773                 ;;
    774         vsta)
    775                 basic_machine=i386-unknown
    776                 os=-vsta
    777                 ;;
    778         iris | iris4d)
    779                 basic_machine=mips-sgi
    780                 case $os in
    781                     -irix*)
    782                         ;;
    783                     *)
    784                         os=-irix4
    785                         ;;
     1053                cpu=powerpc
     1054                basic_os=${basic_os}"spe"
     1055                ;;
     1056        mips3*-*)
     1057                cpu=mips64
     1058                ;;
     1059        ms1-*)
     1060                cpu=mt
     1061                ;;
     1062        m68knommu-*)
     1063                cpu=m68k
     1064                basic_os=linux
     1065                ;;
     1066        m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
     1067                cpu=s12z
     1068                ;;
     1069        openrisc-*)
     1070                cpu=or32
     1071                ;;
     1072        parisc-*)
     1073                cpu=hppa
     1074                basic_os=linux
     1075                ;;
     1076        pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
     1077                cpu=i586
     1078                ;;
     1079        pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*)
     1080                cpu=i686
     1081                ;;
     1082        pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
     1083                cpu=i686
     1084                ;;
     1085        pentium4-*)
     1086                cpu=i786
     1087                ;;
     1088        pc98-*)
     1089                cpu=i386
     1090                ;;
     1091        ppc-* | ppcbe-*)
     1092                cpu=powerpc
     1093                ;;
     1094        ppcle-* | powerpclittle-*)
     1095                cpu=powerpcle
     1096                ;;
     1097        ppc64-*)
     1098                cpu=powerpc64
     1099                ;;
     1100        ppc64le-* | powerpc64little-*)
     1101                cpu=powerpc64le
     1102                ;;
     1103        sb1-*)
     1104                cpu=mipsisa64sb1
     1105                ;;
     1106        sb1el-*)
     1107                cpu=mipsisa64sb1el
     1108                ;;
     1109        sh5e[lb]-*)
     1110                cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
     1111                ;;
     1112        spur-*)
     1113                cpu=spur
     1114                ;;
     1115        strongarm-* | thumb-*)
     1116                cpu=arm
     1117                ;;
     1118        tx39-*)
     1119                cpu=mipstx39
     1120                ;;
     1121        tx39el-*)
     1122                cpu=mipstx39el
     1123                ;;
     1124        x64-*)
     1125                cpu=x86_64
     1126                ;;
     1127        xscale-* | xscalee[bl]-*)
     1128                cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
     1129                ;;
     1130        arm64-* | aarch64le-*)
     1131                cpu=aarch64
     1132                ;;
     1133
     1134        # Recognize the canonical CPU Types that limit and/or modify the
     1135        # company names they are paired with.
     1136        cr16-*)
     1137                basic_os=${basic_os:-elf}
     1138                ;;
     1139        crisv32-* | etraxfs*-*)
     1140                cpu=crisv32
     1141                vendor=axis
     1142                ;;
     1143        cris-* | etrax*-*)
     1144                cpu=cris
     1145                vendor=axis
     1146                ;;
     1147        crx-*)
     1148                basic_os=${basic_os:-elf}
     1149                ;;
     1150        neo-tandem)
     1151                cpu=neo
     1152                vendor=tandem
     1153                ;;
     1154        nse-tandem)
     1155                cpu=nse
     1156                vendor=tandem
     1157                ;;
     1158        nsr-tandem)
     1159                cpu=nsr
     1160                vendor=tandem
     1161                ;;
     1162        nsv-tandem)
     1163                cpu=nsv
     1164                vendor=tandem
     1165                ;;
     1166        nsx-tandem)
     1167                cpu=nsx
     1168                vendor=tandem
     1169                ;;
     1170        mipsallegrexel-sony)
     1171                cpu=mipsallegrexel
     1172                vendor=sony
     1173                ;;
     1174        tile*-*)
     1175                basic_os=${basic_os:-linux-gnu}
     1176                ;;
     1177
     1178        *)
     1179                # Recognize the canonical CPU types that are allowed with any
     1180                # company name.
     1181                case $cpu in
     1182                        1750a | 580 \
     1183                        | a29k \
     1184                        | aarch64 | aarch64_be | aarch64c | arm64ec \
     1185                        | abacus \
     1186                        | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
     1187                        | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
     1188                        | alphapca5[67] | alpha64pca5[67] \
     1189                        | am33_2.0 \
     1190                        | amdgcn \
     1191                        | arc | arceb | arc32 | arc64 \
     1192                        | arm | arm[lb]e | arme[lb] | armv* \
     1193                        | avr | avr32 \
     1194                        | asmjs \
     1195                        | ba \
     1196                        | be32 | be64 \
     1197                        | bfin | bpf | bs2000 \
     1198                        | c[123]* | c30 | [cjt]90 | c4x \
     1199                        | c8051 | clipper | craynv | csky | cydra \
     1200                        | d10v | d30v | dlx | dsp16xx \
     1201                        | e2k | elxsi | epiphany \
     1202                        | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
     1203                        | javascript \
     1204                        | h8300 | h8500 \
     1205                        | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
     1206                        | hexagon \
     1207                        | i370 | i*86 | i860 | i960 | ia16 | ia64 \
     1208                        | ip2k | iq2000 \
     1209                        | k1om \
     1210                        | kvx \
     1211                        | le32 | le64 \
     1212                        | lm32 \
     1213                        | loongarch32 | loongarch64 \
     1214                        | m32c | m32r | m32rle \
     1215                        | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
     1216                        | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
     1217                        | m88110 | m88k | maxq | mb | mcore | mep | metag \
     1218                        | microblaze | microblazeel \
     1219                        | mips* \
     1220                        | mmix \
     1221                        | mn10200 | mn10300 \
     1222                        | moxie \
     1223                        | mt \
     1224                        | msp430 \
     1225                        | nds32 | nds32le | nds32be \
     1226                        | nfp \
     1227                        | nios | nios2 | nios2eb | nios2el \
     1228                        | none | np1 | ns16k | ns32k | nvptx \
     1229                        | open8 \
     1230                        | or1k* \
     1231                        | or32 \
     1232                        | orion \
     1233                        | picochip \
     1234                        | pdp10 | pdp11 | pj | pjl | pn | power \
     1235                        | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
     1236                        | pru \
     1237                        | pyramid \
     1238                        | riscv | riscv32 | riscv32be | riscv64 | riscv64be \
     1239                        | rl78 | romp | rs6000 | rx \
     1240                        | s390 | s390x \
     1241                        | score \
     1242                        | sh | shl \
     1243                        | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
     1244                        | sh[1234]e[lb] |  sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
     1245                        | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
     1246                        | sparclite \
     1247                        | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
     1248                        | spu \
     1249                        | tahoe \
     1250                        | thumbv7* \
     1251                        | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
     1252                        | tron \
     1253                        | ubicom32 \
     1254                        | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
     1255                        | vax \
     1256                        | visium \
     1257                        | w65 \
     1258                        | wasm32 | wasm64 \
     1259                        | we32k \
     1260                        | x86 | x86_64 | xc16x | xgate | xps100 \
     1261                        | xstormy16 | xtensa* \
     1262                        | ymp \
     1263                        | z8k | z80)
     1264                                ;;
     1265
     1266                        *)
     1267                                echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2
     1268                                exit 1
     1269                                ;;
    7861270                esac
    7871271                ;;
    788         isi68 | isi)
    789                 basic_machine=m68k-isi
    790                 os=-sysv
    791                 ;;
    792         leon-*|leon[3-9]-*)
    793                 basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'`
    794                 ;;
    795         m68knommu)
    796                 basic_machine=m68k-unknown
    797                 os=-linux
    798                 ;;
    799         m68knommu-*)
    800                 basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'`
    801                 os=-linux
    802                 ;;
    803         magnum | m3230)
    804                 basic_machine=mips-mips
    805                 os=-sysv
    806                 ;;
    807         merlin)
    808                 basic_machine=ns32k-utek
    809                 os=-sysv
    810                 ;;
    811         microblaze*)
    812                 basic_machine=microblaze-xilinx
    813                 ;;
    814         mingw64)
    815                 basic_machine=x86_64-pc
    816                 os=-mingw64
    817                 ;;
    818         mingw32)
    819                 basic_machine=i686-pc
    820                 os=-mingw32
    821                 ;;
    822         mingw32ce)
    823                 basic_machine=arm-unknown
    824                 os=-mingw32ce
    825                 ;;
    826         miniframe)
    827                 basic_machine=m68000-convergent
    828                 ;;
    829         *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
    830                 basic_machine=m68k-atari
    831                 os=-mint
    832                 ;;
    833         mips3*-*)
    834                 basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`
    835                 ;;
    836         mips3*)
    837                 basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown
    838                 ;;
    839         monitor)
    840                 basic_machine=m68k-rom68k
    841                 os=-coff
    842                 ;;
    843         morphos)
    844                 basic_machine=powerpc-unknown
    845                 os=-morphos
    846                 ;;
    847         moxiebox)
    848                 basic_machine=moxie-unknown
    849                 os=-moxiebox
    850                 ;;
    851         msdos)
    852                 basic_machine=i386-pc
    853                 os=-msdos
    854                 ;;
    855         ms1-*)
    856                 basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'`
    857                 ;;
    858         msys)
    859                 basic_machine=i686-pc
    860                 os=-msys
    861                 ;;
    862         mvs)
    863                 basic_machine=i370-ibm
    864                 os=-mvs
    865                 ;;
    866         nacl)
    867                 basic_machine=le32-unknown
    868                 os=-nacl
    869                 ;;
    870         ncr3000)
    871                 basic_machine=i486-ncr
    872                 os=-sysv4
    873                 ;;
    874         netbsd386)
    875                 basic_machine=i386-unknown
    876                 os=-netbsd
    877                 ;;
    878         netwinder)
    879                 basic_machine=armv4l-rebel
    880                 os=-linux
    881                 ;;
    882         news | news700 | news800 | news900)
    883                 basic_machine=m68k-sony
    884                 os=-newsos
    885                 ;;
    886         news1000)
    887                 basic_machine=m68030-sony
    888                 os=-newsos
    889                 ;;
    890         news-3600 | risc-news)
    891                 basic_machine=mips-sony
    892                 os=-newsos
    893                 ;;
    894         necv70)
    895                 basic_machine=v70-nec
    896                 os=-sysv
    897                 ;;
    898         next | m*-next)
    899                 basic_machine=m68k-next
    900                 case $os in
    901                     -nextstep* )
    902                         ;;
    903                     -ns2*)
    904                       os=-nextstep2
    905                         ;;
    906                     *)
    907                       os=-nextstep3
    908                         ;;
    909                 esac
    910                 ;;
    911         nh3000)
    912                 basic_machine=m68k-harris
    913                 os=-cxux
    914                 ;;
    915         nh[45]000)
    916                 basic_machine=m88k-harris
    917                 os=-cxux
    918                 ;;
    919         nindy960)
    920                 basic_machine=i960-intel
    921                 os=-nindy
    922                 ;;
    923         mon960)
    924                 basic_machine=i960-intel
    925                 os=-mon960
    926                 ;;
    927         nonstopux)
    928                 basic_machine=mips-compaq
    929                 os=-nonstopux
    930                 ;;
    931         np1)
    932                 basic_machine=np1-gould
    933                 ;;
    934         neo-tandem)
    935                 basic_machine=neo-tandem
    936                 ;;
    937         nse-tandem)
    938                 basic_machine=nse-tandem
    939                 ;;
    940         nsr-tandem)
    941                 basic_machine=nsr-tandem
    942                 ;;
    943         nsv-tandem)
    944                 basic_machine=nsv-tandem
    945                 ;;
    946         nsx-tandem)
    947                 basic_machine=nsx-tandem
    948                 ;;
    949         op50n-* | op60c-*)
    950                 basic_machine=hppa1.1-oki
    951                 os=-proelf
    952                 ;;
    953         openrisc | openrisc-*)
    954                 basic_machine=or32-unknown
    955                 ;;
    956         os400)
    957                 basic_machine=powerpc-ibm
    958                 os=-os400
    959                 ;;
    960         OSE68000 | ose68000)
    961                 basic_machine=m68000-ericsson
    962                 os=-ose
    963                 ;;
    964         os68k)
    965                 basic_machine=m68k-none
    966                 os=-os68k
    967                 ;;
    968         pa-hitachi)
    969                 basic_machine=hppa1.1-hitachi
    970                 os=-hiuxwe2
    971                 ;;
    972         paragon)
    973                 basic_machine=i860-intel
    974                 os=-osf
    975                 ;;
    976         parisc)
    977                 basic_machine=hppa-unknown
    978                 os=-linux
    979                 ;;
    980         parisc-*)
    981                 basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'`
    982                 os=-linux
    983                 ;;
    984         pbd)
    985                 basic_machine=sparc-tti
    986                 ;;
    987         pbb)
    988                 basic_machine=m68k-tti
    989                 ;;
    990         pc532 | pc532-*)
    991                 basic_machine=ns32k-pc532
    992                 ;;
    993         pc98)
    994                 basic_machine=i386-pc
    995                 ;;
    996         pc98-*)
    997                 basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'`
    998                 ;;
    999         pentium | p5 | k5 | k6 | nexgen | viac3)
    1000                 basic_machine=i586-pc
    1001                 ;;
    1002         pentiumpro | p6 | 6x86 | athlon | athlon_*)
    1003                 basic_machine=i686-pc
    1004                 ;;
    1005         pentiumii | pentium2 | pentiumiii | pentium3)
    1006                 basic_machine=i686-pc
    1007                 ;;
    1008         pentium4)
    1009                 basic_machine=i786-pc
    1010                 ;;
    1011         pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
    1012                 basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'`
    1013                 ;;
    1014         pentiumpro-* | p6-* | 6x86-* | athlon-*)
    1015                 basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
    1016                 ;;
    1017         pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
    1018                 basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
    1019                 ;;
    1020         pentium4-*)
    1021                 basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'`
    1022                 ;;
    1023         pn)
    1024                 basic_machine=pn-gould
    1025                 ;;
    1026         power)  basic_machine=power-ibm
    1027                 ;;
    1028         ppc | ppcbe)    basic_machine=powerpc-unknown
    1029                 ;;
    1030         ppc-* | ppcbe-*)
    1031                 basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
    1032                 ;;
    1033         ppcle | powerpclittle)
    1034                 basic_machine=powerpcle-unknown
    1035                 ;;
    1036         ppcle-* | powerpclittle-*)
    1037                 basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'`
    1038                 ;;
    1039         ppc64)  basic_machine=powerpc64-unknown
    1040                 ;;
    1041         ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
    1042                 ;;
    1043         ppc64le | powerpc64little)
    1044                 basic_machine=powerpc64le-unknown
    1045                 ;;
    1046         ppc64le-* | powerpc64little-*)
    1047                 basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'`
    1048                 ;;
    1049         ps2)
    1050                 basic_machine=i386-ibm
    1051                 ;;
    1052         pw32)
    1053                 basic_machine=i586-unknown
    1054                 os=-pw32
    1055                 ;;
    1056         rdos | rdos64)
    1057                 basic_machine=x86_64-pc
    1058                 os=-rdos
    1059                 ;;
    1060         rdos32)
    1061                 basic_machine=i386-pc
    1062                 os=-rdos
    1063                 ;;
    1064         rom68k)
    1065                 basic_machine=m68k-rom68k
    1066                 os=-coff
    1067                 ;;
    1068         rm[46]00)
    1069                 basic_machine=mips-siemens
    1070                 ;;
    1071         rtpc | rtpc-*)
    1072                 basic_machine=romp-ibm
    1073                 ;;
    1074         s390 | s390-*)
    1075                 basic_machine=s390-ibm
    1076                 ;;
    1077         s390x | s390x-*)
    1078                 basic_machine=s390x-ibm
    1079                 ;;
    1080         sa29200)
    1081                 basic_machine=a29k-amd
    1082                 os=-udi
    1083                 ;;
    1084         sb1)
    1085                 basic_machine=mipsisa64sb1-unknown
    1086                 ;;
    1087         sb1el)
    1088                 basic_machine=mipsisa64sb1el-unknown
    1089                 ;;
    1090         sde)
    1091                 basic_machine=mipsisa32-sde
    1092                 os=-elf
    1093                 ;;
    1094         sei)
    1095                 basic_machine=mips-sei
    1096                 os=-seiux
    1097                 ;;
    1098         sequent)
    1099                 basic_machine=i386-sequent
    1100                 ;;
    1101         sh5el)
    1102                 basic_machine=sh5le-unknown
    1103                 ;;
    1104         simso-wrs)
    1105                 basic_machine=sparclite-wrs
    1106                 os=-vxworks
    1107                 ;;
    1108         sps7)
    1109                 basic_machine=m68k-bull
    1110                 os=-sysv2
    1111                 ;;
    1112         spur)
    1113                 basic_machine=spur-unknown
    1114                 ;;
    1115         st2000)
    1116                 basic_machine=m68k-tandem
    1117                 ;;
    1118         stratus)
    1119                 basic_machine=i860-stratus
    1120                 os=-sysv4
    1121                 ;;
    1122         strongarm-* | thumb-*)
    1123                 basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'`
    1124                 ;;
    1125         sun2)
    1126                 basic_machine=m68000-sun
    1127                 ;;
    1128         sun2os3)
    1129                 basic_machine=m68000-sun
    1130                 os=-sunos3
    1131                 ;;
    1132         sun2os4)
    1133                 basic_machine=m68000-sun
    1134                 os=-sunos4
    1135                 ;;
    1136         sun3os3)
    1137                 basic_machine=m68k-sun
    1138                 os=-sunos3
    1139                 ;;
    1140         sun3os4)
    1141                 basic_machine=m68k-sun
    1142                 os=-sunos4
    1143                 ;;
    1144         sun4os3)
    1145                 basic_machine=sparc-sun
    1146                 os=-sunos3
    1147                 ;;
    1148         sun4os4)
    1149                 basic_machine=sparc-sun
    1150                 os=-sunos4
    1151                 ;;
    1152         sun4sol2)
    1153                 basic_machine=sparc-sun
    1154                 os=-solaris2
    1155                 ;;
    1156         sun3 | sun3-*)
    1157                 basic_machine=m68k-sun
    1158                 ;;
    1159         sun4)
    1160                 basic_machine=sparc-sun
    1161                 ;;
    1162         sun386 | sun386i | roadrunner)
    1163                 basic_machine=i386-sun
    1164                 ;;
    1165         sv1)
    1166                 basic_machine=sv1-cray
    1167                 os=-unicos
    1168                 ;;
    1169         symmetry)
    1170                 basic_machine=i386-sequent
    1171                 os=-dynix
    1172                 ;;
    1173         t3e)
    1174                 basic_machine=alphaev5-cray
    1175                 os=-unicos
    1176                 ;;
    1177         t90)
    1178                 basic_machine=t90-cray
    1179                 os=-unicos
    1180                 ;;
    1181         tile*)
    1182                 basic_machine=$basic_machine-unknown
    1183                 os=-linux-gnu
    1184                 ;;
    1185         tx39)
    1186                 basic_machine=mipstx39-unknown
    1187                 ;;
    1188         tx39el)
    1189                 basic_machine=mipstx39el-unknown
    1190                 ;;
    1191         toad1)
    1192                 basic_machine=pdp10-xkl
    1193                 os=-tops20
    1194                 ;;
    1195         tower | tower-32)
    1196                 basic_machine=m68k-ncr
    1197                 ;;
    1198         tpf)
    1199                 basic_machine=s390x-ibm
    1200                 os=-tpf
    1201                 ;;
    1202         udi29k)
    1203                 basic_machine=a29k-amd
    1204                 os=-udi
    1205                 ;;
    1206         ultra3)
    1207                 basic_machine=a29k-nyu
    1208                 os=-sym1
    1209                 ;;
    1210         v810 | necv810)
    1211                 basic_machine=v810-nec
    1212                 os=-none
    1213                 ;;
    1214         vaxv)
    1215                 basic_machine=vax-dec
    1216                 os=-sysv
    1217                 ;;
    1218         vms)
    1219                 basic_machine=vax-dec
    1220                 os=-vms
    1221                 ;;
    1222         vpp*|vx|vx-*)
    1223                 basic_machine=f301-fujitsu
    1224                 ;;
    1225         vxworks960)
    1226                 basic_machine=i960-wrs
    1227                 os=-vxworks
    1228                 ;;
    1229         vxworks68)
    1230                 basic_machine=m68k-wrs
    1231                 os=-vxworks
    1232                 ;;
    1233         vxworks29k)
    1234                 basic_machine=a29k-wrs
    1235                 os=-vxworks
    1236                 ;;
    1237         w65*)
    1238                 basic_machine=w65-wdc
    1239                 os=-none
    1240                 ;;
    1241         w89k-*)
    1242                 basic_machine=hppa1.1-winbond
    1243                 os=-proelf
    1244                 ;;
    1245         x64)
    1246                 basic_machine=x86_64-pc
    1247                 ;;
    1248         xbox)
    1249                 basic_machine=i686-pc
    1250                 os=-mingw32
    1251                 ;;
    1252         xps | xps100)
    1253                 basic_machine=xps100-honeywell
    1254                 ;;
    1255         xscale-* | xscalee[bl]-*)
    1256                 basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'`
    1257                 ;;
    1258         ymp)
    1259                 basic_machine=ymp-cray
    1260                 os=-unicos
    1261                 ;;
    1262         none)
    1263                 basic_machine=none-none
    1264                 os=-none
    1265                 ;;
    1266 
    1267 # Here we handle the default manufacturer of certain CPU types.  It is in
    1268 # some cases the only manufacturer, in others, it is the most popular.
    1269         w89k)
    1270                 basic_machine=hppa1.1-winbond
    1271                 ;;
    1272         op50n)
    1273                 basic_machine=hppa1.1-oki
    1274                 ;;
    1275         op60c)
    1276                 basic_machine=hppa1.1-oki
    1277                 ;;
    1278         romp)
    1279                 basic_machine=romp-ibm
    1280                 ;;
    1281         mmix)
    1282                 basic_machine=mmix-knuth
    1283                 ;;
    1284         rs6000)
    1285                 basic_machine=rs6000-ibm
    1286                 ;;
    1287         vax)
    1288                 basic_machine=vax-dec
    1289                 ;;
    1290         pdp11)
    1291                 basic_machine=pdp11-dec
    1292                 ;;
    1293         we32k)
    1294                 basic_machine=we32k-att
    1295                 ;;
    1296         sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
    1297                 basic_machine=sh-unknown
    1298                 ;;
    1299         cydra)
    1300                 basic_machine=cydra-cydrome
    1301                 ;;
    1302         orion)
    1303                 basic_machine=orion-highlevel
    1304                 ;;
    1305         orion105)
    1306                 basic_machine=clipper-highlevel
    1307                 ;;
    1308         mac | mpw | mac-mpw)
    1309                 basic_machine=m68k-apple
    1310                 ;;
    1311         pmac | pmac-mpw)
    1312                 basic_machine=powerpc-apple
    1313                 ;;
    1314         *-unknown)
    1315                 # Make sure to match an already-canonicalized machine name.
     1272esac
     1273
     1274# Here we canonicalize certain aliases for manufacturers.
     1275case $vendor in
     1276        digital*)
     1277                vendor=dec
     1278                ;;
     1279        commodore*)
     1280                vendor=cbm
    13161281                ;;
    13171282        *)
    1318                 echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
    1319                 exit 1
    13201283                ;;
    13211284esac
    13221285
    1323 # Here we canonicalize certain aliases for manufacturers.
    1324 case $basic_machine in
    1325         *-digital*)
    1326                 basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'`
    1327                 ;;
    1328         *-commodore*)
    1329                 basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'`
     1286# Decode manufacturer-specific aliases for certain operating systems.
     1287
     1288if test x"$basic_os" != x
     1289then
     1290
     1291# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
     1292# set os.
     1293obj=
     1294case $basic_os in
     1295        gnu/linux*)
     1296                kernel=linux
     1297                os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'`
     1298                ;;
     1299        os2-emx)
     1300                kernel=os2
     1301                os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'`
     1302                ;;
     1303        nto-qnx*)
     1304                kernel=nto
     1305                os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
     1306                ;;
     1307        *-*)
     1308                # shellcheck disable=SC2162
     1309                saved_IFS=$IFS
     1310                IFS="-" read kernel os <<EOF
     1311$basic_os
     1312EOF
     1313                IFS=$saved_IFS
     1314                ;;
     1315        # Default OS when just kernel was specified
     1316        nto*)
     1317                kernel=nto
     1318                os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
     1319                ;;
     1320        linux*)
     1321                kernel=linux
     1322                os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
     1323                ;;
     1324        managarm*)
     1325                kernel=managarm
     1326                os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'`
    13301327                ;;
    13311328        *)
     1329                kernel=
     1330                os=$basic_os
    13321331                ;;
    13331332esac
    13341333
    1335 # Decode manufacturer-specific aliases for certain operating systems.
    1336 
    1337 if [ x"$os" != x"" ]
    1338 then
     1334# Now, normalize the OS (knowing we just have one component, it's not a kernel,
     1335# etc.)
    13391336case $os in
    13401337        # First match some system type aliases that might get confused
    13411338        # with valid system types.
    1342         # -solaris* is a basic system type, with this one exception.
    1343         -auroraux)
    1344                 os=-auroraux
    1345                 ;;
    1346         -solaris1 | -solaris1.*)
    1347                 os=`echo $os | sed -e 's|solaris1|sunos4|'`
    1348                 ;;
    1349         -solaris)
    1350                 os=-solaris2
    1351                 ;;
    1352         -unixware*)
    1353                 os=-sysv4.2uw
    1354                 ;;
    1355         -gnu/linux*)
    1356                 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
     1339        # solaris* is a basic system type, with this one exception.
     1340        auroraux)
     1341                os=auroraux
     1342                ;;
     1343        bluegene*)
     1344                os=cnk
     1345                ;;
     1346        solaris1 | solaris1.*)
     1347                os=`echo "$os" | sed -e 's|solaris1|sunos4|'`
     1348                ;;
     1349        solaris)
     1350                os=solaris2
     1351                ;;
     1352        unixware*)
     1353                os=sysv4.2uw
    13571354                ;;
    13581355        # es1800 is here to avoid being matched by es* (a different OS)
    1359         -es1800*)
    1360                 os=-ose
    1361                 ;;
    1362         # Now accept the basic system types.
    1363         # The portable systems comes first.
    1364         # Each alternative MUST end in a * to match a version number.
    1365         # -sysv* is not here because it comes later, after sysvr4.
    1366         -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
    1367               | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
    1368               | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
    1369               | -sym* | -kopensolaris* | -plan9* \
    1370               | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
    1371               | -aos* | -aros* | -cloudabi* | -sortix* \
    1372               | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
    1373               | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
    1374               | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \
    1375               | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
    1376               | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
    1377               | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
    1378               | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
    1379               | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* | -hcos* \
    1380               | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
    1381               | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
    1382               | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
    1383               | -linux-newlib* | -linux-musl* | -linux-uclibc* \
    1384               | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
    1385               | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \
    1386               | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
    1387               | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
    1388               | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
    1389               | -morphos* | -superux* | -rtmk* | -windiss* \
    1390               | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
    1391               | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
    1392               | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
    1393               | -midnightbsd*)
    1394         # Remember, each alternative MUST END IN *, to match a version number.
    1395                 ;;
    1396         -qnx*)
    1397                 case $basic_machine in
    1398                     x86-* | i*86-*)
    1399                         ;;
    1400                     *)
    1401                         os=-nto$os
    1402                         ;;
    1403                 esac
    1404                 ;;
    1405         -nto-qnx*)
    1406                 ;;
    1407         -nto*)
    1408                 os=`echo $os | sed -e 's|nto|nto-qnx|'`
    1409                 ;;
    1410         -sim | -xray | -os68k* | -v88r* \
    1411               | -windows* | -osx | -abug | -netware* | -os9* \
    1412               | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
    1413                 ;;
    1414         -mac*)
     1356        es1800*)
     1357                os=ose
     1358                ;;
     1359        # Some version numbers need modification
     1360        chorusos*)
     1361                os=chorusos
     1362                ;;
     1363        isc)
     1364                os=isc2.2
     1365                ;;
     1366        sco6)
     1367                os=sco5v6
     1368                ;;
     1369        sco5)
     1370                os=sco3.2v5
     1371                ;;
     1372        sco4)
     1373                os=sco3.2v4
     1374                ;;
     1375        sco3.2.[4-9]*)
     1376                os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'`
     1377                ;;
     1378        sco*v* | scout)
     1379                # Don't match below
     1380                ;;
     1381        sco*)
     1382                os=sco3.2v2
     1383                ;;
     1384        psos*)
     1385                os=psos
     1386                ;;
     1387        qnx*)
     1388                os=qnx
     1389                ;;
     1390        hiux*)
     1391                os=hiuxwe2
     1392                ;;
     1393        lynx*178)
     1394                os=lynxos178
     1395                ;;
     1396        lynx*5)
     1397                os=lynxos5
     1398                ;;
     1399        lynxos*)
     1400                # don't get caught up in next wildcard
     1401                ;;
     1402        lynx*)
     1403                os=lynxos
     1404                ;;
     1405        mac[0-9]*)
    14151406                os=`echo "$os" | sed -e 's|mac|macos|'`
    14161407                ;;
    1417         -linux-dietlibc)
    1418                 os=-linux-dietlibc
    1419                 ;;
    1420         -linux*)
    1421                 os=`echo $os | sed -e 's|linux|linux-gnu|'`
    1422                 ;;
    1423         -sunos5*)
     1408        opened*)
     1409                os=openedition
     1410                ;;
     1411        os400*)
     1412                os=os400
     1413                ;;
     1414        sunos5*)
    14241415                os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
    14251416                ;;
    1426         -sunos6*)
     1417        sunos6*)
    14271418                os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
    14281419                ;;
    1429         -opened*)
    1430                 os=-openedition
    1431                 ;;
    1432         -os400*)
    1433                 os=-os400
    1434                 ;;
    1435         -wince*)
    1436                 os=-wince
    1437                 ;;
    1438         -utek*)
    1439                 os=-bsd
    1440                 ;;
    1441         -dynix*)
    1442                 os=-bsd
    1443                 ;;
    1444         -acis*)
    1445                 os=-aos
    1446                 ;;
    1447         -atheos*)
    1448                 os=-atheos
    1449                 ;;
    1450         -syllable*)
    1451                 os=-syllable
    1452                 ;;
    1453         -386bsd)
    1454                 os=-bsd
    1455                 ;;
    1456         -ctix* | -uts*)
    1457                 os=-sysv
    1458                 ;;
    1459         -nova*)
    1460                 os=-rtmk-nova
    1461                 ;;
    1462         -ns2)
    1463                 os=-nextstep2
    1464                 ;;
    1465         -nsk*)
    1466                 os=-nsk
     1420        wince*)
     1421                os=wince
     1422                ;;
     1423        utek*)
     1424                os=bsd
     1425                ;;
     1426        dynix*)
     1427                os=bsd
     1428                ;;
     1429        acis*)
     1430                os=aos
     1431                ;;
     1432        atheos*)
     1433                os=atheos
     1434                ;;
     1435        syllable*)
     1436                os=syllable
     1437                ;;
     1438        386bsd)
     1439                os=bsd
     1440                ;;
     1441        ctix* | uts*)
     1442                os=sysv
     1443                ;;
     1444        nova*)
     1445                os=rtmk-nova
     1446                ;;
     1447        ns2)
     1448                os=nextstep2
    14671449                ;;
    14681450        # Preserve the version number of sinix5.
    1469         -sinix5.*)
    1470                 os=`echo $os | sed -e 's|sinix|sysv|'`
    1471                 ;;
    1472         -sinix*)
    1473                 os=-sysv4
    1474                 ;;
    1475         -tpf*)
    1476                 os=-tpf
    1477                 ;;
    1478         -triton*)
    1479                 os=-sysv3
    1480                 ;;
    1481         -oss*)
    1482                 os=-sysv3
    1483                 ;;
    1484         -svr4*)
    1485                 os=-sysv4
    1486                 ;;
    1487         -svr3)
    1488                 os=-sysv3
    1489                 ;;
    1490         -sysvr4)
    1491                 os=-sysv4
    1492                 ;;
    1493         # This must come after -sysvr4.
    1494         -sysv*)
    1495                 ;;
    1496         -ose*)
    1497                 os=-ose
    1498                 ;;
    1499         -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
    1500                 os=-mint
    1501                 ;;
    1502         -zvmoe)
    1503                 os=-zvmoe
    1504                 ;;
    1505         -dicos*)
    1506                 os=-dicos
    1507                 ;;
    1508         -pikeos*)
     1451        sinix5.*)
     1452                os=`echo "$os" | sed -e 's|sinix|sysv|'`
     1453                ;;
     1454        sinix*)
     1455                os=sysv4
     1456                ;;
     1457        tpf*)
     1458                os=tpf
     1459                ;;
     1460        triton*)
     1461                os=sysv3
     1462                ;;
     1463        oss*)
     1464                os=sysv3
     1465                ;;
     1466        svr4*)
     1467                os=sysv4
     1468                ;;
     1469        svr3)
     1470                os=sysv3
     1471                ;;
     1472        sysvr4)
     1473                os=sysv4
     1474                ;;
     1475        ose*)
     1476                os=ose
     1477                ;;
     1478        *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
     1479                os=mint
     1480                ;;
     1481        dicos*)
     1482                os=dicos
     1483                ;;
     1484        pikeos*)
    15091485                # Until real need of OS specific support for
    15101486                # particular features comes up, bare metal
    15111487                # configurations are quite functional.
    1512                 case $basic_machine in
     1488                case $cpu in
    15131489                    arm*)
    1514                         os=-eabi
     1490                        os=eabi
    15151491                        ;;
    15161492                    *)
    1517                         os=-elf
     1493                        os=
     1494                        obj=elf
    15181495                        ;;
    15191496                esac
    15201497                ;;
    1521         -nacl*)
    1522                 ;;
    1523         -ios)
    1524                 ;;
    1525         -none)
     1498        aout* | coff* | elf* | pe*)
     1499                # These are machine code file formats, not OSes
     1500                obj=$os
     1501                os=
    15261502                ;;
    15271503        *)
    1528                 # Get rid of the `-' at the beginning of $os.
    1529                 os=`echo $os | sed 's/[^-]*-//'`
    1530                 echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
    1531                 exit 1
     1504                # No normalization, but not necessarily accepted, that comes below.
    15321505                ;;
    15331506esac
     1507
    15341508else
    15351509
     
    15441518# system, and we'll never get to this point.
    15451519
    1546 case $basic_machine in
     1520kernel=
     1521obj=
     1522case $cpu-$vendor in
    15471523        score-*)
    1548                 os=-elf
     1524                os=
     1525                obj=elf
    15491526                ;;
    15501527        spu-*)
    1551                 os=-elf
     1528                os=
     1529                obj=elf
    15521530                ;;
    15531531        *-acorn)
    1554                 os=-riscix1.2
     1532                os=riscix1.2
    15551533                ;;
    15561534        arm*-rebel)
    1557                 os=-linux
     1535                kernel=linux
     1536                os=gnu
    15581537                ;;
    15591538        arm*-semi)
    1560                 os=-aout
     1539                os=
     1540                obj=aout
    15611541                ;;
    15621542        c4x-* | tic4x-*)
    1563                 os=-coff
     1543                os=
     1544                obj=coff
    15641545                ;;
    15651546        c8051-*)
    1566                 os=-elf
     1547                os=
     1548                obj=elf
     1549                ;;
     1550        clipper-intergraph)
     1551                os=clix
    15671552                ;;
    15681553        hexagon-*)
    1569                 os=-elf
     1554                os=
     1555                obj=elf
    15701556                ;;
    15711557        tic54x-*)
    1572                 os=-coff
     1558                os=
     1559                obj=coff
    15731560                ;;
    15741561        tic55x-*)
    1575                 os=-coff
     1562                os=
     1563                obj=coff
    15761564                ;;
    15771565        tic6x-*)
    1578                 os=-coff
     1566                os=
     1567                obj=coff
    15791568                ;;
    15801569        # This must come before the *-dec entry.
    15811570        pdp10-*)
    1582                 os=-tops20
     1571                os=tops20
    15831572                ;;
    15841573        pdp11-*)
    1585                 os=-none
     1574                os=none
    15861575                ;;
    15871576        *-dec | vax-*)
    1588                 os=-ultrix4.2
     1577                os=ultrix4.2
    15891578                ;;
    15901579        m68*-apollo)
    1591                 os=-domain
     1580                os=domain
    15921581                ;;
    15931582        i386-sun)
    1594                 os=-sunos4.0.2
     1583                os=sunos4.0.2
    15951584                ;;
    15961585        m68000-sun)
    1597                 os=-sunos3
     1586                os=sunos3
    15981587                ;;
    15991588        m68*-cisco)
    1600                 os=-aout
     1589                os=
     1590                obj=aout
    16011591                ;;
    16021592        mep-*)
    1603                 os=-elf
     1593                os=
     1594                obj=elf
    16041595                ;;
    16051596        mips*-cisco)
    1606                 os=-elf
     1597                os=
     1598                obj=elf
    16071599                ;;
    16081600        mips*-*)
    1609                 os=-elf
     1601                os=
     1602                obj=elf
    16101603                ;;
    16111604        or32-*)
    1612                 os=-coff
     1605                os=
     1606                obj=coff
    16131607                ;;
    16141608        *-tti)  # must be before sparc entry or we get the wrong os.
    1615                 os=-sysv3
     1609                os=sysv3
    16161610                ;;
    16171611        sparc-* | *-sun)
    1618                 os=-sunos4.1.1
     1612                os=sunos4.1.1
    16191613                ;;
    16201614        pru-*)
    1621                 os=-elf
     1615                os=
     1616                obj=elf
    16221617                ;;
    16231618        *-be)
    1624                 os=-beos
     1619                os=beos
    16251620                ;;
    16261621        *-ibm)
    1627                 os=-aix
     1622                os=aix
    16281623                ;;
    16291624        *-knuth)
    1630                 os=-mmixware
     1625                os=mmixware
    16311626                ;;
    16321627        *-wec)
    1633                 os=-proelf
     1628                os=proelf
    16341629                ;;
    16351630        *-winbond)
    1636                 os=-proelf
     1631                os=proelf
    16371632                ;;
    16381633        *-oki)
    1639                 os=-proelf
     1634                os=proelf
    16401635                ;;
    16411636        *-hp)
    1642                 os=-hpux
     1637                os=hpux
    16431638                ;;
    16441639        *-hitachi)
    1645                 os=-hiux
     1640                os=hiux
    16461641                ;;
    16471642        i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
    1648                 os=-sysv
     1643                os=sysv
    16491644                ;;
    16501645        *-cbm)
    1651                 os=-amigaos
     1646                os=amigaos
    16521647                ;;
    16531648        *-dg)
    1654                 os=-dgux
     1649                os=dgux
    16551650                ;;
    16561651        *-dolphin)
    1657                 os=-sysv3
     1652                os=sysv3
    16581653                ;;
    16591654        m68k-ccur)
    1660                 os=-rtu
     1655                os=rtu
    16611656                ;;
    16621657        m88k-omron*)
    1663                 os=-luna
     1658                os=luna
    16641659                ;;
    16651660        *-next)
    1666                 os=-nextstep
     1661                os=nextstep
    16671662                ;;
    16681663        *-sequent)
    1669                 os=-ptx
     1664                os=ptx
    16701665                ;;
    16711666        *-crds)
    1672                 os=-unos
     1667                os=unos
    16731668                ;;
    16741669        *-ns)
    1675                 os=-genix
     1670                os=genix
    16761671                ;;
    16771672        i370-*)
    1678                 os=-mvs
     1673                os=mvs
    16791674                ;;
    16801675        *-gould)
    1681                 os=-sysv
     1676                os=sysv
    16821677                ;;
    16831678        *-highlevel)
    1684                 os=-bsd
     1679                os=bsd
    16851680                ;;
    16861681        *-encore)
    1687                 os=-bsd
     1682                os=bsd
    16881683                ;;
    16891684        *-sgi)
    1690                 os=-irix
     1685                os=irix
    16911686                ;;
    16921687        *-siemens)
    1693                 os=-sysv4
     1688                os=sysv4
    16941689                ;;
    16951690        *-masscomp)
    1696                 os=-rtu
     1691                os=rtu
    16971692                ;;
    16981693        f30[01]-fujitsu | f700-fujitsu)
    1699                 os=-uxpv
     1694                os=uxpv
    17001695                ;;
    17011696        *-rom68k)
    1702                 os=-coff
     1697                os=
     1698                obj=coff
    17031699                ;;
    17041700        *-*bug)
    1705                 os=-coff
     1701                os=
     1702                obj=coff
    17061703                ;;
    17071704        *-apple)
    1708                 os=-macos
     1705                os=macos
    17091706                ;;
    17101707        *-atari*)
    1711                 os=-mint
     1708                os=mint
     1709                ;;
     1710        *-wrs)
     1711                os=vxworks
    17121712                ;;
    17131713        *)
    1714                 os=-none
     1714                os=none
    17151715                ;;
    17161716esac
     1717
    17171718fi
     1719
     1720# Now, validate our (potentially fixed-up) individual pieces (OS, OBJ).
     1721
     1722case $os in
     1723        # Sometimes we do "kernel-libc", so those need to count as OSes.
     1724        musl* | newlib* | relibc* | uclibc*)
     1725                ;;
     1726        # Likewise for "kernel-abi"
     1727        eabi* | gnueabi*)
     1728                ;;
     1729        # VxWorks passes extra cpu info in the 4th filed.
     1730        simlinux | simwindows | spe)
     1731                ;;
     1732        # See `case $cpu-$os` validation below
     1733        ghcjs)
     1734                ;;
     1735        # Now accept the basic system types.
     1736        # The portable systems comes first.
     1737        # Each alternative MUST end in a * to match a version number.
     1738        gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
     1739             | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
     1740             | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
     1741             | sym* |  plan9* | psp* | sim* | xray* | os68k* | v88r* \
     1742             | hiux* | abug | nacl* | netware* | windows* \
     1743             | os9* | macos* | osx* | ios* | tvos* | watchos* \
     1744             | mpw* | magic* | mmixware* | mon960* | lnews* \
     1745             | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
     1746             | aos* | aros* | cloudabi* | sortix* | twizzler* \
     1747             | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
     1748             | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
     1749             | mirbsd* | netbsd* | dicos* | openedition* | ose* \
     1750             | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
     1751             | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
     1752             | bosx* | nextstep* | cxux* | oabi* \
     1753             | ptx* | ecoff* | winnt* | domain* | vsta* \
     1754             | udi* | lites* | ieee* | go32* | aux* | hcos* \
     1755             | chorusrdb* | cegcc* | glidix* | serenity* \
     1756             | cygwin* | msys* | moss* | proelf* | rtems* \
     1757             | midipix* | mingw32* | mingw64* | mint* \
     1758             | uxpv* | beos* | mpeix* | udk* | moxiebox* \
     1759             | interix* | uwin* | mks* | rhapsody* | darwin* \
     1760             | openstep* | oskit* | conix* | pw32* | nonstopux* \
     1761             | storm-chaos* | tops10* | tenex* | tops20* | its* \
     1762             | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \
     1763             | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \
     1764             | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
     1765             | skyos* | haiku* | rdos* | toppers* | drops* | es* \
     1766             | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
     1767             | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
     1768             | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
     1769             | fiwix* | mlibc* | cos* | mbr* )
     1770                ;;
     1771        # This one is extra strict with allowed versions
     1772        sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
     1773                # Don't forget version if it is 3.2v4 or newer.
     1774                ;;
     1775        none)
     1776                ;;
     1777        kernel* | msvc* )
     1778                # Restricted further below
     1779                ;;
     1780        '')
     1781                if test x"$obj" = x
     1782                then
     1783                        echo "Invalid configuration '$1': Blank OS only allowed with explicit machine code file format" 1>&2
     1784                fi
     1785                ;;
     1786        *)
     1787                echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2
     1788                exit 1
     1789                ;;
     1790esac
     1791
     1792case $obj in
     1793        aout* | coff* | elf* | pe*)
     1794                ;;
     1795        '')
     1796                # empty is fine
     1797                ;;
     1798        *)
     1799                echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2
     1800                exit 1
     1801                ;;
     1802esac
     1803
     1804# Here we handle the constraint that a (synthetic) cpu and os are
     1805# valid only in combination with each other and nowhere else.
     1806case $cpu-$os in
     1807        # The "javascript-unknown-ghcjs" triple is used by GHC; we
     1808        # accept it here in order to tolerate that, but reject any
     1809        # variations.
     1810        javascript-ghcjs)
     1811                ;;
     1812        javascript-* | *-ghcjs)
     1813                echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2
     1814                exit 1
     1815                ;;
     1816esac
     1817
     1818# As a final step for OS-related things, validate the OS-kernel combination
     1819# (given a valid OS), if there is a kernel.
     1820case $kernel-$os-$obj in
     1821        linux-gnu*- | linux-dietlibc*- | linux-android*- | linux-newlib*- \
     1822                   | linux-musl*- | linux-relibc*- | linux-uclibc*- | linux-mlibc*- )
     1823                ;;
     1824        uclinux-uclibc*- )
     1825                ;;
     1826        managarm-mlibc*- | managarm-kernel*- )
     1827                ;;
     1828        windows*-msvc*-)
     1829                ;;
     1830        -dietlibc*- | -newlib*- | -musl*- | -relibc*- | -uclibc*- | -mlibc*- )
     1831                # These are just libc implementations, not actual OSes, and thus
     1832                # require a kernel.
     1833                echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2
     1834                exit 1
     1835                ;;
     1836        -kernel*- )
     1837                echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2
     1838                exit 1
     1839                ;;
     1840        *-kernel*- )
     1841                echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2
     1842                exit 1
     1843                ;;
     1844        *-msvc*- )
     1845                echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2
     1846                exit 1
     1847                ;;
     1848        kfreebsd*-gnu*- | kopensolaris*-gnu*-)
     1849                ;;
     1850        vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-)
     1851                ;;
     1852        nto-qnx*-)
     1853                ;;
     1854        os2-emx-)
     1855                ;;
     1856        *-eabi*- | *-gnueabi*-)
     1857                ;;
     1858        none--*)
     1859                # None (no kernel, i.e. freestanding / bare metal),
     1860                # can be paired with an machine code file format
     1861                ;;
     1862        -*-)
     1863                # Blank kernel with real OS is always fine.
     1864                ;;
     1865        --*)
     1866                # Blank kernel and OS with real machine code file format is always fine.
     1867                ;;
     1868        *-*-*)
     1869                echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2
     1870                exit 1
     1871                ;;
     1872esac
    17181873
    17191874# Here we handle the case where we know the os, and the CPU type, but not the
    17201875# manufacturer.  We pick the logical manufacturer.
    1721 vendor=unknown
    1722 case $basic_machine in
    1723         *-unknown)
    1724                 case $os in
    1725                         -riscix*)
     1876case $vendor in
     1877        unknown)
     1878                case $cpu-$os in
     1879                        *-riscix*)
    17261880                                vendor=acorn
    17271881                                ;;
    1728                         -sunos*)
     1882                        *-sunos*)
    17291883                                vendor=sun
    17301884                                ;;
    1731                         -cnk*|-aix*)
     1885                        *-cnk* | *-aix*)
    17321886                                vendor=ibm
    17331887                                ;;
    1734                         -beos*)
     1888                        *-beos*)
    17351889                                vendor=be
    17361890                                ;;
    1737                         -hpux*)
     1891                        *-hpux*)
    17381892                                vendor=hp
    17391893                                ;;
    1740                         -mpeix*)
     1894                        *-mpeix*)
    17411895                                vendor=hp
    17421896                                ;;
    1743                         -hiux*)
     1897                        *-hiux*)
    17441898                                vendor=hitachi
    17451899                                ;;
    1746                         -unos*)
     1900                        *-unos*)
    17471901                                vendor=crds
    17481902                                ;;
    1749                         -dgux*)
     1903                        *-dgux*)
    17501904                                vendor=dg
    17511905                                ;;
    1752                         -luna*)
     1906                        *-luna*)
    17531907                                vendor=omron
    17541908                                ;;
    1755                         -genix*)
     1909                        *-genix*)
    17561910                                vendor=ns
    17571911                                ;;
    1758                         -mvs* | -opened*)
     1912                        *-clix*)
     1913                                vendor=intergraph
     1914                                ;;
     1915                        *-mvs* | *-opened*)
    17591916                                vendor=ibm
    17601917                                ;;
    1761                         -os400*)
     1918                        *-os400*)
    17621919                                vendor=ibm
    17631920                                ;;
    1764                         -ptx*)
     1921                        s390-* | s390x-*)
     1922                                vendor=ibm
     1923                                ;;
     1924                        *-ptx*)
    17651925                                vendor=sequent
    17661926                                ;;
    1767                         -tpf*)
     1927                        *-tpf*)
    17681928                                vendor=ibm
    17691929                                ;;
    1770                         -vxsim* | -vxworks* | -windiss*)
     1930                        *-vxsim* | *-vxworks* | *-windiss*)
    17711931                                vendor=wrs
    17721932                                ;;
    1773                         -aux*)
     1933                        *-aux*)
    17741934                                vendor=apple
    17751935                                ;;
    1776                         -hms*)
     1936                        *-hms*)
    17771937                                vendor=hitachi
    17781938                                ;;
    1779                         -mpw* | -macos*)
     1939                        *-mpw* | *-macos*)
    17801940                                vendor=apple
    17811941                                ;;
    1782                         -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
     1942                        *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*)
    17831943                                vendor=atari
    17841944                                ;;
    1785                         -vos*)
     1945                        *-vos*)
    17861946                                vendor=stratus
    17871947                                ;;
    17881948                esac
    1789                 basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"`
    17901949                ;;
    17911950esac
    17921951
    1793 echo "$basic_machine$os"
     1952echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}"
    17941953exit
    17951954
  • trunk/src/libs/libpng-1.6.42/configure

    r96425 r103316  
    11#! /bin/sh
    22# Guess values for system-dependent variables and create Makefiles.
    3 # Generated by GNU Autoconf 2.69 for libpng 1.6.37.
     3# Generated by GNU Autoconf 2.72 for libpng 1.6.42.
    44#
    55# Report bugs to <[email protected]>.
    66#
    77#
    8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
     8# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation,
     9# Inc.
    910#
    1011#
     
    1718# Be more Bourne compatible
    1819DUALCASE=1; export DUALCASE # for MKS sh
    19 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
     20if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
     21then :
    2022  emulate sh
    2123  NULLCMD=:
     
    2426  alias -g '${1+"$@"}'='"$@"'
    2527  setopt NO_GLOB_SUBST
    26 else
    27   case `(set -o) 2>/dev/null` in #(
     28else case e in #(
     29  e) case `(set -o) 2>/dev/null` in #(
    2830  *posix*) :
    2931    set -o posix ;; #(
    3032  *) :
    3133     ;;
    32 esac
    33 fi
    34 
    35 
     34esac ;;
     35esac
     36fi
     37
     38
     39
     40# Reset variables that may have inherited troublesome values from
     41# the environment.
     42
     43# IFS needs to be set, to space, tab, and newline, in precisely that order.
     44# (If _AS_PATH_WALK were called with IFS unset, it would have the
     45# side effect of setting IFS to empty, thus disabling word splitting.)
     46# Quoting is to prevent editors from complaining about space-tab.
    3647as_nl='
    3748'
    3849export as_nl
    39 # Printing a long string crashes Solaris 7 /usr/bin/printf.
    40 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
    41 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
    42 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
    43 # Prefer a ksh shell builtin over an external printf program on Solaris,
    44 # but without wasting forks for bash or zsh.
    45 if test -z "$BASH_VERSION$ZSH_VERSION" \
    46     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
    47   as_echo='print -r --'
    48   as_echo_n='print -rn --'
    49 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
    50   as_echo='printf %s\n'
    51   as_echo_n='printf %s'
    52 else
    53   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
    54     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
    55     as_echo_n='/usr/ucb/echo -n'
    56   else
    57     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
    58     as_echo_n_body='eval
    59       arg=$1;
    60       case $arg in #(
    61       *"$as_nl"*)
    62         expr "X$arg" : "X\\(.*\\)$as_nl";
    63         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
    64       esac;
    65       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
    66     '
    67     export as_echo_n_body
    68     as_echo_n='sh -c $as_echo_n_body as_echo'
    69   fi
    70   export as_echo_body
    71   as_echo='sh -c $as_echo_body as_echo'
    72 fi
     50IFS=" ""        $as_nl"
     51
     52PS1='$ '
     53PS2='> '
     54PS4='+ '
     55
     56# Ensure predictable behavior from utilities with locale-dependent output.
     57LC_ALL=C
     58export LC_ALL
     59LANGUAGE=C
     60export LANGUAGE
     61
     62# We cannot yet rely on "unset" to work, but we need these variables
     63# to be unset--not just set to an empty or harmless value--now, to
     64# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
     65# also avoids known problems related to "unset" and subshell syntax
     66# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
     67for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
     68do eval test \${$as_var+y} \
     69  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
     70done
     71
     72# Ensure that fds 0, 1, and 2 are open.
     73if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
     74if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
     75if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
    7376
    7477# The user is always right.
    75 if test "${PATH_SEPARATOR+set}" != set; then
     78if ${PATH_SEPARATOR+false} :; then
    7679  PATH_SEPARATOR=:
    7780  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
     
    8184fi
    8285
    83 
    84 # IFS
    85 # We need space, tab and new line, in precisely that order.  Quoting is
    86 # there to prevent editors from complaining about space-tab.
    87 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
    88 # splitting by setting IFS to empty value.)
    89 IFS=" ""        $as_nl"
    9086
    9187# Find who we are.  Look in the path if we contain no directory separator.
     
    9793do
    9894  IFS=$as_save_IFS
    99   test -z "$as_dir" && as_dir=.
    100     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
     95  case $as_dir in #(((
     96    '') as_dir=./ ;;
     97    */) ;;
     98    *) as_dir=$as_dir/ ;;
     99  esac
     100    test -r "$as_dir$0" && as_myself=$as_dir$0 && break
    101101  done
    102102IFS=$as_save_IFS
     
    104104     ;;
    105105esac
    106 # We did not find ourselves, most probably we were run as `sh COMMAND'
     106# We did not find ourselves, most probably we were run as 'sh COMMAND'
    107107# in which case we are not to be found in the path.
    108108if test "x$as_myself" = x; then
     
    110110fi
    111111if test ! -f "$as_myself"; then
    112   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
     112  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
    113113  exit 1
    114114fi
    115115
    116 # Unset variables that we do not need and which cause bugs (e.g. in
    117 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
    118 # suppresses any "Segmentation fault" message there.  '((' could
    119 # trigger a bug in pdksh 5.2.14.
    120 for as_var in BASH_ENV ENV MAIL MAILPATH
    121 do eval test x\${$as_var+set} = xset \
    122   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
    123 done
    124 PS1='$ '
    125 PS2='> '
    126 PS4='+ '
    127 
    128 # NLS nuisances.
    129 LC_ALL=C
    130 export LC_ALL
    131 LANGUAGE=C
    132 export LANGUAGE
    133 
    134 # CDPATH.
    135 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
    136116
    137117# Use a proper internal environment variable to ensure we don't fall
     
    154134exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
    155135# Admittedly, this is quite paranoid, since all the known shells bail
    156 # out after a failed `exec'.
    157 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
    158 as_fn_exit 255
     136# out after a failed 'exec'.
     137printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
     138exit 255
    159139  fi
    160140  # We don't want this to propagate to other subprocesses.
    161141          { _as_can_reexec=; unset _as_can_reexec;}
    162142if test "x$CONFIG_SHELL" = x; then
    163   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
     143  as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
     144then :
    164145  emulate sh
    165146  NULLCMD=:
     
    168149  alias -g '\${1+\"\$@\"}'='\"\$@\"'
    169150  setopt NO_GLOB_SUBST
    170 else
    171   case \`(set -o) 2>/dev/null\` in #(
     151else case e in #(
     152  e) case \`(set -o) 2>/dev/null\` in #(
    172153  *posix*) :
    173154    set -o posix ;; #(
    174155  *) :
    175156     ;;
     157esac ;;
    176158esac
    177159fi
     
    188170as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
    189171as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
    190 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
    191 
    192 else
    193   exitcode=1; echo positional parameters were not saved.
     172if ( set x; as_fn_ret_success y && test x = \"\$1\" )
     173then :
     174
     175else case e in #(
     176  e) exitcode=1; echo positional parameters were not saved. ;;
     177esac
    194178fi
    195179test x\$exitcode = x0 || exit 1
     180blah=\$(echo \$(echo blah))
     181test x\"\$blah\" = xblah || exit 1
    196182test -x / || exit 1"
    197183  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
     
    208194    test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
    209195      || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
    210   if (eval "$as_required") 2>/dev/null; then :
     196  if (eval "$as_required") 2>/dev/null
     197then :
    211198  as_have_required=yes
    212 else
    213   as_have_required=no
    214 fi
    215   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
    216 
    217 else
    218   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     199else case e in #(
     200  e) as_have_required=no ;;
     201esac
     202fi
     203  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
     204then :
     205
     206else case e in #(
     207  e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    219208as_found=false
    220209for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
    221210do
    222211  IFS=$as_save_IFS
    223   test -z "$as_dir" && as_dir=.
     212  case $as_dir in #(((
     213    '') as_dir=./ ;;
     214    */) ;;
     215    *) as_dir=$as_dir/ ;;
     216  esac
    224217  as_found=:
    225218  case $as_dir in #(
     
    227220           for as_base in sh bash ksh sh5; do
    228221             # Try only shells that exist, to save several forks.
    229              as_shell=$as_dir/$as_base
     222             as_shell=$as_dir$as_base
    230223             if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
    231                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
     224                    as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
     225then :
    232226  CONFIG_SHELL=$as_shell as_have_required=yes
    233                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
     227                   if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
     228then :
    234229  break 2
    235230fi
     
    239234  as_found=false
    240235done
    241 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
    242               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
     236IFS=$as_save_IFS
     237if $as_found
     238then :
     239
     240else case e in #(
     241  e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
     242              as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
     243then :
    243244  CONFIG_SHELL=$SHELL as_have_required=yes
    244 fi; }
    245 IFS=$as_save_IFS
    246 
    247 
    248       if test "x$CONFIG_SHELL" != x; then :
     245fi ;;
     246esac
     247fi
     248
     249
     250      if test "x$CONFIG_SHELL" != x
     251then :
    249252  export CONFIG_SHELL
    250253             # We cannot yet assume a decent shell, so we have to provide a
     
    263266exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
    264267# Admittedly, this is quite paranoid, since all the known shells bail
    265 # out after a failed `exec'.
    266 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
     268# out after a failed 'exec'.
     269printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
    267270exit 255
    268271fi
    269272
    270     if test x$as_have_required = xno; then :
    271   $as_echo "$0: This script requires a shell more modern than all"
    272   $as_echo "$0: the shells that I found on your system."
    273   if test x${ZSH_VERSION+set} = xset ; then
    274     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
    275     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
     273    if test x$as_have_required = xno
     274then :
     275  printf "%s\n" "$0: This script requires a shell more modern than all"
     276  printf "%s\n" "$0: the shells that I found on your system."
     277  if test ${ZSH_VERSION+y} ; then
     278    printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
     279    printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
    276280  else
    277     $as_echo "$0: Please tell [email protected] and
     281    printf "%s\n" "$0: Please tell [email protected] and
    278282$0: [email protected] about your
    279283$0: system, including any error possibly output before this
     
    282286  fi
    283287  exit 1
    284 fi
     288fi ;;
     289esac
    285290fi
    286291fi
     
    303308as_unset=as_fn_unset
    304309
     310
    305311# as_fn_set_status STATUS
    306312# -----------------------
     
    334340    while :; do
    335341      case $as_dir in #(
    336       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
     342      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
    337343      *) as_qdir=$as_dir;;
    338344      esac
     
    343349         X"$as_dir" : 'X\(//\)$' \| \
    344350         X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
    345 $as_echo X"$as_dir" |
     351printf "%s\n" X"$as_dir" |
    346352    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
    347353            s//\1/
     
    382388# repeated appends, instead of the typical quadratic growth present in naive
    383389# implementations.
    384 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
     390if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
     391then :
    385392  eval 'as_fn_append ()
    386393  {
    387394    eval $1+=\$2
    388395  }'
    389 else
    390   as_fn_append ()
     396else case e in #(
     397  e) as_fn_append ()
    391398  {
    392399    eval $1=\$$1\$2
    393   }
     400  } ;;
     401esac
    394402fi # as_fn_append
    395403
     
    399407# global $as_val. Take advantage of shells that can avoid forks. The arguments
    400408# must be portable across $(()) and expr.
    401 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
     409if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
     410then :
    402411  eval 'as_fn_arith ()
    403412  {
    404413    as_val=$(( $* ))
    405414  }'
    406 else
    407   as_fn_arith ()
     415else case e in #(
     416  e) as_fn_arith ()
    408417  {
    409418    as_val=`expr "$@" || test $? -eq 1`
    410   }
     419  } ;;
     420esac
    411421fi # as_fn_arith
    412422
     
    422432  if test "$4"; then
    423433    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
    424     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
     434    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
    425435  fi
    426   $as_echo "$as_me: error: $2" >&2
     436  printf "%s\n" "$as_me: error: $2" >&2
    427437  as_fn_exit $as_status
    428438} # as_fn_error
     
    451461         X"$0" : 'X\(//\)$' \| \
    452462         X"$0" : 'X\(/\)' \| . 2>/dev/null ||
    453 $as_echo X/"$0" |
     463printf "%s\n" X/"$0" |
    454464    sed '/^.*\/\([^/][^/]*\)\/*$/{
    455465            s//\1/
     
    484494  ' <$as_myself |
    485495    sed '
     496      t clear
     497      :clear
    486498      s/[$]LINENO.*/&-/
    487499      t lineno
     
    495507    ' >$as_me.lineno &&
    496508  chmod +x "$as_me.lineno" ||
    497     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
     509    { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
    498510
    499511  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
     
    509521}
    510522
     523
     524# Determine whether it's possible to make 'echo' print without a newline.
     525# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
     526# for compatibility with existing Makefiles.
    511527ECHO_C= ECHO_N= ECHO_T=
    512528case `echo -n x` in #(((((
     
    522538esac
    523539
     540# For backward compatibility with old third-party macros, we provide
     541# the shell variables $as_echo and $as_echo_n.  New code should use
     542# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
     543as_echo='printf %s\n'
     544as_echo_n='printf %s'
     545
    524546rm -f conf$$ conf$$.exe conf$$.file
    525547if test -d conf$$.dir; then
     
    533555    as_ln_s='ln -s'
    534556    # ... but there are two gotchas:
    535     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
    536     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
    537     # In both cases, we have to default to `cp -pR'.
     557    # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail.
     558    # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable.
     559    # In both cases, we have to default to 'cp -pR'.
    538560    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
    539561      as_ln_s='cp -pR'
     
    560582
    561583# Sed expression to map a string onto a valid CPP name.
    562 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
     584as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
     585as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated
    563586
    564587# Sed expression to map a string onto a valid variable name.
    565 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
     588as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
     589as_tr_sh="eval sed '$as_sed_sh'" # deprecated
    566590
    567591SHELL=${CONFIG_SHELL-/bin/sh}
     
    591615PACKAGE_NAME='libpng'
    592616PACKAGE_TARNAME='libpng'
    593 PACKAGE_VERSION='1.6.37'
    594 PACKAGE_STRING='libpng 1.6.37'
     617PACKAGE_VERSION='1.6.42'
     618PACKAGE_STRING='libpng 1.6.42'
    595619PACKAGE_BUGREPORT='[email protected]'
    596620PACKAGE_URL=''
     
    599623# Factoring default headers for most tests.
    600624ac_includes_default="\
    601 #include <stdio.h>
    602 #ifdef HAVE_SYS_TYPES_H
    603 # include <sys/types.h>
     625#include <stddef.h>
     626#ifdef HAVE_STDIO_H
     627# include <stdio.h>
    604628#endif
    605 #ifdef HAVE_SYS_STAT_H
    606 # include <sys/stat.h>
    607 #endif
    608 #ifdef STDC_HEADERS
     629#ifdef HAVE_STDLIB_H
    609630# include <stdlib.h>
    610 # include <stddef.h>
    611 #else
    612 # ifdef HAVE_STDLIB_H
    613 #  include <stdlib.h>
    614 # endif
    615631#endif
    616632#ifdef HAVE_STRING_H
    617 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
    618 #  include <memory.h>
    619 # endif
    620633# include <string.h>
    621 #endif
    622 #ifdef HAVE_STRINGS_H
    623 # include <strings.h>
    624634#endif
    625635#ifdef HAVE_INTTYPES_H
     
    629639# include <stdint.h>
    630640#endif
     641#ifdef HAVE_STRINGS_H
     642# include <strings.h>
     643#endif
     644#ifdef HAVE_SYS_TYPES_H
     645# include <sys/types.h>
     646#endif
     647#ifdef HAVE_SYS_STAT_H
     648# include <sys/stat.h>
     649#endif
    631650#ifdef HAVE_UNISTD_H
    632651# include <unistd.h>
    633652#endif"
    634653
     654ac_header_c_list=
    635655ac_subst_vars='am__EXEEXT_FALSE
    636656am__EXEEXT_TRUE
    637657LTLIBOBJS
     658LIBOBJS
     659PNG_LOONGARCH_LSX_FALSE
     660PNG_LOONGARCH_LSX_TRUE
    638661PNG_POWERPC_VSX_FALSE
    639662PNG_POWERPC_VSX_TRUE
    640663PNG_INTEL_SSE_FALSE
    641664PNG_INTEL_SSE_TRUE
     665PNG_MIPS_MMI_FALSE
     666PNG_MIPS_MMI_TRUE
    642667PNG_MIPS_MSA_FALSE
    643668PNG_MIPS_MSA_TRUE
     
    666691HAVE_CLOCK_GETTIME_FALSE
    667692HAVE_CLOCK_GETTIME_TRUE
    668 LIBOBJS
    669 POW_LIB
    670693PNG_COPTS
     694ENABLE_TOOLS_FALSE
     695ENABLE_TOOLS_TRUE
     696ENABLE_TESTS_FALSE
     697ENABLE_TESTS_TRUE
    671698DFNCPP
    672699LT_SYS_LIBRARY_PATH
     
    680707ac_ct_AR
    681708AR
     709FILECMD
    682710NM
    683711ac_ct_DUMPBIN
     
    730758AM_DEFAULT_V
    731759AM_V
     760CSCOPE
     761ETAGS
     762CTAGS
    732763am__untar
    733764am__tar
     
    772803oldincludedir
    773804includedir
     805runstatedir
    774806localstatedir
    775807sharedstatedir
     
    806838with_sysroot
    807839enable_libtool_lock
     840enable_tests
     841enable_tools
    808842enable_werror
    809843with_zlib_prefix
     
    817851enable_arm_neon
    818852enable_mips_msa
     853enable_mips_mmi
    819854enable_intel_sse
    820855enable_powerpc_vsx
     856enable_loongarch_lsx
    821857'
    822858      ac_precious_vars='build_alias
     
    871907sharedstatedir='${prefix}/com'
    872908localstatedir='${prefix}/var'
     909runstatedir='${localstatedir}/run'
    873910includedir='${prefix}/include'
    874911oldincludedir='/usr/include'
     
    900937  esac
    901938
    902   # Accept the important Cygnus configure options, so we can diagnose typos.
    903 
    904939  case $ac_dashdash$ac_option in
    905940  --)
     
    942977    # Reject names that are not valid shell variable names.
    943978    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
    944       as_fn_error $? "invalid feature name: $ac_useropt"
     979      as_fn_error $? "invalid feature name: '$ac_useropt'"
    945980    ac_useropt_orig=$ac_useropt
    946     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     981    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
    947982    case $ac_user_opts in
    948983      *"
     
    9681003    # Reject names that are not valid shell variable names.
    9691004    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
    970       as_fn_error $? "invalid feature name: $ac_useropt"
     1005      as_fn_error $? "invalid feature name: '$ac_useropt'"
    9711006    ac_useropt_orig=$ac_useropt
    972     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     1007    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
    9731008    case $ac_user_opts in
    9741009      *"
     
    11231158    silent=yes ;;
    11241159
     1160  -runstatedir | --runstatedir | --runstatedi | --runstated \
     1161  | --runstate | --runstat | --runsta | --runst | --runs \
     1162  | --run | --ru | --r)
     1163    ac_prev=runstatedir ;;
     1164  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
     1165  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
     1166  | --run=* | --ru=* | --r=*)
     1167    runstatedir=$ac_optarg ;;
     1168
    11251169  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
    11261170    ac_prev=sbindir ;;
     
    11721216    # Reject names that are not valid shell variable names.
    11731217    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
    1174       as_fn_error $? "invalid package name: $ac_useropt"
     1218      as_fn_error $? "invalid package name: '$ac_useropt'"
    11751219    ac_useropt_orig=$ac_useropt
    1176     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     1220    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
    11771221    case $ac_user_opts in
    11781222      *"
     
    11881232    # Reject names that are not valid shell variable names.
    11891233    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
    1190       as_fn_error $? "invalid package name: $ac_useropt"
     1234      as_fn_error $? "invalid package name: '$ac_useropt'"
    11911235    ac_useropt_orig=$ac_useropt
    1192     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     1236    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
    11931237    case $ac_user_opts in
    11941238      *"
     
    12181262    x_libraries=$ac_optarg ;;
    12191263
    1220   -*) as_fn_error $? "unrecognized option: \`$ac_option'
    1221 Try \`$0 --help' for more information"
     1264  -*) as_fn_error $? "unrecognized option: '$ac_option'
     1265Try '$0 --help' for more information"
    12221266    ;;
    12231267
     
    12271271    case $ac_envvar in #(
    12281272      '' | [0-9]* | *[!_$as_cr_alnum]* )
    1229       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
     1273      as_fn_error $? "invalid variable name: '$ac_envvar'" ;;
    12301274    esac
    12311275    eval $ac_envvar=\$ac_optarg
     
    12341278  *)
    12351279    # FIXME: should be removed in autoconf 3.0.
    1236     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
     1280    printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
    12371281    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
    1238       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
     1282      printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
    12391283    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
    12401284    ;;
     
    12521296    no) ;;
    12531297    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
    1254     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
     1298    *)     printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
    12551299  esac
    12561300fi
     
    12601304                datadir sysconfdir sharedstatedir localstatedir includedir \
    12611305                oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
    1262                 libdir localedir mandir
     1306                libdir localedir mandir runstatedir
    12631307do
    12641308  eval ac_val=\$$ac_var
     
    12771321done
    12781322
    1279 # There might be people who depend on the old broken behavior: `$host'
     1323# There might be people who depend on the old broken behavior: '$host'
    12801324# used to hold the argument of --host etc.
    12811325# FIXME: To remove some day.
     
    13161360         X"$as_myself" : 'X\(//\)$' \| \
    13171361         X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
    1318 $as_echo X"$as_myself" |
     1362printf "%s\n" X"$as_myself" |
    13191363    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
    13201364            s//\1/
     
    13451389  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
    13461390fi
    1347 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
     1391ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work"
    13481392ac_abs_confdir=`(
    13491393        cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
     
    13731417  # This message is too long to be a string in the A/UX 3.1 sh.
    13741418  cat <<_ACEOF
    1375 \`configure' configures libpng 1.6.37 to adapt to many kinds of systems.
     1419'configure' configures libpng 1.6.42 to adapt to many kinds of systems.
    13761420
    13771421Usage: $0 [OPTION]... [VAR=VALUE]...
     
    13871431      --help=recursive    display the short help of all the included packages
    13881432  -V, --version           display version information and exit
    1389   -q, --quiet, --silent   do not print \`checking ...' messages
     1433  -q, --quiet, --silent   do not print 'checking ...' messages
    13901434      --cache-file=FILE   cache test results in FILE [disabled]
    1391   -C, --config-cache      alias for \`--cache-file=config.cache'
     1435  -C, --config-cache      alias for '--cache-file=config.cache'
    13921436  -n, --no-create         do not create output files
    1393       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
     1437      --srcdir=DIR        find the sources in DIR [configure dir or '..']
    13941438
    13951439Installation directories:
     
    13991443                          [PREFIX]
    14001444
    1401 By default, \`make install' will install all the files in
    1402 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
    1403 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
    1404 for instance \`--prefix=\$HOME'.
     1445By default, 'make install' will install all the files in
     1446'$ac_default_prefix/bin', '$ac_default_prefix/lib' etc.  You can specify
     1447an installation prefix other than '$ac_default_prefix' using '--prefix',
     1448for instance '--prefix=\$HOME'.
    14051449
    14061450For better control, use the options below.
     
    14131457  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
    14141458  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
     1459  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
    14151460  --libdir=DIR            object code libraries [EPREFIX/lib]
    14161461  --includedir=DIR        C header files [PREFIX/include]
     
    14431488if test -n "$ac_init_help"; then
    14441489  case $ac_init_help in
    1445      short | recursive ) echo "Configuration of libpng 1.6.37:";;
     1490     short | recursive ) echo "Configuration of libpng 1.6.42:";;
    14461491   esac
    14471492  cat <<\_ACEOF
     
    14651510                          optimize for fast installation [default=yes]
    14661511  --disable-libtool-lock  avoid locking (might break parallel builds)
     1512  --disable-tests         do not build the test programs (default is to build)
     1513  --disable-tools         do not build the auxiliary tools (default is to
     1514                          build)
    14671515  --enable-werror[=OPT] Pass -Werror or the given argument to the compiler
    14681516                          if it is supported
     
    15111559                          unconditionally. If not specified: determined by the
    15121560                          compiler.
     1561  --enable-mips-mmi     Enable MIPS MMI optimizations: =no/off, check, api,
     1562                          yes/on: no/off: disable the optimizations; check:
     1563                          use internal checking code (deprecated and poorly
     1564                          supported); api: disable by default, enable by a
     1565                          call to png_set_option; yes/on: turn on
     1566                          unconditionally. If not specified: determined by the
     1567                          compiler.
    15131568  --enable-intel-sse    Enable Intel SSE optimizations: =no/off, yes/on:
    15141569                          no/off: disable the optimizations; yes/on: enable
     
    15211576                          turn on unconditionally. If not specified:
    15221577                          determined by the compiler.
     1578  --enable-loongarch-lsx
     1579                          Enable LOONGARCH LSX optimizations: =no/off, yes/on:
     1580                          no/off: disable the optimizations; yes/on: turn on
     1581                          unconditionally. If not specified: determined by the
     1582                          compiler.
    15231583
    15241584Optional Packages:
     
    15571617              would cause configure itself to fail
    15581618
    1559 Use these variables to override the choices made by `configure' or to help
     1619Use these variables to override the choices made by 'configure' or to help
    15601620it to find libraries and programs with nonstandard names/locations.
    15611621
     
    15761636.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
    15771637*)
    1578   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
     1638  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
    15791639  # A ".." for each directory in $ac_dir_suffix.
    1580   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
     1640  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
    15811641  case $ac_top_builddir_sub in
    15821642  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
     
    16061666
    16071667    cd "$ac_dir" || { ac_status=$?; continue; }
    1608     # Check for guested configure.
     1668    # Check for configure.gnu first; this name is used for a wrapper for
     1669    # Metaconfig's "Configure" on case-insensitive file systems.
    16091670    if test -f "$ac_srcdir/configure.gnu"; then
    16101671      echo &&
     
    16141675      $SHELL "$ac_srcdir/configure" --help=recursive
    16151676    else
    1616       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
     1677      printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
    16171678    fi || ac_status=$?
    16181679    cd "$ac_pwd" || { ac_status=$?; break; }
     
    16231684if $ac_init_version; then
    16241685  cat <<\_ACEOF
    1625 libpng configure 1.6.37
    1626 generated by GNU Autoconf 2.69
    1627 
    1628 Copyright (C) 2012 Free Software Foundation, Inc.
     1686libpng configure 1.6.42
     1687generated by GNU Autoconf 2.72
     1688
     1689Copyright (C) 2023 Free Software Foundation, Inc.
    16291690This configure script is free software; the Free Software Foundation
    16301691gives unlimited permission to copy, distribute and modify it.
     
    16431704{
    16441705  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
    1645   rm -f conftest.$ac_objext
     1706  rm -f conftest.$ac_objext conftest.beam
    16461707  if { { ac_try="$ac_compile"
    16471708case "(($ac_try" in
     
    16501711esac
    16511712eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
    1652 $as_echo "$ac_try_echo"; } >&5
     1713printf "%s\n" "$ac_try_echo"; } >&5
    16531714  (eval "$ac_compile") 2>conftest.err
    16541715  ac_status=$?
     
    16581719    mv -f conftest.er1 conftest.err
    16591720  fi
    1660   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     1721  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
    16611722  test $ac_status = 0; } && {
    16621723         test -z "$ac_c_werror_flag" ||
    16631724         test ! -s conftest.err
    1664        } && test -s conftest.$ac_objext; then :
     1725       } && test -s conftest.$ac_objext
     1726then :
    16651727  ac_retval=0
    1666 else
    1667   $as_echo "$as_me: failed program was:" >&5
     1728else case e in #(
     1729  e) printf "%s\n" "$as_me: failed program was:" >&5
    16681730sed 's/^/| /' conftest.$ac_ext >&5
    16691731
    1670         ac_retval=1
     1732        ac_retval=1 ;;
     1733esac
    16711734fi
    16721735  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
     
    16871750esac
    16881751eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
    1689 $as_echo "$ac_try_echo"; } >&5
     1752printf "%s\n" "$ac_try_echo"; } >&5
    16901753  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
    16911754  ac_status=$?
     
    16951758    mv -f conftest.er1 conftest.err
    16961759  fi
    1697   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     1760  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
    16981761  test $ac_status = 0; } > conftest.i && {
    16991762         test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
    17001763         test ! -s conftest.err
    1701        }; then :
     1764       }
     1765then :
    17021766  ac_retval=0
    1703 else
    1704   $as_echo "$as_me: failed program was:" >&5
     1767else case e in #(
     1768  e) printf "%s\n" "$as_me: failed program was:" >&5
    17051769sed 's/^/| /' conftest.$ac_ext >&5
    17061770
    1707     ac_retval=1
     1771    ac_retval=1 ;;
     1772esac
    17081773fi
    17091774  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
     
    17181783{
    17191784  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
    1720   rm -f conftest.$ac_objext conftest$ac_exeext
     1785  rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
    17211786  if { { ac_try="$ac_link"
    17221787case "(($ac_try" in
     
    17251790esac
    17261791eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
    1727 $as_echo "$ac_try_echo"; } >&5
     1792printf "%s\n" "$ac_try_echo"; } >&5
    17281793  (eval "$ac_link") 2>conftest.err
    17291794  ac_status=$?
     
    17331798    mv -f conftest.er1 conftest.err
    17341799  fi
    1735   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     1800  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
    17361801  test $ac_status = 0; } && {
    17371802         test -z "$ac_c_werror_flag" ||
     
    17401805         test "$cross_compiling" = yes ||
    17411806         test -x conftest$ac_exeext
    1742        }; then :
     1807       }
     1808then :
    17431809  ac_retval=0
    1744 else
    1745   $as_echo "$as_me: failed program was:" >&5
     1810else case e in #(
     1811  e) printf "%s\n" "$as_me: failed program was:" >&5
    17461812sed 's/^/| /' conftest.$ac_ext >&5
    17471813
    1748         ac_retval=1
     1814        ac_retval=1 ;;
     1815esac
    17491816fi
    17501817  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
     
    17651832{
    17661833  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
    1767   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
    1768 $as_echo_n "checking for $2... " >&6; }
    1769 if eval \${$3+:} false; then :
    1770   $as_echo_n "(cached) " >&6
    1771 else
    1772   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     1834  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
     1835printf %s "checking for $2... " >&6; }
     1836if eval test \${$3+y}
     1837then :
     1838  printf %s "(cached) " >&6
     1839else case e in #(
     1840  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    17731841/* end confdefs.h.  */
    17741842$4
    17751843#include <$2>
    17761844_ACEOF
    1777 if ac_fn_c_try_compile "$LINENO"; then :
     1845if ac_fn_c_try_compile "$LINENO"
     1846then :
    17781847  eval "$3=yes"
    1779 else
    1780   eval "$3=no"
    1781 fi
    1782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     1848else case e in #(
     1849  e) eval "$3=no" ;;
     1850esac
     1851fi
     1852rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
     1853esac
    17831854fi
    17841855eval ac_res=\$$3
    1785                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
    1786 $as_echo "$ac_res" >&6; }
     1856               { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
     1857printf "%s\n" "$ac_res" >&6; }
    17871858  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
    17881859
    17891860} # ac_fn_c_check_header_compile
    1790 
    1791 # ac_fn_c_try_run LINENO
    1792 # ----------------------
    1793 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
    1794 # that executables *can* be run.
    1795 ac_fn_c_try_run ()
    1796 {
    1797   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
    1798   if { { ac_try="$ac_link"
    1799 case "(($ac_try" in
    1800   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
    1801   *) ac_try_echo=$ac_try;;
    1802 esac
    1803 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
    1804 $as_echo "$ac_try_echo"; } >&5
    1805   (eval "$ac_link") 2>&5
    1806   ac_status=$?
    1807   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
    1808   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
    1809   { { case "(($ac_try" in
    1810   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
    1811   *) ac_try_echo=$ac_try;;
    1812 esac
    1813 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
    1814 $as_echo "$ac_try_echo"; } >&5
    1815   (eval "$ac_try") 2>&5
    1816   ac_status=$?
    1817   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
    1818   test $ac_status = 0; }; }; then :
    1819   ac_retval=0
    1820 else
    1821   $as_echo "$as_me: program exited with status $ac_status" >&5
    1822        $as_echo "$as_me: failed program was:" >&5
    1823 sed 's/^/| /' conftest.$ac_ext >&5
    1824 
    1825        ac_retval=$ac_status
    1826 fi
    1827   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
    1828   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
    1829   as_fn_set_status $ac_retval
    1830 
    1831 } # ac_fn_c_try_run
    18321861
    18331862# ac_fn_c_check_func LINENO FUNC VAR
     
    18371866{
    18381867  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
    1839   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
    1840 $as_echo_n "checking for $2... " >&6; }
    1841 if eval \${$3+:} false; then :
    1842   $as_echo_n "(cached) " >&6
    1843 else
    1844   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     1868  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
     1869printf %s "checking for $2... " >&6; }
     1870if eval test \${$3+y}
     1871then :
     1872  printf %s "(cached) " >&6
     1873else case e in #(
     1874  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    18451875/* end confdefs.h.  */
    18461876/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
     
    18491879
    18501880/* System header to define __stub macros and hopefully few prototypes,
    1851     which can conflict with char $2 (); below.
    1852     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    1853     <limits.h> exists even on freestanding compilers.  */
    1854 
    1855 #ifdef __STDC__
    1856 # include <limits.h>
    1857 #else
    1858 # include <assert.h>
    1859 #endif
    1860 
     1881   which can conflict with char $2 (void); below.  */
     1882
     1883#include <limits.h>
    18611884#undef $2
    18621885
     
    18671890extern "C"
    18681891#endif
    1869 char $2 ();
     1892char $2 (void);
    18701893/* The GNU C library defines this for functions which it implements
    18711894    to always fail with ENOSYS.  Some functions are actually named
     
    18761899
    18771900int
    1878 main ()
     1901main (void)
    18791902{
    18801903return $2 ();
     
    18831906}
    18841907_ACEOF
    1885 if ac_fn_c_try_link "$LINENO"; then :
     1908if ac_fn_c_try_link "$LINENO"
     1909then :
    18861910  eval "$3=yes"
    1887 else
    1888   eval "$3=no"
    1889 fi
    1890 rm -f core conftest.err conftest.$ac_objext \
    1891     conftest$ac_exeext conftest.$ac_ext
     1911else case e in #(
     1912  e) eval "$3=no" ;;
     1913esac
     1914fi
     1915rm -f core conftest.err conftest.$ac_objext conftest.beam \
     1916    conftest$ac_exeext conftest.$ac_ext ;;
     1917esac
    18921918fi
    18931919eval ac_res=\$$3
    1894                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
    1895 $as_echo "$ac_res" >&6; }
     1920               { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
     1921printf "%s\n" "$ac_res" >&6; }
    18961922  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
    18971923
    18981924} # ac_fn_c_check_func
    1899 
    1900 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
    1901 # -------------------------------------------
    1902 # Tests whether TYPE exists after having included INCLUDES, setting cache
    1903 # variable VAR accordingly.
    1904 ac_fn_c_check_type ()
    1905 {
    1906   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
    1907   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
    1908 $as_echo_n "checking for $2... " >&6; }
    1909 if eval \${$3+:} false; then :
    1910   $as_echo_n "(cached) " >&6
    1911 else
    1912   eval "$3=no"
    1913   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    1914 /* end confdefs.h.  */
    1915 $4
    1916 int
    1917 main ()
    1918 {
    1919 if (sizeof ($2))
    1920          return 0;
    1921   ;
    1922   return 0;
    1923 }
    1924 _ACEOF
    1925 if ac_fn_c_try_compile "$LINENO"; then :
    1926   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    1927 /* end confdefs.h.  */
    1928 $4
    1929 int
    1930 main ()
    1931 {
    1932 if (sizeof (($2)))
    1933             return 0;
    1934   ;
    1935   return 0;
    1936 }
    1937 _ACEOF
    1938 if ac_fn_c_try_compile "$LINENO"; then :
    1939 
    1940 else
    1941   eval "$3=yes"
    1942 fi
    1943 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    1944 fi
    1945 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    1946 fi
    1947 eval ac_res=\$$3
    1948                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
    1949 $as_echo "$ac_res" >&6; }
    1950   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
    1951 
    1952 } # ac_fn_c_check_type
     1925ac_configure_args_raw=
     1926for ac_arg
     1927do
     1928  case $ac_arg in
     1929  *\'*)
     1930    ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
     1931  esac
     1932  as_fn_append ac_configure_args_raw " '$ac_arg'"
     1933done
     1934
     1935case $ac_configure_args_raw in
     1936  *$as_nl*)
     1937    ac_safe_unquote= ;;
     1938  *)
     1939    ac_unsafe_z='|&;<>()$`\\"*?[ ''     ' # This string ends in space, tab.
     1940    ac_unsafe_a="$ac_unsafe_z#~"
     1941    ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
     1942    ac_configure_args_raw=`      printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
     1943esac
     1944
    19531945cat >config.log <<_ACEOF
    19541946This file contains any messages produced by compilers while
    19551947running configure, to aid debugging if configure makes a mistake.
    19561948
    1957 It was created by libpng $as_me 1.6.37, which was
    1958 generated by GNU Autoconf 2.69.  Invocation command line was
    1959 
    1960   $ $0 $@
     1949It was created by libpng $as_me 1.6.42, which was
     1950generated by GNU Autoconf 2.72.  Invocation command line was
     1951
     1952  $ $0$ac_configure_args_raw
    19611953
    19621954_ACEOF
     
    19911983do
    19921984  IFS=$as_save_IFS
    1993   test -z "$as_dir" && as_dir=.
    1994     $as_echo "PATH: $as_dir"
     1985  case $as_dir in #(((
     1986    '') as_dir=./ ;;
     1987    */) ;;
     1988    *) as_dir=$as_dir/ ;;
     1989  esac
     1990    printf "%s\n" "PATH: $as_dir"
    19951991  done
    19961992IFS=$as_save_IFS
     
    20272023      continue ;;
    20282024    *\'*)
    2029       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
     2025      ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
    20302026    esac
    20312027    case $ac_pass in
     
    20622058# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
    20632059trap 'exit_status=$?
     2060  # Sanitize IFS.
     2061  IFS=" ""      $as_nl"
    20642062  # Save into config.log some information that might help in debugging.
    20652063  {
    20662064    echo
    20672065
    2068     $as_echo "## ---------------- ##
     2066    printf "%s\n" "## ---------------- ##
    20692067## Cache variables. ##
    20702068## ---------------- ##"
     
    20772075    *${as_nl}*)
    20782076      case $ac_var in #(
    2079       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
    2080 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
     2077      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
     2078printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
    20812079      esac
    20822080      case $ac_var in #(
     
    21022100    echo
    21032101
    2104     $as_echo "## ----------------- ##
     2102    printf "%s\n" "## ----------------- ##
    21052103## Output variables. ##
    21062104## ----------------- ##"
     
    21102108      eval ac_val=\$$ac_var
    21112109      case $ac_val in
    2112       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
     2110      *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
    21132111      esac
    2114       $as_echo "$ac_var='\''$ac_val'\''"
     2112      printf "%s\n" "$ac_var='\''$ac_val'\''"
    21152113    done | sort
    21162114    echo
    21172115
    21182116    if test -n "$ac_subst_files"; then
    2119       $as_echo "## ------------------- ##
     2117      printf "%s\n" "## ------------------- ##
    21202118## File substitutions. ##
    21212119## ------------------- ##"
     
    21252123        eval ac_val=\$$ac_var
    21262124        case $ac_val in
    2127         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
     2125        *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
    21282126        esac
    2129         $as_echo "$ac_var='\''$ac_val'\''"
     2127        printf "%s\n" "$ac_var='\''$ac_val'\''"
    21302128      done | sort
    21312129      echo
     
    21332131
    21342132    if test -s confdefs.h; then
    2135       $as_echo "## ----------- ##
     2133      printf "%s\n" "## ----------- ##
    21362134## confdefs.h. ##
    21372135## ----------- ##"
     
    21412139    fi
    21422140    test "$ac_signal" != 0 &&
    2143       $as_echo "$as_me: caught signal $ac_signal"
    2144     $as_echo "$as_me: exit $exit_status"
     2141      printf "%s\n" "$as_me: caught signal $ac_signal"
     2142    printf "%s\n" "$as_me: exit $exit_status"
    21452143  } >&5
    21462144  rm -f core *.core core.conftest.* &&
     
    21562154rm -f -r conftest* confdefs.h
    21572155
    2158 $as_echo "/* confdefs.h */" > confdefs.h
     2156printf "%s\n" "/* confdefs.h */" > confdefs.h
    21592157
    21602158# Predefined preprocessor variables.
    21612159
    2162 cat >>confdefs.h <<_ACEOF
    2163 #define PACKAGE_NAME "$PACKAGE_NAME"
    2164 _ACEOF
    2165 
    2166 cat >>confdefs.h <<_ACEOF
    2167 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
    2168 _ACEOF
    2169 
    2170 cat >>confdefs.h <<_ACEOF
    2171 #define PACKAGE_VERSION "$PACKAGE_VERSION"
    2172 _ACEOF
    2173 
    2174 cat >>confdefs.h <<_ACEOF
    2175 #define PACKAGE_STRING "$PACKAGE_STRING"
    2176 _ACEOF
    2177 
    2178 cat >>confdefs.h <<_ACEOF
    2179 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
    2180 _ACEOF
    2181 
    2182 cat >>confdefs.h <<_ACEOF
    2183 #define PACKAGE_URL "$PACKAGE_URL"
    2184 _ACEOF
     2160printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
     2161
     2162printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
     2163
     2164printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
     2165
     2166printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
     2167
     2168printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
     2169
     2170printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
    21852171
    21862172
    21872173# Let the site file select an alternate cache file if it wants to.
    21882174# Prefer an explicitly selected file to automatically selected ones.
    2189 ac_site_file1=NONE
    2190 ac_site_file2=NONE
    21912175if test -n "$CONFIG_SITE"; then
    2192   # We do not want a PATH search for config.site.
    2193   case $CONFIG_SITE in #((
    2194     -*)  ac_site_file1=./$CONFIG_SITE;;
    2195     */*) ac_site_file1=$CONFIG_SITE;;
    2196     *)   ac_site_file1=./$CONFIG_SITE;;
    2197   esac
     2176  ac_site_files="$CONFIG_SITE"
    21982177elif test "x$prefix" != xNONE; then
    2199   ac_site_file1=$prefix/share/config.site
    2200   ac_site_file2=$prefix/etc/config.site
    2201 else
    2202   ac_site_file1=$ac_default_prefix/share/config.site
    2203   ac_site_file2=$ac_default_prefix/etc/config.site
    2204 fi
    2205 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
     2178  ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
     2179else
     2180  ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
     2181fi
     2182
     2183for ac_site_file in $ac_site_files
    22062184do
    2207   test "x$ac_site_file" = xNONE && continue
    2208   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
    2209     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
    2210 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
     2185  case $ac_site_file in #(
     2186  */*) :
     2187     ;; #(
     2188  *) :
     2189    ac_site_file=./$ac_site_file ;;
     2190esac
     2191  if test -f "$ac_site_file" && test -r "$ac_site_file"; then
     2192    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
     2193printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
    22112194    sed 's/^/| /' "$ac_site_file" >&5
    22122195    . "$ac_site_file" \
    2213       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
    2214 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     2196      || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
     2197printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
    22152198as_fn_error $? "failed to load site script $ac_site_file
    2216 See \`config.log' for more details" "$LINENO" 5; }
     2199See 'config.log' for more details" "$LINENO" 5; }
    22172200  fi
    22182201done
     
    22222205  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
    22232206  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
    2224     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
    2225 $as_echo "$as_me: loading cache $cache_file" >&6;}
     2207    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
     2208printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
    22262209    case $cache_file in
    22272210      [\\/]* | ?:[\\/]* ) . "$cache_file";;
     
    22302213  fi
    22312214else
    2232   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
    2233 $as_echo "$as_me: creating cache $cache_file" >&6;}
     2215  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
     2216printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
    22342217  >$cache_file
     2218fi
     2219
     2220# Test code for whether the C compiler supports C89 (global declarations)
     2221ac_c_conftest_c89_globals='
     2222/* Does the compiler advertise C89 conformance?
     2223   Do not test the value of __STDC__, because some compilers set it to 0
     2224   while being otherwise adequately conformant. */
     2225#if !defined __STDC__
     2226# error "Compiler does not advertise C89 conformance"
     2227#endif
     2228
     2229#include <stddef.h>
     2230#include <stdarg.h>
     2231struct stat;
     2232/* Most of the following tests are stolen from RCS 5.7 src/conf.sh.  */
     2233struct buf { int x; };
     2234struct buf * (*rcsopen) (struct buf *, struct stat *, int);
     2235static char *e (char **p, int i)
     2236{
     2237  return p[i];
     2238}
     2239static char *f (char * (*g) (char **, int), char **p, ...)
     2240{
     2241  char *s;
     2242  va_list v;
     2243  va_start (v,p);
     2244  s = g (p, va_arg (v,int));
     2245  va_end (v);
     2246  return s;
     2247}
     2248
     2249/* C89 style stringification. */
     2250#define noexpand_stringify(a) #a
     2251const char *stringified = noexpand_stringify(arbitrary+token=sequence);
     2252
     2253/* C89 style token pasting.  Exercises some of the corner cases that
     2254   e.g. old MSVC gets wrong, but not very hard. */
     2255#define noexpand_concat(a,b) a##b
     2256#define expand_concat(a,b) noexpand_concat(a,b)
     2257extern int vA;
     2258extern int vbee;
     2259#define aye A
     2260#define bee B
     2261int *pvA = &expand_concat(v,aye);
     2262int *pvbee = &noexpand_concat(v,bee);
     2263
     2264/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
     2265   function prototypes and stuff, but not \xHH hex character constants.
     2266   These do not provoke an error unfortunately, instead are silently treated
     2267   as an "x".  The following induces an error, until -std is added to get
     2268   proper ANSI mode.  Curiously \x00 != x always comes out true, for an
     2269   array size at least.  It is necessary to write \x00 == 0 to get something
     2270   that is true only with -std.  */
     2271int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
     2272
     2273/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
     2274   inside strings and character constants.  */
     2275#define FOO(x) '\''x'\''
     2276int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
     2277
     2278int test (int i, double x);
     2279struct s1 {int (*f) (int a);};
     2280struct s2 {int (*f) (double a);};
     2281int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
     2282               int, int);'
     2283
     2284# Test code for whether the C compiler supports C89 (body of main).
     2285ac_c_conftest_c89_main='
     2286ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
     2287'
     2288
     2289# Test code for whether the C compiler supports C99 (global declarations)
     2290ac_c_conftest_c99_globals='
     2291/* Does the compiler advertise C99 conformance? */
     2292#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
     2293# error "Compiler does not advertise C99 conformance"
     2294#endif
     2295
     2296// See if C++-style comments work.
     2297
     2298#include <stdbool.h>
     2299extern int puts (const char *);
     2300extern int printf (const char *, ...);
     2301extern int dprintf (int, const char *, ...);
     2302extern void *malloc (size_t);
     2303extern void free (void *);
     2304
     2305// Check varargs macros.  These examples are taken from C99 6.10.3.5.
     2306// dprintf is used instead of fprintf to avoid needing to declare
     2307// FILE and stderr.
     2308#define debug(...) dprintf (2, __VA_ARGS__)
     2309#define showlist(...) puts (#__VA_ARGS__)
     2310#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
     2311static void
     2312test_varargs_macros (void)
     2313{
     2314  int x = 1234;
     2315  int y = 5678;
     2316  debug ("Flag");
     2317  debug ("X = %d\n", x);
     2318  showlist (The first, second, and third items.);
     2319  report (x>y, "x is %d but y is %d", x, y);
     2320}
     2321
     2322// Check long long types.
     2323#define BIG64 18446744073709551615ull
     2324#define BIG32 4294967295ul
     2325#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
     2326#if !BIG_OK
     2327  #error "your preprocessor is broken"
     2328#endif
     2329#if BIG_OK
     2330#else
     2331  #error "your preprocessor is broken"
     2332#endif
     2333static long long int bignum = -9223372036854775807LL;
     2334static unsigned long long int ubignum = BIG64;
     2335
     2336struct incomplete_array
     2337{
     2338  int datasize;
     2339  double data[];
     2340};
     2341
     2342struct named_init {
     2343  int number;
     2344  const wchar_t *name;
     2345  double average;
     2346};
     2347
     2348typedef const char *ccp;
     2349
     2350static inline int
     2351test_restrict (ccp restrict text)
     2352{
     2353  // Iterate through items via the restricted pointer.
     2354  // Also check for declarations in for loops.
     2355  for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
     2356    continue;
     2357  return 0;
     2358}
     2359
     2360// Check varargs and va_copy.
     2361static bool
     2362test_varargs (const char *format, ...)
     2363{
     2364  va_list args;
     2365  va_start (args, format);
     2366  va_list args_copy;
     2367  va_copy (args_copy, args);
     2368
     2369  const char *str = "";
     2370  int number = 0;
     2371  float fnumber = 0;
     2372
     2373  while (*format)
     2374    {
     2375      switch (*format++)
     2376        {
     2377        case '\''s'\'': // string
     2378          str = va_arg (args_copy, const char *);
     2379          break;
     2380        case '\''d'\'': // int
     2381          number = va_arg (args_copy, int);
     2382          break;
     2383        case '\''f'\'': // float
     2384          fnumber = va_arg (args_copy, double);
     2385          break;
     2386        default:
     2387          break;
     2388        }
     2389    }
     2390  va_end (args_copy);
     2391  va_end (args);
     2392
     2393  return *str && number && fnumber;
     2394}
     2395'
     2396
     2397# Test code for whether the C compiler supports C99 (body of main).
     2398ac_c_conftest_c99_main='
     2399  // Check bool.
     2400  _Bool success = false;
     2401  success |= (argc != 0);
     2402
     2403  // Check restrict.
     2404  if (test_restrict ("String literal") == 0)
     2405    success = true;
     2406  char *restrict newvar = "Another string";
     2407
     2408  // Check varargs.
     2409  success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
     2410  test_varargs_macros ();
     2411
     2412  // Check flexible array members.
     2413  struct incomplete_array *ia =
     2414    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
     2415  ia->datasize = 10;
     2416  for (int i = 0; i < ia->datasize; ++i)
     2417    ia->data[i] = i * 1.234;
     2418  // Work around memory leak warnings.
     2419  free (ia);
     2420
     2421  // Check named initializers.
     2422  struct named_init ni = {
     2423    .number = 34,
     2424    .name = L"Test wide string",
     2425    .average = 543.34343,
     2426  };
     2427
     2428  ni.number = 58;
     2429
     2430  int dynamic_array[ni.number];
     2431  dynamic_array[0] = argv[0][0];
     2432  dynamic_array[ni.number - 1] = 543;
     2433
     2434  // work around unused variable warnings
     2435  ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
     2436         || dynamic_array[ni.number - 1] != 543);
     2437'
     2438
     2439# Test code for whether the C compiler supports C11 (global declarations)
     2440ac_c_conftest_c11_globals='
     2441/* Does the compiler advertise C11 conformance? */
     2442#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
     2443# error "Compiler does not advertise C11 conformance"
     2444#endif
     2445
     2446// Check _Alignas.
     2447char _Alignas (double) aligned_as_double;
     2448char _Alignas (0) no_special_alignment;
     2449extern char aligned_as_int;
     2450char _Alignas (0) _Alignas (int) aligned_as_int;
     2451
     2452// Check _Alignof.
     2453enum
     2454{
     2455  int_alignment = _Alignof (int),
     2456  int_array_alignment = _Alignof (int[100]),
     2457  char_alignment = _Alignof (char)
     2458};
     2459_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
     2460
     2461// Check _Noreturn.
     2462int _Noreturn does_not_return (void) { for (;;) continue; }
     2463
     2464// Check _Static_assert.
     2465struct test_static_assert
     2466{
     2467  int x;
     2468  _Static_assert (sizeof (int) <= sizeof (long int),
     2469                  "_Static_assert does not work in struct");
     2470  long int y;
     2471};
     2472
     2473// Check UTF-8 literals.
     2474#define u8 syntax error!
     2475char const utf8_literal[] = u8"happens to be ASCII" "another string";
     2476
     2477// Check duplicate typedefs.
     2478typedef long *long_ptr;
     2479typedef long int *long_ptr;
     2480typedef long_ptr long_ptr;
     2481
     2482// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
     2483struct anonymous
     2484{
     2485  union {
     2486    struct { int i; int j; };
     2487    struct { int k; long int l; } w;
     2488  };
     2489  int m;
     2490} v1;
     2491'
     2492
     2493# Test code for whether the C compiler supports C11 (body of main).
     2494ac_c_conftest_c11_main='
     2495  _Static_assert ((offsetof (struct anonymous, i)
     2496                   == offsetof (struct anonymous, w.k)),
     2497                  "Anonymous union alignment botch");
     2498  v1.i = 2;
     2499  v1.w.k = 5;
     2500  ok |= v1.i != 5;
     2501'
     2502
     2503# Test code for whether the C compiler supports C11 (complete).
     2504ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
     2505${ac_c_conftest_c99_globals}
     2506${ac_c_conftest_c11_globals}
     2507
     2508int
     2509main (int argc, char **argv)
     2510{
     2511  int ok = 0;
     2512  ${ac_c_conftest_c89_main}
     2513  ${ac_c_conftest_c99_main}
     2514  ${ac_c_conftest_c11_main}
     2515  return ok;
     2516}
     2517"
     2518
     2519# Test code for whether the C compiler supports C99 (complete).
     2520ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
     2521${ac_c_conftest_c99_globals}
     2522
     2523int
     2524main (int argc, char **argv)
     2525{
     2526  int ok = 0;
     2527  ${ac_c_conftest_c89_main}
     2528  ${ac_c_conftest_c99_main}
     2529  return ok;
     2530}
     2531"
     2532
     2533# Test code for whether the C compiler supports C89 (complete).
     2534ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
     2535
     2536int
     2537main (int argc, char **argv)
     2538{
     2539  int ok = 0;
     2540  ${ac_c_conftest_c89_main}
     2541  return ok;
     2542}
     2543"
     2544
     2545as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
     2546as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
     2547as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
     2548as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
     2549as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
     2550as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
     2551as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
     2552as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
     2553as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
     2554
     2555# Auxiliary files required by this configure script.
     2556ac_aux_files="ltmain.sh config.guess config.sub compile missing install-sh"
     2557
     2558# Locations in which to look for auxiliary files.
     2559ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.."
     2560
     2561# Search for a directory containing all of the required auxiliary files,
     2562# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
     2563# If we don't find one directory that contains all the files we need,
     2564# we report the set of missing files from the *first* directory in
     2565# $ac_aux_dir_candidates and give up.
     2566ac_missing_aux_files=""
     2567ac_first_candidate=:
     2568printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
     2569as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     2570as_found=false
     2571for as_dir in $ac_aux_dir_candidates
     2572do
     2573  IFS=$as_save_IFS
     2574  case $as_dir in #(((
     2575    '') as_dir=./ ;;
     2576    */) ;;
     2577    *) as_dir=$as_dir/ ;;
     2578  esac
     2579  as_found=:
     2580
     2581  printf "%s\n" "$as_me:${as_lineno-$LINENO}:  trying $as_dir" >&5
     2582  ac_aux_dir_found=yes
     2583  ac_install_sh=
     2584  for ac_aux in $ac_aux_files
     2585  do
     2586    # As a special case, if "install-sh" is required, that requirement
     2587    # can be satisfied by any of "install-sh", "install.sh", or "shtool",
     2588    # and $ac_install_sh is set appropriately for whichever one is found.
     2589    if test x"$ac_aux" = x"install-sh"
     2590    then
     2591      if test -f "${as_dir}install-sh"; then
     2592        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install-sh found" >&5
     2593        ac_install_sh="${as_dir}install-sh -c"
     2594      elif test -f "${as_dir}install.sh"; then
     2595        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install.sh found" >&5
     2596        ac_install_sh="${as_dir}install.sh -c"
     2597      elif test -f "${as_dir}shtool"; then
     2598        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}shtool found" >&5
     2599        ac_install_sh="${as_dir}shtool install -c"
     2600      else
     2601        ac_aux_dir_found=no
     2602        if $ac_first_candidate; then
     2603          ac_missing_aux_files="${ac_missing_aux_files} install-sh"
     2604        else
     2605          break
     2606        fi
     2607      fi
     2608    else
     2609      if test -f "${as_dir}${ac_aux}"; then
     2610        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}${ac_aux} found" >&5
     2611      else
     2612        ac_aux_dir_found=no
     2613        if $ac_first_candidate; then
     2614          ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
     2615        else
     2616          break
     2617        fi
     2618      fi
     2619    fi
     2620  done
     2621  if test "$ac_aux_dir_found" = yes; then
     2622    ac_aux_dir="$as_dir"
     2623    break
     2624  fi
     2625  ac_first_candidate=false
     2626
     2627  as_found=false
     2628done
     2629IFS=$as_save_IFS
     2630if $as_found
     2631then :
     2632
     2633else case e in #(
     2634  e) as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 ;;
     2635esac
     2636fi
     2637
     2638
     2639# These three variables are undocumented and unsupported,
     2640# and are intended to be withdrawn in a future Autoconf release.
     2641# They can cause serious problems if a builder's source tree is in a directory
     2642# whose full name contains unusual characters.
     2643if test -f "${ac_aux_dir}config.guess"; then
     2644  ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
     2645fi
     2646if test -f "${ac_aux_dir}config.sub"; then
     2647  ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
     2648fi
     2649if test -f "$ac_aux_dir/configure"; then
     2650  ac_configure="$SHELL ${ac_aux_dir}configure"
    22352651fi
    22362652
     
    22452661  case $ac_old_set,$ac_new_set in
    22462662    set,)
    2247       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
    2248 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
     2663      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5
     2664printf "%s\n" "$as_me: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&2;}
    22492665      ac_cache_corrupted=: ;;
    22502666    ,set)
    2251       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
    2252 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
     2667      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5
     2668printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;}
    22532669      ac_cache_corrupted=: ;;
    22542670    ,);;
     
    22592675        ac_new_val_w=`echo x $ac_new_val`
    22602676        if test "$ac_old_val_w" != "$ac_new_val_w"; then
    2261           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
    2262 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
     2677          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5
     2678printf "%s\n" "$as_me: error: '$ac_var' has changed since the previous run:" >&2;}
    22632679          ac_cache_corrupted=:
    22642680        else
    2265           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
    2266 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
     2681          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5
     2682printf "%s\n" "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;}
    22672683          eval $ac_var=\$ac_old_val
    22682684        fi
    2269         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
    2270 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
    2271         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
    2272 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
     2685        { printf "%s\n" "$as_me:${as_lineno-$LINENO}:   former value:  '$ac_old_val'" >&5
     2686printf "%s\n" "$as_me:   former value:  '$ac_old_val'" >&2;}
     2687        { printf "%s\n" "$as_me:${as_lineno-$LINENO}:   current value: '$ac_new_val'" >&5
     2688printf "%s\n" "$as_me:   current value: '$ac_new_val'" >&2;}
    22732689      fi;;
    22742690  esac
     
    22762692  if test "$ac_new_set" = set; then
    22772693    case $ac_new_val in
    2278     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
     2694    *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
    22792695    *) ac_arg=$ac_var=$ac_new_val ;;
    22802696    esac
     
    22862702done
    22872703if $ac_cache_corrupted; then
    2288   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
    2289 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    2290   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
    2291 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
    2292   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
     2704  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
     2705printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
     2706  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
     2707printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
     2708  as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file'
     2709            and start over" "$LINENO" 5
    22932710fi
    22942711## -------------------- ##
     
    23132730am__api_version='1.16'
    23142731
    2315 ac_aux_dir=
    2316 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
    2317   if test -f "$ac_dir/install-sh"; then
    2318     ac_aux_dir=$ac_dir
    2319     ac_install_sh="$ac_aux_dir/install-sh -c"
    2320     break
    2321   elif test -f "$ac_dir/install.sh"; then
    2322     ac_aux_dir=$ac_dir
    2323     ac_install_sh="$ac_aux_dir/install.sh -c"
    2324     break
    2325   elif test -f "$ac_dir/shtool"; then
    2326     ac_aux_dir=$ac_dir
    2327     ac_install_sh="$ac_aux_dir/shtool install -c"
    2328     break
    2329   fi
    2330 done
    2331 if test -z "$ac_aux_dir"; then
    2332   as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
    2333 fi
    2334 
    2335 # These three variables are undocumented and unsupported,
    2336 # and are intended to be withdrawn in a future Autoconf release.
    2337 # They can cause serious problems if a builder's source tree is in a directory
    2338 # whose full name contains unusual characters.
    2339 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
    2340 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
    2341 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
    2342 
    2343 
    2344 # Find a good install program.  We prefer a C program (faster),
     2732
     2733
     2734  # Find a good install program.  We prefer a C program (faster),
    23452735# so one script is as good as another.  But avoid the broken or
    23462736# incompatible versions:
     
    23562746# ./install, which can be erroneously created by make from ./install.sh.
    23572747# Reject install programs that cannot install multiple files.
    2358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
    2359 $as_echo_n "checking for a BSD-compatible install... " >&6; }
     2748{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
     2749printf %s "checking for a BSD-compatible install... " >&6; }
    23602750if test -z "$INSTALL"; then
    2361 if ${ac_cv_path_install+:} false; then :
    2362   $as_echo_n "(cached) " >&6
    2363 else
    2364   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     2751if test ${ac_cv_path_install+y}
     2752then :
     2753  printf %s "(cached) " >&6
     2754else case e in #(
     2755  e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    23652756for as_dir in $PATH
    23662757do
    23672758  IFS=$as_save_IFS
    2368   test -z "$as_dir" && as_dir=.
    2369     # Account for people who put trailing slashes in PATH elements.
    2370 case $as_dir/ in #((
    2371   ./ | .// | /[cC]/* | \
     2759  case $as_dir in #(((
     2760    '') as_dir=./ ;;
     2761    */) ;;
     2762    *) as_dir=$as_dir/ ;;
     2763  esac
     2764    # Account for fact that we put trailing slashes in our PATH walk.
     2765case $as_dir in #((
     2766  ./ | /[cC]/* | \
    23722767  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
    23732768  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
     
    23792774    for ac_prog in ginstall scoinst install; do
    23802775      for ac_exec_ext in '' $ac_executable_extensions; do
    2381         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
     2776        if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
    23822777          if test $ac_prog = install &&
    2383             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
     2778            grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
    23842779            # AIX install.  It has an incompatible calling convention.
    23852780            :
    23862781          elif test $ac_prog = install &&
    2387             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
     2782            grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
    23882783            # program-specific install script used by HP pwplus--don't use.
    23892784            :
     
    23932788            echo two > conftest.two
    23942789            mkdir conftest.dir
    2395             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
     2790            if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
    23962791              test -s conftest.one && test -s conftest.two &&
    23972792              test -s conftest.dir/conftest.one &&
    23982793              test -s conftest.dir/conftest.two
    23992794            then
    2400               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
     2795              ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
    24012796              break 3
    24022797            fi
     
    24122807
    24132808rm -rf conftest.one conftest.two conftest.dir
    2414 
    2415 fi
    2416   if test "${ac_cv_path_install+set}" = set; then
     2809 ;;
     2810esac
     2811fi
     2812  if test ${ac_cv_path_install+y}; then
    24172813    INSTALL=$ac_cv_path_install
    24182814  else
     
    24242820  fi
    24252821fi
    2426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
    2427 $as_echo "$INSTALL" >&6; }
     2822{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
     2823printf "%s\n" "$INSTALL" >&6; }
    24282824
    24292825# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
     
    24352831test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
    24362832
    2437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
    2438 $as_echo_n "checking whether build environment is sane... " >&6; }
     2833{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
     2834printf %s "checking whether build environment is sane... " >&6; }
    24392835# Reject unsafe characters in $srcdir or the absolute working directory
    24402836# name.  Accept space and tab only in the latter.
     
    24902886Check your system clock" "$LINENO" 5
    24912887fi
    2492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
    2493 $as_echo "yes" >&6; }
     2888{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
     2889printf "%s\n" "yes" >&6; }
    24942890# If we didn't sleep, we still need to ensure time stamps of config.status and
    24952891# generated files are strictly newer.
     
    25082904  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
    25092905# Double any \ or $.
    2510 # By default was `s,x,x', remove it if useless.
     2906# By default was 's,x,x', remove it if useless.
    25112907ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
    2512 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
     2908program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
     2909
    25132910
    25142911# Expand $ac_aux_dir to an absolute path.
    25152912am_aux_dir=`cd "$ac_aux_dir" && pwd`
    25162913
    2517 if test x"${MISSING+set}" != xset; then
    2518   case $am_aux_dir in
    2519   *\ * | *\     *)
    2520     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
    2521   *)
    2522     MISSING="\${SHELL} $am_aux_dir/missing" ;;
    2523   esac
     2914
     2915  if test x"${MISSING+set}" != xset; then
     2916  MISSING="\${SHELL} '$am_aux_dir/missing'"
    25242917fi
    25252918# Use eval to expand $SHELL
     
    25282921else
    25292922  am_missing_run=
    2530   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
    2531 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
     2923  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
     2924printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
    25322925fi
    25332926
     
    25492942  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
    25502943set dummy ${ac_tool_prefix}strip; ac_word=$2
    2551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    2552 $as_echo_n "checking for $ac_word... " >&6; }
    2553 if ${ac_cv_prog_STRIP+:} false; then :
    2554   $as_echo_n "(cached) " >&6
    2555 else
    2556   if test -n "$STRIP"; then
     2944{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     2945printf %s "checking for $ac_word... " >&6; }
     2946if test ${ac_cv_prog_STRIP+y}
     2947then :
     2948  printf %s "(cached) " >&6
     2949else case e in #(
     2950  e) if test -n "$STRIP"; then
    25572951  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
    25582952else
     
    25612955do
    25622956  IFS=$as_save_IFS
    2563   test -z "$as_dir" && as_dir=.
     2957  case $as_dir in #(((
     2958    '') as_dir=./ ;;
     2959    */) ;;
     2960    *) as_dir=$as_dir/ ;;
     2961  esac
    25642962    for ac_exec_ext in '' $ac_executable_extensions; do
    2565   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     2963  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    25662964    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
    2567     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     2965    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    25682966    break 2
    25692967  fi
     
    25722970IFS=$as_save_IFS
    25732971
    2574 fi
     2972fi ;;
     2973esac
    25752974fi
    25762975STRIP=$ac_cv_prog_STRIP
    25772976if test -n "$STRIP"; then
    2578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
    2579 $as_echo "$STRIP" >&6; }
    2580 else
    2581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    2582 $as_echo "no" >&6; }
     2977  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
     2978printf "%s\n" "$STRIP" >&6; }
     2979else
     2980  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     2981printf "%s\n" "no" >&6; }
    25832982fi
    25842983
     
    25892988  # Extract the first word of "strip", so it can be a program name with args.
    25902989set dummy strip; ac_word=$2
    2591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    2592 $as_echo_n "checking for $ac_word... " >&6; }
    2593 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
    2594   $as_echo_n "(cached) " >&6
    2595 else
    2596   if test -n "$ac_ct_STRIP"; then
     2990{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     2991printf %s "checking for $ac_word... " >&6; }
     2992if test ${ac_cv_prog_ac_ct_STRIP+y}
     2993then :
     2994  printf %s "(cached) " >&6
     2995else case e in #(
     2996  e) if test -n "$ac_ct_STRIP"; then
    25972997  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
    25982998else
     
    26013001do
    26023002  IFS=$as_save_IFS
    2603   test -z "$as_dir" && as_dir=.
     3003  case $as_dir in #(((
     3004    '') as_dir=./ ;;
     3005    */) ;;
     3006    *) as_dir=$as_dir/ ;;
     3007  esac
    26043008    for ac_exec_ext in '' $ac_executable_extensions; do
    2605   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     3009  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    26063010    ac_cv_prog_ac_ct_STRIP="strip"
    2607     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     3011    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    26083012    break 2
    26093013  fi
     
    26123016IFS=$as_save_IFS
    26133017
    2614 fi
     3018fi ;;
     3019esac
    26153020fi
    26163021ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
    26173022if test -n "$ac_ct_STRIP"; then
    2618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
    2619 $as_echo "$ac_ct_STRIP" >&6; }
    2620 else
    2621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    2622 $as_echo "no" >&6; }
     3023  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
     3024printf "%s\n" "$ac_ct_STRIP" >&6; }
     3025else
     3026  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     3027printf "%s\n" "no" >&6; }
    26233028fi
    26243029
     
    26283033    case $cross_compiling:$ac_tool_warned in
    26293034yes:)
    2630 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
    2631 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     3035{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     3036printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
    26323037ac_tool_warned=yes ;;
    26333038esac
     
    26413046INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
    26423047
    2643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
    2644 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
     3048
     3049  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
     3050printf %s "checking for a race-free mkdir -p... " >&6; }
    26453051if test -z "$MKDIR_P"; then
    2646   if ${ac_cv_path_mkdir+:} false; then :
    2647   $as_echo_n "(cached) " >&6
    2648 else
    2649   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     3052  if test ${ac_cv_path_mkdir+y}
     3053then :
     3054  printf %s "(cached) " >&6
     3055else case e in #(
     3056  e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    26503057for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
    26513058do
    26523059  IFS=$as_save_IFS
    2653   test -z "$as_dir" && as_dir=.
     3060  case $as_dir in #(((
     3061    '') as_dir=./ ;;
     3062    */) ;;
     3063    *) as_dir=$as_dir/ ;;
     3064  esac
    26543065    for ac_prog in mkdir gmkdir; do
    26553066         for ac_exec_ext in '' $ac_executable_extensions; do
    2656            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
    2657            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
    2658              'mkdir (GNU coreutils) '* | \
    2659              'mkdir (coreutils) '* | \
     3067           as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
     3068           case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
     3069             'mkdir ('*'coreutils) '* | \
     3070             *'BusyBox '* | \
    26603071             'mkdir (fileutils) '4.1*)
    2661                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
     3072               ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
    26623073               break 3;;
    26633074           esac
     
    26663077  done
    26673078IFS=$as_save_IFS
    2668 
     3079 ;;
     3080esac
    26693081fi
    26703082
    26713083  test -d ./--version && rmdir ./--version
    2672   if test "${ac_cv_path_mkdir+set}" = set; then
     3084  if test ${ac_cv_path_mkdir+y}; then
    26733085    MKDIR_P="$ac_cv_path_mkdir -p"
    26743086  else
    2675     # As a last resort, use the slow shell script.  Don't cache a
    2676     # value for MKDIR_P within a source directory, because that will
    2677     # break other packages using the cache if that directory is
    2678     # removed, or if the value is a relative name.
    2679     MKDIR_P="$ac_install_sh -d"
     3087    # As a last resort, use plain mkdir -p,
     3088    # in the hope it doesn't have the bugs of ancient mkdir.
     3089    MKDIR_P='mkdir -p'
    26803090  fi
    26813091fi
    2682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
    2683 $as_echo "$MKDIR_P" >&6; }
     3092{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
     3093printf "%s\n" "$MKDIR_P" >&6; }
    26843094
    26853095for ac_prog in gawk mawk nawk awk
     
    26873097  # Extract the first word of "$ac_prog", so it can be a program name with args.
    26883098set dummy $ac_prog; ac_word=$2
    2689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    2690 $as_echo_n "checking for $ac_word... " >&6; }
    2691 if ${ac_cv_prog_AWK+:} false; then :
    2692   $as_echo_n "(cached) " >&6
    2693 else
    2694   if test -n "$AWK"; then
     3099{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     3100printf %s "checking for $ac_word... " >&6; }
     3101if test ${ac_cv_prog_AWK+y}
     3102then :
     3103  printf %s "(cached) " >&6
     3104else case e in #(
     3105  e) if test -n "$AWK"; then
    26953106  ac_cv_prog_AWK="$AWK" # Let the user override the test.
    26963107else
     
    26993110do
    27003111  IFS=$as_save_IFS
    2701   test -z "$as_dir" && as_dir=.
     3112  case $as_dir in #(((
     3113    '') as_dir=./ ;;
     3114    */) ;;
     3115    *) as_dir=$as_dir/ ;;
     3116  esac
    27023117    for ac_exec_ext in '' $ac_executable_extensions; do
    2703   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     3118  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    27043119    ac_cv_prog_AWK="$ac_prog"
    2705     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     3120    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    27063121    break 2
    27073122  fi
     
    27103125IFS=$as_save_IFS
    27113126
    2712 fi
     3127fi ;;
     3128esac
    27133129fi
    27143130AWK=$ac_cv_prog_AWK
    27153131if test -n "$AWK"; then
    2716   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
    2717 $as_echo "$AWK" >&6; }
    2718 else
    2719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    2720 $as_echo "no" >&6; }
     3132  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
     3133printf "%s\n" "$AWK" >&6; }
     3134else
     3135  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     3136printf "%s\n" "no" >&6; }
    27213137fi
    27223138
     
    27253141done
    27263142
    2727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
    2728 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
     3143{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
     3144printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
    27293145set x ${MAKE-make}
    2730 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
    2731 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
    2732   $as_echo_n "(cached) " >&6
    2733 else
    2734   cat >conftest.make <<\_ACEOF
     3146ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
     3147if eval test \${ac_cv_prog_make_${ac_make}_set+y}
     3148then :
     3149  printf %s "(cached) " >&6
     3150else case e in #(
     3151  e) cat >conftest.make <<\_ACEOF
    27353152SHELL = /bin/sh
    27363153all:
     
    27443161    eval ac_cv_prog_make_${ac_make}_set=no;;
    27453162esac
    2746 rm -f conftest.make
     3163rm -f conftest.make ;;
     3164esac
    27473165fi
    27483166if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
    2749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
    2750 $as_echo "yes" >&6; }
     3167  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
     3168printf "%s\n" "yes" >&6; }
    27513169  SET_MAKE=
    27523170else
    2753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    2754 $as_echo "no" >&6; }
     3171  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     3172printf "%s\n" "no" >&6; }
    27553173  SET_MAKE="MAKE=${MAKE-make}"
    27563174fi
     
    27663184
    27673185# Check whether --enable-silent-rules was given.
    2768 if test "${enable_silent_rules+set}" = set; then :
     3186if test ${enable_silent_rules+y}
     3187then :
    27693188  enableval=$enable_silent_rules;
    27703189fi
     
    27763195esac
    27773196am_make=${MAKE-make}
    2778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
    2779 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
    2780 if ${am_cv_make_support_nested_variables+:} false; then :
    2781   $as_echo_n "(cached) " >&6
    2782 else
    2783   if $as_echo 'TRUE=$(BAR$(V))
     3197{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
     3198printf %s "checking whether $am_make supports nested variables... " >&6; }
     3199if test ${am_cv_make_support_nested_variables+y}
     3200then :
     3201  printf %s "(cached) " >&6
     3202else case e in #(
     3203  e) if printf "%s\n" 'TRUE=$(BAR$(V))
    27843204BAR0=false
    27853205BAR1=true
     
    27913211else
    27923212  am_cv_make_support_nested_variables=no
    2793 fi
    2794 fi
    2795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
    2796 $as_echo "$am_cv_make_support_nested_variables" >&6; }
     3213fi ;;
     3214esac
     3215fi
     3216{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
     3217printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
    27973218if test $am_cv_make_support_nested_variables = yes; then
    27983219    AM_V='$(V)'
     
    28263247# Define the identity of the package.
    28273248 PACKAGE='libpng'
    2828  VERSION='1.6.37'
    2829 
    2830 
    2831 cat >>confdefs.h <<_ACEOF
    2832 #define PACKAGE "$PACKAGE"
    2833 _ACEOF
    2834 
    2835 
    2836 cat >>confdefs.h <<_ACEOF
    2837 #define VERSION "$VERSION"
    2838 _ACEOF
     3249 VERSION='1.6.42'
     3250
     3251
     3252printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
     3253
     3254
     3255printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h
    28393256
    28403257# Some tools Automake needs.
     
    28743291
    28753292
     3293
     3294
     3295# Variables for tags utilities; see am/tags.am
     3296if test -z "$CTAGS"; then
     3297  CTAGS=ctags
     3298fi
     3299
     3300if test -z "$ETAGS"; then
     3301  ETAGS=etags
     3302fi
     3303
     3304if test -z "$CSCOPE"; then
     3305  CSCOPE=cscope
     3306fi
    28763307
    28773308
     
    29233354# time stamps of the autotools generated files being correct
    29243355
    2925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
    2926 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
     3356{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
     3357printf %s "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
    29273358    # Check whether --enable-maintainer-mode was given.
    2928 if test "${enable_maintainer_mode+set}" = set; then :
     3359if test ${enable_maintainer_mode+y}
     3360then :
    29293361  enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
    2930 else
    2931   USE_MAINTAINER_MODE=no
    2932 fi
    2933 
    2934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
    2935 $as_echo "$USE_MAINTAINER_MODE" >&6; }
     3362else case e in #(
     3363  e) USE_MAINTAINER_MODE=no ;;
     3364esac
     3365fi
     3366
     3367  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
     3368printf "%s\n" "$USE_MAINTAINER_MODE" >&6; }
    29363369   if test $USE_MAINTAINER_MODE = yes; then
    29373370  MAINTAINER_MODE_TRUE=
     
    29473380
    29483381
    2949 PNGLIB_VERSION=1.6.37
     3382PNGLIB_VERSION=1.6.42
    29503383PNGLIB_MAJOR=1
    29513384PNGLIB_MINOR=6
    2952 PNGLIB_RELEASE=37
     3385PNGLIB_RELEASE=41
    29533386
    29543387
     
    29633396ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
    29643397ac_compiler_gnu=$ac_cv_c_compiler_gnu
     3398
     3399
     3400
     3401
     3402
     3403
     3404
     3405
     3406
    29653407
    29663408ac_ext=c
     
    29723414  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
    29733415set dummy ${ac_tool_prefix}gcc; ac_word=$2
    2974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    2975 $as_echo_n "checking for $ac_word... " >&6; }
    2976 if ${ac_cv_prog_CC+:} false; then :
    2977   $as_echo_n "(cached) " >&6
    2978 else
    2979   if test -n "$CC"; then
     3416{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     3417printf %s "checking for $ac_word... " >&6; }
     3418if test ${ac_cv_prog_CC+y}
     3419then :
     3420  printf %s "(cached) " >&6
     3421else case e in #(
     3422  e) if test -n "$CC"; then
    29803423  ac_cv_prog_CC="$CC" # Let the user override the test.
    29813424else
     
    29843427do
    29853428  IFS=$as_save_IFS
    2986   test -z "$as_dir" && as_dir=.
     3429  case $as_dir in #(((
     3430    '') as_dir=./ ;;
     3431    */) ;;
     3432    *) as_dir=$as_dir/ ;;
     3433  esac
    29873434    for ac_exec_ext in '' $ac_executable_extensions; do
    2988   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     3435  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    29893436    ac_cv_prog_CC="${ac_tool_prefix}gcc"
    2990     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     3437    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    29913438    break 2
    29923439  fi
     
    29953442IFS=$as_save_IFS
    29963443
    2997 fi
     3444fi ;;
     3445esac
    29983446fi
    29993447CC=$ac_cv_prog_CC
    30003448if test -n "$CC"; then
    3001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
    3002 $as_echo "$CC" >&6; }
    3003 else
    3004   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    3005 $as_echo "no" >&6; }
     3449  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
     3450printf "%s\n" "$CC" >&6; }
     3451else
     3452  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     3453printf "%s\n" "no" >&6; }
    30063454fi
    30073455
     
    30123460  # Extract the first word of "gcc", so it can be a program name with args.
    30133461set dummy gcc; ac_word=$2
    3014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    3015 $as_echo_n "checking for $ac_word... " >&6; }
    3016 if ${ac_cv_prog_ac_ct_CC+:} false; then :
    3017   $as_echo_n "(cached) " >&6
    3018 else
    3019   if test -n "$ac_ct_CC"; then
     3462{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     3463printf %s "checking for $ac_word... " >&6; }
     3464if test ${ac_cv_prog_ac_ct_CC+y}
     3465then :
     3466  printf %s "(cached) " >&6
     3467else case e in #(
     3468  e) if test -n "$ac_ct_CC"; then
    30203469  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
    30213470else
     
    30243473do
    30253474  IFS=$as_save_IFS
    3026   test -z "$as_dir" && as_dir=.
     3475  case $as_dir in #(((
     3476    '') as_dir=./ ;;
     3477    */) ;;
     3478    *) as_dir=$as_dir/ ;;
     3479  esac
    30273480    for ac_exec_ext in '' $ac_executable_extensions; do
    3028   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     3481  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    30293482    ac_cv_prog_ac_ct_CC="gcc"
    3030     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     3483    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    30313484    break 2
    30323485  fi
     
    30353488IFS=$as_save_IFS
    30363489
    3037 fi
     3490fi ;;
     3491esac
    30383492fi
    30393493ac_ct_CC=$ac_cv_prog_ac_ct_CC
    30403494if test -n "$ac_ct_CC"; then
    3041   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
    3042 $as_echo "$ac_ct_CC" >&6; }
    3043 else
    3044   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    3045 $as_echo "no" >&6; }
     3495  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
     3496printf "%s\n" "$ac_ct_CC" >&6; }
     3497else
     3498  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     3499printf "%s\n" "no" >&6; }
    30463500fi
    30473501
     
    30513505    case $cross_compiling:$ac_tool_warned in
    30523506yes:)
    3053 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
    3054 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     3507{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     3508printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
    30553509ac_tool_warned=yes ;;
    30563510esac
     
    30653519    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
    30663520set dummy ${ac_tool_prefix}cc; ac_word=$2
    3067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    3068 $as_echo_n "checking for $ac_word... " >&6; }
    3069 if ${ac_cv_prog_CC+:} false; then :
    3070   $as_echo_n "(cached) " >&6
    3071 else
    3072   if test -n "$CC"; then
     3521{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     3522printf %s "checking for $ac_word... " >&6; }
     3523if test ${ac_cv_prog_CC+y}
     3524then :
     3525  printf %s "(cached) " >&6
     3526else case e in #(
     3527  e) if test -n "$CC"; then
    30733528  ac_cv_prog_CC="$CC" # Let the user override the test.
    30743529else
     
    30773532do
    30783533  IFS=$as_save_IFS
    3079   test -z "$as_dir" && as_dir=.
     3534  case $as_dir in #(((
     3535    '') as_dir=./ ;;
     3536    */) ;;
     3537    *) as_dir=$as_dir/ ;;
     3538  esac
    30803539    for ac_exec_ext in '' $ac_executable_extensions; do
    3081   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     3540  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    30823541    ac_cv_prog_CC="${ac_tool_prefix}cc"
    3083     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     3542    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    30843543    break 2
    30853544  fi
     
    30883547IFS=$as_save_IFS
    30893548
    3090 fi
     3549fi ;;
     3550esac
    30913551fi
    30923552CC=$ac_cv_prog_CC
    30933553if test -n "$CC"; then
    3094   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
    3095 $as_echo "$CC" >&6; }
    3096 else
    3097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    3098 $as_echo "no" >&6; }
     3554  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
     3555printf "%s\n" "$CC" >&6; }
     3556else
     3557  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     3558printf "%s\n" "no" >&6; }
    30993559fi
    31003560
     
    31053565  # Extract the first word of "cc", so it can be a program name with args.
    31063566set dummy cc; ac_word=$2
    3107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    3108 $as_echo_n "checking for $ac_word... " >&6; }
    3109 if ${ac_cv_prog_CC+:} false; then :
    3110   $as_echo_n "(cached) " >&6
    3111 else
    3112   if test -n "$CC"; then
     3567{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     3568printf %s "checking for $ac_word... " >&6; }
     3569if test ${ac_cv_prog_CC+y}
     3570then :
     3571  printf %s "(cached) " >&6
     3572else case e in #(
     3573  e) if test -n "$CC"; then
    31133574  ac_cv_prog_CC="$CC" # Let the user override the test.
    31143575else
     
    31183579do
    31193580  IFS=$as_save_IFS
    3120   test -z "$as_dir" && as_dir=.
     3581  case $as_dir in #(((
     3582    '') as_dir=./ ;;
     3583    */) ;;
     3584    *) as_dir=$as_dir/ ;;
     3585  esac
    31213586    for ac_exec_ext in '' $ac_executable_extensions; do
    3122   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    3123     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
     3587  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     3588    if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
    31243589       ac_prog_rejected=yes
    31253590       continue
    31263591     fi
    31273592    ac_cv_prog_CC="cc"
    3128     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     3593    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    31293594    break 2
    31303595  fi
     
    31423607    # first if we set CC to just the basename; use the full file name.
    31433608    shift
    3144     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
     3609    ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
    31453610  fi
    31463611fi
    3147 fi
     3612fi ;;
     3613esac
    31483614fi
    31493615CC=$ac_cv_prog_CC
    31503616if test -n "$CC"; then
    3151   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
    3152 $as_echo "$CC" >&6; }
    3153 else
    3154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    3155 $as_echo "no" >&6; }
     3617  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
     3618printf "%s\n" "$CC" >&6; }
     3619else
     3620  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     3621printf "%s\n" "no" >&6; }
    31563622fi
    31573623
     
    31643630    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
    31653631set dummy $ac_tool_prefix$ac_prog; ac_word=$2
    3166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    3167 $as_echo_n "checking for $ac_word... " >&6; }
    3168 if ${ac_cv_prog_CC+:} false; then :
    3169   $as_echo_n "(cached) " >&6
    3170 else
    3171   if test -n "$CC"; then
     3632{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     3633printf %s "checking for $ac_word... " >&6; }
     3634if test ${ac_cv_prog_CC+y}
     3635then :
     3636  printf %s "(cached) " >&6
     3637else case e in #(
     3638  e) if test -n "$CC"; then
    31723639  ac_cv_prog_CC="$CC" # Let the user override the test.
    31733640else
     
    31763643do
    31773644  IFS=$as_save_IFS
    3178   test -z "$as_dir" && as_dir=.
     3645  case $as_dir in #(((
     3646    '') as_dir=./ ;;
     3647    */) ;;
     3648    *) as_dir=$as_dir/ ;;
     3649  esac
    31793650    for ac_exec_ext in '' $ac_executable_extensions; do
    3180   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     3651  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    31813652    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
    3182     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     3653    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    31833654    break 2
    31843655  fi
     
    31873658IFS=$as_save_IFS
    31883659
    3189 fi
     3660fi ;;
     3661esac
    31903662fi
    31913663CC=$ac_cv_prog_CC
    31923664if test -n "$CC"; then
    3193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
    3194 $as_echo "$CC" >&6; }
    3195 else
    3196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    3197 $as_echo "no" >&6; }
     3665  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
     3666printf "%s\n" "$CC" >&6; }
     3667else
     3668  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     3669printf "%s\n" "no" >&6; }
    31983670fi
    31993671
     
    32083680  # Extract the first word of "$ac_prog", so it can be a program name with args.
    32093681set dummy $ac_prog; ac_word=$2
    3210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    3211 $as_echo_n "checking for $ac_word... " >&6; }
    3212 if ${ac_cv_prog_ac_ct_CC+:} false; then :
    3213   $as_echo_n "(cached) " >&6
    3214 else
    3215   if test -n "$ac_ct_CC"; then
     3682{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     3683printf %s "checking for $ac_word... " >&6; }
     3684if test ${ac_cv_prog_ac_ct_CC+y}
     3685then :
     3686  printf %s "(cached) " >&6
     3687else case e in #(
     3688  e) if test -n "$ac_ct_CC"; then
    32163689  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
    32173690else
     
    32203693do
    32213694  IFS=$as_save_IFS
    3222   test -z "$as_dir" && as_dir=.
     3695  case $as_dir in #(((
     3696    '') as_dir=./ ;;
     3697    */) ;;
     3698    *) as_dir=$as_dir/ ;;
     3699  esac
    32233700    for ac_exec_ext in '' $ac_executable_extensions; do
    3224   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     3701  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    32253702    ac_cv_prog_ac_ct_CC="$ac_prog"
    3226     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     3703    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    32273704    break 2
    32283705  fi
     
    32313708IFS=$as_save_IFS
    32323709
    3233 fi
     3710fi ;;
     3711esac
    32343712fi
    32353713ac_ct_CC=$ac_cv_prog_ac_ct_CC
    32363714if test -n "$ac_ct_CC"; then
    3237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
    3238 $as_echo "$ac_ct_CC" >&6; }
    3239 else
    3240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    3241 $as_echo "no" >&6; }
     3715  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
     3716printf "%s\n" "$ac_ct_CC" >&6; }
     3717else
     3718  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     3719printf "%s\n" "no" >&6; }
    32423720fi
    32433721
     
    32513729    case $cross_compiling:$ac_tool_warned in
    32523730yes:)
    3253 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
    3254 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     3731{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     3732printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
    32553733ac_tool_warned=yes ;;
    32563734esac
     
    32603738
    32613739fi
    3262 
    3263 
    3264 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
    3265 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     3740if test -z "$CC"; then
     3741  if test -n "$ac_tool_prefix"; then
     3742  # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
     3743set dummy ${ac_tool_prefix}clang; ac_word=$2
     3744{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     3745printf %s "checking for $ac_word... " >&6; }
     3746if test ${ac_cv_prog_CC+y}
     3747then :
     3748  printf %s "(cached) " >&6
     3749else case e in #(
     3750  e) if test -n "$CC"; then
     3751  ac_cv_prog_CC="$CC" # Let the user override the test.
     3752else
     3753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     3754for as_dir in $PATH
     3755do
     3756  IFS=$as_save_IFS
     3757  case $as_dir in #(((
     3758    '') as_dir=./ ;;
     3759    */) ;;
     3760    *) as_dir=$as_dir/ ;;
     3761  esac
     3762    for ac_exec_ext in '' $ac_executable_extensions; do
     3763  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     3764    ac_cv_prog_CC="${ac_tool_prefix}clang"
     3765    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     3766    break 2
     3767  fi
     3768done
     3769  done
     3770IFS=$as_save_IFS
     3771
     3772fi ;;
     3773esac
     3774fi
     3775CC=$ac_cv_prog_CC
     3776if test -n "$CC"; then
     3777  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
     3778printf "%s\n" "$CC" >&6; }
     3779else
     3780  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     3781printf "%s\n" "no" >&6; }
     3782fi
     3783
     3784
     3785fi
     3786if test -z "$ac_cv_prog_CC"; then
     3787  ac_ct_CC=$CC
     3788  # Extract the first word of "clang", so it can be a program name with args.
     3789set dummy clang; ac_word=$2
     3790{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     3791printf %s "checking for $ac_word... " >&6; }
     3792if test ${ac_cv_prog_ac_ct_CC+y}
     3793then :
     3794  printf %s "(cached) " >&6
     3795else case e in #(
     3796  e) if test -n "$ac_ct_CC"; then
     3797  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
     3798else
     3799as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     3800for as_dir in $PATH
     3801do
     3802  IFS=$as_save_IFS
     3803  case $as_dir in #(((
     3804    '') as_dir=./ ;;
     3805    */) ;;
     3806    *) as_dir=$as_dir/ ;;
     3807  esac
     3808    for ac_exec_ext in '' $ac_executable_extensions; do
     3809  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     3810    ac_cv_prog_ac_ct_CC="clang"
     3811    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     3812    break 2
     3813  fi
     3814done
     3815  done
     3816IFS=$as_save_IFS
     3817
     3818fi ;;
     3819esac
     3820fi
     3821ac_ct_CC=$ac_cv_prog_ac_ct_CC
     3822if test -n "$ac_ct_CC"; then
     3823  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
     3824printf "%s\n" "$ac_ct_CC" >&6; }
     3825else
     3826  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     3827printf "%s\n" "no" >&6; }
     3828fi
     3829
     3830  if test "x$ac_ct_CC" = x; then
     3831    CC=""
     3832  else
     3833    case $cross_compiling:$ac_tool_warned in
     3834yes:)
     3835{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     3836printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     3837ac_tool_warned=yes ;;
     3838esac
     3839    CC=$ac_ct_CC
     3840  fi
     3841else
     3842  CC="$ac_cv_prog_CC"
     3843fi
     3844
     3845fi
     3846
     3847
     3848test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
     3849printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
    32663850as_fn_error $? "no acceptable C compiler found in \$PATH
    3267 See \`config.log' for more details" "$LINENO" 5; }
     3851See 'config.log' for more details" "$LINENO" 5; }
    32683852
    32693853# Provide some information about the compiler.
    3270 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
     3854printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
    32713855set X $ac_compile
    32723856ac_compiler=$2
    3273 for ac_option in --version -v -V -qversion; do
     3857for ac_option in --version -v -V -qversion -version; do
    32743858  { { ac_try="$ac_compiler $ac_option >&5"
    32753859case "(($ac_try" in
     
    32783862esac
    32793863eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
    3280 $as_echo "$ac_try_echo"; } >&5
     3864printf "%s\n" "$ac_try_echo"; } >&5
    32813865  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
    32823866  ac_status=$?
     
    32883872  fi
    32893873  rm -f conftest.er1 conftest.err
    3290   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     3874  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
    32913875  test $ac_status = 0; }
    32923876done
     
    32963880
    32973881int
    3298 main ()
     3882main (void)
    32993883{
    33003884
     
    33083892# It will help us diagnose broken compilers, and finding out an intuition
    33093893# of exeext.
    3310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
    3311 $as_echo_n "checking whether the C compiler works... " >&6; }
    3312 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
     3894{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
     3895printf %s "checking whether the C compiler works... " >&6; }
     3896ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
    33133897
    33143898# The possible output files:
     
    33313915esac
    33323916eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
    3333 $as_echo "$ac_try_echo"; } >&5
     3917printf "%s\n" "$ac_try_echo"; } >&5
    33343918  (eval "$ac_link_default") 2>&5
    33353919  ac_status=$?
    3336   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
    3337   test $ac_status = 0; }; then :
    3338   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
    3339 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
     3920  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     3921  test $ac_status = 0; }
     3922then :
     3923  # Autoconf-2.13 could set the ac_cv_exeext variable to 'no'.
     3924# So ignore a value of 'no', otherwise this would lead to 'EXEEXT = no'
    33403925# in a Makefile.  We should not override ac_cv_exeext if it was cached,
    33413926# so that the user can short-circuit this test for compilers unknown to
     
    33523937        break;;
    33533938    *.* )
    3354         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
     3939        if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
    33553940        then :; else
    33563941           ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
    33573942        fi
    33583943        # We set ac_cv_exeext here because the later test for it is not
    3359         # safe: cross compilers may not add the suffix if given an `-o'
     3944        # safe: cross compilers may not add the suffix if given an '-o'
    33603945        # argument, so we may need to know it at that point already.
    33613946        # Even if this section looks crufty: it has the advantage of
     
    33683953test "$ac_cv_exeext" = no && ac_cv_exeext=
    33693954
    3370 else
    3371   ac_file=''
    3372 fi
    3373 if test -z "$ac_file"; then :
    3374   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    3375 $as_echo "no" >&6; }
    3376 $as_echo "$as_me: failed program was:" >&5
     3955else case e in #(
     3956  e) ac_file='' ;;
     3957esac
     3958fi
     3959if test -z "$ac_file"
     3960then :
     3961  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     3962printf "%s\n" "no" >&6; }
     3963printf "%s\n" "$as_me: failed program was:" >&5
    33773964sed 's/^/| /' conftest.$ac_ext >&5
    33783965
    3379 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
    3380 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     3966{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
     3967printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
    33813968as_fn_error 77 "C compiler cannot create executables
    3382 See \`config.log' for more details" "$LINENO" 5; }
    3383 else
    3384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
    3385 $as_echo "yes" >&6; }
    3386 fi
    3387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
    3388 $as_echo_n "checking for C compiler default output file name... " >&6; }
    3389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
    3390 $as_echo "$ac_file" >&6; }
     3969See 'config.log' for more details" "$LINENO" 5; }
     3970else case e in #(
     3971  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
     3972printf "%s\n" "yes" >&6; } ;;
     3973esac
     3974fi
     3975{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
     3976printf %s "checking for C compiler default output file name... " >&6; }
     3977{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
     3978printf "%s\n" "$ac_file" >&6; }
    33913979ac_exeext=$ac_cv_exeext
    33923980
    33933981rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
    33943982ac_clean_files=$ac_clean_files_save
    3395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
    3396 $as_echo_n "checking for suffix of executables... " >&6; }
     3983{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
     3984printf %s "checking for suffix of executables... " >&6; }
    33973985if { { ac_try="$ac_link"
    33983986case "(($ac_try" in
     
    34013989esac
    34023990eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
    3403 $as_echo "$ac_try_echo"; } >&5
     3991printf "%s\n" "$ac_try_echo"; } >&5
    34043992  (eval "$ac_link") 2>&5
    34053993  ac_status=$?
    3406   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
    3407   test $ac_status = 0; }; then :
    3408   # If both `conftest.exe' and `conftest' are `present' (well, observable)
    3409 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
    3410 # work properly (i.e., refer to `conftest.exe'), while it won't with
    3411 # `rm'.
     3994  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     3995  test $ac_status = 0; }
     3996then :
     3997  # If both 'conftest.exe' and 'conftest' are 'present' (well, observable)
     3998# catch 'conftest.exe'.  For instance with Cygwin, 'ls conftest' will
     3999# work properly (i.e., refer to 'conftest.exe'), while it won't with
     4000# 'rm'.
    34124001for ac_file in conftest.exe conftest conftest.*; do
    34134002  test -f "$ac_file" || continue
     
    34194008  esac
    34204009done
    3421 else
    3422   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
    3423 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     4010else case e in #(
     4011  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
     4012printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
    34244013as_fn_error $? "cannot compute suffix of executables: cannot compile and link
    3425 See \`config.log' for more details" "$LINENO" 5; }
     4014See 'config.log' for more details" "$LINENO" 5; } ;;
     4015esac
    34264016fi
    34274017rm -f conftest conftest$ac_cv_exeext
    3428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
    3429 $as_echo "$ac_cv_exeext" >&6; }
     4018{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
     4019printf "%s\n" "$ac_cv_exeext" >&6; }
    34304020
    34314021rm -f conftest.$ac_ext
     
    34364026#include <stdio.h>
    34374027int
    3438 main ()
     4028main (void)
    34394029{
    34404030FILE *f = fopen ("conftest.out", "w");
     4031 if (!f)
     4032  return 1;
    34414033 return ferror (f) || fclose (f) != 0;
    34424034
     
    34484040# Check that the compiler produces executables we can run.  If not, either
    34494041# the compiler is broken, or we cross compile.
    3450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
    3451 $as_echo_n "checking whether we are cross compiling... " >&6; }
     4042{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
     4043printf %s "checking whether we are cross compiling... " >&6; }
    34524044if test "$cross_compiling" != yes; then
    34534045  { { ac_try="$ac_link"
     
    34574049esac
    34584050eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
    3459 $as_echo "$ac_try_echo"; } >&5
     4051printf "%s\n" "$ac_try_echo"; } >&5
    34604052  (eval "$ac_link") 2>&5
    34614053  ac_status=$?
    3462   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     4054  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
    34634055  test $ac_status = 0; }
    34644056  if { ac_try='./conftest$ac_cv_exeext'
     
    34684060esac
    34694061eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
    3470 $as_echo "$ac_try_echo"; } >&5
     4062printf "%s\n" "$ac_try_echo"; } >&5
    34714063  (eval "$ac_try") 2>&5
    34724064  ac_status=$?
    3473   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     4065  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
    34744066  test $ac_status = 0; }; }; then
    34754067    cross_compiling=no
     
    34784070        cross_compiling=yes
    34794071    else
    3480         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
    3481 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    3482 as_fn_error $? "cannot run C compiled programs.
    3483 If you meant to cross compile, use \`--host'.
    3484 See \`config.log' for more details" "$LINENO" 5; }
     4072        { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
     4073printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
     4074as_fn_error 77 "cannot run C compiled programs.
     4075If you meant to cross compile, use '--host'.
     4076See 'config.log' for more details" "$LINENO" 5; }
    34854077    fi
    34864078  fi
    34874079fi
    3488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
    3489 $as_echo "$cross_compiling" >&6; }
    3490 
    3491 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
     4080{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
     4081printf "%s\n" "$cross_compiling" >&6; }
     4082
     4083rm -f conftest.$ac_ext conftest$ac_cv_exeext \
     4084  conftest.o conftest.obj conftest.out
    34924085ac_clean_files=$ac_clean_files_save
    3493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
    3494 $as_echo_n "checking for suffix of object files... " >&6; }
    3495 if ${ac_cv_objext+:} false; then :
    3496   $as_echo_n "(cached) " >&6
    3497 else
    3498   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     4086{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
     4087printf %s "checking for suffix of object files... " >&6; }
     4088if test ${ac_cv_objext+y}
     4089then :
     4090  printf %s "(cached) " >&6
     4091else case e in #(
     4092  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    34994093/* end confdefs.h.  */
    35004094
    35014095int
    3502 main ()
     4096main (void)
    35034097{
    35044098
     
    35144108esac
    35154109eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
    3516 $as_echo "$ac_try_echo"; } >&5
     4110printf "%s\n" "$ac_try_echo"; } >&5
    35174111  (eval "$ac_compile") 2>&5
    35184112  ac_status=$?
    3519   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
    3520   test $ac_status = 0; }; then :
     4113  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     4114  test $ac_status = 0; }
     4115then :
    35214116  for ac_file in conftest.o conftest.obj conftest.*; do
    35224117  test -f "$ac_file" || continue;
     
    35274122  esac
    35284123done
    3529 else
    3530   $as_echo "$as_me: failed program was:" >&5
     4124else case e in #(
     4125  e) printf "%s\n" "$as_me: failed program was:" >&5
    35314126sed 's/^/| /' conftest.$ac_ext >&5
    35324127
    3533 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
    3534 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     4128{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
     4129printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
    35354130as_fn_error $? "cannot compute suffix of object files: cannot compile
    3536 See \`config.log' for more details" "$LINENO" 5; }
    3537 fi
    3538 rm -f conftest.$ac_cv_objext conftest.$ac_ext
    3539 fi
    3540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
    3541 $as_echo "$ac_cv_objext" >&6; }
     4131See 'config.log' for more details" "$LINENO" 5; } ;;
     4132esac
     4133fi
     4134rm -f conftest.$ac_cv_objext conftest.$ac_ext ;;
     4135esac
     4136fi
     4137{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
     4138printf "%s\n" "$ac_cv_objext" >&6; }
    35424139OBJEXT=$ac_cv_objext
    35434140ac_objext=$OBJEXT
    3544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
    3545 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
    3546 if ${ac_cv_c_compiler_gnu+:} false; then :
    3547   $as_echo_n "(cached) " >&6
    3548 else
    3549   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     4141{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
     4142printf %s "checking whether the compiler supports GNU C... " >&6; }
     4143if test ${ac_cv_c_compiler_gnu+y}
     4144then :
     4145  printf %s "(cached) " >&6
     4146else case e in #(
     4147  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    35504148/* end confdefs.h.  */
    35514149
    35524150int
    3553 main ()
     4151main (void)
    35544152{
    35554153#ifndef __GNUC__
     
    35614159}
    35624160_ACEOF
    3563 if ac_fn_c_try_compile "$LINENO"; then :
     4161if ac_fn_c_try_compile "$LINENO"
     4162then :
    35644163  ac_compiler_gnu=yes
    3565 else
    3566   ac_compiler_gnu=no
    3567 fi
    3568 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     4164else case e in #(
     4165  e) ac_compiler_gnu=no ;;
     4166esac
     4167fi
     4168rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
    35694169ac_cv_c_compiler_gnu=$ac_compiler_gnu
    3570 
    3571 fi
    3572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
    3573 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
     4170 ;;
     4171esac
     4172fi
     4173{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
     4174printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
     4175ac_compiler_gnu=$ac_cv_c_compiler_gnu
     4176
    35744177if test $ac_compiler_gnu = yes; then
    35754178  GCC=yes
     
    35774180  GCC=
    35784181fi
    3579 ac_test_CFLAGS=${CFLAGS+set}
     4182ac_test_CFLAGS=${CFLAGS+y}
    35804183ac_save_CFLAGS=$CFLAGS
    3581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
    3582 $as_echo_n "checking whether $CC accepts -g... " >&6; }
    3583 if ${ac_cv_prog_cc_g+:} false; then :
    3584   $as_echo_n "(cached) " >&6
    3585 else
    3586   ac_save_c_werror_flag=$ac_c_werror_flag
     4184{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
     4185printf %s "checking whether $CC accepts -g... " >&6; }
     4186if test ${ac_cv_prog_cc_g+y}
     4187then :
     4188  printf %s "(cached) " >&6
     4189else case e in #(
     4190  e) ac_save_c_werror_flag=$ac_c_werror_flag
    35874191   ac_c_werror_flag=yes
    35884192   ac_cv_prog_cc_g=no
     
    35924196
    35934197int
    3594 main ()
     4198main (void)
    35954199{
    35964200
     
    35994203}
    36004204_ACEOF
    3601 if ac_fn_c_try_compile "$LINENO"; then :
     4205if ac_fn_c_try_compile "$LINENO"
     4206then :
    36024207  ac_cv_prog_cc_g=yes
    3603 else
    3604   CFLAGS=""
     4208else case e in #(
     4209  e) CFLAGS=""
    36054210      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    36064211/* end confdefs.h.  */
    36074212
    36084213int
    3609 main ()
     4214main (void)
    36104215{
    36114216
     
    36144219}
    36154220_ACEOF
    3616 if ac_fn_c_try_compile "$LINENO"; then :
    3617 
    3618 else
    3619   ac_c_werror_flag=$ac_save_c_werror_flag
     4221if ac_fn_c_try_compile "$LINENO"
     4222then :
     4223
     4224else case e in #(
     4225  e) ac_c_werror_flag=$ac_save_c_werror_flag
    36204226         CFLAGS="-g"
    36214227         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     
    36234229
    36244230int
    3625 main ()
     4231main (void)
    36264232{
    36274233
     
    36304236}
    36314237_ACEOF
    3632 if ac_fn_c_try_compile "$LINENO"; then :
     4238if ac_fn_c_try_compile "$LINENO"
     4239then :
    36334240  ac_cv_prog_cc_g=yes
    36344241fi
    3635 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    3636 fi
    3637 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    3638 fi
    3639 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    3640    ac_c_werror_flag=$ac_save_c_werror_flag
    3641 fi
    3642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
    3643 $as_echo "$ac_cv_prog_cc_g" >&6; }
    3644 if test "$ac_test_CFLAGS" = set; then
     4242rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
     4243esac
     4244fi
     4245rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
     4246esac
     4247fi
     4248rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
     4249   ac_c_werror_flag=$ac_save_c_werror_flag ;;
     4250esac
     4251fi
     4252{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
     4253printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
     4254if test $ac_test_CFLAGS; then
    36454255  CFLAGS=$ac_save_CFLAGS
    36464256elif test $ac_cv_prog_cc_g = yes; then
     
    36574267  fi
    36584268fi
    3659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
    3660 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
    3661 if ${ac_cv_prog_cc_c89+:} false; then :
    3662   $as_echo_n "(cached) " >&6
    3663 else
    3664   ac_cv_prog_cc_c89=no
     4269ac_prog_cc_stdc=no
     4270if test x$ac_prog_cc_stdc = xno
     4271then :
     4272  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
     4273printf %s "checking for $CC option to enable C11 features... " >&6; }
     4274if test ${ac_cv_prog_cc_c11+y}
     4275then :
     4276  printf %s "(cached) " >&6
     4277else case e in #(
     4278  e) ac_cv_prog_cc_c11=no
    36654279ac_save_CC=$CC
    36664280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    36674281/* end confdefs.h.  */
    3668 #include <stdarg.h>
    3669 #include <stdio.h>
    3670 struct stat;
    3671 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
    3672 struct buf { int x; };
    3673 FILE * (*rcsopen) (struct buf *, struct stat *, int);
    3674 static char *e (p, i)
    3675      char **p;
    3676      int i;
    3677 {
    3678   return p[i];
    3679 }
    3680 static char *f (char * (*g) (char **, int), char **p, ...)
    3681 {
    3682   char *s;
    3683   va_list v;
    3684   va_start (v,p);
    3685   s = g (p, va_arg (v,int));
    3686   va_end (v);
    3687   return s;
    3688 }
    3689 
    3690 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
    3691    function prototypes and stuff, but not '\xHH' hex character constants.
    3692    These don't provoke an error unfortunately, instead are silently treated
    3693    as 'x'.  The following induces an error, until -std is added to get
    3694    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
    3695    array size at least.  It's necessary to write '\x00'==0 to get something
    3696    that's true only with -std.  */
    3697 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
    3698 
    3699 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
    3700    inside strings and character constants.  */
    3701 #define FOO(x) 'x'
    3702 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
    3703 
    3704 int test (int i, double x);
    3705 struct s1 {int (*f) (int a);};
    3706 struct s2 {int (*f) (double a);};
    3707 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
    3708 int argc;
    3709 char **argv;
    3710 int
    3711 main ()
    3712 {
    3713 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
    3714   ;
    3715   return 0;
    3716 }
     4282$ac_c_conftest_c11_program
    37174283_ACEOF
    3718 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
    3719         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
     4284for ac_arg in '' -std=gnu11
    37204285do
    37214286  CC="$ac_save_CC $ac_arg"
    3722   if ac_fn_c_try_compile "$LINENO"; then :
     4287  if ac_fn_c_try_compile "$LINENO"
     4288then :
     4289  ac_cv_prog_cc_c11=$ac_arg
     4290fi
     4291rm -f core conftest.err conftest.$ac_objext conftest.beam
     4292  test "x$ac_cv_prog_cc_c11" != "xno" && break
     4293done
     4294rm -f conftest.$ac_ext
     4295CC=$ac_save_CC ;;
     4296esac
     4297fi
     4298
     4299if test "x$ac_cv_prog_cc_c11" = xno
     4300then :
     4301  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
     4302printf "%s\n" "unsupported" >&6; }
     4303else case e in #(
     4304  e) if test "x$ac_cv_prog_cc_c11" = x
     4305then :
     4306  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
     4307printf "%s\n" "none needed" >&6; }
     4308else case e in #(
     4309  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
     4310printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
     4311     CC="$CC $ac_cv_prog_cc_c11" ;;
     4312esac
     4313fi
     4314  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
     4315  ac_prog_cc_stdc=c11 ;;
     4316esac
     4317fi
     4318fi
     4319if test x$ac_prog_cc_stdc = xno
     4320then :
     4321  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
     4322printf %s "checking for $CC option to enable C99 features... " >&6; }
     4323if test ${ac_cv_prog_cc_c99+y}
     4324then :
     4325  printf %s "(cached) " >&6
     4326else case e in #(
     4327  e) ac_cv_prog_cc_c99=no
     4328ac_save_CC=$CC
     4329cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     4330/* end confdefs.h.  */
     4331$ac_c_conftest_c99_program
     4332_ACEOF
     4333for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
     4334do
     4335  CC="$ac_save_CC $ac_arg"
     4336  if ac_fn_c_try_compile "$LINENO"
     4337then :
     4338  ac_cv_prog_cc_c99=$ac_arg
     4339fi
     4340rm -f core conftest.err conftest.$ac_objext conftest.beam
     4341  test "x$ac_cv_prog_cc_c99" != "xno" && break
     4342done
     4343rm -f conftest.$ac_ext
     4344CC=$ac_save_CC ;;
     4345esac
     4346fi
     4347
     4348if test "x$ac_cv_prog_cc_c99" = xno
     4349then :
     4350  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
     4351printf "%s\n" "unsupported" >&6; }
     4352else case e in #(
     4353  e) if test "x$ac_cv_prog_cc_c99" = x
     4354then :
     4355  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
     4356printf "%s\n" "none needed" >&6; }
     4357else case e in #(
     4358  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
     4359printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
     4360     CC="$CC $ac_cv_prog_cc_c99" ;;
     4361esac
     4362fi
     4363  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
     4364  ac_prog_cc_stdc=c99 ;;
     4365esac
     4366fi
     4367fi
     4368if test x$ac_prog_cc_stdc = xno
     4369then :
     4370  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
     4371printf %s "checking for $CC option to enable C89 features... " >&6; }
     4372if test ${ac_cv_prog_cc_c89+y}
     4373then :
     4374  printf %s "(cached) " >&6
     4375else case e in #(
     4376  e) ac_cv_prog_cc_c89=no
     4377ac_save_CC=$CC
     4378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     4379/* end confdefs.h.  */
     4380$ac_c_conftest_c89_program
     4381_ACEOF
     4382for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
     4383do
     4384  CC="$ac_save_CC $ac_arg"
     4385  if ac_fn_c_try_compile "$LINENO"
     4386then :
    37234387  ac_cv_prog_cc_c89=$ac_arg
    37244388fi
    3725 rm -f core conftest.err conftest.$ac_objext
     4389rm -f core conftest.err conftest.$ac_objext conftest.beam
    37264390  test "x$ac_cv_prog_cc_c89" != "xno" && break
    37274391done
    37284392rm -f conftest.$ac_ext
    3729 CC=$ac_save_CC
    3730 
    3731 fi
    3732 # AC_CACHE_VAL
    3733 case "x$ac_cv_prog_cc_c89" in
    3734   x)
    3735     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
    3736 $as_echo "none needed" >&6; } ;;
    3737   xno)
    3738     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
    3739 $as_echo "unsupported" >&6; } ;;
    3740   *)
    3741     CC="$CC $ac_cv_prog_cc_c89"
    3742     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
    3743 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
    3744 esac
    3745 if test "x$ac_cv_prog_cc_c89" != xno; then :
    3746 
     4393CC=$ac_save_CC ;;
     4394esac
     4395fi
     4396
     4397if test "x$ac_cv_prog_cc_c89" = xno
     4398then :
     4399  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
     4400printf "%s\n" "unsupported" >&6; }
     4401else case e in #(
     4402  e) if test "x$ac_cv_prog_cc_c89" = x
     4403then :
     4404  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
     4405printf "%s\n" "none needed" >&6; }
     4406else case e in #(
     4407  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
     4408printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
     4409     CC="$CC $ac_cv_prog_cc_c89" ;;
     4410esac
     4411fi
     4412  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
     4413  ac_prog_cc_stdc=c89 ;;
     4414esac
     4415fi
    37474416fi
    37484417
     
    37534422ac_compiler_gnu=$ac_cv_c_compiler_gnu
    37544423
    3755 ac_ext=c
     4424
     4425  ac_ext=c
    37564426ac_cpp='$CPP $CPPFLAGS'
    37574427ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
    37584428ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
    37594429ac_compiler_gnu=$ac_cv_c_compiler_gnu
    3760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
    3761 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
    3762 if ${am_cv_prog_cc_c_o+:} false; then :
    3763   $as_echo_n "(cached) " >&6
    3764 else
    3765   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     4430{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
     4431printf %s "checking whether $CC understands -c and -o together... " >&6; }
     4432if test ${am_cv_prog_cc_c_o+y}
     4433then :
     4434  printf %s "(cached) " >&6
     4435else case e in #(
     4436  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    37664437/* end confdefs.h.  */
    37674438
    37684439int
    3769 main ()
     4440main (void)
    37704441{
    37714442
     
    37934464  done
    37944465  rm -f core conftest*
    3795   unset am_i
    3796 fi
    3797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
    3798 $as_echo "$am_cv_prog_cc_c_o" >&6; }
     4466  unset am_i ;;
     4467esac
     4468fi
     4469{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
     4470printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
    37994471if test "$am_cv_prog_cc_c_o" != yes; then
    38004472   # Losing compiler, so override with the script.
     
    38154487ac_config_commands="$ac_config_commands depfiles"
    38164488
    3817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
    3818 $as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; }
     4489{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
     4490printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
    38194491cat > confinc.mk << 'END'
    38204492am__doit:
     
    38524524done
    38534525rm -f confinc.* confmf.*
    3854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
    3855 $as_echo "${_am_result}" >&6; }
     4526{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
     4527printf "%s\n" "${_am_result}" >&6; }
    38564528
    38574529# Check whether --enable-dependency-tracking was given.
    3858 if test "${enable_dependency_tracking+set}" = set; then :
     4530if test ${enable_dependency_tracking+y}
     4531then :
    38594532  enableval=$enable_dependency_tracking;
    38604533fi
     
    38774550depcc="$CC"   am_compiler_list=
    38784551
    3879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
    3880 $as_echo_n "checking dependency style of $depcc... " >&6; }
    3881 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
    3882   $as_echo_n "(cached) " >&6
    3883 else
    3884   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
     4552{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
     4553printf %s "checking dependency style of $depcc... " >&6; }
     4554if test ${am_cv_CC_dependencies_compiler_type+y}
     4555then :
     4556  printf %s "(cached) " >&6
     4557else case e in #(
     4558  e) if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
    38854559  # We make a subdir and do the tests there.  Otherwise we can end up
    38864560  # making bogus files that we don't know about and never remove.  For
     
    39864660  am_cv_CC_dependencies_compiler_type=none
    39874661fi
    3988 
    3989 fi
    3990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
    3991 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
     4662 ;;
     4663esac
     4664fi
     4665{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
     4666printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
    39924667CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
    39934668
     
    40124687depcc="$CCAS"   am_compiler_list=
    40134688
    4014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
    4015 $as_echo_n "checking dependency style of $depcc... " >&6; }
    4016 if ${am_cv_CCAS_dependencies_compiler_type+:} false; then :
    4017   $as_echo_n "(cached) " >&6
    4018 else
    4019   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
     4689{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
     4690printf %s "checking dependency style of $depcc... " >&6; }
     4691if test ${am_cv_CCAS_dependencies_compiler_type+y}
     4692then :
     4693  printf %s "(cached) " >&6
     4694else case e in #(
     4695  e) if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
    40204696  # We make a subdir and do the tests there.  Otherwise we can end up
    40214697  # making bogus files that we don't know about and never remove.  For
     
    41194795  am_cv_CCAS_dependencies_compiler_type=none
    41204796fi
    4121 
    4122 fi
    4123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5
    4124 $as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; }
     4797 ;;
     4798esac
     4799fi
     4800{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5
     4801printf "%s\n" "$am_cv_CCAS_dependencies_compiler_type" >&6; }
    41254802CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type
    41264803
     
    41364813
    41374814
    4138 # Make sure we can run config.sub.
    4139 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
    4140   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
    4141 
    4142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
    4143 $as_echo_n "checking build system type... " >&6; }
    4144 if ${ac_cv_build+:} false; then :
    4145   $as_echo_n "(cached) " >&6
    4146 else
    4147   ac_build_alias=$build_alias
     4815
     4816
     4817  # Make sure we can run config.sub.
     4818$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
     4819  as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
     4820
     4821{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
     4822printf %s "checking build system type... " >&6; }
     4823if test ${ac_cv_build+y}
     4824then :
     4825  printf %s "(cached) " >&6
     4826else case e in #(
     4827  e) ac_build_alias=$build_alias
    41484828test "x$ac_build_alias" = x &&
    4149   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
     4829  ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
    41504830test "x$ac_build_alias" = x &&
    41514831  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
    4152 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
    4153   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
    4154 
    4155 fi
    4156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
    4157 $as_echo "$ac_cv_build" >&6; }
     4832ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
     4833  as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
     4834 ;;
     4835esac
     4836fi
     4837{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
     4838printf "%s\n" "$ac_cv_build" >&6; }
    41584839case $ac_cv_build in
    41594840*-*-*) ;;
     
    41744855
    41754856
    4176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
    4177 $as_echo_n "checking host system type... " >&6; }
    4178 if ${ac_cv_host+:} false; then :
    4179   $as_echo_n "(cached) " >&6
    4180 else
    4181   if test "x$host_alias" = x; then
     4857{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
     4858printf %s "checking host system type... " >&6; }
     4859if test ${ac_cv_host+y}
     4860then :
     4861  printf %s "(cached) " >&6
     4862else case e in #(
     4863  e) if test "x$host_alias" = x; then
    41824864  ac_cv_host=$ac_cv_build
    41834865else
    4184   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
    4185     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
    4186 fi
    4187 
    4188 fi
    4189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
    4190 $as_echo "$ac_cv_host" >&6; }
     4866  ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
     4867    as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
     4868fi
     4869 ;;
     4870esac
     4871fi
     4872{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
     4873printf "%s\n" "$ac_cv_host" >&6; }
    41914874case $ac_cv_host in
    41924875*-*-*) ;;
     
    42074890
    42084891
    4209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
    4210 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
    4211 if ${ac_cv_path_SED+:} false; then :
    4212   $as_echo_n "(cached) " >&6
    4213 else
    4214             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
     4892{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
     4893printf %s "checking for a sed that does not truncate output... " >&6; }
     4894if test ${ac_cv_path_SED+y}
     4895then :
     4896  printf %s "(cached) " >&6
     4897else case e in #(
     4898  e)           ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
    42154899     for ac_i in 1 2 3 4 5 6 7; do
    42164900       ac_script="$ac_script$as_nl$ac_script"
     
    42254909do
    42264910  IFS=$as_save_IFS
    4227   test -z "$as_dir" && as_dir=.
    4228     for ac_prog in sed gsed; do
     4911  case $as_dir in #(((
     4912    '') as_dir=./ ;;
     4913    */) ;;
     4914    *) as_dir=$as_dir/ ;;
     4915  esac
     4916    for ac_prog in sed gsed
     4917   do
    42294918    for ac_exec_ext in '' $ac_executable_extensions; do
    4230       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
     4919      ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
    42314920      as_fn_executable_p "$ac_path_SED" || continue
    42324921# Check for GNU ac_path_SED and select it if it is found.
    42334922  # Check for GNU $ac_path_SED
    4234 case `"$ac_path_SED" --version 2>&1` in
     4923case `"$ac_path_SED" --version 2>&1` in #(
    42354924*GNU*)
    42364925  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
     4926#(
    42374927*)
    42384928  ac_count=0
    4239   $as_echo_n 0123456789 >"conftest.in"
     4929  printf %s 0123456789 >"conftest.in"
    42404930  while :
    42414931  do
     
    42434933    mv "conftest.tmp" "conftest.in"
    42444934    cp "conftest.in" "conftest.nl"
    4245     $as_echo '' >> "conftest.nl"
     4935    printf "%s\n" '' >> "conftest.nl"
    42464936    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
    42474937    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
     
    42694959  ac_cv_path_SED=$SED
    42704960fi
    4271 
    4272 fi
    4273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
    4274 $as_echo "$ac_cv_path_SED" >&6; }
     4961 ;;
     4962esac
     4963fi
     4964{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
     4965printf "%s\n" "$ac_cv_path_SED" >&6; }
    42754966 SED="$ac_cv_path_SED"
    42764967  rm -f conftest.sed
     
    42894980
    42904981
    4291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
    4292 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
    4293 if ${ac_cv_path_GREP+:} false; then :
    4294   $as_echo_n "(cached) " >&6
    4295 else
    4296   if test -z "$GREP"; then
     4982{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
     4983printf %s "checking for grep that handles long lines and -e... " >&6; }
     4984if test ${ac_cv_path_GREP+y}
     4985then :
     4986  printf %s "(cached) " >&6
     4987else case e in #(
     4988  e) if test -z "$GREP"; then
    42974989  ac_path_GREP_found=false
    42984990  # Loop through the user's path and test for each of PROGNAME-LIST
     
    43014993do
    43024994  IFS=$as_save_IFS
    4303   test -z "$as_dir" && as_dir=.
    4304     for ac_prog in grep ggrep; do
     4995  case $as_dir in #(((
     4996    '') as_dir=./ ;;
     4997    */) ;;
     4998    *) as_dir=$as_dir/ ;;
     4999  esac
     5000    for ac_prog in grep ggrep
     5001   do
    43055002    for ac_exec_ext in '' $ac_executable_extensions; do
    4306       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
     5003      ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
    43075004      as_fn_executable_p "$ac_path_GREP" || continue
    43085005# Check for GNU ac_path_GREP and select it if it is found.
    43095006  # Check for GNU $ac_path_GREP
    4310 case `"$ac_path_GREP" --version 2>&1` in
     5007case `"$ac_path_GREP" --version 2>&1` in #(
    43115008*GNU*)
    43125009  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
     5010#(
    43135011*)
    43145012  ac_count=0
    4315   $as_echo_n 0123456789 >"conftest.in"
     5013  printf %s 0123456789 >"conftest.in"
    43165014  while :
    43175015  do
     
    43195017    mv "conftest.tmp" "conftest.in"
    43205018    cp "conftest.in" "conftest.nl"
    4321     $as_echo 'GREP' >> "conftest.nl"
     5019    printf "%s\n" 'GREP' >> "conftest.nl"
    43225020    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
    43235021    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
     
    43455043  ac_cv_path_GREP=$GREP
    43465044fi
    4347 
    4348 fi
    4349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
    4350 $as_echo "$ac_cv_path_GREP" >&6; }
     5045 ;;
     5046esac
     5047fi
     5048{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
     5049printf "%s\n" "$ac_cv_path_GREP" >&6; }
    43515050 GREP="$ac_cv_path_GREP"
    43525051
    43535052
    4354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
    4355 $as_echo_n "checking for egrep... " >&6; }
    4356 if ${ac_cv_path_EGREP+:} false; then :
    4357   $as_echo_n "(cached) " >&6
    4358 else
    4359   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
     5053{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
     5054printf %s "checking for egrep... " >&6; }
     5055if test ${ac_cv_path_EGREP+y}
     5056then :
     5057  printf %s "(cached) " >&6
     5058else case e in #(
     5059  e) if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
    43605060   then ac_cv_path_EGREP="$GREP -E"
    43615061   else
     
    43675067do
    43685068  IFS=$as_save_IFS
    4369   test -z "$as_dir" && as_dir=.
    4370     for ac_prog in egrep; do
     5069  case $as_dir in #(((
     5070    '') as_dir=./ ;;
     5071    */) ;;
     5072    *) as_dir=$as_dir/ ;;
     5073  esac
     5074    for ac_prog in egrep
     5075   do
    43715076    for ac_exec_ext in '' $ac_executable_extensions; do
    4372       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
     5077      ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
    43735078      as_fn_executable_p "$ac_path_EGREP" || continue
    43745079# Check for GNU ac_path_EGREP and select it if it is found.
    43755080  # Check for GNU $ac_path_EGREP
    4376 case `"$ac_path_EGREP" --version 2>&1` in
     5081case `"$ac_path_EGREP" --version 2>&1` in #(
    43775082*GNU*)
    43785083  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
     5084#(
    43795085*)
    43805086  ac_count=0
    4381   $as_echo_n 0123456789 >"conftest.in"
     5087  printf %s 0123456789 >"conftest.in"
    43825088  while :
    43835089  do
     
    43855091    mv "conftest.tmp" "conftest.in"
    43865092    cp "conftest.in" "conftest.nl"
    4387     $as_echo 'EGREP' >> "conftest.nl"
     5093    printf "%s\n" 'EGREP' >> "conftest.nl"
    43885094    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
    43895095    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
     
    44125118fi
    44135119
    4414    fi
    4415 fi
    4416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
    4417 $as_echo "$ac_cv_path_EGREP" >&6; }
     5120   fi ;;
     5121esac
     5122fi
     5123{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
     5124printf "%s\n" "$ac_cv_path_EGREP" >&6; }
    44185125 EGREP="$ac_cv_path_EGREP"
    44195126
    4420 
    4421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
    4422 $as_echo_n "checking for fgrep... " >&6; }
    4423 if ${ac_cv_path_FGREP+:} false; then :
    4424   $as_echo_n "(cached) " >&6
    4425 else
    4426   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
     5127         EGREP_TRADITIONAL=$EGREP
     5128 ac_cv_path_EGREP_TRADITIONAL=$EGREP
     5129
     5130{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
     5131printf %s "checking for fgrep... " >&6; }
     5132if test ${ac_cv_path_FGREP+y}
     5133then :
     5134  printf %s "(cached) " >&6
     5135else case e in #(
     5136  e) if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
    44275137   then ac_cv_path_FGREP="$GREP -F"
    44285138   else
     
    44345144do
    44355145  IFS=$as_save_IFS
    4436   test -z "$as_dir" && as_dir=.
    4437     for ac_prog in fgrep; do
     5146  case $as_dir in #(((
     5147    '') as_dir=./ ;;
     5148    */) ;;
     5149    *) as_dir=$as_dir/ ;;
     5150  esac
     5151    for ac_prog in fgrep
     5152   do
    44385153    for ac_exec_ext in '' $ac_executable_extensions; do
    4439       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
     5154      ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext"
    44405155      as_fn_executable_p "$ac_path_FGREP" || continue
    44415156# Check for GNU ac_path_FGREP and select it if it is found.
    44425157  # Check for GNU $ac_path_FGREP
    4443 case `"$ac_path_FGREP" --version 2>&1` in
     5158case `"$ac_path_FGREP" --version 2>&1` in #(
    44445159*GNU*)
    44455160  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
     5161#(
    44465162*)
    44475163  ac_count=0
    4448   $as_echo_n 0123456789 >"conftest.in"
     5164  printf %s 0123456789 >"conftest.in"
    44495165  while :
    44505166  do
     
    44525168    mv "conftest.tmp" "conftest.in"
    44535169    cp "conftest.in" "conftest.nl"
    4454     $as_echo 'FGREP' >> "conftest.nl"
     5170    printf "%s\n" 'FGREP' >> "conftest.nl"
    44555171    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
    44565172    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
     
    44795195fi
    44805196
    4481    fi
    4482 fi
    4483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
    4484 $as_echo "$ac_cv_path_FGREP" >&6; }
     5197   fi ;;
     5198esac
     5199fi
     5200{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
     5201printf "%s\n" "$ac_cv_path_FGREP" >&6; }
    44855202 FGREP="$ac_cv_path_FGREP"
    44865203
     
    45085225ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
    45095226
    4510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
    4511 $as_echo_n "checking how to print strings... " >&6; }
     5227{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
     5228printf %s "checking how to print strings... " >&6; }
    45125229# Test print first, because it will be a builtin if present.
    45135230if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
     
    45355252
    45365253case $ECHO in
    4537   printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
    4538 $as_echo "printf" >&6; } ;;
    4539   print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
    4540 $as_echo "print -r" >&6; } ;;
    4541   *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
    4542 $as_echo "cat" >&6; } ;;
     5254  printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5
     5255printf "%s\n" "printf" >&6; } ;;
     5256  print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
     5257printf "%s\n" "print -r" >&6; } ;;
     5258  *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5
     5259printf "%s\n" "cat" >&6; } ;;
    45435260esac
    45445261
     
    45595276
    45605277# Check whether --with-gnu-ld was given.
    4561 if test "${with_gnu_ld+set}" = set; then :
     5278if test ${with_gnu_ld+y}
     5279then :
    45625280  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
    4563 else
    4564   with_gnu_ld=no
     5281else case e in #(
     5282  e) with_gnu_ld=no ;;
     5283esac
    45655284fi
    45665285
     
    45685287if test yes = "$GCC"; then
    45695288  # Check if gcc -print-prog-name=ld gives a path.
    4570   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
    4571 $as_echo_n "checking for ld used by $CC... " >&6; }
     5289  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
     5290printf %s "checking for ld used by $CC... " >&6; }
    45725291  case $host in
    45735292  *-*-mingw*)
     
    45985317  esac
    45995318elif test yes = "$with_gnu_ld"; then
    4600   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
    4601 $as_echo_n "checking for GNU ld... " >&6; }
    4602 else
    4603   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
    4604 $as_echo_n "checking for non-GNU ld... " >&6; }
    4605 fi
    4606 if ${lt_cv_path_LD+:} false; then :
    4607   $as_echo_n "(cached) " >&6
    4608 else
    4609   if test -z "$LD"; then
     5319  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
     5320printf %s "checking for GNU ld... " >&6; }
     5321else
     5322  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
     5323printf %s "checking for non-GNU ld... " >&6; }
     5324fi
     5325if test ${lt_cv_path_LD+y}
     5326then :
     5327  printf %s "(cached) " >&6
     5328else case e in #(
     5329  e) if test -z "$LD"; then
    46105330  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
    46115331  for ac_dir in $PATH; do
     
    46305350else
    46315351  lt_cv_path_LD=$LD # Let the user override the test with a path.
    4632 fi
     5352fi ;;
     5353esac
    46335354fi
    46345355
    46355356LD=$lt_cv_path_LD
    46365357if test -n "$LD"; then
    4637   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
    4638 $as_echo "$LD" >&6; }
    4639 else
    4640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    4641 $as_echo "no" >&6; }
     5358  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
     5359printf "%s\n" "$LD" >&6; }
     5360else
     5361  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     5362printf "%s\n" "no" >&6; }
    46425363fi
    46435364test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
    4644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
    4645 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
    4646 if ${lt_cv_prog_gnu_ld+:} false; then :
    4647   $as_echo_n "(cached) " >&6
    4648 else
    4649   # I'd rather use --version here, but apparently some GNU lds only accept -v.
     5365{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
     5366printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
     5367if test ${lt_cv_prog_gnu_ld+y}
     5368then :
     5369  printf %s "(cached) " >&6
     5370else case e in #(
     5371  e) # I'd rather use --version here, but apparently some GNU lds only accept -v.
    46505372case `$LD -v 2>&1 </dev/null` in
    46515373*GNU* | *'with BFD'*)
     
    46555377  lt_cv_prog_gnu_ld=no
    46565378  ;;
    4657 esac
    4658 fi
    4659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
    4660 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
     5379esac ;;
     5380esac
     5381fi
     5382{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
     5383printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; }
    46615384with_gnu_ld=$lt_cv_prog_gnu_ld
    46625385
     
    46745397ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
    46755398ac_compiler_gnu=$ac_cv_c_compiler_gnu
    4676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
    4677 $as_echo_n "checking how to run the C preprocessor... " >&6; }
     5399{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
     5400printf %s "checking how to run the C preprocessor... " >&6; }
    46785401# On Suns, sometimes $CPP names a directory.
    46795402if test -n "$CPP" && test -d "$CPP"; then
     
    46815404fi
    46825405if test -z "$CPP"; then
    4683   if ${ac_cv_prog_CPP+:} false; then :
    4684   $as_echo_n "(cached) " >&6
    4685 else
    4686       # Double quotes because CPP needs to be expanded
    4687     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
     5406  if test ${ac_cv_prog_CPP+y}
     5407then :
     5408  printf %s "(cached) " >&6
     5409else case e in #(
     5410  e)     # Double quotes because $CC needs to be expanded
     5411    for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
    46885412    do
    46895413      ac_preproc_ok=false
     
    46925416  # Use a header file that comes with gcc, so configuring glibc
    46935417  # with a fresh cross-compiler works.
    4694   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    4695   # <limits.h> exists even on freestanding compilers.
    46965418  # On the NeXT, cc -E runs the code through the compiler's parser,
    46975419  # not just through cpp. "Syntax error" is here to catch this case.
    46985420  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    46995421/* end confdefs.h.  */
    4700 #ifdef __STDC__
    4701 # include <limits.h>
    4702 #else
    4703 # include <assert.h>
    4704 #endif
     5422#include <limits.h>
    47055423                     Syntax error
    47065424_ACEOF
    4707 if ac_fn_c_try_cpp "$LINENO"; then :
    4708 
    4709 else
    4710   # Broken: fails on valid input.
    4711 continue
     5425if ac_fn_c_try_cpp "$LINENO"
     5426then :
     5427
     5428else case e in #(
     5429  e) # Broken: fails on valid input.
     5430continue ;;
     5431esac
    47125432fi
    47135433rm -f conftest.err conftest.i conftest.$ac_ext
     
    47195439#include <ac_nonexistent.h>
    47205440_ACEOF
    4721 if ac_fn_c_try_cpp "$LINENO"; then :
     5441if ac_fn_c_try_cpp "$LINENO"
     5442then :
    47225443  # Broken: success on invalid input.
    47235444continue
    4724 else
    4725   # Passes both tests.
     5445else case e in #(
     5446  e) # Passes both tests.
    47265447ac_preproc_ok=:
    4727 break
     5448break ;;
     5449esac
    47285450fi
    47295451rm -f conftest.err conftest.i conftest.$ac_ext
    47305452
    47315453done
    4732 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
     5454# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
    47335455rm -f conftest.i conftest.err conftest.$ac_ext
    4734 if $ac_preproc_ok; then :
     5456if $ac_preproc_ok
     5457then :
    47355458  break
    47365459fi
     
    47385461    done
    47395462    ac_cv_prog_CPP=$CPP
    4740 
     5463   ;;
     5464esac
    47415465fi
    47425466  CPP=$ac_cv_prog_CPP
     
    47445468  ac_cv_prog_CPP=$CPP
    47455469fi
    4746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
    4747 $as_echo "$CPP" >&6; }
     5470{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
     5471printf "%s\n" "$CPP" >&6; }
    47485472ac_preproc_ok=false
    47495473for ac_c_preproc_warn_flag in '' yes
     
    47515475  # Use a header file that comes with gcc, so configuring glibc
    47525476  # with a fresh cross-compiler works.
    4753   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    4754   # <limits.h> exists even on freestanding compilers.
    47555477  # On the NeXT, cc -E runs the code through the compiler's parser,
    47565478  # not just through cpp. "Syntax error" is here to catch this case.
    47575479  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    47585480/* end confdefs.h.  */
    4759 #ifdef __STDC__
    4760 # include <limits.h>
    4761 #else
    4762 # include <assert.h>
    4763 #endif
     5481#include <limits.h>
    47645482                     Syntax error
    47655483_ACEOF
    4766 if ac_fn_c_try_cpp "$LINENO"; then :
    4767 
    4768 else
    4769   # Broken: fails on valid input.
    4770 continue
     5484if ac_fn_c_try_cpp "$LINENO"
     5485then :
     5486
     5487else case e in #(
     5488  e) # Broken: fails on valid input.
     5489continue ;;
     5490esac
    47715491fi
    47725492rm -f conftest.err conftest.i conftest.$ac_ext
     
    47785498#include <ac_nonexistent.h>
    47795499_ACEOF
    4780 if ac_fn_c_try_cpp "$LINENO"; then :
     5500if ac_fn_c_try_cpp "$LINENO"
     5501then :
    47815502  # Broken: success on invalid input.
    47825503continue
    4783 else
    4784   # Passes both tests.
     5504else case e in #(
     5505  e) # Passes both tests.
    47855506ac_preproc_ok=:
    4786 break
     5507break ;;
     5508esac
    47875509fi
    47885510rm -f conftest.err conftest.i conftest.$ac_ext
    47895511
    47905512done
    4791 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
     5513# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
    47925514rm -f conftest.i conftest.err conftest.$ac_ext
    4793 if $ac_preproc_ok; then :
    4794 
    4795 else
    4796   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
    4797 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     5515if $ac_preproc_ok
     5516then :
     5517
     5518else case e in #(
     5519  e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
     5520printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
    47985521as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
    4799 See \`config.log' for more details" "$LINENO" 5; }
     5522See 'config.log' for more details" "$LINENO" 5; } ;;
     5523esac
    48005524fi
    48015525
     
    48105534  # Extract the first word of "$ac_prog", so it can be a program name with args.
    48115535set dummy $ac_prog; ac_word=$2
    4812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    4813 $as_echo_n "checking for $ac_word... " >&6; }
    4814 if ${ac_cv_prog_AWK+:} false; then :
    4815   $as_echo_n "(cached) " >&6
    4816 else
    4817   if test -n "$AWK"; then
     5536{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     5537printf %s "checking for $ac_word... " >&6; }
     5538if test ${ac_cv_prog_AWK+y}
     5539then :
     5540  printf %s "(cached) " >&6
     5541else case e in #(
     5542  e) if test -n "$AWK"; then
    48185543  ac_cv_prog_AWK="$AWK" # Let the user override the test.
    48195544else
     
    48225547do
    48235548  IFS=$as_save_IFS
    4824   test -z "$as_dir" && as_dir=.
     5549  case $as_dir in #(((
     5550    '') as_dir=./ ;;
     5551    */) ;;
     5552    *) as_dir=$as_dir/ ;;
     5553  esac
    48255554    for ac_exec_ext in '' $ac_executable_extensions; do
    4826   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     5555  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    48275556    ac_cv_prog_AWK="$ac_prog"
    4828     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     5557    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    48295558    break 2
    48305559  fi
     
    48335562IFS=$as_save_IFS
    48345563
    4835 fi
     5564fi ;;
     5565esac
    48365566fi
    48375567AWK=$ac_cv_prog_AWK
    48385568if test -n "$AWK"; then
    4839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
    4840 $as_echo "$AWK" >&6; }
    4841 else
    4842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    4843 $as_echo "no" >&6; }
     5569  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
     5570printf "%s\n" "$AWK" >&6; }
     5571else
     5572  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     5573printf "%s\n" "no" >&6; }
    48445574fi
    48455575
     
    48495579
    48505580
    4851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
    4852 $as_echo_n "checking whether ln -s works... " >&6; }
     5581{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
     5582printf %s "checking whether ln -s works... " >&6; }
    48535583LN_S=$as_ln_s
    48545584if test "$LN_S" = "ln -s"; then
    4855   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
    4856 $as_echo "yes" >&6; }
    4857 else
    4858   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
    4859 $as_echo "no, using $LN_S" >&6; }
    4860 fi
    4861 
    4862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
    4863 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
     5585  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
     5586printf "%s\n" "yes" >&6; }
     5587else
     5588  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
     5589printf "%s\n" "no, using $LN_S" >&6; }
     5590fi
     5591
     5592{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
     5593printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
    48645594set x ${MAKE-make}
    4865 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
    4866 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
    4867   $as_echo_n "(cached) " >&6
    4868 else
    4869   cat >conftest.make <<\_ACEOF
     5595ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
     5596if eval test \${ac_cv_prog_make_${ac_make}_set+y}
     5597then :
     5598  printf %s "(cached) " >&6
     5599else case e in #(
     5600  e) cat >conftest.make <<\_ACEOF
    48705601SHELL = /bin/sh
    48715602all:
     
    48795610    eval ac_cv_prog_make_${ac_make}_set=no;;
    48805611esac
    4881 rm -f conftest.make
     5612rm -f conftest.make ;;
     5613esac
    48825614fi
    48835615if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
    4884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
    4885 $as_echo "yes" >&6; }
     5616  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
     5617printf "%s\n" "yes" >&6; }
    48865618  SET_MAKE=
    48875619else
    4888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    4889 $as_echo "no" >&6; }
     5620  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     5621printf "%s\n" "no" >&6; }
    48905622  SET_MAKE="MAKE=${MAKE-make}"
    48915623fi
     
    48945626case `pwd` in
    48955627  *\ * | *\     *)
    4896     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
    4897 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
    4898 esac
    4899 
    4900 
    4901 
    4902 macro_version='2.4.6'
    4903 macro_revision='2.4.6'
     5628    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
     5629printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
     5630esac
     5631
     5632
     5633
     5634macro_version='2.4.7'
     5635macro_revision='2.4.7'
     5636
    49045637
    49055638
     
    49345667no_glob_subst='s/\*/\\\*/g'
    49355668
    4936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
    4937 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
    4938 if ${lt_cv_path_NM+:} false; then :
    4939   $as_echo_n "(cached) " >&6
    4940 else
    4941   if test -n "$NM"; then
     5669{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
     5670printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
     5671if test ${lt_cv_path_NM+y}
     5672then :
     5673  printf %s "(cached) " >&6
     5674else case e in #(
     5675  e) if test -n "$NM"; then
    49425676  # Let the user override the test.
    49435677  lt_cv_path_NM=$NM
     
    49635697        *) lt_bad_file=/dev/null ;;
    49645698        esac
    4965         case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
     5699        case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
    49665700        *$lt_bad_file* | *'Invalid file or object type'*)
    49675701          lt_cv_path_NM="$tmp_nm -B"
     
    49695703          ;;
    49705704        *)
    4971           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
     5705          case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
    49725706          */dev/null*)
    49735707            lt_cv_path_NM="$tmp_nm -p"
     
    49865720  done
    49875721  : ${lt_cv_path_NM=no}
    4988 fi
    4989 fi
    4990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
    4991 $as_echo "$lt_cv_path_NM" >&6; }
     5722fi ;;
     5723esac
     5724fi
     5725{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
     5726printf "%s\n" "$lt_cv_path_NM" >&6; }
    49925727if test no != "$lt_cv_path_NM"; then
    49935728  NM=$lt_cv_path_NM
     
    50025737    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
    50035738set dummy $ac_tool_prefix$ac_prog; ac_word=$2
    5004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    5005 $as_echo_n "checking for $ac_word... " >&6; }
    5006 if ${ac_cv_prog_DUMPBIN+:} false; then :
    5007   $as_echo_n "(cached) " >&6
    5008 else
    5009   if test -n "$DUMPBIN"; then
     5739{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     5740printf %s "checking for $ac_word... " >&6; }
     5741if test ${ac_cv_prog_DUMPBIN+y}
     5742then :
     5743  printf %s "(cached) " >&6
     5744else case e in #(
     5745  e) if test -n "$DUMPBIN"; then
    50105746  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
    50115747else
     
    50145750do
    50155751  IFS=$as_save_IFS
    5016   test -z "$as_dir" && as_dir=.
     5752  case $as_dir in #(((
     5753    '') as_dir=./ ;;
     5754    */) ;;
     5755    *) as_dir=$as_dir/ ;;
     5756  esac
    50175757    for ac_exec_ext in '' $ac_executable_extensions; do
    5018   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     5758  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    50195759    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
    5020     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     5760    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    50215761    break 2
    50225762  fi
     
    50255765IFS=$as_save_IFS
    50265766
    5027 fi
     5767fi ;;
     5768esac
    50285769fi
    50295770DUMPBIN=$ac_cv_prog_DUMPBIN
    50305771if test -n "$DUMPBIN"; then
    5031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
    5032 $as_echo "$DUMPBIN" >&6; }
    5033 else
    5034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    5035 $as_echo "no" >&6; }
     5772  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
     5773printf "%s\n" "$DUMPBIN" >&6; }
     5774else
     5775  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     5776printf "%s\n" "no" >&6; }
    50365777fi
    50375778
     
    50465787  # Extract the first word of "$ac_prog", so it can be a program name with args.
    50475788set dummy $ac_prog; ac_word=$2
    5048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    5049 $as_echo_n "checking for $ac_word... " >&6; }
    5050 if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
    5051   $as_echo_n "(cached) " >&6
    5052 else
    5053   if test -n "$ac_ct_DUMPBIN"; then
     5789{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     5790printf %s "checking for $ac_word... " >&6; }
     5791if test ${ac_cv_prog_ac_ct_DUMPBIN+y}
     5792then :
     5793  printf %s "(cached) " >&6
     5794else case e in #(
     5795  e) if test -n "$ac_ct_DUMPBIN"; then
    50545796  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
    50555797else
     
    50585800do
    50595801  IFS=$as_save_IFS
    5060   test -z "$as_dir" && as_dir=.
     5802  case $as_dir in #(((
     5803    '') as_dir=./ ;;
     5804    */) ;;
     5805    *) as_dir=$as_dir/ ;;
     5806  esac
    50615807    for ac_exec_ext in '' $ac_executable_extensions; do
    5062   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     5808  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    50635809    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
    5064     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     5810    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    50655811    break 2
    50665812  fi
     
    50695815IFS=$as_save_IFS
    50705816
    5071 fi
     5817fi ;;
     5818esac
    50725819fi
    50735820ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
    50745821if test -n "$ac_ct_DUMPBIN"; then
    5075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
    5076 $as_echo "$ac_ct_DUMPBIN" >&6; }
    5077 else
    5078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    5079 $as_echo "no" >&6; }
     5822  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
     5823printf "%s\n" "$ac_ct_DUMPBIN" >&6; }
     5824else
     5825  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     5826printf "%s\n" "no" >&6; }
    50805827fi
    50815828
     
    50895836    case $cross_compiling:$ac_tool_warned in
    50905837yes:)
    5091 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
    5092 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     5838{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     5839printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
    50935840ac_tool_warned=yes ;;
    50945841esac
     
    50975844fi
    50985845
    5099     case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
     5846    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
    51005847    *COFF*)
    51015848      DUMPBIN="$DUMPBIN -symbols -headers"
     
    51185865
    51195866
    5120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
    5121 $as_echo_n "checking the name lister ($NM) interface... " >&6; }
    5122 if ${lt_cv_nm_interface+:} false; then :
    5123   $as_echo_n "(cached) " >&6
    5124 else
    5125   lt_cv_nm_interface="BSD nm"
     5867{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
     5868printf %s "checking the name lister ($NM) interface... " >&6; }
     5869if test ${lt_cv_nm_interface+y}
     5870then :
     5871  printf %s "(cached) " >&6
     5872else case e in #(
     5873  e) lt_cv_nm_interface="BSD nm"
    51265874  echo "int some_variable = 0;" > conftest.$ac_ext
    51275875  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
     
    51365884    lt_cv_nm_interface="MS dumpbin"
    51375885  fi
    5138   rm -f conftest*
    5139 fi
    5140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
    5141 $as_echo "$lt_cv_nm_interface" >&6; }
     5886  rm -f conftest* ;;
     5887esac
     5888fi
     5889{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
     5890printf "%s\n" "$lt_cv_nm_interface" >&6; }
    51425891
    51435892# find the maximum length of command line arguments
    5144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
    5145 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
    5146 if ${lt_cv_sys_max_cmd_len+:} false; then :
    5147   $as_echo_n "(cached) " >&6
    5148 else
    5149     i=0
     5893{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
     5894printf %s "checking the maximum length of command line arguments... " >&6; }
     5895if test ${lt_cv_sys_max_cmd_len+y}
     5896then :
     5897  printf %s "(cached) " >&6
     5898else case e in #(
     5899  e)   i=0
    51505900  teststring=ABCD
    51515901
     
    51885938    ;;
    51895939
    5190   bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
     5940  bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
    51915941    # This has been around since 386BSD, at least.  Likely further.
    51925942    if test -x /sbin/sysctl; then
     
    52315981    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
    52325982    if test -n "$kargmax"; then
    5233       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[  ]//'`
     5983      lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[         ]//'`
    52345984    else
    52355985      lt_cv_sys_max_cmd_len=32768
     
    52696019    ;;
    52706020  esac
    5271 
     6021 ;;
     6022esac
    52726023fi
    52736024
    52746025if test -n "$lt_cv_sys_max_cmd_len"; then
    5275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
    5276 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
    5277 else
    5278   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
    5279 $as_echo "none" >&6; }
     6026  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
     6027printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; }
     6028else
     6029  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
     6030printf "%s\n" "none" >&6; }
    52806031fi
    52816032max_cmd_len=$lt_cv_sys_max_cmd_len
     
    53216072
    53226073
    5323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
    5324 $as_echo_n "checking how to convert $build file names to $host format... " >&6; }
    5325 if ${lt_cv_to_host_file_cmd+:} false; then :
    5326   $as_echo_n "(cached) " >&6
    5327 else
    5328   case $host in
     6074{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
     6075printf %s "checking how to convert $build file names to $host format... " >&6; }
     6076if test ${lt_cv_to_host_file_cmd+y}
     6077then :
     6078  printf %s "(cached) " >&6
     6079else case e in #(
     6080  e) case $host in
    53296081  *-*-mingw* )
    53306082    case $build in
     
    53576109    ;;
    53586110esac
    5359 
     6111 ;;
     6112esac
    53606113fi
    53616114
    53626115to_host_file_cmd=$lt_cv_to_host_file_cmd
    5363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
    5364 $as_echo "$lt_cv_to_host_file_cmd" >&6; }
    5365 
    5366 
    5367 
    5368 
    5369 
    5370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
    5371 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
    5372 if ${lt_cv_to_tool_file_cmd+:} false; then :
    5373   $as_echo_n "(cached) " >&6
    5374 else
    5375   #assume ordinary cross tools, or native build.
     6116{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
     6117printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; }
     6118
     6119
     6120
     6121
     6122
     6123{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
     6124printf %s "checking how to convert $build file names to toolchain format... " >&6; }
     6125if test ${lt_cv_to_tool_file_cmd+y}
     6126then :
     6127  printf %s "(cached) " >&6
     6128else case e in #(
     6129  e) #assume ordinary cross tools, or native build.
    53766130lt_cv_to_tool_file_cmd=func_convert_file_noop
    53776131case $host in
     
    53846138    ;;
    53856139esac
    5386 
     6140 ;;
     6141esac
    53876142fi
    53886143
    53896144to_tool_file_cmd=$lt_cv_to_tool_file_cmd
    5390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
    5391 $as_echo "$lt_cv_to_tool_file_cmd" >&6; }
    5392 
    5393 
    5394 
    5395 
    5396 
    5397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
    5398 $as_echo_n "checking for $LD option to reload object files... " >&6; }
    5399 if ${lt_cv_ld_reload_flag+:} false; then :
    5400   $as_echo_n "(cached) " >&6
    5401 else
    5402   lt_cv_ld_reload_flag='-r'
    5403 fi
    5404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
    5405 $as_echo "$lt_cv_ld_reload_flag" >&6; }
     6145{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
     6146printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; }
     6147
     6148
     6149
     6150
     6151
     6152{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
     6153printf %s "checking for $LD option to reload object files... " >&6; }
     6154if test ${lt_cv_ld_reload_flag+y}
     6155then :
     6156  printf %s "(cached) " >&6
     6157else case e in #(
     6158  e) lt_cv_ld_reload_flag='-r' ;;
     6159esac
     6160fi
     6161{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
     6162printf "%s\n" "$lt_cv_ld_reload_flag" >&6; }
    54066163reload_flag=$lt_cv_ld_reload_flag
    54076164case $reload_flag in
     
    54346191
    54356192if test -n "$ac_tool_prefix"; then
    5436   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
    5437 set dummy ${ac_tool_prefix}objdump; ac_word=$2
    5438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    5439 $as_echo_n "checking for $ac_word... " >&6; }
    5440 if ${ac_cv_prog_OBJDUMP+:} false; then :
    5441   $as_echo_n "(cached) " >&6
    5442 else
    5443   if test -n "$OBJDUMP"; then
    5444   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
     6193  # Extract the first word of "${ac_tool_prefix}file", so it can be a program name with args.
     6194set dummy ${ac_tool_prefix}file; ac_word=$2
     6195{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     6196printf %s "checking for $ac_word... " >&6; }
     6197if test ${ac_cv_prog_FILECMD+y}
     6198then :
     6199  printf %s "(cached) " >&6
     6200else case e in #(
     6201  e) if test -n "$FILECMD"; then
     6202  ac_cv_prog_FILECMD="$FILECMD" # Let the user override the test.
    54456203else
    54466204as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     
    54486206do
    54496207  IFS=$as_save_IFS
    5450   test -z "$as_dir" && as_dir=.
     6208  case $as_dir in #(((
     6209    '') as_dir=./ ;;
     6210    */) ;;
     6211    *) as_dir=$as_dir/ ;;
     6212  esac
    54516213    for ac_exec_ext in '' $ac_executable_extensions; do
    5452   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    5453     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
    5454     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     6214  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     6215    ac_cv_prog_FILECMD="${ac_tool_prefix}file"
     6216    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    54556217    break 2
    54566218  fi
     
    54596221IFS=$as_save_IFS
    54606222
    5461 fi
    5462 fi
    5463 OBJDUMP=$ac_cv_prog_OBJDUMP
    5464 if test -n "$OBJDUMP"; then
    5465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
    5466 $as_echo "$OBJDUMP" >&6; }
    5467 else
    5468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    5469 $as_echo "no" >&6; }
    5470 fi
    5471 
    5472 
    5473 fi
    5474 if test -z "$ac_cv_prog_OBJDUMP"; then
    5475   ac_ct_OBJDUMP=$OBJDUMP
    5476   # Extract the first word of "objdump", so it can be a program name with args.
    5477 set dummy objdump; ac_word=$2
    5478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    5479 $as_echo_n "checking for $ac_word... " >&6; }
    5480 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
    5481   $as_echo_n "(cached) " >&6
    5482 else
    5483   if test -n "$ac_ct_OBJDUMP"; then
    5484   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
     6223fi ;;
     6224esac
     6225fi
     6226FILECMD=$ac_cv_prog_FILECMD
     6227if test -n "$FILECMD"; then
     6228  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FILECMD" >&5
     6229printf "%s\n" "$FILECMD" >&6; }
     6230else
     6231  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     6232printf "%s\n" "no" >&6; }
     6233fi
     6234
     6235
     6236fi
     6237if test -z "$ac_cv_prog_FILECMD"; then
     6238  ac_ct_FILECMD=$FILECMD
     6239  # Extract the first word of "file", so it can be a program name with args.
     6240set dummy file; ac_word=$2
     6241{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     6242printf %s "checking for $ac_word... " >&6; }
     6243if test ${ac_cv_prog_ac_ct_FILECMD+y}
     6244then :
     6245  printf %s "(cached) " >&6
     6246else case e in #(
     6247  e) if test -n "$ac_ct_FILECMD"; then
     6248  ac_cv_prog_ac_ct_FILECMD="$ac_ct_FILECMD" # Let the user override the test.
    54856249else
    54866250as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     
    54886252do
    54896253  IFS=$as_save_IFS
    5490   test -z "$as_dir" && as_dir=.
     6254  case $as_dir in #(((
     6255    '') as_dir=./ ;;
     6256    */) ;;
     6257    *) as_dir=$as_dir/ ;;
     6258  esac
    54916259    for ac_exec_ext in '' $ac_executable_extensions; do
    5492   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    5493     ac_cv_prog_ac_ct_OBJDUMP="objdump"
    5494     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     6260  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     6261    ac_cv_prog_ac_ct_FILECMD="file"
     6262    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    54956263    break 2
    54966264  fi
     
    54996267IFS=$as_save_IFS
    55006268
    5501 fi
     6269fi ;;
     6270esac
     6271fi
     6272ac_ct_FILECMD=$ac_cv_prog_ac_ct_FILECMD
     6273if test -n "$ac_ct_FILECMD"; then
     6274  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FILECMD" >&5
     6275printf "%s\n" "$ac_ct_FILECMD" >&6; }
     6276else
     6277  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     6278printf "%s\n" "no" >&6; }
     6279fi
     6280
     6281  if test "x$ac_ct_FILECMD" = x; then
     6282    FILECMD=":"
     6283  else
     6284    case $cross_compiling:$ac_tool_warned in
     6285yes:)
     6286{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     6287printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     6288ac_tool_warned=yes ;;
     6289esac
     6290    FILECMD=$ac_ct_FILECMD
     6291  fi
     6292else
     6293  FILECMD="$ac_cv_prog_FILECMD"
     6294fi
     6295
     6296
     6297
     6298
     6299
     6300
     6301
     6302if test -n "$ac_tool_prefix"; then
     6303  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
     6304set dummy ${ac_tool_prefix}objdump; ac_word=$2
     6305{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     6306printf %s "checking for $ac_word... " >&6; }
     6307if test ${ac_cv_prog_OBJDUMP+y}
     6308then :
     6309  printf %s "(cached) " >&6
     6310else case e in #(
     6311  e) if test -n "$OBJDUMP"; then
     6312  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
     6313else
     6314as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     6315for as_dir in $PATH
     6316do
     6317  IFS=$as_save_IFS
     6318  case $as_dir in #(((
     6319    '') as_dir=./ ;;
     6320    */) ;;
     6321    *) as_dir=$as_dir/ ;;
     6322  esac
     6323    for ac_exec_ext in '' $ac_executable_extensions; do
     6324  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     6325    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
     6326    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     6327    break 2
     6328  fi
     6329done
     6330  done
     6331IFS=$as_save_IFS
     6332
     6333fi ;;
     6334esac
     6335fi
     6336OBJDUMP=$ac_cv_prog_OBJDUMP
     6337if test -n "$OBJDUMP"; then
     6338  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
     6339printf "%s\n" "$OBJDUMP" >&6; }
     6340else
     6341  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     6342printf "%s\n" "no" >&6; }
     6343fi
     6344
     6345
     6346fi
     6347if test -z "$ac_cv_prog_OBJDUMP"; then
     6348  ac_ct_OBJDUMP=$OBJDUMP
     6349  # Extract the first word of "objdump", so it can be a program name with args.
     6350set dummy objdump; ac_word=$2
     6351{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     6352printf %s "checking for $ac_word... " >&6; }
     6353if test ${ac_cv_prog_ac_ct_OBJDUMP+y}
     6354then :
     6355  printf %s "(cached) " >&6
     6356else case e in #(
     6357  e) if test -n "$ac_ct_OBJDUMP"; then
     6358  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
     6359else
     6360as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     6361for as_dir in $PATH
     6362do
     6363  IFS=$as_save_IFS
     6364  case $as_dir in #(((
     6365    '') as_dir=./ ;;
     6366    */) ;;
     6367    *) as_dir=$as_dir/ ;;
     6368  esac
     6369    for ac_exec_ext in '' $ac_executable_extensions; do
     6370  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
     6371    ac_cv_prog_ac_ct_OBJDUMP="objdump"
     6372    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
     6373    break 2
     6374  fi
     6375done
     6376  done
     6377IFS=$as_save_IFS
     6378
     6379fi ;;
     6380esac
    55026381fi
    55036382ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
    55046383if test -n "$ac_ct_OBJDUMP"; then
    5505   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
    5506 $as_echo "$ac_ct_OBJDUMP" >&6; }
    5507 else
    5508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    5509 $as_echo "no" >&6; }
     6384  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
     6385printf "%s\n" "$ac_ct_OBJDUMP" >&6; }
     6386else
     6387  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     6388printf "%s\n" "no" >&6; }
    55106389fi
    55116390
     
    55156394    case $cross_compiling:$ac_tool_warned in
    55166395yes:)
    5517 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
    5518 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     6396{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     6397printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
    55196398ac_tool_warned=yes ;;
    55206399esac
     
    55326411
    55336412
    5534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
    5535 $as_echo_n "checking how to recognize dependent libraries... " >&6; }
    5536 if ${lt_cv_deplibs_check_method+:} false; then :
    5537   $as_echo_n "(cached) " >&6
    5538 else
    5539   lt_cv_file_magic_cmd='$MAGIC_CMD'
     6413{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
     6414printf %s "checking how to recognize dependent libraries... " >&6; }
     6415if test ${lt_cv_deplibs_check_method+y}
     6416then :
     6417  printf %s "(cached) " >&6
     6418else case e in #(
     6419  e) lt_cv_file_magic_cmd='$MAGIC_CMD'
    55406420lt_cv_file_magic_test_file=
    55416421lt_cv_deplibs_check_method='unknown'
     
    55626442bsdi[45]*)
    55636443  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
    5564   lt_cv_file_magic_cmd='/usr/bin/file -L'
     6444  lt_cv_file_magic_cmd='$FILECMD -L'
    55656445  lt_cv_file_magic_test_file=/shlib/libc.so
    55666446  ;;
     
    55966476  ;;
    55976477
    5598 freebsd* | dragonfly*)
     6478freebsd* | dragonfly* | midnightbsd*)
    55996479  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
    56006480    case $host_cpu in
     
    56036483      # Let's accept both of them until this is cleared up.
    56046484      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
    5605       lt_cv_file_magic_cmd=/usr/bin/file
     6485      lt_cv_file_magic_cmd=$FILECMD
    56066486      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
    56076487      ;;
     
    56176497
    56186498hpux10.20* | hpux11*)
    5619   lt_cv_file_magic_cmd=/usr/bin/file
     6499  lt_cv_file_magic_cmd=$FILECMD
    56206500  case $host_cpu in
    56216501  ia64*)
     
    56646544newos6*)
    56656545  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
    5666   lt_cv_file_magic_cmd=/usr/bin/file
     6546  lt_cv_file_magic_cmd=$FILECMD
    56676547  lt_cv_file_magic_test_file=/usr/lib/libnls.so
    56686548  ;;
     
    57306610  ;;
    57316611esac
    5732 
    5733 fi
    5734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
    5735 $as_echo "$lt_cv_deplibs_check_method" >&6; }
     6612 ;;
     6613esac
     6614fi
     6615{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
     6616printf "%s\n" "$lt_cv_deplibs_check_method" >&6; }
    57366617
    57376618file_magic_glob=
     
    57776658  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
    57786659set dummy ${ac_tool_prefix}dlltool; ac_word=$2
    5779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    5780 $as_echo_n "checking for $ac_word... " >&6; }
    5781 if ${ac_cv_prog_DLLTOOL+:} false; then :
    5782   $as_echo_n "(cached) " >&6
    5783 else
    5784   if test -n "$DLLTOOL"; then
     6660{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     6661printf %s "checking for $ac_word... " >&6; }
     6662if test ${ac_cv_prog_DLLTOOL+y}
     6663then :
     6664  printf %s "(cached) " >&6
     6665else case e in #(
     6666  e) if test -n "$DLLTOOL"; then
    57856667  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
    57866668else
     
    57896671do
    57906672  IFS=$as_save_IFS
    5791   test -z "$as_dir" && as_dir=.
     6673  case $as_dir in #(((
     6674    '') as_dir=./ ;;
     6675    */) ;;
     6676    *) as_dir=$as_dir/ ;;
     6677  esac
    57926678    for ac_exec_ext in '' $ac_executable_extensions; do
    5793   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     6679  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    57946680    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
    5795     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     6681    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    57966682    break 2
    57976683  fi
     
    58006686IFS=$as_save_IFS
    58016687
    5802 fi
     6688fi ;;
     6689esac
    58036690fi
    58046691DLLTOOL=$ac_cv_prog_DLLTOOL
    58056692if test -n "$DLLTOOL"; then
    5806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
    5807 $as_echo "$DLLTOOL" >&6; }
    5808 else
    5809   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    5810 $as_echo "no" >&6; }
     6693  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
     6694printf "%s\n" "$DLLTOOL" >&6; }
     6695else
     6696  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     6697printf "%s\n" "no" >&6; }
    58116698fi
    58126699
     
    58176704  # Extract the first word of "dlltool", so it can be a program name with args.
    58186705set dummy dlltool; ac_word=$2
    5819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    5820 $as_echo_n "checking for $ac_word... " >&6; }
    5821 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
    5822   $as_echo_n "(cached) " >&6
    5823 else
    5824   if test -n "$ac_ct_DLLTOOL"; then
     6706{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     6707printf %s "checking for $ac_word... " >&6; }
     6708if test ${ac_cv_prog_ac_ct_DLLTOOL+y}
     6709then :
     6710  printf %s "(cached) " >&6
     6711else case e in #(
     6712  e) if test -n "$ac_ct_DLLTOOL"; then
    58256713  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
    58266714else
     
    58296717do
    58306718  IFS=$as_save_IFS
    5831   test -z "$as_dir" && as_dir=.
     6719  case $as_dir in #(((
     6720    '') as_dir=./ ;;
     6721    */) ;;
     6722    *) as_dir=$as_dir/ ;;
     6723  esac
    58326724    for ac_exec_ext in '' $ac_executable_extensions; do
    5833   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     6725  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    58346726    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
    5835     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     6727    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    58366728    break 2
    58376729  fi
     
    58406732IFS=$as_save_IFS
    58416733
    5842 fi
     6734fi ;;
     6735esac
    58436736fi
    58446737ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
    58456738if test -n "$ac_ct_DLLTOOL"; then
    5846   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
    5847 $as_echo "$ac_ct_DLLTOOL" >&6; }
    5848 else
    5849   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    5850 $as_echo "no" >&6; }
     6739  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
     6740printf "%s\n" "$ac_ct_DLLTOOL" >&6; }
     6741else
     6742  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     6743printf "%s\n" "no" >&6; }
    58516744fi
    58526745
     
    58566749    case $cross_compiling:$ac_tool_warned in
    58576750yes:)
    5858 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
    5859 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     6751{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     6752printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
    58606753ac_tool_warned=yes ;;
    58616754esac
     
    58746767
    58756768
    5876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
    5877 $as_echo_n "checking how to associate runtime and link libraries... " >&6; }
    5878 if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
    5879   $as_echo_n "(cached) " >&6
    5880 else
    5881   lt_cv_sharedlib_from_linklib_cmd='unknown'
     6769{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
     6770printf %s "checking how to associate runtime and link libraries... " >&6; }
     6771if test ${lt_cv_sharedlib_from_linklib_cmd+y}
     6772then :
     6773  printf %s "(cached) " >&6
     6774else case e in #(
     6775  e) lt_cv_sharedlib_from_linklib_cmd='unknown'
    58826776
    58836777case $host_os in
     
    58996793  ;;
    59006794esac
    5901 
    5902 fi
    5903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
    5904 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
     6795 ;;
     6796esac
     6797fi
     6798{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
     6799printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
    59056800sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
    59066801test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
     
    59186813    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
    59196814set dummy $ac_tool_prefix$ac_prog; ac_word=$2
    5920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    5921 $as_echo_n "checking for $ac_word... " >&6; }
    5922 if ${ac_cv_prog_AR+:} false; then :
    5923   $as_echo_n "(cached) " >&6
    5924 else
    5925   if test -n "$AR"; then
     6815{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     6816printf %s "checking for $ac_word... " >&6; }
     6817if test ${ac_cv_prog_AR+y}
     6818then :
     6819  printf %s "(cached) " >&6
     6820else case e in #(
     6821  e) if test -n "$AR"; then
    59266822  ac_cv_prog_AR="$AR" # Let the user override the test.
    59276823else
     
    59306826do
    59316827  IFS=$as_save_IFS
    5932   test -z "$as_dir" && as_dir=.
     6828  case $as_dir in #(((
     6829    '') as_dir=./ ;;
     6830    */) ;;
     6831    *) as_dir=$as_dir/ ;;
     6832  esac
    59336833    for ac_exec_ext in '' $ac_executable_extensions; do
    5934   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     6834  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    59356835    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
    5936     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     6836    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    59376837    break 2
    59386838  fi
     
    59416841IFS=$as_save_IFS
    59426842
    5943 fi
     6843fi ;;
     6844esac
    59446845fi
    59456846AR=$ac_cv_prog_AR
    59466847if test -n "$AR"; then
    5947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
    5948 $as_echo "$AR" >&6; }
    5949 else
    5950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    5951 $as_echo "no" >&6; }
     6848  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
     6849printf "%s\n" "$AR" >&6; }
     6850else
     6851  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     6852printf "%s\n" "no" >&6; }
    59526853fi
    59536854
     
    59626863  # Extract the first word of "$ac_prog", so it can be a program name with args.
    59636864set dummy $ac_prog; ac_word=$2
    5964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    5965 $as_echo_n "checking for $ac_word... " >&6; }
    5966 if ${ac_cv_prog_ac_ct_AR+:} false; then :
    5967   $as_echo_n "(cached) " >&6
    5968 else
    5969   if test -n "$ac_ct_AR"; then
     6865{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     6866printf %s "checking for $ac_word... " >&6; }
     6867if test ${ac_cv_prog_ac_ct_AR+y}
     6868then :
     6869  printf %s "(cached) " >&6
     6870else case e in #(
     6871  e) if test -n "$ac_ct_AR"; then
    59706872  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
    59716873else
     
    59746876do
    59756877  IFS=$as_save_IFS
    5976   test -z "$as_dir" && as_dir=.
     6878  case $as_dir in #(((
     6879    '') as_dir=./ ;;
     6880    */) ;;
     6881    *) as_dir=$as_dir/ ;;
     6882  esac
    59776883    for ac_exec_ext in '' $ac_executable_extensions; do
    5978   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     6884  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    59796885    ac_cv_prog_ac_ct_AR="$ac_prog"
    5980     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     6886    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    59816887    break 2
    59826888  fi
     
    59856891IFS=$as_save_IFS
    59866892
    5987 fi
     6893fi ;;
     6894esac
    59886895fi
    59896896ac_ct_AR=$ac_cv_prog_ac_ct_AR
    59906897if test -n "$ac_ct_AR"; then
    5991   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
    5992 $as_echo "$ac_ct_AR" >&6; }
    5993 else
    5994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    5995 $as_echo "no" >&6; }
     6898  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
     6899printf "%s\n" "$ac_ct_AR" >&6; }
     6900else
     6901  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     6902printf "%s\n" "no" >&6; }
    59966903fi
    59976904
     
    60056912    case $cross_compiling:$ac_tool_warned in
    60066913yes:)
    6007 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
    6008 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     6914{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     6915printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
    60096916ac_tool_warned=yes ;;
    60106917esac
     
    60146921
    60156922: ${AR=ar}
    6016 : ${AR_FLAGS=cru}
    6017 
    6018 
    6019 
    6020 
    6021 
    6022 
    6023 
    6024 
    6025 
    6026 
    6027 
    6028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
    6029 $as_echo_n "checking for archiver @FILE support... " >&6; }
    6030 if ${lt_cv_ar_at_file+:} false; then :
    6031   $as_echo_n "(cached) " >&6
    6032 else
    6033   lt_cv_ar_at_file=no
     6923
     6924
     6925
     6926
     6927
     6928
     6929# Use ARFLAGS variable as AR's operation code to sync the variable naming with
     6930# Automake.  If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
     6931# higher priority because thats what people were doing historically (setting
     6932# ARFLAGS for automake and AR_FLAGS for libtool).  FIXME: Make the AR_FLAGS
     6933# variable obsoleted/removed.
     6934
     6935test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
     6936lt_ar_flags=$AR_FLAGS
     6937
     6938
     6939
     6940
     6941
     6942
     6943# Make AR_FLAGS overridable by 'make ARFLAGS='.  Don't try to run-time override
     6944# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
     6945
     6946
     6947
     6948
     6949
     6950
     6951{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
     6952printf %s "checking for archiver @FILE support... " >&6; }
     6953if test ${lt_cv_ar_at_file+y}
     6954then :
     6955  printf %s "(cached) " >&6
     6956else case e in #(
     6957  e) lt_cv_ar_at_file=no
    60346958   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    60356959/* end confdefs.h.  */
    60366960
    60376961int
    6038 main ()
     6962main (void)
    60396963{
    60406964
     
    60436967}
    60446968_ACEOF
    6045 if ac_fn_c_try_compile "$LINENO"; then :
     6969if ac_fn_c_try_compile "$LINENO"
     6970then :
    60466971  echo conftest.$ac_objext > conftest.lst
    60476972      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
     
    60496974  (eval $lt_ar_try) 2>&5
    60506975  ac_status=$?
    6051   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     6976  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
    60526977  test $ac_status = 0; }
    60536978      if test 0 -eq "$ac_status"; then
     
    60576982  (eval $lt_ar_try) 2>&5
    60586983  ac_status=$?
    6059   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     6984  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
    60606985  test $ac_status = 0; }
    60616986        if test 0 -ne "$ac_status"; then
     
    60666991
    60676992fi
    6068 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    6069 
    6070 fi
    6071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
    6072 $as_echo "$lt_cv_ar_at_file" >&6; }
     6993rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
     6994   ;;
     6995esac
     6996fi
     6997{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
     6998printf "%s\n" "$lt_cv_ar_at_file" >&6; }
    60736999
    60747000if test no = "$lt_cv_ar_at_file"; then
     
    60877013  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
    60887014set dummy ${ac_tool_prefix}strip; ac_word=$2
    6089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    6090 $as_echo_n "checking for $ac_word... " >&6; }
    6091 if ${ac_cv_prog_STRIP+:} false; then :
    6092   $as_echo_n "(cached) " >&6
    6093 else
    6094   if test -n "$STRIP"; then
     7015{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     7016printf %s "checking for $ac_word... " >&6; }
     7017if test ${ac_cv_prog_STRIP+y}
     7018then :
     7019  printf %s "(cached) " >&6
     7020else case e in #(
     7021  e) if test -n "$STRIP"; then
    60957022  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
    60967023else
     
    60997026do
    61007027  IFS=$as_save_IFS
    6101   test -z "$as_dir" && as_dir=.
     7028  case $as_dir in #(((
     7029    '') as_dir=./ ;;
     7030    */) ;;
     7031    *) as_dir=$as_dir/ ;;
     7032  esac
    61027033    for ac_exec_ext in '' $ac_executable_extensions; do
    6103   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     7034  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    61047035    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
    6105     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     7036    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    61067037    break 2
    61077038  fi
     
    61107041IFS=$as_save_IFS
    61117042
    6112 fi
     7043fi ;;
     7044esac
    61137045fi
    61147046STRIP=$ac_cv_prog_STRIP
    61157047if test -n "$STRIP"; then
    6116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
    6117 $as_echo "$STRIP" >&6; }
    6118 else
    6119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    6120 $as_echo "no" >&6; }
     7048  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
     7049printf "%s\n" "$STRIP" >&6; }
     7050else
     7051  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     7052printf "%s\n" "no" >&6; }
    61217053fi
    61227054
     
    61277059  # Extract the first word of "strip", so it can be a program name with args.
    61287060set dummy strip; ac_word=$2
    6129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    6130 $as_echo_n "checking for $ac_word... " >&6; }
    6131 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
    6132   $as_echo_n "(cached) " >&6
    6133 else
    6134   if test -n "$ac_ct_STRIP"; then
     7061{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     7062printf %s "checking for $ac_word... " >&6; }
     7063if test ${ac_cv_prog_ac_ct_STRIP+y}
     7064then :
     7065  printf %s "(cached) " >&6
     7066else case e in #(
     7067  e) if test -n "$ac_ct_STRIP"; then
    61357068  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
    61367069else
     
    61397072do
    61407073  IFS=$as_save_IFS
    6141   test -z "$as_dir" && as_dir=.
     7074  case $as_dir in #(((
     7075    '') as_dir=./ ;;
     7076    */) ;;
     7077    *) as_dir=$as_dir/ ;;
     7078  esac
    61427079    for ac_exec_ext in '' $ac_executable_extensions; do
    6143   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     7080  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    61447081    ac_cv_prog_ac_ct_STRIP="strip"
    6145     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     7082    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    61467083    break 2
    61477084  fi
     
    61507087IFS=$as_save_IFS
    61517088
    6152 fi
     7089fi ;;
     7090esac
    61537091fi
    61547092ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
    61557093if test -n "$ac_ct_STRIP"; then
    6156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
    6157 $as_echo "$ac_ct_STRIP" >&6; }
    6158 else
    6159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    6160 $as_echo "no" >&6; }
     7094  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
     7095printf "%s\n" "$ac_ct_STRIP" >&6; }
     7096else
     7097  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     7098printf "%s\n" "no" >&6; }
    61617099fi
    61627100
     
    61667104    case $cross_compiling:$ac_tool_warned in
    61677105yes:)
    6168 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
    6169 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     7106{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     7107printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
    61707108ac_tool_warned=yes ;;
    61717109esac
     
    61867124  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
    61877125set dummy ${ac_tool_prefix}ranlib; ac_word=$2
    6188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    6189 $as_echo_n "checking for $ac_word... " >&6; }
    6190 if ${ac_cv_prog_RANLIB+:} false; then :
    6191   $as_echo_n "(cached) " >&6
    6192 else
    6193   if test -n "$RANLIB"; then
     7126{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     7127printf %s "checking for $ac_word... " >&6; }
     7128if test ${ac_cv_prog_RANLIB+y}
     7129then :
     7130  printf %s "(cached) " >&6
     7131else case e in #(
     7132  e) if test -n "$RANLIB"; then
    61947133  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
    61957134else
     
    61987137do
    61997138  IFS=$as_save_IFS
    6200   test -z "$as_dir" && as_dir=.
     7139  case $as_dir in #(((
     7140    '') as_dir=./ ;;
     7141    */) ;;
     7142    *) as_dir=$as_dir/ ;;
     7143  esac
    62017144    for ac_exec_ext in '' $ac_executable_extensions; do
    6202   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     7145  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    62037146    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
    6204     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     7147    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    62057148    break 2
    62067149  fi
     
    62097152IFS=$as_save_IFS
    62107153
    6211 fi
     7154fi ;;
     7155esac
    62127156fi
    62137157RANLIB=$ac_cv_prog_RANLIB
    62147158if test -n "$RANLIB"; then
    6215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
    6216 $as_echo "$RANLIB" >&6; }
    6217 else
    6218   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    6219 $as_echo "no" >&6; }
     7159  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
     7160printf "%s\n" "$RANLIB" >&6; }
     7161else
     7162  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     7163printf "%s\n" "no" >&6; }
    62207164fi
    62217165
     
    62267170  # Extract the first word of "ranlib", so it can be a program name with args.
    62277171set dummy ranlib; ac_word=$2
    6228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    6229 $as_echo_n "checking for $ac_word... " >&6; }
    6230 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
    6231   $as_echo_n "(cached) " >&6
    6232 else
    6233   if test -n "$ac_ct_RANLIB"; then
     7172{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     7173printf %s "checking for $ac_word... " >&6; }
     7174if test ${ac_cv_prog_ac_ct_RANLIB+y}
     7175then :
     7176  printf %s "(cached) " >&6
     7177else case e in #(
     7178  e) if test -n "$ac_ct_RANLIB"; then
    62347179  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
    62357180else
     
    62387183do
    62397184  IFS=$as_save_IFS
    6240   test -z "$as_dir" && as_dir=.
     7185  case $as_dir in #(((
     7186    '') as_dir=./ ;;
     7187    */) ;;
     7188    *) as_dir=$as_dir/ ;;
     7189  esac
    62417190    for ac_exec_ext in '' $ac_executable_extensions; do
    6242   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     7191  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    62437192    ac_cv_prog_ac_ct_RANLIB="ranlib"
    6244     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     7193    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    62457194    break 2
    62467195  fi
     
    62497198IFS=$as_save_IFS
    62507199
    6251 fi
     7200fi ;;
     7201esac
    62527202fi
    62537203ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
    62547204if test -n "$ac_ct_RANLIB"; then
    6255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
    6256 $as_echo "$ac_ct_RANLIB" >&6; }
    6257 else
    6258   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    6259 $as_echo "no" >&6; }
     7205  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
     7206printf "%s\n" "$ac_ct_RANLIB" >&6; }
     7207else
     7208  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     7209printf "%s\n" "no" >&6; }
    62607210fi
    62617211
     
    62657215    case $cross_compiling:$ac_tool_warned in
    62667216yes:)
    6267 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
    6268 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     7217{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     7218printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
    62697219ac_tool_warned=yes ;;
    62707220esac
     
    63557305
    63567306# Check for command to grab the raw symbol name followed by C symbol from nm.
    6357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
    6358 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
    6359 if ${lt_cv_sys_global_symbol_pipe+:} false; then :
    6360   $as_echo_n "(cached) " >&6
    6361 else
    6362 
     7307{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
     7308printf %s "checking command to parse $NM output from $compiler object... " >&6; }
     7309if test ${lt_cv_sys_global_symbol_pipe+y}
     7310then :
     7311  printf %s "(cached) " >&6
     7312else case e in #(
     7313  e)
    63637314# These are sane defaults that work on at least a few old systems.
    63647315# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
     
    64147365if test "$lt_cv_nm_interface" = "MS dumpbin"; then
    64157366  # Gets list of data symbols to import.
    6416   lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
     7367  lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
    64177368  # Adjust the below global symbol transforms to fixup imported variables.
    64187369  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
     
    64327383# Some systems (esp. on ia64) link data and code symbols differently,
    64337384# so use this general approach.
    6434 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
     7385lt_cv_sys_global_symbol_to_cdecl="$SED -n"\
    64357386$lt_cdecl_hook\
    64367387" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
     
    64387389
    64397390# Transform an extracted symbol line into symbol name and symbol address
    6440 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
     7391lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
    64417392$lt_c_name_hook\
    64427393" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
     
    64457396# Transform an extracted symbol line into symbol name with lib prefix and
    64467397# symbol address.
    6447 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
     7398lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
    64487399$lt_c_name_lib_hook\
    64497400" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
     
    64697420    # Fake it for dumpbin and say T for any non-static function,
    64707421    # D for any global variable and I for any imported variable.
    6471     # Also find C++ and __fastcall symbols from MSVC++,
     7422    # Also find C++ and __fastcall symbols from MSVC++ or ICC,
    64727423    # which start with @ or ?.
    64737424    lt_cv_sys_global_symbol_pipe="$AWK '"\
     
    64877438"     ' prfx=^$ac_symprfx"
    64887439  else
    6489     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[      ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
     7440    lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[     ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
    64907441  fi
    6491   lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
     7442  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
    64927443
    64937444  # Check to see that the pipe works correctly.
     
    65117462  (eval $ac_compile) 2>&5
    65127463  ac_status=$?
    6513   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     7464  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
    65147465  test $ac_status = 0; }; then
    65157466    # Now try to grab the symbols.
     
    65187469  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
    65197470  ac_status=$?
    6520   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     7471  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
    65217472  test $ac_status = 0; } && test -s "$nlist"; then
    65227473      # Try sorting and uniquifying the output.
     
    65877538  (eval $ac_link) 2>&5
    65887539  ac_status=$?
    6589   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     7540  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
    65907541  test $ac_status = 0; } && test -s conftest$ac_exeext; then
    65917542            pipe_works=yes
     
    66157566  fi
    66167567done
    6617 
     7568 ;;
     7569esac
    66187570fi
    66197571
     
    66227574fi
    66237575if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
    6624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
    6625 $as_echo "failed" >&6; }
    6626 else
    6627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
    6628 $as_echo "ok" >&6; }
     7576  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
     7577printf "%s\n" "failed" >&6; }
     7578else
     7579  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
     7580printf "%s\n" "ok" >&6; }
    66297581fi
    66307582
     
    66727624
    66737625
    6674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
    6675 $as_echo_n "checking for sysroot... " >&6; }
     7626{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
     7627printf %s "checking for sysroot... " >&6; }
    66767628
    66777629# Check whether --with-sysroot was given.
    6678 if test "${with_sysroot+set}" = set; then :
     7630if test ${with_sysroot+y}
     7631then :
    66797632  withval=$with_sysroot;
    6680 else
    6681   with_sysroot=no
     7633else case e in #(
     7634  e) with_sysroot=no ;;
     7635esac
    66827636fi
    66837637
     
    66917645   ;; #(
    66927646 /*)
    6693    lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
     7647   lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
    66947648   ;; #(
    66957649 no|'')
    66967650   ;; #(
    66977651 *)
    6698    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
    6699 $as_echo "$with_sysroot" >&6; }
     7652   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
     7653printf "%s\n" "$with_sysroot" >&6; }
    67007654   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
    67017655   ;;
    67027656esac
    67037657
    6704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
    6705 $as_echo "${lt_sysroot:-no}" >&6; }
    6706 
    6707 
    6708 
    6709 
    6710 
    6711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
    6712 $as_echo_n "checking for a working dd... " >&6; }
    6713 if ${ac_cv_path_lt_DD+:} false; then :
    6714   $as_echo_n "(cached) " >&6
    6715 else
    6716   printf 0123456789abcdef0123456789abcdef >conftest.i
     7658 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
     7659printf "%s\n" "${lt_sysroot:-no}" >&6; }
     7660
     7661
     7662
     7663
     7664
     7665{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
     7666printf %s "checking for a working dd... " >&6; }
     7667if test ${ac_cv_path_lt_DD+y}
     7668then :
     7669  printf %s "(cached) " >&6
     7670else case e in #(
     7671  e) printf 0123456789abcdef0123456789abcdef >conftest.i
    67177672cat conftest.i conftest.i >conftest2.i
    67187673: ${lt_DD:=$DD}
     
    67247679do
    67257680  IFS=$as_save_IFS
    6726   test -z "$as_dir" && as_dir=.
    6727     for ac_prog in dd; do
     7681  case $as_dir in #(((
     7682    '') as_dir=./ ;;
     7683    */) ;;
     7684    *) as_dir=$as_dir/ ;;
     7685  esac
     7686    for ac_prog in dd
     7687   do
    67287688    for ac_exec_ext in '' $ac_executable_extensions; do
    6729       ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
     7689      ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext"
    67307690      as_fn_executable_p "$ac_path_lt_DD" || continue
    67317691if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
     
    67457705fi
    67467706
    6747 rm -f conftest.i conftest2.i conftest.out
    6748 fi
    6749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
    6750 $as_echo "$ac_cv_path_lt_DD" >&6; }
    6751 
    6752 
    6753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
    6754 $as_echo_n "checking how to truncate binary pipes... " >&6; }
    6755 if ${lt_cv_truncate_bin+:} false; then :
    6756   $as_echo_n "(cached) " >&6
    6757 else
    6758   printf 0123456789abcdef0123456789abcdef >conftest.i
     7707rm -f conftest.i conftest2.i conftest.out ;;
     7708esac
     7709fi
     7710{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
     7711printf "%s\n" "$ac_cv_path_lt_DD" >&6; }
     7712
     7713
     7714{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
     7715printf %s "checking how to truncate binary pipes... " >&6; }
     7716if test ${lt_cv_truncate_bin+y}
     7717then :
     7718  printf %s "(cached) " >&6
     7719else case e in #(
     7720  e) printf 0123456789abcdef0123456789abcdef >conftest.i
    67597721cat conftest.i conftest.i >conftest2.i
    67607722lt_cv_truncate_bin=
     
    67647726fi
    67657727rm -f conftest.i conftest2.i conftest.out
    6766 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
    6767 fi
    6768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
    6769 $as_echo "$lt_cv_truncate_bin" >&6; }
     7728test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" ;;
     7729esac
     7730fi
     7731{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
     7732printf "%s\n" "$lt_cv_truncate_bin" >&6; }
    67707733
    67717734
     
    67907753
    67917754# Check whether --enable-libtool-lock was given.
    6792 if test "${enable_libtool_lock+set}" = set; then :
     7755if test ${enable_libtool_lock+y}
     7756then :
    67937757  enableval=$enable_libtool_lock;
    67947758fi
     
    68067770  (eval $ac_compile) 2>&5
    68077771  ac_status=$?
    6808   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     7772  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
    68097773  test $ac_status = 0; }; then
    6810     case `/usr/bin/file conftest.$ac_objext` in
     7774    case `$FILECMD conftest.$ac_objext` in
    68117775      *ELF-32*)
    68127776        HPUX_IA64_MODE=32
     
    68267790  (eval $ac_compile) 2>&5
    68277791  ac_status=$?
    6828   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     7792  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
    68297793  test $ac_status = 0; }; then
    68307794    if test yes = "$lt_cv_prog_gnu_ld"; then
    6831       case `/usr/bin/file conftest.$ac_objext` in
     7795      case `$FILECMD conftest.$ac_objext` in
    68327796        *32-bit*)
    68337797          LD="${LD-ld} -melf32bsmip"
     
    68417805      esac
    68427806    else
    6843       case `/usr/bin/file conftest.$ac_objext` in
     7807      case `$FILECMD conftest.$ac_objext` in
    68447808        *32-bit*)
    68457809          LD="${LD-ld} -32"
     
    68647828  (eval $ac_compile) 2>&5
    68657829  ac_status=$?
    6866   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     7830  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
    68677831  test $ac_status = 0; }; then
    68687832    emul=elf
    6869     case `/usr/bin/file conftest.$ac_objext` in
     7833    case `$FILECMD conftest.$ac_objext` in
    68707834      *32-bit*)
    68717835        emul="${emul}32"
     
    68757839        ;;
    68767840    esac
    6877     case `/usr/bin/file conftest.$ac_objext` in
     7841    case `$FILECMD conftest.$ac_objext` in
    68787842      *MSB*)
    68797843        emul="${emul}btsmip"
     
    68837847        ;;
    68847848    esac
    6885     case `/usr/bin/file conftest.$ac_objext` in
     7849    case `$FILECMD conftest.$ac_objext` in
    68867850      *N32*)
    68877851        emul="${emul}n32"
     
    69057869  (eval $ac_compile) 2>&5
    69067870  ac_status=$?
    6907   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     7871  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
    69087872  test $ac_status = 0; }; then
    6909     case `/usr/bin/file conftest.o` in
     7873    case `$FILECMD conftest.o` in
    69107874      *32-bit*)
    69117875        case $host in
     
    69147878            ;;
    69157879          x86_64-*linux*)
    6916             case `/usr/bin/file conftest.o` in
     7880            case `$FILECMD conftest.o` in
    69177881              *x86-64*)
    69187882                LD="${LD-ld} -m elf32_x86_64"
     
    69687932  SAVE_CFLAGS=$CFLAGS
    69697933  CFLAGS="$CFLAGS -belf"
    6970   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
    6971 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
    6972 if ${lt_cv_cc_needs_belf+:} false; then :
    6973   $as_echo_n "(cached) " >&6
    6974 else
    6975   ac_ext=c
     7934  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
     7935printf %s "checking whether the C compiler needs -belf... " >&6; }
     7936if test ${lt_cv_cc_needs_belf+y}
     7937then :
     7938  printf %s "(cached) " >&6
     7939else case e in #(
     7940  e) ac_ext=c
    69767941ac_cpp='$CPP $CPPFLAGS'
    69777942ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     
    69837948
    69847949int
    6985 main ()
     7950main (void)
    69867951{
    69877952
     
    69907955}
    69917956_ACEOF
    6992 if ac_fn_c_try_link "$LINENO"; then :
     7957if ac_fn_c_try_link "$LINENO"
     7958then :
    69937959  lt_cv_cc_needs_belf=yes
    6994 else
    6995   lt_cv_cc_needs_belf=no
    6996 fi
    6997 rm -f core conftest.err conftest.$ac_objext \
     7960else case e in #(
     7961  e) lt_cv_cc_needs_belf=no ;;
     7962esac
     7963fi
     7964rm -f core conftest.err conftest.$ac_objext conftest.beam \
    69987965    conftest$ac_exeext conftest.$ac_ext
    69997966     ac_ext=c
     
    70027969ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
    70037970ac_compiler_gnu=$ac_cv_c_compiler_gnu
    7004 
    7005 fi
    7006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
    7007 $as_echo "$lt_cv_cc_needs_belf" >&6; }
     7971 ;;
     7972esac
     7973fi
     7974{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
     7975printf "%s\n" "$lt_cv_cc_needs_belf" >&6; }
    70087976  if test yes != "$lt_cv_cc_needs_belf"; then
    70097977    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
     
    70187986  (eval $ac_compile) 2>&5
    70197987  ac_status=$?
    7020   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     7988  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
    70217989  test $ac_status = 0; }; then
    7022     case `/usr/bin/file conftest.o` in
     7990    case `$FILECMD conftest.o` in
    70237991    *64-bit*)
    70247992      case $lt_cv_prog_gnu_ld in
     
    70558023  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
    70568024set dummy ${ac_tool_prefix}mt; ac_word=$2
    7057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    7058 $as_echo_n "checking for $ac_word... " >&6; }
    7059 if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
    7060   $as_echo_n "(cached) " >&6
    7061 else
    7062   if test -n "$MANIFEST_TOOL"; then
     8025{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     8026printf %s "checking for $ac_word... " >&6; }
     8027if test ${ac_cv_prog_MANIFEST_TOOL+y}
     8028then :
     8029  printf %s "(cached) " >&6
     8030else case e in #(
     8031  e) if test -n "$MANIFEST_TOOL"; then
    70638032  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
    70648033else
     
    70678036do
    70688037  IFS=$as_save_IFS
    7069   test -z "$as_dir" && as_dir=.
     8038  case $as_dir in #(((
     8039    '') as_dir=./ ;;
     8040    */) ;;
     8041    *) as_dir=$as_dir/ ;;
     8042  esac
    70708043    for ac_exec_ext in '' $ac_executable_extensions; do
    7071   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     8044  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    70728045    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
    7073     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     8046    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    70748047    break 2
    70758048  fi
     
    70788051IFS=$as_save_IFS
    70798052
    7080 fi
     8053fi ;;
     8054esac
    70818055fi
    70828056MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
    70838057if test -n "$MANIFEST_TOOL"; then
    7084   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
    7085 $as_echo "$MANIFEST_TOOL" >&6; }
    7086 else
    7087   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    7088 $as_echo "no" >&6; }
     8058  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
     8059printf "%s\n" "$MANIFEST_TOOL" >&6; }
     8060else
     8061  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     8062printf "%s\n" "no" >&6; }
    70898063fi
    70908064
     
    70958069  # Extract the first word of "mt", so it can be a program name with args.
    70968070set dummy mt; ac_word=$2
    7097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    7098 $as_echo_n "checking for $ac_word... " >&6; }
    7099 if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
    7100   $as_echo_n "(cached) " >&6
    7101 else
    7102   if test -n "$ac_ct_MANIFEST_TOOL"; then
     8071{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     8072printf %s "checking for $ac_word... " >&6; }
     8073if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y}
     8074then :
     8075  printf %s "(cached) " >&6
     8076else case e in #(
     8077  e) if test -n "$ac_ct_MANIFEST_TOOL"; then
    71038078  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
    71048079else
     
    71078082do
    71088083  IFS=$as_save_IFS
    7109   test -z "$as_dir" && as_dir=.
     8084  case $as_dir in #(((
     8085    '') as_dir=./ ;;
     8086    */) ;;
     8087    *) as_dir=$as_dir/ ;;
     8088  esac
    71108089    for ac_exec_ext in '' $ac_executable_extensions; do
    7111   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     8090  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    71128091    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
    7113     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     8092    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    71148093    break 2
    71158094  fi
     
    71188097IFS=$as_save_IFS
    71198098
    7120 fi
     8099fi ;;
     8100esac
    71218101fi
    71228102ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
    71238103if test -n "$ac_ct_MANIFEST_TOOL"; then
    7124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
    7125 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
    7126 else
    7127   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    7128 $as_echo "no" >&6; }
     8104  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
     8105printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; }
     8106else
     8107  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     8108printf "%s\n" "no" >&6; }
    71298109fi
    71308110
     
    71348114    case $cross_compiling:$ac_tool_warned in
    71358115yes:)
    7136 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
    7137 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     8116{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     8117printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
    71388118ac_tool_warned=yes ;;
    71398119esac
     
    71458125
    71468126test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
    7147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
    7148 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
    7149 if ${lt_cv_path_mainfest_tool+:} false; then :
    7150   $as_echo_n "(cached) " >&6
    7151 else
    7152   lt_cv_path_mainfest_tool=no
     8127{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
     8128printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
     8129if test ${lt_cv_path_mainfest_tool+y}
     8130then :
     8131  printf %s "(cached) " >&6
     8132else case e in #(
     8133  e) lt_cv_path_mainfest_tool=no
    71538134  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
    71548135  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
     
    71578138    lt_cv_path_mainfest_tool=yes
    71588139  fi
    7159   rm -f conftest*
    7160 fi
    7161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
    7162 $as_echo "$lt_cv_path_mainfest_tool" >&6; }
     8140  rm -f conftest* ;;
     8141esac
     8142fi
     8143{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
     8144printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; }
    71638145if test yes != "$lt_cv_path_mainfest_tool"; then
    71648146  MANIFEST_TOOL=:
     
    71758157  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
    71768158set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
    7177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    7178 $as_echo_n "checking for $ac_word... " >&6; }
    7179 if ${ac_cv_prog_DSYMUTIL+:} false; then :
    7180   $as_echo_n "(cached) " >&6
    7181 else
    7182   if test -n "$DSYMUTIL"; then
     8159{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     8160printf %s "checking for $ac_word... " >&6; }
     8161if test ${ac_cv_prog_DSYMUTIL+y}
     8162then :
     8163  printf %s "(cached) " >&6
     8164else case e in #(
     8165  e) if test -n "$DSYMUTIL"; then
    71838166  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
    71848167else
     
    71878170do
    71888171  IFS=$as_save_IFS
    7189   test -z "$as_dir" && as_dir=.
     8172  case $as_dir in #(((
     8173    '') as_dir=./ ;;
     8174    */) ;;
     8175    *) as_dir=$as_dir/ ;;
     8176  esac
    71908177    for ac_exec_ext in '' $ac_executable_extensions; do
    7191   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     8178  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    71928179    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
    7193     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     8180    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    71948181    break 2
    71958182  fi
     
    71988185IFS=$as_save_IFS
    71998186
    7200 fi
     8187fi ;;
     8188esac
    72018189fi
    72028190DSYMUTIL=$ac_cv_prog_DSYMUTIL
    72038191if test -n "$DSYMUTIL"; then
    7204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
    7205 $as_echo "$DSYMUTIL" >&6; }
    7206 else
    7207   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    7208 $as_echo "no" >&6; }
     8192  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
     8193printf "%s\n" "$DSYMUTIL" >&6; }
     8194else
     8195  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     8196printf "%s\n" "no" >&6; }
    72098197fi
    72108198
     
    72158203  # Extract the first word of "dsymutil", so it can be a program name with args.
    72168204set dummy dsymutil; ac_word=$2
    7217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    7218 $as_echo_n "checking for $ac_word... " >&6; }
    7219 if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
    7220   $as_echo_n "(cached) " >&6
    7221 else
    7222   if test -n "$ac_ct_DSYMUTIL"; then
     8205{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     8206printf %s "checking for $ac_word... " >&6; }
     8207if test ${ac_cv_prog_ac_ct_DSYMUTIL+y}
     8208then :
     8209  printf %s "(cached) " >&6
     8210else case e in #(
     8211  e) if test -n "$ac_ct_DSYMUTIL"; then
    72238212  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
    72248213else
     
    72278216do
    72288217  IFS=$as_save_IFS
    7229   test -z "$as_dir" && as_dir=.
     8218  case $as_dir in #(((
     8219    '') as_dir=./ ;;
     8220    */) ;;
     8221    *) as_dir=$as_dir/ ;;
     8222  esac
    72308223    for ac_exec_ext in '' $ac_executable_extensions; do
    7231   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     8224  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    72328225    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
    7233     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     8226    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    72348227    break 2
    72358228  fi
     
    72388231IFS=$as_save_IFS
    72398232
    7240 fi
     8233fi ;;
     8234esac
    72418235fi
    72428236ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
    72438237if test -n "$ac_ct_DSYMUTIL"; then
    7244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
    7245 $as_echo "$ac_ct_DSYMUTIL" >&6; }
    7246 else
    7247   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    7248 $as_echo "no" >&6; }
     8238  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
     8239printf "%s\n" "$ac_ct_DSYMUTIL" >&6; }
     8240else
     8241  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     8242printf "%s\n" "no" >&6; }
    72498243fi
    72508244
     
    72548248    case $cross_compiling:$ac_tool_warned in
    72558249yes:)
    7256 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
    7257 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     8250{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     8251printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
    72588252ac_tool_warned=yes ;;
    72598253esac
     
    72678261  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
    72688262set dummy ${ac_tool_prefix}nmedit; ac_word=$2
    7269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    7270 $as_echo_n "checking for $ac_word... " >&6; }
    7271 if ${ac_cv_prog_NMEDIT+:} false; then :
    7272   $as_echo_n "(cached) " >&6
    7273 else
    7274   if test -n "$NMEDIT"; then
     8263{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     8264printf %s "checking for $ac_word... " >&6; }
     8265if test ${ac_cv_prog_NMEDIT+y}
     8266then :
     8267  printf %s "(cached) " >&6
     8268else case e in #(
     8269  e) if test -n "$NMEDIT"; then
    72758270  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
    72768271else
     
    72798274do
    72808275  IFS=$as_save_IFS
    7281   test -z "$as_dir" && as_dir=.
     8276  case $as_dir in #(((
     8277    '') as_dir=./ ;;
     8278    */) ;;
     8279    *) as_dir=$as_dir/ ;;
     8280  esac
    72828281    for ac_exec_ext in '' $ac_executable_extensions; do
    7283   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     8282  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    72848283    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
    7285     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     8284    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    72868285    break 2
    72878286  fi
     
    72908289IFS=$as_save_IFS
    72918290
    7292 fi
     8291fi ;;
     8292esac
    72938293fi
    72948294NMEDIT=$ac_cv_prog_NMEDIT
    72958295if test -n "$NMEDIT"; then
    7296   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
    7297 $as_echo "$NMEDIT" >&6; }
    7298 else
    7299   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    7300 $as_echo "no" >&6; }
     8296  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
     8297printf "%s\n" "$NMEDIT" >&6; }
     8298else
     8299  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     8300printf "%s\n" "no" >&6; }
    73018301fi
    73028302
     
    73078307  # Extract the first word of "nmedit", so it can be a program name with args.
    73088308set dummy nmedit; ac_word=$2
    7309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    7310 $as_echo_n "checking for $ac_word... " >&6; }
    7311 if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
    7312   $as_echo_n "(cached) " >&6
    7313 else
    7314   if test -n "$ac_ct_NMEDIT"; then
     8309{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     8310printf %s "checking for $ac_word... " >&6; }
     8311if test ${ac_cv_prog_ac_ct_NMEDIT+y}
     8312then :
     8313  printf %s "(cached) " >&6
     8314else case e in #(
     8315  e) if test -n "$ac_ct_NMEDIT"; then
    73158316  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
    73168317else
     
    73198320do
    73208321  IFS=$as_save_IFS
    7321   test -z "$as_dir" && as_dir=.
     8322  case $as_dir in #(((
     8323    '') as_dir=./ ;;
     8324    */) ;;
     8325    *) as_dir=$as_dir/ ;;
     8326  esac
    73228327    for ac_exec_ext in '' $ac_executable_extensions; do
    7323   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     8328  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    73248329    ac_cv_prog_ac_ct_NMEDIT="nmedit"
    7325     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     8330    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    73268331    break 2
    73278332  fi
     
    73308335IFS=$as_save_IFS
    73318336
    7332 fi
     8337fi ;;
     8338esac
    73338339fi
    73348340ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
    73358341if test -n "$ac_ct_NMEDIT"; then
    7336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
    7337 $as_echo "$ac_ct_NMEDIT" >&6; }
    7338 else
    7339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    7340 $as_echo "no" >&6; }
     8342  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
     8343printf "%s\n" "$ac_ct_NMEDIT" >&6; }
     8344else
     8345  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     8346printf "%s\n" "no" >&6; }
    73418347fi
    73428348
     
    73468352    case $cross_compiling:$ac_tool_warned in
    73478353yes:)
    7348 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
    7349 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     8354{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     8355printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
    73508356ac_tool_warned=yes ;;
    73518357esac
     
    73598365  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
    73608366set dummy ${ac_tool_prefix}lipo; ac_word=$2
    7361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    7362 $as_echo_n "checking for $ac_word... " >&6; }
    7363 if ${ac_cv_prog_LIPO+:} false; then :
    7364   $as_echo_n "(cached) " >&6
    7365 else
    7366   if test -n "$LIPO"; then
     8367{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     8368printf %s "checking for $ac_word... " >&6; }
     8369if test ${ac_cv_prog_LIPO+y}
     8370then :
     8371  printf %s "(cached) " >&6
     8372else case e in #(
     8373  e) if test -n "$LIPO"; then
    73678374  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
    73688375else
     
    73718378do
    73728379  IFS=$as_save_IFS
    7373   test -z "$as_dir" && as_dir=.
     8380  case $as_dir in #(((
     8381    '') as_dir=./ ;;
     8382    */) ;;
     8383    *) as_dir=$as_dir/ ;;
     8384  esac
    73748385    for ac_exec_ext in '' $ac_executable_extensions; do
    7375   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     8386  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    73768387    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
    7377     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     8388    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    73788389    break 2
    73798390  fi
     
    73828393IFS=$as_save_IFS
    73838394
    7384 fi
     8395fi ;;
     8396esac
    73858397fi
    73868398LIPO=$ac_cv_prog_LIPO
    73878399if test -n "$LIPO"; then
    7388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
    7389 $as_echo "$LIPO" >&6; }
    7390 else
    7391   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    7392 $as_echo "no" >&6; }
     8400  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
     8401printf "%s\n" "$LIPO" >&6; }
     8402else
     8403  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     8404printf "%s\n" "no" >&6; }
    73938405fi
    73948406
     
    73998411  # Extract the first word of "lipo", so it can be a program name with args.
    74008412set dummy lipo; ac_word=$2
    7401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    7402 $as_echo_n "checking for $ac_word... " >&6; }
    7403 if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
    7404   $as_echo_n "(cached) " >&6
    7405 else
    7406   if test -n "$ac_ct_LIPO"; then
     8413{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     8414printf %s "checking for $ac_word... " >&6; }
     8415if test ${ac_cv_prog_ac_ct_LIPO+y}
     8416then :
     8417  printf %s "(cached) " >&6
     8418else case e in #(
     8419  e) if test -n "$ac_ct_LIPO"; then
    74078420  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
    74088421else
     
    74118424do
    74128425  IFS=$as_save_IFS
    7413   test -z "$as_dir" && as_dir=.
     8426  case $as_dir in #(((
     8427    '') as_dir=./ ;;
     8428    */) ;;
     8429    *) as_dir=$as_dir/ ;;
     8430  esac
    74148431    for ac_exec_ext in '' $ac_executable_extensions; do
    7415   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     8432  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    74168433    ac_cv_prog_ac_ct_LIPO="lipo"
    7417     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     8434    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    74188435    break 2
    74198436  fi
     
    74228439IFS=$as_save_IFS
    74238440
    7424 fi
     8441fi ;;
     8442esac
    74258443fi
    74268444ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
    74278445if test -n "$ac_ct_LIPO"; then
    7428   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
    7429 $as_echo "$ac_ct_LIPO" >&6; }
    7430 else
    7431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    7432 $as_echo "no" >&6; }
     8446  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
     8447printf "%s\n" "$ac_ct_LIPO" >&6; }
     8448else
     8449  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     8450printf "%s\n" "no" >&6; }
    74338451fi
    74348452
     
    74388456    case $cross_compiling:$ac_tool_warned in
    74398457yes:)
    7440 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
    7441 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     8458{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     8459printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
    74428460ac_tool_warned=yes ;;
    74438461esac
     
    74518469  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
    74528470set dummy ${ac_tool_prefix}otool; ac_word=$2
    7453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    7454 $as_echo_n "checking for $ac_word... " >&6; }
    7455 if ${ac_cv_prog_OTOOL+:} false; then :
    7456   $as_echo_n "(cached) " >&6
    7457 else
    7458   if test -n "$OTOOL"; then
     8471{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     8472printf %s "checking for $ac_word... " >&6; }
     8473if test ${ac_cv_prog_OTOOL+y}
     8474then :
     8475  printf %s "(cached) " >&6
     8476else case e in #(
     8477  e) if test -n "$OTOOL"; then
    74598478  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
    74608479else
     
    74638482do
    74648483  IFS=$as_save_IFS
    7465   test -z "$as_dir" && as_dir=.
     8484  case $as_dir in #(((
     8485    '') as_dir=./ ;;
     8486    */) ;;
     8487    *) as_dir=$as_dir/ ;;
     8488  esac
    74668489    for ac_exec_ext in '' $ac_executable_extensions; do
    7467   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     8490  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    74688491    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
    7469     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     8492    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    74708493    break 2
    74718494  fi
     
    74748497IFS=$as_save_IFS
    74758498
    7476 fi
     8499fi ;;
     8500esac
    74778501fi
    74788502OTOOL=$ac_cv_prog_OTOOL
    74798503if test -n "$OTOOL"; then
    7480   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
    7481 $as_echo "$OTOOL" >&6; }
    7482 else
    7483   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    7484 $as_echo "no" >&6; }
     8504  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
     8505printf "%s\n" "$OTOOL" >&6; }
     8506else
     8507  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     8508printf "%s\n" "no" >&6; }
    74858509fi
    74868510
     
    74918515  # Extract the first word of "otool", so it can be a program name with args.
    74928516set dummy otool; ac_word=$2
    7493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    7494 $as_echo_n "checking for $ac_word... " >&6; }
    7495 if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
    7496   $as_echo_n "(cached) " >&6
    7497 else
    7498   if test -n "$ac_ct_OTOOL"; then
     8517{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     8518printf %s "checking for $ac_word... " >&6; }
     8519if test ${ac_cv_prog_ac_ct_OTOOL+y}
     8520then :
     8521  printf %s "(cached) " >&6
     8522else case e in #(
     8523  e) if test -n "$ac_ct_OTOOL"; then
    74998524  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
    75008525else
     
    75038528do
    75048529  IFS=$as_save_IFS
    7505   test -z "$as_dir" && as_dir=.
     8530  case $as_dir in #(((
     8531    '') as_dir=./ ;;
     8532    */) ;;
     8533    *) as_dir=$as_dir/ ;;
     8534  esac
    75068535    for ac_exec_ext in '' $ac_executable_extensions; do
    7507   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     8536  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    75088537    ac_cv_prog_ac_ct_OTOOL="otool"
    7509     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     8538    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    75108539    break 2
    75118540  fi
     
    75148543IFS=$as_save_IFS
    75158544
    7516 fi
     8545fi ;;
     8546esac
    75178547fi
    75188548ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
    75198549if test -n "$ac_ct_OTOOL"; then
    7520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
    7521 $as_echo "$ac_ct_OTOOL" >&6; }
    7522 else
    7523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    7524 $as_echo "no" >&6; }
     8550  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
     8551printf "%s\n" "$ac_ct_OTOOL" >&6; }
     8552else
     8553  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     8554printf "%s\n" "no" >&6; }
    75258555fi
    75268556
     
    75308560    case $cross_compiling:$ac_tool_warned in
    75318561yes:)
    7532 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
    7533 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     8562{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     8563printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
    75348564ac_tool_warned=yes ;;
    75358565esac
     
    75438573  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
    75448574set dummy ${ac_tool_prefix}otool64; ac_word=$2
    7545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    7546 $as_echo_n "checking for $ac_word... " >&6; }
    7547 if ${ac_cv_prog_OTOOL64+:} false; then :
    7548   $as_echo_n "(cached) " >&6
    7549 else
    7550   if test -n "$OTOOL64"; then
     8575{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     8576printf %s "checking for $ac_word... " >&6; }
     8577if test ${ac_cv_prog_OTOOL64+y}
     8578then :
     8579  printf %s "(cached) " >&6
     8580else case e in #(
     8581  e) if test -n "$OTOOL64"; then
    75518582  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
    75528583else
     
    75558586do
    75568587  IFS=$as_save_IFS
    7557   test -z "$as_dir" && as_dir=.
     8588  case $as_dir in #(((
     8589    '') as_dir=./ ;;
     8590    */) ;;
     8591    *) as_dir=$as_dir/ ;;
     8592  esac
    75588593    for ac_exec_ext in '' $ac_executable_extensions; do
    7559   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     8594  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    75608595    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
    7561     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     8596    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    75628597    break 2
    75638598  fi
     
    75668601IFS=$as_save_IFS
    75678602
    7568 fi
     8603fi ;;
     8604esac
    75698605fi
    75708606OTOOL64=$ac_cv_prog_OTOOL64
    75718607if test -n "$OTOOL64"; then
    7572   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
    7573 $as_echo "$OTOOL64" >&6; }
    7574 else
    7575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    7576 $as_echo "no" >&6; }
     8608  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
     8609printf "%s\n" "$OTOOL64" >&6; }
     8610else
     8611  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     8612printf "%s\n" "no" >&6; }
    75778613fi
    75788614
     
    75838619  # Extract the first word of "otool64", so it can be a program name with args.
    75848620set dummy otool64; ac_word=$2
    7585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    7586 $as_echo_n "checking for $ac_word... " >&6; }
    7587 if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
    7588   $as_echo_n "(cached) " >&6
    7589 else
    7590   if test -n "$ac_ct_OTOOL64"; then
     8621{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     8622printf %s "checking for $ac_word... " >&6; }
     8623if test ${ac_cv_prog_ac_ct_OTOOL64+y}
     8624then :
     8625  printf %s "(cached) " >&6
     8626else case e in #(
     8627  e) if test -n "$ac_ct_OTOOL64"; then
    75918628  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
    75928629else
     
    75958632do
    75968633  IFS=$as_save_IFS
    7597   test -z "$as_dir" && as_dir=.
     8634  case $as_dir in #(((
     8635    '') as_dir=./ ;;
     8636    */) ;;
     8637    *) as_dir=$as_dir/ ;;
     8638  esac
    75988639    for ac_exec_ext in '' $ac_executable_extensions; do
    7599   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     8640  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    76008641    ac_cv_prog_ac_ct_OTOOL64="otool64"
    7601     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     8642    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    76028643    break 2
    76038644  fi
     
    76068647IFS=$as_save_IFS
    76078648
    7608 fi
     8649fi ;;
     8650esac
    76098651fi
    76108652ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
    76118653if test -n "$ac_ct_OTOOL64"; then
    7612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
    7613 $as_echo "$ac_ct_OTOOL64" >&6; }
    7614 else
    7615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    7616 $as_echo "no" >&6; }
     8654  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
     8655printf "%s\n" "$ac_ct_OTOOL64" >&6; }
     8656else
     8657  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     8658printf "%s\n" "no" >&6; }
    76178659fi
    76188660
     
    76228664    case $cross_compiling:$ac_tool_warned in
    76238665yes:)
    7624 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
    7625 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     8666{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     8667printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
    76268668ac_tool_warned=yes ;;
    76278669esac
     
    76588700
    76598701
    7660     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
    7661 $as_echo_n "checking for -single_module linker flag... " >&6; }
    7662 if ${lt_cv_apple_cc_single_mod+:} false; then :
    7663   $as_echo_n "(cached) " >&6
    7664 else
    7665   lt_cv_apple_cc_single_mod=no
     8702    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
     8703printf %s "checking for -single_module linker flag... " >&6; }
     8704if test ${lt_cv_apple_cc_single_mod+y}
     8705then :
     8706  printf %s "(cached) " >&6
     8707else case e in #(
     8708  e) lt_cv_apple_cc_single_mod=no
    76668709      if test -z "$LT_MULTI_MODULE"; then
    76678710        # By default we will add the -single_module flag. You can override
     
    76898732        rm -rf libconftest.dylib*
    76908733        rm -f conftest.*
    7691       fi
    7692 fi
    7693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
    7694 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
    7695 
    7696     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
    7697 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
    7698 if ${lt_cv_ld_exported_symbols_list+:} false; then :
    7699   $as_echo_n "(cached) " >&6
    7700 else
    7701   lt_cv_ld_exported_symbols_list=no
     8734      fi ;;
     8735esac
     8736fi
     8737{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
     8738printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; }
     8739
     8740    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
     8741printf %s "checking for -exported_symbols_list linker flag... " >&6; }
     8742if test ${lt_cv_ld_exported_symbols_list+y}
     8743then :
     8744  printf %s "(cached) " >&6
     8745else case e in #(
     8746  e) lt_cv_ld_exported_symbols_list=no
    77028747      save_LDFLAGS=$LDFLAGS
    77038748      echo "_main" > conftest.sym
     
    77078752
    77088753int
    7709 main ()
     8754main (void)
    77108755{
    77118756
     
    77148759}
    77158760_ACEOF
    7716 if ac_fn_c_try_link "$LINENO"; then :
     8761if ac_fn_c_try_link "$LINENO"
     8762then :
    77178763  lt_cv_ld_exported_symbols_list=yes
    7718 else
    7719   lt_cv_ld_exported_symbols_list=no
    7720 fi
    7721 rm -f core conftest.err conftest.$ac_objext \
     8764else case e in #(
     8765  e) lt_cv_ld_exported_symbols_list=no ;;
     8766esac
     8767fi
     8768rm -f core conftest.err conftest.$ac_objext conftest.beam \
    77228769    conftest$ac_exeext conftest.$ac_ext
    77238770        LDFLAGS=$save_LDFLAGS
    7724 
    7725 fi
    7726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
    7727 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
    7728 
    7729     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
    7730 $as_echo_n "checking for -force_load linker flag... " >&6; }
    7731 if ${lt_cv_ld_force_load+:} false; then :
    7732   $as_echo_n "(cached) " >&6
    7733 else
    7734   lt_cv_ld_force_load=no
     8771     ;;
     8772esac
     8773fi
     8774{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
     8775printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; }
     8776
     8777    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
     8778printf %s "checking for -force_load linker flag... " >&6; }
     8779if test ${lt_cv_ld_force_load+y}
     8780then :
     8781  printf %s "(cached) " >&6
     8782else case e in #(
     8783  e) lt_cv_ld_force_load=no
    77358784      cat > conftest.c << _LT_EOF
    77368785int forced_loaded() { return 2;}
     
    77388787      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
    77398788      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
    7740       echo "$AR cru libconftest.a conftest.o" >&5
    7741       $AR cru libconftest.a conftest.o 2>&5
     8789      echo "$AR $AR_FLAGS libconftest.a conftest.o" >&5
     8790      $AR $AR_FLAGS libconftest.a conftest.o 2>&5
    77428791      echo "$RANLIB libconftest.a" >&5
    77438792      $RANLIB libconftest.a 2>&5
     
    77578806        rm -f conftest.err libconftest.a conftest conftest.c
    77588807        rm -rf conftest.dSYM
    7759 
    7760 fi
    7761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
    7762 $as_echo "$lt_cv_ld_force_load" >&6; }
     8808     ;;
     8809esac
     8810fi
     8811{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
     8812printf "%s\n" "$lt_cv_ld_force_load" >&6; }
    77638813    case $host_os in
    77648814    rhapsody* | darwin1.[012])
     
    77668816    darwin1.*)
    77678817      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
    7768     darwin*) # darwin 5.x on
    7769       # if running on 10.5 or later, the deployment target defaults
    7770       # to the OS version, if on x86, and 10.4, the deployment
    7771       # target defaults to 10.4. Don't you love it?
    7772       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
    7773         10.0,*86*-darwin8*|10.0,*-darwin[91]*)
    7774           _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
    7775         10.[012][,.]*)
    7776           _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
    7777         10.*)
    7778           _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
     8818    darwin*)
     8819      case $MACOSX_DEPLOYMENT_TARGET,$host in
     8820        10.[012],*|,*powerpc*-darwin[5-8]*)
     8821          _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
     8822        *)
     8823          _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
    77798824      esac
    77808825    ;;
     
    78318876}
    78328877
    7833 
    7834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
    7835 $as_echo_n "checking for ANSI C header files... " >&6; }
    7836 if ${ac_cv_header_stdc+:} false; then :
    7837   $as_echo_n "(cached) " >&6
    7838 else
    7839   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    7840 /* end confdefs.h.  */
    7841 #include <stdlib.h>
    7842 #include <stdarg.h>
    7843 #include <string.h>
    7844 #include <float.h>
    7845 
    7846 int
    7847 main ()
    7848 {
    7849 
    7850   ;
    7851   return 0;
    7852 }
    7853 _ACEOF
    7854 if ac_fn_c_try_compile "$LINENO"; then :
    7855   ac_cv_header_stdc=yes
    7856 else
    7857   ac_cv_header_stdc=no
    7858 fi
    7859 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    7860 
    7861 if test $ac_cv_header_stdc = yes; then
    7862   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
    7863   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    7864 /* end confdefs.h.  */
    7865 #include <string.h>
    7866 
    7867 _ACEOF
    7868 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
    7869   $EGREP "memchr" >/dev/null 2>&1; then :
    7870 
    7871 else
    7872   ac_cv_header_stdc=no
    7873 fi
    7874 rm -f conftest*
    7875 
    7876 fi
    7877 
    7878 if test $ac_cv_header_stdc = yes; then
    7879   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
    7880   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    7881 /* end confdefs.h.  */
    7882 #include <stdlib.h>
    7883 
    7884 _ACEOF
    7885 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
    7886   $EGREP "free" >/dev/null 2>&1; then :
    7887 
    7888 else
    7889   ac_cv_header_stdc=no
    7890 fi
    7891 rm -f conftest*
    7892 
    7893 fi
    7894 
    7895 if test $ac_cv_header_stdc = yes; then
    7896   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
    7897   if test "$cross_compiling" = yes; then :
    7898   :
    7899 else
    7900   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    7901 /* end confdefs.h.  */
    7902 #include <ctype.h>
    7903 #include <stdlib.h>
    7904 #if ((' ' & 0x0FF) == 0x020)
    7905 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
    7906 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
    7907 #else
    7908 # define ISLOWER(c) \
    7909                    (('a' <= (c) && (c) <= 'i') \
    7910                      || ('j' <= (c) && (c) <= 'r') \
    7911                      || ('s' <= (c) && (c) <= 'z'))
    7912 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
    7913 #endif
    7914 
    7915 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
    7916 int
    7917 main ()
    7918 {
    7919   int i;
    7920   for (i = 0; i < 256; i++)
    7921     if (XOR (islower (i), ISLOWER (i))
    7922         || toupper (i) != TOUPPER (i))
    7923       return 2;
    7924   return 0;
    7925 }
    7926 _ACEOF
    7927 if ac_fn_c_try_run "$LINENO"; then :
    7928 
    7929 else
    7930   ac_cv_header_stdc=no
    7931 fi
    7932 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
    7933   conftest.$ac_objext conftest.beam conftest.$ac_ext
    7934 fi
    7935 
    7936 fi
    7937 fi
    7938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
    7939 $as_echo "$ac_cv_header_stdc" >&6; }
    7940 if test $ac_cv_header_stdc = yes; then
    7941 
    7942 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
    7943 
    7944 fi
    7945 
    7946 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
    7947 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
    7948                   inttypes.h stdint.h unistd.h
    7949 do :
    7950   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
    7951 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
     8878ac_header= ac_cache=
     8879for ac_item in $ac_header_c_list
     8880do
     8881  if test $ac_cache; then
     8882    ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
     8883    if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
     8884      printf "%s\n" "#define $ac_item 1" >> confdefs.h
     8885    fi
     8886    ac_header= ac_cache=
     8887  elif test $ac_header; then
     8888    ac_cache=$ac_item
     8889  else
     8890    ac_header=$ac_item
     8891  fi
     8892done
     8893
     8894
     8895
     8896
     8897
     8898
     8899
     8900
     8901if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
     8902then :
     8903
     8904printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
     8905
     8906fi
     8907ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
    79528908"
    7953 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
    7954   cat >>confdefs.h <<_ACEOF
    7955 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
    7956 _ACEOF
    7957 
    7958 fi
    7959 
    7960 done
    7961 
    7962 
    7963 for ac_header in dlfcn.h
    7964 do :
    7965   ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
    7966 "
    7967 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
    7968   cat >>confdefs.h <<_ACEOF
    7969 #define HAVE_DLFCN_H 1
    7970 _ACEOF
    7971 
    7972 fi
    7973 
    7974 done
     8909if test "x$ac_cv_header_dlfcn_h" = xyes
     8910then :
     8911  printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
     8912
     8913fi
    79758914
    79768915
     
    79868925  # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
    79878926set dummy ${ac_tool_prefix}as; ac_word=$2
    7988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    7989 $as_echo_n "checking for $ac_word... " >&6; }
    7990 if ${ac_cv_prog_AS+:} false; then :
    7991   $as_echo_n "(cached) " >&6
    7992 else
    7993   if test -n "$AS"; then
     8927{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     8928printf %s "checking for $ac_word... " >&6; }
     8929if test ${ac_cv_prog_AS+y}
     8930then :
     8931  printf %s "(cached) " >&6
     8932else case e in #(
     8933  e) if test -n "$AS"; then
    79948934  ac_cv_prog_AS="$AS" # Let the user override the test.
    79958935else
     
    79988938do
    79998939  IFS=$as_save_IFS
    8000   test -z "$as_dir" && as_dir=.
     8940  case $as_dir in #(((
     8941    '') as_dir=./ ;;
     8942    */) ;;
     8943    *) as_dir=$as_dir/ ;;
     8944  esac
    80018945    for ac_exec_ext in '' $ac_executable_extensions; do
    8002   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     8946  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    80038947    ac_cv_prog_AS="${ac_tool_prefix}as"
    8004     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     8948    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    80058949    break 2
    80068950  fi
     
    80098953IFS=$as_save_IFS
    80108954
    8011 fi
     8955fi ;;
     8956esac
    80128957fi
    80138958AS=$ac_cv_prog_AS
    80148959if test -n "$AS"; then
    8015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
    8016 $as_echo "$AS" >&6; }
    8017 else
    8018   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    8019 $as_echo "no" >&6; }
     8960  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
     8961printf "%s\n" "$AS" >&6; }
     8962else
     8963  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     8964printf "%s\n" "no" >&6; }
    80208965fi
    80218966
     
    80268971  # Extract the first word of "as", so it can be a program name with args.
    80278972set dummy as; ac_word=$2
    8028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    8029 $as_echo_n "checking for $ac_word... " >&6; }
    8030 if ${ac_cv_prog_ac_ct_AS+:} false; then :
    8031   $as_echo_n "(cached) " >&6
    8032 else
    8033   if test -n "$ac_ct_AS"; then
     8973{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     8974printf %s "checking for $ac_word... " >&6; }
     8975if test ${ac_cv_prog_ac_ct_AS+y}
     8976then :
     8977  printf %s "(cached) " >&6
     8978else case e in #(
     8979  e) if test -n "$ac_ct_AS"; then
    80348980  ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
    80358981else
     
    80388984do
    80398985  IFS=$as_save_IFS
    8040   test -z "$as_dir" && as_dir=.
     8986  case $as_dir in #(((
     8987    '') as_dir=./ ;;
     8988    */) ;;
     8989    *) as_dir=$as_dir/ ;;
     8990  esac
    80418991    for ac_exec_ext in '' $ac_executable_extensions; do
    8042   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     8992  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    80438993    ac_cv_prog_ac_ct_AS="as"
    8044     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     8994    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    80458995    break 2
    80468996  fi
     
    80498999IFS=$as_save_IFS
    80509000
    8051 fi
     9001fi ;;
     9002esac
    80529003fi
    80539004ac_ct_AS=$ac_cv_prog_ac_ct_AS
    80549005if test -n "$ac_ct_AS"; then
    8055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
    8056 $as_echo "$ac_ct_AS" >&6; }
    8057 else
    8058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    8059 $as_echo "no" >&6; }
     9006  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
     9007printf "%s\n" "$ac_ct_AS" >&6; }
     9008else
     9009  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     9010printf "%s\n" "no" >&6; }
    80609011fi
    80619012
     
    80659016    case $cross_compiling:$ac_tool_warned in
    80669017yes:)
    8067 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
    8068 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     9018{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     9019printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
    80699020ac_tool_warned=yes ;;
    80709021esac
     
    80789029  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
    80799030set dummy ${ac_tool_prefix}dlltool; ac_word=$2
    8080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    8081 $as_echo_n "checking for $ac_word... " >&6; }
    8082 if ${ac_cv_prog_DLLTOOL+:} false; then :
    8083   $as_echo_n "(cached) " >&6
    8084 else
    8085   if test -n "$DLLTOOL"; then
     9031{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     9032printf %s "checking for $ac_word... " >&6; }
     9033if test ${ac_cv_prog_DLLTOOL+y}
     9034then :
     9035  printf %s "(cached) " >&6
     9036else case e in #(
     9037  e) if test -n "$DLLTOOL"; then
    80869038  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
    80879039else
     
    80909042do
    80919043  IFS=$as_save_IFS
    8092   test -z "$as_dir" && as_dir=.
     9044  case $as_dir in #(((
     9045    '') as_dir=./ ;;
     9046    */) ;;
     9047    *) as_dir=$as_dir/ ;;
     9048  esac
    80939049    for ac_exec_ext in '' $ac_executable_extensions; do
    8094   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     9050  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    80959051    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
    8096     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     9052    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    80979053    break 2
    80989054  fi
     
    81019057IFS=$as_save_IFS
    81029058
    8103 fi
     9059fi ;;
     9060esac
    81049061fi
    81059062DLLTOOL=$ac_cv_prog_DLLTOOL
    81069063if test -n "$DLLTOOL"; then
    8107   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
    8108 $as_echo "$DLLTOOL" >&6; }
    8109 else
    8110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    8111 $as_echo "no" >&6; }
     9064  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
     9065printf "%s\n" "$DLLTOOL" >&6; }
     9066else
     9067  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     9068printf "%s\n" "no" >&6; }
    81129069fi
    81139070
     
    81189075  # Extract the first word of "dlltool", so it can be a program name with args.
    81199076set dummy dlltool; ac_word=$2
    8120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    8121 $as_echo_n "checking for $ac_word... " >&6; }
    8122 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
    8123   $as_echo_n "(cached) " >&6
    8124 else
    8125   if test -n "$ac_ct_DLLTOOL"; then
     9077{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     9078printf %s "checking for $ac_word... " >&6; }
     9079if test ${ac_cv_prog_ac_ct_DLLTOOL+y}
     9080then :
     9081  printf %s "(cached) " >&6
     9082else case e in #(
     9083  e) if test -n "$ac_ct_DLLTOOL"; then
    81269084  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
    81279085else
     
    81309088do
    81319089  IFS=$as_save_IFS
    8132   test -z "$as_dir" && as_dir=.
     9090  case $as_dir in #(((
     9091    '') as_dir=./ ;;
     9092    */) ;;
     9093    *) as_dir=$as_dir/ ;;
     9094  esac
    81339095    for ac_exec_ext in '' $ac_executable_extensions; do
    8134   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     9096  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    81359097    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
    8136     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     9098    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    81379099    break 2
    81389100  fi
     
    81419103IFS=$as_save_IFS
    81429104
    8143 fi
     9105fi ;;
     9106esac
    81449107fi
    81459108ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
    81469109if test -n "$ac_ct_DLLTOOL"; then
    8147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
    8148 $as_echo "$ac_ct_DLLTOOL" >&6; }
    8149 else
    8150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    8151 $as_echo "no" >&6; }
     9110  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
     9111printf "%s\n" "$ac_ct_DLLTOOL" >&6; }
     9112else
     9113  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     9114printf "%s\n" "no" >&6; }
    81529115fi
    81539116
     
    81579120    case $cross_compiling:$ac_tool_warned in
    81589121yes:)
    8159 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
    8160 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     9122{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     9123printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
    81619124ac_tool_warned=yes ;;
    81629125esac
     
    81709133  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
    81719134set dummy ${ac_tool_prefix}objdump; ac_word=$2
    8172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    8173 $as_echo_n "checking for $ac_word... " >&6; }
    8174 if ${ac_cv_prog_OBJDUMP+:} false; then :
    8175   $as_echo_n "(cached) " >&6
    8176 else
    8177   if test -n "$OBJDUMP"; then
     9135{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     9136printf %s "checking for $ac_word... " >&6; }
     9137if test ${ac_cv_prog_OBJDUMP+y}
     9138then :
     9139  printf %s "(cached) " >&6
     9140else case e in #(
     9141  e) if test -n "$OBJDUMP"; then
    81789142  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
    81799143else
     
    81829146do
    81839147  IFS=$as_save_IFS
    8184   test -z "$as_dir" && as_dir=.
     9148  case $as_dir in #(((
     9149    '') as_dir=./ ;;
     9150    */) ;;
     9151    *) as_dir=$as_dir/ ;;
     9152  esac
    81859153    for ac_exec_ext in '' $ac_executable_extensions; do
    8186   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     9154  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    81879155    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
    8188     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     9156    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    81899157    break 2
    81909158  fi
     
    81939161IFS=$as_save_IFS
    81949162
    8195 fi
     9163fi ;;
     9164esac
    81969165fi
    81979166OBJDUMP=$ac_cv_prog_OBJDUMP
    81989167if test -n "$OBJDUMP"; then
    8199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
    8200 $as_echo "$OBJDUMP" >&6; }
    8201 else
    8202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    8203 $as_echo "no" >&6; }
     9168  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
     9169printf "%s\n" "$OBJDUMP" >&6; }
     9170else
     9171  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     9172printf "%s\n" "no" >&6; }
    82049173fi
    82059174
     
    82109179  # Extract the first word of "objdump", so it can be a program name with args.
    82119180set dummy objdump; ac_word=$2
    8212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    8213 $as_echo_n "checking for $ac_word... " >&6; }
    8214 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
    8215   $as_echo_n "(cached) " >&6
    8216 else
    8217   if test -n "$ac_ct_OBJDUMP"; then
     9181{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     9182printf %s "checking for $ac_word... " >&6; }
     9183if test ${ac_cv_prog_ac_ct_OBJDUMP+y}
     9184then :
     9185  printf %s "(cached) " >&6
     9186else case e in #(
     9187  e) if test -n "$ac_ct_OBJDUMP"; then
    82189188  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
    82199189else
     
    82229192do
    82239193  IFS=$as_save_IFS
    8224   test -z "$as_dir" && as_dir=.
     9194  case $as_dir in #(((
     9195    '') as_dir=./ ;;
     9196    */) ;;
     9197    *) as_dir=$as_dir/ ;;
     9198  esac
    82259199    for ac_exec_ext in '' $ac_executable_extensions; do
    8226   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     9200  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    82279201    ac_cv_prog_ac_ct_OBJDUMP="objdump"
    8228     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     9202    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    82299203    break 2
    82309204  fi
     
    82339207IFS=$as_save_IFS
    82349208
    8235 fi
     9209fi ;;
     9210esac
    82369211fi
    82379212ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
    82389213if test -n "$ac_ct_OBJDUMP"; then
    8239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
    8240 $as_echo "$ac_ct_OBJDUMP" >&6; }
    8241 else
    8242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    8243 $as_echo "no" >&6; }
     9214  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
     9215printf "%s\n" "$ac_ct_OBJDUMP" >&6; }
     9216else
     9217  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     9218printf "%s\n" "no" >&6; }
    82449219fi
    82459220
     
    82499224    case $cross_compiling:$ac_tool_warned in
    82509225yes:)
    8251 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
    8252 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     9226{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     9227printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
    82539228ac_tool_warned=yes ;;
    82549229esac
     
    82879262
    82889263            # Check whether --enable-shared was given.
    8289 if test "${enable_shared+set}" = set; then :
     9264if test ${enable_shared+y}
     9265then :
    82909266  enableval=$enable_shared; p=${PACKAGE-default}
    82919267    case $enableval in
     
    83059281      ;;
    83069282    esac
    8307 else
    8308   enable_shared=yes
     9283else case e in #(
     9284  e) enable_shared=yes ;;
     9285esac
    83099286fi
    83109287
     
    83189295
    83199296  # Check whether --enable-static was given.
    8320 if test "${enable_static+set}" = set; then :
     9297if test ${enable_static+y}
     9298then :
    83219299  enableval=$enable_static; p=${PACKAGE-default}
    83229300    case $enableval in
     
    83369314      ;;
    83379315    esac
    8338 else
    8339   enable_static=yes
     9316else case e in #(
     9317  e) enable_static=yes ;;
     9318esac
    83409319fi
    83419320
     
    83509329
    83519330# Check whether --with-pic was given.
    8352 if test "${with_pic+set}" = set; then :
     9331if test ${with_pic+y}
     9332then :
    83539333  withval=$with_pic; lt_p=${PACKAGE-default}
    83549334    case $withval in
     
    83679347      ;;
    83689348    esac
    8369 else
    8370   pic_mode=default
     9349else case e in #(
     9350  e) pic_mode=default ;;
     9351esac
    83719352fi
    83729353
     
    83799360
    83809361  # Check whether --enable-fast-install was given.
    8381 if test "${enable_fast_install+set}" = set; then :
     9362if test ${enable_fast_install+y}
     9363then :
    83829364  enableval=$enable_fast_install; p=${PACKAGE-default}
    83839365    case $enableval in
     
    83979379      ;;
    83989380    esac
    8399 else
    8400   enable_fast_install=yes
     9381else case e in #(
     9382  e) enable_fast_install=yes ;;
     9383esac
    84019384fi
    84029385
     
    84119394case $host,$enable_shared in
    84129395power*-*-aix[5-9]*,yes)
    8413   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
    8414 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
     9396  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
     9397printf %s "checking which variant of shared library versioning to provide... " >&6; }
    84159398
    84169399# Check whether --with-aix-soname was given.
    8417 if test "${with_aix_soname+set}" = set; then :
     9400if test ${with_aix_soname+y}
     9401then :
    84189402  withval=$with_aix_soname; case $withval in
    84199403    aix|svr4|both)
     
    84249408    esac
    84259409    lt_cv_with_aix_soname=$with_aix_soname
    8426 else
    8427   if ${lt_cv_with_aix_soname+:} false; then :
    8428   $as_echo_n "(cached) " >&6
    8429 else
    8430   lt_cv_with_aix_soname=aix
    8431 fi
    8432 
    8433     with_aix_soname=$lt_cv_with_aix_soname
    8434 fi
    8435 
    8436   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
    8437 $as_echo "$with_aix_soname" >&6; }
     9410else case e in #(
     9411  e) if test ${lt_cv_with_aix_soname+y}
     9412then :
     9413  printf %s "(cached) " >&6
     9414else case e in #(
     9415  e) lt_cv_with_aix_soname=aix ;;
     9416esac
     9417fi
     9418
     9419    with_aix_soname=$lt_cv_with_aix_soname ;;
     9420esac
     9421fi
     9422
     9423  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
     9424printf "%s\n" "$with_aix_soname" >&6; }
    84389425  if test aix != "$with_aix_soname"; then
    84399426    # For the AIX way of multilib, we name the shared archive member
     
    85179504fi
    85189505
    8519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
    8520 $as_echo_n "checking for objdir... " >&6; }
    8521 if ${lt_cv_objdir+:} false; then :
    8522   $as_echo_n "(cached) " >&6
    8523 else
    8524   rm -f .libs 2>/dev/null
     9506{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
     9507printf %s "checking for objdir... " >&6; }
     9508if test ${lt_cv_objdir+y}
     9509then :
     9510  printf %s "(cached) " >&6
     9511else case e in #(
     9512  e) rm -f .libs 2>/dev/null
    85259513mkdir .libs 2>/dev/null
    85269514if test -d .libs; then
     
    85309518  lt_cv_objdir=_libs
    85319519fi
    8532 rmdir .libs 2>/dev/null
    8533 fi
    8534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
    8535 $as_echo "$lt_cv_objdir" >&6; }
     9520rmdir .libs 2>/dev/null ;;
     9521esac
     9522fi
     9523{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
     9524printf "%s\n" "$lt_cv_objdir" >&6; }
    85369525objdir=$lt_cv_objdir
    85379526
     
    85409529
    85419530
    8542 cat >>confdefs.h <<_ACEOF
    8543 #define LT_OBJDIR "$lt_cv_objdir/"
    8544 _ACEOF
     9531printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h
    85459532
    85469533
     
    85639550can_build_shared=yes
    85649551
    8565 # All known linkers require a '.a' archive for static linking (except MSVC,
    8566 # which needs '.lib').
     9552# All known linkers require a '.a' archive for static linking (except MSVC and
     9553# ICC, which need '.lib').
    85679554libext=a
    85689555
     
    85889575file_magic*)
    85899576  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
    8590     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
    8591 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
    8592 if ${lt_cv_path_MAGIC_CMD+:} false; then :
    8593   $as_echo_n "(cached) " >&6
    8594 else
    8595   case $MAGIC_CMD in
     9577    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
     9578printf %s "checking for ${ac_tool_prefix}file... " >&6; }
     9579if test ${lt_cv_path_MAGIC_CMD+y}
     9580then :
     9581  printf %s "(cached) " >&6
     9582else case e in #(
     9583  e) case $MAGIC_CMD in
    85969584[\\/*] |  ?:[\\/]*)
    85979585  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
     
    86369624  MAGIC_CMD=$lt_save_MAGIC_CMD
    86379625  ;;
     9626esac ;;
    86389627esac
    86399628fi
     
    86419630MAGIC_CMD=$lt_cv_path_MAGIC_CMD
    86429631if test -n "$MAGIC_CMD"; then
    8643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
    8644 $as_echo "$MAGIC_CMD" >&6; }
    8645 else
    8646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    8647 $as_echo "no" >&6; }
     9632  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
     9633printf "%s\n" "$MAGIC_CMD" >&6; }
     9634else
     9635  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     9636printf "%s\n" "no" >&6; }
    86489637fi
    86499638
     
    86549643if test -z "$lt_cv_path_MAGIC_CMD"; then
    86559644  if test -n "$ac_tool_prefix"; then
    8656     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
    8657 $as_echo_n "checking for file... " >&6; }
    8658 if ${lt_cv_path_MAGIC_CMD+:} false; then :
    8659   $as_echo_n "(cached) " >&6
    8660 else
    8661   case $MAGIC_CMD in
     9645    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5
     9646printf %s "checking for file... " >&6; }
     9647if test ${lt_cv_path_MAGIC_CMD+y}
     9648then :
     9649  printf %s "(cached) " >&6
     9650else case e in #(
     9651  e) case $MAGIC_CMD in
    86629652[\\/*] |  ?:[\\/]*)
    86639653  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
     
    87029692  MAGIC_CMD=$lt_save_MAGIC_CMD
    87039693  ;;
     9694esac ;;
    87049695esac
    87059696fi
     
    87079698MAGIC_CMD=$lt_cv_path_MAGIC_CMD
    87089699if test -n "$MAGIC_CMD"; then
    8709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
    8710 $as_echo "$MAGIC_CMD" >&6; }
    8711 else
    8712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    8713 $as_echo "no" >&6; }
     9700  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
     9701printf "%s\n" "$MAGIC_CMD" >&6; }
     9702else
     9703  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     9704printf "%s\n" "no" >&6; }
    87149705fi
    87159706
     
    87969787  esac
    87979788
    8798   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
    8799 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
    8800 if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
    8801   $as_echo_n "(cached) " >&6
    8802 else
    8803   lt_cv_prog_compiler_rtti_exceptions=no
     9789  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
     9790printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
     9791if test ${lt_cv_prog_compiler_rtti_exceptions+y}
     9792then :
     9793  printf %s "(cached) " >&6
     9794else case e in #(
     9795  e) lt_cv_prog_compiler_rtti_exceptions=no
    88049796   ac_outfile=conftest.$ac_objext
    88059797   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
     
    88299821   fi
    88309822   $RM conftest*
    8831 
    8832 fi
    8833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
    8834 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
     9823 ;;
     9824esac
     9825fi
     9826{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
     9827printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
    88359828
    88369829if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
     
    907310066        ;;
    907410067      *)
    9075         case `$CC -V 2>&1 | sed 5q` in
     10068        case `$CC -V 2>&1 | $SED 5q` in
    907610069        *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
    907710070          # Sun Fortran 8.3 passes all unrecognized flags to the linker
     
    918910182esac
    919010183
    9191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
    9192 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
    9193 if ${lt_cv_prog_compiler_pic+:} false; then :
    9194   $as_echo_n "(cached) " >&6
    9195 else
    9196   lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
    9197 fi
    9198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
    9199 $as_echo "$lt_cv_prog_compiler_pic" >&6; }
     10184{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
     10185printf %s "checking for $compiler option to produce PIC... " >&6; }
     10186if test ${lt_cv_prog_compiler_pic+y}
     10187then :
     10188  printf %s "(cached) " >&6
     10189else case e in #(
     10190  e) lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ;;
     10191esac
     10192fi
     10193{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
     10194printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; }
    920010195lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
    920110196
     
    920410199#
    920510200if test -n "$lt_prog_compiler_pic"; then
    9206   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
    9207 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
    9208 if ${lt_cv_prog_compiler_pic_works+:} false; then :
    9209   $as_echo_n "(cached) " >&6
    9210 else
    9211   lt_cv_prog_compiler_pic_works=no
     10201  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
     10202printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
     10203if test ${lt_cv_prog_compiler_pic_works+y}
     10204then :
     10205  printf %s "(cached) " >&6
     10206else case e in #(
     10207  e) lt_cv_prog_compiler_pic_works=no
    921210208   ac_outfile=conftest.$ac_objext
    921310209   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
     
    923710233   fi
    923810234   $RM conftest*
    9239 
    9240 fi
    9241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
    9242 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
     10235 ;;
     10236esac
     10237fi
     10238{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
     10239printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; }
    924310240
    924410241if test yes = "$lt_cv_prog_compiler_pic_works"; then
     
    926810265#
    926910266wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
    9270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
    9271 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
    9272 if ${lt_cv_prog_compiler_static_works+:} false; then :
    9273   $as_echo_n "(cached) " >&6
    9274 else
    9275   lt_cv_prog_compiler_static_works=no
     10267{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
     10268printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
     10269if test ${lt_cv_prog_compiler_static_works+y}
     10270then :
     10271  printf %s "(cached) " >&6
     10272else case e in #(
     10273  e) lt_cv_prog_compiler_static_works=no
    927610274   save_LDFLAGS=$LDFLAGS
    927710275   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
     
    929410292   $RM -r conftest*
    929510293   LDFLAGS=$save_LDFLAGS
    9296 
    9297 fi
    9298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
    9299 $as_echo "$lt_cv_prog_compiler_static_works" >&6; }
     10294 ;;
     10295esac
     10296fi
     10297{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
     10298printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; }
    930010299
    930110300if test yes = "$lt_cv_prog_compiler_static_works"; then
     
    931110310
    931210311
    9313   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
    9314 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
    9315 if ${lt_cv_prog_compiler_c_o+:} false; then :
    9316   $as_echo_n "(cached) " >&6
    9317 else
    9318   lt_cv_prog_compiler_c_o=no
     10312  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
     10313printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
     10314if test ${lt_cv_prog_compiler_c_o+y}
     10315then :
     10316  printf %s "(cached) " >&6
     10317else case e in #(
     10318  e) lt_cv_prog_compiler_c_o=no
    931910319   $RM -r conftest 2>/dev/null
    932010320   mkdir conftest
     
    935610356   $RM -r conftest
    935710357   $RM conftest*
    9358 
    9359 fi
    9360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
    9361 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
    9362 
    9363 
    9364 
    9365 
    9366 
    9367 
    9368   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
    9369 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
    9370 if ${lt_cv_prog_compiler_c_o+:} false; then :
    9371   $as_echo_n "(cached) " >&6
    9372 else
    9373   lt_cv_prog_compiler_c_o=no
     10358 ;;
     10359esac
     10360fi
     10361{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
     10362printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
     10363
     10364
     10365
     10366
     10367
     10368
     10369  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
     10370printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
     10371if test ${lt_cv_prog_compiler_c_o+y}
     10372then :
     10373  printf %s "(cached) " >&6
     10374else case e in #(
     10375  e) lt_cv_prog_compiler_c_o=no
    937410376   $RM -r conftest 2>/dev/null
    937510377   mkdir conftest
     
    941110413   $RM -r conftest
    941210414   $RM conftest*
    9413 
    9414 fi
    9415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
    9416 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
     10415 ;;
     10416esac
     10417fi
     10418{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
     10419printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
    941710420
    941810421
     
    942210425if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
    942310426  # do not overwrite the value of need_locks provided by the user
    9424   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
    9425 $as_echo_n "checking if we can lock with hard links... " >&6; }
     10427  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
     10428printf %s "checking if we can lock with hard links... " >&6; }
    942610429  hard_links=yes
    942710430  $RM conftest*
     
    943010433  ln conftest.a conftest.b 2>&5 || hard_links=no
    943110434  ln conftest.a conftest.b 2>/dev/null && hard_links=no
    9432   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
    9433 $as_echo "$hard_links" >&6; }
     10435  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
     10436printf "%s\n" "$hard_links" >&6; }
    943410437  if test no = "$hard_links"; then
    9435     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
    9436 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
     10438    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
     10439printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
    943710440    need_locks=warn
    943810441  fi
     
    944610449
    944710450
    9448   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
    9449 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
     10451  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
     10452printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
    945010453
    945110454  runpath_var=
     
    949110494  case $host_os in
    949210495  cygwin* | mingw* | pw32* | cegcc*)
    9493     # FIXME: the MSVC++ port hasn't been tested in a loooong time
     10496    # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
    949410497    # When not using gcc, we currently assume that we are using
    9495     # Microsoft Visual C++.
     10498    # Microsoft Visual C++ or Intel C++ Compiler.
    949610499    if test yes != "$GCC"; then
    949710500      with_gnu_ld=no
     
    949910502    ;;
    950010503  interix*)
    9501     # we just hope/assume this is gcc and not c89 (= MSVC++)
     10504    # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
    950210505    with_gnu_ld=yes
    950310506    ;;
     
    955110554    fi
    955210555    supports_anon_versioning=no
    9553     case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
     10556    case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
    955410557      *GNU\ gold*) supports_anon_versioning=yes ;;
    955510558      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
     
    966310666      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
    966410667      enable_shared_with_static_runtimes=yes
     10668      file_list_spec='@'
    966510669      ;;
    966610670
     
    967710681      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
    967810682      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
    9679       archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
     10683      archive_expsym_cmds='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
    968010684      ;;
    968110685
     
    972010724          ;;
    972110725        esac
    9722         case `$CC -V 2>&1 | sed 5q` in
     10726        case `$CC -V 2>&1 | $SED 5q` in
    972310727        *Sun\ C*)                       # Sun C 5.9
    972410728          whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
     
    973210736        if test yes = "$supports_anon_versioning"; then
    973310737          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
    9734             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
     10738            cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
    973510739            echo "local: *; };" >> $output_objdir/$libname.ver~
    973610740            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
     
    974810752          if test yes = "$supports_anon_versioning"; then
    974910753            archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
    9750               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
     10754              cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
    975110755              echo "local: *; };" >> $output_objdir/$libname.ver~
    975210756              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
     
    988010884          export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
    988110885        else
    9882           export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
     10886          export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
    988310887        fi
    988410888        aix_use_runtimelinking=no
     
    1000211006  aix_libpath=$lt_cv_aix_libpath
    1000311007else
    10004   if ${lt_cv_aix_libpath_+:} false; then :
    10005   $as_echo_n "(cached) " >&6
    10006 else
    10007   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     11008  if test ${lt_cv_aix_libpath_+y}
     11009then :
     11010  printf %s "(cached) " >&6
     11011else case e in #(
     11012  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    1000811013/* end confdefs.h.  */
    1000911014
    1001011015int
    10011 main ()
     11016main (void)
    1001211017{
    1001311018
     
    1001611021}
    1001711022_ACEOF
    10018 if ac_fn_c_try_link "$LINENO"; then :
     11023if ac_fn_c_try_link "$LINENO"
     11024then :
    1001911025
    1002011026  lt_aix_libpath_sed='
     
    1003111037  fi
    1003211038fi
    10033 rm -f core conftest.err conftest.$ac_objext \
     11039rm -f core conftest.err conftest.$ac_objext conftest.beam \
    1003411040    conftest$ac_exeext conftest.$ac_ext
    1003511041  if test -z "$lt_cv_aix_libpath_"; then
    1003611042    lt_cv_aix_libpath_=/usr/lib:/lib
    1003711043  fi
    10038 
     11044   ;;
     11045esac
    1003911046fi
    1004011047
     
    1005511062  aix_libpath=$lt_cv_aix_libpath
    1005611063else
    10057   if ${lt_cv_aix_libpath_+:} false; then :
    10058   $as_echo_n "(cached) " >&6
    10059 else
    10060   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     11064  if test ${lt_cv_aix_libpath_+y}
     11065then :
     11066  printf %s "(cached) " >&6
     11067else case e in #(
     11068  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    1006111069/* end confdefs.h.  */
    1006211070
    1006311071int
    10064 main ()
     11072main (void)
    1006511073{
    1006611074
     
    1006911077}
    1007011078_ACEOF
    10071 if ac_fn_c_try_link "$LINENO"; then :
     11079if ac_fn_c_try_link "$LINENO"
     11080then :
    1007211081
    1007311082  lt_aix_libpath_sed='
     
    1008411093  fi
    1008511094fi
    10086 rm -f core conftest.err conftest.$ac_objext \
     11095rm -f core conftest.err conftest.$ac_objext conftest.beam \
    1008711096    conftest$ac_exeext conftest.$ac_ext
    1008811097  if test -z "$lt_cv_aix_libpath_"; then
    1008911098    lt_cv_aix_libpath_=/usr/lib:/lib
    1009011099  fi
    10091 
     11100   ;;
     11101esac
    1009211102fi
    1009311103
     
    1014711157    cygwin* | mingw* | pw32* | cegcc*)
    1014811158      # When not using gcc, we currently assume that we are using
    10149       # Microsoft Visual C++.
     11159      # Microsoft Visual C++ or Intel C++ Compiler.
    1015011160      # hardcode_libdir_flag_spec is actually meaningless, as there is
    1015111161      # no search path for DLLs.
    1015211162      case $cc_basename in
    10153       cl*)
    10154         # Native MSVC
     11163      cl* | icl*)
     11164        # Native MSVC or ICC
    1015511165        hardcode_libdir_flag_spec=' '
    1015611166        allow_undefined_flag=unsupported
     
    1019311203        ;;
    1019411204      *)
    10195         # Assume MSVC wrapper
     11205        # Assume MSVC and ICC wrapper
    1019611206        hardcode_libdir_flag_spec=' '
    1019711207        allow_undefined_flag=unsupported
     
    1023411244    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
    1023511245    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
    10236     archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
    10237     module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
     11246    archive_expsym_cmds="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
     11247    module_expsym_cmds="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
    1023811248
    1023911249  else
     
    1026911279
    1027011280    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
    10271     freebsd* | dragonfly*)
     11281    freebsd* | dragonfly* | midnightbsd*)
    1027211282      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
    1027311283      hardcode_libdir_flag_spec='-R$libdir'
     
    1033511345          # Older versions of the 11.00 compiler do not understand -b yet
    1033611346          # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
    10337           { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
    10338 $as_echo_n "checking if $CC understands -b... " >&6; }
    10339 if ${lt_cv_prog_compiler__b+:} false; then :
    10340   $as_echo_n "(cached) " >&6
    10341 else
    10342   lt_cv_prog_compiler__b=no
     11347          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
     11348printf %s "checking if $CC understands -b... " >&6; }
     11349if test ${lt_cv_prog_compiler__b+y}
     11350then :
     11351  printf %s "(cached) " >&6
     11352else case e in #(
     11353  e) lt_cv_prog_compiler__b=no
    1034311354   save_LDFLAGS=$LDFLAGS
    1034411355   LDFLAGS="$LDFLAGS -b"
     
    1036111372   $RM -r conftest*
    1036211373   LDFLAGS=$save_LDFLAGS
    10363 
    10364 fi
    10365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
    10366 $as_echo "$lt_cv_prog_compiler__b" >&6; }
     11374 ;;
     11375esac
     11376fi
     11377{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
     11378printf "%s\n" "$lt_cv_prog_compiler__b" >&6; }
    1036711379
    1036811380if test yes = "$lt_cv_prog_compiler__b"; then
     
    1040411416        # implicitly export all symbols.
    1040511417        # This should be the same for all languages, so no per-tag cache variable.
    10406         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
    10407 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
    10408 if ${lt_cv_irix_exported_symbol+:} false; then :
    10409   $as_echo_n "(cached) " >&6
    10410 else
    10411   save_LDFLAGS=$LDFLAGS
     11418        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
     11419printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
     11420if test ${lt_cv_irix_exported_symbol+y}
     11421then :
     11422  printf %s "(cached) " >&6
     11423else case e in #(
     11424  e) save_LDFLAGS=$LDFLAGS
    1041211425           LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
    1041311426           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     
    1041511428int foo (void) { return 0; }
    1041611429_ACEOF
    10417 if ac_fn_c_try_link "$LINENO"; then :
     11430if ac_fn_c_try_link "$LINENO"
     11431then :
    1041811432  lt_cv_irix_exported_symbol=yes
    10419 else
    10420   lt_cv_irix_exported_symbol=no
    10421 fi
    10422 rm -f core conftest.err conftest.$ac_objext \
     11433else case e in #(
     11434  e) lt_cv_irix_exported_symbol=no ;;
     11435esac
     11436fi
     11437rm -f core conftest.err conftest.$ac_objext conftest.beam \
    1042311438    conftest$ac_exeext conftest.$ac_ext
    10424            LDFLAGS=$save_LDFLAGS
    10425 fi
    10426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
    10427 $as_echo "$lt_cv_irix_exported_symbol" >&6; }
     11439           LDFLAGS=$save_LDFLAGS ;;
     11440esac
     11441fi
     11442{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
     11443printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
    1042811444        if test yes = "$lt_cv_irix_exported_symbol"; then
    1042911445          archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
     
    1051711533      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
    1051811534      enable_shared_with_static_runtimes=yes
     11535      file_list_spec='@'
    1051911536      ;;
    1052011537
     
    1070511722  fi
    1070611723
    10707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
    10708 $as_echo "$ld_shlibs" >&6; }
     11724{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
     11725printf "%s\n" "$ld_shlibs" >&6; }
    1070911726test no = "$ld_shlibs" && can_build_shared=no
    1071011727
     
    1074211759      # systems, -lgcc has to come before -lc. If gcc already passes -lc
    1074311760      # to ld, don't add -lc before -lgcc.
    10744       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
    10745 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
    10746 if ${lt_cv_archive_cmds_need_lc+:} false; then :
    10747   $as_echo_n "(cached) " >&6
    10748 else
    10749   $RM conftest*
     11761      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
     11762printf %s "checking whether -lc should be explicitly linked in... " >&6; }
     11763if test ${lt_cv_archive_cmds_need_lc+y}
     11764then :
     11765  printf %s "(cached) " >&6
     11766else case e in #(
     11767  e) $RM conftest*
    1075011768        echo "$lt_simple_compile_test_code" > conftest.$ac_ext
    1075111769
     
    1075311771  (eval $ac_compile) 2>&5
    1075411772  ac_status=$?
    10755   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     11773  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
    1075611774  test $ac_status = 0; } 2>conftest.err; then
    1075711775          soname=conftest
     
    1077111789  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
    1077211790  ac_status=$?
    10773   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     11791  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
    1077411792  test $ac_status = 0; }
    1077511793          then
     
    1078311801        fi
    1078411802        $RM conftest*
    10785 
    10786 fi
    10787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
    10788 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
     11803         ;;
     11804esac
     11805fi
     11806{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
     11807printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; }
    1078911808      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
    1079011809      ;;
     
    1094511964
    1094611965
    10947   { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
    10948 $as_echo_n "checking dynamic linker characteristics... " >&6; }
     11966  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
     11967printf %s "checking dynamic linker characteristics... " >&6; }
    1094911968
    1095011969if test yes = "$GCC"; then
     
    1120812227    cygwin*)
    1120912228      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
    11210       soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
     12229      soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
    1121112230
    1121212231      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
     
    1121812237    pw32*)
    1121912238      # pw32 DLLs use 'pw' prefix rather than 'lib'
    11220       library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
     12239      library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
    1122112240      ;;
    1122212241    esac
     
    1122412243    ;;
    1122512244
    11226   *,cl*)
    11227     # Native MSVC
     12245  *,cl* | *,icl*)
     12246    # Native MSVC or ICC
    1122812247    libname_spec='$name'
    1122912248    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
     
    1124412263      IFS=$lt_save_ifs
    1124512264      # Convert to MSYS style.
    11246       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
     12265      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
    1124712266      ;;
    1124812267    cygwin*)
     
    1128112300
    1128212301  *)
    11283     # Assume MSVC wrapper
     12302    # Assume MSVC and ICC wrapper
    1128412303    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
    1128512304    dynamic_linker='Win32 ld.exe'
     
    1131412333  ;;
    1131512334
    11316 freebsd* | dragonfly*)
     12335freebsd* | dragonfly* | midnightbsd*)
    1131712336  # DragonFly does not have aout.  When/if they implement a new
    1131812337  # versioning mechanism, adjust this.
     
    1150712526
    1150812527  # Some binutils ld are patched to set DT_RUNPATH
    11509   if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
    11510   $as_echo_n "(cached) " >&6
    11511 else
    11512   lt_cv_shlibpath_overrides_runpath=no
     12528  if test ${lt_cv_shlibpath_overrides_runpath+y}
     12529then :
     12530  printf %s "(cached) " >&6
     12531else case e in #(
     12532  e) lt_cv_shlibpath_overrides_runpath=no
    1151312533    save_LDFLAGS=$LDFLAGS
    1151412534    save_libdir=$libdir
     
    1151912539
    1152012540int
    11521 main ()
     12541main (void)
    1152212542{
    1152312543
     
    1152612546}
    1152712547_ACEOF
    11528 if ac_fn_c_try_link "$LINENO"; then :
    11529   if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
     12548if ac_fn_c_try_link "$LINENO"
     12549then :
     12550  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null
     12551then :
    1153012552  lt_cv_shlibpath_overrides_runpath=yes
    1153112553fi
    1153212554fi
    11533 rm -f core conftest.err conftest.$ac_objext \
     12555rm -f core conftest.err conftest.$ac_objext conftest.beam \
    1153412556    conftest$ac_exeext conftest.$ac_ext
    1153512557    LDFLAGS=$save_LDFLAGS
    1153612558    libdir=$save_libdir
    11537 
     12559     ;;
     12560esac
    1153812561fi
    1153912562
     
    1176312786  ;;
    1176412787esac
    11765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
    11766 $as_echo "$dynamic_linker" >&6; }
     12788{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
     12789printf "%s\n" "$dynamic_linker" >&6; }
    1176712790test no = "$dynamic_linker" && can_build_shared=no
    1176812791
     
    1188512908
    1188612909
    11887   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
    11888 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
     12910  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
     12911printf %s "checking how to hardcode library paths into programs... " >&6; }
    1188912912hardcode_action=
    1189012913if test -n "$hardcode_libdir_flag_spec" ||
     
    1191012933  hardcode_action=unsupported
    1191112934fi
    11912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
    11913 $as_echo "$hardcode_action" >&6; }
     12935{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
     12936printf "%s\n" "$hardcode_action" >&6; }
    1191412937
    1191512938if test relink = "$hardcode_action" ||
     
    1195512978  darwin*)
    1195612979    # if libdl is installed we need to link against it
    11957     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
    11958 $as_echo_n "checking for dlopen in -ldl... " >&6; }
    11959 if ${ac_cv_lib_dl_dlopen+:} false; then :
    11960   $as_echo_n "(cached) " >&6
    11961 else
    11962   ac_check_lib_save_LIBS=$LIBS
     12980    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
     12981printf %s "checking for dlopen in -ldl... " >&6; }
     12982if test ${ac_cv_lib_dl_dlopen+y}
     12983then :
     12984  printf %s "(cached) " >&6
     12985else case e in #(
     12986  e) ac_check_lib_save_LIBS=$LIBS
    1196312987LIBS="-ldl  $LIBS"
    1196412988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     
    1196712991/* Override any GCC internal prototype to avoid an error.
    1196812992   Use char because int might match the return type of a GCC
    11969    builtin and then its argument prototype would still apply.  */
     12993   builtin and then its argument prototype would still apply.
     12994   The 'extern "C"' is for builds by C++ compilers;
     12995   although this is not generally supported in C code supporting it here
     12996   has little cost and some practical benefit (sr 110532).  */
    1197012997#ifdef __cplusplus
    1197112998extern "C"
    1197212999#endif
    11973 char dlopen ();
     13000char dlopen (void);
    1197413001int
    11975 main ()
     13002main (void)
    1197613003{
    1197713004return dlopen ();
     
    1198013007}
    1198113008_ACEOF
    11982 if ac_fn_c_try_link "$LINENO"; then :
     13009if ac_fn_c_try_link "$LINENO"
     13010then :
    1198313011  ac_cv_lib_dl_dlopen=yes
    11984 else
    11985   ac_cv_lib_dl_dlopen=no
    11986 fi
    11987 rm -f core conftest.err conftest.$ac_objext \
     13012else case e in #(
     13013  e) ac_cv_lib_dl_dlopen=no ;;
     13014esac
     13015fi
     13016rm -f core conftest.err conftest.$ac_objext conftest.beam \
    1198813017    conftest$ac_exeext conftest.$ac_ext
    11989 LIBS=$ac_check_lib_save_LIBS
    11990 fi
    11991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
    11992 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
    11993 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
     13018LIBS=$ac_check_lib_save_LIBS ;;
     13019esac
     13020fi
     13021{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
     13022printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
     13023if test "x$ac_cv_lib_dl_dlopen" = xyes
     13024then :
    1199413025  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
    11995 else
    11996 
     13026else case e in #(
     13027  e)
    1199713028    lt_cv_dlopen=dyld
    1199813029    lt_cv_dlopen_libs=
    1199913030    lt_cv_dlopen_self=yes
    12000 
     13031     ;;
     13032esac
    1200113033fi
    1200213034
     
    1201313045  *)
    1201413046    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
    12015 if test "x$ac_cv_func_shl_load" = xyes; then :
     13047if test "x$ac_cv_func_shl_load" = xyes
     13048then :
    1201613049  lt_cv_dlopen=shl_load
    12017 else
    12018   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
    12019 $as_echo_n "checking for shl_load in -ldld... " >&6; }
    12020 if ${ac_cv_lib_dld_shl_load+:} false; then :
    12021   $as_echo_n "(cached) " >&6
    12022 else
    12023   ac_check_lib_save_LIBS=$LIBS
     13050else case e in #(
     13051  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
     13052printf %s "checking for shl_load in -ldld... " >&6; }
     13053if test ${ac_cv_lib_dld_shl_load+y}
     13054then :
     13055  printf %s "(cached) " >&6
     13056else case e in #(
     13057  e) ac_check_lib_save_LIBS=$LIBS
    1202413058LIBS="-ldld  $LIBS"
    1202513059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     
    1202813062/* Override any GCC internal prototype to avoid an error.
    1202913063   Use char because int might match the return type of a GCC
    12030    builtin and then its argument prototype would still apply.  */
     13064   builtin and then its argument prototype would still apply.
     13065   The 'extern "C"' is for builds by C++ compilers;
     13066   although this is not generally supported in C code supporting it here
     13067   has little cost and some practical benefit (sr 110532).  */
    1203113068#ifdef __cplusplus
    1203213069extern "C"
    1203313070#endif
    12034 char shl_load ();
     13071char shl_load (void);
    1203513072int
    12036 main ()
     13073main (void)
    1203713074{
    1203813075return shl_load ();
     
    1204113078}
    1204213079_ACEOF
    12043 if ac_fn_c_try_link "$LINENO"; then :
     13080if ac_fn_c_try_link "$LINENO"
     13081then :
    1204413082  ac_cv_lib_dld_shl_load=yes
    12045 else
    12046   ac_cv_lib_dld_shl_load=no
    12047 fi
    12048 rm -f core conftest.err conftest.$ac_objext \
     13083else case e in #(
     13084  e) ac_cv_lib_dld_shl_load=no ;;
     13085esac
     13086fi
     13087rm -f core conftest.err conftest.$ac_objext conftest.beam \
    1204913088    conftest$ac_exeext conftest.$ac_ext
    12050 LIBS=$ac_check_lib_save_LIBS
    12051 fi
    12052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
    12053 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
    12054 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
     13089LIBS=$ac_check_lib_save_LIBS ;;
     13090esac
     13091fi
     13092{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
     13093printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
     13094if test "x$ac_cv_lib_dld_shl_load" = xyes
     13095then :
    1205513096  lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
    12056 else
    12057   ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
    12058 if test "x$ac_cv_func_dlopen" = xyes; then :
     13097else case e in #(
     13098  e) ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
     13099if test "x$ac_cv_func_dlopen" = xyes
     13100then :
    1205913101  lt_cv_dlopen=dlopen
    12060 else
    12061   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
    12062 $as_echo_n "checking for dlopen in -ldl... " >&6; }
    12063 if ${ac_cv_lib_dl_dlopen+:} false; then :
    12064   $as_echo_n "(cached) " >&6
    12065 else
    12066   ac_check_lib_save_LIBS=$LIBS
     13102else case e in #(
     13103  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
     13104printf %s "checking for dlopen in -ldl... " >&6; }
     13105if test ${ac_cv_lib_dl_dlopen+y}
     13106then :
     13107  printf %s "(cached) " >&6
     13108else case e in #(
     13109  e) ac_check_lib_save_LIBS=$LIBS
    1206713110LIBS="-ldl  $LIBS"
    1206813111cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     
    1207113114/* Override any GCC internal prototype to avoid an error.
    1207213115   Use char because int might match the return type of a GCC
    12073    builtin and then its argument prototype would still apply.  */
     13116   builtin and then its argument prototype would still apply.
     13117   The 'extern "C"' is for builds by C++ compilers;
     13118   although this is not generally supported in C code supporting it here
     13119   has little cost and some practical benefit (sr 110532).  */
    1207413120#ifdef __cplusplus
    1207513121extern "C"
    1207613122#endif
    12077 char dlopen ();
     13123char dlopen (void);
    1207813124int
    12079 main ()
     13125main (void)
    1208013126{
    1208113127return dlopen ();
     
    1208413130}
    1208513131_ACEOF
    12086 if ac_fn_c_try_link "$LINENO"; then :
     13132if ac_fn_c_try_link "$LINENO"
     13133then :
    1208713134  ac_cv_lib_dl_dlopen=yes
    12088 else
    12089   ac_cv_lib_dl_dlopen=no
    12090 fi
    12091 rm -f core conftest.err conftest.$ac_objext \
     13135else case e in #(
     13136  e) ac_cv_lib_dl_dlopen=no ;;
     13137esac
     13138fi
     13139rm -f core conftest.err conftest.$ac_objext conftest.beam \
    1209213140    conftest$ac_exeext conftest.$ac_ext
    12093 LIBS=$ac_check_lib_save_LIBS
    12094 fi
    12095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
    12096 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
    12097 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
     13141LIBS=$ac_check_lib_save_LIBS ;;
     13142esac
     13143fi
     13144{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
     13145printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
     13146if test "x$ac_cv_lib_dl_dlopen" = xyes
     13147then :
    1209813148  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
    12099 else
    12100   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
    12101 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
    12102 if ${ac_cv_lib_svld_dlopen+:} false; then :
    12103   $as_echo_n "(cached) " >&6
    12104 else
    12105   ac_check_lib_save_LIBS=$LIBS
     13149else case e in #(
     13150  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
     13151printf %s "checking for dlopen in -lsvld... " >&6; }
     13152if test ${ac_cv_lib_svld_dlopen+y}
     13153then :
     13154  printf %s "(cached) " >&6
     13155else case e in #(
     13156  e) ac_check_lib_save_LIBS=$LIBS
    1210613157LIBS="-lsvld  $LIBS"
    1210713158cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     
    1211013161/* Override any GCC internal prototype to avoid an error.
    1211113162   Use char because int might match the return type of a GCC
    12112    builtin and then its argument prototype would still apply.  */
     13163   builtin and then its argument prototype would still apply.
     13164   The 'extern "C"' is for builds by C++ compilers;
     13165   although this is not generally supported in C code supporting it here
     13166   has little cost and some practical benefit (sr 110532).  */
    1211313167#ifdef __cplusplus
    1211413168extern "C"
    1211513169#endif
    12116 char dlopen ();
     13170char dlopen (void);
    1211713171int
    12118 main ()
     13172main (void)
    1211913173{
    1212013174return dlopen ();
     
    1212313177}
    1212413178_ACEOF
    12125 if ac_fn_c_try_link "$LINENO"; then :
     13179if ac_fn_c_try_link "$LINENO"
     13180then :
    1212613181  ac_cv_lib_svld_dlopen=yes
    12127 else
    12128   ac_cv_lib_svld_dlopen=no
    12129 fi
    12130 rm -f core conftest.err conftest.$ac_objext \
     13182else case e in #(
     13183  e) ac_cv_lib_svld_dlopen=no ;;
     13184esac
     13185fi
     13186rm -f core conftest.err conftest.$ac_objext conftest.beam \
    1213113187    conftest$ac_exeext conftest.$ac_ext
    12132 LIBS=$ac_check_lib_save_LIBS
    12133 fi
    12134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
    12135 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
    12136 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
     13188LIBS=$ac_check_lib_save_LIBS ;;
     13189esac
     13190fi
     13191{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
     13192printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; }
     13193if test "x$ac_cv_lib_svld_dlopen" = xyes
     13194then :
    1213713195  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
    12138 else
    12139   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
    12140 $as_echo_n "checking for dld_link in -ldld... " >&6; }
    12141 if ${ac_cv_lib_dld_dld_link+:} false; then :
    12142   $as_echo_n "(cached) " >&6
    12143 else
    12144   ac_check_lib_save_LIBS=$LIBS
     13196else case e in #(
     13197  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
     13198printf %s "checking for dld_link in -ldld... " >&6; }
     13199if test ${ac_cv_lib_dld_dld_link+y}
     13200then :
     13201  printf %s "(cached) " >&6
     13202else case e in #(
     13203  e) ac_check_lib_save_LIBS=$LIBS
    1214513204LIBS="-ldld  $LIBS"
    1214613205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     
    1214913208/* Override any GCC internal prototype to avoid an error.
    1215013209   Use char because int might match the return type of a GCC
    12151    builtin and then its argument prototype would still apply.  */
     13210   builtin and then its argument prototype would still apply.
     13211   The 'extern "C"' is for builds by C++ compilers;
     13212   although this is not generally supported in C code supporting it here
     13213   has little cost and some practical benefit (sr 110532).  */
    1215213214#ifdef __cplusplus
    1215313215extern "C"
    1215413216#endif
    12155 char dld_link ();
     13217char dld_link (void);
    1215613218int
    12157 main ()
     13219main (void)
    1215813220{
    1215913221return dld_link ();
     
    1216213224}
    1216313225_ACEOF
    12164 if ac_fn_c_try_link "$LINENO"; then :
     13226if ac_fn_c_try_link "$LINENO"
     13227then :
    1216513228  ac_cv_lib_dld_dld_link=yes
    12166 else
    12167   ac_cv_lib_dld_dld_link=no
    12168 fi
    12169 rm -f core conftest.err conftest.$ac_objext \
     13229else case e in #(
     13230  e) ac_cv_lib_dld_dld_link=no ;;
     13231esac
     13232fi
     13233rm -f core conftest.err conftest.$ac_objext conftest.beam \
    1217013234    conftest$ac_exeext conftest.$ac_ext
    12171 LIBS=$ac_check_lib_save_LIBS
    12172 fi
    12173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
    12174 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
    12175 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
     13235LIBS=$ac_check_lib_save_LIBS ;;
     13236esac
     13237fi
     13238{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
     13239printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; }
     13240if test "x$ac_cv_lib_dld_dld_link" = xyes
     13241then :
    1217613242  lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
    1217713243fi
    1217813244
    12179 
    12180 fi
    12181 
    12182 
    12183 fi
    12184 
    12185 
    12186 fi
    12187 
    12188 
    12189 fi
    12190 
    12191 
     13245               ;;
     13246esac
     13247fi
     13248
     13249             ;;
     13250esac
     13251fi
     13252
     13253           ;;
     13254esac
     13255fi
     13256
     13257         ;;
     13258esac
     13259fi
     13260
     13261       ;;
     13262esac
    1219213263fi
    1219313264
     
    1221213283    LIBS="$lt_cv_dlopen_libs $LIBS"
    1221313284
    12214     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
    12215 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
    12216 if ${lt_cv_dlopen_self+:} false; then :
    12217   $as_echo_n "(cached) " >&6
    12218 else
    12219           if test yes = "$cross_compiling"; then :
     13285    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
     13286printf %s "checking whether a program can dlopen itself... " >&6; }
     13287if test ${lt_cv_dlopen_self+y}
     13288then :
     13289  printf %s "(cached) " >&6
     13290else case e in #(
     13291  e)      if test yes = "$cross_compiling"; then :
    1222013292  lt_cv_dlopen_self=cross
    1222113293else
     
    1229513367  (eval $ac_link) 2>&5
    1229613368  ac_status=$?
    12297   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     13369  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
    1229813370  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
    1229913371    (./conftest; exit; ) >&5 2>/dev/null
     
    1231113383rm -fr conftest*
    1231213384
    12313 
    12314 fi
    12315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
    12316 $as_echo "$lt_cv_dlopen_self" >&6; }
     13385     ;;
     13386esac
     13387fi
     13388{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
     13389printf "%s\n" "$lt_cv_dlopen_self" >&6; }
    1231713390
    1231813391    if test yes = "$lt_cv_dlopen_self"; then
    1231913392      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
    12320       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
    12321 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
    12322 if ${lt_cv_dlopen_self_static+:} false; then :
    12323   $as_echo_n "(cached) " >&6
    12324 else
    12325           if test yes = "$cross_compiling"; then :
     13393      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
     13394printf %s "checking whether a statically linked program can dlopen itself... " >&6; }
     13395if test ${lt_cv_dlopen_self_static+y}
     13396then :
     13397  printf %s "(cached) " >&6
     13398else case e in #(
     13399  e)      if test yes = "$cross_compiling"; then :
    1232613400  lt_cv_dlopen_self_static=cross
    1232713401else
     
    1240113475  (eval $ac_link) 2>&5
    1240213476  ac_status=$?
    12403   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     13477  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
    1240413478  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
    1240513479    (./conftest; exit; ) >&5 2>/dev/null
     
    1241713491rm -fr conftest*
    1241813492
    12419 
    12420 fi
    12421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
    12422 $as_echo "$lt_cv_dlopen_self_static" >&6; }
     13493       ;;
     13494esac
     13495fi
     13496{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
     13497printf "%s\n" "$lt_cv_dlopen_self_static" >&6; }
    1242313498    fi
    1242413499
     
    1245813533striplib=
    1245913534old_striplib=
    12460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
    12461 $as_echo_n "checking whether stripping libraries is possible... " >&6; }
    12462 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
    12463   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
    12464   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
    12465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
    12466 $as_echo "yes" >&6; }
    12467 else
    12468 # FIXME - insert some real tests, host_os isn't really good enough
    12469   case $host_os in
    12470   darwin*)
    12471     if test -n "$STRIP"; then
     13535{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
     13536printf %s "checking whether stripping libraries is possible... " >&6; }
     13537if test -z "$STRIP"; then
     13538  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     13539printf "%s\n" "no" >&6; }
     13540else
     13541  if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
     13542    old_striplib="$STRIP --strip-debug"
     13543    striplib="$STRIP --strip-unneeded"
     13544    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
     13545printf "%s\n" "yes" >&6; }
     13546  else
     13547    case $host_os in
     13548    darwin*)
     13549      # FIXME - insert some real tests, host_os isn't really good enough
    1247213550      striplib="$STRIP -x"
    1247313551      old_striplib="$STRIP -S"
    12474       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
    12475 $as_echo "yes" >&6; }
    12476     else
    12477       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    12478 $as_echo "no" >&6; }
    12479     fi
    12480     ;;
    12481   *)
    12482     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    12483 $as_echo "no" >&6; }
    12484     ;;
    12485   esac
     13552      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
     13553printf "%s\n" "yes" >&6; }
     13554      ;;
     13555    freebsd*)
     13556      if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
     13557        old_striplib="$STRIP --strip-debug"
     13558        striplib="$STRIP --strip-unneeded"
     13559        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
     13560printf "%s\n" "yes" >&6; }
     13561      else
     13562        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     13563printf "%s\n" "no" >&6; }
     13564      fi
     13565      ;;
     13566    *)
     13567      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     13568printf "%s\n" "no" >&6; }
     13569      ;;
     13570    esac
     13571  fi
    1248613572fi
    1248713573
     
    1249813584
    1249913585  # Report what library types will actually be built
    12500   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
    12501 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
    12502   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
    12503 $as_echo "$can_build_shared" >&6; }
    12504 
    12505   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
    12506 $as_echo_n "checking whether to build shared libraries... " >&6; }
     13586  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
     13587printf %s "checking if libtool supports shared libraries... " >&6; }
     13588  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
     13589printf "%s\n" "$can_build_shared" >&6; }
     13590
     13591  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
     13592printf %s "checking whether to build shared libraries... " >&6; }
    1250713593  test no = "$can_build_shared" && enable_shared=no
    1250813594
     
    1252813614    ;;
    1252913615  esac
    12530   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
    12531 $as_echo "$enable_shared" >&6; }
    12532 
    12533   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
    12534 $as_echo_n "checking whether to build static libraries... " >&6; }
     13616  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
     13617printf "%s\n" "$enable_shared" >&6; }
     13618
     13619  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
     13620printf %s "checking whether to build static libraries... " >&6; }
    1253513621  # Make sure either enable_shared or enable_static is yes.
    1253613622  test yes = "$enable_shared" || enable_static=yes
    12537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
    12538 $as_echo "$enable_static" >&6; }
     13623  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
     13624printf "%s\n" "$enable_static" >&6; }
    1253913625
    1254013626
     
    1257613662# Some awks crash when confronted with pnglibconf.dfa, do a test run now
    1257713663# to make sure this doesn't happen
    12578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that AWK works" >&5
    12579 $as_echo_n "checking that AWK works... " >&6; }
     13664{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that AWK works" >&5
     13665printf %s "checking that AWK works... " >&6; }
    1258013666if ${AWK} -f ${srcdir}/scripts/options.awk out="/dev/null" version=search\
    1258113667   ${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\
    1258213668   ${srcdir}/pngusr.dfa 1>&2
    1258313669then
    12584    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
    12585 $as_echo "ok" >&6; }
    12586 else
    12587    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
    12588 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     13670   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
     13671printf "%s\n" "ok" >&6; }
     13672else
     13673   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
     13674printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
    1258913675as_fn_error 1 "failed
    12590 See \`config.log' for more details" "$LINENO" 5; }
     13676See 'config.log' for more details" "$LINENO" 5; }
    1259113677fi
    1259213678
     
    1259613682
    1259713683
    12598 # -Werror cannot be passed to GCC in CFLAGS because configure will fail (it
    12599 # checks the compiler with a program that generates a warning), add the
    12600 # following option to deal with this
     13684# Check whether --enable-tests was given.
     13685if test ${enable_tests+y}
     13686then :
     13687  enableval=$enable_tests; enable_tests="$enableval"
     13688else case e in #(
     13689  e) enable_tests=yes ;;
     13690esac
     13691fi
     13692
     13693
     13694 if test "$enable_tests" != "no"; then
     13695  ENABLE_TESTS_TRUE=
     13696  ENABLE_TESTS_FALSE='#'
     13697else
     13698  ENABLE_TESTS_TRUE='#'
     13699  ENABLE_TESTS_FALSE=
     13700fi
     13701
     13702
     13703# Check whether --enable-tools was given.
     13704if test ${enable_tools+y}
     13705then :
     13706  enableval=$enable_tools; enable_tools="$enableval"
     13707else case e in #(
     13708  e) enable_tools=yes ;;
     13709esac
     13710fi
     13711
     13712
     13713 if test "$enable_tools" != "no"; then
     13714  ENABLE_TOOLS_TRUE=
     13715  ENABLE_TOOLS_FALSE='#'
     13716else
     13717  ENABLE_TOOLS_TRUE='#'
     13718  ENABLE_TOOLS_FALSE=
     13719fi
     13720
     13721
     13722# -Werror cannot be passed to GCC in CFLAGS because configure will fail
     13723# (it checks the compiler with a program that generates a warning).
     13724# Add the following option to deal with this:
    1260113725
    1260213726# Check whether --enable-werror was given.
    12603 if test "${enable_werror+set}" = set; then :
     13727if test ${enable_werror+y}
     13728then :
    1260413729  enableval=$enable_werror; test "$enable_werror" = "yes" && enable_werror="-Werror"
    1260513730    if test "$enable_werror" != "no"; then
    1260613731      sav_CFLAGS="$CFLAGS"
    1260713732      CFLAGS="$enable_werror $CFLAGS"
    12608       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler allows $enable_werror" >&5
    12609 $as_echo_n "checking if the compiler allows $enable_werror... " >&6; }
     13733      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the compiler allows $enable_werror" >&5
     13734printf %s "checking if the compiler allows $enable_werror... " >&6; }
    1261013735      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    1261113736/* end confdefs.h.  */
     
    1261513740            }
    1261613741_ACEOF
    12617 if ac_fn_c_try_compile "$LINENO"; then :
    12618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
    12619 $as_echo "yes" >&6; }
     13742if ac_fn_c_try_compile "$LINENO"
     13743then :
     13744  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
     13745printf "%s\n" "yes" >&6; }
    1262013746         PNG_COPTS="$PNG_COPTS $enable_werror"
    12621 else
    12622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    12623 $as_echo "no" >&6; }
    12624 fi
    12625 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     13747else case e in #(
     13748  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     13749printf "%s\n" "no" >&6; } ;;
     13750esac
     13751fi
     13752rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
    1262613753      CFLAGS="$sav_CFLAGS"
    1262713754    fi
     
    1262913756
    1263013757
    12631 # For GCC 5 the default mode for C is -std=gnu11 instead of -std=gnu89
    12632 # In pngpriv.h we request just the POSIX 1003.1 and C89 APIs by defining _POSIX_SOURCE to 1
    12633 # This is incompatible with the new default mode, so we test for that and force the
    12634 # "-std=c89" compiler option:
    12635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to force back C standard to C89" >&5
    12636 $as_echo_n "checking if we need to force back C standard to C89... " >&6; }
     13758# For GCC 5 the default mode for C is -std=gnu11 instead of -std=gnu89.
     13759# In pngpriv.h we request just the POSIX 1003.1 and C89 APIs by defining
     13760# _POSIX_SOURCE to 1. This is incompatible with the new default mode, so
     13761# we test for that and force the "-std=c89" compiler option:
     13762{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we need to force back C standard to C89" >&5
     13763printf %s "checking if we need to force back C standard to C89... " >&6; }
    1263713764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    1263813765/* end confdefs.h.  */
     
    1264213769
    1264313770int
    12644 main ()
     13771main (void)
    1264513772{
    1264613773
     
    1264913776}
    1265013777_ACEOF
    12651 if ac_fn_c_try_compile "$LINENO"; then :
    12652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    12653 $as_echo "no" >&6; }
    12654 else
    12655 
     13778if ac_fn_c_try_compile "$LINENO"
     13779then :
     13780  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     13781printf "%s\n" "no" >&6; }
     13782else case e in #(
     13783  e)
    1265613784      if test "x$GCC" != "xyes"; then
    1265713785         as_fn_error $? "Forcing back to C89 is required but the flags are only known for GCC" "$LINENO" 5
    1265813786      fi
    12659    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
    12660 $as_echo "yes" >&6; }
     13787   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
     13788printf "%s\n" "yes" >&6; }
    1266113789   CFLAGS="$CFLAGS -std=c89"
    12662 
    12663 fi
    12664 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    12665 
    12666 # Checks for header files.
    12667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
    12668 $as_echo_n "checking for ANSI C header files... " >&6; }
    12669 if ${ac_cv_header_stdc+:} false; then :
    12670   $as_echo_n "(cached) " >&6
    12671 else
    12672   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    12673 /* end confdefs.h.  */
    12674 #include <stdlib.h>
    12675 #include <stdarg.h>
    12676 #include <string.h>
    12677 #include <float.h>
    12678 
    12679 int
    12680 main ()
    12681 {
    12682 
    12683   ;
    12684   return 0;
    12685 }
    12686 _ACEOF
    12687 if ac_fn_c_try_compile "$LINENO"; then :
    12688   ac_cv_header_stdc=yes
    12689 else
    12690   ac_cv_header_stdc=no
    12691 fi
    12692 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    12693 
    12694 if test $ac_cv_header_stdc = yes; then
    12695   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
    12696   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    12697 /* end confdefs.h.  */
    12698 #include <string.h>
    12699 
    12700 _ACEOF
    12701 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
    12702   $EGREP "memchr" >/dev/null 2>&1; then :
    12703 
    12704 else
    12705   ac_cv_header_stdc=no
    12706 fi
    12707 rm -f conftest*
    12708 
    12709 fi
    12710 
    12711 if test $ac_cv_header_stdc = yes; then
    12712   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
    12713   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    12714 /* end confdefs.h.  */
    12715 #include <stdlib.h>
    12716 
    12717 _ACEOF
    12718 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
    12719   $EGREP "free" >/dev/null 2>&1; then :
    12720 
    12721 else
    12722   ac_cv_header_stdc=no
    12723 fi
    12724 rm -f conftest*
    12725 
    12726 fi
    12727 
    12728 if test $ac_cv_header_stdc = yes; then
    12729   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
    12730   if test "$cross_compiling" = yes; then :
    12731   :
    12732 else
    12733   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    12734 /* end confdefs.h.  */
    12735 #include <ctype.h>
    12736 #include <stdlib.h>
    12737 #if ((' ' & 0x0FF) == 0x020)
    12738 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
    12739 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
    12740 #else
    12741 # define ISLOWER(c) \
    12742                    (('a' <= (c) && (c) <= 'i') \
    12743                      || ('j' <= (c) && (c) <= 'r') \
    12744                      || ('s' <= (c) && (c) <= 'z'))
    12745 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
    12746 #endif
    12747 
    12748 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
    12749 int
    12750 main ()
    12751 {
    12752   int i;
    12753   for (i = 0; i < 256; i++)
    12754     if (XOR (islower (i), ISLOWER (i))
    12755         || toupper (i) != TOUPPER (i))
    12756       return 2;
    12757   return 0;
    12758 }
    12759 _ACEOF
    12760 if ac_fn_c_try_run "$LINENO"; then :
    12761 
    12762 else
    12763   ac_cv_header_stdc=no
    12764 fi
    12765 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
    12766   conftest.$ac_objext conftest.beam conftest.$ac_ext
    12767 fi
    12768 
    12769 fi
    12770 fi
    12771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
    12772 $as_echo "$ac_cv_header_stdc" >&6; }
    12773 if test $ac_cv_header_stdc = yes; then
    12774 
    12775 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
    12776 
    12777 fi
    12778 
    12779 
    12780 # Checks for typedefs, structures, and compiler characteristics.
    12781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
    12782 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
    12783 if ${ac_cv_c_const+:} false; then :
    12784   $as_echo_n "(cached) " >&6
    12785 else
    12786   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    12787 /* end confdefs.h.  */
    12788 
    12789 int
    12790 main ()
    12791 {
    12792 
    12793 #ifndef __cplusplus
    12794   /* Ultrix mips cc rejects this sort of thing.  */
    12795   typedef int charset[2];
    12796   const charset cs = { 0, 0 };
    12797   /* SunOS 4.1.1 cc rejects this.  */
    12798   char const *const *pcpcc;
    12799   char **ppc;
    12800   /* NEC SVR4.0.2 mips cc rejects this.  */
    12801   struct point {int x, y;};
    12802   static struct point const zero = {0,0};
    12803   /* AIX XL C 1.02.0.0 rejects this.
    12804      It does not let you subtract one const X* pointer from another in
    12805      an arm of an if-expression whose if-part is not a constant
    12806      expression */
    12807   const char *g = "string";
    12808   pcpcc = &g + (g ? g-g : 0);
    12809   /* HPUX 7.0 cc rejects these. */
    12810   ++pcpcc;
    12811   ppc = (char**) pcpcc;
    12812   pcpcc = (char const *const *) ppc;
    12813   { /* SCO 3.2v4 cc rejects this sort of thing.  */
    12814     char tx;
    12815     char *t = &tx;
    12816     char const *s = 0 ? (char *) 0 : (char const *) 0;
    12817 
    12818     *t++ = 0;
    12819     if (s) return 0;
    12820   }
    12821   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
    12822     int x[] = {25, 17};
    12823     const int *foo = &x[0];
    12824     ++foo;
    12825   }
    12826   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
    12827     typedef const int *iptr;
    12828     iptr p = 0;
    12829     ++p;
    12830   }
    12831   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
    12832        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
    12833     struct s { int j; const int *ap[3]; } bx;
    12834     struct s *b = &bx; b->j = 5;
    12835   }
    12836   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
    12837     const int foo = 10;
    12838     if (!foo) return 0;
    12839   }
    12840   return !cs[0] && !zero.x;
    12841 #endif
    12842 
    12843   ;
    12844   return 0;
    12845 }
    12846 _ACEOF
    12847 if ac_fn_c_try_compile "$LINENO"; then :
    12848   ac_cv_c_const=yes
    12849 else
    12850   ac_cv_c_const=no
    12851 fi
    12852 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    12853 fi
    12854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
    12855 $as_echo "$ac_cv_c_const" >&6; }
    12856 if test $ac_cv_c_const = no; then
    12857 
    12858 $as_echo "#define const /**/" >>confdefs.h
    12859 
    12860 fi
    12861 
    12862 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
    12863 if test "x$ac_cv_type_size_t" = xyes; then :
    12864 
    12865 else
    12866 
    12867 cat >>confdefs.h <<_ACEOF
    12868 #define size_t unsigned int
    12869 _ACEOF
    12870 
    12871 fi
    12872 
    12873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
    12874 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
    12875 if ${ac_cv_struct_tm+:} false; then :
    12876   $as_echo_n "(cached) " >&6
    12877 else
    12878   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     13790 ;;
     13791esac
     13792fi
     13793rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
     13794
     13795# Checks for structures and compiler characteristics.
     13796{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
     13797printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; }
     13798if test ${ac_cv_struct_tm+y}
     13799then :
     13800  printf %s "(cached) " >&6
     13801else case e in #(
     13802  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    1287913803/* end confdefs.h.  */
    1288013804#include <sys/types.h>
     
    1288213806
    1288313807int
    12884 main ()
     13808main (void)
    1288513809{
    1288613810struct tm tm;
     
    1289113815}
    1289213816_ACEOF
    12893 if ac_fn_c_try_compile "$LINENO"; then :
     13817if ac_fn_c_try_compile "$LINENO"
     13818then :
    1289413819  ac_cv_struct_tm=time.h
    12895 else
    12896   ac_cv_struct_tm=sys/time.h
    12897 fi
    12898 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    12899 fi
    12900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
    12901 $as_echo "$ac_cv_struct_tm" >&6; }
     13820else case e in #(
     13821  e) ac_cv_struct_tm=sys/time.h ;;
     13822esac
     13823fi
     13824rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
     13825esac
     13826fi
     13827{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
     13828printf "%s\n" "$ac_cv_struct_tm" >&6; }
    1290213829if test $ac_cv_struct_tm = sys/time.h; then
    1290313830
    12904 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
    12905 
    12906 fi
    12907 
    12908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
    12909 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
    12910 if ${ac_cv_c_restrict+:} false; then :
    12911   $as_echo_n "(cached) " >&6
    12912 else
    12913   ac_cv_c_restrict=no
    12914    # The order here caters to the fact that C++ does not require restrict.
    12915    for ac_kw in __restrict __restrict__ _Restrict restrict; do
     13831printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h
     13832
     13833fi
     13834
     13835{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
     13836printf %s "checking for C/C++ restrict keyword... " >&6; }
     13837if test ${ac_cv_c_restrict+y}
     13838then :
     13839  printf %s "(cached) " >&6
     13840else case e in #(
     13841  e) ac_cv_c_restrict=no
     13842   # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see:
     13843   # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html
     13844   # Put 'restrict' last, because C++ lacks it.
     13845   for ac_kw in __restrict__ __restrict _Restrict restrict; do
    1291613846     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    1291713847/* end confdefs.h.  */
    12918 typedef int * int_ptr;
    12919         int foo (int_ptr $ac_kw ip) {
    12920         return ip[0];
    12921        }
     13848typedef int *int_ptr;
     13849           int foo (int_ptr $ac_kw ip) { return ip[0]; }
     13850           int bar (int [$ac_kw]); /* Catch GCC bug 14050.  */
     13851           int bar (int ip[$ac_kw]) { return ip[0]; }
     13852
    1292213853int
    12923 main ()
     13854main (void)
    1292413855{
    1292513856int s[1];
    12926         int * $ac_kw t = s;
    12927         t[0] = 0;
    12928         return foo(t)
     13857           int *$ac_kw t = s;
     13858           t[0] = 0;
     13859           return foo (t) + bar (t);
     13860
    1292913861  ;
    1293013862  return 0;
    1293113863}
    1293213864_ACEOF
    12933 if ac_fn_c_try_compile "$LINENO"; then :
     13865if ac_fn_c_try_compile "$LINENO"
     13866then :
    1293413867  ac_cv_c_restrict=$ac_kw
    1293513868fi
    12936 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     13869rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
    1293713870     test "$ac_cv_c_restrict" != no && break
    1293813871   done
    12939 
    12940 fi
    12941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
    12942 $as_echo "$ac_cv_c_restrict" >&6; }
     13872   ;;
     13873esac
     13874fi
     13875{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
     13876printf "%s\n" "$ac_cv_c_restrict" >&6; }
    1294313877
    1294413878 case $ac_cv_c_restrict in
    1294513879   restrict) ;;
    12946    no) $as_echo "#define restrict /**/" >>confdefs.h
     13880   no) printf "%s\n" "#define restrict /**/" >>confdefs.h
    1294713881 ;;
    12948    *)  cat >>confdefs.h <<_ACEOF
    12949 #define restrict $ac_cv_c_restrict
    12950 _ACEOF
     13882   *)  printf "%s\n" "#define restrict $ac_cv_c_restrict" >>confdefs.h
    1295113883 ;;
    1295213884 esac
     
    1295413886
    1295513887# Checks for library functions.
    12956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5
    12957 $as_echo_n "checking for working strtod... " >&6; }
    12958 if ${ac_cv_func_strtod+:} false; then :
    12959   $as_echo_n "(cached) " >&6
    12960 else
    12961   if test "$cross_compiling" = yes; then :
    12962   ac_cv_func_strtod=no
    12963 else
    12964   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    12965 /* end confdefs.h.  */
    12966 
    12967 $ac_includes_default
    12968 #ifndef strtod
    12969 double strtod ();
    12970 #endif
    12971 int
    12972 main()
    12973 {
    12974   {
    12975     /* Some versions of Linux strtod mis-parse strings with leading '+'.  */
    12976     char *string = " +69";
    12977     char *term;
    12978     double value;
    12979     value = strtod (string, &term);
    12980     if (value != 69 || term != (string + 4))
    12981       return 1;
    12982   }
    12983 
    12984   {
    12985     /* Under Solaris 2.4, strtod returns the wrong value for the
    12986        terminating character under some conditions.  */
    12987     char *string = "NaN";
    12988     char *term;
    12989     strtod (string, &term);
    12990     if (term != string && *(term - 1) == 0)
    12991       return 1;
    12992   }
    12993   return 0;
    12994 }
    12995 
    12996 _ACEOF
    12997 if ac_fn_c_try_run "$LINENO"; then :
    12998   ac_cv_func_strtod=yes
    12999 else
    13000   ac_cv_func_strtod=no
    13001 fi
    13002 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
    13003   conftest.$ac_objext conftest.beam conftest.$ac_ext
    13004 fi
    13005 
    13006 fi
    13007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5
    13008 $as_echo "$ac_cv_func_strtod" >&6; }
    13009 if test $ac_cv_func_strtod = no; then
    13010   case " $LIBOBJS " in
    13011   *" strtod.$ac_objext "* ) ;;
    13012   *) LIBOBJS="$LIBOBJS strtod.$ac_objext"
    13013  ;;
    13014 esac
    13015 
    13016 ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow"
    13017 if test "x$ac_cv_func_pow" = xyes; then :
    13018 
    13019 fi
    13020 
    13021 if test $ac_cv_func_pow = no; then
    13022   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5
    13023 $as_echo_n "checking for pow in -lm... " >&6; }
    13024 if ${ac_cv_lib_m_pow+:} false; then :
    13025   $as_echo_n "(cached) " >&6
    13026 else
    13027   ac_check_lib_save_LIBS=$LIBS
     13888
     13889  for ac_func in pow
     13890do :
     13891  ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow"
     13892if test "x$ac_cv_func_pow" = xyes
     13893then :
     13894  printf "%s\n" "#define HAVE_POW 1" >>confdefs.h
     13895
     13896else case e in #(
     13897  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5
     13898printf %s "checking for pow in -lm... " >&6; }
     13899if test ${ac_cv_lib_m_pow+y}
     13900then :
     13901  printf %s "(cached) " >&6
     13902else case e in #(
     13903  e) ac_check_lib_save_LIBS=$LIBS
    1302813904LIBS="-lm  $LIBS"
    1302913905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     
    1303213908/* Override any GCC internal prototype to avoid an error.
    1303313909   Use char because int might match the return type of a GCC
    13034    builtin and then its argument prototype would still apply.  */
     13910   builtin and then its argument prototype would still apply.
     13911   The 'extern "C"' is for builds by C++ compilers;
     13912   although this is not generally supported in C code supporting it here
     13913   has little cost and some practical benefit (sr 110532).  */
    1303513914#ifdef __cplusplus
    1303613915extern "C"
    1303713916#endif
    13038 char pow ();
     13917char pow (void);
    1303913918int
    13040 main ()
     13919main (void)
    1304113920{
    1304213921return pow ();
     
    1304513924}
    1304613925_ACEOF
    13047 if ac_fn_c_try_link "$LINENO"; then :
     13926if ac_fn_c_try_link "$LINENO"
     13927then :
    1304813928  ac_cv_lib_m_pow=yes
    13049 else
    13050   ac_cv_lib_m_pow=no
    13051 fi
    13052 rm -f core conftest.err conftest.$ac_objext \
     13929else case e in #(
     13930  e) ac_cv_lib_m_pow=no ;;
     13931esac
     13932fi
     13933rm -f core conftest.err conftest.$ac_objext conftest.beam \
    1305313934    conftest$ac_exeext conftest.$ac_ext
    13054 LIBS=$ac_check_lib_save_LIBS
    13055 fi
    13056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5
    13057 $as_echo "$ac_cv_lib_m_pow" >&6; }
    13058 if test "x$ac_cv_lib_m_pow" = xyes; then :
    13059   POW_LIB=-lm
    13060 else
    13061   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5
    13062 $as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;}
    13063 fi
    13064 
    13065 fi
    13066 
    13067 fi
    13068 
    13069 for ac_func in pow
    13070 do :
    13071   ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow"
    13072 if test "x$ac_cv_func_pow" = xyes; then :
    13073   cat >>confdefs.h <<_ACEOF
    13074 #define HAVE_POW 1
    13075 _ACEOF
    13076 
    13077 else
    13078   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5
    13079 $as_echo_n "checking for pow in -lm... " >&6; }
    13080 if ${ac_cv_lib_m_pow+:} false; then :
    13081   $as_echo_n "(cached) " >&6
    13082 else
    13083   ac_check_lib_save_LIBS=$LIBS
    13084 LIBS="-lm  $LIBS"
     13935LIBS=$ac_check_lib_save_LIBS ;;
     13936esac
     13937fi
     13938{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5
     13939printf "%s\n" "$ac_cv_lib_m_pow" >&6; }
     13940if test "x$ac_cv_lib_m_pow" = xyes
     13941then :
     13942  printf "%s\n" "#define HAVE_LIBM 1" >>confdefs.h
     13943
     13944  LIBS="-lm $LIBS"
     13945
     13946else case e in #(
     13947  e) as_fn_error $? "cannot find pow" "$LINENO" 5 ;;
     13948esac
     13949fi
     13950 ;;
     13951esac
     13952fi
     13953
     13954done
     13955
     13956# Some later POSIX 1003.1 functions are required for test programs, failure
     13957# here is soft (the corresponding test program is not built).
     13958ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
     13959if test "x$ac_cv_func_clock_gettime" = xyes
     13960then :
     13961
     13962else case e in #(
     13963  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: not building timepng" >&5
     13964printf "%s\n" "$as_me: WARNING: not building timepng" >&2;} ;;
     13965esac
     13966fi
     13967
     13968 if test "$ac_cv_func_clock_gettime" = "yes"; then
     13969  HAVE_CLOCK_GETTIME_TRUE=
     13970  HAVE_CLOCK_GETTIME_FALSE='#'
     13971else
     13972  HAVE_CLOCK_GETTIME_TRUE='#'
     13973  HAVE_CLOCK_GETTIME_FALSE=
     13974fi
     13975
     13976
     13977
     13978# Check whether --with-zlib-prefix was given.
     13979if test ${with_zlib_prefix+y}
     13980then :
     13981  withval=$with_zlib_prefix; ZPREFIX=${withval}
     13982else case e in #(
     13983  e) ZPREFIX='z_' ;;
     13984esac
     13985fi
     13986
     13987{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zlibVersion in -lz" >&5
     13988printf %s "checking for zlibVersion in -lz... " >&6; }
     13989if test ${ac_cv_lib_z_zlibVersion+y}
     13990then :
     13991  printf %s "(cached) " >&6
     13992else case e in #(
     13993  e) ac_check_lib_save_LIBS=$LIBS
     13994LIBS="-lz  $LIBS"
    1308513995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    1308613996/* end confdefs.h.  */
     
    1308813998/* Override any GCC internal prototype to avoid an error.
    1308913999   Use char because int might match the return type of a GCC
    13090    builtin and then its argument prototype would still apply.  */
     14000   builtin and then its argument prototype would still apply.
     14001   The 'extern "C"' is for builds by C++ compilers;
     14002   although this is not generally supported in C code supporting it here
     14003   has little cost and some practical benefit (sr 110532).  */
    1309114004#ifdef __cplusplus
    1309214005extern "C"
    1309314006#endif
    13094 char pow ();
     14007char zlibVersion (void);
    1309514008int
    13096 main ()
    13097 {
    13098 return pow ();
    13099   ;
    13100   return 0;
    13101 }
    13102 _ACEOF
    13103 if ac_fn_c_try_link "$LINENO"; then :
    13104   ac_cv_lib_m_pow=yes
    13105 else
    13106   ac_cv_lib_m_pow=no
    13107 fi
    13108 rm -f core conftest.err conftest.$ac_objext \
    13109     conftest$ac_exeext conftest.$ac_ext
    13110 LIBS=$ac_check_lib_save_LIBS
    13111 fi
    13112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5
    13113 $as_echo "$ac_cv_lib_m_pow" >&6; }
    13114 if test "x$ac_cv_lib_m_pow" = xyes; then :
    13115   cat >>confdefs.h <<_ACEOF
    13116 #define HAVE_LIBM 1
    13117 _ACEOF
    13118 
    13119   LIBS="-lm $LIBS"
    13120 
    13121 else
    13122   as_fn_error $? "cannot find pow" "$LINENO" 5
    13123 fi
    13124 
    13125 fi
    13126 done
    13127 
    13128 
    13129 # Some later POSIX 1003.1 functions are required for test programs, failure here
    13130 # is soft (the corresponding test program is not built).
    13131 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
    13132 if test "x$ac_cv_func_clock_gettime" = xyes; then :
    13133 
    13134 else
    13135   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: not building timepng" >&5
    13136 $as_echo "$as_me: WARNING: not building timepng" >&2;}
    13137 fi
    13138 
    13139  if test "$ac_cv_func_clock_gettime" = "yes"; then
    13140   HAVE_CLOCK_GETTIME_TRUE=
    13141   HAVE_CLOCK_GETTIME_FALSE='#'
    13142 else
    13143   HAVE_CLOCK_GETTIME_TRUE='#'
    13144   HAVE_CLOCK_GETTIME_FALSE=
    13145 fi
    13146 
    13147 
    13148 
    13149 # Check whether --with-zlib-prefix was given.
    13150 if test "${with_zlib_prefix+set}" = set; then :
    13151   withval=$with_zlib_prefix; ZPREFIX=${withval}
    13152 else
    13153   ZPREFIX='z_'
    13154 fi
    13155 
    13156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlibVersion in -lz" >&5
    13157 $as_echo_n "checking for zlibVersion in -lz... " >&6; }
    13158 if ${ac_cv_lib_z_zlibVersion+:} false; then :
    13159   $as_echo_n "(cached) " >&6
    13160 else
    13161   ac_check_lib_save_LIBS=$LIBS
    13162 LIBS="-lz  $LIBS"
    13163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    13164 /* end confdefs.h.  */
    13165 
    13166 /* Override any GCC internal prototype to avoid an error.
    13167    Use char because int might match the return type of a GCC
    13168    builtin and then its argument prototype would still apply.  */
    13169 #ifdef __cplusplus
    13170 extern "C"
    13171 #endif
    13172 char zlibVersion ();
    13173 int
    13174 main ()
     14009main (void)
    1317514010{
    1317614011return zlibVersion ();
     
    1317914014}
    1318014015_ACEOF
    13181 if ac_fn_c_try_link "$LINENO"; then :
     14016if ac_fn_c_try_link "$LINENO"
     14017then :
    1318214018  ac_cv_lib_z_zlibVersion=yes
    13183 else
    13184   ac_cv_lib_z_zlibVersion=no
    13185 fi
    13186 rm -f core conftest.err conftest.$ac_objext \
     14019else case e in #(
     14020  e) ac_cv_lib_z_zlibVersion=no ;;
     14021esac
     14022fi
     14023rm -f core conftest.err conftest.$ac_objext conftest.beam \
    1318714024    conftest$ac_exeext conftest.$ac_ext
    13188 LIBS=$ac_check_lib_save_LIBS
    13189 fi
    13190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_zlibVersion" >&5
    13191 $as_echo "$ac_cv_lib_z_zlibVersion" >&6; }
    13192 if test "x$ac_cv_lib_z_zlibVersion" = xyes; then :
    13193   cat >>confdefs.h <<_ACEOF
    13194 #define HAVE_LIBZ 1
    13195 _ACEOF
     14025LIBS=$ac_check_lib_save_LIBS ;;
     14026esac
     14027fi
     14028{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_zlibVersion" >&5
     14029printf "%s\n" "$ac_cv_lib_z_zlibVersion" >&6; }
     14030if test "x$ac_cv_lib_z_zlibVersion" = xyes
     14031then :
     14032  printf "%s\n" "#define HAVE_LIBZ 1" >>confdefs.h
    1319614033
    1319714034  LIBS="-lz $LIBS"
    1319814035
    13199 else
    13200   as_ac_Lib=`$as_echo "ac_cv_lib_z_${ZPREFIX}zlibVersion" | $as_tr_sh`
    13201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ZPREFIX}zlibVersion in -lz" >&5
    13202 $as_echo_n "checking for ${ZPREFIX}zlibVersion in -lz... " >&6; }
    13203 if eval \${$as_ac_Lib+:} false; then :
    13204   $as_echo_n "(cached) " >&6
    13205 else
    13206   ac_check_lib_save_LIBS=$LIBS
     14036else case e in #(
     14037  e) as_ac_Lib=`printf "%s\n" "ac_cv_lib_z_${ZPREFIX}zlibVersion" | sed "$as_sed_sh"`
     14038{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ZPREFIX}zlibVersion in -lz" >&5
     14039printf %s "checking for ${ZPREFIX}zlibVersion in -lz... " >&6; }
     14040if eval test \${$as_ac_Lib+y}
     14041then :
     14042  printf %s "(cached) " >&6
     14043else case e in #(
     14044  e) ac_check_lib_save_LIBS=$LIBS
    1320714045LIBS="-lz  $LIBS"
    1320814046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     
    1321114049/* Override any GCC internal prototype to avoid an error.
    1321214050   Use char because int might match the return type of a GCC
    13213    builtin and then its argument prototype would still apply.  */
     14051   builtin and then its argument prototype would still apply.
     14052   The 'extern "C"' is for builds by C++ compilers;
     14053   although this is not generally supported in C code supporting it here
     14054   has little cost and some practical benefit (sr 110532).  */
    1321414055#ifdef __cplusplus
    1321514056extern "C"
    1321614057#endif
    13217 char ${ZPREFIX}zlibVersion ();
     14058char ${ZPREFIX}zlibVersion (void);
    1321814059int
    13219 main ()
     14060main (void)
    1322014061{
    1322114062return ${ZPREFIX}zlibVersion ();
     
    1322414065}
    1322514066_ACEOF
    13226 if ac_fn_c_try_link "$LINENO"; then :
     14067if ac_fn_c_try_link "$LINENO"
     14068then :
    1322714069  eval "$as_ac_Lib=yes"
    13228 else
    13229   eval "$as_ac_Lib=no"
    13230 fi
    13231 rm -f core conftest.err conftest.$ac_objext \
     14070else case e in #(
     14071  e) eval "$as_ac_Lib=no" ;;
     14072esac
     14073fi
     14074rm -f core conftest.err conftest.$ac_objext conftest.beam \
    1323214075    conftest$ac_exeext conftest.$ac_ext
    13233 LIBS=$ac_check_lib_save_LIBS
     14076LIBS=$ac_check_lib_save_LIBS ;;
     14077esac
    1323414078fi
    1323514079eval ac_res=\$$as_ac_Lib
    13236                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
    13237 $as_echo "$ac_res" >&6; }
    13238 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
    13239   cat >>confdefs.h <<_ACEOF
    13240 #define HAVE_LIBZ 1
    13241 _ACEOF
     14080               { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
     14081printf "%s\n" "$ac_res" >&6; }
     14082if eval test \"x\$"$as_ac_Lib"\" = x"yes"
     14083then :
     14084  printf "%s\n" "#define HAVE_LIBZ 1" >>confdefs.h
    1324214085
    1324314086  LIBS="-lz $LIBS"
    1324414087
    13245 else
    13246   as_fn_error $? "zlib not installed" "$LINENO" 5
    13247 fi
    13248 
     14088else case e in #(
     14089  e) as_fn_error $? "zlib not installed" "$LINENO" 5 ;;
     14090esac
     14091fi
     14092 ;;
     14093esac
    1324914094fi
    1325014095
     
    1325314098# platforms that don't enable FP exceptions, the function appears in the math
    1325414099# library (typically), it's not an error if it is not found.
    13255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for feenableexcept in -lm" >&5
    13256 $as_echo_n "checking for feenableexcept in -lm... " >&6; }
    13257 if ${ac_cv_lib_m_feenableexcept+:} false; then :
    13258   $as_echo_n "(cached) " >&6
    13259 else
    13260   ac_check_lib_save_LIBS=$LIBS
     14100{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for feenableexcept in -lm" >&5
     14101printf %s "checking for feenableexcept in -lm... " >&6; }
     14102if test ${ac_cv_lib_m_feenableexcept+y}
     14103then :
     14104  printf %s "(cached) " >&6
     14105else case e in #(
     14106  e) ac_check_lib_save_LIBS=$LIBS
    1326114107LIBS="-lm  $LIBS"
    1326214108cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     
    1326514111/* Override any GCC internal prototype to avoid an error.
    1326614112   Use char because int might match the return type of a GCC
    13267    builtin and then its argument prototype would still apply.  */
     14113   builtin and then its argument prototype would still apply.
     14114   The 'extern "C"' is for builds by C++ compilers;
     14115   although this is not generally supported in C code supporting it here
     14116   has little cost and some practical benefit (sr 110532).  */
    1326814117#ifdef __cplusplus
    1326914118extern "C"
    1327014119#endif
    13271 char feenableexcept ();
     14120char feenableexcept (void);
    1327214121int
    13273 main ()
     14122main (void)
    1327414123{
    1327514124return feenableexcept ();
     
    1327814127}
    1327914128_ACEOF
    13280 if ac_fn_c_try_link "$LINENO"; then :
     14129if ac_fn_c_try_link "$LINENO"
     14130then :
    1328114131  ac_cv_lib_m_feenableexcept=yes
    13282 else
    13283   ac_cv_lib_m_feenableexcept=no
    13284 fi
    13285 rm -f core conftest.err conftest.$ac_objext \
     14132else case e in #(
     14133  e) ac_cv_lib_m_feenableexcept=no ;;
     14134esac
     14135fi
     14136rm -f core conftest.err conftest.$ac_objext conftest.beam \
    1328614137    conftest$ac_exeext conftest.$ac_ext
    13287 LIBS=$ac_check_lib_save_LIBS
    13288 fi
    13289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_feenableexcept" >&5
    13290 $as_echo "$ac_cv_lib_m_feenableexcept" >&6; }
    13291 if test "x$ac_cv_lib_m_feenableexcept" = xyes; then :
    13292   cat >>confdefs.h <<_ACEOF
    13293 #define HAVE_LIBM 1
    13294 _ACEOF
     14138LIBS=$ac_check_lib_save_LIBS ;;
     14139esac
     14140fi
     14141{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_feenableexcept" >&5
     14142printf "%s\n" "$ac_cv_lib_m_feenableexcept" >&6; }
     14143if test "x$ac_cv_lib_m_feenableexcept" = xyes
     14144then :
     14145  printf "%s\n" "#define HAVE_LIBM 1" >>confdefs.h
    1329514146
    1329614147  LIBS="-lm $LIBS"
     
    1329814149fi
    1329914150
    13300 for ac_func in feenableexcept
    13301 do :
    13302   ac_fn_c_check_func "$LINENO" "feenableexcept" "ac_cv_func_feenableexcept"
    13303 if test "x$ac_cv_func_feenableexcept" = xyes; then :
    13304   cat >>confdefs.h <<_ACEOF
    13305 #define HAVE_FEENABLEEXCEPT 1
    13306 _ACEOF
    13307 
    13308 fi
    13309 done
    13310 
    13311 
    13312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if using Solaris linker" >&5
    13313 $as_echo_n "checking if using Solaris linker... " >&6; }
     14151ac_fn_c_check_func "$LINENO" "feenableexcept" "ac_cv_func_feenableexcept"
     14152if test "x$ac_cv_func_feenableexcept" = xyes
     14153then :
     14154  printf "%s\n" "#define HAVE_FEENABLEEXCEPT 1" >>confdefs.h
     14155
     14156fi
     14157
     14158
     14159{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if using Solaris linker" >&5
     14160printf %s "checking if using Solaris linker... " >&6; }
    1331414161SLD=`$LD --version 2>&1 | grep Solaris`
    1331514162if test "$SLD"; then
    1331614163    have_solaris_ld=yes
    13317     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
    13318 $as_echo "yes" >&6; }
     14164    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
     14165printf "%s\n" "yes" >&6; }
    1331914166else
    1332014167    have_solaris_ld=no
    13321     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    13322 $as_echo "no" >&6; }
     14168    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     14169printf "%s\n" "no" >&6; }
    1332314170fi
    1332414171 if test "$have_solaris_ld" = "yes"; then
     
    1333114178
    1333214179
    13333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libraries can be versioned" >&5
    13334 $as_echo_n "checking if libraries can be versioned... " >&6; }
     14180{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libraries can be versioned" >&5
     14181printf %s "checking if libraries can be versioned... " >&6; }
    1333514182# Special case for PE/COFF platforms: ld reports
    1333614183# support for version-script, but doesn't actually
     
    1333914186*cygwin* | *mingw32* | *interix* )
    1334014187    have_ld_version_script=no
    13341     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    13342 $as_echo "no" >&6; }
     14188    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     14189printf "%s\n" "no" >&6; }
    1334314190;;
    1334414191* )
     
    1335214199if test "$GLD"; then
    1335314200    have_ld_version_script=yes
    13354     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
    13355 $as_echo "yes" >&6; }
     14201    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
     14202printf "%s\n" "yes" >&6; }
    1335614203else
    1335714204    have_ld_version_script=no
    13358     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    13359 $as_echo "no" >&6; }
    13360     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** You have not enabled versioned symbols." >&5
    13361 $as_echo "$as_me: WARNING: *** You have not enabled versioned symbols." >&2;}
     14205    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
     14206printf "%s\n" "no" >&6; }
     14207    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** You have not enabled versioned symbols." >&5
     14208printf "%s\n" "$as_me: WARNING: *** You have not enabled versioned symbols." >&2;}
    1336214209fi
    1336314210;;
     
    1337414221
    1337514222if test "$have_ld_version_script" = "yes"; then
    13376     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for symbol prefix" >&5
    13377 $as_echo_n "checking for symbol prefix... " >&6; }
     14223    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for symbol prefix" >&5
     14224printf %s "checking for symbol prefix... " >&6; }
    1337814225    SYMBOL_PREFIX=`echo "PREFIX=__USER_LABEL_PREFIX__" \
    1337914226                  | ${CPP-${CC-gcc} -E} - 2>&1 \
     
    1338114228                  | ${SED-sed} -e "s:^PREFIX=::" -e "s:__USER_LABEL_PREFIX__::"`
    1338214229
    13383     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMBOL_PREFIX" >&5
    13384 $as_echo "$SYMBOL_PREFIX" >&6; }
     14230    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SYMBOL_PREFIX" >&5
     14231printf "%s\n" "$SYMBOL_PREFIX" >&6; }
    1338514232fi
    1338614233
     
    1339514242
    1339614243# Check whether --with-pkgconfigdir was given.
    13397 if test "${with_pkgconfigdir+set}" = set; then :
     14244if test ${with_pkgconfigdir+y}
     14245then :
    1339814246  withval=$with_pkgconfigdir; pkgconfigdir=${withval}
    13399 else
    13400   pkgconfigdir='${libdir}/pkgconfig'
    13401 fi
    13402 
    13403 
    13404 
    13405 { $as_echo "$as_me:${as_lineno-$LINENO}: pkgconfig directory is ${pkgconfigdir}" >&5
    13406 $as_echo "$as_me: pkgconfig directory is ${pkgconfigdir}" >&6;}
     14247else case e in #(
     14248  e) pkgconfigdir='${libdir}/pkgconfig' ;;
     14249esac
     14250fi
     14251
     14252
     14253
     14254{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: pkgconfig directory is ${pkgconfigdir}" >&5
     14255printf "%s\n" "$as_me: pkgconfig directory is ${pkgconfigdir}" >&6;}
    1340714256
    1340814257# Make the *-config binary config scripts optional
    1340914258
    1341014259# Check whether --with-binconfigs was given.
    13411 if test "${with_binconfigs+set}" = set; then :
     14260if test ${with_binconfigs+y}
     14261then :
    1341214262  withval=$with_binconfigs; if test "${withval}" = no; then
    1341314263      binconfigs=
    13414       { $as_echo "$as_me:${as_lineno-$LINENO}: libpng-config scripts will not be built" >&5
    13415 $as_echo "$as_me: libpng-config scripts will not be built" >&6;}
     14264      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: libpng-config scripts will not be built" >&5
     14265printf "%s\n" "$as_me: libpng-config scripts will not be built" >&6;}
    1341614266    else
    1341714267      binconfigs='${binconfigs}'
    1341814268    fi
    13419 else
    13420   binconfigs='${binconfigs}'
     14269else case e in #(
     14270  e) binconfigs='${binconfigs}' ;;
     14271esac
    1342114272fi
    1342214273
     
    1342714278
    1342814279# Check whether --with-libpng-prefix was given.
    13429 if test "${with_libpng_prefix+set}" = set; then :
     14280if test ${with_libpng_prefix+y}
     14281then :
    1343014282  withval=$with_libpng_prefix; if test "${withval:-no}" != "no"; then
    1343114283      PNG_PREFIX=${withval}
     
    1344714299# unversioned links are also created (normally as symbolic links):
    1344814300# Check whether --enable-unversioned-links was given.
    13449 if test "${enable_unversioned_links+set}" = set; then :
     14301if test ${enable_unversioned_links+y}
     14302then :
    1345014303  enableval=$enable_unversioned_links;
    1345114304fi
     
    1346414317
    1346514318# Check whether --enable-unversioned-libpng-pc was given.
    13466 if test "${enable_unversioned_libpng_pc+set}" = set; then :
     14319if test ${enable_unversioned_libpng_pc+y}
     14320then :
    1346714321  enableval=$enable_unversioned_libpng_pc;
    1346814322fi
     
    1347814332
    1347914333# Check whether --enable-unversioned-libpng-config was given.
    13480 if test "${enable_unversioned_libpng_config+set}" = set; then :
     14334if test ${enable_unversioned_libpng_config+y}
     14335then :
    1348114336  enableval=$enable_unversioned_libpng_config;
    1348214337fi
     
    1349114346
    1349214347
    13493 # HOST SPECIFIC OPTIONS
     14348# HOST-SPECIFIC OPTIONS
    1349414349# =====================
    1349514350#
     
    1349814353#
    1349914354# Check whether --enable-hardware-optimizations was given.
    13500 if test "${enable_hardware_optimizations+set}" = set; then :
     14355if test ${enable_hardware_optimizations+y}
     14356then :
    1350114357  enableval=$enable_hardware_optimizations; case "$enableval" in
    1350214358      no|off)
     
    1350414360         enable_arm_neon=no
    1350514361
    13506 $as_echo "#define PNG_ARM_NEON_OPT 0" >>confdefs.h
     14362printf "%s\n" "#define PNG_ARM_NEON_OPT 0" >>confdefs.h
    1350714363
    1350814364         enable_mips_msa=no
    1350914365
    13510 $as_echo "#define PNG_MIPS_MSA_OPT 0" >>confdefs.h
     14366printf "%s\n" "#define PNG_MIPS_MSA_OPT 0" >>confdefs.h
     14367
     14368         enable_mips_mmi=no
     14369
     14370printf "%s\n" "#define PNG_MIPS_MMI_OPT 0" >>confdefs.h
    1351114371
    1351214372         enable_powerpc_vsx=no
    1351314373
    13514 $as_echo "#define PNG_POWERPC_VSX_OPT 0" >>confdefs.h
     14374printf "%s\n" "#define PNG_POWERPC_VSX_OPT 0" >>confdefs.h
    1351514375
    1351614376         enable_intel_sse=no
    1351714377
    13518 $as_echo "#define PNG_INTEL_SSE_OPT 0" >>confdefs.h
     14378printf "%s\n" "#define PNG_INTEL_SSE_OPT 0" >>confdefs.h
     14379
     14380         enable_loongarch_lsx=no
     14381
     14382printf "%s\n" "#define PNG_LOONGARCH_LSX_OPT 0" >>confdefs.h
    1351914383
    1352014384         ;;
     
    1352514389              enable_arm_neon=yes
    1352614390
    13527 $as_echo "#define PNG_ARM_NEON_OPT 0" >>confdefs.h
     14391printf "%s\n" "#define PNG_ARM_NEON_OPT 2" >>confdefs.h
    1352814392
    1352914393              ;;
    1353014394            mipsel*|mips64el*)
     14395              enable_mips_mmi=yes
    1353114396              enable_mips_msa=yes
    1353214397
    13533 $as_echo "#define PNG_MIPS_MSA_OPT 0" >>confdefs.h
     14398printf "%s\n" "#define PNG_MIPS_MMI_OPT 1" >>confdefs.h
     14399
     14400
     14401printf "%s\n" "#define PNG_MIPS_MSA_OPT 2" >>confdefs.h
    1353414402
    1353514403              ;;
     
    1353714405              enable_intel_sse=yes
    1353814406
    13539 $as_echo "#define PNG_INTEL_SSE_OPT 1" >>confdefs.h
     14407printf "%s\n" "#define PNG_INTEL_SSE_OPT 1" >>confdefs.h
    1354014408
    1354114409              ;;
     
    1354314411              enable_powerpc_vsx=yes
    1354414412
    13545 $as_echo "#define PNG_POWERPC_VSX_OPT 2" >>confdefs.h
     14413printf "%s\n" "#define PNG_POWERPC_VSX_OPT 2" >>confdefs.h
     14414
     14415              ;;
     14416            loongarch*)
     14417              enable_loongarch_lsx=yes
     14418
     14419printf "%s\n" "#define PNG_LOONGARCH_LSX_OPT 1" >>confdefs.h
    1354614420
    1354714421              ;;
     
    1355814432
    1355914433# Check whether --enable-arm-neon was given.
    13560 if test "${enable_arm_neon+set}" = set; then :
     14434if test ${enable_arm_neon+y}
     14435then :
    1356114436  enableval=$enable_arm_neon; case "$enableval" in
    1356214437      no|off)
    1356314438         # disable the default enabling on __ARM_NEON__ systems:
    1356414439
    13565 $as_echo "#define PNG_ARM_NEON_OPT 0" >>confdefs.h
     14440printf "%s\n" "#define PNG_ARM_NEON_OPT 0" >>confdefs.h
    1356614441
    1356714442         # Prevent inclusion of the assembler files below:
    13568          enable_arm_neon=no;;
     14443         enable_arm_neon=no ;;
    1356914444      check)
    1357014445
    13571 $as_echo "#define PNG_ARM_NEON_CHECK_SUPPORTED /**/" >>confdefs.h
     14446printf "%s\n" "#define PNG_ARM_NEON_CHECK_SUPPORTED /**/" >>confdefs.h
    1357214447;;
    1357314448      api)
    1357414449
    13575 $as_echo "#define PNG_ARM_NEON_API_SUPPORTED /**/" >>confdefs.h
     14450printf "%s\n" "#define PNG_ARM_NEON_API_SUPPORTED /**/" >>confdefs.h
    1357614451;;
    1357714452      yes|on)
    1357814453
    13579 $as_echo "#define PNG_ARM_NEON_OPT 2" >>confdefs.h
    13580 
    13581          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-arm-neon: please specify 'check' or 'api', if
     14454printf "%s\n" "#define PNG_ARM_NEON_OPT 2" >>confdefs.h
     14455
     14456         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable-arm-neon: please specify 'check' or 'api', if
    1358214457            you want the optimizations unconditionally pass -mfpu=neon
    1358314458            to the compiler." >&5
    13584 $as_echo "$as_me: WARNING: --enable-arm-neon: please specify 'check' or 'api', if
     14459printf "%s\n" "$as_me: WARNING: --enable-arm-neon: please specify 'check' or 'api', if
    1358514460            you want the optimizations unconditionally pass -mfpu=neon
    1358614461            to the compiler." >&2;};;
     
    1359114466
    1359214467
    13593 # Add ARM specific files to all builds where the host_cpu is arm ('arm*') or
    13594 # where ARM optimizations were explicitly requested (this allows a fallback if a
    13595 # future host CPU does not match 'arm*')
     14468# 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*')
    1359614471
    1359714472 if test "$enable_arm_neon" != 'no' &&
    1359814473    case "$host_cpu" in
    13599       arm*|aarch64*) :;;
    13600       *)    test "$enable_arm_neon" != '';;
     14474      arm*|aarch64*) : ;;
     14475      *)    test "$enable_arm_neon" != '' ;;
    1360114476    esac; then
    1360214477  PNG_ARM_NEON_TRUE=
     
    1360914484
    1361014485# MIPS
    13611 # ===
     14486# ====
    1361214487#
    1361314488# MIPS MSA (SIMD) support.
    1361414489
    1361514490# Check whether --enable-mips-msa was given.
    13616 if test "${enable_mips_msa+set}" = set; then :
     14491if test ${enable_mips_msa+y}
     14492then :
    1361714493  enableval=$enable_mips_msa; case "$enableval" in
    1361814494      no|off)
    1361914495         # disable the default enabling on __mips_msa systems:
    1362014496
    13621 $as_echo "#define PNG_MIPS_MSA_OPT 0" >>confdefs.h
     14497printf "%s\n" "#define PNG_MIPS_MSA_OPT 0" >>confdefs.h
    1362214498
    1362314499         # Prevent inclusion of the assembler files below:
    13624          enable_mips_msa=no;;
     14500         enable_mips_msa=no ;;
    1362514501      check)
    1362614502
    13627 $as_echo "#define PNG_MIPS_MSA_CHECK_SUPPORTED /**/" >>confdefs.h
     14503printf "%s\n" "#define PNG_MIPS_MSA_CHECK_SUPPORTED /**/" >>confdefs.h
    1362814504;;
    1362914505      api)
    1363014506
    13631 $as_echo "#define PNG_MIPS_MSA_API_SUPPORTED /**/" >>confdefs.h
     14507printf "%s\n" "#define PNG_MIPS_MSA_API_SUPPORTED /**/" >>confdefs.h
    1363214508;;
    1363314509      yes|on)
    1363414510
    13635 $as_echo "#define PNG_MIPS_MSA_OPT 2" >>confdefs.h
    13636 
    13637          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-mips-msa: please specify 'check' or 'api', if
     14511printf "%s\n" "#define PNG_MIPS_MSA_OPT 2" >>confdefs.h
     14512
     14513         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable-mips-msa: please specify 'check' or 'api', if
    1363814514            you want the optimizations unconditionally pass '-mmsa -mfp64'
    1363914515            to the compiler." >&5
    13640 $as_echo "$as_me: WARNING: --enable-mips-msa: please specify 'check' or 'api', if
     14516printf "%s\n" "$as_me: WARNING: --enable-mips-msa: please specify 'check' or 'api', if
    1364114517            you want the optimizations unconditionally pass '-mmsa -mfp64'
    1364214518            to the compiler." >&2;};;
     
    1364714523
    1364814524
     14525# 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
     14529 if test "$enable_mips_msa" != 'no' &&
     14530    case "$host_cpu" in
     14531      mipsel*|mips64el*) : ;;
     14532    esac; then
     14533  PNG_MIPS_MSA_TRUE=
     14534  PNG_MIPS_MSA_FALSE='#'
     14535else
     14536  PNG_MIPS_MSA_TRUE='#'
     14537  PNG_MIPS_MSA_FALSE=
     14538fi
     14539
     14540
     14541# MIPS
     14542# ===
     14543#
     14544# MIPS MMI (SIMD) support.
     14545
     14546# Check whether --enable-mips-mmi was given.
     14547if test ${enable_mips_mmi+y}
     14548then :
     14549  enableval=$enable_mips_mmi; case "$enableval" in
     14550      no|off)
     14551         # disable the default enabling on __mips_mmi systems:
     14552
     14553printf "%s\n" "#define PNG_MIPS_MMI_OPT 0" >>confdefs.h
     14554
     14555         # Prevent inclusion of the assembler files below:
     14556         enable_mips_mmi=no;;
     14557      check)
     14558
     14559printf "%s\n" "#define PNG_MIPS_MMI_CHECK_SUPPORTED /**/" >>confdefs.h
     14560;;
     14561      api)
     14562
     14563printf "%s\n" "#define PNG_MIPS_MMI_API_SUPPORTED /**/" >>confdefs.h
     14564;;
     14565      yes|on)
     14566
     14567printf "%s\n" "#define PNG_MIPS_MMI_OPT 1" >>confdefs.h
     14568
     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
     14572printf "%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;};;
     14575      *)
     14576         as_fn_error $? "--enable-mips-mmi=${enable_mips_mmi}: invalid value" "$LINENO" 5
     14577   esac
     14578fi
     14579
     14580
    1364914581# Add MIPS specific files to all builds where the host_cpu is mips ('mips*') or
    1365014582# where MIPS optimizations were explicitly requested (this allows a fallback if a
    1365114583# future host CPU does not match 'mips*')
    1365214584
    13653  if test "$enable_mips_msa" != 'no' &&
     14585 if test "$enable_mips_mmi" != 'no' &&
    1365414586    case "$host_cpu" in
    1365514587      mipsel*|mips64el*) :;;
    1365614588    esac; then
    13657   PNG_MIPS_MSA_TRUE=
    13658   PNG_MIPS_MSA_FALSE='#'
    13659 else
    13660   PNG_MIPS_MSA_TRUE='#'
    13661   PNG_MIPS_MSA_FALSE=
     14589  PNG_MIPS_MMI_TRUE=
     14590  PNG_MIPS_MMI_FALSE='#'
     14591else
     14592  PNG_MIPS_MMI_TRUE='#'
     14593  PNG_MIPS_MMI_FALSE=
    1366214594fi
    1366314595
     
    1366914601
    1367014602# Check whether --enable-intel-sse was given.
    13671 if test "${enable_intel_sse+set}" = set; then :
     14603if test ${enable_intel_sse+y}
     14604then :
    1367214605  enableval=$enable_intel_sse; case "$enableval" in
    1367314606      no|off)
    1367414607         # disable the default enabling:
    1367514608
    13676 $as_echo "#define PNG_INTEL_SSE_OPT 0" >>confdefs.h
     14609printf "%s\n" "#define PNG_INTEL_SSE_OPT 0" >>confdefs.h
    1367714610
    1367814611         # Prevent inclusion of the assembler files below:
    13679          enable_intel_sse=no;;
     14612         enable_intel_sse=no ;;
    1368014613      yes|on)
    1368114614
    13682 $as_echo "#define PNG_INTEL_SSE_OPT 1" >>confdefs.h
     14615printf "%s\n" "#define PNG_INTEL_SSE_OPT 1" >>confdefs.h
    1368314616;;
    1368414617      *)
     
    1368814621
    1368914622
    13690 # Add Intel specific files to all builds where the host_cpu is Intel ('x86*')
    13691 # or where Intel optimizations were explicitly requested (this allows a
    13692 # fallback if a future host CPU does not match 'x86*')
     14623# 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*')
    1369314626 if test "$enable_intel_sse" != 'no' &&
    1369414627    case "$host_cpu" in
    13695       i?86|x86_64) :;;
    13696       *)    test "$enable_intel_sse" != '';;
     14628      i?86|x86_64) : ;;
     14629      *)    test "$enable_intel_sse" != '' ;;
    1369714630    esac; then
    1369814631  PNG_INTEL_SSE_TRUE=
     
    1370514638
    1370614639# PowerPC
    13707 # ===
     14640# =======
    1370814641#
    1370914642# PowerPC VSX (SIMD) support.
    1371014643
    1371114644# Check whether --enable-powerpc-vsx was given.
    13712 if test "${enable_powerpc_vsx+set}" = set; then :
     14645if test ${enable_powerpc_vsx+y}
     14646then :
    1371314647  enableval=$enable_powerpc_vsx; case "$enableval" in
    1371414648      no|off)
    1371514649         # disable the default enabling on __ppc64__ systems:
    1371614650
    13717 $as_echo "#define PNG_POWERPC_VSX_OPT 0" >>confdefs.h
    13718 
    13719          # Prevent inclusion of the platform specific files below:
    13720          enable_powerpc_vsx=no;;
     14651printf "%s\n" "#define PNG_POWERPC_VSX_OPT 0" >>confdefs.h
     14652
     14653         # Prevent inclusion of the platform-specific files below:
     14654         enable_powerpc_vsx=no ;;
    1372114655      check)
    1372214656
    13723 $as_echo "#define PNG_POWERPC_VSX_CHECK_SUPPORTED /**/" >>confdefs.h
    13724 
    13725          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-powerpc-vsx Please check contrib/powerpc/README file
     14657printf "%s\n" "#define PNG_POWERPC_VSX_CHECK_SUPPORTED /**/" >>confdefs.h
     14658
     14659         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable-powerpc-vsx Please check contrib/powerpc/README file
    1372614660            for the list of supported OSes." >&5
    13727 $as_echo "$as_me: WARNING: --enable-powerpc-vsx Please check contrib/powerpc/README file
     14661printf "%s\n" "$as_me: WARNING: --enable-powerpc-vsx Please check contrib/powerpc/README file
    1372814662            for the list of supported OSes." >&2;};;
    1372914663      api)
    1373014664
    13731 $as_echo "#define PNG_POWERPC_VSX_API_SUPPORTED /**/" >>confdefs.h
     14665printf "%s\n" "#define PNG_POWERPC_VSX_API_SUPPORTED /**/" >>confdefs.h
    1373214666;;
    1373314667      yes|on)
    1373414668
    13735 $as_echo "#define PNG_POWERPC_VSX_OPT 2" >>confdefs.h
    13736 
    13737          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-powerpc-vsx: please specify 'check' or 'api', if
     14669printf "%s\n" "#define PNG_POWERPC_VSX_OPT 2" >>confdefs.h
     14670
     14671         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable-powerpc-vsx: please specify 'check' or 'api', if
    1373814672            you want the optimizations unconditionally pass '-maltivec -mvsx'
    13739             or '-mcpu=power8'to the compiler." >&5
    13740 $as_echo "$as_me: WARNING: --enable-powerpc-vsx: please specify 'check' or 'api', if
     14673            or '-mcpu=power8' to the compiler." >&5
     14674printf "%s\n" "$as_me: WARNING: --enable-powerpc-vsx: please specify 'check' or 'api', if
    1374114675            you want the optimizations unconditionally pass '-maltivec -mvsx'
    13742             or '-mcpu=power8'to the compiler." >&2;};;
     14676            or '-mcpu=power8' to the compiler." >&2;};;
    1374314677      *)
    1374414678         as_fn_error $? "--enable-powerpc-vsx=${enable_powerpc_vsx}: invalid value" "$LINENO" 5
     
    1374714681
    1374814682
    13749 # Add PowerPC specific files to all builds where the host_cpu is powerpc('powerpc*') or
    13750 # where POWERPC optimizations were explicitly requested (this allows a fallback if a
    13751 # future host CPU does not match 'powerpc*')
     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*')
    1375214686
    1375314687 if test "$enable_powerpc_vsx" != 'no' &&
    1375414688    case "$host_cpu" in
    13755       powerpc*|ppc64*) :;;
     14689      powerpc*|ppc64*) : ;;
    1375614690    esac; then
    1375714691  PNG_POWERPC_VSX_TRUE=
     
    1376314697
    1376414698
    13765 
    13766 { $as_echo "$as_me:${as_lineno-$LINENO}: Extra options for compiler: $PNG_COPTS" >&5
    13767 $as_echo "$as_me: Extra options for compiler: $PNG_COPTS" >&6;}
     14699# LOONGARCH
     14700# ===
     14701#
     14702# LOONGARCH LSX (SIMD) support
     14703
     14704if test "$LSX_CFLAGS" = ''; then
     14705    LSX_CFLAGS="-mlsx"
     14706fi
     14707
     14708compiler_support_loongarch_lsx=no
     14709{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use loongarch LSX intrinsics" >&5
     14710printf %s "checking whether to use loongarch LSX intrinsics... " >&6; }
     14711save_CFLAGS=$CFLAGS
     14712CFLAGS="$CFLAGS $LSX_CFLAGS"
     14713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     14714/* end confdefs.h.  */
     14715
     14716#include<lsxintrin.h>
     14717int main(){
     14718    __m128i a, b, c;
     14719    a = __lsx_vadd_w(b, c);
     14720    return 0;
     14721}
     14722_ACEOF
     14723if ac_fn_c_try_compile "$LINENO"
     14724then :
     14725  compiler_support_loongarch_lsx=yes
     14726fi
     14727rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
     14728CFLAGS=$save_CFLAGS
     14729{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $compiler_support_loongarch_lsx" >&5
     14730printf "%s\n" "$compiler_support_loongarch_lsx" >&6; }
     14731
     14732# Check whether --enable-loongarch-lsx was given.
     14733if test ${enable_loongarch_lsx+y}
     14734then :
     14735  enableval=$enable_loongarch_lsx; case "$enableval" in
     14736      no|off)
     14737         # disable the default enabling on __loongarch_simd systems:
     14738
     14739printf "%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
     14745printf "%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
     14751fi
     14752
     14753
     14754if test "$enable_loongarch_lsx" != 'no'; then
     14755   if test $compiler_support_loongarch_lsx = yes; then
     14756
     14757printf "%s\n" "#define PNG_LOONGARCH_LSX_OPT 1" >>confdefs.h
     14758
     14759   else
     14760      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Compiler does not support loongarch LSX." >&5
     14761printf "%s\n" "$as_me: WARNING: Compiler does not support loongarch LSX." >&2;}
     14762   fi
     14763fi
     14764
     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 &&
     14770    case "$host_cpu" in
     14771      loongarch*) :;;
     14772      *)    test "$enable_loongarch_lsx" != '';;
     14773    esac; then
     14774  PNG_LOONGARCH_LSX_TRUE=
     14775  PNG_LOONGARCH_LSX_FALSE='#'
     14776else
     14777  PNG_LOONGARCH_LSX_TRUE='#'
     14778  PNG_LOONGARCH_LSX_FALSE=
     14779fi
     14780
     14781
     14782{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Extra options for compiler: $PNG_COPTS" >&5
     14783printf "%s\n" "$as_me: Extra options for compiler: $PNG_COPTS" >&6;}
    1376814784
    1376914785# Config files, substituting as above
     
    1378314799# the --recheck option to rerun configure.
    1378414800#
    13785 # `ac_cv_env_foo' variables (set or unset) will be overridden when
    13786 # loading this file, other *unset* `ac_cv_foo' will be assigned the
     14801# 'ac_cv_env_foo' variables (set or unset) will be overridden when
     14802# loading this file, other *unset* 'ac_cv_foo' will be assigned the
    1378714803# following values.
    1378814804
     
    1380014816    *${as_nl}*)
    1380114817      case $ac_var in #(
    13802       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
    13803 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
     14818      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
     14819printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
    1380414820      esac
    1380514821      case $ac_var in #(
     
    1381414830    case $as_nl`(ac_space=' '; set) 2>&1` in #(
    1381514831    *${as_nl}ac_space=\ *)
    13816       # `set' does not quote correctly, so add quotes: double-quote
     14832      # 'set' does not quote correctly, so add quotes: double-quote
    1381714833      # substitution turns \\\\ into \\, and sed turns \\ into \.
    1381814834      sed -n \
     
    1382114837      ;; #(
    1382214838    *)
    13823       # `set' quotes correctly as required by POSIX, so do not add quotes.
     14839      # 'set' quotes correctly as required by POSIX, so do not add quotes.
    1382414840      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
    1382514841      ;;
     
    1383114847     t clear
    1383214848     :clear
    13833      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
     14849     s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
    1383414850     t end
    1383514851     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
     
    1383814854  if test -w "$cache_file"; then
    1383914855    if test "x$cache_file" != "x/dev/null"; then
    13840       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
    13841 $as_echo "$as_me: updating cache $cache_file" >&6;}
     14856      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
     14857printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
    1384214858      if test ! -f "$cache_file" || test -h "$cache_file"; then
    1384314859        cat confcache >"$cache_file"
     
    1385314869    fi
    1385414870  else
    13855     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
    13856 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
     14871    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
     14872printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
    1385714873  fi
    1385814874fi
     
    1387114887  # 1. Remove the extension, and $U if already installed.
    1387214888  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
    13873   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
     14889  ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
    1387414890  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
    1387514891  #    will be set to the directory where LIBOBJS objects are built.
     
    1388214898
    1388314899
    13884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
    13885 $as_echo_n "checking that generated files are newer than configure... " >&6; }
     14900{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
     14901printf %s "checking that generated files are newer than configure... " >&6; }
    1388614902   if test -n "$am_sleep_pid"; then
    1388714903     # Hide warnings about reused PIDs.
    1388814904     wait $am_sleep_pid 2>/dev/null
    1388914905   fi
    13890    { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
    13891 $as_echo "done" >&6; }
     14906   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
     14907printf "%s\n" "done" >&6; }
    1389214908 if test -n "$EXEEXT"; then
    1389314909  am__EXEEXT_TRUE=
     
    1391414930Usually this means the macro was only invoked conditionally." "$LINENO" 5
    1391514931fi
     14932if test -z "${ENABLE_TESTS_TRUE}" && test -z "${ENABLE_TESTS_FALSE}"; then
     14933  as_fn_error $? "conditional \"ENABLE_TESTS\" was never defined.
     14934Usually this means the macro was only invoked conditionally." "$LINENO" 5
     14935fi
     14936if test -z "${ENABLE_TOOLS_TRUE}" && test -z "${ENABLE_TOOLS_FALSE}"; then
     14937  as_fn_error $? "conditional \"ENABLE_TOOLS\" was never defined.
     14938Usually this means the macro was only invoked conditionally." "$LINENO" 5
     14939fi
    1391614940if test -z "${HAVE_CLOCK_GETTIME_TRUE}" && test -z "${HAVE_CLOCK_GETTIME_FALSE}"; then
    1391714941  as_fn_error $? "conditional \"HAVE_CLOCK_GETTIME\" was never defined.
     
    1395014974Usually this means the macro was only invoked conditionally." "$LINENO" 5
    1395114975fi
     14976if test -z "${PNG_MIPS_MMI_TRUE}" && test -z "${PNG_MIPS_MMI_FALSE}"; then
     14977  as_fn_error $? "conditional \"PNG_MIPS_MMI\" was never defined.
     14978Usually this means the macro was only invoked conditionally." "$LINENO" 5
     14979fi
    1395214980if test -z "${PNG_INTEL_SSE_TRUE}" && test -z "${PNG_INTEL_SSE_FALSE}"; then
    1395314981  as_fn_error $? "conditional \"PNG_INTEL_SSE\" was never defined.
     
    1395614984if test -z "${PNG_POWERPC_VSX_TRUE}" && test -z "${PNG_POWERPC_VSX_FALSE}"; then
    1395714985  as_fn_error $? "conditional \"PNG_POWERPC_VSX\" was never defined.
     14986Usually this means the macro was only invoked conditionally." "$LINENO" 5
     14987fi
     14988if test -z "${PNG_LOONGARCH_LSX_TRUE}" && test -z "${PNG_LOONGARCH_LSX_FALSE}"; then
     14989  as_fn_error $? "conditional \"PNG_LOONGARCH_LSX\" was never defined.
    1395814990Usually this means the macro was only invoked conditionally." "$LINENO" 5
    1395914991fi
     
    1396314995ac_clean_files_save=$ac_clean_files
    1396414996ac_clean_files="$ac_clean_files $CONFIG_STATUS"
    13965 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
    13966 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
     14997{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
     14998printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
    1396714999as_write_fail=0
    1396815000cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
     
    1398715019# Be more Bourne compatible
    1398815020DUALCASE=1; export DUALCASE # for MKS sh
    13989 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
     15021if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
     15022then :
    1399015023  emulate sh
    1399115024  NULLCMD=:
     
    1399415027  alias -g '${1+"$@"}'='"$@"'
    1399515028  setopt NO_GLOB_SUBST
    13996 else
    13997   case `(set -o) 2>/dev/null` in #(
     15029else case e in #(
     15030  e) case `(set -o) 2>/dev/null` in #(
    1399815031  *posix*) :
    1399915032    set -o posix ;; #(
    1400015033  *) :
    1400115034     ;;
    14002 esac
    14003 fi
    14004 
    14005 
     15035esac ;;
     15036esac
     15037fi
     15038
     15039
     15040
     15041# Reset variables that may have inherited troublesome values from
     15042# the environment.
     15043
     15044# IFS needs to be set, to space, tab, and newline, in precisely that order.
     15045# (If _AS_PATH_WALK were called with IFS unset, it would have the
     15046# side effect of setting IFS to empty, thus disabling word splitting.)
     15047# Quoting is to prevent editors from complaining about space-tab.
    1400615048as_nl='
    1400715049'
    1400815050export as_nl
    14009 # Printing a long string crashes Solaris 7 /usr/bin/printf.
    14010 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
    14011 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
    14012 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
    14013 # Prefer a ksh shell builtin over an external printf program on Solaris,
    14014 # but without wasting forks for bash or zsh.
    14015 if test -z "$BASH_VERSION$ZSH_VERSION" \
    14016     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
    14017   as_echo='print -r --'
    14018   as_echo_n='print -rn --'
    14019 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
    14020   as_echo='printf %s\n'
    14021   as_echo_n='printf %s'
    14022 else
    14023   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
    14024     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
    14025     as_echo_n='/usr/ucb/echo -n'
    14026   else
    14027     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
    14028     as_echo_n_body='eval
    14029       arg=$1;
    14030       case $arg in #(
    14031       *"$as_nl"*)
    14032         expr "X$arg" : "X\\(.*\\)$as_nl";
    14033         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
    14034       esac;
    14035       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
    14036     '
    14037     export as_echo_n_body
    14038     as_echo_n='sh -c $as_echo_n_body as_echo'
    14039   fi
    14040   export as_echo_body
    14041   as_echo='sh -c $as_echo_body as_echo'
    14042 fi
     15051IFS=" ""        $as_nl"
     15052
     15053PS1='$ '
     15054PS2='> '
     15055PS4='+ '
     15056
     15057# Ensure predictable behavior from utilities with locale-dependent output.
     15058LC_ALL=C
     15059export LC_ALL
     15060LANGUAGE=C
     15061export LANGUAGE
     15062
     15063# We cannot yet rely on "unset" to work, but we need these variables
     15064# to be unset--not just set to an empty or harmless value--now, to
     15065# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
     15066# also avoids known problems related to "unset" and subshell syntax
     15067# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
     15068for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
     15069do eval test \${$as_var+y} \
     15070  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
     15071done
     15072
     15073# Ensure that fds 0, 1, and 2 are open.
     15074if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
     15075if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
     15076if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
    1404315077
    1404415078# The user is always right.
    14045 if test "${PATH_SEPARATOR+set}" != set; then
     15079if ${PATH_SEPARATOR+false} :; then
    1404615080  PATH_SEPARATOR=:
    1404715081  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
     
    1405115085fi
    1405215086
    14053 
    14054 # IFS
    14055 # We need space, tab and new line, in precisely that order.  Quoting is
    14056 # there to prevent editors from complaining about space-tab.
    14057 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
    14058 # splitting by setting IFS to empty value.)
    14059 IFS=" ""        $as_nl"
    1406015087
    1406115088# Find who we are.  Look in the path if we contain no directory separator.
     
    1406715094do
    1406815095  IFS=$as_save_IFS
    14069   test -z "$as_dir" && as_dir=.
    14070     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
     15096  case $as_dir in #(((
     15097    '') as_dir=./ ;;
     15098    */) ;;
     15099    *) as_dir=$as_dir/ ;;
     15100  esac
     15101    test -r "$as_dir$0" && as_myself=$as_dir$0 && break
    1407115102  done
    1407215103IFS=$as_save_IFS
     
    1407415105     ;;
    1407515106esac
    14076 # We did not find ourselves, most probably we were run as `sh COMMAND'
     15107# We did not find ourselves, most probably we were run as 'sh COMMAND'
    1407715108# in which case we are not to be found in the path.
    1407815109if test "x$as_myself" = x; then
     
    1408015111fi
    1408115112if test ! -f "$as_myself"; then
    14082   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
     15113  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
    1408315114  exit 1
    1408415115fi
    1408515116
    14086 # Unset variables that we do not need and which cause bugs (e.g. in
    14087 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
    14088 # suppresses any "Segmentation fault" message there.  '((' could
    14089 # trigger a bug in pdksh 5.2.14.
    14090 for as_var in BASH_ENV ENV MAIL MAILPATH
    14091 do eval test x\${$as_var+set} = xset \
    14092   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
    14093 done
    14094 PS1='$ '
    14095 PS2='> '
    14096 PS4='+ '
    14097 
    14098 # NLS nuisances.
    14099 LC_ALL=C
    14100 export LC_ALL
    14101 LANGUAGE=C
    14102 export LANGUAGE
    14103 
    14104 # CDPATH.
    14105 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
    1410615117
    1410715118
     
    1411615127  if test "$4"; then
    1411715128    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
    14118     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
     15129    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
    1411915130  fi
    14120   $as_echo "$as_me: error: $2" >&2
     15131  printf "%s\n" "$as_me: error: $2" >&2
    1412115132  as_fn_exit $as_status
    1412215133} # as_fn_error
     
    1414915160}
    1415015161as_unset=as_fn_unset
     15162
    1415115163# as_fn_append VAR VALUE
    1415215164# ----------------------
     
    1415515167# repeated appends, instead of the typical quadratic growth present in naive
    1415615168# implementations.
    14157 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
     15169if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
     15170then :
    1415815171  eval 'as_fn_append ()
    1415915172  {
    1416015173    eval $1+=\$2
    1416115174  }'
    14162 else
    14163   as_fn_append ()
     15175else case e in #(
     15176  e) as_fn_append ()
    1416415177  {
    1416515178    eval $1=\$$1\$2
    14166   }
     15179  } ;;
     15180esac
    1416715181fi # as_fn_append
    1416815182
     
    1417215186# global $as_val. Take advantage of shells that can avoid forks. The arguments
    1417315187# must be portable across $(()) and expr.
    14174 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
     15188if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
     15189then :
    1417515190  eval 'as_fn_arith ()
    1417615191  {
    1417715192    as_val=$(( $* ))
    1417815193  }'
    14179 else
    14180   as_fn_arith ()
     15194else case e in #(
     15195  e) as_fn_arith ()
    1418115196  {
    1418215197    as_val=`expr "$@" || test $? -eq 1`
    14183   }
     15198  } ;;
     15199esac
    1418415200fi # as_fn_arith
    1418515201
     
    1420815224         X"$0" : 'X\(//\)$' \| \
    1420915225         X"$0" : 'X\(/\)' \| . 2>/dev/null ||
    14210 $as_echo X/"$0" |
     15226printf "%s\n" X/"$0" |
    1421115227    sed '/^.*\/\([^/][^/]*\)\/*$/{
    1421215228            s//\1/
     
    1423015246as_cr_alnum=$as_cr_Letters$as_cr_digits
    1423115247
     15248
     15249# Determine whether it's possible to make 'echo' print without a newline.
     15250# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
     15251# for compatibility with existing Makefiles.
    1423215252ECHO_C= ECHO_N= ECHO_T=
    1423315253case `echo -n x` in #(((((
     
    1424315263esac
    1424415264
     15265# For backward compatibility with old third-party macros, we provide
     15266# the shell variables $as_echo and $as_echo_n.  New code should use
     15267# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
     15268as_echo='printf %s\n'
     15269as_echo_n='printf %s'
     15270
    1424515271rm -f conf$$ conf$$.exe conf$$.file
    1424615272if test -d conf$$.dir; then
     
    1425415280    as_ln_s='ln -s'
    1425515281    # ... but there are two gotchas:
    14256     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
    14257     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
    14258     # In both cases, we have to default to `cp -pR'.
     15282    # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail.
     15283    # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable.
     15284    # In both cases, we have to default to 'cp -pR'.
    1425915285    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
    1426015286      as_ln_s='cp -pR'
     
    1428415310    while :; do
    1428515311      case $as_dir in #(
    14286       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
     15312      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
    1428715313      *) as_qdir=$as_dir;;
    1428815314      esac
     
    1429315319         X"$as_dir" : 'X\(//\)$' \| \
    1429415320         X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
    14295 $as_echo X"$as_dir" |
     15321printf "%s\n" X"$as_dir" |
    1429615322    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
    1429715323            s//\1/
     
    1433715363
    1433815364# Sed expression to map a string onto a valid CPP name.
    14339 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
     15365as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
     15366as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated
    1434015367
    1434115368# Sed expression to map a string onto a valid variable name.
    14342 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
     15369as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
     15370as_tr_sh="eval sed '$as_sed_sh'" # deprecated
    1434315371
    1434415372
     
    1435515383# values after options handling.
    1435615384ac_log="
    14357 This file was extended by libpng $as_me 1.6.37, which was
    14358 generated by GNU Autoconf 2.69.  Invocation command line was
     15385This file was extended by libpng $as_me 1.6.42, which was
     15386generated by GNU Autoconf 2.72.  Invocation command line was
    1435915387
    1436015388  CONFIG_FILES    = $CONFIG_FILES
     
    1438815416cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
    1438915417ac_cs_usage="\
    14390 \`$as_me' instantiates files and other configuration actions
     15418'$as_me' instantiates files and other configuration actions
    1439115419from templates according to the current configuration.  Unless the files
    1439215420and actions are specified as TAGs, all are instantiated by default.
     
    1441815446
    1441915447_ACEOF
     15448ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
     15449ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
    1442015450cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
    14421 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
     15451ac_cs_config='$ac_cs_config_escaped'
    1442215452ac_cs_version="\\
    14423 libpng config.status 1.6.37
    14424 configured by $0, generated by GNU Autoconf 2.69,
     15453libpng config.status 1.6.42
     15454configured by $0, generated by GNU Autoconf 2.72,
    1442515455  with options \\"\$ac_cs_config\\"
    1442615456
    14427 Copyright (C) 2012 Free Software Foundation, Inc.
     15457Copyright (C) 2023 Free Software Foundation, Inc.
    1442815458This config.status script is free software; the Free Software Foundation
    1442915459gives unlimited permission to copy, distribute and modify it."
     
    1446515495    ac_cs_recheck=: ;;
    1446615496  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
    14467     $as_echo "$ac_cs_version"; exit ;;
     15497    printf "%s\n" "$ac_cs_version"; exit ;;
    1446815498  --config | --confi | --conf | --con | --co | --c )
    14469     $as_echo "$ac_cs_config"; exit ;;
     15499    printf "%s\n" "$ac_cs_config"; exit ;;
    1447015500  --debug | --debu | --deb | --de | --d | -d )
    1447115501    debug=: ;;
     
    1447315503    $ac_shift
    1447415504    case $ac_optarg in
    14475     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
     15505    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
    1447615506    '') as_fn_error $? "missing file argument" ;;
    1447715507    esac
     
    1448115511    $ac_shift
    1448215512    case $ac_optarg in
    14483     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
     15513    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
    1448415514    esac
    1448515515    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
     
    1448715517  --he | --h)
    1448815518    # Conflict between --help and --header
    14489     as_fn_error $? "ambiguous option: \`$1'
    14490 Try \`$0 --help' for more information.";;
     15519    as_fn_error $? "ambiguous option: '$1'
     15520Try '$0 --help' for more information.";;
    1449115521  --help | --hel | -h )
    14492     $as_echo "$ac_cs_usage"; exit ;;
     15522    printf "%s\n" "$ac_cs_usage"; exit ;;
    1449315523  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
    1449415524  | -silent | --silent | --silen | --sile | --sil | --si | --s)
     
    1449615526
    1449715527  # This is an error.
    14498   -*) as_fn_error $? "unrecognized option: \`$1'
    14499 Try \`$0 --help' for more information." ;;
     15528  -*) as_fn_error $? "unrecognized option: '$1'
     15529Try '$0 --help' for more information." ;;
    1450015530
    1450115531  *) as_fn_append ac_config_targets " $1"
     
    1451815548  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
    1451915549  shift
    14520   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
     15550  \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
    1452115551  CONFIG_SHELL='$SHELL'
    1452215552  export CONFIG_SHELL
     
    1453215562## Running $as_me. ##
    1453315563_ASBOX
    14534   $as_echo "$ac_log"
     15564  printf "%s\n" "$ac_log"
    1453515565} >&5
    1453615566
     
    1458715617reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
    1458815618reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
     15619FILECMD='`$ECHO "$FILECMD" | $SED "$delay_single_quote_subst"`'
    1458915620deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
    1459015621file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
     
    1459315624sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
    1459415625AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
     15626lt_ar_flags='`$ECHO "$lt_ar_flags" | $SED "$delay_single_quote_subst"`'
    1459515627AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
    1459615628archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
     
    1471615748lt_NL2SP \
    1471715749reload_flag \
     15750FILECMD \
    1471815751deplibs_check_method \
    1471915752file_magic_cmd \
     
    1472215755sharedlib_from_linklib_cmd \
    1472315756AR \
    14724 AR_FLAGS \
    1472515757archiver_list_spec \
    1472615758STRIP \
     
    1484215874    "libpng-config") CONFIG_FILES="$CONFIG_FILES libpng-config:libpng-config.in" ;;
    1484315875
    14844   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
     15876  *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;;
    1484515877  esac
    1484615878done
     
    1485215884# bizarre bug on SunOS 4.1.3.
    1485315885if $ac_need_defaults; then
    14854   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
    14855   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
    14856   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
     15886  test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
     15887  test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
     15888  test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
    1485715889fi
    1485815890
     
    1486215894# Hook for its removal unless debugging.
    1486315895# Note that there is a small window in which the directory will not be cleaned:
    14864 # after its creation but before its name has been assigned to `$tmp'.
     15896# after its creation but before its name has been assigned to '$tmp'.
    1486515897$debug ||
    1486615898{
     
    1488615918# Set up the scripts for CONFIG_FILES section.
    1488715919# No need to generate them if there are no CONFIG_FILES.
    14888 # This happens for instance with `./config.status config.h'.
     15920# This happens for instance with './config.status config.h'.
    1488915921if test -n "$CONFIG_FILES"; then
    1489015922
     
    1504416076# Set up the scripts for CONFIG_HEADERS section.
    1504516077# No need to generate them if there are no CONFIG_HEADERS.
    15046 # This happens for instance with `./config.status Makefile'.
     16078# This happens for instance with './config.status Makefile'.
    1504716079if test -n "$CONFIG_HEADERS"; then
    1504816080cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
     
    1505016082_ACEOF
    1505116083
    15052 # Transform confdefs.h into an awk script `defines.awk', embedded as
     16084# Transform confdefs.h into an awk script 'defines.awk', embedded as
    1505316085# here-document in config.status, that substitutes the proper values into
    1505416086# config.h.in to produce config.h.
     
    1516016192  case $ac_mode$ac_tag in
    1516116193  :[FHL]*:*);;
    15162   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
     16194  :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;;
    1516316195  :[FH]-) ac_tag=-:-;;
    1516416196  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
     
    1518216214      *) # Look for the file first in the build tree, then in the source tree
    1518316215         # (if the path is not absolute).  The absolute path cannot be DOS-style,
    15184          # because $ac_f cannot contain `:'.
     16216         # because $ac_f cannot contain ':'.
    1518516217         test -f "$ac_f" ||
    1518616218           case $ac_f in
     
    1518816220           *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
    1518916221           esac ||
    15190            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
     16222           as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;;
    1519116223      esac
    15192       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
     16224      case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
    1519316225      as_fn_append ac_file_inputs " '$ac_f'"
    1519416226    done
    1519516227
    15196     # Let's still pretend it is `configure' which instantiates (i.e., don't
     16228    # Let's still pretend it is 'configure' which instantiates (i.e., don't
    1519716229    # use $as_me), people would be surprised to read:
    1519816230    #    /* config.h.  Generated by config.status.  */
    1519916231    configure_input='Generated from '`
    15200           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
     16232          printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
    1520116233        `' by configure.'
    1520216234    if test x"$ac_file" != x-; then
    1520316235      configure_input="$ac_file.  $configure_input"
    15204       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
    15205 $as_echo "$as_me: creating $ac_file" >&6;}
     16236      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
     16237printf "%s\n" "$as_me: creating $ac_file" >&6;}
    1520616238    fi
    1520716239    # Neutralize special characters interpreted by sed in replacement strings.
    1520816240    case $configure_input in #(
    1520916241    *\&* | *\|* | *\\* )
    15210        ac_sed_conf_input=`$as_echo "$configure_input" |
     16242       ac_sed_conf_input=`printf "%s\n" "$configure_input" |
    1521116243       sed 's/[\\\\&|]/\\\\&/g'`;; #(
    1521216244    *) ac_sed_conf_input=$configure_input;;
     
    1522516257         X"$ac_file" : 'X\(//\)$' \| \
    1522616258         X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
    15227 $as_echo X"$ac_file" |
     16259printf "%s\n" X"$ac_file" |
    1522816260    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
    1522916261            s//\1/
     
    1524916281.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
    1525016282*)
    15251   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
     16283  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
    1525216284  # A ".." for each directory in $ac_dir_suffix.
    15253   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
     16285  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
    1525416286  case $ac_top_builddir_sub in
    1525516287  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
     
    1531316345*datarootdir*) ac_datarootdir_seen=yes;;
    1531416346*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
    15315   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
    15316 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
     16347  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
     16348printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
    1531716349_ACEOF
    1531816350cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
     
    1532716359_ACEOF
    1532816360
    15329 # Neutralize VPATH when `$srcdir' = `.'.
     16361# Neutralize VPATH when '$srcdir' = '.'.
    1533016362# Shell code in configure.ac might set extrasub.
    1533116363# FIXME: do we really want to maintain this feature?
     
    1535816390  { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
    1535916391      "$ac_tmp/out"`; test -z "$ac_out"; } &&
    15360   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
     16392  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable 'datarootdir'
    1536116393which seems to be undefined.  Please make sure it is defined" >&5
    15362 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
     16394printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir'
    1536316395which seems to be undefined.  Please make sure it is defined" >&2;}
    1536416396
     
    1537616408  if test x"$ac_file" != x-; then
    1537716409    {
    15378       $as_echo "/* $configure_input  */" \
     16410      printf "%s\n" "/* $configure_input  */" >&1 \
    1537916411      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
    1538016412    } >"$ac_tmp/config.h" \
    1538116413      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
    1538216414    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
    15383       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
    15384 $as_echo "$as_me: $ac_file is unchanged" >&6;}
     16415      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
     16416printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
    1538516417    else
    1538616418      rm -f "$ac_file"
     
    1538916421    fi
    1539016422  else
    15391     $as_echo "/* $configure_input  */" \
     16423    printf "%s\n" "/* $configure_input  */" >&1 \
    1539216424      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
    1539316425      || as_fn_error $? "could not create -" "$LINENO" 5
     
    1540916441         X"$_am_arg" : 'X\(//\)$' \| \
    1541016442         X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
    15411 $as_echo X"$_am_arg" |
     16443printf "%s\n" X"$_am_arg" |
    1541216444    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
    1541316445            s//\1/
     
    1542916461 ;;
    1543016462
    15431   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
    15432 $as_echo "$as_me: executing $ac_file commands" >&6;}
     16463  :C)  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
     16464printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
    1543316465 ;;
    1543416466  esac
     
    1545616488  do
    1545716489    # Strip MF so we end up with the name of the file.
    15458     am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'`
     16490    am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
    1545916491    # Check whether this is an Automake generated Makefile which includes
    1546016492    # dependency-tracking related rules and includes.
     
    1546816500         X"$am_mf" : 'X\(//\)$' \| \
    1546916501         X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
    15470 $as_echo X"$am_mf" |
     16502printf "%s\n" X"$am_mf" |
    1547116503    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
    1547216504            s//\1/
     
    1549016522         X"$am_mf" : 'X\(//\)$' \| \
    1549116523         X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
    15492 $as_echo X/"$am_mf" |
     16524printf "%s\n" X/"$am_mf" |
    1549316525    sed '/^.*\/\([^/][^/]*\)\/*$/{
    1549416526            s//\1/
     
    1551516547  done
    1551616548  if test $am_rc -ne 0; then
    15517     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
    15518 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     16549    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
     16550printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
    1551916551as_fn_error $? "Something went wrong bootstrapping makefile fragments
    15520     for automatic dependency tracking.  Try re-running configure with the
     16552    for automatic dependency tracking.  If GNU make was not used, consider
     16553    re-running the configure script with MAKE=\"gmake\" (or whatever is
     16554    necessary).  You can also try re-running configure with the
    1552116555    '--disable-dependency-tracking' option to at least be able to build
    1552216556    the package (albeit without support for automatic dependency tracking).
    15523 See \`config.log' for more details" "$LINENO" 5; }
     16557See 'config.log' for more details" "$LINENO" 5; }
    1552416558  fi
    1552516559  { am_dirpart=; unset am_dirpart;}
     
    1567416708to_tool_file_cmd=$lt_cv_to_tool_file_cmd
    1567516709
     16710# A file(cmd) program that detects file types.
     16711FILECMD=$lt_FILECMD
     16712
    1567616713# Method to check whether dependent libraries are shared objects.
    1567716714deplibs_check_method=$lt_deplibs_check_method
     
    1569216729AR=$lt_AR
    1569316730
     16731# Flags to create an archive (by configure).
     16732lt_ar_flags=$lt_ar_flags
     16733
    1569416734# Flags to create an archive.
    15695 AR_FLAGS=$lt_AR_FLAGS
     16735AR_FLAGS=\${ARFLAGS-"\$lt_ar_flags"}
    1569616736
    1569716737# How to feed a file listing to the archiver.
     
    1606117101
    1606217102
     17103
    1606317104ltmain=$ac_aux_dir/ltmain.sh
    1606417105
     
    1606817109  # text mode, it properly converts lines to CR/LF.  This bash problem
    1606917110  # is reportedly fixed, but why not run on old versions too?
    16070   sed '$q' "$ltmain" >> "$cfgfile" \
     17111  $SED '$q' "$ltmain" >> "$cfgfile" \
    1607117112     || (rm -f "$cfgfile"; exit 1)
    1607217113
     
    1611117152fi
    1611217153if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
    16113   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
    16114 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
    16115 fi
    16116 
     17154  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
     17155printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
     17156fi
     17157
     17158
  • trunk/src/libs/libpng-1.6.42/configure.ac

    r96425 r103316  
    11# configure.ac
    22
    3 # Copyright (c) 2018 Cosmin Truta
     3# Copyright (c) 2018-2024 Cosmin Truta
    44# Copyright (c) 2004-2016 Glenn Randers-Pehrson
    55
     
    2626dnl Version number stuff here:
    2727
    28 AC_INIT([libpng],[1.6.37],[[email protected]])
    29 AC_CONFIG_MACRO_DIR([scripts])
     28AC_INIT([libpng],[1.6.42],[[email protected]])
     29AC_CONFIG_MACRO_DIR([scripts/autoconf])
    3030
    3131# libpng does not follow GNU file name conventions (hence 'foreign')
     
    4747dnl stop configure from automagically running automake
    4848
    49 PNGLIB_VERSION=1.6.37
     49PNGLIB_VERSION=1.6.42
    5050PNGLIB_MAJOR=1
    5151PNGLIB_MINOR=6
    52 PNGLIB_RELEASE=37
     52PNGLIB_RELEASE=41
    5353
    5454dnl End of version number stuff
     
    9090AC_SUBST(DFNCPP)
    9191
    92 # -Werror cannot be passed to GCC in CFLAGS because configure will fail (it
    93 # checks the compiler with a program that generates a warning), add the
    94 # following option to deal with this
     92AC_ARG_ENABLE([tests],
     93   AS_HELP_STRING([--disable-tests],
     94      [do not build the test programs (default is to build)]),
     95      [enable_tests="$enableval"],
     96      [enable_tests=yes])
     97
     98AM_CONDITIONAL([ENABLE_TESTS],
     99   [test "$enable_tests" != "no"])
     100
     101AC_ARG_ENABLE([tools],
     102   AS_HELP_STRING([--disable-tools],
     103      [do not build the auxiliary tools (default is to build)]),
     104      [enable_tools="$enableval"],
     105      [enable_tools=yes])
     106
     107AM_CONDITIONAL([ENABLE_TOOLS],
     108   [test "$enable_tools" != "no"])
     109
     110# -Werror cannot be passed to GCC in CFLAGS because configure will fail
     111# (it checks the compiler with a program that generates a warning).
     112# Add the following option to deal with this:
    95113AC_ARG_VAR(PNG_COPTS,
    96114   [additional flags for the C compiler, use this for options that would]
     
    115133    fi],)
    116134
    117 # For GCC 5 the default mode for C is -std=gnu11 instead of -std=gnu89
    118 # In pngpriv.h we request just the POSIX 1003.1 and C89 APIs by defining _POSIX_SOURCE to 1
    119 # This is incompatible with the new default mode, so we test for that and force the
    120 # "-std=c89" compiler option:
     135# For GCC 5 the default mode for C is -std=gnu11 instead of -std=gnu89.
     136# In pngpriv.h we request just the POSIX 1003.1 and C89 APIs by defining
     137# _POSIX_SOURCE to 1. This is incompatible with the new default mode, so
     138# we test for that and force the "-std=c89" compiler option:
    121139AC_MSG_CHECKING([if we need to force back C standard to C89])
    122140AC_COMPILE_IFELSE(
     
    134152])
    135153
    136 # Checks for header files.
    137 AC_HEADER_STDC
    138 
    139 # Checks for typedefs, structures, and compiler characteristics.
    140 AC_C_CONST
    141 AC_TYPE_SIZE_T
     154# Checks for structures and compiler characteristics.
    142155AC_STRUCT_TM
    143156AC_C_RESTRICT
    144157
    145158# Checks for library functions.
    146 AC_FUNC_STRTOD
    147 AC_CHECK_FUNCS([pow], , AC_CHECK_LIB(m, pow, , AC_MSG_ERROR(cannot find pow)) )
    148 
    149 # Some later POSIX 1003.1 functions are required for test programs, failure here
    150 # is soft (the corresponding test program is not built).
    151 AC_CHECK_FUNC([clock_gettime],,[AC_MSG_WARN([not building timepng])])
     159AC_CHECK_FUNCS([pow], ,
     160  [AC_CHECK_LIB([m], [pow], , [AC_MSG_ERROR([cannot find pow])])])
     161
     162# Some later POSIX 1003.1 functions are required for test programs, failure
     163# here is soft (the corresponding test program is not built).
     164AC_CHECK_FUNC([clock_gettime], , [AC_MSG_WARN([not building timepng])])
    152165AM_CONDITIONAL([HAVE_CLOCK_GETTIME], [test "$ac_cv_func_clock_gettime" = "yes"])
    153166
     
    157170      [ZPREFIX=${withval}],
    158171      [ZPREFIX='z_'])
    159 AC_CHECK_LIB(z, zlibVersion, ,
    160     AC_CHECK_LIB(z, ${ZPREFIX}zlibVersion, , AC_MSG_ERROR(zlib not installed)))
     172AC_CHECK_LIB([z], [zlibVersion], ,
     173  [AC_CHECK_LIB([z], [${ZPREFIX}zlibVersion], ,
     174     [AC_MSG_ERROR([zlib not installed])])])
    161175
    162176# The following is for pngvalid, to ensure it catches FP errors even on
     
    297311   [test "$enable_unversioned_libpng_config" != "no"])
    298312
    299 # HOST SPECIFIC OPTIONS
     313# HOST-SPECIFIC OPTIONS
    300314# =====================
    301315#
     
    315329         AC_DEFINE([PNG_MIPS_MSA_OPT], [0],
    316330           [Disable MIPS_MSA optimizations])
     331         enable_mips_mmi=no
     332         AC_DEFINE([PNG_MIPS_MMI_OPT], [0],
     333           [Disable MIPS_MMI optimizations])
    317334         enable_powerpc_vsx=no
    318335         AC_DEFINE([PNG_POWERPC_VSX_OPT], [0],
     
    321338         AC_DEFINE([PNG_INTEL_SSE_OPT], [0],
    322339           [Disable INTEL_SSE optimizations])
     340         enable_loongarch_lsx=no
     341         AC_DEFINE([PNG_LOONGARCH_LSX_OPT], [0],
     342           [Disable LOONGARCH_LSX optimizations])
    323343         ;;
    324344      *)
     
    327347            arm*|aarch64*)
    328348              enable_arm_neon=yes
    329               AC_DEFINE([PNG_ARM_NEON_OPT], [0],
     349              AC_DEFINE([PNG_ARM_NEON_OPT], [2],
    330350                [Enable ARM_NEON optimizations])
    331351              ;;
    332352            mipsel*|mips64el*)
     353              enable_mips_mmi=yes
    333354              enable_mips_msa=yes
    334               AC_DEFINE([PNG_MIPS_MSA_OPT], [0],
     355              AC_DEFINE([PNG_MIPS_MMI_OPT], [1],
     356                [Enable MIPS_MMI optimizations])
     357              AC_DEFINE([PNG_MIPS_MSA_OPT], [2],
    335358                [Enable MIPS_MSA optimizations])
    336359              ;;
     
    344367              AC_DEFINE([PNG_POWERPC_VSX_OPT], [2],
    345368                [Enable POWERPC VSX optimizations])
     369              ;;
     370            loongarch*)
     371              enable_loongarch_lsx=yes
     372              AC_DEFINE([PNG_LOONGARCH_LSX_OPT], [1],
     373                [Enable LOONGARCH_LSX optimizations])
    346374              ;;
    347375         esac
     
    367395                   [Disable ARM Neon optimizations])
    368396         # Prevent inclusion of the assembler files below:
    369          enable_arm_neon=no;;
     397         enable_arm_neon=no ;;
    370398      check)
    371399         AC_DEFINE([PNG_ARM_NEON_CHECK_SUPPORTED], [],
     
    384412   esac])
    385413
    386 # Add ARM specific files to all builds where the host_cpu is arm ('arm*') or
    387 # where ARM optimizations were explicitly requested (this allows a fallback if a
    388 # future host CPU does not match 'arm*')
     414# 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*')
    389417
    390418AM_CONDITIONAL([PNG_ARM_NEON],
    391419   [test "$enable_arm_neon" != 'no' &&
    392420    case "$host_cpu" in
    393       arm*|aarch64*) :;;
    394       *)    test "$enable_arm_neon" != '';;
     421      arm*|aarch64*) : ;;
     422      *)    test "$enable_arm_neon" != '' ;;
    395423    esac])
    396424
    397425# MIPS
    398 # ===
     426# ====
    399427#
    400428# MIPS MSA (SIMD) support.
     
    413441                   [Disable MIPS MSA optimizations])
    414442         # Prevent inclusion of the assembler files below:
    415          enable_mips_msa=no;;
     443         enable_mips_msa=no ;;
    416444      check)
    417445         AC_DEFINE([PNG_MIPS_MSA_CHECK_SUPPORTED], [],
     
    430458   esac])
    431459
     460# 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*')
     463
     464AM_CONDITIONAL([PNG_MIPS_MSA],
     465   [test "$enable_mips_msa" != 'no' &&
     466    case "$host_cpu" in
     467      mipsel*|mips64el*) : ;;
     468    esac])
     469
     470# MIPS
     471# ===
     472#
     473# MIPS MMI (SIMD) support.
     474
     475AC_ARG_ENABLE([mips-mmi],
     476   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.]
     481      [If not specified: determined by the compiler.]),
     482   [case "$enableval" in
     483      no|off)
     484         # disable the default enabling on __mips_mmi systems:
     485         AC_DEFINE([PNG_MIPS_MMI_OPT], [0],
     486                   [Disable MIPS MMI optimizations])
     487         # Prevent inclusion of the assembler files below:
     488         enable_mips_mmi=no;;
     489      check)
     490         AC_DEFINE([PNG_MIPS_MMI_CHECK_SUPPORTED], [],
     491                   [Check for MIPS MMI support at run-time]);;
     492      api)
     493         AC_DEFINE([PNG_MIPS_MMI_API_SUPPORTED], [],
     494                   [Turn on MIPS MMI optimizations at run-time]);;
     495      yes|on)
     496         AC_DEFINE([PNG_MIPS_MMI_OPT], [1],
     497                   [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.]);;
     501      *)
     502         AC_MSG_ERROR([--enable-mips-mmi=${enable_mips_mmi}: invalid value])
     503   esac])
     504
    432505# Add MIPS specific files to all builds where the host_cpu is mips ('mips*') or
    433506# where MIPS optimizations were explicitly requested (this allows a fallback if a
    434507# future host CPU does not match 'mips*')
    435508
    436 AM_CONDITIONAL([PNG_MIPS_MSA],
    437    [test "$enable_mips_msa" != 'no' &&
     509AM_CONDITIONAL([PNG_MIPS_MMI],
     510   [test "$enable_mips_mmi" != 'no' &&
    438511    case "$host_cpu" in
    439512      mipsel*|mips64el*) :;;
     
    457530                   [Disable Intel SSE optimizations])
    458531         # Prevent inclusion of the assembler files below:
    459          enable_intel_sse=no;;
     532         enable_intel_sse=no ;;
    460533      yes|on)
    461534         AC_DEFINE([PNG_INTEL_SSE_OPT], [1],
     
    465538   esac])
    466539
    467 # Add Intel specific files to all builds where the host_cpu is Intel ('x86*')
    468 # or where Intel optimizations were explicitly requested (this allows a
    469 # fallback if a future host CPU does not match 'x86*')
     540# 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*')
    470543AM_CONDITIONAL([PNG_INTEL_SSE],
    471544   [test "$enable_intel_sse" != 'no' &&
    472545    case "$host_cpu" in
    473       i?86|x86_64) :;;
    474       *)    test "$enable_intel_sse" != '';;
     546      i?86|x86_64) : ;;
     547      *)    test "$enable_intel_sse" != '' ;;
    475548    esac])
    476549
    477550# PowerPC
    478 # ===
     551# =======
    479552#
    480553# PowerPC VSX (SIMD) support.
     
    492565         AC_DEFINE([PNG_POWERPC_VSX_OPT], [0],
    493566                   [Disable POWERPC VSX optimizations])
    494          # Prevent inclusion of the platform specific files below:
    495          enable_powerpc_vsx=no;;
     567         # Prevent inclusion of the platform-specific files below:
     568         enable_powerpc_vsx=no ;;
    496569      check)
    497570         AC_DEFINE([PNG_POWERPC_VSX_CHECK_SUPPORTED], [],
     
    507580         AC_MSG_WARN([--enable-powerpc-vsx: please specify 'check' or 'api', if]
    508581            [you want the optimizations unconditionally pass '-maltivec -mvsx']
    509             [or '-mcpu=power8'to the compiler.]);;
     582            [or '-mcpu=power8' to the compiler.]);;
    510583      *)
    511584         AC_MSG_ERROR([--enable-powerpc-vsx=${enable_powerpc_vsx}: invalid value])
    512585   esac])
    513586
    514 # Add PowerPC specific files to all builds where the host_cpu is powerpc('powerpc*') or
    515 # where POWERPC optimizations were explicitly requested (this allows a fallback if a
    516 # future host CPU does not match 'powerpc*')
     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*')
    517590
    518591AM_CONDITIONAL([PNG_POWERPC_VSX],
    519592   [test "$enable_powerpc_vsx" != 'no' &&
    520593    case "$host_cpu" in
    521       powerpc*|ppc64*) :;;
     594      powerpc*|ppc64*) : ;;
    522595    esac])
    523596
     597# LOONGARCH
     598# ===
     599#
     600# LOONGARCH LSX (SIMD) support
     601
     602if test "$LSX_CFLAGS" = ''; then
     603    LSX_CFLAGS="-mlsx"
     604fi
     605
     606compiler_support_loongarch_lsx=no
     607AC_MSG_CHECKING(whether to use loongarch LSX intrinsics)
     608save_CFLAGS=$CFLAGS
     609CFLAGS="$CFLAGS $LSX_CFLAGS"
     610AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
     611#include<lsxintrin.h>
     612int main(){
     613    __m128i a, b, c;
     614    a = __lsx_vadd_w(b, c);
     615    return 0;
     616}]])],compiler_support_loongarch_lsx=yes)
     617CFLAGS=$save_CFLAGS
     618AC_MSG_RESULT($compiler_support_loongarch_lsx)
     619
     620AC_ARG_ENABLE([loongarch-lsx],
     621   AS_HELP_STRING([[[--enable-loongarch-lsx]]],
     622      [Enable LOONGARCH LSX optimizations: =no/off, yes/on:]
     623      [no/off: disable the optimizations;]
     624      [yes/on: turn on unconditionally.]
     625      [If not specified: determined by the compiler.]),
     626   [case "$enableval" in
     627      no|off)
     628         # disable the default enabling on __loongarch_simd systems:
     629         AC_DEFINE([PNG_LOONGARCH_LSX_OPT], [0],
     630                   [Disable LOONGARCH LSX optimizations])
     631         # Prevent inclusion of the assembler files below:
     632         enable_loongarch_lsx=no;;
     633      yes|on)
     634         AC_DEFINE([PNG_LOONGARCH_LSX_OPT], [1],
     635                   [Enable LOONGARCH LSX optimizations])
     636         ;;
     637      *)
     638         AC_MSG_ERROR([--enable-loongarch-lsx=${enable_loongarch_lsx}: invalid value])
     639   esac])
     640
     641if 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])
     644   else
     645      AC_MSG_WARN([Compiler does not support loongarch LSX.])
     646   fi
     647fi
     648
     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
     653AM_CONDITIONAL([PNG_LOONGARCH_LSX],
     654   [test "$enable_loongarch_lsx" != 'no' && test $compiler_support_loongarch_lsx = yes &&
     655    case "$host_cpu" in
     656      loongarch*) :;;
     657      *)    test "$enable_loongarch_lsx" != '';;
     658    esac])
    524659
    525660AC_MSG_NOTICE([[Extra options for compiler: $PNG_COPTS]])
  • trunk/src/libs/libpng-1.6.42/contrib/arm-neon/android-ndk.c

    r96425 r103316  
    33 * Copyright (c) 2014 Glenn Randers-Pehrson
    44 * Written by John Bowler, 2014.
    5  * Last changed in libpng 1.6.10 [March 6, 2014]
    65 *
    76 * This code is released under the libpng license.
     
    2524 * only the header files exist in the NDK.
    2625 */
     26
    2727#include <cpu-features.h>
    2828
  • trunk/src/libs/libpng-1.6.42/contrib/arm-neon/linux-auxv.c

    r96425 r103316  
    33 * Copyright (c) 2014 Glenn Randers-Pehrson
    44 * Written by Mans Rullgard, 2011.
    5  * Last changed in libpng 1.6.10 [March 6, 2014]
    65 *
    76 * This code is released under the libpng license.
     
    2322 * looking at each element for one that records NEON capabilities.
    2423 */
     24
    2525#include <unistd.h> /* for POSIX 1003.1 */
    2626#include <errno.h>  /* for EINTR */
  • trunk/src/libs/libpng-1.6.42/contrib/arm-neon/linux.c

    r96425 r103316  
    11/* contrib/arm-neon/linux.c
    22 *
    3  * Last changed in libpng 1.6.31 [July 27, 2017]
    43 * Copyright (c) 2014, 2017 Glenn Randers-Pehrson
    54 * Written by John Bowler, 2014, 2017.
     
    2019 * however use <stdio.h> and it assumes that /proc/cpuinfo is never localized.
    2120 */
     21
    2222#include <stdio.h>
    2323
  • trunk/src/libs/libpng-1.6.42/contrib/examples/pngtopng.c

    r96425 r103316  
    55 * related or neighboring rights to this work.  This work is published from:
    66 * United States.
    7  *
    8  * Last changed in libpng 1.6.29 [March 16, 2017]
    97 *
    108 * Read a PNG and write it out in a fixed format, using the 'simplified API'
  • trunk/src/libs/libpng-1.6.42/contrib/libtests/gentests.sh

    r96425 r103316  
    22#
    33# Copyright (c) 2013 John Cunningham Bowler
    4 #
    5 # Last changed in libpng 1.6.0 [February 14, 2013]
    64#
    75# This code is released under the libpng license.
  • trunk/src/libs/libpng-1.6.42/contrib/libtests/makepng.c

    r96425 r103316  
    44#define COPYRIGHT "\251 2013,2015 John Cunningham Bowler"
    55/*
    6  * Last changed in libpng 1.6.20 [November 24, 2015]
    7  *
    86 * This code is released under the libpng license.
    97 * For conditions of distribution and use, see the disclaimer
     
    300298            volatile unsigned int ip = 0;
    301299
    302             for (x=0; x<size; ++x) for (y=0; y<size; ++y)
     300            for (x=0; x<size; ++x)
    303301            {
    304                ip = x + (size * y);
    305 
    306                /* size is at most 16, so the scaled value below fits in 16 bits
    307                 */
    308 #              define interp(pos, c1, c2) ((pos * c1) + ((size-pos) * c2))
    309 #              define xyinterp(x, y, c1, c2, c3, c4) (((size * size / 2) +\
    310                   (interp(x, c1, c2) * y + (size-y) * interp(x, c3, c4))) /\
    311                   (size*size))
    312 
    313                set_color(palette+ip, trans+ip,
    314                   /* color:    green, red,blue,white */
    315                   xyinterp(x, y,   0, 255,   0, 255),
    316                   xyinterp(x, y, 255,   0,   0, 255),
    317                   xyinterp(x, y,   0,   0, 255, 255),
    318                   /* alpha:        0, 102, 204, 255) */
    319                   xyinterp(x, y,   0, 102, 204, 255),
    320                   gamma_table);
     302               for (y=0; y<size; ++y)
     303               {
     304                  ip = x + (size * y);
     305
     306                  /* size is at most 16, so the scaled value below fits in 16 bits
     307                  */
     308#                 define interp(pos, c1, c2) ((pos * c1) + ((size-pos) * c2))
     309#                 define xyinterp(x, y, c1, c2, c3, c4) (((size * size / 2) +\
     310                     (interp(x, c1, c2) * y + (size-y) * interp(x, c3, c4))) /\
     311                     (size*size))
     312
     313                  set_color(palette+ip, trans+ip,
     314                     /* color:    green, red,blue,white */
     315                     xyinterp(x, y,   0, 255,   0, 255),
     316                     xyinterp(x, y, 255,   0,   0, 255),
     317                     xyinterp(x, y,   0,   0, 255, 255),
     318                     /* alpha:        0, 102, 204, 255) */
     319                     xyinterp(x, y,   0, 102, 204, 255),
     320                     gamma_table);
     321               }
    321322            }
    322323
     
    397398   png_uint_32 depth_max = (1U << bit_depth)-1; /* up to 65536 */
    398399
    399    if (colors[0] == 0) if (small)
     400   if (colors[0] == 0 && small)
    400401   {
    401402      unsigned int pixel_depth = pixel_depth_of_type(color_type, bit_depth);
     
    496497         case 48:
    497498         case 64:
    498             /* The rows are filled by an alogorithm similar to the above, in the
     499            /* The rows are filled by an algorithm similar to the above, in the
    499500             * first row pixel bytes are all equal, increasing from 0 by 1 for
    500501             * each pixel.  In the second row the bytes within a pixel are
     
    859860         unsigned int i;
    860861
    861          if (real_gamma == 45455) for (i=0; i<256; ++i)
    862          {
    863             gamma_table[i] = (png_byte)i;
    864             conv = 1.;
     862         if (real_gamma == 45455)
     863         {
     864            for (i=0; i<256; ++i)
     865            {
     866               gamma_table[i] = (png_byte)i;
     867               conv = 1.;
     868            }
    865869         }
    866870
     
    14311435   {
    14321436      list[i] = param;
    1433       while (*++param) if (*param == '\n' || *param == ':')
    1434       {
    1435          *param++ = 0; /* Terminate last parameter */
    1436          break;        /* And start a new one. */
     1437      while (*++param)
     1438      {
     1439         if (*param == '\n' || *param == ':')
     1440         {
     1441            *param++ = 0; /* Terminate last parameter */
     1442            break;        /* And start a new one. */
     1443         }
    14371444      }
    14381445   }
     
    18701877   }
    18711878
    1872    /* small and colors are incomparible (will probably crash if both are used at
     1879   /* small and colors are incompatible (will probably crash if both are used at
    18731880    * the same time!)
    18741881    */
  • trunk/src/libs/libpng-1.6.42/contrib/libtests/pngimage.c

    r96425 r103316  
     1
    12/* pngimage.c
    23 *
     4 * Copyright (c) 2021 Cosmin Truta
    35 * Copyright (c) 2015,2016 John Cunningham Bowler
    4  *
    5  * Last changed in libpng 1.6.24 [August 4, 2016]
    66 *
    77 * This code is released under the libpng license.
     
    1313 * transforms.
    1414 */
     15
    1516#include <stdarg.h>
    1617#include <stdlib.h>
     
    318319   t &= -t; /* first set bit */
    319320
    320    for (i=0; i<TTABLE_SIZE; ++i) if (transform_info[i].name != NULL)
    321    {
    322       if ((transform_info[i].transform & t) != 0)
    323          return transform_info[i].name;
    324    }
     321   for (i=0; i<TTABLE_SIZE; ++i)
     322      if (transform_info[i].name != NULL)
     323         if ((transform_info[i].transform & t) != 0)
     324            return transform_info[i].name;
    325325
    326326   return "invalid transform";
     
    339339   unsigned int i;
    340340
    341    for (i=0; i<TTABLE_SIZE; ++i) if (transform_info[i].name != NULL)
    342    {
    343       if (transform_info[i].when & TRANSFORM_R)
    344          read_transforms |= transform_info[i].transform;
    345 
    346       if (transform_info[i].when & TRANSFORM_W)
    347          write_transforms |= transform_info[i].transform;
     341   for (i=0; i<TTABLE_SIZE; ++i)
     342   {
     343      if (transform_info[i].name != NULL)
     344      {
     345         if (transform_info[i].when & TRANSFORM_R)
     346            read_transforms |= transform_info[i].transform;
     347
     348         if (transform_info[i].when & TRANSFORM_W)
     349            write_transforms |= transform_info[i].transform;
     350      }
    348351   }
    349352
     
    963966      unsigned int i;
    964967
    965       for (i=0; i<TTABLE_SIZE; ++i) if (transform_info[i].name != NULL)
     968      for (i=0; i<TTABLE_SIZE; ++i)
    966969      {
    967          int transform = transform_info[i].transform;
    968 
    969          if ((transform_info[i].valid_chunks == 0 ||
    970                (transform_info[i].valid_chunks & chunks) != 0) &&
    971             (transform_info[i].color_mask_required & ct) ==
    972                transform_info[i].color_mask_required &&
    973             (transform_info[i].color_mask_absent & ct) == 0 &&
    974             (transform_info[i].bit_depths & bd) != 0 &&
    975             (transform_info[i].when & TRANSFORM_R) != 0)
    976             active |= transform;
    977 
    978          else if ((transform_info[i].when & TRANSFORM_R) != 0)
    979             inactive |= transform;
     970         if (transform_info[i].name != NULL)
     971         {
     972            int transform = transform_info[i].transform;
     973
     974            if ((transform_info[i].valid_chunks == 0 ||
     975                  (transform_info[i].valid_chunks & chunks) != 0) &&
     976               (transform_info[i].color_mask_required & ct) ==
     977                  transform_info[i].color_mask_required &&
     978               (transform_info[i].color_mask_absent & ct) == 0 &&
     979               (transform_info[i].bit_depths & bd) != 0 &&
     980               (transform_info[i].when & TRANSFORM_R) != 0)
     981               active |= transform;
     982
     983            else if ((transform_info[i].when & TRANSFORM_R) != 0)
     984               inactive |= transform;
     985         }
    980986      }
    981987
     
    10011007   const char *e = NULL;
    10021008
    1003    png_get_IHDR(dp->read_pp, dp->read_ip, &width, &height, &bit_depth,
    1004       &color_type, &interlace_method, &compression_method, &filter_method);
     1009   if (!png_get_IHDR(dp->read_pp, dp->read_ip, &width, &height, &bit_depth,
     1010      &color_type, &interlace_method, &compression_method, &filter_method))
     1011      display_log(dp, LIBPNG_BUG, "png_get_IHDR failed");
    10051012
    10061013#  define C(item) if (item != dp->item) \
     
    10821089
    10831090               /* Find the first error */
    1084                for (x=0; x<rowbytes-1; ++x) if (row[x] != orig[x])
    1085                   break;
     1091               for (x=0; x<rowbytes-1; ++x)
     1092                  if (row[x] != orig[x])
     1093                     break;
    10861094
    10871095               display_log(dp, APP_FAIL,
     
    11381146                  color_type);
    11391147               /*NOTREACHED*/
     1148               memset(sig_bits, 0, sizeof(sig_bits));
    11401149               bpp = 0;
    11411150               break;
     
    11991208               break;
    12001209
    1201             case 4: /* Relicate twice */
     1210            case 4: /* Replicate twice */
    12021211               /* Value is 1, 2, 3 or 4 */
    12031212               b = 0xf & ((0xf << 4) >> sig_bits[0]);
     
    16871696               printf("%s: pngimage ", pass ? "PASS" : "FAIL");
    16881697
    1689                for (j=1; j<option_end; ++j) if (j != ilog)
    1690                   printf("%s ", argv[j]);
     1698               for (j=1; j<option_end; ++j)
     1699                  if (j != ilog)
     1700                     printf("%s ", argv[j]);
    16911701
    16921702               printf("%s\n", d.filename);
  • trunk/src/libs/libpng-1.6.42/contrib/libtests/pngstest.c

    r96425 r103316  
    1 /*-
    2  * pngstest.c
     1
     2/* pngstest.c
    33 *
    4  * Last changed in libpng 1.6.31 [July 27, 2017]
     4 * Copyright (c) 2021 Cosmin Truta
    55 * Copyright (c) 2013-2017 John Cunningham Bowler
    66 *
     
    1111 * Test for the PNG 'simplified' APIs.
    1212 */
     13
    1314#define _ISOC90_SOURCE 1
    14 #define MALLOC_CHECK_ 2/*glibc facility: turn on debugging*/
     15#define MALLOC_CHECK_ 2 /*glibc facility: turn on debugging*/
    1516
    1617#include <stddef.h>
     
    11511152 * 2) Remove color by mapping to grayscale.  (Grayscale to color is a no-op.)
    11521153 *
    1153  * 3) Convert between 8-bit and 16-bit components.  (Both directtions are
     1154 * 3) Convert between 8-bit and 16-bit components.  (Both directions are
    11541155 *    relevant.)
    11551156 *
     
    27022703               if ((a->opts & ACCUMULATE) == 0)
    27032704               {
    2704                   char pindex[9];
     2705                  char pindex[16];
    27052706                  sprintf(pindex, "%lu[%lu]", (unsigned long)y,
    27062707                     (unsigned long)a->image.colormap_entries);
     
    27132714            {
    27142715               if ((b->opts & ACCUMULATE) == 0)
    2715                   {
    2716                   char pindex[9];
     2716               {
     2717                  char pindex[16];
    27172718                  sprintf(pindex, "%lu[%lu]", (unsigned long)y,
    27182719                     (unsigned long)b->image.colormap_entries);
    27192720                  logerror(b, b->file_name, ": bad pixel index: ", pindex);
    2720                   }
     2721               }
    27212722               result = 0;
    27222723            }
     
    28212822
    28222823         /* Hence the btoa array. */
    2823          for (i=0; i<4; ++i) if (bloc[i] < 4)
    2824             btoa[bloc[i]] = aloc[i]; /* may be '4' for alpha */
     2824         for (i=0; i<4; ++i)
     2825         {
     2826            if (bloc[i] < 4)
     2827               btoa[bloc[i]] = aloc[i]; /* may be '4' for alpha */
     2828         }
    28252829
    28262830         if (alpha_added)
     
    32103214   {
    32113215#ifdef PNG_SIMPLIFIED_WRITE_STDIO_SUPPORTED
    3212       static int counter = 0;
     3216      static unsigned int counter = 0;
    32133217      char name[32];
    32143218
    3215       sprintf(name, "%s%d.png", tmpf, ++counter);
     3219      sprintf(name, "%s%u.png", tmpf, ++counter);
    32163220
    32173221      if (png_image_write_to_file(&image->image, name, convert_to_8bit,
  • trunk/src/libs/libpng-1.6.42/contrib/libtests/pngunknown.c

    r96425 r103316  
    22/* pngunknown.c - test the read side unknown chunk handling
    33 *
    4  * Last changed in libpng 1.6.32 [August 24, 2017]
     4 * Copyright (c) 2021 Cosmin Truta
    55 * Copyright (c) 2015,2017 Glenn Randers-Pehrson
    66 * Written by John Cunningham Bowler
     
    371371   int i = NINFO;
    372372
    373    while (--i >= 0) if (chunk_info[i].flag == flag) return i;
     373   while (--i >= 0)
     374      if (chunk_info[i].flag == flag)
     375         return i;
    374376
    375377   fprintf(stderr, "pngunknown: internal error\n");
     
    548550      case PNG_HANDLE_CHUNK_AS_DEFAULT:
    549551      case PNG_HANDLE_CHUNK_NEVER:
    550          discard = 1/*handled; discard*/;
     552         discard = 1; /*handled; discard*/
    551553         break;
    552554
    553555      case PNG_HANDLE_CHUNK_IF_SAFE:
    554556      case PNG_HANDLE_CHUNK_ALWAYS:
    555          discard = 0/*not handled; keep*/;
     557         discard = 0; /*not handled; keep*/
    556558         break;
    557559   }
     
    560562    * is set if the chunk is to be kept ('not handled'.)
    561563    */
    562    if (chunk >= 0) if (!discard) /* stupidity to stop a GCC warning */
    563    {
    564       png_uint_32 flag = chunk_info[chunk].flag;
    565 
    566       if (pc->location & PNG_AFTER_IDAT)
    567          d->after_IDAT |= flag;
    568 
    569       else
    570          d->before_IDAT |= flag;
     564   if (chunk >= 0)
     565   {
     566      if (!discard) /* stupidity to stop a GCC warning */
     567      {
     568         png_uint_32 flag = chunk_info[chunk].flag;
     569
     570         if (pc->location & PNG_AFTER_IDAT)
     571            d->after_IDAT |= flag;
     572
     573         else
     574            d->before_IDAT |= flag;
     575      }
    571576   }
    572577
     
    842847               png_uint_32 y;
    843848
    844                for (y=0; y<height; ++y) if (PNG_ROW_IN_INTERLACE_PASS(y, ipass))
    845                   png_read_row(d->png_ptr, NULL, NULL);
     849               for (y=0; y<height; ++y)
     850                  if (PNG_ROW_IN_INTERLACE_PASS(y, ipass))
     851                     png_read_row(d->png_ptr, NULL, NULL);
    846852            }
    847853         }
     
    10921098static const char *standard_tests[] =
    10931099{
    1094  "discard", "default=discard", 0,
    1095  "save", "default=save", 0,
    1096  "if-safe", "default=if-safe", 0,
    1097  "vpAg", "vpAg=if-safe", 0,
    1098  "sTER", "sTER=if-safe", 0,
    1099  "IDAT", "default=discard", "IDAT=save", 0,
    1100  "sAPI", "bKGD=save", "cHRM=save", "gAMA=save", "all=discard", "iCCP=save",
    1101    "sBIT=save", "sRGB=save", "eXIf=save", 0,
    1102  0/*end*/
     1100   "discard", "default=discard", NULL,
     1101   "save", "default=save", NULL,
     1102   "if-safe", "default=if-safe", NULL,
     1103   "vpAg", "vpAg=if-safe", NULL,
     1104   "sTER", "sTER=if-safe", NULL,
     1105   "IDAT", "default=discard", "IDAT=save", NULL,
     1106   "sAPI", "bKGD=save", "cHRM=save", "gAMA=save", "all=discard", "iCCP=save",
     1107      "sBIT=save", "sRGB=save", "eXIf=save", NULL,
     1108   NULL /*end*/
    11031109};
    11041110
     
    11161122{
    11171123   FILE *fp;
    1118    png_uint_32 default_flags[4/*valid,unknown{before,after}*/];
     1124   png_uint_32 default_flags[4]; /*valid,unknown{before,after}*/
    11191125   int strict = 0, default_tests = 0;
    11201126   const char *count_argv = "default=save";
     
    11541160    * optimization which causes warnings with -Wstrict-overflow!
    11551161    */
    1156    else if (default_tests) if (argc != 1)
    1157       usage(d.program, "extra arguments");
     1162   else if (default_tests)
     1163      if (argc != 1)
     1164         usage(d.program, "extra arguments");
    11581165
    11591166   /* The name of the test file is the last argument; remove it. */
     
    12171224         int arg_count = 0;
    12181225
    1219          while (*next) ++next, ++arg_count;
     1226         while (*next != NULL)
     1227         {
     1228            ++next;
     1229            ++arg_count;
     1230         }
    12201231
    12211232         perform_one_test_safe(fp, arg_count, test, default_flags, &d,
  • trunk/src/libs/libpng-1.6.42/contrib/libtests/pngvalid.c

    r96425 r103316  
    22/* pngvalid.c - validate libpng by constructing then reading png files.
    33 *
    4  * Last changed in libpng 1.6.31 [July 27, 2017]
     4 * Copyright (c) 2021 Cosmin Truta
    55 * Copyright (c) 2014-2017 John Cunningham Bowler
    66 *
     
    2323#define _GNU_SOURCE 1 /* For the floating point exception extension */
    2424#define _BSD_SOURCE 1 /* For the floating point exception extension */
     25#define _DEFAULT_SOURCE 1 /* For the floating point exception extension */
    2526
    2627#include <signal.h>
     
    58235824           interlace_type < INTERLACE_LAST; ++interlace_type)
    58245825      {
    5825          standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/,
    5826             interlace_type, 0, 0, 0), do_read_interlace, pm->use_update_info);
     5826         standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo),
     5827            0/*palette*/, interlace_type, 0, 0, 0), do_read_interlace,
     5828            pm->use_update_info);
    58275829
    58285830         if (fail(pm))
     
    58775879      png_uint_32 h, w;
    58785880
    5879       for (h=1; h<=16; h+=hinc[bdlo]) for (w=1; w<=16; w+=winc[bdlo])
    5880       {
    5881          /* First test all the 'size' images against the sequential
    5882           * reader using libpng to deinterlace (where required.)  This
    5883           * validates the write side of libpng.  There are four possibilities
    5884           * to validate.
    5885           */
    5886          standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/,
    5887             PNG_INTERLACE_NONE, w, h, 0), 0/*do_interlace*/,
    5888             pm->use_update_info);
    5889 
    5890          if (fail(pm))
    5891             return 0;
    5892 
    5893          standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/,
    5894             PNG_INTERLACE_NONE, w, h, 1), 0/*do_interlace*/,
    5895             pm->use_update_info);
    5896 
    5897          if (fail(pm))
    5898             return 0;
    5899 
    5900          /* Now validate the interlaced read side - do_interlace true,
    5901           * in the progressive case this does actually make a difference
    5902           * to the code used in the non-interlaced case too.
    5903           */
    5904          standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/,
    5905             PNG_INTERLACE_NONE, w, h, 0), 1/*do_interlace*/,
    5906             pm->use_update_info);
    5907 
    5908          if (fail(pm))
    5909             return 0;
    5910 
    5911 #     if CAN_WRITE_INTERLACE
    5912          /* Validate the pngvalid code itself: */
    5913          standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/,
    5914             PNG_INTERLACE_ADAM7, w, h, 1), 1/*do_interlace*/,
    5915             pm->use_update_info);
    5916 
    5917          if (fail(pm))
    5918             return 0;
    5919 #     endif
     5881      for (h=1; h<=16; h+=hinc[bdlo])
     5882      {
     5883         for (w=1; w<=16; w+=winc[bdlo])
     5884         {
     5885            /* First test all the 'size' images against the sequential
     5886            * reader using libpng to deinterlace (where required.)  This
     5887            * validates the write side of libpng.  There are four possibilities
     5888            * to validate.
     5889            */
     5890            standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo),
     5891               0/*palette*/, PNG_INTERLACE_NONE, w, h, 0), 0/*do_interlace*/,
     5892               pm->use_update_info);
     5893
     5894            if (fail(pm))
     5895               return 0;
     5896
     5897            standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo),
     5898               0/*palette*/, PNG_INTERLACE_NONE, w, h, 1), 0/*do_interlace*/,
     5899               pm->use_update_info);
     5900
     5901            if (fail(pm))
     5902               return 0;
     5903
     5904            /* Now validate the interlaced read side - do_interlace true,
     5905            * in the progressive case this does actually make a difference
     5906            * to the code used in the non-interlaced case too.
     5907            */
     5908            standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo),
     5909               0/*palette*/, PNG_INTERLACE_NONE, w, h, 0), 1/*do_interlace*/,
     5910               pm->use_update_info);
     5911
     5912            if (fail(pm))
     5913               return 0;
     5914
     5915#        if CAN_WRITE_INTERLACE
     5916            /* Validate the pngvalid code itself: */
     5917            standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo),
     5918               0/*palette*/, PNG_INTERLACE_ADAM7, w, h, 1), 1/*do_interlace*/,
     5919               pm->use_update_info);
     5920
     5921            if (fail(pm))
     5922               return 0;
     5923#        endif
     5924         }
    59205925      }
    59215926   }
     
    59285933      png_uint_32 h, w;
    59295934
    5930       for (h=1; h<=16; h+=hinc[bdlo]) for (w=1; w<=16; w+=winc[bdlo])
    5931       {
    5932 #     ifdef PNG_READ_INTERLACING_SUPPORTED
    5933          /* Test with pngvalid generated interlaced images first; we have
    5934           * already verify these are ok (unless pngvalid has self-consistent
    5935           * read/write errors, which is unlikely), so this detects errors in the
    5936           * read side first:
    5937           */
    5938 #     if CAN_WRITE_INTERLACE
    5939          standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/,
    5940             PNG_INTERLACE_ADAM7, w, h, 1), 0/*do_interlace*/,
    5941             pm->use_update_info);
    5942 
    5943          if (fail(pm))
    5944             return 0;
    5945 #     endif
    5946 #     endif /* READ_INTERLACING */
    5947 
    5948 #     ifdef PNG_WRITE_INTERLACING_SUPPORTED
    5949          /* Test the libpng write side against the pngvalid read side: */
    5950          standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/,
    5951             PNG_INTERLACE_ADAM7, w, h, 0), 1/*do_interlace*/,
    5952             pm->use_update_info);
    5953 
    5954          if (fail(pm))
    5955             return 0;
    5956 #     endif
    5957 
    5958 #     ifdef PNG_READ_INTERLACING_SUPPORTED
    5959 #     ifdef PNG_WRITE_INTERLACING_SUPPORTED
    5960          /* Test both together: */
    5961          standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/,
    5962             PNG_INTERLACE_ADAM7, w, h, 0), 0/*do_interlace*/,
    5963             pm->use_update_info);
    5964 
    5965          if (fail(pm))
    5966             return 0;
    5967 #     endif
    5968 #     endif /* READ_INTERLACING */
     5935      for (h=1; h<=16; h+=hinc[bdlo])
     5936      {
     5937         for (w=1; w<=16; w+=winc[bdlo])
     5938         {
     5939#        ifdef PNG_READ_INTERLACING_SUPPORTED
     5940            /* Test with pngvalid generated interlaced images first; we have
     5941            * already verify these are ok (unless pngvalid has self-consistent
     5942            * read/write errors, which is unlikely), so this detects errors in
     5943            * the read side first:
     5944            */
     5945#        if CAN_WRITE_INTERLACE
     5946            standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo),
     5947               0/*palette*/, PNG_INTERLACE_ADAM7, w, h, 1), 0/*do_interlace*/,
     5948               pm->use_update_info);
     5949
     5950            if (fail(pm))
     5951               return 0;
     5952#        endif
     5953#        endif /* READ_INTERLACING */
     5954
     5955#        ifdef PNG_WRITE_INTERLACING_SUPPORTED
     5956            /* Test the libpng write side against the pngvalid read side: */
     5957            standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo),
     5958               0/*palette*/, PNG_INTERLACE_ADAM7, w, h, 0), 1/*do_interlace*/,
     5959               pm->use_update_info);
     5960
     5961            if (fail(pm))
     5962               return 0;
     5963#        endif
     5964
     5965#        ifdef PNG_READ_INTERLACING_SUPPORTED
     5966#        ifdef PNG_WRITE_INTERLACING_SUPPORTED
     5967            /* Test both together: */
     5968            standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo),
     5969               0/*palette*/, PNG_INTERLACE_ADAM7, w, h, 0), 0/*do_interlace*/,
     5970               pm->use_update_info);
     5971
     5972            if (fail(pm))
     5973               return 0;
     5974#        endif
     5975#        endif /* READ_INTERLACING */
     5976         }
    59695977      }
    59705978   }
     
    67126720   const char *name, double digitization_error)
    67136721{
    6714    /* Compare the scaled, digitzed, values of our local calculation (in+-err)
     6722   /* Compare the scaled, digitized, values of our local calculation (in+-err)
    67156723    * with the digitized values libpng produced;  'sample_depth' is the actual
    67166724    * digitization depth of the libpng output colors (the bit depth except for
     
    76367644   else
    76377645   {
    7638       /* The default (built in) coeffcients, as above: */
     7646      /* The default (built in) coefficients, as above: */
    76397647#     if PNG_LIBPNG_VER < 10700
    76407648         data.red_coefficient = 6968 / 32768.;
     
    90589066image_transform_test_counter(png_uint_32 counter, unsigned int max)
    90599067{
    9060    /* Test the list to see if there is any point contining, given a current
     9068   /* Test the list to see if there is any point continuing, given a current
    90619069    * counter and a 'max' value.
    90629070    */
     
    1065010658      unsigned int i, j;
    1065110659
    10652       for (i=0; i<pm->ngamma_tests; ++i) for (j=0; j<pm->ngamma_tests; ++j)
    10653          if (i != j)
     10660      for (i=0; i<pm->ngamma_tests; ++i)
     10661      {
     10662         for (j=0; j<pm->ngamma_tests; ++j)
    1065410663         {
    10655             gamma_transform_test(pm, colour_type, bit_depth, palette_number,
    10656                pm->interlace_type, 1/pm->gammas[i], pm->gammas[j], 0/*sBIT*/,
    10657                pm->use_input_precision, 0 /*do not scale16*/);
    10658 
    10659             if (fail(pm))
    10660                return;
     10664            if (i != j)
     10665            {
     10666               gamma_transform_test(pm, colour_type, bit_depth, palette_number,
     10667                  pm->interlace_type, 1/pm->gammas[i], pm->gammas[j],
     10668                  0/*sBIT*/, pm->use_input_precision, 0/*do not scale16*/);
     10669
     10670               if (fail(pm))
     10671                  return;
     10672            }
    1066110673         }
     10674      }
    1066210675   }
    1066310676}
     
    1068810701            unsigned int j;
    1068910702
    10690             for (j=0; j<pm->ngamma_tests; ++j) if (i != j)
     10703            for (j=0; j<pm->ngamma_tests; ++j)
    1069110704            {
    10692                gamma_transform_test(pm, colour_type, bit_depth, npalette,
    10693                   pm->interlace_type, 1/pm->gammas[i], pm->gammas[j],
    10694                   sbit, pm->use_input_precision_sbit, 0 /*scale16*/);
    10695 
    10696                if (fail(pm))
    10697                   return;
     10705               if (i != j)
     10706               {
     10707                  gamma_transform_test(pm, colour_type, bit_depth, npalette,
     10708                     pm->interlace_type, 1/pm->gammas[i], pm->gammas[j],
     10709                     sbit, pm->use_input_precision_sbit, 0 /*scale16*/);
     10710
     10711                  if (fail(pm))
     10712                     return;
     10713               }
    1069810714            }
    1069910715         }
     
    1094710963
    1094810964      /* Don't skip the i==j case here - it's relevant. */
    10949       for (i=0; i<pm->ngamma_tests; ++i) for (j=0; j<pm->ngamma_tests; ++j)
    10950       {
    10951          gamma_composition_test(pm, colour_type, bit_depth, palette_number,
    10952             pm->interlace_type, 1/pm->gammas[i], pm->gammas[j],
    10953             pm->use_input_precision, do_background, expand_16);
    10954 
    10955          if (fail(pm))
    10956             return;
     10965      for (i=0; i<pm->ngamma_tests; ++i)
     10966      {
     10967         for (j=0; j<pm->ngamma_tests; ++j)
     10968         {
     10969            gamma_composition_test(pm, colour_type, bit_depth, palette_number,
     10970               pm->interlace_type, 1/pm->gammas[i], pm->gammas[j],
     10971               pm->use_input_precision, do_background, expand_16);
     10972
     10973            if (fail(pm))
     10974               return;
     10975         }
    1095710976      }
    1095810977   }
     
    1105711076
    1105811077      if (summary)
    11059          summarize_gamma_errors(pm, 0/*who*/, 1/*low bit depth*/, 1/*indexed*/);
     11078         summarize_gamma_errors(pm, NULL/*who*/, 1/*low bit depth*/, 1/*indexed*/);
    1106011079
    1106111080      if (fail(pm))
     
    1118311202   int x, y;
    1118411203   ++pass;
    11185    for (y=0; y<8; ++y) for (x=0; x<8; ++x) if (adam7[y][x] == pass)
    11186       return y;
     11204   for (y=0; y<8; ++y)
     11205      for (x=0; x<8; ++x)
     11206         if (adam7[y][x] == pass)
     11207            return y;
    1118711208   return 0xf;
    1118811209}
     
    1119311214   int x, y;
    1119411215   ++pass;
    11195    for (x=0; x<8; ++x) for (y=0; y<8; ++y) if (adam7[y][x] == pass)
    11196       return x;
     11216   for (x=0; x<8; ++x)
     11217      for (y=0; y<8; ++y)
     11218         if (adam7[y][x] == pass)
     11219            return x;
    1119711220   return 0xf;
    1119811221}
     
    1120311226   int x, y, base=(-1), inc=8;
    1120411227   ++pass;
    11205    for (y=0; y<8; ++y) for (x=0; x<8; ++x) if (adam7[y][x] == pass)
    11206    {
    11207       if (base == (-1))
    11208          base = y;
    11209       else if (base == y)
    11210          {}
    11211       else if (inc == y-base)
    11212          base=y;
    11213       else if (inc == 8)
    11214          inc = y-base, base=y;
    11215       else if (inc != y-base)
    11216          return 0xff; /* error - more than one 'inc' value! */
     11228   for (y=0; y<8; ++y)
     11229   {
     11230      for (x=0; x<8; ++x)
     11231      {
     11232         if (adam7[y][x] == pass)
     11233         {
     11234            if (base == (-1))
     11235               base = y;
     11236            else if (base == y)
     11237               {}
     11238            else if (inc == y-base)
     11239               base=y;
     11240            else if (inc == 8)
     11241               inc = y-base, base=y;
     11242            else if (inc != y-base)
     11243               return 0xff; /* error - more than one 'inc' value! */
     11244         }
     11245      }
    1121711246   }
    1121811247
     
    1123711266   int x, y, base=(-1), inc=8;
    1123811267   ++pass;
    11239    for (x=0; x<8; ++x) for (y=0; y<8; ++y) if (adam7[y][x] == pass)
    11240    {
    11241       if (base == (-1))
    11242          base = x;
    11243       else if (base == x)
    11244          {}
    11245       else if (inc == x-base)
    11246          base=x;
    11247       else if (inc == 8)
    11248          inc = x-base, base=x;
    11249       else if (inc != x-base)
    11250          return 0xff; /* error - more than one 'inc' value! */
     11268   for (x=0; x<8; ++x)
     11269   {
     11270      for (y=0; y<8; ++y)
     11271      {
     11272         if (adam7[y][x] == pass)
     11273         {
     11274            if (base == (-1))
     11275               base = x;
     11276            else if (base == x)
     11277               {}
     11278            else if (inc == x-base)
     11279               base=x;
     11280            else if (inc == 8)
     11281               inc = x-base, base=x;
     11282            else if (inc != x-base)
     11283               return 0xff; /* error - more than one 'inc' value! */
     11284         }
     11285      }
    1125111286   }
    1125211287
     
    1131211347   y &= 7;
    1131311348   ++pass;
    11314    for (x=0; x<8; ++x) if (adam7[y][x] == pass)
    11315       return 1;
     11349   for (x=0; x<8; ++x)
     11350      if (adam7[y][x] == pass)
     11351         return 1;
    1131611352
    1131711353   return 0;
     
    1132511361   x &= 7;
    1132611362   ++pass;
    11327    for (y=0; y<8; ++y) if (adam7[y][x] == pass)
    11328       return 1;
     11363   for (y=0; y<8; ++y)
     11364      if (adam7[y][x] == pass)
     11365         return 1;
    1132911366
    1133011367   return 0;
     
    1134011377   height &= 7;
    1134111378   ++pass;
    11342    for (y=0; y<8; ++y) for (x=0; x<8; ++x) if (adam7[y][x] == pass)
    11343    {
    11344       rows += tiles;
    11345       if (y < height) ++rows;
    11346       break; /* i.e. break the 'x', column, loop. */
     11379   for (y=0; y<8; ++y)
     11380   {
     11381      for (x=0; x<8; ++x)
     11382      {
     11383         if (adam7[y][x] == pass)
     11384         {
     11385            rows += tiles;
     11386            if (y < height) ++rows;
     11387            break; /* i.e. break the 'x', column, loop. */
     11388         }
     11389      }
    1134711390   }
    1134811391
     
    1135911402   width &= 7;
    1136011403   ++pass;
    11361    for (x=0; x<8; ++x) for (y=0; y<8; ++y) if (adam7[y][x] == pass)
    11362    {
    11363       cols += tiles;
    11364       if (x < width) ++cols;
    11365       break; /* i.e. break the 'y', row, loop. */
     11404   for (x=0; x<8; ++x)
     11405   {
     11406      for (y=0; y<8; ++y)
     11407      {
     11408         if (adam7[y][x] == pass)
     11409         {
     11410            cols += tiles;
     11411            if (x < width) ++cols;
     11412            break; /* i.e. break the 'y', row, loop. */
     11413         }
     11414      }
    1136611415   }
    1136711416
     
    1172011769   /* The following allows results to pass if they correspond to anything in the
    1172111770    * transformed range [input-.5,input+.5]; this is is required because of the
    11722     * way libpng treates the 16_TO_8 flag when building the gamma tables in
     11771    * way libpng treats the 16_TO_8 flag when building the gamma tables in
    1172311772    * releases up to 1.6.0.
    1172411773    *
     
    1181111860      else if (strncmp(*argv, "--transform-disable=",
    1181211861         sizeof "--transform-disable") == 0)
    11813          {
     11862      {
    1181411863         pm.test_transform = 1;
    1181511864         transform_disable(*argv + sizeof "--transform-disable");
    11816          }
     11865      }
    1181711866
    1181811867      else if (strncmp(*argv, "--transform-enable=",
    1181911868         sizeof "--transform-enable") == 0)
    11820          {
     11869      {
    1182111870         pm.test_transform = 1;
    1182211871         transform_enable(*argv + sizeof "--transform-enable");
    11823          }
     11872      }
    1182411873#endif /* PNG_READ_TRANSFORMS_SUPPORTED */
    1182511874
    1182611875      else if (strcmp(*argv, "--gamma") == 0)
    11827          {
     11876      {
    1182811877         /* Just do two gamma tests here (2.2 and linear) for speed: */
    1182911878         pm.ngamma_tests = 2U;
     
    1183411883         pm.test_gamma_background = 1; /* composition */
    1183511884         pm.test_gamma_alpha_mode = 1;
    11836          }
     11885      }
    1183711886
    1183811887      else if (strcmp(*argv, "--nogamma") == 0)
  • trunk/src/libs/libpng-1.6.42/contrib/libtests/readpng.c

    r96425 r103316  
     1
    12/* readpng.c
    23 *
    34 * Copyright (c) 2013 John Cunningham Bowler
    4  *
    5  * Last changed in libpng 1.6.1 [March 28, 2013]
    65 *
    76 * This code is released under the libpng license.
  • trunk/src/libs/libpng-1.6.42/contrib/libtests/tarith.c

    r96425 r103316  
    22/* tarith.c
    33 *
     4 * Copyright (c) 2021 Cosmin Truta
    45 * Copyright (c) 2011-2013 John Cunningham Bowler
    5  *
    6  * Last changed in libpng 1.6.0 [February 14, 2013]
    76 *
    87 * This code is released under the libpng license.
     
    8988
    9089   while (--argc > 0)
     90   {
    9191      if (strcmp(*++argv, "-a") == 0)
    9292         showall = 1;
     
    106106         return 1;
    107107      }
     108   }
    108109
    109110   do
     
    131132      if (buffer[precision+7] != 71)
    132133      {
    133          fprintf(stderr, "%g[%d] -> '%s'[%lu] buffer overflow\n", test,
    134             precision, buffer, (unsigned long)strlen(buffer));
     134         fprintf(stderr, "%g[%d] -> '%s'[%lu] buffer overflow\n",
     135            test, precision, buffer, (unsigned long)strlen(buffer));
    135136         failed = 1;
    136137      }
     
    147148             test <  0 && strcmp(buffer, "-inf"))
    148149         {
    149             fprintf(stderr, "%g[%d] -> '%s' but expected 'inf'\n", test,
    150                precision, buffer);
     150            fprintf(stderr, "%g[%d] -> '%s' but expected 'inf'\n",
     151               test, precision, buffer);
    151152            failed = 1;
    152153         }
     
    155156          buffer[index] != 0)
    156157      {
    157          fprintf(stderr, "%g[%d] -> '%s' but has bad format ('%c')\n", test,
    158          precision, buffer, buffer[index]);
     158         fprintf(stderr, "%g[%d] -> '%s' but has bad format ('%c')\n",
     159            test, precision, buffer, buffer[index]);
    159160         failed = 1;
    160161      }
     
    188189         double out = atof(buffer);
    189190         double change = fabs((out - test)/test);
    190          double allow = .5/pow(10,
     191         double allow = .5 / pow(10,
    191192            (precision >= DBL_DIG) ? DBL_DIG-1 : precision-1);
    192193
     
    258259   while (--count);
    259260
    260    printf("Tested %d finite values, %d non-finite, %d OK (%d failed) %d minor "
    261       "arithmetic errors\n", finite, nonfinite, ok, failcount, minorarith);
     261   printf("Tested %d finite values, %d non-finite, %d OK (%d failed) "
     262      "%d minor arithmetic errors\n",
     263      finite, nonfinite, ok, failcount, minorarith);
    262264   printf(" Error with >=%d digit precision %.2f%%\n", DBL_DIG, max_abs);
    263265   printf(" Error with < %d digit precision %.2f%%\n", DBL_DIG, max);
     
    372374   if (index != 0 && index != 1)
    373375   {
    374       fprintf(stderr, "%s: read beyond end of string (%lu)\n", co->number,
    375          (unsigned long)index);
     376      fprintf(stderr, "%s: read beyond end of string (%lu)\n",
     377         co->number, (unsigned long)index);
    376378      return 0;
    377379   }
     
    504506      {
    505507         fprintf(stderr,
    506             "%s: character '%c' [0x%.2x] changed number validity\n", co->number,
    507             ch, ch);
     508            "%s: character '%c' [0x%.2x] changed number validity\n",
     509            co->number, ch, ch);
    508510         return 0;
    509511      }
     
    522524   int ch;
    523525
    524    if (c.cnumber+4 < sizeof co->number) for (ch=0; ch<256; ++ch)
    525    {
    526       if (!check_one_character(co, c, ch))
    527          return 0;
     526   if (c.cnumber+4 < sizeof co->number)
     527   {
     528      for (ch=0; ch<256; ++ch)
     529      {
     530         if (!check_one_character(co, c, ch))
     531            return 0;
     532      }
    528533   }
    529534
     
    540545   if (c.cnumber+4 < sizeof co->number && c.limit >= 0)
    541546   {
    542       if (c.limit > 0) for (i=0; tests[i]; ++i)
    543       {
    544          if (!check_one_character(co, c, tests[i]))
    545                return 0;
     547      if (c.limit > 0)
     548      {
     549         for (i=0; tests[i]; ++i)
     550         {
     551            if (!check_one_character(co, c, tests[i]))
     552                  return 0;
     553         }
    546554      }
    547555
     
    617625
    618626   while (--argc > 0)
    619       {
    620          fprintf(stderr, "unknown argument %s\n", *++argv);
    621          return 1;
    622       }
     627   {
     628      fprintf(stderr, "unknown argument %s\n", *++argv);
     629      return 1;
     630   }
    623631
    624632   /* Find out about the random number generator. */
     
    688696
    689697      if (verbose)
    690          fprintf(stderr, "TEST %d * %d / %d -> %lld (%s)\n", a, times, div,
    691             fp, ok ? "ok" : "overflow");
     698         fprintf(stderr, "TEST %d * %d / %d -> %lld (%s)\n",
     699            a, times, div, fp, ok ? "ok" : "overflow");
    692700
    693701      ++tested;
     
    696704         ++error;
    697705         if (ok)
    698              fprintf(stderr, "%d * %d / %d -> overflow (expected %lld)\n", a,
    699                 times, div, fp);
     706             fprintf(stderr, "%d * %d / %d -> overflow (expected %lld)\n",
     707                a, times, div, fp);
    700708         else
    701              fprintf(stderr, "%d * %d / %d -> %d (expected overflow %lld)\n", a,
    702                 times, div, result, fp);
     709             fprintf(stderr, "%d * %d / %d -> %d (expected overflow %lld)\n",
     710                a, times, div, result, fp);
    703711      }
    704712      else if (ok && result != fpround)
    705713      {
    706714         ++error;
    707          fprintf(stderr, "%d * %d / %d -> %d not %lld\n", a, times, div, result,
    708             fp);
     715         fprintf(stderr, "%d * %d / %d -> %d not %lld\n",
     716            a, times, div, result, fp);
    709717      }
    710718      else
     
    722730   while (--count > 0);
    723731
    724    printf("%d tests including %d overflows, %d passed, %d failed (%d 64-bit "
    725       "errors)\n", tested, overflow, passed, error, error64);
     732   printf("%d tests including %d overflows, %d passed, %d failed "
     733      "(%d 64-bit errors)\n", tested, overflow, passed, error, error64);
    726734   return 0;
    727735}
     
    822830            if (error > .68) /* By experiment error is less than .68 */
    823831            {
    824                fprintf(stderr, "16-bit log error: %d: got %u, expected %f"
    825                   " error: %f\n", i, png_log16bit(i), correct, error);
     832               fprintf(stderr,
     833                  "16-bit log error: %d: got %u, expected %f error: %f\n",
     834                  i, png_log16bit(i), correct, error);
    826835            }
    827836         }
     
    842851         if (fabs(error) > 1883) /* By experiment. */
    843852         {
    844             fprintf(stderr, "32-bit exp error: %d: got %u, expected %f"
    845                   " error: %f\n", i, png_exp(i), correct, error);
     853            fprintf(stderr,
     854               "32-bit exp error: %d: got %u, expected %f error: %f\n",
     855               i, png_exp(i), correct, error);
    846856         }
    847857      }
     
    860870         if (fabs(error) > .50002) /* By experiment */
    861871         {
    862             fprintf(stderr, "8-bit exp error: %d: got %u, expected %f"
    863                   " error: %f\n", i, png_exp8bit(i), correct, error);
     872            fprintf(stderr,
     873               "8-bit exp error: %d: got %u, expected %f error: %f\n",
     874               i, png_exp8bit(i), correct, error);
    864875         }
    865876      }
     
    878889         if (fabs(error) > .524) /* By experiment */
    879890         {
    880             fprintf(stderr, "16-bit exp error: %d: got %u, expected %f"
    881                   " error: %f\n", i, png_exp16bit(i), correct, error);
     891            fprintf(stderr,
     892               "16-bit exp error: %d: got %u, expected %f error: %f\n",
     893               i, png_exp16bit(i), correct, error);
    882894         }
    883895      }
     
    941953/**************************** VALIDATION TESTS ********************************/
    942954/* Various validation routines are included herein, they require some
    943  * definition for png_warning and png_error, seetings of VALIDATION:
     955 * definition for png_warning and png_error, settings of VALIDATION:
    944956 *
    945957 * 1: validates the ASCII to floating point conversions
  • trunk/src/libs/libpng-1.6.42/contrib/libtests/timepng.c

    r96425 r103316  
     1
    12/* timepng.c
    23 *
    34 * Copyright (c) 2013,2016 John Cunningham Bowler
    4  *
    5  * Last changed in libpng 1.6.22 [May 26, 2016]
    65 *
    76 * This code is released under the libpng license.
     
    529528   }
    530529
    531    else if (nfiles == 0) /* Read from stdin withoout --dissemble */
     530   else if (nfiles == 0) /* Read from stdin without --dissemble */
    532531   {
    533532      char filename[FILENAME_MAX+1];
  • trunk/src/libs/libpng-1.6.42/contrib/mips-msa/linux.c

    r96425 r103316  
     1
    12/* contrib/mips-msa/linux.c
    23 *
     4 * Copyright (c) 2020-2023 Cosmin Truta
    35 * Copyright (c) 2016 Glenn Randers-Pehrson
    46 * Written by Mandar Sahastrabuddhe, 2016.
    5  * Last changed in libpng 1.6.25beta03 [August 29, 2016]
     7 * Updated by Sui Jingfeng, 2021.
    68 *
    79 * This code is released under the libpng license.
     
    911 * and license in png.h
    1012 *
    11  * SEE contrib/mips-msa/README before reporting bugs
     13 * On Linux, png_have_msa is implemented by reading the pseudo-file
     14 * "/proc/self/auxv".
     15 *
     16 * See contrib/mips-msa/README before reporting bugs.
    1217 *
    1318 * STATUS: SUPPORTED
    1419 * BUG REPORTS: [email protected]
    15  *
    16  * png_have_msa implemented for Linux by reading the widely available
    17  * pseudo-file /proc/cpuinfo.
    18  *
    19  * This code is strict ANSI-C and is probably moderately portable; it does
    20  * however use <stdio.h> and it assumes that /proc/cpuinfo is never localized.
    2120 */
    2221
    23 #include <stdio.h>
    24 #include <string.h>
     22#include <elf.h>
     23#include <fcntl.h>
    2524#include <stdlib.h>
     25#include <unistd.h>
    2626
    2727static int
    2828png_have_msa(png_structp png_ptr)
    2929{
    30    FILE *f = fopen("/proc/cpuinfo", "rb");
     30   Elf64_auxv_t aux;
     31   int fd;
     32   int has_msa = 0;
    3133
    32    char *string = "msa";
    33    char word[10];
     34   fd = open("/proc/self/auxv", O_RDONLY);
     35   if (fd >= 0)
     36   {
     37      while (read(fd, &aux, sizeof(Elf64_auxv_t)) == sizeof(Elf64_auxv_t))
     38      {
     39         if (aux.a_type == AT_HWCAP)
     40         {
     41            uint64_t hwcap = aux.a_un.a_val;
    3442
    35    if (f != NULL)
    36    {
    37       while(!feof(f))
    38       {
    39          int ch = fgetc(f);
    40          static int i = 0;
    41 
    42          while(!(ch <= 32))
    43          {
    44             word[i++] = ch;
    45             ch = fgetc(f);
     43            has_msa = (hwcap >> 1) & 1;
     44            break;
    4645         }
    47 
    48          int val = strcmp(string, word);
    49 
    50          if (val == 0)
    51             return 1;
    52 
    53          i = 0;
    54          memset(word, 0, 10);
    5546      }
    56 
    57       fclose(f);
     47      close(fd);
    5848   }
    5949#ifdef PNG_WARNINGS_SUPPORTED
    6050   else
    61       png_warning(png_ptr, "/proc/cpuinfo open failed");
     51      png_warning(png_ptr, "/proc/self/auxv open failed");
    6252#endif
    63    return 0;
     53
     54   return has_msa;
    6455}
  • trunk/src/libs/libpng-1.6.42/contrib/oss-fuzz/README.txt

    r96425 r103316  
    1 Last changed in libpng 1.6.33 [September 28, 2017]
    21Copyright (c) 2017 Glenn Randers-Pehrson
    32
  • trunk/src/libs/libpng-1.6.42/contrib/oss-fuzz/build.sh

    r96425 r103316  
    11#!/bin/bash -eu
     2
    23# Copyright 2017-2018 Glenn Randers-Pehrson
    34# Copyright 2016 Google Inc.
     
    1415# See the License for the specific language governing permissions and
    1516# limitations under the License.
    16 #
    17 # Last changed in libpng 1.6.35 [July 15, 2018]
    1817#
    1918# Revisions by Glenn Randers-Pehrson, 2017:
  • trunk/src/libs/libpng-1.6.42/contrib/oss-fuzz/libpng_read_fuzzer.cc

    r96425 r103316  
    55// Use of this source code is governed by a BSD-style license that may
    66// be found in the LICENSE file https://cs.chromium.org/chromium/src/LICENSE
    7 
    8 // Last changed in libpng 1.6.35 [July 15, 2018]
    97
    108// The modifications in 2017 by Glenn Randers-Pehrson include
     
    1816#include <stddef.h>
    1917#include <stdint.h>
     18#include <stdlib.h>
    2019#include <string.h>
    2120
     
    6160    if (end_info_ptr)
    6261      png_destroy_read_struct(&png_ptr, &info_ptr, &end_info_ptr);
    63     else if (info_ptr) 
     62    else if (info_ptr)
    6463      png_destroy_read_struct(&png_ptr, &info_ptr, nullptr);
    6564    else
     
    7776  buf_state->bytes_left -= length;
    7877  buf_state->data += length;
     78}
     79
     80void* limited_malloc(png_structp, png_alloc_size_t size) {
     81  // libpng may allocate large amounts of memory that the fuzzer reports as
     82  // an error. In order to silence these errors, make libpng fail when trying
     83  // to allocate a large amount. This allocator used to be in the Chromium
     84  // version of this fuzzer.
     85  // This number is chosen to match the default png_user_chunk_malloc_max.
     86  if (size > 8000000)
     87    return nullptr;
     88
     89  return malloc(size);
     90}
     91
     92void default_free(png_structp, png_voidp ptr) {
     93  return free(ptr);
    7994}
    8095
     
    118133    return 0;
    119134  }
     135
     136  // Use a custom allocator that fails for large allocations to avoid OOM.
     137  png_set_mem_fn(png_handler.png_ptr, nullptr, limited_malloc, default_free);
    120138
    121139  png_set_crc_action(png_handler.png_ptr, PNG_CRC_QUIET_USE, PNG_CRC_QUIET_USE);
  • trunk/src/libs/libpng-1.6.42/contrib/pngminus/CHANGES.txt

    r96425 r103316  
    44
    55version 1.0 - 1999.10.15 - First version.
    6         1.1 - 2015.07.29 - Fixed leaks (Glenn Randers-Pehrson)
     6        1.1 - 2015.07.29 - Fix memory leaks (Glenn Randers-Pehrson)
    77        1.2 - 2017.04.22 - Add buffer-size check
    88        1.3 - 2017.08.24 - Fix potential overflow in buffer-size check
     
    1212        1.6 - 2018.08.05 - Improve portability and fix style (Cosmin Truta)
    1313        1.7 - 2019.01.22 - Change license to MIT (Willem van Schaik)
     14        1.8 - 2024.01.09 - Fix, improve, modernize (Cosmin Truta)
  • trunk/src/libs/libpng-1.6.42/contrib/pngminus/CMakeLists.txt

    r96425 r103316  
    1 cmake_minimum_required(VERSION 3.1)
    2 cmake_policy(VERSION 3.1)
     1# Copyright (c) 2018-2024 Cosmin Truta
     2#
     3# This software is released under the MIT license. For conditions of
     4# distribution and use, see the LICENSE file part of this package.
     5
     6cmake_minimum_required(VERSION 3.5)
    37
    48project(PNGMINUS C)
    59
    6 option(PNGMINUS_USE_STATIC_LIBRARIES "Use the static library builds" ON)
     10option(PNGMINUS_USE_SYSTEM_PNG
     11       "Use the libpng build found in the system" OFF)
    712
    8 # libpng
    9 add_subdirectory(../.. libpng)
    10 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../..)
    11 include_directories(${CMAKE_CURRENT_BINARY_DIR}/libpng)
    12 if(PNGMINUS_USE_STATIC_LIBRARIES)
    13   set(PNGMINUS_PNG_LIBRARY png_static)
     13add_executable(png2pnm png2pnm.c)
     14add_executable(pnm2png pnm2png.c)
     15
     16if(PNGMINUS_USE_SYSTEM_PNG)
     17    # Use the system libpng.
     18    find_package(PNG REQUIRED)
     19    target_link_libraries(png2pnm PRIVATE PNG::PNG)
     20    target_link_libraries(pnm2png PRIVATE PNG::PNG)
    1421else()
    15   set(PNGMINUS_PNG_LIBRARY png)
     22    # Build and use the internal libpng.
     23    # Configure libpng for static linking, to produce single-file executables.
     24    set(PNG_STATIC ON
     25        CACHE STRING "Build the internal libpng as a static library" FORCE)
     26    set(PNG_SHARED OFF
     27        CACHE STRING "Build the internal libpng as a shared library" FORCE)
     28    set(PNG_FRAMEWORK OFF
     29        CACHE STRING "Build the internal libpng as a framework bundle" FORCE)
     30    add_subdirectory(../.. libpng)
     31    target_include_directories(png2pnm PRIVATE
     32        "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../..>"
     33        "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/libpng>"
     34    )
     35    target_include_directories(pnm2png PRIVATE
     36        "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../..>"
     37        "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/libpng>"
     38    )
     39    target_link_libraries(png2pnm PRIVATE png_static)
     40    target_link_libraries(pnm2png PRIVATE png_static)
    1641endif()
    17 
    18 # png2pnm
    19 add_executable(png2pnm png2pnm.c)
    20 target_link_libraries(png2pnm ${PNGMINUS_PNG_LIBRARY})
    21 
    22 # pnm2png
    23 add_executable(pnm2png pnm2png.c)
    24 target_link_libraries(pnm2png ${PNGMINUS_PNG_LIBRARY})
  • trunk/src/libs/libpng-1.6.42/contrib/pngminus/LICENSE.txt

    r96425 r103316  
    1717implied, including but not limited to the warranties of merchantability,
    1818fitness for a particular purpose and noninfringement. In no event shall the
    19 authors or copyight holders be liable for any claim, damages or other
     19authors or copyright holders be liable for any claim, damages or other
    2020liability, whether in an action of contract, tort or otherwise, arising from,
    2121out of or in connection with the software or the use or other dealings in the
  • trunk/src/libs/libpng-1.6.42/contrib/pngminus/png2pnm.c

    r96425 r103316  
    1515#endif
    1616#ifndef TRUE
    17 #define TRUE (BOOL) 1
     17#define TRUE ((BOOL) 1)
    1818#endif
    1919#ifndef FALSE
    20 #define FALSE (BOOL) 0
    21 #endif
    22 
    23 /* make png2pnm verbose so we can find problems (needs to be before png.h) */
    24 #ifndef PNG_DEBUG
    25 #define PNG_DEBUG 0
     20#define FALSE ((BOOL) 0)
    2621#endif
    2722
     
    3429BOOL png2pnm (FILE *png_file, FILE *pnm_file, FILE *alpha_file,
    3530              BOOL raw, BOOL alpha);
     31BOOL do_png2pnm (png_struct *png_ptr, png_info *info_ptr,
     32                 FILE *pnm_file, FILE *alpha_file,
     33                 BOOL raw, BOOL alpha);
    3634
    3735/*
     
    4442  FILE *fp_wr = stdout;
    4543  FILE *fp_al = NULL;
     44  const char *fname_wr = NULL;
     45  const char *fname_al = NULL;
    4646  BOOL raw = TRUE;
    4747  BOOL alpha = FALSE;
    4848  int argi;
     49  int ret;
    4950
    5051  for (argi = 1; argi < argc; argi++)
     
    6566          if ((fp_al = fopen (argv[argi], "wb")) == NULL)
    6667          {
     68            fname_al = argv[argi];
    6769            fprintf (stderr, "PNM2PNG\n");
    6870            fprintf (stderr, "Error:  cannot create alpha-channel file %s\n",
     
    9597    else if (fp_wr == stdout)
    9698    {
     99      fname_wr = argv[argi];
    97100      if ((fp_wr = fopen (argv[argi], "wb")) == NULL)
    98101      {
     
    120123
    121124  /* call the conversion program itself */
    122   if (png2pnm (fp_rd, fp_wr, fp_al, raw, alpha) == FALSE)
    123   {
    124     fprintf (stderr, "PNG2PNM\n");
    125     fprintf (stderr, "Error:  unsuccessful conversion of PNG-image\n");
    126     exit (1);
    127   }
     125  ret = png2pnm (fp_rd, fp_wr, fp_al, raw, alpha);
    128126
    129127  /* close input file */
     
    134132  if (alpha)
    135133    fclose (fp_al);
     134
     135  if (!ret)
     136  {
     137    fprintf (stderr, "PNG2PNM\n");
     138    fprintf (stderr, "Error:  unsuccessful conversion of PNG-image\n");
     139    if (fname_wr)
     140      remove (fname_wr); /* no broken output file shall remain behind */
     141    if (fname_al)
     142      remove (fname_al); /* ditto */
     143    exit (1);
     144  }
    136145
    137146  return 0;
     
    164173              BOOL raw, BOOL alpha)
    165174{
    166   png_struct    *png_ptr = NULL;
    167   png_info      *info_ptr = NULL;
    168   png_byte      buf[8];
    169   png_byte      *png_pixels = NULL;
    170   png_byte      **row_pointers = NULL;
    171   png_byte      *pix_ptr = NULL;
    172   png_uint_32   row_bytes;
    173 
     175  png_struct    *png_ptr;
     176  png_info      *info_ptr;
     177  BOOL          ret;
     178
     179  /* initialize the libpng context for reading from png_file */
     180
     181  png_ptr = png_create_read_struct (png_get_libpng_ver(NULL),
     182                                    NULL, NULL, NULL);
     183  if (!png_ptr)
     184    return FALSE; /* out of memory */
     185
     186  info_ptr = png_create_info_struct (png_ptr);
     187  if (!info_ptr)
     188  {
     189    png_destroy_read_struct (&png_ptr, NULL, NULL);
     190    return FALSE; /* out of memory */
     191  }
     192
     193  if (setjmp (png_jmpbuf (png_ptr)))
     194  {
     195    png_destroy_read_struct (&png_ptr, &info_ptr, NULL);
     196    return FALSE; /* generic libpng error */
     197  }
     198
     199  png_init_io (png_ptr, png_file);
     200
     201  /* do the actual conversion */
     202  ret = do_png2pnm (png_ptr, info_ptr, pnm_file, alpha_file, raw, alpha);
     203
     204  /* clean up the libpng structures and their internally-managed data */
     205  png_destroy_read_struct (&png_ptr, &info_ptr, NULL);
     206
     207  return ret;
     208}
     209
     210/*
     211 *  do_png2pnm - does the conversion in a fully-initialized libpng context
     212 */
     213
     214BOOL do_png2pnm (png_struct *png_ptr, png_info *info_ptr,
     215                 FILE *pnm_file, FILE *alpha_file,
     216                 BOOL raw, BOOL alpha)
     217{
     218  png_byte      **row_pointers;
     219  png_byte      *pix_ptr;
    174220  png_uint_32   width;
    175221  png_uint_32   height;
     
    178224  int           color_type;
    179225  int           alpha_present;
    180   int           row, col;
    181   int           ret;
    182   int           i;
     226  png_uint_32   row, col, i;
    183227  long          dep_16;
    184228
    185   /* read and check signature in PNG file */
    186   ret = fread (buf, 1, 8, png_file);
    187   if (ret != 8)
    188     return FALSE;
    189 
    190   ret = png_sig_cmp (buf, 0, 8);
    191   if (ret != 0)
    192     return FALSE;
    193 
    194   /* create png and info structures */
    195 
    196   png_ptr = png_create_read_struct (png_get_libpng_ver(NULL),
    197                                     NULL, NULL, NULL);
    198   if (!png_ptr)
    199     return FALSE; /* out of memory */
    200 
    201   info_ptr = png_create_info_struct (png_ptr);
    202   if (!info_ptr)
    203   {
    204     png_destroy_read_struct (&png_ptr, NULL, NULL);
    205     return FALSE; /* out of memory */
    206   }
    207 
    208   if (setjmp (png_jmpbuf (png_ptr)))
    209   {
    210     png_destroy_read_struct (&png_ptr, &info_ptr, NULL);
    211     return FALSE;
    212   }
    213 
    214   /* set up the input control for C streams */
    215   png_init_io (png_ptr, png_file);
    216   png_set_sig_bytes (png_ptr, 8); /* we already read the 8 signature bytes */
    217 
    218   /* read the file information */
    219   png_read_info (png_ptr, info_ptr);
    220 
    221   /* get size and bit-depth of the PNG-image */
    222   png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
    223                 NULL, NULL, NULL);
    224 
    225   /* set-up the transformations */
    226 
    227   /* transform paletted images into full-color rgb */
    228   if (color_type == PNG_COLOR_TYPE_PALETTE)
    229     png_set_expand (png_ptr);
    230   /* expand images to bit-depth 8 (only applicable for grayscale images) */
    231   if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
    232     png_set_expand (png_ptr);
    233   /* transform transparency maps into full alpha-channel */
    234   if (png_get_valid (png_ptr, info_ptr, PNG_INFO_tRNS))
    235     png_set_expand (png_ptr);
     229  /* set up the image transformations that are necessary for the PNM format */
     230
     231  /* set up (if applicable) the expansion of paletted images to full-color rgb,
     232   * and the expansion of transparency maps to full alpha-channel */
     233  png_set_expand (png_ptr);
     234
     235  /* set up (if applicable) the expansion of grayscale images to bit-depth 8 */
     236  png_set_expand_gray_1_2_4_to_8 (png_ptr);
    236237
    237238#ifdef NJET
     
    243244      color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
    244245    png_set_gray_to_rgb (png_ptr);
    245   /* only if file has a file gamma, we do a correction */
    246   if (png_get_gAMA (png_ptr, info_ptr, &file_gamma))
    247     png_set_gamma (png_ptr, (double) 2.2, file_gamma);
    248 #endif
    249 
    250   /* all transformations have been registered; now update info_ptr data,
    251    * get rowbytes and channels, and allocate image memory */
    252 
    253   png_read_update_info (png_ptr, info_ptr);
    254 
    255   /* get the new color-type and bit-depth (after expansion/stripping) */
     246  /* if the PNG image has a gAMA chunk then gamma-correct the output image */
     247  {
     248    double file_gamma;
     249    if (png_get_gAMA (png_ptr, info_ptr, &file_gamma))
     250      png_set_gamma (png_ptr, (double) 2.2, file_gamma);
     251  }
     252#endif
     253
     254  /* read the image file, with all of the above image transforms applied */
     255  png_read_png (png_ptr, info_ptr, 0, NULL);
     256
     257  /* get the image size, bit-depth and color-type */
    256258  png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
    257259                NULL, NULL, NULL);
    258260
    259   /* check for 16-bit files */
    260   if (bit_depth == 16)
    261   {
    262     raw = FALSE;
    263 #if defined(O_BINARY) && (O_BINARY != 0)
    264     setmode (fileno (pnm_file), O_BINARY);
    265 #endif
    266   }
    267 
    268   /* calculate new number of channels and store alpha-presence */
     261  /* calculate the number of channels and store alpha-presence */
    269262  if (color_type == PNG_COLOR_TYPE_GRAY)
    270263    channels = 1;
     
    283276  {
    284277    fprintf (stderr, "PNG2PNM\n");
    285     fprintf (stderr, "Error:  PNG-file doesn't contain alpha channel\n");
    286     exit (1);
    287   }
    288 
    289   /* row_bytes is the width x number of channels x (bit-depth / 8) */
    290   row_bytes = png_get_rowbytes (png_ptr, info_ptr);
    291 
    292   if ((row_bytes == 0) ||
    293       ((size_t) height > (size_t) (-1) / (size_t) row_bytes))
    294   {
    295     /* too big */
    296     png_destroy_read_struct (&png_ptr, &info_ptr, NULL);
     278    fprintf (stderr, "Warning:  no alpha channel in PNG file\n");
    297279    return FALSE;
    298280  }
    299   if ((png_pixels = (png_byte *)
    300        malloc ((size_t) row_bytes * (size_t) height)) == NULL)
    301   {
    302     png_destroy_read_struct (&png_ptr, &info_ptr, NULL);
    303     return FALSE;
    304   }
    305 
    306   if ((row_pointers = (png_byte **)
    307        malloc ((size_t) height * sizeof (png_byte *))) == NULL)
    308   {
    309     png_destroy_read_struct (&png_ptr, &info_ptr, NULL);
    310     free (png_pixels);
    311     return FALSE;
    312   }
    313 
    314   /* set the individual row_pointers to point at the correct offsets */
    315   for (i = 0; i < ((int) height); i++)
    316     row_pointers[i] = png_pixels + i * row_bytes;
    317 
    318   /* now we can go ahead and just read the whole image */
    319   png_read_image (png_ptr, row_pointers);
    320 
    321   /* read rest of file, and get additional chunks in info_ptr - REQUIRED */
    322   png_read_end (png_ptr, info_ptr);
    323 
    324   /* clean up after the read, and free any memory allocated - REQUIRED */
    325   png_destroy_read_struct (&png_ptr, &info_ptr, NULL);
     281
     282  /* get address of internally-allocated image data */
     283  row_pointers = png_get_rows (png_ptr, info_ptr);
    326284
    327285  /* write header of PNM file */
     
    354312
    355313  /* write data to PNM file */
    356   pix_ptr = png_pixels;
    357 
    358   for (row = 0; row < (int) height; row++)
    359   {
    360     for (col = 0; col < (int) width; col++)
    361     {
    362       for (i = 0; i < (channels - alpha_present); i++)
     314
     315  for (row = 0; row < height; row++)
     316  {
     317    pix_ptr = row_pointers[row];
     318    for (col = 0; col < width; col++)
     319    {
     320      for (i = 0; i < (png_uint_32) (channels - alpha_present); i++)
    363321      {
    364322        if (raw)
    365323        {
    366324          fputc ((int) *pix_ptr++, pnm_file);
     325          if (bit_depth == 16)
     326            fputc ((int) *pix_ptr++, pnm_file);
    367327        }
    368328        else
     
    370330          if (bit_depth == 16)
    371331          {
    372             dep_16 = (long) *pix_ptr++;
    373             fprintf (pnm_file, "%ld ", (dep_16 << 8) + ((long) *pix_ptr++));
     332            dep_16 = ((long) *pix_ptr++) << 8;
     333            dep_16 += ((long) *pix_ptr++);
     334            fprintf (pnm_file, "%ld ", dep_16);
    374335          }
    375336          else
     
    383344        if (!alpha)
    384345        {
    385           pix_ptr++; /* alpha */
     346          /* skip the alpha-channel */
     347          pix_ptr++;
    386348          if (bit_depth == 16)
    387349            pix_ptr++;
    388350        }
    389         else /* output alpha-channel as pgm file */
     351        else
    390352        {
     353          /* output the alpha-channel as pgm file */
    391354          if (raw)
    392355          {
    393356            fputc ((int) *pix_ptr++, alpha_file);
     357            if (bit_depth == 16)
     358              fputc ((int) *pix_ptr++, alpha_file);
    394359          }
    395360          else
     
    397362            if (bit_depth == 16)
    398363            {
    399               dep_16 = (long) *pix_ptr++;
    400               fprintf (alpha_file, "%ld ", (dep_16 << 8) + (long) *pix_ptr++);
     364              dep_16 = ((long) *pix_ptr++) << 8;
     365              dep_16 += ((long) *pix_ptr++);
     366              fprintf (alpha_file, "%ld ", dep_16);
    401367            }
    402368            else
     
    418384  } /* end for row */
    419385
    420   if (row_pointers != NULL)
    421     free (row_pointers);
    422   if (png_pixels != NULL)
    423     free (png_pixels);
    424 
    425386  return TRUE;
    426 
    427387} /* end of source */
  • trunk/src/libs/libpng-1.6.42/contrib/pngminus/pnm2png.c

    r96425 r103316  
    77 */
    88
     9#include <limits.h>
    910#include <stdio.h>
    1011#include <stdlib.h>
     
    1516#endif
    1617#ifndef TRUE
    17 #define TRUE (BOOL) 1
     18#define TRUE ((BOOL) 1)
    1819#endif
    1920#ifndef FALSE
    20 #define FALSE (BOOL) 0
    21 #endif
    22 
    23 /* make pnm2png verbose so we can find problems (needs to be before png.h) */
    24 #ifndef PNG_DEBUG
    25 #define PNG_DEBUG 0
     21#define FALSE ((BOOL) 0)
    2622#endif
    2723
     
    3430BOOL pnm2png (FILE *pnm_file, FILE *png_file, FILE *alpha_file,
    3531              BOOL interlace, BOOL alpha);
    36 void get_token (FILE *pnm_file, char *token_buf, size_t token_buf_size);
    37 png_uint_32 get_data (FILE *pnm_file, int depth);
    38 png_uint_32 get_value (FILE *pnm_file, int depth);
     32BOOL do_pnm2png (png_struct *png_ptr, png_info *info_ptr,
     33                 FILE *pnm_file, FILE *alpha_file,
     34                 BOOL interlace, BOOL alpha);
     35int fscan_pnm_magic (FILE *pnm_file, char *magic_buf, size_t magic_buf_size);
     36int fscan_pnm_token (FILE *pnm_file, char *token_buf, size_t token_buf_size);
     37int fscan_pnm_uint_32 (FILE *pnm_file, png_uint_32 *num_ptr);
     38png_uint_32 get_pnm_data (FILE *pnm_file, int depth);
     39png_uint_32 get_pnm_value (FILE *pnm_file, int depth);
    3940
    4041/*
     
    4748  FILE *fp_al = NULL;
    4849  FILE *fp_wr = stdout;
     50  const char *fname_wr = NULL;
    4951  BOOL interlace = FALSE;
    5052  BOOL alpha = FALSE;
    5153  int argi;
     54  int ret;
    5255
    5356  for (argi = 1; argi < argc; argi++)
     
    9598    else if (fp_wr == stdout)
    9699    {
     100      fname_wr = argv[argi];
    97101      if ((fp_wr = fopen (argv[argi], "wb")) == NULL)
    98102      {
     
    122126
    123127  /* call the conversion program itself */
    124   if (pnm2png (fp_rd, fp_wr, fp_al, interlace, alpha) == FALSE)
    125   {
    126     fprintf (stderr, "PNM2PNG\n");
    127     fprintf (stderr, "Error:  unsuccessful converting to PNG-image\n");
    128     exit (1);
    129   }
     128  ret = pnm2png (fp_rd, fp_wr, fp_al, interlace, alpha);
    130129
    131130  /* close input file */
     
    136135  if (alpha)
    137136    fclose (fp_al);
     137
     138  if (!ret)
     139  {
     140    fprintf (stderr, "PNM2PNG\n");
     141    fprintf (stderr, "Error:  unsuccessful converting to PNG-image\n");
     142    if (fname_wr)
     143      remove (fname_wr); /* no broken output file shall remain behind */
     144    exit (1);
     145  }
    138146
    139147  return 0;
     
    164172              BOOL interlace, BOOL alpha)
    165173{
    166   png_struct    *png_ptr = NULL;
    167   png_info      *info_ptr = NULL;
    168   png_byte      *png_pixels = NULL;
    169   png_byte      **row_pointers = NULL;
    170   png_byte      *pix_ptr = NULL;
    171   volatile png_uint_32 row_bytes;
    172 
    173   char          type_token[16];
    174   char          width_token[16];
    175   char          height_token[16];
    176   char          maxval_token[16];
    177   volatile int  color_type = 1;
    178   unsigned long ul_width = 0, ul_alpha_width = 0;
    179   unsigned long ul_height = 0, ul_alpha_height = 0;
    180   unsigned long ul_maxval = 0;
    181   volatile png_uint_32 width = 0, height = 0;
    182   volatile png_uint_32 alpha_width = 0, alpha_height = 0;
    183   png_uint_32   maxval;
    184   volatile int  bit_depth = 0;
    185   int           channels = 0;
    186   int           alpha_depth = 0;
    187   int           alpha_present = 0;
    188   int           row, col;
    189   BOOL          raw, alpha_raw = FALSE;
    190 #if defined(PNG_WRITE_INVERT_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED)
     174  png_struct    *png_ptr;
     175  png_info      *info_ptr;
     176  BOOL          ret;
     177
     178  /* initialize the libpng context for writing to png_file */
     179
     180  png_ptr = png_create_write_struct (png_get_libpng_ver(NULL),
     181                                     NULL, NULL, NULL);
     182  if (!png_ptr)
     183    return FALSE; /* out of memory */
     184
     185  info_ptr = png_create_info_struct (png_ptr);
     186  if (!info_ptr)
     187  {
     188    png_destroy_write_struct (&png_ptr, NULL);
     189    return FALSE; /* out of memory */
     190  }
     191
     192  if (setjmp (png_jmpbuf (png_ptr)))
     193  {
     194    png_destroy_write_struct (&png_ptr, &info_ptr);
     195    return FALSE; /* generic libpng error */
     196  }
     197
     198  png_init_io (png_ptr, png_file);
     199
     200  /* do the actual conversion */
     201  ret = do_pnm2png (png_ptr, info_ptr, pnm_file, alpha_file, interlace, alpha);
     202
     203  /* clean up the libpng structures and their internally-managed data */
     204  png_destroy_write_struct (&png_ptr, &info_ptr);
     205
     206  return ret;
     207}
     208
     209/*
     210 *  do_pnm2png - does the conversion in a fully-initialized libpng context
     211 */
     212
     213BOOL do_pnm2png (png_struct *png_ptr, png_info *info_ptr,
     214                 FILE *pnm_file, FILE *alpha_file,
     215                 BOOL interlace, BOOL alpha)
     216{
     217  png_byte      **row_pointers;
     218  png_byte      *pix_ptr;
     219  int           bit_depth;
     220  int           color_type;
     221  int           channels;
     222  char          magic_token[4];
     223  BOOL          raw;
     224  png_uint_32   width, height, maxval;
     225  png_uint_32   row_bytes;
     226  png_uint_32   row, col;
     227  png_uint_32   val16, i;
     228  png_uint_32   alpha_width = 0, alpha_height = 0;
     229  int           alpha_depth = 0, alpha_present = 0;
     230  BOOL          alpha_raw = FALSE;
    191231  BOOL          packed_bitmap = FALSE;
    192 #endif
    193   png_uint_32   tmp16;
    194   int           i;
    195232
    196233  /* read header of PNM file */
    197234
    198   get_token (pnm_file, type_token, sizeof (type_token));
    199   if (type_token[0] != 'P')
    200   {
    201     return FALSE;
    202   }
    203   else if ((type_token[1] == '1') || (type_token[1] == '4'))
    204   {
    205 #if defined(PNG_WRITE_INVERT_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED)
    206     raw = (type_token[1] == '4');
     235  if (fscan_pnm_magic (pnm_file, magic_token, sizeof (magic_token)) != 1)
     236    return FALSE; /* not a PNM file */
     237
     238  if ((magic_token[1] == '1') || (magic_token[1] == '4'))
     239  {
     240    if ((fscan_pnm_uint_32 (pnm_file, &width) != 1) ||
     241        (fscan_pnm_uint_32 (pnm_file, &height) != 1))
     242      return FALSE; /* bad PBM file header */
     243  } else if ((magic_token[1] == '2') || (magic_token[1] == '5') ||
     244             (magic_token[1] == '3') || (magic_token[1] == '6'))
     245  {
     246    if ((fscan_pnm_uint_32 (pnm_file, &width) != 1) ||
     247        (fscan_pnm_uint_32 (pnm_file, &height) != 1) ||
     248        (fscan_pnm_uint_32 (pnm_file, &maxval) != 1))
     249      return FALSE; /* bad PGM/PPM file header */
     250  }
     251
     252  if ((magic_token[1] == '1') || (magic_token[1] == '4'))
     253  {
     254    raw = (magic_token[1] == '4');
     255    bit_depth = 1;
    207256    color_type = PNG_COLOR_TYPE_GRAY;
    208     get_token (pnm_file, width_token, sizeof (width_token));
    209     sscanf (width_token, "%lu", &ul_width);
    210     width = (png_uint_32) ul_width;
    211     get_token (pnm_file, height_token, sizeof (height_token));
    212     sscanf (height_token, "%lu", &ul_height);
    213     height = (png_uint_32) ul_height;
    214     bit_depth = 1;
    215257    packed_bitmap = TRUE;
    216 #else
    217     fprintf (stderr, "PNM2PNG built without PNG_WRITE_INVERT_SUPPORTED and\n");
    218     fprintf (stderr, "PNG_WRITE_PACK_SUPPORTED can't read PBM (P1,P4) files\n");
    219     return FALSE;
    220 #endif
    221   }
    222   else if ((type_token[1] == '2') || (type_token[1] == '5'))
    223   {
    224     raw = (type_token[1] == '5');
     258  }
     259  else if ((magic_token[1] == '2') || (magic_token[1] == '5'))
     260  {
     261    raw = (magic_token[1] == '5');
    225262    color_type = PNG_COLOR_TYPE_GRAY;
    226     get_token (pnm_file, width_token, sizeof (width_token));
    227     sscanf (width_token, "%lu", &ul_width);
    228     width = (png_uint_32) ul_width;
    229     get_token (pnm_file, height_token, sizeof (height_token));
    230     sscanf (height_token, "%lu", &ul_height);
    231     height = (png_uint_32) ul_height;
    232     get_token (pnm_file, maxval_token, sizeof (maxval_token));
    233     sscanf (maxval_token, "%lu", &ul_maxval);
    234     maxval = (png_uint_32) ul_maxval;
    235 
    236     if (maxval <= 1)
     263    if (maxval == 0)
     264      return FALSE;
     265    else if (maxval == 1)
    237266      bit_depth = 1;
    238267    else if (maxval <= 3)
     
    247276      return FALSE;
    248277  }
    249   else if ((type_token[1] == '3') || (type_token[1] == '6'))
    250   {
    251     raw = (type_token[1] == '6');
     278  else if ((magic_token[1] == '3') || (magic_token[1] == '6'))
     279  {
     280    raw = (magic_token[1] == '6');
    252281    color_type = PNG_COLOR_TYPE_RGB;
    253     get_token (pnm_file, width_token, sizeof (width_token));
    254     sscanf (width_token, "%lu", &ul_width);
    255     width = (png_uint_32) ul_width;
    256     get_token (pnm_file, height_token, sizeof (height_token));
    257     sscanf (height_token, "%lu", &ul_height);
    258     height = (png_uint_32) ul_height;
    259     get_token (pnm_file, maxval_token, sizeof (maxval_token));
    260     sscanf (maxval_token, "%lu", &ul_maxval);
    261     maxval = (png_uint_32) ul_maxval;
    262     if (maxval <= 1)
     282    if (maxval == 0)
     283      return FALSE;
     284    else if (maxval == 1)
    263285      bit_depth = 1;
    264286    else if (maxval <= 3)
     
    273295      return FALSE;
    274296  }
     297  else if (magic_token[1] == '7')
     298  {
     299    fprintf (stderr, "PNM2PNG can't read PAM (P7) files\n");
     300    return FALSE;
     301  }
    275302  else
    276303  {
     
    282309  if (alpha)
    283310  {
    284     if (color_type == PNG_COLOR_TYPE_GRAY)
    285       color_type = PNG_COLOR_TYPE_GRAY_ALPHA;
    286     if (color_type == PNG_COLOR_TYPE_RGB)
    287       color_type = PNG_COLOR_TYPE_RGB_ALPHA;
    288 
    289     get_token (alpha_file, type_token, sizeof (type_token));
    290     if (type_token[0] != 'P')
    291     {
     311    if ((fscan_pnm_magic (alpha_file, magic_token, sizeof (magic_token)) != 1)
     312        || ((magic_token[1] != '2') && (magic_token[1] != '5')))
     313      return FALSE; /* not a PGM file */
     314
     315    if ((fscan_pnm_uint_32 (alpha_file, &alpha_width) != 1) ||
     316        (fscan_pnm_uint_32 (alpha_file, &alpha_height) != 1) ||
     317        (fscan_pnm_uint_32 (alpha_file, &maxval) != 1))
     318      return FALSE; /* bad PGM file header */
     319
     320    if ((alpha_width != width) || (alpha_height != height))
     321      return FALSE; /* mismatched PGM dimensions */
     322
     323    alpha_raw = (magic_token[1] == '5');
     324    color_type |= PNG_COLOR_MASK_ALPHA;
     325    if (maxval == 0)
    292326      return FALSE;
    293     }
    294     else if ((type_token[1] == '2') || (type_token[1] == '5'))
    295     {
    296       alpha_raw = (type_token[1] == '5');
    297       get_token (alpha_file, width_token, sizeof (width_token));
    298       sscanf (width_token, "%lu", &ul_alpha_width);
    299       alpha_width = (png_uint_32) ul_alpha_width;
    300       if (alpha_width != width)
    301         return FALSE;
    302       get_token (alpha_file, height_token, sizeof (height_token));
    303       sscanf (height_token, "%lu", &ul_alpha_height);
    304       alpha_height = (png_uint_32) ul_alpha_height;
    305       if (alpha_height != height)
    306         return FALSE;
    307       get_token (alpha_file, maxval_token, sizeof (maxval_token));
    308       sscanf (maxval_token, "%lu", &ul_maxval);
    309       maxval = (png_uint_32) ul_maxval;
    310       if (maxval <= 1)
    311         alpha_depth = 1;
    312       else if (maxval <= 3)
    313         alpha_depth = 2;
    314       else if (maxval <= 15)
    315         alpha_depth = 4;
    316       else if (maxval <= 255)
    317         alpha_depth = 8;
    318       else if (maxval <= 65535U)
    319         alpha_depth = 16;
    320       else /* maxval > 65535U */
    321         return FALSE;
    322       if (alpha_depth != bit_depth)
    323         return FALSE;
    324     }
    325     else
    326     {
     327    else if (maxval == 1)
     328      alpha_depth = 1;
     329    else if (maxval <= 3)
     330      alpha_depth = 2;
     331    else if (maxval <= 15)
     332      alpha_depth = 4;
     333    else if (maxval <= 255)
     334      alpha_depth = 8;
     335    else if (maxval <= 65535U)
     336      alpha_depth = 16;
     337    else /* maxval > 65535U */
    327338      return FALSE;
    328     }
     339    if (alpha_depth != bit_depth)
     340      return FALSE;
    329341  } /* end if alpha */
    330342
     
    338350  else if (color_type == PNG_COLOR_TYPE_RGB_ALPHA)
    339351    channels = 4;
    340 #if 0
    341352  else
    342     channels = 0; /* cannot happen */
    343 #endif
     353    return FALSE; /* NOTREACHED */
    344354
    345355  alpha_present = (channels - 1) % 2;
    346356
    347 #if defined(PNG_WRITE_INVERT_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED)
    348357  if (packed_bitmap)
    349358  {
     
    352361  }
    353362  else
    354 #endif
    355363  {
    356364    /* row_bytes is the width x number of channels x (bit-depth / 8) */
     
    364372    return FALSE;
    365373  }
    366   if ((png_pixels = (png_byte *)
    367        malloc ((size_t) row_bytes * (size_t) height)) == NULL)
    368   {
    369     /* out of memory */
    370     return FALSE;
    371   }
    372 
    373   /* read data from PNM file */
    374   pix_ptr = png_pixels;
    375 
    376   for (row = 0; row < (int) height; row++)
    377   {
    378 #if defined(PNG_WRITE_INVERT_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED)
     374
     375  /* allocate the rows using the same memory layout as libpng, and transfer
     376   * their ownership to libpng, with the responsibility to clean everything up;
     377   * please note the use of png_calloc instead of png_malloc */
     378  row_pointers = (png_byte **)
     379                 png_calloc (png_ptr, height * sizeof (png_byte *));
     380  png_set_rows (png_ptr, info_ptr, row_pointers);
     381  png_data_freer (png_ptr, info_ptr, PNG_DESTROY_WILL_FREE_DATA, PNG_FREE_ALL);
     382  for (row = 0; row < height; row++)
     383  {
     384    /* the individual rows should only be allocated after all the previous
     385     * steps completed successfully, because libpng must handle correctly
     386     * any image allocation left incomplete after an out-of-memory error */
     387    row_pointers[row] = (png_byte *) png_malloc (png_ptr, row_bytes);
     388  }
     389
     390  /* read the data from PNM file */
     391
     392  for (row = 0; row < height; row++)
     393  {
     394    pix_ptr = row_pointers[row];
    379395    if (packed_bitmap)
    380396    {
    381       for (i = 0; i < (int) row_bytes; i++)
     397      for (i = 0; i < row_bytes; i++)
    382398      {
    383399        /* png supports this format natively so no conversion is needed */
    384         *pix_ptr++ = get_data (pnm_file, 8);
     400        *pix_ptr++ = get_pnm_data (pnm_file, 8);
    385401      }
    386402    }
    387403    else
    388 #endif
    389     {
    390       for (col = 0; col < (int) width; col++)
     404    {
     405      for (col = 0; col < width; col++)
    391406      {
    392         for (i = 0; i < (channels - alpha_present); i++)
     407        for (i = 0; i < (png_uint_32) (channels - alpha_present); i++)
    393408        {
    394409          if (raw)
    395410          {
    396             *pix_ptr++ = get_data (pnm_file, bit_depth);
     411            *pix_ptr++ = get_pnm_data (pnm_file, bit_depth);
     412            if (bit_depth == 16)
     413              *pix_ptr++ = get_pnm_data (pnm_file, bit_depth);
    397414          }
    398415          else
     
    400417            if (bit_depth <= 8)
    401418            {
    402               *pix_ptr++ = get_value (pnm_file, bit_depth);
     419              *pix_ptr++ = get_pnm_value (pnm_file, bit_depth);
    403420            }
    404421            else
    405422            {
    406               tmp16 = get_value (pnm_file, bit_depth);
    407               *pix_ptr = (png_byte) ((tmp16 >> 8) & 0xFF);
     423              val16 = get_pnm_value (pnm_file, bit_depth);
     424              *pix_ptr = (png_byte) ((val16 >> 8) & 0xFF);
    408425              pix_ptr++;
    409               *pix_ptr = (png_byte) (tmp16 & 0xFF);
     426              *pix_ptr = (png_byte) (val16 & 0xFF);
    410427              pix_ptr++;
    411428            }
     
    417434          if (alpha_raw)
    418435          {
    419             *pix_ptr++ = get_data (alpha_file, alpha_depth);
     436            *pix_ptr++ = get_pnm_data (alpha_file, alpha_depth);
     437            if (alpha_depth == 16)
     438              *pix_ptr++ = get_pnm_data (alpha_file, alpha_depth);
    420439          }
    421440          else
     
    423442            if (alpha_depth <= 8)
    424443            {
    425               *pix_ptr++ = get_value (alpha_file, bit_depth);
     444              *pix_ptr++ = get_pnm_value (alpha_file, bit_depth);
    426445            }
    427446            else
    428447            {
    429               tmp16 = get_value (alpha_file, bit_depth);
    430               *pix_ptr++ = (png_byte) ((tmp16 >> 8) & 0xFF);
    431               *pix_ptr++ = (png_byte) (tmp16 & 0xFF);
     448              val16 = get_pnm_value (alpha_file, bit_depth);
     449              *pix_ptr++ = (png_byte) ((val16 >> 8) & 0xFF);
     450              *pix_ptr++ = (png_byte) (val16 & 0xFF);
    432451            }
    433452          }
     
    437456  } /* end for row */
    438457
    439   /* prepare the standard PNG structures */
    440   png_ptr = png_create_write_struct (png_get_libpng_ver(NULL),
    441                                      NULL, NULL, NULL);
    442   if (!png_ptr)
    443   {
    444     free (png_pixels);
    445     return FALSE;
    446   }
    447   info_ptr = png_create_info_struct (png_ptr);
    448   if (!info_ptr)
    449   {
    450     png_destroy_write_struct (&png_ptr, NULL);
    451     free (png_pixels);
    452     return FALSE;
    453   }
    454 
    455 #if defined(PNG_WRITE_INVERT_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED)
    456   if (packed_bitmap == TRUE)
    457   {
    458     png_set_packing (png_ptr);
    459     png_set_invert_mono (png_ptr);
    460   }
    461 #endif
    462 
    463   if (setjmp (png_jmpbuf (png_ptr)))
    464   {
    465     png_destroy_write_struct (&png_ptr, &info_ptr);
    466     free (png_pixels);
    467     return FALSE;
    468   }
    469 
    470   /* initialize the png structure */
    471   png_init_io (png_ptr, png_file);
    472 
    473458  /* we're going to write more or less the same PNG as the input file */
    474459  png_set_IHDR (png_ptr, info_ptr, width, height, bit_depth, color_type,
     
    476461                PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
    477462
     463  if (packed_bitmap == TRUE)
     464  {
     465    png_set_packing (png_ptr);
     466    png_set_invert_mono (png_ptr);
     467  }
     468
    478469  /* write the file header information */
    479470  png_write_info (png_ptr, info_ptr);
    480471
    481   /* if needed we will allocate memory for an new array of row-pointers */
    482   if (row_pointers == NULL)
    483   {
    484     if ((row_pointers = (png_byte **)
    485          malloc (height * sizeof (png_byte *))) == NULL)
    486     {
    487       png_destroy_write_struct (&png_ptr, &info_ptr);
    488       free (png_pixels);
    489       return FALSE;
    490     }
    491   }
    492 
    493   /* set the individual row_pointers to point at the correct offsets */
    494   for (i = 0; i < (int) height; i++)
    495     row_pointers[i] = png_pixels + i * row_bytes;
    496 
    497472  /* write out the entire image data in one call */
    498473  png_write_image (png_ptr, row_pointers);
     
    501476  png_write_end (png_ptr, info_ptr);
    502477
    503   /* clean up after the write, and free any memory allocated */
    504   png_destroy_write_struct (&png_ptr, &info_ptr);
    505 
    506   if (row_pointers != NULL)
    507     free (row_pointers);
    508   if (png_pixels != NULL)
    509     free (png_pixels);
    510 
    511478  return TRUE;
    512479} /* end of pnm2png */
    513480
    514481/*
    515  * get_token - gets the first string after whitespace
    516  */
    517 
    518 void get_token (FILE *pnm_file, char *token_buf, size_t token_buf_size)
     482 * fscan_pnm_magic - like fscan_pnm_token below, but expects the magic string
     483 *                   to start immediately, without any comment or whitespace,
     484 *                   and to match the regex /^P[1-9]$/
     485 */
     486
     487int fscan_pnm_magic (FILE *pnm_file, char *magic_buf, size_t magic_buf_size)
     488{
     489  int ret;
     490
     491  ret = fgetc (pnm_file);
     492  if (ret == EOF) return 0;
     493  ungetc (ret, pnm_file);
     494  if (ret != 'P') return 0;
     495
     496  /* the string buffer must be at least four bytes long, i.e., the capacity
     497   * required for strings of at least three characters long, i.e., the minimum
     498   * required for ensuring that our magic string is exactly two characters long
     499   */
     500  if (magic_buf_size < 4) return -1;
     501
     502  ret = fscan_pnm_token (pnm_file, magic_buf, magic_buf_size);
     503  if (ret < 1) return ret;
     504
     505  if ((magic_buf[1] < '1') || (magic_buf[1] > '9')) return 0;
     506  if (magic_buf[2] != '\0') return 0;
     507
     508  return 1;
     509}
     510
     511/*
     512 * fscan_pnm_token - extracts the first string token after whitespace,
     513 *                   and (like fscanf) returns the number of successful
     514 *                   extractions, which can be either 0 or 1
     515 */
     516
     517int fscan_pnm_token (FILE *pnm_file, char *token_buf, size_t token_buf_size)
    519518{
    520519  size_t i = 0;
     
    544543    ret = fgetc (pnm_file);
    545544    if (ret == EOF) break;
     545    if (ret == '0')
     546    {
     547      /* avoid storing more than one leading '0' in the token buffer,
     548       * to ensure that all valid (in-range) numeric inputs can fit in. */
     549      if ((i == 0) && (token_buf[i] == '0')) continue;
     550    }
    546551    if (++i == token_buf_size - 1) break;
    547552    token_buf[i] = (char) ret;
     
    550555
    551556  token_buf[i] = '\0';
    552 
    553   return;
    554 }
    555 
    556 /*
    557  *  get_data - takes first byte and converts into next pixel value,
    558  *             taking as much bits as defined by bit-depth and
    559  *             using the bit-depth to fill up a byte (0Ah -> AAh)
    560  */
    561 
    562 png_uint_32 get_data (FILE *pnm_file, int depth)
     557  return (i > 0) ? 1 : 0;
     558}
     559
     560/*
     561 * fscan_pnm_uint_32 - like fscan_token above, but expects the extracted token
     562 *                     to be numeric, and converts it to an unsigned 32-bit int
     563 */
     564
     565int fscan_pnm_uint_32 (FILE *pnm_file, png_uint_32 *num_ptr)
     566{
     567  char token[16];
     568  unsigned long token_value;
     569  int ret;
     570
     571  ret = fscan_pnm_token (pnm_file, token, sizeof (token));
     572  if (ret < 1) return ret;
     573
     574  if ((token[0] < '0') && (token[0] > '9'))
     575    return 0; /* the token starts with junk, or a +/- sign, which is invalid */
     576
     577  ret = sscanf (token, "%lu%*c", &token_value);
     578  if (ret != 1)
     579    return 0; /* the token ends with junk */
     580
     581  *num_ptr = (png_uint_32) token_value;
     582
     583#if ULONG_MAX > 0xFFFFFFFFUL
     584  /* saturate the converted number, following the fscanf convention */
     585  if (token_value > 0xFFFFFFFFUL)
     586    *num_ptr = 0xFFFFFFFFUL;
     587#endif
     588
     589  return 1;
     590}
     591
     592/*
     593 *  get_pnm_data - takes first byte and converts into next pixel value,
     594 *                 taking as many bits as defined by bit-depth and
     595 *                 using the bit-depth to fill up a byte (0x0A -> 0xAA)
     596 */
     597
     598png_uint_32 get_pnm_data (FILE *pnm_file, int depth)
    563599{
    564600  static int bits_left = 0;
    565601  static int old_value = 0;
    566602  static int mask = 0;
     603  png_uint_32 ret_value;
    567604  int i;
    568   png_uint_32 ret_value;
    569605
    570606  if (mask == 0)
     
    574610  if (bits_left <= 0)
    575611  {
     612    /* FIXME:
     613     * signal the premature end of file, instead of pretending to read zeroes
     614     */
    576615    old_value = fgetc (pnm_file);
     616    if (old_value == EOF) return 0;
    577617    bits_left = 8;
    578618  }
     
    589629
    590630/*
    591  *  get_value - takes first (numeric) string and converts into number,
    592  *              using the bit-depth to fill up a byte (0Ah -> AAh)
    593  */
    594 
    595 png_uint_32 get_value (FILE *pnm_file, int depth)
     631 *  get_pnm_value - takes first (numeric) string and converts into number,
     632 *                  using the bit-depth to fill up a byte (0x0A -> 0xAA)
     633 */
     634
     635png_uint_32 get_pnm_value (FILE *pnm_file, int depth)
    596636{
    597637  static png_uint_32 mask = 0;
    598   char token[16];
    599   unsigned long ul_ret_value;
    600638  png_uint_32 ret_value;
    601   int i = 0;
     639  int i;
    602640
    603641  if (mask == 0)
     
    605643      mask = (mask << 1) | 0x01;
    606644
    607   get_token (pnm_file, token, sizeof (token));
    608   sscanf (token, "%lu", &ul_ret_value);
    609   ret_value = (png_uint_32) ul_ret_value;
     645  if (fscan_pnm_uint_32 (pnm_file, &ret_value) != 1)
     646  {
     647    /* FIXME:
     648     * signal the invalid numeric tokens or the premature end of file,
     649     * instead of pretending to read zeroes
     650     */
     651    return 0;
     652  }
    610653
    611654  ret_value &= mask;
  • trunk/src/libs/libpng-1.6.42/contrib/powerpc-vsx/linux.c

    r96425 r103316  
    33 * Copyright (c) 2017 Glenn Randers-Pehrson
    44 * Written by Vadim Barkov, 2017.
    5  * Last changed in libpng 1.6.29 [March 16, 2017]
    65 *
    76 * This code is released under the libpng license.
     
    1312 *
    1413 * png_have_vsx implemented for Linux by reading the widely available
    15  * pseudo-file /proc/cpuinfo. 
     14 * pseudo-file /proc/cpuinfo.
    1615 *
    1716 * This code is strict ANSI-C and is probably moderately portable; it does
  • trunk/src/libs/libpng-1.6.42/contrib/powerpc-vsx/linux_aux.c

    r96425 r103316  
    33 * Copyright (c) 2017 Glenn Randers-Pehrson
    44 * Written by Vadim Barkov, 2017.
    5  * Last changed in libpng 1.6.29 [March 16, 2017]
    65 *
    76 * This code is released under the libpng license.
  • trunk/src/libs/libpng-1.6.42/contrib/testpngs/makepngs.sh

    r96425 r103316  
    1 #!/bin/sh
    2 #
     1#!/usr/bin/env bash
     2
    33# Make a set of test PNG files, MAKEPNG is the name of the makepng executable
    44# built from contrib/libtests/makepng.c
    55
    66# Copyright (c) 2015 John Cunningham Bowler
    7 
    8 # Last changed in libpng 1.6.20 [December 3, 2015]
    97
    108# This code is released under the libpng license.
  • trunk/src/libs/libpng-1.6.42/contrib/tools/checksum-icc.c

    r96425 r103316  
    22 *
    33 * Copyright (c) 2013 John Cunningham Bowler
    4  *
    5  * Last changed in libpng 1.6.0 [February 14, 2013]
    64 *
    75 * This code is released under the libpng license.
     
    1210 * generate check-codes for use when matching ICC profiles within libpng.
    1311 */
     12
    1413#include <stdio.h>
    15 
    1614#include <zlib.h>
    1715
  • trunk/src/libs/libpng-1.6.42/contrib/tools/cvtcolor.c

    r96425 r103316  
    1 /*-
    2  * convert.c
    3  *
    4  * Last changed in libpng 1.6.0 [February 14, 2013]
     1/* convert.c
    52 *
    63 * COPYRIGHT: Written by John Cunningham Bowler, 2013.
     
    118 * Convert 8-bit sRGB or 16-bit linear values to another format.
    129 */
     10
    1311#define _ISOC99_SOURCE 1
    1412
  • trunk/src/libs/libpng-1.6.42/contrib/tools/genpng.c

    r96425 r103316  
    1 /*- genpng
     1/* genpng
    22 *
    33 * COPYRIGHT: Written by John Cunningham Bowler, 2015.
     
    7070 * intersection.
    7171 */
     72
    7273#include <stddef.h>
    7374#include <stdlib.h>
     
    454455 * { inside_circle, check_circle }
    455456 *
    456  * The functions here are analoguous to the square ones; however, they check
     457 * The functions here are analogous to the square ones; however, they check
    457458 * the corresponding ellipse as opposed to the rectangle.
    458459 */
  • trunk/src/libs/libpng-1.6.42/contrib/tools/intgamma.sh

    r96425 r103316  
    11#!/bin/sh
    2 #
     2
    33# intgamma.sh
    4 #
    5 # Last changed in libpng 1.6.0 [February 14, 2013]
    64#
    75# COPYRIGHT: Written by John Cunningham Bowler, 2013.
    86# To the extent possible under law, the author has waived all copyright and
    9 # related or neighboring rights to this work.  This work is published from:
    10 # United States.
     7# related or neighboring rights to this work.  The author published this work
     8# from the United States.
    119#
    1210# Shell script to generate png.c 8-bit and 16-bit log tables (see the code in
     
    1816#
    1917# "bc" must be on the path when the script is executed, and the math library
    20 # (-lm) must be available
    21 #
    22 # function to print out a list of numbers as integers; the function truncates
    23 # the integers which must be one-per-line
    24 function print(){
     18# (-lm) must be available.
     19
     20# Function to print out a list of numbers as integers; the function truncates
     21# the integers which must be one-per-line.
     22print(){
    2523   awk 'BEGIN{
    2624      str = ""
  • trunk/src/libs/libpng-1.6.42/contrib/tools/makesRGB.c

    r96425 r103316  
    11/* makesRGB.c -- build sRGB-to-linear and linear-to-sRGB conversion tables
    2  *
    3  * Last changed in libpng 1.6.0 [February 14, 2013]
    42 *
    53 * COPYRIGHT: Written by John Cunningham Bowler, 2013.
     
    1513 * tables and display it.
    1614 */
     15
    1716#define _C99_SOURCE 1
    1817#include <stdio.h>
  • trunk/src/libs/libpng-1.6.42/contrib/tools/png-fix-itxt.c

    r96425 r103316  
    1 
    2 /* png-fix-itxt version 1.0.0
     1/* png-fix-itxt
    32 *
    43 * Copyright 2015 Glenn Randers-Pehrson
    5  * Last changed in libpng 1.6.18 [July 23, 2015]
    64 *
    75 * This code is released under the libpng license.
     
    119 * Usage:
    1210 *
    13  *     png-fix-itxt.exe < bad.png > good.png
     11 *     png-fix-itxt < bad.png > good.png
    1412 *
    1513 * Fixes a PNG file written with libpng-1.6.0 or 1.6.1 that has one or more
  • trunk/src/libs/libpng-1.6.42/contrib/tools/pngcp.c

    r96425 r103316  
    11/* pngcp.c
    22 *
    3  * Copyright (c) 2016 John Cunningham Bowler
    4  *
    5  * Last changed in libpng 1.6.24 [August 4, 2016]
     3 * Copyright (c) 2016,2022,2024 John Cunningham Bowler
    64 *
    75 * This code is released under the libpng license.
     
    1513 * For a more extensive example that uses the transforms see
    1614 * contrib/libtests/pngimage.c in the libpng distribution.
     15 *
     16 * This code is not intended for installation in a release system; the command
     17 * line options are not documented and most of the behavior is intended for
     18 * testing libpng performance, both speed and compression.
    1719 */
     20
    1821#include "pnglibconf.h" /* To find how libpng was configured. */
    1922
     
    8588#  define voidcast(type, value) (value)
    8689#endif /* __cplusplus */
    87 
    88 #ifdef __GNUC__
    89    /* Many versions of GCC erroneously report that local variables unmodified
    90     * within the scope of a setjmp may be clobbered.  This hacks round the
    91     * problem (sometimes) without harming other compilers.
    92     */
    93 #  define gv volatile
    94 #else
    95 #  define gv
    96 #endif
    9790
    9891/* 'CLOCK_PROCESS_CPUTIME_ID' is one of the clock timers for clock_gettime.  It
     
    337330
    338331#  ifdef PNG_SW_COMPRESS_png_level
    339       /* The libpng compression level isn't searched because it justs sets the
     332      /* The libpng compression level isn't searched because it just sets the
    340333       * other things that are searched!
    341334       */
     
    393386   jmp_buf          error_return;      /* Where to go to on error */
    394387   unsigned int     errset;            /* error_return is set */
     388   int              errlevel;          /* error level from longjmp */
    395389
    396390   const char      *operation;         /* What is happening */
     
    504498
    505499static void
    506 display_clean_read(struct display *dp)
     500display_clean_read(struct display *dp, int freeinfo)
    507501{
    508502   if (dp->read_pp != NULL)
    509       png_destroy_read_struct(&dp->read_pp, NULL, NULL);
     503      png_destroy_read_struct(&dp->read_pp, freeinfo ? &dp->ip : NULL, NULL);
    510504
    511505   if (dp->fp != NULL)
     
    518512
    519513static void
    520 display_clean_write(struct display *dp)
     514display_clean_write(struct display *dp, int freeinfo)
    521515{
    522516   if (dp->fp != NULL)
     
    528522
    529523   if (dp->write_pp != NULL)
    530       png_destroy_write_struct(&dp->write_pp, dp->tsp > 0 ? NULL : &dp->ip);
     524      png_destroy_write_struct(&dp->write_pp, freeinfo ? &dp->ip : NULL);
    531525}
    532526
     
    534528display_clean(struct display *dp)
    535529{
    536    display_clean_read(dp);
    537    display_clean_write(dp);
     530   display_clean_read(dp, 1/*freeinfo*/);
     531   display_clean_write(dp, 1/*freeinfo*/);
    538532   dp->output_file = NULL;
    539533
     
    632626   {
    633627      if (dp->errset)
     628      {
     629         dp->errlevel = level;
    634630         longjmp(dp->error_return, level);
     631      }
    635632
    636633      else
     
    779776   /* Add the appropriate option string to dp->curr. */
    780777{
    781    dp->stack[sp].opt_string_end = set_opt_string_(dp, sp, dp->stack[sp].opt, 
     778   dp->stack[sp].opt_string_end = set_opt_string_(dp, sp, dp->stack[sp].opt,
    782779      options[dp->stack[sp].opt].values[dp->stack[sp].entry].name);
    783780}
     
    17461743read_png(struct display *dp, const char *filename)
    17471744{
    1748    display_clean_read(dp); /* safety */
     1745   /* This is an assumption of the code; it may happen if a previous write fails
     1746    * and there is a bug in the cleanup handling below (look for setjmp).
     1747    * Passing freeinfo==1 to display_clean_read below avoids a second error
     1748    * on dp->ip != NULL below.
     1749    */
     1750   if (dp->read_pp != NULL)
     1751   {
     1752      display_log(dp, APP_FAIL, "unexpected png_read_struct");
     1753      display_clean_read(dp, 1/*freeinfo*/); /* recovery */
     1754   }
     1755
    17491756   display_start_read(dp, filename);
    17501757
     
    17701777#  endif /* IGNORE_INDEX */
    17711778
     1779   if (dp->ip != NULL)
     1780   {
     1781      /* UNEXPECTED: some problem in the display_clean function calls! */
     1782      display_log(dp, APP_FAIL, "read_png: freeing old info struct");
     1783      png_destroy_info_struct(dp->read_pp, &dp->ip);
     1784   }
     1785
    17721786   /* The png_read_png API requires us to make the info struct, but it does the
    17731787    * call to png_read_info.
     
    18491863#endif /* FIX_INDEX */
    18501864
    1851    display_clean_read(dp);
     1865   /* NOTE: dp->ip is where all the information about the PNG that was just read
     1866    * is stored.  It can be used to write and write again a single PNG file,
     1867    * however be aware that prior to libpng 1.7 text chunks could only be
     1868    * written once; this is a bug which would require a significant code rewrite
     1869    * to fix, it has been there in several versions of libpng (it was introduced
     1870    * to fix another bug involving duplicate writes of the text chunks.)
     1871    */
     1872   display_clean_read(dp, 0/*freeiinfo*/);
    18521873   dp->operation = "none";
    18531874}
     
    19761997write_png(struct display *dp, const char *destname)
    19771998{
    1978    display_clean_write(dp); /* safety */
     1999   /* If this test fails png_write_png would fail *silently* below; this
     2000    * is not helpful, so catch the problem now and give up:
     2001    */
     2002   if (dp->ip == NULL)
     2003      display_log(dp, INTERNAL_ERROR, "missing png_info");
     2004
     2005   /* This is an assumption of the code; it may happen if a previous
     2006    * write fails and there is a bug in the cleanup handling below.
     2007    */
     2008   if (dp->write_pp != NULL)
     2009   {
     2010      display_log(dp, APP_FAIL, "unexpected png_write_struct");
     2011      display_clean_write(dp, 0/*!freeinfo*/);
     2012   }
     2013
    19792014   display_start_write(dp, destname);
    19802015
     
    20742109   }
    20752110
    2076    /* Clean it on the way out - if control returns to the caller then the
    2077     * written_file contains the required data.
    2078     */
    2079    display_clean_write(dp);
    20802111   dp->operation = "none";
    20812112}
     
    22442275      do
    22452276      {
     2277         /* Clean before each write_png; this just removes *dp->write_pp which
     2278          * cannot be reused.
     2279          */
     2280         display_clean_write(dp, 0/*!freeinfo*/);
    22462281         write_png(dp, tmpname);
    22472282
     
    22732308      dp->write_size = dp->best_size;
    22742309   }
     2310
     2311   display_clean_write(dp, 1/*freeinfo*/);
    22752312}
    22762313
    22772314static int
    2278 cppng(struct display *dp, const char *file, const char *gv dest)
    2279    /* Exists solely to isolate the setjmp clobbers which some versions of GCC
    2280     * erroneously generate.
    2281     */
    2282 {
    2283    int ret = setjmp(dp->error_return);
    2284 
    2285    if (ret == 0)
     2315cppng(struct display *dp, const char *file, const char *dest)
     2316{
     2317   if (setjmp(dp->error_return) == 0)
    22862318   {
    22872319      dp->errset = 1;
     
    22952327      dp->errset = 0;
    22962328
    2297       if (ret < ERRORS) /* shouldn't longjmp on warnings */
    2298          display_log(dp, INTERNAL_ERROR, "unexpected return code %d", ret);
    2299 
    2300       return ret;
     2329      if (dp->errlevel < ERRORS) /* shouldn't longjmp on warnings */
     2330         display_log(dp, INTERNAL_ERROR, "unexpected return code %d",
     2331               dp->errlevel);
     2332
     2333      return dp->errlevel;
    23012334   }
    23022335}
  • trunk/src/libs/libpng-1.6.42/contrib/tools/pngfix.c

    r96425 r103316  
    11/* pngfix.c
    22 *
    3  * Last changed in libpng 1.6.31 [July 27, 2017]
    4  * Copyright (c) 2014-2017 John Cunningham Bowler
     3 * Copyright (c) 2014-2017,2024 John Cunningham Bowler
    54 *
    65 * This code is released under the libpng license.
     
    1110 * See the usage message for more information.
    1211 */
     12
    1313#include <stdlib.h>
    1414#include <stdio.h>
     
    2020
    2121#define implies(x,y) assert(!(x) || (y))
    22 
    23 #ifdef __GNUC__
    24    /* This is used to fix the error:
    25     *
    26     * pngfix.c:
    27     * In function 'zlib_advance':
    28     * pngfix.c:181:13: error: assuming signed overflow does not
    29     *   occur when simplifying conditional to constant [-Werror=strict-overflow]
    30     */
    31 #  define FIX_GCC volatile
    32 #else
    33 #  define FIX_GCC
    34 #endif
    3522
    3623#define PROGRAM_NAME "pngfix"
     
    219206    */
    220207{
    221    FIX_GCC int out_digits = 0;
     208   int out_digits = 0;
    222209
    223210   while (out_digits < in_digits)
     
    264251
    265252static int
    266 uarb_mult_digit(uarb acc, int a_digits, uarb num, FIX_GCC int n_digits,
     253uarb_mult_digit(uarb acc, int a_digits, uarb num, int n_digits,
    267254   png_uint_16 val)
    268255   /* Primitive one-digit multiply - 'val' must be 0..65535. Note that this
     
    337324    */
    338325{
    339    FIX_GCC int i = ndigits;
     326   int i = ndigits;
    340327   png_uint_16 carry = 0;
    341328
     
    352339
    353340      /* The shift may reduce ndigits */
    354       if (i == ndigits-1 && temp == 0)
     341      if (i+1 == ndigits && temp == 0)
    355342         ndigits = i;
    356343   }
     
    868855    *
    869856    * When a chunk control structure is instantiated these values are copied
    870     * into the structure and can then be overritten with the data for the next
     857    * into the structure and can then be overwritten with the data for the next
    871858    * chunk.
    872859    */
     
    1006993   if (file->out != NULL)
    1007994   {
    1008       /* NOTE: this is bitwise |, all the following functions must execute and
    1009        * must succeed.
     995      /* On some systems 'fclose' deletes the FILE struct (making it
     996       * inaccessbile).  There is no guarantee that fclose returns an error
     997       * code from fflush or, indeed, from the FILE error indicator.  There is
     998       * also no explicit (or clear) guarantee in the standard that anything
     999       * other than a read or write operation sets the error indicator; fflush
     1000       * is not a read or write operation, so both conditions must be checked
     1001       * to ensure the close succeeded and in ANSI-C conformant code they must
     1002       * be checked before the fclose call.
    10101003       */
    1011       if (ferror(file->out) | fflush(file->out) | fclose(file->out))
     1004      const int err = fflush(file->out) || ferror(file->out);
     1005
     1006      if (fclose(file->out) || err)
    10121007      {
    10131008         perror(file->out_name);
     
    15991594   chunk->chunk_type = file->type;
    16001595
    1601    /* Compresssed/uncompressed size information (from the zlib control structure
     1596   /* Compressed/uncompressed size information (from the zlib control structure
    16021597    * that is used to check the compressed data in a chunk.)
    16031598    */
     
    29302925
    29312926   /* Control reaches this point if the chunk must be skipped.  For chunks other
    2932     * than IDAT this means that the zlib compressed data is fatally damanged and
     2927    * than IDAT this means that the zlib compressed data is fatally damaged and
    29332928    * the chunk will not be passed to libpng.  For IDAT it means that the end of
    29342929    * the IDAT stream has not yet been reached and we must handle the next
     
    39623957         size_t outlen = strlen(*argv);
    39633958
     3959         if (outlen > FILENAME_MAX)
     3960         {
     3961            fprintf(stderr, "%s: output file name too long: %s%s%s\n",
     3962               prog, prefix, *argv, suffix ? suffix : "");
     3963            global.status_code |= WRITE_ERROR;
     3964            continue;
     3965         }
     3966
    39643967         if (outfile == NULL) /* else this takes precedence */
    39653968         {
     
    40474050}
    40484051#endif /* PNG_SETJMP_SUPPORTED */
    4049 
     4052/* vi: set textwidth=80 shiftwidth=3 softtabstop=-1 expandtab: */
  • trunk/src/libs/libpng-1.6.42/contrib/tools/sRGB.h

    r96425 r103316  
    1 /*-
    2  * sRGB.h
    3  *
    4  * Last changed in libpng 1.6.0 [February 14, 2013]
     1/* sRGB.h
    52 *
    63 * COPYRIGHT: Written by John Cunningham Bowler, 2013.
     
    1714 * https://en.wikipedia.org/wiki/SRGB).
    1815 */
     16
    1917static double
    2018sRGB_from_linear(double l)
  • trunk/src/libs/libpng-1.6.42/contrib/visupng/VisualPng.c

    r96425 r103316  
    104104    }
    105105
    106     /* if filename given on commandline, store it */
     106    /* if filename given on command line, store it */
    107107    if ((szCmdLine != NULL) && (*szCmdLine != '\0'))
    108108        if (szCmdLine[0] == '"')
  • trunk/src/libs/libpng-1.6.42/depcomp

    r96425 r103316  
    44scriptversion=2018-03-07.03; # UTC
    55
    6 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
     6# Copyright (C) 1999-2021 Free Software Foundation, Inc.
    77
    88# This program is free software; you can redistribute it and/or modify
  • trunk/src/libs/libpng-1.6.42/example.c

    r96425 r103316  
    44/* example.c - an example of using libpng
    55 *
    6  * Maintained 2018 Cosmin Truta
     6 * Maintained 2018-2024 Cosmin Truta
    77 * Maintained 1998-2016 Glenn Randers-Pehrson
    88 * Maintained 1996-1997 Andreas Dilger
     
    126126            else
    127127               free(buffer);
     128         }
    128129      }
    129130
     
    259260
    260261   /* Compare the first PNG_BYTES_TO_CHECK bytes of the signature.
    261     * Return nonzero (true) if they match.
    262     */
    263    return(!png_sig_cmp(buf, 0, PNG_BYTES_TO_CHECK));
     262    * Return true if they match.
     263    */
     264   return png_sig_cmp(buf, 0, PNG_BYTES_TO_CHECK) == 0;
    264265}
    265266
     
    281282
    282283   if ((fp = fopen(file_name, "rb")) == NULL)
    283       return (ERROR);
     284      return ERROR;
    284285
    285286#else no_open_file /* prototype 2 */
     
    304305   {
    305306      fclose(fp);
    306       return (ERROR);
     307      return ERROR;
    307308   }
    308309
     
    313314      fclose(fp);
    314315      png_destroy_read_struct(&png_ptr, NULL, NULL);
    315       return (ERROR);
     316      return ERROR;
    316317   }
    317318
     
    326327      fclose(fp);
    327328      /* If we get here, we had a problem reading the file. */
    328       return (ERROR);
     329      return ERROR;
    329330   }
    330331
     
    585586
    586587   /* That's it! */
    587    return (OK);
     588   return OK;
    588589}
    589590
     
    604605   {
    605606      *info_ptr = NULL;
    606       return (ERROR);
     607      return ERROR;
    607608   }
    608609   *info_ptr = png_create_info_struct(png_ptr);
     
    610611   {
    611612      png_destroy_read_struct(png_ptr, info_ptr, NULL);
    612       return (ERROR);
     613      return ERROR;
    613614   }
    614615   if (setjmp(png_jmpbuf((*png_ptr))))
    615616   {
    616617      png_destroy_read_struct(png_ptr, info_ptr, NULL);
    617       return (ERROR);
     618      return ERROR;
    618619   }
    619620
     
    632633   png_set_progressive_read_fn(*png_ptr, (void *)stream_data,
    633634       info_callback, row_callback, end_callback);
    634    return (OK);
     635   return OK;
    635636}
    636637
     
    643644      /* Free the png_ptr and info_ptr memory on error. */
    644645      png_destroy_read_struct(png_ptr, info_ptr, NULL);
    645       return (ERROR);
     646      return ERROR;
    646647   }
    647648
     
    657658    */
    658659   png_process_data(*png_ptr, *info_ptr, buffer, length);
    659    return (OK);
     660   return OK;
    660661}
    661662
     
    747748   fp = fopen(file_name, "wb");
    748749   if (fp == NULL)
    749       return (ERROR);
     750      return ERROR;
    750751
    751752   /* Create and initialize the png_struct with the desired error handler
     
    760761   {
    761762      fclose(fp);
    762       return (ERROR);
     763      return ERROR;
    763764   }
    764765
     
    769770      fclose(fp);
    770771      png_destroy_write_struct(&png_ptr,  NULL);
    771       return (ERROR);
     772      return ERROR;
    772773   }
    773774
     
    780781      fclose(fp);
    781782      png_destroy_write_struct(&png_ptr, &info_ptr);
    782       return (ERROR);
     783      return ERROR;
    783784   }
    784785
     
    10351036
    10361037   /* That's it! */
    1037    return (OK);
     1038   return OK;
    10381039}
    10391040
  • trunk/src/libs/libpng-1.6.42/install-sh

    r96425 r103316  
    22# install - install a program, script, or datafile
    33
    4 scriptversion=2018-03-11.20; # UTC
     4scriptversion=2023-11-23.18; # UTC
    55
    66# This originates from X11R5 (mit/util/scripts/install.sh), which was
     
    7070mode=0755
    7171
     72# Create dirs (including intermediate dirs) using mode 755.
     73# This is like GNU 'install' as of coreutils 8.32 (2020).
     74mkdir_umask=22
     75
     76backupsuffix=
    7277chgrpcmd=
    7378chmodcmd=$chmodprog
     
    100105
    101106  -c            (ignored)
    102   -C            install only if different (preserve the last data modification time)
     107  -C            install only if different (preserve data modification time)
    103108  -d            create directories instead of installing files.
    104109  -g GROUP      $chgrpprog installed files to GROUP.
    105110  -m MODE       $chmodprog installed files to MODE.
    106111  -o USER       $chownprog installed files to USER.
     112  -p            pass -p to $cpprog.
    107113  -s            $stripprog installed files.
     114  -S SUFFIX     attempt to back up existing files, with suffix SUFFIX.
    108115  -t DIRECTORY  install into DIRECTORY.
    109116  -T            report an error if DSTFILE is a directory.
     
    112119  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
    113120  RMPROG STRIPPROG
    114 "
     121
     122By default, rm is invoked with -f; when overridden with RMPROG,
     123it's up to you to specify -f if you want it.
     124
     125If -S is not specified, no backups are attempted.
     126
     127Report bugs to <[email protected]>.
     128GNU Automake home page: <https://www.gnu.org/software/automake/>.
     129General help using GNU software: <https://www.gnu.org/gethelp/>."
    115130
    116131while test $# -ne 0; do
     
    138153        shift;;
    139154
     155    -p) cpprog="$cpprog -p";;
     156
    140157    -s) stripcmd=$stripprog;;
     158
     159    -S) backupsuffix="$2"
     160        shift;;
    141161
    142162    -t)
     
    256276    test -d "$dstdir"
    257277    dstdir_status=$?
     278    # Don't chown directories that already exist.
     279    if test $dstdir_status = 0; then
     280      chowncmd=""
     281    fi
    258282  else
    259283
     
    302326    case $posix_mkdir in
    303327      '')
    304         # Create intermediate dirs using mode 755 as modified by the umask.
    305         # This is like FreeBSD 'install' as of 1997-10-28.
    306         umask=`umask`
    307         case $stripcmd.$umask in
    308           # Optimize common cases.
    309           *[2367][2367]) mkdir_umask=$umask;;
    310           .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
    311 
    312           *[0-7])
    313             mkdir_umask=`expr $umask + 22 \
    314               - $umask % 100 % 40 + $umask % 20 \
    315               - $umask % 10 % 4 + $umask % 2
    316             `;;
    317           *) mkdir_umask=$umask,go-w;;
    318         esac
    319 
    320328        # With -d, create the new directory with the user-specified mode.
    321329        # Otherwise, rely on $mkdir_umask.
     
    327335
    328336        posix_mkdir=false
    329         case $umask in
    330           *[123567][0-7][0-7])
    331             # POSIX mkdir -p sets u+wx bits regardless of umask, which
    332             # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
    333             ;;
    334           *)
    335             # Note that $RANDOM variable is not portable (e.g. dash);  Use it
    336             # here however when possible just to lower collision chance.
    337             tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
    338 
    339             trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
    340 
    341             # Because "mkdir -p" follows existing symlinks and we likely work
    342             # directly in world-writeable /tmp, make sure that the '$tmpdir'
    343             # directory is successfully created first before we actually test
    344             # 'mkdir -p' feature.
    345             if (umask $mkdir_umask &&
    346                 $mkdirprog $mkdir_mode "$tmpdir" &&
    347                 exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
    348             then
    349               if test -z "$dir_arg" || {
    350                    # Check for POSIX incompatibilities with -m.
    351                    # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
    352                    # other-writable bit of parent directory when it shouldn't.
    353                    # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
    354                    test_tmpdir="$tmpdir/a"
    355                    ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
    356                    case $ls_ld_tmpdir in
    357                      d????-?r-*) different_mode=700;;
    358                      d????-?--*) different_mode=755;;
    359                      *) false;;
    360                    esac &&
    361                    $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
    362                      ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
    363                      test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
    364                    }
    365                  }
    366               then posix_mkdir=:
    367               fi
    368               rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
    369             else
    370               # Remove any dirs left behind by ancient mkdir implementations.
    371               rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
    372             fi
    373             trap '' 0;;
    374         esac;;
     337        # The $RANDOM variable is not portable (e.g., dash).  Use it
     338        # here however when possible just to lower collision chance.
     339        tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
     340
     341        trap '
     342          ret=$?
     343          rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
     344          exit $ret
     345        ' 0
     346
     347        # Because "mkdir -p" follows existing symlinks and we likely work
     348        # directly in world-writeable /tmp, make sure that the '$tmpdir'
     349        # directory is successfully created first before we actually test
     350        # 'mkdir -p'.
     351        if (umask $mkdir_umask &&
     352            $mkdirprog $mkdir_mode "$tmpdir" &&
     353            exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
     354        then
     355          if test -z "$dir_arg" || {
     356               # Check for POSIX incompatibilities with -m.
     357               # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
     358               # other-writable bit of parent directory when it shouldn't.
     359               # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
     360               test_tmpdir="$tmpdir/a"
     361               ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
     362               case $ls_ld_tmpdir in
     363                 d????-?r-*) different_mode=700;;
     364                 d????-?--*) different_mode=755;;
     365                 *) false;;
     366               esac &&
     367               $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
     368                 ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
     369                 test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
     370               }
     371             }
     372          then posix_mkdir=:
     373          fi
     374          rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
     375        else
     376          # Remove any dirs left behind by ancient mkdir implementations.
     377          rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
     378        fi
     379        trap '' 0;;
    375380    esac
    376381
     
    383388    else
    384389
    385       # The umask is ridiculous, or mkdir does not conform to POSIX,
     390      # mkdir does not conform to POSIX,
    386391      # or it failed possibly due to a race condition.  Create the
    387392      # directory the slow way, step by step, checking for races as we go.
     
    412417        else
    413418          if $posix_mkdir; then
    414             (umask=$mkdir_umask &&
     419            (umask $mkdir_umask &&
    415420             $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
    416421            # Don't fail if two instances are running concurrently.
     
    452457
    453458    # Copy the file name to the temp name.
    454     (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
     459    (umask $cp_umask &&
     460     { test -z "$stripcmd" || {
     461         # Create $dsttmp read-write so that cp doesn't create it read-only,
     462         # which would cause strip to fail.
     463         if test -z "$doit"; then
     464           : >"$dsttmp" # No need to fork-exec 'touch'.
     465         else
     466           $doit touch "$dsttmp"
     467         fi
     468       }
     469     } &&
     470     $doit_exec $cpprog "$src" "$dsttmp") &&
    455471
    456472    # and set any options; do chmod last to preserve setuid bits.
     
    478494      rm -f "$dsttmp"
    479495    else
     496      # If $backupsuffix is set, and the file being installed
     497      # already exists, attempt a backup.  Don't worry if it fails,
     498      # e.g., if mv doesn't support -f.
     499      if test -n "$backupsuffix" && test -f "$dst"; then
     500        $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
     501      fi
     502
    480503      # Rename the file to the real destination.
    481504      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
     
    492515        {
    493516          test ! -f "$dst" ||
    494           $doit $rmcmd -f "$dst" 2>/dev/null ||
     517          $doit $rmcmd "$dst" 2>/dev/null ||
    495518          { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
    496             { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
     519            { $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
    497520          } ||
    498521          { echo "$0: cannot unlink or rename $dst" >&2
  • trunk/src/libs/libpng-1.6.42/intel/filter_sse2_intrinsics.c

    r96425 r103316  
    260260
    261261      /* (p-a) == (a+b-c - a) == (b-c) */
    262    
     262
    263263      pa = _mm_sub_epi16(b,c);
    264264
  • trunk/src/libs/libpng-1.6.42/libpng-manual.txt

    r96425 r103316  
    11libpng-manual.txt - A description on how to use and modify libpng
    22
    3  Copyright (c) 2018-2019 Cosmin Truta
     3 Copyright (c) 2018-2024 Cosmin Truta
    44 Copyright (c) 1998-2018 Glenn Randers-Pehrson
    55
     
    1010 Based on:
    1111
    12  libpng version 1.6.36, December 2018, through 1.6.37 - April 2019
     12 libpng version 1.6.36, December 2018, through 1.6.42 - January 2024
    1313 Updated and distributed by Cosmin Truta
    14  Copyright (c) 2018-2019 Cosmin Truta
     14 Copyright (c) 2018-2024 Cosmin Truta
    1515
    1616 libpng versions 0.97, January 1998, through 1.6.35 - July 2018
     
    358358    }
    359359
    360     is_png = !png_sig_cmp(header, 0, number);
     360    is_png = (png_sig_cmp(header, 0, number) == 0);
    361361    if (!is_png)
    362362    {
     
    386386    if (!info_ptr)
    387387    {
    388        png_destroy_read_struct(&png_ptr,
    389            (png_infopp)NULL, (png_infopp)NULL);
     388       png_destroy_read_struct(&png_ptr, NULL, NULL);
    390389       return ERROR;
    391390    }
     
    420419    if (setjmp(png_jmpbuf(png_ptr)))
    421420    {
    422        png_destroy_read_struct(&png_ptr, &info_ptr,
    423            &end_info);
     421       png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
    424422       fclose(fp);
    425423       return ERROR;
    426424    }
    427425
    428 Pass (png_infopp)NULL instead of &end_info if you didn't create
    429 an end_info structure.
     426Pass NULL instead of &end_info if you didn't create an end_info
     427structure.
    430428
    431429If you would rather avoid the complexity of setjmp/longjmp issues,
     
    497495
    498496    read_chunk_callback(png_structp png_ptr,
    499          png_unknown_chunkp chunk);
     497         png_unknown_chunkp chunk)
    500498    {
    501499       /* The unknown chunk structure contains your
     
    548546
    549547    void read_row_callback(png_structp png_ptr,
    550        png_uint_32 row, int pass);
     548       png_uint_32 row, int pass)
    551549    {
    552       /* put your code here */
     550       /* put your code here */
    553551    }
    554552
     
    878876channels; png_set_alpha_mode() with one of the modes causes the decoder to
    879877convert the pixels to an associated form before returning them to your
    880 application. 
     878application.
    881879
    882880Since it is not necessary to perform arithmetic on opaque color values so
     
    11821180
    11831181   if (height > PNG_UINT_32_MAX/(sizeof (png_byte)))
    1184       png_error (png_ptr,
     1182      png_error(png_ptr,
    11851183          "Image is too tall to process in memory");
    11861184
    11871185   if (width > PNG_UINT_32_MAX/pixel_size)
    1188       png_error (png_ptr,
     1186      png_error(png_ptr,
    11891187          "Image is too wide to process in memory");
    11901188
     
    11921190       height*(sizeof (png_bytep)));
    11931191
    1194    for (int i=0; i<height, i++)
    1195       row_pointers[i]=NULL;  /* security precaution */
    1196 
    1197    for (int i=0; i<height, i++)
    1198       row_pointers[i]=png_malloc(png_ptr,
     1192   for (int i = 0; i < height, i++)
     1193      row_pointers[i] = NULL;  /* security precaution */
     1194
     1195   for (int i = 0; i < height, i++)
     1196      row_pointers[i] = png_malloc(png_ptr,
    11991197          width*pixel_size);
    12001198
     
    12061204
    12071205   /* Guard against integer overflow */
    1208    if (height > PNG_SIZE_MAX/(width*pixel_size)) {
    1209         png_error(png_ptr,"image_data buffer would be too large");
    1210    }
    1211 
    1212    png_bytep buffer=png_malloc(png_ptr,height*width*pixel_size);
    1213 
    1214    for (int i=0; i<height, i++)
    1215       row_pointers[i]=buffer+i*width*pixel_size;
     1206   if (height > PNG_SIZE_MAX/(width*pixel_size))
     1207      png_error(png_ptr, "image_data buffer would be too large");
     1208
     1209   png_bytep buffer = png_malloc(png_ptr,
     1210      height*width*pixel_size);
     1211
     1212   for (int i = 0; i < height, i++)
     1213      row_pointers[i] = buffer + i*width*pixel_size;
    12161214
    12171215   png_set_rows(png_ptr, info_ptr, &row_pointers);
     
    14661464
    14671465    png_get_eXIf_1(png_ptr, info_ptr, &num_exif, &exif);
     1466
     1467    exif           - Exif profile (array of png_byte)
    14681468                     (PNG_INFO_eXIf)
    14691469
    1470     exif           - Exif profile (array of png_byte)
    1471 
    14721470    png_get_hIST(png_ptr, info_ptr, &hist);
    1473                      (PNG_INFO_hIST)
    14741471
    14751472    hist           - histogram of palette (array of
    1476                      png_uint_16)
     1473                     png_uint_16) (PNG_INFO_hIST)
    14771474
    14781475    png_get_tIME(png_ptr, info_ptr, &mod_time);
    14791476
    14801477    mod_time       - time image was last modified
    1481                     (PNG_VALID_tIME)
     1478                     (PNG_INFO_tIME)
    14821479
    14831480    png_get_bKGD(png_ptr, info_ptr, &background);
    14841481
    14851482    background     - background color (of type
    1486                      png_color_16p) (PNG_VALID_bKGD)
     1483                     png_color_16p) (PNG_INFO_bKGD)
    14871484                     valid 16-bit red, green and blue
    14881485                     values, regardless of color_type
     
    17441741
    17451742    if (color_type == PNG_COLOR_TYPE_PALETTE)
    1746         png_set_palette_to_rgb(png_ptr);
    1747 
    1748     if (png_get_valid(png_ptr, info_ptr,
    1749         PNG_INFO_tRNS)) png_set_tRNS_to_alpha(png_ptr);
    1750 
    1751     if (color_type == PNG_COLOR_TYPE_GRAY &&
    1752         bit_depth < 8) png_set_expand_gray_1_2_4_to_8(png_ptr);
     1743       png_set_palette_to_rgb(png_ptr);
     1744
     1745    if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))
     1746       png_set_tRNS_to_alpha(png_ptr);
     1747
     1748    if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
     1749       png_set_expand_gray_1_2_4_to_8(png_ptr);
    17531750
    17541751The first two functions are actually aliases for png_set_expand(), added
     
    17651762severe accuracy loss.
    17661763
    1767    if (bit_depth < 16)
    1768       png_set_expand_16(png_ptr);
     1764    if (bit_depth < 16)
     1765       png_set_expand_16(png_ptr);
    17691766
    17701767PNG can have files with 16 bits per channel.  If you only can handle
     
    17721769
    17731770    if (bit_depth == 16)
     1771    {
    17741772#if PNG_LIBPNG_VER >= 10504
    17751773       png_set_scale_16(png_ptr);
     
    17771775       png_set_strip_16(png_ptr);
    17781776#endif
     1777    }
    17791778
    17801779(The more accurate "png_set_scale_16()" API became available in libpng version
     
    17931792
    17941793As of libpng version 1.5.2, almost all useful expansions are supported, the
    1795 major ommissions are conversion of grayscale to indexed images (which can be
     1794major omissions are conversion of grayscale to indexed images (which can be
    17961795done trivially in the application) and conversion of indexed to grayscale (which
    17971796can be done by a trivial manipulation of the palette.)
     
    19021901
    19031902    if (color_type == PNG_COLOR_TYPE_RGB ||
    1904        color_type == PNG_COLOR_TYPE_GRAY)
     1903        color_type == PNG_COLOR_TYPE_GRAY)
    19051904       png_set_add_alpha(png_ptr, filler, PNG_FILLER_AFTER);
    19061905
     
    19271926        color_type == PNG_COLOR_TYPE_RGB_ALPHA)
    19281927       png_set_rgb_to_gray(png_ptr, error_action,
    1929           double red_weight, double green_weight);
     1928          (double)red_weight, (double)green_weight);
    19301929
    19311930    error_action = 1: silently do the conversion
     
    19501949
    19511950    png_set_rgb_to_gray(png_ptr, error_action,
    1952        png_fixed_point red_weight,
    1953        png_fixed_point green_weight);
     1951       (png_fixed_point)red_weight,
     1952       (png_fixed_point)green_weight);
    19541953
    19551954If you have set error_action = 1 or 2, you can
     
    21872186
    21882187   /* Guard against integer overflow */
    2189    if (number_of_rows > PNG_SIZE_MAX/(width*pixel_size)) {
    2190         png_error(png_ptr,"image_data buffer would be too large");
    2191    }
     2188   if (number_of_rows > PNG_SIZE_MAX/(width*pixel_size))
     2189      png_error(png_ptr, "image_data buffer would be too large");
    21922190
    21932191Remember: Before you call png_read_update_info(), the png_get_*()
     
    24092407    if (!end_info)
    24102408    {
    2411        png_destroy_read_struct(&png_ptr, &info_ptr,
    2412            (png_infopp)NULL);
     2409       png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
    24132410       return ERROR;
    24142411    }
    24152412
    2416    png_read_end(png_ptr, end_info);
     2413    png_read_end(png_ptr, end_info);
    24172414
    24182415If you are not interested, you should still call png_read_end()
     
    24222419png_set_crc_action) checking their CRCs while looking for the IEND chunk.
    24232420
    2424    png_read_end(png_ptr, (png_infop)NULL);
     2421   png_read_end(png_ptr, NULL);
    24252422
    24262423If you don't call png_read_end(), then your file pointer will be
     
    24312428When you are done, you can free all memory allocated by libpng like this:
    24322429
    2433    png_destroy_read_struct(&png_ptr, &info_ptr,
    2434        &end_info);
     2430   png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
    24352431
    24362432or, if you didn't create an end_info structure,
    24372433
    2438    png_destroy_read_struct(&png_ptr, &info_ptr,
    2439        (png_infopp)NULL);
     2434   png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
    24402435
    24412436It is also possible to individually free the info_ptr members that
     
    25572552    if (!info_ptr)
    25582553    {
    2559        png_destroy_read_struct(&png_ptr,
    2560           (png_infopp)NULL, (png_infopp)NULL);
     2554       png_destroy_read_struct(&png_ptr, NULL, NULL);
    25612555       return ERROR;
    25622556    }
     
    25642558    if (setjmp(png_jmpbuf(png_ptr)))
    25652559    {
    2566        png_destroy_read_struct(&png_ptr, &info_ptr,
    2567           (png_infopp)NULL);
     2560       png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
    25682561       return ERROR;
    25692562    }
     
    25982591    if (setjmp(png_jmpbuf(png_ptr)))
    25992592    {
    2600        png_destroy_read_struct(&png_ptr, &info_ptr,
    2601            (png_infopp)NULL);
     2593       png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
    26022594       return ERROR;
    26032595    }
     
    27642756    if (!info_ptr)
    27652757    {
    2766        png_destroy_write_struct(&png_ptr,
    2767            (png_infopp)NULL);
     2758       png_destroy_write_struct(&png_ptr, NULL);
    27682759       return ERROR;
    27692760    }
     
    27912782    if (setjmp(png_jmpbuf(png_ptr)))
    27922783    {
    2793     png_destroy_write_struct(&png_ptr, &info_ptr);
     2784       png_destroy_write_struct(&png_ptr, &info_ptr);
    27942785       fclose(fp);
    27952786       return ERROR;
     
    28452836
    28462837    void write_row_callback(png_structp png_ptr, png_uint_32 row,
    2847        int pass);
     2838       int pass)
    28482839    {
    2849       /* put your code here */
     2840       /* put your code here */
    28502841    }
    28512842
     
    31173108    png_set_eXIf_1(png_ptr, info_ptr, num_exif, exif);
    31183109
    3119     exif           - Exif profile (array of
    3120                      png_byte) (PNG_INFO_eXIf)
     3110    exif           - Exif profile (array of png_byte)
     3111                     (PNG_INFO_eXIf)
    31213112
    31223113    png_set_hIST(png_ptr, info_ptr, hist);
     
    31283119
    31293120    mod_time       - time image was last modified
    3130                      (PNG_VALID_tIME)
     3121                     (PNG_INFO_tIME)
    31313122
    31323123    png_set_bKGD(png_ptr, info_ptr, background);
    31333124
    31343125    background     - background color (of type
    3135                      png_color_16p) (PNG_VALID_bKGD)
     3126                     png_color_16p) (PNG_INFO_bKGD)
    31363127
    31373128    png_set_text(png_ptr, info_ptr, text_ptr, num_text);
     
    42194210pointer that can be retrieved via
    42204211
    4221     mem_ptr=png_get_mem_ptr(png_ptr);
     4212    mem_ptr = png_get_mem_ptr(png_ptr);
    42224213
    42234214Your replacement memory functions must have prototypes as follows:
     
    45164507
    45174508   #ifdef PNG_DEBUG
    4518        fprintf(stderr, ...
     4509       fprintf(stderr, ...);
    45194510   #endif
    45204511
     
    46934684    png_check_sig(sig, num)
    46944685was replaced with
    4695     !png_sig_cmp(sig, 0, num)
     4686    png_sig_cmp(sig, 0, num) == 0
    46964687It has been deprecated since libpng-0.90.
    46974688
     
    47574748
    47584749We removed the obsolete png_check_sig(), png_memcpy_check(), and
    4759 png_memset_check() functions.  Instead use !png_sig_cmp(), memcpy(),
    4760 and memset(), respectively.
     4750png_memset_check() functions.  Instead use png_sig_cmp() == 0,
     4751memcpy(), and memset(), respectively.
    47614752
    47624753The function png_set_gray_1_2_4_to_8() was removed. It has been
     
    52405231libpng version since 0.88.  In an autoconf "configure.in" you could use
    52415232
    5242     AC_CHECK_LIB(png, png_get_io_ptr, ...
     5233    AC_CHECK_LIB(png, png_get_io_ptr, ...)
    52435234
    52445235XV. Source code repository
     
    52495240at
    52505241
    5251     https://github.com/glennrp/libpng or
     5242    https://github.com/pnggroup/libpng or
    52525243    https://git.code.sf.net/p/libpng/code.git
    52535244
    52545245or you can browse it with a web browser at
    52555246
    5256     https://github.com/glennrp/libpng or
     5247    https://github.com/pnggroup/libpng or
    52575248    https://sourceforge.net/p/libpng/code/ci/libpng16/tree/
    52585249
     
    52645255or as a "pull request" to
    52655256
    5266     https://github.com/glennrp/libpng/pulls
     5257    https://github.com/pnggroup/libpng/pulls
    52675258
    52685259We also accept patches built from the tar or zip distributions, and
  • trunk/src/libs/libpng-1.6.42/libpng.3

    r96425 r103316  
    1 .TH LIBPNG 3 "April 14, 2019"
     1.TH LIBPNG 3 "January 29, 2024"
    22.SH NAME
    3 libpng \- Portable Network Graphics (PNG) Reference Library 1.6.37
     3libpng \- Portable Network Graphics (PNG) Reference Library 1.6.42
    44
    55.SH SYNOPSIS
     
    520520libpng-manual.txt - A description on how to use and modify libpng
    521521
    522  Copyright (c) 2018-2019 Cosmin Truta
     522 Copyright (c) 2018-2024 Cosmin Truta
    523523 Copyright (c) 1998-2018 Glenn Randers-Pehrson
    524524
     
    529529 Based on:
    530530
    531  libpng version 1.6.36, December 2018, through 1.6.37 - April 2019
     531 libpng version 1.6.36, December 2018, through 1.6.42 - January 2024
    532532 Updated and distributed by Cosmin Truta
    533  Copyright (c) 2018-2019 Cosmin Truta
     533 Copyright (c) 2018-2024 Cosmin Truta
    534534
    535535 libpng versions 0.97, January 1998, through 1.6.35 - July 2018
     
    877877    }
    878878
    879     is_png = !png_sig_cmp(header, 0, number);
     879    is_png = (png_sig_cmp(header, 0, number) == 0);
    880880    if (!is_png)
    881881    {
     
    905905    if (!info_ptr)
    906906    {
    907        png_destroy_read_struct(&png_ptr,
    908            (png_infopp)NULL, (png_infopp)NULL);
     907       png_destroy_read_struct(&png_ptr, NULL, NULL);
    909908       return ERROR;
    910909    }
     
    939938    if (setjmp(png_jmpbuf(png_ptr)))
    940939    {
    941        png_destroy_read_struct(&png_ptr, &info_ptr,
    942            &end_info);
     940       png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
    943941       fclose(fp);
    944942       return ERROR;
    945943    }
    946944
    947 Pass (png_infopp)NULL instead of &end_info if you didn't create
    948 an end_info structure.
     945Pass NULL instead of &end_info if you didn't create an end_info
     946structure.
    949947
    950948If you would rather avoid the complexity of setjmp/longjmp issues,
     
    10161014
    10171015    read_chunk_callback(png_structp png_ptr,
    1018          png_unknown_chunkp chunk);
     1016         png_unknown_chunkp chunk)
    10191017    {
    10201018       /* The unknown chunk structure contains your
     
    10671065
    10681066    void read_row_callback(png_structp png_ptr,
    1069        png_uint_32 row, int pass);
     1067       png_uint_32 row, int pass)
    10701068    {
    1071       /* put your code here */
     1069       /* put your code here */
    10721070    }
    10731071
     
    13971395channels; png_set_alpha_mode() with one of the modes causes the decoder to
    13981396convert the pixels to an associated form before returning them to your
    1399 application. 
     1397application.
    14001398
    14011399Since it is not necessary to perform arithmetic on opaque color values so
     
    17011699
    17021700   if (height > PNG_UINT_32_MAX/(sizeof (png_byte)))
    1703       png_error (png_ptr,
     1701      png_error(png_ptr,
    17041702          "Image is too tall to process in memory");
    17051703
    17061704   if (width > PNG_UINT_32_MAX/pixel_size)
    1707       png_error (png_ptr,
     1705      png_error(png_ptr,
    17081706          "Image is too wide to process in memory");
    17091707
     
    17111709       height*(sizeof (png_bytep)));
    17121710
    1713    for (int i=0; i<height, i++)
    1714       row_pointers[i]=NULL;  /* security precaution */
    1715 
    1716    for (int i=0; i<height, i++)
    1717       row_pointers[i]=png_malloc(png_ptr,
     1711   for (int i = 0; i < height, i++)
     1712      row_pointers[i] = NULL;  /* security precaution */
     1713
     1714   for (int i = 0; i < height, i++)
     1715      row_pointers[i] = png_malloc(png_ptr,
    17181716          width*pixel_size);
    17191717
     
    17251723
    17261724   /* Guard against integer overflow */
    1727    if (height > PNG_SIZE_MAX/(width*pixel_size)) {
    1728         png_error(png_ptr,"image_data buffer would be too large");
    1729    }
    1730 
    1731    png_bytep buffer=png_malloc(png_ptr,height*width*pixel_size);
    1732 
    1733    for (int i=0; i<height, i++)
    1734       row_pointers[i]=buffer+i*width*pixel_size;
     1725   if (height > PNG_SIZE_MAX/(width*pixel_size))
     1726      png_error(png_ptr, "image_data buffer would be too large");
     1727
     1728   png_bytep buffer = png_malloc(png_ptr,
     1729      height*width*pixel_size);
     1730
     1731   for (int i = 0; i < height, i++)
     1732      row_pointers[i] = buffer + i*width*pixel_size;
    17351733
    17361734   png_set_rows(png_ptr, info_ptr, &row_pointers);
     
    19851983
    19861984    png_get_eXIf_1(png_ptr, info_ptr, &num_exif, &exif);
     1985
     1986    exif           - Exif profile (array of png_byte)
    19871987                     (PNG_INFO_eXIf)
    19881988
    1989     exif           - Exif profile (array of png_byte)
    1990 
    19911989    png_get_hIST(png_ptr, info_ptr, &hist);
    1992                      (PNG_INFO_hIST)
    19931990
    19941991    hist           - histogram of palette (array of
    1995                      png_uint_16)
     1992                     png_uint_16) (PNG_INFO_hIST)
    19961993
    19971994    png_get_tIME(png_ptr, info_ptr, &mod_time);
    19981995
    19991996    mod_time       - time image was last modified
    2000                     (PNG_VALID_tIME)
     1997                     (PNG_INFO_tIME)
    20011998
    20021999    png_get_bKGD(png_ptr, info_ptr, &background);
    20032000
    20042001    background     - background color (of type
    2005                      png_color_16p) (PNG_VALID_bKGD)
     2002                     png_color_16p) (PNG_INFO_bKGD)
    20062003                     valid 16-bit red, green and blue
    20072004                     values, regardless of color_type
     
    22632260
    22642261    if (color_type == PNG_COLOR_TYPE_PALETTE)
    2265         png_set_palette_to_rgb(png_ptr);
    2266 
    2267     if (png_get_valid(png_ptr, info_ptr,
    2268         PNG_INFO_tRNS)) png_set_tRNS_to_alpha(png_ptr);
    2269 
    2270     if (color_type == PNG_COLOR_TYPE_GRAY &&
    2271         bit_depth < 8) png_set_expand_gray_1_2_4_to_8(png_ptr);
     2262       png_set_palette_to_rgb(png_ptr);
     2263
     2264    if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))
     2265       png_set_tRNS_to_alpha(png_ptr);
     2266
     2267    if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
     2268       png_set_expand_gray_1_2_4_to_8(png_ptr);
    22722269
    22732270The first two functions are actually aliases for png_set_expand(), added
     
    22842281severe accuracy loss.
    22852282
    2286    if (bit_depth < 16)
    2287       png_set_expand_16(png_ptr);
     2283    if (bit_depth < 16)
     2284       png_set_expand_16(png_ptr);
    22882285
    22892286PNG can have files with 16 bits per channel.  If you only can handle
     
    22912288
    22922289    if (bit_depth == 16)
     2290    {
    22932291#if PNG_LIBPNG_VER >= 10504
    22942292       png_set_scale_16(png_ptr);
     
    22962294       png_set_strip_16(png_ptr);
    22972295#endif
     2296    }
    22982297
    22992298(The more accurate "png_set_scale_16()" API became available in libpng version
     
    23122311
    23132312As of libpng version 1.5.2, almost all useful expansions are supported, the
    2314 major ommissions are conversion of grayscale to indexed images (which can be
     2313major omissions are conversion of grayscale to indexed images (which can be
    23152314done trivially in the application) and conversion of indexed to grayscale (which
    23162315can be done by a trivial manipulation of the palette.)
     
    24212420
    24222421    if (color_type == PNG_COLOR_TYPE_RGB ||
    2423        color_type == PNG_COLOR_TYPE_GRAY)
     2422        color_type == PNG_COLOR_TYPE_GRAY)
    24242423       png_set_add_alpha(png_ptr, filler, PNG_FILLER_AFTER);
    24252424
     
    24462445        color_type == PNG_COLOR_TYPE_RGB_ALPHA)
    24472446       png_set_rgb_to_gray(png_ptr, error_action,
    2448           double red_weight, double green_weight);
     2447          (double)red_weight, (double)green_weight);
    24492448
    24502449    error_action = 1: silently do the conversion
     
    24692468
    24702469    png_set_rgb_to_gray(png_ptr, error_action,
    2471        png_fixed_point red_weight,
    2472        png_fixed_point green_weight);
     2470       (png_fixed_point)red_weight,
     2471       (png_fixed_point)green_weight);
    24732472
    24742473If you have set error_action = 1 or 2, you can
     
    27062705
    27072706   /* Guard against integer overflow */
    2708    if (number_of_rows > PNG_SIZE_MAX/(width*pixel_size)) {
    2709         png_error(png_ptr,"image_data buffer would be too large");
    2710    }
     2707   if (number_of_rows > PNG_SIZE_MAX/(width*pixel_size))
     2708      png_error(png_ptr, "image_data buffer would be too large");
    27112709
    27122710Remember: Before you call png_read_update_info(), the png_get_*()
     
    29282926    if (!end_info)
    29292927    {
    2930        png_destroy_read_struct(&png_ptr, &info_ptr,
    2931            (png_infopp)NULL);
     2928       png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
    29322929       return ERROR;
    29332930    }
    29342931
    2935    png_read_end(png_ptr, end_info);
     2932    png_read_end(png_ptr, end_info);
    29362933
    29372934If you are not interested, you should still call png_read_end()
     
    29412938png_set_crc_action) checking their CRCs while looking for the IEND chunk.
    29422939
    2943    png_read_end(png_ptr, (png_infop)NULL);
     2940   png_read_end(png_ptr, NULL);
    29442941
    29452942If you don't call png_read_end(), then your file pointer will be
     
    29502947When you are done, you can free all memory allocated by libpng like this:
    29512948
    2952    png_destroy_read_struct(&png_ptr, &info_ptr,
    2953        &end_info);
     2949   png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
    29542950
    29552951or, if you didn't create an end_info structure,
    29562952
    2957    png_destroy_read_struct(&png_ptr, &info_ptr,
    2958        (png_infopp)NULL);
     2953   png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
    29592954
    29602955It is also possible to individually free the info_ptr members that
     
    30763071    if (!info_ptr)
    30773072    {
    3078        png_destroy_read_struct(&png_ptr,
    3079           (png_infopp)NULL, (png_infopp)NULL);
     3073       png_destroy_read_struct(&png_ptr, NULL, NULL);
    30803074       return ERROR;
    30813075    }
     
    30833077    if (setjmp(png_jmpbuf(png_ptr)))
    30843078    {
    3085        png_destroy_read_struct(&png_ptr, &info_ptr,
    3086           (png_infopp)NULL);
     3079       png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
    30873080       return ERROR;
    30883081    }
     
    31173110    if (setjmp(png_jmpbuf(png_ptr)))
    31183111    {
    3119        png_destroy_read_struct(&png_ptr, &info_ptr,
    3120            (png_infopp)NULL);
     3112       png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
    31213113       return ERROR;
    31223114    }
     
    32833275    if (!info_ptr)
    32843276    {
    3285        png_destroy_write_struct(&png_ptr,
    3286            (png_infopp)NULL);
     3277       png_destroy_write_struct(&png_ptr, NULL);
    32873278       return ERROR;
    32883279    }
     
    33103301    if (setjmp(png_jmpbuf(png_ptr)))
    33113302    {
    3312     png_destroy_write_struct(&png_ptr, &info_ptr);
     3303       png_destroy_write_struct(&png_ptr, &info_ptr);
    33133304       fclose(fp);
    33143305       return ERROR;
     
    33643355
    33653356    void write_row_callback(png_structp png_ptr, png_uint_32 row,
    3366        int pass);
     3357       int pass)
    33673358    {
    3368       /* put your code here */
     3359       /* put your code here */
    33693360    }
    33703361
     
    36363627    png_set_eXIf_1(png_ptr, info_ptr, num_exif, exif);
    36373628
    3638     exif           - Exif profile (array of
    3639                      png_byte) (PNG_INFO_eXIf)
     3629    exif           - Exif profile (array of png_byte)
     3630                     (PNG_INFO_eXIf)
    36403631
    36413632    png_set_hIST(png_ptr, info_ptr, hist);
     
    36473638
    36483639    mod_time       - time image was last modified
    3649                      (PNG_VALID_tIME)
     3640                     (PNG_INFO_tIME)
    36503641
    36513642    png_set_bKGD(png_ptr, info_ptr, background);
    36523643
    36533644    background     - background color (of type
    3654                      png_color_16p) (PNG_VALID_bKGD)
     3645                     png_color_16p) (PNG_INFO_bKGD)
    36553646
    36563647    png_set_text(png_ptr, info_ptr, text_ptr, num_text);
     
    47384729pointer that can be retrieved via
    47394730
    4740     mem_ptr=png_get_mem_ptr(png_ptr);
     4731    mem_ptr = png_get_mem_ptr(png_ptr);
    47414732
    47424733Your replacement memory functions must have prototypes as follows:
     
    50355026
    50365027   #ifdef PNG_DEBUG
    5037        fprintf(stderr, ...
     5028       fprintf(stderr, ...);
    50385029   #endif
    50395030
     
    52125203    png_check_sig(sig, num)
    52135204was replaced with
    5214     !png_sig_cmp(sig, 0, num)
     5205    png_sig_cmp(sig, 0, num) == 0
    52155206It has been deprecated since libpng-0.90.
    52165207
     
    52765267
    52775268We removed the obsolete png_check_sig(), png_memcpy_check(), and
    5278 png_memset_check() functions.  Instead use !png_sig_cmp(), memcpy(),
    5279 and memset(), respectively.
     5269png_memset_check() functions.  Instead use png_sig_cmp() == 0,
     5270memcpy(), and memset(), respectively.
    52805271
    52815272The function png_set_gray_1_2_4_to_8() was removed. It has been
     
    57595750libpng version since 0.88.  In an autoconf "configure.in" you could use
    57605751
    5761     AC_CHECK_LIB(png, png_get_io_ptr, ...
     5752    AC_CHECK_LIB(png, png_get_io_ptr, ...)
    57625753
    57635754.SH XV. Source code repository
     
    57685759at
    57695760
    5770     https://github.com/glennrp/libpng or
     5761    https://github.com/pnggroup/libpng or
    57715762    https://git.code.sf.net/p/libpng/code.git
    57725763
    57735764or you can browse it with a web browser at
    57745765
    5775     https://github.com/glennrp/libpng or
     5766    https://github.com/pnggroup/libpng or
    57765767    https://sourceforge.net/p/libpng/code/ci/libpng16/tree/
    57775768
     
    57835774or as a "pull request" to
    57845775
    5785     https://github.com/glennrp/libpng/pulls
     5776    https://github.com/pnggroup/libpng/pulls
    57865777
    57875778We also accept patches built from the tar or zip distributions, and
     
    59965987
    59975988.SH "SEE ALSO"
    5998 .IR libpngpf(3) ", " png(5)
     5989.BR "png"(5)
     5990.IP
     5991The PNG (Portable Network Graphics) format specification.
    59995992.LP
    6000 .IR libpng :
     5993.B libpng
    60015994.IP
    6002 https://libpng.sourceforge.io/ (follow the [DOWNLOAD] link)
    6003 http://www.libpng.org/pub/png
    6004 
     5995http://www.libpng.org/pub/png/libpng.html (canonical home page)
     5996.br
     5997https://github.com/pnggroup/libpng (canonical Git repository)
     5998.br
     5999https://libpng.sourceforge.io (downloadable archives)
    60056000.LP
    6006 .IR zlib :
     6001.B zlib
    60076002.IP
    6008 (generally) at the same location as
    6009 .I libpng
    6010 or at
     6003https://zlib.net (canonical home page)
    60116004.br
    6012 https://zlib.net/
    6013 
    6014 .LP
    6015 .IR PNG specification: RFC 2083
    6016 .IP
    6017 (generally) at the same location as
    6018 .I libpng
    6019 or at
     6005https://github.com/madler/zlib (canonical Git repository)
    60206006.br
    6021 https://www.ietf.org/rfc/rfc2083.txt
    6022 .br
    6023 or (as a W3C Recommendation) at
    6024 .br
    6025 https://www.w3.org/TR/REC-png.html
    6026 
     6007A copy of zlib may also be found at the same location as libpng.
    60276008.LP
    60286009In the case of any inconsistency between the PNG specification
     
    60446025Maintained by Cosmin Truta.
    60456026
    6046 Supported by the PNG development group
     6027Supported by the PNG development group.
    60476028.br
    6048 png-mng-implement at lists.sourceforge.net (subscription required; visit
    6049 https://lists.sourceforge.net/lists/listinfo/png-mng-implement
    6050 to subscribe).
     6029png-mng-implement at lists.sourceforge.net. (Subscription is required;
     6030visit https://lists.sourceforge.net/lists/listinfo/png-mng-implement
     6031to subscribe.)
    60516032
    60526033.\" end of man page
  • trunk/src/libs/libpng-1.6.42/libpng.pc.in

    r96425 r103316  
    77Description: Loads and saves PNG files
    88Version: @PNGLIB_VERSION@
    9 Requires: zlib
     9Requires.private: zlib
    1010Libs: -L${libdir} -lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@
    1111Libs.private: @LIBS@
  • trunk/src/libs/libpng-1.6.42/libpngpf.3

    r96425 r103316  
    1 .TH LIBPNGPF 3 "April 14, 2019"
     1.TH LIBPNGPF 3 "January 29, 2024"
    22.SH NAME
    3 libpng \- Portable Network Graphics (PNG) Reference Library 1.6.37
     3libpng \- Portable Network Graphics (PNG) Reference Library 1.6.42
    44(private functions)
    55
  • trunk/src/libs/libpng-1.6.42/ltmain.sh

    r96425 r103316  
    1 #! /bin/sh
     1#! /usr/bin/env sh
    22## DO NOT EDIT - This file generated from ./build-aux/ltmain.in
    3 ##               by inline-source v2014-01-03.01
    4 
    5 # libtool (GNU libtool) 2.4.6
     3##               by inline-source v2019-02-19.15
     4
     5# libtool (GNU libtool) 2.4.7
    66# Provide generalized library-building support services.
    77# Written by Gordon Matzigkeit <[email protected]>, 1996
    88
    9 # Copyright (C) 1996-2015 Free Software Foundation, Inc.
     9# Copyright (C) 1996-2019, 2021-2022 Free Software Foundation, Inc.
    1010# This is free software; see the source for copying conditions.  There is NO
    1111# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     
    3232PROGRAM=libtool
    3333PACKAGE=libtool
    34 VERSION=2.4.6
    35 package_revision=2.4.6
     34VERSION=2.4.7
     35package_revision=2.4.7
    3636
    3737
     
    6565
    6666# Set a version string for this script.
    67 scriptversion=2015-01-20.17; # UTC
     67scriptversion=2019-02-19.15; # UTC
    6868
    6969# General shell script boiler plate, and helper functions.
    7070# Written by Gary V. Vaughan, 2004
    7171
    72 # Copyright (C) 2004-2015 Free Software Foundation, Inc.
    73 # This is free software; see the source for copying conditions.  There is NO
    74 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    75 
    76 # This program is free software; you can redistribute it and/or modify
    77 # it under the terms of the GNU General Public License as published by
    78 # the Free Software Foundation; either version 3 of the License, or
    79 # (at your option) any later version.
    80 
    81 # As a special exception to the GNU General Public License, if you distribute
    82 # this file as part of a program or library that is built using GNU Libtool,
    83 # you may include this file under the same distribution terms that you use
    84 # for the rest of that program.
    85 
    86 # This program is distributed in the hope that it will be useful,
    87 # but WITHOUT ANY WARRANTY; without even the implied warranty of
    88 # MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU
    89 # General Public License for more details.
    90 
    91 # You should have received a copy of the GNU General Public License
    92 # along with this program. If not, see <http://www.gnu.org/licenses/>.
    93 
    94 # Please report bugs or propose patches to [email protected].
     72# This is free software.  There is NO warranty; not even for
     73# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     74#
     75# Copyright (C) 2004-2019, 2021 Bootstrap Authors
     76#
     77# This file is dual licensed under the terms of the MIT license
     78# <https://opensource.org/license/MIT>, and GPL version 2 or later
     79# <http://www.gnu.org/licenses/gpl-2.0.html>.  You must apply one of
     80# these licenses when using or redistributing this software or any of
     81# the files within it.  See the URLs above, or the file `LICENSE`
     82# included in the Bootstrap distribution for the full license texts.
     83
     84# Please report bugs or propose patches to:
     85# <https://github.com/gnulib-modules/bootstrap/issues>
    9586
    9687
     
    140131        fi"
    141132done
    142 
    143 # CDPATH.
    144 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
     133# These NLS vars are set unconditionally (bootstrap issue #24).  Unset those
     134# in case the environment reset is needed later and the $save_* variant is not
     135# defined (see the code above).
     136LC_ALL=C
     137LANGUAGE=C
     138export LANGUAGE LC_ALL
    145139
    146140# Make sure IFS has a sensible default
     
    159153fi
    160154
     155
     156# func_unset VAR
     157# --------------
     158# Portably unset VAR.
     159# In some shells, an 'unset VAR' statement leaves a non-zero return
     160# status if VAR is already unset, which might be problematic if the
     161# statement is used at the end of a function (thus poisoning its return
     162# value) or when 'set -e' is active (causing even a spurious abort of
     163# the script in this case).
     164func_unset ()
     165{
     166    { eval $1=; (eval unset $1) >/dev/null 2>&1 && eval unset $1 || : ; }
     167}
     168
     169
     170# Make sure CDPATH doesn't cause `cd` commands to output the target dir.
     171func_unset CDPATH
     172
     173# Make sure ${,E,F}GREP behave sanely.
     174func_unset GREP_OPTIONS
    161175
    162176
     
    260274  }
    261275
    262   func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin
     276  func_path_progs "sed gsed" func_check_prog_sed "$PATH:/usr/xpg4/bin"
    263277  rm -f conftest.sed
    264278  SED=$func_path_progs_result
     
    296310  }
    297311
    298   func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin
     312  func_path_progs "grep ggrep" func_check_prog_grep "$PATH:/usr/xpg4/bin"
    299313  GREP=$func_path_progs_result
    300314}
     
    360374  s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g
    361375  s/\n//g"
     376
     377# require_check_ifs_backslash
     378# ---------------------------
     379# Check if we can use backslash as IFS='\' separator, and set
     380# $check_ifs_backshlash_broken to ':' or 'false'.
     381require_check_ifs_backslash=func_require_check_ifs_backslash
     382func_require_check_ifs_backslash ()
     383{
     384  _G_save_IFS=$IFS
     385  IFS='\'
     386  _G_check_ifs_backshlash='a\\b'
     387  for _G_i in $_G_check_ifs_backshlash
     388  do
     389  case $_G_i in
     390  a)
     391    check_ifs_backshlash_broken=false
     392    ;;
     393  '')
     394    break
     395    ;;
     396  *)
     397    check_ifs_backshlash_broken=:
     398    break
     399    ;;
     400  esac
     401  done
     402  IFS=$_G_save_IFS
     403  require_check_ifs_backslash=:
     404}
    362405
    363406
     
    581624    $debug_cmd
    582625
    583     func_quote_for_eval "$2"
    584     eval "$1+=\\ \$func_quote_for_eval_result"
     626    func_quote_arg pretty "$2"
     627    eval "$1+=\\ \$func_quote_arg_result"
    585628  }'
    586629else
     
    589632    $debug_cmd
    590633
    591     func_quote_for_eval "$2"
    592     eval "$1=\$$1\\ \$func_quote_for_eval_result"
     634    func_quote_arg pretty "$2"
     635    eval "$1=\$$1\\ \$func_quote_arg_result"
    593636  }
    594637fi
     
    10921135
    10931136
    1094 # func_quote_for_eval ARG...
    1095 # --------------------------
    1096 # Aesthetically quote ARGs to be evaled later.
    1097 # This function returns two values:
    1098 #   i) func_quote_for_eval_result
    1099 #      double-quoted, suitable for a subsequent eval
    1100 #  ii) func_quote_for_eval_unquoted_result
    1101 #      has all characters that are still active within double
    1102 #      quotes backslashified.
    1103 func_quote_for_eval ()
     1137# func_quote_portable EVAL ARG
     1138# ----------------------------
     1139# Internal function to portably implement func_quote_arg.  Note that we still
     1140# keep attention to performance here so we as much as possible try to avoid
     1141# calling sed binary (so far O(N) complexity as long as func_append is O(1)).
     1142func_quote_portable ()
    11041143{
    11051144    $debug_cmd
    11061145
    1107     func_quote_for_eval_unquoted_result=
    1108     func_quote_for_eval_result=
    1109     while test 0 -lt $#; do
     1146    $require_check_ifs_backslash
     1147
     1148    func_quote_portable_result=$2
     1149
     1150    # one-time-loop (easy break)
     1151    while true
     1152    do
     1153      if $1; then
     1154        func_quote_portable_result=`$ECHO "$2" | $SED \
     1155          -e "$sed_double_quote_subst" -e "$sed_double_backslash"`
     1156        break
     1157      fi
     1158
     1159      # Quote for eval.
     1160      case $func_quote_portable_result in
     1161        *[\\\`\"\$]*)
     1162          # Fallback to sed for $func_check_bs_ifs_broken=:, or when the string
     1163          # contains the shell wildcard characters.
     1164          case $check_ifs_backshlash_broken$func_quote_portable_result in
     1165            :*|*[\[\*\?]*)
     1166              func_quote_portable_result=`$ECHO "$func_quote_portable_result" \
     1167                  | $SED "$sed_quote_subst"`
     1168              break
     1169              ;;
     1170          esac
     1171
     1172          func_quote_portable_old_IFS=$IFS
     1173          for _G_char in '\' '`' '"' '$'
     1174          do
     1175            # STATE($1) PREV($2) SEPARATOR($3)
     1176            set start "" ""
     1177            func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy
     1178            IFS=$_G_char
     1179            for _G_part in $func_quote_portable_result
     1180            do
     1181              case $1 in
     1182              quote)
     1183                func_append func_quote_portable_result "$3$2"
     1184                set quote "$_G_part" "\\$_G_char"
     1185                ;;
     1186              start)
     1187                set first "" ""
     1188                func_quote_portable_result=
     1189                ;;
     1190              first)
     1191                set quote "$_G_part" ""
     1192                ;;
     1193              esac
     1194            done
     1195          done
     1196          IFS=$func_quote_portable_old_IFS
     1197          ;;
     1198        *) ;;
     1199      esac
     1200      break
     1201    done
     1202
     1203    func_quote_portable_unquoted_result=$func_quote_portable_result
     1204    case $func_quote_portable_result in
     1205      # double-quote args containing shell metacharacters to delay
     1206      # word splitting, command substitution and variable expansion
     1207      # for a subsequent eval.
     1208      # many bourne shells cannot handle close brackets correctly
     1209      # in scan sets, so we specify it separately.
     1210      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
     1211        func_quote_portable_result=\"$func_quote_portable_result\"
     1212        ;;
     1213    esac
     1214}
     1215
     1216
     1217# func_quotefast_eval ARG
     1218# -----------------------
     1219# Quote one ARG (internal).  This is equivalent to 'func_quote_arg eval ARG',
     1220# but optimized for speed.  Result is stored in $func_quotefast_eval.
     1221if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then
     1222  printf -v _GL_test_printf_tilde %q '~'
     1223  if test '\~' = "$_GL_test_printf_tilde"; then
     1224    func_quotefast_eval ()
     1225    {
     1226      printf -v func_quotefast_eval_result %q "$1"
     1227    }
     1228  else
     1229    # Broken older Bash implementations.  Make those faster too if possible.
     1230    func_quotefast_eval ()
     1231    {
    11101232      case $1 in
    1111         *[\\\`\"\$]*)
    1112           _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;;
    1113         *)
    1114           _G_unquoted_arg=$1 ;;
    1115       esac
    1116       if test -n "$func_quote_for_eval_unquoted_result"; then
    1117         func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
    1118       else
    1119         func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg"
    1120       fi
    1121 
    1122       case $_G_unquoted_arg in
    1123         # Double-quote args containing shell metacharacters to delay
    1124         # word splitting, command substitution and variable expansion
    1125         # for a subsequent eval.
    1126         # Many Bourne shells cannot handle close brackets correctly
    1127         # in scan sets, so we specify it separately.
    1128         *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
    1129           _G_quoted_arg=\"$_G_unquoted_arg\"
     1233        '~'*)
     1234          func_quote_portable false "$1"
     1235          func_quotefast_eval_result=$func_quote_portable_result
    11301236          ;;
    11311237        *)
    1132           _G_quoted_arg=$_G_unquoted_arg
    1133           ;;
     1238          printf -v func_quotefast_eval_result %q "$1"
     1239          ;;
    11341240      esac
    1135 
    1136       if test -n "$func_quote_for_eval_result"; then
    1137         func_append func_quote_for_eval_result " $_G_quoted_arg"
     1241    }
     1242  fi
     1243else
     1244  func_quotefast_eval ()
     1245  {
     1246    func_quote_portable false "$1"
     1247    func_quotefast_eval_result=$func_quote_portable_result
     1248  }
     1249fi
     1250
     1251
     1252# func_quote_arg MODEs ARG
     1253# ------------------------
     1254# Quote one ARG to be evaled later.  MODEs argument may contain zero or more
     1255# specifiers listed below separated by ',' character.  This function returns two
     1256# values:
     1257#   i) func_quote_arg_result
     1258#      double-quoted (when needed), suitable for a subsequent eval
     1259#  ii) func_quote_arg_unquoted_result
     1260#      has all characters that are still active within double
     1261#      quotes backslashified.  Available only if 'unquoted' is specified.
     1262#
     1263# Available modes:
     1264# ----------------
     1265# 'eval' (default)
     1266#       - escape shell special characters
     1267# 'expand'
     1268#       - the same as 'eval';  but do not quote variable references
     1269# 'pretty'
     1270#       - request aesthetic output, i.e. '"a b"' instead of 'a\ b'.  This might
     1271#         be used later in func_quote to get output like: 'echo "a b"' instead
     1272#         of 'echo a\ b'.  This is slower than default on some shells.
     1273# 'unquoted'
     1274#       - produce also $func_quote_arg_unquoted_result which does not contain
     1275#         wrapping double-quotes.
     1276#
     1277# Examples for 'func_quote_arg pretty,unquoted string':
     1278#
     1279#   string      | *_result              | *_unquoted_result
     1280#   ------------+-----------------------+-------------------
     1281#   "           | \"                    | \"
     1282#   a b         | "a b"                 | a b
     1283#   "a b"       | "\"a b\""             | \"a b\"
     1284#   *           | "*"                   | *
     1285#   z="${x-$y}" | "z=\"\${x-\$y}\""     | z=\"\${x-\$y}\"
     1286#
     1287# Examples for 'func_quote_arg pretty,unquoted,expand string':
     1288#
     1289#   string        |   *_result          |  *_unquoted_result
     1290#   --------------+---------------------+--------------------
     1291#   z="${x-$y}"   | "z=\"${x-$y}\""     | z=\"${x-$y}\"
     1292func_quote_arg ()
     1293{
     1294    _G_quote_expand=false
     1295    case ,$1, in
     1296      *,expand,*)
     1297        _G_quote_expand=:
     1298        ;;
     1299    esac
     1300
     1301    case ,$1, in
     1302      *,pretty,*|*,expand,*|*,unquoted,*)
     1303        func_quote_portable $_G_quote_expand "$2"
     1304        func_quote_arg_result=$func_quote_portable_result
     1305        func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result
     1306        ;;
     1307      *)
     1308        # Faster quote-for-eval for some shells.
     1309        func_quotefast_eval "$2"
     1310        func_quote_arg_result=$func_quotefast_eval_result
     1311        ;;
     1312    esac
     1313}
     1314
     1315
     1316# func_quote MODEs ARGs...
     1317# ------------------------
     1318# Quote all ARGs to be evaled later and join them into single command.  See
     1319# func_quote_arg's description for more info.
     1320func_quote ()
     1321{
     1322    $debug_cmd
     1323    _G_func_quote_mode=$1 ; shift
     1324    func_quote_result=
     1325    while test 0 -lt $#; do
     1326      func_quote_arg "$_G_func_quote_mode" "$1"
     1327      if test -n "$func_quote_result"; then
     1328        func_append func_quote_result " $func_quote_arg_result"
    11381329      else
    1139         func_append func_quote_for_eval_result "$_G_quoted_arg"
     1330        func_append func_quote_result "$func_quote_arg_result"
    11401331      fi
    11411332      shift
    11421333    done
    1143 }
    1144 
    1145 
    1146 # func_quote_for_expand ARG
    1147 # -------------------------
    1148 # Aesthetically quote ARG to be evaled later; same as above,
    1149 # but do not quote variable references.
    1150 func_quote_for_expand ()
    1151 {
    1152     $debug_cmd
    1153 
    1154     case $1 in
    1155       *[\\\`\"]*)
    1156         _G_arg=`$ECHO "$1" | $SED \
    1157             -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;;
    1158       *)
    1159         _G_arg=$1 ;;
    1160     esac
    1161 
    1162     case $_G_arg in
    1163       # Double-quote args containing shell metacharacters to delay
    1164       # word splitting and command substitution for a subsequent eval.
    1165       # Many Bourne shells cannot handle close brackets correctly
    1166       # in scan sets, so we specify it separately.
    1167       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
    1168         _G_arg=\"$_G_arg\"
    1169         ;;
    1170     esac
    1171 
    1172     func_quote_for_expand_result=$_G_arg
    11731334}
    11741335
     
    12161377    _G_fail_exp=${2-':'}
    12171378
    1218     func_quote_for_expand "$_G_cmd"
    1219     eval "func_notquiet $func_quote_for_expand_result"
     1379    func_quote_arg pretty,expand "$_G_cmd"
     1380    eval "func_notquiet $func_quote_arg_result"
    12201381
    12211382    $opt_dry_run || {
     
    12421403
    12431404    $opt_quiet || {
    1244       func_quote_for_expand "$_G_cmd"
    1245       eval "func_echo $func_quote_for_expand_result"
     1405      func_quote_arg expand,pretty "$_G_cmd"
     1406      eval "func_echo $func_quote_arg_result"
    12461407    }
    12471408
     
    13701531#! /bin/sh
    13711532
    1372 # Set a version string for this script.
    1373 scriptversion=2014-01-07.03; # UTC
    1374 
    13751533# A portable, pluggable option parser for Bourne shell.
    13761534# Written by Gary V. Vaughan, 2010
    13771535
    1378 # Copyright (C) 2010-2015 Free Software Foundation, Inc.
    1379 # This is free software; see the source for copying conditions.  There is NO
    1380 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    1381 
    1382 # This program is free software: you can redistribute it and/or modify
    1383 # it under the terms of the GNU General Public License as published by
    1384 # the Free Software Foundation, either version 3 of the License, or
    1385 # (at your option) any later version.
    1386 
    1387 # This program is distributed in the hope that it will be useful,
    1388 # but WITHOUT ANY WARRANTY; without even the implied warranty of
    1389 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1390 # GNU General Public License for more details.
    1391 
    1392 # You should have received a copy of the GNU General Public License
    1393 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1394 
    1395 # Please report bugs or propose patches to [email protected].
     1536# This is free software.  There is NO warranty; not even for
     1537# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     1538#
     1539# Copyright (C) 2010-2019, 2021 Bootstrap Authors
     1540#
     1541# This file is dual licensed under the terms of the MIT license
     1542# <https://opensource.org/license/MIT>, and GPL version 2 or later
     1543# <http://www.gnu.org/licenses/gpl-2.0.html>.  You must apply one of
     1544# these licenses when using or redistributing this software or any of
     1545# the files within it.  See the URLs above, or the file `LICENSE`
     1546# included in the Bootstrap distribution for the full license texts.
     1547
     1548# Please report bugs or propose patches to:
     1549# <https://github.com/gnulib-modules/bootstrap/issues>
     1550
     1551# Set a version string for this script.
     1552scriptversion=2019-02-19.15; # UTC
    13961553
    13971554
     
    14161573# In order for the '--version' option to work, you will need to have a
    14171574# suitably formatted comment like the one at the top of this file
    1418 # starting with '# Written by ' and ending with '# warranty; '.
     1575# starting with '# Written by ' and ending with '# Copyright'.
    14191576#
    14201577# For '-h' and '--help' to work, you will also need a one line
     
    14281585# '--verbose'.
    14291586#
    1430 # After sourcing this file, you can plug processing for additional
     1587# After sourcing this file, you can plug in processing for additional
    14311588# options by amending the variables from the 'Configuration' section
    14321589# below, and following the instructions in the 'Option parsing'
     
    14771634
    14781635# This section contains functions for adding, removing, and running hooks
    1479 # to the main code.  A hook is just a named list of of function, that can
    1480 # be run in order later on.
     1636# in the main code.  A hook is just a list of function names that can be
     1637# run in order later on.
    14811638
    14821639# func_hookable FUNC_NAME
     
    15111668# func_remove_hook FUNC_NAME HOOK_FUNC
    15121669# ------------------------------------
    1513 # Remove HOOK_FUNC from the list of functions called by FUNC_NAME.
     1670# Remove HOOK_FUNC from the list of hook functions to be called by
     1671# FUNC_NAME.
    15141672func_remove_hook ()
    15151673{
     
    15171675
    15181676    eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`'
     1677}
     1678
     1679
     1680# func_propagate_result FUNC_NAME_A FUNC_NAME_B
     1681# ---------------------------------------------
     1682# If the *_result variable of FUNC_NAME_A _is set_, assign its value to
     1683# *_result variable of FUNC_NAME_B.
     1684func_propagate_result ()
     1685{
     1686    $debug_cmd
     1687
     1688    func_propagate_result_result=:
     1689    if eval "test \"\${${1}_result+set}\" = set"
     1690    then
     1691      eval "${2}_result=\$${1}_result"
     1692    else
     1693      func_propagate_result_result=false
     1694    fi
    15191695}
    15201696
     
    15231699# ---------------------------------
    15241700# Run all hook functions registered to FUNC_NAME.
    1525 # It is assumed that the list of hook functions contains nothing more
     1701# It's assumed that the list of hook functions contains nothing more
    15261702# than a whitespace-delimited list of legal shell function names, and
    15271703# no effort is wasted trying to catch shell meta-characters or preserve
     
    15331709    case " $hookable_fns " in
    15341710      *" $1 "*) ;;
    1535       *) func_fatal_error "'$1' does not support hook funcions.n" ;;
     1711      *) func_fatal_error "'$1' does not support hook functions." ;;
    15361712    esac
    15371713
     
    15391715
    15401716    for _G_hook in $_G_hook_fns; do
    1541       eval $_G_hook '"$@"'
    1542 
    1543       # store returned options list back into positional
    1544       # parameters for next 'cmd' execution.
    1545       eval _G_hook_result=\$${_G_hook}_result
    1546       eval set dummy "$_G_hook_result"; shift
     1717      func_unset "${_G_hook}_result"
     1718      eval $_G_hook '${1+"$@"}'
     1719      func_propagate_result $_G_hook func_run_hooks
     1720      if $func_propagate_result_result; then
     1721        eval set dummy "$func_run_hooks_result"; shift
     1722      fi
    15471723    done
    1548 
    1549     func_quote_for_eval ${1+"$@"}
    1550     func_run_hooks_result=$func_quote_for_eval_result
    15511724}
    15521725
     
    15581731
    15591732# In order to add your own option parsing hooks, you must accept the
    1560 # full positional parameter list in your hook function, remove any
    1561 # options that you action, and then pass back the remaining unprocessed
    1562 # options in '<hooked_function_name>_result', escaped suitably for
    1563 # 'eval'.  Like this:
     1733# full positional parameter list from your hook function.  You may remove
     1734# or edit any options that you action, and then pass back the remaining
     1735# unprocessed options in '<hooked_function_name>_result', escaped
     1736# suitably for 'eval'.
     1737#
     1738# The '<hooked_function_name>_result' variable is automatically unset
     1739# before your hook gets called; for best performance, only set the
     1740# *_result variable when necessary (i.e. don't call the 'func_quote'
     1741# function unnecessarily because it can be an expensive operation on some
     1742# machines).
     1743#
     1744# Like this:
    15641745#
    15651746#    my_options_prep ()
     
    15711752#      -s, --silent       don'\''t print informational messages
    15721753#    '
    1573 #
    1574 #        func_quote_for_eval ${1+"$@"}
    1575 #        my_options_prep_result=$func_quote_for_eval_result
     1754#        # No change in '$@' (ignored completely by this hook).  Leave
     1755#        # my_options_prep_result variable intact.
    15761756#    }
    15771757#    func_add_hook func_options_prep my_options_prep
     
    15821762#        $debug_cmd
    15831763#
    1584 #        # Note that for efficiency, we parse as many options as we can
     1764#        args_changed=false
     1765#
     1766#        # Note that, for efficiency, we parse as many options as we can
    15851767#        # recognise in a loop before passing the remainder back to the
    15861768#        # caller on the first unrecognised argument we encounter.
     
    15881770#          opt=$1; shift
    15891771#          case $opt in
    1590 #            --silent|-s) opt_silent=: ;;
     1772#            --silent|-s) opt_silent=:
     1773#                         args_changed=:
     1774#                         ;;
    15911775#            # Separate non-argument short options:
    15921776#            -s*)         func_split_short_opt "$_G_opt"
     
    15941778#                             "-$func_split_short_opt_arg" ${1+"$@"}
    15951779#                         shift
     1780#                         args_changed=:
    15961781#                         ;;
    1597 #            *)            set dummy "$_G_opt" "$*"; shift; break ;;
     1782#            *)           # Make sure the first unrecognised option "$_G_opt"
     1783#                         # is added back to "$@" in case we need it later,
     1784#                         # if $args_changed was set to 'true'.
     1785#                         set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
    15981786#          esac
    15991787#        done
    16001788#
    1601 #        func_quote_for_eval ${1+"$@"}
    1602 #        my_silent_option_result=$func_quote_for_eval_result
     1789#        # Only call 'func_quote' here if we processed at least one argument.
     1790#        if $args_changed; then
     1791#          func_quote eval ${1+"$@"}
     1792#          my_silent_option_result=$func_quote_result
     1793#        fi
    16031794#    }
    16041795#    func_add_hook func_parse_options my_silent_option
     
    16111802#        $opt_silent && $opt_verbose && func_fatal_help "\
    16121803#    '--silent' and '--verbose' options are mutually exclusive."
    1613 #
    1614 #        func_quote_for_eval ${1+"$@"}
    1615 #        my_option_validation_result=$func_quote_for_eval_result
    16161804#    }
    16171805#    func_add_hook func_validate_options my_option_validation
    16181806#
    1619 # You'll alse need to manually amend $usage_message to reflect the extra
     1807# You'll also need to manually amend $usage_message to reflect the extra
    16201808# options you parse.  It's preferable to append if you can, so that
    16211809# multiple option parsing hooks can be added safely.
     1810
     1811
     1812# func_options_finish [ARG]...
     1813# ----------------------------
     1814# Finishing the option parse loop (call 'func_options' hooks ATM).
     1815func_options_finish ()
     1816{
     1817    $debug_cmd
     1818
     1819    func_run_hooks func_options ${1+"$@"}
     1820    func_propagate_result func_run_hooks func_options_finish
     1821}
    16221822
    16231823
     
    16311831    $debug_cmd
    16321832
    1633     func_options_prep ${1+"$@"}
    1634     eval func_parse_options \
    1635         ${func_options_prep_result+"$func_options_prep_result"}
    1636     eval func_validate_options \
    1637         ${func_parse_options_result+"$func_parse_options_result"}
    1638 
    1639     eval func_run_hooks func_options \
    1640         ${func_validate_options_result+"$func_validate_options_result"}
    1641 
    1642     # save modified positional parameters for caller
    1643     func_options_result=$func_run_hooks_result
     1833    _G_options_quoted=false
     1834
     1835    for my_func in options_prep parse_options validate_options options_finish
     1836    do
     1837      func_unset func_${my_func}_result
     1838      func_unset func_run_hooks_result
     1839      eval func_$my_func '${1+"$@"}'
     1840      func_propagate_result func_$my_func func_options
     1841      if $func_propagate_result_result; then
     1842        eval set dummy "$func_options_result"; shift
     1843        _G_options_quoted=:
     1844      fi
     1845    done
     1846
     1847    $_G_options_quoted || {
     1848      # As we (func_options) are top-level options-parser function and
     1849      # nobody quoted "$@" for us yet, we need to do it explicitly for
     1850      # caller.
     1851      func_quote eval ${1+"$@"}
     1852      func_options_result=$func_quote_result
     1853    }
    16441854}
    16451855
     
    16501860# Note that when calling hook functions, we pass through the list of
    16511861# positional parameters.  If a hook function modifies that list, and
    1652 # needs to propogate that back to rest of this script, then the complete
    1653 # modified list must be put in 'func_run_hooks_result' before
    1654 # returning.
     1862# needs to propagate that back to rest of this script, then the complete
     1863# modified list must be put in 'func_run_hooks_result' before returning.
    16551864func_hookable func_options_prep
    16561865func_options_prep ()
     
    16631872
    16641873    func_run_hooks func_options_prep ${1+"$@"}
    1665 
    1666     # save modified positional parameters for caller
    1667     func_options_prep_result=$func_run_hooks_result
     1874    func_propagate_result func_run_hooks func_options_prep
    16681875}
    16691876
     
    16771884    $debug_cmd
    16781885
    1679     func_parse_options_result=
    1680 
     1886    _G_parse_options_requote=false
    16811887    # this just eases exit handling
    16821888    while test $# -gt 0; do
     
    16841890      # get priority in the event of reusing an option name.
    16851891      func_run_hooks func_parse_options ${1+"$@"}
    1686 
    1687       # Adjust func_parse_options positional parameters to match
    1688       eval set dummy "$func_run_hooks_result"; shift
     1892      func_propagate_result func_run_hooks func_parse_options
     1893      if $func_propagate_result_result; then
     1894        eval set dummy "$func_parse_options_result"; shift
     1895        # Even though we may have changed "$@", we passed the "$@" array
     1896        # down into the hook and it quoted it for us (because we are in
     1897        # this if-branch).  No need to quote it again.
     1898        _G_parse_options_requote=false
     1899      fi
    16891900
    16901901      # Break out of the loop if we already parsed every option.
    16911902      test $# -gt 0 || break
    16921903
     1904      # We expect that one of the options parsed in this function matches
     1905      # and thus we remove _G_opt from "$@" and need to re-quote.
     1906      _G_match_parse_options=:
    16931907      _G_opt=$1
    16941908      shift
    16951909      case $_G_opt in
    16961910        --debug|-x)   debug_cmd='set -x'
    1697                       func_echo "enabling shell trace mode"
     1911                      func_echo "enabling shell trace mode" >&2
    16981912                      $debug_cmd
    16991913                      ;;
     
    17051919
    17061920        --warnings|--warning|-W)
    1707                       test $# = 0 && func_missing_arg $_G_opt && break
     1921                      if test $# = 0 && func_missing_arg $_G_opt; then
     1922                        _G_parse_options_requote=:
     1923                        break
     1924                      fi
    17081925                      case " $warning_categories $1" in
    17091926                        *" $1 "*)
     
    17581975                      ;;
    17591976
    1760         --)           break ;;
     1977        --)           _G_parse_options_requote=: ; break ;;
    17611978        -*)           func_fatal_help "unrecognised option: '$_G_opt'" ;;
    1762         *)            set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
     1979        *)            set dummy "$_G_opt" ${1+"$@"}; shift
     1980                      _G_match_parse_options=false
     1981                      break
     1982                      ;;
    17631983      esac
     1984
     1985      if $_G_match_parse_options; then
     1986        _G_parse_options_requote=:
     1987      fi
    17641988    done
    17651989
    1766     # save modified positional parameters for caller
    1767     func_quote_for_eval ${1+"$@"}
    1768     func_parse_options_result=$func_quote_for_eval_result
     1990    if $_G_parse_options_requote; then
     1991      # save modified positional parameters for caller
     1992      func_quote eval ${1+"$@"}
     1993      func_parse_options_result=$func_quote_result
     1994    fi
    17691995}
    17701996
     
    17832009
    17842010    func_run_hooks func_validate_options ${1+"$@"}
     2011    func_propagate_result func_run_hooks func_validate_options
    17852012
    17862013    # Bail if the options were screwed!
    17872014    $exit_cmd $EXIT_FAILURE
    1788 
    1789     # save modified positional parameters for caller
    1790     func_validate_options_result=$func_run_hooks_result
    17912015}
    17922016
     
    18442068# func_split_equals STRING
    18452069# ------------------------
    1846 # Set func_split_equals_lhs and func_split_equals_rhs shell variables after
    1847 # splitting STRING at the '=' sign.
     2070# Set func_split_equals_lhs and func_split_equals_rhs shell variables
     2071# after splitting STRING at the '=' sign.
    18482072test -z "$_G_HAVE_XSI_OPS" \
    18492073    && (eval 'x=a/b/c;
     
    18602084      func_split_equals_lhs=${1%%=*}
    18612085      func_split_equals_rhs=${1#*=}
    1862       test "x$func_split_equals_lhs" = "x$1" \
    1863         && func_split_equals_rhs=
     2086      if test "x$func_split_equals_lhs" = "x$1"; then
     2087        func_split_equals_rhs=
     2088      fi
    18642089  }'
    18652090else
     
    18712096      func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'`
    18722097      func_split_equals_rhs=
    1873       test "x$func_split_equals_lhs" = "x$1" \
     2098      test "x$func_split_equals_lhs=" = "x$1" \
    18742099        || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'`
    18752100  }
     
    18972122      $debug_cmd
    18982123
    1899       func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'`
     2124      func_split_short_opt_name=`expr "x$1" : 'x\(-.\)'`
    19002125      func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'`
    19012126  }
     
    19392164# ------------
    19402165# Echo version message to standard output and exit.
     2166# The version message is extracted from the calling file's header
     2167# comments, with leading '# ' stripped:
     2168#   1. First display the progname and version
     2169#   2. Followed by the header comment line matching  /^# Written by /
     2170#   3. Then a blank line followed by the first following line matching
     2171#      /^# Copyright /
     2172#   4. Immediately followed by any lines between the previous matches,
     2173#      except lines preceding the intervening completely blank line.
     2174# For example, see the header comments of this file.
    19412175func_version ()
    19422176{
     
    19452179    printf '%s\n' "$progname $scriptversion"
    19462180    $SED -n '
    1947         /(C)/!b go
    1948         :more
    1949         /\./!{
    1950           N
    1951           s|\n# | |
    1952           b more
     2181        /^# Written by /!b
     2182        s|^# ||; p; n
     2183
     2184        :fwd2blnk
     2185        /./ {
     2186          n
     2187          b fwd2blnk
    19532188        }
    1954         :go
    1955         /^# Written by /,/# warranty; / {
    1956           s|^# ||
    1957           s|^# *$||
    1958           s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
    1959           p
     2189        p; n
     2190
     2191        :holdwrnt
     2192        s|^# ||
     2193        s|^# *$||
     2194        /^Copyright /!{
     2195          /./H
     2196          n
     2197          b holdwrnt
    19602198        }
    1961         /^# Written by / {
    1962           s|^# ||
    1963           p
    1964         }
    1965         /^warranty; /q' < "$progpath"
     2199
     2200        s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
     2201        G
     2202        s|\(\n\)\n*|\1|g
     2203        p; q' < "$progpath"
    19662204
    19672205    exit $?
     
    19732211# sh-indentation: 2
    19742212# eval: (add-hook 'before-save-hook 'time-stamp)
    1975 # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
     2213# time-stamp-pattern: "30/scriptversion=%:y-%02m-%02d.%02H; # UTC"
    19762214# time-stamp-time-zone: "UTC"
    19772215# End:
    19782216
    19792217# Set a version string.
    1980 scriptversion='(GNU libtool) 2.4.6'
     2218scriptversion='(GNU libtool) 2.4.7'
    19812219
    19822220
     
    20692307       compiler flags: $LTCFLAGS
    20702308       linker:         $LD (gnu? $with_gnu_ld)
    2071        version:        $progname (GNU libtool) 2.4.6
     2309       version:        $progname (GNU libtool) 2.4.7
    20722310       automake:       `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
    20732311       autoconf:       `($AUTOCONF --version) 2>/dev/null |$SED 1q`
     
    21252363func_fatal_configuration ()
    21262364{
    2127     func__fatal_error ${1+"$@"} \
     2365    func_fatal_error ${1+"$@"} \
    21282366      "See the $PACKAGE documentation for more information." \
    21292367      "Fatal configuration error."
     
    22712509    preserve_args=
    22722510
     2511    _G_rc_lt_options_prep=:
     2512
    22732513    # Shorthand for --mode=foo, only valid as the first argument
    22742514    case $1 in
     
    22942534      shift; set dummy --mode uninstall ${1+"$@"}; shift
    22952535      ;;
     2536    *)
     2537      _G_rc_lt_options_prep=false
     2538      ;;
    22962539    esac
    22972540
    2298     # Pass back the list of options.
    2299     func_quote_for_eval ${1+"$@"}
    2300     libtool_options_prep_result=$func_quote_for_eval_result
     2541    if $_G_rc_lt_options_prep; then
     2542      # Pass back the list of options.
     2543      func_quote eval ${1+"$@"}
     2544      libtool_options_prep_result=$func_quote_result
     2545    fi
    23012546}
    23022547func_add_hook func_options_prep libtool_options_prep
     
    23102555    $debug_cmd
    23112556
     2557    _G_rc_lt_parse_options=false
     2558
    23122559    # Perform our own loop to consume as many options as possible in
    23132560    # each iteration.
    23142561    while test $# -gt 0; do
     2562      _G_match_lt_parse_options=:
    23152563      _G_opt=$1
    23162564      shift
     
    23872635                        ;;
    23882636
    2389         # An option not handled by this hook function:
    2390         *)              set dummy "$_G_opt" ${1+"$@"};  shift; break  ;;
     2637        # An option not handled by this hook function:
     2638        *)              set dummy "$_G_opt" ${1+"$@"} ; shift
     2639                        _G_match_lt_parse_options=false
     2640                        break
     2641                        ;;
    23912642      esac
     2643      $_G_match_lt_parse_options && _G_rc_lt_parse_options=:
    23922644    done
    23932645
    2394 
    2395     # save modified positional parameters for caller
    2396     func_quote_for_eval ${1+"$@"}
    2397     libtool_parse_options_result=$func_quote_for_eval_result
     2646    if $_G_rc_lt_parse_options; then
     2647      # save modified positional parameters for caller
     2648      func_quote eval ${1+"$@"}
     2649      libtool_parse_options_result=$func_quote_result
     2650    fi
    23982651}
    23992652func_add_hook func_parse_options libtool_parse_options
     
    24522705
    24532706    # Pass back the unparsed argument list
    2454     func_quote_for_eval ${1+"$@"}
    2455     libtool_validate_options_result=$func_quote_for_eval_result
     2707    func_quote eval ${1+"$@"}
     2708    libtool_validate_options_result=$func_quote_result
    24562709}
    24572710func_add_hook func_validate_options libtool_validate_options
     
    34193672    done
    34203673
    3421     func_quote_for_eval "$libobj"
    3422     test "X$libobj" != "X$func_quote_for_eval_result" \
     3674    func_quote_arg pretty "$libobj"
     3675    test "X$libobj" != "X$func_quote_arg_result" \
    34233676      && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"'    &()|`$[]' \
    34243677      && func_warning "libobj name '$libobj' may not contain shell special characters."
     
    34933746    func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
    34943747    srcfile=$func_to_tool_file_result
    3495     func_quote_for_eval "$srcfile"
    3496     qsrcfile=$func_quote_for_eval_result
     3748    func_quote_arg pretty "$srcfile"
     3749    qsrcfile=$func_quote_arg_result
    34973750
    34983751    # Only build a PIC object if we are building libtool libraries.
     
    36493902  -shared           do not build a '.o' file suitable for static linking
    36503903  -static           only build a '.o' file suitable for static linking
    3651   -Wc,FLAG          pass FLAG directly to the compiler
     3904  -Wc,FLAG
     3905  -Xcompiler FLAG   pass FLAG directly to the compiler
    36523906
    36533907COMPILE-COMMAND is a command to be used in creating a 'standard' object file
     
    37554009  -Wc,FLAG
    37564010  -Xcompiler FLAG   pass linker-specific FLAG directly to the compiler
     4011  -Wa,FLAG
     4012  -Xassembler FLAG  pass linker-specific FLAG directly to the assembler
    37574013  -Wl,FLAG
    37584014  -Xlinker FLAG     pass linker-specific FLAG directly to the linker
     
    40974353    then
    40984354      # Aesthetically quote it.
    4099       func_quote_for_eval "$nonopt"
    4100       install_prog="$func_quote_for_eval_result "
     4355      func_quote_arg pretty "$nonopt"
     4356      install_prog="$func_quote_arg_result "
    41014357      arg=$1
    41024358      shift
     
    41084364    # The real first argument should be the name of the installation program.
    41094365    # Aesthetically quote it.
    4110     func_quote_for_eval "$arg"
    4111     func_append install_prog "$func_quote_for_eval_result"
     4366    func_quote_arg pretty "$arg"
     4367    func_append install_prog "$func_quote_arg_result"
    41124368    install_shared_prog=$install_prog
    41134369    case " $install_prog " in
     
    41664422
    41674423      # Aesthetically quote the argument.
    4168       func_quote_for_eval "$arg"
    4169       func_append install_prog " $func_quote_for_eval_result"
     4424      func_quote_arg pretty "$arg"
     4425      func_append install_prog " $func_quote_arg_result"
    41704426      if test -n "$arg2"; then
    4171         func_quote_for_eval "$arg2"
     4427        func_quote_arg pretty "$arg2"
    41724428      fi
    4173       func_append install_shared_prog " $func_quote_for_eval_result"
     4429      func_append install_shared_prog " $func_quote_arg_result"
    41744430    done
    41754431
     
    41824438    if test -n "$install_override_mode" && $no_mode; then
    41834439      if $install_cp; then :; else
    4184         func_quote_for_eval "$install_override_mode"
    4185         func_append install_shared_prog " -m $func_quote_for_eval_result"
     4440        func_quote_arg pretty "$install_override_mode"
     4441        func_append install_shared_prog " -m $func_quote_arg_result"
    41864442      fi
    41874443    fi
     
    44794735
    44804736                $opt_quiet || {
    4481                   func_quote_for_expand "$relink_command"
    4482                   eval "func_echo $func_quote_for_expand_result"
     4737                  func_quote_arg expand,pretty "$relink_command"
     4738                  eval "func_echo $func_quote_arg_result"
    44834739                }
    44844740                if eval "$relink_command"; then :
     
    52595515    file=\"\$0\""
    52605516
    5261     qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
     5517    func_quote_arg pretty "$ECHO"
     5518    qECHO=$func_quote_arg_result
    52625519    $ECHO "\
    52635520
     
    52695526_LTECHO_EOF'
    52705527}
    5271     ECHO=\"$qECHO\"
     5528    ECHO=$qECHO
    52725529  fi
    52735530
     
    66126869      arg=$1
    66136870      shift
    6614       func_quote_for_eval "$arg"
    6615       qarg=$func_quote_for_eval_unquoted_result
    6616       func_append libtool_args " $func_quote_for_eval_result"
     6871      func_quote_arg pretty,unquoted "$arg"
     6872      qarg=$func_quote_arg_unquoted_result
     6873      func_append libtool_args " $func_quote_arg_result"
    66176874
    66186875      # If the previous option needs an argument, assign it.
     
    68507107          continue
    68517108          ;;
     7109        xassembler)
     7110          func_append compiler_flags " -Xassembler $qarg"
     7111          prev=
     7112          func_append compile_command " -Xassembler $qarg"
     7113          func_append finalize_command " -Xassembler $qarg"
     7114          continue
     7115          ;;
    68527116        xcclinker)
    68537117          func_append linker_flags " $qarg"
     
    70207284            test X-lc = "X$arg" && continue
    70217285            ;;
    7022           *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
     7286          *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*)
    70237287            # Do not include libc due to us having libc/libc_r.
    70247288            test X-lc = "X$arg" && continue
     
    70407304        elif test X-lc_r = "X$arg"; then
    70417305         case $host in
    7042          *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
     7306         *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*)
    70437307           # Do not include libc_r directly, use -pthread flag.
    70447308           continue
     
    70707334        continue
    70717335        ;;
    7072 
    7073       -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
     7336     # Solaris ld rejects as of 11.4. Refer to Oracle bug 22985199.
     7337     -pthread)
     7338        case $host in
     7339          *solaris2*) ;;
     7340          *)
     7341            case "$new_inherited_linker_flags " in
     7342                *" $arg "*) ;;
     7343                * ) func_append new_inherited_linker_flags " $arg" ;;
     7344            esac
     7345          ;;
     7346        esac
     7347        continue
     7348        ;;
     7349      -mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \
    70747350      |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
    70757351        func_append compiler_flags " $arg"
     
    72127488        for flag in $args; do
    72137489          IFS=$save_ifs
    7214           func_quote_for_eval "$flag"
    7215           func_append arg " $func_quote_for_eval_result"
    7216           func_append compiler_flags " $func_quote_for_eval_result"
     7490          func_quote_arg pretty "$flag"
     7491          func_append arg " $func_quote_arg_result"
     7492          func_append compiler_flags " $func_quote_arg_result"
    72177493        done
    72187494        IFS=$save_ifs
     
    72287504        for flag in $args; do
    72297505          IFS=$save_ifs
    7230           func_quote_for_eval "$flag"
    7231           func_append arg " $wl$func_quote_for_eval_result"
    7232           func_append compiler_flags " $wl$func_quote_for_eval_result"
    7233           func_append linker_flags " $func_quote_for_eval_result"
     7506          func_quote_arg pretty "$flag"
     7507          func_append arg " $wl$func_quote_arg_result"
     7508          func_append compiler_flags " $wl$func_quote_arg_result"
     7509          func_append linker_flags " $func_quote_arg_result"
    72347510        done
    72357511        IFS=$save_ifs
     
    72387514        ;;
    72397515
     7516      -Xassembler)
     7517        prev=xassembler
     7518        continue
     7519        ;;
     7520
    72407521      -Xcompiler)
    72417522        prev=xcompiler
     
    72557536      # -msg_* for osf cc
    72567537      -msg_*)
    7257         func_quote_for_eval "$arg"
    7258         arg=$func_quote_for_eval_result
     7538        func_quote_arg pretty "$arg"
     7539        arg=$func_quote_arg_result
    72597540        ;;
    72607541
     
    72737554      # --sysroot=*          for sysroot support
    72747555      # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
     7556      # -specs=*             GCC specs files
    72757557      # -stdlib=*            select c++ std lib with clang
     7558      # -fsanitize=*         Clang/GCC memory and address sanitizer
     7559      # -fuse-ld=*           Linker select flags for GCC
     7560      # -Wa,*                Pass flags directly to the assembler
    72767561      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
    72777562      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
    7278       -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*)
    7279         func_quote_for_eval "$arg"
    7280         arg=$func_quote_for_eval_result
     7563      -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
     7564      -specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*)
     7565        func_quote_arg pretty "$arg"
     7566        arg=$func_quote_arg_result
    72817567        func_append compile_command " $arg"
    72827568        func_append finalize_command " $arg"
     
    72997585        else
    73007586          # Otherwise treat like 'Some other compiler flag' below
    7301           func_quote_for_eval "$arg"
    7302           arg=$func_quote_for_eval_result
     7587          func_quote_arg pretty "$arg"
     7588          arg=$func_quote_arg_result
    73037589        fi
    73047590        ;;
     
    73067592      # Some other compiler flag.
    73077593      -* | +*)
    7308         func_quote_for_eval "$arg"
    7309         arg=$func_quote_for_eval_result
     7594        func_quote_arg pretty "$arg"
     7595        arg=$func_quote_arg_result
    73107596        ;;
    73117597
     
    74277713        # Unknown arguments in both finalize_command and compile_command need
    74287714        # to be aesthetically quoted because they are evaled later.
    7429         func_quote_for_eval "$arg"
    7430         arg=$func_quote_for_eval_result
     7715        func_quote_arg pretty "$arg"
     7716        arg=$func_quote_arg_result
    74317717        ;;
    74327718      esac # arg
     
    86338919        case $host_os in
    86348920        linux*)
    8635           case `$CC -V 2>&1 | sed 5q` in
     8921          case `$CC -V 2>&1 | $SED 5q` in
    86368922          *Sun\ C*) # Sun C++ 5.9
    86378923            func_suncc_cstd_abi
     
    88069092          case $version_type in
    88079093          # correct linux to gnu/linux during the next big refactor
    8808           darwin|freebsd-elf|linux|osf|windows|none)
     9094          darwin|freebsd-elf|linux|midnightbsd-elf|osf|windows|none)
    88099095            func_arith $number_major + $number_minor
    88109096            current=$func_arith_result
     
    88979183          ;;
    88989184
    8899         freebsd-elf)
     9185        freebsd-elf | midnightbsd-elf)
    89009186          func_arith $current - $age
    89019187          major=.$func_arith_result
     
    91239409            # Don't link with libc until the a.out ld.so is fixed.
    91249410            ;;
    9125           *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
     9411          *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*)
    91269412            # Do not include libc due to us having libc/libc_r.
    91279413            ;;
     
    993410220              IFS=$save_ifs
    993510221              $opt_quiet || {
    9936                   func_quote_for_expand "$cmd"
    9937                   eval "func_echo $func_quote_for_expand_result"
     10222                  func_quote_arg expand,pretty "$cmd"
     10223                  eval "func_echo $func_quote_arg_result"
    993810224              }
    993910225              $opt_dry_run || eval "$cmd" || {
     
    1002810314          IFS=$save_ifs
    1002910315          $opt_quiet || {
    10030             func_quote_for_expand "$cmd"
    10031             eval "func_echo $func_quote_for_expand_result"
     10316            func_quote_arg expand,pretty "$cmd"
     10317            eval "func_echo $func_quote_arg_result"
    1003210318          }
    1003310319          $opt_dry_run || eval "$cmd" || {
     
    1050310789            relink_command="$var=; export $var; $relink_command"
    1050410790          else
    10505             func_quote_for_eval "$var_value"
    10506             relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
     10791            func_quote_arg pretty "$var_value"
     10792            relink_command="$var=$func_quote_arg_result; export $var; $relink_command"
    1050710793          fi
    1050810794        done
    10509         relink_command="(cd `pwd`; $relink_command)"
    10510         relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
     10795        func_quote eval cd "`pwd`"
     10796        func_quote_arg pretty,unquoted "($func_quote_result; $relink_command)"
     10797        relink_command=$func_quote_arg_unquoted_result
    1051110798      fi
    1051210799
     
    1074811035          relink_command="$var=; export $var; $relink_command"
    1074911036        else
    10750           func_quote_for_eval "$var_value"
    10751           relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
     11037          func_quote_arg pretty,unquoted "$var_value"
     11038          relink_command="$var=$func_quote_arg_unquoted_result; export $var; $relink_command"
    1075211039        fi
    1075311040      done
    1075411041      # Quote the link command for shipping.
    10755       relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
    10756       relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
     11042      func_quote eval cd "`pwd`"
     11043      relink_command="($func_quote_result; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
     11044      func_quote_arg pretty,unquoted "$relink_command"
     11045      relink_command=$func_quote_arg_unquoted_result
    1075711046      if test yes = "$hardcode_automatic"; then
    1075811047        relink_command=
  • trunk/src/libs/libpng-1.6.42/mips/filter_msa_intrinsics.c

    r96425 r103316  
    22/* filter_msa_intrinsics.c - MSA optimised filter functions
    33 *
    4  * Copyright (c) 2018 Cosmin Truta
     4 * Copyright (c) 2018-2024 Cosmin Truta
    55 * Copyright (c) 2016 Glenn Randers-Pehrson
    6  * Written by Mandar Sahastrabuddhe, August 2016.
     6 * Written by Mandar Sahastrabuddhe, August 2016
    77 *
    88 * This code is released under the libpng license.
     
    1212
    1313#include <stdio.h>
    14 #include <stdint.h>
    1514#include "../pngpriv.h"
    1615
     
    2120
    2221#include <msa.h>
     22#include <stdint.h>
    2323
    2424/* libpng row pointers are not necessarily aligned to any particular boundary,
     
    380380      pp += 64;
    381381
    382           ADD4(src0, src4, src1, src5, src2, src6, src3, src7,
    383                src0, src1, src2, src3);
     382      ADD4(src0, src4, src1, src5, src2, src6, src3, src7,
     383           src0, src1, src2, src3);
    384384
    385385      ST_UB4(src0, src1, src2, src3, rp, 16);
     
    401401
    402402            ADD4(src0, src4, src1, src5, src2, src6, src3, src7,
    403                      src0, src1, src2, src3);
     403                 src0, src1, src2, src3);
    404404
    405405            ST_UB4(src0, src1, src2, src3, rp, 16);
     
    426426            LD_UB2(pp, 16, src4, src5);
    427427
    428                         ADD2(src0, src4, src1, src5, src0, src1);
     428            ADD2(src0, src4, src1, src5, src0, src1);
    429429
    430430            ST_UB2(src0, src1, rp, 16);
  • trunk/src/libs/libpng-1.6.42/mips/mips_init.c

    r96425 r103316  
    22/* mips_init.c - MSA optimised filter functions
    33 *
    4  * Copyright (c) 2018 Cosmin Truta
     4 * Copyright (c) 2018-2024 Cosmin Truta
    55 * Copyright (c) 2016 Glenn Randers-Pehrson
    6  * Written by Mandar Sahastrabuddhe, 2016.
     6 * Written by Mandar Sahastrabuddhe, 2016
     7 * Updated by guxiwei, 2023
    78 *
    89 * This code is released under the libpng license.
     
    2122#ifdef PNG_READ_SUPPORTED
    2223
    23 #if PNG_MIPS_MSA_OPT > 0
    24 #ifdef PNG_MIPS_MSA_CHECK_SUPPORTED /* Do run-time checks */
     24#if PNG_MIPS_MSA_IMPLEMENTATION == 1 || PNG_MIPS_MMI_IMPLEMENTATION > 0
     25
     26#ifdef PNG_MIPS_MSA_CHECK_SUPPORTED /* Do MIPS MSA run-time checks */
    2527/* WARNING: it is strongly recommended that you do not build libpng with
    2628 * run-time checks for CPU features if at all possible.  In the case of the MIPS
     
    5254#endif /* PNG_MIPS_MSA_CHECK_SUPPORTED */
    5355
     56#ifdef PNG_MIPS_MMI_CHECK_SUPPORTED /* Do MIPS MMI run-times checks */
     57#ifndef PNG_MIPS_MMI_FILE
     58#  ifdef __linux__
     59#     define PNG_MIPS_MMI_FILE "contrib/mips-mmi/linux.c"
     60#  endif
     61#endif
     62
     63#ifdef PNG_MIPS_MMI_FILE
     64
     65#include <signal.h> /* for sig_atomic_t */
     66static int png_have_mmi();
     67#include PNG_MIPS_MMI_FILE
     68
     69#else  /* PNG_MIPS_MMI_FILE */
     70#  error "PNG_MIPS_MMI_FILE undefined: no support for run-time MIPS MMI checks"
     71#endif /* PNG_MIPS_MMI_FILE */
     72#endif /* PNG_MIPS_MMI_CHECK_SUPPORTED*/
     73
    5474#ifndef PNG_ALIGNED_MEMORY_SUPPORTED
    5575#  error "ALIGNED_MEMORY is required; set: -DPNG_ALIGNED_MEMORY_SUPPORTED"
    5676#endif
    5777
     78/* MIPS supports two optimizations: MMI and MSA. The appropriate
     79 * optimization is chosen at runtime
     80 */
    5881void
    59 png_init_filter_functions_msa(png_structp pp, unsigned int bpp)
     82png_init_filter_functions_mips(png_structp pp, unsigned int bpp)
    6083{
     84#if PNG_MIPS_MMI_IMPLEMENTATION  > 0
     85#ifdef PNG_MIPS_MMI_API_SUPPORTED
     86   switch ((pp->options >> PNG_MIPS_MMI) & 3)
     87   {
     88      case PNG_OPTION_UNSET:
     89#endif /* PNG_MIPS_MMI_API_SUPPORTED */
     90#ifdef PNG_MIPS_MMI_CHECK_SUPPORTED
     91         {
     92            static volatile sig_atomic_t no_mmi = -1; /* not checked */
     93
     94            if (no_mmi < 0)
     95               no_mmi = !png_have_mmi();
     96
     97            if (no_mmi)
     98              goto MIPS_MSA_INIT;
     99         }
     100#ifdef PNG_MIPS_MMI_API_SUPPORTED
     101         break;
     102#endif
     103#endif /* PNG_MIPS_MMI_CHECK_SUPPORTED */
     104
     105#ifdef PNG_MIPS_MMI_API_SUPPORTED
     106      default: /* OFF or INVALID */
     107         goto MIPS_MSA_INIT;
     108
     109      case PNG_OPTION_ON:
     110         /* Option turned on */
     111         break;
     112   }
     113#endif
     114   pp->read_filter[PNG_FILTER_VALUE_UP-1] = png_read_filter_row_up_mmi;
     115   if (bpp == 3)
     116   {
     117      pp->read_filter[PNG_FILTER_VALUE_SUB-1] = png_read_filter_row_sub3_mmi;
     118      pp->read_filter[PNG_FILTER_VALUE_AVG-1] = png_read_filter_row_avg3_mmi;
     119      pp->read_filter[PNG_FILTER_VALUE_PAETH-1] =
     120         png_read_filter_row_paeth3_mmi;
     121   }
     122   else if (bpp == 4)
     123   {
     124      pp->read_filter[PNG_FILTER_VALUE_SUB-1] = png_read_filter_row_sub4_mmi;
     125      pp->read_filter[PNG_FILTER_VALUE_AVG-1] = png_read_filter_row_avg4_mmi;
     126      pp->read_filter[PNG_FILTER_VALUE_PAETH-1] =
     127          png_read_filter_row_paeth4_mmi;
     128   }
     129#endif /* PNG_MIPS_MMI_IMPLEMENTATION > 0 */
     130
     131MIPS_MSA_INIT:
     132#if PNG_MIPS_MSA_IMPLEMENTATION == 1
    61133   /* The switch statement is compiled in for MIPS_MSA_API, the call to
    62134    * png_have_msa is compiled in for MIPS_MSA_CHECK. If both are defined
     
    126198      pp->read_filter[PNG_FILTER_VALUE_PAETH-1] = png_read_filter_row_paeth4_msa;
    127199   }
     200#endif /* PNG_MIPS_MSA_IMPLEMENTATION == 1 */
     201   return;
    128202}
    129 #endif /* PNG_MIPS_MSA_OPT > 0 */
     203#endif /* PNG_MIPS_MSA_IMPLEMENTATION == 1 || PNG_MIPS_MMI_IMPLEMENTATION > 0 */
    130204#endif /* READ */
  • trunk/src/libs/libpng-1.6.42/missing

    r96425 r103316  
    44scriptversion=2018-03-07.03; # UTC
    55
    6 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
     6# Copyright (C) 1996-2021 Free Software Foundation, Inc.
    77# Originally written by Fran,cois Pinard <[email protected]>, 1996.
    88
  • trunk/src/libs/libpng-1.6.42/png.5

    r96425 r103316  
    1 .TH PNG 5 "April 14, 2019"
     1.TH PNG 5 "January 29, 2024"
    22.SH NAME
    33png \- Portable Network Graphics (PNG) format
     
    1919
    2020.SH "SEE ALSO"
    21 .BR "libpng"(3), " libpngpf"(3), " zlib"(3), " deflate"(5), " " and " zlib"(5)
     21.BR "libpng"(3), " zlib"(3), " deflate"(5), " " and " zlib"(5)
    2222.LP
    2323PNG Specification (Second Edition), November 2003:
     
    4444
    4545.SH AUTHORS
    46 This man page: Cosmin Truta, Glenn Randers-Pehrson
     46This man page: Glenn Randers-Pehrson, Cosmin Truta
    4747.LP
    4848Portable Network Graphics (PNG) Specification (Second Edition)
     
    5252.LP
    5353Portable Network Graphics (PNG) Specification Version 1.2 (July 8, 1999):
    54 Glenn Randers-Pehrson and others (png-list).
     54Glenn Randers-Pehrson and others.
    5555.LP
    5656Portable Network Graphics (PNG) Specification Version 1.0 (October 1, 1996):
    57 Thomas Boutell and others (png-list).
     57Thomas Boutell and others.
    5858
    59 .SH COPYRIGHT
    60 .LP
    61 This man page is
    62 .br
    63 Copyright (c) 2018-2019 Cosmin Truta.
    64 .br
    65 Copyright (c) 1998-2006 Glenn Randers-Pehrson.
    66 .br
    67 See png.h for conditions of use and distribution.
    68 .LP
    69 The PNG Specification (Second Edition) is
    70 .br
    71 Copyright (c) 2003 W3C. (MIT, ERCIM, Keio), All Rights Reserved.
    72 .LP
    73 The PNG-1.2 Specification is
    74 .br
    75 Copyright (c) 1999 Glenn Randers-Pehrson.
    76 .br
    77 See the specification for conditions of use and distribution.
    78 .LP
    79 The PNG-1.0 Specification is
    80 .br
    81 Copyright (c) 1996 Massachusetts Institute of Technology.
    82 .br
    83 See the specification for conditions of use and distribution.
    8459.\" end of man page
  • trunk/src/libs/libpng-1.6.42/png.c

    r96425 r103316  
    22/* png.c - location for general purpose libpng functions
    33 *
    4  * Copyright (c) 2018-2019 Cosmin Truta
     4 * Copyright (c) 2018-2024 Cosmin Truta
    55 * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
    66 * Copyright (c) 1996-1997 Andreas Dilger
     
    1515
    1616/* Generate a compiler error if there is an old png.h in the search path. */
    17 typedef png_libpng_version_1_6_37 Your_png_h_is_not_version_1_6_37;
    18 
    19 #ifdef __GNUC__
    20 /* The version tests may need to be added to, but the problem warning has
    21  * consistently been fixed in GCC versions which obtain wide-spread release.
    22  * The problem is that many versions of GCC rearrange comparison expressions in
    23  * the optimizer in such a way that the results of the comparison will change
    24  * if signed integer overflow occurs.  Such comparisons are not permitted in
    25  * ANSI C90, however GCC isn't clever enough to work out that that do not occur
    26  * below in png_ascii_from_fp and png_muldiv, so it produces a warning with
    27  * -Wextra.  Unfortunately this is highly dependent on the optimizer and the
    28  * machine architecture so the warning comes and goes unpredictably and is
    29  * impossible to "fix", even were that a good idea.
    30  */
    31 #if __GNUC__ == 7 && __GNUC_MINOR__ == 1
    32 #define GCC_STRICT_OVERFLOW 1
    33 #endif /* GNU 7.1.x */
    34 #endif /* GNU */
    35 #ifndef GCC_STRICT_OVERFLOW
    36 #define GCC_STRICT_OVERFLOW 0
    37 #endif
     17typedef png_libpng_version_1_6_42 Your_png_h_is_not_version_1_6_42;
    3818
    3919/* Tells libpng that we have already handled the first "num_bytes" bytes
     
    7454png_sig_cmp(png_const_bytep sig, size_t start, size_t num_to_check)
    7555{
    76    png_byte png_signature[8] = {137, 80, 78, 71, 13, 10, 26, 10};
     56   static const png_byte png_signature[8] = {137, 80, 78, 71, 13, 10, 26, 10};
    7757
    7858   if (num_to_check > 8)
     
    8060
    8161   else if (num_to_check < 1)
    82       return (-1);
     62      return -1;
    8363
    8464   if (start > 7)
    85       return (-1);
     65      return -1;
    8666
    8767   if (start + num_to_check > 8)
    8868      num_to_check = 8 - start;
    8969
    90    return ((int)(memcmp(&sig[start], &png_signature[start], num_to_check)));
     70   return memcmp(&sig[start], &png_signature[start], num_to_check);
    9171}
    9272
     
    448428}
    449429
    450 /* The following API is not called internally */
    451430void PNGAPI
    452431png_data_freer(png_const_structrp png_ptr, png_inforp info_ptr,
     
    687666{
    688667   if (png_ptr == NULL)
    689       return (NULL);
    690 
    691    return (png_ptr->io_ptr);
     668      return NULL;
     669
     670   return png_ptr->io_ptr;
    692671}
    693672
     
    721700 * Where UNSIGNED_MAX is the appropriate maximum unsigned value, so when the
    722701 * negative integral value is added the result will be an unsigned value
    723  * correspnding to the 2's complement representation.
     702 * corresponding to the 2's complement representation.
    724703 */
    725704void PNGAPI
     
    753732   {
    754733      size_t pos = 0;
    755       char number_buf[5]; /* enough for a four-digit year */
     734      char number_buf[5] = {0, 0, 0, 0, 0}; /* enough for a four-digit year */
    756735
    757736#     define APPEND_STRING(string) pos = png_safecat(out, 29, pos, (string))
     
    816795#else
    817796   return PNG_STRING_NEWLINE \
    818       "libpng version 1.6.37" PNG_STRING_NEWLINE \
    819       "Copyright (c) 2018-2019 Cosmin Truta" PNG_STRING_NEWLINE \
     797      "libpng version 1.6.42" PNG_STRING_NEWLINE \
     798      "Copyright (c) 2018-2024 Cosmin Truta" PNG_STRING_NEWLINE \
    820799      "Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson" \
    821800      PNG_STRING_NEWLINE \
     
    978957
    979958   /* WARNING: this resets the window bits to the maximum! */
    980    return (inflateReset(&png_ptr->zstream));
     959   return inflateReset(&png_ptr->zstream);
    981960}
    982961#endif /* READ */
     
    987966{
    988967   /* Version of *.c files used when building libpng */
    989    return((png_uint_32)PNG_LIBPNG_VER);
     968   return (png_uint_32)PNG_LIBPNG_VER;
    990969}
    991970
     
    18441823   else
    18451824      {
    1846          char number[PNG_NUMBER_BUFFER_SIZE]; /* +24 = 114*/
     1825         char number[PNG_NUMBER_BUFFER_SIZE]; /* +24 = 114 */
    18471826
    18481827         pos = png_safecat(message, (sizeof message), pos,
    18491828             png_format_number(number, number+(sizeof number),
    18501829             PNG_NUMBER_FORMAT_x, value));
    1851          pos = png_safecat(message, (sizeof message), pos, "h: "); /*+2 = 116*/
     1830         pos = png_safecat(message, (sizeof message), pos, "h: "); /* +2 = 116 */
    18521831      }
    18531832#  endif
     
    27112690int /* PRIVATE */
    27122691png_check_fp_number(png_const_charp string, size_t size, int *statep,
    2713     png_size_tp whereami)
     2692    size_t *whereami)
    27142693{
    27152694   int state = *statep;
     
    28922871 * precision.
    28932872 */
    2894 #if GCC_STRICT_OVERFLOW
    2895 #pragma GCC diagnostic push
    2896 /* The problem arises below with exp_b10, which can never overflow because it
    2897  * comes, originally, from frexp and is therefore limited to a range which is
    2898  * typically +/-710 (log2(DBL_MAX)/log2(DBL_MIN)).
    2899  */
    2900 #pragma GCC diagnostic warning "-Wstrict-overflow=2"
    2901 #endif /* GCC_STRICT_OVERFLOW */
    29022873void /* PRIVATE */
    29032874png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, size_t size,
     
    32213192   png_error(png_ptr, "ASCII conversion buffer too small");
    32223193}
    3223 #if GCC_STRICT_OVERFLOW
    3224 #pragma GCC diagnostic pop
    3225 #endif /* GCC_STRICT_OVERFLOW */
    3226 
    32273194#  endif /* FLOATING_POINT */
    32283195
     
    32523219      {
    32533220         unsigned int ndigits = 0, first = 16 /* flag value */;
    3254          char digits[10];
     3221         char digits[10] = {0};
    32553222
    32563223         while (num)
     
    33373304 * the result, a boolean - true on success, false on overflow.
    33383305 */
    3339 #if GCC_STRICT_OVERFLOW /* from above */
    3340 /* It is not obvious which comparison below gets optimized in such a way that
    3341  * signed overflow would change the result; looking through the code does not
    3342  * reveal any tests which have the form GCC complains about, so presumably the
    3343  * optimizer is moving an add or subtract into the 'if' somewhere.
    3344  */
    3345 #pragma GCC diagnostic push
    3346 #pragma GCC diagnostic warning "-Wstrict-overflow=2"
    3347 #endif /* GCC_STRICT_OVERFLOW */
    33483306int
    33493307png_muldiv(png_fixed_point_p res, png_fixed_point a, png_int_32 times,
     
    34603418   return 0;
    34613419}
    3462 #if GCC_STRICT_OVERFLOW
    3463 #pragma GCC diagnostic pop
    3464 #endif /* GCC_STRICT_OVERFLOW */
    34653420#endif /* READ_GAMMA || INCH_CONVERSIONS */
    34663421
  • trunk/src/libs/libpng-1.6.42/png.h

    r96425 r103316  
    22/* png.h - header file for PNG reference library
    33 *
    4  * libpng version 1.6.37 - April 14, 2019
    5  *
    6  * Copyright (c) 2018-2019 Cosmin Truta
     4 * libpng version 1.6.42
     5 *
     6 * Copyright (c) 2018-2024 Cosmin Truta
    77 * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
    88 * Copyright (c) 1996-1997 Andreas Dilger
     
    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.37, April 2019:
     18 *   libpng versions 1.6.36, December 2018, through 1.6.42, January 2024:
    1919 *     Cosmin Truta
    2020 *   See also "Contributing Authors", below.
     
    2828 * ---------------------------------------
    2929 *
    30  *  * Copyright (c) 1995-2019 The PNG Reference Library Authors.
    31  *  * Copyright (c) 2018-2019 Cosmin Truta.
     30 *  * Copyright (c) 1995-2024 The PNG Reference Library Authors.
     31 *  * Copyright (c) 2018-2024 Cosmin Truta.
    3232 *  * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
    3333 *  * Copyright (c) 1996-1997 Andreas Dilger.
     
    240240 *    1.5.30                  15    10530  15.so.15.30[.0]
    241241 *    ...
    242  *    1.6.37                  16    10637  16.so.16.37[.0]
     242 *    1.6.42                  16    10641  16.so.16.41[.0]
    243243 *
    244244 *    Henceforth the source version will match the shared-library major and
     
    279279
    280280/* Version information for png.h - this should match the version in png.c */
    281 #define PNG_LIBPNG_VER_STRING "1.6.37"
    282 #define PNG_HEADER_VERSION_STRING " libpng version 1.6.37 - April 14, 2019\n"
     281#define PNG_LIBPNG_VER_STRING "1.6.42"
     282#define PNG_HEADER_VERSION_STRING " libpng version " PNG_LIBPNG_VER_STRING "\n"
    283283
    284284#define PNG_LIBPNG_VER_SONUM   16
     
    288288#define PNG_LIBPNG_VER_MAJOR   1
    289289#define PNG_LIBPNG_VER_MINOR   6
    290 #define PNG_LIBPNG_VER_RELEASE 37
     290#define PNG_LIBPNG_VER_RELEASE 41
    291291
    292292/* This should be zero for a public release, or non-zero for a
     
    319319 * XXYYZZ, where XX=major, YY=minor, ZZ=release
    320320 */
    321 #define PNG_LIBPNG_VER 10637 /* 1.6.37 */
     321#define PNG_LIBPNG_VER 10641 /* 1.6.42 */
    322322
    323323/* Library configuration: these options cannot be changed after
     
    429429 * do not agree upon the version number.
    430430 */
    431 typedef char* png_libpng_version_1_6_37;
     431typedef char* png_libpng_version_1_6_42;
    432432
    433433/* Basic control structions.  Read libpng-manual.txt or libpng.3 for more info.
     
    850850/* Added to libpng-1.5.4 */
    851851#define PNG_TRANSFORM_EXPAND_16     0x4000      /* read only */
    852 #if INT_MAX >= 0x8000 /* else this might break */
     852#if ~0U > 0xffffU /* or else this might break on a 16-bit machine */
    853853#define PNG_TRANSFORM_SCALE_16      0x8000      /* read only */
    854854#endif
     
    909909 * PNG file.  Returns zero if the supplied bytes match the 8-byte PNG
    910910 * signature, and non-zero otherwise.  Having num_to_check == 0 or
    911  * start > 7 will always fail (ie return non-zero).
     911 * start > 7 will always fail (i.e. return non-zero).
    912912 */
    913913PNG_EXPORT(3, int, png_sig_cmp, (png_const_bytep sig, size_t start,
     
    915915
    916916/* Simple signature checking function.  This is the same as calling
    917  * png_check_sig(sig, n) := !png_sig_cmp(sig, 0, n).
    918  */
    919 #define png_check_sig(sig, n) !png_sig_cmp((sig), 0, (n))
     917 * png_check_sig(sig, n) := (png_sig_cmp(sig, 0, n) == 0).
     918 */
     919#define png_check_sig(sig, n) (png_sig_cmp((sig), 0, (n)) == 0) /* DEPRECATED */
    920920
    921921/* Allocate and initialize png_ptr struct for reading, and any other memory. */
     
    14471447 * Those users who are tight on memory or want faster performance at the
    14481448 * expense of compression can modify them.  See the compression library
    1449  * header file (zlib.h) for an explination of the compression functions.
     1449 * header file (zlib.h) for an explanation of the compression functions.
    14501450 */
    14511451
     
    15021502 * (0 - no compression, 9 - "maximal" compression).  Note that tests have
    15031503 * shown that zlib compression levels 3-6 usually perform as well as level 9
    1504  * for PNG images, and do considerably fewer caclulations.  In the future,
     1504 * for PNG images, and do considerably fewer calculations.  In the future,
    15051505 * these values may not correspond directly to the zlib compression levels.
    15061506 */
     
    17311731    png_inforp info_ptr, png_uint_32 free_me, int num));
    17321732
    1733 /* Reassign responsibility for freeing existing data, whether allocated
     1733/* Reassign the responsibility for freeing existing data, whether allocated
    17341734 * by libpng or by the application; this works on the png_info structure passed
    1735  * in, it does not change the state for other png_info structures.
    1736  *
    1737  * It is unlikely that this function works correctly as of 1.6.0 and using it
    1738  * may result either in memory leaks or double free of allocated data.
     1735 * in, without changing the state for other png_info structures.
    17391736 */
    17401737PNG_EXPORT(99, void, png_data_freer, (png_const_structrp png_ptr,
     
    32083205#  define PNG_MIPS_MSA   6 /* HARDWARE: MIPS Msa SIMD instructions supported */
    32093206#endif
    3210 #define PNG_IGNORE_ADLER32 8
     3207#ifdef PNG_DISABLE_ADLER32_CHECK_SUPPORTED
     3208#  define PNG_IGNORE_ADLER32 8 /* SOFTWARE: disable Adler32 check on IDAT */
     3209#endif
    32113210#ifdef PNG_POWERPC_VSX_API_SUPPORTED
    3212 #  define PNG_POWERPC_VSX   10 /* HARDWARE: PowerPC VSX SIMD instructions supported */
    3213 #endif
    3214 #define PNG_OPTION_NEXT  12 /* Next option - numbers must be even */
     3211#  define PNG_POWERPC_VSX   10 /* HARDWARE: PowerPC VSX SIMD instructions
     3212                                * supported */
     3213#endif
     3214#ifdef PNG_MIPS_MMI_API_SUPPORTED
     3215#  define PNG_MIPS_MMI   12 /* HARDWARE: MIPS MMI SIMD instructions supported */
     3216#endif
     3217
     3218#define PNG_OPTION_NEXT  14 /* Next option - numbers must be even */
    32153219
    32163220/* Return values: NOTE: there are four values and 'off' is *not* zero */
  • trunk/src/libs/libpng-1.6.42/pngconf.h

    r96425 r103316  
    22/* pngconf.h - machine-configurable file for libpng
    33 *
    4  * libpng version 1.6.37
    5  *
    6  * Copyright (c) 2018-2019 Cosmin Truta
     4 * libpng version 1.6.42
     5 *
     6 * Copyright (c) 2018-2024 Cosmin Truta
    77 * Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson
    88 * Copyright (c) 1996-1997 Andreas Dilger
     
    181181 * conventions of the various functions.
    182182 */
    183 #if defined(_Windows) || defined(_WINDOWS) || defined(WIN32) ||\
    184     defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
     183#if defined(_WIN32) || defined(__WIN32__) || defined(__NT__) || \
     184    defined(__CYGWIN__)
    185185  /* Windows system (DOS doesn't support DLLs).  Includes builds under Cygwin or
    186186   * MinGW on any architecture currently supported by Windows.  Also includes
  • trunk/src/libs/libpng-1.6.42/pngerror.c

    r96425 r103316  
    22/* pngerror.c - stub functions for i/o and memory allocation
    33 *
    4  * Copyright (c) 2018 Cosmin Truta
     4 * Copyright (c) 2018-2024 Cosmin Truta
    55 * Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
    66 * Copyright (c) 1996-1997 Andreas Dilger
     
    256256    png_alloc_size_t value)
    257257{
    258    char buffer[PNG_NUMBER_BUFFER_SIZE];
     258   char buffer[PNG_NUMBER_BUFFER_SIZE] = {0};
    259259   png_warning_parameter(p, number, PNG_FORMAT_NUMBER(buffer, format, value));
    260260}
     
    266266   png_alloc_size_t u;
    267267   png_charp str;
    268    char buffer[PNG_NUMBER_BUFFER_SIZE];
     268   char buffer[PNG_NUMBER_BUFFER_SIZE] = {0};
    269269
    270270   /* Avoid overflow by doing the negate in a png_alloc_size_t: */
     
    859859      return NULL;
    860860
    861    return ((png_voidp)png_ptr->error_ptr);
     861   return (png_voidp)png_ptr->error_ptr;
    862862}
    863863
     
    934934
    935935int /* PRIVATE */
    936 png_safe_execute(png_imagep image_in, int (*function)(png_voidp), png_voidp arg)
    937 {
    938    volatile png_imagep image = image_in;
    939    volatile int result;
    940    volatile png_voidp saved_error_buf;
     936png_safe_execute(png_imagep image, int (*function)(png_voidp), png_voidp arg)
     937{
     938   png_voidp saved_error_buf = image->opaque->error_buf;
    941939   jmp_buf safe_jmpbuf;
    942 
    943    /* Safely execute function(arg) with png_error returning to this function. */
    944    saved_error_buf = image->opaque->error_buf;
    945    result = setjmp(safe_jmpbuf) == 0;
    946 
    947    if (result != 0)
    948    {
    949 
     940   int result;
     941
     942   /* Safely execute function(arg), with png_error returning back here. */
     943   if (setjmp(safe_jmpbuf) == 0)
     944   {
    950945      image->opaque->error_buf = safe_jmpbuf;
    951946      result = function(arg);
    952    }
    953 
     947      image->opaque->error_buf = saved_error_buf;
     948      return result;
     949   }
     950
     951   /* On png_error, return via longjmp, pop the jmpbuf, and free the image. */
    954952   image->opaque->error_buf = saved_error_buf;
    955 
    956    /* And do the cleanup prior to any failure return. */
    957    if (result == 0)
    958       png_image_free(image);
    959 
    960    return result;
     953   png_image_free(image);
     954   return 0;
    961955}
    962956#endif /* SIMPLIFIED READ || SIMPLIFIED_WRITE */
  • trunk/src/libs/libpng-1.6.42/pngget.c

    r96425 r103316  
    22/* pngget.c - retrieval of values from info struct
    33 *
    4  * Copyright (c) 2018 Cosmin Truta
     4 * Copyright (c) 2018-2024 Cosmin Truta
    55 * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
    66 * Copyright (c) 1996-1997 Andreas Dilger
     
    2222{
    2323   if (png_ptr != NULL && info_ptr != NULL)
    24       return(info_ptr->valid & flag);
    25 
    26    return(0);
     24   {
     25#ifdef PNG_READ_tRNS_SUPPORTED
     26      /* png_handle_PLTE() may have canceled a valid tRNS chunk but left the
     27       * 'valid' flag for the detection of duplicate chunks. Do not report a
     28       * valid tRNS chunk in this case.
     29       */
     30      if (flag == PNG_INFO_tRNS && png_ptr->num_trans == 0)
     31         return 0;
     32#endif
     33
     34      return info_ptr->valid & flag;
     35   }
     36
     37   return 0;
    2738}
    2839
     
    3142{
    3243   if (png_ptr != NULL && info_ptr != NULL)
    33       return(info_ptr->rowbytes);
    34 
    35    return(0);
     44      return info_ptr->rowbytes;
     45
     46   return 0;
    3647}
    3748
     
    4152{
    4253   if (png_ptr != NULL && info_ptr != NULL)
    43       return(info_ptr->row_pointers);
    44 
    45    return(0);
     54      return info_ptr->row_pointers;
     55
     56   return 0;
    4657}
    4758#endif
     
    5566      return info_ptr->width;
    5667
    57    return (0);
     68   return 0;
    5869}
    5970
     
    6475      return info_ptr->height;
    6576
    66    return (0);
     77   return 0;
    6778}
    6879
     
    7384      return info_ptr->bit_depth;
    7485
    75    return (0);
     86   return 0;
    7687}
    7788
     
    8293      return info_ptr->color_type;
    8394
    84    return (0);
     95   return 0;
    8596}
    8697
     
    91102      return info_ptr->filter_type;
    92103
    93    return (0);
     104   return 0;
    94105}
    95106
     
    100111      return info_ptr->interlace_type;
    101112
    102    return (0);
     113   return 0;
    103114}
    104115
     
    109120      return info_ptr->compression_type;
    110121
    111    return (0);
     122   return 0;
    112123}
    113124
     
    117128{
    118129#ifdef PNG_pHYs_SUPPORTED
     130   png_debug(1, "in png_get_x_pixels_per_meter");
     131
    119132   if (png_ptr != NULL && info_ptr != NULL &&
    120133       (info_ptr->valid & PNG_INFO_pHYs) != 0)
    121       {
    122          png_debug1(1, "in %s retrieval function",
    123              "png_get_x_pixels_per_meter");
    124 
    125          if (info_ptr->phys_unit_type == PNG_RESOLUTION_METER)
    126             return (info_ptr->x_pixels_per_unit);
    127       }
     134   {
     135      if (info_ptr->phys_unit_type == PNG_RESOLUTION_METER)
     136         return info_ptr->x_pixels_per_unit;
     137   }
    128138#else
    129139   PNG_UNUSED(png_ptr)
     
    131141#endif
    132142
    133    return (0);
     143   return 0;
    134144}
    135145
     
    139149{
    140150#ifdef PNG_pHYs_SUPPORTED
     151   png_debug(1, "in png_get_y_pixels_per_meter");
     152
    141153   if (png_ptr != NULL && info_ptr != NULL &&
    142154       (info_ptr->valid & PNG_INFO_pHYs) != 0)
    143155   {
    144       png_debug1(1, "in %s retrieval function",
    145           "png_get_y_pixels_per_meter");
    146 
    147156      if (info_ptr->phys_unit_type == PNG_RESOLUTION_METER)
    148          return (info_ptr->y_pixels_per_unit);
     157         return info_ptr->y_pixels_per_unit;
    149158   }
    150159#else
     
    153162#endif
    154163
    155    return (0);
     164   return 0;
    156165}
    157166
     
    160169{
    161170#ifdef PNG_pHYs_SUPPORTED
     171   png_debug(1, "in png_get_pixels_per_meter");
     172
    162173   if (png_ptr != NULL && info_ptr != NULL &&
    163174       (info_ptr->valid & PNG_INFO_pHYs) != 0)
    164175   {
    165       png_debug1(1, "in %s retrieval function", "png_get_pixels_per_meter");
    166 
    167176      if (info_ptr->phys_unit_type == PNG_RESOLUTION_METER &&
    168177          info_ptr->x_pixels_per_unit == info_ptr->y_pixels_per_unit)
    169          return (info_ptr->x_pixels_per_unit);
     178         return info_ptr->x_pixels_per_unit;
    170179   }
    171180#else
     
    174183#endif
    175184
    176    return (0);
     185   return 0;
    177186}
    178187
     
    183192{
    184193#ifdef PNG_READ_pHYs_SUPPORTED
     194   png_debug(1, "in png_get_pixel_aspect_ratio");
     195
    185196   if (png_ptr != NULL && info_ptr != NULL &&
    186197       (info_ptr->valid & PNG_INFO_pHYs) != 0)
    187198   {
    188       png_debug1(1, "in %s retrieval function", "png_get_aspect_ratio");
    189 
    190199      if (info_ptr->x_pixels_per_unit != 0)
    191          return ((float)((float)info_ptr->y_pixels_per_unit
    192              /(float)info_ptr->x_pixels_per_unit));
     200         return (float)info_ptr->y_pixels_per_unit
     201              / (float)info_ptr->x_pixels_per_unit;
    193202   }
    194203#else
     
    197206#endif
    198207
    199    return ((float)0.0);
     208   return (float)0.0;
    200209}
    201210#endif
     
    207216{
    208217#ifdef PNG_READ_pHYs_SUPPORTED
     218   png_debug(1, "in png_get_pixel_aspect_ratio_fixed");
     219
    209220   if (png_ptr != NULL && info_ptr != NULL &&
    210221       (info_ptr->valid & PNG_INFO_pHYs) != 0 &&
     
    214225   {
    215226      png_fixed_point res;
    216 
    217       png_debug1(1, "in %s retrieval function", "png_get_aspect_ratio_fixed");
    218227
    219228      /* The following casts work because a PNG 4 byte integer only has a valid
     
    237246{
    238247#ifdef PNG_oFFs_SUPPORTED
     248   png_debug(1, "in png_get_x_offset_microns");
     249
    239250   if (png_ptr != NULL && info_ptr != NULL &&
    240251       (info_ptr->valid & PNG_INFO_oFFs) != 0)
    241252   {
    242       png_debug1(1, "in %s retrieval function", "png_get_x_offset_microns");
    243 
    244253      if (info_ptr->offset_unit_type == PNG_OFFSET_MICROMETER)
    245          return (info_ptr->x_offset);
     254         return info_ptr->x_offset;
    246255   }
    247256#else
     
    250259#endif
    251260
    252    return (0);
     261   return 0;
    253262}
    254263
     
    257266{
    258267#ifdef PNG_oFFs_SUPPORTED
     268   png_debug(1, "in png_get_y_offset_microns");
     269
    259270   if (png_ptr != NULL && info_ptr != NULL &&
    260271       (info_ptr->valid & PNG_INFO_oFFs) != 0)
    261272   {
    262       png_debug1(1, "in %s retrieval function", "png_get_y_offset_microns");
    263 
    264273      if (info_ptr->offset_unit_type == PNG_OFFSET_MICROMETER)
    265          return (info_ptr->y_offset);
     274         return info_ptr->y_offset;
    266275   }
    267276#else
     
    270279#endif
    271280
    272    return (0);
     281   return 0;
    273282}
    274283
     
    277286{
    278287#ifdef PNG_oFFs_SUPPORTED
     288   png_debug(1, "in png_get_x_offset_pixels");
     289
    279290   if (png_ptr != NULL && info_ptr != NULL &&
    280291       (info_ptr->valid & PNG_INFO_oFFs) != 0)
    281292   {
    282       png_debug1(1, "in %s retrieval function", "png_get_x_offset_pixels");
    283 
    284293      if (info_ptr->offset_unit_type == PNG_OFFSET_PIXEL)
    285          return (info_ptr->x_offset);
     294         return info_ptr->x_offset;
    286295   }
    287296#else
     
    290299#endif
    291300
    292    return (0);
     301   return 0;
    293302}
    294303
     
    297306{
    298307#ifdef PNG_oFFs_SUPPORTED
     308   png_debug(1, "in png_get_y_offset_pixels");
     309
    299310   if (png_ptr != NULL && info_ptr != NULL &&
    300311       (info_ptr->valid & PNG_INFO_oFFs) != 0)
    301312   {
    302       png_debug1(1, "in %s retrieval function", "png_get_y_offset_pixels");
    303 
    304313      if (info_ptr->offset_unit_type == PNG_OFFSET_PIXEL)
    305          return (info_ptr->y_offset);
     314         return info_ptr->y_offset;
    306315   }
    307316#else
     
    310319#endif
    311320
    312    return (0);
     321   return 0;
    313322}
    314323
     
    424433   png_uint_32 retval = 0;
    425434
     435   png_debug1(1, "in %s retrieval function", "pHYs");
     436
    426437   if (png_ptr != NULL && info_ptr != NULL &&
    427438       (info_ptr->valid & PNG_INFO_pHYs) != 0)
    428439   {
    429       png_debug1(1, "in %s retrieval function", "pHYs");
    430 
    431440      if (res_x != NULL)
    432441      {
     
    454463   }
    455464
    456    return (retval);
     465   return retval;
    457466}
    458467#endif /* pHYs */
     
    468477{
    469478   if (png_ptr != NULL && info_ptr != NULL)
    470       return(info_ptr->channels);
    471 
    472    return (0);
     479      return info_ptr->channels;
     480
     481   return 0;
    473482}
    474483
     
    478487{
    479488   if (png_ptr != NULL && info_ptr != NULL)
    480       return(info_ptr->signature);
    481 
    482    return (NULL);
     489      return info_ptr->signature;
     490
     491   return NULL;
    483492}
    484493#endif
     
    489498    png_color_16p *background)
    490499{
     500   png_debug1(1, "in %s retrieval function", "bKGD");
     501
    491502   if (png_ptr != NULL && info_ptr != NULL &&
    492503       (info_ptr->valid & PNG_INFO_bKGD) != 0 &&
    493504       background != NULL)
    494505   {
    495       png_debug1(1, "in %s retrieval function", "bKGD");
    496 
    497506      *background = &(info_ptr->background);
    498       return (PNG_INFO_bKGD);
    499    }
    500 
    501    return (0);
     507      return PNG_INFO_bKGD;
     508   }
     509
     510   return 0;
    502511}
    503512#endif
     
    514523    double *green_x, double *green_y, double *blue_x, double *blue_y)
    515524{
     525   png_debug1(1, "in %s retrieval function", "cHRM");
     526
    516527   /* Quiet API change: this code used to only return the end points if a cHRM
    517528    * chunk was present, but the end points can also come from iCCP or sRGB
     
    523534      (info_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_ENDPOINTS) != 0)
    524535   {
    525       png_debug1(1, "in %s retrieval function", "cHRM");
    526 
    527536      if (white_x != NULL)
    528537         *white_x = png_float(png_ptr,
     
    549558         *blue_y = png_float(png_ptr, info_ptr->colorspace.end_points_xy.bluey,
    550559             "cHRM blue Y");
    551       return (PNG_INFO_cHRM);
    552    }
    553 
    554    return (0);
     560      return PNG_INFO_cHRM;
     561   }
     562
     563   return 0;
    555564}
    556565
     
    561570    double *blue_Z)
    562571{
     572   png_debug1(1, "in %s retrieval function", "cHRM_XYZ(float)");
     573
    563574   if (png_ptr != NULL && info_ptr != NULL &&
    564575       (info_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_ENDPOINTS) != 0)
    565576   {
    566       png_debug1(1, "in %s retrieval function", "cHRM_XYZ(float)");
    567 
    568577      if (red_X != NULL)
    569578         *red_X = png_float(png_ptr, info_ptr->colorspace.end_points_XYZ.red_X,
     
    593602         *blue_Z = png_float(png_ptr,
    594603             info_ptr->colorspace.end_points_XYZ.blue_Z, "cHRM blue Z");
    595       return (PNG_INFO_cHRM);
    596    }
    597 
    598    return (0);
     604      return PNG_INFO_cHRM;
     605   }
     606
     607   return 0;
    599608}
    600609#  endif
     
    609618    png_fixed_point *int_blue_Z)
    610619{
     620   png_debug1(1, "in %s retrieval function", "cHRM_XYZ");
     621
    611622   if (png_ptr != NULL && info_ptr != NULL &&
    612623      (info_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_ENDPOINTS) != 0)
    613624   {
    614       png_debug1(1, "in %s retrieval function", "cHRM_XYZ");
    615 
    616625      if (int_red_X != NULL)
    617626         *int_red_X = info_ptr->colorspace.end_points_XYZ.red_X;
     
    632641      if (int_blue_Z != NULL)
    633642         *int_blue_Z = info_ptr->colorspace.end_points_XYZ.blue_Z;
    634       return (PNG_INFO_cHRM);
    635    }
    636 
    637    return (0);
     643      return PNG_INFO_cHRM;
     644   }
     645
     646   return 0;
    638647}
    639648
     
    665674      if (blue_y != NULL)
    666675         *blue_y = info_ptr->colorspace.end_points_xy.bluey;
    667       return (PNG_INFO_cHRM);
    668    }
    669 
    670    return (0);
     676      return PNG_INFO_cHRM;
     677   }
     678
     679   return 0;
    671680}
    672681#  endif
     
    686695   {
    687696      *file_gamma = info_ptr->colorspace.gamma;
    688       return (PNG_INFO_gAMA);
    689    }
    690 
    691    return (0);
     697      return PNG_INFO_gAMA;
     698   }
     699
     700   return 0;
    692701}
    693702#  endif
     
    706715      *file_gamma = png_float(png_ptr, info_ptr->colorspace.gamma,
    707716          "png_get_gAMA");
    708       return (PNG_INFO_gAMA);
    709    }
    710 
    711    return (0);
     717      return PNG_INFO_gAMA;
     718   }
     719
     720   return 0;
    712721}
    713722#  endif
     
    725734   {
    726735      *file_srgb_intent = info_ptr->colorspace.rendering_intent;
    727       return (PNG_INFO_sRGB);
    728    }
    729 
    730    return (0);
     736      return PNG_INFO_sRGB;
     737   }
     738
     739   return 0;
    731740}
    732741#endif
     
    752761      if (compression_type != NULL)
    753762         *compression_type = PNG_COMPRESSION_TYPE_BASE;
    754       return (PNG_INFO_iCCP);
    755    }
    756 
    757    return (0);
     763      return PNG_INFO_iCCP;
     764   }
     765
     766   return 0;
    758767
    759768}
     
    765774    png_sPLT_tpp spalettes)
    766775{
     776   png_debug1(1, "in %s retrieval function", "sPLT");
     777
    767778   if (png_ptr != NULL && info_ptr != NULL && spalettes != NULL)
    768779   {
     
    771782   }
    772783
    773    return (0);
     784   return 0;
    774785}
    775786#endif
     
    797808      *num_exif = info_ptr->num_exif;
    798809      *exif = info_ptr->exif;
    799       return (PNG_INFO_eXIf);
    800    }
    801 
    802    return (0);
     810      return PNG_INFO_eXIf;
     811   }
     812
     813   return 0;
    803814}
    804815#endif
     
    815826   {
    816827      *hist = info_ptr->hist;
    817       return (PNG_INFO_hIST);
    818    }
    819 
    820    return (0);
     828      return PNG_INFO_hIST;
     829   }
     830
     831   return 0;
    821832}
    822833#endif
     
    831842
    832843   if (png_ptr == NULL || info_ptr == NULL)
    833       return (0);
     844      return 0;
    834845
    835846   if (width != NULL)
     
    863874       info_ptr->compression_type, info_ptr->filter_type);
    864875
    865    return (1);
     876   return 1;
    866877}
    867878
     
    880891      *offset_y = info_ptr->y_offset;
    881892      *unit_type = (int)info_ptr->offset_unit_type;
    882       return (PNG_INFO_oFFs);
    883    }
    884 
    885    return (0);
     893      return PNG_INFO_oFFs;
     894   }
     895
     896   return 0;
    886897}
    887898#endif
     
    907918      *units = info_ptr->pcal_units;
    908919      *params = info_ptr->pcal_params;
    909       return (PNG_INFO_pCAL);
    910    }
    911 
    912    return (0);
     920      return PNG_INFO_pCAL;
     921   }
     922
     923   return 0;
    913924}
    914925#endif
     
    922933    int *unit, png_fixed_point *width, png_fixed_point *height)
    923934{
     935   png_debug1(1, "in %s retrieval function", "sCAL");
     936
    924937   if (png_ptr != NULL && info_ptr != NULL &&
    925938       (info_ptr->valid & PNG_INFO_sCAL) != 0)
     
    933946      *height = png_fixed(png_ptr, atof(info_ptr->scal_s_height),
    934947          "sCAL height");
    935       return (PNG_INFO_sCAL);
    936    }
    937 
    938    return(0);
     948      return PNG_INFO_sCAL;
     949   }
     950
     951   return 0;
    939952}
    940953#    endif /* FLOATING_ARITHMETIC */
     
    945958    int *unit, double *width, double *height)
    946959{
     960   png_debug1(1, "in %s retrieval function", "sCAL(float)");
     961
    947962   if (png_ptr != NULL && info_ptr != NULL &&
    948963       (info_ptr->valid & PNG_INFO_sCAL) != 0)
     
    951966      *width = atof(info_ptr->scal_s_width);
    952967      *height = atof(info_ptr->scal_s_height);
    953       return (PNG_INFO_sCAL);
    954    }
    955 
    956    return(0);
     968      return PNG_INFO_sCAL;
     969   }
     970
     971   return 0;
    957972}
    958973#  endif /* FLOATING POINT */
     
    961976    int *unit, png_charpp width, png_charpp height)
    962977{
     978   png_debug1(1, "in %s retrieval function", "sCAL(str)");
     979
    963980   if (png_ptr != NULL && info_ptr != NULL &&
    964981       (info_ptr->valid & PNG_INFO_sCAL) != 0)
     
    967984      *width = info_ptr->scal_s_width;
    968985      *height = info_ptr->scal_s_height;
    969       return (PNG_INFO_sCAL);
    970    }
    971 
    972    return(0);
     986      return PNG_INFO_sCAL;
     987   }
     988
     989   return 0;
    973990}
    974991#endif /* sCAL */
     
    10051022   }
    10061023
    1007    return (retval);
     1024   return retval;
    10081025}
    10091026#endif /* pHYs */
     
    10211038      *num_palette = info_ptr->num_palette;
    10221039      png_debug1(3, "num_palette = %d", *num_palette);
    1023       return (PNG_INFO_PLTE);
    1024    }
    1025 
    1026    return (0);
     1040      return PNG_INFO_PLTE;
     1041   }
     1042
     1043   return 0;
    10271044}
    10281045
     
    10381055   {
    10391056      *sig_bit = &(info_ptr->sig_bit);
    1040       return (PNG_INFO_sBIT);
    1041    }
    1042 
    1043    return (0);
     1057      return PNG_INFO_sBIT;
     1058   }
     1059
     1060   return 0;
    10441061}
    10451062#endif
     
    10521069   if (png_ptr != NULL && info_ptr != NULL && info_ptr->num_text > 0)
    10531070   {
    1054       png_debug1(1, "in 0x%lx retrieval function",
     1071      png_debug1(1, "in text retrieval function, chunk typeid = 0x%lx",
    10551072         (unsigned long)png_ptr->chunk_name);
    10561073
     
    10671084      *num_text = 0;
    10681085
    1069    return(0);
     1086   return 0;
    10701087}
    10711088#endif
     
    10821099   {
    10831100      *mod_time = &(info_ptr->mod_time);
    1084       return (PNG_INFO_tIME);
    1085    }
    1086 
    1087    return (0);
     1101      return PNG_INFO_tIME;
     1102   }
     1103
     1104   return 0;
    10881105}
    10891106#endif
     
    10951112{
    10961113   png_uint_32 retval = 0;
     1114
     1115   png_debug1(1, "in %s retrieval function", "tRNS");
     1116
    10971117   if (png_ptr != NULL && info_ptr != NULL &&
    10981118       (info_ptr->valid & PNG_INFO_tRNS) != 0)
    10991119   {
    1100       png_debug1(1, "in %s retrieval function", "tRNS");
    1101 
    11021120      if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
    11031121      {
     
    11311149   }
    11321150
    1133    return (retval);
     1151   return retval;
    11341152}
    11351153#endif
     
    11461164   }
    11471165
    1148    return (0);
     1166   return 0;
    11491167}
    11501168#endif
     
    11521170#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
    11531171png_byte PNGAPI
    1154 png_get_rgb_to_gray_status (png_const_structrp png_ptr)
     1172png_get_rgb_to_gray_status(png_const_structrp png_ptr)
    11551173{
    11561174   return (png_byte)(png_ptr ? png_ptr->rgb_to_gray_status : 0);
     
    11931211 * by default in libpng-1.4.0 */
    11941212png_uint_32 PNGAPI
    1195 png_get_user_width_max (png_const_structrp png_ptr)
     1213png_get_user_width_max(png_const_structrp png_ptr)
    11961214{
    11971215   return (png_ptr ? png_ptr->user_width_max : 0);
     
    11991217
    12001218png_uint_32 PNGAPI
    1201 png_get_user_height_max (png_const_structrp png_ptr)
     1219png_get_user_height_max(png_const_structrp png_ptr)
    12021220{
    12031221   return (png_ptr ? png_ptr->user_height_max : 0);
     
    12061224/* This function was added to libpng 1.4.0 */
    12071225png_uint_32 PNGAPI
    1208 png_get_chunk_cache_max (png_const_structrp png_ptr)
     1226png_get_chunk_cache_max(png_const_structrp png_ptr)
    12091227{
    12101228   return (png_ptr ? png_ptr->user_chunk_cache_max : 0);
     
    12131231/* This function was added to libpng 1.4.1 */
    12141232png_alloc_size_t PNGAPI
    1215 png_get_chunk_malloc_max (png_const_structrp png_ptr)
     1233png_get_chunk_malloc_max(png_const_structrp png_ptr)
    12161234{
    12171235   return (png_ptr ? png_ptr->user_chunk_malloc_max : 0);
     
    12221240#ifdef PNG_IO_STATE_SUPPORTED
    12231241png_uint_32 PNGAPI
    1224 png_get_io_state (png_const_structrp png_ptr)
     1242png_get_io_state(png_const_structrp png_ptr)
    12251243{
    12261244   return png_ptr->io_state;
     
    12281246
    12291247png_uint_32 PNGAPI
    1230 png_get_io_chunk_type (png_const_structrp png_ptr)
     1248png_get_io_chunk_type(png_const_structrp png_ptr)
    12311249{
    12321250   return png_ptr->chunk_name;
     
    12421260      return png_ptr->num_palette_max;
    12431261
    1244    return (-1);
     1262   return -1;
    12451263}
    12461264#  endif
  • trunk/src/libs/libpng-1.6.42/pngpread.c

    r96425 r103316  
    22/* pngpread.c - read a png file in push mode
    33 *
    4  * Copyright (c) 2018 Cosmin Truta
     4 * Copyright (c) 2018-2024 Cosmin Truta
    55 * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
    66 * Copyright (c) 1996-1997 Andreas Dilger
     
    146146   png_ptr->sig_bytes = (png_byte)(png_ptr->sig_bytes + num_to_check);
    147147
    148    if (png_sig_cmp(info_ptr->signature, num_checked, num_to_check))
     148   if (png_sig_cmp(info_ptr->signature, num_checked, num_to_check) != 0)
    149149   {
    150150      if (num_checked < 4 &&
    151           png_sig_cmp(info_ptr->signature, num_checked, num_to_check - 4))
     151          png_sig_cmp(info_ptr->signature, num_checked, num_to_check - 4) != 0)
    152152         png_error(png_ptr, "Not a PNG file");
    153153
     
    10901090{
    10911091   if (png_ptr == NULL)
    1092       return (NULL);
     1092      return NULL;
    10931093
    10941094   return png_ptr->io_ptr;
  • trunk/src/libs/libpng-1.6.42/pngpriv.h

    r96425 r103316  
    22/* pngpriv.h - private declarations for use inside libpng
    33 *
    4  * Copyright (c) 2018-2019 Cosmin Truta
     4 * Copyright (c) 2018-2024 Cosmin Truta
    55 * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
    66 * Copyright (c) 1996-1997 Andreas Dilger
     
    3737 */
    3838#ifndef _POSIX_SOURCE
    39 # define _POSIX_SOURCE 1 /* Just the POSIX 1003.1 and C89 APIs */
     39#  define _POSIX_SOURCE 1 /* Just the POSIX 1003.1 and C89 APIs */
    4040#endif
    4141
     
    175175         /* The 'intrinsics' code simply won't compile without this -mfpu=neon:
    176176          */
    177 #        if !defined(__aarch64__)
     177#        if !defined(__aarch64__) && !defined(_M_ARM64)
    178178            /* The assembler code currently does not work on ARM64 */
    179179#          define PNG_ARM_NEON_IMPLEMENTATION 2
     
    186186#     define PNG_ARM_NEON_IMPLEMENTATION 1
    187187#  endif
     188#else /* PNG_ARM_NEON_OPT == 0 */
     189#     define PNG_ARM_NEON_IMPLEMENTATION 0
    188190#endif /* PNG_ARM_NEON_OPT > 0 */
    189191
    190192#ifndef PNG_MIPS_MSA_OPT
    191 #  if defined(__mips_msa) && (__mips_isa_rev >= 5) && defined(PNG_ALIGNED_MEMORY_SUPPORTED)
     193#  if defined(__mips_msa) && (__mips_isa_rev >= 5) && \
     194   defined(PNG_ALIGNED_MEMORY_SUPPORTED)
    192195#     define PNG_MIPS_MSA_OPT 2
    193196#  else
    194197#     define PNG_MIPS_MSA_OPT 0
     198#  endif
     199#endif
     200
     201#ifndef PNG_MIPS_MMI_OPT
     202#  ifdef PNG_MIPS_MMI
     203#    if defined(__mips_loongson_mmi) && (_MIPS_SIM == _ABI64) && \
     204     defined(PNG_ALIGNED_MEMORY_SUPPORTED)
     205#       define PNG_MIPS_MMI_OPT 1
     206#    else
     207#       define PNG_MIPS_MMI_OPT 0
     208#    endif
     209#  else
     210#    define PNG_MIPS_MMI_OPT 0
    195211#  endif
    196212#endif
     
    204220#endif
    205221
     222#ifndef PNG_LOONGARCH_LSX_OPT
     223#  if defined(__loongarch_sx)
     224#     define PNG_LOONGARCH_LSX_OPT 1
     225#  else
     226#     define PNG_LOONGARCH_LSX_OPT 0
     227#  endif
     228#endif
     229
    206230#ifndef PNG_INTEL_SSE_OPT
    207231#   ifdef PNG_INTEL_SSE
     
    210234       * be off by default.  See contrib/intel for more details.
    211235       */
    212 #     if defined(__SSE4_1__) || defined(__AVX__) || defined(__SSSE3__) || \
     236#      if defined(__SSE4_1__) || defined(__AVX__) || defined(__SSSE3__) || \
    213237       defined(__SSE2__) || defined(_M_X64) || defined(_M_AMD64) || \
    214238       (defined(_M_IX86_FP) && _M_IX86_FP >= 2)
     
    247271
    248272#if PNG_MIPS_MSA_OPT > 0
    249 #  define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_msa
    250273#  ifndef PNG_MIPS_MSA_IMPLEMENTATION
    251274#     if defined(__mips_msa)
     
    263286#  ifndef PNG_MIPS_MSA_IMPLEMENTATION
    264287#     define PNG_MIPS_MSA_IMPLEMENTATION 1
     288#     define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_mips
    265289#  endif
     290#else
     291#  define PNG_MIPS_MSA_IMPLEMENTATION 0
    266292#endif /* PNG_MIPS_MSA_OPT > 0 */
     293
     294#if PNG_MIPS_MMI_OPT > 0
     295#  ifndef PNG_MIPS_MMI_IMPLEMENTATION
     296#     if defined(__mips_loongson_mmi) && (_MIPS_SIM == _ABI64)
     297#        define PNG_MIPS_MMI_IMPLEMENTATION 2
     298#     else /* !defined __mips_loongson_mmi  || _MIPS_SIM != _ABI64 */
     299#        define PNG_MIPS_MMI_IMPLEMENTATION 0
     300#     endif /* __mips_loongson_mmi  && _MIPS_SIM == _ABI64 */
     301#  endif /* !PNG_MIPS_MMI_IMPLEMENTATION */
     302
     303#   if PNG_MIPS_MMI_IMPLEMENTATION > 0
     304#      define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_mips
     305#   endif
     306#else
     307#   define PNG_MIPS_MMI_IMPLEMENTATION 0
     308#endif /* PNG_MIPS_MMI_OPT > 0 */
    267309
    268310#if PNG_POWERPC_VSX_OPT > 0
    269311#  define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_vsx
    270312#  define PNG_POWERPC_VSX_IMPLEMENTATION 1
    271 #endif
    272 
     313#else
     314#  define PNG_POWERPC_VSX_IMPLEMENTATION 0
     315#endif
     316
     317#if PNG_LOONGARCH_LSX_OPT > 0
     318#   define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_lsx
     319#   define PNG_LOONGARCH_LSX_IMPLEMENTATION 1
     320#else
     321#   define PNG_LOONGARCH_LSX_IMPLEMENTATION 0
     322#endif
    273323
    274324/* Is this a build of a DLL where compilation of the object modules requires
     
    493543#else
    494544#  define png_voidcast(type, value) (value)
    495 #  ifdef _WIN64
    496 #     ifdef __GNUC__
    497          typedef unsigned long long png_ptruint;
    498 #     else
    499          typedef unsigned __int64 png_ptruint;
    500 #     endif
    501 #  else
    502       typedef unsigned long png_ptruint;
    503 #  endif
    504 #  define png_constcast(type, value) ((type)(png_ptruint)(const void*)(value))
     545#  define png_constcast(type, value) ((type)(void*)(const void*)(value))
    505546#  define png_aligncast(type, value) ((void*)(value))
    506547#  define png_aligncastconst(type, value) ((const void*)(value))
     
    518559#  include <float.h>
    519560
    520 #  if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \
    521     defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC)
    522    /* We need to check that <math.h> hasn't already been included earlier
    523     * as it seems it doesn't agree with <fp.h>, yet we should really use
    524     * <fp.h> if possible.
    525     */
    526 #    if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__)
    527 #      include <fp.h>
    528 #    endif
    529 #  else
    530 #    include <math.h>
    531 #  endif
     561#  include <math.h>
     562
    532563#  if defined(_AMIGA) && defined(__SASC) && defined(_M68881)
    533564   /* Amiga SAS/C: We must include builtin FPU functions when compiling using
     
    559590 */
    560591
    561 /* Memory model/platform independent fns */
     592/* Platform-independent functions */
    562593#ifndef PNG_ABORT
    563 #  ifdef _WINDOWS_
    564 #    define PNG_ABORT() ExitProcess(0)
    565 #  else
    566 #    define PNG_ABORT() abort()
    567 #  endif
     594#  define PNG_ABORT() abort()
    568595#endif
    569596
    570597/* These macros may need to be architecture dependent. */
    571 #define PNG_ALIGN_NONE   0 /* do not use data alignment */
    572 #define PNG_ALIGN_ALWAYS 1 /* assume unaligned accesses are OK */
     598#define PNG_ALIGN_NONE      0 /* do not use data alignment */
     599#define PNG_ALIGN_ALWAYS    1 /* assume unaligned accesses are OK */
    573600#ifdef offsetof
    574 #  define PNG_ALIGN_OFFSET 2 /* use offsetof to determine alignment */
     601#  define PNG_ALIGN_OFFSET  2 /* use offsetof to determine alignment */
    575602#else
    576603#  define PNG_ALIGN_OFFSET -1 /* prevent the use of this */
    577604#endif
    578 #define PNG_ALIGN_SIZE   3 /* use sizeof to determine alignment */
     605#define PNG_ALIGN_SIZE      3 /* use sizeof to determine alignment */
    579606
    580607#ifndef PNG_ALIGN_TYPE
     
    590617    * structure members are supported, so the offsetof approach below fails.
    591618    * Set PNG_ALIGN_SIZE=0 for compiler combinations where unaligned access
    592     * is good for performance.  Do not do this unless you have tested the result
    593     * and understand it.
    594     */
    595 #  define png_alignof(type) (sizeof (type))
     619    * is good for performance.  Do not do this unless you have tested the
     620    * result and understand it.
     621    */
     622#  define png_alignof(type) (sizeof(type))
    596623#else
    597624#  if PNG_ALIGN_TYPE == PNG_ALIGN_OFFSET
    598 #     define png_alignof(type) offsetof(struct{char c; type t;}, t)
     625#    define png_alignof(type) offsetof(struct{char c; type t;}, t)
    599626#  else
    600 #     if PNG_ALIGN_TYPE == PNG_ALIGN_ALWAYS
    601 #        define png_alignof(type) (1)
    602 #     endif
    603       /* Else leave png_alignof undefined to prevent use thereof */
     627#    if PNG_ALIGN_TYPE == PNG_ALIGN_ALWAYS
     628#      define png_alignof(type) 1
     629#    endif
     630     /* Else leave png_alignof undefined to prevent use thereof */
    604631#  endif
    605632#endif
    606633
    607 /* This implicitly assumes alignment is always to a power of 2. */
     634/* This implicitly assumes alignment is always a multiple of 2. */
    608635#ifdef png_alignof
    609 #  define png_isaligned(ptr, type)\
    610    (((type)((const char*)ptr-(const char*)0) & \
    611    (type)(png_alignof(type)-1)) == 0)
     636#  define png_isaligned(ptr, type) \
     637   (((type)(size_t)((const void*)(ptr)) & (type)(png_alignof(type)-1)) == 0)
    612638#else
    613639#  define png_isaligned(ptr, type) 0
     
    640666#define PNG_HAVE_PNG_SIGNATURE    0x1000U
    641667#define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000U /* Have another chunk after IDAT */
    642                    /*             0x4000U (unused) */
     668#define PNG_WROTE_eXIf            0x4000U
    643669#define PNG_IS_READ_STRUCT        0x8000U /* Else is a write struct */
    644670
     
    13201346#endif
    13211347
    1322 #if PNG_MIPS_MSA_OPT > 0
     1348#if PNG_MIPS_MSA_IMPLEMENTATION == 1
    13231349PNG_INTERNAL_FUNCTION(void,png_read_filter_row_up_msa,(png_row_infop row_info,
    13241350    png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
     
    13341360    row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
    13351361PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_msa,(png_row_infop
     1362    row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
     1363#endif
     1364
     1365#if PNG_MIPS_MMI_IMPLEMENTATION > 0
     1366PNG_INTERNAL_FUNCTION(void,png_read_filter_row_up_mmi,(png_row_infop row_info,
     1367    png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
     1368PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub3_mmi,(png_row_infop
     1369    row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
     1370PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub4_mmi,(png_row_infop
     1371    row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
     1372PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg3_mmi,(png_row_infop
     1373    row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
     1374PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg4_mmi,(png_row_infop
     1375    row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
     1376PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth3_mmi,(png_row_infop
     1377    row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
     1378PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_mmi,(png_row_infop
    13361379    row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
    13371380#endif
     
    13661409    row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
    13671410PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_sse2,(png_row_infop
     1411    row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
     1412#endif
     1413
     1414#if PNG_LOONGARCH_LSX_IMPLEMENTATION == 1
     1415PNG_INTERNAL_FUNCTION(void,png_read_filter_row_up_lsx,(png_row_infop
     1416    row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
     1417PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub3_lsx,(png_row_infop
     1418    row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
     1419PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub4_lsx,(png_row_infop
     1420    row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
     1421PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg3_lsx,(png_row_infop
     1422    row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
     1423PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg4_lsx,(png_row_infop
     1424    row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
     1425PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth3_lsx,(png_row_infop
     1426    row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
     1427PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_lsx,(png_row_infop
    13681428    row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
    13691429#endif
     
    19241984#define PNG_FP_INVALID  512  /* Available for callers as a distinct value */
    19251985
    1926 /* Result codes for the parser (boolean - true meants ok, false means
     1986/* Result codes for the parser (boolean - true means ok, false means
    19271987 * not ok yet.)
    19281988 */
     
    19602020 */
    19612021PNG_INTERNAL_FUNCTION(int,png_check_fp_number,(png_const_charp string,
    1962    size_t size, int *statep, png_size_tp whereami),PNG_EMPTY);
     2022   size_t size, int *statep, size_t *whereami),PNG_EMPTY);
    19632023
    19642024/* This is the same but it checks a complete string and returns true
     
    21082168#endif
    21092169
    2110 #if PNG_MIPS_MSA_OPT > 0
    2111 PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_msa,
     2170#if PNG_MIPS_MSA_IMPLEMENTATION == 1
     2171PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_mips,
    21122172   (png_structp png_ptr, unsigned int bpp), PNG_EMPTY);
    21132173#endif
     2174
     2175#  if PNG_MIPS_MMI_IMPLEMENTATION > 0
     2176PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_mips,
     2177   (png_structp png_ptr, unsigned int bpp), PNG_EMPTY);
     2178#  endif
    21142179
    21152180#  if PNG_INTEL_SSE_IMPLEMENTATION > 0
     
    21172182   (png_structp png_ptr, unsigned int bpp), PNG_EMPTY);
    21182183#  endif
     2184#endif
     2185
     2186#if PNG_LOONGARCH_LSX_OPT > 0
     2187PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_lsx,
     2188    (png_structp png_ptr, unsigned int bpp), PNG_EMPTY);
    21192189#endif
    21202190
  • trunk/src/libs/libpng-1.6.42/pngread.c

    r96425 r103316  
    22/* pngread.c - read a PNG file
    33 *
    4  * Copyright (c) 2018-2019 Cosmin Truta
     4 * Copyright (c) 2018-2024 Cosmin Truta
    55 * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
    66 * Copyright (c) 1996-1997 Andreas Dilger
     
    569569
    570570#ifdef PNG_READ_TRANSFORMS_SUPPORTED
    571    if (png_ptr->transformations)
     571   if (png_ptr->transformations || png_ptr->num_palette_max >= 0)
    572572      png_do_read_transformations(png_ptr, &row_info);
    573573#endif
     
    786786   /* Report invalid palette index; added at libng-1.5.10 */
    787787   if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE &&
    788        png_ptr->num_palette_max > png_ptr->num_palette)
     788       png_ptr->num_palette_max >= png_ptr->num_palette)
    789789      png_benign_error(png_ptr, "Read palette index exceeding num_palette");
    790790#endif
     
    10501050    int transforms, voidp params)
    10511051{
     1052   png_debug(1, "in png_read_png");
     1053
    10521054   if (png_ptr == NULL || info_ptr == NULL)
    10531055      return;
     
    34533455            for (pass = 0; pass < passes; ++pass)
    34543456            {
    3455                png_bytep row = png_voidcast(png_bytep, display->first_row);
    34563457               unsigned int     startx, stepx, stepy;
    34573458               png_uint_32      y;
     
    35583559                        inrow += 2; /* gray and alpha channel */
    35593560                     }
    3560 
    3561                      row += display->row_bytes;
    35623561                  }
    35633562               }
     
    37663765         output_gamma = PNG_DEFAULT_sRGB;
    37673766      }
    3768      
     3767
    37693768      if ((change & PNG_FORMAT_FLAG_ASSOCIATED_ALPHA) != 0)
    37703769      {
     
    37723771         change &= ~PNG_FORMAT_FLAG_ASSOCIATED_ALPHA;
    37733772      }
    3774      
     3773
    37753774      /* If 'do_local_background' is set check for the presence of gamma
    37763775       * correction; this is part of the work-round for the libpng bug
  • trunk/src/libs/libpng-1.6.42/pngrtran.c

    r96425 r103316  
    22/* pngrtran.c - transforms the data in a row for PNG readers
    33 *
    4  * Copyright (c) 2018-2019 Cosmin Truta
     4 * Copyright (c) 2018-2024 Cosmin Truta
    55 * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
    66 * Copyright (c) 1996-1997 Andreas Dilger
     
    2222#  if PNG_ARM_NEON_IMPLEMENTATION == 1
    2323#    define PNG_ARM_NEON_INTRINSICS_AVAILABLE
    24 #    if defined(_MSC_VER) && defined(_M_ARM64)
     24#    if defined(_MSC_VER) && !defined(__clang__) && defined(_M_ARM64)
    2525#      include <arm64_neon.h>
    2626#    else
     
    291291   png_fixed_point file_gamma;
    292292
    293    png_debug(1, "in png_set_alpha_mode");
     293   png_debug(1, "in png_set_alpha_mode_fixed");
    294294
    295295   if (png_rtran_ok(png_ptr, 0) == 0)
     
    971971    png_fixed_point red, png_fixed_point green)
    972972{
    973    png_debug(1, "in png_set_rgb_to_gray");
     973   png_debug(1, "in png_set_rgb_to_gray_fixed");
    974974
    975975   /* Need the IHDR here because of the check on color_type below. */
  • trunk/src/libs/libpng-1.6.42/pngrutil.c

    r96425 r103316  
    22/* pngrutil.c - utilities to read a PNG file
    33 *
    4  * Copyright (c) 2018 Cosmin Truta
     4 * Copyright (c) 2018-2024 Cosmin Truta
    55 * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
    66 * Copyright (c) 1996-1997 Andreas Dilger
     
    2727      png_error(png_ptr, "PNG unsigned integer out of range");
    2828
    29    return (uval);
     29   return uval;
    3030}
    3131
     
    141141   {
    142142      if (num_checked < 4 &&
    143           png_sig_cmp(info_ptr->signature, num_checked, num_to_check - 4))
     143          png_sig_cmp(info_ptr->signature, num_checked, num_to_check - 4) != 0)
    144144         png_error(png_ptr, "Not a PNG file");
    145145      else
     
    172172   png_ptr->chunk_name = PNG_CHUNK_FROM_STRING(buf+4);
    173173
    174    png_debug2(0, "Reading %lx chunk, length = %lu",
     174   png_debug2(0, "Reading chunk typeid = 0x%lx, length = %lu",
    175175       (unsigned long)png_ptr->chunk_name, (unsigned long)length);
    176176
     
    239239         png_chunk_error(png_ptr, "CRC error");
    240240
    241       return (1);
    242    }
    243 
    244    return (0);
     241      return 1;
     242   }
     243
     244   return 0;
    245245}
    246246
     
    278278   {
    279279      crc = png_get_uint_32(crc_bytes);
    280       return ((int)(crc != png_ptr->crc));
     280      return crc != png_ptr->crc;
    281281   }
    282282
    283283   else
    284       return (0);
     284      return 0;
    285285}
    286286
     
    302302   if (buffer != NULL && new_size > png_ptr->read_buffer_size)
    303303   {
    304       png_ptr->read_buffer = NULL;
    305304      png_ptr->read_buffer = NULL;
    306305      png_ptr->read_buffer_size = 0;
     
    423422      }
    424423
    425 #if ZLIB_VERNUM >= 0x1290 && \
    426    defined(PNG_SET_OPTION_SUPPORTED) && defined(PNG_IGNORE_ADLER32)
     424#ifdef PNG_DISABLE_ADLER32_CHECK_SUPPORTED
    427425      if (((png_ptr->options >> PNG_IGNORE_ADLER32) & 3) == PNG_OPTION_ON)
    428426         /* Turn off validation of the ADLER32 checksum in IDAT chunks */
     
    20772075      png_crc_read(png_ptr, buf, 1);
    20782076      info_ptr->eXIf_buf[i] = buf[0];
    2079       if (i == 1 && buf[0] != 'M' && buf[0] != 'I'
    2080                  && info_ptr->eXIf_buf[0] != buf[0])
    2081       {
    2082          png_crc_finish(png_ptr, length);
    2083          png_chunk_benign_error(png_ptr, "incorrect byte-order specifier");
    2084          png_free(png_ptr, info_ptr->eXIf_buf);
    2085          info_ptr->eXIf_buf = NULL;
    2086          return;
    2087       }
    2088    }
    2089 
    2090    if (png_crc_finish(png_ptr, 0) != 0)
    2091       return;
    2092 
    2093    png_set_eXIf_1(png_ptr, info_ptr, length, info_ptr->eXIf_buf);
     2077      if (i == 1)
     2078      {
     2079         if ((buf[0] != 'M' && buf[0] != 'I') ||
     2080             (info_ptr->eXIf_buf[0] != buf[0]))
     2081         {
     2082            png_crc_finish(png_ptr, length - 2);
     2083            png_chunk_benign_error(png_ptr, "incorrect byte-order specifier");
     2084            png_free(png_ptr, info_ptr->eXIf_buf);
     2085            info_ptr->eXIf_buf = NULL;
     2086            return;
     2087         }
     2088      }
     2089   }
     2090
     2091   if (png_crc_finish(png_ptr, 0) == 0)
     2092      png_set_eXIf_1(png_ptr, info_ptr, length, info_ptr->eXIf_buf);
    20942093
    20952094   png_free(png_ptr, info_ptr->eXIf_buf);
     
    21272126   num = length / 2 ;
    21282127
    2129    if (num != (unsigned int) png_ptr->num_palette ||
    2130        num > (unsigned int) PNG_MAX_PALETTE_LENGTH)
     2128   if (length != num * 2 ||
     2129       num != (unsigned int)png_ptr->num_palette ||
     2130       num > (unsigned int)PNG_MAX_PALETTE_LENGTH)
    21312131   {
    21322132      png_crc_finish(png_ptr, length);
     
    31863186      png_debug2(0," length = %lu, limit = %lu",
    31873187         (unsigned long)length,(unsigned long)limit);
    3188       png_chunk_error(png_ptr, "chunk data is too large");
     3188      png_benign_error(png_ptr, "chunk data is too large");
    31893189   }
    31903190}
     
    46224622      {
    46234623         png_bytep temp = png_ptr->big_row_buf + 32;
    4624          int extra = (int)((temp - (png_bytep)0) & 0x0f);
     4624         size_t extra = (size_t)temp & 0x0f;
    46254625         png_ptr->row_buf = temp - extra - 1/*filter byte*/;
    46264626
    46274627         temp = png_ptr->big_prev_row + 32;
    4628          extra = (int)((temp - (png_bytep)0) & 0x0f);
     4628         extra = (size_t)temp & 0x0f;
    46294629         png_ptr->prev_row = temp - extra - 1/*filter byte*/;
    46304630      }
    4631 
    46324631#else
    46334632      /* Use 31 bytes of padding before and 17 bytes after row_buf. */
  • trunk/src/libs/libpng-1.6.42/pngset.c

    r96425 r103316  
    22/* pngset.c - storage of image information into info struct
    33 *
    4  * Copyright (c) 2018 Cosmin Truta
     4 * Copyright (c) 2018-2024 Cosmin Truta
    55 * Copyright (c) 1998-2018 Glenn Randers-Pehrson
    66 * Copyright (c) 1996-1997 Andreas Dilger
     
    138138void PNGAPI
    139139png_set_eXIf(png_const_structrp png_ptr, png_inforp info_ptr,
    140     png_bytep eXIf_buf)
     140    png_bytep exif)
    141141{
    142142  png_warning(png_ptr, "png_set_eXIf does not work; use png_set_eXIf_1");
    143143  PNG_UNUSED(info_ptr)
    144   PNG_UNUSED(eXIf_buf)
     144  PNG_UNUSED(exif)
    145145}
    146146
    147147void PNGAPI
    148148png_set_eXIf_1(png_const_structrp png_ptr, png_inforp info_ptr,
    149     png_uint_32 num_exif, png_bytep eXIf_buf)
    150 {
    151    int i;
     149    png_uint_32 num_exif, png_bytep exif)
     150{
     151   png_bytep new_exif;
    152152
    153153   png_debug1(1, "in %s storage function", "eXIf");
    154154
    155    if (png_ptr == NULL || info_ptr == NULL)
    156       return;
    157 
    158    if (info_ptr->exif)
    159    {
    160       png_free(png_ptr, info_ptr->exif);
    161       info_ptr->exif = NULL;
    162    }
     155   if (png_ptr == NULL || info_ptr == NULL ||
     156       (png_ptr->mode & PNG_WROTE_eXIf) != 0)
     157      return;
     158
     159   new_exif = png_voidcast(png_bytep, png_malloc_warn(png_ptr, num_exif));
     160
     161   if (new_exif == NULL)
     162   {
     163      png_warning(png_ptr, "Insufficient memory for eXIf chunk data");
     164      return;
     165   }
     166
     167   memcpy(new_exif, exif, (size_t)num_exif);
     168
     169   png_free_data(png_ptr, info_ptr, PNG_FREE_EXIF, 0);
    163170
    164171   info_ptr->num_exif = num_exif;
    165 
    166    info_ptr->exif = png_voidcast(png_bytep, png_malloc_warn(png_ptr,
    167        info_ptr->num_exif));
    168 
    169    if (info_ptr->exif == NULL)
    170    {
    171       png_warning(png_ptr, "Insufficient memory for eXIf chunk data");
    172       return;
    173    }
    174 
     172   info_ptr->exif = new_exif;
    175173   info_ptr->free_me |= PNG_FREE_EXIF;
    176 
    177    for (i = 0; i < (int) info_ptr->num_exif; i++)
    178       info_ptr->exif[i] = eXIf_buf[i];
    179 
    180174   info_ptr->valid |= PNG_INFO_eXIf;
    181175}
     
    238232   {
    239233      png_warning(png_ptr, "Insufficient memory for hIST chunk data");
    240 
    241       return;
    242    }
    243 
    244    info_ptr->free_me |= PNG_FREE_HIST;
     234      return;
     235   }
    245236
    246237   for (i = 0; i < info_ptr->num_palette; i++)
    247238      info_ptr->hist[i] = hist[i];
    248239
     240   info_ptr->free_me |= PNG_FREE_HIST;
    249241   info_ptr->valid |= PNG_INFO_hIST;
    250242}
     
    368360   memcpy(info_ptr->pcal_purpose, purpose, length);
    369361
     362   info_ptr->free_me |= PNG_FREE_PCAL;
     363
    370364   png_debug(3, "storing X0, X1, type, and nparams in info");
    371365   info_ptr->pcal_X0 = X0;
     
    384378   {
    385379      png_warning(png_ptr, "Insufficient memory for pCAL units");
    386 
    387380      return;
    388381   }
     
    396389   {
    397390      png_warning(png_ptr, "Insufficient memory for pCAL params");
    398 
    399391      return;
    400392   }
     
    414406      {
    415407         png_warning(png_ptr, "Insufficient memory for pCAL parameter");
    416 
    417408         return;
    418409      }
     
    422413
    423414   info_ptr->valid |= PNG_INFO_pCAL;
    424    info_ptr->free_me |= PNG_FREE_PCAL;
    425415}
    426416#endif
     
    479469   if (info_ptr->scal_s_height == NULL)
    480470   {
    481       png_free (png_ptr, info_ptr->scal_s_width);
     471      png_free(png_ptr, info_ptr->scal_s_width);
    482472      info_ptr->scal_s_width = NULL;
    483473
    484474      png_warning(png_ptr, "Memory allocation failed while processing sCAL");
    485 
    486475      return;
    487476   }
     
    489478   memcpy(info_ptr->scal_s_height, sheight, lengthh);
    490479
     480   info_ptr->free_me |= PNG_FREE_SCAL;
    491481   info_ptr->valid |= PNG_INFO_sCAL;
    492    info_ptr->free_me |= PNG_FREE_SCAL;
    493482}
    494483
     
    626615      memcpy(png_ptr->palette, palette, (unsigned int)num_palette *
    627616          (sizeof (png_color)));
     617
    628618   info_ptr->palette = png_ptr->palette;
    629619   info_ptr->num_palette = png_ptr->num_palette = (png_uint_16)num_palette;
    630 
    631620   info_ptr->free_me |= PNG_FREE_PLTE;
    632 
    633621   info_ptr->valid |= PNG_INFO_PLTE;
    634622}
     
    776764   int i;
    777765
    778    png_debug1(1, "in %lx storage function", png_ptr == NULL ? 0xabadca11U :
    779       (unsigned long)png_ptr->chunk_name);
     766   png_debug1(1, "in text storage function, chunk typeid = 0x%lx",
     767      png_ptr == NULL ? 0xabadca11UL : (unsigned long)png_ptr->chunk_name);
    780768
    781769   if (png_ptr == NULL || info_ptr == NULL || num_text <= 0 || text_ptr == NULL)
    782       return(0);
     770      return 0;
    783771
    784772   /* Make sure we have enough space in the "text" array in info_struct
     
    960948   }
    961949
    962    return(0);
     950   return 0;
    963951}
    964952#endif
     
    10201008              png_malloc(png_ptr, PNG_MAX_PALETTE_LENGTH));
    10211009          memcpy(info_ptr->trans_alpha, trans_alpha, (size_t)num_trans);
     1010
     1011          info_ptr->free_me |= PNG_FREE_TRNS;
     1012          info_ptr->valid |= PNG_INFO_tRNS;
    10221013       }
    10231014       png_ptr->trans_alpha = info_ptr->trans_alpha;
     
    10521043   if (num_trans != 0)
    10531044   {
     1045      info_ptr->free_me |= PNG_FREE_TRNS;
    10541046      info_ptr->valid |= PNG_INFO_tRNS;
    1055       info_ptr->free_me |= PNG_FREE_TRNS;
    10561047   }
    10571048}
     
    10731064   png_sPLT_tp np;
    10741065
     1066   png_debug1(1, "in %s storage function", "sPLT");
     1067
    10751068   if (png_ptr == NULL || info_ptr == NULL || nentries <= 0 || entries == NULL)
    10761069      return;
     
    10871080      /* Out of memory or too many chunks */
    10881081      png_chunk_report(png_ptr, "too many sPLT chunks", PNG_CHUNK_WRITE_ERROR);
    1089 
    10901082      return;
    10911083   }
    10921084
    10931085   png_free(png_ptr, info_ptr->splt_palettes);
     1086
    10941087   info_ptr->splt_palettes = np;
    10951088   info_ptr->free_me |= PNG_FREE_SPLT;
     
    12451238      png_chunk_report(png_ptr, "too many unknown chunks",
    12461239          PNG_CHUNK_WRITE_ERROR);
    1247 
    12481240      return;
    12491241   }
    12501242
    12511243   png_free(png_ptr, info_ptr->unknown_chunks);
     1244
    12521245   info_ptr->unknown_chunks = np; /* safe because it is initialized */
    12531246   info_ptr->free_me |= PNG_FREE_UNKN;
     
    13271320#ifdef PNG_MNG_FEATURES_SUPPORTED
    13281321png_uint_32 PNGAPI
    1329 png_permit_mng_features (png_structrp png_ptr, png_uint_32 mng_features)
     1322png_permit_mng_features(png_structrp png_ptr, png_uint_32 mng_features)
    13301323{
    13311324   png_debug(1, "in png_permit_mng_features");
     
    15471540    png_bytepp row_pointers)
    15481541{
    1549    png_debug1(1, "in %s storage function", "rows");
     1542   png_debug(1, "in png_set_rows");
    15501543
    15511544   if (png_ptr == NULL || info_ptr == NULL)
     
    15661559png_set_compression_buffer_size(png_structrp png_ptr, size_t size)
    15671560{
     1561   png_debug(1, "in png_set_compression_buffer_size");
     1562
    15681563   if (png_ptr == NULL)
    15691564      return;
     
    16341629/* This function was added to libpng 1.2.6 */
    16351630void PNGAPI
    1636 png_set_user_limits (png_structrp png_ptr, png_uint_32 user_width_max,
     1631png_set_user_limits(png_structrp png_ptr, png_uint_32 user_width_max,
    16371632    png_uint_32 user_height_max)
    16381633{
     1634   png_debug(1, "in png_set_user_limits");
     1635
    16391636   /* Images with dimensions larger than these limits will be
    16401637    * rejected by png_set_IHDR().  To accept any PNG datastream
     
    16501647/* This function was added to libpng 1.4.0 */
    16511648void PNGAPI
    1652 png_set_chunk_cache_max (png_structrp png_ptr, png_uint_32 user_chunk_cache_max)
    1653 {
     1649png_set_chunk_cache_max(png_structrp png_ptr, png_uint_32 user_chunk_cache_max)
     1650{
     1651   png_debug(1, "in png_set_chunk_cache_max");
     1652
    16541653   if (png_ptr != NULL)
    16551654      png_ptr->user_chunk_cache_max = user_chunk_cache_max;
     
    16581657/* This function was added to libpng 1.4.1 */
    16591658void PNGAPI
    1660 png_set_chunk_malloc_max (png_structrp png_ptr,
     1659png_set_chunk_malloc_max(png_structrp png_ptr,
    16611660    png_alloc_size_t user_chunk_malloc_max)
    16621661{
     1662   png_debug(1, "in png_set_chunk_malloc_max");
     1663
    16631664   if (png_ptr != NULL)
    16641665      png_ptr->user_chunk_malloc_max = user_chunk_malloc_max;
  • trunk/src/libs/libpng-1.6.42/pngstruct.h

    r96425 r103316  
    22/* pngstruct.h - header file for PNG reference library
    33 *
    4  * Copyright (c) 2018-2019 Cosmin Truta
     4 * Copyright (c) 2018-2022 Cosmin Truta
    55 * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
    66 * Copyright (c) 1996-1997 Andreas Dilger
     
    335335   int process_mode;                 /* what push library is currently doing */
    336336   int cur_palette;                  /* current push library palette index */
    337 
    338337#endif /* PROGRESSIVE_READ */
    339 
    340 #if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__)
    341 /* For the Borland special 64K segment handler */
    342    png_bytepp offset_table_ptr;
    343    png_bytep offset_table;
    344    png_uint_16 offset_table_number;
    345    png_uint_16 offset_table_count;
    346    png_uint_16 offset_table_count_free;
    347 #endif
    348338
    349339#ifdef PNG_READ_QUANTIZE_SUPPORTED
  • trunk/src/libs/libpng-1.6.42/pngtest.c

    r96425 r103316  
    22/* pngtest.c - a simple test program to test libpng
    33 *
    4  * Copyright (c) 2018-2019 Cosmin Truta
     4 * Copyright (c) 2018-2024 Cosmin Truta
    55 * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
    66 * Copyright (c) 1996-1997 Andreas Dilger
     
    525525
    526526   if (size == 0)
    527       return (NULL);
     527      return NULL;
    528528
    529529   /* This calls the library allocator twice, once to get the requested
     
    566566             pinfo->pointer);
    567567
    568       return (png_voidp)(pinfo->pointer);
     568      return (png_voidp)pinfo->pointer;
    569569   }
    570570}
     
    699699
    700700   /* Return one of the following:
    701     *    return (-n);  chunk had an error
    702     *    return (0);  did not recognize
    703     *    return (n);  success
     701    *    return -n;  chunk had an error
     702    *    return 0;   did not recognize
     703    *    return n;   success
    704704    *
    705705    * The unknown chunk structure contains the chunk data:
     
    716716         /* Found sTER chunk */
    717717         if (chunk->size != 1)
    718             return (-1); /* Error return */
     718            return -1; /* Error return */
    719719
    720720         if (chunk->data[0] != 0 && chunk->data[0] != 1)
    721             return (-1);  /* Invalid mode */
     721            return -1;  /* Invalid mode */
    722722
    723723         if (set_location(png_ptr, my_user_chunk_data, have_sTER) != 0)
    724724         {
    725725            my_user_chunk_data->sTER_mode=chunk->data[0];
    726             return (1);
     726            return 1;
    727727         }
    728728
    729729         else
    730             return (0); /* duplicate sTER - give it to libpng */
     730            return 0; /* duplicate sTER - give it to libpng */
    731731      }
    732732
    733733   if (chunk->name[0] != 118 || chunk->name[1] != 112 ||    /* v  p */
    734734       chunk->name[2] !=  65 || chunk->name[3] != 103)      /* A  g */
    735       return (0); /* Did not recognize */
     735      return 0; /* Did not recognize */
    736736
    737737   /* Found ImageMagick vpAg chunk */
    738738
    739739   if (chunk->size != 9)
    740       return (-1); /* Error return */
     740      return -1; /* Error return */
    741741
    742742   if (set_location(png_ptr, my_user_chunk_data, have_vpAg) == 0)
    743       return (0);  /* duplicate vpAg */
     743      return 0;  /* duplicate vpAg */
    744744
    745745   my_user_chunk_data->vpAg_width = png_get_uint_31(png_ptr, chunk->data);
     
    747747   my_user_chunk_data->vpAg_units = chunk->data[8];
    748748
    749    return (1);
     749   return 1;
    750750}
    751751
     
    883883   {
    884884      fprintf(STDERR, "Could not find input file %s\n", inname);
    885       return (1);
     885      return 1;
    886886   }
    887887
     
    890890      fprintf(STDERR, "Could not open output file %s\n", outname);
    891891      FCLOSE(fpin);
    892       return (1);
     892      return 1;
    893893   }
    894894
     
    949949      FCLOSE(fpin);
    950950      FCLOSE(fpout);
    951       return (1);
     951      return 1;
    952952   }
    953953
     
    969969      FCLOSE(fpin);
    970970      FCLOSE(fpout);
    971       return (1);
     971      return 1;
    972972   }
    973973#endif
     
    16571657   pngtest_debug("Destroying data structs");
    16581658#ifdef SINGLE_ROWBUF_ALLOC
    1659    pngtest_debug("destroying row_buf for read_ptr");
     1659   pngtest_debug("Destroying row_buf for read_ptr");
    16601660   png_free(read_ptr, row_buf);
    16611661   row_buf = NULL;
    16621662#endif /* SINGLE_ROWBUF_ALLOC */
    1663    pngtest_debug("destroying read_ptr, read_info_ptr, end_info_ptr");
     1663   pngtest_debug("Destroying read_ptr, read_info_ptr, end_info_ptr");
    16641664   png_destroy_read_struct(&read_ptr, &read_info_ptr, &end_info_ptr);
    16651665#ifdef PNG_WRITE_SUPPORTED
    1666    pngtest_debug("destroying write_end_info_ptr");
     1666   pngtest_debug("Destroying write_end_info_ptr");
    16671667   png_destroy_info_struct(write_ptr, &write_end_info_ptr);
    1668    pngtest_debug("destroying write_ptr, write_info_ptr");
     1668   pngtest_debug("Destroying write_ptr, write_info_ptr");
    16691669   png_destroy_write_struct(&write_ptr, &write_info_ptr);
    16701670#endif
     
    16871687
    16881688      if (strict != 0)
    1689          return (1);
     1689         return 1;
    16901690   }
    16911691
     
    17051705
    17061706      if (strict != 0)
    1707          return (1);
     1707         return 1;
    17081708   }
    17091709
     
    17121712   {
    17131713      fprintf(STDERR, "Could not find file %s\n", inname);
    1714       return (1);
     1714      return 1;
    17151715   }
    17161716
     
    17191719      fprintf(STDERR, "Could not find file %s\n", outname);
    17201720      FCLOSE(fpin);
    1721       return (1);
     1721      return 1;
    17221722   }
    17231723
     
    17581758
    17591759            if (strict != 0 && unsupported_chunks == 0)
    1760               return (1);
     1760              return 1;
    17611761
    17621762            else
    1763               return (0);
     1763              return 0;
    17641764         }
    17651765
     
    17951795             */
    17961796            if (strict != 0 && unsupported_chunks == 0)
    1797               return (1);
     1797              return 1;
    17981798
    17991799            else
    1800               return (0);
     1800              return 0;
    18011801         }
    18021802      }
     
    18071807   FCLOSE(fpout);
    18081808
    1809    return (0);
     1809   return 0;
    18101810}
    18111811
     
    21562156
    21572157/* Generate a compiler error if there is an old png.h in the search path. */
    2158 typedef png_libpng_version_1_6_37 Your_png_h_is_not_version_1_6_37;
     2158typedef png_libpng_version_1_6_42 Your_png_h_is_not_version_1_6_42;
  • trunk/src/libs/libpng-1.6.42/pngtrans.c

    r96425 r103316  
    22/* pngtrans.c - transforms the data in a row (used by both readers and writers)
    33 *
    4  * Copyright (c) 2018 Cosmin Truta
     4 * Copyright (c) 2018-2024 Cosmin Truta
    55 * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
    66 * Copyright (c) 1996-1997 Andreas Dilger
     
    104104   {
    105105      png_ptr->transformations |= PNG_INTERLACE;
    106       return (7);
    107    }
    108 
    109    return (1);
     106      return 7;
     107   }
     108
     109   return 1;
    110110}
    111111#endif
     
    499499   png_bytep ep = row + row_info->rowbytes; /* One beyond end of row */
    500500
     501   png_debug(1, "in png_do_strip_channel");
     502
    501503   /* At the start sp will point to the first byte to copy and dp to where
    502504    * it is copied to.  ep always points just beyond the end of the row, so
     
    699701png_do_check_palette_indexes(png_structrp png_ptr, png_row_infop row_info)
    700702{
     703   png_debug(1, "in png_do_check_palette_indexes");
     704
    701705   if (png_ptr->num_palette < (1 << row_info->bit_depth) &&
    702706      png_ptr->num_palette > 0) /* num_palette can be 0 in MNG files */
     
    709713       */
    710714      int padding = PNG_PADBITS(row_info->pixel_depth, row_info->width);
    711       png_bytep rp = png_ptr->row_buf + row_info->rowbytes - 1;
     715      png_bytep rp = png_ptr->row_buf + row_info->rowbytes;
    712716
    713717      switch (row_info->bit_depth)
     
    834838{
    835839   if (png_ptr == NULL)
    836       return (NULL);
     840      return NULL;
    837841
    838842   return png_ptr->user_transform_ptr;
  • trunk/src/libs/libpng-1.6.42/pngwrite.c

    r96425 r103316  
    22/* pngwrite.c - general routines to write a PNG file
    33 *
    4  * Copyright (c) 2018-2019 Cosmin Truta
     4 * Copyright (c) 2018-2024 Cosmin Truta
    55 * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
    66 * Copyright (c) 1996-1997 Andreas Dilger
     
    7676 * and put it in the correct location here.  If you want the chunk written
    7777 * after the image data, put it in png_write_end().  I strongly encourage
    78  * you to supply a PNG_INFO_ flag, and check info_ptr->valid before writing
    79  * the chunk, as that will keep the code from breaking if you want to just
    80  * write a plain PNG file.  If you have long comments, I suggest writing
    81  * them in png_write_end(), and compressing them.
     78 * you to supply a PNG_INFO_<chunk> flag, and check info_ptr->valid before
     79 * writing the chunk, as that will keep the code from breaking if you want
     80 * to just write a plain PNG file.  If you have long comments, I suggest
     81 * writing them in png_write_end(), and compressing them.
    8282 */
    8383void PNGAPI
     
    240240#ifdef PNG_WRITE_eXIf_SUPPORTED
    241241   if ((info_ptr->valid & PNG_INFO_eXIf) != 0)
     242   {
    242243      png_write_eXIf(png_ptr, info_ptr->exif, info_ptr->num_exif);
     244      png_ptr->mode |= PNG_WROTE_eXIf;
     245   }
    243246#endif
    244247
     
    367370
    368371#ifdef PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED
    369    if (png_ptr->num_palette_max > png_ptr->num_palette)
     372   if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE &&
     373       png_ptr->num_palette_max >= png_ptr->num_palette)
    370374      png_benign_error(png_ptr, "Wrote palette index exceeding num_palette");
    371375#endif
     
    440444
    441445#ifdef PNG_WRITE_eXIf_SUPPORTED
    442    if ((info_ptr->valid & PNG_INFO_eXIf) != 0)
    443       png_write_eXIf(png_ptr, info_ptr->exif, info_ptr->num_exif);
     446      if ((info_ptr->valid & PNG_INFO_eXIf) != 0 &&
     447          (png_ptr->mode & PNG_WROTE_eXIf) == 0)
     448         png_write_eXIf(png_ptr, info_ptr->exif, info_ptr->num_exif);
    444449#endif
    445450
     
    490495
    491496   tbuf = gmtime(&ttime);
     497   if (tbuf == NULL)
     498   {
     499      /* TODO: add a safe function which takes a png_ptr argument and raises
     500       * a png_error if the ttime argument is invalid and the call to gmtime
     501       * fails as a consequence.
     502       */
     503      memset(ptime, 0, sizeof(*ptime));
     504      return;
     505   }
     506
    492507   png_convert_from_struct_tm(ptime, tbuf);
    493508}
     
    701716   png_row_info row_info;
    702717
     718   png_debug2(1, "in png_write_row (row %u, pass %d)",
     719       png_ptr->row_number, png_ptr->pass);
     720
    703721   if (png_ptr == NULL)
    704722      return;
    705 
    706    png_debug2(1, "in png_write_row (row %u, pass %d)",
    707        png_ptr->row_number, png_ptr->pass);
    708723
    709724   /* Initialize transformations and other stuff if first time */
     
    11971212png_set_compression_window_bits(png_structrp png_ptr, int window_bits)
    11981213{
     1214   png_debug(1, "in png_set_compression_window_bits");
     1215
    11991216   if (png_ptr == NULL)
    12001217      return;
     
    12801297png_set_text_compression_window_bits(png_structrp png_ptr, int window_bits)
    12811298{
     1299   png_debug(1, "in png_set_text_compression_window_bits");
     1300
    12821301   if (png_ptr == NULL)
    12831302      return;
     
    13171336png_set_write_status_fn(png_structrp png_ptr, png_write_status_ptr write_row_fn)
    13181337{
     1338   png_debug(1, "in png_set_write_status_fn");
     1339
    13191340   if (png_ptr == NULL)
    13201341      return;
     
    13441365    int transforms, voidp params)
    13451366{
     1367   png_debug(1, "in png_write_png");
     1368
    13461369   if (png_ptr == NULL || info_ptr == NULL)
    13471370      return;
  • trunk/src/libs/libpng-1.6.42/pngwutil.c

    r96425 r103316  
    22/* pngwutil.c - utilities to write a PNG file
    33 *
    4  * Copyright (c) 2018 Cosmin Truta
     4 * Copyright (c) 2018-2024 Cosmin Truta
    55 * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
    66 * Copyright (c) 1996-1997 Andreas Dilger
     
    17481748   png_uint_32 purpose_len;
    17491749   size_t units_len, total_len;
    1750    png_size_tp params_len;
     1750   size_t *params_len;
    17511751   png_byte buf[10];
    17521752   png_byte new_purpose[80];
     
    17701770   total_len = purpose_len + units_len + 10;
    17711771
    1772    params_len = (png_size_tp)png_malloc(png_ptr,
     1772   params_len = (size_t *)png_malloc(png_ptr,
    17731773       (png_alloc_size_t)((png_alloc_size_t)nparams * (sizeof (size_t))));
    17741774
     
    23122312   }
    23132313
    2314    return (sum);
     2314   return sum;
    23152315}
    23162316
     
    23622362   }
    23632363
    2364    return (sum);
     2364   return sum;
    23652365}
    23662366static void /* PRIVATE */
     
    24182418   }
    24192419
    2420    return (sum);
     2420   return sum;
    24212421}
    24222422static void /* PRIVATE */
     
    25012501   }
    25022502
    2503    return (sum);
     2503   return sum;
    25042504}
    25052505static void /* PRIVATE */
  • trunk/src/libs/libpng-1.6.42/projects/vstudio/README.txt

    r96425 r103316  
    22==============================================================
    33
    4 Copyright (c) 2018 Cosmin Truta
     4Copyright (c) 2018,2022 Cosmin Truta
    55Copyright (c) 2010,2013,2015 Glenn Randers-Pehrson
    66
     
    1010
    1111This directory contains a solution for building libpng under Microsoft
    12 Visual Studio 2010.  It may also work under later versions of Visual
    13 Studio.  You should be familiar with Visual Studio before using this
    14 solution.
     12Visual Studio 2019.  It may also work under earlier or later versions
     13of Visual Studio.  You should be familiar with Visual Studio before
     14using this solution.
    1515
    1616Initial preparations
  • trunk/src/libs/libpng-1.6.42/projects/vstudio/libpng/libpng.vcxproj

    r96425 r103316  
    22<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    33  <ItemGroup Label="ProjectConfigurations">
     4    <ProjectConfiguration Include="Debug Library|ARM64">
     5      <Configuration>Debug Library</Configuration>
     6      <Platform>ARM64</Platform>
     7    </ProjectConfiguration>
    48    <ProjectConfiguration Include="Debug Library|Win32">
    59      <Configuration>Debug Library</Configuration>
    610      <Platform>Win32</Platform>
    711    </ProjectConfiguration>
     12    <ProjectConfiguration Include="Debug|ARM64">
     13      <Configuration>Debug</Configuration>
     14      <Platform>ARM64</Platform>
     15    </ProjectConfiguration>
    816    <ProjectConfiguration Include="Debug|Win32">
    917      <Configuration>Debug</Configuration>
    1018      <Platform>Win32</Platform>
    1119    </ProjectConfiguration>
     20    <ProjectConfiguration Include="Release Library|ARM64">
     21      <Configuration>Release Library</Configuration>
     22      <Platform>ARM64</Platform>
     23    </ProjectConfiguration>
    1224    <ProjectConfiguration Include="Release Library|Win32">
    1325      <Configuration>Release Library</Configuration>
    1426      <Platform>Win32</Platform>
     27    </ProjectConfiguration>
     28    <ProjectConfiguration Include="Release|ARM64">
     29      <Configuration>Release</Configuration>
     30      <Platform>ARM64</Platform>
    1531    </ProjectConfiguration>
    1632    <ProjectConfiguration Include="Release|Win32">
     
    3046    <CharacterSet>MultiByte</CharacterSet>
    3147    <WholeProgramOptimization>true</WholeProgramOptimization>
     48    <PlatformToolset>v142</PlatformToolset>
     49  </PropertyGroup>
     50  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
     51    <ConfigurationType>DynamicLibrary</ConfigurationType>
     52    <CharacterSet>MultiByte</CharacterSet>
     53    <WholeProgramOptimization>true</WholeProgramOptimization>
     54    <PlatformToolset>v142</PlatformToolset>
    3255  </PropertyGroup>
    3356  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'" Label="Configuration">
    3457    <ConfigurationType>StaticLibrary</ConfigurationType>
    3558    <CharacterSet>MultiByte</CharacterSet>
     59    <PlatformToolset>v142</PlatformToolset>
     60  </PropertyGroup>
     61  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|ARM64'" Label="Configuration">
     62    <ConfigurationType>StaticLibrary</ConfigurationType>
     63    <CharacterSet>MultiByte</CharacterSet>
     64    <PlatformToolset>v142</PlatformToolset>
    3665  </PropertyGroup>
    3766  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
     
    3968    <WholeProgramOptimization>true</WholeProgramOptimization>
    4069    <CharacterSet>MultiByte</CharacterSet>
     70    <PlatformToolset>v142</PlatformToolset>
     71  </PropertyGroup>
     72  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
     73    <ConfigurationType>DynamicLibrary</ConfigurationType>
     74    <WholeProgramOptimization>true</WholeProgramOptimization>
     75    <CharacterSet>MultiByte</CharacterSet>
     76    <PlatformToolset>v142</PlatformToolset>
    4177  </PropertyGroup>
    4278  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'" Label="Configuration">
    4379    <ConfigurationType>StaticLibrary</ConfigurationType>
    4480    <CharacterSet>MultiByte</CharacterSet>
     81    <PlatformToolset>v142</PlatformToolset>
     82  </PropertyGroup>
     83  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|ARM64'" Label="Configuration">
     84    <ConfigurationType>StaticLibrary</ConfigurationType>
     85    <CharacterSet>MultiByte</CharacterSet>
     86    <PlatformToolset>v142</PlatformToolset>
    4587  </PropertyGroup>
    4688  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
     
    5092    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    5193  </ImportGroup>
     94  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets">
     95    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
     96  </ImportGroup>
    5297  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'" Label="PropertySheets">
    5398    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
    5499  </ImportGroup>
     100  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|ARM64'" Label="PropertySheets">
     101    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
     102  </ImportGroup>
    55103  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    56104    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    57105  </ImportGroup>
     106  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets">
     107    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
     108  </ImportGroup>
    58109  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'" Label="PropertySheets">
    59110    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
    60111  </ImportGroup>
     112  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|ARM64'" Label="PropertySheets">
     113    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
     114  </ImportGroup>
    61115  <PropertyGroup Label="UserMacros" />
    62116  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     
    66120    <TargetName>$(ProjectName)16</TargetName>
    67121  </PropertyGroup>
     122  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
     123    <LinkIncremental>false</LinkIncremental>
     124    <CustomBuildBeforeTargets />
     125    <TargetName>$(ProjectName)16</TargetName>
     126  </PropertyGroup>
    68127  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'">
     128    <LinkIncremental>false</LinkIncremental>
     129    <CustomBuildBeforeTargets />
     130    <TargetName>$(ProjectName)16</TargetName>
     131  </PropertyGroup>
     132  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|ARM64'">
    69133    <LinkIncremental>false</LinkIncremental>
    70134    <CustomBuildBeforeTargets />
     
    77141    <TargetName>$(ProjectName)16</TargetName>
    78142  </PropertyGroup>
     143  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
     144    <LinkIncremental>false</LinkIncremental>
     145    <CustomBuildBeforeTargets />
     146    <TargetName>$(ProjectName)16</TargetName>
     147  </PropertyGroup>
    79148  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'">
    80149    <LinkIncremental>false</LinkIncremental>
     
    82151    <TargetName>$(ProjectName)16</TargetName>
    83152  </PropertyGroup>
     153  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|ARM64'">
     154    <LinkIncremental>false</LinkIncremental>
     155    <CustomBuildBeforeTargets />
     156    <TargetName>$(ProjectName)16</TargetName>
     157  </PropertyGroup>
    84158  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    85159    <ClCompile>
     
    89163      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
    90164      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
    91       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     165      <PreprocessorDefinitions>WIN32;_DEBUG;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    92166      <IntrinsicFunctions>true</IntrinsicFunctions>
    93167      <FunctionLevelLinking>true</FunctionLevelLinking>
     
    112186    </Link>
    113187  </ItemDefinitionGroup>
     188  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
     189    <ClCompile>
     190      <PrecompiledHeader>Use</PrecompiledHeader>
     191      <WarningLevel>$(WarningLevel)</WarningLevel>
     192      <MinimalRebuild>false</MinimalRebuild>
     193      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     194      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
     195      <PreprocessorDefinitions>WIN32;_DEBUG;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     196      <IntrinsicFunctions>true</IntrinsicFunctions>
     197      <FunctionLevelLinking>true</FunctionLevelLinking>
     198      <FloatingPointExceptions>false</FloatingPointExceptions>
     199      <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
     200      <PrecompiledHeaderFile>pngpriv.h</PrecompiledHeaderFile>
     201      <BrowseInformation>true</BrowseInformation>
     202      <CompileAs>CompileAsC</CompileAs>
     203      <StringPooling>true</StringPooling>
     204      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
     205      <AdditionalIncludeDirectories>$(ZLibSrcDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     206      <TreatWarningAsError>$(TreatWarningAsError)</TreatWarningAsError>
     207      <Optimization>Disabled</Optimization>
     208      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
     209    </ClCompile>
     210    <Link>
     211      <SubSystem>Windows</SubSystem>
     212      <GenerateDebugInformation>true</GenerateDebugInformation>
     213      <AdditionalDependencies>zlib.lib</AdditionalDependencies>
     214      <Version>16</Version>
     215      <AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
     216    </Link>
     217  </ItemDefinitionGroup>
    114218  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'">
    115219    <ClCompile>
    116220      <PrecompiledHeader>Use</PrecompiledHeader>
    117       <WarningLevel>$(WarningLevel)</WarningLevel>
     221      <WarningLevel>Level3</WarningLevel>
    118222      <MinimalRebuild>false</MinimalRebuild>
    119223      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
    120224      <Optimization>Disabled</Optimization>
    121225      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
    122       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    123       <IntrinsicFunctions>true</IntrinsicFunctions>
    124       <FunctionLevelLinking>true</FunctionLevelLinking>
    125       <FloatingPointExceptions>false</FloatingPointExceptions>
    126       <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
    127       <PrecompiledHeaderFile>pngpriv.h</PrecompiledHeaderFile>
    128       <BrowseInformation>true</BrowseInformation>
    129       <CompileAs>CompileAsC</CompileAs>
    130       <StringPooling>true</StringPooling>
    131       <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
    132       <AdditionalIncludeDirectories>$(ZLibSrcDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    133       <TreatWarningAsError>$(TreatWarningAsError)</TreatWarningAsError>
     226      <PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     227      <IntrinsicFunctions>true</IntrinsicFunctions>
     228      <FunctionLevelLinking>true</FunctionLevelLinking>
     229      <FloatingPointExceptions>false</FloatingPointExceptions>
     230      <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
     231      <PrecompiledHeaderFile>pngpriv.h</PrecompiledHeaderFile>
     232      <BrowseInformation>true</BrowseInformation>
     233      <CompileAs>CompileAsC</CompileAs>
     234      <StringPooling>true</StringPooling>
     235      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
     236      <AdditionalIncludeDirectories>$(ZLibSrcDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     237      <TreatWarningAsError>false</TreatWarningAsError>
    134238      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
    135239    </ClCompile>
     
    139243    </Link>
    140244  </ItemDefinitionGroup>
     245  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|ARM64'">
     246    <ClCompile>
     247      <PrecompiledHeader>Use</PrecompiledHeader>
     248      <WarningLevel>Level3</WarningLevel>
     249      <MinimalRebuild>false</MinimalRebuild>
     250      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     251      <Optimization>Disabled</Optimization>
     252      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
     253      <PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     254      <IntrinsicFunctions>true</IntrinsicFunctions>
     255      <FunctionLevelLinking>true</FunctionLevelLinking>
     256      <FloatingPointExceptions>false</FloatingPointExceptions>
     257      <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
     258      <PrecompiledHeaderFile>pngpriv.h</PrecompiledHeaderFile>
     259      <BrowseInformation>true</BrowseInformation>
     260      <CompileAs>CompileAsC</CompileAs>
     261      <StringPooling>true</StringPooling>
     262      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
     263      <AdditionalIncludeDirectories>$(ZLibSrcDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     264      <TreatWarningAsError>false</TreatWarningAsError>
     265      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
     266    </ClCompile>
     267    <Link>
     268      <SubSystem>Windows</SubSystem>
     269      <GenerateDebugInformation>true</GenerateDebugInformation>
     270    </Link>
     271  </ItemDefinitionGroup>
    141272  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    142273    <ClCompile>
     
    146277      <FunctionLevelLinking>true</FunctionLevelLinking>
    147278      <IntrinsicFunctions>true</IntrinsicFunctions>
    148       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     279      <PreprocessorDefinitions>WIN32;NDEBUG;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    149280      <FloatingPointExceptions>false</FloatingPointExceptions>
    150281      <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
     
    169300    </Link>
    170301  </ItemDefinitionGroup>
     302  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
     303    <ClCompile>
     304      <WarningLevel>$(WarningLevel)</WarningLevel>
     305      <PrecompiledHeader>Use</PrecompiledHeader>
     306      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     307      <FunctionLevelLinking>true</FunctionLevelLinking>
     308      <IntrinsicFunctions>true</IntrinsicFunctions>
     309      <PreprocessorDefinitions>WIN32;NDEBUG;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     310      <FloatingPointExceptions>false</FloatingPointExceptions>
     311      <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
     312      <PrecompiledHeaderFile>pngpriv.h</PrecompiledHeaderFile>
     313      <BrowseInformation>true</BrowseInformation>
     314      <CompileAs>CompileAsC</CompileAs>
     315      <StringPooling>true</StringPooling>
     316      <MinimalRebuild>false</MinimalRebuild>
     317      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
     318      <AdditionalIncludeDirectories>$(ZLibSrcDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     319      <TreatWarningAsError>$(TreatWarningAsError)</TreatWarningAsError>
     320      <Optimization>Full</Optimization>
     321    </ClCompile>
     322    <Link>
     323      <SubSystem>Windows</SubSystem>
     324      <GenerateDebugInformation>true</GenerateDebugInformation>
     325      <EnableCOMDATFolding>true</EnableCOMDATFolding>
     326      <OptimizeReferences>true</OptimizeReferences>
     327      <AdditionalDependencies>zlib.lib</AdditionalDependencies>
     328      <Version>16</Version>
     329      <AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
     330    </Link>
     331  </ItemDefinitionGroup>
    171332  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'">
    172333    <ClCompile>
    173       <WarningLevel>$(WarningLevel)</WarningLevel>
     334      <WarningLevel>Level3</WarningLevel>
    174335      <PrecompiledHeader>Use</PrecompiledHeader>
    175336      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     
    177338      <FunctionLevelLinking>true</FunctionLevelLinking>
    178339      <IntrinsicFunctions>true</IntrinsicFunctions>
    179       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    180       <FloatingPointExceptions>false</FloatingPointExceptions>
    181       <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
    182       <PrecompiledHeaderFile>pngpriv.h</PrecompiledHeaderFile>
    183       <BrowseInformation>true</BrowseInformation>
    184       <CompileAs>CompileAsC</CompileAs>
    185       <StringPooling>true</StringPooling>
    186       <MinimalRebuild>false</MinimalRebuild>
    187       <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
    188       <AdditionalIncludeDirectories>$(ZLibSrcDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    189       <TreatWarningAsError>$(TreatWarningAsError)</TreatWarningAsError>
     340      <PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     341      <FloatingPointExceptions>false</FloatingPointExceptions>
     342      <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
     343      <PrecompiledHeaderFile>pngpriv.h</PrecompiledHeaderFile>
     344      <BrowseInformation>true</BrowseInformation>
     345      <CompileAs>CompileAsC</CompileAs>
     346      <StringPooling>true</StringPooling>
     347      <MinimalRebuild>false</MinimalRebuild>
     348      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
     349      <AdditionalIncludeDirectories>$(ZLibSrcDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     350      <TreatWarningAsError>false</TreatWarningAsError>
    190351      <Optimization>Full</Optimization>
    191352      <WholeProgramOptimization>true</WholeProgramOptimization>
     
    201362    </Lib>
    202363  </ItemDefinitionGroup>
     364  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|ARM64'">
     365    <ClCompile>
     366      <WarningLevel>Level3</WarningLevel>
     367      <PrecompiledHeader>Use</PrecompiledHeader>
     368      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     369      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
     370      <FunctionLevelLinking>true</FunctionLevelLinking>
     371      <IntrinsicFunctions>true</IntrinsicFunctions>
     372      <PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     373      <FloatingPointExceptions>false</FloatingPointExceptions>
     374      <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
     375      <PrecompiledHeaderFile>pngpriv.h</PrecompiledHeaderFile>
     376      <BrowseInformation>true</BrowseInformation>
     377      <CompileAs>CompileAsC</CompileAs>
     378      <StringPooling>true</StringPooling>
     379      <MinimalRebuild>false</MinimalRebuild>
     380      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
     381      <AdditionalIncludeDirectories>$(ZLibSrcDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     382      <TreatWarningAsError>false</TreatWarningAsError>
     383      <Optimization>Full</Optimization>
     384      <WholeProgramOptimization>true</WholeProgramOptimization>
     385    </ClCompile>
     386    <Link>
     387      <SubSystem>Windows</SubSystem>
     388      <GenerateDebugInformation>true</GenerateDebugInformation>
     389      <EnableCOMDATFolding>true</EnableCOMDATFolding>
     390      <OptimizeReferences>true</OptimizeReferences>
     391    </Link>
     392    <Lib>
     393      <LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>
     394    </Lib>
     395  </ItemDefinitionGroup>
    203396  <ItemGroup>
     397    <ClCompile Include="..\..\..\arm\arm_init.c">
     398      <DeploymentContent>true</DeploymentContent>
     399      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Library|ARM64'">WIN32;_DEBUG;PNG_ARM_NEON_OPT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     400      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Library|ARM64'">NotUsing</PrecompiledHeader>
     401      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'">NotUsing</PrecompiledHeader>
     402      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'">NotUsing</PrecompiledHeader>
     403      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
     404      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
     405    </ClCompile>
     406    <ClCompile Include="..\..\..\arm\filter_neon_intrinsics.c">
     407      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Library|ARM64'">NotUsing</PrecompiledHeader>
     408      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Library|ARM64'">WIN32;_DEBUG;PNG_ARM_NEON_OPT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     409      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'">NotUsing</PrecompiledHeader>
     410      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'">NotUsing</PrecompiledHeader>
     411      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
     412      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
     413    </ClCompile>
     414    <ClCompile Include="..\..\..\arm\palette_neon_intrinsics.c">
     415      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Library|ARM64'">NotUsing</PrecompiledHeader>
     416      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Library|ARM64'">WIN32;_DEBUG;PNG_ARM_NEON_OPT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     417      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'">NotUsing</PrecompiledHeader>
     418      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'">NotUsing</PrecompiledHeader>
     419      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
     420      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
     421    </ClCompile>
    204422    <ClCompile Include="..\..\..\png.c">
    205423      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
     424      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">Create</PrecompiledHeader>
    206425      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'">Create</PrecompiledHeader>
     426      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Library|ARM64'">Create</PrecompiledHeader>
    207427      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
     428      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">Create</PrecompiledHeader>
    208429      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'">Create</PrecompiledHeader>
     430      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release Library|ARM64'">Create</PrecompiledHeader>
    209431    </ClCompile>
    210432    <ClCompile Include="..\..\..\pngerror.c" />
     
    226448    <ResourceCompile Include="..\..\..\scripts\pngwin.rc">
    227449      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'">true</ExcludedFromBuild>
     450      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Library|ARM64'">true</ExcludedFromBuild>
    228451      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'">true</ExcludedFromBuild>
     452      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Library|ARM64'">true</ExcludedFromBuild>
    229453    </ResourceCompile>
    230454  </ItemGroup>
  • trunk/src/libs/libpng-1.6.42/projects/vstudio/pnglibconf/pnglibconf.vcxproj

    r96425 r103316  
    22<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    33  <ItemGroup Label="ProjectConfigurations">
     4    <ProjectConfiguration Include="Release|ARM64">
     5      <Configuration>Release</Configuration>
     6      <Platform>ARM64</Platform>
     7    </ProjectConfiguration>
    48    <ProjectConfiguration Include="Release|Win32">
    59      <Configuration>Release</Configuration>
     
    1721    <WholeProgramOptimization>true</WholeProgramOptimization>
    1822    <CharacterSet>MultiByte</CharacterSet>
     23    <PlatformToolset>v142</PlatformToolset>
     24  </PropertyGroup>
     25  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
     26    <ConfigurationType>Application</ConfigurationType>
     27    <UseDebugLibraries>false</UseDebugLibraries>
     28    <WholeProgramOptimization>true</WholeProgramOptimization>
     29    <CharacterSet>MultiByte</CharacterSet>
     30    <PlatformToolset>v142</PlatformToolset>
    1931  </PropertyGroup>
    2032  <Import Project="$(SolutionDir)\zlib.props" />
     
    2537    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    2638  </ImportGroup>
     39  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets">
     40    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
     41  </ImportGroup>
    2742  <PropertyGroup Label="UserMacros" />
    2843  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    2944    <CustomBuildBeforeTargets>Build</CustomBuildBeforeTargets>
    3045  </PropertyGroup>
     46  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
     47    <CustomBuildBeforeTargets>Build</CustomBuildBeforeTargets>
     48  </PropertyGroup>
    3149  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     50    <ClCompile>
     51      <WarningLevel>$(WarningLevel)</WarningLevel>
     52      <Optimization>MaxSpeed</Optimization>
     53      <FunctionLevelLinking>true</FunctionLevelLinking>
     54      <IntrinsicFunctions>true</IntrinsicFunctions>
     55    </ClCompile>
     56    <Link>
     57      <GenerateDebugInformation>true</GenerateDebugInformation>
     58      <EnableCOMDATFolding>true</EnableCOMDATFolding>
     59      <OptimizeReferences>true</OptimizeReferences>
     60    </Link>
     61    <CustomBuildStep>
     62      <Command>copy ..\..\..\scripts\pnglibconf.h.prebuilt ..\..\..\pnglibconf.h</Command>
     63    </CustomBuildStep>
     64    <CustomBuildStep>
     65      <Message>Generating pnglibconf.h</Message>
     66    </CustomBuildStep>
     67    <CustomBuildStep>
     68      <Outputs>..\..\..\pnglibconf.h</Outputs>
     69    </CustomBuildStep>
     70    <CustomBuildStep>
     71      <Inputs>..\..\..\scripts\pnglibconf.h.prebuilt</Inputs>
     72    </CustomBuildStep>
     73  </ItemDefinitionGroup>
     74  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
    3275    <ClCompile>
    3376      <WarningLevel>$(WarningLevel)</WarningLevel>
  • trunk/src/libs/libpng-1.6.42/projects/vstudio/pngstest/pngstest.vcxproj

    r96425 r103316  
    22<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    33  <ItemGroup Label="ProjectConfigurations">
     4    <ProjectConfiguration Include="Debug Library|ARM64">
     5      <Configuration>Debug Library</Configuration>
     6      <Platform>ARM64</Platform>
     7    </ProjectConfiguration>
    48    <ProjectConfiguration Include="Debug Library|Win32">
    59      <Configuration>Debug Library</Configuration>
    610      <Platform>Win32</Platform>
    711    </ProjectConfiguration>
     12    <ProjectConfiguration Include="Debug|ARM64">
     13      <Configuration>Debug</Configuration>
     14      <Platform>ARM64</Platform>
     15    </ProjectConfiguration>
    816    <ProjectConfiguration Include="Debug|Win32">
    917      <Configuration>Debug</Configuration>
    1018      <Platform>Win32</Platform>
    1119    </ProjectConfiguration>
     20    <ProjectConfiguration Include="Release Library|ARM64">
     21      <Configuration>Release Library</Configuration>
     22      <Platform>ARM64</Platform>
     23    </ProjectConfiguration>
    1224    <ProjectConfiguration Include="Release Library|Win32">
    1325      <Configuration>Release Library</Configuration>
    1426      <Platform>Win32</Platform>
     27    </ProjectConfiguration>
     28    <ProjectConfiguration Include="Release|ARM64">
     29      <Configuration>Release</Configuration>
     30      <Platform>ARM64</Platform>
    1531    </ProjectConfiguration>
    1632    <ProjectConfiguration Include="Release|Win32">
     
    2945    <ConfigurationType>Application</ConfigurationType>
    3046    <CharacterSet>Unicode</CharacterSet>
     47    <PlatformToolset>v142</PlatformToolset>
     48  </PropertyGroup>
     49  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
     50    <ConfigurationType>Application</ConfigurationType>
     51    <CharacterSet>Unicode</CharacterSet>
     52    <PlatformToolset>v142</PlatformToolset>
    3153  </PropertyGroup>
    3254  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'" Label="Configuration">
    3355    <ConfigurationType>Application</ConfigurationType>
    3456    <CharacterSet>Unicode</CharacterSet>
     57    <PlatformToolset>v142</PlatformToolset>
     58  </PropertyGroup>
     59  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|ARM64'" Label="Configuration">
     60    <ConfigurationType>Application</ConfigurationType>
     61    <CharacterSet>Unicode</CharacterSet>
     62    <PlatformToolset>v142</PlatformToolset>
    3563  </PropertyGroup>
    3664  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    3765    <ConfigurationType>Application</ConfigurationType>
    3866    <CharacterSet>Unicode</CharacterSet>
     67    <PlatformToolset>v142</PlatformToolset>
     68  </PropertyGroup>
     69  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
     70    <ConfigurationType>Application</ConfigurationType>
     71    <CharacterSet>Unicode</CharacterSet>
     72    <PlatformToolset>v142</PlatformToolset>
    3973  </PropertyGroup>
    4074  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'" Label="Configuration">
    4175    <ConfigurationType>Application</ConfigurationType>
    4276    <CharacterSet>Unicode</CharacterSet>
     77    <PlatformToolset>v142</PlatformToolset>
     78  </PropertyGroup>
     79  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|ARM64'" Label="Configuration">
     80    <ConfigurationType>Application</ConfigurationType>
     81    <CharacterSet>Unicode</CharacterSet>
     82    <PlatformToolset>v142</PlatformToolset>
    4383  </PropertyGroup>
    4484  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
     
    4888    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    4989  </ImportGroup>
     90  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets">
     91    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
     92  </ImportGroup>
    5093  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'" Label="PropertySheets">
    5194    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
    5295  </ImportGroup>
     96  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|ARM64'" Label="PropertySheets">
     97    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
     98  </ImportGroup>
    5399  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    54100    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    55101  </ImportGroup>
     102  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets">
     103    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
     104  </ImportGroup>
    56105  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'" Label="PropertySheets">
    57106    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
    58107  </ImportGroup>
     108  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|ARM64'" Label="PropertySheets">
     109    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
     110  </ImportGroup>
    59111  <PropertyGroup Label="UserMacros" />
    60112  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     
    62114    <CustomBuildAfterTargets />
    63115  </PropertyGroup>
     116  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
     117    <LinkIncremental>false</LinkIncremental>
     118    <CustomBuildAfterTargets />
     119  </PropertyGroup>
    64120  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'">
    65121    <LinkIncremental>false</LinkIncremental>
    66122    <CustomBuildAfterTargets />
    67123  </PropertyGroup>
     124  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|ARM64'">
     125    <LinkIncremental>false</LinkIncremental>
     126    <CustomBuildAfterTargets />
     127  </PropertyGroup>
    68128  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    69129    <LinkIncremental>false</LinkIncremental>
    70130    <CustomBuildAfterTargets />
    71131  </PropertyGroup>
     132  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
     133    <LinkIncremental>false</LinkIncremental>
     134    <CustomBuildAfterTargets />
     135  </PropertyGroup>
    72136  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'">
    73137    <LinkIncremental>false</LinkIncremental>
    74138    <CustomBuildAfterTargets />
    75139  </PropertyGroup>
     140  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|ARM64'">
     141    <LinkIncremental>false</LinkIncremental>
     142    <CustomBuildAfterTargets />
     143  </PropertyGroup>
    76144  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    77145    <ClCompile>
    78146      <PrecompiledHeader>NotUsing</PrecompiledHeader>
    79       <WarningLevel>$(WarningLevel)</WarningLevel>
     147      <WarningLevel>Level3</WarningLevel>
    80148      <MinimalRebuild>false</MinimalRebuild>
    81149      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     
    86154      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
    87155      <CompileAsManaged>false</CompileAsManaged>
    88       <TreatWarningAsError>$(TreatWarningAsError)</TreatWarningAsError>
     156      <TreatWarningAsError>false</TreatWarningAsError>
    89157      <IntrinsicFunctions>true</IntrinsicFunctions>
    90158      <StringPooling>true</StringPooling>
     
    107175    </CustomBuildStep>
    108176  </ItemDefinitionGroup>
     177  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
     178    <ClCompile>
     179      <PrecompiledHeader>NotUsing</PrecompiledHeader>
     180      <WarningLevel>Level3</WarningLevel>
     181      <MinimalRebuild>false</MinimalRebuild>
     182      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     183      <Optimization>Disabled</Optimization>
     184      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
     185      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PNG_USE_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     186      <AdditionalIncludeDirectories>$(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     187      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
     188      <CompileAsManaged>false</CompileAsManaged>
     189      <TreatWarningAsError>false</TreatWarningAsError>
     190      <IntrinsicFunctions>true</IntrinsicFunctions>
     191      <StringPooling>true</StringPooling>
     192      <FunctionLevelLinking>false</FunctionLevelLinking>
     193      <BrowseInformation>true</BrowseInformation>
     194      <FloatingPointExceptions>false</FloatingPointExceptions>
     195      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
     196    </ClCompile>
     197    <Link>
     198      <SubSystem>Console</SubSystem>
     199      <GenerateDebugInformation>true</GenerateDebugInformation>
     200      <AdditionalDependencies>libpng16.lib</AdditionalDependencies>
     201      <AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
     202    </Link>
     203    <CustomBuildStep>
     204      <Message>Executing libpng simplified API test program</Message>
     205      <Command>"$(OutDir)pngstest.exe" --strict --log --touch "$(IntDir)pngstest.out" ../../../contrib/pngsuite/basn0g01.png ../../../contrib/pngsuite/basn0g02.png ../../../contrib/pngsuite/basn0g04.png ../../../contrib/pngsuite/basn0g08.png ../../../contrib/pngsuite/basn0g16.png ../../../contrib/pngsuite/basn2c08.png ../../../contrib/pngsuite/basn2c16.png ../../../contrib/pngsuite/basn3p01.png ../../../contrib/pngsuite/basn3p02.png ../../../contrib/pngsuite/basn3p04.png ../../../contrib/pngsuite/basn3p08.png ../../../contrib/pngsuite/basn4a08.png ../../../contrib/pngsuite/basn4a16.png ../../../contrib/pngsuite/basn6a08.png ../../../contrib/pngsuite/basn6a16.png ../../../contrib/pngsuite/ftbbn0g01.png ../../../contrib/pngsuite/ftbbn0g02.png ../../../contrib/pngsuite/ftbbn0g04.png ../../../contrib/pngsuite/ftbbn2c16.png ../../../contrib/pngsuite/ftbbn3p08.png ../../../contrib/pngsuite/ftbgn2c16.png ../../../contrib/pngsuite/ftbgn3p08.png ../../../contrib/pngsuite/ftbrn2c08.png ../../../contrib/pngsuite/ftbwn0g16.png ../../../contrib/pngsuite/ftbwn3p08.png ../../../contrib/pngsuite/ftbyn3p08.png ../../../contrib/pngsuite/ftp0n0g08.png ../../../contrib/pngsuite/ftp0n2c08.png ../../../contrib/pngsuite/ftp0n3p08.png ../../../contrib/pngsuite/ftp1n3p08.png</Command>
     206      <Outputs>$(IntDir)pngstest.out</Outputs>
     207      <Inputs>$(OutDir)pngstest.exe</Inputs>
     208    </CustomBuildStep>
     209  </ItemDefinitionGroup>
    109210  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'">
    110211    <ClCompile>
    111212      <PrecompiledHeader>NotUsing</PrecompiledHeader>
    112       <WarningLevel>$(WarningLevel)</WarningLevel>
     213      <WarningLevel>Level3</WarningLevel>
    113214      <MinimalRebuild>false</MinimalRebuild>
    114215      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     
    120221      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
    121222      <CompileAsManaged>false</CompileAsManaged>
    122       <TreatWarningAsError>$(TreatWarningAsError)</TreatWarningAsError>
     223      <TreatWarningAsError>false</TreatWarningAsError>
     224      <IntrinsicFunctions>true</IntrinsicFunctions>
     225      <StringPooling>true</StringPooling>
     226      <FunctionLevelLinking>false</FunctionLevelLinking>
     227      <BrowseInformation>true</BrowseInformation>
     228      <FloatingPointExceptions>false</FloatingPointExceptions>
     229    </ClCompile>
     230    <Link>
     231      <SubSystem>Console</SubSystem>
     232      <GenerateDebugInformation>true</GenerateDebugInformation>
     233      <AdditionalDependencies>libpng16.lib;zlib.lib</AdditionalDependencies>
     234      <AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
     235    </Link>
     236    <CustomBuildStep>
     237      <Message>Executing libpng simplified API test program</Message>
     238      <Command>"$(OutDir)pngstest.exe" --strict --log --touch "$(IntDir)pngstest.out" ../../../contrib/pngsuite/basn0g01.png ../../../contrib/pngsuite/basn0g02.png ../../../contrib/pngsuite/basn0g04.png ../../../contrib/pngsuite/basn0g08.png ../../../contrib/pngsuite/basn0g16.png ../../../contrib/pngsuite/basn2c08.png ../../../contrib/pngsuite/basn2c16.png ../../../contrib/pngsuite/basn3p01.png ../../../contrib/pngsuite/basn3p02.png ../../../contrib/pngsuite/basn3p04.png ../../../contrib/pngsuite/basn3p08.png ../../../contrib/pngsuite/basn4a08.png ../../../contrib/pngsuite/basn4a16.png ../../../contrib/pngsuite/basn6a08.png ../../../contrib/pngsuite/basn6a16.png ../../../contrib/pngsuite/ftbbn0g01.png ../../../contrib/pngsuite/ftbbn0g02.png ../../../contrib/pngsuite/ftbbn0g04.png ../../../contrib/pngsuite/ftbbn2c16.png ../../../contrib/pngsuite/ftbbn3p08.png ../../../contrib/pngsuite/ftbgn2c16.png ../../../contrib/pngsuite/ftbgn3p08.png ../../../contrib/pngsuite/ftbrn2c08.png ../../../contrib/pngsuite/ftbwn0g16.png ../../../contrib/pngsuite/ftbwn3p08.png ../../../contrib/pngsuite/ftbyn3p08.png ../../../contrib/pngsuite/ftp0n0g08.png ../../../contrib/pngsuite/ftp0n2c08.png ../../../contrib/pngsuite/ftp0n3p08.png ../../../contrib/pngsuite/ftp1n3p08.png</Command>
     239      <Outputs>$(IntDir)pngstest.out</Outputs>
     240      <Inputs>$(OutDir)pngstest.exe</Inputs>
     241    </CustomBuildStep>
     242  </ItemDefinitionGroup>
     243  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|ARM64'">
     244    <ClCompile>
     245      <PrecompiledHeader>NotUsing</PrecompiledHeader>
     246      <WarningLevel>Level3</WarningLevel>
     247      <MinimalRebuild>false</MinimalRebuild>
     248      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     249      <Optimization>Disabled</Optimization>
     250      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
     251      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
     252      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     253      <AdditionalIncludeDirectories>$(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     254      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
     255      <CompileAsManaged>false</CompileAsManaged>
     256      <TreatWarningAsError>false</TreatWarningAsError>
    123257      <IntrinsicFunctions>true</IntrinsicFunctions>
    124258      <StringPooling>true</StringPooling>
     
    175309    </CustomBuildStep>
    176310  </ItemDefinitionGroup>
     311  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
     312    <ClCompile>
     313      <WarningLevel>$(WarningLevel)</WarningLevel>
     314      <PrecompiledHeader>NotUsing</PrecompiledHeader>
     315      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     316      <Optimization>Full</Optimization>
     317      <FunctionLevelLinking>false</FunctionLevelLinking>
     318      <IntrinsicFunctions>true</IntrinsicFunctions>
     319      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;PNG_USE_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     320      <AdditionalIncludeDirectories>$(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     321      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
     322      <CompileAsManaged>false</CompileAsManaged>
     323      <TreatWarningAsError>$(TreatWarningAsError)</TreatWarningAsError>
     324      <StringPooling>true</StringPooling>
     325      <MinimalRebuild>false</MinimalRebuild>
     326      <BrowseInformation>true</BrowseInformation>
     327      <WholeProgramOptimization>true</WholeProgramOptimization>
     328      <FloatingPointExceptions>false</FloatingPointExceptions>
     329    </ClCompile>
     330    <Link>
     331      <SubSystem>Console</SubSystem>
     332      <GenerateDebugInformation>true</GenerateDebugInformation>
     333      <EnableCOMDATFolding>true</EnableCOMDATFolding>
     334      <OptimizeReferences>true</OptimizeReferences>
     335      <AdditionalDependencies>libpng16.lib</AdditionalDependencies>
     336      <AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
     337      <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
     338    </Link>
     339    <CustomBuildStep>
     340      <Message>Executing libpng simplified API test program</Message>
     341      <Command>"$(OutDir)pngstest.exe" --strict --log --touch "$(IntDir)pngstest.out" ../../../contrib/pngsuite/basn0g01.png ../../../contrib/pngsuite/basn0g02.png ../../../contrib/pngsuite/basn0g04.png ../../../contrib/pngsuite/basn0g08.png ../../../contrib/pngsuite/basn0g16.png ../../../contrib/pngsuite/basn2c08.png ../../../contrib/pngsuite/basn2c16.png ../../../contrib/pngsuite/basn3p01.png ../../../contrib/pngsuite/basn3p02.png ../../../contrib/pngsuite/basn3p04.png ../../../contrib/pngsuite/basn3p08.png ../../../contrib/pngsuite/basn4a08.png ../../../contrib/pngsuite/basn4a16.png ../../../contrib/pngsuite/basn6a08.png ../../../contrib/pngsuite/basn6a16.png ../../../contrib/pngsuite/ftbbn0g01.png ../../../contrib/pngsuite/ftbbn0g02.png ../../../contrib/pngsuite/ftbbn0g04.png ../../../contrib/pngsuite/ftbbn2c16.png ../../../contrib/pngsuite/ftbbn3p08.png ../../../contrib/pngsuite/ftbgn2c16.png ../../../contrib/pngsuite/ftbgn3p08.png ../../../contrib/pngsuite/ftbrn2c08.png ../../../contrib/pngsuite/ftbwn0g16.png ../../../contrib/pngsuite/ftbwn3p08.png ../../../contrib/pngsuite/ftbyn3p08.png ../../../contrib/pngsuite/ftp0n0g08.png ../../../contrib/pngsuite/ftp0n2c08.png ../../../contrib/pngsuite/ftp0n3p08.png ../../../contrib/pngsuite/ftp1n3p08.png</Command>
     342      <Outputs>$(IntDir)pngstest.out</Outputs>
     343      <Inputs>$(OutDir)pngstest.exe</Inputs>
     344    </CustomBuildStep>
     345  </ItemDefinitionGroup>
    177346  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'">
    178347    <ClCompile>
    179       <WarningLevel>$(WarningLevel)</WarningLevel>
     348      <WarningLevel>Level3</WarningLevel>
    180349      <PrecompiledHeader>NotUsing</PrecompiledHeader>
    181350      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     
    188357      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
    189358      <CompileAsManaged>false</CompileAsManaged>
    190       <TreatWarningAsError>$(TreatWarningAsError)</TreatWarningAsError>
     359      <TreatWarningAsError>false</TreatWarningAsError>
     360      <StringPooling>true</StringPooling>
     361      <MinimalRebuild>false</MinimalRebuild>
     362      <BrowseInformation>true</BrowseInformation>
     363      <WholeProgramOptimization>true</WholeProgramOptimization>
     364      <FloatingPointExceptions>false</FloatingPointExceptions>
     365    </ClCompile>
     366    <Link>
     367      <SubSystem>Console</SubSystem>
     368      <GenerateDebugInformation>true</GenerateDebugInformation>
     369      <EnableCOMDATFolding>true</EnableCOMDATFolding>
     370      <OptimizeReferences>true</OptimizeReferences>
     371      <AdditionalDependencies>libpng16.lib;zlib.lib</AdditionalDependencies>
     372      <AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
     373      <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
     374    </Link>
     375    <CustomBuildStep>
     376      <Message>Executing libpng simplified API test program</Message>
     377      <Command>"$(OutDir)pngstest.exe" --strict --log --touch "$(IntDir)pngstest.out" ../../../contrib/pngsuite/basn0g01.png ../../../contrib/pngsuite/basn0g02.png ../../../contrib/pngsuite/basn0g04.png ../../../contrib/pngsuite/basn0g08.png ../../../contrib/pngsuite/basn0g16.png ../../../contrib/pngsuite/basn2c08.png ../../../contrib/pngsuite/basn2c16.png ../../../contrib/pngsuite/basn3p01.png ../../../contrib/pngsuite/basn3p02.png ../../../contrib/pngsuite/basn3p04.png ../../../contrib/pngsuite/basn3p08.png ../../../contrib/pngsuite/basn4a08.png ../../../contrib/pngsuite/basn4a16.png ../../../contrib/pngsuite/basn6a08.png ../../../contrib/pngsuite/basn6a16.png ../../../contrib/pngsuite/ftbbn0g01.png ../../../contrib/pngsuite/ftbbn0g02.png ../../../contrib/pngsuite/ftbbn0g04.png ../../../contrib/pngsuite/ftbbn2c16.png ../../../contrib/pngsuite/ftbbn3p08.png ../../../contrib/pngsuite/ftbgn2c16.png ../../../contrib/pngsuite/ftbgn3p08.png ../../../contrib/pngsuite/ftbrn2c08.png ../../../contrib/pngsuite/ftbwn0g16.png ../../../contrib/pngsuite/ftbwn3p08.png ../../../contrib/pngsuite/ftbyn3p08.png ../../../contrib/pngsuite/ftp0n0g08.png ../../../contrib/pngsuite/ftp0n2c08.png ../../../contrib/pngsuite/ftp0n3p08.png ../../../contrib/pngsuite/ftp1n3p08.png</Command>
     378      <Outputs>$(IntDir)pngstest.out</Outputs>
     379      <Inputs>$(OutDir)pngstest.exe</Inputs>
     380    </CustomBuildStep>
     381  </ItemDefinitionGroup>
     382  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|ARM64'">
     383    <ClCompile>
     384      <WarningLevel>Level3</WarningLevel>
     385      <PrecompiledHeader>NotUsing</PrecompiledHeader>
     386      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     387      <Optimization>Full</Optimization>
     388      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
     389      <FunctionLevelLinking>false</FunctionLevelLinking>
     390      <IntrinsicFunctions>true</IntrinsicFunctions>
     391      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     392      <AdditionalIncludeDirectories>$(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     393      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
     394      <CompileAsManaged>false</CompileAsManaged>
     395      <TreatWarningAsError>false</TreatWarningAsError>
    191396      <StringPooling>true</StringPooling>
    192397      <MinimalRebuild>false</MinimalRebuild>
  • trunk/src/libs/libpng-1.6.42/projects/vstudio/pngtest/pngtest.vcxproj

    r96425 r103316  
    22<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    33  <ItemGroup Label="ProjectConfigurations">
     4    <ProjectConfiguration Include="Debug Library|ARM64">
     5      <Configuration>Debug Library</Configuration>
     6      <Platform>ARM64</Platform>
     7    </ProjectConfiguration>
    48    <ProjectConfiguration Include="Debug Library|Win32">
    59      <Configuration>Debug Library</Configuration>
    610      <Platform>Win32</Platform>
    711    </ProjectConfiguration>
     12    <ProjectConfiguration Include="Debug|ARM64">
     13      <Configuration>Debug</Configuration>
     14      <Platform>ARM64</Platform>
     15    </ProjectConfiguration>
    816    <ProjectConfiguration Include="Debug|Win32">
    917      <Configuration>Debug</Configuration>
    1018      <Platform>Win32</Platform>
    1119    </ProjectConfiguration>
     20    <ProjectConfiguration Include="Release Library|ARM64">
     21      <Configuration>Release Library</Configuration>
     22      <Platform>ARM64</Platform>
     23    </ProjectConfiguration>
    1224    <ProjectConfiguration Include="Release Library|Win32">
    1325      <Configuration>Release Library</Configuration>
    1426      <Platform>Win32</Platform>
     27    </ProjectConfiguration>
     28    <ProjectConfiguration Include="Release|ARM64">
     29      <Configuration>Release</Configuration>
     30      <Platform>ARM64</Platform>
    1531    </ProjectConfiguration>
    1632    <ProjectConfiguration Include="Release|Win32">
     
    2945    <ConfigurationType>Application</ConfigurationType>
    3046    <CharacterSet>Unicode</CharacterSet>
     47    <PlatformToolset>v142</PlatformToolset>
     48  </PropertyGroup>
     49  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
     50    <ConfigurationType>Application</ConfigurationType>
     51    <CharacterSet>Unicode</CharacterSet>
     52    <PlatformToolset>v142</PlatformToolset>
    3153  </PropertyGroup>
    3254  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'" Label="Configuration">
    3355    <ConfigurationType>Application</ConfigurationType>
    3456    <CharacterSet>Unicode</CharacterSet>
     57    <PlatformToolset>v142</PlatformToolset>
     58  </PropertyGroup>
     59  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|ARM64'" Label="Configuration">
     60    <ConfigurationType>Application</ConfigurationType>
     61    <CharacterSet>Unicode</CharacterSet>
     62    <PlatformToolset>v142</PlatformToolset>
    3563  </PropertyGroup>
    3664  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    3765    <ConfigurationType>Application</ConfigurationType>
    3866    <CharacterSet>Unicode</CharacterSet>
     67    <PlatformToolset>v142</PlatformToolset>
     68  </PropertyGroup>
     69  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
     70    <ConfigurationType>Application</ConfigurationType>
     71    <CharacterSet>Unicode</CharacterSet>
     72    <PlatformToolset>v142</PlatformToolset>
    3973  </PropertyGroup>
    4074  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'" Label="Configuration">
    4175    <ConfigurationType>Application</ConfigurationType>
    4276    <CharacterSet>Unicode</CharacterSet>
     77    <PlatformToolset>v142</PlatformToolset>
     78  </PropertyGroup>
     79  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|ARM64'" Label="Configuration">
     80    <ConfigurationType>Application</ConfigurationType>
     81    <CharacterSet>Unicode</CharacterSet>
     82    <PlatformToolset>v142</PlatformToolset>
    4383  </PropertyGroup>
    4484  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
     
    4888    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    4989  </ImportGroup>
     90  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets">
     91    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
     92  </ImportGroup>
    5093  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'" Label="PropertySheets">
    5194    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
    5295  </ImportGroup>
     96  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|ARM64'" Label="PropertySheets">
     97    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
     98  </ImportGroup>
    5399  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    54100    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    55101  </ImportGroup>
     102  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets">
     103    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
     104  </ImportGroup>
    56105  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'" Label="PropertySheets">
    57106    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
    58107  </ImportGroup>
     108  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|ARM64'" Label="PropertySheets">
     109    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
     110  </ImportGroup>
    59111  <PropertyGroup Label="UserMacros" />
    60112  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     
    62114    <CustomBuildAfterTargets />
    63115  </PropertyGroup>
     116  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
     117    <LinkIncremental>false</LinkIncremental>
     118    <CustomBuildAfterTargets />
     119  </PropertyGroup>
    64120  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'">
    65121    <LinkIncremental>false</LinkIncremental>
    66122    <CustomBuildAfterTargets />
    67123  </PropertyGroup>
     124  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|ARM64'">
     125    <LinkIncremental>false</LinkIncremental>
     126    <CustomBuildAfterTargets />
     127  </PropertyGroup>
    68128  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    69129    <LinkIncremental>false</LinkIncremental>
    70130    <CustomBuildAfterTargets />
    71131  </PropertyGroup>
     132  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
     133    <LinkIncremental>false</LinkIncremental>
     134    <CustomBuildAfterTargets />
     135  </PropertyGroup>
    72136  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'">
    73137    <LinkIncremental>false</LinkIncremental>
    74138    <CustomBuildAfterTargets />
    75139  </PropertyGroup>
     140  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|ARM64'">
     141    <LinkIncremental>false</LinkIncremental>
     142    <CustomBuildAfterTargets />
     143  </PropertyGroup>
    76144  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    77145    <ClCompile>
    78146      <PrecompiledHeader>NotUsing</PrecompiledHeader>
    79       <WarningLevel>$(WarningLevel)</WarningLevel>
     147      <WarningLevel>Level3</WarningLevel>
    80148      <MinimalRebuild>false</MinimalRebuild>
    81149      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     
    86154      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
    87155      <CompileAsManaged>false</CompileAsManaged>
    88       <TreatWarningAsError>$(TreatWarningAsError)</TreatWarningAsError>
     156      <TreatWarningAsError>false</TreatWarningAsError>
    89157      <IntrinsicFunctions>true</IntrinsicFunctions>
    90158      <StringPooling>true</StringPooling>
     
    107175    </CustomBuildStep>
    108176  </ItemDefinitionGroup>
     177  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
     178    <ClCompile>
     179      <PrecompiledHeader>NotUsing</PrecompiledHeader>
     180      <WarningLevel>Level3</WarningLevel>
     181      <MinimalRebuild>false</MinimalRebuild>
     182      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     183      <Optimization>Disabled</Optimization>
     184      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
     185      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     186      <AdditionalIncludeDirectories>$(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     187      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
     188      <CompileAsManaged>false</CompileAsManaged>
     189      <TreatWarningAsError>false</TreatWarningAsError>
     190      <IntrinsicFunctions>true</IntrinsicFunctions>
     191      <StringPooling>true</StringPooling>
     192      <FunctionLevelLinking>false</FunctionLevelLinking>
     193      <BrowseInformation>true</BrowseInformation>
     194      <FloatingPointExceptions>false</FloatingPointExceptions>
     195      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
     196    </ClCompile>
     197    <Link>
     198      <SubSystem>Console</SubSystem>
     199      <GenerateDebugInformation>true</GenerateDebugInformation>
     200      <AdditionalDependencies>libpng16.lib</AdditionalDependencies>
     201      <AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
     202    </Link>
     203    <CustomBuildStep>
     204      <Message>Executing PNG test program</Message>
     205      <Command>"$(OutDir)pngtest.exe" ..\..\..\pngtest.png "$(IntDir)pngout.png"</Command>
     206      <Outputs>$(IntDir)pngout.png</Outputs>
     207      <Inputs>..\..\..\pngtest.png;$(OutDir)pngtest.exe</Inputs>
     208    </CustomBuildStep>
     209  </ItemDefinitionGroup>
    109210  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'">
    110211    <ClCompile>
    111212      <PrecompiledHeader>NotUsing</PrecompiledHeader>
    112       <WarningLevel>$(WarningLevel)</WarningLevel>
     213      <WarningLevel>Level3</WarningLevel>
    113214      <MinimalRebuild>false</MinimalRebuild>
    114215      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     
    120221      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
    121222      <CompileAsManaged>false</CompileAsManaged>
    122       <TreatWarningAsError>$(TreatWarningAsError)</TreatWarningAsError>
     223      <TreatWarningAsError>false</TreatWarningAsError>
     224      <IntrinsicFunctions>true</IntrinsicFunctions>
     225      <StringPooling>true</StringPooling>
     226      <FunctionLevelLinking>false</FunctionLevelLinking>
     227      <BrowseInformation>true</BrowseInformation>
     228      <FloatingPointExceptions>false</FloatingPointExceptions>
     229    </ClCompile>
     230    <Link>
     231      <SubSystem>Console</SubSystem>
     232      <GenerateDebugInformation>true</GenerateDebugInformation>
     233      <AdditionalDependencies>libpng16.lib;zlib.lib</AdditionalDependencies>
     234      <AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
     235    </Link>
     236    <CustomBuildStep>
     237      <Message>Executing PNG test program</Message>
     238      <Command>"$(OutDir)pngtest.exe" ..\..\..\pngtest.png "$(IntDir)pngout.png"</Command>
     239      <Outputs>$(IntDir)pngout.png</Outputs>
     240      <Inputs>..\..\..\pngtest.png;$(OutDir)pngtest.exe</Inputs>
     241    </CustomBuildStep>
     242  </ItemDefinitionGroup>
     243  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|ARM64'">
     244    <ClCompile>
     245      <PrecompiledHeader>NotUsing</PrecompiledHeader>
     246      <WarningLevel>Level3</WarningLevel>
     247      <MinimalRebuild>false</MinimalRebuild>
     248      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     249      <Optimization>Disabled</Optimization>
     250      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
     251      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
     252      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     253      <AdditionalIncludeDirectories>$(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     254      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
     255      <CompileAsManaged>false</CompileAsManaged>
     256      <TreatWarningAsError>false</TreatWarningAsError>
    123257      <IntrinsicFunctions>true</IntrinsicFunctions>
    124258      <StringPooling>true</StringPooling>
     
    175309    </CustomBuildStep>
    176310  </ItemDefinitionGroup>
     311  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
     312    <ClCompile>
     313      <WarningLevel>$(WarningLevel)</WarningLevel>
     314      <PrecompiledHeader>NotUsing</PrecompiledHeader>
     315      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     316      <Optimization>Full</Optimization>
     317      <FunctionLevelLinking>false</FunctionLevelLinking>
     318      <IntrinsicFunctions>true</IntrinsicFunctions>
     319      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     320      <AdditionalIncludeDirectories>$(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     321      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
     322      <CompileAsManaged>false</CompileAsManaged>
     323      <TreatWarningAsError>$(TreatWarningAsError)</TreatWarningAsError>
     324      <StringPooling>true</StringPooling>
     325      <MinimalRebuild>false</MinimalRebuild>
     326      <BrowseInformation>true</BrowseInformation>
     327      <WholeProgramOptimization>true</WholeProgramOptimization>
     328      <FloatingPointExceptions>false</FloatingPointExceptions>
     329    </ClCompile>
     330    <Link>
     331      <SubSystem>Console</SubSystem>
     332      <GenerateDebugInformation>true</GenerateDebugInformation>
     333      <EnableCOMDATFolding>true</EnableCOMDATFolding>
     334      <OptimizeReferences>true</OptimizeReferences>
     335      <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
     336      <AdditionalDependencies>libpng16.lib</AdditionalDependencies>
     337      <AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
     338    </Link>
     339    <CustomBuildStep>
     340      <Message>Executing PNG test program</Message>
     341      <Command>"$(OutDir)pngtest.exe" ..\..\..\pngtest.png "$(IntDir)pngout.png"</Command>
     342      <Outputs>$(IntDir)pngout.png</Outputs>
     343      <Inputs>..\..\..\pngtest.png;$(OutDir)pngtest.exe</Inputs>
     344    </CustomBuildStep>
     345  </ItemDefinitionGroup>
    177346  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'">
    178347    <ClCompile>
    179       <WarningLevel>$(WarningLevel)</WarningLevel>
     348      <WarningLevel>Level3</WarningLevel>
    180349      <PrecompiledHeader>NotUsing</PrecompiledHeader>
    181350      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     
    188357      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
    189358      <CompileAsManaged>false</CompileAsManaged>
    190       <TreatWarningAsError>$(TreatWarningAsError)</TreatWarningAsError>
     359      <TreatWarningAsError>false</TreatWarningAsError>
     360      <StringPooling>true</StringPooling>
     361      <MinimalRebuild>false</MinimalRebuild>
     362      <BrowseInformation>true</BrowseInformation>
     363      <WholeProgramOptimization>true</WholeProgramOptimization>
     364      <FloatingPointExceptions>false</FloatingPointExceptions>
     365    </ClCompile>
     366    <Link>
     367      <SubSystem>Console</SubSystem>
     368      <GenerateDebugInformation>true</GenerateDebugInformation>
     369      <EnableCOMDATFolding>true</EnableCOMDATFolding>
     370      <OptimizeReferences>true</OptimizeReferences>
     371      <AdditionalDependencies>libpng16.lib;zlib.lib</AdditionalDependencies>
     372      <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
     373      <AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
     374    </Link>
     375    <CustomBuildStep>
     376      <Message>Executing PNG test program</Message>
     377      <Command>$(OutDir)pngtest.exe ..\..\..\pngtest.png $(IntDir)pngout.png</Command>
     378      <Command>"$(OutDir)pngtest.exe" ..\..\..\pngtest.png "$(IntDir)pngout.png"</Command>
     379      <Outputs>$(IntDir)pngout.png</Outputs>
     380      <Inputs>..\..\..\pngtest.png;$(OutDir)pngtest.exe</Inputs>
     381    </CustomBuildStep>
     382  </ItemDefinitionGroup>
     383  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|ARM64'">
     384    <ClCompile>
     385      <WarningLevel>Level3</WarningLevel>
     386      <PrecompiledHeader>NotUsing</PrecompiledHeader>
     387      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     388      <Optimization>Full</Optimization>
     389      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
     390      <FunctionLevelLinking>false</FunctionLevelLinking>
     391      <IntrinsicFunctions>true</IntrinsicFunctions>
     392      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     393      <AdditionalIncludeDirectories>$(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     394      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
     395      <CompileAsManaged>false</CompileAsManaged>
     396      <TreatWarningAsError>false</TreatWarningAsError>
    191397      <StringPooling>true</StringPooling>
    192398      <MinimalRebuild>false</MinimalRebuild>
  • trunk/src/libs/libpng-1.6.42/projects/vstudio/pngunknown/pngunknown.vcxproj

    r96425 r103316  
    22<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    33  <ItemGroup Label="ProjectConfigurations">
     4    <ProjectConfiguration Include="Debug Library|ARM64">
     5      <Configuration>Debug Library</Configuration>
     6      <Platform>ARM64</Platform>
     7    </ProjectConfiguration>
    48    <ProjectConfiguration Include="Debug Library|Win32">
    59      <Configuration>Debug Library</Configuration>
    610      <Platform>Win32</Platform>
    711    </ProjectConfiguration>
     12    <ProjectConfiguration Include="Debug|ARM64">
     13      <Configuration>Debug</Configuration>
     14      <Platform>ARM64</Platform>
     15    </ProjectConfiguration>
    816    <ProjectConfiguration Include="Debug|Win32">
    917      <Configuration>Debug</Configuration>
    1018      <Platform>Win32</Platform>
    1119    </ProjectConfiguration>
     20    <ProjectConfiguration Include="Release Library|ARM64">
     21      <Configuration>Release Library</Configuration>
     22      <Platform>ARM64</Platform>
     23    </ProjectConfiguration>
    1224    <ProjectConfiguration Include="Release Library|Win32">
    1325      <Configuration>Release Library</Configuration>
    1426      <Platform>Win32</Platform>
     27    </ProjectConfiguration>
     28    <ProjectConfiguration Include="Release|ARM64">
     29      <Configuration>Release</Configuration>
     30      <Platform>ARM64</Platform>
    1531    </ProjectConfiguration>
    1632    <ProjectConfiguration Include="Release|Win32">
     
    2945    <ConfigurationType>Application</ConfigurationType>
    3046    <CharacterSet>Unicode</CharacterSet>
     47    <PlatformToolset>v142</PlatformToolset>
     48  </PropertyGroup>
     49  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
     50    <ConfigurationType>Application</ConfigurationType>
     51    <CharacterSet>Unicode</CharacterSet>
     52    <PlatformToolset>v142</PlatformToolset>
    3153  </PropertyGroup>
    3254  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'" Label="Configuration">
    3355    <ConfigurationType>Application</ConfigurationType>
    3456    <CharacterSet>Unicode</CharacterSet>
     57    <PlatformToolset>v142</PlatformToolset>
     58  </PropertyGroup>
     59  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|ARM64'" Label="Configuration">
     60    <ConfigurationType>Application</ConfigurationType>
     61    <CharacterSet>Unicode</CharacterSet>
     62    <PlatformToolset>v142</PlatformToolset>
    3563  </PropertyGroup>
    3664  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    3765    <ConfigurationType>Application</ConfigurationType>
    3866    <CharacterSet>Unicode</CharacterSet>
     67    <PlatformToolset>v142</PlatformToolset>
     68  </PropertyGroup>
     69  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
     70    <ConfigurationType>Application</ConfigurationType>
     71    <CharacterSet>Unicode</CharacterSet>
     72    <PlatformToolset>v142</PlatformToolset>
    3973  </PropertyGroup>
    4074  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'" Label="Configuration">
    4175    <ConfigurationType>Application</ConfigurationType>
    4276    <CharacterSet>Unicode</CharacterSet>
     77    <PlatformToolset>v142</PlatformToolset>
     78  </PropertyGroup>
     79  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|ARM64'" Label="Configuration">
     80    <ConfigurationType>Application</ConfigurationType>
     81    <CharacterSet>Unicode</CharacterSet>
     82    <PlatformToolset>v142</PlatformToolset>
    4383  </PropertyGroup>
    4484  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
     
    4888    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    4989  </ImportGroup>
     90  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets">
     91    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
     92  </ImportGroup>
    5093  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'" Label="PropertySheets">
    5194    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
    5295  </ImportGroup>
     96  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|ARM64'" Label="PropertySheets">
     97    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
     98  </ImportGroup>
    5399  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    54100    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    55101  </ImportGroup>
     102  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets">
     103    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
     104  </ImportGroup>
    56105  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'" Label="PropertySheets">
    57106    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
    58107  </ImportGroup>
     108  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|ARM64'" Label="PropertySheets">
     109    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
     110  </ImportGroup>
    59111  <PropertyGroup Label="UserMacros" />
    60112  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     
    62114    <CustomBuildAfterTargets />
    63115  </PropertyGroup>
     116  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
     117    <LinkIncremental>false</LinkIncremental>
     118    <CustomBuildAfterTargets />
     119  </PropertyGroup>
    64120  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'">
    65121    <LinkIncremental>false</LinkIncremental>
    66122    <CustomBuildAfterTargets />
    67123  </PropertyGroup>
     124  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|ARM64'">
     125    <LinkIncremental>false</LinkIncremental>
     126    <CustomBuildAfterTargets />
     127  </PropertyGroup>
    68128  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    69129    <LinkIncremental>false</LinkIncremental>
    70130    <CustomBuildAfterTargets />
    71131  </PropertyGroup>
     132  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
     133    <LinkIncremental>false</LinkIncremental>
     134    <CustomBuildAfterTargets />
     135  </PropertyGroup>
    72136  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'">
    73137    <LinkIncremental>false</LinkIncremental>
    74138    <CustomBuildAfterTargets />
    75139  </PropertyGroup>
     140  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|ARM64'">
     141    <LinkIncremental>false</LinkIncremental>
     142    <CustomBuildAfterTargets />
     143  </PropertyGroup>
    76144  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    77145    <ClCompile>
    78146      <PrecompiledHeader>NotUsing</PrecompiledHeader>
    79       <WarningLevel>$(WarningLevel)</WarningLevel>
     147      <WarningLevel>Level3</WarningLevel>
    80148      <MinimalRebuild>false</MinimalRebuild>
    81149      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     
    86154      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
    87155      <CompileAsManaged>false</CompileAsManaged>
    88       <TreatWarningAsError>$(TreatWarningAsError)</TreatWarningAsError>
     156      <TreatWarningAsError>false</TreatWarningAsError>
    89157      <IntrinsicFunctions>true</IntrinsicFunctions>
    90158      <StringPooling>true</StringPooling>
     
    107175    </CustomBuildStep>
    108176  </ItemDefinitionGroup>
     177  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
     178    <ClCompile>
     179      <PrecompiledHeader>NotUsing</PrecompiledHeader>
     180      <WarningLevel>Level3</WarningLevel>
     181      <MinimalRebuild>false</MinimalRebuild>
     182      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     183      <Optimization>Disabled</Optimization>
     184      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
     185      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PNG_USE_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     186      <AdditionalIncludeDirectories>$(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     187      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
     188      <CompileAsManaged>false</CompileAsManaged>
     189      <TreatWarningAsError>false</TreatWarningAsError>
     190      <IntrinsicFunctions>true</IntrinsicFunctions>
     191      <StringPooling>true</StringPooling>
     192      <FunctionLevelLinking>false</FunctionLevelLinking>
     193      <BrowseInformation>true</BrowseInformation>
     194      <FloatingPointExceptions>false</FloatingPointExceptions>
     195      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
     196    </ClCompile>
     197    <Link>
     198      <SubSystem>Console</SubSystem>
     199      <GenerateDebugInformation>true</GenerateDebugInformation>
     200      <AdditionalDependencies>libpng16.lib</AdditionalDependencies>
     201      <AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
     202    </Link>
     203    <CustomBuildStep>
     204      <Message>Executing PNG validation program</Message>
     205      <Command>"$(OutDir)pngunknown.exe" --strict --default --touch "$(IntDir)pngunknown.out" ../../../pngtest.png</Command>
     206      <Outputs>$(IntDir)pngunknown.out</Outputs>
     207      <Inputs>$(OutDir)pngunknown.exe</Inputs>
     208    </CustomBuildStep>
     209  </ItemDefinitionGroup>
    109210  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'">
    110211    <ClCompile>
    111212      <PrecompiledHeader>NotUsing</PrecompiledHeader>
    112       <WarningLevel>$(WarningLevel)</WarningLevel>
     213      <WarningLevel>Level3</WarningLevel>
    113214      <MinimalRebuild>false</MinimalRebuild>
    114215      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     
    120221      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
    121222      <CompileAsManaged>false</CompileAsManaged>
    122       <TreatWarningAsError>$(TreatWarningAsError)</TreatWarningAsError>
     223      <TreatWarningAsError>false</TreatWarningAsError>
     224      <IntrinsicFunctions>true</IntrinsicFunctions>
     225      <StringPooling>true</StringPooling>
     226      <FunctionLevelLinking>false</FunctionLevelLinking>
     227      <BrowseInformation>true</BrowseInformation>
     228      <FloatingPointExceptions>false</FloatingPointExceptions>
     229    </ClCompile>
     230    <Link>
     231      <SubSystem>Console</SubSystem>
     232      <GenerateDebugInformation>true</GenerateDebugInformation>
     233      <AdditionalDependencies>libpng16.lib;zlib.lib</AdditionalDependencies>
     234      <AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
     235    </Link>
     236    <CustomBuildStep>
     237      <Message>Executing PNG validation program</Message>
     238      <Command>"$(OutDir)pngunknown.exe" --strict --default --touch "$(IntDir)pngunknown.out" ../../../pngtest.png</Command>
     239      <Outputs>$(IntDir)pngunknown.out</Outputs>
     240      <Inputs>$(OutDir)pngunknown.exe</Inputs>
     241    </CustomBuildStep>
     242  </ItemDefinitionGroup>
     243  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|ARM64'">
     244    <ClCompile>
     245      <PrecompiledHeader>NotUsing</PrecompiledHeader>
     246      <WarningLevel>Level3</WarningLevel>
     247      <MinimalRebuild>false</MinimalRebuild>
     248      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     249      <Optimization>Disabled</Optimization>
     250      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
     251      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
     252      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     253      <AdditionalIncludeDirectories>$(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     254      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
     255      <CompileAsManaged>false</CompileAsManaged>
     256      <TreatWarningAsError>false</TreatWarningAsError>
    123257      <IntrinsicFunctions>true</IntrinsicFunctions>
    124258      <StringPooling>true</StringPooling>
     
    175309    </CustomBuildStep>
    176310  </ItemDefinitionGroup>
     311  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
     312    <ClCompile>
     313      <WarningLevel>$(WarningLevel)</WarningLevel>
     314      <PrecompiledHeader>NotUsing</PrecompiledHeader>
     315      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     316      <Optimization>Full</Optimization>
     317      <FunctionLevelLinking>false</FunctionLevelLinking>
     318      <IntrinsicFunctions>true</IntrinsicFunctions>
     319      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;PNG_USE_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     320      <AdditionalIncludeDirectories>$(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     321      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
     322      <CompileAsManaged>false</CompileAsManaged>
     323      <TreatWarningAsError>$(TreatWarningAsError)</TreatWarningAsError>
     324      <StringPooling>true</StringPooling>
     325      <MinimalRebuild>false</MinimalRebuild>
     326      <BrowseInformation>true</BrowseInformation>
     327      <WholeProgramOptimization>true</WholeProgramOptimization>
     328      <FloatingPointExceptions>false</FloatingPointExceptions>
     329    </ClCompile>
     330    <Link>
     331      <SubSystem>Console</SubSystem>
     332      <GenerateDebugInformation>true</GenerateDebugInformation>
     333      <EnableCOMDATFolding>true</EnableCOMDATFolding>
     334      <OptimizeReferences>true</OptimizeReferences>
     335      <AdditionalDependencies>libpng16.lib</AdditionalDependencies>
     336      <AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
     337      <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
     338    </Link>
     339    <CustomBuildStep>
     340      <Message>Executing PNG validation program</Message>
     341      <Command>"$(OutDir)pngunknown.exe" --strict --default --touch "$(IntDir)pngunknown.out" ../../../pngtest.png</Command>
     342      <Outputs>$(IntDir)pngunknown.out</Outputs>
     343      <Inputs>$(OutDir)pngunknown.exe</Inputs>
     344    </CustomBuildStep>
     345  </ItemDefinitionGroup>
    177346  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'">
    178347    <ClCompile>
    179       <WarningLevel>$(WarningLevel)</WarningLevel>
     348      <WarningLevel>Level3</WarningLevel>
    180349      <PrecompiledHeader>NotUsing</PrecompiledHeader>
    181350      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     
    188357      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
    189358      <CompileAsManaged>false</CompileAsManaged>
    190       <TreatWarningAsError>$(TreatWarningAsError)</TreatWarningAsError>
     359      <TreatWarningAsError>false</TreatWarningAsError>
     360      <StringPooling>true</StringPooling>
     361      <MinimalRebuild>false</MinimalRebuild>
     362      <BrowseInformation>true</BrowseInformation>
     363      <WholeProgramOptimization>true</WholeProgramOptimization>
     364      <FloatingPointExceptions>false</FloatingPointExceptions>
     365    </ClCompile>
     366    <Link>
     367      <SubSystem>Console</SubSystem>
     368      <GenerateDebugInformation>true</GenerateDebugInformation>
     369      <EnableCOMDATFolding>true</EnableCOMDATFolding>
     370      <OptimizeReferences>true</OptimizeReferences>
     371      <AdditionalDependencies>libpng16.lib;zlib.lib</AdditionalDependencies>
     372      <AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
     373      <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
     374    </Link>
     375    <CustomBuildStep>
     376      <Message>Executing PNG validation program</Message>
     377      <Command>"$(OutDir)pngunknown.exe" --strict --default --touch "$(IntDir)pngunknown.out" ../../../pngtest.png</Command>
     378      <Outputs>$(IntDir)pngunknown.out</Outputs>
     379      <Inputs>$(OutDir)pngunknown.exe</Inputs>
     380    </CustomBuildStep>
     381  </ItemDefinitionGroup>
     382  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|ARM64'">
     383    <ClCompile>
     384      <WarningLevel>Level3</WarningLevel>
     385      <PrecompiledHeader>NotUsing</PrecompiledHeader>
     386      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     387      <Optimization>Full</Optimization>
     388      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
     389      <FunctionLevelLinking>false</FunctionLevelLinking>
     390      <IntrinsicFunctions>true</IntrinsicFunctions>
     391      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     392      <AdditionalIncludeDirectories>$(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     393      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
     394      <CompileAsManaged>false</CompileAsManaged>
     395      <TreatWarningAsError>false</TreatWarningAsError>
    191396      <StringPooling>true</StringPooling>
    192397      <MinimalRebuild>false</MinimalRebuild>
  • trunk/src/libs/libpng-1.6.42/projects/vstudio/pngvalid/pngvalid.vcxproj

    r96425 r103316  
    22<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    33  <ItemGroup Label="ProjectConfigurations">
     4    <ProjectConfiguration Include="Debug Library|ARM64">
     5      <Configuration>Debug Library</Configuration>
     6      <Platform>ARM64</Platform>
     7    </ProjectConfiguration>
    48    <ProjectConfiguration Include="Debug Library|Win32">
    59      <Configuration>Debug Library</Configuration>
    610      <Platform>Win32</Platform>
    711    </ProjectConfiguration>
     12    <ProjectConfiguration Include="Debug|ARM64">
     13      <Configuration>Debug</Configuration>
     14      <Platform>ARM64</Platform>
     15    </ProjectConfiguration>
    816    <ProjectConfiguration Include="Debug|Win32">
    917      <Configuration>Debug</Configuration>
    1018      <Platform>Win32</Platform>
    1119    </ProjectConfiguration>
     20    <ProjectConfiguration Include="Release Library|ARM64">
     21      <Configuration>Release Library</Configuration>
     22      <Platform>ARM64</Platform>
     23    </ProjectConfiguration>
    1224    <ProjectConfiguration Include="Release Library|Win32">
    1325      <Configuration>Release Library</Configuration>
    1426      <Platform>Win32</Platform>
     27    </ProjectConfiguration>
     28    <ProjectConfiguration Include="Release|ARM64">
     29      <Configuration>Release</Configuration>
     30      <Platform>ARM64</Platform>
    1531    </ProjectConfiguration>
    1632    <ProjectConfiguration Include="Release|Win32">
     
    2945    <ConfigurationType>Application</ConfigurationType>
    3046    <CharacterSet>Unicode</CharacterSet>
     47    <PlatformToolset>v142</PlatformToolset>
     48  </PropertyGroup>
     49  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
     50    <ConfigurationType>Application</ConfigurationType>
     51    <CharacterSet>Unicode</CharacterSet>
     52    <PlatformToolset>v142</PlatformToolset>
    3153  </PropertyGroup>
    3254  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'" Label="Configuration">
    3355    <ConfigurationType>Application</ConfigurationType>
    3456    <CharacterSet>Unicode</CharacterSet>
     57    <PlatformToolset>v142</PlatformToolset>
     58  </PropertyGroup>
     59  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|ARM64'" Label="Configuration">
     60    <ConfigurationType>Application</ConfigurationType>
     61    <CharacterSet>Unicode</CharacterSet>
     62    <PlatformToolset>v142</PlatformToolset>
    3563  </PropertyGroup>
    3664  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    3765    <ConfigurationType>Application</ConfigurationType>
    3866    <CharacterSet>Unicode</CharacterSet>
     67    <PlatformToolset>v142</PlatformToolset>
     68  </PropertyGroup>
     69  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
     70    <ConfigurationType>Application</ConfigurationType>
     71    <CharacterSet>Unicode</CharacterSet>
     72    <PlatformToolset>v142</PlatformToolset>
    3973  </PropertyGroup>
    4074  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'" Label="Configuration">
    4175    <ConfigurationType>Application</ConfigurationType>
    4276    <CharacterSet>Unicode</CharacterSet>
     77    <PlatformToolset>v142</PlatformToolset>
     78  </PropertyGroup>
     79  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|ARM64'" Label="Configuration">
     80    <ConfigurationType>Application</ConfigurationType>
     81    <CharacterSet>Unicode</CharacterSet>
     82    <PlatformToolset>v142</PlatformToolset>
    4383  </PropertyGroup>
    4484  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
     
    4888    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    4989  </ImportGroup>
     90  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets">
     91    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
     92  </ImportGroup>
    5093  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'" Label="PropertySheets">
    5194    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
    5295  </ImportGroup>
     96  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|ARM64'" Label="PropertySheets">
     97    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
     98  </ImportGroup>
    5399  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    54100    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    55101  </ImportGroup>
     102  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets">
     103    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
     104  </ImportGroup>
    56105  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'" Label="PropertySheets">
    57106    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
    58107  </ImportGroup>
     108  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|ARM64'" Label="PropertySheets">
     109    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
     110  </ImportGroup>
    59111  <PropertyGroup Label="UserMacros" />
    60112  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     
    62114    <CustomBuildAfterTargets />
    63115  </PropertyGroup>
     116  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
     117    <LinkIncremental>false</LinkIncremental>
     118    <CustomBuildAfterTargets />
     119  </PropertyGroup>
    64120  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'">
    65121    <LinkIncremental>false</LinkIncremental>
    66122    <CustomBuildAfterTargets />
    67123  </PropertyGroup>
     124  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|ARM64'">
     125    <LinkIncremental>false</LinkIncremental>
     126    <CustomBuildAfterTargets />
     127  </PropertyGroup>
    68128  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    69129    <LinkIncremental>false</LinkIncremental>
    70130    <CustomBuildAfterTargets />
    71131  </PropertyGroup>
     132  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
     133    <LinkIncremental>false</LinkIncremental>
     134    <CustomBuildAfterTargets />
     135  </PropertyGroup>
    72136  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'">
    73137    <LinkIncremental>false</LinkIncremental>
    74138    <CustomBuildAfterTargets />
    75139  </PropertyGroup>
     140  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|ARM64'">
     141    <LinkIncremental>false</LinkIncremental>
     142    <CustomBuildAfterTargets />
     143  </PropertyGroup>
    76144  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    77145    <ClCompile>
    78146      <PrecompiledHeader>NotUsing</PrecompiledHeader>
    79       <WarningLevel>$(WarningLevel)</WarningLevel>
     147      <WarningLevel>Level3</WarningLevel>
    80148      <MinimalRebuild>false</MinimalRebuild>
    81149      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     
    86154      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
    87155      <CompileAsManaged>false</CompileAsManaged>
    88       <TreatWarningAsError>$(TreatWarningAsError)</TreatWarningAsError>
     156      <TreatWarningAsError>false</TreatWarningAsError>
    89157      <IntrinsicFunctions>true</IntrinsicFunctions>
    90158      <StringPooling>true</StringPooling>
     
    107175    </CustomBuildStep>
    108176  </ItemDefinitionGroup>
     177  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
     178    <ClCompile>
     179      <PrecompiledHeader>NotUsing</PrecompiledHeader>
     180      <WarningLevel>Level3</WarningLevel>
     181      <MinimalRebuild>false</MinimalRebuild>
     182      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     183      <Optimization>Disabled</Optimization>
     184      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
     185      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PNG_USE_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     186      <AdditionalIncludeDirectories>$(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     187      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
     188      <CompileAsManaged>false</CompileAsManaged>
     189      <TreatWarningAsError>false</TreatWarningAsError>
     190      <IntrinsicFunctions>true</IntrinsicFunctions>
     191      <StringPooling>true</StringPooling>
     192      <FunctionLevelLinking>false</FunctionLevelLinking>
     193      <BrowseInformation>true</BrowseInformation>
     194      <FloatingPointExceptions>false</FloatingPointExceptions>
     195      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
     196    </ClCompile>
     197    <Link>
     198      <SubSystem>Console</SubSystem>
     199      <GenerateDebugInformation>true</GenerateDebugInformation>
     200      <AdditionalDependencies>libpng16.lib;zlib.lib</AdditionalDependencies>
     201      <AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
     202    </Link>
     203    <CustomBuildStep>
     204      <Message>Executing PNG validation program</Message>
     205      <Command>"$(OutDir)pngvalid.exe" --touch "$(IntDir)pngvalid.out"</Command>
     206      <Outputs>$(IntDir)pngvalid.out</Outputs>
     207      <Inputs>$(OutDir)pngvalid.exe</Inputs>
     208    </CustomBuildStep>
     209  </ItemDefinitionGroup>
    109210  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'">
    110211    <ClCompile>
    111212      <PrecompiledHeader>NotUsing</PrecompiledHeader>
    112       <WarningLevel>$(WarningLevel)</WarningLevel>
     213      <WarningLevel>Level3</WarningLevel>
    113214      <MinimalRebuild>false</MinimalRebuild>
    114215      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     
    120221      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
    121222      <CompileAsManaged>false</CompileAsManaged>
    122       <TreatWarningAsError>$(TreatWarningAsError)</TreatWarningAsError>
     223      <TreatWarningAsError>false</TreatWarningAsError>
     224      <IntrinsicFunctions>true</IntrinsicFunctions>
     225      <StringPooling>true</StringPooling>
     226      <FunctionLevelLinking>false</FunctionLevelLinking>
     227      <BrowseInformation>true</BrowseInformation>
     228      <FloatingPointExceptions>false</FloatingPointExceptions>
     229    </ClCompile>
     230    <Link>
     231      <SubSystem>Console</SubSystem>
     232      <GenerateDebugInformation>true</GenerateDebugInformation>
     233      <AdditionalDependencies>libpng16.lib;zlib.lib</AdditionalDependencies>
     234      <AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
     235    </Link>
     236    <CustomBuildStep>
     237      <Message>Executing PNG validation program</Message>
     238      <Command>"$(OutDir)pngvalid.exe" --touch "$(IntDir)pngvalid.out"</Command>
     239      <Outputs>$(IntDir)pngvalid.out</Outputs>
     240      <Inputs>$(OutDir)pngvalid.exe</Inputs>
     241    </CustomBuildStep>
     242  </ItemDefinitionGroup>
     243  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|ARM64'">
     244    <ClCompile>
     245      <PrecompiledHeader>NotUsing</PrecompiledHeader>
     246      <WarningLevel>Level3</WarningLevel>
     247      <MinimalRebuild>false</MinimalRebuild>
     248      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     249      <Optimization>Disabled</Optimization>
     250      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
     251      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
     252      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     253      <AdditionalIncludeDirectories>$(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     254      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
     255      <CompileAsManaged>false</CompileAsManaged>
     256      <TreatWarningAsError>false</TreatWarningAsError>
    123257      <IntrinsicFunctions>true</IntrinsicFunctions>
    124258      <StringPooling>true</StringPooling>
     
    175309    </CustomBuildStep>
    176310  </ItemDefinitionGroup>
     311  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
     312    <ClCompile>
     313      <WarningLevel>$(WarningLevel)</WarningLevel>
     314      <PrecompiledHeader>NotUsing</PrecompiledHeader>
     315      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     316      <Optimization>Full</Optimization>
     317      <FunctionLevelLinking>false</FunctionLevelLinking>
     318      <IntrinsicFunctions>true</IntrinsicFunctions>
     319      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;PNG_USE_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     320      <AdditionalIncludeDirectories>$(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     321      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
     322      <CompileAsManaged>false</CompileAsManaged>
     323      <TreatWarningAsError>$(TreatWarningAsError)</TreatWarningAsError>
     324      <StringPooling>true</StringPooling>
     325      <MinimalRebuild>false</MinimalRebuild>
     326      <BrowseInformation>true</BrowseInformation>
     327      <WholeProgramOptimization>true</WholeProgramOptimization>
     328      <FloatingPointExceptions>false</FloatingPointExceptions>
     329    </ClCompile>
     330    <Link>
     331      <SubSystem>Console</SubSystem>
     332      <GenerateDebugInformation>true</GenerateDebugInformation>
     333      <EnableCOMDATFolding>true</EnableCOMDATFolding>
     334      <OptimizeReferences>true</OptimizeReferences>
     335      <AdditionalDependencies>libpng16.lib;zlib.lib</AdditionalDependencies>
     336      <AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
     337      <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
     338    </Link>
     339    <CustomBuildStep>
     340      <Message>Executing PNG validation program</Message>
     341      <Command>"$(OutDir)pngvalid.exe" --touch "$(IntDir)pngvalid.out"</Command>
     342      <Outputs>$(IntDir)pngvalid.out</Outputs>
     343      <Inputs>$(OutDir)pngvalid.exe</Inputs>
     344    </CustomBuildStep>
     345  </ItemDefinitionGroup>
    177346  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'">
    178347    <ClCompile>
    179       <WarningLevel>$(WarningLevel)</WarningLevel>
     348      <WarningLevel>Level3</WarningLevel>
    180349      <PrecompiledHeader>NotUsing</PrecompiledHeader>
    181350      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     
    188357      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
    189358      <CompileAsManaged>false</CompileAsManaged>
    190       <TreatWarningAsError>$(TreatWarningAsError)</TreatWarningAsError>
     359      <TreatWarningAsError>false</TreatWarningAsError>
     360      <StringPooling>true</StringPooling>
     361      <MinimalRebuild>false</MinimalRebuild>
     362      <BrowseInformation>true</BrowseInformation>
     363      <WholeProgramOptimization>true</WholeProgramOptimization>
     364      <FloatingPointExceptions>false</FloatingPointExceptions>
     365    </ClCompile>
     366    <Link>
     367      <SubSystem>Console</SubSystem>
     368      <GenerateDebugInformation>true</GenerateDebugInformation>
     369      <EnableCOMDATFolding>true</EnableCOMDATFolding>
     370      <OptimizeReferences>true</OptimizeReferences>
     371      <AdditionalDependencies>libpng16.lib;zlib.lib</AdditionalDependencies>
     372      <AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
     373      <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
     374    </Link>
     375    <CustomBuildStep>
     376      <Message>Executing PNG validation program</Message>
     377      <Command>"$(OutDir)pngvalid.exe" --touch "$(IntDir)pngvalid.out"</Command>
     378      <Outputs>$(IntDir)pngvalid.out</Outputs>
     379      <Inputs>$(OutDir)pngvalid.exe</Inputs>
     380    </CustomBuildStep>
     381  </ItemDefinitionGroup>
     382  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|ARM64'">
     383    <ClCompile>
     384      <WarningLevel>Level3</WarningLevel>
     385      <PrecompiledHeader>NotUsing</PrecompiledHeader>
     386      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     387      <Optimization>Full</Optimization>
     388      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
     389      <FunctionLevelLinking>false</FunctionLevelLinking>
     390      <IntrinsicFunctions>true</IntrinsicFunctions>
     391      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     392      <AdditionalIncludeDirectories>$(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     393      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
     394      <CompileAsManaged>false</CompileAsManaged>
     395      <TreatWarningAsError>false</TreatWarningAsError>
    191396      <StringPooling>true</StringPooling>
    192397      <MinimalRebuild>false</MinimalRebuild>
  • trunk/src/libs/libpng-1.6.42/projects/vstudio/vstudio.sln

    r96425 r103316  
    1 Microsoft Visual Studio Solution File, Format Version 11.00
    2 # Visual Studio 2010
     1Microsoft Visual Studio Solution File, Format Version 12.00
     2# Visual Studio Version 16
     3VisualStudioVersion = 16.0.31515.178
     4MinimumVisualStudioVersion = 10.0.40219.1
    35Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "zlib\zlib.vcxproj", "{60F89955-91C6-3A36-8000-13C592FEC2DF}"
    46EndProject
     
    4143Global
    4244        GlobalSection(SolutionConfigurationPlatforms) = preSolution
     45                Debug Library|ARM64 = Debug Library|ARM64
    4346                Debug Library|Win32 = Debug Library|Win32
     47                Debug|ARM64 = Debug|ARM64
    4448                Debug|Win32 = Debug|Win32
     49                Release Library|ARM64 = Release Library|ARM64
    4550                Release Library|Win32 = Release Library|Win32
     51                Release|ARM64 = Release|ARM64
    4652                Release|Win32 = Release|Win32
    4753        EndGlobalSection
    4854        GlobalSection(ProjectConfigurationPlatforms) = postSolution
     55                {60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug Library|ARM64.ActiveCfg = Debug Library|ARM64
     56                {60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug Library|ARM64.Build.0 = Debug Library|ARM64
     57                {60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug Library|Win32.ActiveCfg = Debug Library|Win32
     58                {60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug Library|Win32.Build.0 = Debug Library|Win32
     59                {60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug|ARM64.ActiveCfg = Debug|ARM64
     60                {60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug|ARM64.Build.0 = Debug|ARM64
     61                {60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug|Win32.ActiveCfg = Debug|Win32
     62                {60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug|Win32.Build.0 = Debug|Win32
     63                {60F89955-91C6-3A36-8000-13C592FEC2DF}.Release Library|ARM64.ActiveCfg = Release Library|ARM64
     64                {60F89955-91C6-3A36-8000-13C592FEC2DF}.Release Library|ARM64.Build.0 = Release Library|ARM64
     65                {60F89955-91C6-3A36-8000-13C592FEC2DF}.Release Library|Win32.ActiveCfg = Release Library|Win32
     66                {60F89955-91C6-3A36-8000-13C592FEC2DF}.Release Library|Win32.Build.0 = Release Library|Win32
     67                {60F89955-91C6-3A36-8000-13C592FEC2DF}.Release|ARM64.ActiveCfg = Release|ARM64
     68                {60F89955-91C6-3A36-8000-13C592FEC2DF}.Release|ARM64.Build.0 = Release|ARM64
     69                {60F89955-91C6-3A36-8000-13C592FEC2DF}.Release|Win32.ActiveCfg = Release|Win32
     70                {60F89955-91C6-3A36-8000-13C592FEC2DF}.Release|Win32.Build.0 = Release|Win32
     71                {EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Debug Library|ARM64.ActiveCfg = Release|ARM64
     72                {EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Debug Library|ARM64.Build.0 = Release|ARM64
     73                {EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Debug Library|Win32.ActiveCfg = Release|Win32
     74                {EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Debug Library|Win32.Build.0 = Release|Win32
     75                {EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Debug|ARM64.ActiveCfg = Release|ARM64
     76                {EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Debug|ARM64.Build.0 = Release|ARM64
     77                {EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Debug|Win32.ActiveCfg = Release|Win32
     78                {EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Debug|Win32.Build.0 = Release|Win32
     79                {EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Release Library|ARM64.ActiveCfg = Release|ARM64
     80                {EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Release Library|ARM64.Build.0 = Release|ARM64
     81                {EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Release Library|Win32.ActiveCfg = Release|Win32
     82                {EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Release Library|Win32.Build.0 = Release|Win32
     83                {EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Release|ARM64.ActiveCfg = Release|ARM64
     84                {EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Release|ARM64.Build.0 = Release|ARM64
     85                {EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Release|Win32.ActiveCfg = Release|Win32
     86                {EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Release|Win32.Build.0 = Release|Win32
     87                {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Debug Library|ARM64.ActiveCfg = Debug Library|ARM64
     88                {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Debug Library|ARM64.Build.0 = Debug Library|ARM64
    4989                {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Debug Library|Win32.ActiveCfg = Debug Library|Win32
    5090                {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Debug Library|Win32.Build.0 = Debug Library|Win32
     91                {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Debug|ARM64.ActiveCfg = Debug|ARM64
     92                {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Debug|ARM64.Build.0 = Debug|ARM64
    5193                {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Debug|Win32.ActiveCfg = Debug|Win32
    5294                {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Debug|Win32.Build.0 = Debug|Win32
     95                {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release Library|ARM64.ActiveCfg = Release Library|ARM64
     96                {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release Library|ARM64.Build.0 = Release Library|ARM64
    5397                {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release Library|Win32.ActiveCfg = Release Library|Win32
    5498                {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release Library|Win32.Build.0 = Release Library|Win32
     99                {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release|ARM64.ActiveCfg = Release|ARM64
     100                {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release|ARM64.Build.0 = Release|ARM64
    55101                {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release|Win32.ActiveCfg = Release|Win32
    56102                {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release|Win32.Build.0 = Release|Win32
     103                {228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Debug Library|ARM64.ActiveCfg = Debug Library|ARM64
     104                {228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Debug Library|ARM64.Build.0 = Debug Library|ARM64
    57105                {228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Debug Library|Win32.ActiveCfg = Debug Library|Win32
    58106                {228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Debug Library|Win32.Build.0 = Debug Library|Win32
     107                {228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Debug|ARM64.ActiveCfg = Debug|ARM64
     108                {228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Debug|ARM64.Build.0 = Debug|ARM64
    59109                {228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Debug|Win32.ActiveCfg = Debug|Win32
    60110                {228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Debug|Win32.Build.0 = Debug|Win32
     111                {228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Release Library|ARM64.ActiveCfg = Release Library|ARM64
     112                {228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Release Library|ARM64.Build.0 = Release Library|ARM64
    61113                {228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Release Library|Win32.ActiveCfg = Release Library|Win32
    62114                {228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Release Library|Win32.Build.0 = Release Library|Win32
     115                {228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Release|ARM64.ActiveCfg = Release|ARM64
     116                {228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Release|ARM64.Build.0 = Release|ARM64
    63117                {228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Release|Win32.ActiveCfg = Release|Win32
    64118                {228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Release|Win32.Build.0 = Release|Win32
    65                 {60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug Library|Win32.ActiveCfg = Debug Library|Win32
    66                 {60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug Library|Win32.Build.0 = Debug Library|Win32
    67                 {60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug|Win32.ActiveCfg = Debug|Win32
    68                 {60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug|Win32.Build.0 = Debug|Win32
    69                 {60F89955-91C6-3A36-8000-13C592FEC2DF}.Release Library|Win32.ActiveCfg = Release Library|Win32
    70                 {60F89955-91C6-3A36-8000-13C592FEC2DF}.Release Library|Win32.Build.0 = Release Library|Win32
    71                 {60F89955-91C6-3A36-8000-13C592FEC2DF}.Release|Win32.ActiveCfg = Release|Win32
    72                 {60F89955-91C6-3A36-8000-13C592FEC2DF}.Release|Win32.Build.0 = Release|Win32
     119                {9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8}.Debug Library|ARM64.ActiveCfg = Debug Library|ARM64
     120                {9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8}.Debug Library|ARM64.Build.0 = Debug Library|ARM64
    73121                {9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8}.Debug Library|Win32.ActiveCfg = Debug Library|Win32
    74122                {9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8}.Debug Library|Win32.Build.0 = Debug Library|Win32
     123                {9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8}.Debug|ARM64.ActiveCfg = Debug|ARM64
     124                {9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8}.Debug|ARM64.Build.0 = Debug|ARM64
    75125                {9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8}.Debug|Win32.ActiveCfg = Debug|Win32
    76126                {9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8}.Debug|Win32.Build.0 = Debug|Win32
     127                {9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8}.Release Library|ARM64.ActiveCfg = Release Library|ARM64
     128                {9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8}.Release Library|ARM64.Build.0 = Release Library|ARM64
    77129                {9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8}.Release Library|Win32.ActiveCfg = Release Library|Win32
    78130                {9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8}.Release Library|Win32.Build.0 = Release Library|Win32
     131                {9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8}.Release|ARM64.ActiveCfg = Release|ARM64
     132                {9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8}.Release|ARM64.Build.0 = Release|ARM64
    79133                {9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8}.Release|Win32.ActiveCfg = Release|Win32
    80134                {9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8}.Release|Win32.Build.0 = Release|Win32
    81                 {EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Debug Library|Win32.ActiveCfg = Release|Win32
    82                 {EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Debug Library|Win32.Build.0 = Release|Win32
    83                 {EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Debug|Win32.ActiveCfg = Release|Win32
    84                 {EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Debug|Win32.Build.0 = Release|Win32
    85                 {EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Release Library|Win32.ActiveCfg = Release|Win32
    86                 {EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Release Library|Win32.Build.0 = Release|Win32
    87                 {EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Release|Win32.ActiveCfg = Release|Win32
    88                 {EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Release|Win32.Build.0 = Release|Win32
     135                {277AC57F-313B-4D06-B119-A3CDB672D2FF}.Debug Library|ARM64.ActiveCfg = Debug Library|ARM64
     136                {277AC57F-313B-4D06-B119-A3CDB672D2FF}.Debug Library|ARM64.Build.0 = Debug Library|ARM64
    89137                {277AC57F-313B-4D06-B119-A3CDB672D2FF}.Debug Library|Win32.ActiveCfg = Debug Library|Win32
    90138                {277AC57F-313B-4D06-B119-A3CDB672D2FF}.Debug Library|Win32.Build.0 = Debug Library|Win32
     139                {277AC57F-313B-4D06-B119-A3CDB672D2FF}.Debug|ARM64.ActiveCfg = Debug|ARM64
     140                {277AC57F-313B-4D06-B119-A3CDB672D2FF}.Debug|ARM64.Build.0 = Debug|ARM64
    91141                {277AC57F-313B-4D06-B119-A3CDB672D2FF}.Debug|Win32.ActiveCfg = Debug|Win32
    92142                {277AC57F-313B-4D06-B119-A3CDB672D2FF}.Debug|Win32.Build.0 = Debug|Win32
     143                {277AC57F-313B-4D06-B119-A3CDB672D2FF}.Release Library|ARM64.ActiveCfg = Release Library|ARM64
     144                {277AC57F-313B-4D06-B119-A3CDB672D2FF}.Release Library|ARM64.Build.0 = Release Library|ARM64
    93145                {277AC57F-313B-4D06-B119-A3CDB672D2FF}.Release Library|Win32.ActiveCfg = Release Library|Win32
    94146                {277AC57F-313B-4D06-B119-A3CDB672D2FF}.Release Library|Win32.Build.0 = Release Library|Win32
     147                {277AC57F-313B-4D06-B119-A3CDB672D2FF}.Release|ARM64.ActiveCfg = Release|ARM64
     148                {277AC57F-313B-4D06-B119-A3CDB672D2FF}.Release|ARM64.Build.0 = Release|ARM64
    95149                {277AC57F-313B-4D06-B119-A3CDB672D2FF}.Release|Win32.ActiveCfg = Release|Win32
    96150                {277AC57F-313B-4D06-B119-A3CDB672D2FF}.Release|Win32.Build.0 = Release|Win32
     151                {C5D3156C-8C8C-4936-B35F-2B829BA36FEC}.Debug Library|ARM64.ActiveCfg = Debug Library|ARM64
     152                {C5D3156C-8C8C-4936-B35F-2B829BA36FEC}.Debug Library|ARM64.Build.0 = Debug Library|ARM64
    97153                {C5D3156C-8C8C-4936-B35F-2B829BA36FEC}.Debug Library|Win32.ActiveCfg = Debug Library|Win32
    98154                {C5D3156C-8C8C-4936-B35F-2B829BA36FEC}.Debug Library|Win32.Build.0 = Debug Library|Win32
     155                {C5D3156C-8C8C-4936-B35F-2B829BA36FEC}.Debug|ARM64.ActiveCfg = Debug|ARM64
     156                {C5D3156C-8C8C-4936-B35F-2B829BA36FEC}.Debug|ARM64.Build.0 = Debug|ARM64
    99157                {C5D3156C-8C8C-4936-B35F-2B829BA36FEC}.Debug|Win32.ActiveCfg = Debug|Win32
    100158                {C5D3156C-8C8C-4936-B35F-2B829BA36FEC}.Debug|Win32.Build.0 = Debug|Win32
     159                {C5D3156C-8C8C-4936-B35F-2B829BA36FEC}.Release Library|ARM64.ActiveCfg = Release Library|ARM64
     160                {C5D3156C-8C8C-4936-B35F-2B829BA36FEC}.Release Library|ARM64.Build.0 = Release Library|ARM64
    101161                {C5D3156C-8C8C-4936-B35F-2B829BA36FEC}.Release Library|Win32.ActiveCfg = Release Library|Win32
    102162                {C5D3156C-8C8C-4936-B35F-2B829BA36FEC}.Release Library|Win32.Build.0 = Release Library|Win32
     163                {C5D3156C-8C8C-4936-B35F-2B829BA36FEC}.Release|ARM64.ActiveCfg = Release|ARM64
     164                {C5D3156C-8C8C-4936-B35F-2B829BA36FEC}.Release|ARM64.Build.0 = Release|ARM64
    103165                {C5D3156C-8C8C-4936-B35F-2B829BA36FEC}.Release|Win32.ActiveCfg = Release|Win32
    104166                {C5D3156C-8C8C-4936-B35F-2B829BA36FEC}.Release|Win32.Build.0 = Release|Win32
     
    107169                HideSolutionNode = FALSE
    108170        EndGlobalSection
     171        GlobalSection(ExtensibilityGlobals) = postSolution
     172                SolutionGuid = {785775C5-509E-4727-A290-F1B65E1B68B2}
     173        EndGlobalSection
    109174EndGlobal
  • trunk/src/libs/libpng-1.6.42/projects/vstudio/zlib/zlib.vcxproj

    r96425 r103316  
    22<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    33  <ItemGroup Label="ProjectConfigurations">
     4    <ProjectConfiguration Include="Debug Library|ARM64">
     5      <Configuration>Debug Library</Configuration>
     6      <Platform>ARM64</Platform>
     7    </ProjectConfiguration>
    48    <ProjectConfiguration Include="Debug Library|Win32">
    59      <Configuration>Debug Library</Configuration>
    610      <Platform>Win32</Platform>
    711    </ProjectConfiguration>
     12    <ProjectConfiguration Include="Debug|ARM64">
     13      <Configuration>Debug</Configuration>
     14      <Platform>ARM64</Platform>
     15    </ProjectConfiguration>
    816    <ProjectConfiguration Include="Debug|Win32">
    917      <Configuration>Debug</Configuration>
    1018      <Platform>Win32</Platform>
    1119    </ProjectConfiguration>
     20    <ProjectConfiguration Include="Release Library|ARM64">
     21      <Configuration>Release Library</Configuration>
     22      <Platform>ARM64</Platform>
     23    </ProjectConfiguration>
    1224    <ProjectConfiguration Include="Release Library|Win32">
    1325      <Configuration>Release Library</Configuration>
    1426      <Platform>Win32</Platform>
     27    </ProjectConfiguration>
     28    <ProjectConfiguration Include="Release|ARM64">
     29      <Configuration>Release</Configuration>
     30      <Platform>ARM64</Platform>
    1531    </ProjectConfiguration>
    1632    <ProjectConfiguration Include="Release|Win32">
     
    4157  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'" Label="Configuration">
    4258    <ConfigurationType>StaticLibrary</ConfigurationType>
     59    <PlatformToolset>v142</PlatformToolset>
     60  </PropertyGroup>
     61  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|ARM64'" Label="Configuration">
     62    <ConfigurationType>StaticLibrary</ConfigurationType>
     63    <PlatformToolset>v142</PlatformToolset>
    4364  </PropertyGroup>
    4465  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    4566    <ConfigurationType>StaticLibrary</ConfigurationType>
     67    <PlatformToolset>v142</PlatformToolset>
     68  </PropertyGroup>
     69  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
     70    <ConfigurationType>StaticLibrary</ConfigurationType>
     71    <PlatformToolset>v142</PlatformToolset>
    4672  </PropertyGroup>
    4773  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'" Label="Configuration">
    4874    <ConfigurationType>StaticLibrary</ConfigurationType>
     75    <PlatformToolset>v142</PlatformToolset>
     76  </PropertyGroup>
     77  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|ARM64'" Label="Configuration">
     78    <ConfigurationType>StaticLibrary</ConfigurationType>
     79    <PlatformToolset>v142</PlatformToolset>
    4980  </PropertyGroup>
    5081  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    5182    <ConfigurationType>StaticLibrary</ConfigurationType>
    5283  </PropertyGroup>
     84  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
     85    <ConfigurationType>StaticLibrary</ConfigurationType>
     86  </PropertyGroup>
    5387  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    5488    <ConfigurationType>StaticLibrary</ConfigurationType>
     89    <PlatformToolset>v142</PlatformToolset>
     90  </PropertyGroup>
     91  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
     92    <ConfigurationType>StaticLibrary</ConfigurationType>
     93    <PlatformToolset>v142</PlatformToolset>
    5594  </PropertyGroup>
    5695  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
     
    6099    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
    61100  </ImportGroup>
     101  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|ARM64'" Label="PropertySheets">
     102    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
     103  </ImportGroup>
    62104  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
    63105    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
    64106  </ImportGroup>
     107  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets">
     108    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
     109  </ImportGroup>
    65110  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'" Label="PropertySheets">
     111    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
     112  </ImportGroup>
     113  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|ARM64'" Label="PropertySheets">
    66114    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
    67115  </ImportGroup>
     
    69117    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    70118  </ImportGroup>
     119  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets">
     120    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
     121  </ImportGroup>
    71122  <PropertyGroup Label="UserMacros" />
    72123  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'">
    73124    <LinkIncremental>true</LinkIncremental>
    74125  </PropertyGroup>
     126  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|ARM64'">
     127    <LinkIncremental>true</LinkIncremental>
     128  </PropertyGroup>
    75129  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    76130    <LinkIncremental>true</LinkIncremental>
    77131  </PropertyGroup>
     132  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
     133    <LinkIncremental>true</LinkIncremental>
     134  </PropertyGroup>
    78135  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'">
    79136    <LinkIncremental>true</LinkIncremental>
    80137  </PropertyGroup>
     138  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|ARM64'">
     139    <LinkIncremental>true</LinkIncremental>
     140  </PropertyGroup>
    81141  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    82142    <LinkIncremental>true</LinkIncremental>
    83143  </PropertyGroup>
     144  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
     145    <LinkIncremental>true</LinkIncremental>
     146  </PropertyGroup>
    84147  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    85148    <LinkIncremental>true</LinkIncremental>
    86149  </PropertyGroup>
     150  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
     151    <LinkIncremental>true</LinkIncremental>
     152  </PropertyGroup>
    87153  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'">
    88154    <ClCompile>
    89       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;Z_SOLO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     155      <PreprocessorDefinitions>WIN32;_DEBUG;Z_SOLO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    90156      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
    91       <WarningLevel>$(WarningLevel)</WarningLevel>
     157      <WarningLevel>Level3</WarningLevel>
    92158      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
    93159      <Optimization>Disabled</Optimization>
     
    95161      <FunctionLevelLinking>true</FunctionLevelLinking>
    96162      <DisableSpecificWarnings>$(DisableSpecificWarnings);4127;4131;4242;4244</DisableSpecificWarnings>
    97       <TreatWarningAsError>$(TreatWarningAsError)</TreatWarningAsError>
     163      <TreatWarningAsError>false</TreatWarningAsError>
    98164    </ClCompile>
    99165    <Link>
     
    103169    </Link>
    104170  </ItemDefinitionGroup>
     171  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|ARM64'">
     172    <ClCompile>
     173      <PreprocessorDefinitions>WIN32;_DEBUG;Z_SOLO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     174      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
     175      <WarningLevel>Level3</WarningLevel>
     176      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     177      <Optimization>Disabled</Optimization>
     178      <BrowseInformation>true</BrowseInformation>
     179      <FunctionLevelLinking>true</FunctionLevelLinking>
     180      <DisableSpecificWarnings>$(DisableSpecificWarnings);4127;4131;4242;4244</DisableSpecificWarnings>
     181      <TreatWarningAsError>false</TreatWarningAsError>
     182    </ClCompile>
     183    <Link>
     184      <GenerateDebugInformation>true</GenerateDebugInformation>
     185      <SubSystem>Windows</SubSystem>
     186    </Link>
     187  </ItemDefinitionGroup>
    105188  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    106189    <ClCompile>
    107       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;Z_SOLO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    108       <WarningLevel>$(WarningLevel)</WarningLevel>
     190      <PreprocessorDefinitions>WIN32;_DEBUG;Z_SOLO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     191      <WarningLevel>Level3</WarningLevel>
    109192      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
    110193      <Optimization>Disabled</Optimization>
     
    112195      <FunctionLevelLinking>true</FunctionLevelLinking>
    113196      <DisableSpecificWarnings>$(DisableSpecificWarnings);4127;4131;4242;4244</DisableSpecificWarnings>
    114       <TreatWarningAsError>$(TreatWarningAsError)</TreatWarningAsError>
     197      <TreatWarningAsError>false</TreatWarningAsError>
    115198      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
    116199    </ClCompile>
     
    121204    </Link>
    122205  </ItemDefinitionGroup>
     206  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
     207    <ClCompile>
     208      <PreprocessorDefinitions>WIN32;_DEBUG;Z_SOLO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     209      <WarningLevel>Level3</WarningLevel>
     210      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     211      <Optimization>Disabled</Optimization>
     212      <BrowseInformation>true</BrowseInformation>
     213      <FunctionLevelLinking>true</FunctionLevelLinking>
     214      <DisableSpecificWarnings>$(DisableSpecificWarnings);4127;4131;4242;4244</DisableSpecificWarnings>
     215      <TreatWarningAsError>false</TreatWarningAsError>
     216      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
     217    </ClCompile>
     218    <Link>
     219      <GenerateDebugInformation>true</GenerateDebugInformation>
     220      <SubSystem>Windows</SubSystem>
     221    </Link>
     222  </ItemDefinitionGroup>
    123223  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'">
    124224    <ClCompile>
    125       <WarningLevel>$(WarningLevel)</WarningLevel>
     225      <WarningLevel>Level3</WarningLevel>
    126226      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
    127227      <Optimization>Full</Optimization>
     
    132232      <FunctionLevelLinking>true</FunctionLevelLinking>
    133233      <DisableSpecificWarnings>$(DisableSpecificWarnings);4127;4131;4242;4244</DisableSpecificWarnings>
    134       <TreatWarningAsError>$(TreatWarningAsError)</TreatWarningAsError>
     234      <TreatWarningAsError>false</TreatWarningAsError>
    135235      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
    136       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;Z_SOLO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     236      <PreprocessorDefinitions>WIN32;NDEBUG;Z_SOLO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    137237    </ClCompile>
    138238    <Link>
     
    145245    </Lib>
    146246  </ItemDefinitionGroup>
    147   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    148     <ClCompile>
    149       <WarningLevel>$(WarningLevel)</WarningLevel>
     247  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|ARM64'">
     248    <ClCompile>
     249      <WarningLevel>Level3</WarningLevel>
    150250      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
    151251      <Optimization>Full</Optimization>
     
    156256      <FunctionLevelLinking>true</FunctionLevelLinking>
    157257      <DisableSpecificWarnings>$(DisableSpecificWarnings);4127;4131;4242;4244</DisableSpecificWarnings>
    158       <TreatWarningAsError>$(TreatWarningAsError)</TreatWarningAsError>
    159       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;Z_SOLO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    160     </ClCompile>
    161     <Link>
    162       <TargetMachine>MachineX86</TargetMachine>
    163       <GenerateDebugInformation>true</GenerateDebugInformation>
    164       <SubSystem>Windows</SubSystem>
    165       <EnableCOMDATFolding>true</EnableCOMDATFolding>
    166       <OptimizeReferences>true</OptimizeReferences>
     258      <TreatWarningAsError>false</TreatWarningAsError>
     259      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
     260      <PreprocessorDefinitions>WIN32;NDEBUG;Z_SOLO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     261    </ClCompile>
     262    <Link>
     263      <GenerateDebugInformation>true</GenerateDebugInformation>
     264      <SubSystem>Windows</SubSystem>
    167265    </Link>
    168266    <Lib>
     
    170268    </Lib>
    171269  </ItemDefinitionGroup>
     270  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     271    <ClCompile>
     272      <WarningLevel>$(WarningLevel)</WarningLevel>
     273      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     274      <Optimization>Full</Optimization>
     275      <IntrinsicFunctions>true</IntrinsicFunctions>
     276      <WholeProgramOptimization>true</WholeProgramOptimization>
     277      <BufferSecurityCheck>false</BufferSecurityCheck>
     278      <BrowseInformation>true</BrowseInformation>
     279      <FunctionLevelLinking>true</FunctionLevelLinking>
     280      <DisableSpecificWarnings>$(DisableSpecificWarnings);4127;4131;4242;4244</DisableSpecificWarnings>
     281      <TreatWarningAsError>$(TreatWarningAsError)</TreatWarningAsError>
     282      <PreprocessorDefinitions>WIN32;NDEBUG;Z_SOLO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     283    </ClCompile>
     284    <Link>
     285      <TargetMachine>MachineX86</TargetMachine>
     286      <GenerateDebugInformation>true</GenerateDebugInformation>
     287      <SubSystem>Windows</SubSystem>
     288      <EnableCOMDATFolding>true</EnableCOMDATFolding>
     289      <OptimizeReferences>true</OptimizeReferences>
     290    </Link>
     291    <Lib>
     292      <LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>
     293    </Lib>
     294  </ItemDefinitionGroup>
     295  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
     296    <ClCompile>
     297      <WarningLevel>$(WarningLevel)</WarningLevel>
     298      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     299      <Optimization>Full</Optimization>
     300      <IntrinsicFunctions>true</IntrinsicFunctions>
     301      <WholeProgramOptimization>true</WholeProgramOptimization>
     302      <BufferSecurityCheck>false</BufferSecurityCheck>
     303      <BrowseInformation>true</BrowseInformation>
     304      <FunctionLevelLinking>true</FunctionLevelLinking>
     305      <DisableSpecificWarnings>$(DisableSpecificWarnings);4127;4131;4242;4244</DisableSpecificWarnings>
     306      <TreatWarningAsError>$(TreatWarningAsError)</TreatWarningAsError>
     307      <PreprocessorDefinitions>WIN32;NDEBUG;Z_SOLO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     308    </ClCompile>
     309    <Link>
     310      <GenerateDebugInformation>true</GenerateDebugInformation>
     311      <SubSystem>Windows</SubSystem>
     312      <EnableCOMDATFolding>true</EnableCOMDATFolding>
     313      <OptimizeReferences>true</OptimizeReferences>
     314    </Link>
     315    <Lib>
     316      <LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>
     317    </Lib>
     318  </ItemDefinitionGroup>
    172319  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
    173320  <ImportGroup Label="ExtensionTargets">
  • trunk/src/libs/libpng-1.6.42/scripts/README.txt

    r96425 r103316  
    1414 makefile.bc32     =>  32-bit Borland C++ (all modules compiled in C mode)
    1515 makefile.beos     =>  BeOS makefile
    16  makefile.cegcc    =>  minge32ce for Windows CE makefile
     16 makefile.clang    =>  Generic clang makefile
    1717 makefile.darwin   =>  Darwin makefile, for macOS (formerly Mac OS X)
    1818 makefile.dec      =>  DEC Alpha UNIX makefile
     
    7676 prefix.dfn        =>  Used by autoconf tools
    7777
    78 
    79 Further information can be found in comments in the individual makefiles.
     78Further information can be found in comments in the individual scripts and
     79makefiles.
  • trunk/src/libs/libpng-1.6.42/scripts/checksym.awk

    r96425 r103316  
    11#!/bin/awk -f
     2
    23# Check a list of symbols against the master definition
    34# (official) list.  Arguments:
  • trunk/src/libs/libpng-1.6.42/scripts/descrip.mms

    r96425 r103316  
    77.endif
    88
     9OBJS = png.obj, pngerror.obj, pngget.obj, pngmem.obj, pngpread.obj,\
     10       pngread.obj, pngrio.obj, pngrtran.obj, pngrutil.obj, pngset.obj,\
     11       pngtrans.obj, pngwio.obj, pngwrite.obj, pngwtran.obj, pngwutil.obj
    912
    10 
    11 OBJS = png.obj, pngset.obj, pngget.obj, pngrutil.obj, pngtrans.obj,\
    12         pngwutil.obj, pngread.obj, pngmem.obj, pngwrite.obj, pngrtran.obj,\
    13         pngwtran.obj, pngrio.obj, pngwio.obj, pngerror.obj, pngpread.obj
    14 
    15 
    16 CFLAGS= $(C_DEB) $(CC_DEFS) $(PREF)
     13CFLAGS = $(C_DEB) $(CC_DEFS) $(PREF)
    1714
    1815all : pngtest.exe libpng.olb
     
    2219        @ write sys$output " libpng available"
    2320
    24 
    2521pngtest.exe : pngtest.obj libpng.olb
    26               link pngtest,libpng.olb/lib,$(ZLIBSRC)libz.olb/lib
     22        link pngtest,libpng.olb/lib,$(ZLIBSRC)libz.olb/lib
    2723
    2824test : pngtest.exe
    29    run pngtest
     25        run pngtest
    3026
    3127clean :
    3228        delete *.obj;*,*.exe;
    3329
    34 
    3530# Other dependencies.
    36 png.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h
     31png.obj :      png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h
     32pngerror.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h
     33pngget.obj :   png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h
     34pngmem.obj :   png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h
    3735pngpread.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h
    38 pngset.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h
    39 pngget.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h
    40 pngread.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h
     36pngread.obj :  png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h
     37pngrio.obj :   png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h
    4138pngrtran.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h
    4239pngrutil.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h
    43 pngerror.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h
    44 pngmem.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h
    45 pngrio.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h
    46 pngwio.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h
     40pngset.obj :   png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h
    4741pngtrans.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h
     42pngwio.obj :   png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h
    4843pngwrite.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h
    4944pngwtran.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h
    5045pngwutil.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h
    5146
    52 pngtest.obj : png.h, pngconf.h, pnglibconf.h
     47pngtest.obj :  png.h, pngconf.h, pnglibconf.h
  • trunk/src/libs/libpng-1.6.42/scripts/dfn.awk

    r96425 r103316  
    11#!/bin/awk -f
     2
    23# scripts/dfn.awk - process a .dfn file
    3 #
    4 # last changed in libpng version 1.5.19 - August 21, 2014
    54#
    65# Copyright (c) 2013-2014 Glenn Randers-Pehrson
     
    126125         else while (1) {
    127126            if (getline nextline) {
    128                # If the line starts with '#' it is a preprocesor line directive
     127               # If the line starts with '#' it is a preprocessor line directive
    129128               # from cc -E; skip it:
    130129               if (nextline !~ /^#/) {
  • trunk/src/libs/libpng-1.6.42/scripts/intprefix.c

    r96425 r103316  
    22/* intprefix.c - generate an unprefixed internal symbol list
    33 *
    4  * Last changed in libpng version 1.6.16 [December 22, 2014]
    54 * Copyright (c) 2013-2014 Glenn Randers-Pehrson
    65 *
  • trunk/src/libs/libpng-1.6.42/scripts/libpng-config-head.in

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

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

    r96425 r103316  
    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
    34# Copyright (C) 2002, 2006, 2010-2014 Glenn Randers-Pehrson
    45# Copyright (C) 1998 Greg Roelofs
    56# Copyright (C) 1996, 1997 Andreas Dilger
    6 
     7#
    78# This code is released under the libpng license.
    89# For conditions of distribution and use, see the disclaimer
     
    1112# Library name:
    1213LIBNAME=libpng16
    13 PNGMAJ = 16
     14PNGMAJ=16
    1415
    1516# Shared library names:
    1617LIBSO=$(LIBNAME).so
    1718LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
    18 LIBSOREL=$(LIBSOMAJ).$(RELEASE)
    19 OLDSO=libpng.so
    2019
    2120# Utilities:
    2221CC=cc
    2322AR_RC=ar rc
     23RANLIB=echo
    2424MKDIR_P=mkdir -p
    2525LN_SF=ln -f -s
    26 RANLIB=echo
    2726RM_F=/bin/rm -f
    2827
    2928SUN_CC_FLAGS=-fast -xtarget=ultra
    3029SUN_LD_FLAGS=-fast -xtarget=ultra
    31 
    32 # where make install puts libpng.a, libpng16.so and libpng16/png.h
    33 prefix=/a
    34 exec_prefix=$(prefix)
    3530
    3631# Where the zlib library and include files are located
     
    4540WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
    4641        -Wmissing-declarations -Wtraditional -Wcast-align \
    47         -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
     42        -Wstrict-prototypes -Wmissing-prototypes # -Wconversion
    4843CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
    4944CFLAGS=$(SUN_CC_FLAGS) # $(WARNMORE) -g
    5045LDFLAGS=$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) libpng.a -lz -lm
    5146
    52 INCPATH=$(prefix)/include
    53 LIBPATH=$(exec_prefix)/lib
    54 MANPATH=$(prefix)/man
    55 BINPATH=$(exec_prefix)/bin
    56 
    57 # override DESTDIR= on the make install command line to easily support
    58 # installing into a temporary location.  Example:
    59 #
    60 #    make install DESTDIR=/tmp/build/libpng
    61 #
    62 # If you're going to install into a temporary location
    63 # via DESTDIR, $(DESTDIR)$(prefix) must already exist before
    64 # you execute make install.
    65 DESTDIR=
    66 
    67 DB=$(DESTDIR)$(BINPATH)
    68 DI=$(DESTDIR)$(INCPATH)
    69 DL=$(DESTDIR)$(LIBPATH)
    70 DM=$(DESTDIR)$(MANPATH)
    71 
    72 OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
    73         pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
    74         pngwtran.o pngmem.o pngerror.o pngpread.o
     47OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
     48       pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
     49       pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
    7550
    7651OBJSDLL = $(OBJS:.o=.pic.o)
     
    8459        $(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c
    8560
    86 all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
     61all: libpng.a $(LIBSO) pngtest
    8762
    8863include scripts/pnglibconf.mak
     
    9368        $(AR_RC) $@ $(OBJS)
    9469        $(RANLIB) $@
    95 
    96 libpng.pc:
    97         cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
    98         -e s!@exec_prefix@!$(exec_prefix)! \
    99         -e s!@libdir@!$(LIBPATH)! \
    100         -e s!@includedir@!$(INCPATH)! \
    101         -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc
    102 
    103 libpng-config:
    104         ( cat scripts/libpng-config-head.in; \
    105         echo prefix=\"$(prefix)\"; \
    106         echo libdir=\"$(LIBPATH)\"; \
    107         echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
    108         echo L_opts=\"-L$(LIBPATH)\"; \
    109         echo R_opts=\"-R$(LIBPATH)\"; \
    110         echo ccopts=\"-fast -xtarget=ultra\"; \
    111         echo ldopts=\"-fast -xtarget=ultra\"; \
    112         echo libs=\"-lpng16 -lz -lm\"; \
    113         cat scripts/libpng-config-body.in ) > libpng-config
    114         chmod +x libpng-config
    11570
    11671$(LIBSO): $(LIBSOMAJ)
     
    13994        ./pngtest
    14095
    141 install-headers: png.h pngconf.h pnglibconf.h
    142         -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
    143         -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
    144         cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
    145         chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h
    146         -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
    147         -@$(RM_F) $(DI)/libpng
    148         (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
     96install:
     97        @echo "The $@ target is no longer supported by this makefile."
     98        @false
    14999
    150 install-static: install-headers libpng.a
    151         -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
    152         cp libpng.a $(DL)/$(LIBNAME).a
    153         chmod 644 $(DL)/$(LIBNAME).a
    154         -@$(RM_F) $(DL)/libpng.a
    155         (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
     100install-static:
     101        @echo "The $@ target is no longer supported by this makefile."
     102        @false
    156103
    157 install-shared: install-headers $(LIBSOMAJ) libpng.pc
    158         -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
    159         -@$(RM_F) $(DL)/$(LIBSO)
    160         -@$(RM_F) $(DL)/$(LIBSOREL)
    161         -@$(RM_F) $(DL)/$(OLDSO)
    162         cp $(LIBSOMAJ) $(DL)/$(LIBSOREL)
    163         chmod 755 $(DL)/$(LIBSOREL)
    164         (cd $(DL); \
    165         $(LN_SF) $(LIBSOREL) $(LIBSO); \
    166         $(LN_SF) $(LIBSO) $(OLDSO))
    167         -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
    168         -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
    169         -@$(RM_F) $(DL)/pkgconfig/libpng.pc
    170         cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
    171         chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
    172         (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
    173 
    174 install-man: libpng.3 libpngpf.3 png.5
    175         -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
    176         -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
    177         -@$(RM_F) $(DM)/man3/libpng.3
    178         -@$(RM_F) $(DM)/man3/libpngpf.3
    179         cp libpng.3 $(DM)/man3
    180         cp libpngpf.3 $(DM)/man3
    181         -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
    182         -@$(RM_F) $(DM)/man5/png.5
    183         cp png.5 $(DM)/man5
    184 
    185 install-config: libpng-config
    186         -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
    187         -@$(RM_F) $(DB)/libpng-config
    188         -@$(RM_F) $(DB)/$(LIBNAME)-config
    189         cp libpng-config $(DB)/$(LIBNAME)-config
    190         chmod 755 $(DB)/$(LIBNAME)-config
    191         (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
    192 
    193 install: install-static install-shared install-man install-config
    194 
    195 # If you installed in $(DESTDIR), test-installed won't work until you
    196 # move the library to its final location.  Use test-dd to test it
    197 # before then.
    198 
    199 test-dd:
    200         echo
    201         echo Testing installed dynamic shared library in $(DL).
    202         $(CC) $(SUN_CC_FLAGS) -I$(DI) $(CPPFLAGS) \
    203            `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
    204            -o pngtestd -L$(DL) -R$(DL) `$(BINPATH)/$(LIBNAME)-config --ldflags` \
    205            $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
    206         ./pngtestd pngtest.png
    207 
    208 test-installed:
    209         echo
    210         echo Testing installed dynamic shared library.
    211         $(CC) $(SUN_CC_FLAGS) $(CPPFLAGS) \
    212            `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
    213            -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
    214            $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
    215         ./pngtesti pngtest.png
     104install-shared:
     105        @echo "The $@ target is no longer supported by this makefile."
     106        @false
    216107
    217108clean:
    218         $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
    219         libpng-config $(LIBSO) $(LIBSOMAJ)* \
    220         libpng.pc
    221 
    222 DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO
    223 writelock:
    224         chmod a-w *.[ch35] $(DOCS) scripts/*
     109        $(RM_F) *.o libpng.a pngtest pngout.png
     110        $(RM_F) $(LIBSO) $(LIBSOMAJ)*
    225111
    226112# DO NOT DELETE THIS LINE -- make depend depends on it.
    227113
    228 png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     114png.o      png.pic.o:      png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    229115pngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    230 pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    231 pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    232 pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    233 pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    234 pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    235 pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     116pngget.o   pngget.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     117pngmem.o   pngmem.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     118pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     119pngread.o  pngread.pic.o:  png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     120pngrio.o   pngrio.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    236121pngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    237122pngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     123pngset.o   pngset.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    238124pngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     125pngwio.o   pngwio.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    239126pngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    240127pngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    241128pngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    242 pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    243129
    244130pngtest.o: png.h pngconf.h pnglibconf.h
  • trunk/src/libs/libpng-1.6.42/scripts/makefile.64sunu

    r96425 r103316  
    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
    34# Copyright (C) 2002, 2006, 2010-2014 Glenn Randers-Pehrson
    45# Copyright (C) 1998 Greg Roelofs
    56# Copyright (C) 1996, 1997 Andreas Dilger
    6 
     7#
    78# This code is released under the libpng license.
    89# For conditions of distribution and use, see the disclaimer
     
    1112# Library name:
    1213LIBNAME=libpng16
    13 PNGMAJ = 16
     14PNGMAJ=16
    1415
    1516# Shared library names:
    1617LIBSO=$(LIBNAME).so
    1718LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
    18 LIBSOREL=$(LIBSOMAJ).$(RELEASE)
    19 OLDSO=libpng.so
    2019
    2120# Utilities:
    2221CC=cc
    2322AR_RC=ar rc
     23RANLIB=echo
    2424MKDIR_P=mkdir -p
    2525LN_SF=ln -f -s
    26 RANLIB=echo
    2726RM_F=/bin/rm -f
    2827
    2928SUN_CC_FLAGS=-fast -xtarget=ultra -xarch=v9
    3029SUN_LD_FLAGS=-fast -xtarget=ultra -xarch=v9
    31 
    32 # where make install puts libpng.a, libpng16.so and libpng16/png.h
    33 prefix=/a
    34 exec_prefix=$(prefix)
    3530
    3631# Where the zlib library and include files are located
     
    4540WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
    4641        -Wmissing-declarations -Wtraditional -Wcast-align \
    47         -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
     42        -Wstrict-prototypes -Wmissing-prototypes # -Wconversion
    4843CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
    4944CFLAGS= $(SUN_CC_FLAGS) # $(WARNMORE) -g
    5045LDFLAGS=-L. -R. $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm
    5146
    52 INCPATH=$(prefix)/include
    53 LIBPATH=$(exec_prefix)/lib
    54 MANPATH=$(prefix)/man
    55 BINPATH=$(exec_prefix)/bin
    56 
    57 # override DESTDIR= on the make install command line to easily support
    58 # installing into a temporary location.  Example:
    59 #
    60 #    make install DESTDIR=/tmp/build/libpng
    61 #
    62 # If you're going to install into a temporary location
    63 # via DESTDIR, $(DESTDIR)$(prefix) must already exist before
    64 # you execute make install.
    65 DESTDIR=
    66 
    67 DB=$(DESTDIR)$(BINPATH)
    68 DI=$(DESTDIR)$(INCPATH)
    69 DL=$(DESTDIR)$(LIBPATH)
    70 DM=$(DESTDIR)$(MANPATH)
    71 
    72 OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
    73         pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
    74         pngwtran.o pngmem.o pngerror.o pngpread.o
     47OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
     48       pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
     49       pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
    7550
    7651OBJSDLL = $(OBJS:.o=.pic.o)
     
    8459        $(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c
    8560
    86 all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
     61all: libpng.a $(LIBSO) pngtest
    8762
    8863include scripts/pnglibconf.mak
     
    9368        $(AR_RC) $@ $(OBJS)
    9469        $(RANLIB) $@
    95 
    96 libpng.pc:
    97         cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
    98         -e s!@exec_prefix@!$(exec_prefix)! \
    99         -e s!@libdir@!$(LIBPATH)! \
    100         -e s!@includedir@!$(INCPATH)! \
    101         -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc
    102 
    103 libpng-config:
    104         ( cat scripts/libpng-config-head.in; \
    105         echo prefix=\"$(prefix)\"; \
    106         echo libdir=\"$(LIBPATH)\"; \
    107         echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
    108         echo L_opts=\"-L$(LIBPATH)\"; \
    109         echo R_opts=\"-R$(LIBPATH)\"; \
    110         echo ccopts=\"-fast -xtarget=ultra -xarch=v9\"; \
    111         echo ldopts=\"-fast -xtarget=ultra -xarch=v9\"; \
    112         echo libs=\"-lpng16 -lz -lm\"; \
    113         cat scripts/libpng-config-body.in ) > libpng-config
    114         chmod +x libpng-config
    11570
    11671$(LIBSO): $(LIBSOMAJ)
     
    13994        ./pngtest
    14095
    141 install-headers: png.h pngconf.h
    142         -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
    143         -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
    144         cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
    145         chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h
    146         -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
    147         -@$(RM_F) $(DI)/libpng
    148         (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
     96install:
     97        @echo "The $@ target is no longer supported by this makefile."
     98        @false
    14999
    150 install-static: install-headers libpng.a
    151         -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
    152         cp libpng.a $(DL)/$(LIBNAME).a
    153         chmod 644 $(DL)/$(LIBNAME).a
    154         -@$(RM_F) $(DL)/libpng.a
    155         (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
     100install-static:
     101        @echo "The $@ target is no longer supported by this makefile."
     102        @false
    156103
    157 install-shared: install-headers $(LIBSOMAJ) libpng.pc
    158         -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
    159         -@$(RM_F) $(DL)/$(LIBSO)
    160         -@$(RM_F) $(DL)/$(LIBSOREL)
    161         -@$(RM_F) $(DL)/$(OLDSO)
    162         cp $(LIBSOMAJ) $(DL)/$(LIBSOREL)
    163         chmod 755 $(DL)/$(LIBSOREL)
    164         (cd $(DL); \
    165         $(LN_SF) $(LIBSOREL) $(LIBSO); \
    166         $(LN_SF) $(LIBSO) $(OLDSO))
    167         -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
    168         -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
    169         -@$(RM_F) $(DL)/pkgconfig/libpng.pc
    170         cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
    171         chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
    172         (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
    173 
    174 install-man: libpng.3 libpngpf.3 png.5
    175         -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
    176         -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
    177         -@$(RM_F) $(DM)/man3/libpng.3
    178         -@$(RM_F) $(DM)/man3/libpngpf.3
    179         cp libpng.3 $(DM)/man3
    180         cp libpngpf.3 $(DM)/man3
    181         -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
    182         -@$(RM_F) $(DM)/man5/png.5
    183         cp png.5 $(DM)/man5
    184 
    185 install-config: libpng-config
    186         -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
    187         -@$(RM_F) $(DB)/libpng-config
    188         -@$(RM_F) $(DB)/$(LIBNAME)-config
    189         cp libpng-config $(DB)/$(LIBNAME)-config
    190         chmod 755 $(DB)/$(LIBNAME)-config
    191         (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
    192 
    193 install: install-static install-shared install-man install-config
    194 
    195 # If you installed in $(DESTDIR), test-installed won't work until you
    196 # move the library to its final location.  Use test-dd to test it
    197 # before then.
    198 
    199 test-dd:
    200         echo
    201         echo Testing installed dynamic shared library in $(DL).
    202         $(CC) $(SUN_CC_FLAGS) -I$(DI) $(CPPFLAGS) \
    203            `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
    204            -o pngtestd -L$(DL) -R$(DL) `$(BINPATH)/$(LIBNAME)-config --ldflags` \
    205            $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
    206         ./pngtestd pngtest.png
    207 
    208 test-installed:
    209         echo
    210         echo Testing installed dynamic shared library.
    211         $(CC) $(SUN_CC_FLAGS) $(CPPFLAGS) \
    212            `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
    213            -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
    214            $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
    215         ./pngtesti pngtest.png
     104install-shared:
     105        @echo "The $@ target is no longer supported by this makefile."
     106        @false
    216107
    217108clean:
    218         $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
    219         libpng-config $(LIBSO) $(LIBSOMAJ)* \
    220         libpng.pc
    221 
    222 DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO
    223 writelock:
    224         chmod a-w *.[ch35] $(DOCS) scripts/*
     109        $(RM_F) *.o libpng.a pngtest pngout.png
     110        $(RM_F) $(LIBSO) $(LIBSOMAJ)*
    225111
    226112# DO NOT DELETE THIS LINE -- make depend depends on it.
    227113
    228 png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     114png.o      png.pic.o:      png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    229115pngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    230 pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    231 pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    232 pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    233 pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    234 pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    235 pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     116pngget.o   pngget.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     117pngmem.o   pngmem.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     118pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     119pngread.o  pngread.pic.o:  png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     120pngrio.o   pngrio.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    236121pngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    237122pngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     123pngset.o   pngset.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    238124pngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     125pngwio.o   pngwio.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    239126pngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    240127pngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    241128pngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    242 pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    243129
    244130pngtest.o: png.h pngconf.h pnglibconf.h
  • trunk/src/libs/libpng-1.6.42/scripts/makefile.aix

    r96425 r103316  
    11# makefile for libpng using gcc (generic, static library)
     2# Copyright (C) 2000, 2022 Cosmin Truta
    23# Copyright (C) 2002, 2006-2009, 2014 Glenn Randers-Pehrson
    3 # Copyright (C) 2000 Cosmin Truta
    44# Copyright (C) 2000 Marc O. Gloor (AIX support added, from makefile.gcc)
    55# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
     
    1717LD = $(CC)
    1818AR_RC = ar rcs
     19RANLIB = ranlib
    1920MKDIR_P = mkdir -p
    20 RANLIB = ranlib
    2121RM_F = rm -f
    22 LN_SF = ln -f -s
    2322
    2423LIBNAME = libpng16
    2524PNGMAJ = 16
    2625
    27 prefix=/usr/local
    28 INCPATH=$(prefix)/include
    29 LIBPATH=$(prefix)/lib
    30 
    31 # override DESTDIR= on the make install command line to easily support
    32 # installing into a temporary location.  Example:
    33 #
    34 #    make install DESTDIR=/tmp/build/libpng
    35 #
    36 # If you're going to install into a temporary location
    37 # via DESTDIR, $(DESTDIR)$(prefix) must already exist before
    38 # you execute make install.
    39 DESTDIR=
    40 
    41 DI=$(DESTDIR)$(INCPATH)
    42 DL=$(DESTDIR)$(LIBPATH)
    43 
    4426WARNMORE =
    4527CPPFLAGS = -I$(ZLIBINC) # -DPNG_DEBUG=5
    46 CFLAGS = -W -Wall -O2 # $(WARNMORE) -g
    47 LDFLAGS = -L. -L$(ZLIBLIB) -lpng16 -lz -lm
     28CFLAGS = -O2 -Wall -Wextra -Wundef # $(WARNMORE) -g
     29LDFLAGS = -L. -L$(ZLIBLIB) -lpng16 -lz -lm # -g
    4830
    49 # Variables
    50 OBJS =  png.o pngerror.o pngget.o pngmem.o pngpread.o \
    51         pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
    52         pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
     31# File lists
     32OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
     33       pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
     34       pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
    5335
    5436# Targets
     
    5638        $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
    5739
    58 all: $(LIBNAME).a pngtest$(E)
     40all: $(LIBNAME).a pngtest
    5941
    6042include scripts/pnglibconf.mak
     
    6648        $(RANLIB) $@
    6749
    68 test: pngtest$(E)
    69         ./pngtest$(E)
     50test: pngtest
     51        ./pngtest
    7052
    71 pngtest$(E): pngtest.o $(LIBNAME).a
     53pngtest: pngtest.o $(LIBNAME).a
    7254        $(LD) -o $@ pngtest.o $(LDFLAGS)
    7355
    74 install: $(LIBNAME).a
    75         -@if [ ! -d $(DI)  ]; then $(MKDIR_P) $(DI); fi
    76         -@if [ ! -d $(DI)/$(LIBNAME)  ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
    77         -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
    78         -@$(RM_F) $(DI)/$(LIBNAME)/png.h
    79         -@$(RM_F) $(DI)/$(LIBNAME)/pngconf.h
    80         -@$(RM_F) $(DI)/$(LIBNAME)/pnglibconf.h
    81         -@$(RM_F) $(DI)/png.h
    82         -@$(RM_F) $(DI)/pngconf.h
    83         -@$(RM_F) $(DI)/pnglibconf.h
    84         cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
    85         chmod 644 $(DI)/$(LIBNAME)/png.h \
    86         $(DI)/$(LIBNAME)/pngconf.h \
    87         $(DI)/$(LIBNAME)/pnglibconf.h
    88         -@$(RM_F) -r $(DI)/libpng
    89         (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
    90         -@$(RM_F) $(DL)/$(LIBNAME).a
    91         -@$(RM_F) $(DL)/libpng.a
    92         cp $(LIBNAME).a $(DL)/$(LIBNAME).a
    93         chmod 644 $(DL)/$(LIBNAME).a
    94         (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
    95         (cd $(DI); $(LN_SF) libpng/* .;)
     56install:
     57        @echo "The $@ target is no longer supported by this makefile."
     58        @false
    9659
    9760clean:
  • trunk/src/libs/libpng-1.6.42/scripts/makefile.amiga

    r96425 r103316  
    3434PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
    3535
    36 OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
    37         pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
    38         pngwtran.o pngmem.o pngerror.o pngpread.o
     36OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
     37       pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
     38       pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
    3939
    4040all: libpng.lib pngtest
  • trunk/src/libs/libpng-1.6.42/scripts/makefile.atari

    r96425 r103316  
    11# makefile for libpng
     2# Copyright (C) 2022 Cosmin Truta
    23# Copyright (C) 2002, 2014 Glenn Randers-Pehrson
    34# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
     
    1011# rules for library management
    1112#
    12 CPPFLAGS = -I..\zlib
     13CPPFLAGS = -I../zlib
    1314CFLAGS = -O
    1415LBR = png.lib
    15 LDFLAGS = -L. -L..\zlib -lpng -lz -lm
    16 
    17 # where make install puts libpng.a and png.h
    18 prefix=/usr/local
    19 INCPATH=$(prefix)/include
    20 LIBPATH=$(prefix)/lib
    21 
    22 # override DESTDIR= on the make install command line to easily support
    23 # installing into a temporary location.  Example:
    24 #
    25 #    make install DESTDIR=/tmp/build/libpng
    26 #
    27 # If you're going to install into a temporary location
    28 # via DESTDIR, $(DESTDIR)$(prefix) must already exist before
    29 # you execute make install.
    30 DESTDIR=
     16LDFLAGS = -L. -L../zlib -lpng -lz -lm
    3117
    3218# Pre-built configuration
     
    3420PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
    3521
    36 OBJS = $(LBR)(png.o) $(LBR)(pngset.o) $(LBR)(pngget.o) $(LBR)(pngrutil.o)\
    37         $(LBR)(pngtrans.o) $(LBR)(pngwutil.o)\
    38         $(LBR)(pngread.o) $(LBR)(pngerror.o) $(LBR)(pngwrite.o)\
    39         $(LBR)(pngrtran.o) $(LBR)(pngwtran.o)\
    40         $(LBR)(pngmem.o) $(LBR)(pngrio.o) $(LBR)(pngwio.o) $(LBR)(pngpread.o)
     22OBJS = $(LBR)(png.o) $(LBR)(pngerror.o) $(LBR)(pngget.o) $(LBR)(pngmem.o) \
     23       $(LBR)(pngpread.o) $(LBR)(pngread.o) $(LBR)(pngrio.o) \
     24       $(LBR)(pngrtran.o) $(LBR)(pngrutil.o) $(LBR)(pngset.o) \
     25       $(LBR)(pngtrans.o) $(LBR)(pngwio.o) $(LBR)(pngwrite.o) \
     26       $(LBR)(pngwtran.o) $(LBR)(pngwutil.o)
    4127
    4228all: $(LBR) pngtest.ttp
     
    5541        $(CC) $(CFLAGS) $(LDFLAGS) -o$@ pngtest.o
    5642
    57 install: libpng.a
    58         -@mkdir $(DESTDIR)$(INCPATH)
    59         -@mkdir $(DESTDIR)$(INCPATH)/libpng
    60         -@mkdir $(DESTDIR)$(LIBPATH)
    61         -@rm -f $(DESTDIR)$(INCPATH)/png.h
    62         -@rm -f $(DESTDIR)$(INCPATH)/pngconf.h
    63         -@rm -f $(DESTDIR)$(INCPATH)/pnglibconf.h
    64         cp png.h $(DESTDIR)$(INCPATH)/libpng
    65         cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
    66         cp pnglibconf.h $(DESTDIR)$(INCPATH)/libpng
    67         chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
    68         chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
    69         chmod 644 $(DESTDIR)$(INCPATH)/libpng/pnglibconf.h
    70         (cd $(DESTDIR)$(INCPATH); ln -f -s $(LIBNAME) libpng; \
    71         ln -f -s $(LIBNAME)/* .)
     43install:
     44        @echo "The $@ target is no longer supported by this makefile."
     45        @false
  • trunk/src/libs/libpng-1.6.42/scripts/makefile.bc32

    r96425 r103316  
    5151LDFLAGS=-L$(ZLIB_DIR) -M $(LDEBUG)
    5252
    53 # Pre-built configuration
     53## Pre-built configuration
    5454# See scripts\pnglibconf.mak for more options
    5555!ifndef PNGLIBCONF_H_PREBUILT
     
    5757!endif
    5858
    59 ## Variables
     59## File lists
    6060OBJS = \
    6161        png.obj \
     
    122122        $(CP) $(PNGLIBCONF_H_PREBUILT) $@
    123123
    124 png.obj: png.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     124png.obj:      png.c      png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    125125pngerror.obj: pngerror.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    126 pngget.obj: pngget.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    127 pngmem.obj: pngmem.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     126pngget.obj:   pngget.c  png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     127pngmem.obj:   pngmem.c  png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    128128pngpread.obj: pngpread.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    129 pngread.obj: pngread.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    130 pngrio.obj: pngrio.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     129pngread.obj:  pngread.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     130pngrio.obj:   pngrio.c  png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    131131pngrtran.obj: pngrtran.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    132132pngrutil.obj: pngrutil.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    133 pngset.obj: pngset.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     133pngset.obj:   pngset.c  png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    134134pngtrans.obj: pngtrans.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    135 pngwio.obj: pngwio.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     135pngwio.obj:   pngwio.c  png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    136136pngwrite.obj: pngwrite.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    137137pngwtran.obj: pngwtran.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    138138pngwutil.obj: pngwutil.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    139 pngtest.obj: pngtest.c png.h pngconf.h pnglibconf.h
     139pngtest.obj:  pngtest.c png.h pngconf.h pnglibconf.h
    140140
    141141$(LIBNAME): $(OBJS)
  • trunk/src/libs/libpng-1.6.42/scripts/makefile.beos

    r96425 r103316  
    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
    34# Copyright (C) 2002, 2006, 2008, 2010-2014 Glenn Randers-Pehrson
    45# Copyright (C) 1999 Greg Roelofs
     
    1112# Library name:
    1213LIBNAME=libpng16
    13 PNGMAJ = 16
     14PNGMAJ=16
    1415
    1516# Shared library names:
    1617LIBSO=$(LIBNAME).so
    1718LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
    18 LIBSOREL=$(LIBSOMAJ).$(RELEASE)
    19 OLDSO=libpng.so
    2019
    2120# Utilities:
    2221CC=gcc
    2322AR_RC=ar rc
     23RANLIB=ranlib
    2424MKDIR_P=mkdir -p
    2525LN_SF=ln -sf
    26 RANLIB=ranlib
    2726CP=cp
    2827RM_F=/bin/rm -f
     
    3837WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
    3938        -Wmissing-declarations -Wtraditional -Wcast-align \
    40         -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
     39        -Wstrict-prototypes -Wmissing-prototypes # -Wconversion
    4140
    4241# On BeOS, -O1 is actually better than -O3.  This is a known bug but it's
    4342# still here in R4.5
    4443CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
    45 CFLAGS=-W -Wall -O1 -funroll-loops $(ALIGN) # $(WARNMORE) -g
     44CFLAGS=-O1 -funroll-loops $(ALIGN) -Wall -Wextra -Wundef # $(WARNMORE) -g
    4645# LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz
    47 LDFLAGS=-L. -Wl,-soname=$(LIBSOMAJ) -L$(ZLIBLIB) -lz
    48 
    49 # where make install puts libpng.a, libpng16.so*, and png.h
    50 prefix=/usr/local
    51 exec_prefix=$(prefix)
    52 INCPATH=$(prefix)/include
    53 LIBPATH=$(exec_prefix)/lib
    54 MANPATH=$(prefix)/man
    55 BINPATH=$(exec_prefix)/bin
    56 
    57 # override DESTDIR= on the make install command line to easily support
    58 # installing into a temporary location.  Example:
    59 #
    60 #    make install DESTDIR=/tmp/build/libpng
    61 #
    62 # If you're going to install into a temporary location
    63 # via DESTDIR, $(DESTDIR)$(prefix) must already exist before
    64 # you execute make install.
    65 DESTDIR=
    66 
    67 DB=$(DESTDIR)$(BINPATH)
    68 DI=$(DESTDIR)$(INCPATH)
    69 DL=$(DESTDIR)$(LIBPATH)
    70 DM=$(DESTDIR)$(MANPATH)
     46LDFLAGS=-L. -Wl,-soname=$(LIBSOMAJ) -L$(ZLIBLIB) -lz # -g
    7147
    7248# Pre-built configuration
     
    7450PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
    7551
    76 OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
    77         pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
    78         pngwtran.o pngmem.o pngerror.o pngpread.o
     52OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
     53       pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
     54       pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
    7955
    8056OBJSDLL = $(OBJS)
     
    8561        $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
    8662
    87 all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
     63all: libpng.a $(LIBSO) pngtest
    8864
    8965pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
     
    9470        $(RANLIB) $@
    9571
    96 libpng.pc:
    97         cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
    98         -e s!@exec_prefix@!$(exec_prefix)! \
    99         -e s!@libdir@!$(LIBPATH)! \
    100         -e s!@includedir@!$(INCPATH)! \
    101         -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc
    102 
    103 libpng-config:
    104         ( cat scripts/libpng-config-head.in; \
    105         echo prefix=\"$(prefix)\"; \
    106         echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
    107         echo libs=\"-lpng16 -lz \"; \
    108         cat scripts/libpng-config-body.in ) > libpng-config
    109         chmod +x libpng-config
    110 
    11172$(LIBSO): $(LIBSOMAJ)
    11273        $(LN_SF) $(LIBSOMAJ) $(LIBSO)
     
    11475
    11576$(LIBSOMAJ): $(OBJSDLL)
    116         $(CC) -nostart -Wl,-soname,$(LIBSOMAJ) -o \
    117         $(LIBSOMAJ) $(OBJSDLL) $(LDFLAGS)
     77        $(CC) -nostart -Wl,-soname,$(LIBSOMAJ) \
     78         -o $(LIBSOMAJ) $(OBJSDLL) $(LDFLAGS)
    11879
    11980pngtest: pngtest.o $(LIBSO)
     
    12384        ./pngtest
    12485
    125 install-headers: png.h pngconf.h pnglibconf.h
    126         -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
    127         -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
    128         cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
    129         chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h
    130         -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
    131         -@$(RM_F) $(DI)/libpng
    132         (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
     86install:
     87        @echo "The $@ target is no longer supported by this makefile."
     88        @false
    13389
    134 install-static: install-headers libpng.a
    135         -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
    136         cp libpng.a $(DL)/$(LIBNAME).a
    137         chmod 644 $(DL)/$(LIBNAME).a
    138         -@$(RM_F) $(DL)/libpng.a
    139         (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
     90install-static:
     91        @echo "The $@ target is no longer supported by this makefile."
     92        @false
    14093
    141 install-shared: install-headers $(LIBSOMAJ) libpng.pc
    142         -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
    143         -@$(RM_F) $(DL)/$(LIBSO)
    144         -@$(RM_F) $(DL)/$(LIBSOREL)
    145         -@$(RM_F) $(DL)/$(OLDSO)
    146         cp $(LIBSOMAJ) $(DL)/$(LIBSOREL)
    147         chmod 755 $(DL)/$(LIBSOREL)
    148         (cd $(DL); \
    149         $(LN_SF) $(LIBSOREL) $(LIBSO); \
    150         $(LN_SF) $(LIBSO) $(OLDSO))
    151         -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
    152         -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
    153         -@$(RM_F) $(DL)/pkgconfig/libpng.pc
    154         cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
    155         chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
    156         (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
    157 
    158 install-man: libpng.3 libpngpf.3 png.5
    159         -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
    160         -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
    161         -@$(RM_F) $(DM)/man3/libpng.3
    162         -@$(RM_F) $(DM)/man3/libpngpf.3
    163         cp libpng.3 $(DM)/man3
    164         cp libpngpf.3 $(DM)/man3
    165         -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
    166         -@$(RM_F) $(DM)/man5/png.5
    167         cp png.5 $(DM)/man5
    168 
    169 install-config: libpng-config
    170         -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
    171         -@$(RM_F) $(DB)/libpng-config
    172         -@$(RM_F) $(DB)/$(LIBNAME)-config
    173         cp libpng-config $(DB)/$(LIBNAME)-config
    174         chmod 755 $(DB)/$(LIBNAME)-config
    175         (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
    176 
    177 install: install-static install-shared install-man install-config
    178 
    179 # If you installed in $(DESTDIR), test-installed won't work until you
    180 # move the library to its final location.  Use test-dd to test it
    181 # before then.
    182 
    183 test-dd:
    184         echo
    185         echo Testing installed dynamic shared library in $(DL).
    186         $(CC) -I$(DI) $(CPPFLAGS) $(CFLAGS) \
    187            `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
    188            -L$(DL) -L$(ZLIBLIB) -Wl,-rpath $(ZLIBLIB):$(DL) \
    189            -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
    190         ./pngtestd pngtest.png
    191 
    192 test-installed:
    193         $(CC) $(CPPFLAGS) $(CFLAGS) \
    194            `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
    195            -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
    196            -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
    197         ./pngtesti pngtest.png
     94install-shared:
     95        @echo "The $@ target is no longer supported by this makefile."
     96        @false
    19897
    19998clean:
    200         $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \
    201         $(LIBSO) $(LIBSOMAJ)* pngtesti \
    202         pnglibconf.h libpng.pc
     99        $(RM_F) *.o libpng.a pngtest pngout.png
     100        $(RM_F) $(LIBSO) $(LIBSOMAJ)* pnglibconf.h
    203101
    204102# DO NOT DELETE THIS LINE -- make depend depends on it.
    205103
    206 png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     104png.o      png.pic.o:      png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    207105pngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    208 pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    209 pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    210 pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    211 pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    212 pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    213 pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     106pngget.o   pngget.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     107pngmem.o   pngmem.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     108pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     109pngread.o  pngread.pic.o:  png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     110pngrio.o   pngrio.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    214111pngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    215112pngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     113pngset.o   pngset.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    216114pngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     115pngwio.o   pngwio.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    217116pngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    218117pngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    219118pngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    220 pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    221119
    222120pngtest.o: png.h pngconf.h pnglibconf.h
  • trunk/src/libs/libpng-1.6.42/scripts/makefile.clang

    r96425 r103316  
    11# makefile for libpng using clang (generic, static library)
     2# Copyright (C) 2000, 2014, 2019-2022 Cosmin Truta
    23# Copyright (C) 2008, 2014 Glenn Randers-Pehrson
    3 # Copyright (C) 2000, 2014, 2019 Cosmin Truta
    44# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
    55#
     
    2020RM_F = rm -f
    2121
     22# Compiler and linker flags
     23NOHWOPT = -DPNG_ARM_NEON_OPT=0 -DPNG_MIPS_MSA_OPT=0 \
     24        -DPNG_POWERPC_VSX_OPT=0 -DPNG_INTEL_SSE_OPT=0
    2225WARNMORE = -Wwrite-strings -Wpointer-arith -Wshadow \
    2326        -Wmissing-declarations -Wtraditional -Wcast-align \
    2427        -Wstrict-prototypes -Wmissing-prototypes # -Wconversion
    25 CPPFLAGS = -I$(ZLIBINC) # -DPNG_DEBUG=5
    26 CFLAGS = -W -Wall -O2 # $(WARNMORE) -g
    27 LDFLAGS = -L$(ZLIBLIB)
     28DEFS = $(NOHWOPT)
     29CPPFLAGS = -I$(ZLIBINC) $(DEFS) # -DPNG_DEBUG=5
     30CFLAGS = -O2 -Wall -Wextra -Wundef # $(WARNMORE) -g
     31LDFLAGS = -L$(ZLIBLIB) # -g
    2832LIBS = -lz -lm
    2933
     
    3539PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
    3640
    37 # Variables
    38 OBJS =  png.o pngerror.o pngget.o pngmem.o pngpread.o \
    39         pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
    40         pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
     41# File lists
     42OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
     43       pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
     44       pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
    4145
    4246# Targets
  • trunk/src/libs/libpng-1.6.42/scripts/makefile.darwin

    r96425 r103316  
    1 # makefile for libpng on Darwin / Mac OS X
     1# makefile for libpng on Darwin / macOS
     2# Copyright (C) 2020-2022 Cosmin Truta
    23# Copyright (C) 2002, 2004, 2006, 2008, 2010-2014 Glenn Randers-Pehrson
    34# Copyright (C) 2001 Christoph Pfisterer
     
    1011# and license in png.h
    1112
    12 # where "make install" puts libpng.a, libpng16.dylib, png.h, pngconf.h,
    13 # and pnglibconf.h
    14 prefix=/usr/local
    15 exec_prefix=$(prefix)
    16 
    1713# Where the zlib library and include files are located
    1814ZLIBLIB=/usr/lib
     
    2016
    2117# Library name:
    22 LIBNAME = libpng16
    23 PNGMAJ = 16
     18LIBNAME=libpng16
     19PNGMAJ=16
    2420
    2521# Shared library names:
    2622LIBSO=$(LIBNAME).dylib
    2723LIBSOMAJ=$(LIBNAME).$(PNGMAJ).dylib
    28 LIBSOREL=$(LIBNAME).$(PNGMAJ).$(RELEASE).dylib
    29 OLDSO=libpng.dylib
    3024
    3125# Utilities:
    3226CC=cc
    3327AR_RC=ar rc
     28RANLIB=ranlib
    3429MKDIR_P=mkdir -p
    3530LN_SF=ln -sf
    36 RANLIB=ranlib
    3731CP=cp
    38 RM_F=/bin/rm -f
     32RM_F=rm -f
    3933
    40 CPPFLAGS=-I$(ZLIBINC)
    41 # CFLAGS=-W -Wall -O3 -funroll-loops
    42 CFLAGS=-W -Wall -O -funroll-loops
     34NOHWOPT=-DPNG_ARM_NEON_OPT=0 -DPNG_MIPS_MSA_OPT=0 \
     35        -DPNG_POWERPC_VSX_OPT=0 -DPNG_INTEL_SSE_OPT=0
     36DEFS=$(NOHWOPT)
     37CPPFLAGS=-I$(ZLIBINC) $(DEFS)
     38CFLAGS=-O3 -funroll-loops -Wall -Wextra -Wundef
    4339LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz
    44 
    45 INCPATH=$(prefix)/include
    46 LIBPATH=$(exec_prefix)/lib
    47 MANPATH=$(prefix)/man
    48 BINPATH=$(exec_prefix)/bin
    49 
    50 # override DESTDIR= on the make install command line to easily support
    51 # installing into a temporary location.  Example:
    52 #
    53 #    make install DESTDIR=/tmp/build/libpng
    54 #
    55 # If you're going to install into a temporary location
    56 # via DESTDIR, $(DESTDIR)$(prefix) must already exist before
    57 # you execute make install.
    58 DESTDIR=
    59 
    60 DB=$(DESTDIR)$(BINPATH)
    61 DI=$(DESTDIR)$(INCPATH)
    62 DL=$(DESTDIR)$(LIBPATH)
    63 DM=$(DESTDIR)$(MANPATH)
    6440
    6541# Pre-built configuration
     
    6743PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
    6844
    69 OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
    70         pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
    71         pngwtran.o pngmem.o pngerror.o pngpread.o
     45# File lists
     46OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
     47       pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
     48       pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
    7249
    7350OBJSDLL = $(OBJS:.o=.pic.o)
     
    8158        $(CC) -c $(CPPFLAGS) $(CFLAGS) -fno-common -o $@ $*.c
    8259
    83 all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
     60all: libpng.a $(LIBSO) pngtest
    8461
    8562pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
     
    9067        $(RANLIB) $@
    9168
    92 libpng.pc:
    93         cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
    94         -e s!@exec_prefix@!$(exec_prefix)! \
    95         -e s!@libdir@!$(LIBPATH)! \
    96         -e s!@includedir@!$(INCPATH)! \
    97         -e s!-lpng16!-lpng16\ -lz! > libpng.pc
    98 
    99 libpng-config:
    100         ( cat scripts/libpng-config-head.in; \
    101         echo prefix=\"$(prefix)\"; \
    102         echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
    103         echo L_opts=\"-L$(LIBPATH)\"; \
    104         echo libs=\"-lpng16 -lz\"; \
    105         cat scripts/libpng-config-body.in ) > libpng-config
    106         chmod +x libpng-config
    107 
    10869$(LIBSO): $(LIBSOMAJ)
    10970        $(LN_SF) $(LIBSOMAJ) $(LIBSO)
     
    11172$(LIBSOMAJ): $(OBJSDLL)
    11273        $(CC) -dynamiclib \
    113          -install_name $(LIBPATH)/$(LIBSOMAJ) \
    11474         -current_version 16 -compatibility_version 16 \
    11575         -o $(LIBSOMAJ) \
     
    12282        ./pngtest
    12383
    124 install-headers: png.h pngconf.h pnglibconf.h
    125         -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
    126         -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
    127         cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
    128         chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h
    129         -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
    130         -@$(RM_F) $(DI)/libpng
    131         (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
     84install:
     85        @echo "The $@ target is no longer supported by this makefile."
     86        @false
    13287
    133 install-static: install-headers libpng.a
    134         -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
    135         cp libpng.a $(DL)/$(LIBNAME).a
    136         chmod 644 $(DL)/$(LIBNAME).a
    137         $(RANLIB) $(DL)/$(LIBNAME).a
    138         -@$(RM_F) $(DL)/libpng.a
    139         (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
     88install-static:
     89        @echo "The $@ target is no longer supported by this makefile."
     90        @false
    14091
    141 install-shared: install-headers $(LIBSOMAJ) libpng.pc
    142         -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
    143         -@$(RM_F) $(DL)/$(LIBSO)
    144         -@$(RM_F) $(DL)/$(LIBSOMAJ)
    145         -@$(RM_F) $(DL)/$(OLDSO)
    146         cp $(LIBSOMAJ) $(DL)
    147         chmod 755 $(DL)/$(LIBSOMAJ)
    148         (cd $(DL); \
    149         $(LN_SF) $(LIBSOREL) $(LIBSO); \
    150         $(LN_SF) $(LIBSO) $(OLDSO))
    151         -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
    152         -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
    153         -@$(RM_F) $(DL)/pkgconfig/libpng.pc
    154         cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
    155         chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
    156         (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
    157 
    158 install-man: libpng.3 libpngpf.3 png.5
    159         -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
    160         -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
    161         -@$(RM_F) $(DM)/man3/libpng.3
    162         -@$(RM_F) $(DM)/man3/libpngpf.3
    163         cp libpng.3 $(DM)/man3
    164         cp libpngpf.3 $(DM)/man3
    165         -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
    166         -@$(RM_F) $(DM)/man5/png.5
    167         cp png.5 $(DM)/man5
    168 
    169 install-config: libpng-config
    170         -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
    171         -@$(RM_F) $(DB)/libpng-config
    172         -@$(RM_F) $(DB)/$(LIBNAME)-config
    173         cp libpng-config $(DB)/$(LIBNAME)-config
    174         chmod 755 $(DB)/$(LIBNAME)-config
    175         (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
    176 
    177 install: install-static install-shared install-man install-config
    178 
    179 # If you installed in $(DESTDIR), test-installed won't work until you
    180 # move the library to its final location.  Use test-dd to test it
    181 # before then.
    182 
    183 test-dd:
    184         echo
    185         echo Testing installed dynamic shared library in $(DL).
    186         $(CC) -I$(DI) $(CPPFLAGS) \
    187            `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
    188            -L$(DL) -L$(ZLIBLIB) \
    189            -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
    190         ./pngtestd pngtest.png
    191 
    192 test-installed:
    193         $(CC) $(CPPFLAGS) $(CFLAGS) \
    194            `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
    195            -L$(ZLIBLIB) \
    196            -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
    197         ./pngtesti pngtest.png
     92install-shared:
     93        @echo "The $@ target is no longer supported by this makefile."
     94        @false
    19895
    19996clean:
    200         $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \
    201         libpng.pc $(LIBNAME).*dylib pngtesti pnglibconf.h
    202 
    203 DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO
    204 writelock:
    205         chmod a-w *.[ch35] $(DOCS) scripts/*
     97        $(RM_F) *.o libpng.a pngtest pngout.png
     98        $(RM_F) $(LIBNAME).*dylib pnglibconf.h
    20699
    207100# DO NOT DELETE THIS LINE -- make depend depends on it.
    208101
    209 png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     102png.o      png.pic.o:      png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    210103pngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    211 pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    212 pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    213 pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    214 pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    215 pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    216 pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     104pngget.o   pngget.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     105pngmem.o   pngmem.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     106pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     107pngread.o  pngread.pic.o:  png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     108pngrio.o   pngrio.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    217109pngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    218110pngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     111pngset.o   pngset.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    219112pngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     113pngwio.o   pngwio.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    220114pngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    221115pngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    222116pngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    223 pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    224117
    225118pngtest.o: png.h pngconf.h pnglibconf.h
  • trunk/src/libs/libpng-1.6.42/scripts/makefile.dec

    r96425 r103316  
    11# makefile for libpng on DEC Alpha Unix
     2# Copyright (C) 2020-2022 Cosmin Truta
    23# Copyright (C) 2000-2002, 2006, 2010-2014 Glenn Randers-Pehrson
    34# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
     
    89
    910# Library name:
    10 PNGMAJ = 16
    11 LIBNAME = libpng16
     11LIBNAME=libpng16
     12PNGMAJ=16
    1213
    1314# Shared library names:
    1415LIBSO=$(LIBNAME).so
    1516LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
    16 LIBSOREL=$(LIBSOMAJ).$(RELEASE)
    17 OLDSO=libpng.so
    1817
    1918# Utilities:
     19CC=cc
    2020AR_RC=ar rc
    21 CC=cc
     21RANLIB=ranlib
    2222MKDIR_P=mkdir
    2323LN_SF=ln -f -s
    24 RANLIB=ranlib
    2524CP=cp
    2625RM_F=/bin/rm -f
    27 
    28 # where make install puts libpng.a and png.h
    29 prefix=/usr/local
    30 exec_prefix=$(prefix)
    31 INCPATH=$(prefix)/include
    32 LIBPATH=$(exec_prefix)/lib
    33 MANPATH=$(prefix)/man
    34 BINPATH=$(exec_prefix)/bin
    35 
    36 # override DESTDIR= on the make install command line to easily support
    37 # installing into a temporary location.  Example:
    38 #
    39 #    make install DESTDIR=/tmp/build/libpng
    40 #
    41 # If you're going to install into a temporary location
    42 # via DESTDIR, $(DESTDIR)$(prefix) must already exist before
    43 # you execute make install.
    44 DESTDIR=
    45 
    46 DB=$(DESTDIR)$(BINPATH)
    47 DI=$(DESTDIR)$(INCPATH)
    48 DL=$(DESTDIR)$(LIBPATH)
    49 DM=$(DESTDIR)$(MANPATH)
    5026
    5127# Where the zlib library and include files are located
     
    6339PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
    6440
    65 OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
    66         pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
    67         pngwtran.o pngmem.o pngerror.o pngpread.o
     41OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
     42       pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
     43       pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
    6844
    6945.c.o:
    7046        $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
    7147
    72 all: $(LIBSO) libpng.a pngtest libpng.pc libpng-config
     48all: $(LIBSO) libpng.a pngtest
    7349
    7450pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
     
    7652
    7753libpng.a: $(OBJS)
    78         $(AR_RC) $@  $(OBJS)
     54        $(AR_RC) $@ $(OBJS)
    7955        $(RANLIB) $@
    80 
    81 libpng.pc:
    82         cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
    83         -e s!@exec_prefix@!$(exec_prefix)! \
    84         -e s!@libdir@!$(LIBPATH)! \
    85         -e s!@includedir@!$(INCPATH)! \
    86         -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc
    87 
    88 libpng-config:
    89         ( cat scripts/libpng-config-head.in; \
    90         echo prefix=\"$(prefix)\"; \
    91         echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
    92         echo ccopts=\"-std\"; \
    93         echo L_opts=\"-L$(LIBPATH)\"; \
    94         echo libs=\"-lpng16 -lz -lm\"; \
    95         cat scripts/libpng-config-body.in ) > libpng-config
    96         chmod +x libpng-config
    9756
    9857$(LIBSO): $(LIBSOMAJ)
     
    10059
    10160$(LIBSOMAJ): $(OBJS)
    102         $(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) \
    103         -soname $(LIBSOMAJ)
     61        $(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) -soname $(LIBSOMAJ)
    10462
    10563pngtest: pngtest.o libpng.a
     
    10967        ./pngtest
    11068
    111 install-headers: png.h pngconf.h pnglibconf.h
    112         -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
    113         -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
    114         cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
    115         chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h
    116         -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
    117         -@/bin/rm -f $(DI)/libpng
    118         (cd $(DI); $(LN_SF)(LIBNAME) libpng; $(LN_SF)(LIBNAME)/* .)
     69install:
     70        @echo "The $@ target is no longer supported by this makefile."
     71        @false
    11972
    120 install-static: install-headers libpng.a
    121         -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
    122         cp libpng.a $(DL)/$(LIBNAME).a
    123         chmod 644 $(DL)/$(LIBNAME).a
    124         -@/bin/rm -f $(DL)/libpng.a
    125         (cd $(DL); $(LN_SF)(LIBNAME).a libpng.a)
     73install-static:
     74        @echo "The $@ target is no longer supported by this makefile."
     75        @false
    12676
    127 install-shared: install-headers $(LIBSOMAJ) libpng.pc
    128         -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
    129         -@$(RM_F) $(DL)/$(LIBSO)
    130         -@$(RM_F) $(DL)/$(LIBSOREL)
    131         -@$(RM_F) $(DL)/$(OLDSO)
    132         cp $(LIBSOMAJ) $(DL)/$(LIBSOREL)
    133         chmod 755 $(DL)/$(LIBSOREL)
    134         (cd $(DL); \
    135         $(LN_SF) $(LIBSOREL) $(LIBSO); \
    136         $(LN_SF) $(LIBSO) $(OLDSO))
    137         -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
    138         -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
    139         -@$(RM_F) $(DL)/pkgconfig/libpng.pc
    140         cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
    141         chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
    142         (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
    143 
    144 install-man: libpng.3 libpngpf.3 png.5
    145         -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
    146         -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
    147         -@/bin/rm -f $(DM)/man3/libpng.3
    148         -@/bin/rm -f $(DM)/man3/libpngpf.3
    149         cp libpng.3 $(DM)/man3
    150         cp libpngpf.3 $(DM)/man3
    151         -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
    152         -@/bin/rm -f $(DM)/man5/png.5
    153         cp png.5 $(DM)/man5
    154 
    155 install-config: libpng-config
    156         -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
    157         -@/bin/rm -f $(DB)/libpng-config
    158         -@/bin/rm -f $(DB)/$(LIBNAME)-config
    159         cp libpng-config $(DB)/$(LIBNAME)-config
    160         chmod 755 $(DB)/$(LIBNAME)-config
    161         (cd $(DB); $(LN_SF)(LIBNAME)-config libpng-config)
    162 
    163 install: install-static install-shared install-man install-config
    164 
    165 # If you installed in $(DESTDIR), test-installed won't work until you
    166 # move the library to its final location.  Use test-dd to test it
    167 # before then.
    168 
    169 test-dd:
    170         echo
    171         echo Testing installed dynamic shared library in $(DL).
    172         $(CC) -w1 -I$(DI) $(CPPFLAGS) \
    173            `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
    174            -L$(DL) -L$(ZLIBLIB)  -R$(ZLIBLIB) -R$(DL) \
    175            -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
    176         ./pngtestd pngtest.png
    177 
    178 test-installed:
    179         echo
    180         echo Testing installed dynamic shared library.
    181         $(CC) -w1 $(CPPFLAGS) \
    182            `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
    183            -L$(ZLIBLIB) -R$(ZLIBLIB) \
    184            -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
    185         ./pngtesti pngtest.png
     77install-shared:
     78        @echo "The $@ target is no longer supported by this makefile."
     79        @false
    18680
    18781clean:
    188         $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
    189         libpng-config $(LIBSO) $(LIBSOMAJ)* \
    190         libpng.pc pnglibconf.h
     82        $(RM_F) *.o libpng.a pngtest pngout.png
     83        $(RM_F) $(LIBSO) $(LIBSOMAJ)* pnglibconf.h
    19184
    19285# DO NOT DELETE THIS LINE -- make depend depends on it.
    19386
    194 png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     87png.o:      png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    19588pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    196 pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    197 pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    198 pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    199 pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    200 pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    201 pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     89pngget.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     90pngmem.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     91pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     92pngread.o:  png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     93pngrio.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    20294pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    20395pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     96pngset.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    20497pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     98pngwio.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    20599pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    206100pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    207101pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    208 pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    209102
    210 pngtest.o: png.h pngconf.h pnglibconf.h
     103pngtest.o:  png.h pngconf.h pnglibconf.h
  • trunk/src/libs/libpng-1.6.42/scripts/makefile.dj2

    r96425 r103316  
    11# DJGPP (DOS gcc) makefile for libpng
     2# Copyright (C) 2020-2022 Cosmin Truta
    23# Copyright (C) 2002, 2006, 2009-2014 Glenn Randers-Pehrson
    34# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
     
    78# and license in png.h
    89
    9 # where make install will put libpng.a and png.h
    10 #prefix=/usr/local
    11 prefix=.
    12 INCPATH=$(prefix)/include
    13 LIBPATH=$(prefix)/lib
    14 
    1510CC=gcc
    1611CPPFLAGS=-I../zlib -DPNG_NO_SNPRINTF
    1712CFLAGS=-O
    1813LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
    19 
    20 RANLIB=ranlib
    2114
    2215CP=cp
     
    2720PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
    2821
    29 OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
    30         pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o pngwtran.o \
    31         pngmem.o pngerror.o pngpread.o
     22OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
     23       pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
     24       pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
    3225
    3326.c.o:
     
    4033
    4134libpng.a: $(OBJS)
    42         ar rc $@  $(OBJS)
    43         $(RANLIB) $@
     35        ar rc $@ $(OBJS)
     36        ranlib $@
    4437
    4538pngtest: pngtest.o libpng.a
     
    4942test: pngtest
    5043        ./pngtest
     44
     45install:
     46        @echo "The $@ target is no longer supported by this makefile."
     47        @false
     48
    5149clean:
    5250        $(RM_F) *.o libpng.a pngtest pngout.png pnglibconf.h
     
    5452# DO NOT DELETE THIS LINE -- make depend depends on it.
    5553
    56 png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     54png.o:      png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    5755pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    58 pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    59 pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    60 pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    61 pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    62 pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    63 pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     56pngrio.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     57pngwio.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     58pngmem.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     59pngset.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     60pngget.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     61pngread.o:  png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    6462pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    6563pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     
    7068pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    7169
    72 pngtest.o: png.h pngconf.h pnglibconf.h
     70pngtest.o:  png.h pngconf.h pnglibconf.h
  • trunk/src/libs/libpng-1.6.42/scripts/makefile.freebsd

    r96425 r103316  
    11# makefile for libpng under FreeBSD
     2# Copyright (C) 2020-2022 Cosmin Truta
    23# Copyright (C) 2014 Glenn Randers-Pehrson and Andrey A. Chernov
    34# Copyright (C) 2002, 2007, 2009 Glenn Randers-Pehrson and Andrey A. Chernov
     
    78# and license in png.h
    89
    9 PREFIX?=        /usr/local
    10 SHLIB_VER?=     16
    11 
    1210LIB=            png
     11SHLIB_VER=      16
    1312SHLIB_MAJOR=    ${SHLIB_VER}
    1413SHLIB_MINOR=    0
    15 NO_PROFILE=     YES
    16 NO_OBJ=         YES
    1714
    18 # where make install puts libpng.a and png.h
    19 DESTDIR=        ${PREFIX}
    20 LIBDIR=         /lib
    21 INCS=           png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    22 INCSDIR=        /include/libpng
    23 INCDIR=         ${INCSDIR}              # for 4.x bsd.lib.mk
    24 MAN=            libpng.3 libpngpf.3 png.5
    25 MANDIR=         /man/man
    26 SYMLINKS=       libpng/png.h ${INCSDIR}/../png.h \
    27                 libpng/pngconf.h ${INCSDIR}/../pngconf.h \
    28                 libpng/pnglibconf.h ${INCSDIR}/../pnglibconf.h
    29 
    30 # where make install finds libz.a and zlib.h
    3115ZLIBLIB=        /usr/lib
    3216ZLIBINC=        /usr/include
     
    3822
    3923CPPFLAGS+=      -I. -I${ZLIBINC}
    40 CFLAGS+=        -W -Wall
     24CFLAGS+=        -Wall -Wextra -Wundef
     25LDFLAGS+=       -L. -L${ZLIBLIB}
     26
     27CLEANFILES+=    pngtest pngtest.o pngout.png
    4128
    4229# Pre-built configuration
     
    4431PNGLIBCONF_H_PREBUILT= scripts/pnglibconf.h.prebuilt
    4532
    46 SRCS=   png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
    47         pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
    48         pngwtran.c pngmem.c pngerror.c pngpread.c
     33SRCS=   png.c pngerror.c pngget.c pngmem.c pngpread.c \
     34        pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c \
     35        pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c
    4936
    5037.c.o:
    51         $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
     38        ${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $<
    5239
    53 pngtest: pngtest.o libpng.a
    54         ${CC} ${CFLAGS} -L. -static -o pngtest pngtest.o -L${ZLIBLIB} \
    55         -lpng ${LDADD}
     40pnglibconf.h:   ${PNGLIBCONF_H_PREBUILT}
     41        cp ${PNGLIBCONF_H_PREBUILT} $@
    5642
    57 CLEANFILES= pngtest pngtest.o pngout.png
     43pngtest:        pngtest.o libpng.a
     44        ${CC} ${LDFLAGS} -static -o pngtest pngtest.o -lpng ${LDADD}
    5845
    59 test: pngtest
     46test:   pngtest
    6047        ./pngtest
    6148
    62 pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
    63         cp $(PNGLIBCONF_H_PREBUILT) $@
    64 
    65 DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO
    66 writelock:
    67         chmod a-w *.[ch35] $(DOCS) scripts/*
     49install:
     50        @echo "The $@ target is no longer supported by this makefile."
     51        @false
    6852
    6953.include <bsd.lib.mk>
  • trunk/src/libs/libpng-1.6.42/scripts/makefile.gcc

    r96425 r103316  
    11# makefile for libpng using gcc (generic, static library)
     2# Copyright (C) 2000, 2014, 2019-2022 Cosmin Truta
    23# Copyright (C) 2008, 2014 Glenn Randers-Pehrson
    3 # Copyright (C) 2000, 2014, 2019 Cosmin Truta
    44# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
    55#
     
    2020RM_F = rm -f
    2121
     22# Compiler and linker flags
     23NOHWOPT = -DPNG_ARM_NEON_OPT=0 -DPNG_MIPS_MSA_OPT=0 \
     24        -DPNG_POWERPC_VSX_OPT=0 -DPNG_INTEL_SSE_OPT=0
    2225WARNMORE = -Wwrite-strings -Wpointer-arith -Wshadow \
    2326        -Wmissing-declarations -Wtraditional -Wcast-align \
    2427        -Wstrict-prototypes -Wmissing-prototypes # -Wconversion
    25 CPPFLAGS = -I$(ZLIBINC) # -DPNG_DEBUG=5
    26 CFLAGS = -W -Wall -O2 # $(WARNMORE) -g
    27 LDFLAGS = -L$(ZLIBLIB)
     28DEFS = $(NOHWOPT)
     29CPPFLAGS = -I$(ZLIBINC) $(DEFS) # -DPNG_DEBUG=5
     30CFLAGS = -O2 -Wall -Wextra -Wundef # $(WARNMORE) -g
     31LDFLAGS = -L$(ZLIBLIB) # -g
    2832LIBS = -lz -lm
    2933
     
    3539PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
    3640
    37 # Variables
    38 OBJS =  png.o pngerror.o pngget.o pngmem.o pngpread.o \
    39         pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
    40         pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
     41# File lists
     42OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
     43       pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
     44       pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
    4145
    4246# Targets
  • trunk/src/libs/libpng-1.6.42/scripts/makefile.hp64

    r96425 r103316  
    11# makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product.
     2# Copyright (C) 2020-2022 Cosmin Truta
    23# Copyright (C) 1999-2002, 2006, 2009, 2010-2014 Glenn Randers-Pehrson
    34# Copyright (C) 1995 Guy Eric Schalnat, Group 42
     
    2021
    2122# Library name:
    22 LIBNAME = libpng16
    23 PNGMAJ = 16
     23LIBNAME=libpng16
     24PNGMAJ=16
    2425
    2526# Shared library names:
    2627LIBSO=$(LIBNAME).sl
    2728LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ)
    28 LIBSOREL=$(LIBSOMAJ).$(RELEASE)
    29 OLDSO=libpng.sl
    3029
    3130# Utilities:
     31CC=cc
    3232AR_RC=ar rc
    33 CC=cc
     33RANLIB=ranlib
    3434MKDIR_P=mkdir -p
    3535LN_SF=ln -sf
    36 RANLIB=ranlib
    3736CP=cp
    3837RM_F=/bin/rm -f
     
    4645LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
    4746
    48 # where make install puts libpng.a, libpng16.sl, and png.h
    49 prefix=/opt/libpng
    50 exec_prefix=$(prefix)
    51 INCPATH=$(prefix)/include
    52 LIBPATH=$(exec_prefix)/lib
    53 MANPATH=$(prefix)/man
    54 BINPATH=$(exec_prefix)/bin
    55 
    56 # override DESTDIR= on the make install command line to easily support
    57 # installing into a temporary location.  Example:
    58 #
    59 #    make install DESTDIR=/tmp/build/libpng
    60 #
    61 # If you're going to install into a temporary location
    62 # via DESTDIR, $(DESTDIR)$(prefix) must already exist before
    63 # you execute make install.
    64 DESTDIR=
    65 
    66 DB=$(DESTDIR)$(BINPATH)
    67 DI=$(DESTDIR)$(INCPATH)
    68 DL=$(DESTDIR)$(LIBPATH)
    69 DM=$(DESTDIR)$(MANPATH)
    70 
    7147# Pre-built configuration
    7248# See scripts/pnglibconf.mak for more options
    7349PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
    7450
    75 OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
    76         pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
    77         pngwtran.o pngmem.o pngerror.o pngpread.o
     51OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
     52       pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
     53       pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
    7854
    7955OBJSDLL = $(OBJS:.o=.pic.o)
     
    8763        $(CC) -c $(CPPFLAGS) $(CFLAGS) +z -o $@ $*.c
    8864
    89 all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
     65all: libpng.a $(LIBSO) pngtest
    9066
    9167pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
     
    9571        $(AR_RC) $@ $(OBJS)
    9672        $(RANLIB) $@
    97 
    98 libpng.pc:
    99         cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
    100         -e s!@exec_prefix@!$(exec_prefix)! \
    101         -e s!@libdir@!$(LIBPATH)! \
    102         -e s!@includedir@!$(INCPATH)! \
    103         -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc
    104 
    105 libpng-config:
    106         ( cat scripts/libpng-config-head.in; \
    107         echo prefix=\"$(prefix)\"; \
    108         echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
    109         echo ccopts=\"-O -Ae -Wl,+vnocompatwarnings +DD64 +Z\"; \
    110         echo L_opts=\"-L$(LIBPATH)\"; \
    111         echo libs=\"-lpng16 -lz -lm\"; \
    112         cat scripts/libpng-config-body.in ) > libpng-config
    113         chmod +x libpng-config
    11473
    11574$(LIBSO): $(LIBSOMAJ)
     
    12685        ./pngtest
    12786
    128 install-headers: png.h pngconf.h pnglibconf.h
    129         -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
    130         -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
    131         cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
    132         chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h
    133         -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
    134         -@$(RM_F) $(DI)/libpng
    135         (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
     87install:
     88        @echo "The $@ target is no longer supported by this makefile."
     89        @false
    13690
    137 install-static: install-headers libpng.a
    138         -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
    139         cp libpng.a $(DL)/$(LIBNAME).a
    140         chmod 644 $(DL)/$(LIBNAME).a
    141         -@$(RM_F) $(DL)/libpng.a
    142         (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
     91install-static:
     92        @echo "The $@ target is no longer supported by this makefile."
     93        @false
    14394
    144 install-shared: install-headers $(LIBSOMAJ) libpng.pc
    145         -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
    146         -@$(RM_F) $(DL)/$(LIBSO)
    147         -@$(RM_F) $(DL)/$(LIBSOREL)
    148         -@$(RM_F) $(DL)/$(OLDSO)
    149         cp $(LIBSOMAJ) $(DL)/$(LIBSOREL)
    150         chmod 755 $(DL)/$(LIBSOREL)
    151         (cd $(DL); \
    152         $(LN_SF) $(LIBSOREL) $(LIBSO); \
    153         $(LN_SF) $(LIBSO) $(OLDSO))
    154         -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
    155         -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
    156         -@$(RM_F) $(DL)/pkgconfig/libpng.pc
    157         cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
    158         chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
    159         (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
    160 
    161 install-man: libpng.3 libpngpf.3 png.5
    162         -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
    163         -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
    164         -@$(RM_F) $(DM)/man3/libpng.3
    165         -@$(RM_F) $(DM)/man3/libpngpf.3
    166         cp libpng.3 $(DM)/man3
    167         cp libpngpf.3 $(DM)/man3
    168         -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
    169         -@$(RM_F) $(DM)/man5/png.5
    170         cp png.5 $(DM)/man5
    171 
    172 install-config: libpng-config
    173         -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
    174         -@$(RM_F) $(DB)/libpng-config
    175         -@$(RM_F) $(DB)/$(LIBNAME)-config
    176         cp libpng-config $(DB)/$(LIBNAME)-config
    177         chmod 755 $(DB)/$(LIBNAME)-config
    178         (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
    179 
    180 install: install-static install-shared install-man install-config
    181 
    182 # If you installed in $(DESTDIR), test-installed won't work until you
    183 # move the library to its final location.  Use test-dd to test it
    184 # before then.
    185 
    186 test-dd:
    187         echo
    188         echo Testing installed dynamic shared library in $(DL).
    189         $(CC) -I$(DI) $(CPPFLAGS) $(CCFLAGS) \
    190            `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
    191            -L$(DL) -L$(ZLIBLIB) \
    192            -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
    193         ./pngtestd pngtest.png
    194 
    195 test-installed:
    196         echo
    197         echo Testing installed dynamic shared library.
    198         $(CC) $(CPPFLAGS) $(CCFLAGS) \
    199            `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
    200            -L$(ZLIBLIB) \
    201            -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
    202         ./pngtesti pngtest.png
     95install-shared:
     96        @echo "The $@ target is no longer supported by this makefile."
     97        @false
    20398
    20499clean:
    205         $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
    206         libpng-config $(LIBSO) $(LIBSOMAJ)* \
    207         libpng.pc pnglibconf.h
    208 
    209 DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO
    210 writelock:
    211         chmod a-w *.[ch35] $(DOCS) scripts/*
     100        $(RM_F) *.o libpng.a pngtest pngout.png
     101        $(RM_F) $(LIBSO) $(LIBSOMAJ)* pnglibconf.h
    212102
    213103# DO NOT DELETE THIS LINE -- make depend depends on it.
    214104
    215 png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     105png.o:      png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    216106pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    217 pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    218 pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    219 pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    220 pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    221 pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    222 pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     107pngget.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     108pngmem.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     109pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     110pngread.o:  png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     111pngrio.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    223112pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    224113pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     114pngset.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    225115pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     116pngwio.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    226117pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    227118pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    228119pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    229 pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    230120
    231 pngtest.o: png.h pngconf.h pnglibconf.h
     121pngtest.o:  png.h pngconf.h pnglibconf.h
  • trunk/src/libs/libpng-1.6.42/scripts/makefile.hpgcc

    r96425 r103316  
    11# makefile for libpng on HP-UX using GCC with the HP ANSI/C linker.
     2# Copyright (C) 2020-2022 Cosmin Truta
    23# Copyright (C) 2002, 2006-2008, 2010-2014 Glenn Randers-Pehrson
    34# Copyright (C) 2001, Laurent faillie
     
    1011
    1112# Library name:
    12 LIBNAME = libpng16
    13 PNGMAJ = 16
     13LIBNAME=libpng16
     14PNGMAJ=16
    1415
    1516# Shared library names:
    1617LIBSO=$(LIBNAME).sl
    1718LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ)
    18 LIBSOREL=$(LIBSOMAJ).$(RELEASE)
    19 OLDSO=libpng.sl
    2019
    2120# Utilities:
     
    2322LD=ld
    2423AR_RC=ar rc
     24RANLIB=ranlib
    2525MKDIR_P=mkdir -p
    2626LN_SF=ln -sf
    27 RANLIB=ranlib
    2827CP=cp
    2928RM_F=/bin/rm -f
    30 
    31 # where "make install" puts libpng.a, $(OLDSO)*, png.h, pngconf.h
    32 # and pnglibconf.h
    33 prefix=/usr/local
    34 exec_prefix=$(prefix)
    3529
    3630# Where the zlib library and include files are located
     
    4539#   SHAREDLIB=libz.sl
    4640
    47 ALIGN=
    48 # for i386:
    49 #ALIGN=-malign-loops=2 -malign-functions=2
    50 
    5141WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
    5242        -Wmissing-declarations -Wtraditional -Wcast-align \
    53         -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
    54 
    55 # for pgcc version 2.95.1, -O3 is buggy; don't use it.
     43        -Wstrict-prototypes -Wmissing-prototypes # -Wconversion
    5644
    5745CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
    58 CFLAGS=-W -Wall -O3 -funroll-loops $(ALIGN) # $(WARNMORE) -g
    59 #LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng16 -lz -lm
    60 LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz -lm
     46CFLAGS=-O3 -funroll-loops -Wall -Wextra -Wundef # $(WARNMORE) -g
     47#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng16 -lz -lm # -g
     48LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz -lm # -g
    6149
    62 INCPATH=$(prefix)/include
    63 LIBPATH=$(exec_prefix)/lib
    64 MANPATH=$(prefix)/man
    65 BINPATH=$(exec_prefix)/bin
    66 
    67 # override DESTDIR= on the make install command line to easily support
    68 # installing into a temporary location.  Example:
    69 #
    70 #    make install DESTDIR=/tmp/build/libpng
    71 #
    72 # If you're going to install into a temporary location
    73 # via DESTDIR, $(DESTDIR)$(prefix) must already exist before
    74 # you execute make install.
    75 DESTDIR=
    76 
    77 DB=$(DESTDIR)$(BINPATH)
    78 DI=$(DESTDIR)$(INCPATH)
    79 DL=$(DESTDIR)$(LIBPATH)
    80 DM=$(DESTDIR)$(MANPATH)
    81 
    82 OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
    83         pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
    84         pngwtran.o pngmem.o pngerror.o pngpread.o
     50OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
     51       pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
     52       pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
    8553
    8654OBJSDLL = $(OBJS:.o=.pic.o)
     
    9462        $(CC) -c $(CPPFLAGS) $(CFLAGS) -fPIC -o $@ $*.c
    9563
    96 all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
     64all: libpng.a $(LIBSO) pngtest
    9765
    9866libpng.a: $(OBJS)
    9967        $(AR_RC) $@ $(OBJS)
    10068        $(RANLIB) $@
    101 
    102 libpng.pc:
    103         cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
    104         -e s!@exec_prefix@!$(exec_prefix)! \
    105         -e s!@libdir@!$(LIBPATH)! \
    106         -e s!@includedir@!$(INCPATH)! \
    107         -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc
    108 
    109 libpng-config:
    110         ( cat scripts/libpng-config-head.in; \
    111         echo prefix=\"$(prefix)\"; \
    112         echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
    113         echo libs=\"-lpng16 -lz -lm\"; \
    114         cat scripts/libpng-config-body.in ) > libpng-config
    115         chmod +x libpng-config
    11669
    11770$(LIBSO): $(LIBSOMAJ)
     
    12881        ./pngtest
    12982
     83install:
     84        @echo "The $@ target is no longer supported by this makefile."
     85        @false
    13086
    131 install-headers: png.h pngconf.h pnglibconf.h
    132         -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
    133         -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
    134         cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
    135         chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h
    136         -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
    137         -@$(RM_F) $(DI)/libpng
    138         (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
     87install-static:
     88        @echo "The $@ target is no longer supported by this makefile."
     89        @false
    13990
    140 install-static: install-headers libpng.a
    141         -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
    142         cp libpng.a $(DL)/$(LIBNAME).a
    143         chmod 644 $(DL)/$(LIBNAME).a
    144         -@$(RM_F) $(DL)/libpng.a
    145         (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
    146 
    147 install-shared: install-headers $(LIBSOMAJ) libpng.pc
    148         -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
    149         -@$(RM_F) $(DL)/$(LIBSO)
    150         -@$(RM_F) $(DL)/$(LIBSOREL)
    151         -@$(RM_F) $(DL)/$(OLDSO)
    152         cp $(LIBSOMAJ) $(DL)/$(LIBSOREL)
    153         chmod 755 $(DL)/$(LIBSOREL)
    154         (cd $(DL); \
    155         $(LN_SF) $(LIBSOREL) $(LIBSO); \
    156         $(LN_SF) $(LIBSO) $(OLDSO))
    157         -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
    158         -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
    159         -@$(RM_F) $(DL)/pkgconfig/libpng.pc
    160         cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
    161         chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
    162         (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
    163 
    164 install-man: libpng.3 libpngpf.3 png.5
    165         -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
    166         -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
    167         -@$(RM_F) $(DM)/man3/libpng.3
    168         -@$(RM_F) $(DM)/man3/libpngpf.3
    169         cp libpng.3 $(DM)/man3
    170         cp libpngpf.3 $(DM)/man3
    171         -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
    172         -@$(RM_F) $(DM)/man5/png.5
    173         cp png.5 $(DM)/man5
    174 
    175 install-config: libpng-config
    176         -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
    177         -@$(RM_F) $(DB)/libpng-config
    178         -@$(RM_F) $(DB)/$(LIBNAME)-config
    179         cp libpng-config $(DB)/$(LIBNAME)-config
    180         chmod 755 $(DB)/$(LIBNAME)-config
    181         (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
    182 
    183 install: install-static install-shared install-man install-config
    184 
    185 # If you installed in $(DESTDIR), test-installed won't work until you
    186 # move the library to its final location.  Use test-dd to test it
    187 # before then.
    188 
    189 test-dd:
    190         echo
    191         echo Testing installed dynamic shared library in $(DL).
    192         $(CC) -I$(DI) $(CPPFLAGS) \
    193            `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
    194            -L$(DL) -L$(ZLIBLIB) -Wl,-rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
    195            -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
    196         ./pngtestd pngtest.png
    197 
    198 test-installed:
    199         echo
    200         echo Testing installed dynamic shared library.
    201         $(CC) $(CPPFLAGS) \
    202            `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
    203            -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
    204            -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
    205         ./pngtesti pngtest.png
     91install-shared:
     92        @echo "The $@ target is no longer supported by this makefile."
     93        @false
    20694
    20795clean:
    208         $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
    209         libpng-config $(LIBSO) $(LIBSOMAJ)* \
    210         libpng.pc pnglibconf.h
    211 
    212 DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO
    213 writelock:
    214         chmod a-w *.[ch35] $(DOCS) scripts/*
     96        $(RM_F) *.o libpng.a pngtest pngout.png
     97        $(RM_F) $(LIBSO) $(LIBSOMAJ)* pnglibconf.h
    21598
    21699# DO NOT DELETE THIS LINE -- make depend depends on it.
    217100
    218 png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     101png.o      png.pic.o:      png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    219102pngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    220 pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    221 pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    222 pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    223 pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    224 pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    225 pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     103pngget.o   pngget.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     104pngmem.o   pngmem.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     105pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     106pngread.o  pngread.pic.o:  png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     107pngrio.o   pngrio.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    226108pngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    227109pngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     110pngset.o   pngset.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    228111pngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     112pngwio.o   pngwio.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    229113pngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    230114pngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    231115pngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    232 pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    233116
    234117pngtest.o: png.h pngconf.h pnglibconf.h
  • trunk/src/libs/libpng-1.6.42/scripts/makefile.hpux

    r96425 r103316  
    11# makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product.
     2# Copyright (C) 2020-2022 Cosmin Truta
    23# Copyright (C) 1999-2002, 2006, 2010-2014 Glenn Randers-Pehrson
    34# Copyright (C) 1995 Guy Eric Schalnat, Group 42
     
    2122
    2223# Library name:
    23 LIBNAME = libpng16
    24 PNGMAJ = 16
     24LIBNAME=libpng16
     25PNGMAJ=16
    2526
    2627# Shared library names:
    2728LIBSO=$(LIBNAME).sl
    2829LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ)
    29 LIBSOREL=$(LIBSOMAJ).$(RELEASE)
    30 OLDSO=libpng.sl
    3130
    3231# Utilities:
     32CC=cc
    3333AR_RC=ar rc
    34 CC=cc
     34RANLIB=ranlib
    3535MKDIR_P=mkdir -p
    3636LN_SF=ln -sf
    37 RANLIB=ranlib
    3837RM_F=/bin/rm -f
    39 
    40 # where make install puts libpng.a, libpng16.sl, and png.h
    41 prefix=/opt/libpng
    42 exec_prefix=$(prefix)
    43 INCPATH=$(prefix)/include
    44 LIBPATH=$(exec_prefix)/lib
    45 MANPATH=$(prefix)/man
    46 BINPATH=$(exec_prefix)/bin
    4738
    4839CPPFLAGS=-I$(ZLIBINC)
     
    5243LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
    5344
    54 # override DESTDIR= on the make install command line to easily support
    55 # installing into a temporary location.  Example:
    56 #
    57 #    make install DESTDIR=/tmp/build/libpng
    58 #
    59 # If you're going to install into a temporary location
    60 # via DESTDIR, $(DESTDIR)$(prefix) must already exist before
    61 # you execute make install.
    62 DESTDIR=
    63 
    64 DB=$(DESTDIR)$(BINPATH)
    65 DI=$(DESTDIR)$(INCPATH)
    66 DL=$(DESTDIR)$(LIBPATH)
    67 DM=$(DESTDIR)$(MANPATH)
    68 
    6945# Pre-built configuration
    7046# See scripts/pnglibconf.mak for more options
    7147PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
    7248
    73 OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
    74         pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
    75         pngwtran.o pngmem.o pngerror.o pngpread.o
     49OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
     50       pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
     51       pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
    7652
    7753OBJSDLL = $(OBJS:.o=.pic.o)
     
    8561        $(CC) -c $(CPPFLAGS) $(CFLAGS) +z -o $@ $*.c
    8662
    87 all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
     63all: libpng.a $(LIBSO) pngtest
    8864
    8965pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
     
    9369        $(AR_RC) $@ $(OBJS)
    9470        $(RANLIB) $@
    95 
    96 libpng.pc:
    97         cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
    98         -e s!@exec_prefix@!$(exec_prefix)! \
    99         -e s!@libdir@!$(LIBPATH)! \
    100         -e s!@includedir@!$(INCPATH)! \
    101         -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc
    102 
    103 libpng-config:
    104         ( cat scripts/libpng-config-head.in; \
    105         echo prefix=\"$(prefix)\"; \
    106         echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
    107         echo ccopts=\"-O -Ae +DA1.1 +DS2.0\"; \
    108         echo L_opts=\"-L$(LIBPATH)\"; \
    109         echo libs=\"-lpng16 -lz -lm\"; \
    110         cat scripts/libpng-config-body.in ) > libpng-config
    111         chmod +x libpng-config
    11271
    11372$(LIBSO): $(LIBSOMAJ)
     
    12483        ./pngtest
    12584
    126 install-headers: png.h pngconf.h pnglibconf.h
    127         -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
    128         -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
    129         cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
    130         chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h
    131         -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
    132         -@$(RM_F) $(DI)/libpng
    133         (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
     85install:
     86        @echo "The $@ target is no longer supported by this makefile."
     87        @false
    13488
    135 install-static: install-headers libpng.a
    136         -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
    137         cp libpng.a $(DL)/$(LIBNAME).a
    138         chmod 644 $(DL)/$(LIBNAME).a
    139         -@$(RM_F) $(DL)/libpng.a
    140         (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
     89install-static:
     90        @echo "The $@ target is no longer supported by this makefile."
     91        @false
    14192
    142 install-shared: install-headers $(LIBSOMAJ) libpng.pc
    143         -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
    144         -@$(RM_F) $(DL)/$(LIBSO)
    145         -@$(RM_F) $(DL)/$(LIBSOREL)
    146         -@$(RM_F) $(DL)/$(OLDSO)
    147         cp $(LIBSOMAJ) $(DL)/$(LIBSOREL)
    148         chmod 755 $(DL)/$(LIBSOREL)
    149         (cd $(DL); \
    150         $(LN_SF) $(LIBSOREL) $(LIBSO); \
    151         $(LN_SF) $(LIBSO) $(OLDSO))
    152         -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
    153         -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
    154         -@$(RM_F) $(DL)/pkgconfig/libpng.pc
    155         cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
    156         chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
    157         (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
    158 
    159 install-man: libpng.3 libpngpf.3 png.5
    160         -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
    161         -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
    162         -@$(RM_F) $(DM)/man3/libpng.3
    163         -@$(RM_F) $(DM)/man3/libpngpf.3
    164         cp libpng.3 $(DM)/man3
    165         cp libpngpf.3 $(DM)/man3
    166         -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
    167         -@$(RM_F) $(DM)/man5/png.5
    168         cp png.5 $(DM)/man5
    169 
    170 install-config: libpng-config
    171         -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
    172         -@$(RM_F) $(DB)/libpng-config
    173         -@$(RM_F) $(DB)/$(LIBNAME)-config
    174         cp libpng-config $(DB)/$(LIBNAME)-config
    175         chmod 755 $(DB)/$(LIBNAME)-config
    176         (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
    177 
    178 install: install-static install-shared install-man install-config
    179 
    180 # If you installed in $(DESTDIR), test-installed won't work until you
    181 # move the library to its final location.  Use test-dd to test it
    182 # before then.
    183 
    184 test-dd:
    185         echo
    186         echo Testing installed dynamic shared library in $(DL).
    187         $(CC) -I$(DI) $(CPPFLAGS) $(CCFLAGS) \
    188            `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
    189            -L$(DL) -L$(ZLIBLIB) \
    190            -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
    191         ./pngtestd pngtest.png
    192 
    193 test-installed:
    194         echo
    195         echo Testing installed dynamic shared library.
    196         $(CC) $(CPPFLAGS) $(CCFLAGS) \
    197            `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
    198            -L$(ZLIBLIB) \
    199            -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
    200         ./pngtesti pngtest.png
     93install-shared:
     94        @echo "The $@ target is no longer supported by this makefile."
     95        @false
    20196
    20297clean:
    203         $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
    204         libpng-config $(LIBSO) $(LIBSOMAJ)* \
    205         libpng.pc pnglibconf.h
    206 
    207 DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO
    208 writelock:
    209         chmod a-w *.[ch35] $(DOCS) scripts/*
     98        $(RM_F) *.o libpng.a pngtest pngout.png
     99        $(RM_F) $(LIBSO) $(LIBSOMAJ)* pnglibconf.h
    210100
    211101# DO NOT DELETE THIS LINE -- make depend depends on it.
    212102
    213 png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     103png.o:      png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    214104pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    215 pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    216 pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    217 pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    218 pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    219 pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    220 pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     105pngget.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     106pngmem.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     107pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     108pngread.o:  png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     109pngrio.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    221110pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    222111pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     112pngset.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    223113pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     114pngwio.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    224115pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    225116pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    226117pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    227 pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    228118
    229 pngtest.o: png.h pngconf.h pnglibconf.h
     119pngtest.o:  png.h pngconf.h pnglibconf.h
  • trunk/src/libs/libpng-1.6.42/scripts/makefile.ibmc

    r96425 r103316  
    22# IBM C version 3.x for Win32 and OS/2
    33# Copyright (C) 2006, 2014 Glenn Randers-Pehrson
    4 # Copyright (C) 2000 Cosmin Truta
     4# Copyright (C) 2000, 2020 Cosmin Truta
    55#
    66# This code is released under the libpng license.
     
    3838E=.exe
    3939
    40 # Variables
     40# File lists
    4141OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
    42         pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
    43         pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
     42       pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
     43       pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
    4444
    4545LIBS = libpng$(A) $(ZLIBLIB)/zlib$(A)
     
    6666
    6767clean:
    68         $(RM) *$(O)
    69         $(RM) libpng$(A)
    70         $(RM) pnglibconf.h
    71         $(RM) pngtest$(E)
    72         $(RM) pngout.png
     68        -$(RM) *$(O)
     69        -$(RM) libpng$(A)
     70        -$(RM) pnglibconf.h
     71        -$(RM) pngtest$(E)
     72        -$(RM) pngout.png
    7373
    7474png$(O):      png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  • trunk/src/libs/libpng-1.6.42/scripts/makefile.intel

    r96425 r103316  
    3232# --------------------------------------------------------------------------
    3333
    34 CC=icl -c
     34CC=icl
    3535CPPFLAGS=-I$(ZLIBINC)
    3636CFLAGS=-O2 -G$(CPU)$(CALLING) -Qip -Qunroll4 -nologo
     
    4343PNGLIBCONF_H_PREBUILT = scripts\pnglibconf.h.prebuilt
    4444
     45# File extensions
    4546O=.obj
    4647
    47 OBJS=png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) \
    48 pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O) \
    49 pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O)
     48# File lists
     49OBJS1=png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O)
     50OBJS2=pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O)
     51OBJS3=pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
     52OBJS=$(OBJS1) $(OBJS2) $(OBJS3)
    5053
     54# Targets
    5155all: test
    5256
     
    5559
    5660png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    57         $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
     61        $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
     62
     63pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     64        $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
     65
     66pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     67        $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
     68
     69pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     70        $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
     71
     72pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     73        $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
     74
     75pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     76        $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
     77
     78pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     79        $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
     80
     81pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     82        $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
     83
     84pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     85        $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
    5886
    5987pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    60         $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
     88        $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
    6189
    62 pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    63         $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
    64 
    65 pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    66         $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
    67 
    68 pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    69         $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
    70 
    71 pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    72         $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
    73 
    74 pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    75         $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
    76 
    77 pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    78         $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
    79 
    80 pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    81         $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
    82 
    83 pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    84         $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
     90pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     91        $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
    8592
    8693pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    87         $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
    88 
    89 pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    90         $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
     94        $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
    9195
    9296pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    93         $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
     97        $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
    9498
    9599pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    96         $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
     100        $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
    97101
    98102pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    99         $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
     103        $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
    100104
    101105libpng.lib: $(OBJS)
     
    107111
    108112pngtest$(O): png.h pngconf.h pnglibconf.h
    109         $(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
     113        $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
    110114
    111115test: pngtest.exe
    112116        pngtest.exe
    113117
    114 
    115118# End of makefile for libpng
  • trunk/src/libs/libpng-1.6.42/scripts/makefile.linux

    r96425 r103316  
    11# makefile for libpng.a and libpng16.so on Linux ELF with gcc
     2# Copyright (C) 2020-2022 Cosmin Truta
    23# Copyright (C) 1998, 1999, 2002, 2006, 2008, 2010-2014 Greg Roelofs and
    34# Glenn Randers-Pehrson
     
    910
    1011# Library name:
    11 LIBNAME = libpng16
    12 PNGMAJ = 16
    13 RELEASE = 37
     12LIBNAME=libpng16
     13PNGMAJ=16
    1414
    1515# Shared library names:
    1616LIBSO=$(LIBNAME).so
    1717LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
    18 LIBSOREL=$(LIBSOMAJ).$(RELEASE)
    19 OLDSO=libpng.so
    2018
    2119# Utilities:
     20CC=gcc
    2221AR_RC=ar rc
    23 CC=gcc
     22RANLIB=ranlib
    2423MKDIR_P=mkdir -p
    2524LN_SF=ln -sf
    26 RANLIB=ranlib
    2725CP=cp
    28 RM_F=/bin/rm -f
    29 
    30 # where "make install" puts libpng16.a, libpng16.so*,
    31 # libpng16/png.h, libpng16/pngconf.h, and libpng16/pnglibconf.h
    32 # Prefix must be a full pathname.
    33 prefix=/usr/local
    34 exec_prefix=$(prefix)
     26RM_F=rm -f
    3527
    3628# Where the zlib library and include files are located.
     
    4032ZLIBINC=../zlib
    4133
    42 ALIGN=
    43 # for i386:
    44 #ALIGN=-malign-loops=2 -malign-functions=2
    45 
     34# Compiler and linker flags
     35NOHWOPT=-DPNG_ARM_NEON_OPT=0 -DPNG_MIPS_MSA_OPT=0 \
     36        -DPNG_POWERPC_VSX_OPT=0 -DPNG_INTEL_SSE_OPT=0
    4637WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
    4738        -Wmissing-declarations -Wtraditional -Wcast-align \
    48         -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
    49 
    50 # for pgcc version 2.95.1, -O3 is buggy; don't use it.
    51 
    52 CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
    53 CFLAGS=-W -Wall -O3 -funroll-loops $(ALIGN) # $(WARNMORE) -g
    54 
    55 LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng16 -lz -lm
    56 LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm
    57 
    58 INCPATH=$(prefix)/include
    59 LIBPATH=$(exec_prefix)/lib
    60 MANPATH=$(prefix)/man
    61 BINPATH=$(exec_prefix)/bin
    62 
    63 # override DESTDIR= on the make install command line to easily support
    64 # installing into a temporary location.  Example:
    65 #
    66 #    make install DESTDIR=/tmp/build/libpng
    67 #
    68 # If you're going to install into a temporary location
    69 # via DESTDIR, $(DESTDIR)$(prefix) must already exist before
    70 # you execute make install.
    71 DESTDIR=
    72 
    73 DB=$(DESTDIR)$(BINPATH)
    74 DI=$(DESTDIR)$(INCPATH)
    75 DL=$(DESTDIR)$(LIBPATH)
    76 DM=$(DESTDIR)$(MANPATH)
     39        -Wstrict-prototypes -Wmissing-prototypes # -Wconversion
     40DEFS=$(NOHWOPT)
     41CPPFLAGS=-I$(ZLIBINC) $(DEFS) # -DPNG_DEBUG=5
     42CFLAGS=-O3 -funroll-loops -Wall -Wextra -Wundef # $(WARNMORE) -g
     43LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng16 -lz -lm # -g
     44LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm # -g
    7745
    7846# Pre-built configuration
     
    8048PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
    8149
    82 OBJS =  png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
    83         pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
    84         pngwtran.o pngmem.o pngerror.o pngpread.o
     50# File lists
     51OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
     52       pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
     53       pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
    8554
    8655OBJSDLL = $(OBJS:.o=.pic.o)
     
    9463        $(CC) -c $(CPPFLAGS) $(CFLAGS) -fPIC -o $@ $*.c
    9564
    96 all: libpng.a $(LIBSO) pngtest pngtest-static libpng.pc libpng-config
     65all: libpng.a $(LIBSO) pngtest pngtest-static
    9766
    9867pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
     
    10271        $(AR_RC) $@ $(OBJS)
    10372        $(RANLIB) $@
    104 
    105 libpng.pc:
    106         cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
    107         -e s!@exec_prefix@!$(exec_prefix)! \
    108         -e s!@libdir@!$(LIBPATH)! \
    109         -e s!@includedir@!$(INCPATH)! \
    110         -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc
    111 
    112 libpng-config:
    113         ( cat scripts/libpng-config-head.in; \
    114         echo prefix=\"$(prefix)\"; \
    115         echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
    116         echo L_opts=\"-L$(LIBPATH)\"; \
    117         echo R_opts=\"-Wl,-rpath,$(LIBPATH)\"; \
    118         echo libs=\"-lpng16 -lz -lm\"; \
    119         cat scripts/libpng-config-body.in ) > libpng-config
    120         chmod +x libpng-config
    12173
    12274$(LIBSO): $(LIBSOMAJ)
     
    14294        ./pngtest-static
    14395
    144 install-headers: png.h pngconf.h pnglibconf.h
    145         -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
    146         -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
    147         cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
    148         chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h
    149         -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
    150         -@$(RM_F) $(DI)/libpng
    151         (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
     96install:
     97        @echo "The $@ target is no longer supported by this makefile."
     98        @false
    15299
    153 install-static: install-headers libpng.a
    154         -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
    155         cp libpng.a $(DL)/$(LIBNAME).a
    156         chmod 644 $(DL)/$(LIBNAME).a
    157         -@$(RM_F) $(DL)/libpng.a
    158         (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
     100install-static:
     101        @echo "The $@ target is no longer supported by this makefile."
     102        @false
    159103
    160 install-shared: install-headers $(LIBSOMAJ) libpng.pc
    161         -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
    162         -@$(RM_F) $(DL)/$(LIBSO)
    163         -@$(RM_F) $(DL)/$(LIBSOREL)
    164         -@$(RM_F) $(DL)/$(OLDSO)
    165         cp $(LIBSOMAJ) $(DL)/$(LIBSOREL)
    166         chmod 755 $(DL)/$(LIBSOREL)
    167         (cd $(DL); \
    168         $(LN_SF) $(LIBSOREL) $(LIBSO); \
    169         $(LN_SF) $(LIBSO) $(OLDSO))
    170 
    171         -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
    172         -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
    173         -@$(RM_F) $(DL)/pkgconfig/libpng.pc
    174         cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
    175         chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
    176         (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
    177 
    178 install-man: libpng.3 libpngpf.3 png.5
    179         -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
    180         -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
    181         -@$(RM_F) $(DM)/man3/libpng.3
    182         -@$(RM_F) $(DM)/man3/libpngpf.3
    183         cp libpng.3 $(DM)/man3
    184         cp libpngpf.3 $(DM)/man3
    185         -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
    186         -@$(RM_F) $(DM)/man5/png.5
    187         cp png.5 $(DM)/man5
    188 
    189 install-config: libpng-config
    190         -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
    191         -@$(RM_F) $(DB)/libpng-config
    192         -@$(RM_F) $(DB)/$(LIBNAME)-config
    193         cp libpng-config $(DB)/$(LIBNAME)-config
    194         chmod 755 $(DB)/$(LIBNAME)-config
    195         (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
    196 
    197 install: install-static install-shared install-man install-config
    198 
    199 # If you installed in $(DESTDIR), test-installed won't work until you
    200 # move the library to its final location.  Use test-dd to test it
    201 # before then.
    202 
    203 test-dd:
    204         echo
    205         echo Testing installed dynamic shared library in $(DL).
    206         $(CC) -I$(DI) $(CPPFLAGS) \
    207            `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
    208            -L$(DL) -L$(ZLIBLIB) -Wl, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
    209            -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
    210         ./pngtestd pngtest.png
    211 
    212 test-installed:
    213         $(CC) $(CPPFLAGS) \
    214            `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
    215            -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
    216            -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
    217         ./pngtesti pngtest.png
     104install-shared:
     105        @echo "The $@ target is no longer supported by this makefile."
     106        @false
    218107
    219108clean:
    220         $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \
    221         $(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \
    222         libpng.pc pnglibconf.h
    223 
    224 DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO
    225 writelock:
    226         chmod a-w *.[ch35] $(DOCS) scripts/*
     109        $(RM_F) $(OBJS) $(OBJSDLL) libpng.a
     110        $(RM_F) $(LIBSO) $(LIBSOMAJ)* pnglibconf.h
     111        $(RM_F) pngtest*.o pngtest pngtest-static pngout.png
    227112
    228113# DO NOT DELETE THIS LINE -- make depend depends on it.
    229114
    230 png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     115png.o      png.pic.o:      png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    231116pngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    232 pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    233 pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    234 pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    235 pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    236 pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    237 pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     117pngget.o   pngget.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     118pngmem.o   pngmem.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     119pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     120pngread.o  pngread.pic.o:  png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     121pngrio.o   pngrio.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    238122pngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    239123pngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     124pngset.o   pngset.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    240125pngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     126pngwio.o   pngwio.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    241127pngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    242128pngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    243129pngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    244 pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    245130
    246131pngtest.o: png.h pngconf.h pnglibconf.h
  • trunk/src/libs/libpng-1.6.42/scripts/makefile.mips

    r96425 r103316  
    11# makefile for libpng
     2# Copyright (C) 2020-2022 Cosmin Truta
    23# Copyright (C) 1998-2014 Glenn Randers-Pehrson
    34# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
     
    78# and license in png.h
    89
    9 # where make install puts libpng.a and png.h
    10 prefix=/usr/local
    11 INCPATH=$(prefix)/include
    12 LIBPATH=$(prefix)/lib
    13 
    14 # override DESTDIR= on the make install command line to easily support
    15 # installing into a temporary location.  Example:
    16 #
    17 #    make install DESTDIR=/tmp/build/libpng
    18 #
    19 # If you're going to install into a temporary location
    20 # via DESTDIR, $(DESTDIR)$(prefix) must already exist before
    21 # you execute make install.
    22 DESTDIR=
    23 
    2410CC=cc
    2511CPPFLAGS=-I../zlib -DSYSV -Dmips
     
    2814LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
    2915
     16AR_RC=ar rc
    3017#RANLIB=ranlib
    3118RANLIB=echo
    32 
    33 CP=cp
    3419
    3520# Pre-built configuration
     
    3722PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
    3823
    39 OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
    40         pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
    41         pngwtran.o pngmem.o pngerror.o pngpread.o
     24OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
     25       pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
     26       pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
    4227
    4328.c.o:
     
    4732
    4833pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
    49         $(CP) $(PNGLIBCONF_H_PREBUILT) $@
     34        cp $(PNGLIBCONF_H_PREBUILT) $@
    5035
    5136libpng.a: $(OBJS)
    52         ar rc $@ $(OBJS)
     37        $(AR_RC) $@ $(OBJS)
    5338        $(RANLIB) $@
    5439
     
    5944        ./pngtest
    6045
    61 install: libpng.a
    62         -@mkdir $(DESTDIR)$(INCPATH)
    63         -@mkdir $(DESTDIR)$(INCPATH)/libpng
    64         -@mkdir $(DESTDIR)$(LIBPATH)
    65         -@rm -f $(DESTDIR)$(INCPATH)/png.h
    66         -@rm -f $(DESTDIR)$(INCPATH)/pngconf.h
    67         -@rm -f $(DESTDIR)$(INCPATH)/pnglibconf.h
    68         cp png.h $(DESTDIR)$(INCPATH)/libpng
    69         cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
    70         cp pnglibconf.h $(DESTDIR)$(INCPATH)/libpng
    71         chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
    72         chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
    73         chmod 644 $(DESTDIR)$(INCPATH)/libpng/pnglibconf.h
    74         (cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .)
    75         cp libpng.a $(DESTDIR)$(LIBPATH)
    76         chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a
     46install:
     47        @echo "The $@ target is no longer supported by this makefile."
     48        @false
    7749
    7850clean:
    7951        rm -f *.o libpng.a pngtest pngout.png pnglibconf.h
    8052
    81 DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO
    82 writelock:
    83         chmod a-w *.[ch35] $(DOCS) scripts/*
    84 
    8553# DO NOT DELETE THIS LINE -- make depend depends on it.
    8654
    87 png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     55png.o:      png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    8856pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    89 pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    90 pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    91 pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    92 pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    93 pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    94 pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     57pngget.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     58pngmem.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    9559pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     60pngread.o:  png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     61pngrio.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    9662pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    9763pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     64pngset.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    9865pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     66pngwio.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    9967pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    10068pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    10169pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    10270
    103 pngtest.o: png.h pngconf.h pnglibconf.h
     71pngtest.o:  png.h pngconf.h pnglibconf.h
  • trunk/src/libs/libpng-1.6.42/scripts/makefile.msys

    r96425 r103316  
    11# makefile for libpng using MSYS/gcc (shared, static library)
    2 # Copyright (C) 2019 Cosmin Truta
     2# Copyright (C) 2019-2022 Cosmin Truta
    33# Copyright (C) 2012 Glenn Randers-Pehrson and Christopher M. Wheeler
    44#
     
    1313# For conditions of distribution and use, see the disclaimer
    1414# and license in png.h
    15 # # # # # # # # # # # # # # # # #
    16 prefix=/usr/local
    17 exec_prefix=$(prefix)
    1815
    1916# Library name:
    20 LIBNAME = libpng16
    21 PNGMAJ = 16
    22 RELEASE = 37
     17LIBNAME=libpng16
     18PNGMAJ=16
    2319
    2420# Shared library names:
    2521LIBSO=$(LIBNAME).dll
    2622LIBSOMAJ=$(LIBNAME).dll.$(PNGMAJ)
    27 LIBSOREL=$(PNGMAJ).$(RELEASE)
    28 OLDSO=libpng.dll
    2923
    3024# Where the zlib library and include files are located.
     
    4438LN_SF=ln -sf
    4539
    46 #ARCH = -march=pentium3
    47 #ARCH = -march=i686
    48 ARCH =
    4940CPPFLAGS = # -DPNG_DEBUG=5
    50 CFLAGS = -W -Wall -O2 $(ARCH) # -g
    51 LDFLAGS =
     41CFLAGS = -O2 -Wall -Wextra -Wundef # -g
     42LDFLAGS = # -g
    5243LIBS = -lz -lm
    5344
     
    5546EXEEXT=.exe
    5647
    57 INCPATH=$(prefix)/include
    58 LIBPATH=$(exec_prefix)/lib
    59 MANPATH=$(prefix)/man
    60 BINPATH=$(exec_prefix)/bin
    61 
    62 # override DESTDIR= on the make install command line to easily support
    63 # installing into a temporary location.  Example:
    64 #
    65 #    make install DESTDIR=/tmp/build/libpng
    66 #
    67 # If you're going to install into a temporary location
    68 # via DESTDIR, $(DESTDIR)$(prefix) must already exist before
    69 # you execute make install.
    70 
    71 DESTDIR=
    72 
    73 DB=$(DESTDIR)$(BINPATH)
    74 DI=$(DESTDIR)$(INCPATH)
    75 DL=$(DESTDIR)$(LIBPATH)
    76 DM=$(DESTDIR)$(MANPATH)
    77 
    7848# Pre-built configuration
    7949# See scripts/pnglibconf.mak for more options
    8050PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
    8151
    82 # Variables
    83 OBJS =  png.o pngerror.o pngget.o pngmem.o pngpread.o \
    84         pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
    85         pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
     52# File lists
     53OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
     54       pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
     55       pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
    8656
    8757# Targets
     
    10979        $(RANLIB) $@
    11080
    111 install-headers: png.h pngconf.h pnglibconf.h
    112         -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
    113         -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
    114         cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
    115         -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
    116         -@$(RM_F) $(DI)/libpng
    117         (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
     81install:
     82        @echo "The $@ target is no longer supported by this makefile."
     83        @false
    11884
    119 install-static: install-headers libpng.a
    120         -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
    121         cp libpng.a $(DL)/$(LIBNAME).a
    122         -@$(RM_F) $(DL)/libpng.a
    123         (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
     85install-static:
     86        @echo "The $@ target is no longer supported by this makefile."
     87        @false
    12488
    125 libpng.pc:
    126         cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
    127         -e s!@exec_prefix@!$(exec_prefix)! \
    128         -e s!@libdir@!$(LIBPATH)! \
    129         -e s!@includedir@!$(INCPATH)! \
    130         -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc
    131 
    132 libpng-config:
    133         ( cat scripts/libpng-config-head.in; \
    134         echo prefix=\"$(prefix)\"; \
    135         echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
    136         echo L_opts=\"-L$(LIBPATH)\"; \
    137         echo R_opts=\"-Wl,-rpath,$(LIBPATH)\"; \
    138         echo libs=\"-lpng16 -lz -lm\"; \
    139         cat scripts/libpng-config-body.in ) > libpng-config
    140 
    141 install-shared: install-headers $(LIBSOMAJ) libpng.pc
    142         -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
    143         -@$(RM_F) $(DL)/$(LIBSO)
    144         -@$(RM_F) $(DL)/$(OLDSO)
    145         cp $(LIBSO) $(DL)/$(LIBSOREL)
    146         (cd $(DL); \
    147         $(LN_SF) $(LIBSOREL) $(LIBSO); \
    148         $(LN_SF) $(LIBSO) $(OLDSO))
    149 
    150         -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
    151         -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
    152         -@$(RM_F) $(DL)/pkgconfig/libpng.pc
    153         cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
    154         (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
    155 
    156 install-man: libpng.3 libpngpf.3 png.5
    157         -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
    158         -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
    159         -@$(RM_F) $(DM)/man3/libpng.3
    160         -@$(RM_F) $(DM)/man3/libpngpf.3
    161         cp libpng.3 $(DM)/man3
    162         cp libpngpf.3 $(DM)/man3
    163         -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
    164         -@$(RM_F) $(DM)/man5/png.5
    165         cp png.5 $(DM)/man5
    166 
    167 install-config: libpng-config
    168         -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
    169         -@$(RM_F) $(DB)/libpng-config
    170         -@$(RM_F) $(DB)/$(LIBNAME)-config
    171         cp libpng-config $(DB)/$(LIBNAME)-config
    172         (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
    173 
    174 install: install-static install-shared install-man install-config
     89install-shared:
     90        @echo "The $@ target is no longer supported by this makefile."
     91        @false
    17592
    17693test: pngtest$(EXEEXT)
     
    18198
    18299clean:
    183         $(RM_F) *.o libpng.a pngtest$(EXEEXT) pngout.png pnglibconf.h $(LIBSO) \
    184         $(LIBSOMAJ) libpng-config
     100        $(RM_F) $(OBJS) libpng.a
     101        $(RM_F) $(LIBSO) $(LIBSOMAJ) pnglibconf.h
     102        $(RM_F) pngtest*.o pngtest$(EXEEXT) pngout.png
    185103
    186104png.o:      png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
  • trunk/src/libs/libpng-1.6.42/scripts/makefile.netbsd

    r96425 r103316  
    1 # makefile for libpng for NetBSD for the standard
    2 # make obj && make depend && make && make test
    3 # make includes && make install
     1# makefile for libpng on NetBSD
     2# Copyright (C) 2020-2022 Cosmin Truta
     3# Copyright (C) 2007-2009, 2014 Glenn Randers-Pehrson
    44# Copyright (C) 2002 Patrick R.L. Welche
    5 # Copyright (C) 2007-2009, 2014 Glenn Randers-Pehrson
    65#
    76# This code is released under the libpng license.
     
    98# and license in png.h
    109
    11 LOCALBASE?=/usr/local
    12 LIBDIR= ${LOCALBASE}/lib
    13 MANDIR= ${LOCALBASE}/man
    14 INCSDIR=${LOCALBASE}/include
    15 
    1610SHLIB_MAJOR=    16
    17 SHLIB_MINOR=    1.6.37
     11SHLIB_MINOR=    0
    1812
    1913LIB=    png
    2014SRCS=   png.c pngerror.c pngget.c pngmem.c pngpread.c \
    21         pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c pngtrans.c \
    22         pngwio.c pngwrite.c pngwtran.c pngwutil.c
     15        pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c \
     16        pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c
    2317INCS=   png.h pngconf.h pnglibconf.h
    24 MAN=    libpng.3 libpngpf.3 png.5
    2518
    26 CPPFLAGS+=-I${.CURDIR}
     19CPPFLAGS+=      -I${.CURDIR}
     20CFLAGS+=        -Wall -Wextra -Wundef
     21
     22CLEANFILES+=    pngtest.o pngtest pnglibconf.h
    2723
    2824# Pre-built configuration
     
    3632# .endif
    3733
    38 CLEANFILES+=pngtest.o pngtest pnglibconf.h
    39 
    4034.c.o:
    4135        ${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $<
    4236
    43 pnglibconf.h: ${PNGLIBCONF_H_PREBUILT}
     37pnglibconf.h:   ${PNGLIBCONF_H_PREBUILT}
    4438        cp ${PNGLIBCONF_H_PREBUILT} $@
    4539
     
    5145
    5246test:   pngtest
    53         cd ${.CURDIR} && ${.OBJDIR}/pngtest
     47        ./pngtest
     48
     49install:
     50        @echo "The $@ target is no longer supported by this makefile."
     51        @false
    5452
    5553.include <bsd.lib.mk>
  • trunk/src/libs/libpng-1.6.42/scripts/makefile.openbsd

    r96425 r103316  
    11# makefile for libpng
     2# Copyright (C) 2020-2022 Cosmin Truta
    23# Copyright (C) 2007-2009, 2014 Glenn Randers-Pehrson
    34# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
     
    78# and license in png.h
    89
    9 PREFIX?= /usr/local
    10 LIBDIR= ${PREFIX}/lib
    11 MANDIR= ${PREFIX}/man/cat
    12 
    1310SHLIB_MAJOR=    16
    14 SHLIB_MINOR=    1.6.37
     11SHLIB_MINOR=    0
    1512
    1613LIB=    png
    1714SRCS=   png.c pngerror.c pngget.c pngmem.c pngpread.c \
    18         pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c pngtrans.c \
    19         pngwio.c pngwrite.c pngwtran.c pngwutil.c
     15        pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c \
     16        pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c
    2017HDRS=   png.h pngconf.h pnglibconf.h
    21 MAN=    libpng.3 libpngpf.3 png.5
    22 DOCS=   ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO \
    23         libpng-manual.txt
    2418
    25 CFLAGS+= -W -Wall
    26 CPPFLAGS+= -I${.CURDIR}
     19CPPFLAGS+=      -I${.CURDIR}
     20CFLAGS+=        -Wall -Wextra -Wundef
    2721
    28 NOPROFILE= Yes
    29 
    30 CLEANFILES+= pngtest.o pngtest pnglibconf.h
     22CLEANFILES+=    pngtest.o pngtest pnglibconf.h
    3123
    3224# Pre-built configuration
     
    3729        ${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $<
    3830
    39 pnglibconf.h: ${PNGLIBCONF_H_PREBUILT}
     31pnglibconf.h:   ${PNGLIBCONF_H_PREBUILT}
    4032        cp ${PNGLIBCONF_H_PREBUILT} $@
    4133
     
    4739
    4840test:   pngtest
    49         cd ${.OBJDIR} && env \
    50                 LD_LIBRARY_PATH="${.OBJDIR}" ${.OBJDIR}/pngtest
     41        env LD_LIBRARY_PATH="${.OBJDIR}" ./pngtest
    5142
    52 beforeinstall:
    53         if [ ! -d ${DESTDIR}${PREFIX}/include/libpng ]; then \
    54           ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/include; \
    55         fi
    56         if [ ! -d ${DESTDIR}${LIBDIR} ]; then \
    57           ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}; \
    58         fi
    59         if [ ! -d ${DESTDIR}${LIBDIR}/debug ]; then \
    60           ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}/debug; \
    61         fi
    62         if [ ! -d ${DESTDIR}${MANDIR}3 ]; then \
    63           ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}3; \
    64         fi
    65         if [ ! -d ${DESTDIR}${MANDIR}5 ]; then \
    66           ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}5; \
    67         fi
    68         if [ ! -d ${DESTDIR}${PREFIX}/share/doc/png ]; then \
    69           ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/share/doc/png; \
    70         fi
    71 
    72 afterinstall:
    73         @rm -f ${DESTDIR}${LIBDIR}/libpng_pic.a
    74         @rm -f ${DESTDIR}${LIBDIR}/debug/libpng.a
    75         @rm -f ${DESTDIR}${PREFIX}/include/png.h
    76         @rm -f ${DESTDIR}${PREFIX}/include/pngconf.h
    77         @rm -f ${DESTDIR}${PREFIX}/include/pnglibconf.h
    78         @rmdir ${DESTDIR}${LIBDIR}/debug 2>/dev/null || true
    79         ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
    80                 -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include
    81         ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
    82                 -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include
    83         ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
    84                 -m ${NONBINMODE} ${DOCS} ${DESTDIR}${PREFIX}/share/doc/png
     43install:
     44        @echo "The $@ target is no longer supported by this makefile."
     45        @false
    8546
    8647.include <bsd.lib.mk>
  • trunk/src/libs/libpng-1.6.42/scripts/makefile.sco

    r96425 r103316  
    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
    45# Copyright (C) 2002, 2006, 2010-2014 Glenn Randers-Pehrson
    56# Copyright (C) 1998 Greg Roelofs
     
    1112
    1213# Library name:
    13 LIBNAME = libpng16
    14 PNGMAJ = 16
     14LIBNAME=libpng16
     15PNGMAJ=16
    1516
    1617# Shared library names:
    1718LIBSO=$(LIBNAME).so
    1819LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
    19 LIBSOREL=$(LIBSOMAJ).$(RELEASE)
    20 OLDSO=libpng.so
    2120
    2221# Utilities:
    2322CC=cc
    2423AR_RC=ar rc
     24RANLIB=echo
    2525MKDIR_P=mkdir
    2626LN_SF=ln -f -s
    27 RANLIB=echo
    2827CP=cp
    2928RM_F=/bin/rm -f
    30 
    31 # where make install puts libpng.a, $(OLDSO)*, and png.h
    32 prefix=/usr/local
    33 exec_prefix=$(prefix)
    3429
    3530# Where the zlib library and include files are located
     
    4338LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz -lm
    4439
    45 INCPATH=$(prefix)/include
    46 LIBPATH=$(exec_prefix)/lib
    47 MANPATH=$(prefix)/man
    48 BINPATH=$(exec_prefix)/bin
    49 
    50 # override DESTDIR= on the make install command line to easily support
    51 # installing into a temporary location.  Example:
    52 #
    53 #    make install DESTDIR=/tmp/build/libpng
    54 #
    55 # If you're going to install into a temporary location
    56 # via DESTDIR, $(DESTDIR)$(prefix) must already exist before
    57 # you execute make install.
    58 DESTDIR=
    59 
    60 DB=$(DESTDIR)$(BINPATH)
    61 DI=$(DESTDIR)$(INCPATH)
    62 DL=$(DESTDIR)$(LIBPATH)
    63 DM=$(DESTDIR)$(MANPATH)
    64 
    6540# Pre-built configuration
    6641# See scripts/pnglibconf.mak for more options
    6742PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
    6843
    69 OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
    70         pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
    71         pngwtran.o pngmem.o pngerror.o pngpread.o
     44OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
     45       pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
     46       pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
    7247
    7348OBJSDLL = $(OBJS:.o=.pic.o)
     
    8156        $(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c
    8257
    83 all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
     58all: libpng.a $(LIBSO) pngtest
    8459
    8560pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
     
    8964        $(AR_RC) $@ $(OBJS)
    9065        $(RANLIB) $@
    91 
    92 libpng.pc:
    93         cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
    94         -e s!@exec_prefix@!$(exec_prefix)! \
    95         -e s!@libdir@!$(LIBPATH)! \
    96         -e s!@includedir@!$(INCPATH)! \
    97         -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc
    98 
    99 libpng-config:
    100         ( cat scripts/libpng-config-head.in; \
    101         echo prefix=\"$(prefix)\"; \
    102         echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
    103         echo ccopts=\"-belf\"; \
    104         echo L_opts=\"-L$(LIBPATH)\"; \
    105         echo libs=\"-lpng16 -lz -lm\"; \
    106         cat scripts/libpng-config-body.in ) > libpng-config
    107         chmod +x libpng-config
    10866
    10967$(LIBSO): $(LIBSOMAJ)
     
    12078        ./pngtest
    12179
    122 install-headers: png.h pngconf.h pnglibconf.h
    123         -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
    124         -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
    125         -@$(RM_F) $(DI)/png.h
    126         -@$(RM_F) $(DI)/pngconf.h
    127         -@$(RM_F) $(DI)/pnglibconf.h
    128         cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
    129         chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h
    130         -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
    131         -@$(RM_F) $(DI)/libpng
    132         (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
     80install:
     81        @echo "The $@ target is no longer supported by this makefile."
     82        @false
    13383
    134 install-static: install-headers libpng.a
    135         -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
    136         cp libpng.a $(DL)/$(LIBNAME).a
    137         chmod 644 $(DL)/$(LIBNAME).a
    138         -@$(RM_F) $(DL)/libpng.a
    139         (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
     84install-static:
     85        @echo "The $@ target is no longer supported by this makefile."
     86        @false
    14087
    141 install-shared: install-headers $(LIBSOMAJ) libpng.pc
    142         -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
    143         -@$(RM_F) $(DL)/$(LIBSO)
    144         -@$(RM_F) $(DL)/$(LIBSOREL)
    145         -@$(RM_F) $(DL)/$(OLDSO)
    146         cp $(LIBSOMAJ) $(DL)/$(LIBSOREL)
    147         chmod 755 $(DL)/$(LIBSOREL)
    148         (cd $(DL); \
    149         $(LN_SF) $(LIBSOREL) $(LIBSO); \
    150         $(LN_SF) $(LIBSO) $(OLDSO))
    151         -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
    152         -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
    153         -@$(RM_F) $(DL)/pkgconfig/libpng.pc
    154         cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
    155         chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
    156         (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
    157 
    158 install-man: libpng.3 libpngpf.3 png.5
    159         -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
    160         -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
    161         -@$(RM_F) $(DM)/man3/libpng.3
    162         -@$(RM_F) $(DM)/man3/libpngpf.3
    163         cp libpng.3 $(DM)/man3
    164         cp libpngpf.3 $(DM)/man3
    165         -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
    166         -@$(RM_F) $(DM)/man5/png.5
    167         cp png.5 $(DM)/man5
    168 
    169 install-config: libpng-config
    170         -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
    171         -@$(RM_F) $(DB)/libpng-config
    172         -@$(RM_F) $(DB)/$(LIBNAME)-config
    173         cp libpng-config $(DB)/$(LIBNAME)-config
    174         chmod 755 $(DB)/$(LIBNAME)-config
    175         (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
    176 
    177 install: install-static install-shared install-man install-config
    178 
    179 # If you installed in $(DESTDIR), test-installed won't work until you
    180 # move the library to its final location.  Use test-dd to test it
    181 # before then.
    182 
    183 test-dd:
    184         echo
    185         echo Testing installed dynamic shared library in $(DL).
    186         $(CC) -I$(DI) $(CPPFLAGS) \
    187            `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
    188            -L$(DL) -L$(ZLIBLIB) \
    189            -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
    190         ./pngtestd pngtest.png
    191 
    192 test-installed:
    193         $(CC) $(CPPFLAGS) $(CFLAGS) \
    194            `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
    195            -L$(ZLIBLIB) \
    196            -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
    197         ./pngtesti pngtest.png
     88install-shared:
     89        @echo "The $@ target is no longer supported by this makefile."
     90        @false
    19891
    19992clean:
    200         $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \
    201         $(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \
    202         pnglibconf.h libpng.pc
    203 
    204 DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO
    205 writelock:
    206         chmod a-w *.[ch35] $(DOCS) scripts/*
     93        $(RM_F) *.o libpng.a pngtest pngout.png
     94        $(RM_F) $(LIBSO) $(LIBSOMAJ)* pngtest-static pnglibconf.h
    20795
    20896# DO NOT DELETE THIS LINE -- make depend depends on it.
    20997
    210 png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     98png.o      png.pic.o:      png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    21199pngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    212 pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    213 pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    214 pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    215 pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    216 pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    217 pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     100pngget.o   pngget.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     101pngmem.o   pngmem.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     102pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     103pngread.o  pngread.pic.o:  png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     104pngrio.o   pngrio.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    218105pngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    219106pngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     107pngset.o   pngset.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    220108pngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     109pngwio.o   pngwio.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    221110pngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    222111pngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    223112pngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    224 pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    225113
    226114pngtest.o: png.h pngconf.h pnglibconf.h
  • trunk/src/libs/libpng-1.6.42/scripts/makefile.sggcc

    r96425 r103316  
    11# makefile for libpng.a and libpng16.so, SGI IRIX with 'cc'
     2# Copyright (C) 2020-2022 Cosmin Truta
    23# Copyright (C) 2001-2002, 2006, 2010-2014 Glenn Randers-Pehrson
    34# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
     
    910# Library name:
    1011LIBNAME=libpng16
    11 PNGMAJ = 16
     12PNGMAJ=16
    1213
    1314# Shared library names:
    1415LIBSO=$(LIBNAME).so
    1516LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
    16 LIBSOREL=$(LIBSOMAJ).$(RELEASE)
    17 OLDSO=libpng.so
    1817
    1918# Utilities:
     19CC=gcc
    2020AR_RC=ar rc
    21 CC=gcc
     21RANLIB=echo
    2222MKDIR_P=mkdir -p
    2323LN_SF=ln -sf
    24 RANLIB=echo
    2524CP=cp
    2625RM_F=/bin/rm -f
    27 
    28 # Where make install puts libpng.a, libpng16.so, and libpng16/png.h
    29 # Prefix must be a full pathname.
    30 
    31 prefix=/usr/local
    32 exec_prefix=$(prefix)
    3326
    3427# Where the zlib library and include files are located
     
    4740CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
    4841CFLAGS=$(ABI) -O $(WARNMORE) -fPIC -mabi=n32 # -g
    49 LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
     42LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm # -g
    5043LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
    5144        -set_version sgi$(PNGMAJ).0
    5245# See "man dso" for info about shared objects
    53 
    54 INCPATH=$(prefix)/include
    55 LIBPATH=$(exec_prefix)/lib
    56 #LIBPATH=$(exec_prefix)/lib32
    57 MANPATH=$(prefix)/man
    58 BINPATH=$(exec_prefix)/bin
    59 
    60 # override DESTDIR= on the make install command line to easily support
    61 # installing into a temporary location.  Example:
    62 #
    63 #    make install DESTDIR=/tmp/build/libpng
    64 #
    65 # If you're going to install into a temporary location
    66 # via DESTDIR, $(DESTDIR)$(prefix) must already exist before
    67 # you execute make install.
    68 DESTDIR=
    69 
    70 DB=$(DESTDIR)$(BINPATH)
    71 DI=$(DESTDIR)$(INCPATH)
    72 DL=$(DESTDIR)$(LIBPATH)
    73 DM=$(DESTDIR)$(MANPATH)
    7446
    7547# Pre-built configuration
     
    7749PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
    7850
    79 OBJS =  png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
    80         pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
    81         pngwtran.o pngmem.o pngerror.o pngpread.o
     51OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
     52       pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
     53       pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
    8254
    8355.c.o:
    8456        $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
    8557
    86 all: libpng.a pngtest shared libpng.pc libpng-config
     58all: libpng.a pngtest shared
    8759
    8860pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
     
    9466
    9567shared: $(LIBSOMAJ)
    96 
    97 libpng.pc:
    98         cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
    99         -e s!@exec_prefix@!$(exec_prefix)! \
    100         -e s!@libdir@!$(LIBPATH)! \
    101         -e s!@includedir@!$(INCPATH)! \
    102         -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc
    103 
    104 libpng-config:
    105         ( cat scripts/libpng-config-head.in; \
    106         echo prefix=\"$(prefix)\"; \
    107         echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
    108         echo ccopts=\"$(ABI)\"; \
    109         echo cppflags=\"\"; \
    110         echo ldopts=\"$(ABI)\"; \
    111         echo L_opts=\"-L$(LIBPATH)\"; \
    112         echo libdir=\"$(LIBPATH)\"; \
    113         echo libs=\"-lpng16 -lz -lm\"; \
    114         cat scripts/libpng-config-body.in ) > libpng-config
    115         chmod +x libpng-config
    11668
    11769$(LIBSO): $(LIBSOMAJ)
     
    13082        ./pngtest
    13183
    132 install-headers: png.h pngconf.h pnglibconf.h
    133         -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
    134         -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
    135         cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
    136         chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h
    137         -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
    138         -@$(RM_F) $(DI)/libpng
    139         (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
     84install:
     85        @echo "The $@ target is no longer supported by this makefile."
     86        @false
    14087
    141 install-static: install-headers libpng.a
    142         -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
    143         cp libpng.a $(DL)/$(LIBNAME).a
    144         chmod 644 $(DL)/$(LIBNAME).a
    145         -@$(RM_F) $(DL)/libpng.a
    146         (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
     88install-static:
     89        @echo "The $@ target is no longer supported by this makefile."
     90        @false
    14791
    148 install-shared: install-headers $(LIBSOMAJ) libpng.pc
    149         -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
    150         -@$(RM_F) $(DL)/$(LIBSO)
    151         -@$(RM_F) $(DL)/$(LIBSOREL)
    152         -@$(RM_F) $(DL)/$(OLDSO)
    153         cp $(LIBSOMAJ) $(DL)/$(LIBSOREL)
    154         chmod 755 $(DL)/$(LIBSOREL)
    155         (cd $(DL); \
    156         $(LN_SF) $(LIBSOREL) $(LIBSO); \
    157         $(LN_SF) $(LIBSO) $(OLDSO))
    158         -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
    159         -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
    160         -@$(RM_F) $(DL)/pkgconfig/libpng.pc
    161         cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
    162         chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
    163         (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
    164 
    165 install-man: libpng.3 libpngpf.3 png.5
    166         -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
    167         -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
    168         -@$(RM_F) $(DM)/man3/libpng.3
    169         -@$(RM_F) $(DM)/man3/libpngpf.3
    170         cp libpng.3 $(DM)/man3
    171         cp libpngpf.3 $(DM)/man3
    172         -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
    173         -@$(RM_F) $(DM)/man5/png.5
    174         cp png.5 $(DM)/man5
    175 
    176 install-config: libpng-config
    177         -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
    178         -@$(RM_F) $(DB)/libpng-config
    179         -@$(RM_F) $(DB)/$(LIBNAME)-config
    180         cp libpng-config $(DB)/$(LIBNAME)-config
    181         chmod 755 $(DB)/$(LIBNAME)-config
    182         (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
    183 
    184 install: install-static install-shared install-man install-config
    185 
    186 # If you installed in $(DESTDIR), test-installed won't work until you
    187 # move the library to its final location.  Use test-dd to test it
    188 # before then.
    189 
    190 test-dd:
    191         echo
    192         echo Testing installed dynamic shared library in $(DL).
    193         $(CC) -I$(DI) $(CPPFLAGS) \
    194            `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
    195            -L$(DL) -L$(ZLIBLIB) \
    196            -rpath $(ZLIBLIB):$(DL) \
    197            -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
    198         ./pngtestd pngtest.png
    199 
    200 test-installed:
    201         echo
    202         echo Testing installed dynamic shared library.
    203         $(CC) $(CPPFLAGS) \
    204            `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
    205            -L$(ZLIBLIB) \
    206            -rpath $(ZLIBLIB):`$(BINPATH)/$(LIBNAME)-config --libdir` \
    207            -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
    208         ./pngtesti pngtest.png
     92install-shared:
     93        @echo "The $@ target is no longer supported by this makefile."
     94        @false
    20995
    21096clean:
    211         $(RM_F) libpng.a pngtest pngtesti pngout.png libpng.pc \
    212         so_locations libpng-config $(LIBSO) $(LIBSOMAJ)* pnglibconf.h
    213 
    214 DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO
    215 writelock:
    216         chmod a-w *.[ch35] $(DOCS) scripts/*
     97        $(RM_F) libpng.a pngtest pngout.png
     98        $(RM_F) so_locations $(LIBSO) $(LIBSOMAJ)* pnglibconf.h
    21799
    218100# DO NOT DELETE THIS LINE -- make depend depends on it.
    219101
    220 png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     102png.o:      png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    221103pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    222 pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    223 pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    224 pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    225 pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    226 pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    227 pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     104pngget.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     105pngmem.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     106pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     107pngread.o:  png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     108pngrio.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    228109pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    229110pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     111pngset.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    230112pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     113pngwio.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    231114pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    232115pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    233116pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    234 pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    235117
    236 pngtest.o: png.h pngconf.h pnglibconf.h
     118pngtest.o:  png.h pngconf.h pnglibconf.h
  • trunk/src/libs/libpng-1.6.42/scripts/makefile.sgi

    r96425 r103316  
    11# makefile for libpng.a and libpng16.so, SGI IRIX with 'cc'
     2# Copyright (C) 2020-2022 Cosmin Truta
    23# Copyright (C) 2001-2002, 2006, 2007, 2010-2014 Glenn Randers-Pehrson
    34# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
     
    910# Library name:
    1011LIBNAME=libpng16
    11 PNGMAJ = 16
     12PNGMAJ=16
    1213
    1314# Shared library names:
    1415LIBSO=$(LIBNAME).so
    1516LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
    16 LIBSOREL=$(LIBSOMAJ).$(RELEASE)
    17 OLDSO=libpng.so
    1817
    1918# Utilities:
     19CC=cc
    2020AR_RC=ar rc
    21 CC=cc
     21RANLIB=echo
    2222MKDIR_P=mkdir -p
    2323LN_SF=ln -sf
    24 RANLIB=echo
    2524CP=cp
    2625RM_F=/bin/rm -f
    27 
    28 # Where make install puts libpng.a, libpng16.so, and libpng16/png.h
    29 # Prefix must be a full pathname.
    30 
    31 prefix=/usr/local
    32 exec_prefix=$(prefix)
    3326
    3427# Where the zlib library and include files are located
     
    4841CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
    4942#CFLAGS= $(ABI) -O $(WARNMORE) -KPIC # -g
    50 CFLAGS=$(ABI) -O $(WARNMORE)
    51 LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng16 -lz -lm
    52 LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
     43CFLAGS=$(ABI) -O $(WARNMORE) # -g
     44LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng16 -lz -lm # -g
     45LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm # -g
    5346LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
    5447        -set_version sgi$(PNGMAJ).0
    5548# See "man dso" for info about shared objects
    56 
    57 INCPATH=$(prefix)/include
    58 LIBPATH=$(exec_prefix)/lib
    59 #LIBPATH=$(exec_prefix)/lib32
    60 MANPATH=$(prefix)/man
    61 BINPATH=$(exec_prefix)/bin
    62 
    63 # override DESTDIR= on the make install command line to easily support
    64 # installing into a temporary location.  Example:
    65 #
    66 #    make install DESTDIR=/tmp/build/libpng
    67 #
    68 # If you're going to install into a temporary location
    69 # via DESTDIR, $(DESTDIR)$(prefix) must already exist before
    70 # you execute make install.
    71 DESTDIR=
    72 
    73 DB=$(DESTDIR)$(BINPATH)
    74 DI=$(DESTDIR)$(INCPATH)
    75 DL=$(DESTDIR)$(LIBPATH)
    76 DM=$(DESTDIR)$(MANPATH)
    7749
    7850# Pre-built configuration
     
    8052PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
    8153
    82 OBJS =  png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
    83         pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
    84         pngwtran.o pngmem.o pngerror.o pngpread.o
     54OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
     55       pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
     56       pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
    8557
    8658.c.o:
    8759        $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
    8860
    89 all: libpng.a pngtest shared libpng.pc libpng-config
     61all: libpng.a pngtest shared
    9062
    9163pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
     
    9567        $(AR_RC) $@ $(OBJS)
    9668        $(RANLIB) $@
    97 
    98 libpng.pc:
    99         cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
    100         -e s!@exec_prefix@!$(exec_prefix)! \
    101         -e s!@libdir@!$(LIBPATH)! \
    102         -e s!@includedir@!$(INCPATH)! \
    103         -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc
    104 
    105 libpng-config:
    106         ( cat scripts/libpng-config-head.in; \
    107         echo prefix=\"$(prefix)\"; \
    108         echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
    109         echo ccopts=\"$(ABI)\"; \
    110         echo ldopts=\"$(ABI)\"; \
    111         echo L_opts=\"-L$(LIBPATH)\"; \
    112         echo libdir=\"$(LIBPATH)\"; \
    113         echo libs=\"-lpng16 -lz -lm\"; \
    114         cat scripts/libpng-config-body.in ) > libpng-config
    115         chmod +x libpng-config
    11669
    11770$(LIBSO): $(LIBSOMAJ)
     
    13083        ./pngtest
    13184
    132 install-headers: png.h pngconf.h pnglibconf.h
    133         -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
    134         -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
    135         cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
    136         chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h
    137         -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
    138         -@$(RM_F) $(DI)/libpng
    139         (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
     85install:
     86        @echo "The $@ target is no longer supported by this makefile."
     87        @false
    14088
    141 install-static: install-headers libpng.a
    142         -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
    143         cp libpng.a $(DL)/$(LIBNAME).a
    144         chmod 644 $(DL)/$(LIBNAME).a
    145         -@$(RM_F) $(DL)/libpng.a
    146         (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
     89install-static:
     90        @echo "The $@ target is no longer supported by this makefile."
     91        @false
    14792
    148 install-shared: install-headers $(LIBSOMAJ) libpng.pc
    149         -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
    150         -@$(RM_F) $(DL)/$(LIBSO)
    151         -@$(RM_F) $(DL)/$(LIBSOREL)
    152         -@$(RM_F) $(DL)/$(OLDSO)
    153         cp $(LIBSOMAJ) $(DL)/$(LIBSOREL)
    154         chmod 755 $(DL)/$(LIBSOREL)
    155         (cd $(DL); \
    156         $(LN_SF) $(LIBSOREL) $(LIBSO); \
    157         $(LN_SF) $(LIBSO) $(OLDSO))
    158         -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
    159         -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
    160         -@$(RM_F) $(DL)/pkgconfig/libpng.pc
    161         cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
    162         chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
    163         (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
    164 
    165 install-man: libpng.3 libpngpf.3 png.5
    166         -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
    167         -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
    168         -@$(RM_F) $(DM)/man3/libpng.3
    169         -@$(RM_F) $(DM)/man3/libpngpf.3
    170         cp libpng.3 $(DM)/man3
    171         cp libpngpf.3 $(DM)/man3
    172         -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
    173         -@$(RM_F) $(DM)/man5/png.5
    174         cp png.5 $(DM)/man5
    175 
    176 install-config: libpng-config
    177         -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
    178         -@$(RM_F) $(DB)/libpng-config
    179         -@$(RM_F) $(DB)/$(LIBNAME)-config
    180         cp libpng-config $(DB)/$(LIBNAME)-config
    181         chmod 755 $(DB)/$(LIBNAME)-config
    182         (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
    183 
    184 install: install-static install-shared install-man install-config
    185 
    186 # If you installed in $(DESTDIR), test-installed won't work until you
    187 # move the library to its final location.  Use test-dd to test it
    188 # before then.
    189 
    190 test-dd:
    191         echo
    192         echo Testing installed dynamic shared library in $(DL).
    193         $(CC) -I$(DI) $(CPPFLAGS) \
    194            `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
    195            -L$(DL) -L$(ZLIBLIB) \
    196            -rpath $(ZLIBLIB):$(DL) \
    197            -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
    198         ./pngtestd pngtest.png
    199 
    200 test-installed:
    201         echo
    202         echo Testing installed dynamic shared library.
    203         $(CC) $(CPPFLAGS) \
    204            `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
    205            -L$(ZLIBLIB) \
    206            -rpath $(ZLIBLIB):`$(BINPATH)/$(LIBNAME)-config --libdir` \
    207            -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
    208         ./pngtesti pngtest.png
     93install-shared:
     94        @echo "The $@ target is no longer supported by this makefile."
     95        @false
    20996
    21097clean:
    211         $(RM_F) *.o libpng.a pngtest pngtesti pngout.png libpng.pc libpng-config \
    212         $(LIBSO) $(LIBSOMAJ)* \
    213         so_locations pnglibconf.h
    214 
    215 DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO
    216 writelock:
    217         chmod a-w *.[ch35] $(DOCS) scripts/*
     98        $(RM_F) *.o libpng.a pngtest pngout.png
     99        $(RM_F) $(LIBSO) $(LIBSOMAJ)* so_locations pnglibconf.h
    218100
    219101# DO NOT DELETE THIS LINE -- make depend depends on it.
    220102
    221 png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     103png.o:      png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    222104pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    223 pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    224 pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    225 pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    226 pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    227 pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    228 pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     105pngget.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     106pngmem.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     107pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     108pngread.o:  png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     109pngrio.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    229110pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    230111pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     112pngset.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    231113pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     114pngwio.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    232115pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    233116pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    234117pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    235 pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    236118
    237 pngtest.o: png.h pngconf.h pnglibconf.h
     119pngtest.o:  png.h pngconf.h pnglibconf.h
  • trunk/src/libs/libpng-1.6.42/scripts/makefile.so9

    r96425 r103316  
    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
    45# Copyright (C) 2002, 2006, 2008, 2010-2014 Glenn Randers-Pehrson
    56# Copyright (C) 1998-2001 Greg Roelofs
     
    1112
    1213# Library name:
    13 PNGMAJ = 16
    14 LIBNAME = libpng16
     14LIBNAME=libpng16
     15PNGMAJ=16
    1516
    1617# Shared library names:
    1718LIBSO=$(LIBNAME).so
    1819LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
    19 LIBSOREL=$(LIBSOMAJ).$(RELEASE)
    20 OLDSO=libpng.so
    2120
    2221# Utilities:
     
    2423CC=cc
    2524AR_RC=ar rc
     25RANLIB=echo
    2626MKDIR_P=mkdir -p
    2727LN_SF=ln -f -s
    28 RANLIB=echo
    2928CP=cp
    3029RM_F=/bin/rm -f
    31 
    32 # Where make install puts libpng.a, $(OLDSO)*, and png.h
    33 prefix=/usr/local
    34 exec_prefix=$(prefix)
    3530
    3631# Where the zlib library and include files are located
     
    4540ZLIBINC=/usr/include
    4641
    47 #WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
    48         -Wmissing-declarations -Wtraditional -Wcast-align \
    49         -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
    5042CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
    51 #CFLAGS=-W -Wall -O3 $(WARNMORE) -g
    5243CFLAGS=-O3
    5344LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm
    54 
    55 INCPATH=$(prefix)/include
    56 LIBPATH=$(exec_prefix)/lib
    57 MANPATH=$(prefix)/man
    58 BINPATH=$(exec_prefix)/bin
    59 
    60 # override DESTDIR= on the make install command line to easily support
    61 # installing into a temporary location.  Example:
    62 #
    63 #    make install DESTDIR=/tmp/build/libpng
    64 #
    65 # If you're going to install into a temporary location
    66 # via DESTDIR, $(DESTDIR)$(prefix) must already exist before
    67 # you execute make install.
    68 DESTDIR=
    69 
    70 DB=$(DESTDIR)$(BINPATH)
    71 DI=$(DESTDIR)$(INCPATH)
    72 DL=$(DESTDIR)$(LIBPATH)
    73 DM=$(DESTDIR)$(MANPATH)
    7445
    7546# Pre-built configuration
     
    7748PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
    7849
    79 OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
    80         pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
    81         pngwtran.o pngmem.o pngerror.o pngpread.o
     50OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
     51       pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
     52       pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
    8253
    8354OBJSDLL = $(OBJS:.o=.pic.o)
     
    9162        $(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c
    9263
    93 all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
     64all: libpng.a $(LIBSO) pngtest
    9465
    9566pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
     
    9970        $(AR_RC) $@ $(OBJS)
    10071        $(RANLIB) $@
    101 
    102 libpng.pc:
    103         cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
    104         -e s!@exec_prefix@!$(exec_prefix)! \
    105         -e s!@libdir@!$(LIBPATH)! \
    106         -e s!@includedir@!$(INCPATH)! \
    107         -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc
    108 
    109 libpng-config:
    110         ( cat scripts/libpng-config-head.in; \
    111         echo prefix=\"$(prefix)\"; \
    112         echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
    113         echo L_opts=\"-L$(LIBPATH)\"; \
    114         echo R_opts=\"-R$(LIBPATH)\"; \
    115         echo libs=\"-lpng16 -lz -lm\"; \
    116         cat scripts/libpng-config-body.in ) > libpng-config
    117         chmod +x libpng-config
    11872
    11973$(LIBSO): $(LIBSOMAJ)
     
    14296        ./pngtest
    14397
    144 install-headers: png.h pngconf.h pnglibconf.h
    145         -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
    146         -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
    147         cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
    148         chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h
    149         -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
    150         -@$(RM_F) $(DI)/libpng
    151         (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
     98install:
     99        @echo "The $@ target is no longer supported by this makefile."
     100        @false
    152101
    153 install-static: install-headers libpng.a
    154         -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
    155         cp libpng.a $(DL)/$(LIBNAME).a
    156         chmod 644 $(DL)/$(LIBNAME).a
    157         -@$(RM_F) $(DL)/libpng.a
    158         (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
     102install-static:
     103        @echo "The $@ target is no longer supported by this makefile."
     104        @false
    159105
    160 install-shared: install-headers $(LIBSOMAJ) libpng.pc
    161         -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
    162         -@$(RM_F) $(DL)/$(LIBSO)
    163         -@$(RM_F) $(DL)/$(LIBSOREL)
    164         -@$(RM_F) $(DL)/$(OLDSO)
    165         cp $(LIBSOMAJ) $(DL)/$(LIBSOREL)
    166         chmod 755 $(DL)/$(LIBSOREL)
    167         (cd $(DL); \
    168         $(LN_SF) $(LIBSOREL) $(LIBSO); \
    169         $(LN_SF) $(LIBSO) $(OLDSO))
    170         -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
    171         -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
    172         -@$(RM_F) $(DL)/pkgconfig/libpng.pc
    173         cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
    174         chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
    175         (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
    176 
    177 install-man: libpng.3 libpngpf.3 png.5
    178         -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
    179         -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
    180         -@$(RM_F) $(DM)/man3/libpng.3
    181         -@$(RM_F) $(DM)/man3/libpngpf.3
    182         cp libpng.3 $(DM)/man3
    183         cp libpngpf.3 $(DM)/man3
    184         -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
    185         -@$(RM_F) $(DM)/man5/png.5
    186         cp png.5 $(DM)/man5
    187 
    188 install-config: libpng-config
    189         -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
    190         -@$(RM_F) $(DB)/libpng-config
    191         -@$(RM_F) $(DB)/$(LIBNAME)-config
    192         cp libpng-config $(DB)/$(LIBNAME)-config
    193         chmod 755 $(DB)/$(LIBNAME)-config
    194         (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
    195 
    196 install: install-static install-shared install-man install-config
    197 
    198 # If you installed in $(DESTDIR), test-installed won't work until you
    199 # move the library to its final location.  Use test-dd to test it
    200 # before then.
    201 
    202 test-dd:
    203         echo
    204         echo Testing installed dynamic shared library in $(DL).
    205         $(CC) -I$(DI) $(CPPFLAGS) \
    206            `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
    207            -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` \
    208            -L$(DL) -L$(ZLIBLIB)  -R$(ZLIBLIB) -R$(DL)
    209         ./pngtestd pngtest.png
    210 
    211 test-installed:
    212         echo
    213         echo Testing installed dynamic shared library.
    214         $(CC) $(CPPFLAGS) \
    215            `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
    216            -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
    217            -L$(ZLIBLIB) -R$(ZLIBLIB)
    218         ./pngtesti pngtest.png
     106install-shared:
     107        @echo "The $@ target is no longer supported by this makefile."
     108        @false
    219109
    220110clean:
    221         $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
    222         libpng-config $(LIBSO) $(LIBSOMAJ)* \
    223         libpng.pc pnglibconf.h
    224 
    225 DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO
    226 writelock:
    227         chmod a-w *.[ch35] $(DOCS) scripts/*
     111        $(RM_F) *.o libpng.a pngtest pngout.png
     112        $(RM_F) $(LIBSO) $(LIBSOMAJ)* pnglibconf.h
    228113
    229114# DO NOT DELETE THIS LINE -- make depend depends on it.
    230115
    231 png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     116png.o      png.pic.o:      png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    232117pngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    233 pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    234 pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    235 pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    236 pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    237 pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    238 pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     118pngget.o   pngget.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     119pngmem.o   pngmem.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     120pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     121pngread.o  pngread.pic.o:  png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     122pngrio.o   pngrio.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    239123pngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    240124pngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     125pngset.o   pngset.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    241126pngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     127pngwio.o   pngwio.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    242128pngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    243129pngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    244130pngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    245 pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    246131
    247132pngtest.o: png.h pngconf.h pnglibconf.h
  • trunk/src/libs/libpng-1.6.42/scripts/makefile.solaris

    r96425 r103316  
    11# makefile for libpng on Solaris 2.x with gcc
     2# Copyright (C) 2020-2022 Cosmin Truta
    23# Copyright (C) 2004, 2006-2008, 2010-2014 Glenn Randers-Pehrson
    34# Contributed by William L. Sebok, based on makefile.linux
     
    1011
    1112# Library name:
    12 LIBNAME = libpng16
    13 PNGMAJ = 16
     13LIBNAME=libpng16
     14PNGMAJ=16
    1415
    1516# Shared library names:
    1617LIBSO=$(LIBNAME).so
    1718LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
    18 LIBSOREL=$(LIBSOMAJ).$(RELEASE)
    19 OLDSO=libpng.so
    2019
    2120# Utilities:
     21CC=gcc
    2222AR_RC=ar rc
    23 CC=gcc
     23RANLIB=echo
    2424MKDIR_P=mkdir -p
    2525LN_SF=ln -f -s
    26 RANLIB=echo
    2726CP=cp
    2827RM_F=/bin/rm -f
    29 
    30 # Where make install puts libpng.a, libpng16.so*, and png.h
    31 prefix=/usr/local
    32 exec_prefix=$(prefix)
    3328
    3429# Where the zlib library and include files are located
     
    4338WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
    4439        -Wmissing-declarations -Wtraditional -Wcast-align \
    45         -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
     40        -Wstrict-prototypes -Wmissing-prototypes # -Wconversion
    4641CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
    47 CFLAGS=-W -Wall -O # $(WARNMORE) -g
    48 LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm
    49 
    50 INCPATH=$(prefix)/include
    51 LIBPATH=$(exec_prefix)/lib
    52 MANPATH=$(prefix)/man
    53 BINPATH=$(exec_prefix)/bin
    54 
    55 # override DESTDIR= on the make install command line to easily support
    56 # installing into a temporary location.  Example:
    57 #
    58 #    make install DESTDIR=/tmp/build/libpng
    59 #
    60 # If you're going to install into a temporary location
    61 # via DESTDIR, $(DESTDIR)$(prefix) must already exist before
    62 # you execute make install.
    63 DESTDIR=
    64 
    65 DB=$(DESTDIR)$(BINPATH)
    66 DI=$(DESTDIR)$(INCPATH)
    67 DL=$(DESTDIR)$(LIBPATH)
    68 DM=$(DESTDIR)$(MANPATH)
     42CFLAGS=-O -Wall -Wextra -Wundef # $(WARNMORE) -g
     43LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm # -g
    6944
    7045# Pre-built configuration
     
    7247PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
    7348
    74 OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
    75         pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
    76         pngwtran.o pngmem.o pngerror.o pngpread.o
     49OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
     50       pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
     51       pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
    7752
    7853OBJSDLL = $(OBJS:.o=.pic.o)
     
    8661        $(CC) -c $(CPPFLAGS) $(CFLAGS) -fPIC -o $@ $*.c
    8762
    88 all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
     63all: libpng.a $(LIBSO) pngtest
    8964
    9065pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
     
    9469        $(AR_RC) $@ $(OBJS)
    9570        $(RANLIB) $@
    96 
    97 libpng.pc:
    98         cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
    99         -e s!@exec_prefix@!$(exec_prefix)! \
    100         -e s!@libdir@!$(LIBPATH)! \
    101         -e s!@includedir@!$(INCPATH)! \
    102         -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc
    103 
    104 libpng-config:
    105         ( cat scripts/libpng-config-head.in; \
    106         echo prefix=\"$(prefix)\"; \
    107         echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
    108         echo cppflags=\"\"; \
    109         echo L_opts=\"-L$(LIBPATH)\"; \
    110         echo R_opts=\"-R$(LIBPATH)\"; \
    111         echo libs=\"-lpng16 -lz -lm\"; \
    112         cat scripts/libpng-config-body.in ) > libpng-config
    113         chmod +x libpng-config
    11471
    11572$(LIBSO): $(LIBSOMAJ)
     
    13895        ./pngtest
    13996
    140 install-headers: png.h pngconf.h pnglibconf.h
    141         -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
    142         -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
    143         cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
    144         chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h
    145         -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
    146         -@$(RM_F) $(DI)/libpng
    147         (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
     97install:
     98        @echo "The $@ target is no longer supported by this makefile."
     99        @false
    148100
    149 install-static: install-headers libpng.a
    150         -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
    151         cp libpng.a $(DL)/$(LIBNAME).a
    152         chmod 644 $(DL)/$(LIBNAME).a
    153         -@$(RM_F) $(DL)/libpng.a
    154         (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
     101install-static:
     102        @echo "The $@ target is no longer supported by this makefile."
     103        @false
    155104
    156 install-shared: install-headers $(LIBSOMAJ) libpng.pc
    157         -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
    158         -@$(RM_F) $(DL)/$(LIBSO)
    159         -@$(RM_F) $(DL)/$(LIBSOREL)
    160         -@$(RM_F) $(DL)/$(OLDSO)
    161         cp $(LIBSOMAJ) $(DL)/$(LIBSOREL)
    162         chmod 755 $(DL)/$(LIBSOREL)
    163         (cd $(DL); \
    164         $(LN_SF) $(LIBSOREL) $(LIBSO); \
    165         $(LN_SF) $(LIBSO) $(OLDSO))
    166         -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
    167         -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
    168         -@$(RM_F) $(DL)/pkgconfig/libpng.pc
    169         cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
    170         chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
    171         (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
    172 
    173 install-man: libpng.3 libpngpf.3 png.5
    174         -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
    175         -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
    176         -@$(RM_F) $(DM)/man3/libpng.3
    177         -@$(RM_F) $(DM)/man3/libpngpf.3
    178         cp libpng.3 $(DM)/man3
    179         cp libpngpf.3 $(DM)/man3
    180         -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
    181         -@$(RM_F) $(DM)/man5/png.5
    182         cp png.5 $(DM)/man5
    183 
    184 install-config: libpng-config
    185         -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
    186         -@$(RM_F) $(DB)/libpng-config
    187         -@$(RM_F) $(DB)/$(LIBNAME)-config
    188         cp libpng-config $(DB)/$(LIBNAME)-config
    189         chmod 755 $(DB)/$(LIBNAME)-config
    190         (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
    191 
    192 install: install-static install-shared install-man install-config
    193 
    194 # If you installed in $(DESTDIR), test-installed won't work until you
    195 # move the library to its final location.  Use test-dd to test it
    196 # before then.
    197 
    198 test-dd:
    199         echo
    200         echo Testing installed dynamic shared library in $(DL).
    201         $(CC) -I$(DI) $(CPPFLAGS) \
    202            `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
    203            -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` \
    204            -L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL)
    205         ./pngtestd pngtest.png
    206 
    207 test-installed:
    208         echo
    209         echo Testing installed dynamic shared library.
    210         $(CC) $(CPPFLAGS) \
    211            `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
    212            -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
    213            -L$(ZLIBLIB) -R$(ZLIBLIB)
    214         ./pngtesti pngtest.png
     105install-shared:
     106        @echo "The $@ target is no longer supported by this makefile."
     107        @false
    215108
    216109clean:
    217         $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
    218         libpng-config $(LIBSO) $(LIBSOMAJ)* \
    219         libpng.pc pnglibconf.h
    220 
    221 DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO
    222 writelock:
    223         chmod a-w *.[ch35] $(DOCS) scripts/*
     110        $(RM_F) *.o libpng.a pngtest pngout.png
     111        $(RM_F) $(LIBSO) $(LIBSOMAJ)* pnglibconf.h
    224112
    225113# DO NOT DELETE THIS LINE -- make depend depends on it.
    226114
    227 png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     115png.o      png.pic.o:      png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    228116pngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    229 pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    230 pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    231 pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    232 pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    233 pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    234 pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     117pngget.o   pngget.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     118pngmem.o   pngmem.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     119pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     120pngread.o  pngread.pic.o:  png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     121pngrio.o   pngrio.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    235122pngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    236123pngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     124pngset.o   pngset.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    237125pngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     126pngwio.o   pngwio.pic.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    238127pngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    239128pngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    240129pngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    241 pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    242130
    243131pngtest.o: png.h pngconf.h pnglibconf.h
  • trunk/src/libs/libpng-1.6.42/scripts/makefile.std

    r96425 r103316  
    11# makefile for libpng
     2# Copyright (C) 2020-2022 Cosmin Truta
    23# Copyright (C) 2002, 2006, 2014 Glenn Randers-Pehrson
    34# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
     
    67# For conditions of distribution and use, see the disclaimer
    78# and license in png.h
    8 
    9 # where make install puts libpng.a and png.h
    10 prefix=/usr/local
    11 INCPATH=$(prefix)/include
    12 LIBPATH=$(prefix)/lib
    13 
    14 # override DESTDIR= on the make install command line to easily support
    15 # installing into a temporary location.  Example:
    16 #
    17 #    make install DESTDIR=/tmp/build/libpng
    18 #
    19 # If you're going to install into a temporary location
    20 # via DESTDIR, $(DESTDIR)$(prefix) must already exist before
    21 # you execute make install.
    22 DESTDIR=
    239
    2410# Where the zlib library and include files are located
     
    2915
    3016CC = cc
     17CPP = $(CC) -E
     18LD = $(CC)
    3119AR_RC = ar rc
     20RANLIB = ranlib
    3221MKDIR_P = mkdir
    33 LN_SF = ln -sf
    34 RANLIB = ranlib
    35 CP = cp
     22MV_F = mv -f
    3623RM_F = rm -f
    3724AWK = awk
    38 SED = sed
    39 CPP = $(CC) -E
    40 ECHO = echo
    4125
     26NOHWOPT = -DPNG_ARM_NEON_OPT=0 -DPNG_MIPS_MSA_OPT=0 \
     27        -DPNG_POWERPC_VSX_OPT=0 -DPNG_INTEL_SSE_OPT=0
    4228DFNFLAGS = # DFNFLAGS contains -D options to use in the libpng build
    4329DFA_EXTRA = # extra files that can be used to control configuration
    44 CPPFLAGS = -I$(ZLIBINC) # -DPNG_DEBUG=5
     30CPPFLAGS = -I$(ZLIBINC) $(NOHWOPT) # -DPNG_DEBUG=5
    4531CFLAGS = -O # -g
    46 LDFLAGS = -L. -L$(ZLIBLIB) -lpng -lz -lm
     32LDFLAGS = -L$(ZLIBLIB) # -g
     33LIBS = -lz -lm
    4734
    4835# Pre-built configuration
     
    5037PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
    5138
    52 OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
    53         pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
    54         pngwtran.o pngmem.o pngerror.o pngpread.o
     39OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
     40       pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
     41       pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
    5542
    5643.c.o:
     
    6350pnglibconf.h: pnglibconf.dfn
    6451        $(RM_F) $@ pnglibconf.c pnglibconf.out pnglibconf.tmp
    65         $(ECHO) '#include "pnglibconf.dfn"' >pnglibconf.c
    66         $(ECHO) "If '$(CC) -E' crashes try /lib/cpp (e.g. CPP='/lib/cpp')" >&2
     52        echo '#include "pnglibconf.dfn"' >pnglibconf.c
     53        @echo "## If '$(CC) -E' fails, try /lib/cpp (e.g. CPP='/lib/cpp')" >&2
    6754        $(CPP) $(DFNFLAGS) pnglibconf.c >pnglibconf.out
    68         $(AWK) -f "scripts/dfn.awk" out="pnglibconf.tmp" pnglibconf.out 1>&2
    69         mv pnglibconf.tmp $@
     55        $(AWK) -f scripts/dfn.awk out=pnglibconf.tmp pnglibconf.out >&2
     56        $(MV_F) pnglibconf.tmp $@
    7057
    7158pnglibconf.dfn: scripts/pnglibconf.dfa scripts/options.awk pngconf.h pngusr.dfa $(DFA_XTRA)
    7259        $(RM_F) $@ pnglibconf.pre pnglibconf.tmp
    73         $(ECHO) "Calling $(AWK) from scripts/pnglibconf.mak" >&2
    74         $(ECHO) "If 'awk' crashes try a better awk (e.g. AWK='nawk')" >&2
    75         $(AWK) -f scripts/options.awk out="pnglibconf.pre"\
     60        @echo "## Calling $(AWK) from scripts/pnglibconf.mak" >&2
     61        @echo "## If 'awk' fails, try a better awk (e.g. AWK='nawk')" >&2
     62        $(AWK) -f scripts/options.awk out=pnglibconf.pre\
    7663            version=search pngconf.h scripts/pnglibconf.dfa\
    77             pngusr.dfa $(DFA_XTRA) 1>&2
    78         $(AWK) -f scripts/options.awk out="pnglibconf.tmp" pnglibconf.pre 1>&2
    79         mv pnglibconf.tmp $@
     64            pngusr.dfa $(DFA_XTRA) >&2
     65        $(AWK) -f scripts/options.awk out=pnglibconf.tmp pnglibconf.pre >&2
     66        $(MV_F) pnglibconf.tmp $@
    8067
    8168libpng.a: $(OBJS)
    82         $(AR_RC) $@  $(OBJS)
     69        $(AR_RC) $@ $(OBJS)
    8370        $(RANLIB) $@
    8471
    8572pngtest: pngtest.o libpng.a
    86         $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
     73        $(LD) $(LDFLAGS) -o $@ pngtest.o libpng.a $(LIBS)
    8774
    8875test: pngtest
    8976        ./pngtest
    9077
    91 install: libpng.a pnglibconf.h
    92         -@$(MKDIR_P) $(DESTDIR)$(INCPATH)
    93         -@$(MKDIR_P) $(DESTDIR)$(INCPATH)/libpng
    94         -@$(MKDIR_P) $(DESTDIR)$(LIBPATH)
    95         -@$(RM_F) $(DESTDIR)$(INCPATH)/png.h
    96         -@$(RM_F) $(DESTDIR)$(INCPATH)/pngconf.h
    97         -@$(RM_F) $(DESTDIR)$(INCPATH)/pnglibconf.h
    98         cp png.h $(DESTDIR)$(INCPATH)/libpng
    99         cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
    100         cp pnglibconf.h $(DESTDIR)$(INCPATH)/libpng
    101         chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
    102         chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
    103         chmod 644 $(DESTDIR)$(INCPATH)/libpng/pnglibconf.h
    104         (cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .)
    105         cp libpng.a $(DESTDIR)$(LIBPATH)
    106         chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a
     78install:
     79        @echo "The $@ target is no longer supported by this makefile."
     80        @false
    10781
    10882clean:
    109         $(RM_F) *.o libpng.a pngtest pngout.png pnglibconf.h pnglibconf.c \
    110         pnglibconf.out
    111 
    112 DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO
    113 writelock:
    114         chmod a-w *.[ch35] $(DOCS) scripts/*
     83        $(RM_F) *.o libpng.a pngtest pngout.png pnglibconf.h
     84        $(RM_F) pnglibconf.c pnglibconf.dfn pnglibconf.out pnglibconf.pre
    11585
    11686# DO NOT DELETE THIS LINE -- make depend depends on it.
    11787
    118 png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     88png.o:      png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    11989pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    120 pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    121 pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    122 pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    123 pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    124 pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     90pngget.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     91pngmem.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    12592pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    126 pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     93pngread.o:  png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     94pngrio.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    12795pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    12896pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     97pngset.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    12998pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     99pngwio.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    130100pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    131101pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    132102pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    133103
    134 pngtest.o: png.h pngconf.h pnglibconf.h
     104pngtest.o:  png.h pngconf.h pnglibconf.h
  • trunk/src/libs/libpng-1.6.42/scripts/makefile.sunos

    r96425 r103316  
    11# makefile for libpng
     2# Copyright (C) 2020-2022 Cosmin Truta
    23# Copyright (C) 2002, 2006, 2014 Glenn Randers-Pehrson
    34# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
     
    78# and license in png.h
    89
    9 # where make install puts libpng.a and png.h
    10 prefix=/usr/local
    11 INCPATH=$(prefix)/include
    12 LIBPATH=$(prefix)/lib
    13 
    14 # override DESTDIR= on the make install command line to easily support
    15 # installing into a temporary location.  Example:
    16 #
    17 #    make install DESTDIR=/tmp/build/libpng
    18 #
    19 # If you're going to install into a temporary location
    20 # via DESTDIR, $(DESTDIR)$(prefix) must already exist before
    21 # you execute make install.
    22 DESTDIR=
    23 
    2410# Where the zlib library and include files are located
    2511#ZLIBLIB=/usr/local/lib
     
    2814ZLIBINC=../zlib
    2915
    30 
    31 WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow -Wconversion \
    32         -Wmissing-declarations -Wtraditional -Wcast-align \
    33         -Wstrict-prototypes -Wmissing-prototypes
    34 
    3516CC=gcc
    3617AR_RC=ar rc
     18RANLIB=ranlib
    3719MKDIR_P=mkdir -p
    38 LN_SF=ln -f -s
    39 RANLIB=ranlib
    4020CP=cp
    4121RM_F=/bin/rm -f
    4222
    4323CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
    44 CFLAGS=-O # $(WARNMORE)
     24CFLAGS=-O
    4525LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
    4626
     
    4929PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
    5030
    51 OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
    52         pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
    53         pngwtran.o pngmem.o pngerror.o pngpread.o
     31OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
     32       pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
     33       pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
    5434
    5535.c.o:
     
    6242
    6343libpng.a: $(OBJS)
    64         $(AR_RC) $@  $(OBJS)
     44        $(AR_RC) $@ $(OBJS)
    6545        $(RANLIB) $@
    6646
     
    7151        ./pngtest
    7252
    73 install: libpng.a
    74         -@$(MKDIR_P) $(DESTDIR)$(INCPATH)
    75         -@$(MKDIR_P) $(DESTDIR)$(INCPATH)/libpng
    76         -@$(MKDIR_P) $(DESTDIR)$(LIBPATH)
    77         -@$(RM_F) $(DESTDIR)$(INCPATH)/png.h
    78         -@$(RM_F) $(DESTDIR)$(INCPATH)/pngconf.h
    79         -@$(RM_F) $(DESTDIR)$(INCPATH)/pnglibconf.h
    80         cp png.h $(DESTDIR)$(INCPATH)/libpng
    81         cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
    82         cp pnglibconf.h $(DESTDIR)$(INCPATH)/libpng
    83         chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
    84         chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
    85         chmod 644 $(DESTDIR)$(INCPATH)/libpng/pnglibconf.h
    86         (cd $(DESTDIR)$(INCPATH); $(LN_SF) libpng/* .)
    87         cp libpng.a $(DESTDIR)$(LIBPATH)
    88         chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a
     53install:
     54        @echo "The $@ target is no longer supported by this makefile."
     55        @false
    8956
    9057clean:
    9158        $(RM_F) *.o libpng.a pngtest pngout.png pnglibconf.h
    9259
    93 DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO
    94 writelock:
    95         chmod a-w *.[ch35] $(DOCS) scripts/*
    96 
    9760# DO NOT DELETE THIS LINE -- make depend depends on it.
    9861
    99 png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     62png.o:      png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    10063pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    101 pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    102 pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    103 pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    104 pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    105 pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    106 pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     64pngget.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     65pngmem.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     66pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     67pngread.o:  png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     68pngrio.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    10769pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    10870pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     71pngset.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    10972pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     73pngwio.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    11074pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    11175pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    11276pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    113 pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    11477
    115 pngtest.o: png.h pngconf.h pnglibconf.h
     78pngtest.o:  png.h pngconf.h pnglibconf.h
  • trunk/src/libs/libpng-1.6.42/scripts/makefile.vcwin32

    r96425 r103316  
    2323RM = del
    2424
     25# Uncomment next to put error messages in a file
     26#ERRFILE= >> pngerrs.log
     27
    2528# Pre-built configuration
    2629# See scripts\pnglibconf.mak for more options
     
    3033O=.obj
    3134
    32 #uncomment next to put error messages in a file
    33 #ERRFILE= >> pngerrs.log
    34 
    35 # Variables
     35# File lists
    3636OBJS1 = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O)
    3737OBJS2 = pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O)
     
    4848        $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
    4949
    50 pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     50pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    5151        $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
    5252
     
    5454        $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
    5555
     56pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     57        $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
     58
     59pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     60        $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
     61
    5662pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    5763        $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
    5864
    59 pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     65pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    6066        $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
    6167
     
    6672        $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
    6773
    68 pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     74pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    6975        $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
    7076
    71 pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    72         $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
    73 
    74 pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
     77pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    7578        $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
    7679
    7780pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    78         $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
    79 
    80 pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
    8181        $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
    8282
     
    9494        $(AR) $(ARFLAGS) -out:$@ $(OBJS) $(ERRFILE)
    9595
     96pngtest.exe: pngtest$(O) libpng.lib
     97        $(LD) $(LDFLAGS) -out:$@ pngtest$(O) libpng.lib ..\zlib\zlib.lib $(ERRFILE)
     98
    9699pngtest$(O): png.h pngconf.h pnglibconf.h
    97100        $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
    98101
    99 pngtest.exe: pngtest$(O) libpng.lib
    100         $(LD) $(LDFLAGS) -out:$@ pngtest$(O) libpng.lib ..\zlib\zlib.lib $(ERRFILE)
    101 
    102102test: pngtest.exe
    103         pngtest
     103        pngtest.exe
    104104
    105105clean:
     
    111111
    112112# End of makefile for libpng
    113 
  • trunk/src/libs/libpng-1.6.42/scripts/options.awk

    r96425 r103316  
    11#!/bin/awk -f
     2
    23# scripts/options.awk - library build configuration control
    3 #
    4 # last changed in libpng version 1.6.11 - June 5, 2014
    54#
    65# Copyright (c) 1998-2014 Glenn Randers-Pehrson
     
    244243# option NAME ( (requires|enables|if) NAME* | on | off | disabled |
    245244#                sets SETTING VALUE+ )*
    246 #     
     245#
    247246#   Declares an option 'NAME' and describes its default setting (disabled)
    248247#   and its relationship to other options.  The option is disabled
  • trunk/src/libs/libpng-1.6.42/scripts/pnglibconf.dfa

    r96425 r103316  
    99version
    1010com
    11 com Copyright (c) 2018-2019 Cosmin Truta
     11com Copyright (c) 2018-2024 Cosmin Truta
    1212com Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
    1313com
     
    7070# 1) Create 'pngusr.h', enter the required private build information
    7171# detailed below and #define PNG_NO_<option> for each option you
    72 # don't want in that file in that file.  You can also turn on options
    73 # using PNG_<option>_SUPPORTED.  When you have finished rerun
    74 # configure and rebuild pnglibconf.h file with -DPNG_USER_CONFIG:
     72# don't want in that file.  You can also turn on options using
     73# PNG_<option>_SUPPORTED.  When you have finished, rerun configure
     74# and rebuild pnglibconf.h file with -DPNG_USER_CONFIG:
    7575#
    7676#  make clean
     
    257257  sets POWERPC_VSX_OPT 1
    258258
     259# These options are specific to the MIPS MSA hardware optimizations.
     260#
     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.
     278setting MIPS_MSA_OPT
     279option MIPS_MSA_API disabled requires ALIGNED_MEMORY enables SET_OPTION,
     280  sets MIPS_MSA_OPT 1
     281option MIPS_MSA_CHECK disabled requires ALIGNED_MEMORY,
     282  sets MIPS_MSA_OPT 1
     283
     284# These options are specific to the MIPS MMI hardware optimizations.
     285#
     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.
     302setting MIPS_MMI_OPT
     303option MIPS_MMI_API disabled requires ALIGNED_MEMORY enables SET_OPTION,
     304  sets MIPS_MMI_OPT 1
     305option MIPS_MMI_CHECK disabled requires ALIGNED_MEMORY,
     306  sets MIPS_MMI_OPT 1
     307
    259308
    260309# These settings configure the default compression level (0-9) and 'strategy';
     
    337386option BENIGN_READ_ERRORS requires BENIGN_ERRORS
    338387
     388# Adler32 checksum
     389#
     390# This option allows the check of the Adler32 checksum performed by zlib to
     391# be turned off for IDAT chunks (only).  Unless this option is enabled and
     392# turned on (not the default even if enabled) a failed Adler32 at the end of the
     393# stream will result in a decompression (inflate) failure on read even though
     394# the entire image might have been read successfully.
     395#
     396# This option relies on an undocumented function 'inflateValidate' which is
     397# present in only some versions of zlib.  If the function is not present in the
     398# zlib used with libpng code which uses -lpng is likely to fail to link or to
     399# launch in the case of a DLL.
     400#
     401# Therefore this option is currently disabled by default; it has to be turned on
     402# in pngusr.dfa and then the application program has to explicitly turn the
     403# functionality on by calling png_set_option.
     404#
     405# Furthermore the option is explicitly turned off here if the zlib version
     406# number is below that required - libpng wouldn't compile in that case if the
     407# option were turned on.
     408option DISABLE_ADLER32_CHECK requires READ enables SET_OPTION disabled
     409
     410# ZLIB_VERNUM must be used here, not PNG_ZLIB_VERNUM, because
     411# scripts/options.awk ends up putting this test adhead of the setting of
     412# PNG_ZLIB_VERNUM (apparently above, but not because of the two-pass processing)
     413@#if ZLIB_VERNUM < 0x1290
     414@#   define PNG_NO_DISABLE_ADLER32_CHECK
     415@#endif
    339416
    340417# Generic options - affect both read and write.
  • trunk/src/libs/libpng-1.6.42/scripts/pnglibconf.h.prebuilt

    r96425 r103316  
    11/* pnglibconf.h - library build configuration */
    22
    3 /* libpng version 1.6.37 */
    4 
    5 /* Copyright (c) 2018-2019 Cosmin Truta */
     3/* libpng version 1.6.42 */
     4
     5/* Copyright (c) 2018-2024 Cosmin Truta */
    66/* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson */
    77
     
    2828#define PNG_CONSOLE_IO_SUPPORTED
    2929#define PNG_CONVERT_tIME_SUPPORTED
     30/*#undef PNG_DISABLE_ADLER32_CHECK_SUPPORTED*/
    3031#define PNG_EASY_ACCESS_SUPPORTED
    3132/*#undef PNG_ERROR_NUMBERS_SUPPORTED*/
     
    4243#define PNG_INFO_IMAGE_SUPPORTED
    4344#define PNG_IO_STATE_SUPPORTED
     45/*#undef PNG_MIPS_MMI_API_SUPPORTED*/
     46/*#undef PNG_MIPS_MMI_CHECK_SUPPORTED*/
     47/*#undef PNG_MIPS_MSA_API_SUPPORTED*/
     48/*#undef PNG_MIPS_MSA_CHECK_SUPPORTED*/
    4449#define PNG_MNG_FEATURES_SUPPORTED
    4550#define PNG_POINTER_INDEXING_SUPPORTED
  • trunk/src/libs/libpng-1.6.42/scripts/pnglibconf.mak

    r96425 r103316  
    1212AWK = nawk
    1313AWK = one-true-awk
    14 AWK = awk  # Crashes on SunOS 5.10 - use 'nawk'
    15 CPP = $(CC) -E # On SUN OS 5.10 if this causes problems use /lib/cpp
     14AWK = awk      # This fails on SunOS 5.10; use 'nawk'
     15CPP = $(CC) -E # If this fails on SunOS 5.10, use '/lib/cpp'
    1616
    17 MOVE = mv
     17MOVE = mv -f
    1818DELETE = rm -f
    19 ECHO = echo
     19
    2020DFA_XTRA = # Put your configuration file here, see scripts/pnglibconf.dfa.  Eg:
    2121# DFA_XTRA = pngusr.dfa
     
    2626DFNFLAGS = $(DEFS) $(CPPFLAGS) $(CFLAGS)
    2727
    28 # srcdir is a defacto standard for the location of the source
     28# srcdir is a de-facto standard for the location of the source
    2929srcdir = .
    3030
     
    3333pnglibconf.h: pnglibconf.dfn
    3434        $(DELETE) $@ pnglibconf.c pnglibconf.out pnglibconf.tmp
    35         $(ECHO) '#include "pnglibconf.dfn"' >pnglibconf.c
    36         $(ECHO) "If '$(CC) -E' crashes try /lib/cpp (e.g. CPP='/lib/cpp')" >&2
     35        echo '#include "pnglibconf.dfn"' >pnglibconf.c
     36        @echo "## If '$(CC) -E' fails, try /lib/cpp (e.g. CPP='/lib/cpp')" >&2
    3737        $(CPP) $(DFNFLAGS) pnglibconf.c >pnglibconf.out
    38         $(AWK) -f "$(srcdir)/scripts/dfn.awk" out="pnglibconf.tmp" pnglibconf.out 1>&2
     38        $(AWK) -f $(srcdir)/scripts/dfn.awk out=pnglibconf.tmp pnglibconf.out >&2
    3939        $(MOVE) pnglibconf.tmp $@
    4040
    4141pnglibconf.dfn: $(srcdir)/scripts/pnglibconf.dfa $(srcdir)/scripts/options.awk $(srcdir)/pngconf.h $(srcdir)/pngusr.dfa $(DFA_XTRA)
    4242        $(DELETE) $@ pnglibconf.pre pnglibconf.tmp
    43         $(ECHO) "Calling $(AWK) from scripts/pnglibconf.mak" >&2
    44         $(ECHO) "If 'awk' crashes try a better awk (e.g. AWK='nawk')" >&2
    45         $(AWK) -f $(srcdir)/scripts/options.awk out="pnglibconf.pre"\
     43        @echo "## Calling $(AWK) from scripts/pnglibconf.mak" >&2
     44        @echo "## If 'awk' fails, try a better awk (e.g. AWK='nawk')" >&2
     45        $(AWK) -f $(srcdir)/scripts/options.awk out=pnglibconf.pre\
    4646            version=search $(srcdir)/pngconf.h $(srcdir)/scripts/pnglibconf.dfa\
    47             $(srcdir)/pngusr.dfa $(DFA_XTRA) 1>&2
    48         $(AWK) -f $(srcdir)/scripts/options.awk out="pnglibconf.tmp" pnglibconf.pre 1>&2
     47            $(srcdir)/pngusr.dfa $(DFA_XTRA) >&2
     48        $(AWK) -f $(srcdir)/scripts/options.awk out=pnglibconf.tmp pnglibconf.pre >&2
    4949        $(MOVE) pnglibconf.tmp $@
    5050
  • trunk/src/libs/libpng-1.6.42/scripts/prefix.c

    r96425 r103316  
    22/* prefix.c - generate an unprefixed symbol list
    33 *
    4  * Last changed in libpng version 1.6.16 [December 22, 2014]
    54 * Copyright (c) 2013-2014 Glenn Randers-Pehrson
    65 *
  • trunk/src/libs/libpng-1.6.42/scripts/smakefile.ppc

    r96425 r103316  
    2020MKDIR    = makedir
    2121
    22 OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o pngread.o \
    23        pngerror.o pngpread.o pngwrite.o pngrtran.o pngwtran.o pngrio.o \
    24        pngwio.o pngmem.o
     22OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
     23       pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
     24       pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
    2525
    2626all: $(LIBNAME) pngtest
  • trunk/src/libs/libpng-1.6.42/scripts/sym.c

    r96425 r103316  
    22/* sym.c - define format of libpng.sym
    33 *
    4  * Last changed in libpng version 1.6.16 [December 22, 2014]
    54 * Copyright (c) 2011-2014 Glenn Randers-Pehrson
    65 *
  • trunk/src/libs/libpng-1.6.42/scripts/symbols.c

    r96425 r103316  
    22/* symbols.c - find all exported symbols
    33 *
    4  * Last changed in libpng version 1.6.16 [December 22, 2014]
    54 * Copyright (c) 2011-2014 Glenn Randers-Pehrson
    65 *
  • trunk/src/libs/libpng-1.6.42/scripts/vers.c

    r96425 r103316  
    22/* vers.c - define format of libpng.vers
    33 *
    4  * Last changed in libpng version 1.6.16 [December 22, 2014]
    54 * Copyright (c) 2011-2014 Glenn Randers-Pehrson
    65 *
  • trunk/src/libs/libpng-1.6.42/test-driver

    r96425 r103316  
    44scriptversion=2018-03-07.03; # UTC
    55
    6 # Copyright (C) 2011-2018 Free Software Foundation, Inc.
     6# Copyright (C) 2011-2021 Free Software Foundation, Inc.
    77#
    88# This program is free software; you can redistribute it and/or modify
     
    4343  cat <<END
    4444Usage:
    45   test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
    46               [--expect-failure={yes|no}] [--color-tests={yes|no}]
    47               [--enable-hard-errors={yes|no}] [--]
     45  test-driver --test-name NAME --log-file PATH --trs-file PATH
     46              [--expect-failure {yes|no}] [--color-tests {yes|no}]
     47              [--enable-hard-errors {yes|no}] [--]
    4848              TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
     49
    4950The '--test-name', '--log-file' and '--trs-file' options are mandatory.
     51See the GNU Automake documentation for information.
    5052END
    5153}
     
    104106trap "st=143; $do_exit" 15
    105107
    106 # Test script is run here.
    107 "$@" >$log_file 2>&1
     108# Test script is run here. We create the file first, then append to it,
     109# to ameliorate tests themselves also writing to the log file. Our tests
     110# don't, but others can (automake bug#35762).
     111: >"$log_file"
     112"$@" >>"$log_file" 2>&1
    108113estatus=$?
    109114
     
    127132# file, without the need of also peaking into the corresponding '.trs'
    128133# file (automake bug#11814).
    129 echo "$res $test_name (exit status: $estatus)" >>$log_file
     134echo "$res $test_name (exit status: $estatus)" >>"$log_file"
    130135
    131136# Report outcome to console.
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