From 37934ccdac94fcbeb27c531eec612a4a8bb68a49 Mon Sep 17 00:00:00 2001 From: marauder2k7 Date: Thu, 1 Jan 2026 11:47:39 +0000 Subject: [PATCH] downgrade libpng added zlib_root to libpng includes --- Engine/lib/lpng/.appveyor.yml | 81 - Engine/lib/lpng/.cmake-format.yaml | 94 - Engine/lib/lpng/.editorconfig | 55 - Engine/lib/lpng/.editorconfig-checker.json | 10 - Engine/lib/lpng/.github/workflows/lint.yml | 31 - .../lpng/.github/workflows/verify-linux.yml | 32 - .../lpng/.github/workflows/verify-macos.yml | 25 - .../lpng/.github/workflows/verify-windows.yml | 37 - Engine/lib/lpng/.gitignore | 156 - Engine/lib/lpng/.yamllint.yml | 7 - Engine/lib/lpng/ANNOUNCE | 41 +- Engine/lib/lpng/AUTHORS | 42 +- Engine/lib/lpng/CHANGES | 236 +- Engine/lib/lpng/CMakeLists.txt | 1430 ++- Engine/lib/lpng/INSTALL | 98 +- Engine/lib/lpng/LICENSE | 4 +- Engine/lib/lpng/Makefile.am | 64 +- Engine/lib/lpng/Makefile.in | 662 +- Engine/lib/lpng/README | 299 +- Engine/lib/lpng/TODO | 43 +- Engine/lib/lpng/aclocal.m4 | 476 +- Engine/lib/lpng/arm/arm_init.c | 34 +- Engine/lib/lpng/arm/filter_neon.S | 267 +- Engine/lib/lpng/arm/filter_neon_intrinsics.c | 3 +- Engine/lib/lpng/arm/palette_neon_intrinsics.c | 17 +- Engine/lib/lpng/autogen.sh | 7 +- Engine/lib/lpng/ci/.shellcheckrc | 11 - Engine/lib/lpng/ci/LICENSE_MIT.txt | 19 - Engine/lib/lpng/ci/README.md | 25 - Engine/lib/lpng/ci/ci_lint.sh | 142 - Engine/lib/lpng/ci/ci_verify_cmake.sh | 209 - Engine/lib/lpng/ci/ci_verify_configure.sh | 182 - Engine/lib/lpng/ci/ci_verify_makefiles.sh | 200 - Engine/lib/lpng/ci/ci_verify_version.sh | 191 - Engine/lib/lpng/ci/lib/ci.lib.sh | 111 - .../lpng/ci/libexec/ci_shellify_autoconf.sh | 48 - Engine/lib/lpng/ci/libexec/ci_shellify_c.sh | 49 - .../lib/lpng/ci/libexec/ci_shellify_cmake.sh | 49 - .../lib/lpng/ci/libexec/ci_shellify_shell.sh | 46 - .../android/ci_env.aarch64-linux-android.sh | 16 - .../ci_env.armv7a-linux-androideabi.sh | 16 - .../android/ci_env.i686-linux-android.sh | 16 - .../android/ci_env.x86_64-linux-android.sh | 16 - .../targets/cygwin/ci_env.i686-pc-cygwin.sh | 18 - .../targets/cygwin/ci_env.x86_64-pc-cygwin.sh | 18 - .../darwin/ci_env.arm64-apple-darwin.sh | 15 - .../darwin/ci_env.x86_64-apple-darwin.sh | 15 - .../freebsd/ci_env.aarch64-unknown-freebsd.sh | 14 - .../freebsd/ci_env.i686-unknown-freebsd.sh | 14 - .../freebsd/ci_env.riscv64-unknown-freebsd.sh | 14 - .../freebsd/ci_env.x86_64-unknown-freebsd.sh | 14 - .../targets/linux/ci_env.aarch64-linux-gnu.sh | 21 - .../targets/linux/ci_env.arm-linux-gnueabi.sh | 21 - .../linux/ci_env.arm-linux-gnueabihf.sh | 21 - .../ci/targets/linux/ci_env.i686-linux-gnu.sh | 21 - .../ci/targets/linux/ci_env.mips-linux-gnu.sh | 21 - .../linux/ci_env.mips64-linux-gnuabi64.sh | 21 - .../linux/ci_env.mips64el-linux-gnuabi64.sh | 21 - .../targets/linux/ci_env.mipsel-linux-gnu.sh | 21 - .../linux/ci_env.mipsisa32r6-linux-gnu.sh | 21 - .../linux/ci_env.mipsisa32r6el-linux-gnu.sh | 21 - .../ci_env.mipsisa64r6-linux-gnuabi64.sh | 21 - .../ci_env.mipsisa64r6el-linux-gnuabi64.sh | 21 - .../targets/linux/ci_env.powerpc-linux-gnu.sh | 21 - .../linux/ci_env.powerpc64-linux-gnu.sh | 21 - .../linux/ci_env.powerpc64le-linux-gnu.sh | 21 - .../targets/linux/ci_env.riscv64-linux-gnu.sh | 21 - .../targets/linux/ci_env.x86_64-linux-gnu.sh | 21 - .../msdos/ci_env.i386-pc-msdoswatcom.sh | 18 - .../msdos/ci_env.i586-pc-msdosdjgpp.sh | 18 - .../msdos/ci_env.i86-pc-msdoswatcom.sh | 19 - .../windows/ci_env.aarch64-windows-llvm.sh | 18 - .../windows/ci_env.i686-w64-mingw32.sh | 21 - .../windows/ci_env.i686-windows-llvm.sh | 18 - .../windows/ci_env.x86_64-w64-mingw32.sh | 21 - .../windows/ci_env.x86_64-windows-llvm.sh | 18 - Engine/lib/lpng/compile | 38 +- Engine/lib/lpng/config.guess | 1579 ++- Engine/lib/lpng/config.h.in | 56 +- Engine/lib/lpng/config.sub | 3347 +++---- Engine/lib/lpng/configure | 8825 +++++++---------- Engine/lib/lpng/configure.ac | 423 +- Engine/lib/lpng/contrib/.editorconfig | 9 - Engine/lib/lpng/contrib/README.txt | 2 - .../lib/lpng/contrib/arm-neon/android-ndk.c | 2 +- Engine/lib/lpng/contrib/arm-neon/linux-auxv.c | 2 +- Engine/lib/lpng/contrib/arm-neon/linux.c | 2 +- Engine/lib/lpng/contrib/conftest/basic.dfa | 133 - Engine/lib/lpng/contrib/conftest/fixed.dfa | 15 - .../lib/lpng/contrib/conftest/float-fixed.dfa | 14 - .../contrib/conftest/nocompile-limits.dfa | 21 - Engine/lib/lpng/contrib/conftest/nolimits.dfa | 19 - .../lib/lpng/contrib/conftest/read-full.dfa | 13 - .../lib/lpng/contrib/conftest/write-full.dfa | 13 - .../lib/lpng/contrib/examples/.clang-format | 143 - Engine/lib/lpng/contrib/examples/README.txt | 1 + Engine/lib/lpng/contrib/examples/iccfrompng.c | 28 +- Engine/lib/lpng/contrib/examples/pngpixel.c | 133 +- Engine/lib/lpng/contrib/examples/pngtopng.c | 34 +- Engine/lib/lpng/contrib/examples/simpleover.c | 232 +- Engine/lib/lpng/contrib/gregbook/rpng-x.c | 2 +- Engine/lib/lpng/contrib/gregbook/rpng2-x.c | 2 +- Engine/lib/lpng/contrib/libtests/gentests.sh | 2 + Engine/lib/lpng/contrib/libtests/makepng.c | 61 +- Engine/lib/lpng/contrib/libtests/pngimage.c | 99 +- Engine/lib/lpng/contrib/libtests/pngstest.c | 36 +- Engine/lib/lpng/contrib/libtests/pngunknown.c | 129 +- Engine/lib/lpng/contrib/libtests/pngvalid.c | 553 +- Engine/lib/lpng/contrib/libtests/readpng.c | 2 + Engine/lib/lpng/contrib/libtests/tarith.c | 101 +- Engine/lib/lpng/contrib/libtests/timepng.c | 4 +- Engine/lib/lpng/contrib/mips-mmi/linux.c | 141 - Engine/lib/lpng/contrib/mips-msa/linux.c | 58 +- Engine/lib/lpng/contrib/oss-fuzz/README.txt | 1 + Engine/lib/lpng/contrib/oss-fuzz/build.sh | 3 +- .../contrib/oss-fuzz/libpng_read_fuzzer.cc | 45 +- Engine/lib/lpng/contrib/oss-fuzz/nalloc.h | 330 - Engine/lib/lpng/contrib/pngexif/.editorconfig | 12 - Engine/lib/lpng/contrib/pngexif/.gitignore | 3 - Engine/lib/lpng/contrib/pngexif/.pylintrc | 8 - .../lib/lpng/contrib/pngexif/LICENSE_MIT.txt | 19 - Engine/lib/lpng/contrib/pngexif/README.md | 20 - Engine/lib/lpng/contrib/pngexif/bytepack.py | 48 - Engine/lib/lpng/contrib/pngexif/exifinfo.py | 306 - Engine/lib/lpng/contrib/pngexif/pngexifinfo | 10 - .../lib/lpng/contrib/pngexif/pngexifinfo.bat | 4 - .../lib/lpng/contrib/pngexif/pngexifinfo.py | 178 - Engine/lib/lpng/contrib/pngminim/README | 1 + .../lpng/contrib/pngminim/decoder/makefile | 2 +- .../lib/lpng/contrib/pngminus/.editorconfig | 29 - Engine/lib/lpng/contrib/pngminus/.gitignore | 11 - Engine/lib/lpng/contrib/pngminus/CHANGES.txt | 5 +- .../lib/lpng/contrib/pngminus/CMakeLists.txt | 53 +- Engine/lib/lpng/contrib/pngminus/LICENSE.txt | 3 +- .../{test_png2pnm.bat => png2pnm.bat} | 0 Engine/lib/lpng/contrib/pngminus/png2pnm.c | 236 +- .../pngminus/{test_png2pnm.sh => png2pnm.sh} | 0 .../{test_pngminus.bat => pngminus.bat} | 0 .../{test_pngminus.sh => pngminus.sh} | 0 .../{test_pnm2png.bat => pnm2png.bat} | 0 Engine/lib/lpng/contrib/pngminus/pnm2png.c | 565 +- .../pngminus/{test_pnm2png.sh => pnm2png.sh} | 0 Engine/lib/lpng/contrib/pngsuite/README | 1 + .../lpng/contrib/pngsuite/interlaced/README | 1 + Engine/lib/lpng/contrib/powerpc-vsx/linux.c | 3 +- .../lib/lpng/contrib/powerpc-vsx/linux_aux.c | 1 + .../testpngs/badpal/regression-palette-8.png | Bin 1033 -> 0 bytes .../testpngs/badpal/small-palette-1.png | Bin 271 -> 0 bytes .../testpngs/badpal/small-palette-2.png | Bin 277 -> 0 bytes .../testpngs/badpal/small-palette-4.png | Bin 315 -> 0 bytes .../testpngs/badpal/small-palette-8.png | Bin 1035 -> 0 bytes .../testpngs/badpal/test-palette-1.png | Bin 432 -> 0 bytes .../testpngs/badpal/test-palette-2.png | Bin 499 -> 0 bytes .../testpngs/badpal/test-palette-4.png | Bin 591 -> 0 bytes .../testpngs/badpal/test-palette-8.png | Bin 2728 -> 0 bytes Engine/lib/lpng/contrib/testpngs/makepngs.sh | 6 +- .../png-3/cicp-display-p3_reencoded.png | Bin 142 -> 0 bytes Engine/lib/lpng/contrib/tools/checksum-icc.c | 4 +- Engine/lib/lpng/contrib/tools/chkfmt | 144 + Engine/lib/lpng/contrib/tools/cvtcolor.c | 6 +- Engine/lib/lpng/contrib/tools/genpng.c | 5 +- Engine/lib/lpng/contrib/tools/intgamma.sh | 18 +- Engine/lib/lpng/contrib/tools/makesRGB.c | 3 +- Engine/lib/lpng/contrib/tools/png-fix-itxt.c | 6 +- Engine/lib/lpng/contrib/tools/pngcp.c | 109 +- Engine/lib/lpng/contrib/tools/pngfix.c | 64 +- Engine/lib/lpng/contrib/tools/reindent | 25 + Engine/lib/lpng/contrib/tools/sRGB.h | 6 +- Engine/lib/lpng/contrib/visupng/.editorconfig | 23 - Engine/lib/lpng/contrib/visupng/VisualPng.c | 2 +- Engine/lib/lpng/depcomp | 19 +- Engine/lib/lpng/example.c | 50 +- Engine/lib/lpng/install-sh | 165 +- .../lib/lpng/intel/filter_sse2_intrinsics.c | 3 +- Engine/lib/lpng/intel/intel_init.c | 1 + Engine/lib/lpng/libpng-manual.txt | 186 +- Engine/lib/lpng/libpng.3 | 236 +- Engine/lib/lpng/libpng.pc.in | 2 +- Engine/lib/lpng/libpngpf.3 | 21 +- Engine/lib/lpng/loongarch/.editorconfig | 8 - .../lpng/loongarch/filter_lsx_intrinsics.c | 412 - .../lib/lpng/loongarch/loongarch_lsx_init.c | 65 - Engine/lib/lpng/ltmain.sh | 1565 ++- Engine/lib/lpng/mips/.editorconfig | 8 - .../lpng/mips/filter_mmi_inline_assembly.c | 525 - Engine/lib/lpng/mips/filter_msa_intrinsics.c | 59 +- Engine/lib/lpng/mips/mips_init.c | 91 +- Engine/lib/lpng/missing | 79 +- Engine/lib/lpng/png.5 | 93 +- Engine/lib/lpng/png.c | 1566 ++- Engine/lib/lpng/png.h | 222 +- Engine/lib/lpng/pngconf.h | 60 +- Engine/lib/lpng/pngdebug.h | 12 +- Engine/lib/lpng/pngerror.c | 188 +- Engine/lib/lpng/pngget.c | 577 +- Engine/lib/lpng/pnginfo.h | 104 +- Engine/lib/lpng/pnglibconf.h | 215 + Engine/lib/lpng/pngmem.c | 40 +- Engine/lib/lpng/pngpread.c | 213 +- Engine/lib/lpng/pngpriv.h | 737 +- Engine/lib/lpng/pngread.c | 507 +- Engine/lib/lpng/pngrio.c | 5 +- Engine/lib/lpng/pngrtran.c | 477 +- Engine/lib/lpng/pngrutil.c | 1926 ++-- Engine/lib/lpng/pngset.c | 382 +- Engine/lib/lpng/pngstruct.h | 125 +- Engine/lib/lpng/pngtest.c | 572 +- Engine/lib/lpng/pngtest.png | Bin 8831 -> 8759 bytes Engine/lib/lpng/pngtrans.c | 15 +- Engine/lib/lpng/pngwio.c | 9 +- Engine/lib/lpng/pngwrite.c | 175 +- Engine/lib/lpng/pngwtran.c | 1 + Engine/lib/lpng/pngwutil.c | 148 +- Engine/lib/lpng/powerpc/.editorconfig | 8 - .../lib/lpng/powerpc/filter_vsx_intrinsics.c | 2 +- Engine/lib/lpng/powerpc/powerpc_init.c | 3 +- Engine/lib/lpng/projects/.editorconfig | 3 - Engine/lib/lpng/projects/vstudio/README.txt | 8 +- Engine/lib/lpng/projects/vstudio/build.bat | 25 - Engine/lib/lpng/projects/vstudio/zlib.props | 45 +- Engine/lib/lpng/riscv/.editorconfig | 8 - Engine/lib/lpng/riscv/filter_rvv_intrinsics.c | 329 - Engine/lib/lpng/riscv/riscv_init.c | 45 - Engine/lib/lpng/scripts/README.txt | 141 +- Engine/lib/lpng/scripts/autoconf/README.md | 7 - Engine/lib/lpng/scripts/checksym.awk | 19 +- Engine/lib/lpng/scripts/cmake/AUTHORS.md | 45 - .../lpng/scripts/cmake/PNGCheckLibconf.cmake | 45 - Engine/lib/lpng/scripts/cmake/PNGConfig.cmake | 28 - .../lib/lpng/scripts/cmake/PNGGenConfig.cmake | 104 - Engine/lib/lpng/scripts/cmake/PNGTest.cmake | 42 - Engine/lib/lpng/scripts/cmake/README.md | 36 - Engine/lib/lpng/scripts/descrip.mms | 36 +- Engine/lib/lpng/scripts/dfn.awk | 21 +- .../lpng/scripts/{cmake => }/genchk.cmake.in | 19 +- .../lpng/scripts/{cmake => }/genout.cmake.in | 30 +- .../lpng/scripts/{cmake => }/gensrc.cmake.in | 51 +- Engine/lib/lpng/scripts/intprefix.c | 2 + Engine/lib/lpng/scripts/libpng-config-body.in | 1 + Engine/lib/lpng/scripts/libpng-config-head.in | 2 +- Engine/lib/lpng/scripts/libpng.pc.in | 2 +- .../lpng/scripts/{autoconf => }/libtool.m4 | 677 +- .../lpng/scripts/{autoconf => }/ltoptions.m4 | 108 +- .../lpng/scripts/{autoconf => }/ltsugar.m4 | 2 +- .../lpng/scripts/{autoconf => }/ltversion.m4 | 13 +- .../scripts/{autoconf => }/lt~obsolete.m4 | 4 +- Engine/lib/lpng/scripts/makefile.32sunu | 183 +- Engine/lib/lpng/scripts/makefile.64sunu | 183 +- .../{makefile.riscos => makefile.acorn} | 27 +- Engine/lib/lpng/scripts/makefile.aix | 76 +- Engine/lib/lpng/scripts/makefile.amiga | 8 +- Engine/lib/lpng/scripts/makefile.atari | 50 +- Engine/lib/lpng/scripts/makefile.bc32 | 20 +- Engine/lib/lpng/scripts/makefile.beos | 174 +- Engine/lib/lpng/scripts/makefile.cegcc | 116 + Engine/lib/lpng/scripts/makefile.clang | 36 +- .../{makefile.c89 => makefile.clang-asan} | 41 +- Engine/lib/lpng/scripts/makefile.darwin | 222 +- Engine/lib/lpng/scripts/makefile.dec | 175 +- Engine/lib/lpng/scripts/makefile.dj2 | 45 +- Engine/lib/lpng/scripts/makefile.freebsd | 52 +- Engine/lib/lpng/scripts/makefile.gcc | 36 +- .../{makefile.emcc => makefile.gcc-asan} | 59 +- Engine/lib/lpng/scripts/makefile.hp64 | 175 +- Engine/lib/lpng/scripts/makefile.hpgcc | 191 +- Engine/lib/lpng/scripts/makefile.hpux | 174 +- Engine/lib/lpng/scripts/makefile.ibmc | 20 +- Engine/lib/lpng/scripts/makefile.intel | 79 +- Engine/lib/lpng/scripts/makefile.linux | 218 +- Engine/lib/lpng/scripts/makefile.linux-opt | 265 + Engine/lib/lpng/scripts/makefile.mips | 76 +- Engine/lib/lpng/scripts/makefile.msys | 156 +- Engine/lib/lpng/scripts/makefile.netbsd | 38 +- Engine/lib/lpng/scripts/makefile.openbsd | 65 +- Engine/lib/lpng/scripts/makefile.sco | 176 +- Engine/lib/lpng/scripts/makefile.sggcc | 185 +- Engine/lib/lpng/scripts/makefile.sgi | 189 +- Engine/lib/lpng/scripts/makefile.so9 | 178 +- Engine/lib/lpng/scripts/makefile.solaris | 181 +- Engine/lib/lpng/scripts/makefile.std | 111 +- Engine/lib/lpng/scripts/makefile.sunos | 79 +- Engine/lib/lpng/scripts/makefile.vcwin-arm64 | 123 - Engine/lib/lpng/scripts/makefile.vcwin32 | 39 +- Engine/lib/lpng/scripts/options.awk | 21 +- Engine/lib/lpng/scripts/pnglibconf.dfa | 200 +- Engine/lib/lpng/scripts/pnglibconf.h.prebuilt | 18 +- Engine/lib/lpng/scripts/pnglibconf.mak | 26 +- Engine/lib/lpng/scripts/pngwin.rc | 6 +- Engine/lib/lpng/scripts/prefix.c | 2 + Engine/lib/lpng/scripts/smakefile.ppc | 11 +- Engine/lib/lpng/scripts/sym.c | 2 + Engine/lib/lpng/scripts/symbols.c | 2 + Engine/lib/lpng/scripts/symbols.def | 10 - .../lpng/scripts/{cmake => }/test.cmake.in | 18 +- Engine/lib/lpng/scripts/vers.c | 2 + Engine/lib/lpng/test-driver | 36 +- Engine/lib/lpng/tests/pngtest | 2 + Engine/lib/lpng/tests/pngtest-all | 110 - Engine/lib/lpng/tests/pngtest-badpngs | 13 + 299 files changed, 17711 insertions(+), 25584 deletions(-) delete mode 100644 Engine/lib/lpng/.appveyor.yml delete mode 100644 Engine/lib/lpng/.cmake-format.yaml delete mode 100644 Engine/lib/lpng/.editorconfig delete mode 100644 Engine/lib/lpng/.editorconfig-checker.json delete mode 100644 Engine/lib/lpng/.github/workflows/lint.yml delete mode 100644 Engine/lib/lpng/.github/workflows/verify-linux.yml delete mode 100644 Engine/lib/lpng/.github/workflows/verify-macos.yml delete mode 100644 Engine/lib/lpng/.github/workflows/verify-windows.yml delete mode 100644 Engine/lib/lpng/.gitignore delete mode 100644 Engine/lib/lpng/.yamllint.yml delete mode 100644 Engine/lib/lpng/ci/.shellcheckrc delete mode 100644 Engine/lib/lpng/ci/LICENSE_MIT.txt delete mode 100644 Engine/lib/lpng/ci/README.md delete mode 100644 Engine/lib/lpng/ci/ci_lint.sh delete mode 100644 Engine/lib/lpng/ci/ci_verify_cmake.sh delete mode 100644 Engine/lib/lpng/ci/ci_verify_configure.sh delete mode 100644 Engine/lib/lpng/ci/ci_verify_makefiles.sh delete mode 100644 Engine/lib/lpng/ci/ci_verify_version.sh delete mode 100644 Engine/lib/lpng/ci/lib/ci.lib.sh delete mode 100644 Engine/lib/lpng/ci/libexec/ci_shellify_autoconf.sh delete mode 100644 Engine/lib/lpng/ci/libexec/ci_shellify_c.sh delete mode 100644 Engine/lib/lpng/ci/libexec/ci_shellify_cmake.sh delete mode 100644 Engine/lib/lpng/ci/libexec/ci_shellify_shell.sh delete mode 100644 Engine/lib/lpng/ci/targets/android/ci_env.aarch64-linux-android.sh delete mode 100644 Engine/lib/lpng/ci/targets/android/ci_env.armv7a-linux-androideabi.sh delete mode 100644 Engine/lib/lpng/ci/targets/android/ci_env.i686-linux-android.sh delete mode 100644 Engine/lib/lpng/ci/targets/android/ci_env.x86_64-linux-android.sh delete mode 100644 Engine/lib/lpng/ci/targets/cygwin/ci_env.i686-pc-cygwin.sh delete mode 100644 Engine/lib/lpng/ci/targets/cygwin/ci_env.x86_64-pc-cygwin.sh delete mode 100644 Engine/lib/lpng/ci/targets/darwin/ci_env.arm64-apple-darwin.sh delete mode 100644 Engine/lib/lpng/ci/targets/darwin/ci_env.x86_64-apple-darwin.sh delete mode 100644 Engine/lib/lpng/ci/targets/freebsd/ci_env.aarch64-unknown-freebsd.sh delete mode 100644 Engine/lib/lpng/ci/targets/freebsd/ci_env.i686-unknown-freebsd.sh delete mode 100644 Engine/lib/lpng/ci/targets/freebsd/ci_env.riscv64-unknown-freebsd.sh delete mode 100644 Engine/lib/lpng/ci/targets/freebsd/ci_env.x86_64-unknown-freebsd.sh delete mode 100644 Engine/lib/lpng/ci/targets/linux/ci_env.aarch64-linux-gnu.sh delete mode 100644 Engine/lib/lpng/ci/targets/linux/ci_env.arm-linux-gnueabi.sh delete mode 100644 Engine/lib/lpng/ci/targets/linux/ci_env.arm-linux-gnueabihf.sh delete mode 100644 Engine/lib/lpng/ci/targets/linux/ci_env.i686-linux-gnu.sh delete mode 100644 Engine/lib/lpng/ci/targets/linux/ci_env.mips-linux-gnu.sh delete mode 100644 Engine/lib/lpng/ci/targets/linux/ci_env.mips64-linux-gnuabi64.sh delete mode 100644 Engine/lib/lpng/ci/targets/linux/ci_env.mips64el-linux-gnuabi64.sh delete mode 100644 Engine/lib/lpng/ci/targets/linux/ci_env.mipsel-linux-gnu.sh delete mode 100644 Engine/lib/lpng/ci/targets/linux/ci_env.mipsisa32r6-linux-gnu.sh delete mode 100644 Engine/lib/lpng/ci/targets/linux/ci_env.mipsisa32r6el-linux-gnu.sh delete mode 100644 Engine/lib/lpng/ci/targets/linux/ci_env.mipsisa64r6-linux-gnuabi64.sh delete mode 100644 Engine/lib/lpng/ci/targets/linux/ci_env.mipsisa64r6el-linux-gnuabi64.sh delete mode 100644 Engine/lib/lpng/ci/targets/linux/ci_env.powerpc-linux-gnu.sh delete mode 100644 Engine/lib/lpng/ci/targets/linux/ci_env.powerpc64-linux-gnu.sh delete mode 100644 Engine/lib/lpng/ci/targets/linux/ci_env.powerpc64le-linux-gnu.sh delete mode 100644 Engine/lib/lpng/ci/targets/linux/ci_env.riscv64-linux-gnu.sh delete mode 100644 Engine/lib/lpng/ci/targets/linux/ci_env.x86_64-linux-gnu.sh delete mode 100644 Engine/lib/lpng/ci/targets/msdos/ci_env.i386-pc-msdoswatcom.sh delete mode 100644 Engine/lib/lpng/ci/targets/msdos/ci_env.i586-pc-msdosdjgpp.sh delete mode 100644 Engine/lib/lpng/ci/targets/msdos/ci_env.i86-pc-msdoswatcom.sh delete mode 100644 Engine/lib/lpng/ci/targets/windows/ci_env.aarch64-windows-llvm.sh delete mode 100644 Engine/lib/lpng/ci/targets/windows/ci_env.i686-w64-mingw32.sh delete mode 100644 Engine/lib/lpng/ci/targets/windows/ci_env.i686-windows-llvm.sh delete mode 100644 Engine/lib/lpng/ci/targets/windows/ci_env.x86_64-w64-mingw32.sh delete mode 100644 Engine/lib/lpng/ci/targets/windows/ci_env.x86_64-windows-llvm.sh delete mode 100644 Engine/lib/lpng/contrib/.editorconfig delete mode 100644 Engine/lib/lpng/contrib/conftest/basic.dfa delete mode 100644 Engine/lib/lpng/contrib/conftest/fixed.dfa delete mode 100644 Engine/lib/lpng/contrib/conftest/float-fixed.dfa delete mode 100644 Engine/lib/lpng/contrib/conftest/nocompile-limits.dfa delete mode 100644 Engine/lib/lpng/contrib/conftest/nolimits.dfa delete mode 100644 Engine/lib/lpng/contrib/conftest/read-full.dfa delete mode 100644 Engine/lib/lpng/contrib/conftest/write-full.dfa delete mode 100644 Engine/lib/lpng/contrib/examples/.clang-format delete mode 100644 Engine/lib/lpng/contrib/mips-mmi/linux.c delete mode 100644 Engine/lib/lpng/contrib/oss-fuzz/nalloc.h delete mode 100644 Engine/lib/lpng/contrib/pngexif/.editorconfig delete mode 100644 Engine/lib/lpng/contrib/pngexif/.gitignore delete mode 100644 Engine/lib/lpng/contrib/pngexif/.pylintrc delete mode 100644 Engine/lib/lpng/contrib/pngexif/LICENSE_MIT.txt delete mode 100644 Engine/lib/lpng/contrib/pngexif/README.md delete mode 100644 Engine/lib/lpng/contrib/pngexif/bytepack.py delete mode 100644 Engine/lib/lpng/contrib/pngexif/exifinfo.py delete mode 100644 Engine/lib/lpng/contrib/pngexif/pngexifinfo delete mode 100644 Engine/lib/lpng/contrib/pngexif/pngexifinfo.bat delete mode 100644 Engine/lib/lpng/contrib/pngexif/pngexifinfo.py delete mode 100644 Engine/lib/lpng/contrib/pngminus/.editorconfig delete mode 100644 Engine/lib/lpng/contrib/pngminus/.gitignore rename Engine/lib/lpng/contrib/pngminus/{test_png2pnm.bat => png2pnm.bat} (100%) rename Engine/lib/lpng/contrib/pngminus/{test_png2pnm.sh => png2pnm.sh} (100%) rename Engine/lib/lpng/contrib/pngminus/{test_pngminus.bat => pngminus.bat} (100%) rename Engine/lib/lpng/contrib/pngminus/{test_pngminus.sh => pngminus.sh} (100%) rename Engine/lib/lpng/contrib/pngminus/{test_pnm2png.bat => pnm2png.bat} (100%) rename Engine/lib/lpng/contrib/pngminus/{test_pnm2png.sh => pnm2png.sh} (100%) delete mode 100644 Engine/lib/lpng/contrib/testpngs/badpal/regression-palette-8.png delete mode 100644 Engine/lib/lpng/contrib/testpngs/badpal/small-palette-1.png delete mode 100644 Engine/lib/lpng/contrib/testpngs/badpal/small-palette-2.png delete mode 100644 Engine/lib/lpng/contrib/testpngs/badpal/small-palette-4.png delete mode 100644 Engine/lib/lpng/contrib/testpngs/badpal/small-palette-8.png delete mode 100644 Engine/lib/lpng/contrib/testpngs/badpal/test-palette-1.png delete mode 100644 Engine/lib/lpng/contrib/testpngs/badpal/test-palette-2.png delete mode 100644 Engine/lib/lpng/contrib/testpngs/badpal/test-palette-4.png delete mode 100644 Engine/lib/lpng/contrib/testpngs/badpal/test-palette-8.png delete mode 100644 Engine/lib/lpng/contrib/testpngs/png-3/cicp-display-p3_reencoded.png create mode 100644 Engine/lib/lpng/contrib/tools/chkfmt create mode 100644 Engine/lib/lpng/contrib/tools/reindent delete mode 100644 Engine/lib/lpng/contrib/visupng/.editorconfig delete mode 100644 Engine/lib/lpng/loongarch/.editorconfig delete mode 100644 Engine/lib/lpng/loongarch/filter_lsx_intrinsics.c delete mode 100644 Engine/lib/lpng/loongarch/loongarch_lsx_init.c delete mode 100644 Engine/lib/lpng/mips/.editorconfig delete mode 100644 Engine/lib/lpng/mips/filter_mmi_inline_assembly.c create mode 100644 Engine/lib/lpng/pnglibconf.h delete mode 100644 Engine/lib/lpng/powerpc/.editorconfig delete mode 100644 Engine/lib/lpng/projects/.editorconfig delete mode 100644 Engine/lib/lpng/projects/vstudio/build.bat delete mode 100644 Engine/lib/lpng/riscv/.editorconfig delete mode 100644 Engine/lib/lpng/riscv/filter_rvv_intrinsics.c delete mode 100644 Engine/lib/lpng/riscv/riscv_init.c delete mode 100644 Engine/lib/lpng/scripts/autoconf/README.md delete mode 100644 Engine/lib/lpng/scripts/cmake/AUTHORS.md delete mode 100644 Engine/lib/lpng/scripts/cmake/PNGCheckLibconf.cmake delete mode 100644 Engine/lib/lpng/scripts/cmake/PNGConfig.cmake delete mode 100644 Engine/lib/lpng/scripts/cmake/PNGGenConfig.cmake delete mode 100644 Engine/lib/lpng/scripts/cmake/PNGTest.cmake delete mode 100644 Engine/lib/lpng/scripts/cmake/README.md rename Engine/lib/lpng/scripts/{cmake => }/genchk.cmake.in (69%) rename Engine/lib/lpng/scripts/{cmake => }/genout.cmake.in (77%) rename Engine/lib/lpng/scripts/{cmake => }/gensrc.cmake.in (77%) rename Engine/lib/lpng/scripts/{autoconf => }/libtool.m4 (94%) rename Engine/lib/lpng/scripts/{autoconf => }/ltoptions.m4 (85%) rename Engine/lib/lpng/scripts/{autoconf => }/ltsugar.m4 (98%) rename Engine/lib/lpng/scripts/{autoconf => }/ltversion.m4 (66%) rename Engine/lib/lpng/scripts/{autoconf => }/lt~obsolete.m4 (98%) rename Engine/lib/lpng/scripts/{makefile.riscos => makefile.acorn} (70%) create mode 100644 Engine/lib/lpng/scripts/makefile.cegcc rename Engine/lib/lpng/scripts/{makefile.c89 => makefile.clang-asan} (71%) rename Engine/lib/lpng/scripts/{makefile.emcc => makefile.gcc-asan} (63%) create mode 100644 Engine/lib/lpng/scripts/makefile.linux-opt delete mode 100644 Engine/lib/lpng/scripts/makefile.vcwin-arm64 rename Engine/lib/lpng/scripts/{cmake => }/test.cmake.in (59%) create mode 100644 Engine/lib/lpng/tests/pngtest delete mode 100644 Engine/lib/lpng/tests/pngtest-all create mode 100644 Engine/lib/lpng/tests/pngtest-badpngs diff --git a/Engine/lib/lpng/.appveyor.yml b/Engine/lib/lpng/.appveyor.yml deleted file mode 100644 index 2db991877..000000000 --- a/Engine/lib/lpng/.appveyor.yml +++ /dev/null @@ -1,81 +0,0 @@ -version: 1.6.x-{build} - -branches: - except: - - /master/ - - /v[0-9]+[.][0-9]+[.][0-9]+/ - -image: - - Visual Studio 2022 - -shallow_clone: true - -environment: - matrix: - - TOOLCHAIN: vstudio - AUTOMATION: cmake - ARCH: x86 - - TOOLCHAIN: vstudio - AUTOMATION: cmake - ARCH: x64 - - TOOLCHAIN: vstudio - AUTOMATION: cmake - ARCH: arm64 - - TOOLCHAIN: llvm - AUTOMATION: cmake - ARCH: x64 - - TOOLCHAIN: msys2 - AUTOMATION: cmake - ARCH: i686 - - TOOLCHAIN: msys2 - AUTOMATION: cmake - ARCH: x86_64 - - TOOLCHAIN: msys2 - AUTOMATION: configure - ARCH: i686 - - TOOLCHAIN: msys2 - AUTOMATION: configure - ARCH: x86_64 - - TOOLCHAIN: msys2 - AUTOMATION: makefiles - ARCH: i686 - - TOOLCHAIN: msys2 - AUTOMATION: makefiles - ARCH: x86_64 - -install: - - 'if "%TOOLCHAIN%"=="vstudio" C:\tools\vcpkg\vcpkg.exe install zlib:%ARCH%-windows' - - 'if "%TOOLCHAIN%"=="vstudio" C:\tools\vcpkg\vcpkg.exe integrate install' - - 'if "%TOOLCHAIN%"=="llvm" C:\tools\vcpkg\vcpkg.exe install zlib:%ARCH%-windows' - - 'if "%TOOLCHAIN%"=="llvm" C:\tools\vcpkg\vcpkg.exe integrate install' - - 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="cmake" C:\msys64\usr\bin\pacman.exe -S --noconfirm mingw-w64-%ARCH%-cmake mingw-w64-%ARCH%-ninja' - -before_build: - - 'if "%TOOLCHAIN%"=="vstudio" set CI_CMAKE_GENERATOR=Visual Studio 17 2022' - - 'if "%TOOLCHAIN%"=="vstudio" set CI_CMAKE_TOOLCHAIN_FILE=C:\tools\vcpkg\scripts\buildsystems\vcpkg.cmake' - - 'if "%TOOLCHAIN%"=="vstudio" if "%ARCH%"=="x86" set CI_CMAKE_GENERATOR_PLATFORM=Win32' - - 'if "%TOOLCHAIN%"=="vstudio" if "%ARCH%"=="x64" set CI_CMAKE_GENERATOR_PLATFORM=x64' - - 'if "%TOOLCHAIN%"=="vstudio" if "%ARCH%"=="arm64" set CI_CMAKE_GENERATOR_PLATFORM=ARM64' - - 'if "%TOOLCHAIN%"=="vstudio" if "%ARCH%"=="arm64" set CI_CMAKE_VARS=-DPNG_TESTS=0' - - 'if "%TOOLCHAIN%"=="llvm" set CI_CMAKE_GENERATOR=Ninja' - - 'if "%TOOLCHAIN%"=="llvm" set CI_CMAKE_TOOLCHAIN_FILE=C:\tools\vcpkg\scripts\buildsystems\vcpkg.cmake' - - 'if "%TOOLCHAIN%"=="llvm" set CI_CC=clang' - - 'if "%TOOLCHAIN%"=="msys2" set CI_CMAKE_GENERATOR=Ninja' - - 'if "%TOOLCHAIN%"=="msys2" set CI_CC=gcc' - - 'if "%TOOLCHAIN%"=="msys2" if "%ARCH%"=="i686" set MSYSTEM=MINGW32' - - 'if "%TOOLCHAIN%"=="msys2" if "%ARCH%"=="x86_64" set MSYSTEM=MINGW64' - - 'set CI_CMAKE_BUILD_FLAGS=-j2' - - 'set CI_CTEST_FLAGS=-j2' - - 'set CI_MAKE_FLAGS=-j2' - - 'set CI_MAKEFILES=scripts/makefile.gcc scripts/makefile.msys scripts/makefile.std' - -build_script: - - 'if "%TOOLCHAIN%"=="vstudio" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_verify_cmake.sh"' - - 'if "%TOOLCHAIN%"=="llvm" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_verify_cmake.sh"' - - 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="cmake" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_verify_cmake.sh"' - - 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="configure" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_verify_configure.sh"' - - 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="makefiles" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_verify_makefiles.sh"' - -cache: - - 'C:\tools\vcpkg\installed' - - 'C:\msys64\var\cache\pacman' diff --git a/Engine/lib/lpng/.cmake-format.yaml b/Engine/lib/lpng/.cmake-format.yaml deleted file mode 100644 index 67c53d2db..000000000 --- a/Engine/lib/lpng/.cmake-format.yaml +++ /dev/null @@ -1,94 +0,0 @@ -# https://pypi.org/project/cmakelang -# https://github.com/cheshirekow/cmake_format - -# ---------------------- -# Options for formatting -# ---------------------- - -# How wide to allow formatted cmake files -# TODO: Reflow the CMake files to allow setting the maximum line width to 100. -line_width: 255 - -# How many spaces to tab for indent -tab_size: 2 - -# If true, lines are indented using tab characters (utf-8 0x09) instead of -# space characters (utf-8 0x20). In cases where the layout would -# require a fractional tab character, the behavior of the fractional -# indentation is governed by -use_tabchars: false - -# If is True, then the value of this variable indicates how -# fractional indentions are handled during whitespace replacement. If set to -# 'use-space', fractional indentation is left as spaces (utf-8 0x20). If set -# to `round-up` fractional indentation is replaced with a single tab character -# (utf-8 0x09) effectively shifting the column to the next tabstop -fractional_tab_policy: "use-space" - -# Enable comment markup parsing and reflow -enable_markup: false - -# ------------------- -# Options for linting -# ------------------- - -# Lint codes to disable -disabled_codes: [ - # TODO: - # Reconcile the CMake variable names with the patterns below, then - # re-enable the "invalid variable name XXX" messages. - "C0103", - - # TODO: - # Add brief COMMENT arguments to the `add_custom_target` commands. - "C0113", -] - -# Regular expression pattern describing valid function names -function_pattern: "[0-9a-z_]+" - -# Regular expression pattern describing valid macro names -macro_pattern: "[0-9A-Z_]+" - -# Regular expression pattern describing valid names for variables with global -# (cache) scope -global_var_pattern: "[A-Z][0-9A-Z_]+" - -# Regular expression pattern describing valid names for variables with global -# scope (but internal semantic) -internal_var_pattern: "_[A-Z][0-9A-Z_]+" - -# Regular expression pattern describing valid names for variables with local -# scope -local_var_pattern: "[a-z][a-z0-9_]+" - -# Regular expression pattern describing valid names for privatedirectory -# variables -private_var_pattern: "_[0-9a-z_]+" - -# Regular expression pattern describing valid names for public directory -# variables -public_var_pattern: "[A-Z][0-9A-Z_]+" - -# Regular expression pattern describing valid names for function/macro -# arguments and loop variables. -argument_var_pattern: "[a-z][a-z0-9_]+" - -# Regular expression pattern describing valid names for keywords used in -# functions or macros -keyword_pattern: "[A-Z][0-9A-Z_]+" - -# In the heuristic for C0201, how many conditionals to match within a loop in -# before considering the loop a parser -max_conditionals_custom_parser: 2 - -# Require at least this many newlines between statements; -# require no more than this many newlines between statements; -# etc. -min_statement_spacing: 1 -max_statement_spacing: 2 -max_returns: 6 -max_branches: 12 -max_arguments: 5 -max_localvars: 15 -max_statements: 50 diff --git a/Engine/lib/lpng/.editorconfig b/Engine/lib/lpng/.editorconfig deleted file mode 100644 index 4181a3796..000000000 --- a/Engine/lib/lpng/.editorconfig +++ /dev/null @@ -1,55 +0,0 @@ -# https://editorconfig.org - -root = true - -[*] -charset = utf-8 -insert_final_newline = true -trim_trailing_whitespace = true - -[*.txt] -indent_size = unset -indent_style = space - -[*.[chS]] -indent_size = 3 -indent_style = space -max_doc_length = 80 -max_line_length = 80 - -[*.dfa] -indent_size = 3 -indent_style = space -max_doc_length = 80 -max_line_length = 80 - -[*.awk] -indent_size = 3 -indent_style = space -max_doc_length = 80 -max_line_length = 100 - -[*.cmake] -indent_size = 2 -indent_style = space -max_doc_length = 80 -max_line_length = 100 - -[*.sh] -indent_size = 4 -indent_style = space -max_doc_length = 100 -max_line_length = 100 - -[{Makefile.in,aclocal.m4,ltmain.sh}] -indent_size = unset -indent_style = unset -insert_final_newline = unset -max_doc_length = unset -max_line_length = unset -trim_trailing_whitespace = unset - -[COMMIT_EDITMSG] -indent_style = space -max_doc_length = unset -max_line_length = 72 diff --git a/Engine/lib/lpng/.editorconfig-checker.json b/Engine/lib/lpng/.editorconfig-checker.json deleted file mode 100644 index 70eb654b5..000000000 --- a/Engine/lib/lpng/.editorconfig-checker.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Disable": { - "Charset": true, - "IndentSize": true - }, - "Exclude": [ - ".git/", - "out/" - ] -} diff --git a/Engine/lib/lpng/.github/workflows/lint.yml b/Engine/lib/lpng/.github/workflows/lint.yml deleted file mode 100644 index 65a63b41a..000000000 --- a/Engine/lib/lpng/.github/workflows/lint.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Linting libpng - -on: - push: - branches: - - libpng16 - - libpng18 - pull_request: - branches: - - libpng16 - - libpng18 - -jobs: - lint: - runs-on: ubuntu-latest - timeout-minutes: 5 - steps: - - name: Set up the cache - uses: actions/cache@v4 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/pip.txt') }} - restore-keys: ${{ runner.os }}-pip- - - name: Install yamllint - run: pip install yamllint - - name: Install editorconfig-checker - uses: editorconfig-checker/action-editorconfig-checker@main - - name: Check out the code - uses: actions/checkout@v4 - - name: Run the linting script - run: bash ./ci/ci_lint.sh diff --git a/Engine/lib/lpng/.github/workflows/verify-linux.yml b/Engine/lib/lpng/.github/workflows/verify-linux.yml deleted file mode 100644 index a6f5a6bb6..000000000 --- a/Engine/lib/lpng/.github/workflows/verify-linux.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Verifying libpng on Linux - -on: - push: - branches: - - libpng16 - - libpng18 - pull_request: - branches: - - libpng16 - - libpng18 - -jobs: - verify-linux: - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - name: Install dependencies - run: | - sudo apt-get update -qq - sudo apt-get install -y --no-install-recommends build-essential zlib1g-dev - if [[ "${{ github.ref }}" != refs/*/libpng16 && "${{ github.base_ref }}" != libpng16 ]] - then - sudo apt-get install -y --no-install-recommends autoconf automake libtool m4 - fi - - name: Check out the code - uses: actions/checkout@v4 - - name: Run the configure verification script - run: bash ./ci/ci_verify_configure.sh - env: - CI_MAKE_FLAGS: -j2 - CI_SANITIZERS: address,undefined diff --git a/Engine/lib/lpng/.github/workflows/verify-macos.yml b/Engine/lib/lpng/.github/workflows/verify-macos.yml deleted file mode 100644 index 51850d492..000000000 --- a/Engine/lib/lpng/.github/workflows/verify-macos.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Verifying libpng on macOS - -on: - push: - branches: - - libpng16 - - libpng18 - pull_request: - branches: - - libpng16 - - libpng18 - -jobs: - verify-macos: - runs-on: macos-latest - timeout-minutes: 10 - steps: - - name: Check out the code - uses: actions/checkout@v4 - - name: Run the CMake verification script - run: bash ./ci/ci_verify_cmake.sh - env: - CI_CMAKE_GENERATOR: Xcode - CI_CMAKE_BUILD_FLAGS: -j2 - CI_CTEST_FLAGS: -j2 diff --git a/Engine/lib/lpng/.github/workflows/verify-windows.yml b/Engine/lib/lpng/.github/workflows/verify-windows.yml deleted file mode 100644 index b559c760f..000000000 --- a/Engine/lib/lpng/.github/workflows/verify-windows.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Verifying libpng on Windows - -on: - push: - branches: - - libpng16 - - libpng18 - pull_request: - branches: - - libpng16 - - libpng18 - -jobs: - verify-windows: - runs-on: windows-latest - timeout-minutes: 10 - steps: - - name: Set up vcpkg cache - uses: actions/cache@v4 - with: - path: C:/vcpkg/installed - key: ${{ runner.os }}-vcpkg-${{ hashFiles('vcpkg.json', '**/vcpkg.json') }} - restore-keys: ${{ runner.os }}-vcpkg- - - name: Install dependencies - run: | - vcpkg install zlib:x64-windows - vcpkg integrate install - - name: Check out the code - uses: actions/checkout@v4 - - name: Run the CMake verification script - run: bash ./ci/ci_verify_cmake.sh - env: - CI_CMAKE_GENERATOR: Visual Studio 17 2022 - CI_CMAKE_GENERATOR_PLATFORM: x64 - CI_CMAKE_TOOLCHAIN_FILE: C:/vcpkg/scripts/buildsystems/vcpkg.cmake - CI_CMAKE_BUILD_FLAGS: -j2 - CI_CTEST_FLAGS: -j2 diff --git a/Engine/lib/lpng/.gitignore b/Engine/lib/lpng/.gitignore deleted file mode 100644 index 1a969fd4b..000000000 --- a/Engine/lib/lpng/.gitignore +++ /dev/null @@ -1,156 +0,0 @@ -# Prerequisites -*.d - -# Precompiled headers -*.gch -*.pch - -# Object files -*.slo -*.lo -*.o -*.obj - -# Linker output files -*.exp -*.ilk -*.map - -# Compiled dynamic libraries -*.dll -*.dylib -*.so -*.so.* - -# Compiled static libraries -*.a -*.la -*.lai -*.lib - -# Compiled executables -*.app/ -*.exe -a.out - -# Debug files -*.dSYM/ -*.dmp -*.idb -*.pdb -*.su -*.sym -*.tds -core -core.[0-9]* -!core/ - -# Tag files -TAGS -.TAGS -!TAGS/ -tags -.tags -!tags/ -gtags.files -GTAGS -GRTAGS -GPATH -GSYMS -cscope.files -cscope.out -cscope.*.out - -# Text editing and text processing artifacts -\#*\# -.\#* -[._]*.sw[a-p] -[._]sw[a-p] -*.bak -*.orig -*.rej -*.tmp -*~ - -# IDE files and directories -## Eclipse -.cproject/ -.project/ -.settings/ -## Embarcadero RAD Studio -*.cbproj.* -__recovery/ -## JetBrains -.idea/ -## NetBeans -nbbuild/ -nbdist/ -nbproject/ -## Visual Studio 2015 and newer -.vs/ -## Visual Studio Code -.vscode/* -!.vscode/extensions.json -!.vscode/launch.json -!.vscode/settings.json -!.vscode/tasks.json -## Xcode 9 and newer -xcuserdata/ -## (Various) -*.*cache -*.cache* -[._]*_history -.history/ -[Bb]ackup*/ -CMakeLists.txt.user* -CMakeUserPresets.json - -# Local files created or used by coding agents -*.local -*.local.* - -# Build, test and CI output directories -[._]build*/ -/[Bb]uild/ -/[Oo]ut/ -*[Dd]ebug/ -[Dd]ebug*/ -*[Rr]elease/ -[Rr]elease*/ - -# Libpng configuration and auxiliary build artifacts -*.out -*out.png -[._]deps/ -[._]libs/ -.dirstamp -/Makefile -/autom4te.cache/ -/config*~ -/config.h -/config.log -/config.status -/install*~ -/libpng*-config -/libpng*.pc -/libpng.vers -/libtool -/stamp-h1 -pnglibconf.[ch] -pnglibconf.dfn -pnglibconf.pre -pngprefix.h - -# Libpng test programs, scripts and artifacts -/test-suite.log -/tests/*.log -/tests/*.trs -/png-fix-itxt -/pngcp -/pngfix -/pngimage -/pngstest -/pngtest -/pngunknown -/pngvalid -/timepng diff --git a/Engine/lib/lpng/.yamllint.yml b/Engine/lib/lpng/.yamllint.yml deleted file mode 100644 index 9b7af5f2c..000000000 --- a/Engine/lib/lpng/.yamllint.yml +++ /dev/null @@ -1,7 +0,0 @@ -extends: default -rules: - document-start: disable - document-end: disable - line-length: disable - truthy: - check-keys: false diff --git a/Engine/lib/lpng/ANNOUNCE b/Engine/lib/lpng/ANNOUNCE index 10dee70d8..ecf9c7043 100644 --- a/Engine/lib/lpng/ANNOUNCE +++ b/Engine/lib/lpng/ANNOUNCE @@ -1,5 +1,5 @@ -libpng 1.6.52 - December 3, 2025 -================================ +libpng 1.6.37 - April 14, 2019 +============================== This is a public release of libpng, intended for use in production code. @@ -7,12 +7,15 @@ This is a public release of libpng, intended for use in production code. Files available for download ---------------------------- -Source files: +Source files with LF line endings (for Unix/Linux): - * libpng-1.6.52.tar.xz (LZMA-compressed, recommended) - * libpng-1.6.52.tar.gz (deflate-compressed) - * lpng1652.7z (LZMA-compressed) - * lpng1652.zip (deflate-compressed) + * libpng-1.6.37.tar.xz (LZMA-compressed, recommended) + * libpng-1.6.37.tar.gz + +Source files with CRLF line endings (for Windows): + + * lp1637.7z (LZMA-compressed, recommended) + * lp1637.zip Other information: @@ -22,18 +25,20 @@ Other information: * TRADEMARK.md -Changes from version 1.6.51 to version 1.6.52 ---------------------------------------------- +Changes since the previous public release (version 1.6.36) +---------------------------------------------------------- - * Fixed CVE-2025-66293 (high severity): - Out-of-bounds read in `png_image_read_composite`. - (Reported by flyfish101 .) - * Fixed the Paeth filter handling in the RISC-V RVV implementation. - (Reported by Filip Wasil; fixed by Liang Junzhao.) - * Improved the performance of the RISC-V RVV implementation. - (Contributed by Liang Junzhao.) - * Added allocation failure fuzzing to oss-fuzz. - (Contributed by Philippe Antoine.) + * Fixed a use-after-free vulnerability (CVE-2019-7317) in png_image_free. + * Fixed a memory leak in the ARM NEON implementation of png_do_expand_palette. + * Fixed a memory leak in pngtest.c. + * Fixed two vulnerabilities (CVE-2018-14048, CVE-2018-14550) in + contrib/pngminus; refactor. + * Changed the license of contrib/pngminus to MIT; refresh makefile and docs. + (Contributed by Willem van Schaik) + * Fixed a typo in the libpng license v2. + (Contributed by Miguel Ojeda) + * Added makefiles for AddressSanitizer-enabled builds. + * Cleaned up various makefiles. Send comments/corrections/commendations to png-mng-implement at lists.sf.net. diff --git a/Engine/lib/lpng/AUTHORS b/Engine/lib/lpng/AUTHORS index 9eb273c57..79a3d1036 100644 --- a/Engine/lib/lpng/AUTHORS +++ b/Engine/lib/lpng/AUTHORS @@ -4,9 +4,7 @@ PNG REFERENCE LIBRARY AUTHORS This is the list of PNG Reference Library ("libpng") Contributing Authors, for copyright and licensing purposes. - * Adam Richter * Andreas Dilger - * Chris Blume * Cosmin Truta * Dave Martindale * Eric S. Raymond @@ -17,53 +15,31 @@ Authors, for copyright and licensing purposes. * James Yu * John Bowler * Kevin Bracey - * Lucas Chollet * Magnus Holmgren * Mandar Sahastrabuddhe - * Manfred Schlaegl * Mans Rullgard * Matt Sarett * Mike Klein - * Pascal Massimino * Paul Schmidt - * Philippe Antoine - * Qiang Zhou * Sam Bushell * Samuel Williams * Simon-Pierre Cadieux * Tim Wegner - * Tobias Stoeckmann * Tom Lane * Tom Tanner * Vadim Barkov * Willem van Schaik * Zhijie Liang - * Apple Inc. - - Zixu Wang (王子旭) * Arm Holdings - - Richard Townsend - * Google LLC - - Dan Field - - Dragoș Tiselice - - Leon Scroggins III - - Matt Sarett - - Mike Klein - - Sami Boukortt - - Wan-Teh Chang - * Loongson Technology Corporation Ltd. - - GuXiWei (顾希伟) - - JinBo (金波) - - ZhangLixia (张利霞) - * Samsung Group - - Filip Wasil - * SpacemiT Hangzhou Technology, Co. - - Liang Junzhao + - Richard Townsend + * Google Inc. + - Matt Sarett + - Mike Klein The build projects, the build scripts, the test scripts, and other -files in the "projects", "scripts" and "tests" directories, have -other copyright owners, but are released under the libpng license. +files in the "projects", "scripts" and "tests" directories, have other +copyright owners, but are released under the libpng license. -Some files in the "ci" and "contrib" directories, as well as some -of the tools-generated files that are distributed with libpng, have -other copyright owners, and are released under other open source -licenses. +Some files in the "contrib" directory, and some tools-generated files +that are distributed with libpng, have other copyright owners, and are +released under other open source licenses. diff --git a/Engine/lib/lpng/CHANGES b/Engine/lib/lpng/CHANGES index f8ad74bbd..f0b0a9342 100644 --- a/Engine/lib/lpng/CHANGES +++ b/Engine/lib/lpng/CHANGES @@ -204,7 +204,7 @@ Version 0.97 [January, 1998] Added simple sRGB support (Glenn R-P) Easier conditional compiling, e.g., define PNG_READ/WRITE_NOT_FULLY_SUPPORTED; - all configurable options can be selected from command line instead + all configurable options can be selected from command-line instead of having to edit pngconf.h (Glenn R-P) Fixed memory leak in pngwrite.c (free info_ptr->text) (Glenn R-P) Added more conditions for png_do_background, to avoid changing @@ -942,7 +942,7 @@ Version 1.0.8 [July 24, 2000] Version 1.0.9beta1 [November 10, 2000] Fixed typo in scripts/makefile.hpux Updated makevms.com in scripts and contrib/* and contrib/* (Martin Zinser) - Fixed sequence-point bug in contrib/pngminus/png2pnm (Martin Zinser) + Fixed seqence-point bug in contrib/pngminus/png2pnm (Martin Zinser) Changed "cdrom.com" in documentation to "libpng.org" Revised pnggccrd.c to get it all working, and updated makefile.gcmmx (Greg). Changed type of "params" from voidp to png_voidp in png_read|write_png(). @@ -2295,7 +2295,7 @@ Version 1.4.0beta58 [May 14, 2009] Clarified usage of sig_bit versus sig_bit_p in example.c (Vincent Torri) Version 1.4.0beta59 [May 15, 2009] - Reformatted sources in libpng style (3-space indentation, comment format) + Reformated sources in libpng style (3-space intentation, comment format) Fixed typo in libpng docs (PNG_FILTER_AVE should be PNG_FILTER_AVG) Added sections about the git repository and our coding style to the documentation @@ -2661,7 +2661,7 @@ Version 1.4.1beta06 [January 28, 2010] Version 1.4.1beta07 [February 6, 2010] Folded some long lines in the source files. - Added definable PNG_USER_CHUNK_CACHE_MAX, PNG_USER_CHUNK_MALLOC_MAX, + Added defineable PNG_USER_CHUNK_CACHE_MAX, PNG_USER_CHUNK_MALLOC_MAX, and a PNG_USER_LIMITS_SUPPORTED flag. Eliminated use of png_ptr->irowbytes and reused the slot in png_ptr as png_ptr->png_user_chunk_malloc_max. @@ -3886,7 +3886,7 @@ Version 1.6.0beta06 [January 24, 2012] Version 1.6.0beta07 [January 28, 2012] Eliminated Intel icc/icl compiler warnings. The Intel (GCC derived) compiler issues slightly different warnings from those issued by the - current versions of GCC. This eliminates those warnings by + current vesions of GCC. This eliminates those warnings by adding/removing casts and small code rewrites. Updated configure.ac from autoupdate: added --enable-werror option. Also some layout regularization and removal of introduced tab characters @@ -3919,7 +3919,7 @@ Version 1.6.0beta08 [February 1, 2012] version checking to configure.ac Improved pngstest speed by not doing redundant tests and add const to the background parameter of png_image_finish_read. The --background - option is now done automagically only when required, so that command-line + option is now done automagically only when required, so that commandline option no longer exists. Cleaned up pngpriv.h to consistently declare all functions and data. Also eliminated PNG_CONST_DATA, which is apparently not needed but we @@ -4052,7 +4052,7 @@ Version 1.6.0beta16 [March 6, 2012] (in fact this is harmless, but the PNG data produced may be sub-optimal). Version 1.6.0beta17 [March 10, 2012] - Fixed PNG_LIBPNG_BUILD_BASE_TYPE definition. + Fixed PNG_LIBPNG_BUILD_BASE_TYPE definition. Reject all iCCP chunks after the first, even if the first one is invalid. Deflate/inflate was reworked to move common zlib calls into single functions [rw]util.c. A new shared keyword check routine was also added @@ -4962,7 +4962,7 @@ Version 1.6.13beta01 [July 4, 2014] Changed "if defined(__ARM_NEON__)" to "if (defined(__ARM_NEON__) || defined(__ARM_NEON))" (James Wu). Fixed clang no-warning builds: png_digit was defined but never used. - + Version 1.6.13beta02 [July 21, 2014] Fixed an incorrect separator ("/" should be "\") in scripts/makefile.vcwin32 (bug report from Wolfgang S. Kechel). Bug was introduced in libpng-1.6.11. @@ -5453,7 +5453,7 @@ Version 1.6.21beta01 [December 11, 2015] Version 1.6.21beta02 [December 14, 2015] Moved png_check_keyword() from pngwutil.c to pngset.c Removed LE/BE dependencies in pngvalid, to 'fix' the current problem - in the BigEndian tests by not testing it, making the BE code the same + in the BigEndian tests by not testing it, making the BE code the same as the LE version. Fixes to pngvalid for various reduced build configurations (eliminate unused statics) and a fix for the case in rgb_to_gray when the digitize option @@ -5517,7 +5517,7 @@ Version 1.6.22beta03 [March 9, 2016] Added a common-law trademark notice and export control information to the LICENSE file, png.h, and the man page. Restored "& 0xff" in png_save_uint_16() and png_save_uint_32() that - were accidentally removed from libpng-1.6.17. + were accidentally removed from libpng-1.6.17. Changed PNG_INFO_cHNK and PNG_FREE_cHNK from 0xnnnn to 0xnnnnU in png.h (Robert C. Seacord). Removed dubious "#if INT_MAX" test from png.h that was added to @@ -5927,7 +5927,7 @@ Version 1.6.32beta03 [August 2, 2017] (Bug report from the OSS-fuzz project). Version 1.6.32beta04 [August 2, 2017] - Replaced local eXIf_buf with info_ptr->eXIf_buf in png_handle_eXIf(). + Replaced local eXIf_buf with info_ptr-eXIf_buf in png_handle_eXIf(). Update libpng.3 and libpng-manual.txt about eXIf functions. Version 1.6.32beta05 [August 2, 2017] @@ -5950,7 +5950,7 @@ Version 1.6.32beta09 [August 3, 2017] Require cmake-2.8.8 in CMakeLists.txt. Revised symlink creation, no longer using deprecated cmake LOCATION feature (Clifford Yapp). Fixed five-byte error in the calculation of IDAT maximum possible size. - + Version 1.6.32beta10 [August 5, 2017] Moved chunk-length check into a png_check_chunk_length() private function (Suggested by Max Stepin). @@ -6103,218 +6103,6 @@ Version 1.6.37 [April 14, 2019] Added makefiles for AddressSanitizer-enabled builds. Cleaned up various makefiles. -Version 1.6.38 [September 14, 2022] - Added configurations and scripts for continuous integration. - Fixed various errors in the handling of tRNS, hIST and eXIf. - Implemented many stability improvements across all platforms. - Updated the internal documentation. - -Version 1.6.39 [November 20, 2022] - Changed the error handler of oversized chunks (i.e. larger than - PNG_USER_CHUNK_MALLOC_MAX) from png_chunk_error to png_benign_error. - Fixed a buffer overflow error in contrib/tools/pngfix. - Fixed a memory leak (CVE-2019-6129) in contrib/tools/pngcp. - Disabled the ARM Neon optimizations by default in the CMake file, - following the default behavior of the configure script. - Allowed configure.ac to work with the trunk version of autoconf. - Removed the support for "install" targets from the legacy makefiles; - removed the obsolete makefile.cegcc. - Cleaned up the code and updated the internal documentation. - -Version 1.6.40 [June 21, 2023] - Fixed the eXIf chunk multiplicity checks. - Fixed a memory leak in pCAL processing. - Corrected the validity report about tRNS inside png_get_valid(). - Fixed various build issues on *BSD, Mac and Windows. - Updated the configurations and the scripts for continuous integration. - Cleaned up the code, the build scripts, and the documentation. - -Version 1.6.41 [January 24, 2024] - Added SIMD-optimized code for the LoongArch LSX hardware. - (Contributed by GuXiWei, JinBo and ZhangLixia) - Fixed the run-time discovery of MIPS MSA hardware. - (Contributed by Sui Jingfeng) - Fixed an off-by-one error in the function png_do_check_palette_indexes(), - which failed to recognize errors that might have existed in the first - column of a broken palette-encoded image. This was a benign regression - accidentally introduced in libpng-1.6.33. No pixel was harmed. - (Contributed by Adam Richter; reviewed by John Bowler) - Fixed, improved and modernized the contrib/pngminus programs, i.e., - png2pnm.c and pnm2png.c - Removed old and peculiar portability hacks that were meant to silence - warnings issued by gcc version 7.1 alone. - (Contributed by John Bowler) - Fixed and modernized the CMake file, and raised the minimum required - CMake version from 3.1 to 3.6. - (Contributed by Clinton Ingram, Timothy Lyanguzov, Tyler Kropp, et al.) - Allowed the configure script to disable the building of auxiliary tools - and tests, thus catching up with the CMake file. - (Contributed by Carlo Bramini) - Fixed a build issue on Mac. - (Contributed by Zixu Wang) - Moved the Autoconf macro files to scripts/autoconf. - Moved the CMake files (except for the main CMakeLists.txt) to - scripts/cmake and moved the list of their contributing authors to - scripts/cmake/AUTHORS.md - Updated the CI configurations and scripts. - Relicensed the CI scripts to the MIT License. - Improved the test coverage. - (Contributed by John Bowler) - -Version 1.6.42 [January 29, 2024] - Fixed the implementation of the macro function png_check_sig(). - This was an API regression, introduced in libpng-1.6.41. - (Reported by Matthieu Darbois) - Fixed and updated the libpng manual. - -Version 1.6.43 [February 23, 2024] - Fixed the row width check in png_check_IHDR(). - This corrected a bug that was specific to the 16-bit platforms, - and removed a spurious compiler warning from the 64-bit builds. - (Reported by Jacek Caban; fixed by John Bowler) - Added eXIf chunk support to the push-mode reader in pngpread.c. - (Contributed by Chris Blume) - Added contrib/pngexif for the benefit of the users who would like - to inspect the content of eXIf chunks. - Added contrib/conftest/basic.dfa, a basic build-time configuration. - (Contributed by John Bowler) - Fixed a preprocessor condition in pngread.c that broke build-time - configurations like contrib/conftest/pngcp.dfa. - (Contributed by John Bowler) - Added CMake build support for LoongArch LSX. - (Contributed by GuXiWei) - Fixed a CMake build error that occurred under a peculiar state of the - dependency tree. This was a regression introduced in libpng-1.6.41. - (Contributed by Dan Rosser) - Marked the installed libpng headers as system headers in CMake. - (Contributed by Benjamin Buch) - Updated the build support for RISCOS. - (Contributed by Cameron Cawley) - Updated the makefiles to allow cross-platform builds to initialize - conventional make variables like AR and ARFLAGS. - Added various improvements to the CI scripts in areas like version - consistency verification and text linting. - Added version consistency verification to pngtest.c also. - -Version 1.6.44 [September 12, 2024] - Hardened calculations in chroma handling to prevent overflows, and - relaxed a constraint in cHRM validation to accomodate the standard - ACES AP1 set of color primaries. - (Contributed by John Bowler) - Removed the ASM implementation of ARM Neon optimizations and updated - the build accordingly. Only the remaining C implementation shall be - used from now on, thus ensuring the support of the PAC/BTI security - features on ARM64. - (Contributed by Ross Burton and John Bowler) - Fixed the pickup of the PNG_HARDWARE_OPTIMIZATIONS option in the - CMake build on FreeBSD/amd64. This is an important performance fix - on this platform. - Applied various fixes and improvements to the CMake build. - (Contributed by Eric Riff, Benjamin Buch and Erik Scholz) - Added fuzzing targets for the simplified read API. - (Contributed by Mikhail Khachayants) - Fixed a build error involving pngtest.c under a custom config. - This was a regression introduced in a code cleanup in libpng-1.6.43. - (Contributed by Ben Wagner) - Fixed and improved the config files for AppVeyor CI and Travis CI. - -Version 1.6.45 [January 7, 2025] - Added support for the cICP chunk. - (Contributed by Lucas Chollet and John Bowler) - Adjusted and improved various checks in colorspace calculations. - (Contributed by John Bowler) - Rearranged the write order of colorspace chunks for better conformance - with the PNG v3 draft specification. - (Contributed by John Bowler) - Raised the minimum required CMake version from 3.6 to 3.14. - Forked off a development branch for libpng version 1.8. - -Version 1.6.46 [January 23, 2025] - Added support for the mDCV and cLLI chunks. - (Contributed by John Bowler) - Fixed a build issue affecting C89 compilers. - This was a regression introduced in libpng-1.6.45. - (Contributed by John Bowler) - Added makefile.c89, specifically for testing C89 compilers. - Cleaned up contrib/pngminus: corrected an old typo, removed an old - workaround, and updated the CMake file. - -Version 1.6.47 [February 18, 2025] - Modified the behaviour of colorspace chunks in order to adhere - to the new precedence rules formulated in the latest draft of - the PNG Specification. - (Contributed by John Bowler) - Fixed a latent bug in `png_write_iCCP`. - This would have been a read-beyond-end-of-malloc vulnerability, - introduced early in the libpng-1.6.0 development, yet (fortunately!) - it was inaccessible before the above-mentioned modification of the - colorspace precedence rules, due to pre-existing colorspace checks. - (Reported by Bob Friesenhahn; fixed by John Bowler) - -Version 1.6.48 [April 30, 2025] - Fixed the floating-point version of the mDCv setter `png_set_mDCv`. - (Reported by Mohit Bakshi; fixed by John Bowler) - Added #error directives to discourage the inclusion of private - libpng implementation header files in PNG-supporting applications. - Added the CMake build option `PNG_LIBCONF_HEADER`, to be used as an - alternative to `DFA_XTRA`. - Removed the Travis CI configuration files, with heartfelt thanks for - their generous support of our project over the past five years! - -Version 1.6.49 [June 12, 2025] - Added SIMD-optimized code for the RISC-V Vector Extension (RVV). - (Contributed by Manfred Schlaegl, Dragos Tiselice and Filip Wasil) - Added various fixes and improvements to the build scripts and to - the sample code. - -Version 1.6.50 [July 1, 2025] - Improved the detection of the RVV Extension on the RISC-V platform. - (Contributed by Filip Wasil) - Replaced inline ASM with C intrinsics in the RVV code. - (Contributed by Filip Wasil) - Fixed a decoder defect in which unknown chunks trailing IDAT, set - to go through the unknown chunk handler, incorrectly triggered - out-of-place IEND errors. - (Contributed by John Bowler) - Fixed the CMake file for cross-platform builds that require `libm`. - -Version 1.6.51 [November 21, 2025] - Fixed CVE-2025-64505 (moderate severity): - Heap buffer overflow in `png_do_quantize` via malformed palette index. - (Reported by Samsung; analyzed by Fabio Gritti.) - Fixed CVE-2025-64506 (moderate severity): - Heap buffer over-read in `png_write_image_8bit` with 8-bit input and - `convert_to_8bit` enabled. - (Reported by Samsung and ; - analyzed by Fabio Gritti.) - Fixed CVE-2025-64720 (high severity): - Buffer overflow in `png_image_read_composite` via incorrect palette - premultiplication. - (Reported by Samsung; analyzed by John Bowler.) - Fixed CVE-2025-65018 (high severity): - Heap buffer overflow in `png_combine_row` triggered via - `png_image_finish_read`. - (Reported by .) - Fixed a memory leak in `png_set_quantize`. - (Reported by Samsung; analyzed by Fabio Gritti.) - Removed the experimental and incomplete ERROR_NUMBERS code. - (Contributed by Tobias Stoeckmann.) - Improved the RISC-V vector extension support; required RVV 1.0 or newer. - (Contributed by Filip Wasil.) - Added GitHub Actions workflows for automated testing. - Performed various refactorings and cleanups. - -Version 1.6.52 [December 3, 2025] - Fixed CVE-2025-66293 (high severity): - Out-of-bounds read in `png_image_read_composite`. - (Reported by flyfish101 .) - Fixed the Paeth filter handling in the RISC-V RVV implementation. - (Reported by Filip Wasil; fixed by Liang Junzhao.) - Improved the performance of the RISC-V RVV implementation. - (Contributed by Liang Junzhao.) - Added allocation failure fuzzing to oss-fuzz. - (Contributed by Philippe Antoine.) - Send comments/corrections/commendations to png-mng-implement at lists.sf.net. Subscription is required; visit https://lists.sourceforge.net/lists/listinfo/png-mng-implement diff --git a/Engine/lib/lpng/CMakeLists.txt b/Engine/lib/lpng/CMakeLists.txt index 9959c8589..325c36d31 100644 --- a/Engine/lib/lpng/CMakeLists.txt +++ b/Engine/lib/lpng/CMakeLists.txt @@ -1,497 +1,369 @@ -# CMakeLists.txt - CMake lists for libpng -# -# Copyright (c) 2018-2025 Cosmin Truta -# Copyright (c) 2007-2018 Glenn Randers-Pehrson -# Originally written by Christian Ehrlicher, 2007 -# -# Use, modification and distribution are subject to -# the same licensing terms and conditions as libpng. -# Please see the copyright notice in png.h or visit -# http://libpng.org/pub/png/src/libpng-LICENSE.txt -# -# For copyright and licensing purposes, please see -# the accompanying file scripts/cmake/AUTHORS.md -# -# SPDX-License-Identifier: libpng-2.0 +# CMakeLists.txt -cmake_minimum_required(VERSION 3.14...4.2) +# Copyright (C) 2018 Cosmin Truta +# Copyright (C) 2007,2009-2018 Glenn Randers-Pehrson +# Written by Christian Ehrlicher, 2007 +# Revised by Roger Lowman, 2009-2010 +# Revised by Clifford Yapp, 2011-2012,2017 +# Revised by Roger Leigh, 2016 +# Revised by Andreas Franek, 2016 +# Revised by Sam Serrels, 2017 +# Revised by Vadim Barkov, 2017 +# Revised by Vicky Pfau, 2018 +# Revised by Cameron Cawley, 2018 +# Revised by Cosmin Truta, 2018 +# Revised by Kyle Bentley, 2018 + +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +cmake_minimum_required(VERSION 3.5) +cmake_policy(VERSION 3.5) + +project(libpng C ASM) +enable_testing() set(PNGLIB_MAJOR 1) set(PNGLIB_MINOR 6) -set(PNGLIB_REVISION 52) -set(PNGLIB_SUBREVISION 0) -#set(PNGLIB_SUBREVISION "git") -set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_REVISION}) -set(PNGLIB_ABI_VERSION ${PNGLIB_MAJOR}${PNGLIB_MINOR}) -set(PNGLIB_SHARED_VERSION ${PNGLIB_ABI_VERSION}.${PNGLIB_REVISION}.${PNGLIB_SUBREVISION}) +set(PNGLIB_RELEASE 37) +set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR}) +set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE}) -project(libpng - VERSION ${PNGLIB_VERSION} - LANGUAGES C ASM) - -include(CheckCSourceCompiles) -include(CheckLibraryExists) include(GNUInstallDirs) -# Allow the users to specify an application-specific API prefix for libpng -# vendoring purposes. A standard libpng build should have no such prefix. -set(PNG_PREFIX - "" - CACHE STRING "Prefix to prepend to the API function names") +# needed packages -# Allow the users to override the postfix appended to debug library file names. -# Previously, we used to set CMAKE_DEBUG_POSTFIX globally. That variable should -# not be cached, however, because doing so would affect all projects processed -# after libpng, in unexpected and undesirable ways. -set(PNG_DEBUG_POSTFIX - "d" - CACHE STRING "Postfix to append to library file names under the Debug configuration") +# Allow users to specify location of Zlib. +# Useful if zlib is being built alongside this as a sub-project. +option(PNG_BUILD_ZLIB "Custom zlib Location, else find_package is used" OFF) -# Allow the users to import their own extra configuration settings. -# Those settings can be either passed via DFA_XTRA if they are in DFA form -# (such as "pngusr.dfa"), or via PNG_LIBCONF_HEADER if they are in prebuilt -# header file form (such as "scripts/pnglibconf.h.prebuilt"), but not both. -# For platforms such as Android or iOS, or in certain cross-platform build -# scenarios, having a valid PNG_LIBCONF_HEADER is mandatory. -set(DFA_XTRA - "" - CACHE FILEPATH "DFA file containing customized build configuration settings for libpng") -set(PNG_LIBCONF_HEADER - "" - CACHE FILEPATH "C header file containing customized build configuration settings for libpng") -set(PNG_LIBCONF_HEADER_PREBUILT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.h.prebuilt") -if(ANDROID OR IOS) - set(PNG_LIBCONF_HEADER "${PNG_LIBCONF_HEADER_PREBUILT}") -endif() -if((NOT DFA_XTRA STREQUAL "") AND (NOT PNG_LIBCONF_HEADER STREQUAL "")) - message(SEND_ERROR "The options DFA_XTRA=\"${DFA_XTRA}\" " - "and PNG_LIBCONF_HEADER=\"${PNG_LIBCONF_HEADER}\" " - "are mutually exclusive") +if(NOT PNG_BUILD_ZLIB) + find_package(ZLIB REQUIRED) + include_directories(${ZLIB_ROOT}) + include_directories(${ZLIB_INCLUDE_DIRS}) endif() -# Allow the users to switch on/off various library build types. -option(PNG_SHARED "Build libpng as a shared library" ON) -option(PNG_STATIC "Build libpng as a static library" ON) -if(APPLE) - option(PNG_FRAMEWORK "Build libpng as a framework bundle" ON) +if(UNIX AND NOT APPLE AND NOT BEOS AND NOT HAIKU) + find_library(M_LIBRARY m) else() - option(PNG_FRAMEWORK "Build libpng as a framework bundle (not available on this platform)" OFF) -endif() -if(NOT APPLE AND PNG_FRAMEWORK) - message(SEND_ERROR "The option PNG_FRAMEWORK should not be set on this platform") + # libm is not needed and/or not available + set(M_LIBRARY "") endif() -# Allow the users to switch on/off the auxiliary build and test artifacts. -# These artifacts are NOT part of libpng proper, and are subject to change -# at any time. -option(PNG_TESTS "Build the libpng tests" ON) +# COMMAND LINE OPTIONS +option(PNG_SHARED "Build shared lib" ON) +option(PNG_STATIC "Build static lib" ON) +option(PNG_TESTS "Build libpng tests" ON) -# Same as above, but for the third-party tools. -# Although these tools are targetted at development environments only, -# the users are allowed to override the option to build by default. -if(ANDROID OR IOS) - option(PNG_TOOLS "Build the libpng tools" OFF) -else() - option(PNG_TOOLS "Build the libpng tools" ON) -endif() - -# Maintain backwards compatibility with the deprecated option PNG_EXECUTABLES. -option(PNG_EXECUTABLES "[Deprecated; please use PNG_TOOLS]" ON) -if(NOT PNG_EXECUTABLES) - message(DEPRECATION "The option PNG_EXECUTABLES has been deprecated in favour of PNG_TOOLS") - if(PNG_TOOLS) - message(AUTHOR_WARNING "Setting PNG_TOOLS to ${PNG_EXECUTABLES}, " - "to stay compatible with PNG_EXECUTABLES") - set(PNG_TOOLS "${PNG_EXECUTABLES}") - endif() -endif() - -# Allow the users to switch on/off the use of hardware (SIMD) optimized code. +# Many more configuration options could be added here +option(PNG_FRAMEWORK "Build OS X framework" OFF) +option(PNG_DEBUG "Build with debug output" OFF) option(PNG_HARDWARE_OPTIMIZATIONS "Enable hardware optimizations" ON) -# Initialize and show the target architecture variable PNG_TARGET_ARCHITECTURE. -# -# NOTE: -# On macOS, CMake sets CMAKE_SYSTEM_PROCESSOR to either "x86_64" or "arm64", -# based upon the OS architecture, not the target architecture. As such, we need -# to check CMAKE_OSX_ARCHITECTURES to identify which hardware-specific flags to -# enable. Note that this will fail if you attempt to build a universal binary -# in a single CMake invocation. -if(APPLE AND CMAKE_OSX_ARCHITECTURES) - string(TOLOWER "${CMAKE_OSX_ARCHITECTURES}" PNG_TARGET_ARCHITECTURE) -else() - string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" PNG_TARGET_ARCHITECTURE) -endif() -message(STATUS "Building for target architecture: ${PNG_TARGET_ARCHITECTURE}") - -# Allow the users to specify a custom location of zlib. -# With CMake 3.12 and newer, this option is no longer necessary. -option(PNG_BUILD_ZLIB "[Deprecated; please use ZLIB_ROOT]" OFF) -if(PNG_BUILD_ZLIB) - if("x${ZLIB_ROOT}" STREQUAL "x") - message(SEND_ERROR "The option PNG_BUILD_ZLIB=${PNG_BUILD_ZLIB} is no longer supported; " - "please use ZLIB_ROOT instead") - else() - message(SEND_ERROR "The option PNG_BUILD_ZLIB=${PNG_BUILD_ZLIB} is no longer supported; " - "using ZLIB_ROOT=\"${ZLIB_ROOT}\"") - endif() -endif() - -# Find the zlib library. -find_package(ZLIB REQUIRED) -set(PNG_LINK_LIBRARIES ZLIB::ZLIB) - -# Find the math library (unless we already know it's not available or -# not needed). -if(UNIX AND NOT (APPLE OR BEOS OR HAIKU OR EMSCRIPTEN)) - check_library_exists(m pow "" PNG_HAVE_LIBM_POW) -endif() -if(PNG_HAVE_LIBM_POW) - list(APPEND PNG_LINK_LIBRARIES m) -endif() - -# Silence function deprecation warnings on the Windows compilers that might -# use the MSVC Runtime library headers. -if(WIN32 AND (CMAKE_C_COMPILER_ID MATCHES "MSVC|Intel|Clang")) - add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) - add_definitions(-D_CRT_SECURE_NO_DEPRECATE) -endif() +set(PNG_PREFIX "" CACHE STRING "Prefix to add to the API function names") +set(DFA_XTRA "" CACHE FILEPATH "File containing extra configuration settings") if(PNG_HARDWARE_OPTIMIZATIONS) - # Set definitions and sources for ARM. - if(PNG_TARGET_ARCHITECTURE MATCHES "^(arm|aarch)") - if(PNG_TARGET_ARCHITECTURE MATCHES "^(arm64|aarch64)") - set(PNG_ARM_NEON_POSSIBLE_VALUES on off) - set(PNG_ARM_NEON - "on" - CACHE STRING "Enable ARM NEON optimizations: on|off; on is default") - else() - set(PNG_ARM_NEON_POSSIBLE_VALUES check on off) - set(PNG_ARM_NEON - "off" - CACHE STRING "Enable ARM NEON optimizations: check|on|off; off is default") - endif() - set_property(CACHE PNG_ARM_NEON - PROPERTY STRINGS ${PNG_ARM_NEON_POSSIBLE_VALUES}) - list(FIND PNG_ARM_NEON_POSSIBLE_VALUES ${PNG_ARM_NEON} index) - if(index EQUAL -1) - message(FATAL_ERROR "PNG_ARM_NEON must be one of [${PNG_ARM_NEON_POSSIBLE_VALUES}]") - elseif(NOT PNG_ARM_NEON STREQUAL "off") - set(libpng_arm_sources - arm/arm_init.c - arm/filter_neon_intrinsics.c - arm/palette_neon_intrinsics.c) - if(PNG_ARM_NEON STREQUAL "on") - add_definitions(-DPNG_ARM_NEON_OPT=2) - elseif(PNG_ARM_NEON STREQUAL "check") - add_definitions(-DPNG_ARM_NEON_CHECK_SUPPORTED) - endif() - else() - add_definitions(-DPNG_ARM_NEON_OPT=0) +# set definitions and sources for arm +if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" OR + CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64") + set(PNG_ARM_NEON_POSSIBLE_VALUES check on off) + set(PNG_ARM_NEON "check" CACHE STRING "Enable ARM NEON optimizations: + check: (default) use internal checking code; + off: disable the optimizations; + on: turn on unconditionally.") + set_property(CACHE PNG_ARM_NEON PROPERTY STRINGS + ${PNG_ARM_NEON_POSSIBLE_VALUES}) + list(FIND PNG_ARM_NEON_POSSIBLE_VALUES ${PNG_ARM_NEON} index) + if(index EQUAL -1) + message(FATAL_ERROR + "PNG_ARM_NEON must be one of [${PNG_ARM_NEON_POSSIBLE_VALUES}]") + elseif(NOT ${PNG_ARM_NEON} STREQUAL "off") + set(libpng_arm_sources + arm/arm_init.c + arm/filter_neon.S + arm/filter_neon_intrinsics.c + arm/palette_neon_intrinsics.c) + + if(${PNG_ARM_NEON} STREQUAL "on") + add_definitions(-DPNG_ARM_NEON_OPT=2) + elseif(${PNG_ARM_NEON} STREQUAL "check") + add_definitions(-DPNG_ARM_NEON_CHECK_SUPPORTED) endif() + else() + add_definitions(-DPNG_ARM_NEON_OPT=0) endif() +endif() - # Set definitions and sources for PowerPC. - if(PNG_TARGET_ARCHITECTURE MATCHES "^(powerpc|ppc64)") - set(PNG_POWERPC_VSX_POSSIBLE_VALUES on off) - set(PNG_POWERPC_VSX - "on" - CACHE STRING "Enable POWERPC VSX optimizations: on|off; on is default") - set_property(CACHE PNG_POWERPC_VSX - PROPERTY STRINGS ${PNG_POWERPC_VSX_POSSIBLE_VALUES}) - list(FIND PNG_POWERPC_VSX_POSSIBLE_VALUES ${PNG_POWERPC_VSX} index) - if(index EQUAL -1) - message(FATAL_ERROR "PNG_POWERPC_VSX must be one of [${PNG_POWERPC_VSX_POSSIBLE_VALUES}]") - elseif(NOT PNG_POWERPC_VSX STREQUAL "off") - set(libpng_powerpc_sources - powerpc/powerpc_init.c - powerpc/filter_vsx_intrinsics.c) - if(PNG_POWERPC_VSX STREQUAL "on") - add_definitions(-DPNG_POWERPC_VSX_OPT=2) - endif() - else() - add_definitions(-DPNG_POWERPC_VSX_OPT=0) +# set definitions and sources for powerpc +if(CMAKE_SYSTEM_PROCESSOR MATCHES "^powerpc*" OR + CMAKE_SYSTEM_PROCESSOR MATCHES "^ppc64*") + set(PNG_POWERPC_VSX_POSSIBLE_VALUES on off) + set(PNG_POWERPC_VSX "on" CACHE STRING "Enable POWERPC VSX optimizations: + off: disable the optimizations.") + set_property(CACHE PNG_POWERPC_VSX PROPERTY STRINGS + ${PNG_POWERPC_VSX_POSSIBLE_VALUES}) + list(FIND PNG_POWERPC_VSX_POSSIBLE_VALUES ${PNG_POWERPC_VSX} index) + if(index EQUAL -1) + message(FATAL_ERROR + "PNG_POWERPC_VSX must be one of [${PNG_POWERPC_VSX_POSSIBLE_VALUES}]") + elseif(NOT ${PNG_POWERPC_VSX} STREQUAL "off") + set(libpng_powerpc_sources + powerpc/powerpc_init.c + powerpc/filter_vsx_intrinsics.c) + if(${PNG_POWERPC_VSX} STREQUAL "on") + add_definitions(-DPNG_POWERPC_VSX_OPT=2) endif() + else() + add_definitions(-DPNG_POWERPC_VSX_OPT=0) endif() +endif() - # Set definitions and sources for Intel. - if(PNG_TARGET_ARCHITECTURE MATCHES "^(i[3-6]86|x86|amd64)") - set(PNG_INTEL_SSE_POSSIBLE_VALUES on off) - set(PNG_INTEL_SSE - "on" - CACHE STRING "Enable INTEL_SSE optimizations: on|off; on is default") - set_property(CACHE PNG_INTEL_SSE - PROPERTY STRINGS ${PNG_INTEL_SSE_POSSIBLE_VALUES}) - list(FIND PNG_INTEL_SSE_POSSIBLE_VALUES ${PNG_INTEL_SSE} index) - if(index EQUAL -1) - message(FATAL_ERROR "PNG_INTEL_SSE must be one of [${PNG_INTEL_SSE_POSSIBLE_VALUES}]") - elseif(NOT PNG_INTEL_SSE STREQUAL "off") - set(libpng_intel_sources - intel/intel_init.c - intel/filter_sse2_intrinsics.c) - if(PNG_INTEL_SSE STREQUAL "on") - add_definitions(-DPNG_INTEL_SSE_OPT=1) - endif() - else() - add_definitions(-DPNG_INTEL_SSE_OPT=0) +# set definitions and sources for intel +if(CMAKE_SYSTEM_PROCESSOR MATCHES "^i?86" OR + CMAKE_SYSTEM_PROCESSOR MATCHES "^x86_64*") + set(PNG_INTEL_SSE_POSSIBLE_VALUES on off) + set(PNG_INTEL_SSE "on" CACHE STRING "Enable INTEL_SSE optimizations: + off: disable the optimizations") + set_property(CACHE PNG_INTEL_SSE PROPERTY STRINGS + ${PNG_INTEL_SSE_POSSIBLE_VALUES}) + list(FIND PNG_INTEL_SSE_POSSIBLE_VALUES ${PNG_INTEL_SSE} index) + if(index EQUAL -1) + message(FATAL_ERROR + "PNG_INTEL_SSE must be one of [${PNG_INTEL_SSE_POSSIBLE_VALUES}]") + elseif(NOT ${PNG_INTEL_SSE} STREQUAL "off") + set(libpng_intel_sources + intel/intel_init.c + intel/filter_sse2_intrinsics.c) + if(${PNG_INTEL_SSE} STREQUAL "on") + add_definitions(-DPNG_INTEL_SSE_OPT=1) endif() + else() + add_definitions(-DPNG_INTEL_SSE_OPT=0) endif() +endif() - # Set definitions and sources for MIPS. - if(PNG_TARGET_ARCHITECTURE MATCHES "^(mipsel|mips64el)") - set(PNG_MIPS_MSA_POSSIBLE_VALUES on off) - set(PNG_MIPS_MSA - "on" - CACHE STRING "Enable MIPS_MSA optimizations: on|off; on is default") - set_property(CACHE PNG_MIPS_MSA - PROPERTY STRINGS ${PNG_MIPS_MSA_POSSIBLE_VALUES}) - list(FIND PNG_MIPS_MSA_POSSIBLE_VALUES ${PNG_MIPS_MSA} index_msa) - if(index_msa EQUAL -1) - message(FATAL_ERROR "PNG_MIPS_MSA must be one of [${PNG_MIPS_MSA_POSSIBLE_VALUES}]") - endif() - - set(PNG_MIPS_MMI_POSSIBLE_VALUES on off) - set(PNG_MIPS_MMI - "on" - CACHE STRING "Enable MIPS_MMI optimizations: on|off; on is default") - set_property(CACHE PNG_MIPS_MMI - PROPERTY STRINGS ${PNG_MIPS_MMI_POSSIBLE_VALUES}) - list(FIND PNG_MIPS_MMI_POSSIBLE_VALUES ${PNG_MIPS_MMI} index_mmi) - if(index_mmi EQUAL -1) - message(FATAL_ERROR "PNG_MIPS_MMI must be one of [${PNG_MIPS_MMI_POSSIBLE_VALUES}]") - endif() - - if(PNG_MIPS_MSA STREQUAL "on" AND PNG_MIPS_MMI STREQUAL "on") - set(libpng_mips_sources - mips/mips_init.c - mips/filter_msa_intrinsics.c - mips/filter_mmi_inline_assembly.c) +# set definitions and sources for MIPS +if(CMAKE_SYSTEM_PROCESSOR MATCHES "mipsel*" OR + CMAKE_SYSTEM_PROCESSOR MATCHES "mips64el*") + set(PNG_MIPS_MSA_POSSIBLE_VALUES on off) + set(PNG_MIPS_MSA "on" CACHE STRING "Enable MIPS_MSA optimizations: + off: disable the optimizations") + set_property(CACHE PNG_MIPS_MSA PROPERTY STRINGS + ${PNG_MIPS_MSA_POSSIBLE_VALUES}) + list(FIND PNG_MIPS_MSA_POSSIBLE_VALUES ${PNG_MIPS_MSA} index) + if(index EQUAL -1) + message(FATAL_ERROR + "PNG_MIPS_MSA must be one of [${PNG_MIPS_MSA_POSSIBLE_VALUES}]") + elseif(NOT ${PNG_MIPS_MSA} STREQUAL "off") + set(libpng_mips_sources + mips/mips_init.c + mips/filter_msa_intrinsics.c) + if(${PNG_MIPS_MSA} STREQUAL "on") add_definitions(-DPNG_MIPS_MSA_OPT=2) - add_definitions(-DPNG_MIPS_MMI_OPT=1) - elseif(PNG_MIPS_MSA STREQUAL "on") - set(libpng_mips_sources - mips/mips_init.c - mips/filter_msa_intrinsics.c) - add_definitions(-DPNG_MIPS_MSA_OPT=2) - add_definitions(-DPNG_MIPS_MMI_OPT=0) - elseif(PNG_MIPS_MMI STREQUAL "on") - set(libpng_mips_sources - mips/mips_init.c - mips/filter_mmi_inline_assembly.c) - add_definitions(-DPNG_MIPS_MSA_OPT=0) - add_definitions(-DPNG_MIPS_MMI_OPT=1) - else() - add_definitions(-DPNG_MIPS_MSA_OPT=0) - add_definitions(-DPNG_MIPS_MMI_OPT=0) - endif() - endif() - - # Set definitions and sources for LoongArch. - if(PNG_TARGET_ARCHITECTURE MATCHES "^(loongarch)") - include(CheckCCompilerFlag) - set(PNG_LOONGARCH_LSX_POSSIBLE_VALUES on off) - set(PNG_LOONGARCH_LSX - "on" - CACHE STRING "Enable LOONGARCH_LSX optimizations: on|off; on is default") - set_property(CACHE PNG_LOONGARCH_LSX - PROPERTY STRINGS ${PNG_LOONGARCH_LSX_POSSIBLE_VALUES}) - list(FIND PNG_LOONGARCH_LSX_POSSIBLE_VALUES ${PNG_LOONGARCH_LSX} index) - if(index EQUAL -1) - message(FATAL_ERROR "PNG_LOONGARCH_LSX must be one of [${PNG_LOONGARCH_LSX_POSSIBLE_VALUES}]") - elseif(NOT PNG_LOONGARCH_LSX STREQUAL "off") - check_c_compiler_flag("-mlsx" COMPILER_SUPPORTS_LSX) - if(COMPILER_SUPPORTS_LSX) - set(libpng_loongarch_sources - loongarch/loongarch_lsx_init.c - loongarch/filter_lsx_intrinsics.c) - set_source_files_properties(${libpng_loongarch_sources} - PROPERTIES COMPILE_FLAGS "-mlsx") - add_definitions(-DPNG_LOONGARCH_LSX_OPT=1) - else() - message(FATAL_ERROR "This compiler does not support the -mlsx option") - endif() - else() - add_definitions(-DPNG_LOONGARCH_LSX_OPT=0) - endif() - endif() - - # Set definitions and sources for RISC-V. - if(PNG_TARGET_ARCHITECTURE MATCHES "^(riscv)") - include(CheckCCompilerFlag) - set(PNG_RISCV_RVV_POSSIBLE_VALUES on off) - set(PNG_RISCV_RVV "off" - CACHE STRING "Enable RISC-V Vector optimizations: on|off; off is default") - set_property(CACHE PNG_RISCV_RVV - PROPERTY STRINGS ${PNG_RISCV_RVV_POSSIBLE_VALUES}) - list(FIND PNG_RISCV_RVV_POSSIBLE_VALUES ${PNG_RISCV_RVV} index) - if(index EQUAL -1) - message(FATAL_ERROR "PNG_RISCV_RVV must be one of [${PNG_RISCV_RVV_POSSIBLE_VALUES}]") - elseif(NOT PNG_RISCV_RVV STREQUAL "off") - - check_c_source_compiles(" - #include - int main() { - const float src[] = { 0.0f, 0.0f, 0.0f, 0.0f }; - uint64_t ptr[2] = {0x0908060504020100, 0xFFFFFFFF0E0D0C0A}; - vuint8m1_t a = __riscv_vreinterpret_v_u64m1_u8m1(__riscv_vle64_v_u64m1(ptr, 2)); - vfloat32m1_t val = __riscv_vle32_v_f32m1((const float*)(src), 4); - return (int)__riscv_vfmv_f_s_f32m1_f32(val); - }" COMPILER_SUPPORTS_RVV) - - if(NOT COMPILER_SUPPORTS_RVV) - message(FATAL_ERROR "Compiler does not support RISC-V Vector extension or its unable to detect it") - endif() - set(libpng_riscv_sources - riscv/filter_rvv_intrinsics.c - riscv/riscv_init.c) - if(PNG_RISCV_RVV STREQUAL "on") - add_definitions(-DPNG_RISCV_RVV_OPT=2) - else() - add_definitions(-DPNG_RISCV_RVV_OPT=0) - endif() - else() - add_definitions(-DPNG_RISCV_RVV_OPT=0) endif() + else() + add_definitions(-DPNG_MIPS_MSA_OPT=0) endif() +endif() else(PNG_HARDWARE_OPTIMIZATIONS) - # Set definitions and sources for ARM. - if(PNG_TARGET_ARCHITECTURE MATCHES "^(arm|aarch)") - add_definitions(-DPNG_ARM_NEON_OPT=0) - endif() +# set definitions and sources for arm +if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" OR + CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64") + add_definitions(-DPNG_ARM_NEON_OPT=0) +endif() - # Set definitions and sources for PowerPC. - if(PNG_TARGET_ARCHITECTURE MATCHES "^(powerpc|ppc64)") - add_definitions(-DPNG_POWERPC_VSX_OPT=0) - endif() +# set definitions and sources for powerpc +if(CMAKE_SYSTEM_PROCESSOR MATCHES "^powerpc*" OR + CMAKE_SYSTEM_PROCESSOR MATCHES "^ppc64*") + add_definitions(-DPNG_POWERPC_VSX_OPT=0) +endif() - # Set definitions and sources for Intel. - if(PNG_TARGET_ARCHITECTURE MATCHES "^(i[3-6]86|x86|amd64)") - add_definitions(-DPNG_INTEL_SSE_OPT=0) - endif() +# set definitions and sources for intel +if(CMAKE_SYSTEM_PROCESSOR MATCHES "^i?86" OR + CMAKE_SYSTEM_PROCESSOR MATCHES "^x86_64*") + add_definitions(-DPNG_INTEL_SSE_OPT=0) +endif() - # Set definitions and sources for MIPS. - if(PNG_TARGET_ARCHITECTURE MATCHES "^(mipsel|mips64el)") - add_definitions(-DPNG_MIPS_MSA_OPT=0) - endif() - - # Set definitions and sources for LoongArch. - if(PNG_TARGET_ARCHITECTURE MATCHES "^(loongarch)") - add_definitions(-DPNG_LOONGARCH_LSX_OPT=0) - endif() - - # Set definitions and sources for RISC-V. - if(PNG_TARGET_ARCHITECTURE MATCHES "^(riscv)") - add_definitions(-DPNG_RISCV_RVV_OPT=0) - endif() +# set definitions and sources for MIPS +if(CMAKE_SYSTEM_PROCESSOR MATCHES "mipsel*" OR + CMAKE_SYSTEM_PROCESSOR MATCHES "mips64el*") + add_definitions(-DPNG_MIPS_MSA_OPT=0) +endif() endif(PNG_HARDWARE_OPTIMIZATIONS) +# SET LIBNAME +set(PNG_LIB_NAME png${PNGLIB_MAJOR}${PNGLIB_MINOR}) + +# to distinguish between debug and release lib +set(CMAKE_DEBUG_POSTFIX "d") + +include(CheckCSourceCompiles) option(ld-version-script "Enable linker version script" ON) -if(ld-version-script AND NOT (ANDROID OR APPLE)) +if(ld-version-script AND NOT APPLE) # Check if LD supports linker scripts. - file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map" " -VERS_1 { global: sym1; local: *; }; -VERS_2 { global: sym2; main; } VERS_1; + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map" "VERS_1 { + global: sym; + local: *; +}; + +VERS_2 { + global: sym2; + main; +} VERS_1; ") - set(_SAVED_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS}) - if(NOT CMAKE_HOST_SOLARIS) - # Avoid using CMAKE_SHARED_LIBRARY_C_FLAGS in version script checks on - # Solaris, because of an incompatibility with the Solaris link editor. - list(APPEND CMAKE_REQUIRED_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS}) - endif() - list(APPEND CMAKE_REQUIRED_FLAGS - "-Wl,--version-script='${CMAKE_CURRENT_BINARY_DIR}/conftest.map'") - check_c_source_compiles(" -void sym1(void) {} + set(CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS}) + set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-Wl,--version-script='${CMAKE_CURRENT_BINARY_DIR}/conftest.map'") + check_c_source_compiles("void sym(void) {} void sym2(void) {} -int main(void) { return 0; } +int main(void) {return 0;} " HAVE_LD_VERSION_SCRIPT) if(NOT HAVE_LD_VERSION_SCRIPT) - set(CMAKE_REQUIRED_FLAGS ${_SAVED_CMAKE_REQUIRED_FLAGS}) - if(NOT CMAKE_HOST_SOLARIS) - # Again, avoid using CMAKE_SHARED_LIBRARY_C_FLAGS in version script - # checks on Solaris. - list(APPEND CMAKE_REQUIRED_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS}) - endif() - list(APPEND CMAKE_REQUIRED_FLAGS "-Wl,-M -Wl,${CMAKE_CURRENT_BINARY_DIR}/conftest.map") - check_c_source_compiles(" -void sym1(void) {} + set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE} "-Wl,-M -Wl,${CMAKE_CURRENT_BINARY_DIR}/conftest.map") + check_c_source_compiles("void sym(void) {} void sym2(void) {} -int main(void) { return 0; } +int main(void) {return 0;} " HAVE_SOLARIS_LD_VERSION_SCRIPT) endif() - set(CMAKE_REQUIRED_FLAGS ${_SAVED_CMAKE_REQUIRED_FLAGS}) + set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE}) file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map") endif() -if(PNG_LIBCONF_HEADER STREQUAL "") - # No custom configuration header file has been specified, so we build it - # from our DFA files and (optionally) out of the user-supplied DFA file. - # Find an AWK language processor. - # Start with specific AWK implementations like gawk and nawk, which are - # known to work with our scripts, then fall back to the system awk. - find_program(AWK NAMES gawk nawk awk) - if(AWK) - message(STATUS "Found AWK program: ${AWK}") - else() - message(STATUS "Could not find an AWK-compatible program") +# Find symbol prefix. Likely obsolete and unnecessary with recent +# toolchains (it's not done in many other projects). +function(symbol_prefix) + set(SYMBOL_PREFIX) + + execute_process(COMMAND "${CMAKE_C_COMPILER}" "-E" "-" + INPUT_FILE /dev/null + OUTPUT_VARIABLE OUT + RESULT_VARIABLE STATUS) + + if(CPP_FAIL) + message(WARNING "Failed to run the C preprocessor") endif() + + string(REPLACE "\n" ";" OUT "${OUT}") + foreach(line ${OUT}) + string(REGEX MATCH "^PREFIX=" found_match "${line}") + if(found_match) + string(REGEX REPLACE "^PREFIX=(.*\)" "\\1" prefix "${line}") + string(REGEX MATCH "__USER_LABEL_PREFIX__" found_match "${prefix}") + if(found_match) + string(REGEX REPLACE "(.*)__USER_LABEL_PREFIX__(.*)" "\\1\\2" prefix "${prefix}") + endif() + set(SYMBOL_PREFIX "${prefix}") + endif() + endforeach() + + message(STATUS "Symbol prefix: ${SYMBOL_PREFIX}") + set(SYMBOL_PREFIX "${SYMBOL_PREFIX}" PARENT_SCOPE) +endfunction() + +if(UNIX) + symbol_prefix() endif() -# Include the internal module PNGCheckLibconf.cmake -include("${CMAKE_CURRENT_SOURCE_DIR}/scripts/cmake/PNGCheckLibconf.cmake") +#find_program(AWK NAMES gawk awk) -if(NOT PNG_LIBCONF_HEADER STREQUAL "") - # Configure libpng with the user-defined pnglibconf.h file. - png_check_libconf(HEADER "${PNG_LIBCONF_HEADER}") - configure_file("${PNG_LIBCONF_HEADER}" - "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h" - @ONLY) - add_custom_target(png_genfiles) -elseif(NOT AWK) - # No AWK program available to generate pnglibconf.h. - # Configure libpng with pnglibconf.h.prebuilt. - png_check_libconf(HEADER "${PNG_LIBCONF_HEADER_PREBUILT}") - configure_file("${PNG_LIBCONF_HEADER_PREBUILT}" - "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h" - @ONLY) - add_custom_target(png_genfiles) +include_directories(${CMAKE_CURRENT_BINARY_DIR}) + +if(NOT AWK OR ANDROID) + # No awk available to generate sources; use pre-built pnglibconf.h + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.h.prebuilt + ${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h) + add_custom_target(genfiles) # Dummy else() - png_check_libconf(DFA_XTRA "${DFA_XTRA}") + include(CMakeParseArguments) + # Generate .chk from .out with awk + # generate_chk(INPUT inputfile OUTPUT outputfile [DEPENDS dep1 [dep2...]]) + function(generate_chk) + set(options) + set(oneValueArgs INPUT OUTPUT) + set(multiValueArgs DEPENDS) + cmake_parse_arguments(_GC "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + if(NOT _GC_INPUT) + message(FATAL_ERROR "generate_chk: Missing INPUT argument") + endif() + if(NOT _GC_OUTPUT) + message(FATAL_ERROR "generate_chk: Missing OUTPUT argument") + endif() - # Include the internal module PNGGenConfig.cmake - include("${CMAKE_CURRENT_SOURCE_DIR}/scripts/cmake/PNGGenConfig.cmake") + add_custom_command(OUTPUT "${_GC_OUTPUT}" + COMMAND "${CMAKE_COMMAND}" + "-DINPUT=${_GC_INPUT}" + "-DOUTPUT=${_GC_OUTPUT}" + -P "${CMAKE_CURRENT_BINARY_DIR}/scripts/genchk.cmake" + DEPENDS "${_GC_INPUT}" ${_GC_DEPENDS} + WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") + endfunction() - # Work around a limitation of various Windows AWK programs that are - # unable to process CRLF-terminated AWK scripts. - # Copy these AWK scripts to a temporary location, converting their - # line endings from Windows (CRLF) to Unix (LF) at the destination. - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/scripts/checksym.awk" - "${CMAKE_CURRENT_BINARY_DIR}/scripts/checksym.awk" - @ONLY - NEWLINE_STYLE LF) - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/scripts/options.awk" - "${CMAKE_CURRENT_BINARY_DIR}/scripts/options.awk" - @ONLY - NEWLINE_STYLE LF) - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/scripts/dfn.awk" - "${CMAKE_CURRENT_BINARY_DIR}/scripts/dfn.awk" - @ONLY - NEWLINE_STYLE LF) + # Generate .out from .c with awk + # generate_out(INPUT inputfile OUTPUT outputfile [DEPENDS dep1 [dep2...]]) + function(generate_out) + set(options) + set(oneValueArgs INPUT OUTPUT) + set(multiValueArgs DEPENDS) + cmake_parse_arguments(_GO "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + if(NOT _GO_INPUT) + message(FATAL_ERROR "generate_out: Missing INPUT argument") + endif() + if(NOT _GO_OUTPUT) + message(FATAL_ERROR "generate_out: Missing OUTPUT argument") + endif() + + add_custom_command(OUTPUT "${_GO_OUTPUT}" + COMMAND "${CMAKE_COMMAND}" + "-DINPUT=${_GO_INPUT}" + "-DOUTPUT=${_GO_OUTPUT}" + -P "${CMAKE_CURRENT_BINARY_DIR}/scripts/genout.cmake" + DEPENDS "${_GO_INPUT}" ${_GO_DEPENDS} + WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") + endfunction() + + # Generate specific source file with awk + # generate_source(OUTPUT outputfile [DEPENDS dep1 [dep2...]]) + function(generate_source) + set(options) + set(oneValueArgs OUTPUT) + set(multiValueArgs DEPENDS) + cmake_parse_arguments(_GSO "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + if(NOT _GSO_OUTPUT) + message(FATAL_ERROR "generate_source: Missing OUTPUT argument") + endif() + + add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_GSO_OUTPUT}" + COMMAND "${CMAKE_COMMAND}" + "-DOUTPUT=${_GSO_OUTPUT}" + -P "${CMAKE_CURRENT_BINARY_DIR}/scripts/gensrc.cmake" + DEPENDS ${_GSO_DEPENDS} + WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") + endfunction() + + # Copy file + function(generate_copy source destination) + add_custom_command(OUTPUT "${destination}" + COMMAND "${CMAKE_COMMAND}" -E remove "${destination}" + COMMAND "${CMAKE_COMMAND}" -E copy "${source}" + "${destination}" + DEPENDS "${source}") + endfunction() # Generate scripts/pnglibconf.h - generate_source(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf.c" + generate_source(OUTPUT "scripts/pnglibconf.c" DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.dfa" - "${CMAKE_CURRENT_BINARY_DIR}/scripts/options.awk" + "${CMAKE_CURRENT_SOURCE_DIR}/scripts/options.awk" "${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h") # Generate pnglibconf.c - generate_source(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.c" + generate_source(OUTPUT "pnglibconf.c" DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.dfa" - "${CMAKE_CURRENT_BINARY_DIR}/scripts/options.awk" + "${CMAKE_CURRENT_SOURCE_DIR}/scripts/options.awk" "${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h") if(PNG_PREFIX) @@ -506,7 +378,7 @@ else() OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out") # Generate pnglibconf.h - generate_source(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h" + generate_source(OUTPUT "pnglibconf.h" DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out" ${PNGLIBCONF_H_EXTRA_DEPENDS}) @@ -521,7 +393,7 @@ else() "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out") # Generate pngprefix.h - generate_source(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/pngprefix.h" + generate_source(OUTPUT "pngprefix.h" DEPENDS ${PNGPREFIX_H_EXTRA_DEPENDS}) generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/sym.c" @@ -542,334 +414,305 @@ else() generate_chk(INPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.out" OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.chk" - DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/scripts/checksym.awk" + DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/scripts/checksym.awk" "${CMAKE_CURRENT_SOURCE_DIR}/scripts/symbols.def") - generate_copy(INPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/sym.out" - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/libpng.sym") + add_custom_target(symbol-check DEPENDS + "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.chk") - generate_copy(INPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/vers.out" - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/libpng.vers") + generate_copy("${CMAKE_CURRENT_BINARY_DIR}/scripts/sym.out" + "${CMAKE_CURRENT_BINARY_DIR}/libpng.sym") + generate_copy("${CMAKE_CURRENT_BINARY_DIR}/scripts/vers.out" + "${CMAKE_CURRENT_BINARY_DIR}/libpng.vers") - add_custom_target(png_genprebuilt + add_custom_target(genvers DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/libpng.vers") + add_custom_target(gensym DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/libpng.sym") + + add_custom_target("genprebuilt" COMMAND "${CMAKE_COMMAND}" "-DOUTPUT=scripts/pnglibconf.h.prebuilt" - -P "${CMAKE_CURRENT_BINARY_DIR}/scripts/cmake/gensrc.cmake" + -P "${CMAKE_CURRENT_BINARY_DIR}/scripts/gensrc.cmake" WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") - # A single target handles generation of all generated files. - add_custom_target(png_genfiles - DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/libpng.sym" - "${CMAKE_CURRENT_BINARY_DIR}/libpng.vers" - "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.c" - "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h" - "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out" - "${CMAKE_CURRENT_BINARY_DIR}/pngprefix.h" - "${CMAKE_CURRENT_BINARY_DIR}/scripts/intprefix.out" - "${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf.c" - "${CMAKE_CURRENT_BINARY_DIR}/scripts/prefix.out" - "${CMAKE_CURRENT_BINARY_DIR}/scripts/sym.out" - "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.chk" - "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.out" - "${CMAKE_CURRENT_BINARY_DIR}/scripts/vers.out") -endif() - -# List the source code files. -set(libpng_public_hdrs - png.h - pngconf.h + # A single target handles generation of all generated files. If + # they are depended upon separately by multiple targets, this + # confuses parallel make (it would require a separate top-level + # target for each file to track the dependencies properly). + add_custom_target(genfiles DEPENDS + "${CMAKE_CURRENT_BINARY_DIR}/libpng.sym" + "${CMAKE_CURRENT_BINARY_DIR}/libpng.vers" + "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.c" "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h" + "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out" + "${CMAKE_CURRENT_BINARY_DIR}/pngprefix.h" + "${CMAKE_CURRENT_BINARY_DIR}/scripts/intprefix.out" + "${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf.c" + "${CMAKE_CURRENT_BINARY_DIR}/scripts/prefix.out" + "${CMAKE_CURRENT_BINARY_DIR}/scripts/sym.out" + "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.chk" + "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.out" + "${CMAKE_CURRENT_BINARY_DIR}/scripts/vers.out") +endif(NOT AWK OR ANDROID) + +# OUR SOURCES +set(libpng_public_hdrs + png.h + pngconf.h + "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h" ) set(libpng_private_hdrs - pngpriv.h - pngdebug.h - pnginfo.h - pngstruct.h + pngpriv.h + pngdebug.h + pnginfo.h + pngstruct.h ) -if(AWK) +if(AWK AND NOT ANDROID) list(APPEND libpng_private_hdrs "${CMAKE_CURRENT_BINARY_DIR}/pngprefix.h") endif() set(libpng_sources - ${libpng_public_hdrs} - ${libpng_private_hdrs} - png.c - pngerror.c - pngget.c - pngmem.c - pngpread.c - pngread.c - pngrio.c - pngrtran.c - pngrutil.c - pngset.c - pngtrans.c - pngwio.c - pngwrite.c - pngwtran.c - pngwutil.c - ${libpng_arm_sources} - ${libpng_intel_sources} - ${libpng_mips_sources} - ${libpng_powerpc_sources} - ${libpng_loongarch_sources} - ${libpng_riscv_sources} + ${libpng_public_hdrs} + ${libpng_private_hdrs} + png.c + pngerror.c + pngget.c + pngmem.c + pngpread.c + pngread.c + pngrio.c + pngrtran.c + pngrutil.c + pngset.c + pngtrans.c + pngwio.c + pngwrite.c + pngwtran.c + pngwutil.c + ${libpng_arm_sources} + ${libpng_intel_sources} + ${libpng_mips_sources} + ${libpng_powerpc_sources} ) - set(pngtest_sources - pngtest.c + pngtest.c ) set(pngvalid_sources - contrib/libtests/pngvalid.c + contrib/libtests/pngvalid.c ) set(pngstest_sources - contrib/libtests/pngstest.c + contrib/libtests/pngstest.c ) set(pngunknown_sources - contrib/libtests/pngunknown.c + contrib/libtests/pngunknown.c ) set(pngimage_sources - contrib/libtests/pngimage.c + contrib/libtests/pngimage.c ) set(pngfix_sources - contrib/tools/pngfix.c + contrib/tools/pngfix.c ) set(png_fix_itxt_sources - contrib/tools/png-fix-itxt.c + contrib/tools/png-fix-itxt.c ) -# Now build our targets. - -# Initialize the list of libpng library targets. -set(PNG_LIBRARY_TARGETS "") - -# Initialize the libpng library file names. -if(UNIX - OR (WIN32 AND NOT CMAKE_SHARED_LIBRARY_PREFIX STREQUAL "") - OR (WIN32 AND NOT CMAKE_STATIC_LIBRARY_PREFIX STREQUAL "")) - # We are on a Unix or Unix-like toolchain like the GNU toolchain on Windows. - # Library file names are expected to have an implicit prefix such as "lib". - # Let CMake prepend and append its usual prefixes and suffixes by default. - set(PNG_SHARED_OUTPUT_NAME "png${PNGLIB_ABI_VERSION}") - set(PNG_STATIC_OUTPUT_NAME "png${PNGLIB_ABI_VERSION}") -else() - # We are, most likely, on a Windows toolchain like MSVC, Clang on Windows, - # Borland/Embarcadero, etc. We need to specify the "libpng" name explicitly. - # We also need to use a custom suffix, in order to distinguish between the - # shared import library name and the static library name. - set(PNG_SHARED_OUTPUT_NAME "libpng${PNGLIB_ABI_VERSION}") - set(PNG_STATIC_OUTPUT_NAME "libpng${PNGLIB_ABI_VERSION}_static") +if(MSVC) + add_definitions(-D_CRT_SECURE_NO_DEPRECATE) endif() +if(PNG_DEBUG) + add_definitions(-DPNG_DEBUG) +endif() + +# NOW BUILD OUR TARGET +include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${ZLIB_INCLUDE_DIR}) + +unset(PNG_LIB_TARGETS) + if(PNG_SHARED) - add_library(png_shared SHARED ${libpng_sources}) - add_dependencies(png_shared png_genfiles) - list(APPEND PNG_LIBRARY_TARGETS png_shared) - set_target_properties(png_shared - PROPERTIES OUTPUT_NAME "${PNG_SHARED_OUTPUT_NAME}" - DEBUG_POSTFIX "${PNG_DEBUG_POSTFIX}" - VERSION "${PNGLIB_SHARED_VERSION}" - SOVERSION "${PNGLIB_ABI_VERSION}") + add_library(png SHARED ${libpng_sources}) + set(PNG_LIB_TARGETS png) + set_target_properties(png PROPERTIES OUTPUT_NAME ${PNG_LIB_NAME}) + add_dependencies(png genfiles) + if(MSVC) + # msvc does not append 'lib' - do it here to have consistent name + set_target_properties(png PROPERTIES PREFIX "lib") + set_target_properties(png PROPERTIES IMPORT_PREFIX "lib") + endif() + target_link_libraries(png ${ZLIB_LIBRARY} ${M_LIBRARY}) + if(UNIX AND AWK) if(HAVE_LD_VERSION_SCRIPT) - set_target_properties(png_shared - PROPERTIES LINK_FLAGS "-Wl,--version-script='${CMAKE_CURRENT_BINARY_DIR}/libpng.vers'") + set_target_properties(png PROPERTIES LINK_FLAGS + "-Wl,--version-script='${CMAKE_CURRENT_BINARY_DIR}/libpng.vers'") elseif(HAVE_SOLARIS_LD_VERSION_SCRIPT) - set_target_properties(png_shared - PROPERTIES LINK_FLAGS "-Wl,-M -Wl,'${CMAKE_CURRENT_BINARY_DIR}/libpng.vers'") + set_target_properties(png PROPERTIES LINK_FLAGS + "-Wl,-M -Wl,'${CMAKE_CURRENT_BINARY_DIR}/libpng.vers'") endif() endif() - if(APPLE) - # Avoid CMake's implicit compile definition "png_shared_EXPORTS". - set_target_properties(png_shared - PROPERTIES DEFINE_SYMBOL "") - elseif(WIN32) - # Use the explicit compile definition "PNG_BUILD_DLL" for Windows DLLs. - set_target_properties(png_shared - PROPERTIES DEFINE_SYMBOL PNG_BUILD_DLL) - endif() - target_include_directories(png_shared - PUBLIC "$") - target_include_directories(png_shared - PUBLIC "$") - target_include_directories(png_shared - SYSTEM - INTERFACE "$") - target_link_libraries(png_shared - PUBLIC ${PNG_LINK_LIBRARIES}) endif() if(PNG_STATIC) + # does not work without changing name + set(PNG_LIB_NAME_STATIC png_static) add_library(png_static STATIC ${libpng_sources}) - add_dependencies(png_static png_genfiles) - list(APPEND PNG_LIBRARY_TARGETS png_static) - set_target_properties(png_static - PROPERTIES OUTPUT_NAME "${PNG_STATIC_OUTPUT_NAME}" - DEBUG_POSTFIX "${PNG_DEBUG_POSTFIX}") - target_include_directories(png_static - PUBLIC "$") - target_include_directories(png_static - PUBLIC "$") - target_include_directories(png_static - SYSTEM - INTERFACE "$") - target_link_libraries(png_static - PUBLIC ${PNG_LINK_LIBRARIES}) -endif() - -if(PNG_FRAMEWORK AND NOT APPLE) - message(AUTHOR_WARNING "Setting PNG_FRAMEWORK to OFF, as it only applies to Apple systems") - set(PNG_FRAMEWORK OFF) + add_dependencies(png_static genfiles) + # MSVC doesn't use a different file extension for shared vs. static + # libs. We are able to change OUTPUT_NAME to remove the _static + # for all other platforms. + if(NOT MSVC) + set_target_properties(png_static PROPERTIES + OUTPUT_NAME "${PNG_LIB_NAME}" + CLEAN_DIRECT_OUTPUT 1) + else() + set_target_properties(png_static PROPERTIES + OUTPUT_NAME "${PNG_LIB_NAME}_static" + CLEAN_DIRECT_OUTPUT 1) + endif() + list(APPEND PNG_LIB_TARGETS png_static) + if(MSVC) + # msvc does not append 'lib' - do it here to have consistent name + set_target_properties(png_static PROPERTIES PREFIX "lib") + endif() + target_link_libraries(png_static ${ZLIB_LIBRARY} ${M_LIBRARY}) endif() if(PNG_FRAMEWORK) + set(PNG_LIB_NAME_FRAMEWORK png_framework) add_library(png_framework SHARED ${libpng_sources}) - add_dependencies(png_framework png_genfiles) - list(APPEND PNG_LIBRARY_TARGETS png_framework) - set_target_properties(png_framework - PROPERTIES FRAMEWORK TRUE - FRAMEWORK_VERSION "${PNGLIB_VERSION}" - MACOSX_FRAMEWORK_SHORT_VERSION_STRING "${PNGLIB_MAJOR}.${PNGLIB_MINOR}" - MACOSX_FRAMEWORK_BUNDLE_VERSION "${PNGLIB_VERSION}" - MACOSX_FRAMEWORK_IDENTIFIER "org.libpng.libpng" - XCODE_ATTRIBUTE_INSTALL_PATH "@rpath" - PUBLIC_HEADER "${libpng_public_hdrs}" - OUTPUT_NAME "png" - DEBUG_POSTFIX "${PNG_DEBUG_POSTFIX}") - # Avoid CMake's implicit compile definition "-Dpng_framework_EXPORTS". - set_target_properties(png_framework - PROPERTIES DEFINE_SYMBOL "") - target_include_directories(png_framework - PUBLIC "$") - target_include_directories(png_framework - PUBLIC "$") - target_include_directories(png_framework - SYSTEM - INTERFACE "$") - target_link_libraries(png_framework - PUBLIC ${PNG_LINK_LIBRARIES}) + add_dependencies(png_framework genfiles) + list(APPEND PNG_LIB_TARGETS png_framework) + set_target_properties(png_framework PROPERTIES + FRAMEWORK TRUE + FRAMEWORK_VERSION ${PNGLIB_VERSION} + MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${PNGLIB_MAJOR}.${PNGLIB_MINOR} + MACOSX_FRAMEWORK_BUNDLE_VERSION ${PNGLIB_VERSION} + MACOSX_FRAMEWORK_IDENTIFIER org.libpng.libpng + XCODE_ATTRIBUTE_INSTALL_PATH "@rpath" + PUBLIC_HEADER "${libpng_public_hdrs}" + OUTPUT_NAME png) + target_link_libraries(png_framework ${ZLIB_LIBRARY} ${M_LIBRARY}) endif() -if(NOT PNG_LIBRARY_TARGETS) - message(SEND_ERROR "No library variant selected to build. " - "Please enable at least one of the following options: " - "PNG_SHARED, PNG_STATIC, PNG_FRAMEWORK") +if(NOT PNG_LIB_TARGETS) + message(SEND_ERROR + "No library variant selected to build. " + "Please enable at least one of the following options: " + "PNG_STATIC, PNG_SHARED, PNG_FRAMEWORK") endif() +if(PNG_SHARED AND WIN32) + set_target_properties(png PROPERTIES DEFINE_SYMBOL PNG_BUILD_DLL) +endif() + +function(png_add_test) + set(options) + set(oneValueArgs NAME COMMAND) + set(multiValueArgs OPTIONS FILES) + cmake_parse_arguments(_PAT "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + + if(NOT _PAT_NAME) + message(FATAL_ERROR "png_add_test: Missing NAME argument") + endif() + if(NOT _PAT_COMMAND) + message(FATAL_ERROR "png_add_test: Missing COMMAND argument") + endif() + + set(TEST_OPTIONS "${_PAT_OPTIONS}") + set(TEST_FILES "${_PAT_FILES}") + + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/scripts/test.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/tests/${_PAT_NAME}.cmake" @ONLY) + add_test(NAME "${_PAT_NAME}" + COMMAND "${CMAKE_COMMAND}" + "-DLIBPNG=$" + "-DTEST_COMMAND=$" + -P "${CMAKE_CURRENT_BINARY_DIR}/tests/${_PAT_NAME}.cmake") +endfunction() + if(PNG_TESTS AND PNG_SHARED) - enable_testing() - - # Include the internal module PNGTest.cmake - include("${CMAKE_CURRENT_SOURCE_DIR}/scripts/cmake/PNGTest.cmake") - # Find test PNG files by globbing, but sort lists to ensure # consistency between different filesystems. file(GLOB PNGSUITE_PNGS "${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/*.png") list(SORT PNGSUITE_PNGS) file(GLOB TEST_PNGS "${CMAKE_CURRENT_SOURCE_DIR}/contrib/testpngs/*.png") list(SORT TEST_PNGS) - file(GLOB TEST_PNG3_PNGS "${CMAKE_CURRENT_SOURCE_DIR}/contrib/testpngs/png-3/*.png") - list(SORT TEST_PNG3_PNGS) set(PNGTEST_PNG "${CMAKE_CURRENT_SOURCE_DIR}/pngtest.png") add_executable(pngtest ${pngtest_sources}) - target_link_libraries(pngtest - PRIVATE png_shared) + target_link_libraries(pngtest png) - png_add_test(NAME pngtest - COMMAND pngtest - FILES "${PNGTEST_PNG}") - - png_add_test(NAME pngtest-png-3 - COMMAND pngtest - FILES "${TEST_PNG3_PNGS}") + png_add_test(NAME pngtest COMMAND pngtest FILES "${PNGTEST_PNG}") add_executable(pngvalid ${pngvalid_sources}) - target_link_libraries(pngvalid - PRIVATE png_shared) + target_link_libraries(pngvalid png) png_add_test(NAME pngvalid-gamma-16-to-8 - COMMAND pngvalid - OPTIONS --gamma-16-to-8) + COMMAND pngvalid OPTIONS --gamma-16-to-8) png_add_test(NAME pngvalid-gamma-alpha-mode - COMMAND pngvalid - OPTIONS --gamma-alpha-mode) + COMMAND pngvalid OPTIONS --gamma-alpha-mode) png_add_test(NAME pngvalid-gamma-background - COMMAND pngvalid - OPTIONS --gamma-background) + COMMAND pngvalid OPTIONS --gamma-background) png_add_test(NAME pngvalid-gamma-expand16-alpha-mode - COMMAND pngvalid - OPTIONS --gamma-alpha-mode --expand16) + COMMAND pngvalid OPTIONS --gamma-alpha-mode --expand16) png_add_test(NAME pngvalid-gamma-expand16-background - COMMAND pngvalid - OPTIONS --gamma-background --expand16) + COMMAND pngvalid OPTIONS --gamma-background --expand16) png_add_test(NAME pngvalid-gamma-expand16-transform - COMMAND pngvalid - OPTIONS --gamma-transform --expand16) + COMMAND pngvalid OPTIONS --gamma-transform --expand16) png_add_test(NAME pngvalid-gamma-sbit - COMMAND pngvalid - OPTIONS --gamma-sbit) + COMMAND pngvalid OPTIONS --gamma-sbit) png_add_test(NAME pngvalid-gamma-threshold - COMMAND pngvalid - OPTIONS --gamma-threshold) + COMMAND pngvalid OPTIONS --gamma-threshold) png_add_test(NAME pngvalid-gamma-transform - COMMAND pngvalid - OPTIONS --gamma-transform) + COMMAND pngvalid OPTIONS --gamma-transform) png_add_test(NAME pngvalid-progressive-interlace-standard - COMMAND pngvalid - OPTIONS --standard --progressive-read --interlace) + COMMAND pngvalid OPTIONS --standard --progressive-read --interlace) png_add_test(NAME pngvalid-progressive-size - COMMAND pngvalid - OPTIONS --size --progressive-read) + COMMAND pngvalid OPTIONS --size --progressive-read) png_add_test(NAME pngvalid-progressive-standard - COMMAND pngvalid - OPTIONS --standard --progressive-read) + COMMAND pngvalid OPTIONS --standard --progressive-read) png_add_test(NAME pngvalid-standard - COMMAND pngvalid - OPTIONS --standard) + COMMAND pngvalid OPTIONS --standard) png_add_test(NAME pngvalid-transform - COMMAND pngvalid - OPTIONS --transform) + COMMAND pngvalid OPTIONS --transform) add_executable(pngstest ${pngstest_sources}) - target_link_libraries(pngstest - PRIVATE png_shared) + target_link_libraries(pngstest png) foreach(gamma_type 1.8 linear none sRGB) foreach(alpha_type none alpha) set(PNGSTEST_FILES) foreach(test_png ${TEST_PNGS}) - string(REGEX MATCH "-linear[-.]" TEST_PNG_LINEAR "${test_png}") - string(REGEX MATCH "-sRGB[-.]" TEST_PNG_SRGB "${test_png}") - string(REGEX MATCH "-1.8[-.]" TEST_PNG_G18 "${test_png}") - string(REGEX MATCH "-alpha-" TEST_PNG_ALPHA "${test_png}") + string(REGEX MATCH ".*-linear[-.].*" TEST_PNG_LINEAR "${test_png}") + string(REGEX MATCH ".*-sRGB[-.].*" TEST_PNG_SRGB "${test_png}") + string(REGEX MATCH ".*-1.8[-.].*" TEST_PNG_G18 "${test_png}") + string(REGEX MATCH ".*-alpha-.*" TEST_PNG_ALPHA "${test_png}") set(TEST_PNG_VALID TRUE) if(TEST_PNG_ALPHA) - if(NOT alpha_type STREQUAL "alpha") + if(NOT "${alpha_type}" STREQUAL "alpha") set(TEST_PNG_VALID FALSE) endif() else() - if(alpha_type STREQUAL "alpha") + if("${alpha_type}" STREQUAL "alpha") set(TEST_PNG_VALID FALSE) endif() endif() if(TEST_PNG_LINEAR) - if(NOT gamma_type STREQUAL "linear") + if(NOT "${gamma_type}" STREQUAL "linear") set(TEST_PNG_VALID FALSE) endif() elseif(TEST_PNG_SRGB) - if(NOT gamma_type STREQUAL "sRGB") + if(NOT "${gamma_type}" STREQUAL "sRGB") set(TEST_PNG_VALID FALSE) endif() elseif(TEST_PNG_G18) - if(NOT gamma_type STREQUAL "1.8") + if(NOT "${gamma_type}" STREQUAL "1.8") set(TEST_PNG_VALID FALSE) endif() else() - if(NOT gamma_type STREQUAL "none") + if(NOT "${gamma_type}" STREQUAL "none") set(TEST_PNG_VALID FALSE) endif() endif() @@ -888,255 +731,202 @@ if(PNG_TESTS AND PNG_SHARED) endforeach() add_executable(pngunknown ${pngunknown_sources}) - target_link_libraries(pngunknown - PRIVATE png_shared) + target_link_libraries(pngunknown png) - png_add_test(NAME pngunknown-discard - COMMAND pngunknown - OPTIONS --strict default=discard - FILES "${PNGTEST_PNG}") - png_add_test(NAME pngunknown-IDAT - COMMAND pngunknown - OPTIONS --strict default=discard IDAT=save - FILES "${PNGTEST_PNG}") - png_add_test(NAME pngunknown-if-safe - COMMAND pngunknown - OPTIONS --strict default=if-safe - FILES "${PNGTEST_PNG}") - 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}") - png_add_test(NAME pngunknown-save - COMMAND pngunknown - OPTIONS --strict default=save - FILES "${PNGTEST_PNG}") - png_add_test(NAME pngunknown-sTER - COMMAND pngunknown - OPTIONS --strict sTER=if-safe - FILES "${PNGTEST_PNG}") - png_add_test(NAME pngunknown-vpAg - COMMAND pngunknown - OPTIONS --strict vpAg=if-safe - FILES "${PNGTEST_PNG}") + png_add_test(NAME pngunknown-discard COMMAND pngunknown OPTIONS --strict default=discard FILES "${PNGTEST_PNG}") + png_add_test(NAME pngunknown-IDAT COMMAND pngunknown OPTIONS --strict default=discard IDAT=save FILES "${PNGTEST_PNG}") + png_add_test(NAME pngunknown-if-safe COMMAND pngunknown OPTIONS --strict default=if-safe FILES "${PNGTEST_PNG}") + 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}") + png_add_test(NAME pngunknown-save COMMAND pngunknown OPTIONS --strict default=save FILES "${PNGTEST_PNG}") + png_add_test(NAME pngunknown-sTER COMMAND pngunknown OPTIONS --strict sTER=if-safe FILES "${PNGTEST_PNG}") + png_add_test(NAME pngunknown-vpAg COMMAND pngunknown OPTIONS --strict vpAg=if-safe FILES "${PNGTEST_PNG}") add_executable(pngimage ${pngimage_sources}) - target_link_libraries(pngimage - PRIVATE png_shared) + target_link_libraries(pngimage png) - png_add_test(NAME pngimage-quick - COMMAND pngimage - OPTIONS --list-combos --log - FILES ${PNGSUITE_PNGS}) - png_add_test(NAME pngimage-full - COMMAND pngimage - OPTIONS --exhaustive --list-combos --log - FILES ${PNGSUITE_PNGS}) + png_add_test(NAME pngimage-quick COMMAND pngimage OPTIONS --list-combos --log FILES ${PNGSUITE_PNGS}) + png_add_test(NAME pngimage-full COMMAND pngimage OPTIONS --exhaustive --list-combos --log FILES ${PNGSUITE_PNGS}) endif() -if(PNG_SHARED AND PNG_TOOLS) +if(PNG_SHARED) add_executable(pngfix ${pngfix_sources}) - target_link_libraries(pngfix - PRIVATE png_shared) + target_link_libraries(pngfix png) set(PNG_BIN_TARGETS pngfix) add_executable(png-fix-itxt ${png_fix_itxt_sources}) - target_link_libraries(png-fix-itxt - PRIVATE ${PNG_LINK_LIBRARIES}) + target_link_libraries(png-fix-itxt ${ZLIB_LIBRARY} ${M_LIBRARY}) list(APPEND PNG_BIN_TARGETS png-fix-itxt) endif() -# Create a symlink that points to a target file (if symlinking is possible), -# or make a copy of the target file (if symlinking is not possible): -# create_symlink( [FILE | TARGET ]) +# Set a variable with CMake code which: +# Creates a symlink from src to dest (if possible) or alternatively +# copies if different. +include(CMakeParseArguments) + function(create_symlink DEST_FILE) - # TODO: - # Replace this implementation with CMake's built-in create_symlink function, - # which has been fully functional on all platforms, including Windows, since - # CMake version 3.13. - cmake_parse_arguments(_SYM "" "FILE;TARGET" "" ${ARGN}) - if(NOT _SYM_FILE AND NOT _SYM_TARGET) - message(FATAL_ERROR "create_symlink: Missing arguments: FILE or TARGET") - endif() - if(_SYM_FILE AND _SYM_TARGET) - message(FATAL_ERROR "create_symlink: Mutually-exlusive arguments:" - "FILE (${_SYM_FILE}) and TARGET (${_SYM_TARGET})") + + cmake_parse_arguments(S "" "FILE;TARGET" "" ${ARGN}) + + if(NOT S_TARGET AND NOT S_FILE) + message(FATAL_ERROR "create_symlink: Missing TARGET or FILE argument") endif() - if(_SYM_FILE) + if(S_TARGET AND S_FILE) + message(FATAL_ERROR "create_symlink: Both source file ${S_FILE} and build target ${S_TARGET} arguments are present; can only have one.") + endif() + + if(S_FILE) # If we don't need to symlink something that's coming from a build target, # we can go ahead and symlink/copy at configure time. if(CMAKE_HOST_WIN32 AND NOT CYGWIN) - execute_process(COMMAND "${CMAKE_COMMAND}" - -E copy_if_different - "${_SYM_FILE}" - "${DEST_FILE}" - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") + execute_process( + COMMAND "${CMAKE_COMMAND}" -E copy_if_different ${S_FILE} ${DEST_FILE} + WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") else() - execute_process(COMMAND "${CMAKE_COMMAND}" - -E create_symlink - "${_SYM_FILE}" - "${DEST_FILE}" - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") + execute_process( + COMMAND ${CMAKE_COMMAND} -E create_symlink ${S_FILE} ${DEST_FILE} + WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") endif() endif() - if(_SYM_TARGET) - # We need to use generator expressions, which can be a bit tricky. - # For simplicity, make the symlink a POST_BUILD step, and use the TARGET + if(S_TARGET) + # We need to use generator expressions, which can be a bit tricky, so for + # simplicity make the symlink a POST_BUILD step and use the TARGET # signature of add_custom_command. if(CMAKE_HOST_WIN32 AND NOT CYGWIN) - add_custom_command(TARGET ${_SYM_TARGET} - POST_BUILD - COMMAND "${CMAKE_COMMAND}" - -E copy_if_different - "$/$" - "$/${DEST_FILE}") + add_custom_command(TARGET ${S_TARGET} POST_BUILD + COMMAND "${CMAKE_COMMAND}" -E copy_if_different $ $/${DEST_FILE}) else() - add_custom_command(TARGET ${_SYM_TARGET} - POST_BUILD - COMMAND "${CMAKE_COMMAND}" - -E create_symlink - "$" - "$/${DEST_FILE}") + add_custom_command(TARGET ${S_TARGET} POST_BUILD + COMMAND "${CMAKE_COMMAND}" -E create_symlink $ $/${DEST_FILE}) endif() endif() + endfunction() # Create source generation scripts. -configure_file("${CMAKE_CURRENT_SOURCE_DIR}/scripts/cmake/genchk.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/scripts/cmake/genchk.cmake" - @ONLY) -configure_file("${CMAKE_CURRENT_SOURCE_DIR}/scripts/cmake/genout.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/scripts/cmake/genout.cmake" - @ONLY) -configure_file("${CMAKE_CURRENT_SOURCE_DIR}/scripts/cmake/gensrc.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/scripts/cmake/gensrc.cmake" - @ONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/genchk.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/scripts/genchk.cmake @ONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/genout.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/scripts/genout.cmake @ONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/gensrc.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/scripts/gensrc.cmake @ONLY) # libpng is a library so default to 'lib' if(NOT DEFINED CMAKE_INSTALL_LIBDIR) set(CMAKE_INSTALL_LIBDIR lib) endif() -# Create pkgconfig files. +# CREATE PKGCONFIG FILES # We use the same files like ./configure, so we have to set its vars. -# Only do this on Windows for Cygwin - the files don't make much sense -# outside of a UNIX look-alike. +# Only do this on Windows for Cygwin - the files don't make much sense outside +# of a UNIX look-alike. if(NOT WIN32 OR CYGWIN OR MINGW) - set(prefix "${CMAKE_INSTALL_PREFIX}") - set(exec_prefix "${CMAKE_INSTALL_PREFIX}") - set(libdir "${CMAKE_INSTALL_FULL_LIBDIR}") - set(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}") - set(LIBS "-lz -lm") - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in" - "${CMAKE_CURRENT_BINARY_DIR}/libpng${PNGLIB_ABI_VERSION}.pc" - @ONLY) - create_symlink(libpng.pc FILE libpng${PNGLIB_ABI_VERSION}.pc) - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in" - "${CMAKE_CURRENT_BINARY_DIR}/libpng${PNGLIB_ABI_VERSION}-config" - @ONLY) - create_symlink(libpng-config FILE libpng${PNGLIB_ABI_VERSION}-config) + set(prefix ${CMAKE_INSTALL_PREFIX}) + set(exec_prefix ${CMAKE_INSTALL_PREFIX}) + set(libdir ${CMAKE_INSTALL_FULL_LIBDIR}) + set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR}) + set(LIBS "-lz -lm") + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc @ONLY) + create_symlink(libpng.pc FILE ${PNGLIB_NAME}.pc) + + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in + ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config @ONLY) + create_symlink(libpng-config FILE ${PNGLIB_NAME}-config) endif() -# Install. +# SET UP LINKS +if(PNG_SHARED) + set_target_properties(png PROPERTIES +# VERSION 16.${PNGLIB_RELEASE}.1.6.37 + VERSION 16.${PNGLIB_RELEASE}.0 + SOVERSION 16 + CLEAN_DIRECT_OUTPUT 1) +endif() + +# INSTALL if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) - install(TARGETS ${PNG_LIBRARY_TARGETS} + install(TARGETS ${PNG_LIB_TARGETS} EXPORT libpng - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" - LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" - ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" - FRAMEWORK DESTINATION "${CMAKE_INSTALL_LIBDIR}") + RUNTIME DESTINATION bin + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + FRAMEWORK DESTINATION ${CMAKE_INSTALL_LIBDIR}) if(PNG_SHARED) # Create a symlink for libpng.dll.a => libpng16.dll.a on Cygwin - if(NOT WIN32 OR CYGWIN OR MINGW) - create_symlink(libpng${CMAKE_SHARED_LIBRARY_SUFFIX} TARGET png_shared) - install(FILES "$/libpng${CMAKE_SHARED_LIBRARY_SUFFIX}" - DESTINATION "${CMAKE_INSTALL_LIBDIR}") + if(CYGWIN OR MINGW) + create_symlink(libpng${CMAKE_IMPORT_LIBRARY_SUFFIX} TARGET png) + install(FILES $/libpng${CMAKE_IMPORT_LIBRARY_SUFFIX} + DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() + + if(NOT WIN32) + create_symlink(libpng${CMAKE_SHARED_LIBRARY_SUFFIX} TARGET png) + install(FILES $/libpng${CMAKE_SHARED_LIBRARY_SUFFIX} + DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() endif() if(PNG_STATIC) if(NOT WIN32 OR CYGWIN OR MINGW) create_symlink(libpng${CMAKE_STATIC_LIBRARY_SUFFIX} TARGET png_static) - install(FILES "$/libpng${CMAKE_STATIC_LIBRARY_SUFFIX}" - DESTINATION "${CMAKE_INSTALL_LIBDIR}") + install(FILES $/libpng${CMAKE_STATIC_LIBRARY_SUFFIX} + DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() endif() endif() if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL) - install(FILES ${libpng_public_hdrs} - DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") - install(FILES ${libpng_public_hdrs} - DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/libpng${PNGLIB_ABI_VERSION}") + install(FILES ${libpng_public_hdrs} DESTINATION include) + install(FILES ${libpng_public_hdrs} DESTINATION include/${PNGLIB_NAME}) endif() if(NOT SKIP_INSTALL_EXECUTABLES AND NOT SKIP_INSTALL_ALL) if(NOT WIN32 OR CYGWIN OR MINGW) - install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/libpng-config" - DESTINATION "${CMAKE_INSTALL_BINDIR}") - install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/libpng${PNGLIB_ABI_VERSION}-config" - DESTINATION "${CMAKE_INSTALL_BINDIR}") + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config DESTINATION bin) + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config DESTINATION bin) endif() endif() if(NOT SKIP_INSTALL_PROGRAMS AND NOT SKIP_INSTALL_ALL) install(TARGETS ${PNG_BIN_TARGETS} - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") + RUNTIME DESTINATION bin) endif() if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL) - # Install the man pages. - install(FILES libpng.3 libpngpf.3 - DESTINATION "${CMAKE_INSTALL_MANDIR}/man3") - install(FILES png.5 - DESTINATION "${CMAKE_INSTALL_MANDIR}/man5") - # Install the pkg-config files. + # Install man pages + if(NOT PNG_MAN_DIR) + set(PNG_MAN_DIR "share/man") + endif() + install(FILES libpng.3 libpngpf.3 DESTINATION ${PNG_MAN_DIR}/man3) + install(FILES png.5 DESTINATION ${PNG_MAN_DIR}/man5) + # Install pkg-config files if(NOT CMAKE_HOST_WIN32 OR CYGWIN OR MINGW) - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libpng.pc" - DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") - install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/libpng-config" - DESTINATION "${CMAKE_INSTALL_BINDIR}") - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libpng${PNGLIB_ABI_VERSION}.pc" - DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") - install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/libpng${PNGLIB_ABI_VERSION}-config" - DESTINATION "${CMAKE_INSTALL_BINDIR}") + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng.pc + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config + DESTINATION bin) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config + DESTINATION bin) endif() endif() # Create an export file that CMake users can include() to import our targets. if(NOT SKIP_INSTALL_EXPORT AND NOT SKIP_INSTALL_ALL) - install(EXPORT libpng - DESTINATION "${CMAKE_INSTALL_LIBDIR}/libpng" - FILE libpng${PNGLIB_ABI_VERSION}.cmake) + install(EXPORT libpng DESTINATION lib/libpng FILE lib${PNG_LIB_NAME}.cmake) endif() -# Create a CMake Config File that can be used via find_package(PNG CONFIG) -if(NOT SKIP_INSTALL_CONFIG_FILE AND NOT SKIP_INSTALL_ALL) - install(TARGETS ${PNG_LIBRARY_TARGETS} - EXPORT PNGTargets - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" - LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" - ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" - FRAMEWORK DESTINATION "${CMAKE_INSTALL_LIBDIR}") +# what's with libpng-manual.txt and all the extra files? - include(CMakePackageConfigHelpers) - write_basic_package_version_file(PNGConfigVersion.cmake - VERSION ${PNGLIB_VERSION} - COMPATIBILITY SameMinorVersion) +# UNINSTALL +# do we need this? - install(EXPORT PNGTargets - FILE PNGTargets.cmake - NAMESPACE PNG:: - DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/PNG") +# DIST +# do we need this? - install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/scripts/cmake/PNGConfig.cmake" - "${CMAKE_CURRENT_BINARY_DIR}/PNGConfigVersion.cmake" - DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/PNG") -endif() - -# TODO: Create MSVC import lib for MinGW-compiled shared lib. +# to create msvc import lib for mingw compiled shared lib # pexports libpng.dll > libpng.def # lib /def:libpng.def /machine:x86 diff --git a/Engine/lib/lpng/INSTALL b/Engine/lib/lpng/INSTALL index 1557fbded..4c1702251 100644 --- a/Engine/lib/lpng/INSTALL +++ b/Engine/lib/lpng/INSTALL @@ -1,3 +1,4 @@ + Installing libpng Contents @@ -127,18 +128,16 @@ Your directory structure should look like this: README *.h, *.c => libpng source files CMakeLists.txt => "cmake" script - ci - ci_*.sh configuration files: configure.ac, configure, Makefile.am, Makefile.in, autogen.sh, config.guess, ltmain.sh, missing, libpng.pc.in, libpng-config.in, aclocal.m4, config.h.in, config.sub, - depcomp, install-sh, mkinstalldirs, test-pngtest.sh, etc. + depcomp, install-sh, mkinstalldirs, test-pngtest.sh contrib arm-neon, conftest, examples, gregbook, libtests, pngminim, - pngminus, pngsuite, tools, visupng, riscv-rvv + pngminus, pngsuite, tools, visupng projects - owatcom, visualc71, vstudio + cbuilder5, owatcom, visualc71, vstudio, xcode scripts makefile.* *.def (module definition files) @@ -146,7 +145,7 @@ Your directory structure should look like this: pngtest.png etc. zlib - README, *.h, *.c, contrib, etc. + README, *.h, *.c contrib, etc. If the line endings in the files look funny, you may wish to get the other distribution of libpng. It is available in both tar.gz (UNIX style line @@ -154,27 +153,28 @@ endings) and zip (DOS style line endings) formats. VI. Building with project files -If you are building libpng with Microsoft Visual Studio, you can enter -the directory projects\visualc71 or projects\vstudio and follow the -instructions in README.txt. +If you are building libpng with MSVC, you can enter the +libpng projects\visualc71 or vstudio directory and follow the instructions +in README.txt. -Otherwise, enter the zlib directory and follow the instructions in -zlib/README, then come back here and run "configure" or choose the -appropriate makefile in the scripts directory. +Otherwise enter the zlib directory and follow the instructions in zlib/README, +then come back here and run "configure" or choose the appropriate +makefile.sys in the scripts directory. VII. Building with makefiles Copy the file (or files) that you need from the scripts directory into this directory, for example +MSDOS example: + + copy scripts\makefile.msc makefile + copy scripts\pnglibconf.h.prebuilt pnglibconf.h + UNIX example: - cp scripts/makefile.std Makefile - make - -Windows example: - - nmake -f scripts\makefile.vcwin32 + cp scripts/makefile.std makefile + cp scripts/pnglibconf.h.prebuilt pnglibconf.h Read the makefile to see if you need to change any source or target directories to match your preferences. @@ -191,33 +191,36 @@ test. For more confidence, you can run another test by typing Also, you can run "pngtest -m contrib/pngsuite/*.png" and compare your output with the result shown in contrib/pngsuite/README. -Most of the makefiles used to allow you to run "make install" to put -the library in its final resting place, but that feature is no longer -supported. The only tested and supported manners to install libpng are -the conventional build and install procedures driven by the configure -script or by the CMake file. +Most of the makefiles will allow you to run "make install" to +put the library in its final resting place (if you want to +do that, run "make install" in the zlib directory first if necessary). +Some also allow you to run "make test-installed" after you have +run "make install". -VIII. Configuring for DOS and other 16-bit platforms +VIII. Configuring libpng for 16-bit platforms -Officially, the support for 16-bit platforms has been removed. +You will want to look into zconf.h to tell zlib (and thus libpng) that +it cannot allocate more than 64K at a time. Even if you can, the memory +won't be accessible. So limit zlib and libpng to 64K by defining MAXSEG_64K. + +IX. Configuring for DOS For DOS users who only have access to the lower 640K, you will have to limit zlib's memory usage via a png_set_compression_mem_level() call. See zlib.h or zconf.h in the zlib library for more information. -You may be or may not be in luck if you target the "large" memory model, -but all the smaller models ("small", "compact" and "medium") are known -to be unworkable. For DOS users who have access beyond the lower 640K, -a "flat" 32-bit DOS model (such as DJGPP) is strongly recommended. +X. Configuring for Medium Model -For DOS users who only have access to the lower 640K, you will have to -limit zlib's memory usage via a png_set_compression_mem_level() call. -You will also have to look into zconf.h to tell zlib (and thus libpng) -that it cannot allocate more than 64K at a time. Even if you can, the -memory won't be accessible. Therefore, you should limit zlib and libpng -to 64K by defining MAXSEG_64K. +Libpng's support for medium model has been tested on most of the popular +compilers. Make sure MAXSEG_64K gets defined, USE_FAR_KEYWORD gets +defined, and FAR gets defined to far in pngconf.h, and you should be +all set. Everything in the library (except for zlib's structure) is +expecting far data. You must use the typedefs with the p or pp on +the end for pointers (or at least look at them and be careful). Make +note that the rows of data are defined as png_bytepp, which is +an "unsigned char far * far *". -IX. Prepending a prefix to exported symbols +XI. Prepending a prefix to exported symbols Starting with libpng-1.6.0, you can configure libpng (when using the "configure" script) to prefix all exported symbols by means of the @@ -228,7 +231,7 @@ identifier). This creates a set of macros in pnglibconf.h, so this is transparent to applications; their function calls get transformed by the macros to use the modified names. -X. Configuring for compiler xxx: +XII. Configuring for compiler xxx: All includes for libpng are in pngconf.h. If you need to add, change or delete an include, this is the place to do it. @@ -240,7 +243,7 @@ As of libpng-1.5.0, pngpriv.h also includes three other private header files, pngstruct.h, pnginfo.h, and pngdebug.h, which contain material that previously appeared in the public headers. -XI. Removing unwanted object code +XIII. Removing unwanted object code There are a bunch of #define's in pngconf.h that control what parts of libpng are compiled. All the defines end in _SUPPORTED. If you are @@ -279,7 +282,7 @@ library to fail if they call functions not available in your library. The size of the library itself should not be an issue, because only those sections that are actually used will be loaded into memory. -XII. Enabling or disabling hardware optimizations +XIV. Enabling or disabling hardware optimizations Certain hardware capabilities, such as the Intel SSE instructions, are normally detected at run time. Enable them with configure options @@ -289,7 +292,6 @@ such as one of --enable-mips-msa=yes --enable-intel-sse=yes --enable-powerpc-vsx=yes - --enable-riscv-rvv=yes or enable them all at once with @@ -302,7 +304,6 @@ or more of CPPFLAGS += "-DPNG_MIPS_MSA" CPPFLAGS += "-DPNG_INTEL_SSE" CPPFLAGS += "-DPNG_POWERPC_VSX" - CPPFLAGS += "-DPNG_RISCV_RVV" See for example scripts/makefile.linux-opt @@ -319,21 +320,19 @@ to disable a particular one, or via compiler-command options such as CPPFLAGS += "-DPNG_ARM_NEON_OPT=0, -DPNG_MIPS_MSA_OPT=0, - -DPNG_INTEL_SSE_OPT=0, -DPNG_POWERPC_VSX_OPT=0, - -DPNG_RISCV_RVV_OPT=0" + -DPNG_INTEL_SSE_OPT=0, -DPNG_POWERPC_VSX_OPT=0" If you are using cmake, hardware optimizations are "on" by default. To disable them, use cmake . -DPNG_ARM_NEON=no -DPNG_INTEL_SSE=no \ - -DPNG_MIPS_MSA=no -DPNG_POWERPC_VSX=no \ - -DPNG_RISCV_RVV=no + -DPNG_MIPS_MSA=no -DPNG_POWERPC_VSX=no or disable them all at once with cmake . -DPNG_HARDWARE_OPTIMIZATIONS=no -XIII. Changes to the build and configuration of libpng in libpng-1.5.x +XV. Changes to the build and configuration of libpng in libpng-1.5.x Details of internal changes to the library code can be found in the CHANGES file and in the GIT repository logs. These will be of no concern to the vast @@ -424,7 +423,7 @@ $PREFIX/include directory). Do not edit pnglibconf.h after you have built libpng, because than the settings would not accurately reflect the settings that were used to build libpng. -XIV. Setjmp/longjmp issues +XVI. Setjmp/longjmp issues Libpng uses setjmp()/longjmp() for error handling. Unfortunately setjmp() is known to be not thread-safe on some platforms and we don't know of @@ -442,7 +441,7 @@ This requires setjmp/longjmp, so you must either build the library with PNG_SETJMP_SUPPORTED defined, or with PNG_SIMPLIFIED_READ_SUPPORTED and PNG_SIMPLIFIED_WRITE_SUPPORTED undefined. -XV. Common linking failures +XVII. Common linking failures If your application fails to find libpng or zlib entries while linking: @@ -454,13 +453,12 @@ If your application fails to find libpng or zlib entries while linking: If you are using the vstudio project, observe the WARNING in project/vstudio/README.txt. -XVI. Other sources of information about libpng: +XVIII. Other sources of information about libpng: Further information can be found in the README and libpng-manual.txt files, in the individual makefiles, in png.h, and the manual pages libpng.3 and png.5. -Copyright (c) 2022 Cosmin Truta Copyright (c) 1998-2002,2006-2016 Glenn Randers-Pehrson This document is released under the libpng license. For conditions of distribution and use, see the disclaimer diff --git a/Engine/lib/lpng/LICENSE b/Engine/lib/lpng/LICENSE index ea6df986c..e0c5b531c 100644 --- a/Engine/lib/lpng/LICENSE +++ b/Engine/lib/lpng/LICENSE @@ -4,8 +4,8 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE PNG Reference Library License version 2 --------------------------------------- - * Copyright (c) 1995-2025 The PNG Reference Library Authors. - * Copyright (c) 2018-2025 Cosmin Truta. + * Copyright (c) 1995-2019 The PNG Reference Library Authors. + * Copyright (c) 2018-2019 Cosmin Truta. * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson. * Copyright (c) 1996-1997 Andreas Dilger. * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. diff --git a/Engine/lib/lpng/Makefile.am b/Engine/lib/lpng/Makefile.am index 455b6cfc4..4f621aa4d 100644 --- a/Engine/lib/lpng/Makefile.am +++ b/Engine/lib/lpng/Makefile.am @@ -1,6 +1,6 @@ # Makefile.am, the source file for Makefile.in (and hence Makefile), is # -# Copyright (c) 2018-2025 Cosmin Truta +# Copyright (c) 2018 Cosmin Truta # Copyright (c) 2004-2016 Glenn Randers-Pehrson # # This code is released under the libpng license. @@ -9,24 +9,16 @@ PNGLIB_BASENAME= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ -ACLOCAL_AMFLAGS = -I scripts/autoconf +ACLOCAL_AMFLAGS = -I scripts # test programs - run on make check, make distcheck -if ENABLE_TESTS check_PROGRAMS= pngtest pngunknown pngstest pngvalid pngimage pngcp if HAVE_CLOCK_GETTIME check_PROGRAMS += timepng endif -else -check_PROGRAMS= -endif # Utilities - installed -if ENABLE_TOOLS bin_PROGRAMS= pngfix png-fix-itxt -else -bin_PROGRAMS= -endif # This ensures that pnglibconf.h gets built at the start of 'make all' or # 'make check', but it does not add dependencies to the individual programs, @@ -38,7 +30,6 @@ endif # always wrong and always very confusing. BUILT_SOURCES = pnglibconf.h -if ENABLE_TESTS pngtest_SOURCES = pngtest.c pngtest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la @@ -57,22 +48,19 @@ pngimage_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la timepng_SOURCES = contrib/libtests/timepng.c timepng_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la -pngcp_SOURCES = contrib/tools/pngcp.c -pngcp_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la -endif - -if ENABLE_TOOLS pngfix_SOURCES = contrib/tools/pngfix.c pngfix_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la png_fix_itxt_SOURCES = contrib/tools/png-fix-itxt.c -endif + +pngcp_SOURCES = contrib/tools/pngcp.c +pngcp_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la # Generally these are single line shell scripts to run a test with a particular # set of parameters: -if ENABLE_TESTS TESTS =\ - tests/pngtest-all\ + tests/pngtest\ + tests/pngtest-badpngs\ tests/pngvalid-gamma-16-to-8 tests/pngvalid-gamma-alpha-mode\ tests/pngvalid-gamma-background tests/pngvalid-gamma-expand16-alpha-mode\ tests/pngvalid-gamma-expand16-background\ @@ -88,7 +76,6 @@ TESTS =\ tests/pngunknown-discard tests/pngunknown-if-safe tests/pngunknown-sAPI\ tests/pngunknown-sTER tests/pngunknown-save tests/pngunknown-vpAg\ tests/pngimage-quick tests/pngimage-full -endif # man pages dist_man_MANS= libpng.3 libpngpf.3 png.5 @@ -108,7 +95,7 @@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = png.c pngerror.c\ if PNG_ARM_NEON libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += arm/arm_init.c\ - arm/filter_neon_intrinsics.c \ + arm/filter_neon.S arm/filter_neon_intrinsics.c \ arm/palette_neon_intrinsics.c endif @@ -117,13 +104,6 @@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += mips/mips_init.c\ mips/filter_msa_intrinsics.c endif -if PNG_MIPS_MMI -if !PNG_MIPS_MSA -libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += mips/mips_init.c -endif -libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += mips/filter_mmi_inline_assembly.c -endif - if PNG_INTEL_SSE libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += intel/intel_init.c\ intel/filter_sse2_intrinsics.c @@ -134,22 +114,6 @@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += powerpc/powerpc_init.c\ powerpc/filter_vsx_intrinsics.c endif -if PNG_RISCV_RVV -noinst_LTLIBRARIES= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv.la -libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_SOURCES = riscv/riscv_init.c\ - riscv/filter_rvv_intrinsics.c -libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_CFLAGS = -march=rv64gv -libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LIBADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv.la -endif - -if PNG_LOONGARCH_LSX -noinst_LTLIBRARIES= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx.la -libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_SOURCES = loongarch/loongarch_lsx_init.c\ - loongarch/filter_lsx_intrinsics.c -libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_CFLAGS = -mlsx -libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LIBADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx.la -endif - nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = pnglibconf.h libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS = -no-undefined -export-dynamic \ @@ -170,14 +134,6 @@ else libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.sym endif -if PNG_RISCV_RVV - libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES += libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv.la -endif - -if PNG_LOONGARCH_LSX - libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES += libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx.la -endif - #distribute headers in /usr/include/libpng/* pkgincludedir= $(includedir)/$(PNGLIB_BASENAME) pkginclude_HEADERS= png.h pngconf.h @@ -194,7 +150,7 @@ pkgconfig_DATA = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc EXTRA_DIST= \ ANNOUNCE AUTHORS CHANGES INSTALL LICENSE README TODO TRADEMARK \ pngtest.png pngbar.png pngnow.png pngbar.jpg autogen.sh \ - ${srcdir}/ci ${srcdir}/contrib ${srcdir}/projects ${srcdir}/scripts \ + ${srcdir}/contrib ${srcdir}/projects ${srcdir}/scripts \ $(TESTS) $(XFAIL_TESTS) tests/pngstest \ CMakeLists.txt example.c libpng-manual.txt @@ -210,7 +166,7 @@ MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \ config.sub configure depcomp install-sh ltmain.sh missing # PNG_COPTS give extra options for the C compiler to be used on all compilation -# steps (unless target_CFLAGS is specified; that will take precedence over +# steps (unless targe_CFLAGS is specified; that will take precedence over # AM_CFLAGS) PNG_COPTS = @PNG_COPTS@ AM_CFLAGS = ${PNG_COPTS} diff --git a/Engine/lib/lpng/Makefile.in b/Engine/lib/lpng/Makefile.in index 569df36e6..81ac1c855 100644 --- a/Engine/lib/lpng/Makefile.in +++ b/Engine/lib/lpng/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.18.1 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2025 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,7 @@ # Makefile.am, the source file for Makefile.in (and hence Makefile), is # -# Copyright (c) 2018-2025 Cosmin Truta +# Copyright (c) 2018 Cosmin Truta # Copyright (c) 2004-2016 Glenn Randers-Pehrson # # This code is released under the libpng license. @@ -83,8 +83,6 @@ am__make_running_with_option = \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -am__rm_f = rm -f $(am__rm_f_notfound) -am__rm_rf = rm -rf $(am__rm_f_notfound) pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ @@ -102,44 +100,38 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -@ENABLE_TESTS_TRUE@check_PROGRAMS = pngtest$(EXEEXT) \ -@ENABLE_TESTS_TRUE@ pngunknown$(EXEEXT) pngstest$(EXEEXT) \ -@ENABLE_TESTS_TRUE@ pngvalid$(EXEEXT) pngimage$(EXEEXT) \ -@ENABLE_TESTS_TRUE@ pngcp$(EXEEXT) $(am__EXEEXT_1) -@ENABLE_TESTS_TRUE@@HAVE_CLOCK_GETTIME_TRUE@am__append_1 = timepng -@ENABLE_TOOLS_TRUE@bin_PROGRAMS = pngfix$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ png-fix-itxt$(EXEEXT) +check_PROGRAMS = pngtest$(EXEEXT) pngunknown$(EXEEXT) \ + pngstest$(EXEEXT) pngvalid$(EXEEXT) pngimage$(EXEEXT) \ + pngcp$(EXEEXT) $(am__EXEEXT_1) +@HAVE_CLOCK_GETTIME_TRUE@am__append_1 = timepng +bin_PROGRAMS = pngfix$(EXEEXT) png-fix-itxt$(EXEEXT) @PNG_ARM_NEON_TRUE@am__append_2 = arm/arm_init.c\ -@PNG_ARM_NEON_TRUE@ arm/filter_neon_intrinsics.c \ +@PNG_ARM_NEON_TRUE@ arm/filter_neon.S arm/filter_neon_intrinsics.c \ @PNG_ARM_NEON_TRUE@ arm/palette_neon_intrinsics.c @PNG_MIPS_MSA_TRUE@am__append_3 = mips/mips_init.c\ @PNG_MIPS_MSA_TRUE@ mips/filter_msa_intrinsics.c -@PNG_MIPS_MMI_TRUE@@PNG_MIPS_MSA_FALSE@am__append_4 = mips/mips_init.c -@PNG_MIPS_MMI_TRUE@am__append_5 = mips/filter_mmi_inline_assembly.c -@PNG_INTEL_SSE_TRUE@am__append_6 = intel/intel_init.c\ +@PNG_INTEL_SSE_TRUE@am__append_4 = intel/intel_init.c\ @PNG_INTEL_SSE_TRUE@ intel/filter_sse2_intrinsics.c -@PNG_POWERPC_VSX_TRUE@am__append_7 = powerpc/powerpc_init.c\ +@PNG_POWERPC_VSX_TRUE@am__append_5 = powerpc/powerpc_init.c\ @PNG_POWERPC_VSX_TRUE@ powerpc/filter_vsx_intrinsics.c # Versioned symbols and restricted exports -@HAVE_LD_VERSION_SCRIPT_TRUE@@HAVE_SOLARIS_LD_TRUE@am__append_8 = -Wl,-M -Wl,libpng.vers -@HAVE_LD_VERSION_SCRIPT_TRUE@@HAVE_SOLARIS_LD_FALSE@am__append_9 = -Wl,--version-script=libpng.vers +@HAVE_LD_VERSION_SCRIPT_TRUE@@HAVE_SOLARIS_LD_TRUE@am__append_6 = -Wl,-M -Wl,libpng.vers +@HAVE_LD_VERSION_SCRIPT_TRUE@@HAVE_SOLARIS_LD_FALSE@am__append_7 = -Wl,--version-script=libpng.vers # Only restricted exports when possible -@HAVE_LD_VERSION_SCRIPT_FALSE@am__append_10 = -export-symbols libpng.sym -@PNG_RISCV_RVV_TRUE@am__append_11 = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv.la -@PNG_LOONGARCH_LSX_TRUE@am__append_12 = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx.la -@DO_PNG_PREFIX_TRUE@am__append_13 = -DPNG_PREFIX='@PNG_PREFIX@' +@HAVE_LD_VERSION_SCRIPT_FALSE@am__append_8 = -export-symbols libpng.sym +@DO_PNG_PREFIX_TRUE@am__append_9 = -DPNG_PREFIX='@PNG_PREFIX@' subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/scripts/autoconf/libtool.m4 \ - $(top_srcdir)/scripts/autoconf/ltoptions.m4 \ - $(top_srcdir)/scripts/autoconf/ltsugar.m4 \ - $(top_srcdir)/scripts/autoconf/ltversion.m4 \ - $(top_srcdir)/scripts/autoconf/lt~obsolete.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/scripts/libtool.m4 \ + $(top_srcdir)/scripts/ltoptions.m4 \ + $(top_srcdir)/scripts/ltsugar.m4 \ + $(top_srcdir)/scripts/ltversion.m4 \ + $(top_srcdir)/scripts/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -155,8 +147,7 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man3dir)" \ "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(pkgconfigdir)" \ "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(pkgincludedir)" -@ENABLE_TESTS_TRUE@@HAVE_CLOCK_GETTIME_TRUE@am__EXEEXT_1 = \ -@ENABLE_TESTS_TRUE@@HAVE_CLOCK_GETTIME_TRUE@ timepng$(EXEEXT) +@HAVE_CLOCK_GETTIME_TRUE@am__EXEEXT_1 = timepng$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ @@ -180,40 +171,38 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ - { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ } -LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) +LTLIBRARIES = $(lib_LTLIBRARIES) +libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LIBADD = am__libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES_DIST = png.c \ pngerror.c pngget.c pngmem.c pngpread.c pngread.c pngrio.c \ pngrtran.c pngrutil.c pngset.c pngtrans.c pngwio.c pngwrite.c \ pngwtran.c pngwutil.c png.h pngconf.h pngdebug.h pnginfo.h \ pngpriv.h pngstruct.h pngusr.dfa arm/arm_init.c \ - arm/filter_neon_intrinsics.c arm/palette_neon_intrinsics.c \ - mips/mips_init.c mips/filter_msa_intrinsics.c \ - mips/filter_mmi_inline_assembly.c intel/intel_init.c \ + arm/filter_neon.S arm/filter_neon_intrinsics.c \ + arm/palette_neon_intrinsics.c mips/mips_init.c \ + mips/filter_msa_intrinsics.c intel/intel_init.c \ intel/filter_sse2_intrinsics.c powerpc/powerpc_init.c \ powerpc/filter_vsx_intrinsics.c am__dirstamp = $(am__leading_dot)dirstamp -@PNG_ARM_NEON_TRUE@am__objects_1 = arm/arm_init.lo \ +@PNG_ARM_NEON_TRUE@am__objects_1 = arm/arm_init.lo arm/filter_neon.lo \ @PNG_ARM_NEON_TRUE@ arm/filter_neon_intrinsics.lo \ @PNG_ARM_NEON_TRUE@ arm/palette_neon_intrinsics.lo @PNG_MIPS_MSA_TRUE@am__objects_2 = mips/mips_init.lo \ @PNG_MIPS_MSA_TRUE@ mips/filter_msa_intrinsics.lo -@PNG_MIPS_MMI_TRUE@@PNG_MIPS_MSA_FALSE@am__objects_3 = \ -@PNG_MIPS_MMI_TRUE@@PNG_MIPS_MSA_FALSE@ mips/mips_init.lo -@PNG_MIPS_MMI_TRUE@am__objects_4 = mips/filter_mmi_inline_assembly.lo -@PNG_INTEL_SSE_TRUE@am__objects_5 = intel/intel_init.lo \ +@PNG_INTEL_SSE_TRUE@am__objects_3 = intel/intel_init.lo \ @PNG_INTEL_SSE_TRUE@ intel/filter_sse2_intrinsics.lo -@PNG_POWERPC_VSX_TRUE@am__objects_6 = powerpc/powerpc_init.lo \ +@PNG_POWERPC_VSX_TRUE@am__objects_4 = powerpc/powerpc_init.lo \ @PNG_POWERPC_VSX_TRUE@ powerpc/filter_vsx_intrinsics.lo am_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS = png.lo pngerror.lo \ pngget.lo pngmem.lo pngpread.lo pngread.lo pngrio.lo \ pngrtran.lo pngrutil.lo pngset.lo pngtrans.lo pngwio.lo \ pngwrite.lo pngwtran.lo pngwutil.lo $(am__objects_1) \ - $(am__objects_2) $(am__objects_3) $(am__objects_4) \ - $(am__objects_5) $(am__objects_6) + $(am__objects_2) $(am__objects_3) $(am__objects_4) nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS = \ $(am_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS) \ @@ -227,81 +216,33 @@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LINK = $(LIBTOOL) $(AM_V_lt) \ $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS) $(LDFLAGS) -o \ $@ -libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_LIBADD = -am__libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_SOURCES_DIST = \ - loongarch/loongarch_lsx_init.c \ - loongarch/filter_lsx_intrinsics.c -@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 \ -@PNG_LOONGARCH_LSX_TRUE@ loongarch/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-filter_lsx_intrinsics.lo -libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_OBJECTS = \ - $(am_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_OBJECTS) -libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_LINK = $(LIBTOOL) $(AM_V_lt) \ - --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ - $(CCLD) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_CFLAGS) \ - $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -@PNG_LOONGARCH_LSX_TRUE@am_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_rpath = -libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_LIBADD = -am__libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_SOURCES_DIST = \ - riscv/riscv_init.c riscv/filter_rvv_intrinsics.c -@PNG_RISCV_RVV_TRUE@am_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_OBJECTS = riscv/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-riscv_init.lo \ -@PNG_RISCV_RVV_TRUE@ riscv/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-filter_rvv_intrinsics.lo -libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_OBJECTS = \ - $(am_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_OBJECTS) -libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_LINK = $(LIBTOOL) $(AM_V_lt) \ - --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ - $(CCLD) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_CFLAGS) \ - $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -@PNG_RISCV_RVV_TRUE@am_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_rpath = -am__png_fix_itxt_SOURCES_DIST = contrib/tools/png-fix-itxt.c -@ENABLE_TOOLS_TRUE@am_png_fix_itxt_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ contrib/tools/png-fix-itxt.$(OBJEXT) +am_png_fix_itxt_OBJECTS = contrib/tools/png-fix-itxt.$(OBJEXT) png_fix_itxt_OBJECTS = $(am_png_fix_itxt_OBJECTS) png_fix_itxt_LDADD = $(LDADD) -am__pngcp_SOURCES_DIST = contrib/tools/pngcp.c -@ENABLE_TESTS_TRUE@am_pngcp_OBJECTS = contrib/tools/pngcp.$(OBJEXT) +am_pngcp_OBJECTS = contrib/tools/pngcp.$(OBJEXT) pngcp_OBJECTS = $(am_pngcp_OBJECTS) -@ENABLE_TESTS_TRUE@pngcp_DEPENDENCIES = \ -@ENABLE_TESTS_TRUE@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la -am__pngfix_SOURCES_DIST = contrib/tools/pngfix.c -@ENABLE_TOOLS_TRUE@am_pngfix_OBJECTS = contrib/tools/pngfix.$(OBJEXT) +pngcp_DEPENDENCIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la +am_pngfix_OBJECTS = contrib/tools/pngfix.$(OBJEXT) pngfix_OBJECTS = $(am_pngfix_OBJECTS) -@ENABLE_TOOLS_TRUE@pngfix_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la -am__pngimage_SOURCES_DIST = contrib/libtests/pngimage.c -@ENABLE_TESTS_TRUE@am_pngimage_OBJECTS = \ -@ENABLE_TESTS_TRUE@ contrib/libtests/pngimage.$(OBJEXT) +pngfix_DEPENDENCIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la +am_pngimage_OBJECTS = contrib/libtests/pngimage.$(OBJEXT) pngimage_OBJECTS = $(am_pngimage_OBJECTS) -@ENABLE_TESTS_TRUE@pngimage_DEPENDENCIES = \ -@ENABLE_TESTS_TRUE@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la -am__pngstest_SOURCES_DIST = contrib/libtests/pngstest.c -@ENABLE_TESTS_TRUE@am_pngstest_OBJECTS = \ -@ENABLE_TESTS_TRUE@ contrib/libtests/pngstest.$(OBJEXT) +pngimage_DEPENDENCIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la +am_pngstest_OBJECTS = contrib/libtests/pngstest.$(OBJEXT) pngstest_OBJECTS = $(am_pngstest_OBJECTS) -@ENABLE_TESTS_TRUE@pngstest_DEPENDENCIES = \ -@ENABLE_TESTS_TRUE@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la -am__pngtest_SOURCES_DIST = pngtest.c -@ENABLE_TESTS_TRUE@am_pngtest_OBJECTS = pngtest.$(OBJEXT) +pngstest_DEPENDENCIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la +am_pngtest_OBJECTS = pngtest.$(OBJEXT) pngtest_OBJECTS = $(am_pngtest_OBJECTS) -@ENABLE_TESTS_TRUE@pngtest_DEPENDENCIES = \ -@ENABLE_TESTS_TRUE@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la -am__pngunknown_SOURCES_DIST = contrib/libtests/pngunknown.c -@ENABLE_TESTS_TRUE@am_pngunknown_OBJECTS = \ -@ENABLE_TESTS_TRUE@ contrib/libtests/pngunknown.$(OBJEXT) +pngtest_DEPENDENCIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la +am_pngunknown_OBJECTS = contrib/libtests/pngunknown.$(OBJEXT) pngunknown_OBJECTS = $(am_pngunknown_OBJECTS) -@ENABLE_TESTS_TRUE@pngunknown_DEPENDENCIES = \ -@ENABLE_TESTS_TRUE@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la -am__pngvalid_SOURCES_DIST = contrib/libtests/pngvalid.c -@ENABLE_TESTS_TRUE@am_pngvalid_OBJECTS = \ -@ENABLE_TESTS_TRUE@ contrib/libtests/pngvalid.$(OBJEXT) +pngunknown_DEPENDENCIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la +am_pngvalid_OBJECTS = contrib/libtests/pngvalid.$(OBJEXT) pngvalid_OBJECTS = $(am_pngvalid_OBJECTS) -@ENABLE_TESTS_TRUE@pngvalid_DEPENDENCIES = \ -@ENABLE_TESTS_TRUE@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la -am__timepng_SOURCES_DIST = contrib/libtests/timepng.c -@ENABLE_TESTS_TRUE@am_timepng_OBJECTS = \ -@ENABLE_TESTS_TRUE@ contrib/libtests/timepng.$(OBJEXT) +pngvalid_DEPENDENCIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la +am_timepng_OBJECTS = contrib/libtests/timepng.$(OBJEXT) timepng_OBJECTS = $(am_timepng_OBJECTS) -@ENABLE_TESTS_TRUE@timepng_DEPENDENCIES = \ -@ENABLE_TESTS_TRUE@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la +timepng_DEPENDENCIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la SCRIPTS = $(bin_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -326,7 +267,7 @@ am__depfiles_remade = ./$(DEPDIR)/png.Plo ./$(DEPDIR)/pngerror.Plo \ ./$(DEPDIR)/pngtest.Po ./$(DEPDIR)/pngtrans.Plo \ ./$(DEPDIR)/pngwio.Plo ./$(DEPDIR)/pngwrite.Plo \ ./$(DEPDIR)/pngwtran.Plo ./$(DEPDIR)/pngwutil.Plo \ - arm/$(DEPDIR)/arm_init.Plo \ + arm/$(DEPDIR)/arm_init.Plo arm/$(DEPDIR)/filter_neon.Plo \ arm/$(DEPDIR)/filter_neon_intrinsics.Plo \ arm/$(DEPDIR)/palette_neon_intrinsics.Plo \ contrib/libtests/$(DEPDIR)/pngimage.Po \ @@ -339,16 +280,21 @@ am__depfiles_remade = ./$(DEPDIR)/png.Plo ./$(DEPDIR)/pngerror.Plo \ contrib/tools/$(DEPDIR)/pngfix.Po \ intel/$(DEPDIR)/filter_sse2_intrinsics.Plo \ intel/$(DEPDIR)/intel_init.Plo \ - loongarch/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-filter_lsx_intrinsics.Plo \ - loongarch/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-loongarch_lsx_init.Plo \ - mips/$(DEPDIR)/filter_mmi_inline_assembly.Plo \ mips/$(DEPDIR)/filter_msa_intrinsics.Plo \ mips/$(DEPDIR)/mips_init.Plo \ powerpc/$(DEPDIR)/filter_vsx_intrinsics.Plo \ - powerpc/$(DEPDIR)/powerpc_init.Plo \ - riscv/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-filter_rvv_intrinsics.Plo \ - riscv/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-riscv_init.Plo + powerpc/$(DEPDIR)/powerpc_init.Plo am__mv = mv -f +CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) +LTCPPASCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CCASFLAGS) $(CCASFLAGS) +AM_V_CPPAS = $(am__v_CPPAS_@AM_V@) +am__v_CPPAS_ = $(am__v_CPPAS_@AM_DEFAULT_V@) +am__v_CPPAS_0 = @echo " CPPAS " $@; +am__v_CPPAS_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -369,20 +315,14 @@ am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES) \ $(nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES) \ - $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_SOURCES) \ - $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_SOURCES) \ $(png_fix_itxt_SOURCES) $(pngcp_SOURCES) $(pngfix_SOURCES) \ $(pngimage_SOURCES) $(pngstest_SOURCES) $(pngtest_SOURCES) \ $(pngunknown_SOURCES) $(pngvalid_SOURCES) $(timepng_SOURCES) DIST_SOURCES = \ $(am__libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES_DIST) \ - $(am__libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_SOURCES_DIST) \ - $(am__libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_SOURCES_DIST) \ - $(am__png_fix_itxt_SOURCES_DIST) $(am__pngcp_SOURCES_DIST) \ - $(am__pngfix_SOURCES_DIST) $(am__pngimage_SOURCES_DIST) \ - $(am__pngstest_SOURCES_DIST) $(am__pngtest_SOURCES_DIST) \ - $(am__pngunknown_SOURCES_DIST) $(am__pngvalid_SOURCES_DIST) \ - $(am__timepng_SOURCES_DIST) + $(png_fix_itxt_SOURCES) $(pngcp_SOURCES) $(pngfix_SOURCES) \ + $(pngimage_SOURCES) $(pngstest_SOURCES) $(pngtest_SOURCES) \ + $(pngunknown_SOURCES) $(pngvalid_SOURCES) $(timepng_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -394,8 +334,8 @@ NROFF = nroff MANS = $(dist_man_MANS) DATA = $(pkgconfig_DATA) HEADERS = $(nodist_pkginclude_HEADERS) $(pkginclude_HEADERS) -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ - config.h.in +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. @@ -412,6 +352,9 @@ am__define_uniq_tagged_files = \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +CSCOPE = cscope AM_RECURSIVE_TARGETS = cscope check recheck am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ @@ -521,13 +464,12 @@ am__sh_e_setup = case $$- in *e*) set +e;; esac # Default flags passed to test drivers. am__common_driver_flags = \ --color-tests "$$am__color_tests" \ - $$am__collect_skipped_logs \ --enable-hard-errors "$$am__enable_hard_errors" \ --expect-failure "$$am__expect_failure" # To be inserted before the command running the test. Creates the # directory for the log if needed. Stores in $dir the directory # containing $f, in $tst the test, in $log the log. Executes the -# developer-defined test setup AM_TESTS_ENVIRONMENT (if any), and +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and # passes TESTS_ENVIRONMENT. Set up options for the wrapper that # will run the test scripts (or their associated LOG_COMPILER, if # thy have one). @@ -546,11 +488,6 @@ if test -f "./$$f"; then dir=./; \ elif test -f "$$f"; then dir=; \ else dir="$(srcdir)/"; fi; \ tst=$$dir$$f; log='$@'; \ -if test -n '$(IGNORE_SKIPPED_LOGS)'; then \ - am__collect_skipped_logs='--collect-skipped-logs no'; \ -else \ - am__collect_skipped_logs=''; \ -fi; \ if test -n '$(DISABLE_HARD_ERRORS)'; then \ am__enable_hard_errors=no; \ else \ @@ -574,7 +511,6 @@ am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` -AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test @@ -606,22 +542,18 @@ distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ - find "$(distdir)" -type d ! -perm -700 -exec chmod u+rwx {} ';' \ - ; rm -rf "$(distdir)" \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.xz -GZIP_ENV = -9 +GZIP_ENV = --best DIST_TARGETS = dist-xz dist-gzip -# Exists only to be overridden by the user if desired. -AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' -distcleancheck_listfiles = \ - find . \( -type f -a \! \ - \( -name .nfs* -o -name .smb* -o -name .__afs* \) \) -print +distcleancheck_listfiles = find . -type f -print #distribute headers in /usr/include/libpng/* pkgincludedir = $(includedir)/$(PNGLIB_BASENAME) @@ -642,8 +574,6 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CSCOPE = @CSCOPE@ -CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -661,10 +591,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -704,10 +632,11 @@ PNGLIB_RELEASE = @PNGLIB_RELEASE@ PNGLIB_VERSION = @PNGLIB_VERSION@ # PNG_COPTS give extra options for the C compiler to be used on all compilation -# steps (unless target_CFLAGS is specified; that will take precedence over +# steps (unless targe_CFLAGS is specified; that will take precedence over # AM_CFLAGS) PNG_COPTS = @PNG_COPTS@ PNG_PREFIX = @PNG_PREFIX@ +POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -725,10 +654,8 @@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ -am__rm_f_notfound = @am__rm_f_notfound@ am__tar = @am__tar@ am__untar = @am__untar@ -am__xargs_n = @am__xargs_n@ # generate the -config scripts if required binconfigs = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config @@ -768,7 +695,6 @@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -778,7 +704,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ PNGLIB_BASENAME = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ -ACLOCAL_AMFLAGS = -I scripts/autoconf +ACLOCAL_AMFLAGS = -I scripts # This ensures that pnglibconf.h gets built at the start of 'make all' or # 'make check', but it does not add dependencies to the individual programs, @@ -789,43 +715,44 @@ ACLOCAL_AMFLAGS = -I scripts/autoconf # result in the installed (system) pnglibconf.h being used and the result is # always wrong and always very confusing. BUILT_SOURCES = pnglibconf.h -@ENABLE_TESTS_TRUE@pngtest_SOURCES = pngtest.c -@ENABLE_TESTS_TRUE@pngtest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la -@ENABLE_TESTS_TRUE@pngvalid_SOURCES = contrib/libtests/pngvalid.c -@ENABLE_TESTS_TRUE@pngvalid_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la -@ENABLE_TESTS_TRUE@pngstest_SOURCES = contrib/libtests/pngstest.c -@ENABLE_TESTS_TRUE@pngstest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la -@ENABLE_TESTS_TRUE@pngunknown_SOURCES = contrib/libtests/pngunknown.c -@ENABLE_TESTS_TRUE@pngunknown_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la -@ENABLE_TESTS_TRUE@pngimage_SOURCES = contrib/libtests/pngimage.c -@ENABLE_TESTS_TRUE@pngimage_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la -@ENABLE_TESTS_TRUE@timepng_SOURCES = contrib/libtests/timepng.c -@ENABLE_TESTS_TRUE@timepng_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la -@ENABLE_TESTS_TRUE@pngcp_SOURCES = contrib/tools/pngcp.c -@ENABLE_TESTS_TRUE@pngcp_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la -@ENABLE_TOOLS_TRUE@pngfix_SOURCES = contrib/tools/pngfix.c -@ENABLE_TOOLS_TRUE@pngfix_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la -@ENABLE_TOOLS_TRUE@png_fix_itxt_SOURCES = contrib/tools/png-fix-itxt.c +pngtest_SOURCES = pngtest.c +pngtest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la +pngvalid_SOURCES = contrib/libtests/pngvalid.c +pngvalid_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la +pngstest_SOURCES = contrib/libtests/pngstest.c +pngstest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la +pngunknown_SOURCES = contrib/libtests/pngunknown.c +pngunknown_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la +pngimage_SOURCES = contrib/libtests/pngimage.c +pngimage_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la +timepng_SOURCES = contrib/libtests/timepng.c +timepng_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la +pngfix_SOURCES = contrib/tools/pngfix.c +pngfix_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la +png_fix_itxt_SOURCES = contrib/tools/png-fix-itxt.c +pngcp_SOURCES = contrib/tools/pngcp.c +pngcp_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la # Generally these are single line shell scripts to run a test with a particular # set of parameters: -@ENABLE_TESTS_TRUE@TESTS = \ -@ENABLE_TESTS_TRUE@ tests/pngtest-all\ -@ENABLE_TESTS_TRUE@ tests/pngvalid-gamma-16-to-8 tests/pngvalid-gamma-alpha-mode\ -@ENABLE_TESTS_TRUE@ tests/pngvalid-gamma-background tests/pngvalid-gamma-expand16-alpha-mode\ -@ENABLE_TESTS_TRUE@ tests/pngvalid-gamma-expand16-background\ -@ENABLE_TESTS_TRUE@ tests/pngvalid-gamma-expand16-transform tests/pngvalid-gamma-sbit\ -@ENABLE_TESTS_TRUE@ tests/pngvalid-gamma-threshold tests/pngvalid-gamma-transform\ -@ENABLE_TESTS_TRUE@ tests/pngvalid-progressive-size\ -@ENABLE_TESTS_TRUE@ tests/pngvalid-progressive-interlace-standard\ -@ENABLE_TESTS_TRUE@ tests/pngvalid-transform\ -@ENABLE_TESTS_TRUE@ tests/pngvalid-progressive-standard tests/pngvalid-standard\ -@ENABLE_TESTS_TRUE@ tests/pngstest-1.8 tests/pngstest-1.8-alpha tests/pngstest-linear\ -@ENABLE_TESTS_TRUE@ tests/pngstest-linear-alpha tests/pngstest-none tests/pngstest-none-alpha\ -@ENABLE_TESTS_TRUE@ tests/pngstest-sRGB tests/pngstest-sRGB-alpha tests/pngunknown-IDAT\ -@ENABLE_TESTS_TRUE@ tests/pngunknown-discard tests/pngunknown-if-safe tests/pngunknown-sAPI\ -@ENABLE_TESTS_TRUE@ tests/pngunknown-sTER tests/pngunknown-save tests/pngunknown-vpAg\ -@ENABLE_TESTS_TRUE@ tests/pngimage-quick tests/pngimage-full +TESTS = \ + tests/pngtest\ + tests/pngtest-badpngs\ + tests/pngvalid-gamma-16-to-8 tests/pngvalid-gamma-alpha-mode\ + tests/pngvalid-gamma-background tests/pngvalid-gamma-expand16-alpha-mode\ + tests/pngvalid-gamma-expand16-background\ + tests/pngvalid-gamma-expand16-transform tests/pngvalid-gamma-sbit\ + tests/pngvalid-gamma-threshold tests/pngvalid-gamma-transform\ + tests/pngvalid-progressive-size\ + tests/pngvalid-progressive-interlace-standard\ + tests/pngvalid-transform\ + tests/pngvalid-progressive-standard tests/pngvalid-standard\ + tests/pngstest-1.8 tests/pngstest-1.8-alpha tests/pngstest-linear\ + tests/pngstest-linear-alpha tests/pngstest-none tests/pngstest-none-alpha\ + tests/pngstest-sRGB tests/pngstest-sRGB-alpha tests/pngunknown-IDAT\ + tests/pngunknown-discard tests/pngunknown-if-safe tests/pngunknown-sAPI\ + tests/pngunknown-sTER tests/pngunknown-save tests/pngunknown-vpAg\ + tests/pngimage-quick tests/pngimage-full # man pages @@ -841,31 +768,14 @@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = png.c pngerror.c \ pngrutil.c pngset.c pngtrans.c pngwio.c pngwrite.c pngwtran.c \ pngwutil.c png.h pngconf.h pngdebug.h pnginfo.h pngpriv.h \ pngstruct.h pngusr.dfa $(am__append_2) $(am__append_3) \ - $(am__append_4) $(am__append_5) $(am__append_6) \ - $(am__append_7) -@PNG_LOONGARCH_LSX_TRUE@noinst_LTLIBRARIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx.la -@PNG_RISCV_RVV_TRUE@noinst_LTLIBRARIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv.la -@PNG_RISCV_RVV_TRUE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_SOURCES = riscv/riscv_init.c\ -@PNG_RISCV_RVV_TRUE@ riscv/filter_rvv_intrinsics.c - -@PNG_RISCV_RVV_TRUE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_CFLAGS = -march=rv64gv -@PNG_LOONGARCH_LSX_TRUE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LIBADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx.la -@PNG_RISCV_RVV_TRUE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LIBADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv.la -@PNG_LOONGARCH_LSX_TRUE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_SOURCES = loongarch/loongarch_lsx_init.c\ -@PNG_LOONGARCH_LSX_TRUE@ loongarch/filter_lsx_intrinsics.c - -@PNG_LOONGARCH_LSX_TRUE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_CFLAGS = -mlsx + $(am__append_4) $(am__append_5) nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = pnglibconf.h libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS = -no-undefined \ -export-dynamic -version-number \ @PNGLIB_MAJOR@@PNGLIB_MINOR@:@PNGLIB_RELEASE@:0 \ - $(am__append_8) $(am__append_9) $(am__append_10) -@HAVE_LD_VERSION_SCRIPT_FALSE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = \ -@HAVE_LD_VERSION_SCRIPT_FALSE@ libpng.sym $(am__append_11) \ -@HAVE_LD_VERSION_SCRIPT_FALSE@ $(am__append_12) -@HAVE_LD_VERSION_SCRIPT_TRUE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = \ -@HAVE_LD_VERSION_SCRIPT_TRUE@ libpng.vers $(am__append_11) \ -@HAVE_LD_VERSION_SCRIPT_TRUE@ $(am__append_12) + $(am__append_6) $(am__append_7) $(am__append_8) +@HAVE_LD_VERSION_SCRIPT_FALSE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.sym +@HAVE_LD_VERSION_SCRIPT_TRUE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.vers pkginclude_HEADERS = png.h pngconf.h nodist_pkginclude_HEADERS = pnglibconf.h pkgconfig_DATA = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc @@ -876,7 +786,7 @@ pkgconfig_DATA = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc EXTRA_DIST = \ ANNOUNCE AUTHORS CHANGES INSTALL LICENSE README TODO TRADEMARK \ pngtest.png pngbar.png pngnow.png pngbar.jpg autogen.sh \ - ${srcdir}/ci ${srcdir}/contrib ${srcdir}/projects ${srcdir}/scripts \ + ${srcdir}/contrib ${srcdir}/projects ${srcdir}/scripts \ $(TESTS) $(XFAIL_TESTS) tests/pngstest \ CMakeLists.txt example.c libpng-manual.txt @@ -899,7 +809,7 @@ SUFFIXES = .chk .out SYMBOL_CFLAGS = -DPNGLIB_LIBNAME='PNG@PNGLIB_MAJOR@@PNGLIB_MINOR@_0' \ -DPNGLIB_VERSION='@PNGLIB_VERSION@' \ -DSYMBOL_PREFIX='$(SYMBOL_PREFIX)' -DPNG_NO_USE_READ_MACROS \ - -DPNG_BUILDING_SYMBOL_TABLE $(am__append_13) + -DPNG_BUILDING_SYMBOL_TABLE $(am__append_9) # EXT_LIST is a list of the possibly library directory extensions, this exists # because we can't find a good way of discovering the file extensions that are @@ -910,7 +820,7 @@ all: $(BUILT_SOURCES) config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: -.SUFFIXES: .chk .out .c .lo .log .o .obj .test .test$(EXEEXT) .trs +.SUFFIXES: .chk .out .S .c .lo .log .o .obj .test .test$(EXEEXT) .trs am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @@ -950,12 +860,12 @@ config.h: stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status - $(AM_V_at)rm -f stamp-h1 - $(AM_V_GEN)cd $(top_builddir) && $(SHELL) ./config.status config.h + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - $(AM_V_GEN)($(am__cd) $(top_srcdir) && $(AUTOHEADER)) - $(AM_V_at)rm -f stamp-h1 - $(AM_V_at)touch $@ + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f stamp-h1 + touch $@ distclean-hdr: -rm -f config.h stamp-h1 @@ -1002,15 +912,25 @@ uninstall-binPROGRAMS: `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && $(am__rm_f) $$files + cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: - $(am__rm_f) $(bin_PROGRAMS) - test -z "$(EXEEXT)" || $(am__rm_f) $(bin_PROGRAMS:$(EXEEXT)=) + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list clean-checkPROGRAMS: - $(am__rm_f) $(check_PROGRAMS) - test -z "$(EXEEXT)" || $(am__rm_f) $(check_PROGRAMS:$(EXEEXT)=) + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @@ -1037,60 +957,52 @@ uninstall-libLTLIBRARIES: done clean-libLTLIBRARIES: - -$(am__rm_f) $(lib_LTLIBRARIES) + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ - echo rm -f $${locs}; \ - $(am__rm_f) $${locs} - -clean-noinstLTLIBRARIES: - -$(am__rm_f) $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; \ - locs=`for p in $$list; do echo $$p; done | \ - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ - sort -u`; \ - echo rm -f $${locs}; \ - $(am__rm_f) $${locs} + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } arm/$(am__dirstamp): @$(MKDIR_P) arm - @: >>arm/$(am__dirstamp) + @: > arm/$(am__dirstamp) arm/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) arm/$(DEPDIR) - @: >>arm/$(DEPDIR)/$(am__dirstamp) + @: > arm/$(DEPDIR)/$(am__dirstamp) arm/arm_init.lo: arm/$(am__dirstamp) arm/$(DEPDIR)/$(am__dirstamp) +arm/filter_neon.lo: arm/$(am__dirstamp) arm/$(DEPDIR)/$(am__dirstamp) arm/filter_neon_intrinsics.lo: arm/$(am__dirstamp) \ arm/$(DEPDIR)/$(am__dirstamp) arm/palette_neon_intrinsics.lo: arm/$(am__dirstamp) \ arm/$(DEPDIR)/$(am__dirstamp) mips/$(am__dirstamp): @$(MKDIR_P) mips - @: >>mips/$(am__dirstamp) + @: > mips/$(am__dirstamp) mips/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) mips/$(DEPDIR) - @: >>mips/$(DEPDIR)/$(am__dirstamp) + @: > mips/$(DEPDIR)/$(am__dirstamp) mips/mips_init.lo: mips/$(am__dirstamp) mips/$(DEPDIR)/$(am__dirstamp) mips/filter_msa_intrinsics.lo: mips/$(am__dirstamp) \ mips/$(DEPDIR)/$(am__dirstamp) -mips/filter_mmi_inline_assembly.lo: mips/$(am__dirstamp) \ - mips/$(DEPDIR)/$(am__dirstamp) intel/$(am__dirstamp): @$(MKDIR_P) intel - @: >>intel/$(am__dirstamp) + @: > intel/$(am__dirstamp) intel/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) intel/$(DEPDIR) - @: >>intel/$(DEPDIR)/$(am__dirstamp) + @: > intel/$(DEPDIR)/$(am__dirstamp) intel/intel_init.lo: intel/$(am__dirstamp) \ intel/$(DEPDIR)/$(am__dirstamp) intel/filter_sse2_intrinsics.lo: intel/$(am__dirstamp) \ intel/$(DEPDIR)/$(am__dirstamp) powerpc/$(am__dirstamp): @$(MKDIR_P) powerpc - @: >>powerpc/$(am__dirstamp) + @: > powerpc/$(am__dirstamp) powerpc/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) powerpc/$(DEPDIR) - @: >>powerpc/$(DEPDIR)/$(am__dirstamp) + @: > powerpc/$(DEPDIR)/$(am__dirstamp) powerpc/powerpc_init.lo: powerpc/$(am__dirstamp) \ powerpc/$(DEPDIR)/$(am__dirstamp) powerpc/filter_vsx_intrinsics.lo: powerpc/$(am__dirstamp) \ @@ -1098,38 +1010,12 @@ powerpc/filter_vsx_intrinsics.lo: powerpc/$(am__dirstamp) \ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la: $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES) $(EXTRA_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES) $(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) -loongarch/$(am__dirstamp): - @$(MKDIR_P) loongarch - @: >>loongarch/$(am__dirstamp) -loongarch/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) loongarch/$(DEPDIR) - @: >>loongarch/$(DEPDIR)/$(am__dirstamp) -loongarch/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-loongarch_lsx_init.lo: \ - loongarch/$(am__dirstamp) loongarch/$(DEPDIR)/$(am__dirstamp) -loongarch/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-filter_lsx_intrinsics.lo: \ - loongarch/$(am__dirstamp) loongarch/$(DEPDIR)/$(am__dirstamp) - -libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx.la: $(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) - $(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) -riscv/$(am__dirstamp): - @$(MKDIR_P) riscv - @: >>riscv/$(am__dirstamp) -riscv/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) riscv/$(DEPDIR) - @: >>riscv/$(DEPDIR)/$(am__dirstamp) -riscv/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-riscv_init.lo: \ - riscv/$(am__dirstamp) riscv/$(DEPDIR)/$(am__dirstamp) -riscv/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-filter_rvv_intrinsics.lo: \ - riscv/$(am__dirstamp) riscv/$(DEPDIR)/$(am__dirstamp) - -libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv.la: $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_OBJECTS) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_DEPENDENCIES) $(EXTRA_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_DEPENDENCIES) - $(AM_V_CCLD)$(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_LINK) $(am_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_rpath) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_OBJECTS) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_LIBADD) $(LIBS) contrib/tools/$(am__dirstamp): @$(MKDIR_P) contrib/tools - @: >>contrib/tools/$(am__dirstamp) + @: > contrib/tools/$(am__dirstamp) contrib/tools/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) contrib/tools/$(DEPDIR) - @: >>contrib/tools/$(DEPDIR)/$(am__dirstamp) + @: > contrib/tools/$(DEPDIR)/$(am__dirstamp) contrib/tools/png-fix-itxt.$(OBJEXT): contrib/tools/$(am__dirstamp) \ contrib/tools/$(DEPDIR)/$(am__dirstamp) @@ -1150,10 +1036,10 @@ pngfix$(EXEEXT): $(pngfix_OBJECTS) $(pngfix_DEPENDENCIES) $(EXTRA_pngfix_DEPENDE $(AM_V_CCLD)$(LINK) $(pngfix_OBJECTS) $(pngfix_LDADD) $(LIBS) contrib/libtests/$(am__dirstamp): @$(MKDIR_P) contrib/libtests - @: >>contrib/libtests/$(am__dirstamp) + @: > contrib/libtests/$(am__dirstamp) contrib/libtests/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) contrib/libtests/$(DEPDIR) - @: >>contrib/libtests/$(DEPDIR)/$(am__dirstamp) + @: > contrib/libtests/$(DEPDIR)/$(am__dirstamp) contrib/libtests/pngimage.$(OBJEXT): contrib/libtests/$(am__dirstamp) \ contrib/libtests/$(DEPDIR)/$(am__dirstamp) @@ -1233,14 +1119,10 @@ mostlyclean-compile: -rm -f contrib/tools/*.$(OBJEXT) -rm -f intel/*.$(OBJEXT) -rm -f intel/*.lo - -rm -f loongarch/*.$(OBJEXT) - -rm -f loongarch/*.lo -rm -f mips/*.$(OBJEXT) -rm -f mips/*.lo -rm -f powerpc/*.$(OBJEXT) -rm -f powerpc/*.lo - -rm -f riscv/*.$(OBJEXT) - -rm -f riscv/*.lo distclean-compile: -rm -f *.tab.c @@ -1262,6 +1144,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngwtran.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngwutil.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@arm/$(DEPDIR)/arm_init.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@arm/$(DEPDIR)/filter_neon.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@arm/$(DEPDIR)/filter_neon_intrinsics.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@arm/$(DEPDIR)/palette_neon_intrinsics.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@contrib/libtests/$(DEPDIR)/pngimage.Po@am__quote@ # am--include-marker @@ -1274,22 +1157,41 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@contrib/tools/$(DEPDIR)/pngfix.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@intel/$(DEPDIR)/filter_sse2_intrinsics.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@intel/$(DEPDIR)/intel_init.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@loongarch/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-filter_lsx_intrinsics.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@loongarch/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-loongarch_lsx_init.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@mips/$(DEPDIR)/filter_mmi_inline_assembly.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@mips/$(DEPDIR)/filter_msa_intrinsics.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@mips/$(DEPDIR)/mips_init.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@powerpc/$(DEPDIR)/filter_vsx_intrinsics.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@powerpc/$(DEPDIR)/powerpc_init.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@riscv/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-filter_rvv_intrinsics.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@riscv/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-riscv_init.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) - @: >>$@ + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) +.S.o: +@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ $< + +.S.obj: +@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.S.lo: +@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCCAS_TRUE@ $(LTCPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LTCPPASCOMPILE) -c -o $@ $< + .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @@ -1314,34 +1216,6 @@ am--depfiles: $(am__depfiles_remade) @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< -loongarch/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-loongarch_lsx_init.lo: loongarch/loongarch_lsx_init.c -@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 -@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 -@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@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@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 - -loongarch/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-filter_lsx_intrinsics.lo: loongarch/filter_lsx_intrinsics.c -@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 -@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 -@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@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@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 - -riscv/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-riscv_init.lo: riscv/riscv_init.c -@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@rvv_la_CFLAGS) $(CFLAGS) -MT riscv/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-riscv_init.lo -MD -MP -MF riscv/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-riscv_init.Tpo -c -o riscv/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-riscv_init.lo `test -f 'riscv/riscv_init.c' || echo '$(srcdir)/'`riscv/riscv_init.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) riscv/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-riscv_init.Tpo riscv/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-riscv_init.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='riscv/riscv_init.c' object='riscv/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-riscv_init.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@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@rvv_la_CFLAGS) $(CFLAGS) -c -o riscv/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-riscv_init.lo `test -f 'riscv/riscv_init.c' || echo '$(srcdir)/'`riscv/riscv_init.c - -riscv/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-filter_rvv_intrinsics.lo: riscv/filter_rvv_intrinsics.c -@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@rvv_la_CFLAGS) $(CFLAGS) -MT riscv/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-filter_rvv_intrinsics.lo -MD -MP -MF riscv/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-filter_rvv_intrinsics.Tpo -c -o riscv/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-filter_rvv_intrinsics.lo `test -f 'riscv/filter_rvv_intrinsics.c' || echo '$(srcdir)/'`riscv/filter_rvv_intrinsics.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) riscv/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-filter_rvv_intrinsics.Tpo riscv/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-filter_rvv_intrinsics.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='riscv/filter_rvv_intrinsics.c' object='riscv/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-filter_rvv_intrinsics.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@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@rvv_la_CFLAGS) $(CFLAGS) -c -o riscv/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-filter_rvv_intrinsics.lo `test -f 'riscv/filter_rvv_intrinsics.c' || echo '$(srcdir)/'`riscv/filter_rvv_intrinsics.c - mostlyclean-libtool: -rm -f *.lo @@ -1349,10 +1223,8 @@ clean-libtool: -rm -rf .libs _libs -rm -rf arm/.libs arm/_libs -rm -rf intel/.libs intel/_libs - -rm -rf loongarch/.libs loongarch/_libs -rm -rf mips/.libs mips/_libs -rm -rf powerpc/.libs powerpc/_libs - -rm -rf riscv/.libs riscv/_libs distclean-libtool: -rm -f libtool config.lt @@ -1578,6 +1450,7 @@ distclean-tags: am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) am--force-recheck: @: + $(TEST_SUITE_LOG): $(TEST_LOGS) @$(am__set_TESTS_bases); \ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ @@ -1653,37 +1526,10 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) result_count $$1 "XPASS:" $$xpass "$$red"; \ result_count $$1 "ERROR:" $$error "$$mgn"; \ }; \ - output_system_information () \ - { \ - echo; \ - { uname -a | $(AWK) '{ \ - printf "System information (uname -a):"; \ - for (i = 1; i < NF; ++i) \ - { \ - if (i != 2) \ - printf " %s", $$i; \ - } \ - printf "\n"; \ -}'; } 2>&1; \ - if test -r /etc/os-release; then \ - echo "Distribution information (/etc/os-release):"; \ - sed 8q /etc/os-release; \ - elif test -r /etc/issue; then \ - echo "Distribution information (/etc/issue):"; \ - cat /etc/issue; \ - fi; \ - }; \ - please_report () \ - { \ -echo "Some test(s) failed. Please report this to $(PACKAGE_BUGREPORT),"; \ -echo "together with the test-suite.log file (gzipped) and your system"; \ -echo "information. Thanks."; \ - }; \ { \ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ $(am__rst_title); \ create_testsuite_report --no-color; \ - output_system_information; \ echo; \ echo ".. contents:: :depth: 2"; \ echo; \ @@ -1698,30 +1544,31 @@ echo "information. Thanks."; \ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ if $$success; then :; else \ - echo "$${col}See $(subdir)/$(TEST_SUITE_LOG) for debugging.$${std}";\ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ if test -n "$(PACKAGE_BUGREPORT)"; then \ - please_report | sed -e "s/^/$${col}/" -e s/'$$'/"$${std}"/; \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ fi; \ echo "$$col$$br$$std"; \ fi; \ $$success || exit 1 check-TESTS: $(check_PROGRAMS) - @$(am__rm_f) $(RECHECK_LOGS) - @$(am__rm_f) $(RECHECK_LOGS:.log=.trs) - @$(am__rm_f) $(TEST_SUITE_LOG) + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ log_list=`for i in $$bases; do echo $$i.log; done`; \ - log_list=`echo $$log_list`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; recheck: all $(check_PROGRAMS) - @$(am__rm_f) $(TEST_SUITE_LOG) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ | $(am__list_recheck_tests)` || exit 1; \ @@ -1731,9 +1578,16 @@ recheck: all $(check_PROGRAMS) am__force_recheck=am--force-recheck \ TEST_LOGS="$$log_list"; \ exit $$? -tests/pngtest-all.log: tests/pngtest-all - @p='tests/pngtest-all'; \ - b='tests/pngtest-all'; \ +tests/pngtest.log: tests/pngtest + @p='tests/pngtest'; \ + b='tests/pngtest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngtest-badpngs.log: tests/pngtest-badpngs + @p='tests/pngtest-badpngs'; \ + b='tests/pngtest-badpngs'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ @@ -1975,7 +1829,7 @@ distdir: $(BUILT_SOURCES) distdir-am: $(DISTFILES) $(am__remove_distdir) - $(AM_V_at)$(MKDIR_P) "$(distdir)" + test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -2023,10 +1877,6 @@ dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) -dist-bzip3: distdir - tardir=$(distdir) && $(am__tar) | bzip3 -c >$(distdir).tar.bz3 - $(am__post_remove_distdir) - dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) @@ -2034,10 +1884,6 @@ dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) -dist-zstd: distdir - tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst - $(am__post_remove_distdir) - dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @@ -2067,11 +1913,9 @@ dist dist-all: distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - eval GZIP= gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.bz3*) \ - bzip3 -dc $(distdir).tar.bz3 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ @@ -2079,11 +1923,9 @@ distcheck: dist *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - eval GZIP= gzip -dc $(distdir).shar.gz | unshar ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ - *.tar.zst*) \ - zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) @@ -2099,7 +1941,7 @@ distcheck: dist $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ @@ -2159,16 +2001,13 @@ all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(SCRIPTS) $(MANS) $(DATA) \ $(HEADERS) config.h install-binPROGRAMS: install-libLTLIBRARIES -install-checkPROGRAMS: install-libLTLIBRARIES - installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(pkgincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-exec-am +install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am @@ -2187,50 +2026,45 @@ install-strip: "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: - -$(am__rm_f) $(TEST_LOGS) - -$(am__rm_f) $(TEST_LOGS:.log=.trs) - -$(am__rm_f) $(TEST_SUITE_LOG) + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: - -$(am__rm_f) $(CLEANFILES) + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: - -$(am__rm_f) $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES) - -$(am__rm_f) arm/$(DEPDIR)/$(am__dirstamp) - -$(am__rm_f) arm/$(am__dirstamp) - -$(am__rm_f) contrib/libtests/$(DEPDIR)/$(am__dirstamp) - -$(am__rm_f) contrib/libtests/$(am__dirstamp) - -$(am__rm_f) contrib/tools/$(DEPDIR)/$(am__dirstamp) - -$(am__rm_f) contrib/tools/$(am__dirstamp) - -$(am__rm_f) intel/$(DEPDIR)/$(am__dirstamp) - -$(am__rm_f) intel/$(am__dirstamp) - -$(am__rm_f) loongarch/$(DEPDIR)/$(am__dirstamp) - -$(am__rm_f) loongarch/$(am__dirstamp) - -$(am__rm_f) mips/$(DEPDIR)/$(am__dirstamp) - -$(am__rm_f) mips/$(am__dirstamp) - -$(am__rm_f) powerpc/$(DEPDIR)/$(am__dirstamp) - -$(am__rm_f) powerpc/$(am__dirstamp) - -$(am__rm_f) riscv/$(DEPDIR)/$(am__dirstamp) - -$(am__rm_f) riscv/$(am__dirstamp) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -rm -f arm/$(DEPDIR)/$(am__dirstamp) + -rm -f arm/$(am__dirstamp) + -rm -f contrib/libtests/$(DEPDIR)/$(am__dirstamp) + -rm -f contrib/libtests/$(am__dirstamp) + -rm -f contrib/tools/$(DEPDIR)/$(am__dirstamp) + -rm -f contrib/tools/$(am__dirstamp) + -rm -f intel/$(DEPDIR)/$(am__dirstamp) + -rm -f intel/$(am__dirstamp) + -rm -f mips/$(DEPDIR)/$(am__dirstamp) + -rm -f mips/$(am__dirstamp) + -rm -f powerpc/$(DEPDIR)/$(am__dirstamp) + -rm -f powerpc/$(am__dirstamp) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." - -$(am__rm_f) $(BUILT_SOURCES) - -$(am__rm_f) $(MAINTAINERCLEANFILES) + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) @DO_INSTALL_LIBPNG_CONFIG_FALSE@@DO_INSTALL_LINKS_FALSE@install-exec-hook: @DO_INSTALL_LIBPNG_PC_FALSE@@DO_INSTALL_LINKS_FALSE@install-data-hook: @DO_INSTALL_LIBPNG_CONFIG_FALSE@@DO_INSTALL_LIBPNG_PC_FALSE@@DO_INSTALL_LINKS_FALSE@uninstall-hook: clean: clean-am clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ - clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am + clean-libLTLIBRARIES clean-libtool mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -f ./$(DEPDIR)/png.Plo + -rm -f ./$(DEPDIR)/png.Plo -rm -f ./$(DEPDIR)/pngerror.Plo -rm -f ./$(DEPDIR)/pngget.Plo -rm -f ./$(DEPDIR)/pngmem.Plo @@ -2247,6 +2081,7 @@ distclean: distclean-am -rm -f ./$(DEPDIR)/pngwtran.Plo -rm -f ./$(DEPDIR)/pngwutil.Plo -rm -f arm/$(DEPDIR)/arm_init.Plo + -rm -f arm/$(DEPDIR)/filter_neon.Plo -rm -f arm/$(DEPDIR)/filter_neon_intrinsics.Plo -rm -f arm/$(DEPDIR)/palette_neon_intrinsics.Plo -rm -f contrib/libtests/$(DEPDIR)/pngimage.Po @@ -2259,15 +2094,10 @@ distclean: distclean-am -rm -f contrib/tools/$(DEPDIR)/pngfix.Po -rm -f intel/$(DEPDIR)/filter_sse2_intrinsics.Plo -rm -f intel/$(DEPDIR)/intel_init.Plo - -rm -f loongarch/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-filter_lsx_intrinsics.Plo - -rm -f loongarch/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-loongarch_lsx_init.Plo - -rm -f mips/$(DEPDIR)/filter_mmi_inline_assembly.Plo -rm -f mips/$(DEPDIR)/filter_msa_intrinsics.Plo -rm -f mips/$(DEPDIR)/mips_init.Plo -rm -f powerpc/$(DEPDIR)/filter_vsx_intrinsics.Plo -rm -f powerpc/$(DEPDIR)/powerpc_init.Plo - -rm -f riscv/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-filter_rvv_intrinsics.Plo - -rm -f riscv/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-riscv_init.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags @@ -2319,7 +2149,7 @@ installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache - -rm -f ./$(DEPDIR)/png.Plo + -rm -f ./$(DEPDIR)/png.Plo -rm -f ./$(DEPDIR)/pngerror.Plo -rm -f ./$(DEPDIR)/pngget.Plo -rm -f ./$(DEPDIR)/pngmem.Plo @@ -2336,6 +2166,7 @@ maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/pngwtran.Plo -rm -f ./$(DEPDIR)/pngwutil.Plo -rm -f arm/$(DEPDIR)/arm_init.Plo + -rm -f arm/$(DEPDIR)/filter_neon.Plo -rm -f arm/$(DEPDIR)/filter_neon_intrinsics.Plo -rm -f arm/$(DEPDIR)/palette_neon_intrinsics.Plo -rm -f contrib/libtests/$(DEPDIR)/pngimage.Po @@ -2348,15 +2179,10 @@ maintainer-clean: maintainer-clean-am -rm -f contrib/tools/$(DEPDIR)/pngfix.Po -rm -f intel/$(DEPDIR)/filter_sse2_intrinsics.Plo -rm -f intel/$(DEPDIR)/intel_init.Plo - -rm -f loongarch/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-filter_lsx_intrinsics.Plo - -rm -f loongarch/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-loongarch_lsx_init.Plo - -rm -f mips/$(DEPDIR)/filter_mmi_inline_assembly.Plo -rm -f mips/$(DEPDIR)/filter_msa_intrinsics.Plo -rm -f mips/$(DEPDIR)/mips_init.Plo -rm -f powerpc/$(DEPDIR)/filter_vsx_intrinsics.Plo -rm -f powerpc/$(DEPDIR)/powerpc_init.Plo - -rm -f riscv/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-filter_rvv_intrinsics.Plo - -rm -f riscv/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-riscv_init.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -2382,16 +2208,15 @@ uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ uninstall-man: uninstall-man3 uninstall-man5 .MAKE: all check check-am install install-am install-data-am \ - install-exec install-exec-am install-strip uninstall-am + install-exec-am install-strip uninstall-am .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles am--refresh check \ check-TESTS check-am clean clean-binPROGRAMS \ clean-checkPROGRAMS clean-cscope clean-generic \ - clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \ - cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ - dist-bzip3 dist-gzip dist-hook dist-lzip dist-shar dist-tarZ \ - dist-xz dist-zip dist-zstd distcheck distclean \ - distclean-compile distclean-generic distclean-hdr \ + clean-libLTLIBRARIES clean-libtool cscope cscopelist-am ctags \ + ctags-am dist dist-all dist-bzip2 dist-gzip dist-hook \ + dist-lzip dist-shar dist-tarZ dist-xz dist-zip distcheck \ + distclean distclean-compile distclean-generic distclean-hdr \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-binSCRIPTS \ @@ -2601,10 +2426,3 @@ all-am: $(check_PROGRAMS) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: - -# Tell GNU make to disable its built-in pattern rules. -%:: %,v -%:: RCS/%,v -%:: RCS/% -%:: s.% -%:: SCCS/s.% diff --git a/Engine/lib/lpng/README b/Engine/lib/lpng/README index 87e5f8b17..cfc1f0e3d 100644 --- a/Engine/lib/lpng/README +++ b/Engine/lib/lpng/README @@ -1,88 +1,57 @@ -README for libpng version 1.6.52 -================================ +README for libpng version 1.6.37 - April 14, 2019 +================================================= -See the note about version numbers near the top of `png.h`. -See `INSTALL` for instructions on how to install libpng. +See the note about version numbers near the top of png.h. +See INSTALL for instructions on how to install libpng. -Libpng comes in several distribution formats. Get `libpng-*.tar.gz` -or `libpng-*.tar.xz` if you want UNIX-style line endings in the text -files, or `lpng*.7z` or `lpng*.zip` if you want DOS-style line endings. +Libpng comes in several distribution formats. Get libpng-*.tar.gz or +libpng-*.tar.xz or if you want UNIX-style line endings in the text +files, or lpng*.7z or lpng*.zip if you want DOS-style line endings. -For a detailed description on using libpng, read `libpng-manual.txt`. -For examples of libpng in a program, see `example.c` and `pngtest.c`. -For usage information and restrictions (what little they are) on libpng, -see `png.h`. For a description on using zlib (the compression library -used by libpng) and zlib's restrictions, see `zlib.h`. +Version 0.89 was the first official release of libpng. Don't let the +fact that it's the first release fool you. The libpng library has been +in extensive use and testing since mid-1995. By late 1997 it had +finally gotten to the stage where there hadn't been significant +changes to the API in some time, and people have a bad feeling about +libraries with versions < 1.0. Version 1.0.0 was released in +March 1998. -You should use zlib 1.0.4 or later to run this, but it _may_ work with -versions as old as zlib 0.95. Even so, there are bugs in older zlib -versions which can cause the output of invalid compression streams for -some images. - -You should also note that zlib is a compression library that is useful -for more things than just PNG files. You can use zlib as a drop-in -replacement for `fread()` and `fwrite()`, if you are so inclined. - -zlib should be available at the same place that libpng is, or at -https://zlib.net . - -You may also want a copy of the PNG specification. It is available -as an RFC, a W3C Recommendation, and an ISO/IEC Standard. You can find -these at http://www.libpng.org/pub/png/pngdocs.html . - -This code is currently being archived at https://libpng.sourceforge.io -in the download area, and at http://libpng.download/src . - -This release, based in a large way on Glenn's, Guy's and Andreas' -earlier work, was created and will be supported by myself and the PNG -development group. - -Send comments, corrections and commendations to `png-mng-implement` -at `lists.sourceforge.net`. (Subscription is required; visit -https://lists.sourceforge.net/lists/listinfo/png-mng-implement -to subscribe.) - -Send general questions about the PNG specification to `png-mng-misc` -at `lists.sourceforge.net`. (Subscription is required; visit -https://lists.sourceforge.net/lists/listinfo/png-mng-misc -to subscribe.) - -Historical notes ----------------- - -The libpng library has been in extensive use and testing since mid-1995. -Version 0.89, published a year later, was the first official release. -By late 1997, it had finally gotten to the stage where there hadn't -been significant changes to the API in some time, and people have a bad -feeling about libraries with versions below 1.0. Version 1.0.0 was -released in March 1998. - -Note that some of the changes to the `png_info` structure render this +**** +Note that some of the changes to the png_info structure render this version of the library binary incompatible with libpng-0.89 or earlier versions if you are using a shared library. The type of the -`filler` parameter for `png_set_filler()` has changed from `png_byte` -to `png_uint_32`, which will affect shared-library applications that -use this function. +"filler" parameter for png_set_filler() has changed from png_byte to +png_uint_32, which will affect shared-library applications that use +this function. -To avoid problems with changes to the internals of the `info_struct`, +To avoid problems with changes to the internals of the png info_struct, new APIs have been made available in 0.95 to avoid direct application -access to `info_ptr`. These functions are the `png_set_` and -`png_get_` functions. These functions should be used when -accessing/storing the `info_struct` data, rather than manipulating it +access to info_ptr. These functions are the png_set_ and +png_get_ functions. These functions should be used when +accessing/storing the info_struct data, rather than manipulating it directly, to avoid such problems in the future. It is important to note that the APIs did not make current programs that access the info struct directly incompatible with the new library, through libpng-1.2.x. In libpng-1.4.x, which was meant to -be a transitional release, members of the `png_struct` and the -`info_struct` can still be accessed, but the compiler will issue a +be a transitional release, members of the png_struct and the +info_struct can still be accessed, but the compiler will issue a warning about deprecated usage. Since libpng-1.5.0, direct access to these structs is not allowed, and the definitions of the structs -reside in private `pngstruct.h` and `pnginfo.h` header files that are -not accessible to applications. It is strongly suggested that new -programs use the new APIs (as shown in `example.c` and `pngtest.c`), -and older programs be converted to the new format, to facilitate -upgrades in the future. +reside in private pngstruct.h and pnginfo.h header files that are not +accessible to applications. It is strongly suggested that new +programs use the new APIs (as shown in example.c and pngtest.c), and +older programs be converted to the new format, to facilitate upgrades +in the future. +**** + +Additions since 0.90 include the ability to compile libpng as a +Windows DLL, and new APIs for accessing data in the info struct. +Experimental functions include the ability to set weighting and cost +factors for row filter selection, direct reads of integers from buffers +on big-endian processors that support misaligned data access, faster +methods of doing alpha composition, and more accurate 16->8 bit color +conversion. The additions since 0.89 include the ability to read from a PNG stream which has had some (or all) of the signature bytes read by the calling @@ -92,88 +61,118 @@ the library action on the detection of chunk CRC errors. It is possible to set different actions based on whether the CRC error occurred in a critical or an ancillary chunk. -The additions since 0.90 include the ability to compile libpng as a -Windows DLL, and new APIs for accessing data in the `info_struct`. -Experimental functions included the ability to set weighting and cost -factors for row filter selection, direct reads of integers from buffers -on big-endian processors that support misaligned data access, faster -methods of doing alpha composition, and more accurate 16-to-8 bit color -conversion. Some of these experimental functions, such as the weighted -filter heuristics, have since been removed. +For a detailed description on using libpng, read libpng-manual.txt. +For examples of libpng in a program, see example.c and pngtest.c. For +usage information and restrictions (what little they are) on libpng, +see png.h. For a description on using zlib (the compression library +used by libpng) and zlib's restrictions, see zlib.h -Files included in this distribution ------------------------------------ +I have included a general makefile, as well as several machine and +compiler specific ones, but you may have to modify one for your own +needs. - ANNOUNCE => Announcement of this version, with recent changes - AUTHORS => List of contributing authors - CHANGES => Description of changes between libpng versions - INSTALL => Instructions to install libpng - LICENSE => License to use and redistribute libpng - README => This file - TODO => Things not implemented in the current library - TRADEMARK => Trademark information - example.c => Example code for using libpng functions - libpng.3 => Manual page for libpng (includes libpng-manual.txt) - libpng-manual.txt => Description of libpng and its functions - libpngpf.3 => Manual page for libpng's private functions (deprecated) - png.5 => Manual page for the PNG format - png.c => Basic interface functions common to library - png.h => Library function and interface declarations (public) - pngpriv.h => Library function and interface declarations (private) - pngconf.h => System specific library configuration (public) - pngstruct.h => png_struct declaration (private) - pnginfo.h => png_info struct declaration (private) - pngdebug.h => debugging macros (private) - pngerror.c => Error/warning message I/O functions - pngget.c => Functions for retrieving info from struct - pngmem.c => Memory handling functions - pngbar.png => PNG logo, 88x31 - pngnow.png => PNG logo, 98x31 - pngpread.c => Progressive reading functions - pngread.c => Read data/helper high-level functions - pngrio.c => Lowest-level data read I/O functions - pngrtran.c => Read data transformation functions - pngrutil.c => Read data utility functions - pngset.c => Functions for storing data into the info_struct - pngtest.c => Library test program - pngtest.png => Library test sample image - pngtrans.c => Common data transformation functions - pngwio.c => Lowest-level write I/O functions - pngwrite.c => High-level write functions - pngwtran.c => Write data transformations - pngwutil.c => Write utility functions - arm/ => Optimized code for ARM Neon - intel/ => Optimized code for INTEL SSE2 - loongarch/ => Optimized code for LoongArch LSX - mips/ => Optimized code for MIPS MSA and MIPS MMI - powerpc/ => Optimized code for PowerPC VSX - riscv/ => Optimized code for the RISC-V platform - ci/ => Scripts for continuous integration - contrib/ => External contributions - arm-neon/ => Optimized code for the ARM-NEON platform - mips-msa/ => Optimized code for the MIPS-MSA platform - powerpc-vsx/ => Optimized code for the POWERPC-VSX platform - examples/ => Examples of libpng usage - gregbook/ => Source code for PNG reading and writing, from - "PNG: The Definitive Guide" by Greg Roelofs, - O'Reilly, 1999 - libtests/ => Test programs - pngexif/ => Program to inspect the EXIF information in PNG files - pngminim/ => Minimal decoder, encoder, and progressive decoder - programs demonstrating the use of pngusr.dfa - pngminus/ => Simple pnm2png and png2pnm programs - pngsuite/ => Test images - riscv-rvv/ => Optimized code for the RISC-V Vector platform - testpngs/ => Test images - tools/ => Various tools - visupng/ => VisualPng, a Windows viewer for PNG images - projects/ => Project files and workspaces for various IDEs - owatcom/ => OpenWatcom project - visualc71/ => Microsoft Visual C++ 7.1 workspace - vstudio/ => Microsoft Visual Studio workspace - scripts/ => Scripts and makefiles for building libpng - (see scripts/README.txt for the complete list) - tests/ => Test scripts +You should use zlib 1.0.4 or later to run this, but it MAY work with +versions as old as zlib 0.95. Even so, there are bugs in older zlib +versions which can cause the output of invalid compression streams for +some images. + +You should also note that zlib is a compression library that is useful +for more things than just PNG files. You can use zlib as a drop-in +replacement for fread() and fwrite(), if you are so inclined. + +zlib should be available at the same place that libpng is, or at +https://zlib.net. + +You may also want a copy of the PNG specification. It is available +as an RFC, a W3C Recommendation, and an ISO/IEC Standard. You can find +these at http://www.libpng.org/pub/png/pngdocs.html . + +This code is currently being archived at libpng.sourceforge.io in the +[DOWNLOAD] area, and at http://libpng.download/src . + +This release, based in a large way on Glenn's, Guy's and Andreas' +earlier work, was created and will be supported by myself and the PNG +development group. + +Send comments/corrections/commendations to png-mng-implement at +lists.sourceforge.net (subscription required; visit +https://lists.sourceforge.net/lists/listinfo/png-mng-implement +to subscribe). + +Send general questions about the PNG specification to png-mng-misc +at lists.sourceforge.net (subscription required; visit +https://lists.sourceforge.net/lists/listinfo/png-mng-misc to +subscribe). + +Files in this distribution: + + ANNOUNCE => Announcement of this version, with recent changes + AUTHORS => List of contributing authors + CHANGES => Description of changes between libpng versions + KNOWNBUG => List of known bugs and deficiencies + LICENSE => License to use and redistribute libpng + README => This file + TODO => Things not implemented in the current library + TRADEMARK => Trademark information + example.c => Example code for using libpng functions + libpng.3 => manual page for libpng (includes libpng-manual.txt) + libpng-manual.txt => Description of libpng and its functions + libpngpf.3 => manual page for libpng's private functions + png.5 => manual page for the PNG format + png.c => Basic interface functions common to library + png.h => Library function and interface declarations (public) + pngpriv.h => Library function and interface declarations (private) + pngconf.h => System specific library configuration (public) + pngstruct.h => png_struct declaration (private) + pnginfo.h => png_info struct declaration (private) + pngdebug.h => debugging macros (private) + pngerror.c => Error/warning message I/O functions + pngget.c => Functions for retrieving info from struct + pngmem.c => Memory handling functions + pngbar.png => PNG logo, 88x31 + pngnow.png => PNG logo, 98x31 + pngpread.c => Progressive reading functions + pngread.c => Read data/helper high-level functions + pngrio.c => Lowest-level data read I/O functions + pngrtran.c => Read data transformation functions + pngrutil.c => Read data utility functions + pngset.c => Functions for storing data into the info_struct + pngtest.c => Library test program + pngtest.png => Library test sample image + pngtrans.c => Common data transformation functions + pngwio.c => Lowest-level write I/O functions + pngwrite.c => High-level write functions + pngwtran.c => Write data transformations + pngwutil.c => Write utility functions + arm => Contains optimized code for the ARM platform + powerpc => Contains optimized code for the PowerPC platform + contrib => Contributions + arm-neon => Optimized code for ARM-NEON platform + powerpc-vsx => Optimized code for POWERPC-VSX platform + examples => Example programs + gregbook => source code for PNG reading and writing, from + Greg Roelofs' "PNG: The Definitive Guide", + O'Reilly, 1999 + libtests => Test programs + mips-msa => Optimized code for MIPS-MSA platform + pngminim => Minimal decoder, encoder, and progressive decoder + programs demonstrating use of pngusr.dfa + pngminus => Simple pnm2png and png2pnm programs + pngsuite => Test images + testpngs + tools => Various tools + visupng => Contains a MSVC workspace for VisualPng + intel => Optimized code for INTEL-SSE2 platform + mips => Optimized code for MIPS platform + projects => Contains project files and workspaces for + building a DLL + owatcom => Contains a WATCOM project for building libpng + visualc71 => Contains a Microsoft Visual C++ (MSVC) + workspace for building libpng and zlib + vstudio => Contains a Microsoft Visual C++ (MSVC) + workspace for building libpng and zlib + scripts => Directory containing scripts for building libpng: + (see scripts/README.txt for the list of scripts) Good luck, and happy coding! diff --git a/Engine/lib/lpng/TODO b/Engine/lib/lpng/TODO index 8ddb7d123..562dab069 100644 --- a/Engine/lib/lpng/TODO +++ b/Engine/lib/lpng/TODO @@ -1,22 +1,23 @@ -TODO list for libpng --------------------- +TODO - list of things to do for libpng: - * Fix all defects (duh!) - * cHRM transformation. - * Palette creation. - * "grayscale->palette" transformation and "palette->grayscale" detection. - * Improved dithering. - * Multi-lingual error and warning message support. - * Complete sRGB transformation. (Currently it simply uses gamma=0.45455.) - * Man pages for function calls. - * Better documentation. - * Better filter selection - (e.g., counting huffman bits/precompression; filter inertia; filter costs). - * Histogram creation. - * Text conversion between different code pages (e.g., Latin-1 to Mac). - * Avoid building gamma tables whenever possible. - * Greater precision in changing to linear gamma for compositing against - background, and in doing rgb-to-gray transformations. - * Investigate pre-incremented loop counters and other loop constructions. - * Interpolated method of handling interlacing. - * More validations for libpng transformations. +* Fix all defects (duh!) +* Better C++ wrapper / full C++ implementation (?) +* Fix the problems with C++ and 'extern "C"'. +* cHRM transformation. +* Palette creation. +* "grayscale->palette" transformation and "palette->grayscale" detection. +* Improved dithering. +* Multi-lingual error and warning message support. +* Complete sRGB transformation. (Currently it simply uses gamma=0.45455.) +* Man pages for function calls. +* Better documentation. +* Better filter selection + (e.g., counting huffman bits/precompression; filter inertia; filter costs). +* Histogram creation. +* Text conversion between different code pages (e.g., Latin-1 -> Mac). +* Avoid building gamma tables whenever possible. +* Greater precision in changing to linear gamma for compositing against + background, and in doing rgb-to-gray transformations. +* Investigate pre-incremented loop counters and other loop constructions. +* Interpolated method of handling interlacing. +* More validations for libpng transformations. diff --git a/Engine/lib/lpng/aclocal.m4 b/Engine/lib/lpng/aclocal.m4 index b7d8c1f8d..bc18c34f0 100644 --- a/Engine/lib/lpng/aclocal.m4 +++ b/Engine/lib/lpng/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.18.1 -*- Autoconf -*- +# generated automatically by aclocal 1.16.1 -*- Autoconf -*- -# Copyright (C) 1996-2025 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,13 +14,13 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.72],, -[m4_warning([this file was generated for autoconf 2.72. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2025 Free Software Foundation, Inc. +# Copyright (C) 2002-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -32,10 +32,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.]) # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.18' +[am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.18.1], [], +m4_if([$1], [1.16.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.18.1])dnl +[AM_AUTOMAKE_VERSION([1.16.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # Figure out how to run the assembler. -*- Autoconf -*- -# Copyright (C) 2001-2025 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -78,7 +78,7 @@ _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2025 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -130,7 +130,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2025 Free Software Foundation, Inc. +# Copyright (C) 1997-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -161,7 +161,7 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2025 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -293,7 +293,7 @@ AC_CACHE_CHECK([dependency style of $depcc], # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thus: + # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported @@ -352,7 +352,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2025 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -391,9 +391,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. If GNU make was not used, consider - re-running the configure script with MAKE="gmake" (or whatever is - necessary). You can also try re-running configure with the + for automatic dependency tracking. Try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi @@ -420,7 +418,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2025 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -448,10 +446,6 @@ m4_defn([AC_PROG_CC]) # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl -m4_ifdef([_$0_ALREADY_INIT], - [m4_fatal([$0 expanded multiple times -]m4_defn([_$0_ALREADY_INIT]))], - [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl @@ -488,7 +482,7 @@ m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( - m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl @@ -520,9 +514,8 @@ AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_IF_OPTION([tar-v7], [_AM_PROG_TAR([v7])], - [_AM_PROG_TAR([ustar])])])]) + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], @@ -541,21 +534,7 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) -# Variables for tags utilities; see am/tags.am -if test -z "$CTAGS"; then - CTAGS=ctags -fi -AC_SUBST([CTAGS]) -if test -z "$ETAGS"; then - ETAGS=etags -fi -AC_SUBST([ETAGS]) -if test -z "$CSCOPE"; then - CSCOPE=cscope -fi -AC_SUBST([CSCOPE]) - -AC_REQUIRE([_AM_SILENT_RULES])dnl +AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. @@ -563,9 +542,47 @@ AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl -AC_REQUIRE([_AM_PROG_RM_F]) -AC_REQUIRE([_AM_PROG_XARGS_N]) +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. @@ -598,7 +615,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2025 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -619,7 +636,7 @@ if test x"${install_sh+set}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2025 Free Software Foundation, Inc. +# Copyright (C) 2003-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -641,7 +658,7 @@ AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996-2025 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -676,7 +693,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2025 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -719,7 +736,7 @@ AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2025 Free Software Foundation, Inc. +# Copyright (C) 1997-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -740,7 +757,12 @@ AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then - MISSING="\${SHELL} '$am_aux_dir/missing'" + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then @@ -753,7 +775,7 @@ fi # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2025 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -782,7 +804,7 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2025 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -814,10 +836,7 @@ AC_CACHE_CHECK( break fi done - # aligned with autoconf, so not including core; see bug#72225. - rm -f -r a.out a.exe b.out conftest.$ac_ext conftest.$ac_objext \ - conftest.dSYM conftest1.$ac_ext conftest1.$ac_objext conftest1.dSYM \ - conftest2.$ac_ext conftest2.$ac_objext conftest2.dSYM + rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. @@ -832,23 +851,7 @@ AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2022-2025 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_PROG_RM_F -# --------------- -# Check whether 'rm -f' without any arguments works. -# https://bugs.gnu.org/10828 -AC_DEFUN([_AM_PROG_RM_F], -[am__rm_f_notfound= -AS_IF([(rm -f && rm -fr && rm -rf) 2>/dev/null], [], [am__rm_f_notfound='""']) -AC_SUBST(am__rm_f_notfound) -]) - -# Copyright (C) 2001-2025 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -867,181 +870,26 @@ AC_DEFUN([AM_RUN_LOG], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2025 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# _AM_SLEEP_FRACTIONAL_SECONDS -# ---------------------------- -AC_DEFUN([_AM_SLEEP_FRACTIONAL_SECONDS], [dnl -AC_CACHE_CHECK([whether sleep supports fractional seconds], - am_cv_sleep_fractional_seconds, [dnl -AS_IF([sleep 0.001 2>/dev/null], [am_cv_sleep_fractional_seconds=yes], - [am_cv_sleep_fractional_seconds=no]) -])]) - -# _AM_FILESYSTEM_TIMESTAMP_RESOLUTION -# ----------------------------------- -# Determine the filesystem's resolution for file modification -# timestamps. The coarsest we know of is FAT, with a resolution -# of only two seconds, even with the most recent "exFAT" extensions. -# The finest (e.g. ext4 with large inodes, XFS, ZFS) is one -# nanosecond, matching clock_gettime. However, it is probably not -# possible to delay execution of a shell script for less than one -# millisecond, due to process creation overhead and scheduling -# granularity, so we don't check for anything finer than that. (See below.) -AC_DEFUN([_AM_FILESYSTEM_TIMESTAMP_RESOLUTION], [dnl -AC_REQUIRE([_AM_SLEEP_FRACTIONAL_SECONDS]) -AC_CACHE_CHECK([filesystem timestamp resolution], - am_cv_filesystem_timestamp_resolution, [dnl -# Default to the worst case. -am_cv_filesystem_timestamp_resolution=2 - -# Only try to go finer than 1 sec if sleep can do it. -# Don't try 1 sec, because if 0.01 sec and 0.1 sec don't work, -# - 1 sec is not much of a win compared to 2 sec, and -# - it takes 2 seconds to perform the test whether 1 sec works. -# -# Instead, just use the default 2s on platforms that have 1s resolution, -# accept the extra 1s delay when using $sleep in the Automake tests, in -# exchange for not incurring the 2s delay for running the test for all -# packages. -# -am_try_resolutions= -if test "$am_cv_sleep_fractional_seconds" = yes; then - # Even a millisecond often causes a bunch of false positives, - # so just try a hundredth of a second. The time saved between .001 and - # .01 is not terribly consequential. - am_try_resolutions="0.01 0.1 $am_try_resolutions" -fi - -# In order to catch current-generation FAT out, we must *modify* files -# that already exist; the *creation* timestamp is finer. Use names -# that make ls -t sort them differently when they have equal -# timestamps than when they have distinct timestamps, keeping -# in mind that ls -t prints the *newest* file first. -rm -f conftest.ts? -: > conftest.ts1 -: > conftest.ts2 -: > conftest.ts3 - -# Make sure ls -t actually works. Do 'set' in a subshell so we don't -# clobber the current shell's arguments. (Outer-level square brackets -# are removed by m4; they're present so that m4 does not expand -# ; be careful, easy to get confused.) -if ( - set X `[ls -t conftest.ts[12]]` && - { - test "$[]*" != "X conftest.ts1 conftest.ts2" || - test "$[]*" != "X conftest.ts2 conftest.ts1"; - } -); then :; else - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - _AS_ECHO_UNQUOTED( - ["Bad output from ls -t: \"`[ls -t conftest.ts[12]]`\""], - [AS_MESSAGE_LOG_FD]) - AC_MSG_FAILURE([ls -t produces unexpected output. -Make sure there is not a broken ls alias in your environment.]) -fi - -for am_try_res in $am_try_resolutions; do - # Any one fine-grained sleep might happen to cross the boundary - # between two values of a coarser actual resolution, but if we do - # two fine-grained sleeps in a row, at least one of them will fall - # entirely within a coarse interval. - echo alpha > conftest.ts1 - sleep $am_try_res - echo beta > conftest.ts2 - sleep $am_try_res - echo gamma > conftest.ts3 - - # We assume that 'ls -t' will make use of high-resolution - # timestamps if the operating system supports them at all. - if (set X `ls -t conftest.ts?` && - test "$[]2" = conftest.ts3 && - test "$[]3" = conftest.ts2 && - test "$[]4" = conftest.ts1); then - # - # Ok, ls -t worked. If we're at a resolution of 1 second, we're done, - # because we don't need to test make. - make_ok=true - if test $am_try_res != 1; then - # But if we've succeeded so far with a subsecond resolution, we - # have one more thing to check: make. It can happen that - # everything else supports the subsecond mtimes, but make doesn't; - # notably on macOS, which ships make 3.81 from 2006 (the last one - # released under GPLv2). https://bugs.gnu.org/68808 - # - # We test $MAKE if it is defined in the environment, else "make". - # It might get overridden later, but our hope is that in practice - # it does not matter: it is the system "make" which is (by far) - # the most likely to be broken, whereas if the user overrides it, - # probably they did so with a better, or at least not worse, make. - # https://lists.gnu.org/archive/html/automake/2024-06/msg00051.html - # - # Create a Makefile (real tab character here): - rm -f conftest.mk - echo 'conftest.ts1: conftest.ts2' >conftest.mk - echo ' touch conftest.ts2' >>conftest.mk - # - # Now, running - # touch conftest.ts1; touch conftest.ts2; make - # should touch ts1 because ts2 is newer. This could happen by luck, - # but most often, it will fail if make's support is insufficient. So - # test for several consecutive successes. - # - # (We reuse conftest.ts[12] because we still want to modify existing - # files, not create new ones, per above.) - n=0 - make=${MAKE-make} - until test $n -eq 3; do - echo one > conftest.ts1 - sleep $am_try_res - echo two > conftest.ts2 # ts2 should now be newer than ts1 - if $make -f conftest.mk | grep 'up to date' >/dev/null; then - make_ok=false - break # out of $n loop - fi - n=`expr $n + 1` - done - fi - # - if $make_ok; then - # Everything we know to check worked out, so call this resolution good. - am_cv_filesystem_timestamp_resolution=$am_try_res - break # out of $am_try_res loop - fi - # Otherwise, we'll go on to check the next resolution. - fi -done -rm -f conftest.ts? -# (end _am_filesystem_timestamp_resolution) -])]) - # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], -[AC_REQUIRE([_AM_FILESYSTEM_TIMESTAMP_RESOLUTION]) -# This check should not be cached, as it may vary across builds of -# different projects. -AC_MSG_CHECKING([whether build environment is sane]) +[AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) - AC_MSG_RESULT([no]) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_RESULT([no]) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac @@ -1050,40 +898,49 @@ esac # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). -am_build_env_is_sane=no -am_has_slept=no -rm -f conftest.file -for am_try in 1 2; do - echo "timestamp, slept: $am_has_slept" > conftest.file - if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[]*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - test "$[]2" = conftest.file - ); then - am_build_env_is_sane=yes - break - fi - # Just in case. - sleep "$am_cv_filesystem_timestamp_resolution" - am_has_slept=yes -done +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then -AC_MSG_RESULT([$am_build_env_is_sane]) -if test "$am_build_env_is_sane" = no; then - AC_MSG_ERROR([newly created file is older than distributed files! + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi - +AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= -AS_IF([test -e conftest.file || grep 'slept: no' conftest.file >/dev/null 2>&1],, [dnl - ( sleep "$am_cv_filesystem_timestamp_resolution" ) & +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & am_sleep_pid=$! -]) +fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then @@ -1094,18 +951,18 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2025 Free Software Foundation, Inc. +# Copyright (C) 2009-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# _AM_SILENT_RULES -# ---------------- -# Enable less verbose build rules support. -AC_DEFUN([_AM_SILENT_RULES], -[AM_DEFAULT_VERBOSITY=1 -AC_ARG_ENABLE([silent-rules], [dnl +# AM_SILENT_RULES([DEFAULT]) +# -------------------------- +# Enable less verbose build rules; with the default set to DEFAULT +# ("yes" being less verbose, "no" or empty being verbose). +AC_DEFUN([AM_SILENT_RULES], +[AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) @@ -1113,6 +970,11 @@ AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. @@ -1131,21 +993,6 @@ am__doit: else am_cv_make_support_nested_variables=no fi]) -AC_SUBST([AM_V])dnl -AM_SUBST_NOTMAKE([AM_V])dnl -AC_SUBST([AM_DEFAULT_V])dnl -AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl -AC_SUBST([AM_DEFAULT_VERBOSITY])dnl -AM_BACKSLASH='\' -AC_SUBST([AM_BACKSLASH])dnl -_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl -dnl Delay evaluation of AM_DEFAULT_VERBOSITY to the end to allow multiple calls -dnl to AM_SILENT_RULES to change the default value. -AC_CONFIG_COMMANDS_PRE([dnl -case $enable_silent_rules in @%:@ ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; -esac if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' @@ -1154,22 +1001,17 @@ else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi -])dnl +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# AM_SILENT_RULES([DEFAULT]) -# -------------------------- -# Set the default verbosity level to DEFAULT ("yes" being less verbose, "no" or -# empty being verbose). -AC_DEFUN([AM_SILENT_RULES], -[AC_REQUIRE([_AM_SILENT_RULES]) -AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1])m4_newline -dnl We intentionally force a newline after the assignment, since a) nothing -dnl good can come of more text following, and b) that was the behavior -dnl before 1.17. See https://bugs.gnu.org/72267. -]) - -# Copyright (C) 2001-2025 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1197,7 +1039,7 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2025 Free Software Foundation, Inc. +# Copyright (C) 2006-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1216,7 +1058,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2025 Free Software Foundation, Inc. +# Copyright (C) 2004-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1262,19 +1104,15 @@ m4_if([$1], [v7], am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) - if test x$am_uid = xunknown; then - AC_MSG_WARN([ancient id detected; assuming current UID is ok, but dist-ustar might not work]) - elif test $am_uid -le $am_max_uid; then - AC_MSG_RESULT([yes]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) else - AC_MSG_RESULT([no]) - _am_tools=none + AC_MSG_RESULT([no]) + _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) - if test x$gm_gid = xunknown; then - AC_MSG_WARN([ancient id detected; assuming current GID is ok, but dist-ustar might not work]) - elif test $am_gid -le $am_max_gid; then - AC_MSG_RESULT([yes]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none @@ -1351,28 +1189,8 @@ AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR -# Copyright (C) 2022-2025 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_PROG_XARGS_N -# ---------------- -# Check whether 'xargs -n' works. It should work everywhere, so the fallback -# is not optimized at all as we never expect to use it. -AC_DEFUN([_AM_PROG_XARGS_N], -[AC_CACHE_CHECK([xargs -n works], am_cv_xargs_n_works, [dnl -AS_IF([test "`echo 1 2 3 | xargs -n2 echo`" = "1 2 -3"], [am_cv_xargs_n_works=yes], [am_cv_xargs_n_works=no])]) -AS_IF([test "$am_cv_xargs_n_works" = yes], [am__xargs_n='xargs -n'], [dnl - am__xargs_n='am__xargs_n () { shift; sed "s/ /\\n/g" | while read am__xargs_n_arg; do "$@" "$am__xargs_n_arg"; done; }' -])dnl -AC_SUBST(am__xargs_n) -]) - -m4_include([scripts/autoconf/libtool.m4]) -m4_include([scripts/autoconf/ltoptions.m4]) -m4_include([scripts/autoconf/ltsugar.m4]) -m4_include([scripts/autoconf/ltversion.m4]) -m4_include([scripts/autoconf/lt~obsolete.m4]) +m4_include([scripts/libtool.m4]) +m4_include([scripts/ltoptions.m4]) +m4_include([scripts/ltsugar.m4]) +m4_include([scripts/ltversion.m4]) +m4_include([scripts/lt~obsolete.m4]) diff --git a/Engine/lib/lpng/arm/arm_init.c b/Engine/lib/lpng/arm/arm_init.c index 0ea9c836c..a34ecdbef 100644 --- a/Engine/lib/lpng/arm/arm_init.c +++ b/Engine/lib/lpng/arm/arm_init.c @@ -1,6 +1,7 @@ + /* arm_init.c - NEON optimised filter functions * - * Copyright (c) 2018-2022 Cosmin Truta + * Copyright (c) 2018 Cosmin Truta * Copyright (c) 2014,2016 Glenn Randers-Pehrson * Written by Mans Rullgard, 2011. * @@ -9,7 +10,9 @@ * and license in png.h */ -/* This module requires POSIX 1003.1 functions. */ +/* Below, after checking __linux__, various non-C90 POSIX 1003.1 functions are + * called. + */ #define _POSIX_SOURCE 1 #include "../pngpriv.h" @@ -30,30 +33,25 @@ * has partial support is contrib/arm-neon/linux.c - a generic Linux * implementation which reads /proc/cpufino. */ -#include /* for sig_atomic_t */ - #ifndef PNG_ARM_NEON_FILE -# if defined(__aarch64__) || defined(_M_ARM64) - /* ARM Neon is expected to be unconditionally available on ARM64. */ -# error PNG_ARM_NEON_CHECK_SUPPORTED must not be defined on ARM64 -# elif defined(__ARM_NEON__) || defined(__ARM_NEON) - /* ARM Neon is expected to be available on the target CPU architecture. */ -# error PNG_ARM_NEON_CHECK_SUPPORTED must not be defined on this CPU arch -# elif defined(__linux__) -# define PNG_ARM_NEON_FILE "contrib/arm-neon/linux.c" -# else -# error No support for run-time ARM Neon checking; use compile-time options +# ifdef __linux__ +# define PNG_ARM_NEON_FILE "contrib/arm-neon/linux.c" # endif #endif -static int png_have_neon(png_structp png_ptr); #ifdef PNG_ARM_NEON_FILE -# include PNG_ARM_NEON_FILE -#endif + +#include /* for sig_atomic_t */ +static int png_have_neon(png_structp png_ptr); +#include PNG_ARM_NEON_FILE + +#else /* PNG_ARM_NEON_FILE */ +# error "PNG_ARM_NEON_FILE undefined: no support for run-time ARM NEON checks" +#endif /* PNG_ARM_NEON_FILE */ #endif /* PNG_ARM_NEON_CHECK_SUPPORTED */ #ifndef PNG_ALIGNED_MEMORY_SUPPORTED -# error ALIGNED_MEMORY is required; please define PNG_ALIGNED_MEMORY_SUPPORTED +# error "ALIGNED_MEMORY is required; set: -DPNG_ALIGNED_MEMORY_SUPPORTED" #endif void diff --git a/Engine/lib/lpng/arm/filter_neon.S b/Engine/lib/lpng/arm/filter_neon.S index 0cbd372cb..2308aad13 100644 --- a/Engine/lib/lpng/arm/filter_neon.S +++ b/Engine/lib/lpng/arm/filter_neon.S @@ -1,60 +1,253 @@ -/* filter_neon.S - placeholder file + +/* filter_neon.S - NEON optimised filter functions * - * Copyright (c) 2024 Cosmin Truta + * Copyright (c) 2018 Cosmin Truta + * Copyright (c) 2014,2017 Glenn Randers-Pehrson + * Written by Mans Rullgard, 2011. * * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer * and license in png.h */ -/* IMPORTANT NOTE: - * - * Historically, the hand-coded assembler implementation of Neon optimizations - * in this module had not been in sync with the intrinsics-based implementation - * in filter_neon_intrinsics.c and palette_neon_intrinsics.c, at least since - * the introduction of riffled palette optimizations. Moreover, the assembler - * code used to work on 32-bit ARM only, and it caused problems, even if empty, - * on 64-bit ARM. - * - * All references to this module from our internal build scripts and projects - * have been removed. - * - * For the external projects that might still expect this module to be present, - * we leave this stub in place, for the remaining lifetime of libpng-1.6.x. - * Everything should continue to function normally, as long as there are no - * deliberate attempts to use the old hand-made assembler code. A build error - * will be raised otherwise. - */ - /* This is required to get the symbol renames, which are #defines, and the * definitions (or not) of PNG_ARM_NEON_OPT and PNG_ARM_NEON_IMPLEMENTATION. */ #define PNG_VERSION_INFO_ONLY #include "../pngpriv.h" +#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) +.section .note.GNU-stack,"",%progbits /* mark stack as non-executable */ +#endif + #ifdef PNG_READ_SUPPORTED + +/* Assembler NEON support - only works for 32-bit ARM (i.e. it does not work for + * ARM64). The code in arm/filter_neon_intrinsics.c supports ARM64, however it + * only works if -mfpu=neon is specified on the GCC command line. See pngpriv.h + * for the logic which sets PNG_USE_ARM_NEON_ASM: + */ #if PNG_ARM_NEON_IMPLEMENTATION == 2 /* hand-coded assembler */ + #if PNG_ARM_NEON_OPT > 0 -#if defined(__clang__) -#define GNUC_VERSION 0 /* not gcc, although it might pretend to be */ -#elif defined(__GNUC__) -#define GNUC_MAJOR (__GNUC__ + 0) -#define GNUC_MINOR (__GNUC_MINOR__ + 0) -#define GNUC_PATCHLEVEL (__GNUC_PATCHLEVEL__ + 0) -#define GNUC_VERSION (GNUC_MAJOR * 10000 + GNUC_MINOR * 100 + GNUC_PATCHLEVEL) +#ifdef __ELF__ +# define ELF #else -#define GNUC_VERSION 0 /* not gcc */ +# define ELF @ #endif -#if (GNUC_VERSION > 0) && (GNUC_VERSION < 40300) -#error "PNG_ARM_NEON is not supported with gcc versions earlier than 4.3.0" -#elif GNUC_VERSION == 40504 -#error "PNG_ARM_NEON is not supported with gcc version 4.5.4" -#else -#error "Please use 'arm/*_neon_intrinsics.c' for PNG_ARM_NEON support" -#endif + .arch armv7-a + .fpu neon +.macro func name, export=0 + .macro endfunc +ELF .size \name, . - \name + .endfunc + .purgem endfunc + .endm + .text + + /* Explicitly specifying alignment here because some versions of + * GAS don't align code correctly. This is harmless in correctly + * written versions of GAS. + */ + .align 2 + + .if \export + .global \name + .endif +ELF .type \name, STT_FUNC + .func \name +\name: +.endm + +func png_read_filter_row_sub4_neon, export=1 + ldr r3, [r0, #4] @ rowbytes + vmov.i8 d3, #0 +1: + vld4.32 {d4[],d5[],d6[],d7[]}, [r1,:128] + vadd.u8 d0, d3, d4 + vadd.u8 d1, d0, d5 + vadd.u8 d2, d1, d6 + vadd.u8 d3, d2, d7 + vst4.32 {d0[0],d1[0],d2[0],d3[0]},[r1,:128]! + subs r3, r3, #16 + bgt 1b + + bx lr +endfunc + +func png_read_filter_row_sub3_neon, export=1 + ldr r3, [r0, #4] @ rowbytes + vmov.i8 d3, #0 + mov r0, r1 + mov r2, #3 + mov r12, #12 + vld1.8 {q11}, [r0], r12 +1: + vext.8 d5, d22, d23, #3 + vadd.u8 d0, d3, d22 + vext.8 d6, d22, d23, #6 + vadd.u8 d1, d0, d5 + vext.8 d7, d23, d23, #1 + vld1.8 {q11}, [r0], r12 + vst1.32 {d0[0]}, [r1,:32], r2 + vadd.u8 d2, d1, d6 + vst1.32 {d1[0]}, [r1], r2 + vadd.u8 d3, d2, d7 + vst1.32 {d2[0]}, [r1], r2 + vst1.32 {d3[0]}, [r1], r2 + subs r3, r3, #12 + bgt 1b + + bx lr +endfunc + +func png_read_filter_row_up_neon, export=1 + ldr r3, [r0, #4] @ rowbytes +1: + vld1.8 {q0}, [r1,:128] + vld1.8 {q1}, [r2,:128]! + vadd.u8 q0, q0, q1 + vst1.8 {q0}, [r1,:128]! + subs r3, r3, #16 + bgt 1b + + bx lr +endfunc + +func png_read_filter_row_avg4_neon, export=1 + ldr r12, [r0, #4] @ rowbytes + vmov.i8 d3, #0 +1: + vld4.32 {d4[],d5[],d6[],d7[]}, [r1,:128] + vld4.32 {d16[],d17[],d18[],d19[]},[r2,:128]! + vhadd.u8 d0, d3, d16 + vadd.u8 d0, d0, d4 + vhadd.u8 d1, d0, d17 + vadd.u8 d1, d1, d5 + vhadd.u8 d2, d1, d18 + vadd.u8 d2, d2, d6 + vhadd.u8 d3, d2, d19 + vadd.u8 d3, d3, d7 + vst4.32 {d0[0],d1[0],d2[0],d3[0]},[r1,:128]! + subs r12, r12, #16 + bgt 1b + + bx lr +endfunc + +func png_read_filter_row_avg3_neon, export=1 + push {r4,lr} + ldr r12, [r0, #4] @ rowbytes + vmov.i8 d3, #0 + mov r0, r1 + mov r4, #3 + mov lr, #12 + vld1.8 {q11}, [r0], lr +1: + vld1.8 {q10}, [r2], lr + vext.8 d5, d22, d23, #3 + vhadd.u8 d0, d3, d20 + vext.8 d17, d20, d21, #3 + vadd.u8 d0, d0, d22 + vext.8 d6, d22, d23, #6 + vhadd.u8 d1, d0, d17 + vext.8 d18, d20, d21, #6 + vadd.u8 d1, d1, d5 + vext.8 d7, d23, d23, #1 + vld1.8 {q11}, [r0], lr + vst1.32 {d0[0]}, [r1,:32], r4 + vhadd.u8 d2, d1, d18 + vst1.32 {d1[0]}, [r1], r4 + vext.8 d19, d21, d21, #1 + vadd.u8 d2, d2, d6 + vhadd.u8 d3, d2, d19 + vst1.32 {d2[0]}, [r1], r4 + vadd.u8 d3, d3, d7 + vst1.32 {d3[0]}, [r1], r4 + subs r12, r12, #12 + bgt 1b + + pop {r4,pc} +endfunc + +.macro paeth rx, ra, rb, rc + vaddl.u8 q12, \ra, \rb @ a + b + vaddl.u8 q15, \rc, \rc @ 2*c + vabdl.u8 q13, \rb, \rc @ pa + vabdl.u8 q14, \ra, \rc @ pb + vabd.u16 q15, q12, q15 @ pc + vcle.u16 q12, q13, q14 @ pa <= pb + vcle.u16 q13, q13, q15 @ pa <= pc + vcle.u16 q14, q14, q15 @ pb <= pc + vand q12, q12, q13 @ pa <= pb && pa <= pc + vmovn.u16 d28, q14 + vmovn.u16 \rx, q12 + vbsl d28, \rb, \rc + vbsl \rx, \ra, d28 +.endm + +func png_read_filter_row_paeth4_neon, export=1 + ldr r12, [r0, #4] @ rowbytes + vmov.i8 d3, #0 + vmov.i8 d20, #0 +1: + vld4.32 {d4[],d5[],d6[],d7[]}, [r1,:128] + vld4.32 {d16[],d17[],d18[],d19[]},[r2,:128]! + paeth d0, d3, d16, d20 + vadd.u8 d0, d0, d4 + paeth d1, d0, d17, d16 + vadd.u8 d1, d1, d5 + paeth d2, d1, d18, d17 + vadd.u8 d2, d2, d6 + paeth d3, d2, d19, d18 + vmov d20, d19 + vadd.u8 d3, d3, d7 + vst4.32 {d0[0],d1[0],d2[0],d3[0]},[r1,:128]! + subs r12, r12, #16 + bgt 1b + + bx lr +endfunc + +func png_read_filter_row_paeth3_neon, export=1 + push {r4,lr} + ldr r12, [r0, #4] @ rowbytes + vmov.i8 d3, #0 + vmov.i8 d4, #0 + mov r0, r1 + mov r4, #3 + mov lr, #12 + vld1.8 {q11}, [r0], lr +1: + vld1.8 {q10}, [r2], lr + paeth d0, d3, d20, d4 + vext.8 d5, d22, d23, #3 + vadd.u8 d0, d0, d22 + vext.8 d17, d20, d21, #3 + paeth d1, d0, d17, d20 + vst1.32 {d0[0]}, [r1,:32], r4 + vext.8 d6, d22, d23, #6 + vadd.u8 d1, d1, d5 + vext.8 d18, d20, d21, #6 + paeth d2, d1, d18, d17 + vext.8 d7, d23, d23, #1 + vld1.8 {q11}, [r0], lr + vst1.32 {d1[0]}, [r1], r4 + vadd.u8 d2, d2, d6 + vext.8 d19, d21, d21, #1 + paeth d3, d2, d19, d18 + vst1.32 {d2[0]}, [r1], r4 + vmov d4, d19 + vadd.u8 d3, d3, d7 + vst1.32 {d3[0]}, [r1], r4 + subs r12, r12, #12 + bgt 1b + + pop {r4,pc} +endfunc #endif /* PNG_ARM_NEON_OPT > 0 */ -#endif /* PNG_ARM_NEON_IMPLEMENTATION == 2 */ +#endif /* PNG_ARM_NEON_IMPLEMENTATION == 2 (assembler) */ #endif /* READ */ diff --git a/Engine/lib/lpng/arm/filter_neon_intrinsics.c b/Engine/lib/lpng/arm/filter_neon_intrinsics.c index 7c3e0da4d..553c0be21 100644 --- a/Engine/lib/lpng/arm/filter_neon_intrinsics.c +++ b/Engine/lib/lpng/arm/filter_neon_intrinsics.c @@ -1,3 +1,4 @@ + /* filter_neon_intrinsics.c - NEON optimised filter functions * * Copyright (c) 2018 Cosmin Truta @@ -17,7 +18,7 @@ /* This code requires -mfpu=neon on the command line: */ #if PNG_ARM_NEON_IMPLEMENTATION == 1 /* intrinsics code from pngpriv.h */ -#if defined(_MSC_VER) && !defined(__clang__) && defined(_M_ARM64) +#if defined(_MSC_VER) && defined(_M_ARM64) # include #else # include diff --git a/Engine/lib/lpng/arm/palette_neon_intrinsics.c b/Engine/lib/lpng/arm/palette_neon_intrinsics.c index 3068e9b6e..b4d1fd2ab 100644 --- a/Engine/lib/lpng/arm/palette_neon_intrinsics.c +++ b/Engine/lib/lpng/arm/palette_neon_intrinsics.c @@ -1,3 +1,4 @@ + /* palette_neon_intrinsics.c - NEON optimised palette expansion functions * * Copyright (c) 2018-2019 Cosmin Truta @@ -13,7 +14,7 @@ #if PNG_ARM_NEON_IMPLEMENTATION == 1 -#if defined(_MSC_VER) && !defined(__clang__) && defined(_M_ARM64) +#if defined(_MSC_VER) && defined(_M_ARM64) # include #else # include @@ -29,6 +30,8 @@ png_riffle_palette_neon(png_structrp png_ptr) int num_trans = png_ptr->num_trans; int i; + png_debug(1, "in png_riffle_palette_neon"); + /* Initially black, opaque. */ uint8x16x4_t w = {{ vdupq_n_u8(0x00), @@ -37,8 +40,6 @@ png_riffle_palette_neon(png_structrp png_ptr) vdupq_n_u8(0xff), }}; - png_debug(1, "in png_riffle_palette_neon"); - /* First, riffle the RGB colours into an RGBA8 palette. * The alpha component is set to opaque for now. */ @@ -63,13 +64,12 @@ png_do_expand_palette_rgba8_neon(png_structrp png_ptr, png_row_infop row_info, { png_uint_32 row_width = row_info->width; const png_uint_32 *riffled_palette = - png_aligncastconst(png_const_uint_32p, png_ptr->riffled_palette); - const png_uint_32 pixels_per_chunk = 4; - png_uint_32 i; + (const png_uint_32 *)png_ptr->riffled_palette; + const png_int_32 pixels_per_chunk = 4; + int i; png_debug(1, "in png_do_expand_palette_rgba8_neon"); - PNG_UNUSED(row) if (row_width < pixels_per_chunk) return 0; @@ -109,11 +109,10 @@ png_do_expand_palette_rgb8_neon(png_structrp png_ptr, png_row_infop row_info, png_uint_32 row_width = row_info->width; png_const_bytep palette = (png_const_bytep)png_ptr->palette; const png_uint_32 pixels_per_chunk = 8; - png_uint_32 i; + int i; png_debug(1, "in png_do_expand_palette_rgb8_neon"); - PNG_UNUSED(row) if (row_width <= pixels_per_chunk) return 0; diff --git a/Engine/lib/lpng/autogen.sh b/Engine/lib/lpng/autogen.sh index 4ac8f4b9e..a46daf65a 100644 --- a/Engine/lib/lpng/autogen.sh +++ b/Engine/lib/lpng/autogen.sh @@ -77,14 +77,13 @@ libpng_autotools_files="Makefile.in aclocal.m4 config.guess config.h.in config.sub configure depcomp install-sh ltmain.sh missing\ test-driver" # -# Files generated by versions of autoconf >2.68 or automake >1.13 (i.e. later +# Files generated by versions of configue >2.68 or automake >1.13 (i.e. later # versions than those required by configure.ac): libpng_autotools_extra="compile config.h.in~" # # These are separate because 'maintainer-clean' does not remove them. -libpng_libtool_files="scripts/autoconf/libtool.m4 scripts/autoconf/ltoptions.m4\ - scripts/autoconf/ltsugar.m4 scripts/autoconf/ltversion.m4\ - scripts/autoconf/lt~obsolete.m4" +libpng_libtool_files="scripts/libtool.m4 scripts/ltoptions.m4\ + scripts/ltsugar.m4 scripts/ltversion.m4 scripts/lt~obsolete.m4" libpng_autotools_dirs="autom4te.cache" # not required # diff --git a/Engine/lib/lpng/ci/.shellcheckrc b/Engine/lib/lpng/ci/.shellcheckrc deleted file mode 100644 index 3c035d60c..000000000 --- a/Engine/lib/lpng/ci/.shellcheckrc +++ /dev/null @@ -1,11 +0,0 @@ -# Disable the "expressions don't expand in single quotes, use double quotes" -# advice. We need the regular expressions to remain uninterpolated. -disable=SC2016 - -# Disable the "variable appears unused" warning caused by the use of getopts -# with an obligatory (but unused) variable name in the main function. -disable=SC2034 - -# Disable all the "quote to prevent globbing or word splitting" advice. -# We need word splitting for well-known variables like MAKEFLAGS and CFLAGS. -disable=SC2086,SC2206 diff --git a/Engine/lib/lpng/ci/LICENSE_MIT.txt b/Engine/lib/lpng/ci/LICENSE_MIT.txt deleted file mode 100644 index 9cf106272..000000000 --- a/Engine/lib/lpng/ci/LICENSE_MIT.txt +++ /dev/null @@ -1,19 +0,0 @@ -MIT License - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Engine/lib/lpng/ci/README.md b/Engine/lib/lpng/ci/README.md deleted file mode 100644 index bb032edaf..000000000 --- a/Engine/lib/lpng/ci/README.md +++ /dev/null @@ -1,25 +0,0 @@ -Scripts for the Continuous Integration of the PNG Reference Library -=================================================================== - -Copyright Notice ----------------- - -Copyright (c) 2019-2025 Cosmin Truta. - -Use, modification and distribution are subject to the MIT License. -Please see the accompanying file `LICENSE_MIT.txt` or visit -https://opensource.org/license/mit - -File List ---------- - - LICENSE_MIT.txt ==> The License file - README.md ==> This file - ci_lint.sh ==> Lint the source code - ci_shellify.sh ==> Convert select definitions to shell syntax - ci_verify_cmake.sh ==> Verify the build driven by CMakeLists.txt - ci_verify_configure.sh ==> Verify the build driven by configure - ci_verify_makefiles.sh ==> Verify the build driven by scripts/makefile.* - ci_verify_version.sh ==> Verify the consistency of version definitions - lib/ci.lib.sh ==> Shell utilities for the main ci_*.sh scripts - targets/*/ci_env.*.sh ==> Shell environments for cross-platform testing diff --git a/Engine/lib/lpng/ci/ci_lint.sh b/Engine/lib/lpng/ci/ci_lint.sh deleted file mode 100644 index 674e55f5d..000000000 --- a/Engine/lib/lpng/ci/ci_lint.sh +++ /dev/null @@ -1,142 +0,0 @@ -#!/usr/bin/env bash -set -o errexit -o pipefail -o posix - -# Copyright (c) 2019-2025 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -# shellcheck source=ci/lib/ci.lib.sh -source "$(dirname "$0")/lib/ci.lib.sh" -cd "$CI_TOPLEVEL_DIR" - -# Initialize the global constants CI_{...}{CHECK,CHECKER,LINT}. -CI_SHELLCHECK="${CI_SHELLCHECK:-shellcheck}" -CI_EDITORCONFIG_CHECKER="${CI_EDITORCONFIG_CHECKER:-editorconfig-checker}" -CI_YAMLLINT="${CI_YAMLLINT:-yamllint}" - -# Initialize the global lint status. -CI_LINT_STATUS=0 - -function ci_init_lint { - ci_info "## START OF LINTING ##" - local my_program - # Complete the initialization of CI_SHELLCHECK. - # Set it to the empty string if the shellcheck program is unavailable. - my_program="$(command -v "$CI_SHELLCHECK")" || { - ci_warn "program not found: '$CI_SHELLCHECK'" - } - CI_SHELLCHECK="$my_program" - # Complete the initialization of CI_EDITORCONFIG_CHECKER. - # Set it to the empty string if the editorconfig-checker program is unavailable. - my_program="$(command -v "$CI_EDITORCONFIG_CHECKER")" || { - ci_warn "program not found: '$CI_EDITORCONFIG_CHECKER'" - } - CI_EDITORCONFIG_CHECKER="$my_program" - # Complete the initialization of CI_YAMLLINT. - # Set it to the empty string if the yamllint program is unavailable. - my_program="$(command -v "$CI_YAMLLINT")" || { - ci_warn "program not found: '$CI_YAMLLINT'" - } - CI_YAMLLINT="$my_program" -} - -function ci_finish_lint { - ci_info "## END OF LINTING ##" - if [[ $CI_LINT_STATUS -eq 0 ]] - then - ci_info "## SUCCESS ##" - else - ci_info "linting failed" - fi - return "$CI_LINT_STATUS" -} - -function ci_lint_ci_scripts { - [[ -x $CI_SHELLCHECK ]] || { - ci_warn "## NOT LINTING: CI scripts ##" - return 0 - } - ci_info "## LINTING: CI scripts ##" - ci_spawn "$CI_SHELLCHECK" --version - find ./ci -name "ci_*.sh" -not -name "ci_env.*.sh" | { - local my_file - while IFS="" read -r my_file - do - ci_spawn "$CI_SHELLCHECK" -x "$my_file" || { - # Linting failed. - return 1 - } - done - } -} - -function ci_lint_text_files { - [[ -x $CI_EDITORCONFIG_CHECKER ]] || { - ci_warn "## NOT LINTING: text files ##" - return 0 - } - ci_info "## LINTING: text files ##" - ci_spawn "$CI_EDITORCONFIG_CHECKER" --version - ci_spawn "$CI_EDITORCONFIG_CHECKER" --config .editorconfig-checker.json || { - # Linting failed. - return 1 - } -} - -function ci_lint_yaml_files { - [[ -x $CI_YAMLLINT ]] || { - ci_warn "## NOT LINTING: YAML files ##" - return 0 - } - ci_info "## LINTING: YAML files ##" - ci_spawn "$CI_YAMLLINT" --version - # Considering that the YAML format is an extension of the JSON format, - # we can lint both the YAML files and the plain JSON files here. - find . \( -iname "*.yml" -o -iname "*.yaml" -o -iname "*.json" \) -not -path "./out/*" | { - local my_file - while IFS="" read -r my_file - do - ci_spawn "$CI_YAMLLINT" --strict "$my_file" || { - # Linting failed. - return 1 - } - done - } -} - -function ci_lint { - ci_init_lint - ci_lint_ci_scripts || CI_LINT_STATUS=1 - ci_lint_text_files || CI_LINT_STATUS=1 - ci_lint_yaml_files || CI_LINT_STATUS=1 - # TODO: ci_lint_png_files, etc. - ci_finish_lint -} - -function usage { - echo "usage: $CI_SCRIPT_NAME []" - echo "options: -?|-h|--help" - exit "${@:-0}" -} - -function main { - local opt - while getopts ":" opt - do - # This ain't a while-loop. It only pretends to be. - [[ $1 == -[?h]* || $1 == --help || $1 == --help=* ]] && usage 0 - ci_err "unknown option: '$1'" - done - shift $((OPTIND - 1)) - [[ $# -eq 0 ]] || { - echo >&2 "error: unexpected argument: '$1'" - usage 2 - } - # And... go! - ci_lint -} - -main "$@" diff --git a/Engine/lib/lpng/ci/ci_verify_cmake.sh b/Engine/lib/lpng/ci/ci_verify_cmake.sh deleted file mode 100644 index aa0646145..000000000 --- a/Engine/lib/lpng/ci/ci_verify_cmake.sh +++ /dev/null @@ -1,209 +0,0 @@ -#!/usr/bin/env bash -set -o errexit -o pipefail -o posix - -# Copyright (c) 2019-2025 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -# shellcheck source=ci/lib/ci.lib.sh -source "$(dirname "$0")/lib/ci.lib.sh" -cd "$CI_TOPLEVEL_DIR" - -CI_SRC_DIR="$CI_TOPLEVEL_DIR" -CI_OUT_DIR="$CI_TOPLEVEL_DIR/out" -CI_BUILD_DIR="$CI_OUT_DIR/ci_verify_cmake.$CI_TARGET_SYSTEM.$CI_TARGET_ARCH.build" -CI_INSTALL_DIR="$CI_OUT_DIR/ci_verify_cmake.$CI_TARGET_SYSTEM.$CI_TARGET_ARCH.install" - -function ci_init_build { - # Ensure that the mandatory variables are initialized. - CI_CMAKE="${CI_CMAKE:-cmake}" - CI_CTEST="${CI_CTEST:-ctest}" - CI_CMAKE_BUILD_TYPE="${CI_CMAKE_BUILD_TYPE:-Release}" - if [[ $CI_CMAKE_GENERATOR == "Visual Studio"* ]] - then - # Clean up incidental mixtures of Windows and Bash-on-Windows - # environment variables, to avoid confusing MSBuild. - [[ $TEMP && ( $Temp || $temp ) ]] && unset TEMP - [[ $TMP && ( $Tmp || $tmp ) ]] && unset TMP - # Ensure that CI_CMAKE_GENERATOR_PLATFORM is initialized for this generator. - [[ $CI_CMAKE_GENERATOR_PLATFORM ]] || { - ci_err_internal "missing \$CI_CMAKE_GENERATOR_PLATFORM" - } - elif [[ -x $(command -v ninja) ]] - then - CI_CMAKE_GENERATOR="${CI_CMAKE_GENERATOR:-Ninja}" - fi -} - -function ci_trace_build { - ci_info "## START OF CONFIGURATION ##" - ci_info "build arch: $CI_BUILD_ARCH" - ci_info "build system: $CI_BUILD_SYSTEM" - [[ "$CI_TARGET_SYSTEM.$CI_TARGET_ARCH" != "$CI_BUILD_SYSTEM.$CI_BUILD_ARCH" ]] && { - ci_info "target arch: $CI_TARGET_ARCH" - ci_info "target system: $CI_TARGET_SYSTEM" - } - ci_info "source directory: $CI_SRC_DIR" - ci_info "build directory: $CI_BUILD_DIR" - ci_info "install directory: $CI_INSTALL_DIR" - ci_info "environment option: \$CI_CMAKE: '$CI_CMAKE'" - ci_info "environment option: \$CI_CMAKE_GENERATOR: '$CI_CMAKE_GENERATOR'" - ci_info "environment option: \$CI_CMAKE_GENERATOR_PLATFORM: '$CI_CMAKE_GENERATOR_PLATFORM'" - ci_info "environment option: \$CI_CMAKE_BUILD_TYPE: '$CI_CMAKE_BUILD_TYPE'" - ci_info "environment option: \$CI_CMAKE_BUILD_FLAGS: '$CI_CMAKE_BUILD_FLAGS'" - ci_info "environment option: \$CI_CMAKE_TOOLCHAIN_FILE: '$CI_CMAKE_TOOLCHAIN_FILE'" - ci_info "environment option: \$CI_CMAKE_VARS: '$CI_CMAKE_VARS'" - ci_info "environment option: \$CI_CTEST: '$CI_CTEST'" - ci_info "environment option: \$CI_CTEST_FLAGS: '$CI_CTEST_FLAGS'" - ci_info "environment option: \$CI_CC: '$CI_CC'" - ci_info "environment option: \$CI_CC_FLAGS: '$CI_CC_FLAGS'" - ci_info "environment option: \$CI_AR: '$CI_AR'" - ci_info "environment option: \$CI_RANLIB: '$CI_RANLIB'" - ci_info "environment option: \$CI_SANITIZERS: '$CI_SANITIZERS'" - ci_info "environment option: \$CI_FORCE: '$CI_FORCE'" - ci_info "environment option: \$CI_NO_BUILD: '$CI_NO_BUILD'" - ci_info "environment option: \$CI_NO_TEST: '$CI_NO_TEST'" - ci_info "environment option: \$CI_NO_INSTALL: '$CI_NO_INSTALL'" - ci_info "environment option: \$CI_NO_CLEAN: '$CI_NO_CLEAN'" - ci_info "executable: \$CI_CMAKE: $(command -V "$CI_CMAKE")" - ci_info "executable: \$CI_CTEST: $(command -V "$CI_CTEST")" - [[ $CI_CC ]] && { - ci_info "executable: \$CI_CC: $(command -V "$CI_CC")" - } - [[ $CI_AR ]] && { - ci_info "executable: \$CI_AR: $(command -V "$CI_AR")" - } - [[ $CI_RANLIB ]] && { - ci_info "executable: \$CI_RANLIB: $(command -V "$CI_RANLIB")" - } - ci_info "## END OF CONFIGURATION ##" -} - -function ci_cleanup_old_build { - ci_info "## START OF PRE-BUILD CLEANUP ##" - [[ ! -e $CI_BUILD_DIR && ! -e $CI_INSTALL_DIR ]] || { - ci_spawn rm -fr "$CI_BUILD_DIR" - ci_spawn rm -fr "$CI_INSTALL_DIR" - } - ci_info "## END OF PRE-BUILD CLEANUP ##" -} - -function ci_build { - ci_info "## START OF BUILD ##" - # Adjust the CI environment variables, as needed. - CI_CMAKE="$(command -v "$CI_CMAKE")" || ci_err "bad or missing \$CI_CMAKE" - ci_spawn "$CI_CMAKE" --version - CI_CTEST="$(command -v "$CI_CTEST")" || ci_err "bad or missing \$CI_CTEST" - ci_spawn "$CI_CTEST" --version - [[ $CI_CMAKE_GENERATOR == *"Ninja"* ]] && { - CI_NINJA="$(command -v ninja)" || ci_err "bad or missing ninja, no pun intended" - ci_spawn "$CI_NINJA" --version - } - [[ $CI_AR ]] && { - # Use the full path of CI_AR to work around a mysterious CMake error. - CI_AR="$(command -v "$CI_AR")" || ci_err "bad or missing \$CI_AR" - } - [[ $CI_RANLIB ]] && { - # Use the full path of CI_RANLIB to work around a mysterious CMake error. - CI_RANLIB="$(command -v "$CI_RANLIB")" || ci_err "bad or missing \$CI_RANLIB" - } - # Export the CMake environment variables. - [[ $CI_CMAKE_GENERATOR ]] && { - ci_spawn export CMAKE_GENERATOR="$CI_CMAKE_GENERATOR" - } - [[ $CI_CMAKE_GENERATOR_PLATFORM ]] && { - ci_spawn export CMAKE_GENERATOR_PLATFORM="$CI_CMAKE_GENERATOR_PLATFORM" - } - # Initialize and populate the local arrays. - local all_cmake_vars=() - local all_cmake_build_flags=() - local all_ctest_flags=() - [[ $CI_CMAKE_TOOLCHAIN_FILE ]] && { - all_cmake_vars+=("-DCMAKE_TOOLCHAIN_FILE=$CI_CMAKE_TOOLCHAIN_FILE") - } - [[ $CI_CC ]] && { - all_cmake_vars+=("-DCMAKE_C_COMPILER=$CI_CC") - } - [[ $CI_CC_FLAGS || $CI_SANITIZERS ]] && { - [[ $CI_SANITIZERS ]] && CI_CC_FLAGS+="${CI_CC_FLAGS:+" "}-fsanitize=$CI_SANITIZERS" - all_cmake_vars+=("-DCMAKE_C_FLAGS=$CI_CC_FLAGS") - } - [[ $CI_AR ]] && { - all_cmake_vars+=("-DCMAKE_AR=$CI_AR") - } - [[ $CI_RANLIB ]] && { - all_cmake_vars+=("-DCMAKE_RANLIB=$CI_RANLIB") - } - all_cmake_vars+=("-DCMAKE_BUILD_TYPE=$CI_CMAKE_BUILD_TYPE") - all_cmake_vars+=("-DCMAKE_VERBOSE_MAKEFILE=ON") - all_cmake_vars+=($CI_CMAKE_VARS) - all_cmake_build_flags+=($CI_CMAKE_BUILD_FLAGS) - all_ctest_flags+=($CI_CTEST_FLAGS) - # And... build! - ci_spawn mkdir -p "$CI_BUILD_DIR" - # Spawn "cmake ...". - ci_spawn "$CI_CMAKE" -B "$CI_BUILD_DIR" \ - -S . \ - -DCMAKE_INSTALL_PREFIX="$CI_INSTALL_DIR" \ - "${all_cmake_vars[@]}" - ci_expr $((CI_NO_BUILD)) || { - # Spawn "cmake --build ...". - ci_spawn "$CI_CMAKE" --build "$CI_BUILD_DIR" \ - --config "$CI_CMAKE_BUILD_TYPE" \ - "${all_cmake_build_flags[@]}" - } - ci_expr $((CI_NO_TEST)) || { - # Spawn "ctest" if testing is not disabled. - ci_spawn pushd "$CI_BUILD_DIR" - ci_spawn "$CI_CTEST" --build-config "$CI_CMAKE_BUILD_TYPE" \ - "${all_ctest_flags[@]}" - ci_spawn popd - } - ci_expr $((CI_NO_INSTALL)) || { - # Spawn "cmake --build ... --target install" if installation is not disabled. - ci_spawn "$CI_CMAKE" --build "$CI_BUILD_DIR" \ - --config "$CI_CMAKE_BUILD_TYPE" \ - --target install \ - "${all_cmake_build_flags[@]}" - } - ci_expr $((CI_NO_CLEAN)) || { - # Spawn "make --build ... --target clean" if cleaning is not disabled. - ci_spawn "$CI_CMAKE" --build "$CI_BUILD_DIR" \ - --config "$CI_CMAKE_BUILD_TYPE" \ - --target clean \ - "${all_cmake_build_flags[@]}" - } - ci_info "## END OF BUILD ##" -} - -function usage { - echo "usage: $CI_SCRIPT_NAME []" - echo "options: -?|-h|--help" - exit "${@:-0}" -} - -function main { - local opt - while getopts ":" opt - do - # This ain't a while-loop. It only pretends to be. - [[ $1 == -[?h]* || $1 == --help || $1 == --help=* ]] && usage 0 - ci_err "unknown option: '$1'" - done - shift $((OPTIND - 1)) - # And... go! - ci_init_build - ci_trace_build - [[ $# -eq 0 ]] || { - echo >&2 "error: unexpected argument: '$1'" - echo >&2 "note: this program accepts environment options only" - usage 2 - } - ci_cleanup_old_build - ci_build -} - -main "$@" diff --git a/Engine/lib/lpng/ci/ci_verify_configure.sh b/Engine/lib/lpng/ci/ci_verify_configure.sh deleted file mode 100644 index b0c74df5e..000000000 --- a/Engine/lib/lpng/ci/ci_verify_configure.sh +++ /dev/null @@ -1,182 +0,0 @@ -#!/usr/bin/env bash -set -o errexit -o pipefail -o posix - -# Copyright (c) 2019-2025 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -# shellcheck source=ci/lib/ci.lib.sh -source "$(dirname "$0")/lib/ci.lib.sh" -cd "$CI_TOPLEVEL_DIR" - -CI_SRC_DIR="$CI_TOPLEVEL_DIR" -CI_OUT_DIR="$CI_TOPLEVEL_DIR/out" -CI_BUILD_DIR="$CI_OUT_DIR/ci_verify_configure.$CI_TARGET_SYSTEM.$CI_TARGET_ARCH.build" -CI_INSTALL_DIR="$CI_OUT_DIR/ci_verify_configure.$CI_TARGET_SYSTEM.$CI_TARGET_ARCH.install" - -function ci_init_build { - # Ensure that the mandatory variables are initialized. - CI_MAKE="${CI_MAKE:-make}" - [[ "$CI_TARGET_SYSTEM.$CI_TARGET_ARCH" != "$CI_BUILD_SYSTEM.$CI_BUILD_ARCH" ]] || { - # For native builds, set CI_CC to "cc" by default if the cc command is available. - # The configure script defaults CC to "gcc", which is not always a good idea. - [[ -x $(command -v cc) ]] && CI_CC="${CI_CC:-cc}" - } - # Ensure that the CI_ variables that cannot be customized reliably are not initialized. - [[ ! $CI_CONFIGURE_VARS ]] || { - ci_err "unsupported: \$CI_CONFIGURE_VARS='$CI_CONFIGURE_VARS'" - } - [[ ! $CI_MAKE_VARS ]] || { - ci_err "unsupported: \$CI_MAKE_VARS='$CI_MAKE_VARS'" - } -} - -function ci_trace_build { - ci_info "## START OF CONFIGURATION ##" - ci_info "build arch: $CI_BUILD_ARCH" - ci_info "build system: $CI_BUILD_SYSTEM" - [[ "$CI_TARGET_SYSTEM.$CI_TARGET_ARCH" != "$CI_BUILD_SYSTEM.$CI_BUILD_ARCH" ]] && { - ci_info "target arch: $CI_TARGET_ARCH" - ci_info "target system: $CI_TARGET_SYSTEM" - } - ci_info "source directory: $CI_SRC_DIR" - ci_info "build directory: $CI_BUILD_DIR" - ci_info "install directory: $CI_INSTALL_DIR" - ci_info "environment option: \$CI_CONFIGURE_FLAGS: '$CI_CONFIGURE_FLAGS'" - ci_info "environment option: \$CI_MAKE: '$CI_MAKE'" - ci_info "environment option: \$CI_MAKE_FLAGS: '$CI_MAKE_FLAGS'" - ci_info "environment option: \$CI_CC: '$CI_CC'" - ci_info "environment option: \$CI_CC_FLAGS: '$CI_CC_FLAGS'" - ci_info "environment option: \$CI_CPP: '$CI_CPP'" - ci_info "environment option: \$CI_CPP_FLAGS: '$CI_CPP_FLAGS'" - ci_info "environment option: \$CI_AR: '$CI_AR'" - ci_info "environment option: \$CI_RANLIB: '$CI_RANLIB'" - ci_info "environment option: \$CI_LD: '$CI_LD'" - ci_info "environment option: \$CI_LD_FLAGS: '$CI_LD_FLAGS'" - ci_info "environment option: \$CI_SANITIZERS: '$CI_SANITIZERS'" - ci_info "environment option: \$CI_FORCE: '$CI_FORCE'" - ci_info "environment option: \$CI_NO_BUILD: '$CI_NO_BUILD'" - ci_info "environment option: \$CI_NO_TEST: '$CI_NO_TEST'" - ci_info "environment option: \$CI_NO_INSTALL: '$CI_NO_INSTALL'" - ci_info "environment option: \$CI_NO_CLEAN: '$CI_NO_CLEAN'" - ci_info "executable: \$CI_MAKE: $(command -V "$CI_MAKE")" - [[ $CI_CC ]] && { - ci_info "executable: \$CI_CC: $(command -V "$CI_CC")" - } - [[ $CI_CPP ]] && { - ci_info "executable: \$CI_CPP: $(command -V "$CI_CPP")" - } - [[ $CI_AR ]] && { - ci_info "executable: \$CI_AR: $(command -V "$CI_AR")" - } - [[ $CI_RANLIB ]] && { - ci_info "executable: \$CI_RANLIB: $(command -V "$CI_RANLIB")" - } - [[ $CI_LD ]] && { - ci_info "executable: \$CI_LD: $(command -V "$CI_LD")" - } - ci_info "## END OF CONFIGURATION ##" -} - -function ci_cleanup_old_build { - ci_info "## START OF PRE-BUILD CLEANUP ##" - [[ ! -e $CI_BUILD_DIR && ! -e $CI_INSTALL_DIR ]] || { - ci_spawn rm -fr "$CI_BUILD_DIR" - ci_spawn rm -fr "$CI_INSTALL_DIR" - } - [[ ! -e "$CI_SRC_DIR/config.status" ]] || { - ci_warn "unexpected build configuration file: '$CI_SRC_DIR/config.status'" - if ci_expr $((CI_FORCE)) - then - # Delete the old config and (possibly) the old build. - ci_info "note: forcing an in-tree build cleanup" - if [[ -f $CI_SRC_DIR/Makefile ]] - then - ci_spawn make -C "$CI_SRC_DIR" distclean - else - ci_spawn rm -fr "$CI_SRC_DIR"/config.{log,status} - fi - else - # Alert the user, but do not delete their files. - ci_warn "the configure script might fail" - ci_info "hint: consider using the option \$CI_FORCE=1" - fi - } - ci_info "## END OF PRE-BUILD CLEANUP ##" -} - -function ci_build { - ci_info "## START OF BUILD ##" - # Export the configure build environment. - [[ $CI_CC ]] && ci_spawn export CC="$CI_CC" - [[ $CI_CC_FLAGS ]] && ci_spawn export CFLAGS="$CI_CC_FLAGS" - [[ $CI_CPP ]] && ci_spawn export CPP="$CI_CPP" - [[ $CI_CPP_FLAGS ]] && ci_spawn export CPPFLAGS="$CI_CPP_FLAGS" - [[ $CI_AR ]] && ci_spawn export AR="$CI_AR" - [[ $CI_RANLIB ]] && ci_spawn export RANLIB="$CI_RANLIB" - [[ $CI_LD ]] && ci_spawn export LD="$CI_LD" - [[ $CI_LD_FLAGS ]] && ci_spawn export LDFLAGS="$CI_LD_FLAGS" - [[ $CI_SANITIZERS ]] && { - ci_spawn export CFLAGS="${CFLAGS:-"-O2"} -fsanitize=$CI_SANITIZERS" - ci_spawn export LDFLAGS="${LDFLAGS}${LDFLAGS:+" "}-fsanitize=$CI_SANITIZERS" - } - # Spawn "autogen.sh" if the configure script is not available. - [[ -x "$CI_SRC_DIR/configure" ]] || { - ci_spawn "$CI_SRC_DIR/autogen.sh" - } - # And... build! - ci_spawn mkdir -p "$CI_BUILD_DIR" - ci_spawn cd "$CI_BUILD_DIR" - # Spawn "configure". - ci_spawn "$CI_SRC_DIR/configure" --prefix="$CI_INSTALL_DIR" $CI_CONFIGURE_FLAGS - ci_expr $((CI_NO_BUILD)) || { - # Spawn "make". - ci_spawn "$CI_MAKE" $CI_MAKE_FLAGS - } - ci_expr $((CI_NO_TEST)) || { - # Spawn "make test" if testing is not disabled. - ci_spawn "$CI_MAKE" $CI_MAKE_FLAGS test - } - ci_expr $((CI_NO_INSTALL)) || { - # Spawn "make install" if installation is not disabled. - ci_spawn "$CI_MAKE" $CI_MAKE_FLAGS install - } - ci_expr $((CI_NO_CLEAN)) || { - # Spawn "make clean" and "make distclean" if cleaning is not disabled. - ci_spawn "$CI_MAKE" $CI_MAKE_FLAGS clean - ci_spawn "$CI_MAKE" $CI_MAKE_FLAGS distclean - } - ci_info "## END OF BUILD ##" -} - -function usage { - echo "usage: $CI_SCRIPT_NAME []" - echo "options: -?|-h|--help" - exit "${@:-0}" -} - -function main { - local opt - while getopts ":" opt - do - # This ain't a while-loop. It only pretends to be. - [[ $1 == -[?h]* || $1 == --help || $1 == --help=* ]] && usage 0 - ci_err "unknown option: '$1'" - done - shift $((OPTIND - 1)) - # And... go! - ci_init_build - ci_trace_build - [[ $# -eq 0 ]] || { - echo >&2 "error: unexpected argument: '$1'" - echo >&2 "note: this program accepts environment options only" - usage 2 - } - ci_cleanup_old_build - ci_build -} - -main "$@" diff --git a/Engine/lib/lpng/ci/ci_verify_makefiles.sh b/Engine/lib/lpng/ci/ci_verify_makefiles.sh deleted file mode 100644 index 2876a8646..000000000 --- a/Engine/lib/lpng/ci/ci_verify_makefiles.sh +++ /dev/null @@ -1,200 +0,0 @@ -#!/usr/bin/env bash -set -o errexit -o pipefail -o posix - -# Copyright (c) 2019-2025 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -# shellcheck source=ci/lib/ci.lib.sh -source "$(dirname "$0")/lib/ci.lib.sh" -cd "$CI_TOPLEVEL_DIR" - -CI_SRC_DIR="$CI_TOPLEVEL_DIR" - -function ci_init_build { - # Ensure that the mandatory variables are initialized. - CI_MAKE="${CI_MAKE:-make}" - case "$CI_CC" in - ( *clang* ) - CI_MAKEFILES="${CI_MAKEFILES:-"scripts/makefile.clang"}" ;; - ( *gcc* ) - CI_MAKEFILES="${CI_MAKEFILES:-"scripts/makefile.gcc"}" ;; - ( * ) - CI_MAKEFILES="${CI_MAKEFILES:-"scripts/makefile.std"}" ;; - esac -} - -function ci_trace_build { - ci_info "## START OF CONFIGURATION ##" - ci_info "build arch: $CI_BUILD_ARCH" - ci_info "build system: $CI_BUILD_SYSTEM" - [[ "$CI_TARGET_SYSTEM.$CI_TARGET_ARCH" != "$CI_BUILD_SYSTEM.$CI_BUILD_ARCH" ]] && { - ci_info "target arch: $CI_TARGET_ARCH" - ci_info "target system: $CI_TARGET_SYSTEM" - } - ci_info "source directory: $CI_SRC_DIR" - ci_info "environment option: \$CI_MAKEFILES: '$CI_MAKEFILES'" - ci_info "environment option: \$CI_MAKE: '$CI_MAKE'" - ci_info "environment option: \$CI_MAKE_FLAGS: '$CI_MAKE_FLAGS'" - ci_info "environment option: \$CI_MAKE_VARS: '$CI_MAKE_VARS'" - ci_info "environment option: \$CI_CC: '$CI_CC'" - ci_info "environment option: \$CI_CC_FLAGS: '$CI_CC_FLAGS'" - ci_info "environment option: \$CI_CPP: '$CI_CPP'" - ci_info "environment option: \$CI_CPP_FLAGS: '$CI_CPP_FLAGS'" - ci_info "environment option: \$CI_AR: '$CI_AR'" - ci_info "environment option: \$CI_RANLIB: '$CI_RANLIB'" - ci_info "environment option: \$CI_LD: '$CI_LD'" - ci_info "environment option: \$CI_LD_FLAGS: '$CI_LD_FLAGS'" - ci_info "environment option: \$CI_LIBS: '$CI_LIBS'" - ci_info "environment option: \$CI_SANITIZERS: '$CI_SANITIZERS'" - ci_info "environment option: \$CI_FORCE: '$CI_FORCE'" - ci_info "environment option: \$CI_NO_BUILD: '$CI_NO_BUILD'" - ci_info "environment option: \$CI_NO_TEST: '$CI_NO_TEST'" - ci_info "environment option: \$CI_NO_CLEAN: '$CI_NO_CLEAN'" - ci_info "executable: \$CI_MAKE: $(command -V "$CI_MAKE")" - [[ $CI_CC ]] && { - ci_info "executable: \$CI_CC: $(command -V "$CI_CC")" - } - [[ $CI_CPP ]] && { - ci_info "executable: \$CI_CPP: $(command -V "$CI_CPP")" - } - [[ $CI_AR ]] && { - ci_info "executable: \$CI_AR: $(command -V "$CI_AR")" - } - [[ $CI_RANLIB ]] && { - ci_info "executable: \$CI_RANLIB: $(command -V "$CI_RANLIB")" - } - [[ $CI_LD ]] && { - ci_info "executable: \$CI_LD: $(command -V "$CI_LD")" - } - ci_info "## END OF CONFIGURATION ##" -} - -function ci_cleanup_old_build { - # Any old makefile-based build will most likely leave a mess - # of object files behind if interrupted, e.g., via Ctrl+C. - # There may be other files behind, depending on what makefile - # had been used. We cannot easily enumerate all of those. - # Fortunately, for a clean makefiles-based build, it should be - # sufficient to remove the old object files only. - ci_info "## START OF PRE-BUILD CLEANUP ##" - local find_args=(-maxdepth 1 \( -iname "*.o" -o -iname "*.obj" \)) - [[ ! $(find "$CI_SRC_DIR" "${find_args[@]}" | head -n1) ]] || { - ci_warn "unexpected build found in '$CI_SRC_DIR'" - if ci_expr $((CI_FORCE)) - then - # Delete the old build. - local my_file - find "$CI_SRC_DIR" "${find_args[@]}" | - while IFS="" read -r my_file - do - ci_spawn rm -fr "$my_file" - done - ci_info "## END OF PRE-BUILD CLEANUP ##" - else - # Alert the user, but do not delete their existing files, - # and do not mess up their existing build. - ci_info "hint: consider using the option \$CI_FORCE=1" - ci_err "unable to continue" - fi - } -} - -function ci_build { - ci_info "## START OF BUILD ##" - # Initialize and populate the local arrays. - local all_make_flags=() - local all_make_vars=() - [[ $CI_MAKE_FLAGS ]] && { - all_make_flags+=($CI_MAKE_FLAGS) - } - [[ $CI_CC ]] && { - all_make_vars+=("CC=$CI_CC") - } - [[ $CI_CC_FLAGS || $CI_SANITIZERS ]] && { - [[ $CI_SANITIZERS ]] && CI_CC_FLAGS="${CI_CC_FLAGS:-"-O2"} -fsanitize=$CI_SANITIZERS" - all_make_vars+=("CFLAGS=$CI_CC_FLAGS") - } - [[ $CI_CPP ]] && { - all_make_vars+=("CPP=$CI_CPP") - } - [[ $CI_CPP_FLAGS ]] && { - all_make_vars+=("CPPFLAGS=$CI_CPP_FLAGS") - } - [[ $CI_AR ]] && { - all_make_vars+=("AR=$CI_AR") - } - [[ $CI_RANLIB ]] && { - all_make_vars+=("RANLIB=$CI_RANLIB") - } - [[ $CI_LD ]] && { - all_make_vars+=("LD=$CI_LD") - } - [[ $CI_LD_FLAGS || $CI_SANITIZERS ]] && { - [[ $CI_SANITIZERS ]] && CI_LD_FLAGS+="${CI_LD_FLAGS:+" "}-fsanitize=$CI_SANITIZERS" - all_make_vars+=("LDFLAGS=$CI_LD_FLAGS") - } - [[ $CI_LIBS ]] && { - all_make_vars+=("LIBS=$CI_LIBS") - } - all_make_vars+=($CI_MAKE_VARS) - # And... build! - local my_makefile - for my_makefile in $CI_MAKEFILES - do - ci_info "using makefile: $my_makefile" - ci_expr $((CI_NO_BUILD)) || { - # Spawn "make". - ci_spawn "$CI_MAKE" -f "$my_makefile" \ - "${all_make_flags[@]}" \ - "${all_make_vars[@]}" - } - ci_expr $((CI_NO_TEST)) || { - # Spawn "make test" if testing is not disabled. - ci_spawn "$CI_MAKE" -f "$my_makefile" \ - "${all_make_flags[@]}" \ - "${all_make_vars[@]}" \ - test - } - ci_expr $((CI_NO_CLEAN)) || { - # Spawn "make clean" if cleaning is not disabled. - ci_spawn "$CI_MAKE" -f "$my_makefile" \ - "${all_make_flags[@]}" \ - "${all_make_vars[@]}" \ - clean - } - done - ci_info "## END OF BUILD ##" -} - -function usage { - echo "usage: $CI_SCRIPT_NAME []" - echo "options: -?|-h|--help" - exit "${@:-0}" -} - -function main { - local opt - while getopts ":" opt - do - # This ain't a while-loop. It only pretends to be. - [[ $1 == -[?h]* || $1 == --help || $1 == --help=* ]] && usage 0 - ci_err "unknown option: '$1'" - done - shift $((OPTIND - 1)) - # And... go! - ci_init_build - ci_trace_build - [[ $# -eq 0 ]] || { - echo >&2 "error: unexpected argument: '$1'" - echo >&2 "note: this program accepts environment options only" - usage 2 - } - ci_cleanup_old_build - ci_build -} - -main "$@" diff --git a/Engine/lib/lpng/ci/ci_verify_version.sh b/Engine/lib/lpng/ci/ci_verify_version.sh deleted file mode 100644 index 5908724cd..000000000 --- a/Engine/lib/lpng/ci/ci_verify_version.sh +++ /dev/null @@ -1,191 +0,0 @@ -#!/usr/bin/env bash -set -o errexit -o pipefail -o posix - -# Copyright (c) 2019-2025 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -# shellcheck source=ci/lib/ci.lib.sh -source "$(dirname "$0")/lib/ci.lib.sh" -cd "$CI_TOPLEVEL_DIR" - -# Declare the global environments collected from various sources. -declare CI_ENV_LIBPNG_VER # collected from png.h -declare CI_ENV_AUTOCONF_VER # collected from configure.ac -declare CI_ENV_CMAKE_VER # collected from CMakeLists.txt -declare CI_ENV_LIBPNGCONFIG_VER # collected from scripts/libpng-config-head.in - -function ci_run_shellify { - local my_script my_result - my_script="$CI_SCRIPT_DIR/libexec/ci_shellify_${1#--}.sh" - shift 1 - [[ -f $my_script ]] || { - ci_err_internal "missing script: '$my_script'" - } - ci_info "shellifying:" "$@" - "$BASH" "$my_script" "$@" - echo "$my_result" | "$BASH" --posix || ci_err "bad shellify output" - echo "$my_result" -} - -function ci_init_version_verification { - ci_info "## START OF VERIFICATION ##" - CI_ENV_LIBPNG_VER="$(ci_run_shellify --c png.h)" - echo "$CI_ENV_LIBPNG_VER" - CI_ENV_AUTOCONF_VER="$(ci_run_shellify --autoconf configure.ac)" - echo "$CI_ENV_AUTOCONF_VER" - CI_ENV_CMAKE_VER="$(ci_run_shellify --cmake CMakeLists.txt)" - echo "$CI_ENV_CMAKE_VER" - CI_ENV_LIBPNGCONFIG_VER="$(ci_run_shellify --shell scripts/libpng-config-head.in)" - echo "$CI_ENV_LIBPNGCONFIG_VER" -} - -# shellcheck disable=SC2154 -function ci_do_version_verification { - local my_expect - ci_info "## VERIFYING: version definitions in 'png.h' ##" - eval "$CI_ENV_LIBPNG_VER" - my_expect="${PNG_LIBPNG_VER_MAJOR}.${PNG_LIBPNG_VER_MINOR}.${PNG_LIBPNG_VER_RELEASE}" - if [[ "$PNG_LIBPNG_VER_STRING" == "$my_expect"* ]] - then - ci_info "matched: \$PNG_LIBPNG_VER_STRING == $my_expect*" - else - ci_err "mismatched: \$PNG_LIBPNG_VER_STRING != $my_expect*" - fi - my_expect=$((PNG_LIBPNG_VER_MAJOR*10000 + PNG_LIBPNG_VER_MINOR*100 + PNG_LIBPNG_VER_RELEASE)) - if [[ "$PNG_LIBPNG_VER" == "$my_expect" ]] - then - ci_info "matched: \$PNG_LIBPNG_VER == $my_expect" - else - ci_err "mismatched: \$PNG_LIBPNG_VER != $my_expect" - fi - my_expect=$((PNG_LIBPNG_VER_MAJOR*10 + PNG_LIBPNG_VER_MINOR)) - if [[ "$PNG_LIBPNG_VER_SHAREDLIB" == "$my_expect" ]] - then - ci_info "matched: \$PNG_LIBPNG_VER_SHAREDLIB == $my_expect" - else - ci_err "mismatched: \$PNG_LIBPNG_VER_SHAREDLIB != $my_expect" - fi - if [[ "$PNG_LIBPNG_VER_SONUM" == "$my_expect" ]] - then - ci_info "matched: \$PNG_LIBPNG_VER_SONUM == $my_expect" - else - ci_err "mismatched: \$PNG_LIBPNG_VER_SONUM != $my_expect" - fi - if [[ "$PNG_LIBPNG_VER_DLLNUM" == "$my_expect" ]] - then - ci_info "matched: \$PNG_LIBPNG_VER_DLLNUM == $my_expect" - else - ci_err "mismatched: \$PNG_LIBPNG_VER_DLLNUM != $my_expect" - fi - if [[ "$PNG_LIBPNG_VER_BUILD" == [01] ]] - then - ci_info "matched: \$PNG_LIBPNG_VER_BUILD == [01]" - else - ci_err "mismatched: \$PNG_LIBPNG_VER_BUILD != [01]" - fi - ci_info "## VERIFYING: build definitions in 'png.h' ##" - my_expect="${PNG_LIBPNG_VER_MAJOR}.${PNG_LIBPNG_VER_MINOR}.${PNG_LIBPNG_VER_RELEASE}" - if [[ "$PNG_LIBPNG_VER_STRING" == "$my_expect" ]] - then - if [[ $PNG_LIBPNG_VER_BUILD -eq 0 ]] - then - ci_info "matched: \$PNG_LIBPNG_VER_BUILD -eq 0" - else - ci_err "mismatched: \$PNG_LIBPNG_VER_BUILD -ne 0" - fi - if [[ $PNG_LIBPNG_BUILD_BASE_TYPE -eq $PNG_LIBPNG_BUILD_STABLE ]] - then - ci_info "matched: \$PNG_LIBPNG_BUILD_BASE_TYPE -eq \$PNG_LIBPNG_BUILD_STABLE" - else - ci_err "mismatched: \$PNG_LIBPNG_BUILD_BASE_TYPE -ne \$PNG_LIBPNG_BUILD_STABLE" - fi - elif [[ "$PNG_LIBPNG_VER_STRING" == "$my_expect".git ]] - then - if [[ $PNG_LIBPNG_VER_BUILD -ne 0 ]] - then - ci_info "matched: \$PNG_LIBPNG_VER_BUILD -ne 0" - else - ci_err "mismatched: \$PNG_LIBPNG_VER_BUILD -eq 0" - fi - if [[ $PNG_LIBPNG_BUILD_BASE_TYPE -ne $PNG_LIBPNG_BUILD_STABLE ]] - then - ci_info "matched: \$PNG_LIBPNG_BUILD_BASE_TYPE -ne \$PNG_LIBPNG_BUILD_STABLE" - else - ci_err "mismatched: \$PNG_LIBPNG_BUILD_BASE_TYPE -eq \$PNG_LIBPNG_BUILD_STABLE" - fi - else - ci_err "unexpected: \$PNG_LIBPNG_VER_STRING == '$PNG_LIBPNG_VER_STRING'" - fi - ci_info "## VERIFYING: type definitions in 'png.h' ##" - my_expect="$(echo "png_libpng_version_${PNG_LIBPNG_VER_STRING}" | tr . _)" - ci_spawn grep -w -e "$my_expect" png.h - ci_info "## VERIFYING: version definitions in 'configure.ac' ##" - eval "$CI_ENV_AUTOCONF_VER" - if [[ "$PNGLIB_VERSION" == "$PNG_LIBPNG_VER_STRING" ]] - then - ci_info "matched: \$PNGLIB_VERSION == \$PNG_LIBPNG_VER_STRING" - else - ci_err "mismatched: \$PNGLIB_VERSION != \$PNG_LIBPNG_VER_STRING" - fi - ci_info "## VERIFYING: version definitions in 'CMakeLists.txt' ##" - eval "$CI_ENV_CMAKE_VER" - if [[ "$PNGLIB_VERSION" == "$PNG_LIBPNG_VER_STRING" && "$PNGLIB_SUBREVISION" == 0 ]] - then - ci_info "matched: \$PNGLIB_VERSION == \$PNG_LIBPNG_VER_STRING" - ci_info "matched: \$PNGLIB_SUBREVISION == 0" - elif [[ "$PNGLIB_VERSION.$PNGLIB_SUBREVISION" == "$PNG_LIBPNG_VER_STRING" ]] - then - ci_info "matched: \$PNGLIB_VERSION.\$PNGLIB_SUBREVISION == \$PNG_LIBPNG_VER_STRING" - else - ci_err "mismatched: \$PNGLIB_VERSION != \$PNG_LIBPNG_VER_STRING" - fi - ci_info "## VERIFYING: version definitions in 'scripts/libpng-config-head.in' ##" - eval "$CI_ENV_LIBPNGCONFIG_VER" - if [[ "$version" == "$PNG_LIBPNG_VER_STRING" ]] - then - ci_info "matched: \$version == \$PNG_LIBPNG_VER_STRING" - else - ci_err "mismatched: \$version != \$PNG_LIBPNG_VER_STRING" - fi -} - -function ci_finish_version_verification { - ci_info "## END OF VERIFICATION ##" - # Relying on "set -o errexit" to not reach here in case of error. - ci_info "## SUCCESS ##" -} - -function ci_verify_version { - ci_init_version_verification - ci_do_version_verification - ci_finish_version_verification -} - -function usage { - echo "usage: $CI_SCRIPT_NAME []" - echo "options: -?|-h|--help" - exit "${@:-0}" -} - -function main { - local opt - while getopts ":" opt - do - # This ain't a while-loop. It only pretends to be. - [[ $1 == -[?h]* || $1 == --help || $1 == --help=* ]] && usage 0 - ci_err "unknown option: '$1'" - done - shift $((OPTIND - 1)) - [[ $# -eq 0 ]] || { - echo >&2 "error: unexpected argument: '$1'" - usage 2 - } - # And... go! - ci_verify_version -} - -main "$@" diff --git a/Engine/lib/lpng/ci/lib/ci.lib.sh b/Engine/lib/lpng/ci/lib/ci.lib.sh deleted file mode 100644 index 7a7474a9a..000000000 --- a/Engine/lib/lpng/ci/lib/ci.lib.sh +++ /dev/null @@ -1,111 +0,0 @@ -# Copyright (c) 2019-2025 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -test -f "$BASH_SOURCE" || { - echo >&2 "warning: this module requires Bash version 3 or newer" -} -test "${#BASH_SOURCE[@]}" -gt 1 || { - echo >&2 "warning: this module should be sourced from a Bash script" -} - -# Reset the locale to avoid surprises from locale-dependent commands. -export LC_ALL=C -export LANG=C -export LANGUAGE=C - -# Reset CDPATH to avoid surprises from the "cd" command. -export CDPATH="" - -# Initialize the global constants CI_SCRIPT_{NAME,DIR} and CI_TOPLEVEL_DIR. -CI_SCRIPT_NAME="$(basename -- "$0")" -CI_SCRIPT_DIR="$(cd "$(dirname -- "$0")" && pwd)" -CI_TOPLEVEL_DIR="$(cd "$(dirname -- "${BASH_SOURCE[0]}")/../.." && pwd)" - -# Initialize the global constants CI_BUILD_{...} for the host build platform. -CI_BUILD_ARCH="${CI_BUILD_ARCH:-"$(uname -m | tr 'A-Z/\.-' 'a-z____')"}" -CI_BUILD_SYSTEM="${CI_BUILD_SYSTEM:-"$(uname -s | tr 'A-Z/\.-' 'a-z____')"}" - -# Initialize the global constants CI_TARGET_{...} for the target platform. -CI_TARGET_ARCH="${CI_TARGET_ARCH:-"$CI_BUILD_ARCH"}" -CI_TARGET_SYSTEM="${CI_TARGET_SYSTEM:-"$CI_BUILD_SYSTEM"}" - -function ci_info { - printf >&2 "%s: %s\\n" "$CI_SCRIPT_NAME" "$*" -} - -function ci_warn { - printf >&2 "%s: warning: %s\\n" "$CI_SCRIPT_NAME" "$*" -} - -function ci_err { - printf >&2 "%s: error: %s\\n" "$CI_SCRIPT_NAME" "$*" - exit 2 -} - -function ci_err_internal { - printf >&2 "%s: internal error: %s\\n" "$CI_SCRIPT_NAME" "$*" - printf >&2 "ABORTED\\n" - # Exit with the conventional SIGABRT code. - exit 134 -} - -function ci_expr { - if [[ ${*:-0} == [0-9] ]] - then - # This is the same as in the else-branch below, albeit much faster - # for our intended use cases. - return $((!$1)) - else - # The funny-looking compound command "... && return $? || return $?" - # allows the execution to continue uninterrupted under "set -e". - expr >/dev/null "$@" && return $? || return $? - fi -} - -function ci_spawn { - printf >&2 "%s: executing:" "$CI_SCRIPT_NAME" - printf >&2 " %q" "$@" - printf >&2 "\\n" - "$@" -} - -# Ensure that the internal initialization is correct. -[[ $CI_TOPLEVEL_DIR/ci/lib/ci.lib.sh -ef ${BASH_SOURCE[0]} ]] || { - ci_err_internal "bad or missing \$CI_TOPLEVEL_DIR" -} -[[ $CI_SCRIPT_DIR/$CI_SCRIPT_NAME -ef $0 ]] || { - ci_err_internal "bad or missing \$CI_SCRIPT_DIR/\$CI_SCRIPT_NAME" -} -[[ $CI_BUILD_ARCH && $CI_BUILD_SYSTEM ]] || { - ci_err_internal "missing \$CI_BUILD_ARCH or \$CI_BUILD_SYSTEM" -} -[[ $CI_TARGET_ARCH && $CI_TARGET_SYSTEM ]] || { - ci_err_internal "missing \$CI_TARGET_ARCH or \$CI_TARGET_SYSTEM" -} - -# Ensure that the user initialization is correct. -[[ ${CI_FORCE:-0} == [01] ]] || { - ci_err "bad boolean option: \$CI_FORCE: '$CI_FORCE'" -} -[[ ${CI_NO_BUILD:-0} == [01] ]] || { - ci_err "bad boolean option: \$CI_NO_BUILD: '$CI_NO_BUILD'" -} -[[ ${CI_NO_TEST:-0} == [01] ]] || { - ci_err "bad boolean option: \$CI_NO_TEST: '$CI_NO_TEST'" -} -[[ ${CI_NO_INSTALL:-0} == [01] ]] || { - ci_err "bad boolean option: \$CI_NO_INSTALL: '$CI_NO_INSTALL'" -} -[[ ${CI_NO_CLEAN:-0} == [01] ]] || { - ci_err "bad boolean option: \$CI_NO_CLEAN: '$CI_NO_CLEAN'" -} -if ci_expr $((CI_NO_BUILD)) -then - ci_expr $((CI_NO_TEST && CI_NO_INSTALL)) || { - ci_err "\$CI_NO_BUILD requires \$CI_NO_TEST and \$CI_NO_INSTALL" - } -fi diff --git a/Engine/lib/lpng/ci/libexec/ci_shellify_autoconf.sh b/Engine/lib/lpng/ci/libexec/ci_shellify_autoconf.sh deleted file mode 100644 index bf37f0d26..000000000 --- a/Engine/lib/lpng/ci/libexec/ci_shellify_autoconf.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env bash -set -o errexit -o pipefail -o posix - -# Copyright (c) 2019-2025 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -# shellcheck source=ci/lib/ci.lib.sh -source "$(dirname "$0")/../lib/ci.lib.sh" - -function ci_shellify_autoconf { - # Convert autoconf (M4) text, specifically originating - # from configure.ac, to shell scripting text. - # Select only the easy-to-parse definitions of PNGLIB_*. - sed -n -e '/^ *PNGLIB_[^ ]*=[$"0-9A-Za-z_]/ p' | - sed -e 's/^ *PNG\([0-9A-Za-z_]*\)=\([^# ]*\).*$/PNG\1=\2/' \ - -e 's/^\([^ ]*=[^ ]*\).*$/export \1;/' -} - -function usage { - echo "usage: $CI_SCRIPT_NAME [] configure.ac" - echo "options: -?|-h|--help" - exit "${@:-0}" -} - -function main { - local opt - while getopts ":" opt - do - # This ain't a while-loop. It only pretends to be. - [[ $1 == -[?h]* || $1 == --help || $1 == --help=* ]] && usage 0 - ci_err "unknown option: '$1'" - done - shift $((OPTIND - 1)) - [[ $# -eq 0 ]] && usage 2 - [[ $# -eq 1 ]] || ci_err "too many operands" - # And... go! - test -e "$1" || ci_err "no such file: '$1'" - [[ $(basename -- "$1") == configure.ac ]] || { - ci_err "incorrect operand: '$1' (expecting: 'configure.ac')" - } - ci_shellify_autoconf <"$1" -} - -main "$@" diff --git a/Engine/lib/lpng/ci/libexec/ci_shellify_c.sh b/Engine/lib/lpng/ci/libexec/ci_shellify_c.sh deleted file mode 100644 index 244fc2275..000000000 --- a/Engine/lib/lpng/ci/libexec/ci_shellify_c.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env bash -set -o errexit -o pipefail -o posix - -# Copyright (c) 2019-2025 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -# shellcheck source=ci/lib/ci.lib.sh -source "$(dirname "$0")/../lib/ci.lib.sh" - -function ci_shellify_c { - # Convert C preprocessor text, specifically originating - # from png.h, to shell scripting text. - # Select only the easy-to-parse definitions of PNG_LIBPNG_*. - sed -n -e '/^\# *define * PNG_LIBPNG_[^ ]* * ["0-9A-Za-z_]/ p' | - sed -e 's/^\# *define * PNG\([^ ]*\) * \([^ ]*\)/PNG\1=\2/' \ - -e 's/=PNG\([0-9A-Za-z_]*\)/=\${PNG\1}/' \ - -e 's/^\([^ ]*=[^ ]*\).*$/export \1;/' -} - -function usage { - echo "usage: $CI_SCRIPT_NAME [] png.h" - echo "options: -?|-h|--help" - exit "${@:-0}" -} - -function main { - local opt - while getopts ":" opt - do - # This ain't a while-loop. It only pretends to be. - [[ $1 == -[?h]* || $1 == --help || $1 == --help=* ]] && usage 0 - ci_err "unknown option: '$1'" - done - shift $((OPTIND - 1)) - [[ $# -eq 0 ]] && usage 2 - [[ $# -eq 1 ]] || ci_err "too many operands" - # And... go! - test -e "$1" || ci_err "no such file: '$1'" - [[ $(basename -- "$1") == png.h ]] || { - ci_err "incorrect operand: '$1' (expecting: 'png.h')" - } - ci_shellify_c <"$1" -} - -main "$@" diff --git a/Engine/lib/lpng/ci/libexec/ci_shellify_cmake.sh b/Engine/lib/lpng/ci/libexec/ci_shellify_cmake.sh deleted file mode 100644 index 5596241ae..000000000 --- a/Engine/lib/lpng/ci/libexec/ci_shellify_cmake.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env bash -set -o errexit -o pipefail -o posix - -# Copyright (c) 2019-2025 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -# shellcheck source=ci/lib/ci.lib.sh -source "$(dirname "$0")/../lib/ci.lib.sh" - -function ci_shellify_cmake { - # Convert CMake lists text, specifically originating - # from CMakeLists.txt, to shell scripting text. - # Select only the easy-to-parse definitions of PNGLIB_*. - sed -n -e '/^ *set *(PNGLIB_[^ ]* * [$"0-9A-Za-z_].*)/ p' | - sed -e 's/^ *set *(PNG\([^ ]*\) * \([^() ]*\)).*$/PNG\1=\2/' \ - -e 's/^\([^ ]*=[^ ]*\).*$/export \1;/' -} - -function usage { - echo "usage: $CI_SCRIPT_NAME [] CMakeLists.txt" - echo "options: -?|-h|--help" - exit "${@:-0}" -} - -function main { - local opt - while getopts ":" opt - do - # This ain't a while-loop. It only pretends to be. - [[ $1 == -[?h]* || $1 == --help || $1 == --help=* ]] && usage 0 - ci_err "unknown option: '$1'" - done - shift $((OPTIND - 1)) - [[ $# -eq 0 ]] && usage 2 - [[ $# -eq 1 ]] || ci_err "too many operands" - # And... go! - test -e "$1" || ci_err "no such file: '$1'" - filename="$(basename -- "$1")" - [[ $filename == [Cc][Mm]ake[Ll]ists.txt ]] || { - ci_err "incorrect operand: '$1' (expecting: 'CMakeLists.txt')" - } - ci_shellify_cmake <"$1" -} - -main "$@" diff --git a/Engine/lib/lpng/ci/libexec/ci_shellify_shell.sh b/Engine/lib/lpng/ci/libexec/ci_shellify_shell.sh deleted file mode 100644 index 417006316..000000000 --- a/Engine/lib/lpng/ci/libexec/ci_shellify_shell.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env bash -set -o errexit -o pipefail -o posix - -# Copyright (c) 2019-2025 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -# shellcheck source=ci/lib/ci.lib.sh -source "$(dirname "$0")/../lib/ci.lib.sh" - -function ci_shellify_shell { - # Convert shell scripting text to shell scripting text. - # Select only the easy-to-parse version definitions. - sed -n -e '/^ *[A-Za-z_][0-9A-Za-z_]*=[0-9][^ #]* *$/ p' | - sed -e 's/^ *\([^ ]*=[^ ]*\) *$/export \1;/' -} - -function usage { - echo "usage: $CI_SCRIPT_NAME [] libpng-config-head.in" - echo "options: -?|-h|--help" - exit "${@:-0}" -} - -function main { - local opt - while getopts ":" opt - do - # This ain't a while-loop. It only pretends to be. - [[ $1 == -[?h]* || $1 == --help || $1 == --help=* ]] && usage 0 - ci_err "unknown option: '$1'" - done - shift $((OPTIND - 1)) - [[ $# -eq 0 ]] && usage 2 - [[ $# -eq 1 ]] || ci_err "too many operands" - # And... go! - test -e "$1" || ci_err "no such file: '$1'" - [[ $(basename -- "$1") == libpng-config-head.in ]] || { - ci_err "incorrect operand: '$1' (expecting: 'libpng-config-head.in')" - } - ci_shellify_shell <"$1" -} - -main "$@" diff --git a/Engine/lib/lpng/ci/targets/android/ci_env.aarch64-linux-android.sh b/Engine/lib/lpng/ci/targets/android/ci_env.aarch64-linux-android.sh deleted file mode 100644 index fef0ef138..000000000 --- a/Engine/lib/lpng/ci/targets/android/ci_env.aarch64-linux-android.sh +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=aarch64 -export CI_TARGET_ARCHVER=aarch64 -export CI_TARGET_SYSTEM=linux -export CI_TARGET_ABI=android -export CI_TARGET_ABIVER=android29 - -export CI_CC="$CI_TARGET_ARCHVER-$CI_TARGET_SYSTEM-$CI_TARGET_ABIVER-clang" -export CI_AR="llvm-ar" -export CI_RANLIB="llvm-ranlib" diff --git a/Engine/lib/lpng/ci/targets/android/ci_env.armv7a-linux-androideabi.sh b/Engine/lib/lpng/ci/targets/android/ci_env.armv7a-linux-androideabi.sh deleted file mode 100644 index c27bd121e..000000000 --- a/Engine/lib/lpng/ci/targets/android/ci_env.armv7a-linux-androideabi.sh +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=arm -export CI_TARGET_ARCHVER=armv7a -export CI_TARGET_SYSTEM=linux -export CI_TARGET_ABI=androideabi -export CI_TARGET_ABIVER=androideabi29 - -export CI_CC="$CI_TARGET_ARCHVER-$CI_TARGET_SYSTEM-$CI_TARGET_ABIVER-clang" -export CI_AR="llvm-ar" -export CI_RANLIB="llvm-ranlib" diff --git a/Engine/lib/lpng/ci/targets/android/ci_env.i686-linux-android.sh b/Engine/lib/lpng/ci/targets/android/ci_env.i686-linux-android.sh deleted file mode 100644 index 88e369082..000000000 --- a/Engine/lib/lpng/ci/targets/android/ci_env.i686-linux-android.sh +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=i686 -export CI_TARGET_ARCHVER=i686 -export CI_TARGET_SYSTEM=linux -export CI_TARGET_ABI=android -export CI_TARGET_ABIVER=android29 - -export CI_CC="$CI_TARGET_ARCHVER-$CI_TARGET_SYSTEM-$CI_TARGET_ABIVER-clang" -export CI_AR="llvm-ar" -export CI_RANLIB="llvm-ranlib" diff --git a/Engine/lib/lpng/ci/targets/android/ci_env.x86_64-linux-android.sh b/Engine/lib/lpng/ci/targets/android/ci_env.x86_64-linux-android.sh deleted file mode 100644 index 87460c888..000000000 --- a/Engine/lib/lpng/ci/targets/android/ci_env.x86_64-linux-android.sh +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=x86_64 -export CI_TARGET_ARCHVER=x86_64 -export CI_TARGET_SYSTEM=linux -export CI_TARGET_ABI=android -export CI_TARGET_ABIVER=android29 - -export CI_CC="$CI_TARGET_ARCHVER-$CI_TARGET_SYSTEM-$CI_TARGET_ABIVER-clang" -export CI_AR="llvm-ar" -export CI_RANLIB="llvm-ranlib" diff --git a/Engine/lib/lpng/ci/targets/cygwin/ci_env.i686-pc-cygwin.sh b/Engine/lib/lpng/ci/targets/cygwin/ci_env.i686-pc-cygwin.sh deleted file mode 100644 index 66b99997b..000000000 --- a/Engine/lib/lpng/ci/targets/cygwin/ci_env.i686-pc-cygwin.sh +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=i686 -export CI_TARGET_SYSTEM=cygwin - -export CI_CC="$CI_TARGET_ARCH-pc-$CI_TARGET_SYSTEM-gcc" -export CI_AR="$CI_CC-ar" -export CI_RANLIB="$CI_CC-ranlib" - -export CI_CMAKE_VARS=" - -DCMAKE_SYSTEM_NAME=CYGWIN - -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH -" diff --git a/Engine/lib/lpng/ci/targets/cygwin/ci_env.x86_64-pc-cygwin.sh b/Engine/lib/lpng/ci/targets/cygwin/ci_env.x86_64-pc-cygwin.sh deleted file mode 100644 index 78f8c25ff..000000000 --- a/Engine/lib/lpng/ci/targets/cygwin/ci_env.x86_64-pc-cygwin.sh +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=x86_64 -export CI_TARGET_SYSTEM=cygwin - -export CI_CC="$CI_TARGET_ARCH-pc-$CI_TARGET_SYSTEM-gcc" -export CI_AR="$CI_CC-ar" -export CI_RANLIB="$CI_CC-ranlib" - -export CI_CMAKE_VARS=" - -DCMAKE_SYSTEM_NAME=CYGWIN - -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH -" diff --git a/Engine/lib/lpng/ci/targets/darwin/ci_env.arm64-apple-darwin.sh b/Engine/lib/lpng/ci/targets/darwin/ci_env.arm64-apple-darwin.sh deleted file mode 100644 index c54d8c760..000000000 --- a/Engine/lib/lpng/ci/targets/darwin/ci_env.arm64-apple-darwin.sh +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=arm64 -export CI_TARGET_SYSTEM=darwin - -export CI_CMAKE_VARS=" - -DCMAKE_SYSTEM_NAME=Darwin - -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH - -DCMAKE_OSX_ARCHITECTURES=$CI_TARGET_ARCH -" diff --git a/Engine/lib/lpng/ci/targets/darwin/ci_env.x86_64-apple-darwin.sh b/Engine/lib/lpng/ci/targets/darwin/ci_env.x86_64-apple-darwin.sh deleted file mode 100644 index ee87711d5..000000000 --- a/Engine/lib/lpng/ci/targets/darwin/ci_env.x86_64-apple-darwin.sh +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=x86_64 -export CI_TARGET_SYSTEM=darwin - -export CI_CMAKE_VARS=" - -DCMAKE_SYSTEM_NAME=Darwin - -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH - -DCMAKE_OSX_ARCHITECTURES=$CI_TARGET_ARCH -" diff --git a/Engine/lib/lpng/ci/targets/freebsd/ci_env.aarch64-unknown-freebsd.sh b/Engine/lib/lpng/ci/targets/freebsd/ci_env.aarch64-unknown-freebsd.sh deleted file mode 100644 index 42235de7d..000000000 --- a/Engine/lib/lpng/ci/targets/freebsd/ci_env.aarch64-unknown-freebsd.sh +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=aarch64 -export CI_TARGET_SYSTEM=freebsd - -export CI_CMAKE_VARS=" - -DCMAKE_SYSTEM_NAME=FreeBSD - -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH -" diff --git a/Engine/lib/lpng/ci/targets/freebsd/ci_env.i686-unknown-freebsd.sh b/Engine/lib/lpng/ci/targets/freebsd/ci_env.i686-unknown-freebsd.sh deleted file mode 100644 index 3d188f8da..000000000 --- a/Engine/lib/lpng/ci/targets/freebsd/ci_env.i686-unknown-freebsd.sh +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=i686 -export CI_TARGET_SYSTEM=freebsd - -export CI_CMAKE_VARS=" - -DCMAKE_SYSTEM_NAME=FreeBSD - -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH -" diff --git a/Engine/lib/lpng/ci/targets/freebsd/ci_env.riscv64-unknown-freebsd.sh b/Engine/lib/lpng/ci/targets/freebsd/ci_env.riscv64-unknown-freebsd.sh deleted file mode 100644 index 0a02cde4f..000000000 --- a/Engine/lib/lpng/ci/targets/freebsd/ci_env.riscv64-unknown-freebsd.sh +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=riscv64 -export CI_TARGET_SYSTEM=freebsd - -export CI_CMAKE_VARS=" - -DCMAKE_SYSTEM_NAME=FreeBSD - -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH -" diff --git a/Engine/lib/lpng/ci/targets/freebsd/ci_env.x86_64-unknown-freebsd.sh b/Engine/lib/lpng/ci/targets/freebsd/ci_env.x86_64-unknown-freebsd.sh deleted file mode 100644 index c77ace53b..000000000 --- a/Engine/lib/lpng/ci/targets/freebsd/ci_env.x86_64-unknown-freebsd.sh +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=x86_64 -export CI_TARGET_SYSTEM=freebsd - -export CI_CMAKE_VARS=" - -DCMAKE_SYSTEM_NAME=FreeBSD - -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH -" diff --git a/Engine/lib/lpng/ci/targets/linux/ci_env.aarch64-linux-gnu.sh b/Engine/lib/lpng/ci/targets/linux/ci_env.aarch64-linux-gnu.sh deleted file mode 100644 index cb85bc6d8..000000000 --- a/Engine/lib/lpng/ci/targets/linux/ci_env.aarch64-linux-gnu.sh +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=aarch64 -export CI_TARGET_SYSTEM=linux -export CI_TARGET_ABI=gnu - -export CI_GCC="${CI_GCC-gcc}" - -export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC" -export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar" -export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib" - -export CI_CMAKE_VARS=" - -DCMAKE_SYSTEM_NAME=Linux - -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH -" diff --git a/Engine/lib/lpng/ci/targets/linux/ci_env.arm-linux-gnueabi.sh b/Engine/lib/lpng/ci/targets/linux/ci_env.arm-linux-gnueabi.sh deleted file mode 100644 index 45504dfcd..000000000 --- a/Engine/lib/lpng/ci/targets/linux/ci_env.arm-linux-gnueabi.sh +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=arm -export CI_TARGET_SYSTEM=linux -export CI_TARGET_ABI=gnueabi - -export CI_GCC="${CI_GCC-gcc}" - -export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC" -export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar" -export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib" - -export CI_CMAKE_VARS=" - -DCMAKE_SYSTEM_NAME=Linux - -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH -" diff --git a/Engine/lib/lpng/ci/targets/linux/ci_env.arm-linux-gnueabihf.sh b/Engine/lib/lpng/ci/targets/linux/ci_env.arm-linux-gnueabihf.sh deleted file mode 100644 index 3eb9d1892..000000000 --- a/Engine/lib/lpng/ci/targets/linux/ci_env.arm-linux-gnueabihf.sh +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=arm -export CI_TARGET_SYSTEM=linux -export CI_TARGET_ABI=gnueabihf - -export CI_GCC="${CI_GCC-gcc}" - -export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC" -export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar" -export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib" - -export CI_CMAKE_VARS=" - -DCMAKE_SYSTEM_NAME=Linux - -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH -" diff --git a/Engine/lib/lpng/ci/targets/linux/ci_env.i686-linux-gnu.sh b/Engine/lib/lpng/ci/targets/linux/ci_env.i686-linux-gnu.sh deleted file mode 100644 index a5efd9f7f..000000000 --- a/Engine/lib/lpng/ci/targets/linux/ci_env.i686-linux-gnu.sh +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=i686 -export CI_TARGET_SYSTEM=linux -export CI_TARGET_ABI=gnu - -export CI_GCC="${CI_GCC-gcc}" - -export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC" -export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar" -export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib" - -export CI_CMAKE_VARS=" - -DCMAKE_SYSTEM_NAME=Linux - -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH -" diff --git a/Engine/lib/lpng/ci/targets/linux/ci_env.mips-linux-gnu.sh b/Engine/lib/lpng/ci/targets/linux/ci_env.mips-linux-gnu.sh deleted file mode 100644 index 532c93c04..000000000 --- a/Engine/lib/lpng/ci/targets/linux/ci_env.mips-linux-gnu.sh +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=mips -export CI_TARGET_SYSTEM=linux -export CI_TARGET_ABI=gnu - -export CI_GCC="${CI_GCC-gcc}" - -export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC" -export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar" -export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib" - -export CI_CMAKE_VARS=" - -DCMAKE_SYSTEM_NAME=Linux - -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH -" diff --git a/Engine/lib/lpng/ci/targets/linux/ci_env.mips64-linux-gnuabi64.sh b/Engine/lib/lpng/ci/targets/linux/ci_env.mips64-linux-gnuabi64.sh deleted file mode 100644 index 348d2b800..000000000 --- a/Engine/lib/lpng/ci/targets/linux/ci_env.mips64-linux-gnuabi64.sh +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=mips64 -export CI_TARGET_SYSTEM=linux -export CI_TARGET_ABI=gnuabi64 - -export CI_GCC="${CI_GCC-gcc}" - -export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC" -export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar" -export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib" - -export CI_CMAKE_VARS=" - -DCMAKE_SYSTEM_NAME=Linux - -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH -" diff --git a/Engine/lib/lpng/ci/targets/linux/ci_env.mips64el-linux-gnuabi64.sh b/Engine/lib/lpng/ci/targets/linux/ci_env.mips64el-linux-gnuabi64.sh deleted file mode 100644 index e264913d8..000000000 --- a/Engine/lib/lpng/ci/targets/linux/ci_env.mips64el-linux-gnuabi64.sh +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=mips64el -export CI_TARGET_SYSTEM=linux -export CI_TARGET_ABI=gnuabi64 - -export CI_GCC="${CI_GCC-gcc}" - -export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC" -export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar" -export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib" - -export CI_CMAKE_VARS=" - -DCMAKE_SYSTEM_NAME=Linux - -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH -" diff --git a/Engine/lib/lpng/ci/targets/linux/ci_env.mipsel-linux-gnu.sh b/Engine/lib/lpng/ci/targets/linux/ci_env.mipsel-linux-gnu.sh deleted file mode 100644 index f99050f10..000000000 --- a/Engine/lib/lpng/ci/targets/linux/ci_env.mipsel-linux-gnu.sh +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=mipsel -export CI_TARGET_SYSTEM=linux -export CI_TARGET_ABI=gnu - -export CI_GCC="${CI_GCC-gcc}" - -export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC" -export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar" -export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib" - -export CI_CMAKE_VARS=" - -DCMAKE_SYSTEM_NAME=Linux - -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH -" diff --git a/Engine/lib/lpng/ci/targets/linux/ci_env.mipsisa32r6-linux-gnu.sh b/Engine/lib/lpng/ci/targets/linux/ci_env.mipsisa32r6-linux-gnu.sh deleted file mode 100644 index 0a32867f6..000000000 --- a/Engine/lib/lpng/ci/targets/linux/ci_env.mipsisa32r6-linux-gnu.sh +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=mipsisa32r6 -export CI_TARGET_SYSTEM=linux -export CI_TARGET_ABI=gnu - -export CI_GCC="${CI_GCC-gcc}" - -export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC" -export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar" -export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib" - -export CI_CMAKE_VARS=" - -DCMAKE_SYSTEM_NAME=Linux - -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH -" diff --git a/Engine/lib/lpng/ci/targets/linux/ci_env.mipsisa32r6el-linux-gnu.sh b/Engine/lib/lpng/ci/targets/linux/ci_env.mipsisa32r6el-linux-gnu.sh deleted file mode 100644 index ca0600930..000000000 --- a/Engine/lib/lpng/ci/targets/linux/ci_env.mipsisa32r6el-linux-gnu.sh +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=mipsisa32r6el -export CI_TARGET_SYSTEM=linux -export CI_TARGET_ABI=gnu - -export CI_GCC="${CI_GCC-gcc}" - -export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC" -export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar" -export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib" - -export CI_CMAKE_VARS=" - -DCMAKE_SYSTEM_NAME=Linux - -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH -" diff --git a/Engine/lib/lpng/ci/targets/linux/ci_env.mipsisa64r6-linux-gnuabi64.sh b/Engine/lib/lpng/ci/targets/linux/ci_env.mipsisa64r6-linux-gnuabi64.sh deleted file mode 100644 index 6c1138fe6..000000000 --- a/Engine/lib/lpng/ci/targets/linux/ci_env.mipsisa64r6-linux-gnuabi64.sh +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=mipsisa64r6 -export CI_TARGET_SYSTEM=linux -export CI_TARGET_ABI=gnuabi64 - -export CI_GCC="${CI_GCC-gcc}" - -export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC" -export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar" -export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib" - -export CI_CMAKE_VARS=" - -DCMAKE_SYSTEM_NAME=Linux - -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH -" diff --git a/Engine/lib/lpng/ci/targets/linux/ci_env.mipsisa64r6el-linux-gnuabi64.sh b/Engine/lib/lpng/ci/targets/linux/ci_env.mipsisa64r6el-linux-gnuabi64.sh deleted file mode 100644 index f64f2fcf4..000000000 --- a/Engine/lib/lpng/ci/targets/linux/ci_env.mipsisa64r6el-linux-gnuabi64.sh +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=mipsisa64r6el -export CI_TARGET_SYSTEM=linux -export CI_TARGET_ABI=gnuabi64 - -export CI_GCC="${CI_GCC-gcc}" - -export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC" -export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar" -export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib" - -export CI_CMAKE_VARS=" - -DCMAKE_SYSTEM_NAME=Linux - -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH -" diff --git a/Engine/lib/lpng/ci/targets/linux/ci_env.powerpc-linux-gnu.sh b/Engine/lib/lpng/ci/targets/linux/ci_env.powerpc-linux-gnu.sh deleted file mode 100644 index e50d9b502..000000000 --- a/Engine/lib/lpng/ci/targets/linux/ci_env.powerpc-linux-gnu.sh +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=powerpc -export CI_TARGET_SYSTEM=linux -export CI_TARGET_ABI=gnu - -export CI_GCC="${CI_GCC-gcc}" - -export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC" -export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar" -export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib" - -export CI_CMAKE_VARS=" - -DCMAKE_SYSTEM_NAME=Linux - -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH -" diff --git a/Engine/lib/lpng/ci/targets/linux/ci_env.powerpc64-linux-gnu.sh b/Engine/lib/lpng/ci/targets/linux/ci_env.powerpc64-linux-gnu.sh deleted file mode 100644 index 15e60adf2..000000000 --- a/Engine/lib/lpng/ci/targets/linux/ci_env.powerpc64-linux-gnu.sh +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=powerpc64 -export CI_TARGET_SYSTEM=linux -export CI_TARGET_ABI=gnu - -export CI_GCC="${CI_GCC-gcc}" - -export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC" -export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar" -export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib" - -export CI_CMAKE_VARS=" - -DCMAKE_SYSTEM_NAME=Linux - -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH -" diff --git a/Engine/lib/lpng/ci/targets/linux/ci_env.powerpc64le-linux-gnu.sh b/Engine/lib/lpng/ci/targets/linux/ci_env.powerpc64le-linux-gnu.sh deleted file mode 100644 index be0e2ca69..000000000 --- a/Engine/lib/lpng/ci/targets/linux/ci_env.powerpc64le-linux-gnu.sh +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=powerpc64le -export CI_TARGET_SYSTEM=linux -export CI_TARGET_ABI=gnu - -export CI_GCC="${CI_GCC-gcc}" - -export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC" -export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar" -export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib" - -export CI_CMAKE_VARS=" - -DCMAKE_SYSTEM_NAME=Linux - -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH -" diff --git a/Engine/lib/lpng/ci/targets/linux/ci_env.riscv64-linux-gnu.sh b/Engine/lib/lpng/ci/targets/linux/ci_env.riscv64-linux-gnu.sh deleted file mode 100644 index d8518d97f..000000000 --- a/Engine/lib/lpng/ci/targets/linux/ci_env.riscv64-linux-gnu.sh +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=riscv64 -export CI_TARGET_SYSTEM=linux -export CI_TARGET_ABI=gnu - -export CI_GCC="${CI_GCC-gcc}" - -export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC" -export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar" -export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib" - -export CI_CMAKE_VARS=" - -DCMAKE_SYSTEM_NAME=Linux - -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH -" diff --git a/Engine/lib/lpng/ci/targets/linux/ci_env.x86_64-linux-gnu.sh b/Engine/lib/lpng/ci/targets/linux/ci_env.x86_64-linux-gnu.sh deleted file mode 100644 index 3263fbff8..000000000 --- a/Engine/lib/lpng/ci/targets/linux/ci_env.x86_64-linux-gnu.sh +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=x86_64 -export CI_TARGET_SYSTEM=linux -export CI_TARGET_ABI=gnu - -export CI_GCC="${CI_GCC-gcc}" - -export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC" -export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar" -export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib" - -export CI_CMAKE_VARS=" - -DCMAKE_SYSTEM_NAME=Linux - -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH -" diff --git a/Engine/lib/lpng/ci/targets/msdos/ci_env.i386-pc-msdoswatcom.sh b/Engine/lib/lpng/ci/targets/msdos/ci_env.i386-pc-msdoswatcom.sh deleted file mode 100644 index 59f3bd58f..000000000 --- a/Engine/lib/lpng/ci/targets/msdos/ci_env.i386-pc-msdoswatcom.sh +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=i386 -export CI_TARGET_SYSTEM=msdoswatcom - -export CI_CC="wcl386" - -# Open Watcom V2 CMake build -# https://github.com/open-watcom/open-watcom-v2/discussions/716 -export CI_CMAKE_GENERATOR="Watcom WMake" -export CI_CMAKE_VARS=" - -DCMAKE_SYSTEM_NAME=DOS -" diff --git a/Engine/lib/lpng/ci/targets/msdos/ci_env.i586-pc-msdosdjgpp.sh b/Engine/lib/lpng/ci/targets/msdos/ci_env.i586-pc-msdosdjgpp.sh deleted file mode 100644 index 63e6d0676..000000000 --- a/Engine/lib/lpng/ci/targets/msdos/ci_env.i586-pc-msdosdjgpp.sh +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=i586 -export CI_TARGET_SYSTEM=msdosdjgpp - -export CI_CC="$CI_TARGET_ARCH-pc-$CI_TARGET_SYSTEM-gcc" -export CI_AR="$CI_CC-ar" -export CI_RANLIB="$CI_CC-ranlib" - -export CI_CMAKE_VARS=" - -DCMAKE_SYSTEM_NAME=Generic - -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH -" diff --git a/Engine/lib/lpng/ci/targets/msdos/ci_env.i86-pc-msdoswatcom.sh b/Engine/lib/lpng/ci/targets/msdos/ci_env.i86-pc-msdoswatcom.sh deleted file mode 100644 index 3059f1835..000000000 --- a/Engine/lib/lpng/ci/targets/msdos/ci_env.i86-pc-msdoswatcom.sh +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=i86 -export CI_TARGET_SYSTEM=msdoswatcom - -export CI_CC="wcl" - -# Open Watcom V2 CMake build -# https://github.com/open-watcom/open-watcom-v2/discussions/716 -export CI_CMAKE_GENERATOR="Watcom WMake" -export CI_CMAKE_VARS=" - -DCMAKE_SYSTEM_NAME=DOS - -DCMAKE_SYSTEM_PROCESSOR=I86 -" diff --git a/Engine/lib/lpng/ci/targets/windows/ci_env.aarch64-windows-llvm.sh b/Engine/lib/lpng/ci/targets/windows/ci_env.aarch64-windows-llvm.sh deleted file mode 100644 index 80244172a..000000000 --- a/Engine/lib/lpng/ci/targets/windows/ci_env.aarch64-windows-llvm.sh +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=aarch64 -export CI_TARGET_SYSTEM=windows - -export CI_CC="clang" -export CI_AR="llvm-ar" -export CI_RANLIB="llvm-ranlib" - -export CI_CMAKE_VARS=" - -DCMAKE_SYSTEM_NAME=Windows - -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH -" diff --git a/Engine/lib/lpng/ci/targets/windows/ci_env.i686-w64-mingw32.sh b/Engine/lib/lpng/ci/targets/windows/ci_env.i686-w64-mingw32.sh deleted file mode 100644 index 8c83d0f2c..000000000 --- a/Engine/lib/lpng/ci/targets/windows/ci_env.i686-w64-mingw32.sh +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=i686 -export CI_TARGET_SYSTEM=mingw32 - -# The output of `uname -s` on MSYS2 is understandable, and so is -# CI_TARGET_SYSTEM above, in simplified form. (See also Cygwin.) -# But aside from that, the Mingw-w64 nomenclature is rather messy. -export CI_CC="$CI_TARGET_ARCH-w64-mingw32-gcc" -export CI_AR="$CI_CC-ar" -export CI_RANLIB="$CI_CC-ranlib" - -export CI_CMAKE_VARS=" - -DCMAKE_SYSTEM_NAME=Windows - -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH -" diff --git a/Engine/lib/lpng/ci/targets/windows/ci_env.i686-windows-llvm.sh b/Engine/lib/lpng/ci/targets/windows/ci_env.i686-windows-llvm.sh deleted file mode 100644 index 3d29f6d55..000000000 --- a/Engine/lib/lpng/ci/targets/windows/ci_env.i686-windows-llvm.sh +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=i686 -export CI_TARGET_SYSTEM=windows - -export CI_CC="clang" -export CI_AR="llvm-ar" -export CI_RANLIB="llvm-ranlib" - -export CI_CMAKE_VARS=" - -DCMAKE_SYSTEM_NAME=Windows - -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH -" diff --git a/Engine/lib/lpng/ci/targets/windows/ci_env.x86_64-w64-mingw32.sh b/Engine/lib/lpng/ci/targets/windows/ci_env.x86_64-w64-mingw32.sh deleted file mode 100644 index 67d83557b..000000000 --- a/Engine/lib/lpng/ci/targets/windows/ci_env.x86_64-w64-mingw32.sh +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=x86_64 -export CI_TARGET_SYSTEM=mingw64 - -# The output of `uname -s` on MSYS2 is understandable, and so is -# CI_TARGET_SYSTEM above, in simplified form. (See also Cygwin.) -# But aside from that, the Mingw-w64 nomenclature is rather messy. -export CI_CC="$CI_TARGET_ARCH-w64-mingw32-gcc" -export CI_AR="$CI_CC-ar" -export CI_RANLIB="$CI_CC-ranlib" - -export CI_CMAKE_VARS=" - -DCMAKE_SYSTEM_NAME=Windows - -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH -" diff --git a/Engine/lib/lpng/ci/targets/windows/ci_env.x86_64-windows-llvm.sh b/Engine/lib/lpng/ci/targets/windows/ci_env.x86_64-windows-llvm.sh deleted file mode 100644 index 747f99b21..000000000 --- a/Engine/lib/lpng/ci/targets/windows/ci_env.x86_64-windows-llvm.sh +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2023-2024 Cosmin Truta. -# -# Use, modification and distribution are subject to the MIT License. -# Please see the accompanying file LICENSE_MIT.txt -# -# SPDX-License-Identifier: MIT - -export CI_TARGET_ARCH=x86_64 -export CI_TARGET_SYSTEM=windows - -export CI_CC="clang" -export CI_AR="llvm-ar" -export CI_RANLIB="llvm-ranlib" - -export CI_CMAKE_VARS=" - -DCMAKE_SYSTEM_NAME=Windows - -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH -" diff --git a/Engine/lib/lpng/compile b/Engine/lib/lpng/compile index 02ff093c3..99e50524b 100644 --- a/Engine/lib/lpng/compile +++ b/Engine/lib/lpng/compile @@ -1,9 +1,9 @@ #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2025-06-18.21; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2025 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify @@ -37,11 +37,11 @@ IFS=" "" $nl" file_conv= -# func_file_conv build_file unneeded_conversions +# func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion -# type is listed in (the comma separated) UNNEEDED_CONVERSIONS, no -# conversion will take place. +# type is listed in (the comma separated) LAZY, no conversion will +# take place. func_file_conv () { file=$1 @@ -51,20 +51,9 @@ func_file_conv () # lazily determine how to convert abs files case `uname -s` in MINGW*) - if test -n "$MSYSTEM" && (cygpath --version) >/dev/null 2>&1; then - # MSYS2 environment. - file_conv=cygwin - else - # Original MinGW environment. - file_conv=mingw - fi - ;; - MSYS*) - # Old MSYS environment, or MSYS2 with 32-bit MSYS2 shell. - file_conv=cygwin + file_conv=mingw ;; CYGWIN*) - # Cygwin environment. file_conv=cygwin ;; *) @@ -74,14 +63,12 @@ func_file_conv () fi case $file_conv/,$2, in *,$file_conv,*) - # This is the optimization mentioned above: - # If UNNEEDED_CONVERSIONS contains $file_conv, don't convert. ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) - file=`cygpath -w "$file" || echo "$file"` + file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` @@ -156,7 +143,7 @@ func_cl_wrapper () # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in - *.o | *.lo | *.[oO][bB][jJ]) + *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift @@ -261,17 +248,14 @@ If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . -GNU Automake home page: . -General help using GNU software: . EOF exit $? ;; -v | --v*) - echo "compile (GNU Automake) $scriptversion" + echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ - clang-cl | *[/\\]clang-cl | clang-cl.exe | *[/\\]clang-cl.exe | \ icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; @@ -356,9 +340,9 @@ exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'before-save-hook 'time-stamp nil t) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" -# time-stamp-format: "%Y-%02m-%02d.%02H" +# time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/Engine/lib/lpng/config.guess b/Engine/lib/lpng/config.guess index 48a684601..256083a70 100644 --- a/Engine/lib/lpng/config.guess +++ b/Engine/lib/lpng/config.guess @@ -1,14 +1,12 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2024 Free Software Foundation, Inc. +# Copyright 1992-2018 Free Software Foundation, Inc. -# shellcheck disable=SC2006,SC2268 # see below for rationale - -timestamp='2024-07-27' +timestamp='2018-03-08' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -29,25 +27,17 @@ timestamp='2024-07-27' # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess # # Please send patches to . -# The "shellcheck disable" line above the timestamp inhibits complaints -# about features and limitations of the classic Bourne shell that were -# superseded or lifted in POSIX. However, this script identifies a wide -# variety of pre-POSIX systems that do not have POSIX shells at all, and -# even some reasonably current systems (Solaris 10 as case-in-point) still -# have a pre-POSIX /bin/sh. - - me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] -Output the configuration name of the system '$me' is run on. +Output the configuration name of the system \`$me' is run on. Options: -h, --help print this help, then exit @@ -60,13 +50,13 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2024 Free Software Foundation, Inc. +Copyright 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" -Try '$me --help' for more information." +Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do @@ -94,109 +84,85 @@ if test $# != 0; then exit 1 fi -# Just in case it came from the environment. -GUESS= +trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. -# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still -# use 'HOST_CC' if defined, but it is deprecated. +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. -tmp= -# shellcheck disable=SC2172 -trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 - -set_cc_for_build() { - # prevent multiple calls if $tmp is already set - test "$tmp" && return 0 - : "${TMPDIR=/tmp}" - # shellcheck disable=SC2039,SC3028 - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } - dummy=$tmp/dummy - case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in - ,,) echo "int x;" > "$dummy.c" - for driver in cc gcc c17 c99 c89 ; do - if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD=$driver - break - fi - done - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; - esac -} +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > "$dummy.c" ; + for c in cc gcc c89 c99 ; do + if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) -if test -f /.attbin/uname ; then +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -case $UNAME_SYSTEM in +case "$UNAME_SYSTEM" in Linux|GNU|GNU/*) - LIBC=unknown + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu - set_cc_for_build + eval "$set_cc_for_build" cat <<-EOF > "$dummy.c" - #if defined(__ANDROID__) - LIBC=android - #else #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc - #elif defined(__GLIBC__) - LIBC=gnu - #elif defined(__LLVM_LIBC__) - LIBC=llvm #else - #include - /* First heuristic to detect musl libc. */ - #ifdef __DEFINED_va_list - LIBC=musl - #endif - #endif + LIBC=gnu #endif EOF - cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` - eval "$cc_set_libc" + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" - # Second heuristic to detect musl libc. - if [ "$LIBC" = unknown ] && - command -v ldd >/dev/null && - ldd --version 2>&1 | grep -q ^musl; then - LIBC=musl - fi - - # If the system lacks a compiler, then just pick glibc. - # We could probably try harder. - if [ "$LIBC" = unknown ]; then - LIBC=gnu + # If ldd exists, use it to detect musl libc. + if command -v ldd >/dev/null && \ + ldd --version 2>&1 | grep -q ^musl + then + LIBC=musl fi ;; esac # Note: order is significant - the case branches are not exclusive. -case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in +case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, @@ -208,12 +174,12 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ - /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ - /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + "/sbin/$sysctl" 2>/dev/null || \ + "/usr/sbin/$sysctl" 2>/dev/null || \ echo unknown)` - case $UNAME_MACHINE_ARCH in - aarch64eb) machine=aarch64_be-unknown ;; + case "$UNAME_MACHINE_ARCH" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; @@ -222,18 +188,18 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in earmv*) arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` - machine=${arch}${endian}-unknown + machine="${arch}${endian}"-unknown ;; - *) machine=$UNAME_MACHINE_ARCH-unknown ;; + *) machine="$UNAME_MACHINE_ARCH"-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. - case $UNAME_MACHINE_ARCH in + case "$UNAME_MACHINE_ARCH" in earm*) os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) - set_cc_for_build + eval "$set_cc_for_build" if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then @@ -249,7 +215,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in ;; esac # Determine ABI tags. - case $UNAME_MACHINE_ARCH in + case "$UNAME_MACHINE_ARCH" in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` @@ -260,7 +226,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. - case $UNAME_VERSION in + case "$UNAME_VERSION" in Debian*) release='-gnu' ;; @@ -271,57 +237,45 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - GUESS=$machine-${os}${release}${abi-} - ;; + echo "$machine-${os}${release}${abi}" + exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE - ;; + echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" + exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE - ;; - *:SecBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` - GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE - ;; + echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" + exit ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` - GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE - ;; + echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" + exit ;; *:MidnightBSD:*:*) - GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE - ;; + echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" + exit ;; *:ekkoBSD:*:*) - GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE - ;; + echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" + exit ;; *:SolidBSD:*:*) - GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE - ;; - *:OS108:*:*) - GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE - ;; + echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" + exit ;; macppc:MirBSD:*:*) - GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE - ;; + echo powerpc-unknown-mirbsd"$UNAME_RELEASE" + exit ;; *:MirBSD:*:*) - GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE - ;; + echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" + exit ;; *:Sortix:*:*) - GUESS=$UNAME_MACHINE-unknown-sortix - ;; - *:Twizzler:*:*) - GUESS=$UNAME_MACHINE-unknown-twizzler - ;; + echo "$UNAME_MACHINE"-unknown-sortix + exit ;; *:Redox:*:*) - GUESS=$UNAME_MACHINE-unknown-redox - ;; + echo "$UNAME_MACHINE"-unknown-redox + exit ;; mips:OSF1:*.*) - GUESS=mips-dec-osf1 - ;; + echo mips-dec-osf1 + exit ;; alpha:OSF1:*:*) - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - trap '' 0 case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` @@ -335,7 +289,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case $ALPHA_CPU_TYPE in + case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE=alpha ;; "EV4.5 (21064)") @@ -372,121 +326,117 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` - GUESS=$UNAME_MACHINE-dec-osf$OSF_REL - ;; + echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; Amiga*:UNIX_System_V:4.0:*) - GUESS=m68k-unknown-sysv4 - ;; + echo m68k-unknown-sysv4 + exit ;; *:[Aa]miga[Oo][Ss]:*:*) - GUESS=$UNAME_MACHINE-unknown-amigaos - ;; + echo "$UNAME_MACHINE"-unknown-amigaos + exit ;; *:[Mm]orph[Oo][Ss]:*:*) - GUESS=$UNAME_MACHINE-unknown-morphos - ;; + echo "$UNAME_MACHINE"-unknown-morphos + exit ;; *:OS/390:*:*) - GUESS=i370-ibm-openedition - ;; + echo i370-ibm-openedition + exit ;; *:z/VM:*:*) - GUESS=s390-ibm-zvmoe - ;; + echo s390-ibm-zvmoe + exit ;; *:OS400:*:*) - GUESS=powerpc-ibm-os400 - ;; + echo powerpc-ibm-os400 + exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - GUESS=arm-acorn-riscix$UNAME_RELEASE - ;; + echo arm-acorn-riscix"$UNAME_RELEASE" + exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) - GUESS=arm-unknown-riscos - ;; + echo arm-unknown-riscos + exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - GUESS=hppa1.1-hitachi-hiuxmpp - ;; + echo hppa1.1-hitachi-hiuxmpp + exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - case `(/bin/universe) 2>/dev/null` in - att) GUESS=pyramid-pyramid-sysv3 ;; - *) GUESS=pyramid-pyramid-bsd ;; - esac - ;; + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; NILE*:*:*:dcosx) - GUESS=pyramid-pyramid-svr4 - ;; + echo pyramid-pyramid-svr4 + exit ;; DRS?6000:unix:4.0:6*) - GUESS=sparc-icl-nx6 - ;; + echo sparc-icl-nx6 + exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in - sparc) GUESS=sparc-icl-nx7 ;; - esac - ;; + sparc) echo sparc-icl-nx7; exit ;; + esac ;; s390x:SunOS:*:*) - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` - GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL - ;; + echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + exit ;; sun4H:SunOS:5.*:*) - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` - GUESS=sparc-hal-solaris2$SUN_REL - ;; + echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` - GUESS=sparc-sun-solaris2$SUN_REL - ;; + echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - GUESS=i386-pc-auroraux$UNAME_RELEASE - ;; + echo i386-pc-auroraux"$UNAME_RELEASE" + exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - set_cc_for_build + eval "$set_cc_for_build" SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. - if test "$CC_FOR_BUILD" != no_compiler_found; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH=x86_64 fi fi - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` - GUESS=$SUN_ARCH-pc-solaris2$SUN_REL - ;; + echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` - GUESS=sparc-sun-solaris3$SUN_REL - ;; + echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; sun4*:SunOS:*:*) - case `/usr/bin/arch -k` in + case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac - # Japanese Language versions have a version number like '4.1.3-JL'. - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` - GUESS=sparc-sun-sunos$SUN_REL - ;; + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" + exit ;; sun3*:SunOS:*:*) - GUESS=m68k-sun-sunos$UNAME_RELEASE - ;; + echo m68k-sun-sunos"$UNAME_RELEASE" + exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 - case `/bin/arch` in + case "`/bin/arch`" in sun3) - GUESS=m68k-sun-sunos$UNAME_RELEASE + echo m68k-sun-sunos"$UNAME_RELEASE" ;; sun4) - GUESS=sparc-sun-sunos$UNAME_RELEASE + echo sparc-sun-sunos"$UNAME_RELEASE" ;; esac - ;; + exit ;; aushp:SunOS:*:*) - GUESS=sparc-auspex-sunos$UNAME_RELEASE - ;; + echo sparc-auspex-sunos"$UNAME_RELEASE" + exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -496,43 +446,43 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - GUESS=m68k-atari-mint$UNAME_RELEASE - ;; + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - GUESS=m68k-atari-mint$UNAME_RELEASE - ;; + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - GUESS=m68k-atari-mint$UNAME_RELEASE - ;; + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - GUESS=m68k-milan-mint$UNAME_RELEASE - ;; + echo m68k-milan-mint"$UNAME_RELEASE" + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - GUESS=m68k-hades-mint$UNAME_RELEASE - ;; + echo m68k-hades-mint"$UNAME_RELEASE" + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - GUESS=m68k-unknown-mint$UNAME_RELEASE - ;; + echo m68k-unknown-mint"$UNAME_RELEASE" + exit ;; m68k:machten:*:*) - GUESS=m68k-apple-machten$UNAME_RELEASE - ;; + echo m68k-apple-machten"$UNAME_RELEASE" + exit ;; powerpc:machten:*:*) - GUESS=powerpc-apple-machten$UNAME_RELEASE - ;; + echo powerpc-apple-machten"$UNAME_RELEASE" + exit ;; RISC*:Mach:*:*) - GUESS=mips-dec-mach_bsd4.3 - ;; + echo mips-dec-mach_bsd4.3 + exit ;; RISC*:ULTRIX:*:*) - GUESS=mips-dec-ultrix$UNAME_RELEASE - ;; + echo mips-dec-ultrix"$UNAME_RELEASE" + exit ;; VAX*:ULTRIX*:*:*) - GUESS=vax-dec-ultrix$UNAME_RELEASE - ;; + echo vax-dec-ultrix"$UNAME_RELEASE" + exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) - GUESS=clipper-intergraph-clix$UNAME_RELEASE - ;; + echo clipper-intergraph-clix"$UNAME_RELEASE" + exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) - set_cc_for_build + eval "$set_cc_for_build" sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ @@ -558,84 +508,82 @@ EOF dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } - GUESS=mips-mips-riscos$UNAME_RELEASE - ;; + echo mips-mips-riscos"$UNAME_RELEASE" + exit ;; Motorola:PowerMAX_OS:*:*) - GUESS=powerpc-motorola-powermax - ;; + echo powerpc-motorola-powermax + exit ;; Motorola:*:4.3:PL8-*) - GUESS=powerpc-harris-powermax - ;; + echo powerpc-harris-powermax + exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - GUESS=powerpc-harris-powermax - ;; + echo powerpc-harris-powermax + exit ;; Night_Hawk:Power_UNIX:*:*) - GUESS=powerpc-harris-powerunix - ;; + echo powerpc-harris-powerunix + exit ;; m88k:CX/UX:7*:*) - GUESS=m88k-harris-cxux7 - ;; + echo m88k-harris-cxux7 + exit ;; m88k:*:4*:R4*) - GUESS=m88k-motorola-sysv4 - ;; + echo m88k-motorola-sysv4 + exit ;; m88k:*:3*:R3*) - GUESS=m88k-motorola-sysv3 - ;; + echo m88k-motorola-sysv3 + exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` - if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 + if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] then - if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ - test "$TARGET_BINARY_INTERFACE"x = x + if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ + [ "$TARGET_BINARY_INTERFACE"x = x ] then - GUESS=m88k-dg-dgux$UNAME_RELEASE + echo m88k-dg-dgux"$UNAME_RELEASE" else - GUESS=m88k-dg-dguxbcs$UNAME_RELEASE + echo m88k-dg-dguxbcs"$UNAME_RELEASE" fi else - GUESS=i586-dg-dgux$UNAME_RELEASE + echo i586-dg-dgux"$UNAME_RELEASE" fi - ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) - GUESS=m88k-dolphin-sysv3 - ;; + echo m88k-dolphin-sysv3 + exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 - GUESS=m88k-motorola-sysv3 - ;; + echo m88k-motorola-sysv3 + exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - GUESS=m88k-tektronix-sysv3 - ;; + echo m88k-tektronix-sysv3 + exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - GUESS=m68k-tektronix-bsd - ;; + echo m68k-tektronix-bsd + exit ;; *:IRIX*:*:*) - IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` - GUESS=mips-sgi-irix$IRIX_REL - ;; + echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" + exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id - ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) - GUESS=i386-ibm-aix - ;; + echo i386-ibm-aix + exit ;; ia64:AIX:*:*) - if test -x /usr/bin/oslevel ; then + if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else - IBM_REV=$UNAME_VERSION.$UNAME_RELEASE + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi - GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV - ;; + echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" + exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - set_cc_for_build + eval "$set_cc_for_build" sed 's/^ //' << EOF > "$dummy.c" #include - int - main () + main() { if (!__power_pc()) exit(1); @@ -645,16 +593,16 @@ EOF EOF if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then - GUESS=$SYSTEM_NAME + echo "$SYSTEM_NAME" else - GUESS=rs6000-ibm-aix3.2.5 + echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - GUESS=rs6000-ibm-aix3.2.4 + echo rs6000-ibm-aix3.2.4 else - GUESS=rs6000-ibm-aix3.2 + echo rs6000-ibm-aix3.2 fi - ;; + exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then @@ -662,65 +610,64 @@ EOF else IBM_ARCH=powerpc fi - if test -x /usr/bin/lslpp ; then - IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else - IBM_REV=$UNAME_VERSION.$UNAME_RELEASE + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi - GUESS=$IBM_ARCH-ibm-aix$IBM_REV - ;; + echo "$IBM_ARCH"-ibm-aix"$IBM_REV" + exit ;; *:AIX:*:*) - GUESS=rs6000-ibm-aix - ;; + echo rs6000-ibm-aix + exit ;; ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) - GUESS=romp-ibm-bsd4.4 - ;; + echo romp-ibm-bsd4.4 + exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to - ;; # report: romp-ibm BSD 4.3 + echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) - GUESS=rs6000-bull-bosx - ;; + echo rs6000-bull-bosx + exit ;; DPX/2?00:B.O.S.:*:*) - GUESS=m68k-bull-sysv3 - ;; + echo m68k-bull-sysv3 + exit ;; 9000/[34]??:4.3bsd:1.*:*) - GUESS=m68k-hp-bsd - ;; + echo m68k-hp-bsd + exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - GUESS=m68k-hp-bsd4.4 - ;; + echo m68k-hp-bsd4.4 + exit ;; 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` - case $UNAME_MACHINE in + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + case "$UNAME_MACHINE" in 9000/31?) HP_ARCH=m68000 ;; 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) - if test -x /usr/bin/getconf; then + if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case $sc_cpu_version in + case "$sc_cpu_version" in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 - case $sc_kernel_bits in + case "$sc_kernel_bits" in 32) HP_ARCH=hppa2.0n ;; 64) HP_ARCH=hppa2.0w ;; '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi - if test "$HP_ARCH" = ""; then - set_cc_for_build + if [ "$HP_ARCH" = "" ]; then + eval "$set_cc_for_build" sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE #include #include - int - main () + int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); @@ -751,9 +698,9 @@ EOF test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if test "$HP_ARCH" = hppa2.0w + if [ "$HP_ARCH" = hppa2.0w ] then - set_cc_for_build + eval "$set_cc_for_build" # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler @@ -772,14 +719,14 @@ EOF HP_ARCH=hppa64 fi fi - GUESS=$HP_ARCH-hp-hpux$HPUX_REV - ;; + echo "$HP_ARCH"-hp-hpux"$HPUX_REV" + exit ;; ia64:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` - GUESS=ia64-hp-hpux$HPUX_REV - ;; + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux"$HPUX_REV" + exit ;; 3050*:HI-UX:*:*) - set_cc_for_build + eval "$set_cc_for_build" sed 's/^ //' << EOF > "$dummy.c" #include int @@ -807,36 +754,36 @@ EOF EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } - GUESS=unknown-hitachi-hiuxwe2 - ;; + echo unknown-hitachi-hiuxwe2 + exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) - GUESS=hppa1.1-hp-bsd - ;; + echo hppa1.1-hp-bsd + exit ;; 9000/8??:4.3bsd:*:*) - GUESS=hppa1.0-hp-bsd - ;; + echo hppa1.0-hp-bsd + exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - GUESS=hppa1.0-hp-mpeix - ;; + echo hppa1.0-hp-mpeix + exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) - GUESS=hppa1.1-hp-osf - ;; + echo hppa1.1-hp-osf + exit ;; hp8??:OSF1:*:*) - GUESS=hppa1.0-hp-osf - ;; + echo hppa1.0-hp-osf + exit ;; i*86:OSF1:*:*) - if test -x /usr/sbin/sysversion ; then - GUESS=$UNAME_MACHINE-unknown-osf1mk + if [ -x /usr/sbin/sysversion ] ; then + echo "$UNAME_MACHINE"-unknown-osf1mk else - GUESS=$UNAME_MACHINE-unknown-osf1 + echo "$UNAME_MACHINE"-unknown-osf1 fi - ;; + exit ;; parisc*:Lites*:*:*) - GUESS=hppa1.1-hp-lites - ;; + echo hppa1.1-hp-lites + exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - GUESS=c1-convex-bsd - ;; + echo c1-convex-bsd + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd @@ -844,18 +791,17 @@ EOF fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - GUESS=c34-convex-bsd - ;; + echo c34-convex-bsd + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - GUESS=c38-convex-bsd - ;; + echo c38-convex-bsd + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - GUESS=c4-convex-bsd - ;; + echo c4-convex-bsd + exit ;; CRAY*Y-MP:*:*:*) - CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` - GUESS=ymp-cray-unicos$CRAY_REL - ;; + echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; CRAY*[A-Z]90:*:*:*) echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ @@ -863,155 +809,103 @@ EOF -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) - CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` - GUESS=t90-cray-unicos$CRAY_REL - ;; + echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; CRAY*T3E:*:*:*) - CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` - GUESS=alphaev5-cray-unicosmk$CRAY_REL - ;; + echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; CRAY*SV1:*:*:*) - CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` - GUESS=sv1-cray-unicos$CRAY_REL - ;; + echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; *:UNICOS/mp:*:*) - CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` - GUESS=craynv-cray-unicosmp$CRAY_REL - ;; + echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` - GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} - ;; + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` - GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} - ;; + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE - ;; + echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" + exit ;; sparc*:BSD/OS:*:*) - GUESS=sparc-unknown-bsdi$UNAME_RELEASE - ;; + echo sparc-unknown-bsdi"$UNAME_RELEASE" + exit ;; *:BSD/OS:*:*) - GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE - ;; - arm:FreeBSD:*:*) - UNAME_PROCESSOR=`uname -p` - set_cc_for_build - if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_PCS_VFP - then - FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` - GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi - else - FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` - GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf - fi - ;; + echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" + exit ;; *:FreeBSD:*:*) - UNAME_PROCESSOR=`uname -p` - case $UNAME_PROCESSOR in + UNAME_PROCESSOR=`/usr/bin/uname -p` + case "$UNAME_PROCESSOR" in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac - FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` - GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL - ;; + echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" + exit ;; i*:CYGWIN*:*) - GUESS=$UNAME_MACHINE-pc-cygwin - ;; + echo "$UNAME_MACHINE"-pc-cygwin + exit ;; *:MINGW64*:*) - GUESS=$UNAME_MACHINE-pc-mingw64 - ;; + echo "$UNAME_MACHINE"-pc-mingw64 + exit ;; *:MINGW*:*) - GUESS=$UNAME_MACHINE-pc-mingw32 - ;; + echo "$UNAME_MACHINE"-pc-mingw32 + exit ;; *:MSYS*:*) - GUESS=$UNAME_MACHINE-pc-msys - ;; + echo "$UNAME_MACHINE"-pc-msys + exit ;; i*:PW*:*) - GUESS=$UNAME_MACHINE-pc-pw32 - ;; - *:SerenityOS:*:*) - GUESS=$UNAME_MACHINE-pc-serenity - ;; + echo "$UNAME_MACHINE"-pc-pw32 + exit ;; *:Interix*:*) - case $UNAME_MACHINE in + case "$UNAME_MACHINE" in x86) - GUESS=i586-pc-interix$UNAME_RELEASE - ;; + echo i586-pc-interix"$UNAME_RELEASE" + exit ;; authenticamd | genuineintel | EM64T) - GUESS=x86_64-unknown-interix$UNAME_RELEASE - ;; + echo x86_64-unknown-interix"$UNAME_RELEASE" + exit ;; IA64) - GUESS=ia64-unknown-interix$UNAME_RELEASE - ;; + echo ia64-unknown-interix"$UNAME_RELEASE" + exit ;; esac ;; i*:UWIN*:*) - GUESS=$UNAME_MACHINE-pc-uwin - ;; + echo "$UNAME_MACHINE"-pc-uwin + exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - GUESS=x86_64-pc-cygwin - ;; + echo x86_64-unknown-cygwin + exit ;; prep*:SunOS:5.*:*) - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` - GUESS=powerpcle-unknown-solaris2$SUN_REL - ;; + echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; *:GNU:*:*) # the GNU system - GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` - GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` - GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL - ;; + echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" + exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` - GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` - GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC - ;; - x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*) - GUESS="$UNAME_MACHINE-pc-managarm-mlibc" - ;; - *:[Mm]anagarm:*:*) - GUESS="$UNAME_MACHINE-unknown-managarm-mlibc" - ;; - *:Minix:*:*) - GUESS=$UNAME_MACHINE-unknown-minix - ;; + echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" + exit ;; + i*86:Minix:*:*) + echo "$UNAME_MACHINE"-pc-minix + exit ;; aarch64:Linux:*:*) - set_cc_for_build - CPU=$UNAME_MACHINE - LIBCABI=$LIBC - if test "$CC_FOR_BUILD" != no_compiler_found; then - ABI=64 - sed 's/^ //' << EOF > "$dummy.c" - #ifdef __ARM_EABI__ - #ifdef __ARM_PCS_VFP - ABI=eabihf - #else - ABI=eabi - #endif - #endif -EOF - cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` - eval "$cc_set_abi" - case $ABI in - eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;; - esac - fi - GUESS=$CPU-unknown-linux-$LIBCABI - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; @@ -1022,245 +916,183 @@ EOF esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; arm*:Linux:*:*) - set_cc_for_build + eval "$set_cc_for_build" if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi else - GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf fi fi - ;; + exit ;; avr32*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; cris:Linux:*:*) - GUESS=$UNAME_MACHINE-axis-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; crisv32:Linux:*:*) - GUESS=$UNAME_MACHINE-axis-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; e2k:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; frv:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; hexagon:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; i*86:Linux:*:*) - GUESS=$UNAME_MACHINE-pc-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + exit ;; ia64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; k1om:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - kvx:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - kvx:cos:*:*) - GUESS=$UNAME_MACHINE-unknown-cos - ;; - kvx:mbr:*:*) - GUESS=$UNAME_MACHINE-unknown-mbr - ;; - loongarch32:Linux:*:* | loongarch64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; m32r*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; m68*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; mips:Linux:*:* | mips64:Linux:*:*) - set_cc_for_build - IS_GLIBC=0 - test x"${LIBC}" = xgnu && IS_GLIBC=1 + eval "$set_cc_for_build" sed 's/^ //' << EOF > "$dummy.c" #undef CPU - #undef mips - #undef mipsel - #undef mips64 - #undef mips64el - #if ${IS_GLIBC} && defined(_ABI64) - LIBCABI=gnuabi64 - #else - #if ${IS_GLIBC} && defined(_ABIN32) - LIBCABI=gnuabin32 - #else - LIBCABI=${LIBC} - #endif - #endif - - #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 - CPU=mipsisa64r6 - #else - #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 - CPU=mipsisa32r6 - #else - #if defined(__mips64) - CPU=mips64 - #else - CPU=mips - #endif - #endif - #endif - + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - MIPS_ENDIAN=el + CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - MIPS_ENDIAN= + CPU=${UNAME_MACHINE} #else - MIPS_ENDIAN= + CPU= #endif #endif EOF - cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` - eval "$cc_set_vars" - test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" + test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } ;; mips64el:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; openrisc*:Linux:*:*) - GUESS=or1k-unknown-linux-$LIBC - ;; + echo or1k-unknown-linux-"$LIBC" + exit ;; or32:Linux:*:* | or1k*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; padre:Linux:*:*) - GUESS=sparc-unknown-linux-$LIBC - ;; + echo sparc-unknown-linux-"$LIBC" + exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - GUESS=hppa64-unknown-linux-$LIBC - ;; + echo hppa64-unknown-linux-"$LIBC" + exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; - PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; - *) GUESS=hppa-unknown-linux-$LIBC ;; + PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; + PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; + *) echo hppa-unknown-linux-"$LIBC" ;; esac - ;; + exit ;; ppc64:Linux:*:*) - GUESS=powerpc64-unknown-linux-$LIBC - ;; + echo powerpc64-unknown-linux-"$LIBC" + exit ;; ppc:Linux:*:*) - GUESS=powerpc-unknown-linux-$LIBC - ;; + echo powerpc-unknown-linux-"$LIBC" + exit ;; ppc64le:Linux:*:*) - GUESS=powerpc64le-unknown-linux-$LIBC - ;; + echo powerpc64le-unknown-linux-"$LIBC" + exit ;; ppcle:Linux:*:*) - GUESS=powerpcle-unknown-linux-$LIBC - ;; - riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo powerpcle-unknown-linux-"$LIBC" + exit ;; + riscv32:Linux:*:* | riscv64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; s390:Linux:*:* | s390x:Linux:*:*) - GUESS=$UNAME_MACHINE-ibm-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" + exit ;; sh64*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; sh*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; tile*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; vax:Linux:*:*) - GUESS=$UNAME_MACHINE-dec-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-dec-linux-"$LIBC" + exit ;; x86_64:Linux:*:*) - set_cc_for_build - CPU=$UNAME_MACHINE - LIBCABI=$LIBC - if test "$CC_FOR_BUILD" != no_compiler_found; then - ABI=64 - sed 's/^ //' << EOF > "$dummy.c" - #ifdef __i386__ - ABI=x86 - #else - #ifdef __ILP32__ - ABI=x32 - #endif - #endif -EOF - cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` - eval "$cc_set_abi" - case $ABI in - x86) CPU=i686 ;; - x32) LIBCABI=${LIBC}x32 ;; - esac - fi - GUESS=$CPU-pc-linux-$LIBCABI - ;; + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + exit ;; xtensa*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. - GUESS=i386-sequent-sysv4 - ;; + echo i386-sequent-sysv4 + exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. - GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION - ;; + echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" + exit ;; i*86:OS/2:*:*) - # If we were able to find 'uname', then EMX Unix compatibility + # If we were able to find `uname', then EMX Unix compatibility # is probably installed. - GUESS=$UNAME_MACHINE-pc-os2-emx - ;; + echo "$UNAME_MACHINE"-pc-os2-emx + exit ;; i*86:XTS-300:*:STOP) - GUESS=$UNAME_MACHINE-unknown-stop - ;; + echo "$UNAME_MACHINE"-unknown-stop + exit ;; i*86:atheos:*:*) - GUESS=$UNAME_MACHINE-unknown-atheos - ;; + echo "$UNAME_MACHINE"-unknown-atheos + exit ;; i*86:syllable:*:*) - GUESS=$UNAME_MACHINE-pc-syllable - ;; + echo "$UNAME_MACHINE"-pc-syllable + exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - GUESS=i386-unknown-lynxos$UNAME_RELEASE - ;; + echo i386-unknown-lynxos"$UNAME_RELEASE" + exit ;; i*86:*DOS:*:*) - GUESS=$UNAME_MACHINE-pc-msdosdjgpp - ;; + echo "$UNAME_MACHINE"-pc-msdosdjgpp + exit ;; i*86:*:4.*:*) UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL + echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" else - GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL + echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" fi - ;; + exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in @@ -1268,12 +1100,12 @@ EOF *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac - GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - ;; + echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" + exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 @@ -1283,11 +1115,11 @@ EOF && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 - GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL + echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" else - GUESS=$UNAME_MACHINE-pc-sysv32 + echo "$UNAME_MACHINE"-pc-sysv32 fi - ;; + exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about @@ -1295,31 +1127,31 @@ EOF # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. - GUESS=i586-pc-msdosdjgpp - ;; + echo i586-pc-msdosdjgpp + exit ;; Intel:Mach:3*:*) - GUESS=i386-pc-mach3 - ;; + echo i386-pc-mach3 + exit ;; paragon:*:*:*) - GUESS=i860-intel-osf1 - ;; + echo i860-intel-osf1 + exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 + echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. - GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 + echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 fi - ;; + exit ;; mini*:CTIX:SYS*5:*) # "miniframe" - GUESS=m68010-convergent-sysv - ;; + echo m68010-convergent-sysv + exit ;; mc68k:UNIX:SYSTEM5:3.51m) - GUESS=m68k-convergent-sysv - ;; + echo m68k-convergent-sysv + exit ;; M680?0:D-NIX:5.3:*) - GUESS=m68k-diab-dnix - ;; + echo m68k-diab-dnix + exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) @@ -1344,411 +1176,249 @@ EOF /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - GUESS=m68k-unknown-lynxos$UNAME_RELEASE - ;; + echo m68k-unknown-lynxos"$UNAME_RELEASE" + exit ;; mc68030:UNIX_System_V:4.*:*) - GUESS=m68k-atari-sysv4 - ;; + echo m68k-atari-sysv4 + exit ;; TSUNAMI:LynxOS:2.*:*) - GUESS=sparc-unknown-lynxos$UNAME_RELEASE - ;; + echo sparc-unknown-lynxos"$UNAME_RELEASE" + exit ;; rs6000:LynxOS:2.*:*) - GUESS=rs6000-unknown-lynxos$UNAME_RELEASE - ;; + echo rs6000-unknown-lynxos"$UNAME_RELEASE" + exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - GUESS=powerpc-unknown-lynxos$UNAME_RELEASE - ;; + echo powerpc-unknown-lynxos"$UNAME_RELEASE" + exit ;; SM[BE]S:UNIX_SV:*:*) - GUESS=mips-dde-sysv$UNAME_RELEASE - ;; + echo mips-dde-sysv"$UNAME_RELEASE" + exit ;; RM*:ReliantUNIX-*:*:*) - GUESS=mips-sni-sysv4 - ;; + echo mips-sni-sysv4 + exit ;; RM*:SINIX-*:*:*) - GUESS=mips-sni-sysv4 - ;; + echo mips-sni-sysv4 + exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` - GUESS=$UNAME_MACHINE-sni-sysv4 + echo "$UNAME_MACHINE"-sni-sysv4 else - GUESS=ns32k-sni-sysv + echo ns32k-sni-sysv fi - ;; - PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says - GUESS=i586-unisys-sysv4 - ;; + echo i586-unisys-sysv4 + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm - GUESS=hppa1.1-stratus-sysv4 - ;; + echo hppa1.1-stratus-sysv4 + exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. - GUESS=i860-stratus-sysv4 - ;; + echo i860-stratus-sysv4 + exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. - GUESS=$UNAME_MACHINE-stratus-vos - ;; + echo "$UNAME_MACHINE"-stratus-vos + exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. - GUESS=hppa1.1-stratus-vos - ;; + echo hppa1.1-stratus-vos + exit ;; mc68*:A/UX:*:*) - GUESS=m68k-apple-aux$UNAME_RELEASE - ;; + echo m68k-apple-aux"$UNAME_RELEASE" + exit ;; news*:NEWS-OS:6*:*) - GUESS=mips-sony-newsos6 - ;; + echo mips-sony-newsos6 + exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if test -d /usr/nec; then - GUESS=mips-nec-sysv$UNAME_RELEASE + if [ -d /usr/nec ]; then + echo mips-nec-sysv"$UNAME_RELEASE" else - GUESS=mips-unknown-sysv$UNAME_RELEASE + echo mips-unknown-sysv"$UNAME_RELEASE" fi - ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - GUESS=powerpc-be-beos - ;; + echo powerpc-be-beos + exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - GUESS=powerpc-apple-beos - ;; + echo powerpc-apple-beos + exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - GUESS=i586-pc-beos - ;; + echo i586-pc-beos + exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - GUESS=i586-pc-haiku - ;; - ppc:Haiku:*:*) # Haiku running on Apple PowerPC - GUESS=powerpc-apple-haiku - ;; - *:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat) - GUESS=$UNAME_MACHINE-unknown-haiku - ;; + echo i586-pc-haiku + exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; SX-4:SUPER-UX:*:*) - GUESS=sx4-nec-superux$UNAME_RELEASE - ;; + echo sx4-nec-superux"$UNAME_RELEASE" + exit ;; SX-5:SUPER-UX:*:*) - GUESS=sx5-nec-superux$UNAME_RELEASE - ;; + echo sx5-nec-superux"$UNAME_RELEASE" + exit ;; SX-6:SUPER-UX:*:*) - GUESS=sx6-nec-superux$UNAME_RELEASE - ;; + echo sx6-nec-superux"$UNAME_RELEASE" + exit ;; SX-7:SUPER-UX:*:*) - GUESS=sx7-nec-superux$UNAME_RELEASE - ;; + echo sx7-nec-superux"$UNAME_RELEASE" + exit ;; SX-8:SUPER-UX:*:*) - GUESS=sx8-nec-superux$UNAME_RELEASE - ;; + echo sx8-nec-superux"$UNAME_RELEASE" + exit ;; SX-8R:SUPER-UX:*:*) - GUESS=sx8r-nec-superux$UNAME_RELEASE - ;; + echo sx8r-nec-superux"$UNAME_RELEASE" + exit ;; SX-ACE:SUPER-UX:*:*) - GUESS=sxace-nec-superux$UNAME_RELEASE - ;; + echo sxace-nec-superux"$UNAME_RELEASE" + exit ;; Power*:Rhapsody:*:*) - GUESS=powerpc-apple-rhapsody$UNAME_RELEASE - ;; + echo powerpc-apple-rhapsody"$UNAME_RELEASE" + exit ;; *:Rhapsody:*:*) - GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE - ;; - arm64:Darwin:*:*) - GUESS=aarch64-apple-darwin$UNAME_RELEASE - ;; + echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" + exit ;; *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` - case $UNAME_PROCESSOR in - unknown) UNAME_PROCESSOR=powerpc ;; - esac - if command -v xcode-select > /dev/null 2> /dev/null && \ - ! xcode-select --print-path > /dev/null 2> /dev/null ; then - # Avoid executing cc if there is no toolchain installed as - # cc will be a stub that puts up a graphical alert - # prompting the user to install developer tools. - CC_FOR_BUILD=no_compiler_found - else - set_cc_for_build + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + eval "$set_cc_for_build" + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc fi - if test "$CC_FOR_BUILD" != no_compiler_found; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac - fi - # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc - if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_PPC >/dev/null - then - UNAME_PROCESSOR=powerpc + if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi fi elif test "$UNAME_PROCESSOR" = i386 ; then - # uname -m returns i386 or x86_64 - UNAME_PROCESSOR=$UNAME_MACHINE + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 fi - GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE - ;; + echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" + exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE - ;; + echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" + exit ;; *:QNX:*:4*) - GUESS=i386-pc-qnx - ;; + echo i386-pc-qnx + exit ;; NEO-*:NONSTOP_KERNEL:*:*) - GUESS=neo-tandem-nsk$UNAME_RELEASE - ;; + echo neo-tandem-nsk"$UNAME_RELEASE" + exit ;; NSE-*:NONSTOP_KERNEL:*:*) - GUESS=nse-tandem-nsk$UNAME_RELEASE - ;; + echo nse-tandem-nsk"$UNAME_RELEASE" + exit ;; NSR-*:NONSTOP_KERNEL:*:*) - GUESS=nsr-tandem-nsk$UNAME_RELEASE - ;; + echo nsr-tandem-nsk"$UNAME_RELEASE" + exit ;; NSV-*:NONSTOP_KERNEL:*:*) - GUESS=nsv-tandem-nsk$UNAME_RELEASE - ;; + echo nsv-tandem-nsk"$UNAME_RELEASE" + exit ;; NSX-*:NONSTOP_KERNEL:*:*) - GUESS=nsx-tandem-nsk$UNAME_RELEASE - ;; + echo nsx-tandem-nsk"$UNAME_RELEASE" + exit ;; *:NonStop-UX:*:*) - GUESS=mips-compaq-nonstopux - ;; + echo mips-compaq-nonstopux + exit ;; BS2000:POSIX*:*:*) - GUESS=bs2000-siemens-sysv - ;; + echo bs2000-siemens-sysv + exit ;; DS/*:UNIX_System_V:*:*) - GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE - ;; + echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" + exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - if test "${cputype-}" = 386; then + if test "$cputype" = 386; then UNAME_MACHINE=i386 - elif test "x${cputype-}" != x; then - UNAME_MACHINE=$cputype + else + UNAME_MACHINE="$cputype" fi - GUESS=$UNAME_MACHINE-unknown-plan9 - ;; + echo "$UNAME_MACHINE"-unknown-plan9 + exit ;; *:TOPS-10:*:*) - GUESS=pdp10-unknown-tops10 - ;; + echo pdp10-unknown-tops10 + exit ;; *:TENEX:*:*) - GUESS=pdp10-unknown-tenex - ;; + echo pdp10-unknown-tenex + exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - GUESS=pdp10-dec-tops20 - ;; + echo pdp10-dec-tops20 + exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - GUESS=pdp10-xkl-tops20 - ;; + echo pdp10-xkl-tops20 + exit ;; *:TOPS-20:*:*) - GUESS=pdp10-unknown-tops20 - ;; + echo pdp10-unknown-tops20 + exit ;; *:ITS:*:*) - GUESS=pdp10-unknown-its - ;; + echo pdp10-unknown-its + exit ;; SEI:*:*:SEIUX) - GUESS=mips-sei-seiux$UNAME_RELEASE - ;; + echo mips-sei-seiux"$UNAME_RELEASE" + exit ;; *:DragonFly:*:*) - DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` - GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL - ;; + echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" + exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` - case $UNAME_MACHINE in - A*) GUESS=alpha-dec-vms ;; - I*) GUESS=ia64-dec-vms ;; - V*) GUESS=vax-dec-vms ;; + case "$UNAME_MACHINE" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) - GUESS=i386-pc-xenix - ;; + echo i386-pc-xenix + exit ;; i*86:skyos:*:*) - SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` - GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL - ;; + echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" + exit ;; i*86:rdos:*:*) - GUESS=$UNAME_MACHINE-pc-rdos - ;; - i*86:Fiwix:*:*) - GUESS=$UNAME_MACHINE-pc-fiwix - ;; - *:AROS:*:*) - GUESS=$UNAME_MACHINE-unknown-aros - ;; + echo "$UNAME_MACHINE"-pc-rdos + exit ;; + i*86:AROS:*:*) + echo "$UNAME_MACHINE"-pc-aros + exit ;; x86_64:VMkernel:*:*) - GUESS=$UNAME_MACHINE-unknown-esx - ;; + echo "$UNAME_MACHINE"-unknown-esx + exit ;; amd64:Isilon\ OneFS:*:*) - GUESS=x86_64-unknown-onefs - ;; - *:Unleashed:*:*) - GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE - ;; - *:Ironclad:*:*) - GUESS=$UNAME_MACHINE-unknown-ironclad - ;; + echo x86_64-unknown-onefs + exit ;; esac -# Do we have a guess based on uname results? -if test "x$GUESS" != x; then - echo "$GUESS" - exit -fi - -# No uname command or uname output not recognized. -set_cc_for_build -cat > "$dummy.c" < -#include -#endif -#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) -#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) -#include -#if defined(_SIZE_T_) || defined(SIGLOST) -#include -#endif -#endif -#endif -int -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); -#endif - -#if defined (vax) -#if !defined (ultrix) -#include -#if defined (BSD) -#if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -#else -#if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -#else - printf ("vax-dec-bsd\n"); exit (0); -#endif -#endif -#else - printf ("vax-dec-bsd\n"); exit (0); -#endif -#else -#if defined(_SIZE_T_) || defined(SIGLOST) - struct utsname un; - uname (&un); - printf ("vax-dec-ultrix%s\n", un.release); exit (0); -#else - printf ("vax-dec-ultrix\n"); exit (0); -#endif -#endif -#endif -#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) -#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) -#if defined(_SIZE_T_) || defined(SIGLOST) - struct utsname *un; - uname (&un); - printf ("mips-dec-ultrix%s\n", un.release); exit (0); -#else - printf ("mips-dec-ultrix\n"); exit (0); -#endif -#endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. -test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } - echo "$0: unable to guess system type" >&2 -case $UNAME_MACHINE:$UNAME_SYSTEM in +case "$UNAME_MACHINE:$UNAME_SYSTEM" in mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&2 <&2 < header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the 'feenableexcept' function. */ +/* Define to 1 if you have the `feenableexcept' function. */ #undef HAVE_FEENABLEEXCEPT /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H -/* Define to 1 if you have the 'm' library (-lm). */ +/* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM -/* Define to 1 if you have the 'z' library (-lz). */ +/* Define to 1 if you have the `z' library (-lz). */ #undef HAVE_LIBZ -/* Define to 1 if you have the 'pow' function. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `pow' function. */ #undef HAVE_POW /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H -/* Define to 1 if you have the header file. */ -#undef HAVE_STDIO_H - /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H @@ -78,18 +78,6 @@ /* Enable Intel SSE optimizations */ #undef PNG_INTEL_SSE_OPT -/* Enable LOONGARCH LSX optimizations */ -#undef PNG_LOONGARCH_LSX_OPT - -/* Turn on MIPS MMI optimizations at run-time */ -#undef PNG_MIPS_MMI_API_SUPPORTED - -/* Check for MIPS MMI support at run-time */ -#undef PNG_MIPS_MMI_CHECK_SUPPORTED - -/* Enable MIPS MMI optimizations */ -#undef PNG_MIPS_MMI_OPT - /* Turn on MIPS MSA optimizations at run-time */ #undef PNG_MIPS_MSA_API_SUPPORTED @@ -108,31 +96,31 @@ /* Enable POWERPC VSX optimizations */ #undef PNG_POWERPC_VSX_OPT -/* Enable RISCV RVV optimizations */ -#undef PNG_RISCV_RVV_OPT - -/* Define to 1 if all of the C89 standard headers exist (not just the ones - required in a freestanding environment). This macro is provided for - backward compatibility; new code need not use it. */ +/* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS -/* Define to 1 if your declares 'struct tm'. */ +/* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME /* Version number of package */ #undef VERSION +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const + /* Define to the equivalent of the C99 'restrict' keyword, or to nothing if this is not supported. Do not define if restrict is - supported only directly. */ + supported directly. */ #undef restrict -/* Work around a bug in older versions of Sun C++, which did not - #define __restrict__ or support _Restrict or __restrict__ - even though the corresponding Sun C compiler ended up with - "#define restrict _Restrict" or "#define restrict __restrict__" - in the previous line. This workaround can be removed once - we assume Oracle Developer Studio 12.5 (2016) or later. */ -#if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__ +/* Work around a bug in Sun C++: it does not support _Restrict or + __restrict__, even though the corresponding Sun C compiler ends up with + "#define restrict _Restrict" or "#define restrict __restrict__" in the + previous line. Perhaps some future version of Sun C++ will work with + restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ +#if defined __SUNPRO_CC && !defined __RESTRICT # define _Restrict # define __restrict__ #endif + +/* Define to `unsigned int' if does not define. */ +#undef size_t diff --git a/Engine/lib/lpng/config.sub b/Engine/lib/lpng/config.sub index 4aaae46f6..9ccf09a7a 100644 --- a/Engine/lib/lpng/config.sub +++ b/Engine/lib/lpng/config.sub @@ -1,14 +1,12 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2024 Free Software Foundation, Inc. +# Copyright 1992-2018 Free Software Foundation, Inc. -# shellcheck disable=SC2006,SC2268,SC2162 # see below for rationale - -timestamp='2024-05-27' +timestamp='2018-03-08' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -35,7 +33,7 @@ timestamp='2024-05-27' # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -52,13 +50,6 @@ timestamp='2024-05-27' # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. -# The "shellcheck disable" line above the timestamp inhibits complaints -# about features and limitations of the classic Bourne shell that were -# superseded or lifted in POSIX. However, this script identifies a wide -# variety of pre-POSIX systems that do not have POSIX shells at all, and -# even some reasonably current systems (Solaris 10 as case-in-point) still -# have a pre-POSIX /bin/sh. - me=`echo "$0" | sed -e 's,.*/,,'` usage="\ @@ -76,13 +67,13 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright 1992-2024 Free Software Foundation, Inc. +Copyright 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" -Try '$me --help' for more information." +Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do @@ -98,7 +89,7 @@ while test $# -gt 0 ; do - ) # Use stdin as input. break ;; -* ) - echo "$me: invalid option $1$help" >&2 + echo "$me: invalid option $1$help" exit 1 ;; *local*) @@ -119,1371 +110,1223 @@ case $# in exit 1;; esac -# Split fields of configuration type -saved_IFS=$IFS -IFS="-" read field1 field2 field3 field4 <&2 - exit 1 +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. ;; - *-*-*-*) - basic_machine=$field1-$field2 - basic_os=$field3-$field4 + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray | -microblaze*) + os= + basic_machine=$1 ;; - *-*-*) - # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two - # parts - maybe_os=$field2-$field3 - case $maybe_os in - cloudabi*-eabi* \ - | kfreebsd*-gnu* \ - | knetbsd*-gnu* \ - | kopensolaris*-gnu* \ - | linux-* \ - | managarm-* \ - | netbsd*-eabi* \ - | netbsd*-gnu* \ - | nto-qnx* \ - | os2-emx* \ - | rtmk-nova* \ - | storm-chaos* \ - | uclinux-gnu* \ - | uclinux-uclibc* \ - | windows-* ) - basic_machine=$field1 - basic_os=$maybe_os - ;; - android-linux) - basic_machine=$field1-unknown - basic_os=linux-android - ;; - *) - basic_machine=$field1-$field2 - basic_os=$field3 - ;; - esac + -bluegene*) + os=-cnk ;; - *-*) - case $field1-$field2 in - # Shorthands that happen to contain a single dash - convex-c[12] | convex-c3[248]) - basic_machine=$field2-convex - basic_os= - ;; - decstation-3100) - basic_machine=mips-dec - basic_os= - ;; - *-*) - # Second component is usually, but not always the OS - case $field2 in - # Do not treat sunos as a manufacturer - sun*os*) - basic_machine=$field1 - basic_os=$field2 - ;; - # Manufacturers - 3100* \ - | 32* \ - | 3300* \ - | 3600* \ - | 7300* \ - | acorn \ - | altos* \ - | apollo \ - | apple \ - | atari \ - | att* \ - | axis \ - | be \ - | bull \ - | cbm \ - | ccur \ - | cisco \ - | commodore \ - | convergent* \ - | convex* \ - | cray \ - | crds \ - | dec* \ - | delta* \ - | dg \ - | digital \ - | dolphin \ - | encore* \ - | gould \ - | harris \ - | highlevel \ - | hitachi* \ - | hp \ - | ibm* \ - | intergraph \ - | isi* \ - | knuth \ - | masscomp \ - | microblaze* \ - | mips* \ - | motorola* \ - | ncr* \ - | news \ - | next \ - | ns \ - | oki \ - | omron* \ - | pc533* \ - | rebel \ - | rom68k \ - | rombug \ - | semi \ - | sequent* \ - | siemens \ - | sgi* \ - | siemens \ - | sim \ - | sni \ - | sony* \ - | stratus \ - | sun \ - | sun[234]* \ - | tektronix \ - | tti* \ - | ultra \ - | unicom* \ - | wec \ - | winbond \ - | wrs) - basic_machine=$field1-$field2 - basic_os= - ;; - zephyr*) - basic_machine=$field1-unknown - basic_os=$field2 - ;; - *) - basic_machine=$field1 - basic_os=$field2 - ;; - esac - ;; - esac + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 ;; - *) - # Convert single-component short-hands not valid as part of - # multi-component configurations. - case $field1 in - 386bsd) - basic_machine=i386-pc - basic_os=bsd - ;; - a29khif) - basic_machine=a29k-amd - basic_os=udi - ;; - adobe68k) - basic_machine=m68010-adobe - basic_os=scout - ;; - alliant) - basic_machine=fx80-alliant - basic_os= - ;; - altos | altos3068) - basic_machine=m68k-altos - basic_os= - ;; - am29k) - basic_machine=a29k-none - basic_os=bsd - ;; - amdahl) - basic_machine=580-amdahl - basic_os=sysv - ;; - amiga) - basic_machine=m68k-unknown - basic_os= - ;; - amigaos | amigados) - basic_machine=m68k-unknown - basic_os=amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - basic_os=sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - basic_os=sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - basic_os=bsd - ;; - aros) - basic_machine=i386-pc - basic_os=aros - ;; - aux) - basic_machine=m68k-apple - basic_os=aux - ;; - balance) - basic_machine=ns32k-sequent - basic_os=dynix - ;; - blackfin) - basic_machine=bfin-unknown - basic_os=linux - ;; - cegcc) - basic_machine=arm-unknown - basic_os=cegcc - ;; - cray) - basic_machine=j90-cray - basic_os=unicos - ;; - crds | unos) - basic_machine=m68k-crds - basic_os= - ;; - da30) - basic_machine=m68k-da30 - basic_os= - ;; - decstation | pmax | pmin | dec3100 | decstatn) - basic_machine=mips-dec - basic_os= - ;; - delta88) - basic_machine=m88k-motorola - basic_os=sysv3 - ;; - dicos) - basic_machine=i686-pc - basic_os=dicos - ;; - djgpp) - basic_machine=i586-pc - basic_os=msdosdjgpp - ;; - ebmon29k) - basic_machine=a29k-amd - basic_os=ebmon - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - basic_os=ose - ;; - gmicro) - basic_machine=tron-gmicro - basic_os=sysv - ;; - go32) - basic_machine=i386-pc - basic_os=go32 - ;; - h8300hms) - basic_machine=h8300-hitachi - basic_os=hms - ;; - h8300xray) - basic_machine=h8300-hitachi - basic_os=xray - ;; - h8500hms) - basic_machine=h8500-hitachi - basic_os=hms - ;; - harris) - basic_machine=m88k-harris - basic_os=sysv3 - ;; - hp300 | hp300hpux) - basic_machine=m68k-hp - basic_os=hpux - ;; - hp300bsd) - basic_machine=m68k-hp - basic_os=bsd - ;; - hppaosf) - basic_machine=hppa1.1-hp - basic_os=osf - ;; - hppro) - basic_machine=hppa1.1-hp - basic_os=proelf - ;; - i386mach) - basic_machine=i386-mach - basic_os=mach - ;; - isi68 | isi) - basic_machine=m68k-isi - basic_os=sysv - ;; - m68knommu) - basic_machine=m68k-unknown - basic_os=linux - ;; - magnum | m3230) - basic_machine=mips-mips - basic_os=sysv - ;; - merlin) - basic_machine=ns32k-utek - basic_os=sysv - ;; - mingw64) - basic_machine=x86_64-pc - basic_os=mingw64 - ;; - mingw32) - basic_machine=i686-pc - basic_os=mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - basic_os=mingw32ce - ;; - monitor) - basic_machine=m68k-rom68k - basic_os=coff - ;; - morphos) - basic_machine=powerpc-unknown - basic_os=morphos - ;; - moxiebox) - basic_machine=moxie-unknown - basic_os=moxiebox - ;; - msdos) - basic_machine=i386-pc - basic_os=msdos - ;; - msys) - basic_machine=i686-pc - basic_os=msys - ;; - mvs) - basic_machine=i370-ibm - basic_os=mvs - ;; - nacl) - basic_machine=le32-unknown - basic_os=nacl - ;; - ncr3000) - basic_machine=i486-ncr - basic_os=sysv4 - ;; - netbsd386) - basic_machine=i386-pc - basic_os=netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - basic_os=linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - basic_os=newsos - ;; - news1000) - basic_machine=m68030-sony - basic_os=newsos - ;; - necv70) - basic_machine=v70-nec - basic_os=sysv - ;; - nh3000) - basic_machine=m68k-harris - basic_os=cxux - ;; - nh[45]000) - basic_machine=m88k-harris - basic_os=cxux - ;; - nindy960) - basic_machine=i960-intel - basic_os=nindy - ;; - mon960) - basic_machine=i960-intel - basic_os=mon960 - ;; - nonstopux) - basic_machine=mips-compaq - basic_os=nonstopux - ;; - os400) - basic_machine=powerpc-ibm - basic_os=os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - basic_os=ose - ;; - os68k) - basic_machine=m68k-none - basic_os=os68k - ;; - paragon) - basic_machine=i860-intel - basic_os=osf - ;; - parisc) - basic_machine=hppa-unknown - basic_os=linux - ;; - psp) - basic_machine=mipsallegrexel-sony - basic_os=psp - ;; - pw32) - basic_machine=i586-unknown - basic_os=pw32 - ;; - rdos | rdos64) - basic_machine=x86_64-pc - basic_os=rdos - ;; - rdos32) - basic_machine=i386-pc - basic_os=rdos - ;; - rom68k) - basic_machine=m68k-rom68k - basic_os=coff - ;; - sa29200) - basic_machine=a29k-amd - basic_os=udi - ;; - sei) - basic_machine=mips-sei - basic_os=seiux - ;; - sequent) - basic_machine=i386-sequent - basic_os= - ;; - sps7) - basic_machine=m68k-bull - basic_os=sysv2 - ;; - st2000) - basic_machine=m68k-tandem - basic_os= - ;; - stratus) - basic_machine=i860-stratus - basic_os=sysv4 - ;; - sun2) - basic_machine=m68000-sun - basic_os= - ;; - sun2os3) - basic_machine=m68000-sun - basic_os=sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - basic_os=sunos4 - ;; - sun3) - basic_machine=m68k-sun - basic_os= - ;; - sun3os3) - basic_machine=m68k-sun - basic_os=sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - basic_os=sunos4 - ;; - sun4) - basic_machine=sparc-sun - basic_os= - ;; - sun4os3) - basic_machine=sparc-sun - basic_os=sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - basic_os=sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - basic_os=solaris2 - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - basic_os= - ;; - sv1) - basic_machine=sv1-cray - basic_os=unicos - ;; - symmetry) - basic_machine=i386-sequent - basic_os=dynix - ;; - t3e) - basic_machine=alphaev5-cray - basic_os=unicos - ;; - t90) - basic_machine=t90-cray - basic_os=unicos - ;; - toad1) - basic_machine=pdp10-xkl - basic_os=tops20 - ;; - tpf) - basic_machine=s390x-ibm - basic_os=tpf - ;; - udi29k) - basic_machine=a29k-amd - basic_os=udi - ;; - ultra3) - basic_machine=a29k-nyu - basic_os=sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - basic_os=none - ;; - vaxv) - basic_machine=vax-dec - basic_os=sysv - ;; - vms) - basic_machine=vax-dec - basic_os=vms - ;; - vsta) - basic_machine=i386-pc - basic_os=vsta - ;; - vxworks960) - basic_machine=i960-wrs - basic_os=vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - basic_os=vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - basic_os=vxworks - ;; - xbox) - basic_machine=i686-pc - basic_os=mingw32 - ;; - ymp) - basic_machine=ymp-cray - basic_os=unicos - ;; - *) - basic_machine=$1 - basic_os= - ;; - esac + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint ;; esac -# Decode 1-component or ad-hoc basic machines +# Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in - # Here we handle the default manufacturer of certain CPU types. It is in - # some cases the only manufacturer, in others, it is the most popular. - w89k) - cpu=hppa1.1 - vendor=winbond + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | ba \ + | be32 | be64 \ + | bfin \ + | c4x | c8051 | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | e2k | epiphany \ + | fido | fr30 | frv | ft32 \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i860 | i960 | ia16 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 | nios2eb | nios2el \ + | ns16k | ns32k \ + | open8 | or1k | or1knd | or32 \ + | pdp10 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pru \ + | pyramid \ + | riscv32 | riscv64 \ + | rl78 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | visium \ + | wasm32 \ + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown ;; - op50n) - cpu=hppa1.1 - vendor=oki + c54x) + basic_machine=tic54x-unknown ;; - op60c) - cpu=hppa1.1 - vendor=oki + c55x) + basic_machine=tic55x-unknown ;; - ibm*) - cpu=i370 - vendor=ibm - ;; - orion105) - cpu=clipper - vendor=highlevel - ;; - mac | mpw | mac-mpw) - cpu=m68k - vendor=apple - ;; - pmac | pmac-mpw) - cpu=powerpc - vendor=apple - ;; - - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - cpu=m68000 - vendor=att - ;; - 3b*) - cpu=we32k - vendor=att - ;; - bluegene*) - cpu=powerpc - vendor=ibm - basic_os=cnk - ;; - decsystem10* | dec10*) - cpu=pdp10 - vendor=dec - basic_os=tops10 - ;; - decsystem20* | dec20*) - cpu=pdp10 - vendor=dec - basic_os=tops20 - ;; - delta | 3300 | delta-motorola | 3300-motorola | motorola-delta | motorola-3300) - cpu=m68k - vendor=motorola - ;; - # This used to be dpx2*, but that gets the RS6000-based - # DPX/20 and the x86-based DPX/2-100 wrong. See - # https://oldskool.silicium.org/stations/bull_dpx20.htm - # https://www.feb-patrimoine.com/english/bull_dpx2.htm - # https://www.feb-patrimoine.com/english/unix_and_bull.htm - dpx2 | dpx2[23]00 | dpx2[23]xx) - cpu=m68k - vendor=bull - ;; - dpx2100 | dpx21xx) - cpu=i386 - vendor=bull - ;; - dpx20) - cpu=rs6000 - vendor=bull - ;; - encore | umax | mmax) - cpu=ns32k - vendor=encore - ;; - elxsi) - cpu=elxsi - vendor=elxsi - basic_os=${basic_os:-bsd} - ;; - fx2800) - cpu=i860 - vendor=alliant - ;; - genix) - cpu=ns32k - vendor=ns - ;; - h3050r* | hiux*) - cpu=hppa1.1 - vendor=hitachi - basic_os=hiuxwe2 - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - cpu=hppa1.0 - vendor=hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - cpu=m68000 - vendor=hp - ;; - hp9k3[2-9][0-9]) - cpu=m68k - vendor=hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - cpu=hppa1.0 - vendor=hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - cpu=hppa1.1 - vendor=hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - cpu=hppa1.1 - vendor=hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - cpu=hppa1.1 - vendor=hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - cpu=hppa1.1 - vendor=hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - cpu=hppa1.0 - vendor=hp - ;; - i*86v32) - cpu=`echo "$1" | sed -e 's/86.*/86/'` - vendor=pc - basic_os=sysv32 - ;; - i*86v4*) - cpu=`echo "$1" | sed -e 's/86.*/86/'` - vendor=pc - basic_os=sysv4 - ;; - i*86v) - cpu=`echo "$1" | sed -e 's/86.*/86/'` - vendor=pc - basic_os=sysv - ;; - i*86sol2) - cpu=`echo "$1" | sed -e 's/86.*/86/'` - vendor=pc - basic_os=solaris2 - ;; - j90 | j90-cray) - cpu=j90 - vendor=cray - basic_os=${basic_os:-unicos} - ;; - iris | iris4d) - cpu=mips - vendor=sgi - case $basic_os in - irix*) - ;; - *) - basic_os=irix4 - ;; - esac - ;; - miniframe) - cpu=m68000 - vendor=convergent - ;; - *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) - cpu=m68k - vendor=atari - basic_os=mint - ;; - news-3600 | risc-news) - cpu=mips - vendor=sony - basic_os=newsos - ;; - next | m*-next) - cpu=m68k - vendor=next - ;; - np1) - cpu=np1 - vendor=gould - ;; - op50n-* | op60c-*) - cpu=hppa1.1 - vendor=oki - basic_os=proelf - ;; - pa-hitachi) - cpu=hppa1.1 - vendor=hitachi - basic_os=hiuxwe2 - ;; - pbd) - cpu=sparc - vendor=tti - ;; - pbb) - cpu=m68k - vendor=tti - ;; - pc532) - cpu=ns32k - vendor=pc532 - ;; - pn) - cpu=pn - vendor=gould - ;; - power) - cpu=power - vendor=ibm - ;; - ps2) - cpu=i386 - vendor=ibm - ;; - rm[46]00) - cpu=mips - vendor=siemens - ;; - rtpc | rtpc-*) - cpu=romp - vendor=ibm - ;; - sde) - cpu=mipsisa32 - vendor=sde - basic_os=${basic_os:-elf} - ;; - simso-wrs) - cpu=sparclite - vendor=wrs - basic_os=vxworks - ;; - tower | tower-32) - cpu=m68k - vendor=ncr - ;; - vpp*|vx|vx-*) - cpu=f301 - vendor=fujitsu - ;; - w65) - cpu=w65 - vendor=wdc - ;; - w89k-*) - cpu=hppa1.1 - vendor=winbond - basic_os=proelf - ;; - none) - cpu=none - vendor=none + c6x) + basic_machine=tic6x-unknown ;; leon|leon[3-9]) - cpu=sparc - vendor=$basic_machine + basic_machine=sparc-$basic_machine ;; - leon-*|leon[3-9]-*) - cpu=sparc - vendor=`echo "$basic_machine" | sed 's/-.*//'` + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) + ;; + ms1) + basic_machine=mt-unknown ;; - *-*) - saved_IFS=$IFS - IFS="-" read cpu vendor <&2 + exit 1 ;; - # These rules are duplicated from below for sake of the special case above; - # i.e. things that normalized to x86 arches should also default to "pc" - pc98) - cpu=i386 - vendor=pc + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | ba-* \ + | be32-* | be64-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | e2k-* | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ + | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ + | ip2k-* | iq2000-* \ + | k1om-* \ + | le32-* | le64-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | or1k*-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pru-* \ + | pyramid-* \ + | riscv32-* | riscv64-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | visium-* \ + | wasm32-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) ;; - x64 | amd64) - cpu=x86_64 - vendor=pc + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown ;; - # Recognize the basic CPU types without company name. - *) - cpu=$basic_machine - vendor=unknown + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-pc + os=-bsd ;; -esac - -unset -v basic_machine - -# Decode basic machines in the full and proper CPU-Company form. -case $cpu-$vendor in - # Here we handle the default manufacturer of certain CPU types in canonical form. - # It is in some cases the only manufacturer, in others, it is the most popular. - c[12]-convex | c[12]-unknown | c3[248]-convex | c3[248]-unknown) - vendor=convex - basic_os=${basic_os:-bsd} + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att ;; - craynv-unknown) - vendor=cray - basic_os=${basic_os:-unicosmp} + 3b*) + basic_machine=we32k-att ;; - c90-unknown | c90-cray) - vendor=cray - basic_os=${basic_os:-unicos} + a29khif) + basic_machine=a29k-amd + os=-udi ;; - fx80-unknown) - vendor=alliant + abacus) + basic_machine=abacus-unknown ;; - romp-unknown) - vendor=ibm + adobe68k) + basic_machine=m68010-adobe + os=-scout ;; - mmix-unknown) - vendor=knuth + alliant | fx80) + basic_machine=fx80-alliant ;; - microblaze-unknown | microblazeel-unknown) - vendor=xilinx + altos | altos3068) + basic_machine=m68k-altos ;; - rs6000-unknown) - vendor=ibm + am29k) + basic_machine=a29k-none + os=-bsd ;; - vax-unknown) - vendor=dec + amd64) + basic_machine=x86_64-pc ;; - pdp11-unknown) - vendor=dec - ;; - we32k-unknown) - vendor=att - ;; - cydra-unknown) - vendor=cydrome - ;; - i370-ibm*) - vendor=ibm - ;; - orion-unknown) - vendor=highlevel - ;; - xps-unknown | xps100-unknown) - cpu=xps100 - vendor=honeywell - ;; - - # Here we normalize CPU types with a missing or matching vendor - armh-unknown | armh-alt) - cpu=armv7l - vendor=alt - basic_os=${basic_os:-linux-gnueabihf} - ;; - - # Normalized CPU+vendor pairs that imply an OS, if not otherwise specified - m68k-isi) - basic_os=${basic_os:-sysv} - ;; - m68k-sony) - basic_os=${basic_os:-newsos} - ;; - m68k-tektronix) - basic_os=${basic_os:-bsd} - ;; - m88k-harris) - basic_os=${basic_os:-sysv3} - ;; - i386-bull | m68k-bull) - basic_os=${basic_os:-sysv3} - ;; - rs6000-bull) - basic_os=${basic_os:-bosx} - ;; - mips-sni) - basic_os=${basic_os:-sysv4} - ;; - - # Here we normalize CPU types irrespective of the vendor amd64-*) - cpu=x86_64 + basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + asmjs) + basic_machine=asmjs-unknown + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux ;; blackfin-*) - cpu=bfin - basic_os=${basic_os:-linux} + basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk ;; c54x-*) - cpu=tic54x + basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c55x-*) - cpu=tic55x + basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c6x-*) - cpu=tic6x + basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16 | cr16-*) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2*) + basic_machine=m68k-bull + os=-sysv3 + ;; + e500v[12]) + basic_machine=powerpc-unknown + os=$os"spe" ;; e500v[12]-*) - cpu=powerpc - basic_os=${basic_os}"spe" + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=$os"spe" ;; - mips3*-*) - cpu=mips64 + ebmon29k) + basic_machine=a29k-amd + os=-ebmon ;; - ms1-*) - cpu=mt + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; + i*86v32) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux ;; m68knommu-*) - cpu=m68k - basic_os=${basic_os:-linux} + basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=-linux ;; - m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*) - cpu=s12z + magnum | m3230) + basic_machine=mips-mips + os=-sysv ;; - openrisc-*) - cpu=or32 + merlin) + basic_machine=ns32k-utek + os=-sysv ;; - parisc-*) - cpu=hppa - basic_os=${basic_os:-linux} + microblaze*) + basic_machine=microblaze-xilinx ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - cpu=i586 + mingw64) + basic_machine=x86_64-pc + os=-mingw64 ;; - pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*) - cpu=i686 + mingw32) + basic_machine=i686-pc + os=-mingw32 ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - cpu=i686 + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce ;; - pentium4-*) - cpu=i786 + miniframe) + basic_machine=m68000-convergent ;; - ppc-* | ppcbe-*) - cpu=powerpc + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint ;; - ppcle-* | powerpclittle-*) - cpu=powerpcle + mips3*-*) + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` ;; - ppc64-*) - cpu=powerpc64 + mips3*) + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown ;; - ppc64le-* | powerpc64little-*) - cpu=powerpc64le + monitor) + basic_machine=m68k-rom68k + os=-coff ;; - sb1-*) - cpu=mipsisa64sb1 + morphos) + basic_machine=powerpc-unknown + os=-morphos ;; - sb1el-*) - cpu=mipsisa64sb1el + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox ;; - sh5e[lb]-*) - cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'` + msdos) + basic_machine=i386-pc + os=-msdos ;; - spur-*) - cpu=spur + ms1-*) + basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` ;; - strongarm-* | thumb-*) - cpu=arm + msys) + basic_machine=i686-pc + os=-msys ;; - tx39-*) - cpu=mipstx39 + mvs) + basic_machine=i370-ibm + os=-mvs ;; - tx39el-*) - cpu=mipstx39el + nacl) + basic_machine=le32-unknown + os=-nacl ;; - xscale-* | xscalee[bl]-*) - cpu=`echo "$cpu" | sed 's/^xscale/arm/'` + ncr3000) + basic_machine=i486-ncr + os=-sysv4 ;; - arm64-* | aarch64le-*) - cpu=aarch64 + netbsd386) + basic_machine=i386-unknown + os=-netbsd ;; - - # Recognize the canonical CPU Types that limit and/or modify the - # company names they are paired with. - cr16-*) - basic_os=${basic_os:-elf} + netwinder) + basic_machine=armv4l-rebel + os=-linux ;; - crisv32-* | etraxfs*-*) - cpu=crisv32 - vendor=axis + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos ;; - cris-* | etrax*-*) - cpu=cris - vendor=axis + news1000) + basic_machine=m68030-sony + os=-newsos ;; - crx-*) - basic_os=${basic_os:-elf} + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould ;; neo-tandem) - cpu=neo - vendor=tandem + basic_machine=neo-tandem ;; nse-tandem) - cpu=nse - vendor=tandem + basic_machine=nse-tandem ;; nsr-tandem) - cpu=nsr - vendor=tandem + basic_machine=nsr-tandem ;; nsv-tandem) - cpu=nsv - vendor=tandem + basic_machine=nsv-tandem ;; nsx-tandem) - cpu=nsx - vendor=tandem + basic_machine=nsx-tandem ;; - mipsallegrexel-sony) - cpu=mipsallegrexel - vendor=sony + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf ;; - tile*-*) - basic_os=${basic_os:-linux-gnu} + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc | ppcbe) basic_machine=powerpc-unknown + ;; + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tile*) + basic_machine=$basic_machine-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + x64) + basic_machine=x86_64-pc + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + none) + basic_machine=none-none + os=-none ;; +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; *) - # Recognize the canonical CPU types that are allowed with any - # company name. - case $cpu in - 1750a \ - | 580 \ - | [cjt]90 \ - | a29k \ - | aarch64 \ - | aarch64_be \ - | aarch64c \ - | abacus \ - | alpha \ - | alpha64 \ - | alpha64ev56 \ - | alpha64ev6[78] \ - | alpha64ev[4-8] \ - | alpha64pca5[67] \ - | alphaev56 \ - | alphaev6[78] \ - | alphaev[4-8] \ - | alphapca5[67] \ - | am33_2.0 \ - | amdgcn \ - | arc \ - | arc32 \ - | arc64 \ - | arceb \ - | arm \ - | arm64e \ - | arm64ec \ - | arm[lb]e \ - | arme[lb] \ - | armv* \ - | asmjs \ - | avr \ - | avr32 \ - | ba \ - | be32 \ - | be64 \ - | bfin \ - | bpf \ - | bs2000 \ - | c30 \ - | c4x \ - | c8051 \ - | c[123]* \ - | clipper \ - | craynv \ - | csky \ - | cydra \ - | d10v \ - | d30v \ - | dlx \ - | dsp16xx \ - | e2k \ - | elxsi \ - | epiphany \ - | f30[01] \ - | f700 \ - | fido \ - | fr30 \ - | frv \ - | ft32 \ - | fx80 \ - | h8300 \ - | h8500 \ - | hexagon \ - | hppa \ - | hppa1.[01] \ - | hppa2.0 \ - | hppa2.0[nw] \ - | hppa64 \ - | i*86 \ - | i370 \ - | i860 \ - | i960 \ - | ia16 \ - | ia64 \ - | ip2k \ - | iq2000 \ - | javascript \ - | k1om \ - | kvx \ - | le32 \ - | le64 \ - | lm32 \ - | loongarch32 \ - | loongarch64 \ - | m32c \ - | m32r \ - | m32rle \ - | m5200 \ - | m68000 \ - | m680[012346]0 \ - | m6811 \ - | m6812 \ - | m68360 \ - | m683?2 \ - | m68hc11 \ - | m68hc12 \ - | m68hcs12x \ - | m68k \ - | m88110 \ - | m88k \ - | maxq \ - | mb \ - | mcore \ - | mep \ - | metag \ - | microblaze \ - | microblazeel \ - | mips* \ - | mmix \ - | mn10200 \ - | mn10300 \ - | moxie \ - | msp430 \ - | mt \ - | nanomips* \ - | nds32 \ - | nds32be \ - | nds32le \ - | nfp \ - | nios \ - | nios2 \ - | nios2eb \ - | nios2el \ - | none \ - | np1 \ - | ns16k \ - | ns32k \ - | nvptx \ - | open8 \ - | or1k* \ - | or32 \ - | orion \ - | pdp10 \ - | pdp11 \ - | picochip \ - | pj \ - | pjl \ - | pn \ - | power \ - | powerpc \ - | powerpc64 \ - | powerpc64le \ - | powerpcle \ - | powerpcspe \ - | pru \ - | pyramid \ - | riscv \ - | riscv32 \ - | riscv32be \ - | riscv64 \ - | riscv64be \ - | rl78 \ - | romp \ - | rs6000 \ - | rx \ - | s390 \ - | s390x \ - | score \ - | sh \ - | sh64 \ - | sh64le \ - | sh[12345][lb]e \ - | sh[1234] \ - | sh[1234]e[lb] \ - | sh[23]e \ - | sh[23]ele \ - | sh[24]a \ - | sh[24]ae[lb] \ - | sh[lb]e \ - | she[lb] \ - | shl \ - | sparc \ - | sparc64 \ - | sparc64b \ - | sparc64v \ - | sparc86x \ - | sparclet \ - | sparclite \ - | sparcv8 \ - | sparcv9 \ - | sparcv9b \ - | sparcv9v \ - | spu \ - | sv1 \ - | sx* \ - | tahoe \ - | thumbv7* \ - | tic30 \ - | tic4x \ - | tic54x \ - | tic55x \ - | tic6x \ - | tic80 \ - | tron \ - | ubicom32 \ - | v70 \ - | v810 \ - | v850 \ - | v850e \ - | v850e1 \ - | v850e2 \ - | v850e2v3 \ - | v850es \ - | vax \ - | vc4 \ - | visium \ - | w65 \ - | wasm32 \ - | wasm64 \ - | we32k \ - | x86 \ - | x86_64 \ - | xc16x \ - | xgate \ - | xps100 \ - | xstormy16 \ - | xtensa* \ - | ymp \ - | z80 \ - | z8k) - ;; - - *) - echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2 - exit 1 - ;; - esac + echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 + exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. -case $vendor in - digital*) - vendor=dec +case $basic_machine in + *-digital*) + basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` ;; - commodore*) - vendor=cbm + *-commodore*) + basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` ;; *) ;; @@ -1491,247 +1334,203 @@ esac # Decode manufacturer-specific aliases for certain operating systems. -if test x"$basic_os" != x +if [ x"$os" != x"" ] then - -# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just -# set os. -obj= -case $basic_os in - gnu/linux*) - kernel=linux - os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` - ;; - os2-emx) - kernel=os2 - os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` - ;; - nto-qnx*) - kernel=nto - os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` - ;; - *-*) - saved_IFS=$IFS - IFS="-" read kernel os <&2 + exit 1 ;; esac - else # Here we handle the default operating systems that come with various machines. @@ -1744,606 +1543,254 @@ else # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. -kernel= -obj= -case $cpu-$vendor in +case $basic_machine in score-*) - os= - obj=elf + os=-elf ;; spu-*) - os= - obj=elf + os=-elf ;; *-acorn) - os=riscix1.2 + os=-riscix1.2 ;; arm*-rebel) - kernel=linux - os=gnu + os=-linux ;; arm*-semi) - os= - obj=aout + os=-aout ;; c4x-* | tic4x-*) - os= - obj=coff + os=-coff ;; c8051-*) - os= - obj=elf - ;; - clipper-intergraph) - os=clix + os=-elf ;; hexagon-*) - os= - obj=elf + os=-elf ;; tic54x-*) - os= - obj=coff + os=-coff ;; tic55x-*) - os= - obj=coff + os=-coff ;; tic6x-*) - os= - obj=coff + os=-coff ;; # This must come before the *-dec entry. pdp10-*) - os=tops20 + os=-tops20 ;; pdp11-*) - os=none + os=-none ;; *-dec | vax-*) - os=ultrix4.2 + os=-ultrix4.2 ;; m68*-apollo) - os=domain + os=-domain ;; i386-sun) - os=sunos4.0.2 + os=-sunos4.0.2 ;; m68000-sun) - os=sunos3 + os=-sunos3 ;; m68*-cisco) - os= - obj=aout + os=-aout ;; mep-*) - os= - obj=elf - ;; - # The -sgi and -siemens entries must be before the mips- entry - # or we get the wrong os. - *-sgi) - os=irix - ;; - *-siemens) - os=sysv4 + os=-elf ;; mips*-cisco) - os= - obj=elf + os=-elf ;; - mips*-*|nanomips*-*) - os= - obj=elf + mips*-*) + os=-elf ;; or32-*) - os= - obj=coff + os=-coff ;; - # This must be before the sparc-* entry or we get the wrong os. - *-tti) - os=sysv3 + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 ;; sparc-* | *-sun) - os=sunos4.1.1 + os=-sunos4.1.1 ;; pru-*) - os= - obj=elf + os=-elf ;; *-be) - os=beos + os=-beos ;; *-ibm) - os=aix + os=-aix ;; *-knuth) - os=mmixware + os=-mmixware ;; *-wec) - os=proelf + os=-proelf ;; *-winbond) - os=proelf + os=-proelf ;; *-oki) - os=proelf + os=-proelf ;; *-hp) - os=hpux + os=-hpux ;; *-hitachi) - os=hiuxwe2 + os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=sysv + os=-sysv ;; *-cbm) - os=amigaos + os=-amigaos ;; *-dg) - os=dgux + os=-dgux ;; *-dolphin) - os=sysv3 + os=-sysv3 ;; m68k-ccur) - os=rtu + os=-rtu ;; m88k-omron*) - os=luna + os=-luna ;; *-next) - os=nextstep + os=-nextstep ;; *-sequent) - os=ptx + os=-ptx ;; *-crds) - os=unos + os=-unos ;; *-ns) - os=genix + os=-genix ;; i370-*) - os=mvs + os=-mvs ;; *-gould) - os=sysv + os=-sysv ;; *-highlevel) - os=bsd + os=-bsd ;; *-encore) - os=bsd + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 ;; *-masscomp) - os=rtu + os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) - os=uxpv + os=-uxpv ;; *-rom68k) - os= - obj=coff + os=-coff ;; *-*bug) - os= - obj=coff + os=-coff ;; *-apple) - os=macos + os=-macos ;; *-atari*) - os=mint - ;; - *-wrs) - os=vxworks + os=-mint ;; *) - os=none + os=-none ;; esac - fi -# Now, validate our (potentially fixed-up) individual pieces (OS, OBJ). - -case $os in - # Sometimes we do "kernel-libc", so those need to count as OSes. - llvm* | musl* | newlib* | relibc* | uclibc*) - ;; - # Likewise for "kernel-abi" - eabi* | gnueabi*) - ;; - # VxWorks passes extra cpu info in the 4th filed. - simlinux | simwindows | spe) - ;; - # See `case $cpu-$os` validation below - ghcjs) - ;; - # Now accept the basic system types. - # Each alternative MUST end in a * to match a version number. - abug \ - | aix* \ - | amdhsa* \ - | amigados* \ - | amigaos* \ - | android* \ - | aof* \ - | aos* \ - | aros* \ - | atheos* \ - | auroraux* \ - | aux* \ - | beos* \ - | bitrig* \ - | bme* \ - | bosx* \ - | bsd* \ - | cegcc* \ - | chorusos* \ - | chorusrdb* \ - | clix* \ - | cloudabi* \ - | cnk* \ - | conix* \ - | cos* \ - | cxux* \ - | cygwin* \ - | darwin* \ - | dgux* \ - | dicos* \ - | dnix* \ - | domain* \ - | dragonfly* \ - | drops* \ - | ebmon* \ - | ecoff* \ - | ekkobsd* \ - | emscripten* \ - | emx* \ - | es* \ - | fiwix* \ - | freebsd* \ - | fuchsia* \ - | genix* \ - | genode* \ - | glidix* \ - | gnu* \ - | go32* \ - | haiku* \ - | hcos* \ - | hiux* \ - | hms* \ - | hpux* \ - | ieee* \ - | interix* \ - | ios* \ - | iris* \ - | irix* \ - | ironclad* \ - | isc* \ - | its* \ - | l4re* \ - | libertybsd* \ - | lites* \ - | lnews* \ - | luna* \ - | lynxos* \ - | mach* \ - | macos* \ - | magic* \ - | mbr* \ - | midipix* \ - | midnightbsd* \ - | mingw32* \ - | mingw64* \ - | minix* \ - | mint* \ - | mirbsd* \ - | mks* \ - | mlibc* \ - | mmixware* \ - | mon960* \ - | morphos* \ - | moss* \ - | moxiebox* \ - | mpeix* \ - | mpw* \ - | msdos* \ - | msys* \ - | mvs* \ - | nacl* \ - | netbsd* \ - | netware* \ - | newsos* \ - | nextstep* \ - | nindy* \ - | nonstopux* \ - | nova* \ - | nsk* \ - | nucleus* \ - | nx6 \ - | nx7 \ - | oabi* \ - | ohos* \ - | onefs* \ - | openbsd* \ - | openedition* \ - | openstep* \ - | os108* \ - | os2* \ - | os400* \ - | os68k* \ - | os9* \ - | ose* \ - | osf* \ - | oskit* \ - | osx* \ - | palmos* \ - | phoenix* \ - | plan9* \ - | powermax* \ - | powerunix* \ - | proelf* \ - | psos* \ - | psp* \ - | ptx* \ - | pw32* \ - | qnx* \ - | rdos* \ - | redox* \ - | rhapsody* \ - | riscix* \ - | riscos* \ - | rtems* \ - | rtmk* \ - | rtu* \ - | scout* \ - | secbsd* \ - | sei* \ - | serenity* \ - | sim* \ - | skyos* \ - | solaris* \ - | solidbsd* \ - | sortix* \ - | storm-chaos* \ - | sunos \ - | sunos[34]* \ - | superux* \ - | syllable* \ - | sym* \ - | sysv* \ - | tenex* \ - | tirtos* \ - | toppers* \ - | tops10* \ - | tops20* \ - | tpf* \ - | tvos* \ - | twizzler* \ - | uclinux* \ - | udi* \ - | udk* \ - | ultrix* \ - | unicos* \ - | uniplus* \ - | unleashed* \ - | unos* \ - | uwin* \ - | uxpv* \ - | v88r* \ - |*vms* \ - | vos* \ - | vsta* \ - | vxsim* \ - | vxworks* \ - | wasi* \ - | watchos* \ - | wince* \ - | windiss* \ - | windows* \ - | winnt* \ - | xenix* \ - | xray* \ - | zephyr* \ - | zvmoe* ) - ;; - # This one is extra strict with allowed versions - sco3.2v2 | sco3.2v[4-9]* | sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - ;; - # This refers to builds using the UEFI calling convention - # (which depends on the architecture) and PE file format. - # Note that this is both a different calling convention and - # different file format than that of GNU-EFI - # (x86_64-w64-mingw32). - uefi) - ;; - none) - ;; - kernel* | msvc* ) - # Restricted further below - ;; - '') - if test x"$obj" = x - then - echo "Invalid configuration '$1': Blank OS only allowed with explicit machine code file format" 1>&2 - fi - ;; - *) - echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2 - exit 1 - ;; -esac - -case $obj in - aout* | coff* | elf* | pe*) - ;; - '') - # empty is fine - ;; - *) - echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2 - exit 1 - ;; -esac - -# Here we handle the constraint that a (synthetic) cpu and os are -# valid only in combination with each other and nowhere else. -case $cpu-$os in - # The "javascript-unknown-ghcjs" triple is used by GHC; we - # accept it here in order to tolerate that, but reject any - # variations. - javascript-ghcjs) - ;; - javascript-* | *-ghcjs) - echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2 - exit 1 - ;; -esac - -# As a final step for OS-related things, validate the OS-kernel combination -# (given a valid OS), if there is a kernel. -case $kernel-$os-$obj in - linux-gnu*- | linux-android*- | linux-dietlibc*- | linux-llvm*- \ - | linux-mlibc*- | linux-musl*- | linux-newlib*- \ - | linux-relibc*- | linux-uclibc*- | linux-ohos*- ) - ;; - uclinux-uclibc*- | uclinux-gnu*- ) - ;; - managarm-mlibc*- | managarm-kernel*- ) - ;; - windows*-msvc*-) - ;; - -dietlibc*- | -llvm*- | -mlibc*- | -musl*- | -newlib*- | -relibc*- \ - | -uclibc*- ) - # These are just libc implementations, not actual OSes, and thus - # require a kernel. - echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2 - exit 1 - ;; - -kernel*- ) - echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2 - exit 1 - ;; - *-kernel*- ) - echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2 - exit 1 - ;; - *-msvc*- ) - echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2 - exit 1 - ;; - kfreebsd*-gnu*- | knetbsd*-gnu*- | netbsd*-gnu*- | kopensolaris*-gnu*-) - ;; - vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-) - ;; - nto-qnx*-) - ;; - os2-emx-) - ;; - rtmk-nova-) - ;; - *-eabi*- | *-gnueabi*-) - ;; - none--*) - # None (no kernel, i.e. freestanding / bare metal), - # can be paired with an machine code file format - ;; - -*-) - # Blank kernel with real OS is always fine. - ;; - --*) - # Blank kernel and OS with real machine code file format is always fine. - ;; - *-*-*) - echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2 - exit 1 - ;; -esac - # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. -case $vendor in - unknown) - case $cpu-$os in - *-riscix*) +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) vendor=acorn ;; - *-sunos* | *-solaris*) + -sunos*) vendor=sun ;; - *-cnk* | *-aix*) + -cnk*|-aix*) vendor=ibm ;; - *-beos*) + -beos*) vendor=be ;; - *-hpux*) + -hpux*) vendor=hp ;; - *-mpeix*) + -mpeix*) vendor=hp ;; - *-hiux*) + -hiux*) vendor=hitachi ;; - *-unos*) + -unos*) vendor=crds ;; - *-dgux*) + -dgux*) vendor=dg ;; - *-luna*) + -luna*) vendor=omron ;; - *-genix*) + -genix*) vendor=ns ;; - *-clix*) - vendor=intergraph - ;; - *-mvs* | *-opened*) + -mvs* | -opened*) vendor=ibm ;; - *-os400*) + -os400*) vendor=ibm ;; - s390-* | s390x-*) - vendor=ibm - ;; - *-ptx*) + -ptx*) vendor=sequent ;; - *-tpf*) + -tpf*) vendor=ibm ;; - *-vxsim* | *-vxworks* | *-windiss*) + -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; - *-aux*) + -aux*) vendor=apple ;; - *-hms*) + -hms*) vendor=hitachi ;; - *-mpw* | *-macos*) + -mpw* | -macos*) vendor=apple ;; - *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; - *-vos*) + -vos*) vendor=stratus ;; esac + basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` ;; esac -echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}" +echo "$basic_machine$os" exit # Local variables: diff --git a/Engine/lib/lpng/configure b/Engine/lib/lpng/configure index f41863e0e..1b2c46366 100644 --- a/Engine/lib/lpng/configure +++ b/Engine/lib/lpng/configure @@ -1,12 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.72 for libpng 1.6.52. +# Generated by GNU Autoconf 2.69 for libpng 1.6.37. # # Report bugs to . # # -# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation, -# Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -17,65 +16,63 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else case e in #( - e) case `(set -o) 2>/dev/null` in #( +else + case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; -esac ;; esac fi - -# Reset variables that may have inherited troublesome values from -# the environment. - -# IFS needs to be set, to space, tab, and newline, in precisely that order. -# (If _AS_PATH_WALK were called with IFS unset, it would have the -# side effect of setting IFS to empty, thus disabling word splitting.) -# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -IFS=" "" $as_nl" - -PS1='$ ' -PS2='> ' -PS4='+ ' - -# Ensure predictable behavior from utilities with locale-dependent output. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# We cannot yet rely on "unset" to work, but we need these variables -# to be unset--not just set to an empty or harmless value--now, to -# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct -# also avoids known problems related to "unset" and subshell syntax -# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). -for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH -do eval test \${$as_var+y} \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done - -# Ensure that fds 0, 1, and 2 are open. -if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi -if (exec 3>&2) ; then :; else exec 2>/dev/null; fi +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi # The user is always right. -if ${PATH_SEPARATOR+false} :; then +if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -84,6 +81,13 @@ if ${PATH_SEPARATOR+false} :; then fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -92,27 +96,43 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - test -r "$as_dir$0" && as_myself=$as_dir$0 && break + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac -# We did not find ourselves, most probably we were run as 'sh COMMAND' +# We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. @@ -133,28 +153,26 @@ case $- in # (((( esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed 'exec'. -printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else case e in #( - e) case \`(set -o) 2>/dev/null\` in #( +else + case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; -esac ;; esac fi " @@ -169,16 +187,12 @@ as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ) -then : +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : -else case e in #( - e) exitcode=1; echo positional parameters were not saved. ;; -esac +else + exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 -blah=\$(echo \$(echo blah)) -test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO @@ -193,39 +207,30 @@ test \$(( 1 + 1 )) = 2 || exit 1 PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" - if (eval "$as_required") 2>/dev/null -then : + if (eval "$as_required") 2>/dev/null; then : as_have_required=yes -else case e in #( - e) as_have_required=no ;; -esac +else + as_have_required=no fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null -then : + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : -else case e in #( - e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. - as_shell=$as_dir$as_base + as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null -then : + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes - if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null -then : + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi @@ -233,22 +238,14 @@ fi esac as_found=false done -IFS=$as_save_IFS -if $as_found -then : - -else case e in #( - e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null -then : +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes -fi ;; -esac -fi +fi; } +IFS=$as_save_IFS - if test "x$CONFIG_SHELL" != x -then : + if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also @@ -265,28 +262,26 @@ case $- in # (((( esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed 'exec'. -printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi - if test x$as_have_required = xno -then : - printf "%s\n" "$0: This script requires a shell more modern than all" - printf "%s\n" "$0: the shells that I found on your system." - if test ${ZSH_VERSION+y} ; then - printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" - printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." else - printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and + $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: png-mng-implement@lists.sourceforge.net about your $0: system, including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 -fi ;; -esac +fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} @@ -307,7 +302,6 @@ as_fn_unset () } as_unset=as_fn_unset - # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -339,7 +333,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -348,7 +342,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -387,18 +381,16 @@ as_fn_executable_p () # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null -then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' -else case e in #( - e) as_fn_append () +else + as_fn_append () { eval $1=\$$1\$2 - } ;; -esac + } fi # as_fn_append # as_fn_arith ARG... @@ -406,18 +398,16 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null -then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else case e in #( - e) as_fn_arith () +else + as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` - } ;; -esac + } fi # as_fn_arith @@ -431,9 +421,9 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - printf "%s\n" "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -460,7 +450,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -493,8 +483,6 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits /[$]LINENO/= ' <$as_myself | sed ' - t clear - :clear s/[$]LINENO.*/&-/ t lineno b @@ -506,7 +494,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall @@ -520,10 +508,6 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits exit } - -# Determine whether it's possible to make 'echo' print without a newline. -# These variables are no longer used directly by Autoconf, but are AC_SUBSTed -# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -537,12 +521,6 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac -# For backward compatibility with old third-party macros, we provide -# the shell variables $as_echo and $as_echo_n. New code should use -# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. -as_echo='printf %s\n' -as_echo_n='printf %s' - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -554,9 +532,9 @@ if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: - # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. - # In both cases, we have to default to 'cp -pR'. + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then @@ -581,12 +559,10 @@ as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. -as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" -as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. -as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" -as_tr_sh="eval sed '$as_sed_sh'" # deprecated +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} @@ -614,58 +590,55 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libpng' PACKAGE_TARNAME='libpng' -PACKAGE_VERSION='1.6.52' -PACKAGE_STRING='libpng 1.6.52' +PACKAGE_VERSION='1.6.37' +PACKAGE_STRING='libpng 1.6.37' PACKAGE_BUGREPORT='png-mng-implement@lists.sourceforge.net' PACKAGE_URL='' ac_unique_file="pngget.c" # Factoring default headers for most tests. ac_includes_default="\ -#include -#ifdef HAVE_STDIO_H -# include +#include +#ifdef HAVE_SYS_TYPES_H +# include #endif -#ifdef HAVE_STDLIB_H +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS # include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif #endif #ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif # include #endif +#ifdef HAVE_STRINGS_H +# include +#endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif #ifdef HAVE_UNISTD_H # include #endif" -ac_header_c_list= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS -LIBOBJS -PNG_RISCV_RVV_FALSE -PNG_RISCV_RVV_TRUE -PNG_LOONGARCH_LSX_FALSE -PNG_LOONGARCH_LSX_TRUE PNG_POWERPC_VSX_FALSE PNG_POWERPC_VSX_TRUE PNG_INTEL_SSE_FALSE PNG_INTEL_SSE_TRUE -PNG_MIPS_MMI_FALSE -PNG_MIPS_MMI_TRUE PNG_MIPS_MSA_FALSE PNG_MIPS_MSA_TRUE PNG_ARM_NEON_FALSE @@ -692,11 +665,9 @@ HAVE_SOLARIS_LD_FALSE HAVE_SOLARIS_LD_TRUE HAVE_CLOCK_GETTIME_FALSE HAVE_CLOCK_GETTIME_TRUE +LIBOBJS +POW_LIB PNG_COPTS -ENABLE_TOOLS_FALSE -ENABLE_TOOLS_TRUE -ENABLE_TESTS_FALSE -ENABLE_TESTS_TRUE DFNCPP LT_SYS_LIBRARY_PATH OTOOL64 @@ -708,7 +679,6 @@ MANIFEST_TOOL RANLIB ac_ct_AR AR -FILECMD NM ac_ct_DUMPBIN DUMPBIN @@ -755,15 +725,10 @@ CC MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE -am__xargs_n -am__rm_f_notfound AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V -CSCOPE -ETAGS -CTAGS am__untar am__tar AMTAR @@ -806,7 +771,6 @@ infodir docdir oldincludedir includedir -runstatedir localstatedir sharedstatedir sysconfdir @@ -836,15 +800,11 @@ enable_dependency_tracking with_gnu_ld enable_shared enable_static -enable_pic with_pic enable_fast_install -enable_aix_soname with_aix_soname with_sysroot enable_libtool_lock -enable_tests -enable_tools enable_werror with_zlib_prefix with_pkgconfigdir @@ -856,11 +816,8 @@ enable_unversioned_libpng_config enable_hardware_optimizations enable_arm_neon enable_mips_msa -enable_mips_mmi enable_intel_sse enable_powerpc_vsx -enable_loongarch_lsx -enable_riscv_rvv ' ac_precious_vars='build_alias host_alias @@ -874,7 +831,6 @@ CCAS CCASFLAGS CPP LT_SYS_LIBRARY_PATH -AWK PNG_COPTS' @@ -914,7 +870,6 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -944,6 +899,8 @@ do *) ac_optarg=yes ;; esac + # Accept the important Cygnus configure options, so we can diagnose typos. + case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; @@ -984,9 +941,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: '$ac_useropt'" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1010,9 +967,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: '$ac_useropt'" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1165,15 +1122,6 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; - -runstatedir | --runstatedir | --runstatedi | --runstated \ - | --runstate | --runstat | --runsta | --runst | --runs \ - | --run | --ru | --r) - ac_prev=runstatedir ;; - -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ - | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ - | --run=* | --ru=* | --r=*) - runstatedir=$ac_optarg ;; - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1223,9 +1171,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: '$ac_useropt'" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1239,9 +1187,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: '$ac_useropt'" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1269,8 +1217,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error $? "unrecognized option: '$ac_option' -Try '$0 --help' for more information" + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) @@ -1278,16 +1226,16 @@ Try '$0 --help' for more information" # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: '$ac_envvar'" ;; + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; @@ -1303,7 +1251,7 @@ if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1311,7 +1259,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir runstatedir + libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1328,7 +1276,7 @@ do as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done -# There might be people who depend on the old broken behavior: '$host' +# There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias @@ -1367,7 +1315,7 @@ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_myself" | +$as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1396,7 +1344,7 @@ if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi -ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work" +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` @@ -1424,7 +1372,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -'configure' configures libpng 1.6.52 to adapt to many kinds of systems. +\`configure' configures libpng 1.6.37 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1438,11 +1386,11 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print 'checking ...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for '--cache-file=config.cache' + -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or '..'] + --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX @@ -1450,10 +1398,10 @@ Installation directories: --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] -By default, 'make install' will install all the files in -'$ac_default_prefix/bin', '$ac_default_prefix/lib' etc. You can specify -an installation prefix other than '$ac_default_prefix' using '--prefix', -for instance '--prefix=\$HOME'. +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. For better control, use the options below. @@ -1464,7 +1412,6 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1495,7 +1442,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libpng 1.6.52:";; + short | recursive ) echo "Configuration of libpng 1.6.37:";; esac cat <<\_ACEOF @@ -1514,17 +1461,9 @@ Optional Features: speeds up one-time build --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] - --enable-pic[=PKGS] try to use only PIC/non-PIC objects [default=use - both] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] - --enable-aix-soname=aix|svr4|both - shared library versioning (aka "SONAME") variant to - provide on AIX, [default=aix]. --disable-libtool-lock avoid locking (might break parallel builds) - --disable-tests do not build the test programs (default is to build) - --disable-tools do not build the auxiliary tools (default is to - build) --enable-werror[=OPT] Pass -Werror or the given argument to the compiler if it is supported --enable-unversioned-links @@ -1556,54 +1495,41 @@ Optional Features: default - use --disable-unversioned-libpng-config to change this. --enable-hardware-optimizations - Enable hardware optimizations: =no/off, yes/on. + Enable hardware optimizations: =no/off, yes/on: --enable-arm-neon Enable ARM NEON optimizations: =no/off, check, api, - yes/on. no/off: disable the optimizations; check: + yes/on: no/off: disable the optimizations; check: use internal checking code (deprecated and poorly supported); api: disable by default, enable by a call to png_set_option; yes/on: turn on unconditionally. If not specified: determined by the compiler. --enable-mips-msa Enable MIPS MSA optimizations: =no/off, check, api, - yes/on. no/off: disable the optimizations; check: + yes/on: no/off: disable the optimizations; check: use internal checking code (deprecated and poorly supported); api: disable by default, enable by a call to png_set_option; yes/on: turn on unconditionally. If not specified: determined by the compiler. - --enable-mips-mmi Enable MIPS MMI optimizations: =no/off, check, api, - yes/on. no/off: disable the optimizations; check: - use internal checking code (deprecated and poorly - supported); api: disable by default, enable by a - call to png_set_option; yes/on: turn on - unconditionally. If not specified: determined by the - compiler. - --enable-intel-sse Enable Intel SSE optimizations: =no/off, yes/on. + --enable-intel-sse Enable Intel SSE optimizations: =no/off, yes/on: no/off: disable the optimizations; yes/on: enable the optimizations. If not specified: determined by the compiler. --enable-powerpc-vsx Enable POWERPC VSX optimizations: =no/off, check, - api, yes/on. no/off: disable the optimizations; - check: use internal checking code; api: disable by - default, enable by a call to png_set_option; yes/on: - turn on unconditionally. If not specified: - determined by the compiler. - --enable-loongarch-lsx - Enable LOONGARCH LSX optimizations: =no/off, yes/on: - no/off: disable the optimizations; yes/on: turn on - unconditionally. If not specified: determined by the - compiler. - --enable-riscv-rvv Enable RISC-V Vector optimizations: =no/off, check, api, yes/on: no/off: disable the optimizations; check: use internal checking code api: disable by default, enable by a call to png_set_option yes/on: - turn on. If not specified: determined by the - compiler. + turn on unconditionally. If not specified: + determined by the compiler. Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use + both] + --with-aix-soname=aix|svr4|both + shared library versioning (aka "SONAME") variant to + provide on AIX, [default=aix]. --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-zlib-prefix prefix that may have been used in installed zlib @@ -1627,11 +1553,10 @@ Some influential environment variables: CPP C preprocessor LT_SYS_LIBRARY_PATH User-defined run-time library search path. - AWK AWK language processor - PNG_COPTS additional flags for the C compiler, to be used for options that + PNG_COPTS additional flags for the C compiler, use this for options that would cause configure itself to fail -Use these variables to override the choices made by 'configure' or to help +Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . @@ -1650,9 +1575,9 @@ if test "$ac_init_help" = "recursive"; then case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1680,8 +1605,7 @@ esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } - # Check for configure.gnu first; this name is used for a wrapper for - # Metaconfig's "Configure" on case-insensitive file systems. + # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive @@ -1689,7 +1613,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1698,10 +1622,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libpng configure 1.6.52 -generated by GNU Autoconf 2.72 +libpng configure 1.6.37 +generated by GNU Autoconf 2.69 -Copyright (C) 2023 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1718,14 +1642,14 @@ fi ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam + rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1733,19 +1657,17 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext -then : + } && test -s conftest.$ac_objext; then : ac_retval=0 -else case e in #( - e) printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 ;; -esac + ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval @@ -1764,7 +1686,7 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1772,19 +1694,17 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err - } -then : + }; then : ac_retval=0 -else case e in #( - e) printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 ;; -esac + ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval @@ -1797,14 +1717,14 @@ fi ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext + rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1812,22 +1732,20 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - } -then : + }; then : ac_retval=0 -else case e in #( - e) printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 ;; -esac + ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would @@ -1846,56 +1764,100 @@ fi ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" -else case e in #( - e) eval "$3=no" ;; -esac +else + eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (void); below. */ + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif -#include #undef $2 /* Override any GCC internal prototype to avoid an error. @@ -1904,7 +1866,7 @@ else case e in #( #ifdef __cplusplus extern "C" #endif -char $2 (void); +char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ @@ -1913,58 +1875,89 @@ choke me #endif int -main (void) +main () { return $2 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" -else case e in #( - e) eval "$3=no" ;; -esac +else + eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext ;; -esac +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func -ac_configure_args_raw= -for ac_arg -do - case $ac_arg in - *\'*) - ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append ac_configure_args_raw " '$ac_arg'" -done -case $ac_configure_args_raw in - *$as_nl*) - ac_safe_unquote= ;; - *) - ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. - ac_unsafe_a="$ac_unsafe_z#~" - ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" - ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; -esac +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_type cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libpng $as_me 1.6.52, which was -generated by GNU Autoconf 2.72. Invocation command line was +It was created by libpng $as_me 1.6.37, which was +generated by GNU Autoconf 2.69. Invocation command line was - $ $0$ac_configure_args_raw + $ $0 $@ _ACEOF exec 5>>config.log @@ -1997,12 +1990,8 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - printf "%s\n" "PATH: $as_dir" + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" done IFS=$as_save_IFS @@ -2037,7 +2026,7 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; @@ -2072,13 +2061,11 @@ done # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? - # Sanitize IFS. - IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo - printf "%s\n" "## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo @@ -2089,8 +2076,8 @@ trap 'exit_status=$? case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -2114,7 +2101,7 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ) echo - printf "%s\n" "## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo @@ -2122,14 +2109,14 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - printf "%s\n" "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - printf "%s\n" "## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo @@ -2137,15 +2124,15 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - printf "%s\n" "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - printf "%s\n" "## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo @@ -2153,8 +2140,8 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} echo fi test "$ac_signal" != 0 && - printf "%s\n" "$as_me: caught signal $ac_signal" - printf "%s\n" "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -2168,50 +2155,65 @@ ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h -printf "%s\n" "/* confdefs.h */" > confdefs.h +$as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. -printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF -printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF -printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF -printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF -printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF -printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_files="$CONFIG_SITE" + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then - ac_site_files="$prefix/share/config.site $prefix/etc/config.site" + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site else - ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi - -for ac_site_file in $ac_site_files +for ac_site_file in "$ac_site_file1" "$ac_site_file2" do - case $ac_site_file in #( - */*) : - ;; #( - *) : - ac_site_file=./$ac_site_file ;; -esac - if test -f "$ac_site_file" && test -r "$ac_site_file"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file -See 'config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } fi done @@ -2219,452 +2221,19 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -printf "%s\n" "$as_me: loading cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -printf "%s\n" "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi -# Test code for whether the C compiler supports C89 (global declarations) -ac_c_conftest_c89_globals=' -/* Does the compiler advertise C89 conformance? - Do not test the value of __STDC__, because some compilers set it to 0 - while being otherwise adequately conformant. */ -#if !defined __STDC__ -# error "Compiler does not advertise C89 conformance" -#endif - -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ -struct buf { int x; }; -struct buf * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (char **p, int i) -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* C89 style stringification. */ -#define noexpand_stringify(a) #a -const char *stringified = noexpand_stringify(arbitrary+token=sequence); - -/* C89 style token pasting. Exercises some of the corner cases that - e.g. old MSVC gets wrong, but not very hard. */ -#define noexpand_concat(a,b) a##b -#define expand_concat(a,b) noexpand_concat(a,b) -extern int vA; -extern int vbee; -#define aye A -#define bee B -int *pvA = &expand_concat(v,aye); -int *pvbee = &noexpand_concat(v,bee); - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not \xHH hex character constants. - These do not provoke an error unfortunately, instead are silently treated - as an "x". The following induces an error, until -std is added to get - proper ANSI mode. Curiously \x00 != x always comes out true, for an - array size at least. It is necessary to write \x00 == 0 to get something - that is true only with -std. */ -int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) '\''x'\'' -int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), - int, int);' - -# Test code for whether the C compiler supports C89 (body of main). -ac_c_conftest_c89_main=' -ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); -' - -# Test code for whether the C compiler supports C99 (global declarations) -ac_c_conftest_c99_globals=' -/* Does the compiler advertise C99 conformance? */ -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L -# error "Compiler does not advertise C99 conformance" -#endif - -// See if C++-style comments work. - -#include -extern int puts (const char *); -extern int printf (const char *, ...); -extern int dprintf (int, const char *, ...); -extern void *malloc (size_t); -extern void free (void *); - -// Check varargs macros. These examples are taken from C99 6.10.3.5. -// dprintf is used instead of fprintf to avoid needing to declare -// FILE and stderr. -#define debug(...) dprintf (2, __VA_ARGS__) -#define showlist(...) puts (#__VA_ARGS__) -#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) -static void -test_varargs_macros (void) -{ - int x = 1234; - int y = 5678; - debug ("Flag"); - debug ("X = %d\n", x); - showlist (The first, second, and third items.); - report (x>y, "x is %d but y is %d", x, y); -} - -// Check long long types. -#define BIG64 18446744073709551615ull -#define BIG32 4294967295ul -#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) -#if !BIG_OK - #error "your preprocessor is broken" -#endif -#if BIG_OK -#else - #error "your preprocessor is broken" -#endif -static long long int bignum = -9223372036854775807LL; -static unsigned long long int ubignum = BIG64; - -struct incomplete_array -{ - int datasize; - double data[]; -}; - -struct named_init { - int number; - const wchar_t *name; - double average; -}; - -typedef const char *ccp; - -static inline int -test_restrict (ccp restrict text) -{ - // Iterate through items via the restricted pointer. - // Also check for declarations in for loops. - for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) - continue; - return 0; -} - -// Check varargs and va_copy. -static bool -test_varargs (const char *format, ...) -{ - va_list args; - va_start (args, format); - va_list args_copy; - va_copy (args_copy, args); - - const char *str = ""; - int number = 0; - float fnumber = 0; - - while (*format) - { - switch (*format++) - { - case '\''s'\'': // string - str = va_arg (args_copy, const char *); - break; - case '\''d'\'': // int - number = va_arg (args_copy, int); - break; - case '\''f'\'': // float - fnumber = va_arg (args_copy, double); - break; - default: - break; - } - } - va_end (args_copy); - va_end (args); - - return *str && number && fnumber; -} -' - -# Test code for whether the C compiler supports C99 (body of main). -ac_c_conftest_c99_main=' - // Check bool. - _Bool success = false; - success |= (argc != 0); - - // Check restrict. - if (test_restrict ("String literal") == 0) - success = true; - char *restrict newvar = "Another string"; - - // Check varargs. - success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); - test_varargs_macros (); - - // Check flexible array members. - struct incomplete_array *ia = - malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); - ia->datasize = 10; - for (int i = 0; i < ia->datasize; ++i) - ia->data[i] = i * 1.234; - // Work around memory leak warnings. - free (ia); - - // Check named initializers. - struct named_init ni = { - .number = 34, - .name = L"Test wide string", - .average = 543.34343, - }; - - ni.number = 58; - - int dynamic_array[ni.number]; - dynamic_array[0] = argv[0][0]; - dynamic_array[ni.number - 1] = 543; - - // work around unused variable warnings - ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' - || dynamic_array[ni.number - 1] != 543); -' - -# Test code for whether the C compiler supports C11 (global declarations) -ac_c_conftest_c11_globals=' -/* Does the compiler advertise C11 conformance? */ -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L -# error "Compiler does not advertise C11 conformance" -#endif - -// Check _Alignas. -char _Alignas (double) aligned_as_double; -char _Alignas (0) no_special_alignment; -extern char aligned_as_int; -char _Alignas (0) _Alignas (int) aligned_as_int; - -// Check _Alignof. -enum -{ - int_alignment = _Alignof (int), - int_array_alignment = _Alignof (int[100]), - char_alignment = _Alignof (char) -}; -_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); - -// Check _Noreturn. -int _Noreturn does_not_return (void) { for (;;) continue; } - -// Check _Static_assert. -struct test_static_assert -{ - int x; - _Static_assert (sizeof (int) <= sizeof (long int), - "_Static_assert does not work in struct"); - long int y; -}; - -// Check UTF-8 literals. -#define u8 syntax error! -char const utf8_literal[] = u8"happens to be ASCII" "another string"; - -// Check duplicate typedefs. -typedef long *long_ptr; -typedef long int *long_ptr; -typedef long_ptr long_ptr; - -// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. -struct anonymous -{ - union { - struct { int i; int j; }; - struct { int k; long int l; } w; - }; - int m; -} v1; -' - -# Test code for whether the C compiler supports C11 (body of main). -ac_c_conftest_c11_main=' - _Static_assert ((offsetof (struct anonymous, i) - == offsetof (struct anonymous, w.k)), - "Anonymous union alignment botch"); - v1.i = 2; - v1.w.k = 5; - ok |= v1.i != 5; -' - -# Test code for whether the C compiler supports C11 (complete). -ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} -${ac_c_conftest_c99_globals} -${ac_c_conftest_c11_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - ${ac_c_conftest_c99_main} - ${ac_c_conftest_c11_main} - return ok; -} -" - -# Test code for whether the C compiler supports C99 (complete). -ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} -${ac_c_conftest_c99_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - ${ac_c_conftest_c99_main} - return ok; -} -" - -# Test code for whether the C compiler supports C89 (complete). -ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - return ok; -} -" - -as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" -as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" -as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" -as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" -as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" -as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" -as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" -as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" -as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" - -# Auxiliary files required by this configure script. -ac_aux_files="ltmain.sh config.guess config.sub compile missing install-sh" - -# Locations in which to look for auxiliary files. -ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.." - -# Search for a directory containing all of the required auxiliary files, -# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. -# If we don't find one directory that contains all the files we need, -# we report the set of missing files from the *first* directory in -# $ac_aux_dir_candidates and give up. -ac_missing_aux_files="" -ac_first_candidate=: -printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in $ac_aux_dir_candidates -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - as_found=: - - printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 - ac_aux_dir_found=yes - ac_install_sh= - for ac_aux in $ac_aux_files - do - # As a special case, if "install-sh" is required, that requirement - # can be satisfied by any of "install-sh", "install.sh", or "shtool", - # and $ac_install_sh is set appropriately for whichever one is found. - if test x"$ac_aux" = x"install-sh" - then - if test -f "${as_dir}install-sh"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 - ac_install_sh="${as_dir}install-sh -c" - elif test -f "${as_dir}install.sh"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 - ac_install_sh="${as_dir}install.sh -c" - elif test -f "${as_dir}shtool"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 - ac_install_sh="${as_dir}shtool install -c" - else - ac_aux_dir_found=no - if $ac_first_candidate; then - ac_missing_aux_files="${ac_missing_aux_files} install-sh" - else - break - fi - fi - else - if test -f "${as_dir}${ac_aux}"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 - else - ac_aux_dir_found=no - if $ac_first_candidate; then - ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" - else - break - fi - fi - fi - done - if test "$ac_aux_dir_found" = yes; then - ac_aux_dir="$as_dir" - break - fi - ac_first_candidate=false - - as_found=false -done -IFS=$as_save_IFS -if $as_found -then : - -else case e in #( - e) as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 ;; -esac -fi - - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -if test -f "${ac_aux_dir}config.guess"; then - ac_config_guess="$SHELL ${ac_aux_dir}config.guess" -fi -if test -f "${ac_aux_dir}config.sub"; then - ac_config_sub="$SHELL ${ac_aux_dir}config.sub" -fi -if test -f "$ac_aux_dir/configure"; then - ac_configure="$SHELL ${ac_aux_dir}configure" -fi - # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false @@ -2675,12 +2244,12 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5 -printf "%s\n" "$as_me: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5 -printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) @@ -2689,24 +2258,24 @@ printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;} ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5 -printf "%s\n" "$as_me: error: '$ac_var' has changed since the previous run:" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5 -printf "%s\n" "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: '$ac_old_val'" >&5 -printf "%s\n" "$as_me: former value: '$ac_old_val'" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: '$ac_new_val'" >&5 -printf "%s\n" "$as_me: current value: '$ac_new_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -2716,12 +2285,11 @@ printf "%s\n" "$as_me: current value: '$ac_new_val'" >&2;} fi done if $ac_cache_corrupted; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file' - and start over" "$LINENO" 5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2742,11 +2310,38 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # dist-xz requires automake 1.11 or later # 1.12.2 fixes a security issue in 1.11.2 and 1.12.1 # 1.13 is required for parallel tests -am__api_version='1.18' +am__api_version='1.16' + +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - # Find a good install program. We prefer a C program (faster), +# Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install @@ -2760,25 +2355,20 @@ am__api_version='1.18' # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -printf %s "checking for a BSD-compatible install... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test ${ac_cv_path_install+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - # Account for fact that we put trailing slashes in our PATH walk. -case $as_dir in #(( - ./ | /[cC]/* | \ + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; @@ -2788,13 +2378,13 @@ case $as_dir in #(( # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && - grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && - grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else @@ -2802,12 +2392,12 @@ case $as_dir in #(( echo one > conftest.one echo two > conftest.two mkdir conftest.dir - if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" && + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then - ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c" + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi @@ -2821,10 +2411,9 @@ esac IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir - ;; -esac + fi - if test ${ac_cv_path_install+y}; then + if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a @@ -2834,8 +2423,8 @@ fi INSTALL=$ac_install_sh fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -printf "%s\n" "$INSTALL" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -2845,181 +2434,18 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sleep supports fractional seconds" >&5 -printf %s "checking whether sleep supports fractional seconds... " >&6; } -if test ${am_cv_sleep_fractional_seconds+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if sleep 0.001 2>/dev/null -then : - am_cv_sleep_fractional_seconds=yes -else case e in #( - e) am_cv_sleep_fractional_seconds=no ;; -esac -fi - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_sleep_fractional_seconds" >&5 -printf "%s\n" "$am_cv_sleep_fractional_seconds" >&6; } - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking filesystem timestamp resolution" >&5 -printf %s "checking filesystem timestamp resolution... " >&6; } -if test ${am_cv_filesystem_timestamp_resolution+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) # Default to the worst case. -am_cv_filesystem_timestamp_resolution=2 - -# Only try to go finer than 1 sec if sleep can do it. -# Don't try 1 sec, because if 0.01 sec and 0.1 sec don't work, -# - 1 sec is not much of a win compared to 2 sec, and -# - it takes 2 seconds to perform the test whether 1 sec works. -# -# Instead, just use the default 2s on platforms that have 1s resolution, -# accept the extra 1s delay when using $sleep in the Automake tests, in -# exchange for not incurring the 2s delay for running the test for all -# packages. -# -am_try_resolutions= -if test "$am_cv_sleep_fractional_seconds" = yes; then - # Even a millisecond often causes a bunch of false positives, - # so just try a hundredth of a second. The time saved between .001 and - # .01 is not terribly consequential. - am_try_resolutions="0.01 0.1 $am_try_resolutions" -fi - -# In order to catch current-generation FAT out, we must *modify* files -# that already exist; the *creation* timestamp is finer. Use names -# that make ls -t sort them differently when they have equal -# timestamps than when they have distinct timestamps, keeping -# in mind that ls -t prints the *newest* file first. -rm -f conftest.ts? -: > conftest.ts1 -: > conftest.ts2 -: > conftest.ts3 - -# Make sure ls -t actually works. Do 'set' in a subshell so we don't -# clobber the current shell's arguments. (Outer-level square brackets -# are removed by m4; they're present so that m4 does not expand -# ; be careful, easy to get confused.) -if ( - set X `ls -t conftest.ts[12]` && - { - test "$*" != "X conftest.ts1 conftest.ts2" || - test "$*" != "X conftest.ts2 conftest.ts1"; - } -); then :; else - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - printf "%s\n" ""Bad output from ls -t: \"`ls -t conftest.ts[12]`\""" >&5 - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} -as_fn_error $? "ls -t produces unexpected output. -Make sure there is not a broken ls alias in your environment. -See 'config.log' for more details" "$LINENO" 5; } -fi - -for am_try_res in $am_try_resolutions; do - # Any one fine-grained sleep might happen to cross the boundary - # between two values of a coarser actual resolution, but if we do - # two fine-grained sleeps in a row, at least one of them will fall - # entirely within a coarse interval. - echo alpha > conftest.ts1 - sleep $am_try_res - echo beta > conftest.ts2 - sleep $am_try_res - echo gamma > conftest.ts3 - - # We assume that 'ls -t' will make use of high-resolution - # timestamps if the operating system supports them at all. - if (set X `ls -t conftest.ts?` && - test "$2" = conftest.ts3 && - test "$3" = conftest.ts2 && - test "$4" = conftest.ts1); then - # - # Ok, ls -t worked. If we're at a resolution of 1 second, we're done, - # because we don't need to test make. - make_ok=true - if test $am_try_res != 1; then - # But if we've succeeded so far with a subsecond resolution, we - # have one more thing to check: make. It can happen that - # everything else supports the subsecond mtimes, but make doesn't; - # notably on macOS, which ships make 3.81 from 2006 (the last one - # released under GPLv2). https://bugs.gnu.org/68808 - # - # We test $MAKE if it is defined in the environment, else "make". - # It might get overridden later, but our hope is that in practice - # it does not matter: it is the system "make" which is (by far) - # the most likely to be broken, whereas if the user overrides it, - # probably they did so with a better, or at least not worse, make. - # https://lists.gnu.org/archive/html/automake/2024-06/msg00051.html - # - # Create a Makefile (real tab character here): - rm -f conftest.mk - echo 'conftest.ts1: conftest.ts2' >conftest.mk - echo ' touch conftest.ts2' >>conftest.mk - # - # Now, running - # touch conftest.ts1; touch conftest.ts2; make - # should touch ts1 because ts2 is newer. This could happen by luck, - # but most often, it will fail if make's support is insufficient. So - # test for several consecutive successes. - # - # (We reuse conftest.ts[12] because we still want to modify existing - # files, not create new ones, per above.) - n=0 - make=${MAKE-make} - until test $n -eq 3; do - echo one > conftest.ts1 - sleep $am_try_res - echo two > conftest.ts2 # ts2 should now be newer than ts1 - if $make -f conftest.mk | grep 'up to date' >/dev/null; then - make_ok=false - break # out of $n loop - fi - n=`expr $n + 1` - done - fi - # - if $make_ok; then - # Everything we know to check worked out, so call this resolution good. - am_cv_filesystem_timestamp_resolution=$am_try_res - break # out of $am_try_res loop - fi - # Otherwise, we'll go on to check the next resolution. - fi -done -rm -f conftest.ts? -# (end _am_filesystem_timestamp_resolution) - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_filesystem_timestamp_resolution" >&5 -printf "%s\n" "$am_cv_filesystem_timestamp_resolution" >&6; } - -# This check should not be cached, as it may vary across builds of -# different projects. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -printf %s "checking whether build environment is sane... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac @@ -3028,45 +2454,49 @@ esac # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). -am_build_env_is_sane=no -am_has_slept=no -rm -f conftest.file -for am_try in 1 2; do - echo "timestamp, slept: $am_has_slept" > conftest.file - if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - test "$2" = conftest.file - ); then - am_build_env_is_sane=yes - break - fi - # Just in case. - sleep "$am_cv_filesystem_timestamp_resolution" - am_has_slept=yes -done +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_build_env_is_sane" >&5 -printf "%s\n" "$am_build_env_is_sane" >&6; } -if test "$am_build_env_is_sane" = no; then - as_fn_error $? "newly created file is older than distributed files! + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= -if test -e conftest.file || grep 'slept: no' conftest.file >/dev/null 2>&1 -then : - -else case e in #( - e) ( sleep "$am_cv_filesystem_timestamp_resolution" ) & +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & am_sleep_pid=$! - ;; -esac fi rm -f conftest.file @@ -3077,25 +2507,28 @@ test "$program_prefix" != NONE && test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. -# By default was 's,x,x', remove it if useless. +# By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"` - +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` - - if test x"${MISSING+set}" != xset; then - MISSING="\${SHELL} '$am_aux_dir/missing'" +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 -printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then @@ -3115,44 +2548,38 @@ if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_STRIP+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$STRIP"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -printf "%s\n" "$STRIP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3161,44 +2588,38 @@ if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_STRIP+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_STRIP"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -printf "%s\n" "$ac_ct_STRIP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then @@ -3206,8 +2627,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP @@ -3219,110 +2640,98 @@ fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5 -printf %s "checking for a race-free mkdir -p... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then - if test ${ac_cv_path_mkdir+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do - as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue - case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir ('*'coreutils) '* | \ - *'BusyBox '* | \ + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS - ;; -esac + fi test -d ./--version && rmdir ./--version - if test ${ac_cv_path_mkdir+y}; then + if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else - # As a last resort, use plain mkdir -p, - # in the hope it doesn't have the bugs of ancient mkdir. - MKDIR_P='mkdir -p' + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -printf "%s\n" "$MKDIR_P" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_AWK+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$AWK"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -printf "%s\n" "$AWK" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi test -n "$AWK" && break done -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} -ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval test \${ac_cv_prog_make_${ac_make}_set+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) cat >conftest.make <<\_ACEOF +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' @@ -3334,16 +2743,15 @@ case `${MAKE-make} -f conftest.make 2>/dev/null` in *) eval ac_cv_prog_make_${ac_make}_set=no;; esac -rm -f conftest.make ;; -esac +rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } SET_MAKE= else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -3356,21 +2764,23 @@ else fi rmdir .tst 2>/dev/null -AM_DEFAULT_VERBOSITY=1 # Check whether --enable-silent-rules was given. -if test ${enable_silent_rules+y} -then : +if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; +esac am_make=${MAKE-make} -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -printf %s "checking whether $am_make supports nested variables... " >&6; } -if test ${am_cv_make_support_nested_variables+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if printf "%s\n" 'TRUE=$(BAR$(V)) +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 @@ -3380,50 +2790,19 @@ am__doit: am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no -fi ;; -esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi AM_BACKSLASH='\' -am__rm_f_notfound= -if (rm -f && rm -fr && rm -rf) 2>/dev/null -then : - -else case e in #( - e) am__rm_f_notfound='""' ;; -esac -fi - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking xargs -n works" >&5 -printf %s "checking xargs -n works... " >&6; } -if test ${am_cv_xargs_n_works+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test "`echo 1 2 3 | xargs -n2 echo`" = "1 2 -3" -then : - am_cv_xargs_n_works=yes -else case e in #( - e) am_cv_xargs_n_works=no ;; -esac -fi ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_xargs_n_works" >&5 -printf "%s\n" "$am_cv_xargs_n_works" >&6; } -if test "$am_cv_xargs_n_works" = yes -then : - am__xargs_n='xargs -n' -else case e in #( - e) am__xargs_n='am__xargs_n () { shift; sed "s/ /\\n/g" | while read am__xargs_n_arg; do "" "$am__xargs_n_arg"; done; }' - ;; -esac -fi - if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." @@ -3446,13 +2825,17 @@ fi # Define the identity of the package. PACKAGE='libpng' - VERSION='1.6.52' + VERSION='1.6.37' -printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF -printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF # Some tools Automake needs. @@ -3484,174 +2867,72 @@ AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. -_am_tools='gnutar plaintar pax cpio none' +_am_tools='gnutar pax cpio none' -# The POSIX 1988 'ustar' format is defined with fixed-size fields. - # There is notably a 21 bits limit for the UID and the GID. In fact, - # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 - # and bug#13588). - am_max_uid=2097151 # 2^21 - 1 - am_max_gid=$am_max_uid - # The $UID and $GID variables are not portable, so we need to resort - # to the POSIX-mandated id(1) utility. Errors in the 'id' calls - # below are definitely unexpected, so allow the users to see them - # (that is, avoid stderr redirection). - am_uid=`id -u || echo unknown` - am_gid=`id -g || echo unknown` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5 -printf %s "checking whether UID '$am_uid' is supported by ustar format... " >&6; } - if test x$am_uid = xunknown; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: ancient id detected; assuming current UID is ok, but dist-ustar might not work" >&5 -printf "%s\n" "$as_me: WARNING: ancient id detected; assuming current UID is ok, but dist-ustar might not work" >&2;} - elif test $am_uid -le $am_max_uid; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - _am_tools=none - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5 -printf %s "checking whether GID '$am_gid' is supported by ustar format... " >&6; } - if test x$gm_gid = xunknown; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: ancient id detected; assuming current GID is ok, but dist-ustar might not work" >&5 -printf "%s\n" "$as_me: WARNING: ancient id detected; assuming current GID is ok, but dist-ustar might not work" >&2;} - elif test $am_gid -le $am_max_gid; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - _am_tools=none - fi +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 -printf %s "checking how to create a ustar tar archive... " >&6; } - # Go ahead even if we have the value already cached. We do so because we - # need to set the values for the 'am__tar' and 'am__untar' variables. - _am_tools=${am_cv_prog_tar_ustar-$_am_tools} - for _am_tool in $_am_tools; do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; do - { echo "$as_me:$LINENO: $_am_tar --version" >&5 - ($_am_tar --version) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && break - done - am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x ustar -w "$$tardir"' - am__tar_='pax -L -x ustar -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H ustar -L' - am__tar_='find "$tardir" -print | cpio -o -H ustar -L' - am__untar='cpio -i -H ustar -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_ustar}" && break - # tar/untar a dummy directory, and stop if the command works. - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 - (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - rm -rf conftest.dir - if test -s conftest.tar; then - { echo "$as_me:$LINENO: $am__untar &5 - ($am__untar &5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - { echo "$as_me:$LINENO: cat conftest.dir/file" >&5 - (cat conftest.dir/file) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - grep GrepMe conftest.dir/file >/dev/null 2>&1 && break - fi - done - rm -rf conftest.dir - if test ${am_cv_prog_tar_ustar+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) am_cv_prog_tar_ustar=$_am_tool ;; -esac +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 -printf "%s\n" "$am_cv_prog_tar_ustar" >&6; } - - - - - -# Variables for tags utilities; see am/tags.am -if test -z "$CTAGS"; then - CTAGS=ctags -fi - -if test -z "$ETAGS"; then - ETAGS=etags -fi - -if test -z "$CSCOPE"; then - CSCOPE=cscope -fi - - - - - - - # The following line causes --disable-maintainer-mode to be the default to # configure. This is necessary because libpng distributions cannot rely on the # time stamps of the autotools generated files being correct -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 -printf %s "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. -if test ${enable_maintainer_mode+y} -then : +if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval -else case e in #( - e) USE_MAINTAINER_MODE=no ;; -esac +else + USE_MAINTAINER_MODE=no fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 -printf "%s\n" "$USE_MAINTAINER_MODE" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' @@ -3665,32 +2946,23 @@ fi -PNGLIB_VERSION=1.6.52 +PNGLIB_VERSION=1.6.37 PNGLIB_MAJOR=1 PNGLIB_MINOR=6 -PNGLIB_RELEASE=52 +PNGLIB_RELEASE=37 ac_config_headers="$ac_config_headers config.h" -# Check the basic programs. +# Checks for programs. ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - - - - - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3699,44 +2971,38 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$CC"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3745,44 +3011,38 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_CC"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -3790,8 +3050,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -3804,44 +3064,38 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$CC"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3850,13 +3104,12 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$CC"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no @@ -3864,19 +3117,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3892,19 +3141,18 @@ if test $ac_prog_rejected = yes; then # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi -fi ;; -esac +fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3915,44 +3163,38 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$CC"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3965,44 +3207,38 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_CC"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4014,8 +3250,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -4023,131 +3259,25 @@ esac fi fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. -set dummy ${ac_tool_prefix}clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi ;; -esac -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "clang", so it can be a program name with args. -set dummy clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi ;; -esac -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -fi - - -test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH -See 'config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion -version; do +for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -4157,7 +3287,7 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -4165,7 +3295,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -4177,9 +3307,9 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -printf %s "checking whether the C compiler works... " >&6; } -ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" @@ -4200,14 +3330,13 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : - # Autoconf-2.13 could set the ac_cv_exeext variable to 'no'. -# So ignore a value of 'no', otherwise this would lead to 'EXEEXT = no' + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. @@ -4222,12 +3351,12 @@ do # certainly right. break;; *.* ) - if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an '-o' + # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. @@ -4238,52 +3367,48 @@ do done test "$ac_cv_exeext" = no && ac_cv_exeext= -else case e in #( - e) ac_file='' ;; -esac +else + ac_file='' fi -if test -z "$ac_file" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -printf "%s\n" "$as_me: failed program was:" >&5 +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables -See 'config.log' for more details" "$LINENO" 5; } -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } ;; -esac +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -printf %s "checking for C compiler default output file name... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -printf "%s\n" "$ac_file" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -printf %s "checking for suffix of executables... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : - # If both 'conftest.exe' and 'conftest' are 'present' (well, observable) -# catch 'conftest.exe'. For instance with Cygwin, 'ls conftest' will -# work properly (i.e., refer to 'conftest.exe'), while it won't with -# 'rm'. + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in @@ -4293,16 +3418,15 @@ for ac_file in conftest.exe conftest conftest.*; do * ) break;; esac done -else case e in #( - e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See 'config.log' for more details" "$LINENO" 5; } ;; -esac +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -printf "%s\n" "$ac_cv_exeext" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext @@ -4311,11 +3435,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { FILE *f = fopen ("conftest.out", "w"); - if (!f) - return 1; return ferror (f) || fclose (f) != 0; ; @@ -4325,8 +3447,8 @@ _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -printf %s "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in @@ -4334,10 +3456,10 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in @@ -4345,41 +3467,39 @@ printf "%s\n" "$ac_try_echo"; } >&5 *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} -as_fn_error 77 "cannot run C compiled programs. -If you meant to cross compile, use '--host'. -See 'config.log' for more details" "$LINENO" 5; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } fi fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -printf "%s\n" "$cross_compiling" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } -rm -f conftest.$ac_ext conftest$ac_cv_exeext \ - conftest.o conftest.obj conftest.out +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -printf %s "checking for suffix of object files... " >&6; } -if test ${ac_cv_objext+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -4393,12 +3513,11 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in @@ -4407,34 +3526,31 @@ then : break;; esac done -else case e in #( - e) printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile -See 'config.log' for more details" "$LINENO" 5; } ;; -esac +See \`config.log' for more details" "$LINENO" 5; } fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext ;; -esac +rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -printf "%s\n" "$ac_cv_objext" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 -printf %s "checking whether the compiler supports GNU C... " >&6; } -if test ${ac_cv_c_compiler_gnu+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { #ifndef __GNUC__ choke me @@ -4444,36 +3560,30 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes -else case e in #( - e) ac_compiler_gnu=no ;; -esac +else + ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } -ac_compiler_gnu=$ac_cv_c_compiler_gnu +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+y} +ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -printf %s "checking whether $CC accepts -g... " >&6; } -if test ${ac_cv_prog_cc_g+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_save_c_werror_flag=$ac_c_werror_flag +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" @@ -4481,63 +3591,57 @@ else case e in #( /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes -else case e in #( - e) CFLAGS="" +else + CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -else case e in #( - e) ac_c_werror_flag=$ac_save_c_werror_flag +else + ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag ;; -esac +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -printf "%s\n" "$ac_cv_prog_cc_g" >&6; } -if test $ac_test_CFLAGS; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -4552,153 +3656,94 @@ else CFLAGS= fi fi -ac_prog_cc_stdc=no -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 -printf %s "checking for $CC option to enable C11 features... " >&6; } -if test ${ac_cv_prog_cc_c11+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_cv_prog_cc_c11=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_c_conftest_c11_program -_ACEOF -for ac_arg in '' -std=gnu11 -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c11=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c11" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC ;; -esac -fi +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} -if test "x$ac_cv_prog_cc_c11" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else case e in #( - e) if test "x$ac_cv_prog_cc_c11" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 -printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } - CC="$CC $ac_cv_prog_cc_c11" ;; -esac -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 - ac_prog_cc_stdc=c11 ;; -esac -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 -printf %s "checking for $CC option to enable C99 features... " >&6; } -if test ${ac_cv_prog_cc_c99+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_cv_prog_cc_c99=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c99_program -_ACEOF -for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c99=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c99" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC ;; -esac -fi +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; -if test "x$ac_cv_prog_cc_c99" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else case e in #( - e) if test "x$ac_cv_prog_cc_c99" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 -printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } - CC="$CC $ac_cv_prog_cc_c99" ;; -esac -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 - ac_prog_cc_stdc=c99 ;; -esac -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 -printf %s "checking for $CC option to enable C89 features... " >&6; } -if test ${ac_cv_prog_cc_c89+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c89_program +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext conftest.beam +rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC ;; -esac -fi +CC=$ac_save_CC -if test "x$ac_cv_prog_cc_c89" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else case e in #( - e) if test "x$ac_cv_prog_cc_c89" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } - CC="$CC $ac_cv_prog_cc_c89" ;; -esac fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 - ac_prog_cc_stdc=c89 ;; +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac -fi +if test "x$ac_cv_prog_cc_c89" != xno; then : + fi ac_ext=c @@ -4707,23 +3752,21 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - - ac_ext=c +ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 -printf %s "checking whether $CC understands -c and -o together... " >&6; } -if test ${am_cv_prog_cc_c_o+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -4748,15 +3791,11 @@ _ACEOF break fi done - # aligned with autoconf, so not including core; see bug#72225. - rm -f -r a.out a.exe b.out conftest.$ac_ext conftest.$ac_objext \ - conftest.dSYM conftest1.$ac_ext conftest1.$ac_objext conftest1.dSYM \ - conftest2.$ac_ext conftest2.$ac_objext conftest2.dSYM - unset am_i ;; -esac + rm -f core conftest* + unset am_i fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 -printf "%s\n" "$am_cv_prog_cc_c_o" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. @@ -4775,8 +3814,8 @@ DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 -printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 +$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out @@ -4812,12 +3851,11 @@ esac fi done rm -f confinc.* confmf.* -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 -printf "%s\n" "${_am_result}" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 +$as_echo "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. -if test ${enable_dependency_tracking+y} -then : +if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi @@ -4838,13 +3876,12 @@ fi depcc="$CC" am_compiler_list= -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -printf %s "checking dependency style of $depcc... " >&6; } -if test ${am_cv_CC_dependencies_compiler_type+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up @@ -4931,7 +3968,7 @@ else case e in #( # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thus: + # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported @@ -4948,11 +3985,10 @@ else case e in #( else am_cv_CC_dependencies_compiler_type=none fi - ;; -esac + fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if @@ -4975,13 +4011,12 @@ test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS depcc="$CCAS" am_compiler_list= -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -printf %s "checking dependency style of $depcc... " >&6; } -if test ${am_cv_CCAS_dependencies_compiler_type+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CCAS_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up @@ -5066,7 +4101,7 @@ else case e in #( # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thus: + # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported @@ -5083,11 +4118,10 @@ else case e in #( else am_cv_CCAS_dependencies_compiler_type=none fi - ;; -esac + fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5 -printf "%s\n" "$am_cv_CCAS_dependencies_compiler_type" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; } CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type if @@ -5101,30 +4135,26 @@ else fi +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - - # Make sure we can run config.sub. -$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -printf %s "checking build system type... " >&6; } -if test ${ac_cv_build+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_build_alias=$build_alias +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 - ;; -esac +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -printf "%s\n" "$ac_cv_build" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; @@ -5143,23 +4173,21 @@ IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -printf %s "checking host system type... " >&6; } -if test ${ac_cv_host+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test "x$host_alias" = x; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else - ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || - as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi - ;; -esac + fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -printf "%s\n" "$ac_cv_host" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; @@ -5178,13 +4206,12 @@ IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -printf %s "checking for a sed that does not truncate output... " >&6; } -if test ${ac_cv_path_SED+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done @@ -5197,31 +4224,25 @@ else case e in #( for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in sed gsed - do + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir$ac_prog$ac_exec_ext" + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in #( +case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -#( *) ac_count=0 - printf %s 0123456789 >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - printf "%s\n" '' >> "conftest.nl" + $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -5247,11 +4268,10 @@ IFS=$as_save_IFS else ac_cv_path_SED=$SED fi - ;; -esac + fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -printf "%s\n" "$ac_cv_path_SED" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed @@ -5268,44 +4288,37 @@ Xsed="$SED -e 1s/^X//" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -printf %s "checking for grep that handles long lines and -e... " >&6; } -if test ${ac_cv_path_GREP+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -z "$GREP"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in grep ggrep - do + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in #( +case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -#( *) ac_count=0 - printf %s 0123456789 >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - printf "%s\n" 'GREP' >> "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -5331,21 +4344,19 @@ IFS=$as_save_IFS else ac_cv_path_GREP=$GREP fi - ;; -esac + fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -printf "%s\n" "$ac_cv_path_GREP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -printf %s "checking for egrep... " >&6; } -if test ${ac_cv_path_EGREP+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then @@ -5355,31 +4366,25 @@ else case e in #( for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in egrep - do + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in #( +case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -#( *) ac_count=0 - printf %s 0123456789 >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - printf "%s\n" 'EGREP' >> "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -5406,23 +4411,19 @@ else ac_cv_path_EGREP=$EGREP fi - fi ;; -esac + fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -printf "%s\n" "$ac_cv_path_EGREP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" - EGREP_TRADITIONAL=$EGREP - ac_cv_path_EGREP_TRADITIONAL=$EGREP -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -printf %s "checking for fgrep... " >&6; } -if test ${ac_cv_path_FGREP+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +$as_echo_n "checking for fgrep... " >&6; } +if ${ac_cv_path_FGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then @@ -5432,31 +4433,25 @@ else case e in #( for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in fgrep - do + test -z "$as_dir" && as_dir=. + for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext" + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in #( +case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -#( *) ac_count=0 - printf %s 0123456789 >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - printf "%s\n" 'FGREP' >> "conftest.nl" + $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -5483,11 +4478,10 @@ else ac_cv_path_FGREP=$FGREP fi - fi ;; -esac + fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -printf "%s\n" "$ac_cv_path_FGREP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +$as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" @@ -5513,8 +4507,8 @@ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -printf %s "checking how to print strings... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +$as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then @@ -5540,12 +4534,12 @@ func_echo_all () } case $ECHO in - printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -printf "%s\n" "printf" >&6; } ;; - print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -printf "%s\n" "print -r" >&6; } ;; - *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -printf "%s\n" "cat" >&6; } ;; + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +$as_echo "printf" >&6; } ;; + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; esac @@ -5564,21 +4558,19 @@ esac # Check whether --with-gnu-ld was given. -if test ${with_gnu_ld+y} -then : +if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else case e in #( - e) with_gnu_ld=no ;; -esac +else + with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -printf %s "checking for ld used by $CC... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } case $host in - *-*-mingw* | *-*-windows*) + *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) @@ -5605,17 +4597,16 @@ printf %s "checking for ld used by $CC... " >&6; } ;; esac elif test yes = "$with_gnu_ld"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -printf %s "checking for GNU ld... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -printf %s "checking for non-GNU ld... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } fi -if test ${lt_cv_path_LD+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -z "$LD"; then +if ${lt_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs @@ -5638,26 +4629,24 @@ else case e in #( IFS=$lt_save_ifs else lt_cv_path_LD=$LD # Let the user override the test with a path. -fi ;; -esac +fi fi LD=$lt_cv_path_LD if test -n "$LD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -printf "%s\n" "$LD" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +$as_echo "$LD" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -printf %s "checking if the linker ($LD) is GNU ld... " >&6; } -if test ${lt_cv_prog_gnu_ld+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) # I'd rather use --version here, but apparently some GNU lds only accept -v. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${lt_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &1 &5 -printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld @@ -5685,39 +4673,42 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -printf %s "checking how to run the C preprocessor... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test ${ac_cv_prog_CPP+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) # Double quotes because $CC needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#ifdef __STDC__ +# include +#else +# include +#endif Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : +if ac_fn_c_try_cpp "$LINENO"; then : -else case e in #( - e) # Broken: fails on valid input. -continue ;; -esac +else + # Broken: fails on valid input. +continue fi rm -f conftest.err conftest.i conftest.$ac_ext @@ -5727,56 +4718,56 @@ rm -f conftest.err conftest.i conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue -else case e in #( - e) # Passes both tests. +else + # Passes both tests. ac_preproc_ok=: -break ;; -esac +break fi rm -f conftest.err conftest.i conftest.$ac_ext done -# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok -then : +if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP - ;; -esac + fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -printf "%s\n" "$CPP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#ifdef __STDC__ +# include +#else +# include +#endif Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : +if ac_fn_c_try_cpp "$LINENO"; then : -else case e in #( - e) # Broken: fails on valid input. -continue ;; -esac +else + # Broken: fails on valid input. +continue fi rm -f conftest.err conftest.i conftest.$ac_ext @@ -5786,30 +4777,26 @@ rm -f conftest.err conftest.i conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue -else case e in #( - e) # Passes both tests. +else + # Passes both tests. ac_preproc_ok=: -break ;; -esac +break fi rm -f conftest.err conftest.i conftest.$ac_ext done -# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok -then : +if $ac_preproc_ok; then : -else case e in #( - e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See 'config.log' for more details" "$LINENO" 5; } ;; -esac +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -5822,44 +4809,38 @@ for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_AWK+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$AWK"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -printf "%s\n" "$AWK" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5867,26 +4848,25 @@ fi done -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -printf %s "checking whether ln -s works... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -printf "%s\n" "no, using $LN_S" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} -ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval test \${ac_cv_prog_make_${ac_make}_set+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) cat >conftest.make <<\_ACEOF +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' @@ -5898,31 +4878,29 @@ case `${MAKE-make} -f conftest.make 2>/dev/null` in *) eval ac_cv_prog_make_${ac_make}_set=no;; esac -rm -f conftest.make ;; -esac +rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } SET_MAKE= else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi case `pwd` in *\ * | *\ *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac -macro_version='2.5.4' -macro_revision='2.5.4' - +macro_version='2.4.6' +macro_revision='2.4.6' @@ -5955,13 +4933,12 @@ delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test ${lt_cv_path_NM+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$NM"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if ${lt_cv_path_NM+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else @@ -5982,16 +4959,16 @@ else # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in - mingw* | windows*) lt_bad_file=conftest.nm/nofile ;; + mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in + case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) - case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 @@ -6008,11 +4985,10 @@ else IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} -fi ;; -esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -printf "%s\n" "$lt_cv_path_NM" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 +$as_echo "$lt_cv_path_NM" >&6; } if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else @@ -6025,44 +5001,38 @@ else do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_DUMPBIN+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$DUMPBIN"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -printf "%s\n" "$DUMPBIN" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6075,44 +5045,38 @@ if test -z "$DUMPBIN"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_DUMPBIN+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_DUMPBIN"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -printf "%s\n" "$ac_ct_DUMPBIN" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6124,15 +5088,15 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; @@ -6153,13 +5117,12 @@ test -z "$NM" && NM=nm -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -printf %s "checking the name lister ($NM) interface... " >&6; } -if test ${lt_cv_nm_interface+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_nm_interface="BSD nm" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +$as_echo_n "checking the name lister ($NM) interface... " >&6; } +if ${lt_cv_nm_interface+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) @@ -6172,20 +5135,18 @@ else case e in #( if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi - rm -f conftest* ;; -esac + rm -f conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -printf "%s\n" "$lt_cv_nm_interface" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } # find the maximum length of command line arguments -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -printf %s "checking the maximum length of command line arguments... " >&6; } -if test ${lt_cv_sys_max_cmd_len+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) i=0 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 +$as_echo_n "checking the maximum length of command line arguments... " >&6; } +if ${lt_cv_sys_max_cmd_len+:} false; then : + $as_echo_n "(cached) " >&6 +else + i=0 teststring=ABCD case $build_os in @@ -6197,14 +5158,14 @@ else case e in #( lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; - gnu* | ironclad*) - # Under GNU Hurd and Ironclad, this test is not required because there - # is no limit to the length of command line arguments. + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; - cygwin* | mingw* | windows* | cegcc*) + cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, @@ -6226,7 +5187,7 @@ else case e in #( lt_cv_sys_max_cmd_len=8192; ;; - darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) + bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -6269,7 +5230,7 @@ else case e in #( sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[ ]//'` + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi @@ -6307,16 +5268,15 @@ else case e in #( fi ;; esac - ;; -esac + fi if test -n "$lt_cv_sys_max_cmd_len"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 +$as_echo "$lt_cv_sys_max_cmd_len" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 -printf "%s\n" "none" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len @@ -6360,16 +5320,15 @@ esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -printf %s "checking how to convert $build file names to $host format... " >&6; } -if test ${lt_cv_to_host_file_cmd+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) case $host in +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if ${lt_cv_to_host_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $host in *-*-mingw* ) case $build in - *-*-mingw* | *-*-windows* ) # actually msys + *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) @@ -6382,7 +5341,7 @@ else case e in #( ;; *-*-cygwin* ) case $build in - *-*-mingw* | *-*-windows* ) # actually msys + *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) @@ -6397,58 +5356,53 @@ else case e in #( lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac - ;; -esac + fi to_host_file_cmd=$lt_cv_to_host_file_cmd -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -printf %s "checking how to convert $build file names to toolchain format... " >&6; } -if test ${lt_cv_to_tool_file_cmd+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) #assume ordinary cross tools, or native build. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if ${lt_cv_to_tool_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in - *-*-mingw* | *-*-windows* ) + *-*-mingw* ) case $build in - *-*-mingw* | *-*-windows* ) # actually msys + *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac - ;; -esac + fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -printf %s "checking for $LD option to reload object files... " >&6; } -if test ${lt_cv_ld_reload_flag+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_ld_reload_flag='-r' ;; -esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if ${lt_cv_ld_reload_flag+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_reload_flag='-r' fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -printf "%s\n" "$lt_cv_ld_reload_flag" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; @@ -6456,7 +5410,7 @@ case $reload_flag in esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in - cygwin* | mingw* | windows* | pw32* | cegcc*) + cygwin* | mingw* | pw32* | cegcc*) if test yes != "$GCC"; then reload_cmds=false fi @@ -6478,97 +5432,41 @@ esac -# Extract the first word of "file", so it can be a program name with args. -set dummy file; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_FILECMD+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$FILECMD"; then - ac_cv_prog_FILECMD="$FILECMD" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_FILECMD="file" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_FILECMD" && ac_cv_prog_FILECMD=":" -fi ;; -esac -fi -FILECMD=$ac_cv_prog_FILECMD -if test -n "$FILECMD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FILECMD" >&5 -printf "%s\n" "$FILECMD" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - - - - - - if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_OBJDUMP+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$OBJDUMP"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -printf "%s\n" "$OBJDUMP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6577,44 +5475,38 @@ if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_OBJDUMP+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_OBJDUMP"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -printf "%s\n" "$ac_ct_OBJDUMP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then @@ -6622,8 +5514,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP @@ -6639,13 +5531,12 @@ test -z "$OBJDUMP" && OBJDUMP=objdump -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -printf %s "checking how to recognize dependent libraries... " >&6; } -if test ${lt_cv_deplibs_check_method+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_file_magic_cmd='$MAGIC_CMD' +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 +$as_echo_n "checking how to recognize dependent libraries... " >&6; } +if ${lt_cv_deplibs_check_method+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support @@ -6653,6 +5544,7 @@ lt_cv_deplibs_check_method='unknown' # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure @@ -6669,7 +5561,7 @@ beos*) bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='$FILECMD -L' + lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; @@ -6679,7 +5571,7 @@ cygwin*) lt_cv_file_magic_cmd='func_win32_libid' ;; -mingw* | windows* | pw32*) +mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. @@ -6688,7 +5580,7 @@ mingw* | windows* | pw32*) lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|pe-aarch64)' + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; @@ -6703,14 +5595,14 @@ darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; -freebsd* | dragonfly* | midnightbsd*) +freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=$FILECMD + lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac @@ -6724,7 +5616,7 @@ haiku*) ;; hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=$FILECMD + lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' @@ -6761,11 +5653,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; -*-mlibc) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd* | netbsdelf*-gnu) +netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else @@ -6775,7 +5663,7 @@ netbsd* | netbsdelf*-gnu) newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=$FILECMD + lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; @@ -6783,7 +5671,7 @@ newos6*) lt_cv_deplibs_check_method=pass_all ;; -openbsd*) +openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else @@ -6799,10 +5687,6 @@ rdos*) lt_cv_deplibs_check_method=pass_all ;; -serenity*) - lt_cv_deplibs_check_method=pass_all - ;; - solaris*) lt_cv_deplibs_check_method=pass_all ;; @@ -6845,17 +5729,16 @@ os2*) lt_cv_deplibs_check_method=pass_all ;; esac - ;; -esac + fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -printf "%s\n" "$lt_cv_deplibs_check_method" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in - mingw* | windows* | pw32*) + mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else @@ -6893,44 +5776,38 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_DLLTOOL+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$DLLTOOL"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -printf "%s\n" "$DLLTOOL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6939,44 +5816,38 @@ if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_DLLTOOL+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_DLLTOOL"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -printf "%s\n" "$ac_ct_DLLTOOL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then @@ -6984,8 +5855,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL @@ -7002,16 +5873,15 @@ test -z "$DLLTOOL" && DLLTOOL=dlltool -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -printf %s "checking how to associate runtime and link libraries... " >&6; } -if test ${lt_cv_sharedlib_from_linklib_cmd+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_sharedlib_from_linklib_cmd='unknown' +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in -cygwin* | mingw* | windows* | pw32* | cegcc*) +cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in @@ -7028,11 +5898,10 @@ cygwin* | mingw* | windows* | pw32* | cegcc*) lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac - ;; -esac + fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO @@ -7043,153 +5912,43 @@ test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_RANLIB+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi ;; -esac -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -printf "%s\n" "$RANLIB" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_RANLIB+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi ;; -esac -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -printf "%s\n" "$ac_ct_RANLIB" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_AR+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$AR"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -printf "%s\n" "$AR" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -7202,44 +5961,38 @@ if test -z "$AR"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_AR+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_AR"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -printf "%s\n" "$ac_ct_AR" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -7251,8 +6004,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR @@ -7260,60 +6013,42 @@ esac fi : ${AR=ar} +: ${AR_FLAGS=cru} -# Use ARFLAGS variable as AR's operation code to sync the variable naming with -# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have -# higher priority because that's what people were doing historically (setting -# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS -# variable obsoleted/removed. - -test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} -lt_ar_flags=$AR_FLAGS - -# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override -# by AR_FLAGS because that was never working and AR_FLAGS is about to die. - - - - - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -printf %s "checking for archiver @FILE support... " >&6; } -if test ${lt_cv_ar_at_file+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_ar_at_file=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if ${lt_cv_ar_at_file+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. @@ -7321,7 +6056,7 @@ then : { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ @@ -7330,12 +6065,11 @@ then : rm -f conftest.* libconftest.a fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ;; -esac +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -printf "%s\n" "$lt_cv_ar_at_file" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= @@ -7352,44 +6086,38 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_STRIP+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$STRIP"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -printf "%s\n" "$STRIP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -7398,44 +6126,38 @@ if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_STRIP+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_STRIP"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -printf "%s\n" "$ac_ct_STRIP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then @@ -7443,8 +6165,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP @@ -7460,6 +6182,97 @@ test -z "$STRIP" && STRIP=: +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi test -z "$RANLIB" && RANLIB=: @@ -7474,8 +6287,15 @@ old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then + case $host_os in + bitrig* | openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" + ;; + esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in @@ -7534,13 +6354,12 @@ compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -printf %s "checking command to parse $NM output from $compiler object... " >&6; } -if test ${lt_cv_sys_global_symbol_pipe+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } +if ${lt_cv_sys_global_symbol_pipe+:} false; then : + $as_echo_n "(cached) " >&6 +else + # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] @@ -7555,7 +6374,7 @@ case $host_os in aix*) symcode='[BCDT]' ;; -cygwin* | mingw* | windows* | pw32* | cegcc*) +cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) @@ -7570,7 +6389,7 @@ osf*) symcode='[BCDEGQRST]' ;; solaris*) - symcode='[BCDRT]' + symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' @@ -7594,7 +6413,7 @@ esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" + lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" @@ -7612,20 +6431,20 @@ fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ +lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ +lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ @@ -7634,7 +6453,7 @@ $lt_c_name_lib_hook\ # Handle CRLF in mingw tool chain opt_cr= case $build_os in -mingw* | windows*) +mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac @@ -7649,7 +6468,7 @@ for ac_symprfx in "" "_"; do if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. - # Also find C++ and __fastcall symbols from MSVC++ or ICC, + # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ @@ -7667,9 +6486,9 @@ for ac_symprfx in "" "_"; do " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else - lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -7685,18 +6504,21 @@ void nm_test_func(void){} #ifdef __cplusplus } #endif -int main(void){nm_test_var='a';nm_test_func();return(0);} +int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm - $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5 - if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 + (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -7764,7 +6586,7 @@ _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi @@ -7792,19 +6614,18 @@ _LT_EOF lt_cv_sys_global_symbol_pipe= fi done - ;; -esac + fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -printf "%s\n" "failed" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +$as_echo "failed" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -printf "%s\n" "ok" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } fi # Response file support. @@ -7850,16 +6671,14 @@ fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -printf %s "checking for sysroot... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. -if test ${with_sysroot+y} -then : +if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; -else case e in #( - e) with_sysroot=no ;; -esac +else + with_sysroot=no fi @@ -7867,37 +6686,34 @@ lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then - # Trim trailing / since we'll always append absolute paths and we want - # to avoid //, if only for less confusing output for the user. - lt_sysroot=`$CC --print-sysroot 2>/dev/null | $SED 's:/\+$::'` + lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) - lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 -printf "%s\n" "$with_sysroot" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 +$as_echo "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -printf "%s\n" "${lt_sysroot:-no}" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 -printf %s "checking for a working dd... " >&6; } -if test ${ac_cv_path_lt_DD+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) printf 0123456789abcdef0123456789abcdef >conftest.i +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 +$as_echo_n "checking for a working dd... " >&6; } +if ${ac_cv_path_lt_DD+:} false; then : + $as_echo_n "(cached) " >&6 +else + printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} if test -z "$lt_DD"; then @@ -7907,15 +6723,10 @@ if test -z "$lt_DD"; then for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in dd - do + test -z "$as_dir" && as_dir=. + for ac_prog in dd; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext" + ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ @@ -7933,20 +6744,18 @@ else ac_cv_path_lt_DD=$lt_DD fi -rm -f conftest.i conftest2.i conftest.out ;; -esac +rm -f conftest.i conftest2.i conftest.out fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 -printf "%s\n" "$ac_cv_path_lt_DD" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 +$as_echo "$ac_cv_path_lt_DD" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 -printf %s "checking how to truncate binary pipes... " >&6; } -if test ${lt_cv_truncate_bin+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) printf 0123456789abcdef0123456789abcdef >conftest.i +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 +$as_echo_n "checking how to truncate binary pipes... " >&6; } +if ${lt_cv_truncate_bin+:} false; then : + $as_echo_n "(cached) " >&6 +else + printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then @@ -7954,11 +6763,10 @@ if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; the && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out -test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" ;; -esac +test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 -printf "%s\n" "$lt_cv_truncate_bin" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 +$as_echo "$lt_cv_truncate_bin" >&6; } @@ -7981,8 +6789,7 @@ func_cc_basename () } # Check whether --enable-libtool-lock was given. -if test ${enable_libtool_lock+y} -then : +if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi @@ -7998,9 +6805,9 @@ ia64-*-hpux*) if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; @@ -8018,10 +6825,10 @@ ia64-*-hpux*) if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; @@ -8033,7 +6840,7 @@ ia64-*-hpux*) ;; esac else - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; @@ -8056,10 +6863,10 @@ mips64*-*linux*) if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; @@ -8067,7 +6874,7 @@ mips64*-*linux*) emul="${emul}64" ;; esac - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; @@ -8075,7 +6882,7 @@ mips64*-*linux*) emul="${emul}ltsmip" ;; esac - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; @@ -8086,7 +6893,7 @@ mips64*-*linux*) ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*) +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when @@ -8097,16 +6904,16 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*) if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - case `$FILECMD conftest.o` in + case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; - x86_64-*linux*|x86_64-gnu*) - case `$FILECMD conftest.o` in + x86_64-*linux*) + case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; @@ -8134,7 +6941,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*) x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; - x86_64-*linux*|x86_64-gnu*) + x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) @@ -8160,13 +6967,12 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -printf %s "checking whether the C compiler needs -belf... " >&6; } -if test ${lt_cv_cc_needs_belf+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_ext=c + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 +$as_echo_n "checking whether the C compiler needs -belf... " >&6; } +if ${lt_cv_cc_needs_belf+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -8176,32 +6982,29 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes -else case e in #( - e) lt_cv_cc_needs_belf=no ;; -esac +else + lt_cv_cc_needs_belf=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - ;; -esac + fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -printf "%s\n" "$lt_cv_cc_needs_belf" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS @@ -8214,9 +7017,9 @@ printf "%s\n" "$lt_cv_cc_needs_belf" >&6; } if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - case `$FILECMD conftest.o` in + case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) @@ -8251,44 +7054,38 @@ need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MANIFEST_TOOL+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$MANIFEST_TOOL"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -printf "%s\n" "$MANIFEST_TOOL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -8297,44 +7094,38 @@ if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_MANIFEST_TOOL"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then @@ -8342,8 +7133,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL @@ -8353,25 +7144,23 @@ else fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if test ${lt_cv_path_manifest_tool+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_path_manifest_tool=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if ${lt_cv_path_mainfest_tool+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_manifest_tool=yes + lt_cv_path_mainfest_tool=yes fi - rm -f conftest* ;; -esac + rm -f conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_manifest_tool" >&5 -printf "%s\n" "$lt_cv_path_manifest_tool" >&6; } -if test yes != "$lt_cv_path_manifest_tool"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi @@ -8385,44 +7174,38 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_DSYMUTIL+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$DSYMUTIL"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -printf "%s\n" "$DSYMUTIL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 +$as_echo "$DSYMUTIL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -8431,44 +7214,38 @@ if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_DSYMUTIL+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_DSYMUTIL"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -printf "%s\n" "$ac_ct_DSYMUTIL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 +$as_echo "$ac_ct_DSYMUTIL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then @@ -8476,8 +7253,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL @@ -8489,44 +7266,38 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_NMEDIT+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$NMEDIT"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -printf "%s\n" "$NMEDIT" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +$as_echo "$NMEDIT" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -8535,44 +7306,38 @@ if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_NMEDIT+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_NMEDIT"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -printf "%s\n" "$ac_ct_NMEDIT" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +$as_echo "$ac_ct_NMEDIT" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then @@ -8580,8 +7345,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT @@ -8593,44 +7358,38 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_LIPO+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$LIPO"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -printf "%s\n" "$LIPO" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -8639,44 +7398,38 @@ if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_LIPO+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_LIPO"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -printf "%s\n" "$ac_ct_LIPO" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +$as_echo "$ac_ct_LIPO" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then @@ -8684,8 +7437,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO @@ -8697,44 +7450,38 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_OTOOL+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$OTOOL"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -printf "%s\n" "$OTOOL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +$as_echo "$OTOOL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -8743,44 +7490,38 @@ if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_OTOOL+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_OTOOL"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -printf "%s\n" "$ac_ct_OTOOL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +$as_echo "$ac_ct_OTOOL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then @@ -8788,8 +7529,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL @@ -8801,44 +7542,38 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_OTOOL64+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$OTOOL64"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -printf "%s\n" "$OTOOL64" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +$as_echo "$OTOOL64" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -8847,44 +7582,38 @@ if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_OTOOL64+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_OTOOL64"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -printf "%s\n" "$ac_ct_OTOOL64" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +$as_echo "$ac_ct_OTOOL64" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then @@ -8892,8 +7621,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 @@ -8928,13 +7657,12 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -printf %s "checking for -single_module linker flag... " >&6; } -if test ${lt_cv_apple_cc_single_mod+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_apple_cc_single_mod=no + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 +$as_echo_n "checking for -single_module linker flag... " >&6; } +if ${lt_cv_apple_cc_single_mod+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE @@ -8960,58 +7688,17 @@ else case e in #( fi rm -rf libconftest.dylib* rm -f conftest.* - fi ;; -esac + fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - # Feature test to disable chained fixups since it is not - # compatible with '-undefined dynamic_lookup' - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -no_fixup_chains linker flag" >&5 -printf %s "checking for -no_fixup_chains linker flag... " >&6; } -if test ${lt_cv_support_no_fixup_chains+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -Wl,-no_fixup_chains" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - lt_cv_support_no_fixup_chains=yes -else case e in #( - e) lt_cv_support_no_fixup_chains=no - ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_support_no_fixup_chains" >&5 -printf "%s\n" "$lt_cv_support_no_fixup_chains" >&6; } - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -printf %s "checking for -exported_symbols_list linker flag... " >&6; } -if test ${lt_cv_ld_exported_symbols_list+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_ld_exported_symbols_list=no + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if ${lt_cv_ld_exported_symbols_list+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" @@ -9019,47 +7706,43 @@ else case e in #( /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes -else case e in #( - e) lt_cv_ld_exported_symbols_list=no ;; -esac +else + lt_cv_ld_exported_symbols_list=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -printf %s "checking for -force_load linker flag... " >&6; } -if test ${lt_cv_ld_force_load+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_ld_force_load=no +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +$as_echo_n "checking for -force_load linker flag... " >&6; } +if ${lt_cv_ld_force_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR $AR_FLAGS libconftest.a conftest.o" >&5 - $AR $AR_FLAGS libconftest.a conftest.o 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF -int main(void) { return 0;} +int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err @@ -9073,47 +7756,32 @@ _LT_EOF fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM - ;; -esac + fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -printf "%s\n" "$lt_cv_ld_force_load" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +$as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) - case $MACOSX_DEPLOYMENT_TARGET,$host in - 10.[012],*|,*powerpc*-darwin[5-8]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - *) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' - if test yes = "$lt_cv_support_no_fixup_chains"; then - as_fn_append _lt_dar_allow_undefined ' $wl-no_fixup_chains' - fi - ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi - _lt_dar_needs_single_mod=no - case $host_os in - rhapsody* | darwin1.*) - _lt_dar_needs_single_mod=yes ;; - darwin*) - # When targeting Mac OS X 10.4 (darwin 8) or later, - # -single_module is the default and -multi_module is unsupported. - # The toolchain on macOS 10.14 (darwin 18) and later cannot - # target any OS version that needs -single_module. - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*-darwin[567].*|10.[0-3],*-darwin[5-9].*|10.[0-3],*-darwin1[0-7].*) - _lt_dar_needs_single_mod=yes ;; - esac - ;; - esac if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else @@ -9162,43 +7830,149 @@ func_munge_path_list () esac } -ac_header= ac_cache= -for ac_item in $ac_header_c_list -do - if test $ac_cache; then - ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" - if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then - printf "%s\n" "#define $ac_item 1" >> confdefs.h - fi - ac_header= ac_cache= - elif test $ac_header; then - ac_cache=$ac_item - else - ac_header=$ac_item - fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + done - - - - - - -if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes -then : - -printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +for ac_header in dlfcn.h +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " -if test "x$ac_cv_header_dlfcn_h" = xyes -then : - printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h +if test "x$ac_cv_header_dlfcn_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DLFCN_H 1 +_ACEOF fi +done + @@ -9207,48 +7981,42 @@ fi enable_win32_dll=yes case $host in -*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-cegcc*) +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_AS+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$AS"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AS+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AS"; then ac_cv_prog_AS="$AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AS="${ac_tool_prefix}as" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi AS=$ac_cv_prog_AS if test -n "$AS"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 -printf "%s\n" "$AS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 +$as_echo "$AS" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9257,44 +8025,38 @@ if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_AS+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_AS"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AS+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AS"; then ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AS="as" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 -printf "%s\n" "$ac_ct_AS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 +$as_echo "$ac_ct_AS" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_AS" = x; then @@ -9302,8 +8064,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AS=$ac_ct_AS @@ -9315,44 +8077,38 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_DLLTOOL+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$DLLTOOL"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -printf "%s\n" "$DLLTOOL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9361,44 +8117,38 @@ if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_DLLTOOL+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_DLLTOOL"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -printf "%s\n" "$ac_ct_DLLTOOL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then @@ -9406,8 +8156,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL @@ -9419,44 +8169,38 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_OBJDUMP+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$OBJDUMP"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -printf "%s\n" "$OBJDUMP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9465,44 +8209,38 @@ if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_OBJDUMP+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$ac_ct_OBJDUMP"; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS -fi ;; -esac +fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -printf "%s\n" "$ac_ct_OBJDUMP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then @@ -9510,8 +8248,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP @@ -9548,8 +8286,7 @@ test -z "$OBJDUMP" && OBJDUMP=objdump # Check whether --enable-shared was given. -if test ${enable_shared+y} -then : +if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; @@ -9567,9 +8304,8 @@ then : IFS=$lt_save_ifs ;; esac -else case e in #( - e) enable_shared=yes ;; -esac +else + enable_shared=yes fi @@ -9581,8 +8317,7 @@ fi # Check whether --enable-static was given. -if test ${enable_static+y} -then : +if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; @@ -9600,9 +8335,8 @@ then : IFS=$lt_save_ifs ;; esac -else case e in #( - e) enable_static=yes ;; -esac +else + enable_static=yes fi @@ -9613,52 +8347,27 @@ fi - # Check whether --enable-pic was given. -if test ${enable_pic+y} -then : - enableval=$enable_pic; lt_p=${PACKAGE-default} - case $enableval in - yes|no) pic_mode=$enableval ;; - *) - pic_mode=default - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for lt_pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$lt_pkg" = "X$lt_p"; then - pic_mode=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else case e in #( - e) # Check whether --with-pic was given. -if test ${with_pic+y} -then : + +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} - case $withval in - yes|no) pic_mode=$withval ;; - *) - pic_mode=default - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for lt_pkg in $withval; do - IFS=$lt_save_ifs - if test "X$lt_pkg" = "X$lt_p"; then - pic_mode=yes - fi - done - IFS=$lt_save_ifs - ;; - esac -else case e in #( - e) pic_mode=default ;; -esac -fi - - ;; -esac + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for lt_pkg in $withval; do + IFS=$lt_save_ifs + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS=$lt_save_ifs + ;; + esac +else + pic_mode=default fi @@ -9669,8 +8378,7 @@ fi # Check whether --enable-fast-install was given. -if test ${enable_fast_install+y} -then : +if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; @@ -9688,9 +8396,8 @@ then : IFS=$lt_save_ifs ;; esac -else case e in #( - e) enable_fast_install=yes ;; -esac +else + enable_fast_install=yes fi @@ -9703,50 +8410,31 @@ fi shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 -printf %s "checking which variant of shared library versioning to provide... " >&6; } - # Check whether --enable-aix-soname was given. -if test ${enable_aix_soname+y} -then : - enableval=$enable_aix_soname; case $enableval in - aix|svr4|both) - ;; - *) - as_fn_error $? "Unknown argument to --enable-aix-soname" "$LINENO" 5 - ;; - esac - lt_cv_with_aix_soname=$enable_aix_soname -else case e in #( - e) # Check whether --with-aix-soname was given. -if test ${with_aix_soname+y} -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 +$as_echo_n "checking which variant of shared library versioning to provide... " >&6; } + +# Check whether --with-aix-soname was given. +if test "${with_aix_soname+set}" = set; then : withval=$with_aix_soname; case $withval in - aix|svr4|both) - ;; - *) - as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 - ;; - esac - lt_cv_with_aix_soname=$with_aix_soname -else case e in #( - e) if test ${lt_cv_with_aix_soname+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_with_aix_soname=aix ;; -esac -fi - ;; -esac + aix|svr4|both) + ;; + *) + as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 + ;; + esac + lt_cv_with_aix_soname=$with_aix_soname +else + if ${lt_cv_with_aix_soname+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_with_aix_soname=aix fi - enable_aix_soname=$lt_cv_with_aix_soname ;; -esac + with_aix_soname=$lt_cv_with_aix_soname fi - with_aix_soname=$enable_aix_soname - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 -printf "%s\n" "$with_aix_soname" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 +$as_echo "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', @@ -9828,13 +8516,12 @@ if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -printf %s "checking for objdir... " >&6; } -if test ${lt_cv_objdir+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) rm -f .libs 2>/dev/null +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +$as_echo_n "checking for objdir... " >&6; } +if ${lt_cv_objdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs @@ -9842,18 +8529,19 @@ else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi -rmdir .libs 2>/dev/null ;; -esac +rmdir .libs 2>/dev/null fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -printf "%s\n" "$lt_cv_objdir" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +$as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir -printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define LT_OBJDIR "$lt_cv_objdir/" +_ACEOF @@ -9874,8 +8562,8 @@ esac ofile=libtool can_build_shared=yes -# All known linkers require a '.a' archive for static linking (except MSVC and -# ICC, which need '.lib'). +# All known linkers require a '.a' archive for static linking (except MSVC, +# which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld @@ -9899,13 +8587,12 @@ test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -printf %s "checking for ${ac_tool_prefix}file... " >&6; } -if test ${lt_cv_path_MAGIC_CMD+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) case $MAGIC_CMD in + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; @@ -9948,17 +8635,16 @@ _LT_EOF IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; -esac ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -printf "%s\n" "$MAGIC_CMD" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9967,13 +8653,12 @@ fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -printf %s "checking for file... " >&6; } -if test ${lt_cv_path_MAGIC_CMD+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) case $MAGIC_CMD in + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 +$as_echo_n "checking for file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; @@ -10016,17 +8701,16 @@ _LT_EOF IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; -esac ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -printf "%s\n" "$MAGIC_CMD" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -10060,7 +8744,7 @@ objext=$objext lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests -lt_simple_link_test_code='int main(void){return(0);}' +lt_simple_link_test_code='int main(){return(0);}' @@ -10111,13 +8795,12 @@ if test yes = "$GCC"; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test ${lt_cv_prog_compiler_rtti_exceptions+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler_rtti_exceptions=no + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment @@ -10145,11 +8828,10 @@ else case e in #( fi fi $RM conftest* - ;; -esac + fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" @@ -10202,7 +8884,7 @@ lt_prog_compiler_static= # PIC is the default for these OSes. ;; - mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) + mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style @@ -10305,7 +8987,7 @@ lt_prog_compiler_static= esac ;; - mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) + mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' @@ -10346,12 +9028,6 @@ lt_prog_compiler_static= lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; - *flang* | ftn | f18* | f95*) - # Flang compiler. - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) @@ -10396,7 +9072,7 @@ lt_prog_compiler_static= lt_prog_compiler_static='-qstaticlink' ;; *) - case `$CC -V 2>&1 | $SED 5q` in + case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' @@ -10434,12 +9110,6 @@ lt_prog_compiler_static= lt_prog_compiler_static='-Bstatic' ;; - *-mlibc) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. @@ -10456,9 +9126,6 @@ lt_prog_compiler_static= lt_prog_compiler_static='-non_shared' ;; - serenity*) - ;; - solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' @@ -10521,30 +9188,27 @@ case $host_os in ;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -printf %s "checking for $compiler option to produce PIC... " >&6; } -if test ${lt_cv_prog_compiler_pic+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ;; -esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test ${lt_cv_prog_compiler_pic_works+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler_pic_works=no + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if ${lt_cv_prog_compiler_pic_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment @@ -10572,11 +9236,10 @@ else case e in #( fi fi $RM conftest* - ;; -esac + fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in @@ -10604,13 +9267,12 @@ fi # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test ${lt_cv_prog_compiler_static_works+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler_static_works=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext @@ -10631,11 +9293,10 @@ else case e in #( fi $RM -r conftest* LDFLAGS=$save_LDFLAGS - ;; -esac + fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 +$as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : @@ -10649,13 +9310,12 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test ${lt_cv_prog_compiler_c_o+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler_c_o=no + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest @@ -10695,24 +9355,22 @@ else case e in #( cd .. $RM -r conftest $RM conftest* - ;; -esac + fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test ${lt_cv_prog_compiler_c_o+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler_c_o=no + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest @@ -10752,11 +9410,10 @@ else case e in #( cd .. $RM -r conftest $RM conftest* - ;; -esac + fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } @@ -10764,19 +9421,19 @@ printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -printf %s "checking if we can lock with hard links... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -printf "%s\n" "$hard_links" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } if test no = "$hard_links"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else @@ -10788,8 +9445,8 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= @@ -10832,18 +9489,21 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries extract_expsyms_cmds= case $host_os in - cygwin* | mingw* | windows* | pw32* | cegcc*) - # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using - # Microsoft Visual C++ or Intel C++ Compiler. + # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) + # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; + openbsd* | bitrig*) + with_gnu_ld=no + ;; esac ld_shlibs=yes @@ -10890,7 +9550,7 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries whole_archive_flag_spec= fi supports_anon_versioning=no - case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in + case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... @@ -10944,7 +9604,7 @@ _LT_EOF fi ;; - cygwin* | mingw* | windows* | pw32* | cegcc*) + cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' @@ -10954,7 +9614,6 @@ _LT_EOF enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - file_list_spec='@' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -10974,7 +9633,7 @@ _LT_EOF haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - link_all_deplibs=no + link_all_deplibs=yes ;; os2*) @@ -11001,9 +9660,8 @@ _LT_EOF cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes - file_list_spec='@' ;; interix[3-9]*) @@ -11018,7 +9676,7 @@ _LT_EOF # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - 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' + 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' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) @@ -11061,7 +9719,7 @@ _LT_EOF compiler_needs_object=yes ;; esac - case `$CC -V 2>&1 | $SED 5q` in + case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 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' compiler_needs_object=yes @@ -11073,14 +9731,13 @@ _LT_EOF if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' export_dynamic_flag_spec='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) @@ -11090,7 +9747,7 @@ _LT_EOF archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi @@ -11101,12 +9758,7 @@ _LT_EOF fi ;; - *-mlibc) - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - - netbsd* | netbsdelf*-gnu) + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= @@ -11227,7 +9879,7 @@ _LT_EOF if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 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' else - 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' + 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' fi aix_use_runtimelinking=no @@ -11349,23 +10001,21 @@ _LT_EOF if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else - if test ${lt_cv_aix_libpath_+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -11380,13 +10030,12 @@ then : lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi - ;; -esac + fi aix_libpath=$lt_cv_aix_libpath_ @@ -11405,23 +10054,21 @@ fi if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else - if test ${lt_cv_aix_libpath_+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -11436,13 +10083,12 @@ then : lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi - ;; -esac + fi aix_libpath=$lt_cv_aix_libpath_ @@ -11498,14 +10144,14 @@ fi export_dynamic_flag_spec=-rdynamic ;; - cygwin* | mingw* | windows* | pw32* | cegcc*) + cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using - # Microsoft Visual C++ or Intel C++ Compiler. + # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in - cl* | icl*) - # Native MSVC or ICC + cl*) + # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes @@ -11515,14 +10161,14 @@ fi # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -Fe$output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ - $CC -Fe$tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' @@ -11546,7 +10192,7 @@ fi fi' ;; *) - # Assume MSVC and ICC wrapper + # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. @@ -11587,8 +10233,8 @@ fi output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - 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" - 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" + 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" + 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" else ld_shlibs=no @@ -11622,7 +10268,7 @@ fi ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly* | midnightbsd*) + freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes @@ -11688,13 +10334,12 @@ fi # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -printf %s "checking if $CC understands -b... " >&6; } -if test ${lt_cv_prog_compiler__b+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler__b=no + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +$as_echo_n "checking if $CC understands -b... " >&6; } +if ${lt_cv_prog_compiler__b+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext @@ -11715,11 +10360,10 @@ else case e in #( fi $RM -r conftest* LDFLAGS=$save_LDFLAGS - ;; -esac + fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -printf "%s\n" "$lt_cv_prog_compiler__b" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +$as_echo "$lt_cv_prog_compiler__b" >&6; } if test yes = "$lt_cv_prog_compiler__b"; then archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' @@ -11759,32 +10403,28 @@ fi # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if test ${lt_cv_irix_exported_symbol+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) save_LDFLAGS=$LDFLAGS + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes -else case e in #( - e) lt_cv_irix_exported_symbol=no ;; -esac +else + lt_cv_irix_exported_symbol=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS ;; -esac + LDFLAGS=$save_LDFLAGS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then 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' fi @@ -11805,15 +10445,11 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } # Fabrice Bellard et al's Tiny C Compiler ld_shlibs=yes archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' ;; esac ;; - *-mlibc) - ;; - - netbsd* | netbsdelf*-gnu) + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else @@ -11835,7 +10471,7 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } *nto* | *qnx*) ;; - openbsd*) + openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no @@ -11878,9 +10514,8 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes - file_list_spec='@' ;; osf3*) @@ -11914,9 +10549,6 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } hardcode_libdir_separator=: ;; - serenity*) - ;; - solaris*) no_undefined_flag=' -z defs' if test yes = "$GCC"; then @@ -12072,8 +10704,8 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -printf "%s\n" "$ld_shlibs" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +$as_echo "$ld_shlibs" >&6; } test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld @@ -12109,19 +10741,18 @@ x|xyes) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -printf %s "checking whether -lc should be explicitly linked in... " >&6; } -if test ${lt_cv_archive_cmds_need_lc+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) $RM conftest* + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest @@ -12139,7 +10770,7 @@ else case e in #( if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no @@ -12151,11 +10782,10 @@ else case e in #( cat conftest.err 1>&5 fi $RM conftest* - ;; -esac + fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac @@ -12314,8 +10944,8 @@ esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -printf %s "checking dynamic linker characteristics... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; then case $host_os in @@ -12323,7 +10953,7 @@ if test yes = "$GCC"; then *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in - mingw* | windows* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; + mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` @@ -12381,7 +11011,7 @@ BEGIN {RS = " "; FS = "/|\n";} { # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in - mingw* | windows* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([A-Za-z]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` @@ -12455,7 +11085,7 @@ aix[4-9]*) # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --enable-aix-soname=svr4 only. + # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the @@ -12549,7 +11179,7 @@ bsdi[45]*) # libtool to hard-code these into programs ;; -cygwin* | mingw* | windows* | pw32* | cegcc*) +cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no @@ -12560,29 +11190,15 @@ cygwin* | mingw* | windows* | pw32* | cegcc*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds - # If user builds GCC with multilib enabled, - # it should just install on $(libdir) - # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones. - if test xyes = x"$multilib"; then - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - $install_prog $dir/$dlname $destdir/$dlname~ - chmod a+x $destdir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib $destdir/$dlname'\'' || exit \$?; - fi' - else - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - fi + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' @@ -12591,30 +11207,30 @@ cygwin* | mingw* | windows* | pw32* | cegcc*) case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; - mingw* | windows* | cegcc*) + mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; - *,cl* | *,icl*) - # Native MSVC or ICC + *,cl*) + # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in - mingw* | windows*) + mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' @@ -12627,7 +11243,7 @@ cygwin* | mingw* | windows* | pw32* | cegcc*) done IFS=$lt_save_ifs # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form @@ -12664,7 +11280,7 @@ cygwin* | mingw* | windows* | pw32* | cegcc*) ;; *) - # Assume MSVC and ICC wrapper + # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; @@ -12697,7 +11313,7 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd* | dragonfly* | midnightbsd*) +freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then @@ -12721,28 +11337,7 @@ freebsd* | dragonfly* | midnightbsd*) need_version=yes ;; esac - case $host_cpu in - powerpc64) - # On FreeBSD bi-arch platforms, a different variable is used for 32-bit - # binaries. See . - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int test_pointer_size[sizeof (void *) - 5]; - -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : shlibpath_var=LD_LIBRARY_PATH -else case e in #( - e) shlibpath_var=LD_32_LIBRARY_PATH ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ;; - *) - shlibpath_var=LD_LIBRARY_PATH - ;; - esac case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes @@ -12772,9 +11367,8 @@ haiku*) soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib' - sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib' - hardcode_into_libs=no + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) @@ -12884,7 +11478,7 @@ linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no - library_names_spec='$libname$release$shared_ext $libname$shared_ext' + library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH @@ -12896,9 +11490,8 @@ linux*android*) hardcode_into_libs=yes dynamic_linker='Android linker' - # -rpath works at least for libraries that are not overridden by - # libraries installed in system locations. - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + # Don't embed -rpath directories since the linker doesn't support them. + hardcode_libdir_flag_spec='-L$libdir' ;; # This must be glibc/ELF. @@ -12913,11 +11506,10 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH - if test ${lt_cv_shlibpath_overrides_runpath+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_shlibpath_overrides_runpath=no + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ @@ -12926,26 +11518,23 @@ else case e in #( /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null -then : +if ac_fn_c_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir - ;; -esac + fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath @@ -12955,7 +11544,7 @@ fi # before this can be enabled. hardcode_into_libs=yes - # Ideally, we could use ldconfig to report *all* directories which are + # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, @@ -12975,18 +11564,6 @@ fi dynamic_linker='GNU/Linux ld.so' ;; -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - netbsd*) version_type=sunos need_lib_prefix=no @@ -13005,18 +11582,6 @@ netbsd*) hardcode_into_libs=yes ;; -*-mlibc) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='mlibc ld.so' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' @@ -13036,7 +11601,7 @@ newsos6) dynamic_linker='ldqnx.so' ;; -openbsd*) +openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no @@ -13096,17 +11661,6 @@ rdos*) dynamic_linker=no ;; -serenity*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - dynamic_linker='SerenityOS LibELF' - ;; - solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no @@ -13204,502 +11758,12 @@ uts4*) shlibpath_var=LD_LIBRARY_PATH ;; -emscripten*) - version_type=none - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - dynamic_linker="Emscripten linker" - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - - - if test yes = "$GCC"; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - lt_prog_compiler_pic='-fPIC' - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static='$wl-static' - ;; - esac - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - lt_prog_compiler_wl='-Xlinker ' - if test -n "$lt_prog_compiler_pic"; then - lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" - fi - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - case $cc_basename in - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - esac - ;; - - mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static='$wl-static' - ;; - esac - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='$wl-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - # old Intel for x86_64, which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - *flang* | ftn | f18* | f95*) - # Flang compiler. - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | $SED 5q` in - *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - *Sun\ F* | *Sun*Fortran*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Qoption ld ' - ;; - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - *Intel*\ [CF]*Compiler*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - *Portland\ Group*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - esac - ;; - esac - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - *-mlibc) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - serenity*) - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -case $host_os in - # For platforms that do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -printf %s "checking for $compiler option to produce PIC... " >&6; } -if test ${lt_cv_prog_compiler_pic+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; } -lt_prog_compiler_pic=$lt_cv_prog_compiler_pic - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test ${lt_cv_prog_compiler_pic_works+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; } - -if test yes = "$lt_cv_prog_compiler_pic_works"; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test ${lt_cv_prog_compiler_static_works+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) lt_cv_prog_compiler_static_works=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS - ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; } - -if test yes = "$lt_cv_prog_compiler_static_works"; then - : -else - lt_prog_compiler_static= -fi - - - -='-fPIC' - archive_cmds='$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib' - archive_expsym_cmds='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib -s EXPORTED_FUNCTIONS=@$output_objdir/$soname.expsym' - archive_cmds_need_lc=no - no_undefined_flag= - ;; - *) dynamic_linker=no ;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -printf "%s\n" "$dynamic_linker" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" @@ -13820,8 +11884,8 @@ configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -printf %s "checking how to hardcode library paths into programs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || @@ -13845,8 +11909,8 @@ else # directories. hardcode_action=unsupported fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -printf "%s\n" "$hardcode_action" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then @@ -13878,7 +11942,7 @@ else lt_cv_dlopen_self=yes ;; - mingw* | windows* | pw32* | cegcc*) + mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; @@ -13890,59 +11954,50 @@ else darwin*) # if libdl is installed we need to link against it - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -printf %s "checking for dlopen in -ldl... " >&6; } -if test ${ac_cv_lib_dl_dlopen+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -char dlopen (void); +char dlopen (); int -main (void) +main () { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes -else case e in #( - e) ac_cv_lib_dl_dlopen=no ;; -esac +else + ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac +LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else case e in #( - e) +else + lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes - ;; -esac + fi ;; @@ -13957,222 +12012,183 @@ fi *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = xyes -then : +if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen=shl_load -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -printf %s "checking for shl_load in -ldld... " >&6; } -if test ${ac_cv_lib_dld_shl_load+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if ${ac_cv_lib_dld_shl_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -char shl_load (void); +char shl_load (); int -main (void) +main () { return shl_load (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes -else case e in #( - e) ac_cv_lib_dld_shl_load=no ;; -esac +else + ac_cv_lib_dld_shl_load=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac +LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld -else case e in #( - e) ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes -then : +else + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen=dlopen -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -printf %s "checking for dlopen in -ldl... " >&6; } -if test ${ac_cv_lib_dl_dlopen+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -char dlopen (void); +char dlopen (); int -main (void) +main () { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes -else case e in #( - e) ac_cv_lib_dl_dlopen=no ;; -esac +else + ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac +LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -printf %s "checking for dlopen in -lsvld... " >&6; } -if test ${ac_cv_lib_svld_dlopen+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if ${ac_cv_lib_svld_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -char dlopen (void); +char dlopen (); int -main (void) +main () { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes -else case e in #( - e) ac_cv_lib_svld_dlopen=no ;; -esac +else + ac_cv_lib_svld_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac +LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -printf %s "checking for dld_link in -ldld... " >&6; } -if test ${ac_cv_lib_dld_dld_link+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if ${ac_cv_lib_dld_dld_link+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -char dld_link (void); +char dld_link (); int -main (void) +main () { return dld_link (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes -else case e in #( - e) ac_cv_lib_dld_dld_link=no ;; -esac +else + ac_cv_lib_dld_dld_link=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac +LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi - ;; -esac + fi - ;; -esac + fi - ;; -esac + fi - ;; -esac + fi - ;; -esac + fi ;; @@ -14195,13 +12211,12 @@ fi save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -printf %s "checking whether a program can dlopen itself... " >&6; } -if test ${lt_cv_dlopen_self+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test yes = "$cross_compiling"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 +$as_echo_n "checking whether a program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 @@ -14251,11 +12266,11 @@ else /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord (void) __attribute__((visibility("default"))); +int fnord () __attribute__((visibility("default"))); #endif -int fnord (void) { return 42; } -int main (void) +int fnord () { return 42; } +int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; @@ -14279,7 +12294,7 @@ _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? @@ -14295,21 +12310,19 @@ _LT_EOF fi rm -fr conftest* - ;; -esac + fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -printf "%s\n" "$lt_cv_dlopen_self" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +$as_echo "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -printf %s "checking whether a statically linked program can dlopen itself... " >&6; } -if test ${lt_cv_dlopen_self_static+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test yes = "$cross_compiling"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self_static+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 @@ -14359,11 +12372,11 @@ else /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord (void) __attribute__((visibility("default"))); +int fnord () __attribute__((visibility("default"))); #endif -int fnord (void) { return 42; } -int main (void) +int fnord () { return 42; } +int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; @@ -14387,7 +12400,7 @@ _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? @@ -14403,11 +12416,10 @@ _LT_EOF fi rm -fr conftest* - ;; -esac + fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -printf "%s\n" "$lt_cv_dlopen_self_static" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS=$save_CPPFLAGS @@ -14445,43 +12457,32 @@ fi striplib= old_striplib= -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -printf %s "checking whether stripping libraries is possible... " >&6; } -if test -z "$STRIP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - old_striplib="$STRIP --strip-debug" - striplib="$STRIP --strip-unneeded" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - else - case $host_os in - darwin*) - # FIXME - insert some real tests, host_os isn't really good enough +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - ;; - freebsd*) - if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then - old_striplib="$STRIP --strip-debug" - striplib="$STRIP --strip-unneeded" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - fi - ;; - *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; - esac - fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac fi @@ -14496,13 +12497,13 @@ fi # Report what library types will actually be built - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -printf %s "checking if libtool supports shared libraries... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -printf "%s\n" "$can_build_shared" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -printf %s "checking whether to build shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and @@ -14526,15 +12527,15 @@ printf %s "checking whether to build shared libraries... " >&6; } fi ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -printf "%s\n" "$enable_shared" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -printf %s "checking whether to build static libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -printf "%s\n" "$enable_static" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } @@ -14572,23 +12573,21 @@ CC=$lt_save_CC - - -# Some awk implementations crash when confronted with pnglibconf.dfa. -# Run a test now, to make sure this doesn't happen. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if awk ($AWK) works" >&5 -printf %s "checking if awk ($AWK) works... " >&6; } +# Some awks crash when confronted with pnglibconf.dfa, do a test run now +# to make sure this doesn't happen +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that AWK works" >&5 +$as_echo_n "checking that AWK works... " >&6; } if ${AWK} -f ${srcdir}/scripts/options.awk out="/dev/null" version=search\ ${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\ ${srcdir}/pngusr.dfa 1>&2 then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } else - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} -as_fn_error 1 "no -See 'config.log' for more details" "$LINENO" 5; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 1 "failed +See \`config.log' for more details" "$LINENO" 5; } fi # This is a remnant of the old cc -E validation, where it may have been @@ -14596,57 +12595,18 @@ fi DFNCPP="$CPP" -# Check whether --enable-tests was given. -if test ${enable_tests+y} -then : - enableval=$enable_tests; enable_tests="$enableval" -else case e in #( - e) enable_tests=yes ;; -esac -fi - - - if test "$enable_tests" != "no"; then - ENABLE_TESTS_TRUE= - ENABLE_TESTS_FALSE='#' -else - ENABLE_TESTS_TRUE='#' - ENABLE_TESTS_FALSE= -fi - - -# Check whether --enable-tools was given. -if test ${enable_tools+y} -then : - enableval=$enable_tools; enable_tools="$enableval" -else case e in #( - e) enable_tools=yes ;; -esac -fi - - - if test "$enable_tools" != "no"; then - ENABLE_TOOLS_TRUE= - ENABLE_TOOLS_FALSE='#' -else - ENABLE_TOOLS_TRUE='#' - ENABLE_TOOLS_FALSE= -fi - - -# -Werror cannot be passed to GCC in CFLAGS because configure will fail -# (it checks the compiler with a program that generates a warning). -# Add the following option to deal with this: +# -Werror cannot be passed to GCC in CFLAGS because configure will fail (it +# checks the compiler with a program that generates a warning), add the +# following option to deal with this # Check whether --enable-werror was given. -if test ${enable_werror+y} -then : +if test "${enable_werror+set}" = set; then : enableval=$enable_werror; test "$enable_werror" = "yes" && enable_werror="-Werror" if test "$enable_werror" != "no"; then sav_CFLAGS="$CFLAGS" CFLAGS="$enable_werror $CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the compiler allows $enable_werror" >&5 -printf %s "checking if the compiler allows $enable_werror... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler allows $enable_werror" >&5 +$as_echo_n "checking if the compiler allows $enable_werror... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -14654,28 +12614,26 @@ printf %s "checking if the compiler allows $enable_werror... " >&6; } return argv[argc-1][0]; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } PNG_COPTS="$PNG_COPTS $enable_werror" -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ;; -esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$sav_CFLAGS" fi fi -# For GCC 5 the default mode for C is -std=gnu11 instead of -std=gnu89. -# In pngpriv.h we request just the POSIX 1003.1 and C89 APIs by defining -# _POSIX_SOURCE to 1. This is incompatible with the new default mode, so -# we test for that and force the "-std=c89" compiler option: -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we need to force back C standard to C89" >&5 -printf %s "checking if we need to force back C standard to C89... " >&6; } +# For GCC 5 the default mode for C is -std=gnu11 instead of -std=gnu89 +# In pngpriv.h we request just the POSIX 1003.1 and C89 APIs by defining _POSIX_SOURCE to 1 +# This is incompatible with the new default mode, so we test for that and force the +# "-std=c89" compiler option: +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to force back C standard to C89" >&5 +$as_echo_n "checking if we need to force back C standard to C89... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -14683,44 +12641,247 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #include int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -else case e in #( - e) +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +else + if test "x$GCC" != "xyes"; then as_fn_error $? "Forcing back to C89 is required but the flags are only known for GCC" "$LINENO" 5 fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } CFLAGS="$CFLAGS -std=c89" - ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -# Checks for structures and compiler characteristics. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 -printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; } -if test ${ac_cv_struct_tm+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +# Checks for header files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + + +# Checks for typedefs, structures, and compiler characteristics. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if ${ac_cv_c_const+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + +#ifndef __cplusplus + /* Ultrix mips cc rejects this sort of thing. */ + typedef int charset[2]; + const charset cs = { 0, 0 }; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_const=yes +else + ac_cv_c_const=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +$as_echo "#define const /**/" >>confdefs.h + +fi + +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 +$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } +if ${ac_cv_struct_tm+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int -main (void) +main () { struct tm tm; int *p = &tm.tm_sec; @@ -14729,155 +12890,250 @@ struct tm tm; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_struct_tm=time.h -else case e in #( - e) ac_cv_struct_tm=sys/time.h ;; -esac +else + ac_cv_struct_tm=sys/time.h fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; -esac +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 -printf "%s\n" "$ac_cv_struct_tm" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 +$as_echo "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then -printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h +$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 -printf %s "checking for C/C++ restrict keyword... " >&6; } -if test ${ac_cv_c_restrict+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_cv_c_restrict=no - # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see: - # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html - # Put 'restrict' last, because C++ lacks it. - for ac_kw in __restrict__ __restrict _Restrict restrict; do +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 +$as_echo_n "checking for C/C++ restrict keyword... " >&6; } +if ${ac_cv_c_restrict+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_restrict=no + # The order here caters to the fact that C++ does not require restrict. + for ac_kw in __restrict __restrict__ _Restrict restrict; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -typedef int *int_ptr; - int foo (int_ptr $ac_kw ip) { return ip[0]; } - int bar (int [$ac_kw]); /* Catch GCC bug 14050. */ - int bar (int ip[$ac_kw]) { return ip[0]; } - +typedef int * int_ptr; + int foo (int_ptr $ac_kw ip) { + return ip[0]; + } int -main (void) +main () { int s[1]; - int *$ac_kw t = s; - t[0] = 0; - return foo (t) + bar (t); - + int * $ac_kw t = s; + t[0] = 0; + return foo(t) ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_restrict=$ac_kw fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_restrict" != no && break done - ;; -esac + fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 -printf "%s\n" "$ac_cv_c_restrict" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 +$as_echo "$ac_cv_c_restrict" >&6; } case $ac_cv_c_restrict in restrict) ;; - no) printf "%s\n" "#define restrict /**/" >>confdefs.h + no) $as_echo "#define restrict /**/" >>confdefs.h ;; - *) printf "%s\n" "#define restrict $ac_cv_c_restrict" >>confdefs.h + *) cat >>confdefs.h <<_ACEOF +#define restrict $ac_cv_c_restrict +_ACEOF ;; esac # Checks for library functions. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5 +$as_echo_n "checking for working strtod... " >&6; } +if ${ac_cv_func_strtod+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_strtod=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - for ac_func in pow -do : - ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow" -if test "x$ac_cv_func_pow" = xyes -then : - printf "%s\n" "#define HAVE_POW 1" >>confdefs.h +$ac_includes_default +#ifndef strtod +double strtod (); +#endif +int +main() +{ + { + /* Some versions of Linux strtod mis-parse strings with leading '+'. */ + char *string = " +69"; + char *term; + double value; + value = strtod (string, &term); + if (value != 69 || term != (string + 4)) + return 1; + } -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5 -printf %s "checking for pow in -lm... " >&6; } -if test ${ac_cv_lib_m_pow+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS + { + /* Under Solaris 2.4, strtod returns the wrong value for the + terminating character under some conditions. */ + char *string = "NaN"; + char *term; + strtod (string, &term); + if (term != string && *(term - 1) == 0) + return 1; + } + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_strtod=yes +else + ac_cv_func_strtod=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5 +$as_echo "$ac_cv_func_strtod" >&6; } +if test $ac_cv_func_strtod = no; then + case " $LIBOBJS " in + *" strtod.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtod.$ac_objext" + ;; +esac + +ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow" +if test "x$ac_cv_func_pow" = xyes; then : + +fi + +if test $ac_cv_func_pow = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5 +$as_echo_n "checking for pow in -lm... " >&6; } +if ${ac_cv_lib_m_pow+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -char pow (void); +char pow (); int -main (void) +main () { return pow (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_pow=yes -else case e in #( - e) ac_cv_lib_m_pow=no ;; -esac +else + ac_cv_lib_m_pow=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac +LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5 -printf "%s\n" "$ac_cv_lib_m_pow" >&6; } -if test "x$ac_cv_lib_m_pow" = xyes -then : - printf "%s\n" "#define HAVE_LIBM 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5 +$as_echo "$ac_cv_lib_m_pow" >&6; } +if test "x$ac_cv_lib_m_pow" = xyes; then : + POW_LIB=-lm +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5 +$as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;} +fi + +fi + +fi + +for ac_func in pow +do : + ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow" +if test "x$ac_cv_func_pow" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_POW 1 +_ACEOF + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5 +$as_echo_n "checking for pow in -lm... " >&6; } +if ${ac_cv_lib_m_pow+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pow (); +int +main () +{ +return pow (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_pow=yes +else + ac_cv_lib_m_pow=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5 +$as_echo "$ac_cv_lib_m_pow" >&6; } +if test "x$ac_cv_lib_m_pow" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBM 1 +_ACEOF LIBS="-lm $LIBS" -else case e in #( - e) as_fn_error $? "cannot find pow" "$LINENO" 5 ;; -esac -fi - ;; -esac +else + as_fn_error $? "cannot find pow" "$LINENO" 5 fi +fi done -# Some later POSIX 1003.1 functions are required for test programs, failure -# here is soft (the corresponding test program is not built). -ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" -if test "x$ac_cv_func_clock_gettime" = xyes -then : -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: not building timepng" >&5 -printf "%s\n" "$as_me: WARNING: not building timepng" >&2;} ;; -esac +# Some later POSIX 1003.1 functions are required for test programs, failure here +# is soft (the corresponding test program is not built). +ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" +if test "x$ac_cv_func_clock_gettime" = xyes; then : + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: not building timepng" >&5 +$as_echo "$as_me: WARNING: not building timepng" >&2;} fi if test "$ac_cv_func_clock_gettime" = "yes"; then @@ -14891,197 +13147,179 @@ fi # Check whether --with-zlib-prefix was given. -if test ${with_zlib_prefix+y} -then : +if test "${with_zlib_prefix+set}" = set; then : withval=$with_zlib_prefix; ZPREFIX=${withval} -else case e in #( - e) ZPREFIX='z_' ;; -esac +else + ZPREFIX='z_' fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zlibVersion in -lz" >&5 -printf %s "checking for zlibVersion in -lz... " >&6; } -if test ${ac_cv_lib_z_zlibVersion+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlibVersion in -lz" >&5 +$as_echo_n "checking for zlibVersion in -lz... " >&6; } +if ${ac_cv_lib_z_zlibVersion+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -char zlibVersion (void); +char zlibVersion (); int -main (void) +main () { return zlibVersion (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_z_zlibVersion=yes -else case e in #( - e) ac_cv_lib_z_zlibVersion=no ;; -esac +else + ac_cv_lib_z_zlibVersion=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac +LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_zlibVersion" >&5 -printf "%s\n" "$ac_cv_lib_z_zlibVersion" >&6; } -if test "x$ac_cv_lib_z_zlibVersion" = xyes -then : - printf "%s\n" "#define HAVE_LIBZ 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_zlibVersion" >&5 +$as_echo "$ac_cv_lib_z_zlibVersion" >&6; } +if test "x$ac_cv_lib_z_zlibVersion" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBZ 1 +_ACEOF LIBS="-lz $LIBS" -else case e in #( - e) as_ac_Lib=`printf "%s\n" "ac_cv_lib_z_${ZPREFIX}zlibVersion" | sed "$as_sed_sh"` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ZPREFIX}zlibVersion in -lz" >&5 -printf %s "checking for ${ZPREFIX}zlibVersion in -lz... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS +else + as_ac_Lib=`$as_echo "ac_cv_lib_z_${ZPREFIX}zlibVersion" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ZPREFIX}zlibVersion in -lz" >&5 +$as_echo_n "checking for ${ZPREFIX}zlibVersion in -lz... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -char ${ZPREFIX}zlibVersion (void); +char ${ZPREFIX}zlibVersion (); int -main (void) +main () { return ${ZPREFIX}zlibVersion (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else case e in #( - e) eval "$as_ac_Lib=no" ;; -esac +else + eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac +LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : - printf "%s\n" "#define HAVE_LIBZ 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBZ 1 +_ACEOF LIBS="-lz $LIBS" -else case e in #( - e) as_fn_error $? "zlib not installed" "$LINENO" 5 ;; -esac +else + as_fn_error $? "zlib not installed" "$LINENO" 5 fi - ;; -esac + fi # The following is for pngvalid, to ensure it catches FP errors even on # platforms that don't enable FP exceptions, the function appears in the math # library (typically), it's not an error if it is not found. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for feenableexcept in -lm" >&5 -printf %s "checking for feenableexcept in -lm... " >&6; } -if test ${ac_cv_lib_m_feenableexcept+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for feenableexcept in -lm" >&5 +$as_echo_n "checking for feenableexcept in -lm... " >&6; } +if ${ac_cv_lib_m_feenableexcept+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -char feenableexcept (void); +char feenableexcept (); int -main (void) +main () { return feenableexcept (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_feenableexcept=yes -else case e in #( - e) ac_cv_lib_m_feenableexcept=no ;; -esac +else + ac_cv_lib_m_feenableexcept=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac +LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_feenableexcept" >&5 -printf "%s\n" "$ac_cv_lib_m_feenableexcept" >&6; } -if test "x$ac_cv_lib_m_feenableexcept" = xyes -then : - printf "%s\n" "#define HAVE_LIBM 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_feenableexcept" >&5 +$as_echo "$ac_cv_lib_m_feenableexcept" >&6; } +if test "x$ac_cv_lib_m_feenableexcept" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBM 1 +_ACEOF LIBS="-lm $LIBS" fi -ac_fn_c_check_func "$LINENO" "feenableexcept" "ac_cv_func_feenableexcept" -if test "x$ac_cv_func_feenableexcept" = xyes -then : - printf "%s\n" "#define HAVE_FEENABLEEXCEPT 1" >>confdefs.h +for ac_func in feenableexcept +do : + ac_fn_c_check_func "$LINENO" "feenableexcept" "ac_cv_func_feenableexcept" +if test "x$ac_cv_func_feenableexcept" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_FEENABLEEXCEPT 1 +_ACEOF fi +done -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if using Solaris linker" >&5 -printf %s "checking if using Solaris linker... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if using Solaris linker" >&5 +$as_echo_n "checking if using Solaris linker... " >&6; } SLD=`$LD --version 2>&1 | grep Solaris` if test "$SLD"; then have_solaris_ld=yes - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else have_solaris_ld=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "$have_solaris_ld" = "yes"; then HAVE_SOLARIS_LD_TRUE= @@ -15092,16 +13330,16 @@ else fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libraries can be versioned" >&5 -printf %s "checking if libraries can be versioned... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libraries can be versioned" >&5 +$as_echo_n "checking if libraries can be versioned... " >&6; } # Special case for PE/COFF platforms: ld reports # support for version-script, but doesn't actually # DO anything with it. case $host in *cygwin* | *mingw32* | *interix* ) have_ld_version_script=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ;; * ) @@ -15113,14 +13351,14 @@ fi if test "$GLD"; then have_ld_version_script=yes - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else have_ld_version_script=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** You have not enabled versioned symbols." >&5 -printf "%s\n" "$as_me: WARNING: *** You have not enabled versioned symbols." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** You have not enabled versioned symbols." >&5 +$as_echo "$as_me: WARNING: *** You have not enabled versioned symbols." >&2;} fi ;; esac @@ -15135,15 +13373,15 @@ fi if test "$have_ld_version_script" = "yes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for symbol prefix" >&5 -printf %s "checking for symbol prefix... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for symbol prefix" >&5 +$as_echo_n "checking for symbol prefix... " >&6; } SYMBOL_PREFIX=`echo "PREFIX=__USER_LABEL_PREFIX__" \ - | ${CPP:-${CC:-gcc} -E} - 2>&1 \ - | ${EGREP:-grep} "^PREFIX=" \ - | ${SED:-sed} -e "s:^PREFIX=::" -e "s:__USER_LABEL_PREFIX__::"` + | ${CPP-${CC-gcc} -E} - 2>&1 \ + | ${EGREP-grep} "^PREFIX=" \ + | ${SED-sed} -e "s:^PREFIX=::" -e "s:__USER_LABEL_PREFIX__::"` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SYMBOL_PREFIX" >&5 -printf "%s\n" "$SYMBOL_PREFIX" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMBOL_PREFIX" >&5 +$as_echo "$SYMBOL_PREFIX" >&6; } fi # Substitutions for .in files @@ -15156,34 +13394,30 @@ fi # Allow the pkg-config directory to be set # Check whether --with-pkgconfigdir was given. -if test ${with_pkgconfigdir+y} -then : +if test "${with_pkgconfigdir+set}" = set; then : withval=$with_pkgconfigdir; pkgconfigdir=${withval} -else case e in #( - e) pkgconfigdir='${libdir}/pkgconfig' ;; -esac +else + pkgconfigdir='${libdir}/pkgconfig' fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: pkgconfig directory is ${pkgconfigdir}" >&5 -printf "%s\n" "$as_me: pkgconfig directory is ${pkgconfigdir}" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: pkgconfig directory is ${pkgconfigdir}" >&5 +$as_echo "$as_me: pkgconfig directory is ${pkgconfigdir}" >&6;} # Make the *-config binary config scripts optional # Check whether --with-binconfigs was given. -if test ${with_binconfigs+y} -then : +if test "${with_binconfigs+set}" = set; then : withval=$with_binconfigs; if test "${withval}" = no; then binconfigs= - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: libpng-config scripts will not be built" >&5 -printf "%s\n" "$as_me: libpng-config scripts will not be built" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: libpng-config scripts will not be built" >&5 +$as_echo "$as_me: libpng-config scripts will not be built" >&6;} else binconfigs='${binconfigs}' fi -else case e in #( - e) binconfigs='${binconfigs}' ;; -esac +else + binconfigs='${binconfigs}' fi @@ -15192,8 +13426,7 @@ fi # at the start of the build to rename exported library functions # Check whether --with-libpng-prefix was given. -if test ${with_libpng_prefix+y} -then : +if test "${with_libpng_prefix+set}" = set; then : withval=$with_libpng_prefix; if test "${withval:-no}" != "no"; then PNG_PREFIX=${withval} @@ -15213,8 +13446,7 @@ fi # always installed, when the following options are turned on corresponding # unversioned links are also created (normally as symbolic links): # Check whether --enable-unversioned-links was given. -if test ${enable_unversioned_links+y} -then : +if test "${enable_unversioned_links+set}" = set; then : enableval=$enable_unversioned_links; fi @@ -15231,8 +13463,7 @@ fi # Check whether --enable-unversioned-libpng-pc was given. -if test ${enable_unversioned_libpng_pc+y} -then : +if test "${enable_unversioned_libpng_pc+set}" = set; then : enableval=$enable_unversioned_libpng_pc; fi @@ -15246,8 +13477,7 @@ fi # Check whether --enable-unversioned-libpng-config was given. -if test ${enable_unversioned_libpng_config+y} -then : +if test "${enable_unversioned_libpng_config+set}" = set; then : enableval=$enable_unversioned_libpng_config; fi @@ -15260,45 +13490,32 @@ else fi -# HOST-SPECIFIC OPTIONS +# HOST SPECIFIC OPTIONS # ===================== # # DEFAULT # ======= # # Check whether --enable-hardware-optimizations was given. -if test ${enable_hardware_optimizations+y} -then : +if test "${enable_hardware_optimizations+set}" = set; then : enableval=$enable_hardware_optimizations; case "$enableval" in no|off) # disable hardware optimization on all systems: enable_arm_neon=no -printf "%s\n" "#define PNG_ARM_NEON_OPT 0" >>confdefs.h +$as_echo "#define PNG_ARM_NEON_OPT 0" >>confdefs.h enable_mips_msa=no -printf "%s\n" "#define PNG_MIPS_MSA_OPT 0" >>confdefs.h - - enable_mips_mmi=no - -printf "%s\n" "#define PNG_MIPS_MMI_OPT 0" >>confdefs.h +$as_echo "#define PNG_MIPS_MSA_OPT 0" >>confdefs.h enable_powerpc_vsx=no -printf "%s\n" "#define PNG_POWERPC_VSX_OPT 0" >>confdefs.h +$as_echo "#define PNG_POWERPC_VSX_OPT 0" >>confdefs.h enable_intel_sse=no -printf "%s\n" "#define PNG_INTEL_SSE_OPT 0" >>confdefs.h - - enable_loongarch_lsx=no - -printf "%s\n" "#define PNG_LOONGARCH_LSX_OPT 0" >>confdefs.h - - enable_riscv_rvv=no - -printf "%s\n" "#define PNG_RISCV_RVV_OPT 0" >>confdefs.h +$as_echo "#define PNG_INTEL_SSE_OPT 0" >>confdefs.h ;; *) @@ -15307,41 +13524,25 @@ printf "%s\n" "#define PNG_RISCV_RVV_OPT 0" >>confdefs.h arm*|aarch64*) enable_arm_neon=yes -printf "%s\n" "#define PNG_ARM_NEON_OPT 2" >>confdefs.h +$as_echo "#define PNG_ARM_NEON_OPT 0" >>confdefs.h ;; mipsel*|mips64el*) - enable_mips_mmi=yes enable_mips_msa=yes -printf "%s\n" "#define PNG_MIPS_MMI_OPT 1" >>confdefs.h - - -printf "%s\n" "#define PNG_MIPS_MSA_OPT 2" >>confdefs.h +$as_echo "#define PNG_MIPS_MSA_OPT 0" >>confdefs.h ;; i?86|x86_64) enable_intel_sse=yes -printf "%s\n" "#define PNG_INTEL_SSE_OPT 1" >>confdefs.h +$as_echo "#define PNG_INTEL_SSE_OPT 1" >>confdefs.h ;; powerpc*|ppc64*) enable_powerpc_vsx=yes -printf "%s\n" "#define PNG_POWERPC_VSX_OPT 2" >>confdefs.h - - ;; - loongarch*) - enable_loongarch_lsx=yes - -printf "%s\n" "#define PNG_LOONGARCH_LSX_OPT 1" >>confdefs.h - - ;; - riscv64) - enable_riscv_rvv=yes - -printf "%s\n" "#define PNG_RISCV_RVV_OPT 2" >>confdefs.h +$as_echo "#define PNG_POWERPC_VSX_OPT 2" >>confdefs.h ;; esac @@ -15350,53 +13551,53 @@ printf "%s\n" "#define PNG_RISCV_RVV_OPT 2" >>confdefs.h fi -# ARM NEON -# ======== +# ARM +# === +# +# ARM NEON (SIMD) support. # Check whether --enable-arm-neon was given. -if test ${enable_arm_neon+y} -then : +if test "${enable_arm_neon+set}" = set; then : enableval=$enable_arm_neon; case "$enableval" in no|off) # disable the default enabling on __ARM_NEON__ systems: -printf "%s\n" "#define PNG_ARM_NEON_OPT 0" >>confdefs.h +$as_echo "#define PNG_ARM_NEON_OPT 0" >>confdefs.h # Prevent inclusion of the assembler files below: - enable_arm_neon=no ;; + enable_arm_neon=no;; check) -printf "%s\n" "#define PNG_ARM_NEON_CHECK_SUPPORTED /**/" >>confdefs.h +$as_echo "#define PNG_ARM_NEON_CHECK_SUPPORTED /**/" >>confdefs.h ;; api) -printf "%s\n" "#define PNG_ARM_NEON_API_SUPPORTED /**/" >>confdefs.h +$as_echo "#define PNG_ARM_NEON_API_SUPPORTED /**/" >>confdefs.h ;; yes|on) -printf "%s\n" "#define PNG_ARM_NEON_OPT 2" >>confdefs.h +$as_echo "#define PNG_ARM_NEON_OPT 2" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable-arm-neon: please specify 'check' or 'api'; - if you want the optimizations unconditionally, - pass '-mfpu=neon' to the compiler." >&5 -printf "%s\n" "$as_me: WARNING: --enable-arm-neon: please specify 'check' or 'api'; - if you want the optimizations unconditionally, - pass '-mfpu=neon' to the compiler." >&2;};; + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-arm-neon: please specify 'check' or 'api', if + you want the optimizations unconditionally pass -mfpu=neon + to the compiler." >&5 +$as_echo "$as_me: WARNING: --enable-arm-neon: please specify 'check' or 'api', if + you want the optimizations unconditionally pass -mfpu=neon + to the compiler." >&2;};; *) - as_fn_error $? "--enable-arm-neon=${enable_arm_neon}: - invalid argument" "$LINENO" 5 + as_fn_error $? "--enable-arm-neon=${enable_arm_neon}: invalid value" "$LINENO" 5 esac fi -# Add ARM-specific files to all builds where $host_cpu is arm ('arm*') or -# where ARM optimizations were explicitly requested. (This allows a fallback -# if a future host CPU does not match 'arm*'.) +# Add ARM specific files to all builds where the host_cpu is arm ('arm*') or +# where ARM optimizations were explicitly requested (this allows a fallback if a +# future host CPU does not match 'arm*') if test "$enable_arm_neon" != 'no' && case "$host_cpu" in - arm*|aarch64*) : ;; - *) test "$enable_arm_neon" != '' ;; + arm*|aarch64*) :;; + *) test "$enable_arm_neon" != '';; esac; then PNG_ARM_NEON_TRUE= PNG_ARM_NEON_FALSE='#' @@ -15406,52 +13607,52 @@ else fi -# MIPS MSA -# ======== +# MIPS +# === +# +# MIPS MSA (SIMD) support. # Check whether --enable-mips-msa was given. -if test ${enable_mips_msa+y} -then : +if test "${enable_mips_msa+set}" = set; then : enableval=$enable_mips_msa; case "$enableval" in no|off) # disable the default enabling on __mips_msa systems: -printf "%s\n" "#define PNG_MIPS_MSA_OPT 0" >>confdefs.h +$as_echo "#define PNG_MIPS_MSA_OPT 0" >>confdefs.h # Prevent inclusion of the assembler files below: - enable_mips_msa=no ;; + enable_mips_msa=no;; check) -printf "%s\n" "#define PNG_MIPS_MSA_CHECK_SUPPORTED /**/" >>confdefs.h +$as_echo "#define PNG_MIPS_MSA_CHECK_SUPPORTED /**/" >>confdefs.h ;; api) -printf "%s\n" "#define PNG_MIPS_MSA_API_SUPPORTED /**/" >>confdefs.h +$as_echo "#define PNG_MIPS_MSA_API_SUPPORTED /**/" >>confdefs.h ;; yes|on) -printf "%s\n" "#define PNG_MIPS_MSA_OPT 2" >>confdefs.h +$as_echo "#define PNG_MIPS_MSA_OPT 2" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable-mips-msa: please specify 'check' or 'api'; - if you want the optimizations unconditionally, - pass '-mmsa -mfp64' to the compiler." >&5 -printf "%s\n" "$as_me: WARNING: --enable-mips-msa: please specify 'check' or 'api'; - if you want the optimizations unconditionally, - pass '-mmsa -mfp64' to the compiler." >&2;};; + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-mips-msa: please specify 'check' or 'api', if + you want the optimizations unconditionally pass '-mmsa -mfp64' + to the compiler." >&5 +$as_echo "$as_me: WARNING: --enable-mips-msa: please specify 'check' or 'api', if + you want the optimizations unconditionally pass '-mmsa -mfp64' + to the compiler." >&2;};; *) - as_fn_error $? "--enable-mips-msa=${enable_mips_msa}: - invalid argument" "$LINENO" 5 + as_fn_error $? "--enable-mips-msa=${enable_mips_msa}: invalid value" "$LINENO" 5 esac fi -# Add MIPS-specific files to all builds where $host_cpu is mips ('mips*') or -# where MIPS optimizations were explicitly requested. (This allows a fallback -# if a future host CPU does not match 'mips*'.) +# Add MIPS specific files to all builds where the host_cpu is mips ('mips*') or +# where MIPS optimizations were explicitly requested (this allows a fallback if a +# future host CPU does not match 'mips*') if test "$enable_mips_msa" != 'no' && case "$host_cpu" in - mipsel*|mips64el*) : ;; + mipsel*|mips64el*) :;; esac; then PNG_MIPS_MSA_TRUE= PNG_MIPS_MSA_FALSE='#' @@ -15461,93 +13662,38 @@ else fi -# MIPS MMI -# ======== - -# Check whether --enable-mips-mmi was given. -if test ${enable_mips_mmi+y} -then : - enableval=$enable_mips_mmi; case "$enableval" in - no|off) - # disable the default enabling on __mips_mmi systems: - -printf "%s\n" "#define PNG_MIPS_MMI_OPT 0" >>confdefs.h - - # Prevent inclusion of the assembler files below: - enable_mips_mmi=no;; - check) - -printf "%s\n" "#define PNG_MIPS_MMI_CHECK_SUPPORTED /**/" >>confdefs.h -;; - api) - -printf "%s\n" "#define PNG_MIPS_MMI_API_SUPPORTED /**/" >>confdefs.h -;; - yes|on) - -printf "%s\n" "#define PNG_MIPS_MMI_OPT 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable-mips-mmi: please specify 'check' or 'api'; - if you want the optimizations unconditionally - pass '-mloongson-mmi -march=loongson3a' to the compiler." >&5 -printf "%s\n" "$as_me: WARNING: --enable-mips-mmi: please specify 'check' or 'api'; - if you want the optimizations unconditionally - pass '-mloongson-mmi -march=loongson3a' to the compiler." >&2;};; - *) - as_fn_error $? "--enable-mips-mmi=${enable_mips_mmi}: - invalid argument" "$LINENO" 5 - esac -fi - - -# Add MIPS specific files to all builds where the host_cpu is mips ('mips*') or -# where MIPS optimizations were explicitly requested. (This allows a fallback -# if a future host CPU does not match 'mips*'.) - - if test "$enable_mips_mmi" != 'no' && - case "$host_cpu" in - mipsel*|mips64el*) : ;; - esac; then - PNG_MIPS_MMI_TRUE= - PNG_MIPS_MMI_FALSE='#' -else - PNG_MIPS_MMI_TRUE='#' - PNG_MIPS_MMI_FALSE= -fi - - -# INTEL SSE -# ========= +# INTEL +# ===== +# +# INTEL SSE (SIMD) support. # Check whether --enable-intel-sse was given. -if test ${enable_intel_sse+y} -then : +if test "${enable_intel_sse+set}" = set; then : enableval=$enable_intel_sse; case "$enableval" in no|off) # disable the default enabling: -printf "%s\n" "#define PNG_INTEL_SSE_OPT 0" >>confdefs.h +$as_echo "#define PNG_INTEL_SSE_OPT 0" >>confdefs.h # Prevent inclusion of the assembler files below: - enable_intel_sse=no ;; + enable_intel_sse=no;; yes|on) -printf "%s\n" "#define PNG_INTEL_SSE_OPT 1" >>confdefs.h +$as_echo "#define PNG_INTEL_SSE_OPT 1" >>confdefs.h ;; *) - as_fn_error $? "--enable-intel-sse=${enable_intel_sse}: - invalid argument" "$LINENO" 5 + as_fn_error $? "--enable-intel-sse=${enable_intel_sse}: invalid value" "$LINENO" 5 esac fi -# Add Intel-specific files to all builds where $host_cpu is Intel ('x86*') or -# where Intel optimizations were explicitly requested. (This allows a fallback -# if a future host CPU does not match 'x86*'.) +# Add Intel specific files to all builds where the host_cpu is Intel ('x86*') +# or where Intel optimizations were explicitly requested (this allows a +# fallback if a future host CPU does not match 'x86*') if test "$enable_intel_sse" != 'no' && case "$host_cpu" in - i?86|x86_64) : ;; - *) test "$enable_intel_sse" != '' ;; + i?86|x86_64) :;; + *) test "$enable_intel_sse" != '';; esac; then PNG_INTEL_SSE_TRUE= PNG_INTEL_SSE_FALSE='#' @@ -15557,56 +13703,56 @@ else fi -# POWERPC VSX -# =========== +# PowerPC +# === +# +# PowerPC VSX (SIMD) support. # Check whether --enable-powerpc-vsx was given. -if test ${enable_powerpc_vsx+y} -then : +if test "${enable_powerpc_vsx+set}" = set; then : enableval=$enable_powerpc_vsx; case "$enableval" in no|off) # disable the default enabling on __ppc64__ systems: -printf "%s\n" "#define PNG_POWERPC_VSX_OPT 0" >>confdefs.h +$as_echo "#define PNG_POWERPC_VSX_OPT 0" >>confdefs.h - # Prevent inclusion of the platform-specific files below: - enable_powerpc_vsx=no ;; + # Prevent inclusion of the platform specific files below: + enable_powerpc_vsx=no;; check) -printf "%s\n" "#define PNG_POWERPC_VSX_CHECK_SUPPORTED /**/" >>confdefs.h +$as_echo "#define PNG_POWERPC_VSX_CHECK_SUPPORTED /**/" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable-powerpc-vsx: please see contrib/powerpc/README - for the list of supported systems." >&5 -printf "%s\n" "$as_me: WARNING: --enable-powerpc-vsx: please see contrib/powerpc/README - for the list of supported systems." >&2;};; + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-powerpc-vsx Please check contrib/powerpc/README file + for the list of supported OSes." >&5 +$as_echo "$as_me: WARNING: --enable-powerpc-vsx Please check contrib/powerpc/README file + for the list of supported OSes." >&2;};; api) -printf "%s\n" "#define PNG_POWERPC_VSX_API_SUPPORTED /**/" >>confdefs.h +$as_echo "#define PNG_POWERPC_VSX_API_SUPPORTED /**/" >>confdefs.h ;; yes|on) -printf "%s\n" "#define PNG_POWERPC_VSX_OPT 2" >>confdefs.h +$as_echo "#define PNG_POWERPC_VSX_OPT 2" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable-powerpc-vsx: please specify 'check' or 'api'; - if you want the optimizations unconditionally, - pass '-maltivec -mvsx' or '-mcpu=power8' to the compiler." >&5 -printf "%s\n" "$as_me: WARNING: --enable-powerpc-vsx: please specify 'check' or 'api'; - if you want the optimizations unconditionally, - pass '-maltivec -mvsx' or '-mcpu=power8' to the compiler." >&2;};; + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-powerpc-vsx: please specify 'check' or 'api', if + you want the optimizations unconditionally pass '-maltivec -mvsx' + or '-mcpu=power8'to the compiler." >&5 +$as_echo "$as_me: WARNING: --enable-powerpc-vsx: please specify 'check' or 'api', if + you want the optimizations unconditionally pass '-maltivec -mvsx' + or '-mcpu=power8'to the compiler." >&2;};; *) - as_fn_error $? "--enable-powerpc-vsx=${enable_powerpc_vsx}: - invalid argument" "$LINENO" 5 + as_fn_error $? "--enable-powerpc-vsx=${enable_powerpc_vsx}: invalid value" "$LINENO" 5 esac fi -# Add PowerPC-specific files to all builds where $host_cpu is powerpc -# ('powerpc*') or where PowerPC optimizations were explicitly requested. -# (This allows a fallback if a future host CPU does not match 'powerpc*'.) +# Add PowerPC specific files to all builds where the host_cpu is powerpc('powerpc*') or +# where POWERPC optimizations were explicitly requested (this allows a fallback if a +# future host CPU does not match 'powerpc*') if test "$enable_powerpc_vsx" != 'no' && case "$host_cpu" in - powerpc*|ppc64*) : ;; + powerpc*|ppc64*) :;; esac; then PNG_POWERPC_VSX_TRUE= PNG_POWERPC_VSX_FALSE='#' @@ -15616,179 +13762,9 @@ else fi -# LOONGARCH LSX -# ============= -# Check whether --enable-loongarch-lsx was given. -if test ${enable_loongarch_lsx+y} -then : - enableval=$enable_loongarch_lsx; case "$enableval" in - no|off) - # disable the default enabling on __loongarch_simd systems: - -printf "%s\n" "#define PNG_LOONGARCH_LSX_OPT 0" >>confdefs.h - - # Prevent inclusion of the assembler files below: - enable_loongarch_lsx=no;; - yes|on) - -printf "%s\n" "#define PNG_LOONGARCH_LSX_OPT 1" >>confdefs.h - - ;; - *) - as_fn_error $? "--enable-loongarch-lsx=${enable_loongarch_lsx}: - invalid argument" "$LINENO" 5 - esac -fi - - -if test "$enable_loongarch_lsx" != "no" && - case "$host_cpu" in - loongarch*) : ;; - *) test "$enable_loongarch_lsx" != '' ;; - esac -then - compiler_support_loongarch_lsx=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use LoongArch LSX intrinsics" >&5 -printf %s "checking whether to use LoongArch LSX intrinsics... " >&6; } - save_CFLAGS="$CFLAGS" - LSX_CFLAGS="${LSX_CFLAGS:-"-mlsx"}" - CFLAGS="$CFLAGS $LSX_CFLAGS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -int main(){ - __m128i a, b, c; - a = __lsx_vadd_w(b, c); - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - compiler_support_loongarch_lsx=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS="$save_CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $compiler_support_loongarch_lsx" >&5 -printf "%s\n" "$compiler_support_loongarch_lsx" >&6; } - if test "$compiler_support_loongarch_lsx" = "yes"; then - -printf "%s\n" "#define PNG_LOONGARCH_LSX_OPT 1" >>confdefs.h - - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Compiler does not support loongarch LSX." >&5 -printf "%s\n" "$as_me: WARNING: Compiler does not support loongarch LSX." >&2;} - fi -fi - -# Add LoongArch specific files to all builds where the host_cpu is loongarch -# ('loongarch*') or where LoongArch optimizations were explicitly requested. -# (This allows a fallback if a future host CPU does not match 'loongarch*'.) - - if test "$enable_loongarch_lsx" != "no" && - test "$compiler_support_loongarch_lsx" = "yes" && - case "$host_cpu" in - loongarch*) : ;; - *) test "$enable_loongarch_lsx" != '' ;; - esac; then - PNG_LOONGARCH_LSX_TRUE= - PNG_LOONGARCH_LSX_FALSE='#' -else - PNG_LOONGARCH_LSX_TRUE='#' - PNG_LOONGARCH_LSX_FALSE= -fi - - -# RISC-V -# ====== -# -# RISC-V Vector support. - -# Check whether --enable-riscv-rvv was given. -if test ${enable_riscv_rvv+y} -then : - enableval=$enable_riscv_rvv; case "$enableval" in - no|off) - # disable the default enabling on __riscv systems: - -printf "%s\n" "#define PNG_RISCV_RVV_OPT 0" >>confdefs.h - - # Prevent inclusion of the platform-specific files below: - enable_riscv_rvv=no ;; - yes|on) - -printf "%s\n" "#define PNG_RISCV_RVV_OPT 2" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable-riscv-rvv: - if you want the optimizations pass e.g. '-march=rv64gv1p0' to the compiler." >&5 -printf "%s\n" "$as_me: WARNING: --enable-riscv-rvv: - if you want the optimizations pass e.g. '-march=rv64gv1p0' to the compiler." >&2;};; - *) - as_fn_error $? "--enable-riscv-rvv=${enable_riscv_rvv}: invalid value" "$LINENO" 5 - esac -fi - - -if test "$enable_riscv_rvv" != "no" && - case "$host_cpu" in - riscv64) : ;; - *) test "$enable_riscv_rvv" != '' ;; - esac -then - compiler_support_riscv_rvv=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use RISC-V RVV intrinsics" >&5 -printf %s "checking whether to use RISC-V RVV intrinsics... " >&6; } - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -int main() { - const float src[] = { 0.0f, 0.0f, 0.0f, 0.0f }; - uint64_t ptr[2] = {0x0908060504020100, 0xFFFFFFFF0E0D0C0A}; - vuint8m1_t a = __riscv_vreinterpret_v_u64m1_u8m1(__riscv_vle64_v_u64m1(ptr, 2)); - vfloat32m1_t val = __riscv_vle32_v_f32m1((const float*)(src), 4); - return (int)__riscv_vfmv_f_s_f32m1_f32(val); -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - compiler_support_riscv_rvv=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $compiler_support_riscv_rvv" >&5 -printf "%s\n" "$compiler_support_riscv_rvv" >&6; } - if test "$compiler_support_riscv_rvv" = "yes"; then - -printf "%s\n" "#define PNG_RISCV_RVV_OPT 1" >>confdefs.h - - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Compiler does not support riscv rvv." >&5 -printf "%s\n" "$as_me: WARNING: Compiler does not support riscv rvv." >&2;} - fi -fi - -# Add RISC-V-specific files to all builds where $host_cpu is riscv ('riscv64') -# or where RISC-V optimizations were explicitly requested (this allows a fallback -# if a future host CPU does not match 'riscv64') - - if test "$enable_riscv_rvv" != "no" && - test "$compiler_support_riscv_rvv" = "yes" && - case "$host_cpu" in - riscv64) : ;; - *) test "$compiler_support_riscv_rvv" != '' ;; - esac; then - PNG_RISCV_RVV_TRUE= - PNG_RISCV_RVV_FALSE='#' -else - PNG_RISCV_RVV_TRUE='#' - PNG_RISCV_RVV_FALSE= -fi - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Extra options for compiler: $PNG_COPTS" >&5 -printf "%s\n" "$as_me: Extra options for compiler: $PNG_COPTS" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: Extra options for compiler: $PNG_COPTS" >&5 +$as_echo "$as_me: Extra options for compiler: $PNG_COPTS" >&6;} # Config files, substituting as above ac_config_files="$ac_config_files Makefile libpng.pc:libpng.pc.in" @@ -15806,8 +13782,8 @@ cat >confcache <<\_ACEOF # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # -# 'ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* 'ac_cv_foo' will be assigned the +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF @@ -15823,8 +13799,8 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -15837,14 +13813,14 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # 'set' does not quote correctly, so add quotes: double-quote + # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) - # 'set' quotes correctly as required by POSIX, so do not add quotes. + # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | @@ -15854,15 +13830,15 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} /^ac_cv_env_/b end t clear :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -printf "%s\n" "$as_me: updating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else @@ -15876,8 +13852,8 @@ printf "%s\n" "$as_me: updating cache $cache_file" >&6;} fi fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -15894,7 +13870,7 @@ U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" @@ -15905,26 +13881,14 @@ LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 -printf %s "checking that generated files are newer than configure... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5 -printf "%s\n" "done" >&6; } -case $enable_silent_rules in # ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; -esac -if test $am_cv_make_support_nested_variables = yes; then - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' @@ -15949,14 +13913,6 @@ if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${ENABLE_TESTS_TRUE}" && test -z "${ENABLE_TESTS_FALSE}"; then - as_fn_error $? "conditional \"ENABLE_TESTS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${ENABLE_TOOLS_TRUE}" && test -z "${ENABLE_TOOLS_FALSE}"; then - as_fn_error $? "conditional \"ENABLE_TOOLS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${HAVE_CLOCK_GETTIME_TRUE}" && test -z "${HAVE_CLOCK_GETTIME_FALSE}"; then as_fn_error $? "conditional \"HAVE_CLOCK_GETTIME\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -15993,10 +13949,6 @@ if test -z "${PNG_MIPS_MSA_TRUE}" && test -z "${PNG_MIPS_MSA_FALSE}"; then as_fn_error $? "conditional \"PNG_MIPS_MSA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${PNG_MIPS_MMI_TRUE}" && test -z "${PNG_MIPS_MMI_FALSE}"; then - as_fn_error $? "conditional \"PNG_MIPS_MMI\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${PNG_INTEL_SSE_TRUE}" && test -z "${PNG_INTEL_SSE_FALSE}"; then as_fn_error $? "conditional \"PNG_INTEL_SSE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -16005,21 +13957,13 @@ if test -z "${PNG_POWERPC_VSX_TRUE}" && test -z "${PNG_POWERPC_VSX_FALSE}"; then as_fn_error $? "conditional \"PNG_POWERPC_VSX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${PNG_LOONGARCH_LSX_TRUE}" && test -z "${PNG_LOONGARCH_LSX_FALSE}"; then - as_fn_error $? "conditional \"PNG_LOONGARCH_LSX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${PNG_RISCV_RVV_TRUE}" && test -z "${PNG_RISCV_RVV_FALSE}"; then - as_fn_error $? "conditional \"PNG_RISCV_RVV\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL @@ -16042,65 +13986,63 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else case e in #( - e) case `(set -o) 2>/dev/null` in #( +else + case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; -esac ;; esac fi - -# Reset variables that may have inherited troublesome values from -# the environment. - -# IFS needs to be set, to space, tab, and newline, in precisely that order. -# (If _AS_PATH_WALK were called with IFS unset, it would have the -# side effect of setting IFS to empty, thus disabling word splitting.) -# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -IFS=" "" $as_nl" - -PS1='$ ' -PS2='> ' -PS4='+ ' - -# Ensure predictable behavior from utilities with locale-dependent output. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# We cannot yet rely on "unset" to work, but we need these variables -# to be unset--not just set to an empty or harmless value--now, to -# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct -# also avoids known problems related to "unset" and subshell syntax -# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). -for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH -do eval test \${$as_var+y} \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done - -# Ensure that fds 0, 1, and 2 are open. -if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi -if (exec 3>&2) ; then :; else exec 2>/dev/null; fi +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi # The user is always right. -if ${PATH_SEPARATOR+false} :; then +if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -16109,6 +14051,13 @@ if ${PATH_SEPARATOR+false} :; then fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -16117,27 +14066,43 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - test -r "$as_dir$0" && as_myself=$as_dir$0 && break + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac -# We did not find ourselves, most probably we were run as 'sh COMMAND' +# We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] @@ -16150,9 +14115,9 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - printf "%s\n" "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -16183,25 +14148,22 @@ as_fn_unset () { eval $1=; unset $1;} } as_unset=as_fn_unset - # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null -then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' -else case e in #( - e) as_fn_append () +else + as_fn_append () { eval $1=\$$1\$2 - } ;; -esac + } fi # as_fn_append # as_fn_arith ARG... @@ -16209,18 +14171,16 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null -then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else case e in #( - e) as_fn_arith () +else + as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` - } ;; -esac + } fi # as_fn_arith @@ -16247,7 +14207,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -16269,10 +14229,6 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits - -# Determine whether it's possible to make 'echo' print without a newline. -# These variables are no longer used directly by Autoconf, but are AC_SUBSTed -# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -16286,12 +14242,6 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac -# For backward compatibility with old third-party macros, we provide -# the shell variables $as_echo and $as_echo_n. New code should use -# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. -as_echo='printf %s\n' -as_echo_n='printf %s' - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -16303,9 +14253,9 @@ if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: - # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. - # In both cases, we have to default to 'cp -pR'. + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then @@ -16333,7 +14283,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -16342,7 +14292,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -16386,12 +14336,10 @@ as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. -as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" -as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. -as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" -as_tr_sh="eval sed '$as_sed_sh'" # deprecated +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 @@ -16406,8 +14354,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libpng $as_me 1.6.52, which was -generated by GNU Autoconf 2.72. Invocation command line was +This file was extended by libpng $as_me 1.6.37, which was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -16439,7 +14387,7 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -'$as_me' instantiates files and other configuration actions +\`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. @@ -16469,16 +14417,14 @@ $config_commands Report bugs to ." _ACEOF -ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` -ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config='$ac_cs_config_escaped' +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libpng config.status 1.6.52 -configured by $0, generated by GNU Autoconf 2.72, +libpng config.status 1.6.37 +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2023 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -16518,15 +14464,15 @@ do -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - printf "%s\n" "$ac_cs_version"; exit ;; + $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) - printf "%s\n" "$ac_cs_config"; exit ;; + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" @@ -16534,23 +14480,23 @@ do --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error $? "ambiguous option: '$1' -Try '$0 --help' for more information.";; + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; --help | --hel | -h ) - printf "%s\n" "$ac_cs_usage"; exit ;; + $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) as_fn_error $? "unrecognized option: '$1' -Try '$0 --help' for more information." ;; + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; @@ -16571,7 +14517,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift - \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" @@ -16585,7 +14531,7 @@ exec 5>>config.log sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - printf "%s\n" "$ac_log" + $as_echo "$ac_log" } >&5 _ACEOF @@ -16640,14 +14586,12 @@ lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_q lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' -FILECMD='`$ECHO "$FILECMD" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' -lt_ar_flags='`$ECHO "$lt_ar_flags" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' @@ -16771,13 +14715,13 @@ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ -FILECMD \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ sharedlib_from_linklib_cmd \ AR \ +AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ @@ -16897,7 +14841,7 @@ do "libpng.pc") CONFIG_FILES="$CONFIG_FILES libpng.pc:libpng.pc.in" ;; "libpng-config") CONFIG_FILES="$CONFIG_FILES libpng-config:libpng-config.in" ;; - *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -16907,9 +14851,9 @@ done # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then - test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files - test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers - test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree @@ -16917,7 +14861,7 @@ fi # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to '$tmp'. +# after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= @@ -16941,7 +14885,7 @@ ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. -# This happens for instance with './config.status config.h'. +# This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then @@ -17099,13 +15043,13 @@ fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with './config.status Makefile'. +# This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF -# Transform confdefs.h into an awk script 'defines.awk', embedded as +# Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. @@ -17215,7 +15159,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -17237,33 +15181,33 @@ do -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain ':'. + # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac - case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done - # Let's still pretend it is 'configure' which instantiates (i.e., don't + # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` - printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -printf "%s\n" "$as_me: creating $ac_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) - ac_sed_conf_input=`printf "%s\n" "$configure_input" | + ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac @@ -17280,7 +15224,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$ac_file" | +$as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -17304,9 +15248,9 @@ printf "%s\n" X"$ac_file" | case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -17368,8 +15312,8 @@ ac_sed_dataroot=' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' @@ -17382,7 +15326,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 esac _ACEOF -# Neutralize VPATH when '$srcdir' = '.'. +# Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 @@ -17413,9 +15357,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable 'datarootdir' + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir' +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" @@ -17431,20 +15375,20 @@ which seems to be undefined. Please make sure it is defined" >&2;} # if test x"$ac_file" != x-; then { - printf "%s\n" "/* $configure_input */" >&1 \ + $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else - printf "%s\n" "/* $configure_input */" >&1 \ + $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi @@ -17464,7 +15408,7 @@ $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$_am_arg" | +$as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -17484,8 +15428,8 @@ printf "%s\n" X"$_am_arg" | s/.*/./; q'`/stamp-h$_am_stamp_count ;; - :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -printf "%s\n" "$as_me: executing $ac_file commands" >&6;} + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac @@ -17511,7 +15455,7 @@ esac for am_mf do # Strip MF so we end up with the name of the file. - am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'` + am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line @@ -17523,7 +15467,7 @@ $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$am_mf" : 'X\(//\)[^/]' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$am_mf" | +$as_echo X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -17545,7 +15489,7 @@ printf "%s\n" X"$am_mf" | $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$am_mf" | +$as_echo X/"$am_mf" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -17570,15 +15514,13 @@ printf "%s\n" X/"$am_mf" | (exit $ac_status); } || am_rc=$? done if test $am_rc -ne 0; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. If GNU make was not used, consider - re-running the configure script with MAKE=\"gmake\" (or whatever is - necessary). You can also try re-running configure with the + for automatic dependency tracking. Try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). -See 'config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } fi { am_dirpart=; unset am_dirpart;} { am_filepart=; unset am_filepart;} @@ -17602,18 +15544,19 @@ See 'config.log' for more details" "$LINENO" 5; } cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 -# Copyright (C) 2024 Free Software Foundation, Inc. +# Copyright (C) 2014 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 2 of of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you @@ -17730,9 +15673,6 @@ to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd -# A file(cmd) program that detects file types. -FILECMD=$lt_FILECMD - # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -17751,11 +15691,8 @@ sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR -# Flags to create an archive (by configure). -lt_ar_flags=$lt_ar_flags - # Flags to create an archive. -AR_FLAGS=\${ARFLAGS-"\$lt_ar_flags"} +AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec @@ -17997,7 +15934,7 @@ hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e. impossible to change by setting \$shlibpath_var if the +# "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute @@ -18123,7 +16060,6 @@ _LT_EOF esac - ltmain=$ac_aux_dir/ltmain.sh @@ -18131,7 +16067,7 @@ ltmain=$ac_aux_dir/ltmain.sh # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - $SED '$q' "$ltmain" >> "$cfgfile" \ + sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || @@ -18174,8 +16110,7 @@ if test "$no_create" != yes; then $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi - diff --git a/Engine/lib/lpng/configure.ac b/Engine/lib/lpng/configure.ac index 80c15def5..52dba94b4 100644 --- a/Engine/lib/lpng/configure.ac +++ b/Engine/lib/lpng/configure.ac @@ -1,6 +1,6 @@ # configure.ac -# Copyright (c) 2018-2024 Cosmin Truta +# Copyright (c) 2018 Cosmin Truta # Copyright (c) 2004-2016 Glenn Randers-Pehrson # This code is released under the libpng license. @@ -25,8 +25,8 @@ AC_PREREQ([2.68]) dnl Version number stuff here: -AC_INIT([libpng],[1.6.52],[png-mng-implement@lists.sourceforge.net]) -AC_CONFIG_MACRO_DIR([scripts/autoconf]) +AC_INIT([libpng],[1.6.37],[png-mng-implement@lists.sourceforge.net]) +AC_CONFIG_MACRO_DIR([scripts]) # libpng does not follow GNU file name conventions (hence 'foreign') # color-tests requires automake 1.11 or later @@ -46,17 +46,17 @@ dnl automake, so the following is not necessary (and is not defined anyway): dnl AM_PREREQ([1.11.2]) dnl stop configure from automagically running automake -PNGLIB_VERSION=1.6.52 +PNGLIB_VERSION=1.6.37 PNGLIB_MAJOR=1 PNGLIB_MINOR=6 -PNGLIB_RELEASE=52 +PNGLIB_RELEASE=37 dnl End of version number stuff AC_CONFIG_SRCDIR([pngget.c]) AC_CONFIG_HEADERS([config.h]) -# Check the basic programs. +# Checks for programs. AC_LANG([C]) AC_PROG_CC AM_PROG_AS @@ -72,19 +72,16 @@ dnl compatible later version may be used LT_INIT([win32-dll]) LT_PREREQ([2.4.2]) -dnl Declare the AWK variable. -AC_ARG_VAR(AWK, [AWK language processor]) - -# Some awk implementations crash when confronted with pnglibconf.dfa. -# Run a test now, to make sure this doesn't happen. -AC_MSG_CHECKING([if awk ($AWK) works]) +# Some awks crash when confronted with pnglibconf.dfa, do a test run now +# to make sure this doesn't happen +AC_MSG_CHECKING([that AWK works]) if ${AWK} -f ${srcdir}/scripts/options.awk out="/dev/null" version=search\ ${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\ ${srcdir}/pngusr.dfa 1>&2 then - AC_MSG_RESULT([yes]) + AC_MSG_RESULT([ok]) else - AC_MSG_FAILURE([no], 1) + AC_MSG_FAILURE([failed], 1) fi # This is a remnant of the old cc -E validation, where it may have been @@ -92,29 +89,11 @@ fi DFNCPP="$CPP" AC_SUBST(DFNCPP) -AC_ARG_ENABLE([tests], - AS_HELP_STRING([--disable-tests], - [do not build the test programs (default is to build)]), - [enable_tests="$enableval"], - [enable_tests=yes]) - -AM_CONDITIONAL([ENABLE_TESTS], - [test "$enable_tests" != "no"]) - -AC_ARG_ENABLE([tools], - AS_HELP_STRING([--disable-tools], - [do not build the auxiliary tools (default is to build)]), - [enable_tools="$enableval"], - [enable_tools=yes]) - -AM_CONDITIONAL([ENABLE_TOOLS], - [test "$enable_tools" != "no"]) - -# -Werror cannot be passed to GCC in CFLAGS because configure will fail -# (it checks the compiler with a program that generates a warning). -# Add the following option to deal with this: +# -Werror cannot be passed to GCC in CFLAGS because configure will fail (it +# checks the compiler with a program that generates a warning), add the +# following option to deal with this AC_ARG_VAR(PNG_COPTS, - [additional flags for the C compiler, to be used for options that would] + [additional flags for the C compiler, use this for options that would] [cause configure itself to fail]) AC_ARG_ENABLE(werror, AS_HELP_STRING([[[--enable-werror[=OPT]]]], @@ -135,10 +114,10 @@ AC_ARG_ENABLE(werror, CFLAGS="$sav_CFLAGS" fi],) -# For GCC 5 the default mode for C is -std=gnu11 instead of -std=gnu89. -# In pngpriv.h we request just the POSIX 1003.1 and C89 APIs by defining -# _POSIX_SOURCE to 1. This is incompatible with the new default mode, so -# we test for that and force the "-std=c89" compiler option: +# For GCC 5 the default mode for C is -std=gnu11 instead of -std=gnu89 +# In pngpriv.h we request just the POSIX 1003.1 and C89 APIs by defining _POSIX_SOURCE to 1 +# This is incompatible with the new default mode, so we test for that and force the +# "-std=c89" compiler option: AC_MSG_CHECKING([if we need to force back C standard to C89]) AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([ @@ -154,17 +133,22 @@ AC_COMPILE_IFELSE( CFLAGS="$CFLAGS -std=c89" ]) -# Checks for structures and compiler characteristics. +# Checks for header files. +AC_HEADER_STDC + +# Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_TYPE_SIZE_T AC_STRUCT_TM AC_C_RESTRICT # Checks for library functions. -AC_CHECK_FUNCS([pow], , - [AC_CHECK_LIB([m], [pow], , [AC_MSG_ERROR([cannot find pow])])]) +AC_FUNC_STRTOD +AC_CHECK_FUNCS([pow], , AC_CHECK_LIB(m, pow, , AC_MSG_ERROR(cannot find pow)) ) -# Some later POSIX 1003.1 functions are required for test programs, failure -# here is soft (the corresponding test program is not built). -AC_CHECK_FUNC([clock_gettime], , [AC_MSG_WARN([not building timepng])]) +# Some later POSIX 1003.1 functions are required for test programs, failure here +# is soft (the corresponding test program is not built). +AC_CHECK_FUNC([clock_gettime],,[AC_MSG_WARN([not building timepng])]) AM_CONDITIONAL([HAVE_CLOCK_GETTIME], [test "$ac_cv_func_clock_gettime" = "yes"]) AC_ARG_WITH(zlib-prefix, @@ -172,9 +156,8 @@ AC_ARG_WITH(zlib-prefix, [prefix that may have been used in installed zlib]), [ZPREFIX=${withval}], [ZPREFIX='z_']) -AC_CHECK_LIB([z], [zlibVersion], , - [AC_CHECK_LIB([z], [${ZPREFIX}zlibVersion], , - [AC_MSG_ERROR([zlib not installed])])]) +AC_CHECK_LIB(z, zlibVersion, , + AC_CHECK_LIB(z, ${ZPREFIX}zlibVersion, , AC_MSG_ERROR(zlib not installed))) # The following is for pngvalid, to ensure it catches FP errors even on # platforms that don't enable FP exceptions, the function appears in the math @@ -226,9 +209,9 @@ AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes") if test "$have_ld_version_script" = "yes"; then AC_MSG_CHECKING([for symbol prefix]) SYMBOL_PREFIX=`echo "PREFIX=__USER_LABEL_PREFIX__" \ - | ${CPP:-${CC:-gcc} -E} - 2>&1 \ - | ${EGREP:-grep} "^PREFIX=" \ - | ${SED:-sed} -e "s:^PREFIX=::" -e "s:__USER_LABEL_PREFIX__::"` + | ${CPP-${CC-gcc} -E} - 2>&1 \ + | ${EGREP-grep} "^PREFIX=" \ + | ${SED-sed} -e "s:^PREFIX=::" -e "s:__USER_LABEL_PREFIX__::"` AC_SUBST(SYMBOL_PREFIX) AC_MSG_RESULT($SYMBOL_PREFIX) fi @@ -313,7 +296,7 @@ AC_ARG_ENABLE([unversioned-libpng-config], AM_CONDITIONAL([DO_INSTALL_LIBPNG_CONFIG], [test "$enable_unversioned_libpng_config" != "no"]) -# HOST-SPECIFIC OPTIONS +# HOST SPECIFIC OPTIONS # ===================== # # DEFAULT @@ -321,7 +304,7 @@ AM_CONDITIONAL([DO_INSTALL_LIBPNG_CONFIG], # AC_ARG_ENABLE([hardware-optimizations], AS_HELP_STRING([[[--enable-hardware-optimizations]]], - [Enable hardware optimizations: =no/off, yes/on.]), + [Enable hardware optimizations: =no/off, yes/on:]), [case "$enableval" in no|off) # disable hardware optimization on all systems: @@ -331,36 +314,24 @@ AC_ARG_ENABLE([hardware-optimizations], enable_mips_msa=no AC_DEFINE([PNG_MIPS_MSA_OPT], [0], [Disable MIPS_MSA optimizations]) - enable_mips_mmi=no - AC_DEFINE([PNG_MIPS_MMI_OPT], [0], - [Disable MIPS_MMI optimizations]) enable_powerpc_vsx=no AC_DEFINE([PNG_POWERPC_VSX_OPT], [0], [Disable POWERPC VSX optimizations]) enable_intel_sse=no AC_DEFINE([PNG_INTEL_SSE_OPT], [0], [Disable INTEL_SSE optimizations]) - enable_loongarch_lsx=no - AC_DEFINE([PNG_LOONGARCH_LSX_OPT], [0], - [Disable LOONGARCH_LSX optimizations]) - enable_riscv_rvv=no - AC_DEFINE([PNG_RISCV_RVV_OPT], [0], - [Disable RISC-V Vector optimizations]) ;; *) # allow enabling hardware optimization on any system: case "$host_cpu" in arm*|aarch64*) enable_arm_neon=yes - AC_DEFINE([PNG_ARM_NEON_OPT], [2], + AC_DEFINE([PNG_ARM_NEON_OPT], [0], [Enable ARM_NEON optimizations]) ;; mipsel*|mips64el*) - enable_mips_mmi=yes enable_mips_msa=yes - AC_DEFINE([PNG_MIPS_MMI_OPT], [1], - [Enable MIPS_MMI optimizations]) - AC_DEFINE([PNG_MIPS_MSA_OPT], [2], + AC_DEFINE([PNG_MIPS_MSA_OPT], [0], [Enable MIPS_MSA optimizations]) ;; i?86|x86_64) @@ -373,30 +344,21 @@ AC_ARG_ENABLE([hardware-optimizations], AC_DEFINE([PNG_POWERPC_VSX_OPT], [2], [Enable POWERPC VSX optimizations]) ;; - loongarch*) - enable_loongarch_lsx=yes - AC_DEFINE([PNG_LOONGARCH_LSX_OPT], [1], - [Enable LOONGARCH_LSX optimizations]) - ;; - riscv64) - enable_riscv_rvv=yes - AC_DEFINE([PNG_RISCV_RVV_OPT], [2], - [Enable RISC-V Vector optimizations]) - ;; esac ;; esac]) -# ARM NEON -# ======== +# ARM +# === +# +# ARM NEON (SIMD) support. AC_ARG_ENABLE([arm-neon], AS_HELP_STRING([[[--enable-arm-neon]]], - [Enable ARM NEON optimizations: =no/off, check, api, yes/on.] - [no/off: disable the optimizations;] - [check: use internal checking code (deprecated and poorly supported);] - [api: disable by default, enable by a call to png_set_option;] - [yes/on: turn on unconditionally.] + [Enable ARM NEON optimizations: =no/off, check, api, yes/on:] + [no/off: disable the optimizations; check: use internal checking code] + [(deprecated and poorly supported); api: disable by default, enable by] + [a call to png_set_option; yes/on: turn on unconditionally.] [If not specified: determined by the compiler.]), [case "$enableval" in no|off) @@ -404,7 +366,7 @@ AC_ARG_ENABLE([arm-neon], AC_DEFINE([PNG_ARM_NEON_OPT], [0], [Disable ARM Neon optimizations]) # Prevent inclusion of the assembler files below: - enable_arm_neon=no ;; + enable_arm_neon=no;; check) AC_DEFINE([PNG_ARM_NEON_CHECK_SUPPORTED], [], [Check for ARM Neon support at run-time]);; @@ -414,35 +376,35 @@ AC_ARG_ENABLE([arm-neon], yes|on) AC_DEFINE([PNG_ARM_NEON_OPT], [2], [Enable ARM Neon optimizations]) - AC_MSG_WARN([--enable-arm-neon: please specify 'check' or 'api';] - [if you want the optimizations unconditionally,] - [pass '-mfpu=neon' to the compiler.]);; + AC_MSG_WARN([--enable-arm-neon: please specify 'check' or 'api', if] + [you want the optimizations unconditionally pass -mfpu=neon] + [to the compiler.]);; *) - AC_MSG_ERROR([--enable-arm-neon=${enable_arm_neon}:] - [invalid argument]) + AC_MSG_ERROR([--enable-arm-neon=${enable_arm_neon}: invalid value]) esac]) -# Add ARM-specific files to all builds where $host_cpu is arm ('arm*') or -# where ARM optimizations were explicitly requested. (This allows a fallback -# if a future host CPU does not match 'arm*'.) +# Add ARM specific files to all builds where the host_cpu is arm ('arm*') or +# where ARM optimizations were explicitly requested (this allows a fallback if a +# future host CPU does not match 'arm*') AM_CONDITIONAL([PNG_ARM_NEON], [test "$enable_arm_neon" != 'no' && case "$host_cpu" in - arm*|aarch64*) : ;; - *) test "$enable_arm_neon" != '' ;; + arm*|aarch64*) :;; + *) test "$enable_arm_neon" != '';; esac]) -# MIPS MSA -# ======== +# MIPS +# === +# +# MIPS MSA (SIMD) support. AC_ARG_ENABLE([mips-msa], AS_HELP_STRING([[[--enable-mips-msa]]], - [Enable MIPS MSA optimizations: =no/off, check, api, yes/on.] - [no/off: disable the optimizations;] - [check: use internal checking code (deprecated and poorly supported);] - [api: disable by default, enable by a call to png_set_option;] - [yes/on: turn on unconditionally.] + [Enable MIPS MSA optimizations: =no/off, check, api, yes/on:] + [no/off: disable the optimizations; check: use internal checking code] + [(deprecated and poorly supported); api: disable by default, enable by] + [a call to png_set_option; yes/on: turn on unconditionally.] [If not specified: determined by the compiler.]), [case "$enableval" in no|off) @@ -450,7 +412,7 @@ AC_ARG_ENABLE([mips-msa], AC_DEFINE([PNG_MIPS_MSA_OPT], [0], [Disable MIPS MSA optimizations]) # Prevent inclusion of the assembler files below: - enable_mips_msa=no ;; + enable_mips_msa=no;; check) AC_DEFINE([PNG_MIPS_MSA_CHECK_SUPPORTED], [], [Check for MIPS MSA support at run-time]);; @@ -460,75 +422,31 @@ AC_ARG_ENABLE([mips-msa], yes|on) AC_DEFINE([PNG_MIPS_MSA_OPT], [2], [Enable MIPS MSA optimizations]) - AC_MSG_WARN([--enable-mips-msa: please specify 'check' or 'api';] - [if you want the optimizations unconditionally,] - [pass '-mmsa -mfp64' to the compiler.]);; + AC_MSG_WARN([--enable-mips-msa: please specify 'check' or 'api', if] + [you want the optimizations unconditionally pass '-mmsa -mfp64'] + [to the compiler.]);; *) - AC_MSG_ERROR([--enable-mips-msa=${enable_mips_msa}:] - [invalid argument]) + AC_MSG_ERROR([--enable-mips-msa=${enable_mips_msa}: invalid value]) esac]) -# Add MIPS-specific files to all builds where $host_cpu is mips ('mips*') or -# where MIPS optimizations were explicitly requested. (This allows a fallback -# if a future host CPU does not match 'mips*'.) +# Add MIPS specific files to all builds where the host_cpu is mips ('mips*') or +# where MIPS optimizations were explicitly requested (this allows a fallback if a +# future host CPU does not match 'mips*') AM_CONDITIONAL([PNG_MIPS_MSA], [test "$enable_mips_msa" != 'no' && case "$host_cpu" in - mipsel*|mips64el*) : ;; + mipsel*|mips64el*) :;; esac]) -# MIPS MMI -# ======== - -AC_ARG_ENABLE([mips-mmi], - AS_HELP_STRING([[[--enable-mips-mmi]]], - [Enable MIPS MMI optimizations: =no/off, check, api, yes/on.] - [no/off: disable the optimizations;] - [check: use internal checking code (deprecated and poorly supported);] - [api: disable by default, enable by a call to png_set_option;] - [yes/on: turn on unconditionally.] - [If not specified: determined by the compiler.]), - [case "$enableval" in - no|off) - # disable the default enabling on __mips_mmi systems: - AC_DEFINE([PNG_MIPS_MMI_OPT], [0], - [Disable MIPS MMI optimizations]) - # Prevent inclusion of the assembler files below: - enable_mips_mmi=no;; - check) - AC_DEFINE([PNG_MIPS_MMI_CHECK_SUPPORTED], [], - [Check for MIPS MMI support at run-time]);; - api) - AC_DEFINE([PNG_MIPS_MMI_API_SUPPORTED], [], - [Turn on MIPS MMI optimizations at run-time]);; - yes|on) - AC_DEFINE([PNG_MIPS_MMI_OPT], [1], - [Enable MIPS MMI optimizations]) - AC_MSG_WARN([--enable-mips-mmi: please specify 'check' or 'api';] - [if you want the optimizations unconditionally] - [pass '-mloongson-mmi -march=loongson3a' to the compiler.]);; - *) - AC_MSG_ERROR([--enable-mips-mmi=${enable_mips_mmi}:] - [invalid argument]) - esac]) - -# Add MIPS specific files to all builds where the host_cpu is mips ('mips*') or -# where MIPS optimizations were explicitly requested. (This allows a fallback -# if a future host CPU does not match 'mips*'.) - -AM_CONDITIONAL([PNG_MIPS_MMI], - [test "$enable_mips_mmi" != 'no' && - case "$host_cpu" in - mipsel*|mips64el*) : ;; - esac]) - -# INTEL SSE -# ========= +# INTEL +# ===== +# +# INTEL SSE (SIMD) support. AC_ARG_ENABLE([intel-sse], AS_HELP_STRING([[[--enable-intel-sse]]], - [Enable Intel SSE optimizations: =no/off, yes/on.] + [Enable Intel SSE optimizations: =no/off, yes/on:] [no/off: disable the optimizations;] [yes/on: enable the optimizations.] [If not specified: determined by the compiler.]), @@ -538,34 +456,34 @@ AC_ARG_ENABLE([intel-sse], AC_DEFINE([PNG_INTEL_SSE_OPT], [0], [Disable Intel SSE optimizations]) # Prevent inclusion of the assembler files below: - enable_intel_sse=no ;; + enable_intel_sse=no;; yes|on) AC_DEFINE([PNG_INTEL_SSE_OPT], [1], [Enable Intel SSE optimizations]);; *) - AC_MSG_ERROR([--enable-intel-sse=${enable_intel_sse}:] - [invalid argument]) + AC_MSG_ERROR([--enable-intel-sse=${enable_intel_sse}: invalid value]) esac]) -# Add Intel-specific files to all builds where $host_cpu is Intel ('x86*') or -# where Intel optimizations were explicitly requested. (This allows a fallback -# if a future host CPU does not match 'x86*'.) +# Add Intel specific files to all builds where the host_cpu is Intel ('x86*') +# or where Intel optimizations were explicitly requested (this allows a +# fallback if a future host CPU does not match 'x86*') AM_CONDITIONAL([PNG_INTEL_SSE], [test "$enable_intel_sse" != 'no' && case "$host_cpu" in - i?86|x86_64) : ;; - *) test "$enable_intel_sse" != '' ;; + i?86|x86_64) :;; + *) test "$enable_intel_sse" != '';; esac]) -# POWERPC VSX -# =========== +# PowerPC +# === +# +# PowerPC VSX (SIMD) support. AC_ARG_ENABLE([powerpc-vsx], AS_HELP_STRING([[[--enable-powerpc-vsx]]], - [Enable POWERPC VSX optimizations: =no/off, check, api, yes/on.] - [no/off: disable the optimizations;] - [check: use internal checking code;] - [api: disable by default, enable by a call to png_set_option;] + [Enable POWERPC VSX optimizations: =no/off, check, api, yes/on:] + [no/off: disable the optimizations; check: use internal checking code] + [api: disable by default, enable by a call to png_set_option] [yes/on: turn on unconditionally.] [If not specified: determined by the compiler.]), [case "$enableval" in @@ -573,167 +491,36 @@ AS_HELP_STRING([[[--enable-powerpc-vsx]]], # disable the default enabling on __ppc64__ systems: AC_DEFINE([PNG_POWERPC_VSX_OPT], [0], [Disable POWERPC VSX optimizations]) - # Prevent inclusion of the platform-specific files below: - enable_powerpc_vsx=no ;; + # Prevent inclusion of the platform specific files below: + enable_powerpc_vsx=no;; check) AC_DEFINE([PNG_POWERPC_VSX_CHECK_SUPPORTED], [], [Check for POWERPC VSX support at run-time]) - AC_MSG_WARN([--enable-powerpc-vsx: please see contrib/powerpc/README] - [for the list of supported systems.]);; + AC_MSG_WARN([--enable-powerpc-vsx Please check contrib/powerpc/README file] + [for the list of supported OSes.]);; api) AC_DEFINE([PNG_POWERPC_VSX_API_SUPPORTED], [], [Turn on POWERPC VSX optimizations at run-time]);; yes|on) AC_DEFINE([PNG_POWERPC_VSX_OPT], [2], [Enable POWERPC VSX optimizations]) - AC_MSG_WARN([--enable-powerpc-vsx: please specify 'check' or 'api';] - [if you want the optimizations unconditionally,] - [pass '-maltivec -mvsx' or '-mcpu=power8' to the compiler.]);; + AC_MSG_WARN([--enable-powerpc-vsx: please specify 'check' or 'api', if] + [you want the optimizations unconditionally pass '-maltivec -mvsx'] + [or '-mcpu=power8'to the compiler.]);; *) - AC_MSG_ERROR([--enable-powerpc-vsx=${enable_powerpc_vsx}:] - [invalid argument]) + AC_MSG_ERROR([--enable-powerpc-vsx=${enable_powerpc_vsx}: invalid value]) esac]) -# Add PowerPC-specific files to all builds where $host_cpu is powerpc -# ('powerpc*') or where PowerPC optimizations were explicitly requested. -# (This allows a fallback if a future host CPU does not match 'powerpc*'.) +# Add PowerPC specific files to all builds where the host_cpu is powerpc('powerpc*') or +# where POWERPC optimizations were explicitly requested (this allows a fallback if a +# future host CPU does not match 'powerpc*') AM_CONDITIONAL([PNG_POWERPC_VSX], [test "$enable_powerpc_vsx" != 'no' && case "$host_cpu" in - powerpc*|ppc64*) : ;; + powerpc*|ppc64*) :;; esac]) -# LOONGARCH LSX -# ============= - -AC_ARG_ENABLE([loongarch-lsx], - AS_HELP_STRING([[[--enable-loongarch-lsx]]], - [Enable LOONGARCH LSX optimizations: =no/off, yes/on:] - [no/off: disable the optimizations;] - [yes/on: turn on unconditionally.] - [If not specified: determined by the compiler.]), - [case "$enableval" in - no|off) - # disable the default enabling on __loongarch_simd systems: - AC_DEFINE([PNG_LOONGARCH_LSX_OPT], [0], - [Disable LOONGARCH LSX optimizations]) - # Prevent inclusion of the assembler files below: - enable_loongarch_lsx=no;; - yes|on) - AC_DEFINE([PNG_LOONGARCH_LSX_OPT], [1], - [Enable LOONGARCH LSX optimizations]) - ;; - *) - AC_MSG_ERROR([--enable-loongarch-lsx=${enable_loongarch_lsx}:] - [invalid argument]) - esac]) - -if test "$enable_loongarch_lsx" != "no" && - case "$host_cpu" in - loongarch*) : ;; - *) test "$enable_loongarch_lsx" != '' ;; - esac -then - compiler_support_loongarch_lsx=no - AC_MSG_CHECKING(whether to use LoongArch LSX intrinsics) - save_CFLAGS="$CFLAGS" - LSX_CFLAGS="${LSX_CFLAGS:-"-mlsx"}" - CFLAGS="$CFLAGS $LSX_CFLAGS" - AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ -#include -int main(){ - __m128i a, b, c; - a = __lsx_vadd_w(b, c); - return 0; -}]])],compiler_support_loongarch_lsx=yes) - CFLAGS="$save_CFLAGS" - AC_MSG_RESULT($compiler_support_loongarch_lsx) - if test "$compiler_support_loongarch_lsx" = "yes"; then - AC_DEFINE([PNG_LOONGARCH_LSX_OPT], [1], - [Enable LOONGARCH LSX optimizations]) - else - AC_MSG_WARN([Compiler does not support loongarch LSX.]) - fi -fi - -# Add LoongArch specific files to all builds where the host_cpu is loongarch -# ('loongarch*') or where LoongArch optimizations were explicitly requested. -# (This allows a fallback if a future host CPU does not match 'loongarch*'.) - -AM_CONDITIONAL([PNG_LOONGARCH_LSX], - [test "$enable_loongarch_lsx" != "no" && - test "$compiler_support_loongarch_lsx" = "yes" && - case "$host_cpu" in - loongarch*) : ;; - *) test "$enable_loongarch_lsx" != '' ;; - esac]) - -# RISC-V -# ====== -# -# RISC-V Vector support. - -AC_ARG_ENABLE([riscv-rvv], -AS_HELP_STRING([[[--enable-riscv-rvv]]], - [Enable RISC-V Vector optimizations: =no/off, check, api, yes/on:] - [no/off: disable the optimizations; check: use internal checking code] - [api: disable by default, enable by a call to png_set_option] - [yes/on: turn on. If not specified: determined by the compiler.]), - [case "$enableval" in - no|off) - # disable the default enabling on __riscv systems: - AC_DEFINE([PNG_RISCV_RVV_OPT], [0], - [Disable RISC-V Vector optimizations]) - # Prevent inclusion of the platform-specific files below: - enable_riscv_rvv=no ;; - yes|on) - AC_DEFINE([PNG_RISCV_RVV_OPT], [2], - [Enable RISC-V Vector optimizations]) - AC_MSG_WARN([--enable-riscv-rvv:] - [if you want the optimizations pass e.g. '-march=rv64gv1p0' to the compiler.]);; - *) - AC_MSG_ERROR([--enable-riscv-rvv=${enable_riscv_rvv}: invalid value]) - esac]) - -if test "$enable_riscv_rvv" != "no" && - case "$host_cpu" in - riscv64) : ;; - *) test "$enable_riscv_rvv" != '' ;; - esac -then - compiler_support_riscv_rvv=no - AC_MSG_CHECKING(whether to use RISC-V RVV intrinsics) - - AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ -#include -int main() { - const float src[] = { 0.0f, 0.0f, 0.0f, 0.0f }; - uint64_t ptr[2] = {0x0908060504020100, 0xFFFFFFFF0E0D0C0A}; - vuint8m1_t a = __riscv_vreinterpret_v_u64m1_u8m1(__riscv_vle64_v_u64m1(ptr, 2)); - vfloat32m1_t val = __riscv_vle32_v_f32m1((const float*)(src), 4); - return (int)__riscv_vfmv_f_s_f32m1_f32(val); -}]])],compiler_support_riscv_rvv=yes) - AC_MSG_RESULT($compiler_support_riscv_rvv) - if test "$compiler_support_riscv_rvv" = "yes"; then - AC_DEFINE([PNG_RISCV_RVV_OPT], [1], - [Enable RISCV RVV optimizations]) - else - AC_MSG_WARN([Compiler does not support riscv rvv.]) - fi -fi - -# Add RISC-V-specific files to all builds where $host_cpu is riscv ('riscv64') -# or where RISC-V optimizations were explicitly requested (this allows a fallback -# if a future host CPU does not match 'riscv64') - -AM_CONDITIONAL([PNG_RISCV_RVV], - [test "$enable_riscv_rvv" != "no" && - test "$compiler_support_riscv_rvv" = "yes" && - case "$host_cpu" in - riscv64) : ;; - *) test "$compiler_support_riscv_rvv" != '' ;; - esac]) AC_MSG_NOTICE([[Extra options for compiler: $PNG_COPTS]]) diff --git a/Engine/lib/lpng/contrib/.editorconfig b/Engine/lib/lpng/contrib/.editorconfig deleted file mode 100644 index 8b1466b1d..000000000 --- a/Engine/lib/lpng/contrib/.editorconfig +++ /dev/null @@ -1,9 +0,0 @@ -# https://editorconfig.org - -root = false - -[*.[ch]] -indent_size = unset -indent_style = unset -max_doc_length = unset -max_line_length = unset diff --git a/Engine/lib/lpng/contrib/README.txt b/Engine/lib/lpng/contrib/README.txt index 34dfbae4c..97963c6d5 100644 --- a/Engine/lib/lpng/contrib/README.txt +++ b/Engine/lib/lpng/contrib/README.txt @@ -1,5 +1,3 @@ -External contributions to libpng --------------------------------- This "contrib" directory contains contributions which are not necessarily under the libpng license, although all are open source. They are not part of diff --git a/Engine/lib/lpng/contrib/arm-neon/android-ndk.c b/Engine/lib/lpng/contrib/arm-neon/android-ndk.c index c72c468a7..fb3a4898d 100644 --- a/Engine/lib/lpng/contrib/arm-neon/android-ndk.c +++ b/Engine/lib/lpng/contrib/arm-neon/android-ndk.c @@ -2,6 +2,7 @@ * * Copyright (c) 2014 Glenn Randers-Pehrson * Written by John Bowler, 2014. + * Last changed in libpng 1.6.10 [March 6, 2014] * * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer @@ -23,7 +24,6 @@ * has been compiled only, not linked: no version of the library has been found, * only the header files exist in the NDK. */ - #include static int diff --git a/Engine/lib/lpng/contrib/arm-neon/linux-auxv.c b/Engine/lib/lpng/contrib/arm-neon/linux-auxv.c index c5d7f5127..4d26bd3b3 100644 --- a/Engine/lib/lpng/contrib/arm-neon/linux-auxv.c +++ b/Engine/lib/lpng/contrib/arm-neon/linux-auxv.c @@ -2,6 +2,7 @@ * * Copyright (c) 2014 Glenn Randers-Pehrson * Written by Mans Rullgard, 2011. + * Last changed in libpng 1.6.10 [March 6, 2014] * * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer @@ -21,7 +22,6 @@ * This generic __linux__ implementation requires reading /proc/self/auxv and * looking at each element for one that records NEON capabilities. */ - #include /* for POSIX 1003.1 */ #include /* for EINTR */ diff --git a/Engine/lib/lpng/contrib/arm-neon/linux.c b/Engine/lib/lpng/contrib/arm-neon/linux.c index b5429d0c3..a9bc360dd 100644 --- a/Engine/lib/lpng/contrib/arm-neon/linux.c +++ b/Engine/lib/lpng/contrib/arm-neon/linux.c @@ -1,5 +1,6 @@ /* contrib/arm-neon/linux.c * + * Last changed in libpng 1.6.31 [July 27, 2017] * Copyright (c) 2014, 2017 Glenn Randers-Pehrson * Written by John Bowler, 2014, 2017. * @@ -18,7 +19,6 @@ * This code is strict ANSI-C and is probably moderately portable; it does * however use and it assumes that /proc/cpuinfo is never localized. */ - #include static int diff --git a/Engine/lib/lpng/contrib/conftest/basic.dfa b/Engine/lib/lpng/contrib/conftest/basic.dfa deleted file mode 100644 index f9ae5c346..000000000 --- a/Engine/lib/lpng/contrib/conftest/basic.dfa +++ /dev/null @@ -1,133 +0,0 @@ -# basic.dfa -# Build time configuration of libpng -# -# Author: John Bowler -# Copyright: (c) John Bowler, 2024 -# Usage rights: -# To the extent possible under law, the author has waived all copyright and -# related or neighboring rights to this work. This work is published from: -# United States. -# -# Build libpng with basic read and write support. This enables the lowest -# level libpng read and write APIs - the "row-by-row" ones. -# -# Support is enabled only for those transformations that are observed to be -# required by widely used apps or are in the v3 specification. -# - -everything = off - -# The sequential read code is enabled here; the progressive code can be used -# instead but there is no point enabling both. - -option READ on -option SEQUENTIAL_READ on -option EASY_ACCESS on -option SET_USER_LIMITS on -option INFO_IMAGE on -option READ_16BIT on - -# Errors: these can be disabled but then there won't be any error messages -# just failures and the error messages are really needed for apps: -option WARNINGS on -option ERROR_TEXT on -option BENIGN_READ_ERRORS on - -# Required for many display programs such as web browsers: -option PROGRESSIVE_READ on - -# Switch on the write code - this makes a minimalist encoder but with -# interlace support turned on; otherwise png_read_png..png_write_png will -# fail on an interlaced image. -option WRITE on -option WRITE_INTERLACING on -option WRITE_16BIT on - -# Usages of the 'fixed' APIs are relatively rare but they do occur -# one or the other for both the API and the internal math. - -#Fixed point: -option FIXED_POINT on - -#Floating point: -option FLOATING_POINT on -option FLOATING_ARITHMETIC on - -# Basic error handling, IO and user memory support. The latter allows the -# application program to provide its own implementations of 'malloc' and 'free'. -option SETJMP on -option STDIO on -option USER_MEM on - -# Gamma handling: this needs to be on for the gamma handling -option READ_GAMMA on - -# The supported chunks -chunk bKGD on -chunk cHRM on -chunk eXIf on -chunk gAMA on -chunk iCCP on -chunk iTXt on -chunk pHYs on -chunk sBIT on -chunk sRGB on -chunk tEXt on -chunk tIME on -chunk tRNS on -chunk zTXt on - -# These don't seem to be used anywhere: -# chunk pCAL -# chunk sCAL -# chunk sPLT - -# The rest of this is app dependent: none of these options are required for -# read/write of the full range of PNG files and the normal chunk handling on -# read. -option WRITE_CUSTOMIZE_ZTXT_COMPRESSION on -option WRITE_CUSTOMIZE_COMPRESSION on - -option READ_EXPAND on -option READ_FILLER on -option READ_GRAY_TO_RGB on -option READ_INVERT on -option READ_PACK on -option READ_RGB_TO_GRAY on -option READ_SCALE_16_TO_8 on -option READ_SHIFT on -option READ_STRIP_16_TO_8 on -option READ_STRIP_ALPHA on -option READ_SWAP on - -option CONVERT_tIME on - -# optipng -option IO_STATE on -option STORE_UNKNOWN_CHUNKS on -option HANDLE_AS_UNKNOWN on - -# pngcrush -option READ_USER_TRANSFORM on -option WRITE_FLUSH on - -# pnmtopng -chunk hIST on - -# cairo -option WRITE_PACKSWAP on -option WRITE_USER_TRANSFORM on - -# graphicsmagick -option READ_USER_CHUNKS on - -# Qt5.15 qtgui (gentoo package split) Qt6.6 qtbase -option READ_BGR on -option WRITE_BGR on -option READ_SWAP_ALPHA on -option WRITE_SWAP_ALPHA on -chunk oFFs on - -# ghostscript-gpl -option WRITE_INVERT_ALPHA on -option WRITE_INVERT on diff --git a/Engine/lib/lpng/contrib/conftest/fixed.dfa b/Engine/lib/lpng/contrib/conftest/fixed.dfa deleted file mode 100644 index cb45f0136..000000000 --- a/Engine/lib/lpng/contrib/conftest/fixed.dfa +++ /dev/null @@ -1,15 +0,0 @@ -# fixed.dfa -# Build time configuration of libpng -# -# Author: John Bowler -# Copyright: (c) John Bowler, 2025 -# Usage rights: -# To the extent possible under law, the author has waived all copyright and -# related or neighboring rights to this work. This work is published from: -# United States. -# -# Test the standard libpng configuration without floating point (the internal -# fixed point implementations are used instead). -# -option FLOATING_ARITHMETIC off -option FLOATING_POINT off diff --git a/Engine/lib/lpng/contrib/conftest/float-fixed.dfa b/Engine/lib/lpng/contrib/conftest/float-fixed.dfa deleted file mode 100644 index c13da3198..000000000 --- a/Engine/lib/lpng/contrib/conftest/float-fixed.dfa +++ /dev/null @@ -1,14 +0,0 @@ -# fixed-float.dfa -# Build time configuration of libpng -# -# Author: John Bowler -# Copyright: (c) John Bowler, 2025 -# Usage rights: -# To the extent possible under law, the author has waived all copyright and -# related or neighboring rights to this work. This work is published from: -# United States. -# -# Test the standard libpng configuration with the fixed point internal -# implementation in place of the default floating point -# -option FLOATING_ARITHMETIC off diff --git a/Engine/lib/lpng/contrib/conftest/nocompile-limits.dfa b/Engine/lib/lpng/contrib/conftest/nocompile-limits.dfa deleted file mode 100644 index 24e1e2e08..000000000 --- a/Engine/lib/lpng/contrib/conftest/nocompile-limits.dfa +++ /dev/null @@ -1,21 +0,0 @@ -# nolimits.dfa -# Build time configuration of libpng -# -# Author: John Bowler -# Copyright: (c) John Bowler, 2025 -# -# Usage rights: -# To the extent possible under law, the author has waived all copyright and -# related or neighboring rights to this work. This work is published from: -# United States. -# -# Build libpng without any limits and without run-time settable limits. Turning -# USER_LIMITS off reduces libpng code size by allowing compile-time elimination -# of some checking code. -# -option USER_LIMITS off - -@# define PNG_USER_WIDTH_MAX PNG_UINT_31_MAX -@# define PNG_USER_HEIGHT_MAX PNG_UINT_31_MAX -@# define PNG_USER_CHUNK_CACHE_MAX 0 -@# define PNG_USER_CHUNK_MALLOC_MAX 0 diff --git a/Engine/lib/lpng/contrib/conftest/nolimits.dfa b/Engine/lib/lpng/contrib/conftest/nolimits.dfa deleted file mode 100644 index 5b37fcf72..000000000 --- a/Engine/lib/lpng/contrib/conftest/nolimits.dfa +++ /dev/null @@ -1,19 +0,0 @@ -# nolimits.dfa -# Build time configuration of libpng -# -# Author: John Bowler -# Copyright: (c) John Bowler, 2025 -# -# Usage rights: -# To the extent possible under law, the author has waived all copyright and -# related or neighboring rights to this work. This work is published from: -# United States. -# -# Build libpng without any limits. With these settigs run-time limits are still -# possible. -# -@# define PNG_USER_WIDTH_MAX PNG_UINT_31_MAX -@# define PNG_USER_HEIGHT_MAX PNG_UINT_31_MAX -@# define PNG_USER_CHUNK_CACHE_MAX 0 -@# define PNG_USER_CHUNK_MALLOC_MAX 0 - diff --git a/Engine/lib/lpng/contrib/conftest/read-full.dfa b/Engine/lib/lpng/contrib/conftest/read-full.dfa deleted file mode 100644 index 4860f83dd..000000000 --- a/Engine/lib/lpng/contrib/conftest/read-full.dfa +++ /dev/null @@ -1,13 +0,0 @@ -# read-full.dfa -# Build time configuration of libpng -# -# Author: John Bowler -# Copyright: (c) John Bowler, 2025 -# Usage rights: -# To the extent possible under law, the author has waived all copyright and -# related or neighboring rights to this work. This work is published from: -# United States. -# -# Build libpng with no write support and full read support. -# -option WRITE off diff --git a/Engine/lib/lpng/contrib/conftest/write-full.dfa b/Engine/lib/lpng/contrib/conftest/write-full.dfa deleted file mode 100644 index 2daf0b055..000000000 --- a/Engine/lib/lpng/contrib/conftest/write-full.dfa +++ /dev/null @@ -1,13 +0,0 @@ -# write-full.dfa -# Build time configuration of libpng -# -# Author: John Bowler -# Copyright: (c) John Bowler, 2025 -# Usage rights: -# To the extent possible under law, the author has waived all copyright and -# related or neighboring rights to this work. This work is published from: -# United States. -# -# Build libpng with no read support and full write support. -# -option READ off diff --git a/Engine/lib/lpng/contrib/examples/.clang-format b/Engine/lib/lpng/contrib/examples/.clang-format deleted file mode 100644 index eb26af615..000000000 --- a/Engine/lib/lpng/contrib/examples/.clang-format +++ /dev/null @@ -1,143 +0,0 @@ ---- -Language: Cpp -AccessModifierOffset: -3 -AlignAfterOpenBracket: Align -AlignArrayOfStructures: None -AlignConsecutiveAssignments: - Enabled: false -AlignConsecutiveBitFields: - Enabled: false -AlignConsecutiveDeclarations: - Enabled: false -AlignConsecutiveMacros: - Enabled: false -AlignConsecutiveShortCaseStatements: - Enabled: false -AlignEscapedNewlines: DontAlign -AlignOperands: false -AlignTrailingComments: - Kind: Never - OverEmptyLines: 0 -AllowAllArgumentsOnNextLine: true -AllowAllParametersOfDeclarationOnNextLine: true -AllowBreakBeforeNoexceptSpecifier: Never -AllowShortBlocksOnASingleLine: Never -AllowShortCaseExpressionOnASingleLine: true -AllowShortCaseLabelsOnASingleLine: true -AllowShortCompoundRequirementOnASingleLine: true -AllowShortEnumsOnASingleLine: false -AllowShortFunctionsOnASingleLine: None -AllowShortIfStatementsOnASingleLine: Never -AllowShortLambdasOnASingleLine: All -AllowShortLoopsOnASingleLine: false -AllowShortNamespacesOnASingleLine: false -AlwaysBreakBeforeMultilineStrings: false -BinPackArguments: true -BinPackParameters: BinPack -BitFieldColonSpacing: Both -BraceWrapping: - AfterCaseLabel: true - AfterClass: true - AfterControlStatement: Always - AfterEnum: true - AfterExternBlock: false - AfterFunction: true - AfterNamespace: false - AfterObjCDeclaration: true - AfterStruct: true - AfterUnion: true - BeforeCatch: true - BeforeElse: true - BeforeLambdaBody: false - BeforeWhile: false - IndentBraces: false - SplitEmptyFunction: true - SplitEmptyRecord: true - SplitEmptyNamespace: true -BreakAdjacentStringLiterals: true -BreakAfterAttributes: Leave -BreakAfterJavaFieldAnnotations: false -BreakAfterReturnType: TopLevel -BreakArrays: true -BreakBeforeBinaryOperators: None -BreakBeforeConceptDeclarations: Always -BreakBeforeBraces: Custom -BreakBeforeTernaryOperators: false -BreakStringLiterals: false -BreakTemplateDeclarations: MultiLine -ColumnLimit: 79 -ContinuationIndentWidth: 3 -DerivePointerAlignment: true -EmptyLineAfterAccessModifier: Never -EmptyLineBeforeAccessModifier: LogicalBlock -FixNamespaceComments: true -IncludeBlocks: Preserve -IndentAccessModifiers: false -IndentCaseBlocks: true -IndentCaseLabels: true -IndentExportBlock: true -IndentExternBlock: AfterExternBlock -IndentGotoLabels: false -IndentPPDirectives: None -IndentRequiresClause: true -IndentWidth: 3 -IndentWrappedFunctionNames: false -KeepEmptyLines: - AtEndOfFile: false - AtStartOfBlock: false - AtStartOfFile: false -KeepFormFeed: false -MaxEmptyLinesToKeep: 2 -NamespaceIndentation: None -PackConstructorInitializers: Never -PointerAlignment: Left -QualifierAlignment: Custom -QualifierOrder: [static, inline, constexpr, const, volatile, restrict, type] -ReferenceAlignment: Pointer -ReflowComments: Never -RequiresClausePosition: OwnLine -RequiresExpressionIndentation: OuterScope -SortIncludes: false -SortUsingDeclarations: LexicographicNumeric -SpaceAfterCStyleCast: false -SpaceAfterLogicalNot: false -SpaceAfterTemplateKeyword: true -SpaceAroundPointerQualifiers: Default -SpaceBeforeAssignmentOperators: true -SpaceBeforeCaseColon: false -SpaceBeforeCpp11BracedList: false -SpaceBeforeCtorInitializerColon: true -SpaceBeforeInheritanceColon: true -SpaceBeforeJsonColon: false -SpaceBeforeParens: ControlStatements -SpaceBeforeParensOptions: - AfterControlStatements: true - AfterFunctionDefinitionName: false - AfterFunctionDeclarationName: false - AfterOverloadedOperator: false - AfterPlacementOperator: true - AfterRequiresInClause: false - AfterRequiresInExpression: false - BeforeNonEmptyParentheses: false -SpaceBeforeRangeBasedForLoopColon: true -SpaceBeforeSquareBrackets: false -SpaceInEmptyBlock: false -SpacesBeforeTrailingComments: 1 -SpacesInAngles: Never -SpacesInContainerLiterals: true -SpacesInLineCommentPrefix: - Minimum: 1 - Maximum: -1 -SpacesInParens: Never -SpacesInParensOptions: - ExceptDoubleParentheses: false - InCStyleCasts: false - InConditionalStatements: false - InEmptyParentheses: false - Other: false -SpacesInSquareBrackets: false -Standard: Latest -TabWidth: 8 -UseTab: Never -WrapNamespaceBodyWithEmptyLines: Leave -... diff --git a/Engine/lib/lpng/contrib/examples/README.txt b/Engine/lib/lpng/contrib/examples/README.txt index 7833d536c..48dab4f0f 100644 --- a/Engine/lib/lpng/contrib/examples/README.txt +++ b/Engine/lib/lpng/contrib/examples/README.txt @@ -1,3 +1,4 @@ + This directory (contrib/examples) contains examples of libpng usage. NO COPYRIGHT RIGHTS ARE CLAIMED TO ANY OF THE FILES IN THIS DIRECTORY. diff --git a/Engine/lib/lpng/contrib/examples/iccfrompng.c b/Engine/lib/lpng/contrib/examples/iccfrompng.c index 0e095abb1..00056abfd 100644 --- a/Engine/lib/lpng/contrib/examples/iccfrompng.c +++ b/Engine/lib/lpng/contrib/examples/iccfrompng.c @@ -26,9 +26,8 @@ #include -#if !defined(PNG_iCCP_SUPPORTED) || !defined(PNG_READ_SUPPORTED) -#error This program requires libpng supporting the iCCP chunk and the read API -#endif +#if defined(PNG_READ_SUPPORTED) && defined(PNG_STDIO_SUPPORTED) && \ + defined (PNG_iCCP_SUPPORTED) static int verbose = 1; @@ -37,8 +36,7 @@ static png_byte no_profile[] = "no profile"; static png_bytep extract(FILE *fp, png_uint_32 *proflen) { - png_structp png_ptr = - png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); + png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,0,0,0); png_infop info_ptr = NULL; png_bytep result = NULL; @@ -71,7 +69,7 @@ extract(FILE *fp, png_uint_32 *proflen) png_bytep profile; if (png_get_iCCP(png_ptr, info_ptr, &name, &compression_type, &profile, - proflen) & PNG_INFO_iCCP) + proflen) & PNG_INFO_iCCP) { result = malloc(*proflen); if (result != NULL) @@ -82,7 +80,7 @@ extract(FILE *fp, png_uint_32 *proflen) } else - result = no_profile; + result = no_profile; } png_destroy_read_struct(&png_ptr, &info_ptr, NULL); @@ -109,7 +107,7 @@ extract_one_file(const char *filename) const char *ep = strrchr(filename, '.'); if (ep != NULL) - len = ep - filename; + len = ep-filename; else len = strlen(filename); @@ -121,14 +119,14 @@ extract_one_file(const char *filename) FILE *of; memcpy(output, filename, len); - strcpy(output + len, ".icc"); + strcpy(output+len, ".icc"); of = fopen(output, "wb"); if (of != NULL) { if (fwrite(profile, proflen, 1, of) == 1 && - fflush(of) == 0 && - fclose(of) == 0) + fflush(of) == 0 && + fclose(of) == 0) { if (verbose) printf("%s -> %s\n", filename, output); @@ -157,15 +155,12 @@ extract_one_file(const char *filename) } else if (verbose && profile == no_profile) - printf("%s has no profile\n", filename); + printf("%s has no profile\n", filename); } else fprintf(stderr, "%s: could not open file\n", filename); - if (fp != NULL) - fclose(fp); - return result; } @@ -175,7 +170,7 @@ main(int argc, char **argv) int i; int extracted = 0; - for (i = 1; i < argc; ++i) + for (i=1; i #include @@ -27,37 +27,34 @@ */ #include "../../png.h" -#if !defined(PNG_READ_SUPPORTED) || !defined(PNG_SEQUENTIAL_READ_SUPPORTED) -#error This program requires libpng supporting the read and sequential read API -#endif - +#if defined(PNG_READ_SUPPORTED) && defined(PNG_SEQUENTIAL_READ_SUPPORTED) /* Return component 'c' of pixel 'x' from the given row. */ static unsigned int component(png_const_bytep row, png_uint_32 x, unsigned int c, - unsigned int bit_depth, unsigned int channels) + unsigned int bit_depth, unsigned int channels) { - /* PNG images can be up to 2^31 pixels wide, which means they can be up to - * 2^37 bits wide (for a 64-bit pixel - the largest possible) and hence - * 2^34 bytes wide. Since the row fitted into memory, the following must + /* PNG images can be up to 2^31 pixels wide, but this means they can be up to + * 2^37 bits wide (for a 64-bit pixel - the largest possible) and hence 2^34 + * bytes wide. Since the row fitted into memory, however, the following must * work: */ png_uint_32 bit_offset_hi = bit_depth * ((x >> 6) * channels); png_uint_32 bit_offset_lo = bit_depth * ((x & 0x3f) * channels + c); - row = (png_const_bytep)(((const png_byte(*)[8])row) + bit_offset_hi); + row = (png_const_bytep)(((const png_byte (*)[8])row) + bit_offset_hi); row += bit_offset_lo >> 3; bit_offset_lo &= 0x07; /* PNG pixels are packed into bytes to put the first pixel in the highest - * bits of the byte, and into two bytes for 16-bit values with the high - * 8 bits first, so: + * bits of the byte and into two bytes for 16-bit values with the high 8 bits + * first, so: */ switch (bit_depth) { - case 1: return (row[0] >> (7 - bit_offset_lo)) & 0x01; - case 2: return (row[0] >> (6 - bit_offset_lo)) & 0x03; - case 4: return (row[0] >> (4 - bit_offset_lo)) & 0x0f; + case 1: return (row[0] >> (7-bit_offset_lo)) & 0x01; + case 2: return (row[0] >> (6-bit_offset_lo)) & 0x03; + case 4: return (row[0] >> (4-bit_offset_lo)) & 0x0f; case 8: return row[0]; case 16: return (row[0] << 8) + row[1]; default: @@ -74,7 +71,7 @@ component(png_const_bytep row, png_uint_32 x, unsigned int c, */ static void print_pixel(png_structp png_ptr, png_infop info_ptr, png_const_bytep row, - png_uint_32 x) + png_uint_32 x) { unsigned int bit_depth = png_get_bit_depth(png_ptr, info_ptr); @@ -95,24 +92,22 @@ print_pixel(png_structp png_ptr, png_infop info_ptr, png_const_bytep row, int num_palette = 0; if ((png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette) & - PNG_INFO_PLTE) && - (num_palette > 0) && - (palette != NULL)) + PNG_INFO_PLTE) && num_palette > 0 && palette != NULL) { png_bytep trans_alpha = NULL; int num_trans = 0; if ((png_get_tRNS(png_ptr, info_ptr, &trans_alpha, &num_trans, - NULL) & PNG_INFO_tRNS) && - (num_trans > 0) && - (trans_alpha != NULL)) + NULL) & PNG_INFO_tRNS) && num_trans > 0 && + trans_alpha != NULL) printf("INDEXED %u = %d %d %d %d\n", index, - palette[index].red, palette[index].green, - palette[index].blue, - index < num_trans ? trans_alpha[index] : 255); + palette[index].red, palette[index].green, + palette[index].blue, + index < num_trans ? trans_alpha[index] : 255); else /* no transparency */ - printf("INDEXED %u = %d %d %d\n", index, palette[index].red, - palette[index].green, palette[index].blue); + printf("INDEXED %u = %d %d %d\n", index, + palette[index].red, palette[index].green, + palette[index].blue); } else @@ -122,20 +117,20 @@ print_pixel(png_structp png_ptr, png_infop info_ptr, png_const_bytep row, case PNG_COLOR_TYPE_RGB: printf("RGB %u %u %u\n", component(row, x, 0, bit_depth, 3), - component(row, x, 1, bit_depth, 3), - component(row, x, 2, bit_depth, 3)); + component(row, x, 1, bit_depth, 3), + component(row, x, 2, bit_depth, 3)); return; case PNG_COLOR_TYPE_GRAY_ALPHA: printf("GRAY+ALPHA %u %u\n", component(row, x, 0, bit_depth, 2), - component(row, x, 1, bit_depth, 2)); + component(row, x, 1, bit_depth, 2)); return; case PNG_COLOR_TYPE_RGB_ALPHA: printf("RGBA %u %u %u %u\n", component(row, x, 0, bit_depth, 4), - component(row, x, 1, bit_depth, 4), - component(row, x, 2, bit_depth, 4), - component(row, x, 3, bit_depth, 4)); + component(row, x, 1, bit_depth, 4), + component(row, x, 2, bit_depth, 4), + component(row, x, 3, bit_depth, 4)); return; default: @@ -143,8 +138,7 @@ print_pixel(png_structp png_ptr, png_infop info_ptr, png_const_bytep row, } } -int -main(int argc, const char **argv) +int main(int argc, const char **argv) { /* This program uses the default, based, libpng error handling * mechanism, therefore any local variable that exists before the call to @@ -152,7 +146,7 @@ main(int argc, const char **argv) * be declared with 'volatile' to ensure that their values don't get * destroyed by longjmp: */ - volatile int result = 1 /*fail*/; + volatile int result = 1/*fail*/; if (argc == 4) { @@ -169,8 +163,8 @@ main(int argc, const char **argv) * writes error messages to stderr. Creating the png_struct is a * little tricky; just copy the following code. */ - png_structp png_ptr = - png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); + png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, + NULL, NULL, NULL); if (png_ptr != NULL) { @@ -190,11 +184,11 @@ main(int argc, const char **argv) compression_method, filter_method; png_bytep row_tmp; - /* Now associate the recently opened FILE object with the - * default libpng initialization functions. Sometimes libpng - * is compiled without stdio support (it can be difficult to - * do in some environments); in that case you will have to - * write your own read callback to read data from the stream. + /* Now associate the recently opened (FILE*) with the default + * libpng initialization functions. Sometimes libpng is + * compiled without stdio support (it can be difficult to do + * in some environments); in that case you will have to write + * your own read callback to read data from the (FILE*). */ png_init_io(png_ptr, f); @@ -208,21 +202,21 @@ main(int argc, const char **argv) * space. In this case png_malloc is used - it will not * return if memory isn't available. */ - row = - png_malloc(png_ptr, png_get_rowbytes(png_ptr, info_ptr)); + row = png_malloc(png_ptr, png_get_rowbytes(png_ptr, + info_ptr)); - /* Avoid the overhead of using a volatile auto copy row_tmp + /* To avoid the overhead of using a volatile auto copy row_tmp * to a local here - just use row for the png_free below. */ row_tmp = row; - /* All the information we need is in the header returned by - * png_get_IHDR. If this fails, we can use 'png_error' to + /* All the information we need is in the header is returned by + * png_get_IHDR, if this fails we can now use 'png_error' to * signal the error and return control to the setjmp above. */ if (png_get_IHDR(png_ptr, info_ptr, &width, &height, - &bit_depth, &color_type, &interlace_method, - &compression_method, &filter_method)) + &bit_depth, &color_type, &interlace_method, + &compression_method, &filter_method)) { int passes, pass; @@ -248,7 +242,7 @@ main(int argc, const char **argv) /* Now read the pixels, pass-by-pass, row-by-row: */ png_start_read_image(png_ptr); - for (pass = 0; pass < passes; ++pass) + for (pass=0; pass #include @@ -20,15 +22,10 @@ * ensure the code picks up the local libpng implementation: */ #include "../../png.h" +#if defined(PNG_SIMPLIFIED_READ_SUPPORTED) && \ + defined(PNG_SIMPLIFIED_WRITE_SUPPORTED) -#if !defined(PNG_SIMPLIFIED_READ_SUPPORTED) || \ - !defined(PNG_SIMPLIFIED_WRITE_SUPPORTED) -#error This program requires libpng supporting the simplified read/write API -#endif - - -int -main(int argc, const char **argv) +int main(int argc, const char **argv) { int result = 1; @@ -53,22 +50,22 @@ main(int argc, const char **argv) if (buffer != NULL) { - if (png_image_finish_read(&image, NULL /*background*/, buffer, - 0 /*row_stride*/, NULL /*colormap */)) + if (png_image_finish_read(&image, NULL/*background*/, buffer, + 0/*row_stride*/, NULL/*colormap for PNG_FORMAT_FLAG_COLORMAP */)) { - if (png_image_write_to_file( - &image, argv[2], 0 /*convert_to_8bit*/, buffer, - 0 /*row_stride*/, NULL /*colormap*/)) + if (png_image_write_to_file(&image, argv[2], + 0/*convert_to_8bit*/, buffer, 0/*row_stride*/, + NULL/*colormap*/)) result = 0; else fprintf(stderr, "pngtopng: write %s: %s\n", argv[2], - image.message); + image.message); } else fprintf(stderr, "pngtopng: read %s: %s\n", argv[1], - image.message); + image.message); free(buffer); } @@ -76,7 +73,7 @@ main(int argc, const char **argv) else { fprintf(stderr, "pngtopng: out of memory: %lu bytes\n", - (unsigned long)PNG_IMAGE_SIZE(image)); + (unsigned long)PNG_IMAGE_SIZE(image)); /* This is the only place where a 'free' is required; libpng does * the cleanup on error and success, but in this case we couldn't @@ -98,3 +95,4 @@ main(int argc, const char **argv) return result; } +#endif /* READ && WRITE */ diff --git a/Engine/lib/lpng/contrib/examples/simpleover.c b/Engine/lib/lpng/contrib/examples/simpleover.c index 8dc9fecbd..59dd31368 100644 --- a/Engine/lib/lpng/contrib/examples/simpleover.c +++ b/Engine/lib/lpng/contrib/examples/simpleover.c @@ -6,9 +6,9 @@ * United States. * * Read several PNG files, which should have an alpha channel or transparency - * information, and composite them together to produce one or more 16-bit - * linear RGBA intermediates. This involves doing the 'over' compositing - * operation to combine the alpha channels and corresponding data. + * information, and composite them together to produce one or more 16-bit linear + * RGBA intermediates. This involves doing the correct 'over' composition to + * combine the alpha channels and corresponding data. * * Finally read an output (background) PNG using the 24-bit RGB format (the * PNG will be composited on green (#00ff00) by default if it has an alpha @@ -28,8 +28,8 @@ * correctly. Apart from the libpng Simplified API the only work done in here * is to combine multiple input PNG images into a single sprite; this involves * a Porter-Duff 'over' operation and the input PNG images may, as a result, - * be regarded as being layered one on top of the other with the first - * (leftmost on the command line) being at the bottom and the last on the top. + * be regarded as being layered one on top of the other with the first (leftmost + * on the command line) being at the bottom and the last on the top. */ #include #include @@ -44,61 +44,54 @@ */ #include "../../png.h" -#if !defined(PNG_SIMPLIFIED_READ_SUPPORTED) -#error This program requires libpng supporting the simplified read API -#endif +#ifdef PNG_SIMPLIFIED_READ_SUPPORTED #define sprite_name_chars 15 -struct sprite -{ - FILE *file; - png_uint_16p buffer; - unsigned int width; - unsigned int height; - char name[sprite_name_chars + 1]; +struct sprite { + FILE *file; + png_uint_16p buffer; + unsigned int width; + unsigned int height; + char name[sprite_name_chars+1]; }; #if 0 /* div by 65535 test program */ #include #include -int -main(void) -{ +int main(void) { double err = 0; unsigned int xerr = 0; unsigned int r = 32769; - unsigned int x = 0; - - do { - unsigned int t = x + (x >> 16) /*+ (x >> 31)*/ + r; - double v = x, errtest; + unsigned int x = 0; - if (t < x) - { - fprintf(stderr, "overflow: %u+%u -> %u\n", x, r, t); - return 1; - } + do { + unsigned int t = x + (x >> 16) /*+ (x >> 31)*/ + r; + double v = x, errtest; - v /= 65535; - errtest = v; - t >>= 16; - errtest -= t; - - if (errtest > err) - { - err = errtest; - xerr = x; - - if (errtest >= .5) - { - fprintf(stderr, "error: %u/65535 = %f, not %u, error %f\n", - x, v, t, errtest); - return 0; + if (t < x) { + fprintf(stderr, "overflow: %u+%u -> %u\n", x, r, t); + return 1; } - } - } while (++x <= 65535U * 65535U); + + v /= 65535; + errtest = v; + t >>= 16; + errtest -= t; + + if (errtest > err) { + err = errtest; + xerr = x; + + if (errtest >= .5) { + fprintf(stderr, "error: %u/65535 = %f, not %u, error %f\n", + x, v, t, errtest); + return 0; + } + } + } while (++x <= 65535U*65535U); + } printf("error %f @ %u\n", err, xerr); @@ -108,7 +101,7 @@ main(void) static void sprite_op(const struct sprite *sprite, int x_offset, int y_offset, - png_imagep image, const png_uint_16 *buffer) + png_imagep image, const png_uint_16 *buffer) { /* This is where the Porter-Duff 'Over' operator is evaluated; change this * code to change the operator (this could be parameterized). Any other @@ -119,8 +112,8 @@ sprite_op(const struct sprite *sprite, int x_offset, int y_offset, /* Check for an x or y offset that pushes any part of the image beyond the * right or bottom of the sprite: */ - if ((y_offset < 0 || /*SAFE*/ (unsigned)y_offset < sprite->height) && - (x_offset < 0 || /*SAFE*/ (unsigned)x_offset < sprite->width)) + if ((y_offset < 0 || (unsigned)/*SAFE*/y_offset < sprite->height) && + (x_offset < 0 || (unsigned)/*SAFE*/x_offset < sprite->width)) { unsigned int y = 0; @@ -137,7 +130,7 @@ sprite_op(const struct sprite *sprite, int x_offset, int y_offset, do { /* In and out are RGBA values, so: */ - const png_uint_16 *in_pixel = buffer + (y * image->width + x) * 4; + const png_uint_16 *in_pixel = buffer + (y * image->width + x)*4; png_uint_32 in_alpha = in_pixel[3]; /* This is the optimized Porter-Duff 'Over' operation, when the @@ -146,10 +139,10 @@ sprite_op(const struct sprite *sprite, int x_offset, int y_offset, if (in_alpha > 0) { png_uint_16 *out_pixel = sprite->buffer + - ((y + y_offset) * sprite->width + (x + x_offset)) * 4; + ((y+y_offset) * sprite->width + (x+x_offset))*4; /* This is the weight to apply to the output: */ - in_alpha = 65535 - in_alpha; + in_alpha = 65535-in_alpha; if (in_alpha > 0) { @@ -166,9 +159,9 @@ sprite_op(const struct sprite *sprite, int x_offset, int y_offset, */ png_uint_32 tmp; -# define compose(c) \ - tmp = out_pixel[c] * in_alpha; \ - tmp = (tmp + (tmp >> 16) + 32769) >> 16; \ +# define compose(c)\ + tmp = out_pixel[c] * in_alpha;\ + tmp = (tmp + (tmp >> 16) + 32769) >> 16;\ out_pixel[c] = tmp + in_pixel[c] /* The following is very vectorizable... */ @@ -179,15 +172,15 @@ sprite_op(const struct sprite *sprite, int x_offset, int y_offset, } else - { - out_pixel[0] = in_pixel[0]; - out_pixel[1] = in_pixel[1]; - out_pixel[2] = in_pixel[2]; + out_pixel[0] = in_pixel[0], + out_pixel[1] = in_pixel[1], + out_pixel[2] = in_pixel[2], out_pixel[3] = in_pixel[3]; - } } - } while (++x < image->width); - } while (++y < image->height); + } + while (++x < image->width); + } + while (++y < image->height); } } @@ -231,8 +224,9 @@ create_sprite(struct sprite *sprite, int *argc, const char ***argv) if (buffer != NULL) { - if (png_image_finish_read(&image, NULL /*background*/, buffer, - 0 /*row_stride*/, NULL /*colormap*/)) + if (png_image_finish_read(&image, NULL/*background*/, buffer, + 0/*row_stride*/, + NULL/*colormap for PNG_FORMAT_FLAG_COLORMAP*/)) { /* This is the place where the Porter-Duff 'Over' operator * needs to be done by this code. In fact, any image @@ -251,14 +245,14 @@ create_sprite(struct sprite *sprite, int *argc, const char ***argv) { free(buffer); fprintf(stderr, "simpleover: read %s: %s\n", (*argv)[0], - image.message); + image.message); } } else { fprintf(stderr, "simpleover: out of memory: %lu bytes\n", - (unsigned long)PNG_IMAGE_SIZE(image)); + (unsigned long)PNG_IMAGE_SIZE(image)); /* png_image_free must be called if we abort the Simplified API * read because of a problem detected in this code. If problems @@ -296,9 +290,8 @@ create_sprite(struct sprite *sprite, int *argc, const char ***argv) save.flags = PNG_IMAGE_FLAG_FAST; save.colormap_entries = 0; - if (png_image_write_to_stdio(&save, sprite->file, 1 /*convert_to_8_bit*/, - sprite->buffer, 0 /*row_stride*/, - NULL /*colormap*/)) + if (png_image_write_to_stdio(&save, sprite->file, 1/*convert_to_8_bit*/, + sprite->buffer, 0/*row_stride*/, NULL/*colormap*/)) { /* Success; the buffer is no longer needed: */ free(sprite->buffer); @@ -308,20 +301,19 @@ create_sprite(struct sprite *sprite, int *argc, const char ***argv) else fprintf(stderr, "simpleover: write sprite %s: %s\n", sprite->name, - save.message); + save.message); } else - fprintf(stderr, - "simpleover: sprite %s: could not allocate tmpfile: %s\n", - sprite->name, strerror(errno)); + fprintf(stderr, "simpleover: sprite %s: could not allocate tmpfile: %s\n", + sprite->name, strerror(errno)); return 0; /* fail */ } static int add_sprite(png_imagep output, png_bytep out_buf, struct sprite *sprite, - int *argc, const char ***argv) + int *argc, const char ***argv) { /* Given a --add argument naming this sprite, perform the operations listed * in the following arguments. The arguments are expected to have the form @@ -342,13 +334,13 @@ add_sprite(png_imagep output, png_bytep out_buf, struct sprite *sprite, * will fit. */ if (x < 0 || y < 0 || - /*SAFE*/ (unsigned)x >= output->width || - /*SAFE*/ (unsigned)y >= output->height || - sprite->width > output->width - x || - sprite->height > output->height - y) + (unsigned)/*SAFE*/x >= output->width || + (unsigned)/*SAFE*/y >= output->height || + sprite->width > output->width-x || + sprite->height > output->height-y) { fprintf(stderr, "simpleover: sprite %s @ (%d,%d) outside image\n", - sprite->name, x, y); + sprite->name, x, y); /* Could just skip this, but for the moment it is an error */ return 0; /* error */ } @@ -367,10 +359,10 @@ add_sprite(png_imagep output, png_bytep out_buf, struct sprite *sprite, { in.format = PNG_FORMAT_RGB; /* force compose */ - if (png_image_finish_read( - &in, NULL /*background*/, - out_buf + (y * output->width + x) * 3 /*RGB*/, - output->width * 3 /*row_stride*/, NULL /*colormap*/)) + if (png_image_finish_read(&in, NULL/*background*/, + out_buf + (y*output->width + x)*3/*RGB*/, + output->width*3/*row_stride*/, + NULL/*colormap for PNG_FORMAT_FLAG_COLORMAP*/)) { ++*argv, --*argc; continue; @@ -379,7 +371,7 @@ add_sprite(png_imagep output, png_bytep out_buf, struct sprite *sprite, /* The read failed: */ fprintf(stderr, "simpleover: add sprite %s: %s\n", sprite->name, - in.message); + in.message); return 0; /* error */ } } @@ -387,7 +379,7 @@ add_sprite(png_imagep output, png_bytep out_buf, struct sprite *sprite, else { fprintf(stderr, "simpleover: --add='%s': invalid position %s\n", - sprite->name, (*argv)[0]); + sprite->name, (*argv)[0]); return 0; /* error */ } } @@ -397,10 +389,10 @@ add_sprite(png_imagep output, png_bytep out_buf, struct sprite *sprite, static int simpleover_process(png_imagep output, png_bytep out_buf, int argc, - const char **argv) + const char **argv) { int result = 1; /* success */ -# define csprites 10 /*limit*/ +# define csprites 10/*limit*/ # define str(a) #a int nsprites = 0; struct sprite sprites[csprites]; @@ -420,25 +412,23 @@ simpleover_process(png_imagep output, png_bytep out_buf, int argc, sprites[nsprites].width = sprites[nsprites].height = 0; sprites[nsprites].name[0] = 0; - n = sscanf(argv[0], - "--sprite=%u,%u,%" str(sprite_name_chars) "s%c", - &sprites[nsprites].width, &sprites[nsprites].height, - sprites[nsprites].name, &tombstone); + n = sscanf(argv[0], "--sprite=%u,%u,%" str(sprite_name_chars) "s%c", + &sprites[nsprites].width, &sprites[nsprites].height, + sprites[nsprites].name, &tombstone); if ((n == 2 || n == 3) && - (sprites[nsprites].width > 0) && - (sprites[nsprites].height > 0)) + sprites[nsprites].width > 0 && sprites[nsprites].height > 0) { size_t buf_size, tmp; /* Default a name if not given. */ if (sprites[nsprites].name[0] == 0) - sprintf(sprites[nsprites].name, "sprite-%d", nsprites + 1); + sprintf(sprites[nsprites].name, "sprite-%d", nsprites+1); /* Allocate a buffer for the sprite and calculate the buffer * size: */ - buf_size = sizeof(png_uint_16[4]); + buf_size = sizeof (png_uint_16 [4]); buf_size *= sprites[nsprites].width; buf_size *= sprites[nsprites].height; @@ -447,7 +437,7 @@ simpleover_process(png_imagep output, png_bytep out_buf, int argc, tmp /= sprites[nsprites].width; tmp /= sprites[nsprites].height; - if (tmp == sizeof(png_uint_16[4])) + if (tmp == sizeof (png_uint_16 [4])) { sprites[nsprites].buffer = malloc(buf_size); /* This buffer must be initialized to transparent: */ @@ -458,7 +448,7 @@ simpleover_process(png_imagep output, png_bytep out_buf, int argc, sprites[nsprites].file = NULL; ++argv, --argc; - if (create_sprite(sprites + nsprites++, &argc, &argv)) + if (create_sprite(sprites+nsprites++, &argc, &argv)) { result = 1; /* still ok */ continue; @@ -476,8 +466,7 @@ simpleover_process(png_imagep output, png_bytep out_buf, int argc, else { fprintf(stderr, "simpleover: %s: invalid sprite (%u,%u)\n", - argv[0], - sprites[nsprites].width, sprites[nsprites].height); + argv[0], sprites[nsprites].width, sprites[nsprites].height); break; } } @@ -491,7 +480,7 @@ simpleover_process(png_imagep output, png_bytep out_buf, int argc, else if (strncmp(argv[0], "--add=", 6) == 0) { - const char *name = argv[0] + 6; + const char *name = argv[0]+6; int isprite = nsprites; ++argv, --argc; @@ -500,8 +489,7 @@ simpleover_process(png_imagep output, png_bytep out_buf, int argc, { if (strcmp(sprites[isprite].name, name) == 0) { - if (!add_sprite(output, out_buf, sprites + isprite, - &argc, &argv)) + if (!add_sprite(output, out_buf, sprites+isprite, &argc, &argv)) goto out; /* error in add_sprite */ break; @@ -510,8 +498,7 @@ simpleover_process(png_imagep output, png_bytep out_buf, int argc, if (isprite < 0) /* sprite not found */ { - fprintf(stderr, "simpleover: --add='%s': sprite not found\n", - name); + fprintf(stderr, "simpleover: --add='%s': sprite not found\n", name); break; } } @@ -539,8 +526,7 @@ out: return result; } -int -main(int argc, const char **argv) +int main(int argc, const char **argv) { int result = 1; /* default to fail */ @@ -550,7 +536,7 @@ main(int argc, const char **argv) const char *output = NULL; png_image image; - if (argc > 2 && argv[2][0] != '-' /*an operation*/) + if (argc > 2 && argv[2][0] != '-'/*an operation*/) { output = argv[2]; argi = 3; @@ -572,7 +558,7 @@ main(int argc, const char **argv) png_color background = {0, 0xff, 0}; /* fully saturated green */ if (png_image_finish_read(&image, &background, buffer, - 0 /*row_stride*/, NULL /*colormap*/)) + 0/*row_stride*/, NULL/*colormap for PNG_FORMAT_FLAG_COLORMAP */)) { /* At this point png_image_finish_read has cleaned up the * allocated data in png_image, and only the buffer needs to be @@ -580,24 +566,22 @@ main(int argc, const char **argv) * * Perform the remaining operations: */ - if (simpleover_process(&image, buffer, - argc - argi, argv + argi)) + if (simpleover_process(&image, buffer, argc-argi, argv+argi)) { /* Write the output: */ if ((output != NULL && - png_image_write_to_file( - &image, output, 0 /*convert_to_8bit*/, buffer, - 0 /*row_stride*/, NULL /*colormap*/)) || + png_image_write_to_file(&image, output, + 0/*convert_to_8bit*/, buffer, 0/*row_stride*/, + NULL/*colormap*/)) || (output == NULL && - png_image_write_to_stdio( - &image, stdout, 0 /*convert_to_8bit*/, buffer, - 0 /*row_stride*/, NULL /*colormap*/))) + png_image_write_to_stdio(&image, stdout, + 0/*convert_to_8bit*/, buffer, 0/*row_stride*/, + NULL/*colormap*/))) result = 0; else fprintf(stderr, "simpleover: write %s: %s\n", - output == NULL ? "stdout" : output, - image.message); + output == NULL ? "stdout" : output, image.message); } /* else simpleover_process writes an error message */ @@ -605,7 +589,7 @@ main(int argc, const char **argv) else fprintf(stderr, "simpleover: read %s: %s\n", argv[1], - image.message); + image.message); free(buffer); } @@ -613,7 +597,7 @@ main(int argc, const char **argv) else { fprintf(stderr, "simpleover: out of memory: %lu bytes\n", - (unsigned long)PNG_IMAGE_SIZE(image)); + (unsigned long)PNG_IMAGE_SIZE(image)); /* This is the only place where a 'free' is required; libpng does * the cleanup on error and success, but in this case we couldn't @@ -633,8 +617,7 @@ main(int argc, const char **argv) else { /* Usage message */ - fprintf( - stderr, + fprintf(stderr, "simpleover: usage: simpleover background.png [output.png]\n" " Output 'background.png' as a 24-bit RGB PNG file in 'output.png'\n" " or, if not given, stdout. 'background.png' will be composited\n" @@ -645,13 +628,13 @@ main(int argc, const char **argv) " --sprite=width,height,name {[--at=x,y] {sprite.png}}\n" " Produce a transparent sprite of size (width,height) and with\n" " name 'name'.\n" - " For each sprite.png composite it is using a Porter-Duff 'Over'\n" - " operation at offset (x,y) in the sprite, defaulting to (0,0).\n" + " For each sprite.png composite it using a Porter-Duff 'Over'\n" + " operation at offset (x,y) in the sprite (defaulting to (0,0)).\n" " Input PNGs will be truncated to the area of the sprite.\n" "\n" " --add='name' {x,y}\n" " Optionally, before output, composite a sprite, 'name', which\n" - " must have been previously produced using --sprite at each\n" + " must have been previously produced using --sprite, at each\n" " offset (x,y) in the output image. Each sprite must fit\n" " completely within the output image.\n" "\n" @@ -662,3 +645,4 @@ main(int argc, const char **argv) return result; } +#endif /* SIMPLIFIED_READ */ diff --git a/Engine/lib/lpng/contrib/gregbook/rpng-x.c b/Engine/lib/lpng/contrib/gregbook/rpng-x.c index 2fc9272c6..92effaa6d 100644 --- a/Engine/lib/lpng/contrib/gregbook/rpng-x.c +++ b/Engine/lib/lpng/contrib/gregbook/rpng-x.c @@ -21,7 +21,7 @@ - 1.10: added support for non-default visuals; fixed X pixel-conversion - 1.11: added extra set of parentheses to png_jmpbuf() macro; fixed command-line parsing bug - - 1.12: fixed some small X memory leaks (thanks to François Petitjean) + - 1.12: fixed some small X memory leaks (thanks to Franois Petitjean) - 1.13: fixed XFreeGC() crash bug (thanks to Patrick Welche) - 1.14: added support for X resources (thanks to Gerhard Niklasch) - 2.00: dual-licensed (added GNU GPL) diff --git a/Engine/lib/lpng/contrib/gregbook/rpng2-x.c b/Engine/lib/lpng/contrib/gregbook/rpng2-x.c index 1375dc9a6..af944c0f2 100644 --- a/Engine/lib/lpng/contrib/gregbook/rpng2-x.c +++ b/Engine/lib/lpng/contrib/gregbook/rpng2-x.c @@ -27,7 +27,7 @@ - 1.11: added -usleep option for demos; fixed command-line parsing bug - 1.12: added -pause option for demos and testing - 1.20: added runtime MMX-enabling/disabling and new -mmx* options - - 1.21: fixed some small X memory leaks (thanks to François Petitjean) + - 1.21: fixed some small X memory leaks (thanks to Franois Petitjean) - 1.22: fixed XFreeGC() crash bug (thanks to Patrick Welche) - 1.23: added -bgpat 0 mode (std white/gray checkerboard, 8x8 squares) - 1.30: added -loop option for -bgpat (ifdef FEATURE_LOOP); fixed bpp = diff --git a/Engine/lib/lpng/contrib/libtests/gentests.sh b/Engine/lib/lpng/contrib/libtests/gentests.sh index eba7ce50c..f0f8d2395 100644 --- a/Engine/lib/lpng/contrib/libtests/gentests.sh +++ b/Engine/lib/lpng/contrib/libtests/gentests.sh @@ -2,6 +2,8 @@ # # Copyright (c) 2013 John Cunningham Bowler # +# Last changed in libpng 1.6.0 [February 14, 2013] +# # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h diff --git a/Engine/lib/lpng/contrib/libtests/makepng.c b/Engine/lib/lpng/contrib/libtests/makepng.c index a866fc1d1..312062bda 100644 --- a/Engine/lib/lpng/contrib/libtests/makepng.c +++ b/Engine/lib/lpng/contrib/libtests/makepng.c @@ -3,6 +3,8 @@ /* Copyright: */ #define COPYRIGHT "\251 2013,2015 John Cunningham Bowler" /* + * Last changed in libpng 1.6.20 [November 24, 2015] + * * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer * and license in png.h @@ -297,28 +299,25 @@ generate_palette(png_colorp palette, png_bytep trans, int bit_depth, unsigned int x, y; volatile unsigned int ip = 0; - for (x=0; x #include #include @@ -39,7 +39,7 @@ /* 1.6.1 added support for the configure test harness, which uses 77 to indicate * a skipped test, in earlier versions we need to succeed on a skipped test, so: */ -#if defined(HAVE_CONFIG_H) +#if PNG_LIBPNG_VER >= 10601 && defined(HAVE_CONFIG_H) # define SKIP 77 #else # define SKIP 0 @@ -317,10 +317,11 @@ transform_name(int t) t &= -t; /* first set bit */ - for (i=0; i APP_FAIL || (level > ERRORS && !(dp->options & CONTINUE))) - { - dp->error_code = level; longjmp(dp->error_return, level); - } } /* error handler callbacks for libpng */ @@ -968,24 +962,21 @@ update_display(struct display *dp) int bd = dp->bit_depth; unsigned int i; - for (i=0; iread_pp, dp->read_ip, &width, &height, &bit_depth, - &color_type, &interlace_method, &compression_method, &filter_method)) - display_log(dp, LIBPNG_BUG, "png_get_IHDR failed"); + png_get_IHDR(dp->read_pp, dp->read_ip, &width, &height, &bit_depth, + &color_type, &interlace_method, &compression_method, &filter_method); # define C(item) if (item != dp->item) \ display_log(dp, APP_WARNING, "IHDR " #item "(%lu) changed to %lu",\ @@ -1022,12 +1012,7 @@ compare_read(struct display *dp, int applied_transforms) C(height); C(bit_depth); C(color_type); -# ifdef PNG_WRITE_INTERLACING_SUPPORTED - /* If write interlace has been disabled, the PNG file is still - * written correctly, but as a regular (not-interlaced) PNG. - */ - C(interlace_method); -# endif + C(interlace_method); C(compression_method); C(filter_method); @@ -1096,9 +1081,8 @@ compare_read(struct display *dp, int applied_transforms) size_t x; /* Find the first error */ - for (x=0; x 0x%.2x", @@ -1153,7 +1137,6 @@ compare_read(struct display *dp, int applied_transforms) display_log(dp, LIBPNG_ERROR, "invalid colour type %d", color_type); /*NOTREACHED*/ - memset(sig_bits, 0, sizeof(sig_bits)); bpp = 0; break; } @@ -1215,7 +1198,7 @@ compare_read(struct display *dp, int applied_transforms) sig_bits[0] = (png_byte)b; break; - case 4: /* Replicate twice */ + case 4: /* Relicate twice */ /* Value is 1, 2, 3 or 4 */ b = 0xf & ((0xf << 4) >> sig_bits[0]); b |= b << 4; @@ -1574,19 +1557,18 @@ static int do_test(struct display *dp, const char *file) /* Exists solely to isolate the setjmp clobbers */ { - dp->error_code = VERBOSE; /* The "lowest" level */ + int ret = setjmp(dp->error_return); - if (setjmp(dp->error_return) == 0) + if (ret == 0) { test_one_file(dp, file); return 0; } - else if (dp->error_code < ERRORS) /* shouldn't longjmp on warnings */ - display_log(dp, INTERNAL_ERROR, "unexpected return code %d", - dp->error_code); + else if (ret < ERRORS) /* shouldn't longjmp on warnings */ + display_log(dp, INTERNAL_ERROR, "unexpected return code %d", ret); - return dp->error_code; + return ret; } int @@ -1686,11 +1668,7 @@ main(int argc, char **argv) int ret = do_test(&d, argv[i]); if (ret > QUIET) /* abort on user or internal error */ - { - display_clean(&d); - display_destroy(&d); return 99; - } } /* Here on any return, including failures, except user/internal issues @@ -1708,9 +1686,8 @@ main(int argc, char **argv) printf("%s: pngimage ", pass ? "PASS" : "FAIL"); - for (j=1; j #include @@ -37,7 +37,7 @@ /* 1.6.1 added support for the configure test harness, which uses 77 to indicate * a skipped test, in earlier versions we need to succeed on a skipped test, so: */ -#if defined(HAVE_CONFIG_H) +#if PNG_LIBPNG_VER >= 10601 && defined(HAVE_CONFIG_H) # define SKIP 77 #else # define SKIP 0 @@ -595,8 +595,7 @@ newimage(Image *image) memset(image, 0, sizeof *image); } -/* Reset the image to be read again - only needs to rewind the FILE object at - * present. +/* Reset the image to be read again - only needs to rewind the FILE* at present. */ static void resetimage(Image *image) @@ -1151,7 +1150,7 @@ get_pixel(png_uint_32 format))(Pixel *p, png_const_voidp pb) * * 2) Remove color by mapping to grayscale. (Grayscale to color is a no-op.) * - * 3) Convert between 8-bit and 16-bit components. (Both directions are + * 3) Convert between 8-bit and 16-bit components. (Both directtions are * relevant.) * * This gives the following base format conversion matrix: @@ -2702,7 +2701,7 @@ compare_two_images(Image *a, Image *b, int via_linear, { if ((a->opts & ACCUMULATE) == 0) { - char pindex[16]; + char pindex[9]; sprintf(pindex, "%lu[%lu]", (unsigned long)y, (unsigned long)a->image.colormap_entries); logerror(a, a->file_name, ": bad pixel index: ", pindex); @@ -2713,12 +2712,12 @@ compare_two_images(Image *a, Image *b, int via_linear, else if (y >= b->image.colormap_entries) { if ((b->opts & ACCUMULATE) == 0) - { - char pindex[16]; + { + char pindex[9]; sprintf(pindex, "%lu[%lu]", (unsigned long)y, (unsigned long)b->image.colormap_entries); logerror(b, b->file_name, ": bad pixel index: ", pindex); - } + } result = 0; } @@ -2821,11 +2820,8 @@ compare_two_images(Image *a, Image *b, int via_linear, bchannels = component_loc(bloc, formatb); /* Hence the btoa array. */ - for (i=0; i<4; ++i) - { - if (bloc[i] < 4) - btoa[bloc[i]] = aloc[i]; /* may be '4' for alpha */ - } + for (i=0; i<4; ++i) if (bloc[i] < 4) + btoa[bloc[i]] = aloc[i]; /* may be '4' for alpha */ if (alpha_added) alpha_added = bloc[0]; /* location of alpha channel in image b */ @@ -3213,10 +3209,10 @@ write_one_file(Image *output, Image *image, int convert_to_8bit) else if (image->opts & USE_FILE) { #ifdef PNG_SIMPLIFIED_WRITE_STDIO_SUPPORTED - static unsigned int counter = 0; + static int counter = 0; char name[32]; - sprintf(name, "%s%u.png", tmpf, ++counter); + sprintf(name, "%s%d.png", tmpf, ++counter); if (png_image_write_to_file(&image->image, name, convert_to_8bit, image->buffer+16, (png_int_32)image->stride, image->colormap)) @@ -3500,7 +3496,7 @@ main(int argc, char **argv) int retval = 0; int c; -#if PNG_LIBPNG_VER == 10700 +#if PNG_LIBPNG_VER >= 10700 /* This error should not exist in 1.7 or later: */ opts |= GBG_ERROR; #endif diff --git a/Engine/lib/lpng/contrib/libtests/pngunknown.c b/Engine/lib/lpng/contrib/libtests/pngunknown.c index c39203f87..05bdd833d 100644 --- a/Engine/lib/lpng/contrib/libtests/pngunknown.c +++ b/Engine/lib/lpng/contrib/libtests/pngunknown.c @@ -1,6 +1,7 @@ + /* pngunknown.c - test the read side unknown chunk handling * - * Copyright (c) 2021-2025 Cosmin Truta + * Last changed in libpng 1.6.32 [August 24, 2017] * Copyright (c) 2015,2017 Glenn Randers-Pehrson * Written by John Cunningham Bowler * @@ -32,7 +33,7 @@ /* 1.6.1 added support for the configure test harness, which uses 77 to indicate * a skipped test, in earlier versions we need to succeed on a skipped test, so: */ -#if defined(HAVE_CONFIG_H) +#if PNG_LIBPNG_VER >= 10601 && defined(HAVE_CONFIG_H) # define SKIP 77 #else # define SKIP 0 @@ -54,7 +55,48 @@ #if defined(PNG_READ_USER_CHUNKS_SUPPORTED) ||\ defined(PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED) +#if PNG_LIBPNG_VER < 10500 +/* This deliberately lacks the const. */ +typedef png_byte *png_const_bytep; +/* This is copied from 1.5.1 png.h: */ +#define PNG_INTERLACE_ADAM7_PASSES 7 +#define PNG_PASS_START_ROW(pass) (((1U&~(pass))<<(3-((pass)>>1)))&7) +#define PNG_PASS_START_COL(pass) (((1U& (pass))<<(3-(((pass)+1)>>1)))&7) +#define PNG_PASS_ROW_SHIFT(pass) ((pass)>2?(8-(pass))>>1:3) +#define PNG_PASS_COL_SHIFT(pass) ((pass)>1?(7-(pass))>>1:3) +#define PNG_PASS_ROWS(height, pass) (((height)+(((1<>PNG_PASS_ROW_SHIFT(pass)) +#define PNG_PASS_COLS(width, pass) (((width)+(((1<>PNG_PASS_COL_SHIFT(pass)) +#define PNG_ROW_FROM_PASS_ROW(yIn, pass) \ + (((yIn)<>(((7-(off))-(pass))<<2)) & 0xFU) | \ + ((0x01145AF0U>>(((7-(off))-(pass))<<2)) & 0xF0U)) +#define PNG_ROW_IN_INTERLACE_PASS(y, pass) \ + ((PNG_PASS_MASK(pass,0) >> ((y)&7)) & 1) +#define PNG_COL_IN_INTERLACE_PASS(x, pass) \ + ((PNG_PASS_MASK(pass,1) >> ((x)&7)) & 1) + +/* These are needed too for the default build: */ +#define PNG_WRITE_16BIT_SUPPORTED +#define PNG_READ_16BIT_SUPPORTED + +/* This comes from pnglibconf.h after 1.5: */ +#define PNG_FP_1 100000 +#define PNG_GAMMA_THRESHOLD_FIXED\ + ((png_fixed_point)(PNG_GAMMA_THRESHOLD * PNG_FP_1)) +#endif + +#if PNG_LIBPNG_VER < 10600 + /* 1.6.0 constifies many APIs. The following exists to allow pngvalid to be + * compiled against earlier versions. + */ +# define png_const_structp png_structp +#endif #if PNG_LIBPNG_VER < 10700 /* Copied from libpng 1.7.0 png.h */ @@ -72,8 +114,6 @@ #define png_PLTE PNG_U32( 80, 76, 84, 69) #define png_bKGD PNG_U32( 98, 75, 71, 68) #define png_cHRM PNG_U32( 99, 72, 82, 77) -#define png_cICP PNG_U32( 99, 73, 67, 80) /* PNGv3 */ -#define png_cLLI PNG_U32( 99, 76, 76, 73) /* PNGv3 */ #define png_eXIf PNG_U32(101, 88, 73, 102) /* registered July 2017 */ #define png_fRAc PNG_U32(102, 82, 65, 99) /* registered, not defined */ #define png_gAMA PNG_U32(103, 65, 77, 65) @@ -83,7 +123,6 @@ #define png_hIST PNG_U32(104, 73, 83, 84) #define png_iCCP PNG_U32(105, 67, 67, 80) #define png_iTXt PNG_U32(105, 84, 88, 116) -#define png_mDCV PNG_U32(109, 68, 67, 86) /* PNGv3 */ #define png_oFFs PNG_U32(111, 70, 70, 115) #define png_pCAL PNG_U32(112, 67, 65, 76) #define png_pHYs PNG_U32(112, 72, 89, 115) @@ -170,20 +209,6 @@ static struct 0, # else 1, -# endif - 1, START, 0 }, - { "cICP", PNG_INFO_cICP, png_cICP, -# ifdef PNG_READ_cICP_SUPPORTED - 0, -# else - 1, -# endif - 1, START, 0 }, - { "cLLI", PNG_INFO_cLLI, png_cLLI, -# ifdef PNG_READ_cLLI_SUPPORTED - 0, -# else - 1, # endif 1, START, 0 }, { "eXIf", PNG_INFO_eXIf, png_eXIf, @@ -221,13 +246,6 @@ static struct 1, # endif 1, ABSENT, 0 }, - { "mDCV", PNG_INFO_mDCV, png_mDCV, -# ifdef PNG_READ_mDCV_SUPPORTED - 0, -# else - 1, -# endif - 1, START, 0 }, { "oFFs", PNG_INFO_oFFs, png_oFFs, # ifdef PNG_READ_oFFs_SUPPORTED 0, @@ -352,9 +370,7 @@ find_by_flag(png_uint_32 flag) { int i = NINFO; - while (--i >= 0) - if (chunk_info[i].flag == flag) - return i; + while (--i >= 0) if (chunk_info[i].flag == flag) return i; fprintf(stderr, "pngunknown: internal error\n"); exit(4); @@ -531,30 +547,27 @@ read_callback(png_structp pp, png_unknown_chunkp pc) case PNG_HANDLE_CHUNK_AS_DEFAULT: case PNG_HANDLE_CHUNK_NEVER: - discard = 1; /*handled; discard*/ + discard = 1/*handled; discard*/; break; case PNG_HANDLE_CHUNK_IF_SAFE: case PNG_HANDLE_CHUNK_ALWAYS: - discard = 0; /*not handled; keep*/ + discard = 0/*not handled; keep*/; break; } /* Also store information about this chunk in the display, the relevant flag * is set if the chunk is to be kept ('not handled'.) */ - if (chunk >= 0) + if (chunk >= 0) if (!discard) /* stupidity to stop a GCC warning */ { - if (!discard) /* stupidity to stop a GCC warning */ - { - png_uint_32 flag = chunk_info[chunk].flag; + png_uint_32 flag = chunk_info[chunk].flag; - if (pc->location & PNG_AFTER_IDAT) - d->after_IDAT |= flag; + if (pc->location & PNG_AFTER_IDAT) + d->after_IDAT |= flag; - else - d->before_IDAT |= flag; - } + else + d->before_IDAT |= flag; } /* However if there is no support to store unknown chunks don't ask libpng to @@ -828,9 +841,8 @@ check(FILE *fp, int argc, const char **argv, png_uint_32p flags/*out*/, { png_uint_32 y; - for (y=0; ypng_ptr, NULL, NULL); + for (y=0; ypng_ptr, NULL, NULL); } } } /* interlaced */ @@ -1079,15 +1091,15 @@ perform_one_test_safe(FILE *fp, int argc, const char **argv, static const char *standard_tests[] = { - "discard", "default=discard", NULL, - "save", "default=save", NULL, - "if-safe", "default=if-safe", NULL, - "vpAg", "vpAg=if-safe", NULL, - "sTER", "sTER=if-safe", NULL, - "IDAT", "default=discard", "IDAT=save", NULL, - "sAPI", "bKGD=save", "cHRM=save", "gAMA=save", "all=discard", "iCCP=save", - "sBIT=save", "sRGB=save", "eXIf=save", NULL, - NULL /*end*/ + "discard", "default=discard", 0, + "save", "default=save", 0, + "if-safe", "default=if-safe", 0, + "vpAg", "vpAg=if-safe", 0, + "sTER", "sTER=if-safe", 0, + "IDAT", "default=discard", "IDAT=save", 0, + "sAPI", "bKGD=save", "cHRM=save", "gAMA=save", "all=discard", "iCCP=save", + "sBIT=save", "sRGB=save", "eXIf=save", 0, + 0/*end*/ }; static PNG_NORETURN void @@ -1103,7 +1115,7 @@ int main(int argc, const char **argv) { FILE *fp; - png_uint_32 default_flags[4]; /*valid,unknown{before,after}*/ + png_uint_32 default_flags[4/*valid,unknown{before,after}*/]; int strict = 0, default_tests = 0; const char *count_argv = "default=save"; const char *touch_file = NULL; @@ -1141,9 +1153,8 @@ main(int argc, const char **argv) /* GCC BUG: if (default_tests && argc != 1) triggers some weird GCC argc * optimization which causes warnings with -Wstrict-overflow! */ - else if (default_tests) - if (argc != 1) - usage(d.program, "extra arguments"); + else if (default_tests) if (argc != 1) + usage(d.program, "extra arguments"); /* The name of the test file is the last argument; remove it. */ d.file = argv[--argc]; @@ -1205,11 +1216,7 @@ main(int argc, const char **argv) const char *result; int arg_count = 0; - while (*next != NULL) - { - ++next; - ++arg_count; - } + while (*next) ++next, ++arg_count; perform_one_test_safe(fp, arg_count, test, default_flags, &d, this_test); diff --git a/Engine/lib/lpng/contrib/libtests/pngvalid.c b/Engine/lib/lpng/contrib/libtests/pngvalid.c index 64de1714a..d800110c7 100644 --- a/Engine/lib/lpng/contrib/libtests/pngvalid.c +++ b/Engine/lib/lpng/contrib/libtests/pngvalid.c @@ -1,6 +1,7 @@ + /* pngvalid.c - validate libpng by constructing then reading png files. * - * Copyright (c) 2021-2025 Cosmin Truta + * Last changed in libpng 1.6.31 [July 27, 2017] * Copyright (c) 2014-2017 John Cunningham Bowler * * This code is released under the libpng license. @@ -21,7 +22,6 @@ #define _ISOC99_SOURCE 1 /* For floating point */ #define _GNU_SOURCE 1 /* For the floating point exception extension */ #define _BSD_SOURCE 1 /* For the floating point exception extension */ -#define _DEFAULT_SOURCE 1 /* For the floating point exception extension */ #include #include @@ -62,21 +62,59 @@ /* 1.6.1 added support for the configure test harness, which uses 77 to indicate * a skipped test, in earlier versions we need to succeed on a skipped test, so: */ -#if defined(HAVE_CONFIG_H) +#if PNG_LIBPNG_VER >= 10601 && defined(HAVE_CONFIG_H) # define SKIP 77 #else # define SKIP 0 #endif /* pngvalid requires write support and one of the fixed or floating point APIs. - * progressive read is also required currently as the progressive read pointer - * is used to record the 'display' structure. */ -#if defined PNG_WRITE_SUPPORTED &&\ - (defined PNG_PROGRESSIVE_READ_SUPPORTED) &&\ - (defined PNG_FIXED_POINT_SUPPORTED || defined PNG_FLOATING_POINT_SUPPORTED) +#if defined(PNG_WRITE_SUPPORTED) &&\ + (defined(PNG_FIXED_POINT_SUPPORTED) || defined(PNG_FLOATING_POINT_SUPPORTED)) +#if PNG_LIBPNG_VER < 10500 +/* This deliberately lacks the const. */ +typedef png_byte *png_const_bytep; +/* This is copied from 1.5.1 png.h: */ +#define PNG_INTERLACE_ADAM7_PASSES 7 +#define PNG_PASS_START_ROW(pass) (((1U&~(pass))<<(3-((pass)>>1)))&7) +#define PNG_PASS_START_COL(pass) (((1U& (pass))<<(3-(((pass)+1)>>1)))&7) +#define PNG_PASS_ROW_SHIFT(pass) ((pass)>2?(8-(pass))>>1:3) +#define PNG_PASS_COL_SHIFT(pass) ((pass)>1?(7-(pass))>>1:3) +#define PNG_PASS_ROWS(height, pass) (((height)+(((1<>PNG_PASS_ROW_SHIFT(pass)) +#define PNG_PASS_COLS(width, pass) (((width)+(((1<>PNG_PASS_COL_SHIFT(pass)) +#define PNG_ROW_FROM_PASS_ROW(yIn, pass) \ + (((yIn)<>(((7-(off))-(pass))<<2)) & 0xFU) | \ + ((0x01145AF0U>>(((7-(off))-(pass))<<2)) & 0xF0U)) +#define PNG_ROW_IN_INTERLACE_PASS(y, pass) \ + ((PNG_PASS_MASK(pass,0) >> ((y)&7)) & 1) +#define PNG_COL_IN_INTERLACE_PASS(x, pass) \ + ((PNG_PASS_MASK(pass,1) >> ((x)&7)) & 1) + +/* These are needed too for the default build: */ +#define PNG_WRITE_16BIT_SUPPORTED +#define PNG_READ_16BIT_SUPPORTED + +/* This comes from pnglibconf.h after 1.5: */ +#define PNG_FP_1 100000 +#define PNG_GAMMA_THRESHOLD_FIXED\ + ((png_fixed_point)(PNG_GAMMA_THRESHOLD * PNG_FP_1)) +#endif + +#if PNG_LIBPNG_VER < 10600 + /* 1.6.0 constifies many APIs, the following exists to allow pngvalid to be + * compiled against earlier versions. + */ +# define png_const_structp png_structp +#endif #ifndef RELEASE_BUILD /* RELEASE_BUILD is true for releases and release candidates: */ @@ -262,20 +300,20 @@ make_four_random_bytes(png_uint_32* seed, png_bytep bytes) #if defined PNG_READ_SUPPORTED || defined PNG_WRITE_tRNS_SUPPORTED ||\ defined PNG_WRITE_FILTER_SUPPORTED static void -randomize_bytes(void *pv, size_t size) +randomize(void *pv, size_t size) { static png_uint_32 random_seed[2] = {0x56789abc, 0xd}; make_random_bytes(random_seed, pv, size); } -#define R8(this) randomize_bytes(&(this), sizeof (this)) +#define R8(this) randomize(&(this), sizeof (this)) #ifdef PNG_READ_SUPPORTED static png_byte random_byte(void) { unsigned char b1[1]; - randomize_bytes(b1, sizeof b1); + randomize(b1, sizeof b1); return b1[0]; } #endif /* READ */ @@ -284,7 +322,7 @@ static png_uint_16 random_u16(void) { unsigned char b2[2]; - randomize_bytes(b2, sizeof b2); + randomize(b2, sizeof b2); return png_get_uint_16(b2); } @@ -294,7 +332,7 @@ static png_uint_32 random_u32(void) { unsigned char b4[4]; - randomize_bytes(b4, sizeof b4); + randomize(b4, sizeof b4); return png_get_uint_32(b4); } #endif /* READ_FILLER || READ_RGB_TO_GRAY */ @@ -606,8 +644,34 @@ row_copy(png_bytep toBuffer, png_const_bytep fromBuffer, unsigned int bitWidth, static int pixel_cmp(png_const_bytep pa, png_const_bytep pb, png_uint_32 bit_width) { +#if PNG_LIBPNG_VER < 10506 + if (memcmp(pa, pb, bit_width>>3) == 0) + { + png_uint_32 p; + + if ((bit_width & 7) == 0) return 0; + + /* Ok, any differences? */ + p = pa[bit_width >> 3]; + p ^= pb[bit_width >> 3]; + + if (p == 0) return 0; + + /* There are, but they may not be significant, remove the bits + * after the end (the low order bits in PNG.) + */ + bit_width &= 7; + p >>= 8-bit_width; + + if (p == 0) return 0; + } +#else + /* From libpng-1.5.6 the overwrite should be fixed, so compare the trailing + * bits too: + */ if (memcmp(pa, pb, (bit_width+7)>>3) == 0) return 0; +#endif /* Return the index of the changed byte. */ { @@ -2506,7 +2570,7 @@ modifier_init(png_modifier *pm) * in the rgb_to_gray check, replacing it with an exact copy of the libpng 1.5 * algorithm. */ -#define DIGITIZE PNG_LIBPNG_VER != 10700 +#define DIGITIZE PNG_LIBPNG_VER < 10700 /* If pm->calculations_use_input_precision is set then operations will happen * with the precision of the input, not the precision of the output depth. @@ -3918,7 +3982,7 @@ transform_row(png_const_structp pp, png_byte buffer[TRANSFORM_ROWMAX], # define check_interlace_type(type) ((void)(type)) # define set_write_interlace_handling(pp,type) png_set_interlace_handling(pp) # define do_own_interlace 0 -#elif PNG_LIBPNG_VER != 10700 +#elif PNG_LIBPNG_VER < 10700 # define set_write_interlace_handling(pp,type) (1) static void check_interlace_type(int const interlace_type) @@ -3946,7 +4010,7 @@ check_interlace_type(int const interlace_type) # define do_own_interlace 1 #endif /* WRITE_INTERLACING tests */ -#if PNG_LIBPNG_VER == 10700 || defined PNG_WRITE_INTERLACING_SUPPORTED +#if PNG_LIBPNG_VER >= 10700 || defined PNG_WRITE_INTERLACING_SUPPORTED # define CAN_WRITE_INTERLACE 1 #else # define CAN_WRITE_INTERLACE 0 @@ -4565,10 +4629,10 @@ static const struct { /* no warnings makes these errors undetectable prior to 1.7.0 */ { sBIT0_error_fn, "sBIT(0): failed to detect error", - PNG_LIBPNG_VER != 10700 }, + PNG_LIBPNG_VER < 10700 }, { sBIT_error_fn, "sBIT(too big): failed to detect error", - PNG_LIBPNG_VER != 10700 }, + PNG_LIBPNG_VER < 10700 }, }; static void @@ -4784,7 +4848,9 @@ perform_formatting_test(png_store *ps) { png_const_charp correct = "29 Aug 2079 13:53:60 +0000"; png_const_charp result; - char timestring[29]; +# if PNG_LIBPNG_VER >= 10600 + char timestring[29]; +# endif png_structp pp; png_time pt; @@ -5756,9 +5822,8 @@ test_standard(png_modifier* const pm, png_byte const colour_type, for (interlace_type = PNG_INTERLACE_NONE; interlace_type < INTERLACE_LAST; ++interlace_type) { - standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), - 0/*palette*/, interlace_type, 0, 0, 0), do_read_interlace, - pm->use_update_info); + standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/, + interlace_type, 0, 0, 0), do_read_interlace, pm->use_update_info); if (fail(pm)) return 0; @@ -5811,50 +5876,47 @@ test_size(png_modifier* const pm, png_byte const colour_type, { png_uint_32 h, w; - for (h=1; h<=16; h+=hinc[bdlo]) + for (h=1; h<=16; h+=hinc[bdlo]) for (w=1; w<=16; w+=winc[bdlo]) { - for (w=1; w<=16; w+=winc[bdlo]) - { - /* First test all the 'size' images against the sequential - * reader using libpng to deinterlace (where required.) This - * validates the write side of libpng. There are four possibilities - * to validate. - */ - standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), - 0/*palette*/, PNG_INTERLACE_NONE, w, h, 0), 0/*do_interlace*/, - pm->use_update_info); + /* First test all the 'size' images against the sequential + * reader using libpng to deinterlace (where required.) This + * validates the write side of libpng. There are four possibilities + * to validate. + */ + standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/, + PNG_INTERLACE_NONE, w, h, 0), 0/*do_interlace*/, + pm->use_update_info); - if (fail(pm)) - return 0; + if (fail(pm)) + return 0; - standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), - 0/*palette*/, PNG_INTERLACE_NONE, w, h, 1), 0/*do_interlace*/, - pm->use_update_info); + standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/, + PNG_INTERLACE_NONE, w, h, 1), 0/*do_interlace*/, + pm->use_update_info); - if (fail(pm)) - return 0; + if (fail(pm)) + return 0; - /* Now validate the interlaced read side - do_interlace true, - * in the progressive case this does actually make a difference - * to the code used in the non-interlaced case too. - */ - standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), - 0/*palette*/, PNG_INTERLACE_NONE, w, h, 0), 1/*do_interlace*/, - pm->use_update_info); + /* Now validate the interlaced read side - do_interlace true, + * in the progressive case this does actually make a difference + * to the code used in the non-interlaced case too. + */ + standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/, + PNG_INTERLACE_NONE, w, h, 0), 1/*do_interlace*/, + pm->use_update_info); - if (fail(pm)) - return 0; + if (fail(pm)) + return 0; -# if CAN_WRITE_INTERLACE - /* Validate the pngvalid code itself: */ - standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), - 0/*palette*/, PNG_INTERLACE_ADAM7, w, h, 1), 1/*do_interlace*/, - pm->use_update_info); +# if CAN_WRITE_INTERLACE + /* Validate the pngvalid code itself: */ + standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/, + PNG_INTERLACE_ADAM7, w, h, 1), 1/*do_interlace*/, + pm->use_update_info); - if (fail(pm)) - return 0; -# endif - } + if (fail(pm)) + return 0; +# endif } } @@ -5865,48 +5927,45 @@ test_size(png_modifier* const pm, png_byte const colour_type, { png_uint_32 h, w; - for (h=1; h<=16; h+=hinc[bdlo]) + for (h=1; h<=16; h+=hinc[bdlo]) for (w=1; w<=16; w+=winc[bdlo]) { - for (w=1; w<=16; w+=winc[bdlo]) - { -# ifdef PNG_READ_INTERLACING_SUPPORTED - /* Test with pngvalid generated interlaced images first; we have - * already verify these are ok (unless pngvalid has self-consistent - * read/write errors, which is unlikely), so this detects errors in - * the read side first: - */ -# if CAN_WRITE_INTERLACE - standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), - 0/*palette*/, PNG_INTERLACE_ADAM7, w, h, 1), 0/*do_interlace*/, - pm->use_update_info); +# ifdef PNG_READ_INTERLACING_SUPPORTED + /* Test with pngvalid generated interlaced images first; we have + * already verify these are ok (unless pngvalid has self-consistent + * read/write errors, which is unlikely), so this detects errors in the + * read side first: + */ +# if CAN_WRITE_INTERLACE + standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/, + PNG_INTERLACE_ADAM7, w, h, 1), 0/*do_interlace*/, + pm->use_update_info); - if (fail(pm)) - return 0; -# endif -# endif /* READ_INTERLACING */ + if (fail(pm)) + return 0; +# endif +# endif /* READ_INTERLACING */ -# ifdef PNG_WRITE_INTERLACING_SUPPORTED - /* Test the libpng write side against the pngvalid read side: */ - standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), - 0/*palette*/, PNG_INTERLACE_ADAM7, w, h, 0), 1/*do_interlace*/, - pm->use_update_info); +# ifdef PNG_WRITE_INTERLACING_SUPPORTED + /* Test the libpng write side against the pngvalid read side: */ + standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/, + PNG_INTERLACE_ADAM7, w, h, 0), 1/*do_interlace*/, + pm->use_update_info); - if (fail(pm)) - return 0; -# endif + if (fail(pm)) + return 0; +# endif -# ifdef PNG_READ_INTERLACING_SUPPORTED -# ifdef PNG_WRITE_INTERLACING_SUPPORTED - /* Test both together: */ - standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), - 0/*palette*/, PNG_INTERLACE_ADAM7, w, h, 0), 0/*do_interlace*/, - pm->use_update_info); +# ifdef PNG_READ_INTERLACING_SUPPORTED +# ifdef PNG_WRITE_INTERLACING_SUPPORTED + /* Test both together: */ + standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/, + PNG_INTERLACE_ADAM7, w, h, 0), 0/*do_interlace*/, + pm->use_update_info); - if (fail(pm)) - return 0; -# endif -# endif /* READ_INTERLACING */ - } + if (fail(pm)) + return 0; +# endif +# endif /* READ_INTERLACING */ } } @@ -6166,7 +6225,7 @@ image_pixel_add_alpha(image_pixel *this, const standard_display *display, { if (this->colour_type == PNG_COLOR_TYPE_GRAY) { -# if PNG_LIBPNG_VER != 10700 +# if PNG_LIBPNG_VER < 10700 if (!for_background && this->bit_depth < 8) this->bit_depth = this->sample_depth = 8; # endif @@ -6176,7 +6235,7 @@ image_pixel_add_alpha(image_pixel *this, const standard_display *display, /* After 1.7 the expansion of bit depth only happens if there is a * tRNS chunk to expand at this point. */ -# if PNG_LIBPNG_VER == 10700 +# if PNG_LIBPNG_VER >= 10700 if (!for_background && this->bit_depth < 8) this->bit_depth = this->sample_depth = 8; # endif @@ -6652,7 +6711,7 @@ transform_range_check(png_const_structp pp, unsigned int r, unsigned int g, unsigned int out, png_byte sample_depth, double err, double limit, const char *name, double digitization_error) { - /* Compare the scaled, digitized, values of our local calculation (in+-err) + /* Compare the scaled, digitzed, values of our local calculation (in+-err) * with the digitized values libpng produced; 'sample_depth' is the actual * digitization depth of the libpng output colors (the bit depth except for * palette images where it is always 8.) The check on 'err' is to detect @@ -7057,7 +7116,7 @@ image_transform_png_set_tRNS_to_alpha_mod(const image_transform *this, image_pixel *that, png_const_structp pp, const transform_display *display) { -#if PNG_LIBPNG_VER != 10700 +#if PNG_LIBPNG_VER < 10700 /* LIBPNG BUG: this always forces palette images to RGB. */ if (that->colour_type == PNG_COLOR_TYPE_PALETTE) image_pixel_convert_PLTE(that); @@ -7067,13 +7126,13 @@ image_transform_png_set_tRNS_to_alpha_mod(const image_transform *this, * convert to an alpha channel. */ if (that->have_tRNS) -# if PNG_LIBPNG_VER == 10700 +# if PNG_LIBPNG_VER >= 10700 if (that->colour_type != PNG_COLOR_TYPE_PALETTE && (that->colour_type & PNG_COLOR_MASK_ALPHA) == 0) # endif image_pixel_add_alpha(that, &display->this, 0/*!for background*/); -#if PNG_LIBPNG_VER != 10700 +#if PNG_LIBPNG_VER < 10700 /* LIBPNG BUG: otherwise libpng still expands to 8 bits! */ else { @@ -7102,7 +7161,7 @@ image_transform_png_set_tRNS_to_alpha_add(image_transform *this, * any action on a palette image. */ return -# if PNG_LIBPNG_VER == 10700 +# if PNG_LIBPNG_VER >= 10700 colour_type != PNG_COLOR_TYPE_PALETTE && # endif (colour_type & PNG_COLOR_MASK_ALPHA) == 0; @@ -7243,7 +7302,7 @@ image_transform_png_set_expand_gray_1_2_4_to_8_mod( const image_transform *this, image_pixel *that, png_const_structp pp, const transform_display *display) { -#if PNG_LIBPNG_VER != 10700 +#if PNG_LIBPNG_VER < 10700 image_transform_png_set_expand_mod(this, that, pp, display); #else /* Only expand grayscale of bit depth less than 8: */ @@ -7259,7 +7318,7 @@ static int image_transform_png_set_expand_gray_1_2_4_to_8_add(image_transform *this, const image_transform **that, png_byte colour_type, png_byte bit_depth) { -#if PNG_LIBPNG_VER != 10700 +#if PNG_LIBPNG_VER < 10700 return image_transform_png_set_expand_add(this, that, colour_type, bit_depth); #else @@ -7289,7 +7348,7 @@ image_transform_png_set_expand_16_set(const image_transform *this, png_set_expand_16(pp); /* NOTE: prior to 1.7 libpng does SET_EXPAND as well, so tRNS is expanded. */ -# if PNG_LIBPNG_VER != 10700 +# if PNG_LIBPNG_VER < 10700 if (that->this.has_tRNS) that->this.is_transparent = 1; # endif @@ -7342,7 +7401,7 @@ image_transform_png_set_scale_16_set(const image_transform *this, transform_display *that, png_structp pp, png_infop pi) { png_set_scale_16(pp); -# if PNG_LIBPNG_VER != 10700 +# if PNG_LIBPNG_VER < 10700 /* libpng will limit the gamma table size: */ that->max_gamma_8 = PNG_MAX_GAMMA_8; # endif @@ -7390,7 +7449,7 @@ image_transform_png_set_strip_16_set(const image_transform *this, transform_display *that, png_structp pp, png_infop pi) { png_set_strip_16(pp); -# if PNG_LIBPNG_VER != 10700 +# if PNG_LIBPNG_VER < 10700 /* libpng will limit the gamma table size: */ that->max_gamma_8 = PNG_MAX_GAMMA_8; # endif @@ -7415,7 +7474,22 @@ image_transform_png_set_strip_16_mod(const image_transform *this, * 'scale' API (above) must be used. */ # ifdef PNG_READ_ACCURATE_SCALE_SUPPORTED -# error PNG_READ_ACCURATE_SCALE should not be set +# if PNG_LIBPNG_VER >= 10504 +# error PNG_READ_ACCURATE_SCALE should not be set +# endif + + /* The strip 16 algorithm drops the low 8 bits rather than calculating + * 1/257, so we need to adjust the permitted errors appropriately: + * Notice that this is only relevant prior to the addition of the + * png_set_scale_16 API in 1.5.4 (but 1.5.4+ always defines the above!) + */ + { + const double d = (255-128.5)/65535; + that->rede += d; + that->greene += d; + that->bluee += d; + that->alphae += d; + } # endif } @@ -7561,8 +7635,8 @@ image_transform_png_set_rgb_to_gray_ini(const image_transform *this, else { - /* The default (built in) coefficients, as above: */ -# if PNG_LIBPNG_VER != 10700 + /* The default (built in) coeffcients, as above: */ +# if PNG_LIBPNG_VER < 10700 data.red_coefficient = 6968 / 32768.; data.green_coefficient = 23434 / 32768.; data.blue_coefficient = 2366 / 32768.; @@ -7645,7 +7719,7 @@ image_transform_png_set_rgb_to_gray_ini(const image_transform *this, * conversion adds another +/-2 in the 16-bit case and * +/-(1<<(15-PNG_MAX_GAMMA_8)) in the 8-bit case. */ -# if PNG_LIBPNG_VER != 10700 +# if PNG_LIBPNG_VER < 10700 if (that->this.bit_depth < 16) that->max_gamma_8 = PNG_MAX_GAMMA_8; # endif @@ -7822,7 +7896,7 @@ image_transform_png_set_rgb_to_gray_mod(const image_transform *this, { double gray, err; -# if PNG_LIBPNG_VER != 10700 +# if PNG_LIBPNG_VER < 10700 if (that->colour_type == PNG_COLOR_TYPE_PALETTE) image_pixel_convert_PLTE(that); # endif @@ -8009,7 +8083,7 @@ image_transform_png_set_rgb_to_gray_mod(const image_transform *this, double b = that->bluef; double be = that->bluee; -# if PNG_LIBPNG_VER != 10700 +# if PNG_LIBPNG_VER < 10700 /* The true gray case involves no math in earlier versions (not * true, there was some if gamma correction was happening too.) */ @@ -8983,7 +9057,7 @@ image_transform_reset_count(void) static int image_transform_test_counter(png_uint_32 counter, unsigned int max) { - /* Test the list to see if there is any point continuing, given a current + /* Test the list to see if there is any point contining, given a current * counter and a 'max' value. */ image_transform *next = image_transform_first; @@ -9788,7 +9862,7 @@ gamma_component_validate(const char *name, const validate_info *vi, * lost. This can result in up to a +/-1 error in the presence of * an sbit less than the bit depth. */ -# if PNG_LIBPNG_VER != 10700 +# if PNG_LIBPNG_VER < 10700 # define SBIT_ERROR .5 # else # define SBIT_ERROR 1. @@ -9848,6 +9922,47 @@ gamma_component_validate(const char *name, const validate_info *vi, * (chop) method of scaling was used. */ # ifndef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED +# if PNG_LIBPNG_VER < 10504 + /* This may be required for other components in the future, + * but at present the presence of gamma correction effectively + * prevents the errors in the component scaling (I don't quite + * understand why, but since it's better this way I care not + * to ask, JB 20110419.) + */ + if (pass == 0 && alpha < 0 && vi->scale16 && vi->sbit > 8 && + vi->sbit + vi->isbit_shift == 16) + { + tmp = ((id >> 8) - .5)/255; + + if (tmp > 0) + { + is_lo = ceil(outmax * tmp - vi->maxout_total); + if (is_lo < 0) is_lo = 0; + } + + else + is_lo = 0; + + tmp = ((id >> 8) + .5)/255; + + if (tmp < 1) + { + is_hi = floor(outmax * tmp + vi->maxout_total); + if (is_hi > outmax) is_hi = outmax; + } + + else + is_hi = outmax; + + if (!(od < is_lo || od > is_hi)) + { + if (encoded_error < vi->outlog) + return i; + + pass = "within 8 bit limits:\n"; + } + } +# endif # endif } else /* !use_input_precision */ @@ -9886,12 +10001,9 @@ gamma_component_validate(const char *name, const validate_info *vi, case ALPHA_MODE_OFFSET + PNG_ALPHA_BROKEN: case ALPHA_MODE_OFFSET + PNG_ALPHA_OPTIMIZED: # endif /* ALPHA_MODE_SUPPORTED */ -# if (defined PNG_READ_BACKGROUND_SUPPORTED) ||\ - (defined PNG_READ_ALPHA_MODE_SUPPORTED) do_compose = (alpha > 0 && alpha < 1); use_input = (alpha != 0); break; -# endif default: break; @@ -10537,21 +10649,16 @@ static void perform_gamma_transform_tests(png_modifier *pm) { unsigned int i, j; - for (i=0; ingamma_tests; ++i) - { - for (j=0; jngamma_tests; ++j) + for (i=0; ingamma_tests; ++i) for (j=0; jngamma_tests; ++j) + if (i != j) { - if (i != j) - { - gamma_transform_test(pm, colour_type, bit_depth, palette_number, - pm->interlace_type, 1/pm->gammas[i], pm->gammas[j], - 0/*sBIT*/, pm->use_input_precision, 0/*do not scale16*/); + gamma_transform_test(pm, colour_type, bit_depth, palette_number, + pm->interlace_type, 1/pm->gammas[i], pm->gammas[j], 0/*sBIT*/, + pm->use_input_precision, 0 /*do not scale16*/); - if (fail(pm)) - return; - } + if (fail(pm)) + return; } - } } } @@ -10580,17 +10687,14 @@ static void perform_gamma_sbit_tests(png_modifier *pm) { unsigned int j; - for (j=0; jngamma_tests; ++j) + for (j=0; jngamma_tests; ++j) if (i != j) { - if (i != j) - { - gamma_transform_test(pm, colour_type, bit_depth, npalette, - pm->interlace_type, 1/pm->gammas[i], pm->gammas[j], - sbit, pm->use_input_precision_sbit, 0 /*scale16*/); + gamma_transform_test(pm, colour_type, bit_depth, npalette, + pm->interlace_type, 1/pm->gammas[i], pm->gammas[j], + sbit, pm->use_input_precision_sbit, 0 /*scale16*/); - if (fail(pm)) - return; - } + if (fail(pm)) + return; } } } @@ -10607,7 +10711,7 @@ static void perform_gamma_scale16_tests(png_modifier *pm) # ifndef PNG_MAX_GAMMA_8 # define PNG_MAX_GAMMA_8 11 # endif -# if defined PNG_MAX_GAMMA_8 || PNG_LIBPNG_VER != 10700 +# if defined PNG_MAX_GAMMA_8 || PNG_LIBPNG_VER < 10700 # define SBIT_16_TO_8 PNG_MAX_GAMMA_8 # else # define SBIT_16_TO_8 16 @@ -10842,17 +10946,14 @@ perform_gamma_composition_tests(png_modifier *pm, int do_background, unsigned int i, j; /* Don't skip the i==j case here - it's relevant. */ - for (i=0; ingamma_tests; ++i) + for (i=0; ingamma_tests; ++i) for (j=0; jngamma_tests; ++j) { - for (j=0; jngamma_tests; ++j) - { - gamma_composition_test(pm, colour_type, bit_depth, palette_number, - pm->interlace_type, 1/pm->gammas[i], pm->gammas[j], - pm->use_input_precision, do_background, expand_16); + gamma_composition_test(pm, colour_type, bit_depth, palette_number, + pm->interlace_type, 1/pm->gammas[i], pm->gammas[j], + pm->use_input_precision, do_background, expand_16); - if (fail(pm)) - return; - } + if (fail(pm)) + return; } } } @@ -10955,7 +11056,7 @@ perform_gamma_test(png_modifier *pm, int summary) pm->calculations_use_input_precision = 0; if (summary) - summarize_gamma_errors(pm, NULL/*who*/, 1/*low bit depth*/, 1/*indexed*/); + summarize_gamma_errors(pm, 0/*who*/, 1/*low bit depth*/, 1/*indexed*/); if (fail(pm)) return; @@ -11081,10 +11182,8 @@ png_pass_start_row(int pass) { int x, y; ++pass; - for (y=0; y<8; ++y) - for (x=0; x<8; ++x) - if (adam7[y][x] == pass) - return y; + for (y=0; y<8; ++y) for (x=0; x<8; ++x) if (adam7[y][x] == pass) + return y; return 0xf; } @@ -11093,10 +11192,8 @@ png_pass_start_col(int pass) { int x, y; ++pass; - for (x=0; x<8; ++x) - for (y=0; y<8; ++y) - if (adam7[y][x] == pass) - return x; + for (x=0; x<8; ++x) for (y=0; y<8; ++y) if (adam7[y][x] == pass) + return x; return 0xf; } @@ -11105,24 +11202,18 @@ png_pass_row_shift(int pass) { int x, y, base=(-1), inc=8; ++pass; - for (y=0; y<8; ++y) + for (y=0; y<8; ++y) for (x=0; x<8; ++x) if (adam7[y][x] == pass) { - for (x=0; x<8; ++x) - { - if (adam7[y][x] == pass) - { - if (base == (-1)) - base = y; - else if (base == y) - {} - else if (inc == y-base) - base=y; - else if (inc == 8) - inc = y-base, base=y; - else if (inc != y-base) - return 0xff; /* error - more than one 'inc' value! */ - } - } + if (base == (-1)) + base = y; + else if (base == y) + {} + else if (inc == y-base) + base=y; + else if (inc == 8) + inc = y-base, base=y; + else if (inc != y-base) + return 0xff; /* error - more than one 'inc' value! */ } if (base == (-1)) return 0xfe; /* error - no row in pass! */ @@ -11145,24 +11236,18 @@ png_pass_col_shift(int pass) { int x, y, base=(-1), inc=8; ++pass; - for (x=0; x<8; ++x) + for (x=0; x<8; ++x) for (y=0; y<8; ++y) if (adam7[y][x] == pass) { - for (y=0; y<8; ++y) - { - if (adam7[y][x] == pass) - { - if (base == (-1)) - base = x; - else if (base == x) - {} - else if (inc == x-base) - base=x; - else if (inc == 8) - inc = x-base, base=x; - else if (inc != x-base) - return 0xff; /* error - more than one 'inc' value! */ - } - } + if (base == (-1)) + base = x; + else if (base == x) + {} + else if (inc == x-base) + base=x; + else if (inc == 8) + inc = x-base, base=x; + else if (inc != x-base) + return 0xff; /* error - more than one 'inc' value! */ } if (base == (-1)) return 0xfe; /* error - no row in pass! */ @@ -11226,9 +11311,8 @@ png_row_in_interlace_pass(png_uint_32 y, int pass) int x; y &= 7; ++pass; - for (x=0; x<8; ++x) - if (adam7[y][x] == pass) - return 1; + for (x=0; x<8; ++x) if (adam7[y][x] == pass) + return 1; return 0; } @@ -11240,9 +11324,8 @@ png_col_in_interlace_pass(png_uint_32 x, int pass) int y; x &= 7; ++pass; - for (y=0; y<8; ++y) - if (adam7[y][x] == pass) - return 1; + for (y=0; y<8; ++y) if (adam7[y][x] == pass) + return 1; return 0; } @@ -11256,17 +11339,11 @@ png_pass_rows(png_uint_32 height, int pass) height &= 7; ++pass; - for (y=0; y<8; ++y) + for (y=0; y<8; ++y) for (x=0; x<8; ++x) if (adam7[y][x] == pass) { - for (x=0; x<8; ++x) - { - if (adam7[y][x] == pass) - { - rows += tiles; - if (y < height) ++rows; - break; /* i.e. break the 'x', column, loop. */ - } - } + rows += tiles; + if (y < height) ++rows; + break; /* i.e. break the 'x', column, loop. */ } return rows; @@ -11281,17 +11358,11 @@ png_pass_cols(png_uint_32 width, int pass) width &= 7; ++pass; - for (x=0; x<8; ++x) + for (x=0; x<8; ++x) for (y=0; y<8; ++y) if (adam7[y][x] == pass) { - for (y=0; y<8; ++y) - { - if (adam7[y][x] == pass) - { - cols += tiles; - if (x < width) ++cols; - break; /* i.e. break the 'y', row, loop. */ - } - } + cols += tiles; + if (x < width) ++cols; + break; /* i.e. break the 'y', row, loop. */ } return cols; @@ -11610,7 +11681,7 @@ int main(int argc, char **argv) * code that 16-bit arithmetic is used for 8-bit samples when it would make a * difference. */ - pm.assume_16_bit_calculations = PNG_LIBPNG_VER == 10700; + pm.assume_16_bit_calculations = PNG_LIBPNG_VER >= 10700; /* Currently 16 bit expansion happens at the end of the pipeline, so the * calculations are done in the input bit depth not the output. @@ -11630,17 +11701,17 @@ int main(int argc, char **argv) # ifdef PNG_WRITE_tRNS_SUPPORTED pm.test_tRNS = 1; # endif - pm.test_lbg = 1; /* PNG_LIBPNG_VER >= 10600 */ + pm.test_lbg = PNG_LIBPNG_VER >= 10600; pm.test_lbg_gamma_threshold = 1; - pm.test_lbg_gamma_transform = 1; /* PNG_LIBPNG_VER >= 10600 */ + pm.test_lbg_gamma_transform = PNG_LIBPNG_VER >= 10600; pm.test_lbg_gamma_sbit = 1; - pm.test_lbg_gamma_composition = PNG_LIBPNG_VER == 10700; + pm.test_lbg_gamma_composition = PNG_LIBPNG_VER >= 10700; /* And the test encodings */ pm.encodings = test_encodings; pm.nencodings = ARRAY_SIZE(test_encodings); -# if PNG_LIBPNG_VER != 10700 +# if PNG_LIBPNG_VER < 10700 pm.sbitlow = 8U; /* because libpng doesn't do sBIT below 8! */ # else pm.sbitlow = 1U; @@ -11648,7 +11719,7 @@ int main(int argc, char **argv) /* The following allows results to pass if they correspond to anything in the * transformed range [input-.5,input+.5]; this is is required because of the - * way libpng treats the 16_TO_8 flag when building the gamma tables in + * way libpng treates the 16_TO_8 flag when building the gamma tables in * releases up to 1.6.0. * * TODO: review this @@ -11670,7 +11741,7 @@ int main(int argc, char **argv) pm.maxout16 = .499; /* Error in *encoded* value */ pm.maxabs16 = .00005;/* 1/20000 */ pm.maxcalc16 =1./65535;/* +/-1 in 16 bits for compose errors */ -# if PNG_LIBPNG_VER != 10700 +# if PNG_LIBPNG_VER < 10700 pm.maxcalcG = 1./((1< 0) - { if (strcmp(*++argv, "-a") == 0) showall = 1; else if (strcmp(*argv, "-e") == 0 && argc > 0) @@ -104,7 +105,6 @@ int validation_ascii_to_fp(int count, int argc, char **argv) fprintf(stderr, "unknown argument %s\n", *argv); return 1; } - } do { @@ -130,8 +130,8 @@ int validation_ascii_to_fp(int count, int argc, char **argv) */ if (buffer[precision+7] != 71) { - fprintf(stderr, "%g[%d] -> '%s'[%lu] buffer overflow\n", - test, precision, buffer, (unsigned long)strlen(buffer)); + fprintf(stderr, "%g[%d] -> '%s'[%lu] buffer overflow\n", test, + precision, buffer, (unsigned long)strlen(buffer)); failed = 1; } @@ -146,16 +146,16 @@ int validation_ascii_to_fp(int count, int argc, char **argv) if (test >= 0 && strcmp(buffer, "inf") || test < 0 && strcmp(buffer, "-inf")) { - fprintf(stderr, "%g[%d] -> '%s' but expected 'inf'\n", - test, precision, buffer); + fprintf(stderr, "%g[%d] -> '%s' but expected 'inf'\n", test, + precision, buffer); failed = 1; } } else if (!png_check_fp_number(buffer, precision+10, &state, &index) || buffer[index] != 0) { - fprintf(stderr, "%g[%d] -> '%s' but has bad format ('%c')\n", - test, precision, buffer, buffer[index]); + fprintf(stderr, "%g[%d] -> '%s' but has bad format ('%c')\n", test, + precision, buffer, buffer[index]); failed = 1; } else if (PNG_FP_IS_NEGATIVE(state) && !(test < 0)) @@ -187,7 +187,7 @@ int validation_ascii_to_fp(int count, int argc, char **argv) /* Check the result against the original. */ double out = atof(buffer); double change = fabs((out - test)/test); - double allow = .5 / pow(10, + double allow = .5/pow(10, (precision >= DBL_DIG) ? DBL_DIG-1 : precision-1); /* NOTE: if you hit this error case are you compiling with gcc @@ -257,9 +257,8 @@ skip: } while (--count); - printf("Tested %d finite values, %d non-finite, %d OK (%d failed) " - "%d minor arithmetic errors\n", - finite, nonfinite, ok, failcount, minorarith); + printf("Tested %d finite values, %d non-finite, %d OK (%d failed) %d minor " + "arithmetic errors\n", finite, nonfinite, ok, failcount, minorarith); printf(" Error with >=%d digit precision %.2f%%\n", DBL_DIG, max_abs); printf(" Error with < %d digit precision %.2f%%\n", DBL_DIG, max); @@ -372,8 +371,8 @@ static int check_one_character(checkfp_command *co, checkfp_control c, int ch) /* This should never fail (it's a serious bug if it does): */ if (index != 0 && index != 1) { - fprintf(stderr, "%s: read beyond end of string (%lu)\n", - co->number, (unsigned long)index); + fprintf(stderr, "%s: read beyond end of string (%lu)\n", co->number, + (unsigned long)index); return 0; } @@ -504,8 +503,8 @@ static int check_one_character(checkfp_command *co, checkfp_control c, int ch) if (number_is_valid != c.number_was_valid) { fprintf(stderr, - "%s: character '%c' [0x%.2x] changed number validity\n", - co->number, ch, ch); + "%s: character '%c' [0x%.2x] changed number validity\n", co->number, + ch, ch); return 0; } @@ -522,13 +521,10 @@ static int check_all_characters(checkfp_command *co, checkfp_control c) { int ch; - if (c.cnumber+4 < sizeof co->number) + if (c.cnumber+4 < sizeof co->number) for (ch=0; ch<256; ++ch) { - for (ch=0; ch<256; ++ch) - { - if (!check_one_character(co, c, ch)) - return 0; - } + if (!check_one_character(co, c, ch)) + return 0; } return 1; @@ -543,13 +539,10 @@ static int check_some_characters(checkfp_command *co, checkfp_control c, if (c.cnumber+4 < sizeof co->number && c.limit >= 0) { - if (c.limit > 0) + if (c.limit > 0) for (i=0; tests[i]; ++i) { - for (i=0; tests[i]; ++i) - { - if (!check_one_character(co, c, tests[i])) - return 0; - } + if (!check_one_character(co, c, tests[i])) + return 0; } /* At the end check all the characters. */ @@ -623,10 +616,10 @@ int validation_muldiv(int count, int argc, char **argv) png_int_32 times, div; while (--argc > 0) - { - fprintf(stderr, "unknown argument %s\n", *++argv); - return 1; - } + { + fprintf(stderr, "unknown argument %s\n", *++argv); + return 1; + } /* Find out about the random number generator. */ randbuffer = RAND_MAX; @@ -694,25 +687,25 @@ int validation_muldiv(int count, int argc, char **argv) ok = 0, ++overflow, fpround = fp/*misleading*/; if (verbose) - fprintf(stderr, "TEST %d * %d / %d -> %lld (%s)\n", - a, times, div, fp, ok ? "ok" : "overflow"); + fprintf(stderr, "TEST %d * %d / %d -> %lld (%s)\n", a, times, div, + fp, ok ? "ok" : "overflow"); ++tested; if (png_muldiv(&result, a, times, div) != ok) { ++error; if (ok) - fprintf(stderr, "%d * %d / %d -> overflow (expected %lld)\n", - a, times, div, fp); + fprintf(stderr, "%d * %d / %d -> overflow (expected %lld)\n", a, + times, div, fp); else - fprintf(stderr, "%d * %d / %d -> %d (expected overflow %lld)\n", - a, times, div, result, fp); + fprintf(stderr, "%d * %d / %d -> %d (expected overflow %lld)\n", a, + times, div, result, fp); } else if (ok && result != fpround) { ++error; - fprintf(stderr, "%d * %d / %d -> %d not %lld\n", - a, times, div, result, fp); + fprintf(stderr, "%d * %d / %d -> %d not %lld\n", a, times, div, result, + fp); } else ++passed; @@ -728,8 +721,8 @@ int validation_muldiv(int count, int argc, char **argv) } while (--count > 0); - printf("%d tests including %d overflows, %d passed, %d failed " - "(%d 64-bit errors)\n", tested, overflow, passed, error, error64); + printf("%d tests including %d overflows, %d passed, %d failed (%d 64-bit " + "errors)\n", tested, overflow, passed, error, error64); return 0; } @@ -828,9 +821,8 @@ int validation_gamma(int argc, char **argv) { if (error > .68) /* By experiment error is less than .68 */ { - fprintf(stderr, - "16-bit log error: %d: got %u, expected %f error: %f\n", - i, png_log16bit(i), correct, error); + fprintf(stderr, "16-bit log error: %d: got %u, expected %f" + " error: %f\n", i, png_log16bit(i), correct, error); } } } @@ -849,9 +841,8 @@ int validation_gamma(int argc, char **argv) maxerr = fabs(error); if (fabs(error) > 1883) /* By experiment. */ { - fprintf(stderr, - "32-bit exp error: %d: got %u, expected %f error: %f\n", - i, png_exp(i), correct, error); + fprintf(stderr, "32-bit exp error: %d: got %u, expected %f" + " error: %f\n", i, png_exp(i), correct, error); } } @@ -868,9 +859,8 @@ int validation_gamma(int argc, char **argv) maxerr = fabs(error); if (fabs(error) > .50002) /* By experiment */ { - fprintf(stderr, - "8-bit exp error: %d: got %u, expected %f error: %f\n", - i, png_exp8bit(i), correct, error); + fprintf(stderr, "8-bit exp error: %d: got %u, expected %f" + " error: %f\n", i, png_exp8bit(i), correct, error); } } @@ -887,9 +877,8 @@ int validation_gamma(int argc, char **argv) maxerr = fabs(error); if (fabs(error) > .524) /* By experiment */ { - fprintf(stderr, - "16-bit exp error: %d: got %u, expected %f error: %f\n", - i, png_exp16bit(i), correct, error); + fprintf(stderr, "16-bit exp error: %d: got %u, expected %f" + " error: %f\n", i, png_exp16bit(i), correct, error); } } @@ -951,7 +940,7 @@ int validation_gamma(int argc, char **argv) /**************************** VALIDATION TESTS ********************************/ /* Various validation routines are included herein, they require some - * definition for png_warning and png_error, settings of VALIDATION: + * definition for png_warning and png_error, seetings of VALIDATION: * * 1: validates the ASCII to floating point conversions * 2: validates png_muldiv diff --git a/Engine/lib/lpng/contrib/libtests/timepng.c b/Engine/lib/lpng/contrib/libtests/timepng.c index a66f51345..23d8b17b1 100644 --- a/Engine/lib/lpng/contrib/libtests/timepng.c +++ b/Engine/lib/lpng/contrib/libtests/timepng.c @@ -2,6 +2,8 @@ * * Copyright (c) 2013,2016 John Cunningham Bowler * + * Last changed in libpng 1.6.22 [May 26, 2016] + * * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer * and license in png.h @@ -526,7 +528,7 @@ int main(int argc, char **argv) } } - else if (nfiles == 0) /* Read from stdin without --dissemble */ + else if (nfiles == 0) /* Read from stdin withoout --dissemble */ { char filename[FILENAME_MAX+1]; diff --git a/Engine/lib/lpng/contrib/mips-mmi/linux.c b/Engine/lib/lpng/contrib/mips-mmi/linux.c deleted file mode 100644 index dc003807c..000000000 --- a/Engine/lib/lpng/contrib/mips-mmi/linux.c +++ /dev/null @@ -1,141 +0,0 @@ -/* contrib/mips-mmi/linux.c - * - * Copyright (c) 2024 Cosmin Truta - * Written by guxiwei, 2023 - * - * This code is released under the libpng license. - * For conditions of distribution and use, see the disclaimer - * and license in png.h - */ - -#include -#include -#include -#include - -/* - * parse_r var, r - Helper assembler macro for parsing register names. - * - * This converts the register name in $n form provided in \r to the - * corresponding register number, which is assigned to the variable \var. It is - * needed to allow explicit encoding of instructions in inline assembly where - * registers are chosen by the compiler in $n form, allowing us to avoid using - * fixed register numbers. - * - * It also allows newer instructions (not implemented by the assembler) to be - * transparently implemented using assembler macros, instead of needing separate - * cases depending on toolchain support. - * - * Simple usage example: - * __asm__ __volatile__("parse_r __rt, %0\n\t" - * ".insn\n\t" - * "# di %0\n\t" - * ".word (0x41606000 | (__rt << 16))" - * : "=r" (status); - */ - -/* Match an individual register number and assign to \var */ -#define _IFC_REG(n) \ - ".ifc \\r, $" #n "\n\t" \ - "\\var = " #n "\n\t" \ - ".endif\n\t" - -__asm__(".macro parse_r var r\n\t" - "\\var = -1\n\t" - _IFC_REG(0) _IFC_REG(1) _IFC_REG(2) _IFC_REG(3) - _IFC_REG(4) _IFC_REG(5) _IFC_REG(6) _IFC_REG(7) - _IFC_REG(8) _IFC_REG(9) _IFC_REG(10) _IFC_REG(11) - _IFC_REG(12) _IFC_REG(13) _IFC_REG(14) _IFC_REG(15) - _IFC_REG(16) _IFC_REG(17) _IFC_REG(18) _IFC_REG(19) - _IFC_REG(20) _IFC_REG(21) _IFC_REG(22) _IFC_REG(23) - _IFC_REG(24) _IFC_REG(25) _IFC_REG(26) _IFC_REG(27) - _IFC_REG(28) _IFC_REG(29) _IFC_REG(30) _IFC_REG(31) - ".iflt \\var\n\t" - ".error \"Unable to parse register name \\r\"\n\t" - ".endif\n\t" - ".endm"); - -#define HWCAP_LOONGSON_CPUCFG (1 << 14) - -static int cpucfg_available(void) -{ - return getauxval(AT_HWCAP) & HWCAP_LOONGSON_CPUCFG; -} - -static int strstart(const char *str, const char *pfx, const char **ptr) -{ - while (*pfx && *pfx == *str) { - pfx++; - str++; - } - if (!*pfx && ptr) - *ptr = str; - return !*pfx; -} - -/* Most toolchains have no CPUCFG support yet */ -static uint32_t read_cpucfg(uint32_t reg) -{ - uint32_t __res; - - __asm__ __volatile__( - "parse_r __res,%0\n\t" - "parse_r reg,%1\n\t" - ".insn \n\t" - ".word (0xc8080118 | (reg << 21) | (__res << 11))\n\t" - :"=r"(__res) - :"r"(reg) - : - ); - return __res; -} - -#define LOONGSON_CFG1 0x1 - -#define LOONGSON_CFG1_MMI (1 << 4) - -static int cpu_flags_cpucfg(void) -{ - int flags = 0; - uint32_t cfg1 = read_cpucfg(LOONGSON_CFG1); - - if (cfg1 & LOONGSON_CFG1_MMI) - flags = 1; - - return flags; -} - -static int cpu_flags_cpuinfo(void) -{ - FILE *f = fopen("/proc/cpuinfo", "r"); - char buf[200]; - int flags = 0; - - if (!f) - return flags; - - while (fgets(buf, sizeof(buf), f)) { - /* Legacy kernel may not export MMI in ASEs implemented */ - if (strstart(buf, "cpu model", NULL)) { - if (strstr(buf, "Loongson-3 ")) - flags = 1; - break; - } - if (strstart(buf, "ASEs implemented", NULL)) { - if (strstr(buf, " loongson-mmi")) - flags = 1; - break; - } - } - fclose(f); - return flags; -} - -static int png_have_mmi() -{ - if (cpucfg_available()) - return cpu_flags_cpucfg(); - else - return cpu_flags_cpuinfo(); - return 0; -} diff --git a/Engine/lib/lpng/contrib/mips-msa/linux.c b/Engine/lib/lpng/contrib/mips-msa/linux.c index 5651df707..140215c4e 100644 --- a/Engine/lib/lpng/contrib/mips-msa/linux.c +++ b/Engine/lib/lpng/contrib/mips-msa/linux.c @@ -1,54 +1,64 @@ /* contrib/mips-msa/linux.c * - * Copyright (c) 2020-2023 Cosmin Truta * Copyright (c) 2016 Glenn Randers-Pehrson * Written by Mandar Sahastrabuddhe, 2016. - * Updated by Sui Jingfeng, 2021. + * Last changed in libpng 1.6.25beta03 [August 29, 2016] * * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer * and license in png.h * - * On Linux, png_have_msa is implemented by reading the pseudo-file - * "/proc/self/auxv". - * - * See contrib/mips-msa/README before reporting bugs. + * SEE contrib/mips-msa/README before reporting bugs * * STATUS: SUPPORTED * BUG REPORTS: png-mng-implement@sourceforge.net + * + * png_have_msa implemented for Linux by reading the widely available + * pseudo-file /proc/cpuinfo. + * + * This code is strict ANSI-C and is probably moderately portable; it does + * however use and it assumes that /proc/cpuinfo is never localized. */ -#include -#include +#include +#include #include -#include static int png_have_msa(png_structp png_ptr) { - Elf64_auxv_t aux; - int fd; - int has_msa = 0; + FILE *f = fopen("/proc/cpuinfo", "rb"); - fd = open("/proc/self/auxv", O_RDONLY); - if (fd >= 0) + char *string = "msa"; + char word[10]; + + if (f != NULL) { - while (read(fd, &aux, sizeof(Elf64_auxv_t)) == sizeof(Elf64_auxv_t)) + while(!feof(f)) { - if (aux.a_type == AT_HWCAP) - { - uint64_t hwcap = aux.a_un.a_val; + int ch = fgetc(f); + static int i = 0; - has_msa = (hwcap >> 1) & 1; - break; + while(!(ch <= 32)) + { + word[i++] = ch; + ch = fgetc(f); } + + int val = strcmp(string, word); + + if (val == 0) + return 1; + + i = 0; + memset(word, 0, 10); } - close(fd); + + fclose(f); } #ifdef PNG_WARNINGS_SUPPORTED else - png_warning(png_ptr, "/proc/self/auxv open failed"); + png_warning(png_ptr, "/proc/cpuinfo open failed"); #endif - - return has_msa; + return 0; } diff --git a/Engine/lib/lpng/contrib/oss-fuzz/README.txt b/Engine/lib/lpng/contrib/oss-fuzz/README.txt index 66d5242c5..3b3656fbb 100644 --- a/Engine/lib/lpng/contrib/oss-fuzz/README.txt +++ b/Engine/lib/lpng/contrib/oss-fuzz/README.txt @@ -1,3 +1,4 @@ +Last changed in libpng 1.6.33 [September 28, 2017] Copyright (c) 2017 Glenn Randers-Pehrson This code is released under the libpng license. diff --git a/Engine/lib/lpng/contrib/oss-fuzz/build.sh b/Engine/lib/lpng/contrib/oss-fuzz/build.sh index 7b8f02639..f9e1b0776 100644 --- a/Engine/lib/lpng/contrib/oss-fuzz/build.sh +++ b/Engine/lib/lpng/contrib/oss-fuzz/build.sh @@ -1,5 +1,4 @@ #!/bin/bash -eu - # Copyright 2017-2018 Glenn Randers-Pehrson # Copyright 2016 Google Inc. # @@ -15,6 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# Last changed in libpng 1.6.35 [July 15, 2018] +# # Revisions by Glenn Randers-Pehrson, 2017: # 1. Build only the library, not the tools (changed "make -j$(nproc) all" to # "make -j$(nproc) libpng16.la"). diff --git a/Engine/lib/lpng/contrib/oss-fuzz/libpng_read_fuzzer.cc b/Engine/lib/lpng/contrib/oss-fuzz/libpng_read_fuzzer.cc index 6d51f73e5..7b305509c 100644 --- a/Engine/lib/lpng/contrib/oss-fuzz/libpng_read_fuzzer.cc +++ b/Engine/lib/lpng/contrib/oss-fuzz/libpng_read_fuzzer.cc @@ -1,9 +1,12 @@ + // libpng_read_fuzzer.cc // Copyright 2017-2018 Glenn Randers-Pehrson // Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that may // be found in the LICENSE file https://cs.chromium.org/chromium/src/LICENSE +// Last changed in libpng 1.6.35 [July 15, 2018] + // The modifications in 2017 by Glenn Randers-Pehrson include // 1. addition of a PNG_CLEANUP macro, // 2. setting the option to ignore ADLER32 checksums, @@ -14,17 +17,14 @@ #include #include -#include #include #include #define PNG_INTERNAL #include "png.h" -#include "nalloc.h" #define PNG_CLEANUP \ - nalloc_end(); \ if(png_handler.png_ptr) \ { \ if (png_handler.row_ptr) \ @@ -60,7 +60,7 @@ struct PngObjectHandler { png_free(png_ptr, row_ptr); if (end_info_ptr) png_destroy_read_struct(&png_ptr, &info_ptr, &end_info_ptr); - else if (info_ptr) + else if (info_ptr) png_destroy_read_struct(&png_ptr, &info_ptr, nullptr); else png_destroy_read_struct(&png_ptr, nullptr, nullptr); @@ -78,22 +78,6 @@ void user_read_data(png_structp png_ptr, png_bytep data, size_t length) { buf_state->data += length; } -void* limited_malloc(png_structp, png_alloc_size_t size) { - // libpng may allocate large amounts of memory that the fuzzer reports as - // an error. In order to silence these errors, make libpng fail when trying - // to allocate a large amount. This allocator used to be in the Chromium - // version of this fuzzer. - // This number is chosen to match the default png_user_chunk_malloc_max. - if (size > 8000000) - return nullptr; - - return malloc(size); -} - -void default_free(png_structp, png_voidp ptr) { - return free(ptr); -} - static const int kPngHeaderSize = 8; // Entry point for LibFuzzer. @@ -103,7 +87,6 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { if (size < kPngHeaderSize) { return 0; } - nalloc_init(nullptr); std::vector v(data, data + size); if (png_sig_cmp(v.data(), 0, kPngHeaderSize)) { @@ -123,7 +106,6 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { return 0; } - nalloc_start(data, size); png_handler.info_ptr = png_create_info_struct(png_handler.png_ptr); if (!png_handler.info_ptr) { PNG_CLEANUP @@ -136,9 +118,6 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { return 0; } - // Use a custom allocator that fails for large allocations to avoid OOM. - png_set_mem_fn(png_handler.png_ptr, nullptr, limited_malloc, default_free); - png_set_crc_action(png_handler.png_ptr, PNG_CRC_QUIET_USE, PNG_CRC_QUIET_USE); #ifdef PNG_IGNORE_ADLER32 png_set_option(png_handler.png_ptr, PNG_IGNORE_ADLER32, PNG_OPTION_ON); @@ -207,21 +186,5 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { png_read_end(png_handler.png_ptr, png_handler.end_info_ptr); PNG_CLEANUP - -#ifdef PNG_SIMPLIFIED_READ_SUPPORTED - // Simplified READ API - png_image image; - memset(&image, 0, (sizeof image)); - image.version = PNG_IMAGE_VERSION; - - if (!png_image_begin_read_from_memory(&image, data, size)) { - return 0; - } - - image.format = PNG_FORMAT_RGBA; - std::vector buffer(PNG_IMAGE_SIZE(image)); - png_image_finish_read(&image, NULL, buffer.data(), 0, NULL); -#endif - return 0; } diff --git a/Engine/lib/lpng/contrib/oss-fuzz/nalloc.h b/Engine/lib/lpng/contrib/oss-fuzz/nalloc.h deleted file mode 100644 index 82435967e..000000000 --- a/Engine/lib/lpng/contrib/oss-fuzz/nalloc.h +++ /dev/null @@ -1,330 +0,0 @@ -/* - MIT License - - Copyright (c) 2025 Catena cyber - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. -*/ - -#ifndef NALLOC_H_ -#define NALLOC_H_ - -#if defined(__clang__) && defined(__has_feature) -#if __has_feature(address_sanitizer) -#define NALLOC_ASAN 1 -#endif -#endif - -#include -#include -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -static const uint32_t nalloc_crc32_table[] = { - 0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b, - 0x1a864db2, 0x1e475005, 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61, - 0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd, 0x4c11db70, 0x48d0c6c7, - 0x4593e01e, 0x4152fda9, 0x5f15adac, 0x5bd4b01b, 0x569796c2, 0x52568b75, - 0x6a1936c8, 0x6ed82b7f, 0x639b0da6, 0x675a1011, 0x791d4014, 0x7ddc5da3, - 0x709f7b7a, 0x745e66cd, 0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039, - 0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5, 0xbe2b5b58, 0xbaea46ef, - 0xb7a96036, 0xb3687d81, 0xad2f2d84, 0xa9ee3033, 0xa4ad16ea, 0xa06c0b5d, - 0xd4326d90, 0xd0f37027, 0xddb056fe, 0xd9714b49, 0xc7361b4c, 0xc3f706fb, - 0xceb42022, 0xca753d95, 0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1, - 0xe13ef6f4, 0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d, 0x34867077, 0x30476dc0, - 0x3d044b19, 0x39c556ae, 0x278206ab, 0x23431b1c, 0x2e003dc5, 0x2ac12072, - 0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16, 0x018aeb13, 0x054bf6a4, - 0x0808d07d, 0x0cc9cdca, 0x7897ab07, 0x7c56b6b0, 0x71159069, 0x75d48dde, - 0x6b93dddb, 0x6f52c06c, 0x6211e6b5, 0x66d0fb02, 0x5e9f46bf, 0x5a5e5b08, - 0x571d7dd1, 0x53dc6066, 0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba, - 0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e, 0xbfa1b04b, 0xbb60adfc, - 0xb6238b25, 0xb2e29692, 0x8aad2b2f, 0x8e6c3698, 0x832f1041, 0x87ee0df6, - 0x99a95df3, 0x9d684044, 0x902b669d, 0x94ea7b2a, 0xe0b41de7, 0xe4750050, - 0xe9362689, 0xedf73b3e, 0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2, - 0xc6bcf05f, 0xc27dede8, 0xcf3ecb31, 0xcbffd686, 0xd5b88683, 0xd1799b34, - 0xdc3abded, 0xd8fba05a, 0x690ce0ee, 0x6dcdfd59, 0x608edb80, 0x644fc637, - 0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb, 0x4f040d56, 0x4bc510e1, - 0x46863638, 0x42472b8f, 0x5c007b8a, 0x58c1663d, 0x558240e4, 0x51435d53, - 0x251d3b9e, 0x21dc2629, 0x2c9f00f0, 0x285e1d47, 0x36194d42, 0x32d850f5, - 0x3f9b762c, 0x3b5a6b9b, 0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff, - 0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623, 0xf12f560e, 0xf5ee4bb9, - 0xf8ad6d60, 0xfc6c70d7, 0xe22b20d2, 0xe6ea3d65, 0xeba91bbc, 0xef68060b, - 0xd727bbb6, 0xd3e6a601, 0xdea580d8, 0xda649d6f, 0xc423cd6a, 0xc0e2d0dd, - 0xcda1f604, 0xc960ebb3, 0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7, - 0xae3afba2, 0xaafbe615, 0xa7b8c0cc, 0xa379dd7b, 0x9b3660c6, 0x9ff77d71, - 0x92b45ba8, 0x9675461f, 0x8832161a, 0x8cf30bad, 0x81b02d74, 0x857130c3, - 0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640, 0x4e8ee645, 0x4a4ffbf2, - 0x470cdd2b, 0x43cdc09c, 0x7b827d21, 0x7f436096, 0x7200464f, 0x76c15bf8, - 0x68860bfd, 0x6c47164a, 0x61043093, 0x65c52d24, 0x119b4be9, 0x155a565e, - 0x18197087, 0x1cd86d30, 0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec, - 0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088, 0x2497d08d, 0x2056cd3a, - 0x2d15ebe3, 0x29d4f654, 0xc5a92679, 0xc1683bce, 0xcc2b1d17, 0xc8ea00a0, - 0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb, 0xdbee767c, 0xe3a1cbc1, 0xe760d676, - 0xea23f0af, 0xeee2ed18, 0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4, - 0x89b8fd09, 0x8d79e0be, 0x803ac667, 0x84fbdbd0, 0x9abc8bd5, 0x9e7d9662, - 0x933eb0bb, 0x97ffad0c, 0xafb010b1, 0xab710d06, 0xa6322bdf, 0xa2f33668, - 0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4 -}; - -// Nallocfuzz data to take a decision -uint32_t nalloc_random_state = 0; -__thread unsigned int nalloc_running = 0; -bool nalloc_initialized = false; -uint32_t nalloc_runs = 0; - -// Nalloc fuzz parameters -uint32_t nalloc_bitmask = 0xFF; -bool nalloc_random_bitmask = true; -uint32_t nalloc_magic = 0x294cee63; -bool nalloc_verbose = false; - -#ifdef NALLOC_ASAN -extern void __sanitizer_print_stack_trace(void); -#endif - -// Generic init, using env variables to get parameters -void nalloc_init(const char *prog) { - if (nalloc_initialized) { - return; - } - nalloc_initialized = true; - char *bitmask = getenv("NALLOC_FREQ"); - if (bitmask) { - int shift = atoi(bitmask); - if (shift > 0 && shift < 31) { - nalloc_bitmask = 1 << shift; - nalloc_random_bitmask = false; - } else if (shift == 0) { - nalloc_random_bitmask = false; - nalloc_bitmask = 0; - } - } else if (prog == NULL || strstr(prog, "nalloc") == NULL) { - nalloc_random_bitmask = false; - nalloc_bitmask = 0; - return; - } - - char *magic = getenv("NALLOC_MAGIC"); - if (magic) { - nalloc_magic = (uint32_t)strtol(magic, NULL, 0); - } - - char *verbose = getenv("NALLOC_VERBOSE"); - if (verbose) { - nalloc_verbose = true; - } -} - -// add one byte to the CRC -static inline void nalloc_random_update(uint8_t b) { - nalloc_random_state = - ((uint32_t)((uint32_t)nalloc_random_state << 8)) ^ - nalloc_crc32_table[((nalloc_random_state >> 24) ^ b) & 0xFF]; -} - -// Start the failure injections, using a buffer as seed -static int nalloc_start(const uint8_t *data, size_t size) { - if (nalloc_random_bitmask) { - if (nalloc_random_state & 0x10) { - nalloc_bitmask = 0xFFFFFFFF; - } else { - nalloc_bitmask = 1 << (5 + (nalloc_random_state & 0xF)); - } - } else if (nalloc_bitmask == 0) { - // nalloc disabled - return 0; - } - nalloc_random_state = 0; - for (size_t i = 0; i < size; i++) { - nalloc_random_update(data[i]); - } - if (__sync_fetch_and_add(&nalloc_running, 1)) { - __sync_fetch_and_sub(&nalloc_running, 1); - return 0; - } - nalloc_runs++; - return 1; -} - -// Stop the failure injections -static void nalloc_end() { __sync_fetch_and_sub(&nalloc_running, 1); } - -static bool nalloc_backtrace_exclude(size_t size, const char *op) { - if (nalloc_verbose) { - fprintf(stderr, "failed %s(%zu) \n", op, size); -#ifdef NALLOC_ASAN - __sanitizer_print_stack_trace(); -#endif - } - - return false; -} - -// -static bool nalloc_fail(size_t size, const char *op) { - // do not fail before thread init - if (nalloc_runs == 0) { - return false; - } - if (__sync_fetch_and_add(&nalloc_running, 1) != 1) { - // do not fail allocations outside of fuzzer input - // and do not fail inside of this function - __sync_fetch_and_sub(&nalloc_running, 1); - return false; - } - nalloc_random_update((uint8_t)size); - if (size >= 0x100) { - nalloc_random_update((uint8_t)(size >> 8)); - if (size >= 0x10000) { - nalloc_random_update((uint8_t)(size >> 16)); - // bigger may already fail or oom - } - } - if (((nalloc_random_state ^ nalloc_magic) & nalloc_bitmask) == 0) { - if (nalloc_backtrace_exclude(size, op)) { - __sync_fetch_and_sub(&nalloc_running, 1); - return false; - } - __sync_fetch_and_sub(&nalloc_running, 1); - return true; - } - __sync_fetch_and_sub(&nalloc_running, 1); - return false; -} - -// ASAN interceptor for libc routines -#ifdef NALLOC_ASAN -extern void *__interceptor_malloc(size_t); -extern void *__interceptor_calloc(size_t, size_t); -extern void *__interceptor_realloc(void *, size_t); -extern void *__interceptor_reallocarray(void *, size_t, size_t); - -extern ssize_t __interceptor_read(int, void *, size_t); -extern ssize_t __interceptor_write(int, const void *, size_t); -extern ssize_t __interceptor_recv(int, void *, size_t, int); -extern ssize_t __interceptor_send(int, const void *, size_t, int); - -#define nalloc_malloc(s) __interceptor_malloc(s) -#define nalloc_calloc(s, n) __interceptor_calloc(s, n) -#define nalloc_realloc(p, s) __interceptor_realloc(p, s) -#define nalloc_reallocarray(p, s, n) __interceptor_reallocarray(p, s, n) - -#define nalloc_read(f, b, s) __interceptor_read(f, b, s) -#define nalloc_write(f, b, s) __interceptor_write(f, b, s) -#define nalloc_recv(f, b, s, x) __interceptor_recv(f, b, s, x) -#define nalloc_send(f, b, s, x) __interceptor_send(f, b, s, x) - -#else -extern void *__libc_malloc(size_t); -extern void *__libc_calloc(size_t, size_t); -extern void *__libc_realloc(void *, size_t); -extern void *__libc_reallocarray(void *, size_t, size_t); - -extern ssize_t __read(int, void *, size_t); -extern ssize_t __write(int, const void *, size_t); -extern ssize_t __recv(int, void *, size_t, int); -extern ssize_t __send(int, const void *, size_t, int); - -#define nalloc_malloc(s) __libc_malloc(s) -#define nalloc_calloc(s, n) __libc_calloc(s, n) -#define nalloc_realloc(p, s) __libc_realloc(p, s) -#define nalloc_reallocarray(p, s, n) __libc_reallocarray(p, s, n) - -#define nalloc_read(f, b, s) __read(f, b, s) -#define nalloc_write(f, b, s) __write(f, b, s) -#define nalloc_recv(f, b, s, x) __recv(f, b, s, x) -#define nalloc_send(f, b, s, x) __send(f, b, s, x) -#endif - -// nalloc standard function overwrites with pseudo-random failures -ssize_t read(int fd, void *buf, size_t count) { - if (nalloc_fail(count, "read")) { - errno = EIO; - return -1; - } - return nalloc_read(fd, buf, count); -} - -ssize_t write(int fd, const void *buf, size_t count) { - if (nalloc_fail(count, "write")) { - errno = EIO; - return -1; - } - return nalloc_write(fd, buf, count); -} - -ssize_t recv(int fd, void *buf, size_t count, int flags) { - if (nalloc_fail(count, "recv")) { - errno = EIO; - return -1; - } - return nalloc_recv(fd, buf, count, flags); -} - -ssize_t send(int fd, const void *buf, size_t count, int flags) { - if (nalloc_fail(count, "send")) { - errno = EIO; - return -1; - } - return nalloc_send(fd, buf, count, flags); -} - -void *calloc(size_t nmemb, size_t size) { - if (nalloc_fail(size, "calloc")) { - errno = ENOMEM; - return NULL; - } - return nalloc_calloc(nmemb, size); -} - -void *malloc(size_t size) { - if (nalloc_fail(size, "malloc")) { - errno = ENOMEM; - return NULL; - } - return nalloc_malloc(size); -} - -void *realloc(void *ptr, size_t size) { - if (nalloc_fail(size, "realloc")) { - errno = ENOMEM; - return NULL; - } - return nalloc_realloc(ptr, size); -} - -void *reallocarray(void *ptr, size_t nmemb, size_t size) { - if (nalloc_fail(size, "reallocarray")) { - errno = ENOMEM; - return NULL; - } - return nalloc_reallocarray(ptr, nmemb, size); -} - -#ifdef __cplusplus -} // extern "C" { -#endif - -#endif // NALLOC_H_ diff --git a/Engine/lib/lpng/contrib/pngexif/.editorconfig b/Engine/lib/lpng/contrib/pngexif/.editorconfig deleted file mode 100644 index e00082696..000000000 --- a/Engine/lib/lpng/contrib/pngexif/.editorconfig +++ /dev/null @@ -1,12 +0,0 @@ -# https://editorconfig.org - -root = true - -[*] -charset = utf-8 -indent_size = 4 -indent_style = space -insert_final_newline = true -max_doc_length = 79 -max_line_length = 79 -trim_trailing_whitespace = true diff --git a/Engine/lib/lpng/contrib/pngexif/.gitignore b/Engine/lib/lpng/contrib/pngexif/.gitignore deleted file mode 100644 index 016f70a80..000000000 --- a/Engine/lib/lpng/contrib/pngexif/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -__pycache__ -*.py[co] -*$py.class diff --git a/Engine/lib/lpng/contrib/pngexif/.pylintrc b/Engine/lib/lpng/contrib/pngexif/.pylintrc deleted file mode 100644 index 50cf1152d..000000000 --- a/Engine/lib/lpng/contrib/pngexif/.pylintrc +++ /dev/null @@ -1,8 +0,0 @@ -[COMPATIBILITY] -disable=consider-using-f-string - -[COMPLEXITY] -disable=too-many-branches,too-many-instance-attributes - -[STYLE] -disable=consider-using-in diff --git a/Engine/lib/lpng/contrib/pngexif/LICENSE_MIT.txt b/Engine/lib/lpng/contrib/pngexif/LICENSE_MIT.txt deleted file mode 100644 index 9cf106272..000000000 --- a/Engine/lib/lpng/contrib/pngexif/LICENSE_MIT.txt +++ /dev/null @@ -1,19 +0,0 @@ -MIT License - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Engine/lib/lpng/contrib/pngexif/README.md b/Engine/lib/lpng/contrib/pngexif/README.md deleted file mode 100644 index c9ff88b64..000000000 --- a/Engine/lib/lpng/contrib/pngexif/README.md +++ /dev/null @@ -1,20 +0,0 @@ -pngexifinfo -=========== - -Show the EXIF information embedded in a PNG file. - - -Sample usage ------------- - -Show the EXIF info inside a PNG file: - - pngexifinfo /path/to/file.png - -Show the EXIF info inside a raw `.exif` file, using base 16 for the EXIF tags: - - pngexifinfo --hex /path/to/file.exif - -Show the help text: - - pngexifinfo --help diff --git a/Engine/lib/lpng/contrib/pngexif/bytepack.py b/Engine/lib/lpng/contrib/pngexif/bytepack.py deleted file mode 100644 index 93af21994..000000000 --- a/Engine/lib/lpng/contrib/pngexif/bytepack.py +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env python - -""" -Byte packing and unpacking utilities. - -Copyright (C) 2017-2020 Cosmin Truta. - -Use, modification and distribution are subject to the MIT License. -Please see the accompanying file LICENSE_MIT.txt -""" - -from __future__ import absolute_import, division, print_function - -import struct - - -def unpack_uint32be(buffer, offset=0): - """Unpack an unsigned int from its 32-bit big-endian representation.""" - return struct.unpack(">I", buffer[offset:offset + 4])[0] - - -def unpack_uint32le(buffer, offset=0): - """Unpack an unsigned int from its 32-bit little-endian representation.""" - return struct.unpack("H", buffer[offset:offset + 2])[0] - - -def unpack_uint16le(buffer, offset=0): - """Unpack an unsigned int from its 16-bit little-endian representation.""" - return struct.unpack(" "ascii" - value_or_offset >>= 24 - elif tag_type == 3: - # 3 --> "short" - value_or_offset >>= 16 - else: - # ... FIXME - pass - if count == 0: - raise RuntimeError("unsupported count=0 in tag 0x%x" % tag_id) - if tag_id == _TIFF_EXIF_IFD: - if tag_type != 4: - raise RuntimeError("incorrect tag type for EXIF IFD") - self._exif_ifd_offset = value_or_offset - elif tag_id == _GPS_IFD: - if tag_type != 4: - raise RuntimeError("incorrect tag type for GPS IFD") - self._gps_ifd_offset = value_or_offset - elif tag_id == _INTEROPERABILITY_IFD: - if tag_type != 4: - raise RuntimeError("incorrect tag type for Interop IFD") - self._interoperability_ifd_offset = value_or_offset - yield (tag_id, tag_type, count, value_or_offset) - - def tags(self): - """Yield all TIFF/EXIF tags.""" - if self._verbose: - print("TIFF IFD : 0x%08x" % self._global_ifd_offset) - for tag in self._tags_for_ifd(self._global_ifd_offset): - yield tag - if self._exif_ifd_offset > 0: - if self._verbose: - print("EXIF IFD : 0x%08x" % self._exif_ifd_offset) - for tag in self._tags_for_ifd(self._exif_ifd_offset): - yield tag - if self._gps_ifd_offset > 0: - if self._verbose: - print("GPS IFD : 0x%08x" % self._gps_ifd_offset) - for tag in self._tags_for_ifd(self._gps_ifd_offset): - yield tag - if self._interoperability_ifd_offset > 0: - if self._verbose: - print("Interoperability IFD : 0x%08x" % - self._interoperability_ifd_offset) - for tag in self._tags_for_ifd(self._interoperability_ifd_offset): - yield tag - - def tagid2str(self, tag_id): - """Return an informative string representation of a TIFF tag id.""" - idstr = _TIFF_TAGS.get(tag_id, "[Unknown]") - if self._hex: - idnum = "0x%04x" % tag_id - else: - idnum = "%d" % tag_id - return "%s (%s)" % (idstr, idnum) - - @staticmethod - def tagtype2str(tag_type): - """Return an informative string representation of a TIFF tag type.""" - typestr = _TIFF_TAG_TYPES.get(tag_type, "[unknown]") - return "%d:%s" % (tag_type, typestr) - - def tag2str(self, tag_id, tag_type, count, value_or_offset): - """Return an informative string representation of a TIFF tag tuple.""" - return "%s (type=%s) (count=%d) : 0x%08x" \ - % (self.tagid2str(tag_id), self.tagtype2str(tag_type), count, - value_or_offset) - - def _ui32(self): - """Decode a 32-bit unsigned int found at the current offset; - advance the offset by 4. - """ - if self._offset + 4 > len(self._buffer): - raise RuntimeError("out-of-bounds uint32 access in EXIF") - if self._endian == "MM": - result = unpack_uint32be(self._buffer, self._offset) - else: - result = unpack_uint32le(self._buffer, self._offset) - self._offset += 4 - return result - - def _ui16(self): - """Decode a 16-bit unsigned int found at the current offset; - advance the offset by 2. - """ - if self._offset + 2 > len(self._buffer): - raise RuntimeError("out-of-bounds uint16 access in EXIF") - if self._endian == "MM": - result = unpack_uint16be(self._buffer, self._offset) - else: - result = unpack_uint16le(self._buffer, self._offset) - self._offset += 2 - return result - - def _ui8(self): - """Decode an 8-bit unsigned int found at the current offset; - advance the offset by 1. - """ - if self._offset + 1 > len(self._buffer): - raise RuntimeError("out-of-bounds uint8 access in EXIF") - result = unpack_uint8(self._buffer, self._offset) - self._offset += 1 - return result - - -def print_raw_exif_info(buffer, **kwargs): - """Print the EXIF information found in a raw byte stream.""" - lister = ExifInfo(buffer, **kwargs) - print("EXIF (endian=%s)" % lister.endian()) - for (tag_id, tag_type, count, value_or_offset) in lister.tags(): - print(lister.tag2str(tag_id=tag_id, - tag_type=tag_type, - count=count, - value_or_offset=value_or_offset)) - - -if __name__ == "__main__": - # For testing only. - for arg in sys.argv[1:]: - with open(arg, "rb") as test_stream: - test_buffer = test_stream.read(_READ_DATA_SIZE_MAX) - print_raw_exif_info(test_buffer, hex=True, verbose=True) diff --git a/Engine/lib/lpng/contrib/pngexif/pngexifinfo b/Engine/lib/lpng/contrib/pngexif/pngexifinfo deleted file mode 100644 index 16f8eaab1..000000000 --- a/Engine/lib/lpng/contrib/pngexif/pngexifinfo +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -set -eu - -my_python="$(command -v python3 || command -v python)" || { - echo >&2 "error: program not found: Python interpreter" - exit 127 -} -my_python_flags="-BES" - -exec "$my_python" "$my_python_flags" "$(dirname "$0")/pngexifinfo.py" "$@" diff --git a/Engine/lib/lpng/contrib/pngexif/pngexifinfo.bat b/Engine/lib/lpng/contrib/pngexif/pngexifinfo.bat deleted file mode 100644 index ab8bd358c..000000000 --- a/Engine/lib/lpng/contrib/pngexif/pngexifinfo.bat +++ /dev/null @@ -1,4 +0,0 @@ -@echo off -@setlocal enableextensions - -python.exe -BES %~dp0.\pngexifinfo.py %* diff --git a/Engine/lib/lpng/contrib/pngexif/pngexifinfo.py b/Engine/lib/lpng/contrib/pngexif/pngexifinfo.py deleted file mode 100644 index 37d4c4bcd..000000000 --- a/Engine/lib/lpng/contrib/pngexif/pngexifinfo.py +++ /dev/null @@ -1,178 +0,0 @@ -#!/usr/bin/env python - -""" -Show the PNG EXIF information. - -Copyright (C) 2017-2020 Cosmin Truta. - -Use, modification and distribution are subject to the MIT License. -Please see the accompanying file LICENSE_MIT.txt -""" - -from __future__ import absolute_import, division, print_function - -import argparse -import io -import re -import sys -import zlib - -from bytepack import unpack_uint32be, unpack_uint8 -from exifinfo import print_raw_exif_info - -_PNG_SIGNATURE = b"\x89PNG\x0d\x0a\x1a\x0a" -_PNG_CHUNK_SIZE_MAX = 0x7fffffff -_READ_DATA_SIZE_MAX = 0x3ffff - - -def print_error(msg): - """Print an error message to stderr.""" - sys.stderr.write("%s: error: %s\n" % (sys.argv[0], msg)) - - -def print_debug(msg): - """Print a debug message to stderr.""" - sys.stderr.write("%s: debug: %s\n" % (sys.argv[0], msg)) - - -def _check_png(condition, chunk_sig=None): - """Check a PNG-specific assertion.""" - if condition: - return - if chunk_sig is None: - raise RuntimeError("bad PNG data") - raise RuntimeError("bad PNG data in '%s'" % chunk_sig) - - -def _check_png_crc(data, checksum, chunk_sig): - """Check a CRC32 value inside a PNG stream.""" - if unpack_uint32be(data) == (checksum & 0xffffffff): - return - raise RuntimeError("bad PNG checksum in '%s'" % chunk_sig) - - -def _extract_png_exif(data, **kwargs): - """Extract the EXIF header and data from a PNG chunk.""" - debug = kwargs.get("debug", False) - if unpack_uint8(data, 0) == 0: - if debug: - print_debug("found compressed EXIF, compression method 0") - if (unpack_uint8(data, 1) & 0x0f) == 0x08: - data = zlib.decompress(data[1:]) - elif unpack_uint8(data, 1) == 0 \ - and (unpack_uint8(data, 5) & 0x0f) == 0x08: - if debug: - print_debug("found uncompressed-length EXIF field") - data_len = unpack_uint32be(data, 1) - data = zlib.decompress(data[5:]) - if data_len != len(data): - raise RuntimeError( - "incorrect uncompressed-length field in PNG EXIF") - else: - raise RuntimeError("invalid compression method in PNG EXIF") - if data.startswith(b"MM\x00\x2a") or data.startswith(b"II\x2a\x00"): - return data - raise RuntimeError("invalid TIFF/EXIF header in PNG EXIF") - - -def print_png_exif_info(instream, **kwargs): - """Print the EXIF information found in the given PNG datastream.""" - debug = kwargs.get("debug", False) - has_exif = False - while True: - chunk_hdr = instream.read(8) - _check_png(len(chunk_hdr) == 8) - chunk_len = unpack_uint32be(chunk_hdr, offset=0) - chunk_sig = chunk_hdr[4:8].decode("latin_1", errors="ignore") - _check_png(re.search(r"^[A-Za-z]{4}$", chunk_sig), chunk_sig=chunk_sig) - _check_png(chunk_len < _PNG_CHUNK_SIZE_MAX, chunk_sig=chunk_sig) - if debug: - print_debug("processing chunk: %s" % chunk_sig) - if chunk_len <= _READ_DATA_SIZE_MAX: - # The chunk size does not exceed an arbitrary, reasonable limit. - chunk_data = instream.read(chunk_len) - chunk_crc = instream.read(4) - _check_png(len(chunk_data) == chunk_len and len(chunk_crc) == 4, - chunk_sig=chunk_sig) - checksum = zlib.crc32(chunk_hdr[4:8]) - checksum = zlib.crc32(chunk_data, checksum) - _check_png_crc(chunk_crc, checksum, chunk_sig=chunk_sig) - else: - # The chunk is too big. Skip it. - instream.seek(chunk_len + 4, io.SEEK_CUR) - continue - if chunk_sig == "IEND": - _check_png(chunk_len == 0, chunk_sig=chunk_sig) - break - if chunk_sig.lower() in ["exif", "zxif"] and chunk_len > 8: - has_exif = True - exif_data = _extract_png_exif(chunk_data, **kwargs) - print_raw_exif_info(exif_data, **kwargs) - if not has_exif: - raise RuntimeError("no EXIF data in PNG stream") - - -def print_exif_info(file, **kwargs): - """Print the EXIF information found in the given file.""" - with open(file, "rb") as stream: - header = stream.read(4) - if header == _PNG_SIGNATURE[0:4]: - if stream.read(4) != _PNG_SIGNATURE[4:8]: - raise RuntimeError("corrupted PNG file") - print_png_exif_info(instream=stream, **kwargs) - elif header == b"II\x2a\x00" or header == b"MM\x00\x2a": - data = header + stream.read(_READ_DATA_SIZE_MAX) - print_raw_exif_info(data, **kwargs) - else: - raise RuntimeError("not a PNG file") - - -def main(): - """The main function.""" - parser = argparse.ArgumentParser( - prog="pngexifinfo", - usage="%(prog)s [options] [--] files...", - description="Show the PNG EXIF information.") - parser.add_argument("files", - metavar="file", - nargs="*", - help="a PNG file or a raw EXIF blob") - parser.add_argument("-x", - "--hex", - dest="hex", - action="store_true", - help="show EXIF tags in base 16") - parser.add_argument("-v", - "--verbose", - dest="verbose", - action="store_true", - help="run in verbose mode") - parser.add_argument("--debug", - dest="debug", - action="store_true", - help="run in debug mode") - args = parser.parse_args() - if not args.files: - parser.error("missing file operand") - result = 0 - for file in args.files: - try: - print_exif_info(file, - hex=args.hex, - debug=args.debug, - verbose=args.verbose) - except (IOError, OSError) as err: - print_error(str(err)) - result = 66 # os.EX_NOINPUT - except RuntimeError as err: - print_error("%s: %s" % (file, str(err))) - result = 69 # os.EX_UNAVAILABLE - parser.exit(result) - - -if __name__ == "__main__": - try: - main() - except KeyboardInterrupt: - sys.stderr.write("INTERRUPTED\n") - sys.exit(130) # SIGINT diff --git a/Engine/lib/lpng/contrib/pngminim/README b/Engine/lib/lpng/contrib/pngminim/README index 51d5a3c23..e17fe35b6 100644 --- a/Engine/lib/lpng/contrib/pngminim/README +++ b/Engine/lib/lpng/contrib/pngminim/README @@ -1,3 +1,4 @@ + This demonstrates the use of PNG_USER_CONFIG, pngusr.h and pngusr.dfa to build minimal decoder, encoder, and progressive reader applications. diff --git a/Engine/lib/lpng/contrib/pngminim/decoder/makefile b/Engine/lib/lpng/contrib/pngminim/decoder/makefile index bbacea4bb..4acf3c177 100644 --- a/Engine/lib/lpng/contrib/pngminim/decoder/makefile +++ b/Engine/lib/lpng/contrib/pngminim/decoder/makefile @@ -54,7 +54,7 @@ ZOBJS = adler32$(O) crc32$(O) \ PNGSRCS=png$(C) pngerror$(C) pngget$(C) pngmem$(C) \ pngread$(C) pngrio$(C) pngrtran$(C) pngrutil$(C) \ pngset$(C) pngtrans$(C) - + # Standard headers PNGH =png.h pngconf.h pngdebug.h pnginfo.h pngpriv.h pngstruct.h diff --git a/Engine/lib/lpng/contrib/pngminus/.editorconfig b/Engine/lib/lpng/contrib/pngminus/.editorconfig deleted file mode 100644 index 8504b495e..000000000 --- a/Engine/lib/lpng/contrib/pngminus/.editorconfig +++ /dev/null @@ -1,29 +0,0 @@ -# https://editorconfig.org - -root = true - -[*] -charset = utf-8 -end_of_line = unset -indent_size = unset -indent_style = space -insert_final_newline = true -max_doc_length = 79 -max_line_length = 79 -trim_trailing_whitespace = true - -[*.[ch]] -indent_size = 2 -indent_style = space - -[CMakeLists.txt] -indent_size = 4 -indent_style = space -max_doc_length = 79 -max_line_length = 99 - -[{Makefile,makevms.com}] -indent_size = unset -indent_style = unset -max_doc_length = 79 -max_line_length = 99 diff --git a/Engine/lib/lpng/contrib/pngminus/.gitignore b/Engine/lib/lpng/contrib/pngminus/.gitignore deleted file mode 100644 index 5114c75cd..000000000 --- a/Engine/lib/lpng/contrib/pngminus/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -# Compiled executables -png2pnm -png2pnm.exe -png2pnm-static* -pnm2png -pnm2png.exe -pnm2png-static* - -# Test artifacts -*.png -*.p[abgnp]m diff --git a/Engine/lib/lpng/contrib/pngminus/CHANGES.txt b/Engine/lib/lpng/contrib/pngminus/CHANGES.txt index b4b1a9a8b..4e64e5ee6 100644 --- a/Engine/lib/lpng/contrib/pngminus/CHANGES.txt +++ b/Engine/lib/lpng/contrib/pngminus/CHANGES.txt @@ -1,8 +1,9 @@ + pnm2png / png2pnm --- conversion from PBM/PGM/PPM-file to PNG-file copyright (C) 1999-2019 by Willem van Schaik version 1.0 - 1999.10.15 - First version. - 1.1 - 2015.07.29 - Fix memory leaks (Glenn Randers-Pehrson) + 1.1 - 2015.07.29 - Fixed leaks (Glenn Randers-Pehrson) 1.2 - 2017.04.22 - Add buffer-size check 1.3 - 2017.08.24 - Fix potential overflow in buffer-size check (Glenn Randers-Pehrson) @@ -10,5 +11,3 @@ version 1.0 - 1999.10.15 - First version. 1.5 - 2018.08.05 - Fix buffer overflow in tokenizer (Cosmin Truta) 1.6 - 2018.08.05 - Improve portability and fix style (Cosmin Truta) 1.7 - 2019.01.22 - Change license to MIT (Willem van Schaik) - 1.8 - 2024.01.09 - Fix, improve, modernize (Cosmin Truta) - 1.9 - 2025.01.10 - Delete conditionally-compiled code (Cosmin Truta) diff --git a/Engine/lib/lpng/contrib/pngminus/CMakeLists.txt b/Engine/lib/lpng/contrib/pngminus/CMakeLists.txt index 8d69b5e7a..1f815a582 100644 --- a/Engine/lib/lpng/contrib/pngminus/CMakeLists.txt +++ b/Engine/lib/lpng/contrib/pngminus/CMakeLists.txt @@ -1,41 +1,24 @@ -# Copyright (c) 2018-2025 Cosmin Truta -# -# This software is released under the MIT license. For conditions of -# distribution and use, see the LICENSE file part of this package. - -cmake_minimum_required(VERSION 3.14) +cmake_minimum_required(VERSION 3.1) +cmake_policy(VERSION 3.1) project(PNGMINUS C) -option(PNGMINUS_USE_SYSTEM_PNG - "Use the libpng build found in the system" OFF) +option(PNGMINUS_USE_STATIC_LIBRARIES "Use the static library builds" ON) -add_executable(png2pnm png2pnm.c) -add_executable(pnm2png pnm2png.c) - -if(PNGMINUS_USE_SYSTEM_PNG) - # Use the system libpng. - find_package(PNG REQUIRED) - target_link_libraries(png2pnm PRIVATE PNG::PNG) - target_link_libraries(pnm2png PRIVATE PNG::PNG) +# libpng +add_subdirectory(../.. libpng) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../..) +include_directories(${CMAKE_CURRENT_BINARY_DIR}/libpng) +if(PNGMINUS_USE_STATIC_LIBRARIES) + set(PNGMINUS_PNG_LIBRARY png_static) else() - # Build and use the internal libpng. - # Configure libpng for static linking, to produce single-file executables. - set(PNG_STATIC ON - CACHE STRING "Build the internal libpng as a static library" FORCE) - set(PNG_SHARED OFF - CACHE STRING "Build the internal libpng as a shared library" FORCE) - set(PNG_FRAMEWORK OFF - CACHE STRING "Build the internal libpng as a framework bundle" FORCE) - add_subdirectory(../.. libpng) - target_include_directories(png2pnm PRIVATE - "$" - "$" - ) - target_include_directories(pnm2png PRIVATE - "$" - "$" - ) - target_link_libraries(png2pnm PRIVATE png_static) - target_link_libraries(pnm2png PRIVATE png_static) + set(PNGMINUS_PNG_LIBRARY png) endif() + +# png2pnm +add_executable(png2pnm png2pnm.c) +target_link_libraries(png2pnm ${PNGMINUS_PNG_LIBRARY}) + +# pnm2png +add_executable(pnm2png pnm2png.c) +target_link_libraries(pnm2png ${PNGMINUS_PNG_LIBRARY}) diff --git a/Engine/lib/lpng/contrib/pngminus/LICENSE.txt b/Engine/lib/lpng/contrib/pngminus/LICENSE.txt index 6bdb4f879..00878a9a6 100644 --- a/Engine/lib/lpng/contrib/pngminus/LICENSE.txt +++ b/Engine/lib/lpng/contrib/pngminus/LICENSE.txt @@ -1,3 +1,4 @@ + pnm2png / png2pnm --- conversion from PBM/PGM/PPM-file to PNG-file copyright (C) 1999-2019 by Willem van Schaik @@ -15,7 +16,7 @@ copies or substantial portions of the Software. The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the -authors or copyright holders be liable for any claim, damages or other +authors or copyight holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software. diff --git a/Engine/lib/lpng/contrib/pngminus/test_png2pnm.bat b/Engine/lib/lpng/contrib/pngminus/png2pnm.bat similarity index 100% rename from Engine/lib/lpng/contrib/pngminus/test_png2pnm.bat rename to Engine/lib/lpng/contrib/pngminus/png2pnm.bat diff --git a/Engine/lib/lpng/contrib/pngminus/png2pnm.c b/Engine/lib/lpng/contrib/pngminus/png2pnm.c index 3c47b91df..5fef7ed14 100644 --- a/Engine/lib/lpng/contrib/pngminus/png2pnm.c +++ b/Engine/lib/lpng/contrib/pngminus/png2pnm.c @@ -14,10 +14,15 @@ #define BOOL unsigned char #endif #ifndef TRUE -#define TRUE ((BOOL) 1) +#define TRUE (BOOL) 1 #endif #ifndef FALSE -#define FALSE ((BOOL) 0) +#define FALSE (BOOL) 0 +#endif + +/* make png2pnm verbose so we can find problems (needs to be before png.h) */ +#ifndef PNG_DEBUG +#define PNG_DEBUG 0 #endif #include "png.h" @@ -28,9 +33,6 @@ int main (int argc, char *argv[]); void usage (); BOOL png2pnm (FILE *png_file, FILE *pnm_file, FILE *alpha_file, BOOL raw, BOOL alpha); -BOOL do_png2pnm (png_struct *png_ptr, png_info *info_ptr, - FILE *pnm_file, FILE *alpha_file, - BOOL raw, BOOL alpha); /* * main @@ -41,12 +43,9 @@ int main (int argc, char *argv[]) FILE *fp_rd = stdin; FILE *fp_wr = stdout; FILE *fp_al = NULL; - const char *fname_wr = NULL; - const char *fname_al = NULL; BOOL raw = TRUE; BOOL alpha = FALSE; int argi; - int ret; for (argi = 1; argi < argc; argi++) { @@ -65,8 +64,7 @@ int main (int argc, char *argv[]) argi++; if ((fp_al = fopen (argv[argi], "wb")) == NULL) { - fname_al = argv[argi]; - fprintf (stderr, "PNG2PNM\n"); + fprintf (stderr, "PNM2PNG\n"); fprintf (stderr, "Error: cannot create alpha-channel file %s\n", argv[argi]); exit (1); @@ -96,7 +94,6 @@ int main (int argc, char *argv[]) } else if (fp_wr == stdout) { - fname_wr = argv[argi]; if ((fp_wr = fopen (argv[argi], "wb")) == NULL) { fprintf (stderr, "PNG2PNM\n"); @@ -122,7 +119,12 @@ int main (int argc, char *argv[]) #endif /* call the conversion program itself */ - ret = png2pnm (fp_rd, fp_wr, fp_al, raw, alpha); + if (png2pnm (fp_rd, fp_wr, fp_al, raw, alpha) == FALSE) + { + fprintf (stderr, "PNG2PNM\n"); + fprintf (stderr, "Error: unsuccessful conversion of PNG-image\n"); + exit (1); + } /* close input file */ fclose (fp_rd); @@ -132,17 +134,6 @@ int main (int argc, char *argv[]) if (alpha) fclose (fp_al); - if (!ret) - { - fprintf (stderr, "PNG2PNM\n"); - fprintf (stderr, "Error: unsuccessful conversion of PNG-image\n"); - if (fname_wr) - remove (fname_wr); /* no broken output file shall remain behind */ - if (fname_al) - remove (fname_al); /* ditto */ - exit (1); - } - return 0; } @@ -172,11 +163,35 @@ void usage () BOOL png2pnm (FILE *png_file, FILE *pnm_file, FILE *alpha_file, BOOL raw, BOOL alpha) { - png_struct *png_ptr; - png_info *info_ptr; - BOOL ret; + png_struct *png_ptr = NULL; + png_info *info_ptr = NULL; + png_byte buf[8]; + png_byte *png_pixels = NULL; + png_byte **row_pointers = NULL; + png_byte *pix_ptr = NULL; + png_uint_32 row_bytes; - /* initialize the libpng context for reading from png_file */ + png_uint_32 width; + png_uint_32 height; + int bit_depth; + int channels; + int color_type; + int alpha_present; + int row, col; + int ret; + int i; + long dep_16; + + /* read and check signature in PNG file */ + ret = fread (buf, 1, 8, png_file); + if (ret != 8) + return FALSE; + + ret = png_sig_cmp (buf, 0, 8); + if (ret != 0) + return FALSE; + + /* create png and info structures */ png_ptr = png_create_read_struct (png_get_libpng_ver(NULL), NULL, NULL, NULL); @@ -193,56 +208,64 @@ BOOL png2pnm (FILE *png_file, FILE *pnm_file, FILE *alpha_file, if (setjmp (png_jmpbuf (png_ptr))) { png_destroy_read_struct (&png_ptr, &info_ptr, NULL); - return FALSE; /* generic libpng error */ + return FALSE; } + /* set up the input control for C streams */ png_init_io (png_ptr, png_file); + png_set_sig_bytes (png_ptr, 8); /* we already read the 8 signature bytes */ - /* do the actual conversion */ - ret = do_png2pnm (png_ptr, info_ptr, pnm_file, alpha_file, raw, alpha); + /* read the file information */ + png_read_info (png_ptr, info_ptr); - /* clean up the libpng structures and their internally-managed data */ - png_destroy_read_struct (&png_ptr, &info_ptr, NULL); - - return ret; -} - -/* - * do_png2pnm - does the conversion in a fully-initialized libpng context - */ - -BOOL do_png2pnm (png_struct *png_ptr, png_info *info_ptr, - FILE *pnm_file, FILE *alpha_file, - BOOL raw, BOOL alpha) -{ - png_byte **row_pointers; - png_byte *pix_ptr; - png_uint_32 width; - png_uint_32 height; - int bit_depth; - int channels; - int color_type; - int alpha_present; - png_uint_32 row, col, i; - long dep_16; - - /* set up the image transformations that are necessary for the PNM format */ - - /* set up (if applicable) the expansion of paletted images to full-color rgb, - * and the expansion of transparency maps to full alpha-channel */ - png_set_expand (png_ptr); - - /* set up (if applicable) the expansion of grayscale images to bit-depth 8 */ - png_set_expand_gray_1_2_4_to_8 (png_ptr); - - /* read the image file, with all of the above image transforms applied */ - png_read_png (png_ptr, info_ptr, 0, NULL); - - /* get the image size, bit-depth and color-type */ + /* get size and bit-depth of the PNG-image */ png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, NULL, NULL, NULL); - /* calculate the number of channels and store alpha-presence */ + /* set-up the transformations */ + + /* transform paletted images into full-color rgb */ + if (color_type == PNG_COLOR_TYPE_PALETTE) + png_set_expand (png_ptr); + /* expand images to bit-depth 8 (only applicable for grayscale images) */ + if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) + png_set_expand (png_ptr); + /* transform transparency maps into full alpha-channel */ + if (png_get_valid (png_ptr, info_ptr, PNG_INFO_tRNS)) + png_set_expand (png_ptr); + +#ifdef NJET + /* downgrade 16-bit images to 8-bit */ + if (bit_depth == 16) + png_set_strip_16 (png_ptr); + /* transform grayscale images into full-color */ + if (color_type == PNG_COLOR_TYPE_GRAY || + color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + png_set_gray_to_rgb (png_ptr); + /* only if file has a file gamma, we do a correction */ + if (png_get_gAMA (png_ptr, info_ptr, &file_gamma)) + png_set_gamma (png_ptr, (double) 2.2, file_gamma); +#endif + + /* all transformations have been registered; now update info_ptr data, + * get rowbytes and channels, and allocate image memory */ + + png_read_update_info (png_ptr, info_ptr); + + /* get the new color-type and bit-depth (after expansion/stripping) */ + png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, + NULL, NULL, NULL); + + /* check for 16-bit files */ + if (bit_depth == 16) + { + raw = FALSE; +#if defined(O_BINARY) && (O_BINARY != 0) + setmode (fileno (pnm_file), O_BINARY); +#endif + } + + /* calculate new number of channels and store alpha-presence */ if (color_type == PNG_COLOR_TYPE_GRAY) channels = 1; else if (color_type == PNG_COLOR_TYPE_GRAY_ALPHA) @@ -259,12 +282,47 @@ BOOL do_png2pnm (png_struct *png_ptr, png_info *info_ptr, if (alpha && !alpha_present) { fprintf (stderr, "PNG2PNM\n"); - fprintf (stderr, "Warning: no alpha channel in PNG file\n"); + fprintf (stderr, "Error: PNG-file doesn't contain alpha channel\n"); + exit (1); + } + + /* row_bytes is the width x number of channels x (bit-depth / 8) */ + row_bytes = png_get_rowbytes (png_ptr, info_ptr); + + if ((row_bytes == 0) || + ((size_t) height > (size_t) (-1) / (size_t) row_bytes)) + { + /* too big */ + png_destroy_read_struct (&png_ptr, &info_ptr, NULL); + return FALSE; + } + if ((png_pixels = (png_byte *) + malloc ((size_t) row_bytes * (size_t) height)) == NULL) + { + png_destroy_read_struct (&png_ptr, &info_ptr, NULL); return FALSE; } - /* get address of internally-allocated image data */ - row_pointers = png_get_rows (png_ptr, info_ptr); + if ((row_pointers = (png_byte **) + malloc ((size_t) height * sizeof (png_byte *))) == NULL) + { + png_destroy_read_struct (&png_ptr, &info_ptr, NULL); + free (png_pixels); + return FALSE; + } + + /* set the individual row_pointers to point at the correct offsets */ + for (i = 0; i < ((int) height); i++) + row_pointers[i] = png_pixels + i * row_bytes; + + /* now we can go ahead and just read the whole image */ + png_read_image (png_ptr, row_pointers); + + /* read rest of file, and get additional chunks in info_ptr - REQUIRED */ + png_read_end (png_ptr, info_ptr); + + /* clean up after the read, and free any memory allocated - REQUIRED */ + png_destroy_read_struct (&png_ptr, &info_ptr, NULL); /* write header of PNM file */ @@ -295,27 +353,24 @@ BOOL do_png2pnm (png_struct *png_ptr, png_info *info_ptr, } /* write data to PNM file */ + pix_ptr = png_pixels; - for (row = 0; row < height; row++) + for (row = 0; row < (int) height; row++) { - pix_ptr = row_pointers[row]; - for (col = 0; col < width; col++) + for (col = 0; col < (int) width; col++) { - for (i = 0; i < (png_uint_32) (channels - alpha_present); i++) + for (i = 0; i < (channels - alpha_present); i++) { if (raw) { fputc ((int) *pix_ptr++, pnm_file); - if (bit_depth == 16) - fputc ((int) *pix_ptr++, pnm_file); } else { if (bit_depth == 16) { - dep_16 = ((long) *pix_ptr++) << 8; - dep_16 += ((long) *pix_ptr++); - fprintf (pnm_file, "%ld ", dep_16); + dep_16 = (long) *pix_ptr++; + fprintf (pnm_file, "%ld ", (dep_16 << 8) + ((long) *pix_ptr++)); } else { @@ -327,27 +382,22 @@ BOOL do_png2pnm (png_struct *png_ptr, png_info *info_ptr, { if (!alpha) { - /* skip the alpha-channel */ - pix_ptr++; + pix_ptr++; /* alpha */ if (bit_depth == 16) pix_ptr++; } - else + else /* output alpha-channel as pgm file */ { - /* output the alpha-channel as pgm file */ if (raw) { fputc ((int) *pix_ptr++, alpha_file); - if (bit_depth == 16) - fputc ((int) *pix_ptr++, alpha_file); } else { if (bit_depth == 16) { - dep_16 = ((long) *pix_ptr++) << 8; - dep_16 += ((long) *pix_ptr++); - fprintf (alpha_file, "%ld ", dep_16); + dep_16 = (long) *pix_ptr++; + fprintf (alpha_file, "%ld ", (dep_16 << 8) + (long) *pix_ptr++); } else { @@ -367,5 +417,11 @@ BOOL do_png2pnm (png_struct *png_ptr, png_info *info_ptr, fprintf (pnm_file, "\n"); } /* end for row */ + if (row_pointers != NULL) + free (row_pointers); + if (png_pixels != NULL) + free (png_pixels); + return TRUE; + } /* end of source */ diff --git a/Engine/lib/lpng/contrib/pngminus/test_png2pnm.sh b/Engine/lib/lpng/contrib/pngminus/png2pnm.sh similarity index 100% rename from Engine/lib/lpng/contrib/pngminus/test_png2pnm.sh rename to Engine/lib/lpng/contrib/pngminus/png2pnm.sh diff --git a/Engine/lib/lpng/contrib/pngminus/test_pngminus.bat b/Engine/lib/lpng/contrib/pngminus/pngminus.bat similarity index 100% rename from Engine/lib/lpng/contrib/pngminus/test_pngminus.bat rename to Engine/lib/lpng/contrib/pngminus/pngminus.bat diff --git a/Engine/lib/lpng/contrib/pngminus/test_pngminus.sh b/Engine/lib/lpng/contrib/pngminus/pngminus.sh similarity index 100% rename from Engine/lib/lpng/contrib/pngminus/test_pngminus.sh rename to Engine/lib/lpng/contrib/pngminus/pngminus.sh diff --git a/Engine/lib/lpng/contrib/pngminus/test_pnm2png.bat b/Engine/lib/lpng/contrib/pngminus/pnm2png.bat similarity index 100% rename from Engine/lib/lpng/contrib/pngminus/test_pnm2png.bat rename to Engine/lib/lpng/contrib/pngminus/pnm2png.bat diff --git a/Engine/lib/lpng/contrib/pngminus/pnm2png.c b/Engine/lib/lpng/contrib/pngminus/pnm2png.c index 052fd3272..a2c2551da 100644 --- a/Engine/lib/lpng/contrib/pngminus/pnm2png.c +++ b/Engine/lib/lpng/contrib/pngminus/pnm2png.c @@ -6,7 +6,6 @@ * distribution and use, see the LICENSE file part of this package. */ -#include #include #include #include @@ -15,10 +14,15 @@ #define BOOL unsigned char #endif #ifndef TRUE -#define TRUE ((BOOL) 1) +#define TRUE (BOOL) 1 #endif #ifndef FALSE -#define FALSE ((BOOL) 0) +#define FALSE (BOOL) 0 +#endif + +/* make pnm2png verbose so we can find problems (needs to be before png.h) */ +#ifndef PNG_DEBUG +#define PNG_DEBUG 0 #endif #include "png.h" @@ -29,14 +33,9 @@ int main (int argc, char *argv[]); void usage (); BOOL pnm2png (FILE *pnm_file, FILE *png_file, FILE *alpha_file, BOOL interlace, BOOL alpha); -BOOL do_pnm2png (png_struct *png_ptr, png_info *info_ptr, - FILE *pnm_file, FILE *alpha_file, - BOOL interlace, BOOL alpha); -int fscan_pnm_magic (FILE *pnm_file, char *magic_buf, size_t magic_buf_size); -int fscan_pnm_token (FILE *pnm_file, char *token_buf, size_t token_buf_size); -int fscan_pnm_uint_32 (FILE *pnm_file, png_uint_32 *num_ptr); -png_uint_32 get_pnm_data (FILE *pnm_file, int depth); -png_uint_32 get_pnm_value (FILE *pnm_file, int depth); +void get_token (FILE *pnm_file, char *token_buf, size_t token_buf_size); +png_uint_32 get_data (FILE *pnm_file, int depth); +png_uint_32 get_value (FILE *pnm_file, int depth); /* * main @@ -47,11 +46,9 @@ int main (int argc, char *argv[]) FILE *fp_rd = stdin; FILE *fp_al = NULL; FILE *fp_wr = stdout; - const char *fname_wr = NULL; BOOL interlace = FALSE; BOOL alpha = FALSE; int argi; - int ret; for (argi = 1; argi < argc; argi++) { @@ -97,7 +94,6 @@ int main (int argc, char *argv[]) } else if (fp_wr == stdout) { - fname_wr = argv[argi]; if ((fp_wr = fopen (argv[argi], "wb")) == NULL) { fprintf (stderr, "PNM2PNG\n"); @@ -125,7 +121,12 @@ int main (int argc, char *argv[]) #endif /* call the conversion program itself */ - ret = pnm2png (fp_rd, fp_wr, fp_al, interlace, alpha); + if (pnm2png (fp_rd, fp_wr, fp_al, interlace, alpha) == FALSE) + { + fprintf (stderr, "PNM2PNG\n"); + fprintf (stderr, "Error: unsuccessful converting to PNG-image\n"); + exit (1); + } /* close input file */ fclose (fp_rd); @@ -135,15 +136,6 @@ int main (int argc, char *argv[]) if (alpha) fclose (fp_al); - if (!ret) - { - fprintf (stderr, "PNM2PNG\n"); - fprintf (stderr, "Error: unsuccessful converting to PNG-image\n"); - if (fname_wr) - remove (fname_wr); /* no broken output file shall remain behind */ - exit (1); - } - return 0; } @@ -171,134 +163,115 @@ void usage () BOOL pnm2png (FILE *pnm_file, FILE *png_file, FILE *alpha_file, BOOL interlace, BOOL alpha) { - png_struct *png_ptr; - png_info *info_ptr; - BOOL ret; + png_struct *png_ptr = NULL; + png_info *info_ptr = NULL; + png_byte *png_pixels = NULL; + png_byte **row_pointers = NULL; + png_byte *pix_ptr = NULL; + volatile png_uint_32 row_bytes; - /* initialize the libpng context for writing to png_file */ - - png_ptr = png_create_write_struct (png_get_libpng_ver(NULL), - NULL, NULL, NULL); - if (!png_ptr) - return FALSE; /* out of memory */ - - info_ptr = png_create_info_struct (png_ptr); - if (!info_ptr) - { - png_destroy_write_struct (&png_ptr, NULL); - return FALSE; /* out of memory */ - } - - if (setjmp (png_jmpbuf (png_ptr))) - { - png_destroy_write_struct (&png_ptr, &info_ptr); - return FALSE; /* generic libpng error */ - } - - png_init_io (png_ptr, png_file); - - /* do the actual conversion */ - ret = do_pnm2png (png_ptr, info_ptr, pnm_file, alpha_file, interlace, alpha); - - /* clean up the libpng structures and their internally-managed data */ - png_destroy_write_struct (&png_ptr, &info_ptr); - - return ret; -} - -/* - * do_pnm2png - does the conversion in a fully-initialized libpng context - */ - -BOOL do_pnm2png (png_struct *png_ptr, png_info *info_ptr, - FILE *pnm_file, FILE *alpha_file, - BOOL interlace, BOOL alpha) -{ - png_byte **row_pointers; - png_byte *pix_ptr; - int bit_depth; - int color_type; - int channels; - char magic_token[4]; - BOOL raw; - png_uint_32 width, height, maxval; - png_uint_32 row_bytes; - png_uint_32 row, col; - png_uint_32 val16, i; - png_uint_32 alpha_width = 0, alpha_height = 0; - int alpha_depth = 0, alpha_present = 0; - BOOL alpha_raw = FALSE; + char type_token[16]; + char width_token[16]; + char height_token[16]; + char maxval_token[16]; + volatile int color_type = 1; + unsigned long ul_width = 0, ul_alpha_width = 0; + unsigned long ul_height = 0, ul_alpha_height = 0; + unsigned long ul_maxval = 0; + volatile png_uint_32 width = 0, height = 0; + volatile png_uint_32 alpha_width = 0, alpha_height = 0; + png_uint_32 maxval; + volatile int bit_depth = 0; + int channels = 0; + int alpha_depth = 0; + int alpha_present = 0; + int row, col; + BOOL raw, alpha_raw = FALSE; +#if defined(PNG_WRITE_INVERT_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED) BOOL packed_bitmap = FALSE; +#endif + png_uint_32 tmp16; + int i; /* read header of PNM file */ - if (fscan_pnm_magic (pnm_file, magic_token, sizeof (magic_token)) != 1) - return FALSE; /* not a PNM file */ - - if ((magic_token[1] == '1') || (magic_token[1] == '4')) + get_token (pnm_file, type_token, sizeof (type_token)); + if (type_token[0] != 'P') { - if ((fscan_pnm_uint_32 (pnm_file, &width) != 1) || - (fscan_pnm_uint_32 (pnm_file, &height) != 1)) - return FALSE; /* bad PBM file header */ - } else if ((magic_token[1] == '2') || (magic_token[1] == '5') || - (magic_token[1] == '3') || (magic_token[1] == '6')) - { - if ((fscan_pnm_uint_32 (pnm_file, &width) != 1) || - (fscan_pnm_uint_32 (pnm_file, &height) != 1) || - (fscan_pnm_uint_32 (pnm_file, &maxval) != 1)) - return FALSE; /* bad PGM/PPM file header */ - } - - if ((magic_token[1] == '1') || (magic_token[1] == '4')) - { - raw = (magic_token[1] == '4'); - bit_depth = 1; - color_type = PNG_COLOR_TYPE_GRAY; - packed_bitmap = TRUE; - } - else if ((magic_token[1] == '2') || (magic_token[1] == '5')) - { - raw = (magic_token[1] == '5'); - color_type = PNG_COLOR_TYPE_GRAY; - if (maxval == 0) - return FALSE; - else if (maxval == 1) - bit_depth = 1; - else if (maxval <= 3) - bit_depth = 2; - else if (maxval <= 15) - bit_depth = 4; - else if (maxval <= 255) - bit_depth = 8; - else if (maxval <= 65535U) - bit_depth = 16; - else /* maxval > 65535U */ - return FALSE; - } - else if ((magic_token[1] == '3') || (magic_token[1] == '6')) - { - raw = (magic_token[1] == '6'); - color_type = PNG_COLOR_TYPE_RGB; - if (maxval == 0) - return FALSE; - else if (maxval == 1) - bit_depth = 1; - else if (maxval <= 3) - bit_depth = 2; - else if (maxval <= 15) - bit_depth = 4; - else if (maxval <= 255) - bit_depth = 8; - else if (maxval <= 65535U) - bit_depth = 16; - else /* maxval > 65535U */ - return FALSE; - } - else if (magic_token[1] == '7') - { - fprintf (stderr, "PNM2PNG can't read PAM (P7) files\n"); return FALSE; } + else if ((type_token[1] == '1') || (type_token[1] == '4')) + { +#if defined(PNG_WRITE_INVERT_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED) + raw = (type_token[1] == '4'); + color_type = PNG_COLOR_TYPE_GRAY; + get_token (pnm_file, width_token, sizeof (width_token)); + sscanf (width_token, "%lu", &ul_width); + width = (png_uint_32) ul_width; + get_token (pnm_file, height_token, sizeof (height_token)); + sscanf (height_token, "%lu", &ul_height); + height = (png_uint_32) ul_height; + bit_depth = 1; + packed_bitmap = TRUE; +#else + fprintf (stderr, "PNM2PNG built without PNG_WRITE_INVERT_SUPPORTED and\n"); + fprintf (stderr, "PNG_WRITE_PACK_SUPPORTED can't read PBM (P1,P4) files\n"); + return FALSE; +#endif + } + else if ((type_token[1] == '2') || (type_token[1] == '5')) + { + raw = (type_token[1] == '5'); + color_type = PNG_COLOR_TYPE_GRAY; + get_token (pnm_file, width_token, sizeof (width_token)); + sscanf (width_token, "%lu", &ul_width); + width = (png_uint_32) ul_width; + get_token (pnm_file, height_token, sizeof (height_token)); + sscanf (height_token, "%lu", &ul_height); + height = (png_uint_32) ul_height; + get_token (pnm_file, maxval_token, sizeof (maxval_token)); + sscanf (maxval_token, "%lu", &ul_maxval); + maxval = (png_uint_32) ul_maxval; + + if (maxval <= 1) + bit_depth = 1; + else if (maxval <= 3) + bit_depth = 2; + else if (maxval <= 15) + bit_depth = 4; + else if (maxval <= 255) + bit_depth = 8; + else if (maxval <= 65535U) + bit_depth = 16; + else /* maxval > 65535U */ + return FALSE; + } + else if ((type_token[1] == '3') || (type_token[1] == '6')) + { + raw = (type_token[1] == '6'); + color_type = PNG_COLOR_TYPE_RGB; + get_token (pnm_file, width_token, sizeof (width_token)); + sscanf (width_token, "%lu", &ul_width); + width = (png_uint_32) ul_width; + get_token (pnm_file, height_token, sizeof (height_token)); + sscanf (height_token, "%lu", &ul_height); + height = (png_uint_32) ul_height; + get_token (pnm_file, maxval_token, sizeof (maxval_token)); + sscanf (maxval_token, "%lu", &ul_maxval); + maxval = (png_uint_32) ul_maxval; + if (maxval <= 1) + bit_depth = 1; + else if (maxval <= 3) + bit_depth = 2; + else if (maxval <= 15) + bit_depth = 4; + else if (maxval <= 255) + bit_depth = 8; + else if (maxval <= 65535U) + bit_depth = 16; + else /* maxval > 65535U */ + return FALSE; + } else { return FALSE; @@ -308,36 +281,51 @@ BOOL do_pnm2png (png_struct *png_ptr, png_info *info_ptr, if (alpha) { - if ((fscan_pnm_magic (alpha_file, magic_token, sizeof (magic_token)) != 1) - || ((magic_token[1] != '2') && (magic_token[1] != '5'))) - return FALSE; /* not a PGM file */ + if (color_type == PNG_COLOR_TYPE_GRAY) + color_type = PNG_COLOR_TYPE_GRAY_ALPHA; + if (color_type == PNG_COLOR_TYPE_RGB) + color_type = PNG_COLOR_TYPE_RGB_ALPHA; - if ((fscan_pnm_uint_32 (alpha_file, &alpha_width) != 1) || - (fscan_pnm_uint_32 (alpha_file, &alpha_height) != 1) || - (fscan_pnm_uint_32 (alpha_file, &maxval) != 1)) - return FALSE; /* bad PGM file header */ - - if ((alpha_width != width) || (alpha_height != height)) - return FALSE; /* mismatched PGM dimensions */ - - alpha_raw = (magic_token[1] == '5'); - color_type |= PNG_COLOR_MASK_ALPHA; - if (maxval == 0) + get_token (alpha_file, type_token, sizeof (type_token)); + if (type_token[0] != 'P') + { return FALSE; - else if (maxval == 1) - alpha_depth = 1; - else if (maxval <= 3) - alpha_depth = 2; - else if (maxval <= 15) - alpha_depth = 4; - else if (maxval <= 255) - alpha_depth = 8; - else if (maxval <= 65535U) - alpha_depth = 16; - else /* maxval > 65535U */ - return FALSE; - if (alpha_depth != bit_depth) + } + else if ((type_token[1] == '2') || (type_token[1] == '5')) + { + alpha_raw = (type_token[1] == '5'); + get_token (alpha_file, width_token, sizeof (width_token)); + sscanf (width_token, "%lu", &ul_alpha_width); + alpha_width = (png_uint_32) ul_alpha_width; + if (alpha_width != width) + return FALSE; + get_token (alpha_file, height_token, sizeof (height_token)); + sscanf (height_token, "%lu", &ul_alpha_height); + alpha_height = (png_uint_32) ul_alpha_height; + if (alpha_height != height) + return FALSE; + get_token (alpha_file, maxval_token, sizeof (maxval_token)); + sscanf (maxval_token, "%lu", &ul_maxval); + maxval = (png_uint_32) ul_maxval; + if (maxval <= 1) + alpha_depth = 1; + else if (maxval <= 3) + alpha_depth = 2; + else if (maxval <= 15) + alpha_depth = 4; + else if (maxval <= 255) + alpha_depth = 8; + else if (maxval <= 65535U) + alpha_depth = 16; + else /* maxval > 65535U */ + return FALSE; + if (alpha_depth != bit_depth) + return FALSE; + } + else + { return FALSE; + } } /* end if alpha */ /* calculate the number of channels and store alpha-presence */ @@ -349,17 +337,21 @@ BOOL do_pnm2png (png_struct *png_ptr, png_info *info_ptr, channels = 3; else if (color_type == PNG_COLOR_TYPE_RGB_ALPHA) channels = 4; +#if 0 else - return FALSE; /* NOTREACHED */ + channels = 0; /* cannot happen */ +#endif alpha_present = (channels - 1) % 2; +#if defined(PNG_WRITE_INVERT_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED) if (packed_bitmap) { /* row data is as many bytes as can fit width x channels x bit_depth */ row_bytes = (width * channels * bit_depth + 7) / 8; } else +#endif { /* row_bytes is the width x number of channels x (bit-depth / 8) */ row_bytes = width * channels * ((bit_depth <= 8) ? 1 : 2); @@ -371,59 +363,50 @@ BOOL do_pnm2png (png_struct *png_ptr, png_info *info_ptr, /* too big */ return FALSE; } - - /* allocate the rows using the same memory layout as libpng, and transfer - * their ownership to libpng, with the responsibility to clean everything up; - * please note the use of png_calloc instead of png_malloc */ - row_pointers = (png_byte **) - png_calloc (png_ptr, height * sizeof (png_byte *)); - png_set_rows (png_ptr, info_ptr, row_pointers); - png_data_freer (png_ptr, info_ptr, PNG_DESTROY_WILL_FREE_DATA, PNG_FREE_ALL); - for (row = 0; row < height; row++) + if ((png_pixels = (png_byte *) + malloc ((size_t) row_bytes * (size_t) height)) == NULL) { - /* the individual rows should only be allocated after all the previous - * steps completed successfully, because libpng must handle correctly - * any image allocation left incomplete after an out-of-memory error */ - row_pointers[row] = (png_byte *) png_malloc (png_ptr, row_bytes); + /* out of memory */ + return FALSE; } - /* read the data from PNM file */ + /* read data from PNM file */ + pix_ptr = png_pixels; - for (row = 0; row < height; row++) + for (row = 0; row < (int) height; row++) { - pix_ptr = row_pointers[row]; +#if defined(PNG_WRITE_INVERT_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED) if (packed_bitmap) { - for (i = 0; i < row_bytes; i++) + for (i = 0; i < (int) row_bytes; i++) { /* png supports this format natively so no conversion is needed */ - *pix_ptr++ = get_pnm_data (pnm_file, 8); + *pix_ptr++ = get_data (pnm_file, 8); } } else +#endif { - for (col = 0; col < width; col++) + for (col = 0; col < (int) width; col++) { - for (i = 0; i < (png_uint_32) (channels - alpha_present); i++) + for (i = 0; i < (channels - alpha_present); i++) { if (raw) { - *pix_ptr++ = get_pnm_data (pnm_file, bit_depth); - if (bit_depth == 16) - *pix_ptr++ = get_pnm_data (pnm_file, bit_depth); + *pix_ptr++ = get_data (pnm_file, bit_depth); } else { if (bit_depth <= 8) { - *pix_ptr++ = get_pnm_value (pnm_file, bit_depth); + *pix_ptr++ = get_value (pnm_file, bit_depth); } else { - val16 = get_pnm_value (pnm_file, bit_depth); - *pix_ptr = (png_byte) ((val16 >> 8) & 0xFF); + tmp16 = get_value (pnm_file, bit_depth); + *pix_ptr = (png_byte) ((tmp16 >> 8) & 0xFF); pix_ptr++; - *pix_ptr = (png_byte) (val16 & 0xFF); + *pix_ptr = (png_byte) (tmp16 & 0xFF); pix_ptr++; } } @@ -433,21 +416,19 @@ BOOL do_pnm2png (png_struct *png_ptr, png_info *info_ptr, { if (alpha_raw) { - *pix_ptr++ = get_pnm_data (alpha_file, alpha_depth); - if (alpha_depth == 16) - *pix_ptr++ = get_pnm_data (alpha_file, alpha_depth); + *pix_ptr++ = get_data (alpha_file, alpha_depth); } else { if (alpha_depth <= 8) { - *pix_ptr++ = get_pnm_value (alpha_file, bit_depth); + *pix_ptr++ = get_value (alpha_file, bit_depth); } else { - val16 = get_pnm_value (alpha_file, bit_depth); - *pix_ptr++ = (png_byte) ((val16 >> 8) & 0xFF); - *pix_ptr++ = (png_byte) (val16 & 0xFF); + tmp16 = get_value (alpha_file, bit_depth); + *pix_ptr++ = (png_byte) ((tmp16 >> 8) & 0xFF); + *pix_ptr++ = (png_byte) (tmp16 & 0xFF); } } } /* end if alpha */ @@ -455,66 +436,86 @@ BOOL do_pnm2png (png_struct *png_ptr, png_info *info_ptr, } /* end for col */ } /* end for row */ - /* we're going to write more or less the same PNG as the input file */ - png_set_IHDR (png_ptr, info_ptr, width, height, bit_depth, color_type, - (!interlace) ? PNG_INTERLACE_NONE : PNG_INTERLACE_ADAM7, - PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); + /* prepare the standard PNG structures */ + png_ptr = png_create_write_struct (png_get_libpng_ver(NULL), + NULL, NULL, NULL); + if (!png_ptr) + { + free (png_pixels); + return FALSE; + } + info_ptr = png_create_info_struct (png_ptr); + if (!info_ptr) + { + png_destroy_write_struct (&png_ptr, NULL); + free (png_pixels); + return FALSE; + } +#if defined(PNG_WRITE_INVERT_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED) if (packed_bitmap == TRUE) { png_set_packing (png_ptr); png_set_invert_mono (png_ptr); } +#endif + + if (setjmp (png_jmpbuf (png_ptr))) + { + png_destroy_write_struct (&png_ptr, &info_ptr); + free (png_pixels); + return FALSE; + } + + /* initialize the png structure */ + png_init_io (png_ptr, png_file); + + /* we're going to write more or less the same PNG as the input file */ + png_set_IHDR (png_ptr, info_ptr, width, height, bit_depth, color_type, + (!interlace) ? PNG_INTERLACE_NONE : PNG_INTERLACE_ADAM7, + PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); /* write the file header information */ png_write_info (png_ptr, info_ptr); + /* if needed we will allocate memory for an new array of row-pointers */ + if (row_pointers == NULL) + { + if ((row_pointers = (png_byte **) + malloc (height * sizeof (png_byte *))) == NULL) + { + png_destroy_write_struct (&png_ptr, &info_ptr); + free (png_pixels); + return FALSE; + } + } + + /* set the individual row_pointers to point at the correct offsets */ + for (i = 0; i < (int) height; i++) + row_pointers[i] = png_pixels + i * row_bytes; + /* write out the entire image data in one call */ png_write_image (png_ptr, row_pointers); /* write the additional chunks to the PNG file (not really needed) */ png_write_end (png_ptr, info_ptr); + /* clean up after the write, and free any memory allocated */ + png_destroy_write_struct (&png_ptr, &info_ptr); + + if (row_pointers != NULL) + free (row_pointers); + if (png_pixels != NULL) + free (png_pixels); + return TRUE; } /* end of pnm2png */ /* - * fscan_pnm_magic - like fscan_pnm_token below, but expects the magic string - * to start immediately, without any comment or whitespace, - * and to match the regex /^P[1-9]$/ + * get_token - gets the first string after whitespace */ -int fscan_pnm_magic (FILE *pnm_file, char *magic_buf, size_t magic_buf_size) -{ - int ret; - - ret = fgetc (pnm_file); - if (ret == EOF) return 0; - ungetc (ret, pnm_file); - if (ret != 'P') return 0; - - /* the string buffer must be at least four bytes long, i.e., the capacity - * required for strings of at least three characters long, i.e., the minimum - * required for ensuring that our magic string is exactly two characters long - */ - if (magic_buf_size < 4) return -1; - - ret = fscan_pnm_token (pnm_file, magic_buf, magic_buf_size); - if (ret < 1) return ret; - - if ((magic_buf[1] < '1') || (magic_buf[1] > '9')) return 0; - if (magic_buf[2] != '\0') return 0; - - return 1; -} - -/* - * fscan_pnm_token - extracts the first string token after whitespace, - * and (like fscanf) returns the number of successful - * extractions, which can be either 0 or 1 - */ - -int fscan_pnm_token (FILE *pnm_file, char *token_buf, size_t token_buf_size) +void get_token (FILE *pnm_file, char *token_buf, size_t token_buf_size) { size_t i = 0; int ret; @@ -542,66 +543,29 @@ int fscan_pnm_token (FILE *pnm_file, char *token_buf, size_t token_buf_size) { ret = fgetc (pnm_file); if (ret == EOF) break; - if (ret == '0') - { - /* avoid storing more than one leading '0' in the token buffer, - * to ensure that all valid (in-range) numeric inputs can fit in. */ - if ((i == 0) && (token_buf[i] == '0')) continue; - } if (++i == token_buf_size - 1) break; token_buf[i] = (char) ret; } while ((ret != '\n') && (ret != '\r') && (ret != ' ')); token_buf[i] = '\0'; - return (i > 0) ? 1 : 0; + + return; } /* - * fscan_pnm_uint_32 - like fscan_token above, but expects the extracted token - * to be numeric, and converts it to an unsigned 32-bit int + * get_data - takes first byte and converts into next pixel value, + * taking as much bits as defined by bit-depth and + * using the bit-depth to fill up a byte (0Ah -> AAh) */ -int fscan_pnm_uint_32 (FILE *pnm_file, png_uint_32 *num_ptr) -{ - char token[16]; - unsigned long token_value; - int ret; - - ret = fscan_pnm_token (pnm_file, token, sizeof (token)); - if (ret < 1) return ret; - - if ((token[0] < '0') && (token[0] > '9')) - return 0; /* the token starts with junk, or a +/- sign, which is invalid */ - - ret = sscanf (token, "%lu%*c", &token_value); - if (ret != 1) - return 0; /* the token ends with junk */ - - *num_ptr = (png_uint_32) token_value; - -#if ULONG_MAX > 0xFFFFFFFFUL - /* saturate the converted number, following the fscanf convention */ - if (token_value > 0xFFFFFFFFUL) - *num_ptr = 0xFFFFFFFFUL; -#endif - - return 1; -} - -/* - * get_pnm_data - takes first byte and converts into next pixel value, - * taking as many bits as defined by bit-depth and - * using the bit-depth to fill up a byte (0x0A -> 0xAA) - */ - -png_uint_32 get_pnm_data (FILE *pnm_file, int depth) +png_uint_32 get_data (FILE *pnm_file, int depth) { static int bits_left = 0; static int old_value = 0; static int mask = 0; - png_uint_32 ret_value; int i; + png_uint_32 ret_value; if (mask == 0) for (i = 0; i < depth; i++) @@ -609,11 +573,7 @@ png_uint_32 get_pnm_data (FILE *pnm_file, int depth) if (bits_left <= 0) { - /* FIXME: - * signal the premature end of file, instead of pretending to read zeroes - */ old_value = fgetc (pnm_file); - if (old_value == EOF) return 0; bits_left = 8; } @@ -628,28 +588,25 @@ png_uint_32 get_pnm_data (FILE *pnm_file, int depth) } /* - * get_pnm_value - takes first (numeric) string and converts into number, - * using the bit-depth to fill up a byte (0x0A -> 0xAA) + * get_value - takes first (numeric) string and converts into number, + * using the bit-depth to fill up a byte (0Ah -> AAh) */ -png_uint_32 get_pnm_value (FILE *pnm_file, int depth) +png_uint_32 get_value (FILE *pnm_file, int depth) { static png_uint_32 mask = 0; + char token[16]; + unsigned long ul_ret_value; png_uint_32 ret_value; - int i; + int i = 0; if (mask == 0) for (i = 0; i < depth; i++) mask = (mask << 1) | 0x01; - if (fscan_pnm_uint_32 (pnm_file, &ret_value) != 1) - { - /* FIXME: - * signal the invalid numeric tokens or the premature end of file, - * instead of pretending to read zeroes - */ - return 0; - } + get_token (pnm_file, token, sizeof (token)); + sscanf (token, "%lu", &ul_ret_value); + ret_value = (png_uint_32) ul_ret_value; ret_value &= mask; diff --git a/Engine/lib/lpng/contrib/pngminus/test_pnm2png.sh b/Engine/lib/lpng/contrib/pngminus/pnm2png.sh similarity index 100% rename from Engine/lib/lpng/contrib/pngminus/test_pnm2png.sh rename to Engine/lib/lpng/contrib/pngminus/pnm2png.sh diff --git a/Engine/lib/lpng/contrib/pngsuite/README b/Engine/lib/lpng/contrib/pngsuite/README index 25f0f54fd..d236b02e7 100644 --- a/Engine/lib/lpng/contrib/pngsuite/README +++ b/Engine/lib/lpng/contrib/pngsuite/README @@ -1,3 +1,4 @@ + pngsuite -------- Copyright (c) Willem van Schaik, 1999, 2011, 2012 diff --git a/Engine/lib/lpng/contrib/pngsuite/interlaced/README b/Engine/lib/lpng/contrib/pngsuite/interlaced/README index 296fffba6..f171eee01 100644 --- a/Engine/lib/lpng/contrib/pngsuite/interlaced/README +++ b/Engine/lib/lpng/contrib/pngsuite/interlaced/README @@ -1 +1,2 @@ + These images fail the "pngimage-quick" and "pngimage-full" tests. diff --git a/Engine/lib/lpng/contrib/powerpc-vsx/linux.c b/Engine/lib/lpng/contrib/powerpc-vsx/linux.c index d861b2826..32ed9d749 100644 --- a/Engine/lib/lpng/contrib/powerpc-vsx/linux.c +++ b/Engine/lib/lpng/contrib/powerpc-vsx/linux.c @@ -2,6 +2,7 @@ * * Copyright (c) 2017 Glenn Randers-Pehrson * Written by Vadim Barkov, 2017. + * Last changed in libpng 1.6.29 [March 16, 2017] * * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer @@ -11,7 +12,7 @@ * BUG REPORTS: png-mng-implement@sourceforge.net * * png_have_vsx implemented for Linux by reading the widely available - * pseudo-file /proc/cpuinfo. + * pseudo-file /proc/cpuinfo. * * This code is strict ANSI-C and is probably moderately portable; it does * however use and it assumes that /proc/cpuinfo is never localized. diff --git a/Engine/lib/lpng/contrib/powerpc-vsx/linux_aux.c b/Engine/lib/lpng/contrib/powerpc-vsx/linux_aux.c index 6ec048e80..7828acafb 100644 --- a/Engine/lib/lpng/contrib/powerpc-vsx/linux_aux.c +++ b/Engine/lib/lpng/contrib/powerpc-vsx/linux_aux.c @@ -2,6 +2,7 @@ * * Copyright (c) 2017 Glenn Randers-Pehrson * Written by Vadim Barkov, 2017. + * Last changed in libpng 1.6.29 [March 16, 2017] * * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer diff --git a/Engine/lib/lpng/contrib/testpngs/badpal/regression-palette-8.png b/Engine/lib/lpng/contrib/testpngs/badpal/regression-palette-8.png deleted file mode 100644 index dcb88b6ec41cb7dc13e13f28f6b35a79aef685d6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1033 zcmW+#!HZi(7=KYHHM%OU~x(Sy%<&f&+v_suuI@Av(_ zK3TdllYcQE1i{Q=srXJ1ci5_1Ff+zkV*OnL3G<7buHZ>;II#nu_G8H1_ zJY_7UG$ka(I7KLhFa;pXc8{H%I&3|ca3#kTD_N3@Y&L!KFv?WO_F_Wk+ zVJJZ@)6NZr9SGAGx+hdu$c_+Of^)%c3%V&tTi}*JO#x#88kx{uJ1>Xt(3AE&d}*KU z596G2PB_P$BhDe`;Qy((2D33UO{QB+wVB*x;UwjBVC4j4D}ftFfhzU=xWr4 z)YPeFRK--bsMz#{DeF+$qhvs_plFA}go05vZ&xOEg_tVQAyE;LF%fOgg0L>3148Z+ zoDj52;2r_v%p9(SEy1ROHN`5#l3~&ElrigJDlkbfmKg10s4zInoaE+_Eh4jobOos@ zl654SzCXnJi0&Y=i|{@|2MA6OIL>V63eaAJrU*5GY6Z#=ir9+**#Oc6l0AqOL=y-f zKrqcb>dpdN0A?QO5>RCzYd|!-a)1p19RV^1_z0k5aJ~8bDZdQoYi$3sS zzhi4r5S;w&)i2+AwgW*|{ry+&%;Z+mI`vs{_1rUC2T#APo_g=oH(puIKRSIQ|7X7) zUCDoO?~~c@>TLMvSHbQbes!mJ7*`w7{r9hb`&{$zp*{E5eg4fa4}YAyv- z`?iJWZtXMbOV$vded_WFUSlJzrW-TXssZii@^oh6r4-*@-p+%GZJ$ZobtN<57l zx&7C3#@5?wCv)ACNaVWRS(WF`)iJA9Yeh~$@4ZX?1+z9!>ucX!l2nv;FgtD;f7#|+ z_mv*LZ(Dfo);^=YWDW7zr!Jr1H8#>}x-ny|8qj_&PZ!4!j_b)2*ccdO8Dvzd-X;S@ O89ZJ6T-G@yGywn%Bw&dE diff --git a/Engine/lib/lpng/contrib/testpngs/badpal/small-palette-4.png b/Engine/lib/lpng/contrib/testpngs/badpal/small-palette-4.png deleted file mode 100644 index 7401dc70b1f56da59b1d07031617557084b82e5f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 315 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~j!VDx;!;N!*lx~1ei0l9V|M&0z-_Y>i!2!hD zKYxEi!+wVZkPwgs1P)-i{Ru$Y!SiHKEKs9iiEBiObACZ(QD%BZ3ByVSBLhQY9Ux%} zB#cZHyz(>h6r4-*@-p+%GZJ$ZobtN<57lx&7C3#@5?wCv)ACNaVWRS(WF`)iJA9 zYeh~$@4ZX?1+z9!>ucX!l2nv;FgtD;f7#|+_mv*LZ(Dfo);^=YWDW7zr!Jr1H8#>} sx-ny|8qj_oPZ!4!j_b)OAx#Vn%$FEGp3Lbu4-{wcboFyt=akR{03LI9OaK4? diff --git a/Engine/lib/lpng/contrib/testpngs/badpal/small-palette-8.png b/Engine/lib/lpng/contrib/testpngs/badpal/small-palette-8.png deleted file mode 100644 index a45338713146ab5b5a5a18cd5fdd3e7165e13531..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1035 zcmW+#!E0Pa7=NiCb!~J!S)`Pq2a&kKBvmN6IJO(QDK!ofmOVt7ZZ`A8E^ry2}@W;M70l`tm}Wrp~3-rpBaNr%I(#rb48g zr;MePri7#zrwFAGrT}Ew?!?)NGsjLJIW=-}=)}Nr?pWQ?sv{+biw?~@n0MfO2JI%+ zKD1_RwX$l@%EXGk<=nE^($JC>i-|=A3olua&v>|FW5>oE7`<=Qu8})N^bF^QH4Lp8 zQZcw}(2{`#1LiZ*?nqmu&A!%Bt3*qoMOSmKSyNM{NvJW^sH`E;pqN$YM#}Cfv#WHX z)IBBpN^}(GinSDt6^RrM6{;w>qChE=!wscPq}h>LNY$6JD@9v!F4?A}O-W*jnM5@S zLkX&xc5WbSUzncIU7hc|qfdmUce2qSpqqbORBZiY8*!OI&T*VgJYrQW~(alF1adQ4pN|{k1ROey$BcNB#BZ)VcAkr1`>U$+Zh-who?sM?Lf2r*FQxntO8gM(&SZ zE4rHd;=%2iZ)cap4 diff --git a/Engine/lib/lpng/contrib/testpngs/badpal/test-palette-1.png b/Engine/lib/lpng/contrib/testpngs/badpal/test-palette-1.png deleted file mode 100644 index 614fd97bba7a550cdbec9847ddb01c556afd54f4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 432 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0P3?wHke>@jRF$egBxc+BgkbJ~x4&)k^xJHyX z=ND8KWu|A8FsxKCGB7mO0TQM_!pKCyD?cMo!MQXqFEcMaBQaOODZe}?wMZ+h^B+)i zNoGhyiBD#7YF;r=nt_oaHIIRTY?hcL*VEaloG0}I@LEgg(0xZ3M9=sINIJ(p^ zQ?pg*(--BW#i!@BeULg?VNqt;w?EYF&`+-w#t*C1x2Qk-r}Aa0!cwZWd36-c+QvZPzYCJNxJDMD4Qsx-x$oeG~lvcpO)tIU9Wu}cz*Dxd(FM- X^mopLawjjKvl%>H{an^LB{Ts5Eh(oV diff --git a/Engine/lib/lpng/contrib/testpngs/badpal/test-palette-2.png b/Engine/lib/lpng/contrib/testpngs/badpal/test-palette-2.png deleted file mode 100644 index a7e996464bf4e47c5870b64c1a1f5cbeff2198fd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 499 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0L3?#3!&-4XSoB=)|uK)l4Z)gDF^o1%3KtaP2 z*N775{DR7&%=C;BhLs9N28PBuK*AJA7?~(|*GWt+&@s=DH`5$aTB3D$kv(V^*!!ikyPpdzbnPW^JC<*S@(VsVMJYcHA=lvdy>d zD?NPQw(#7oeMWuB8sf80T|U8UY^2q6W5!xFp#3jAT^vI!dQ-1#6g*_W!+OF0Ajg}- z93l=7s-sEpM!TSfK>AB>zjwO}Wa2+1MF%nD_}%>`k!#)d{Pqie!;R91PuG4qKBJ?3 zegBT0-zsOMJP)mz2%#n@Nog*c2qx4z7H}$MG;z#QX!2A+AXY&RF&71ekADOhJFidY z@YqxD;&5m#hsO?KM$U32g@=ADt|CoJT#kaRFIx5}t*8kTSM#2J_T;y(4No|pPEh5M z(%@Xm5`D>0*e%FwlHaAGsXHd!n)D|~F32G&DX1lAS QKtD5hy85}Sb4q9e0P*9)G5`Po diff --git a/Engine/lib/lpng/contrib/testpngs/badpal/test-palette-4.png b/Engine/lib/lpng/contrib/testpngs/badpal/test-palette-4.png deleted file mode 100644 index 39853bfce9a6d4095b7e26e66f216e54769cb890..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 591 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0J3?w7mbKU|e-2k5u*Z=?j@8AEwq2a%S1BkVM z{{DuB{SFBrAs`C~9Kdq>6M(dX=gFQ}phm+I*N775{DR7&%=C;BhLs9N28PBuK*AJA z7?~(|*GWt+&@s=DH`5$aTB3D$kv(V^*!! zikyPpdzbnPW^JC<*S@(VsVMJYcHA=lvdy>dD?NPQw(#7oeMWuB8sf80T|U8UY^2q6 zW5!xF1_nk2PZ!4!kIvR>7b6cDNVGnD%+|)sAuV8Lke6`dzz)V#=GSc3c-Kfrm@UY2 zxZALc@xj;f;;OsPb7%jtTz)Aw;z;PNC&z=ba{sN5@~%9^pD8>2VO$W0;j$^knzw&l zdJ{i8wpLH|`IICcN0wXDSQ@seIySU0?AhBa(6EkKks+4diN%BCz;SgB#uwEBOc%Z@ zxHPnIOb}>TpD(~7AJ;foGlDK!W@DM ziVXYHfvV2~RnKz-ss6FML7?HaXv_YCc8B&a`R%hipls#ew4HCaF($8z8j))f$e4I-?# ztSQBIJ(1=t3R199>4?hNh`4}zYP9HZyi6_U*jC#d_D)cN-1onk+u8Y(`I6uN@qO8$ zjM^IJ=|0b0qtSRqgokX?Xk5^xi^gpt`jg%mAEVJsctb_SgsQ5lD5@;0lB9~FDhMji zs~o4YtjaJdO{)~8lB7xyDvqld22U$b6uC>09E#Yi2=xkIrEoTdWfjJ#(0ddrRw2U` zV!eXdw5T!a%IEW6z!L;4 z7PdpF;$=H8Rq`Uo3s#=D@LVy^vOJT|)44ol;z@=lGI(6iV|!rl6dNa7IjM{jEu2uo z@x>fh#IY>L6moPvN9A#3E=Oc@xQWAzu+eDm&~~5+QPZdolo~yaJ`Bs!EK9L0$+85? z;w+2(?^F~cBbyj0n-OyvA&=qn8LkjL%P>U@UCdA=3~6DAG6uIYm<^6l*+a{ETFRhB zh89dTpG$N3C^5|x)3k-AtTf5dL?w;eX{-v)TZyIQ1WHPxL_H-KDBeVId8iADDWPa9 zMO9Fwog%6!yoSQ+;pI@mNtq(0cv7TEK~M4w$>pM!Nyb9b97)+pk|&8e5*J9U8Qvsi zJt2n>(pEx@Cxj$|&mg#LG#|l~5p*R%RTE?#L0ly876Nm?Yp3|(@>*O9!9@xe5^!FR zb0)MIIAg_WJ5JT$q<|AGINpI{UGR=7i!j*_lh$KmI3~nm{2q)mqMgGS8%9@QR6RyE zV}t|SmHoRJ=*O_q6dG>|&SVZ4(^B;&O+CJfSh?B{h4)cd6@YKf)En^N{RTstAyvP7 zFaBX>PDYAxd2HD@!ltyCcvDnba*AOex{ZEcDF%(kt$RiJmg&VfRwBIo!DT_qUVHA0 z!}iUKrxjiFh!&>qH0ykm-5<}{?cP_GX9#mYaXjEiQA$tW>-~1svE+AWS2?>nJy)+LS}^~*qVPW2A2 z(kFFk_s>Q2F0pk5MD$(Bn%{kSZ{PpF$*1@%bNn-({_Z(FJ#P!TPk!XwQ_=ICvv-;G zeD(F>|u5Ibd{$+#d#lx$S-G+gK|9W(e! zZBFm2-QV!}ij#rqy=Ss&NZrD+meg5S8U&S?ieAamO=uD^GcSo(M{?nyLXZwD9 zhBmNvH zO5K;0?fm&iIy1G((cbG^)fBqy!Pvyf_a`vwjiL+e_v4$2X_wZq;wfzt4!yNZD{`GQ ztX=5t;r6TdnrXAJeqH`rKm3aMmRmf@sGSu6{!jy;CJaDFIRI{<2Y|ro017t(xH$>H ztug=+l>jPz0MtbRh^~eT{2EUH1?vH{PXlo0F98171fVGuz_U95q-v`?0HIa@*4Y5;egOP;LWRW3FoT%C4uHcQfb%l|+ZzBh!~y7T1R(5$3W?1ygIE{@ zplvdMb{l{#RRF320W@a-$Q*zQ@@1GoEZ6{`V>*C))c|(30BFepF#H05G5{6iW|%=V z>kv?HxBzG^1`uokV9^5L769-Lf(p89n87>>=b+x23gC7nfRE|`)I|f3P66P9pn@(3 zW-yP#IjA>X0XVDxBJBX|{s4po0EyS3f|w06n8)B8)OJq*cdG#GXa>-n2|(!wAYX?H zVh+q;R^c4f)`IvBTiu9$ImWdFf-|Ac_Tr?o?oakj*k^wA$u z2IDg4i}^tlXR&WrAD`}VW9+BR#jf9v2b{e*fiZuzjdr=B3%z|o)6X|9iP!uZz0Czh z|G$pHN@5wrbCY15+UTbl?(m(C(hPcepfnec7NInALfcT9Z(g>d_(3SdV29)R2w%3QOkQ?hz8G`fap6;NO0h@DQM-lcLUMgXR!o|Q+(afO0kz4x?ALQMe(Ya z21OU=R20`e)uK555_MmwdyTpmg?!Y#9QGKMQdan*Qp2D6pfm@aFl^9qi2FJhqB!t$ zGNJ}!38HZ+7S#6(C#>}R6WaN`u@tSRu0!36m6u>!V%I_Xngx)4(<_ud(|-d>-(0x@ zrSDtrfnsWfCtP>VL+Q__K(Dcv4x==YDJa?aol7jb_DDH|uA{zm{c&8?WK~Wv9%;H9 Ri~etFB0{%@eElJP=)b!?Je&Xk diff --git a/Engine/lib/lpng/contrib/testpngs/makepngs.sh b/Engine/lib/lpng/contrib/testpngs/makepngs.sh index f0238c3b5..eb1c15fc9 100644 --- a/Engine/lib/lpng/contrib/testpngs/makepngs.sh +++ b/Engine/lib/lpng/contrib/testpngs/makepngs.sh @@ -1,10 +1,12 @@ -#!/usr/bin/env bash - +#!/bin/sh +# # Make a set of test PNG files, MAKEPNG is the name of the makepng executable # built from contrib/libtests/makepng.c # Copyright (c) 2015 John Cunningham Bowler +# Last changed in libpng 1.6.20 [December 3, 2015] + # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h diff --git a/Engine/lib/lpng/contrib/testpngs/png-3/cicp-display-p3_reencoded.png b/Engine/lib/lpng/contrib/testpngs/png-3/cicp-display-p3_reencoded.png deleted file mode 100644 index 91d8e6bc4819b50bdc57025b8ee826620c3facba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 142 zcmeAS@N?(olHy`uVBq!ia0vp^DL`z*!3-qlzV7P*QY^`y&H+5U42*fqkKY6NJOMr- zu0Z<#|Nq8mGlArsjT|?Dd|gi$$B>BDw`UD`fr^+HEc@pget2GNLcf~95Vo7yD_DZ$=K#dHZu6{1-oD!M + #include static int diff --git a/Engine/lib/lpng/contrib/tools/chkfmt b/Engine/lib/lpng/contrib/tools/chkfmt new file mode 100644 index 000000000..95181fde2 --- /dev/null +++ b/Engine/lib/lpng/contrib/tools/chkfmt @@ -0,0 +1,144 @@ +#!/bin/sh + +# chkfmt +# +# COPYRIGHT: Written by John Cunningham Bowler, 2010. +# To the extent possible under law, the author has waived all copyright and +# related or neighboring rights to this work. This work is published from: +# United States. +# +# Check the format of the source files in the current directory - checks for a +# line length of 80 characters max and no tab characters. +# +# Optionally arguments are files or directories to check. +# +# -v: output the long lines (makes fixing them easier) +# -e: spawn an editor for each file that needs a change ($EDITOR must be +# defined). When using -e the script MUST be run from an interactive +# command line. +verbose= +edit= +vers= +test "$1" = "-v" && { + shift + verbose=yes +} +test "$1" = "-e" && { + shift + if test -n "$EDITOR" + then + edit=yes + + # Copy the standard streams for the editor + exec 3>&0 4>&1 5>&2 + else + echo "chkfmt -e: EDITOR must be defined" >&2 + exit 1 + fi +} + +# Function to edit a single file - if the file isn't changed ask the user +# whether or not to continue. This stuff only works if the script is run from +# the command line (otherwise, don't specify -e or you will be sorry). +doed(){ + cp "$file" "$file".orig + "$EDITOR" "$file" 0>&3 1>&4 2>&5 3>&- 4>&- 5>&- || exit 1 + if cmp -s "$file".orig "$file" + then + rm "$file".orig + echo -n "$file: file not changed, type anything to continue: " >&5 + read ans 0>&3 + test -n "$ans" || return 1 + fi + return 0 +} + +# In beta versions the version string which appears in files can be a little +# long and cause spuriously overlong lines. To avoid this substitute the version +# string with a 'standard' version a.b.cc before checking for long lines. +if test -r png.h +then + vers="`sed -n -e \ + 's/^#define PNG_LIBPNG_VER_STRING .\([0-9]\.[0-9]\.[0-9][0-9a-z]*\).$/\1/p' \ + png.h`" + echo "chkfmt: checking version $vers" +fi +if test -z "$vers" +then + echo "chkfmt: png.h not found, ignoring version number" >&2 +fi + +test -n "$1" || set -- . +find "$@" \( -type d \( -name '.git' -o -name '.libs' -o -name 'projects' \) \ + -prune \) -o \( -type f \ + ! -name '*.[oa]' ! -name '*.l[oa]' ! -name '*.png' ! -name '*.out' \ + ! -name '*.jpg' ! -name '*.patch' ! -name '*.obj' ! -name '*.exe' \ + ! -name '*.com' ! -name '*.tar.*' ! -name '*.zip' ! -name '*.ico' \ + ! -name '*.res' ! -name '*.rc' ! -name '*.mms' ! -name '*.rej' \ + ! -name '*.dsp' ! -name '*.orig' ! -name '*.dfn' ! -name '*.swp' \ + ! -name '~*' ! -name '*.3' \ + ! -name 'missing' ! -name 'mkinstalldirs' ! -name 'depcomp' \ + ! -name 'aclocal.m4' ! -name 'install-sh' ! -name 'Makefile.in' \ + ! -name 'ltmain.sh' ! -name 'config*' -print \) | { + st=0 + while read file + do + case "$file" in + *.mak|*[Mm]akefile.*|*[Mm]akefile) + # Makefiles require tabs, dependency lines can be this long. + check_tabs= + line_length=100;; + *.awk) + # Includes literal tabs + check_tabs= + # The following is arbitrary + line_length=132;; + *contrib/*/*.[ch]) + check_tabs=yes + line_length=96;; + *) + check_tabs=yes + line_length=80;; + esac + + # Note that vers can only contain 0-9, . and a-z + if test -n "$vers" + then + sed -e "s/$vers/a.b.cc/g" "$file" >"$file".$$ + else + cp "$file" "$file".$$ + fi + splt="`fold -$line_length "$file".$$ | diff -c "$file".$$ -`" + rm "$file".$$ + + if test -n "$splt" + then + echo "$file: lines too long" + st=1 + if test -n "$EDITOR" -a -n "$edit" + then + doed "$file" || exit 1 + elif test -n "$verbose" + then + echo "$splt" + fi + fi + if test -n "$check_tabs" + then + tab="`tr -c -d '\t' <"$file"`" + if test -n "$tab" + then + echo "$file: file contains tab characters" + st=1 + if test -n "$EDITOR" -a -n "$edit" + then + doed "$file" || exit 1 + elif test -n "$verbose" + then + echo "$splt" + fi + fi + fi + done + exit $st +} diff --git a/Engine/lib/lpng/contrib/tools/cvtcolor.c b/Engine/lib/lpng/contrib/tools/cvtcolor.c index 111dfcee7..e6793c7d5 100644 --- a/Engine/lib/lpng/contrib/tools/cvtcolor.c +++ b/Engine/lib/lpng/contrib/tools/cvtcolor.c @@ -1,4 +1,7 @@ -/* convert.c +/*- + * convert.c + * + * Last changed in libpng 1.6.0 [February 14, 2013] * * COPYRIGHT: Written by John Cunningham Bowler, 2013. * To the extent possible under law, the author has waived all copyright and @@ -7,7 +10,6 @@ * * Convert 8-bit sRGB or 16-bit linear values to another format. */ - #define _ISOC99_SOURCE 1 #include diff --git a/Engine/lib/lpng/contrib/tools/genpng.c b/Engine/lib/lpng/contrib/tools/genpng.c index c43bea906..0b3f98196 100644 --- a/Engine/lib/lpng/contrib/tools/genpng.c +++ b/Engine/lib/lpng/contrib/tools/genpng.c @@ -1,4 +1,4 @@ -/* genpng +/*- genpng * * COPYRIGHT: Written by John Cunningham Bowler, 2015. * Revised by Glenn Randers-Pehrson, 2017, to add buffer-size check. @@ -69,7 +69,6 @@ * joins are mitres; the outside of the lines are continued to the point of * intersection. */ - #include #include #include @@ -454,7 +453,7 @@ check_square(const struct arg *arg, double x, double y) * { inside_circle_filled, check_circle_filled }, * { inside_circle, check_circle } * - * The functions here are analogous to the square ones; however, they check + * The functions here are analoguous to the square ones; however, they check * the corresponding ellipse as opposed to the rectangle. */ static int diff --git a/Engine/lib/lpng/contrib/tools/intgamma.sh b/Engine/lib/lpng/contrib/tools/intgamma.sh index aaed68a09..41c5d6dd2 100644 --- a/Engine/lib/lpng/contrib/tools/intgamma.sh +++ b/Engine/lib/lpng/contrib/tools/intgamma.sh @@ -1,11 +1,13 @@ #!/bin/sh - +# # intgamma.sh # +# Last changed in libpng 1.6.0 [February 14, 2013] +# # COPYRIGHT: Written by John Cunningham Bowler, 2013. # To the extent possible under law, the author has waived all copyright and -# related or neighboring rights to this work. The author published this work -# from the United States. +# related or neighboring rights to this work. This work is published from: +# United States. # # Shell script to generate png.c 8-bit and 16-bit log tables (see the code in # png.c for details). @@ -15,11 +17,11 @@ # (0..255) value and a similar table for the exponent calculation. # # "bc" must be on the path when the script is executed, and the math library -# (-lm) must be available. - -# Function to print out a list of numbers as integers; the function truncates -# the integers which must be one-per-line. -print(){ +# (-lm) must be available +# +# function to print out a list of numbers as integers; the function truncates +# the integers which must be one-per-line +function print(){ awk 'BEGIN{ str = "" } diff --git a/Engine/lib/lpng/contrib/tools/makesRGB.c b/Engine/lib/lpng/contrib/tools/makesRGB.c index 5ef3ddf99..d0c0ca931 100644 --- a/Engine/lib/lpng/contrib/tools/makesRGB.c +++ b/Engine/lib/lpng/contrib/tools/makesRGB.c @@ -1,4 +1,6 @@ /* makesRGB.c -- build sRGB-to-linear and linear-to-sRGB conversion tables + * + * Last changed in libpng 1.6.0 [February 14, 2013] * * COPYRIGHT: Written by John Cunningham Bowler, 2013. * To the extent possible under law, the author has waived all copyright and @@ -12,7 +14,6 @@ * approximation to the 8-bit sRGB encoded value. Calculate the error in these * tables and display it. */ - #define _C99_SOURCE 1 #include #include diff --git a/Engine/lib/lpng/contrib/tools/png-fix-itxt.c b/Engine/lib/lpng/contrib/tools/png-fix-itxt.c index b8286b9e5..c7654c113 100644 --- a/Engine/lib/lpng/contrib/tools/png-fix-itxt.c +++ b/Engine/lib/lpng/contrib/tools/png-fix-itxt.c @@ -1,6 +1,8 @@ -/* png-fix-itxt + +/* png-fix-itxt version 1.0.0 * * Copyright 2015 Glenn Randers-Pehrson + * Last changed in libpng 1.6.18 [July 23, 2015] * * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer @@ -8,7 +10,7 @@ * * Usage: * - * png-fix-itxt < bad.png > good.png + * png-fix-itxt.exe < bad.png > good.png * * Fixes a PNG file written with libpng-1.6.0 or 1.6.1 that has one or more * uncompressed iTXt chunks. Assumes that the actual length is greater diff --git a/Engine/lib/lpng/contrib/tools/pngcp.c b/Engine/lib/lpng/contrib/tools/pngcp.c index cf621fa5b..16d4e7f4d 100644 --- a/Engine/lib/lpng/contrib/tools/pngcp.c +++ b/Engine/lib/lpng/contrib/tools/pngcp.c @@ -1,6 +1,8 @@ /* pngcp.c * - * Copyright (c) 2016,2022,2024 John Cunningham Bowler + * Copyright (c) 2016 John Cunningham Bowler + * + * Last changed in libpng 1.6.24 [August 4, 2016] * * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer @@ -12,12 +14,7 @@ * * For a more extensive example that uses the transforms see * contrib/libtests/pngimage.c in the libpng distribution. - * - * This code is not intended for installation in a release system; the command - * line options are not documented and most of the behavior is intended for - * testing libpng performance, both speed and compression. */ - #include "pnglibconf.h" /* To find how libpng was configured. */ #ifdef PNG_PNGCP_TIMING_SUPPORTED @@ -88,6 +85,16 @@ # define voidcast(type, value) (value) #endif /* __cplusplus */ +#ifdef __GNUC__ + /* Many versions of GCC erroneously report that local variables unmodified + * within the scope of a setjmp may be clobbered. This hacks round the + * problem (sometimes) without harming other compilers. + */ +# define gv volatile +#else +# define gv +#endif + /* 'CLOCK_PROCESS_CPUTIME_ID' is one of the clock timers for clock_gettime. It * need not be supported even when clock_gettime is available. It returns the * 'CPU' time the process has consumed. 'CPU' time is assumed to include time @@ -329,7 +336,7 @@ static const option options[] = # define VLC(name) VLCIDAT(name) VLCiCCP(name) VLCzTXt(name) # ifdef PNG_SW_COMPRESS_png_level - /* The libpng compression level isn't searched because it just sets the + /* The libpng compression level isn't searched because it justs sets the * other things that are searched! */ VLO("compression", compression, 0) @@ -385,7 +392,6 @@ struct display { jmp_buf error_return; /* Where to go to on error */ unsigned int errset; /* error_return is set */ - int errlevel; /* error level from longjmp */ const char *operation; /* What is happening */ const char *filename; /* The name of the original file */ @@ -497,10 +503,10 @@ display_init(struct display *dp) } static void -display_clean_read(struct display *dp, int freeinfo) +display_clean_read(struct display *dp) { if (dp->read_pp != NULL) - png_destroy_read_struct(&dp->read_pp, freeinfo ? &dp->ip : NULL, NULL); + png_destroy_read_struct(&dp->read_pp, NULL, NULL); if (dp->fp != NULL) { @@ -511,7 +517,7 @@ display_clean_read(struct display *dp, int freeinfo) } static void -display_clean_write(struct display *dp, int freeinfo) +display_clean_write(struct display *dp) { if (dp->fp != NULL) { @@ -521,14 +527,14 @@ display_clean_write(struct display *dp, int freeinfo) } if (dp->write_pp != NULL) - png_destroy_write_struct(&dp->write_pp, freeinfo ? &dp->ip : NULL); + png_destroy_write_struct(&dp->write_pp, dp->tsp > 0 ? NULL : &dp->ip); } static void display_clean(struct display *dp) { - display_clean_read(dp, 1/*freeinfo*/); - display_clean_write(dp, 1/*freeinfo*/); + display_clean_read(dp); + display_clean_write(dp); dp->output_file = NULL; # if PNG_LIBPNG_VER < 10700 && defined PNG_TEXT_SUPPORTED @@ -625,10 +631,7 @@ display_log(struct display *dp, error_level level, const char *fmt, ...) if (level > APP_FAIL || (level > ERRORS && !(dp->options & CONTINUE))) { if (dp->errset) - { - dp->errlevel = level; longjmp(dp->error_return, level); - } else exit(99); @@ -775,7 +778,7 @@ static void set_opt_string(struct display *dp, unsigned int sp) /* Add the appropriate option string to dp->curr. */ { - dp->stack[sp].opt_string_end = set_opt_string_(dp, sp, dp->stack[sp].opt, + dp->stack[sp].opt_string_end = set_opt_string_(dp, sp, dp->stack[sp].opt, options[dp->stack[sp].opt].values[dp->stack[sp].entry].name); } @@ -1742,17 +1745,7 @@ read_function(png_structp pp, png_bytep data, size_t size) static void read_png(struct display *dp, const char *filename) { - /* This is an assumption of the code; it may happen if a previous write fails - * and there is a bug in the cleanup handling below (look for setjmp). - * Passing freeinfo==1 to display_clean_read below avoids a second error - * on dp->ip != NULL below. - */ - if (dp->read_pp != NULL) - { - display_log(dp, APP_FAIL, "unexpected png_read_struct"); - display_clean_read(dp, 1/*freeinfo*/); /* recovery */ - } - + display_clean_read(dp); /* safety */ display_start_read(dp, filename); dp->read_pp = png_create_read_struct(PNG_LIBPNG_VER_STRING, dp, @@ -1776,13 +1769,6 @@ read_png(struct display *dp, const char *filename) png_set_check_for_invalid_index(dp->read_pp, -1/*off completely*/); # endif /* IGNORE_INDEX */ - if (dp->ip != NULL) - { - /* UNEXPECTED: some problem in the display_clean function calls! */ - display_log(dp, APP_FAIL, "read_png: freeing old info struct"); - png_destroy_info_struct(dp->read_pp, &dp->ip); - } - /* The png_read_png API requires us to make the info struct, but it does the * call to png_read_info. */ @@ -1862,14 +1848,7 @@ read_png(struct display *dp, const char *filename) } #endif /* FIX_INDEX */ - /* NOTE: dp->ip is where all the information about the PNG that was just read - * is stored. It can be used to write and write again a single PNG file, - * however be aware that prior to libpng 1.7 text chunks could only be - * written once; this is a bug which would require a significant code rewrite - * to fix, it has been there in several versions of libpng (it was introduced - * to fix another bug involving duplicate writes of the text chunks.) - */ - display_clean_read(dp, 0/*freeiinfo*/); + display_clean_read(dp); dp->operation = "none"; } @@ -1996,21 +1975,7 @@ set_text_compression(struct display *dp) static void write_png(struct display *dp, const char *destname) { - /* If this test fails png_write_png would fail *silently* below; this - * is not helpful, so catch the problem now and give up: - */ - if (dp->ip == NULL) - display_log(dp, INTERNAL_ERROR, "missing png_info"); - - /* This is an assumption of the code; it may happen if a previous - * write fails and there is a bug in the cleanup handling below. - */ - if (dp->write_pp != NULL) - { - display_log(dp, APP_FAIL, "unexpected png_write_struct"); - display_clean_write(dp, 0/*!freeinfo*/); - } - + display_clean_write(dp); /* safety */ display_start_write(dp, destname); dp->write_pp = png_create_write_struct(PNG_LIBPNG_VER_STRING, dp, @@ -2108,6 +2073,10 @@ write_png(struct display *dp, const char *destname) destname == NULL ? "stdout" : destname, strerror(errno)); } + /* Clean it on the way out - if control returns to the caller then the + * written_file contains the required data. + */ + display_clean_write(dp); dp->operation = "none"; } @@ -2274,10 +2243,6 @@ cp_one_file(struct display *dp, const char *filename, const char *destname) /* Loop to find the best option. */ do { - /* Clean before each write_png; this just removes *dp->write_pp which - * cannot be reused. - */ - display_clean_write(dp, 0/*!freeinfo*/); write_png(dp, tmpname); /* And compare the sizes (the write function makes sure write_size @@ -2307,14 +2272,17 @@ cp_one_file(struct display *dp, const char *filename, const char *destname) /* Do this for the 'sizes' option so that it reports the correct size. */ dp->write_size = dp->best_size; } - - display_clean_write(dp, 1/*freeinfo*/); } static int -cppng(struct display *dp, const char *file, const char *dest) +cppng(struct display *dp, const char *file, const char *gv dest) + /* Exists solely to isolate the setjmp clobbers which some versions of GCC + * erroneously generate. + */ { - if (setjmp(dp->error_return) == 0) + int ret = setjmp(dp->error_return); + + if (ret == 0) { dp->errset = 1; cp_one_file(dp, file, dest); @@ -2326,11 +2294,10 @@ cppng(struct display *dp, const char *file, const char *dest) { dp->errset = 0; - if (dp->errlevel < ERRORS) /* shouldn't longjmp on warnings */ - display_log(dp, INTERNAL_ERROR, "unexpected return code %d", - dp->errlevel); + if (ret < ERRORS) /* shouldn't longjmp on warnings */ + display_log(dp, INTERNAL_ERROR, "unexpected return code %d", ret); - return dp->errlevel; + return ret; } } diff --git a/Engine/lib/lpng/contrib/tools/pngfix.c b/Engine/lib/lpng/contrib/tools/pngfix.c index 3f0e334f8..2fa5d13ea 100644 --- a/Engine/lib/lpng/contrib/tools/pngfix.c +++ b/Engine/lib/lpng/contrib/tools/pngfix.c @@ -1,6 +1,7 @@ /* pngfix.c * - * Copyright (c) 2014-2017,2024 John Cunningham Bowler + * Last changed in libpng 1.6.31 [July 27, 2017] + * Copyright (c) 2014-2017 John Cunningham Bowler * * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer @@ -9,7 +10,6 @@ * Tool to check and fix the zlib inflate 'too far back' problem. * See the usage message for more information. */ - #include #include #include @@ -20,6 +20,19 @@ #define implies(x,y) assert(!(x) || (y)) +#ifdef __GNUC__ + /* This is used to fix the error: + * + * pngfix.c: + * In function 'zlib_advance': + * pngfix.c:181:13: error: assuming signed overflow does not + * occur when simplifying conditional to constant [-Werror=strict-overflow] + */ +# define FIX_GCC volatile +#else +# define FIX_GCC +#endif + #define PROGRAM_NAME "pngfix" /* Define the following to use this program against your installed libpng, @@ -32,7 +45,7 @@ #endif #if PNG_LIBPNG_VER < 10603 /* 1.6.3 */ -# error pngfix requires libpng version 1.6.3 or newer +# error "pngfix will not work with libpng prior to 1.6.3" #endif #ifdef PNG_SETJMP_SUPPORTED @@ -68,7 +81,7 @@ #endif #ifndef PNG_MAXIMUM_INFLATE_WINDOW -# error pngfix requires libpng with PNG_MAXIMUM_INFLATE_WINDOW supported +# error "pngfix not supported in this libpng version" #endif #if ZLIB_VERNUM >= 0x1240 @@ -133,6 +146,11 @@ /* Is it safe to copy? */ #define SAFE_TO_COPY(chunk) (((chunk) & PNG_U32(0,0,0,32)) != 0) +/* Fix ups for builds with limited read support */ +#ifndef PNG_ERROR_TEXT_SUPPORTED +# define png_error(a,b) png_err(a) +#endif + /********************************* UTILITIES **********************************/ /* UNREACHED is a value to cause an assert to fail. Because of the way the * assert macro is written the string "UNREACHED" is produced in the error @@ -200,7 +218,7 @@ uarb_inc(uarb num, int in_digits, png_int_32 add) * in_digits+1 if add is known to be in the range -65535..65535. */ { - int out_digits = 0; + FIX_GCC int out_digits = 0; while (out_digits < in_digits) { @@ -245,7 +263,7 @@ uarb_add32(uarb num, int in_digits, png_uint_32 add) } static int -uarb_mult_digit(uarb acc, int a_digits, uarb num, int n_digits, +uarb_mult_digit(uarb acc, int a_digits, uarb num, FIX_GCC int n_digits, png_uint_16 val) /* Primitive one-digit multiply - 'val' must be 0..65535. Note that this * primitive is a multiply and accumulate - the result of *num * val is added @@ -318,7 +336,7 @@ uarb_shift(uarb inout, int ndigits, unsigned int right_shift) * 1..15 */ { - int i = ndigits; + FIX_GCC int i = ndigits; png_uint_16 carry = 0; assert(right_shift >= 1 && right_shift <= 15); @@ -333,7 +351,7 @@ uarb_shift(uarb inout, int ndigits, unsigned int right_shift) inout[i] = temp; /* The shift may reduce ndigits */ - if (i+1 == ndigits && temp == 0) + if (i == ndigits-1 && temp == 0) ndigits = i; } @@ -849,7 +867,7 @@ struct file * signature (in length,type). * * When a chunk control structure is instantiated these values are copied - * into the structure and can then be overwritten with the data for the next + * into the structure and can then be overritten with the data for the next * chunk. */ fpos_t data_pos; /* Position of first byte of chunk data */ @@ -987,18 +1005,10 @@ file_end(struct file *file) if (file->out != NULL) { - /* On some systems 'fclose' deletes the FILE struct (making it - * inaccessbile). There is no guarantee that fclose returns an error - * code from fflush or, indeed, from the FILE error indicator. There is - * also no explicit (or clear) guarantee in the standard that anything - * other than a read or write operation sets the error indicator; fflush - * is not a read or write operation, so both conditions must be checked - * to ensure the close succeeded and in ANSI-C conformant code they must - * be checked before the fclose call. + /* NOTE: this is bitwise |, all the following functions must execute and + * must succeed. */ - const int err = fflush(file->out) || ferror(file->out); - - if (fclose(file->out) || err) + if (ferror(file->out) | fflush(file->out) | fclose(file->out)) { perror(file->out_name); emit_error(file, READ_ERROR_CODE, "output write error"); @@ -1588,7 +1598,7 @@ chunk_init(struct chunk * const chunk, struct file * const file) chunk->chunk_length = file->length; chunk->chunk_type = file->type; - /* Compressed/uncompressed size information (from the zlib control structure + /* Compresssed/uncompressed size information (from the zlib control structure * that is used to check the compressed data in a chunk.) */ chunk->uncompressed_digits = 0; @@ -2919,7 +2929,7 @@ process_chunk(struct file *file, png_uint_32 file_crc, png_uint_32 next_length, } /* Control reaches this point if the chunk must be skipped. For chunks other - * than IDAT this means that the zlib compressed data is fatally damaged and + * than IDAT this means that the zlib compressed data is fatally damanged and * the chunk will not be passed to libpng. For IDAT it means that the end of * the IDAT stream has not yet been reached and we must handle the next * (IDAT) chunk. If the LZ data in an IDAT stream cannot be read 'stop' must @@ -3951,14 +3961,6 @@ main(int argc, const char **argv) { size_t outlen = strlen(*argv); - if (outlen > FILENAME_MAX) - { - fprintf(stderr, "%s: output file name too long: %s%s%s\n", - prog, prefix, *argv, suffix ? suffix : ""); - global.status_code |= WRITE_ERROR; - continue; - } - if (outfile == NULL) /* else this takes precedence */ { /* Consider the prefix/suffix options */ @@ -4044,4 +4046,4 @@ main(void) return 77; } #endif /* PNG_SETJMP_SUPPORTED */ -/* vi: set textwidth=80 shiftwidth=3 softtabstop=-1 expandtab: */ + diff --git a/Engine/lib/lpng/contrib/tools/reindent b/Engine/lib/lpng/contrib/tools/reindent new file mode 100644 index 000000000..f4df309b6 --- /dev/null +++ b/Engine/lib/lpng/contrib/tools/reindent @@ -0,0 +1,25 @@ +#!/bin/sh + +# reindent a libpng C source + +# COPYRIGHT: Written by Glenn Randers-Pehrson, 2016. +# To the extent possible under law, the author has waived all copyright and +# related or neighboring rights to this work. This work is published from: +# United States. + +# Usage: +# reindent inputtabsize outputtabsize inputcontinuestring outputcontinuestring +# +# Assumes that continued lines begin with indentation plus one space, and +# that continued comments begin with indentation plus " *". +# +# eg, to change libpng coding style from 3-space indentation with 4-space +# continuations to 4-space indentation with 2-space continuations: +# +# reindent 3 4 "\t " " " < example.c > example.c_4_2 +# and to restore the file back to libpng coding style +# reindent 4 3 " " " " < example.c_4_2 > example.c_3_4 + +unexpand --first-only --t $1 | \ + sed -e "/^ *$3[^\*]/{s/$3/$4/}" | \ + expand -t $2 diff --git a/Engine/lib/lpng/contrib/tools/sRGB.h b/Engine/lib/lpng/contrib/tools/sRGB.h index 7f6bdfc28..d1ece5129 100644 --- a/Engine/lib/lpng/contrib/tools/sRGB.h +++ b/Engine/lib/lpng/contrib/tools/sRGB.h @@ -1,4 +1,7 @@ -/* sRGB.h +/*- + * sRGB.h + * + * Last changed in libpng 1.6.0 [February 14, 2013] * * COPYRIGHT: Written by John Cunningham Bowler, 2013. * To the extent possible under law, the author has waived all copyright and @@ -13,7 +16,6 @@ * (in fact the source of the numbers is the wikipedia article at * https://en.wikipedia.org/wiki/SRGB). */ - static double sRGB_from_linear(double l) { diff --git a/Engine/lib/lpng/contrib/visupng/.editorconfig b/Engine/lib/lpng/contrib/visupng/.editorconfig deleted file mode 100644 index d5bcb5312..000000000 --- a/Engine/lib/lpng/contrib/visupng/.editorconfig +++ /dev/null @@ -1,23 +0,0 @@ -# https://editorconfig.org - -root = true - -[*] -charset = utf-8 -end_of_line = unset -indent_size = 4 -indent_style = space -insert_final_newline = true -max_doc_length = 80 -max_line_length = 100 -trim_trailing_whitespace = true - -[*.rc] -end_of_line = crlf -trim_trailing_whitespace = unset - -[*.ds[pw]] -end_of_line = crlf -max_doc_length = unset -max_line_length = unset -trim_trailing_whitespace = unset diff --git a/Engine/lib/lpng/contrib/visupng/VisualPng.c b/Engine/lib/lpng/contrib/visupng/VisualPng.c index 6f7b1dfe5..6baa3b663 100644 --- a/Engine/lib/lpng/contrib/visupng/VisualPng.c +++ b/Engine/lib/lpng/contrib/visupng/VisualPng.c @@ -103,7 +103,7 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, return 0; } - /* if filename given on command line, store it */ + /* if filename given on commandline, store it */ if ((szCmdLine != NULL) && (*szCmdLine != '\0')) if (szCmdLine[0] == '"') strncpy (szCmdFileName, szCmdLine + 1, strlen(szCmdLine) - 2); diff --git a/Engine/lib/lpng/depcomp b/Engine/lib/lpng/depcomp index 9f6725b9e..65cbf7093 100644 --- a/Engine/lib/lpng/depcomp +++ b/Engine/lib/lpng/depcomp @@ -1,9 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2025-06-18.21; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2025 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -47,13 +47,11 @@ Environment variables: libtool Whether libtool is used (yes/no). Report bugs to . -GNU Automake home page: . -General help using GNU software: . EOF exit $? ;; -v | --v*) - echo "depcomp (GNU Automake) $scriptversion" + echo "depcomp $scriptversion" exit $? ;; esac @@ -115,6 +113,7 @@ nl=' # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz +digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then @@ -129,7 +128,7 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" -# Avoid interference from the environment. +# Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We @@ -199,8 +198,8 @@ gcc3) ;; gcc) -## Note that this doesn't just cater to obsolete pre-3.x GCC compilers. -## but also to in-use compilers like IBM xlc/xlC and the HP C compiler. +## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. +## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: @@ -784,9 +783,9 @@ exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'before-save-hook 'time-stamp nil t) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" -# time-stamp-format: "%Y-%02m-%02d.%02H" +# time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/Engine/lib/lpng/example.c b/Engine/lib/lpng/example.c index 6af8f6f90..2e2afaafb 100644 --- a/Engine/lib/lpng/example.c +++ b/Engine/lib/lpng/example.c @@ -1,8 +1,9 @@ + #if 0 /* in case someone actually tries to compile this */ /* example.c - an example of using libpng * - * Maintained 2018-2025 Cosmin Truta + * Maintained 2018 Cosmin Truta * Maintained 1998-2016 Glenn Randers-Pehrson * Maintained 1996-1997 Andreas Dilger * Written 1995-1996 Guy Eric Schalnat, Group 42, Inc. @@ -124,7 +125,6 @@ int main(int argc, const char **argv) png_image_free(&image); else free(buffer); - } } /* Something went wrong reading or writing the image. libpng stores a @@ -179,11 +179,11 @@ int main(int argc, const char **argv) * components. * * You do not have to read directly from a file. You can read from memory or, - * on systems that support , from a FILE object. This is controlled - * by the particular png_image_begin_read_from_ function you call at the start. - * Likewise, on write, you can write to a FILE object if your system supports - * . The macro PNG_STDIO_SUPPORTED indicates if stdio is available - * and accessible from your libpng build. + * on systems that support it, from a FILE*. This is controlled by + * the particular png_image_read_from_ function you call at the start. + * Likewise, on write, you can write to a FILE* if your system supports it. + * Check the macro PNG_STDIO_SUPPORTED to see if stdio support has been + * included in your libpng build. * * If you read 16-bit (PNG_FORMAT_FLAG_LINEAR) data, you may need to write it * in the 8-bit format for display. You do this by setting the convert_to_8bit @@ -258,9 +258,9 @@ int check_if_png(char *file_name, FILE **fp) return 0; /* Compare the first PNG_BYTES_TO_CHECK bytes of the signature. - * Return true if they match. + * Return nonzero (true) if they match. */ - return png_sig_cmp(buf, 0, PNG_BYTES_TO_CHECK) == 0; + return(!png_sig_cmp(buf, 0, PNG_BYTES_TO_CHECK)); } /* Read a PNG file. You may want to return an error code if the read @@ -280,7 +280,7 @@ void read_png(char *file_name) /* We need to open the file */ FILE *fp; if ((fp = fopen(file_name, "rb")) == NULL) - return ERROR; + return (ERROR); #else no_open_file /* prototype 2 */ void read_png(FILE *fp, int sig_read) /* File is already open */ @@ -303,7 +303,7 @@ void read_png(FILE *fp, int sig_read) /* File is already open */ if (png_ptr == NULL) { fclose(fp); - return ERROR; + return (ERROR); } /* Allocate/initialize the memory for image information. REQUIRED. */ @@ -312,7 +312,7 @@ void read_png(FILE *fp, int sig_read) /* File is already open */ { fclose(fp); png_destroy_read_struct(&png_ptr, NULL, NULL); - return ERROR; + return (ERROR); } /* Set error handling if you are using the setjmp/longjmp method (this is @@ -325,7 +325,7 @@ void read_png(FILE *fp, int sig_read) /* File is already open */ png_destroy_read_struct(&png_ptr, &info_ptr, NULL); fclose(fp); /* If we get here, we had a problem reading the file. */ - return ERROR; + return (ERROR); } /* One of the following I/O initialization methods is REQUIRED. */ @@ -584,7 +584,7 @@ void read_png(FILE *fp, int sig_read) /* File is already open */ fclose(fp); /* That's it! */ - return OK; + return (OK); } /* Progressively read a file */ @@ -603,18 +603,18 @@ initialize_png_reader(png_structp *png_ptr, png_infop *info_ptr) if (*png_ptr == NULL) { *info_ptr = NULL; - return ERROR; + return (ERROR); } *info_ptr = png_create_info_struct(png_ptr); if (*info_ptr == NULL) { png_destroy_read_struct(png_ptr, info_ptr, NULL); - return ERROR; + return (ERROR); } if (setjmp(png_jmpbuf((*png_ptr)))) { png_destroy_read_struct(png_ptr, info_ptr, NULL); - return ERROR; + return (ERROR); } /* You will need to provide all three function callbacks, @@ -631,7 +631,7 @@ initialize_png_reader(png_structp *png_ptr, png_infop *info_ptr) */ png_set_progressive_read_fn(*png_ptr, (void *)stream_data, info_callback, row_callback, end_callback); - return OK; + return (OK); } int @@ -642,7 +642,7 @@ process_data(png_structp *png_ptr, png_infop *info_ptr, { /* Free the png_ptr and info_ptr memory on error. */ png_destroy_read_struct(png_ptr, info_ptr, NULL); - return ERROR; + return (ERROR); } /* Give chunks of data as they arrive from the data stream @@ -656,7 +656,7 @@ process_data(png_structp *png_ptr, png_infop *info_ptr, * callback, if you aren't already displaying them there. */ png_process_data(*png_ptr, *info_ptr, buffer, length); - return OK; + return (OK); } info_callback(png_structp png_ptr, png_infop info) @@ -746,7 +746,7 @@ void write_png(char *file_name /* , ... other image information ... */) /* Open the file */ fp = fopen(file_name, "wb"); if (fp == NULL) - return ERROR; + return (ERROR); /* Create and initialize the png_struct with the desired error handler * functions. If you want to use the default stderr and longjump method, @@ -759,7 +759,7 @@ void write_png(char *file_name /* , ... other image information ... */) if (png_ptr == NULL) { fclose(fp); - return ERROR; + return (ERROR); } /* Allocate/initialize the image information data. REQUIRED. */ @@ -768,7 +768,7 @@ void write_png(char *file_name /* , ... other image information ... */) { fclose(fp); png_destroy_write_struct(&png_ptr, NULL); - return ERROR; + return (ERROR); } /* Set up error handling. REQUIRED if you aren't supplying your own @@ -779,7 +779,7 @@ void write_png(char *file_name /* , ... other image information ... */) /* If we get here, we had a problem writing the file. */ fclose(fp); png_destroy_write_struct(&png_ptr, &info_ptr); - return ERROR; + return (ERROR); } /* One of the following I/O initialization functions is REQUIRED. */ @@ -1034,7 +1034,7 @@ void write_png(char *file_name /* , ... other image information ... */) fclose(fp); /* That's it! */ - return OK; + return (OK); } #endif /* if 0 */ diff --git a/Engine/lib/lpng/install-sh b/Engine/lib/lpng/install-sh index 1d8d96696..8175c640f 100644 --- a/Engine/lib/lpng/install-sh +++ b/Engine/lib/lpng/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2025-06-18.21; # UTC +scriptversion=2018-03-11.20; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -69,11 +69,6 @@ posix_mkdir= # Desired mode of installed file. mode=0755 -# Create dirs (including intermediate dirs) using mode 755. -# This is like GNU 'install' as of coreutils 8.32 (2020). -mkdir_umask=22 - -backupsuffix= chgrpcmd= chmodcmd=$chmodprog chowncmd= @@ -104,29 +99,19 @@ Options: --version display version info and exit. -c (ignored) - -C install only if different (preserve data modification time) + -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. - -p pass -p to $cpprog. -s $stripprog installed files. - -S SUFFIX attempt to back up existing files, with suffix SUFFIX. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG - -By default, rm is invoked with -f; when overridden with RMPROG, -it's up to you to specify -f if you want it. - -If -S is not specified, no backups are attempted. - -Report bugs to . -GNU Automake home page: . -General help using GNU software: ." +" while test $# -ne 0; do case $1 in @@ -152,13 +137,8 @@ while test $# -ne 0; do -o) chowncmd="$chownprog $2" shift;; - -p) cpprog="$cpprog -p";; - -s) stripcmd=$stripprog;; - -S) backupsuffix="$2" - shift;; - -t) is_target_a_directory=always dst_arg=$2 @@ -170,7 +150,7 @@ while test $# -ne 0; do -T) is_target_a_directory=never;; - --version) echo "$0 (GNU Automake) $scriptversion"; exit $?;; + --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; @@ -275,10 +255,6 @@ do dstdir=$dst test -d "$dstdir" dstdir_status=$? - # Don't chown directories that already exist. - if test $dstdir_status = 0; then - chowncmd="" - fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command @@ -325,6 +301,22 @@ do if test $dstdir_status != 0; then case $posix_mkdir in '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then @@ -334,49 +326,52 @@ do fi posix_mkdir=false - # The $RANDOM variable is not portable (e.g., dash). Use it - # here however when possible just to lower collision chance. - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + # Note that $RANDOM variable is not portable (e.g. dash); Use it + # here however when possible just to lower collision chance. + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap ' - ret=$? - rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null - exit $ret - ' 0 + trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 - # Because "mkdir -p" follows existing symlinks and we likely work - # directly in world-writable /tmp, make sure that the '$tmpdir' - # directory is successfully created first before we actually test - # 'mkdir -p'. - if (umask $mkdir_umask && - $mkdirprog $mkdir_mode "$tmpdir" && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibility with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - test_tmpdir="$tmpdir/a" - ls_ld_tmpdir=`ls -ld "$test_tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null - fi - trap '' 0;; + # Because "mkdir -p" follows existing symlinks and we likely work + # directly in world-writeable /tmp, make sure that the '$tmpdir' + # directory is successfully created first before we actually test + # 'mkdir -p' feature. + if (umask $mkdir_umask && + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null + fi + trap '' 0;; + esac;; esac if @@ -387,7 +382,7 @@ do then : else - # mkdir does not conform to POSIX, + # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. @@ -416,7 +411,7 @@ do prefixes= else if $posix_mkdir; then - (umask $mkdir_umask && + (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 @@ -456,18 +451,7 @@ do trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. - (umask $cp_umask && - { test -z "$stripcmd" || { - # Create $dsttmp read-write so that cp doesn't create it read-only, - # which would cause strip to fail. - if test -z "$doit"; then - : >"$dsttmp" # No need to fork-exec 'touch'. - else - $doit touch "$dsttmp" - fi - } - } && - $doit_exec $cpprog "$src" "$dsttmp") && + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # @@ -493,13 +477,6 @@ do then rm -f "$dsttmp" else - # If $backupsuffix is set, and the file being installed - # already exists, attempt a backup. Don't worry if it fails, - # e.g., if mv doesn't support -f. - if test -n "$backupsuffix" && test -f "$dst"; then - $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null - fi - # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || @@ -514,9 +491,9 @@ do # file should still install successfully. { test ! -f "$dst" || - $doit $rmcmd "$dst" 2>/dev/null || + $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd "$rmtmp" 2>/dev/null; :; } + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 @@ -533,9 +510,9 @@ do done # Local variables: -# eval: (add-hook 'before-save-hook 'time-stamp nil t) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" -# time-stamp-format: "%Y-%02m-%02d.%02H" +# time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/Engine/lib/lpng/intel/filter_sse2_intrinsics.c b/Engine/lib/lpng/intel/filter_sse2_intrinsics.c index 2993f650b..f52aaa800 100644 --- a/Engine/lib/lpng/intel/filter_sse2_intrinsics.c +++ b/Engine/lib/lpng/intel/filter_sse2_intrinsics.c @@ -1,3 +1,4 @@ + /* filter_sse2_intrinsics.c - SSE2 optimized filter functions * * Copyright (c) 2018 Cosmin Truta @@ -258,7 +259,7 @@ void png_read_filter_row_paeth3_sse2(png_row_infop row_info, png_bytep row, a = d; d = _mm_unpacklo_epi8(load4(row ), zero); /* (p-a) == (a+b-c - a) == (b-c) */ - + pa = _mm_sub_epi16(b,c); /* (p-b) == (a+b-c - b) == (a-c) */ diff --git a/Engine/lib/lpng/intel/intel_init.c b/Engine/lib/lpng/intel/intel_init.c index 9e4610d25..2f8168b7c 100644 --- a/Engine/lib/lpng/intel/intel_init.c +++ b/Engine/lib/lpng/intel/intel_init.c @@ -1,3 +1,4 @@ + /* intel_init.c - SSE2 optimized filter functions * * Copyright (c) 2018 Cosmin Truta diff --git a/Engine/lib/lpng/libpng-manual.txt b/Engine/lib/lpng/libpng-manual.txt index f284d987b..5dad92fbf 100644 --- a/Engine/lib/lpng/libpng-manual.txt +++ b/Engine/lib/lpng/libpng-manual.txt @@ -1,6 +1,6 @@ libpng-manual.txt - A description on how to use and modify libpng - Copyright (c) 2018-2025 Cosmin Truta + Copyright (c) 2018-2019 Cosmin Truta Copyright (c) 1998-2018 Glenn Randers-Pehrson This document is released under the libpng license. @@ -9,9 +9,9 @@ libpng-manual.txt - A description on how to use and modify libpng Based on: - libpng version 1.6.36, December 2018, through 1.6.52 - December 2025 + libpng version 1.6.36, December 2018, through 1.6.37 - April 2019 Updated and distributed by Cosmin Truta - Copyright (c) 2018-2025 Cosmin Truta + Copyright (c) 2018-2019 Cosmin Truta libpng versions 0.97, January 1998, through 1.6.35 - July 2018 Updated and distributed by Glenn Randers-Pehrson @@ -65,22 +65,18 @@ Libpng was written as a companion to the PNG specification, as a way of reducing the amount of time and effort it takes to support the PNG file format in application programs. -The PNG specification (Third Edition), June 2025, is available as -a W3C Recommendation at -. - -The PNG specification (Second Edition), November 2003, is available as +The PNG specification (second edition), November 2003, is available as a W3C Recommendation and as an ISO Standard (ISO/IEC 15948:2004 (E)) at . The W3C and ISO documents have identical technical content. The PNG-1.2 specification is available at -. -It is technically equivalent to the PNG specification (Second Edition) -but has some additional material. +. +It is technically equivalent +to the PNG specification (second edition) but has some additional material. The PNG-1.0 specification is available as RFC 2083 at - and as a + and as a W3C Recommendation at . Some additional chunks are described in the special-purpose public chunks @@ -361,7 +357,7 @@ Customizing libpng. return ERROR; } - is_png = (png_sig_cmp(header, 0, number) == 0); + is_png = !png_sig_cmp(header, 0, number); if (!is_png) { return NOT_PNG; @@ -389,7 +385,8 @@ create the structure, so your application should check for that. if (!info_ptr) { - png_destroy_read_struct(&png_ptr, NULL, NULL); + png_destroy_read_struct(&png_ptr, + (png_infopp)NULL, (png_infopp)NULL); return ERROR; } @@ -422,13 +419,14 @@ free any memory. if (setjmp(png_jmpbuf(png_ptr))) { - png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); + png_destroy_read_struct(&png_ptr, &info_ptr, + &end_info); fclose(fp); return ERROR; } -Pass NULL instead of &end_info if you didn't create an end_info -structure. +Pass (png_infopp)NULL instead of &end_info if you didn't create +an end_info structure. If you would rather avoid the complexity of setjmp/longjmp issues, you can compile libpng with PNG_NO_SETJMP, in which case @@ -498,7 +496,7 @@ You can set up a callback function to handle any unknown chunks in the input stream. You must supply the function read_chunk_callback(png_structp png_ptr, - png_unknown_chunkp chunk) + png_unknown_chunkp chunk); { /* The unknown chunk structure contains your chunk data, along with similar data for any other @@ -549,9 +547,9 @@ a progress meter or the like. It's demonstrated in pngtest.c. You must supply a function void read_row_callback(png_structp png_ptr, - png_uint_32 row, int pass) + png_uint_32 row, int pass); { - /* put your code here */ + /* put your code here */ } (You can give it another name that you like instead of "read_row_callback") @@ -879,7 +877,7 @@ described below (the latter being the two common names for associated alpha color channels). Note that PNG files always contain non-associated color channels; png_set_alpha_mode() with one of the modes causes the decoder to convert the pixels to an associated form before returning them to your -application. +application. Since it is not necessary to perform arithmetic on opaque color values so long as they are not to be resampled and are in the final color space it is @@ -1182,22 +1180,22 @@ where row_pointers is an array of pointers to the pixel data for each row: If you know your image size and pixel size ahead of time, you can allocate row_pointers prior to calling png_read_png() with - if (height > PNG_UINT_32_MAX / (sizeof (png_bytep))) - png_error(png_ptr, + if (height > PNG_UINT_32_MAX/(sizeof (png_byte))) + png_error (png_ptr, "Image is too tall to process in memory"); - if (width > PNG_UINT_32_MAX / pixel_size) - png_error(png_ptr, + if (width > PNG_UINT_32_MAX/pixel_size) + png_error (png_ptr, "Image is too wide to process in memory"); row_pointers = png_malloc(png_ptr, height*(sizeof (png_bytep))); - for (int i = 0; i < height, i++) - row_pointers[i] = NULL; /* security precaution */ + for (int i=0; i PNG_SIZE_MAX/(width*pixel_size)) - png_error(png_ptr, "image_data buffer would be too large"); + if (height > PNG_SIZE_MAX/(width*pixel_size)) { + png_error(png_ptr,"image_data buffer would be too large"); + } - png_bytep buffer = png_malloc(png_ptr, - height*width*pixel_size); + png_bytep buffer=png_malloc(png_ptr,height*width*pixel_size); - for (int i = 0; i < height, i++) - row_pointers[i] = buffer + i*width*pixel_size; + for (int i=0; i= 10504 png_set_scale_16(png_ptr); #else png_set_strip_16(png_ptr); #endif - } (The more accurate "png_set_scale_16()" API became available in libpng version 1.5.4). @@ -1795,7 +1792,7 @@ the information. If, instead, you want to convert the image to an opaque version with no alpha channel use png_set_background; see below. As of libpng version 1.5.2, almost all useful expansions are supported, the -major omissions are conversion of grayscale to indexed images (which can be +major ommissions are conversion of grayscale to indexed images (which can be done trivially in the application) and conversion of indexed to grayscale (which can be done by a trivial manipulation of the palette.) @@ -1904,7 +1901,7 @@ Note that png_set_filler() does not change the color type. If you want to do that, you can add a true alpha channel with if (color_type == PNG_COLOR_TYPE_RGB || - color_type == PNG_COLOR_TYPE_GRAY) + color_type == PNG_COLOR_TYPE_GRAY) png_set_add_alpha(png_ptr, filler, PNG_FILLER_AFTER); where "filler" contains the alpha value to assign to each pixel. @@ -1929,7 +1926,7 @@ with alpha. if (color_type == PNG_COLOR_TYPE_RGB || color_type == PNG_COLOR_TYPE_RGB_ALPHA) png_set_rgb_to_gray(png_ptr, error_action, - (double)red_weight, (double)green_weight); + double red_weight, double green_weight); error_action = 1: silently do the conversion @@ -1952,8 +1949,8 @@ In the corresponding fixed point API the red_weight and green_weight values are simply scaled by 100,000: png_set_rgb_to_gray(png_ptr, error_action, - (png_fixed_point)red_weight, - (png_fixed_point)green_weight); + png_fixed_point red_weight, + png_fixed_point green_weight); If you have set error_action = 1 or 2, you can later check whether the image really was gray, after processing @@ -2189,8 +2186,9 @@ do your own check for number_of_rows*width*pixel_size if you are using a multiple-row buffer: /* Guard against integer overflow */ - if (number_of_rows > PNG_SIZE_MAX/(width*pixel_size)) - png_error(png_ptr, "image_data buffer would be too large"); + if (number_of_rows > PNG_SIZE_MAX/(width*pixel_size)) { + png_error(png_ptr,"image_data buffer would be too large"); + } Remember: Before you call png_read_update_info(), the png_get_*() functions return the values corresponding to the original PNG image. @@ -2410,11 +2408,12 @@ separate. if (!end_info) { - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + png_destroy_read_struct(&png_ptr, &info_ptr, + (png_infopp)NULL); return ERROR; } - png_read_end(png_ptr, end_info); + png_read_end(png_ptr, end_info); If you are not interested, you should still call png_read_end() but you can pass NULL, avoiding the need to create an end_info structure. @@ -2422,7 +2421,7 @@ If you do this, libpng will not process any chunks after IDAT other than skipping over them and perhaps (depending on whether you have called png_set_crc_action) checking their CRCs while looking for the IEND chunk. - png_read_end(png_ptr, NULL); + png_read_end(png_ptr, (png_infop)NULL); If you don't call png_read_end(), then your file pointer will be left pointing to the first chunk after the last IDAT, which is probably @@ -2431,11 +2430,13 @@ the PNG datastream. When you are done, you can free all memory allocated by libpng like this: - png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); + png_destroy_read_struct(&png_ptr, &info_ptr, + &end_info); or, if you didn't create an end_info structure, - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + png_destroy_read_struct(&png_ptr, &info_ptr, + (png_infopp)NULL); It is also possible to individually free the info_ptr members that point to libpng-allocated storage with the following function: @@ -2555,13 +2556,15 @@ png_infop info_ptr; if (!info_ptr) { - png_destroy_read_struct(&png_ptr, NULL, NULL); + png_destroy_read_struct(&png_ptr, + (png_infopp)NULL, (png_infopp)NULL); return ERROR; } if (setjmp(png_jmpbuf(png_ptr))) { - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + png_destroy_read_struct(&png_ptr, &info_ptr, + (png_infopp)NULL); return ERROR; } @@ -2594,7 +2597,8 @@ png_infop info_ptr; { if (setjmp(png_jmpbuf(png_ptr))) { - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + png_destroy_read_struct(&png_ptr, &info_ptr, + (png_infopp)NULL); return ERROR; } @@ -2759,7 +2763,8 @@ both "png_ptr"; you can call them anything you like, such as png_infop info_ptr = png_create_info_struct(png_ptr); if (!info_ptr) { - png_destroy_write_struct(&png_ptr, NULL); + png_destroy_write_struct(&png_ptr, + (png_infopp)NULL); return ERROR; } @@ -2785,7 +2790,7 @@ section below for more information on the libpng error handling. if (setjmp(png_jmpbuf(png_ptr))) { - png_destroy_write_struct(&png_ptr, &info_ptr); + png_destroy_write_struct(&png_ptr, &info_ptr); fclose(fp); return ERROR; } @@ -2839,9 +2844,9 @@ a progress meter or the like. It's demonstrated in pngtest.c. You must supply a function void write_row_callback(png_structp png_ptr, png_uint_32 row, - int pass) + int pass); { - /* put your code here */ + /* put your code here */ } (You can give it another name that you like instead of "write_row_callback") @@ -3111,8 +3116,8 @@ width, height, bit_depth, and color_type must be the same in each call. png_set_eXIf_1(png_ptr, info_ptr, num_exif, exif); - exif - Exif profile (array of png_byte) - (PNG_INFO_eXIf) + exif - Exif profile (array of + png_byte) (PNG_INFO_eXIf) png_set_hIST(png_ptr, info_ptr, hist); @@ -3122,12 +3127,12 @@ width, height, bit_depth, and color_type must be the same in each call. png_set_tIME(png_ptr, info_ptr, mod_time); mod_time - time image was last modified - (PNG_INFO_tIME) + (PNG_VALID_tIME) png_set_bKGD(png_ptr, info_ptr, background); background - background color (of type - png_color_16p) (PNG_INFO_bKGD) + png_color_16p) (PNG_VALID_bKGD) png_set_text(png_ptr, info_ptr, text_ptr, num_text); @@ -3355,6 +3360,19 @@ Here is an example of writing two private chunks, prVt and miNE: /* Needed because miNE is not safe-to-copy */ png_set_keep_unknown_chunks(png, PNG_HANDLE_CHUNK_ALWAYS, (png_bytep) "miNE", 1); + # if PNG_LIBPNG_VER < 10600 + /* Deal with unknown chunk location bug in 1.5.x and earlier */ + png_set_unknown_chunk_location(png, info, 0, PNG_HAVE_IHDR); + png_set_unknown_chunk_location(png, info, 1, PNG_AFTER_IDAT); + # endif + # if PNG_LIBPNG_VER < 10500 + /* PNG_AFTER_IDAT writes two copies of the chunk prior to libpng-1.5.0, + * one before IDAT and another after IDAT, so don't use it; only use + * PNG_HAVE_IHDR location. This call resets the location previously + * set by assignment and png_set_unknown_chunk_location() for chunk 1. + */ + png_set_unknown_chunk_location(png, info, 1, PNG_HAVE_IHDR); + # endif #endif The high-level write interface @@ -4080,7 +4098,7 @@ READ APIs is filled in from the PNG header in the file. int png_image_begin_read_from_stdio (png_imagep image, - FILE *file) + FILE* file) The PNG header is read from the stdio FILE object. @@ -4155,7 +4173,7 @@ be written: int convert_to_8_bit, const void *buffer, png_int_32 row_stride, const void *colormap) - Write the image to the given FILE object. + Write the image to the given (FILE*). With all write APIs if image is in one of the linear formats with (png_uint_16) data then setting convert_to_8_bit will cause the output to be @@ -4200,7 +4218,7 @@ png_create_read_struct_2() or png_create_write_struct_2() to register your own functions as described above. These functions also provide a void pointer that can be retrieved via - mem_ptr = png_get_mem_ptr(png_ptr); + mem_ptr=png_get_mem_ptr(png_ptr); Your replacement memory functions must have prototypes as follows: @@ -4497,7 +4515,7 @@ When PNG_DEBUG is defined but is zero, the macros aren't defined, but you can still use PNG_DEBUG to control your own debugging: #ifdef PNG_DEBUG - fprintf(stderr, ...); + fprintf(stderr, ... #endif When PNG_DEBUG = 1, the macros are defined, but only png_debug statements @@ -4674,7 +4692,7 @@ deprecated since libpng-1.0.16 and libpng-1.2.6. The function png_check_sig(sig, num) was replaced with - png_sig_cmp(sig, 0, num) == 0 + !png_sig_cmp(sig, 0, num) It has been deprecated since libpng-0.90. The function @@ -4738,8 +4756,8 @@ png_get_mmx_bitdepth_threshold(), png_get_mmx_rowbytes_threshold(), png_set_asm_flags(), and png_mmx_supported() We removed the obsolete png_check_sig(), png_memcpy_check(), and -png_memset_check() functions. Instead use png_sig_cmp() == 0, -memcpy(), and memset(), respectively. +png_memset_check() functions. Instead use !png_sig_cmp(), memcpy(), +and memset(), respectively. The function png_set_gray_1_2_4_to_8() was removed. It has been deprecated since libpng-1.0.18 and 1.2.9, when it was replaced with @@ -5164,7 +5182,7 @@ a pre-existing bug where the per-chunk 'keep' setting is ignored, and makes it possible to skip IDAT chunks in the sequential reader. The machine-generated configure files are no longer included in branches -libpng17 and later of the GIT repository. They continue to be included +libpng16 and later of the GIT repository. They continue to be included in the tarball releases, however. Libpng-1.6.0 through 1.6.2 used the CMF bytes at the beginning of the IDAT @@ -5221,7 +5239,7 @@ changed, and is unaffected by conditional compilation macros. It is the best choice for use in configure scripts for detecting the presence of any libpng version since 0.88. In an autoconf "configure.in" you could use - AC_CHECK_LIB(png, png_get_io_ptr, ...) + AC_CHECK_LIB(png, png_get_io_ptr, ... XV. Source code repository @@ -5230,12 +5248,12 @@ control. The git repository was built from old libpng-x.y.z.tar.gz files going back to version 0.70. You can access the git repository (read only) at - https://github.com/pnggroup/libpng or + https://github.com/glennrp/libpng or https://git.code.sf.net/p/libpng/code.git or you can browse it with a web browser at - https://github.com/pnggroup/libpng or + https://github.com/glennrp/libpng or https://sourceforge.net/p/libpng/code/ci/libpng16/tree/ Patches can be sent to png-mng-implement at lists.sourceforge.net or @@ -5245,7 +5263,7 @@ uploaded to the libpng bug tracker at or as a "pull request" to - https://github.com/pnggroup/libpng/pulls + https://github.com/glennrp/libpng/pulls We also accept patches built from the tar or zip distributions, and simple verbal descriptions of bug fixes, reported either to the diff --git a/Engine/lib/lpng/libpng.3 b/Engine/lib/lpng/libpng.3 index ca9020c03..f37423540 100644 --- a/Engine/lib/lpng/libpng.3 +++ b/Engine/lib/lpng/libpng.3 @@ -1,6 +1,6 @@ -.TH LIBPNG 3 "December 3, 2025" +.TH LIBPNG 3 "April 14, 2019" .SH NAME -libpng \- Portable Network Graphics (PNG) Reference Library 1.6.52 +libpng \- Portable Network Graphics (PNG) Reference Library 1.6.37 .SH SYNOPSIS \fB#include \fP @@ -223,7 +223,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.6.52 \fBint png_image_begin_read_from_file (png_imagep \fP\fIimage\fP\fB, const char \fI*file_name\fP\fB);\fP -\fBint png_image_begin_read_from_stdio (png_imagep \fP\fIimage\fP\fB, FILE *\fIfile\fP\fB);\fP +\fBint png_image_begin_read_from_stdio (png_imagep \fP\fIimage\fP\fB, FILE* \fIfile\fP\fB);\fP \fBint, png_image_begin_read_from_memory (png_imagep \fP\fIimage\fP\fB, png_const_voidp \fP\fImemory\fP\fB, size_t \fIsize\fP\fB);\fP @@ -519,7 +519,7 @@ Following is a copy of the libpng-manual.txt file that accompanies libpng. .SH LIBPNG.TXT libpng-manual.txt - A description on how to use and modify libpng - Copyright (c) 2018-2025 Cosmin Truta + Copyright (c) 2018-2019 Cosmin Truta Copyright (c) 1998-2018 Glenn Randers-Pehrson This document is released under the libpng license. @@ -528,9 +528,9 @@ libpng-manual.txt - A description on how to use and modify libpng Based on: - libpng version 1.6.36, December 2018, through 1.6.52 - December 2025 + libpng version 1.6.36, December 2018, through 1.6.37 - April 2019 Updated and distributed by Cosmin Truta - Copyright (c) 2018-2025 Cosmin Truta + Copyright (c) 2018-2019 Cosmin Truta libpng versions 0.97, January 1998, through 1.6.35 - July 2018 Updated and distributed by Glenn Randers-Pehrson @@ -584,22 +584,18 @@ Libpng was written as a companion to the PNG specification, as a way of reducing the amount of time and effort it takes to support the PNG file format in application programs. -The PNG specification (Third Edition), June 2025, is available as -a W3C Recommendation at -. - -The PNG specification (Second Edition), November 2003, is available as +The PNG specification (second edition), November 2003, is available as a W3C Recommendation and as an ISO Standard (ISO/IEC 15948:2004 (E)) at . The W3C and ISO documents have identical technical content. The PNG-1.2 specification is available at -. -It is technically equivalent to the PNG specification (Second Edition) -but has some additional material. +. +It is technically equivalent +to the PNG specification (second edition) but has some additional material. The PNG-1.0 specification is available as RFC 2083 at - and as a + and as a W3C Recommendation at . Some additional chunks are described in the special-purpose public chunks @@ -880,7 +876,7 @@ Customizing libpng. return ERROR; } - is_png = (png_sig_cmp(header, 0, number) == 0); + is_png = !png_sig_cmp(header, 0, number); if (!is_png) { return NOT_PNG; @@ -908,7 +904,8 @@ create the structure, so your application should check for that. if (!info_ptr) { - png_destroy_read_struct(&png_ptr, NULL, NULL); + png_destroy_read_struct(&png_ptr, + (png_infopp)NULL, (png_infopp)NULL); return ERROR; } @@ -941,13 +938,14 @@ free any memory. if (setjmp(png_jmpbuf(png_ptr))) { - png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); + png_destroy_read_struct(&png_ptr, &info_ptr, + &end_info); fclose(fp); return ERROR; } -Pass NULL instead of &end_info if you didn't create an end_info -structure. +Pass (png_infopp)NULL instead of &end_info if you didn't create +an end_info structure. If you would rather avoid the complexity of setjmp/longjmp issues, you can compile libpng with PNG_NO_SETJMP, in which case @@ -1017,7 +1015,7 @@ You can set up a callback function to handle any unknown chunks in the input stream. You must supply the function read_chunk_callback(png_structp png_ptr, - png_unknown_chunkp chunk) + png_unknown_chunkp chunk); { /* The unknown chunk structure contains your chunk data, along with similar data for any other @@ -1068,9 +1066,9 @@ a progress meter or the like. It's demonstrated in pngtest.c. You must supply a function void read_row_callback(png_structp png_ptr, - png_uint_32 row, int pass) + png_uint_32 row, int pass); { - /* put your code here */ + /* put your code here */ } (You can give it another name that you like instead of "read_row_callback") @@ -1398,7 +1396,7 @@ described below (the latter being the two common names for associated alpha color channels). Note that PNG files always contain non-associated color channels; png_set_alpha_mode() with one of the modes causes the decoder to convert the pixels to an associated form before returning them to your -application. +application. Since it is not necessary to perform arithmetic on opaque color values so long as they are not to be resampled and are in the final color space it is @@ -1701,22 +1699,22 @@ where row_pointers is an array of pointers to the pixel data for each row: If you know your image size and pixel size ahead of time, you can allocate row_pointers prior to calling png_read_png() with - if (height > PNG_UINT_32_MAX / (sizeof (png_bytep))) - png_error(png_ptr, + if (height > PNG_UINT_32_MAX/(sizeof (png_byte))) + png_error (png_ptr, "Image is too tall to process in memory"); - if (width > PNG_UINT_32_MAX / pixel_size) - png_error(png_ptr, + if (width > PNG_UINT_32_MAX/pixel_size) + png_error (png_ptr, "Image is too wide to process in memory"); row_pointers = png_malloc(png_ptr, height*(sizeof (png_bytep))); - for (int i = 0; i < height, i++) - row_pointers[i] = NULL; /* security precaution */ + for (int i=0; i PNG_SIZE_MAX/(width*pixel_size)) - png_error(png_ptr, "image_data buffer would be too large"); + if (height > PNG_SIZE_MAX/(width*pixel_size)) { + png_error(png_ptr,"image_data buffer would be too large"); + } - png_bytep buffer = png_malloc(png_ptr, - height*width*pixel_size); + png_bytep buffer=png_malloc(png_ptr,height*width*pixel_size); - for (int i = 0; i < height, i++) - row_pointers[i] = buffer + i*width*pixel_size; + for (int i=0; i= 10504 png_set_scale_16(png_ptr); #else png_set_strip_16(png_ptr); #endif - } (The more accurate "png_set_scale_16()" API became available in libpng version 1.5.4). @@ -2314,7 +2311,7 @@ the information. If, instead, you want to convert the image to an opaque version with no alpha channel use png_set_background; see below. As of libpng version 1.5.2, almost all useful expansions are supported, the -major omissions are conversion of grayscale to indexed images (which can be +major ommissions are conversion of grayscale to indexed images (which can be done trivially in the application) and conversion of indexed to grayscale (which can be done by a trivial manipulation of the palette.) @@ -2423,7 +2420,7 @@ Note that png_set_filler() does not change the color type. If you want to do that, you can add a true alpha channel with if (color_type == PNG_COLOR_TYPE_RGB || - color_type == PNG_COLOR_TYPE_GRAY) + color_type == PNG_COLOR_TYPE_GRAY) png_set_add_alpha(png_ptr, filler, PNG_FILLER_AFTER); where "filler" contains the alpha value to assign to each pixel. @@ -2448,7 +2445,7 @@ with alpha. if (color_type == PNG_COLOR_TYPE_RGB || color_type == PNG_COLOR_TYPE_RGB_ALPHA) png_set_rgb_to_gray(png_ptr, error_action, - (double)red_weight, (double)green_weight); + double red_weight, double green_weight); error_action = 1: silently do the conversion @@ -2471,8 +2468,8 @@ In the corresponding fixed point API the red_weight and green_weight values are simply scaled by 100,000: png_set_rgb_to_gray(png_ptr, error_action, - (png_fixed_point)red_weight, - (png_fixed_point)green_weight); + png_fixed_point red_weight, + png_fixed_point green_weight); If you have set error_action = 1 or 2, you can later check whether the image really was gray, after processing @@ -2708,8 +2705,9 @@ do your own check for number_of_rows*width*pixel_size if you are using a multiple-row buffer: /* Guard against integer overflow */ - if (number_of_rows > PNG_SIZE_MAX/(width*pixel_size)) - png_error(png_ptr, "image_data buffer would be too large"); + if (number_of_rows > PNG_SIZE_MAX/(width*pixel_size)) { + png_error(png_ptr,"image_data buffer would be too large"); + } Remember: Before you call png_read_update_info(), the png_get_*() functions return the values corresponding to the original PNG image. @@ -2929,11 +2927,12 @@ separate. if (!end_info) { - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + png_destroy_read_struct(&png_ptr, &info_ptr, + (png_infopp)NULL); return ERROR; } - png_read_end(png_ptr, end_info); + png_read_end(png_ptr, end_info); If you are not interested, you should still call png_read_end() but you can pass NULL, avoiding the need to create an end_info structure. @@ -2941,7 +2940,7 @@ If you do this, libpng will not process any chunks after IDAT other than skipping over them and perhaps (depending on whether you have called png_set_crc_action) checking their CRCs while looking for the IEND chunk. - png_read_end(png_ptr, NULL); + png_read_end(png_ptr, (png_infop)NULL); If you don't call png_read_end(), then your file pointer will be left pointing to the first chunk after the last IDAT, which is probably @@ -2950,11 +2949,13 @@ the PNG datastream. When you are done, you can free all memory allocated by libpng like this: - png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); + png_destroy_read_struct(&png_ptr, &info_ptr, + &end_info); or, if you didn't create an end_info structure, - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + png_destroy_read_struct(&png_ptr, &info_ptr, + (png_infopp)NULL); It is also possible to individually free the info_ptr members that point to libpng-allocated storage with the following function: @@ -3074,13 +3075,15 @@ png_infop info_ptr; if (!info_ptr) { - png_destroy_read_struct(&png_ptr, NULL, NULL); + png_destroy_read_struct(&png_ptr, + (png_infopp)NULL, (png_infopp)NULL); return ERROR; } if (setjmp(png_jmpbuf(png_ptr))) { - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + png_destroy_read_struct(&png_ptr, &info_ptr, + (png_infopp)NULL); return ERROR; } @@ -3113,7 +3116,8 @@ png_infop info_ptr; { if (setjmp(png_jmpbuf(png_ptr))) { - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + png_destroy_read_struct(&png_ptr, &info_ptr, + (png_infopp)NULL); return ERROR; } @@ -3278,7 +3282,8 @@ both "png_ptr"; you can call them anything you like, such as png_infop info_ptr = png_create_info_struct(png_ptr); if (!info_ptr) { - png_destroy_write_struct(&png_ptr, NULL); + png_destroy_write_struct(&png_ptr, + (png_infopp)NULL); return ERROR; } @@ -3304,7 +3309,7 @@ section below for more information on the libpng error handling. if (setjmp(png_jmpbuf(png_ptr))) { - png_destroy_write_struct(&png_ptr, &info_ptr); + png_destroy_write_struct(&png_ptr, &info_ptr); fclose(fp); return ERROR; } @@ -3358,9 +3363,9 @@ a progress meter or the like. It's demonstrated in pngtest.c. You must supply a function void write_row_callback(png_structp png_ptr, png_uint_32 row, - int pass) + int pass); { - /* put your code here */ + /* put your code here */ } (You can give it another name that you like instead of "write_row_callback") @@ -3630,8 +3635,8 @@ width, height, bit_depth, and color_type must be the same in each call. png_set_eXIf_1(png_ptr, info_ptr, num_exif, exif); - exif - Exif profile (array of png_byte) - (PNG_INFO_eXIf) + exif - Exif profile (array of + png_byte) (PNG_INFO_eXIf) png_set_hIST(png_ptr, info_ptr, hist); @@ -3641,12 +3646,12 @@ width, height, bit_depth, and color_type must be the same in each call. png_set_tIME(png_ptr, info_ptr, mod_time); mod_time - time image was last modified - (PNG_INFO_tIME) + (PNG_VALID_tIME) png_set_bKGD(png_ptr, info_ptr, background); background - background color (of type - png_color_16p) (PNG_INFO_bKGD) + png_color_16p) (PNG_VALID_bKGD) png_set_text(png_ptr, info_ptr, text_ptr, num_text); @@ -3874,6 +3879,19 @@ Here is an example of writing two private chunks, prVt and miNE: /* Needed because miNE is not safe-to-copy */ png_set_keep_unknown_chunks(png, PNG_HANDLE_CHUNK_ALWAYS, (png_bytep) "miNE", 1); + # if PNG_LIBPNG_VER < 10600 + /* Deal with unknown chunk location bug in 1.5.x and earlier */ + png_set_unknown_chunk_location(png, info, 0, PNG_HAVE_IHDR); + png_set_unknown_chunk_location(png, info, 1, PNG_AFTER_IDAT); + # endif + # if PNG_LIBPNG_VER < 10500 + /* PNG_AFTER_IDAT writes two copies of the chunk prior to libpng-1.5.0, + * one before IDAT and another after IDAT, so don't use it; only use + * PNG_HAVE_IHDR location. This call resets the location previously + * set by assignment and png_set_unknown_chunk_location() for chunk 1. + */ + png_set_unknown_chunk_location(png, info, 1, PNG_HAVE_IHDR); + # endif #endif .SS The high-level write interface @@ -4599,7 +4617,7 @@ READ APIs is filled in from the PNG header in the file. int png_image_begin_read_from_stdio (png_imagep image, - FILE *file) + FILE* file) The PNG header is read from the stdio FILE object. @@ -4674,7 +4692,7 @@ be written: int convert_to_8_bit, const void *buffer, png_int_32 row_stride, const void *colormap) - Write the image to the given FILE object. + Write the image to the given (FILE*). With all write APIs if image is in one of the linear formats with (png_uint_16) data then setting convert_to_8_bit will cause the output to be @@ -4719,7 +4737,7 @@ png_create_read_struct_2() or png_create_write_struct_2() to register your own functions as described above. These functions also provide a void pointer that can be retrieved via - mem_ptr = png_get_mem_ptr(png_ptr); + mem_ptr=png_get_mem_ptr(png_ptr); Your replacement memory functions must have prototypes as follows: @@ -5016,7 +5034,7 @@ When PNG_DEBUG is defined but is zero, the macros aren't defined, but you can still use PNG_DEBUG to control your own debugging: #ifdef PNG_DEBUG - fprintf(stderr, ...); + fprintf(stderr, ... #endif When PNG_DEBUG = 1, the macros are defined, but only png_debug statements @@ -5193,7 +5211,7 @@ deprecated since libpng-1.0.16 and libpng-1.2.6. The function png_check_sig(sig, num) was replaced with - png_sig_cmp(sig, 0, num) == 0 + !png_sig_cmp(sig, 0, num) It has been deprecated since libpng-0.90. The function @@ -5257,8 +5275,8 @@ png_get_mmx_bitdepth_threshold(), png_get_mmx_rowbytes_threshold(), png_set_asm_flags(), and png_mmx_supported() We removed the obsolete png_check_sig(), png_memcpy_check(), and -png_memset_check() functions. Instead use png_sig_cmp() == 0, -memcpy(), and memset(), respectively. +png_memset_check() functions. Instead use !png_sig_cmp(), memcpy(), +and memset(), respectively. The function png_set_gray_1_2_4_to_8() was removed. It has been deprecated since libpng-1.0.18 and 1.2.9, when it was replaced with @@ -5683,7 +5701,7 @@ a pre-existing bug where the per-chunk 'keep' setting is ignored, and makes it possible to skip IDAT chunks in the sequential reader. The machine-generated configure files are no longer included in branches -libpng17 and later of the GIT repository. They continue to be included +libpng16 and later of the GIT repository. They continue to be included in the tarball releases, however. Libpng-1.6.0 through 1.6.2 used the CMF bytes at the beginning of the IDAT @@ -5740,7 +5758,7 @@ changed, and is unaffected by conditional compilation macros. It is the best choice for use in configure scripts for detecting the presence of any libpng version since 0.88. In an autoconf "configure.in" you could use - AC_CHECK_LIB(png, png_get_io_ptr, ...) + AC_CHECK_LIB(png, png_get_io_ptr, ... .SH XV. Source code repository @@ -5749,12 +5767,12 @@ control. The git repository was built from old libpng-x.y.z.tar.gz files going back to version 0.70. You can access the git repository (read only) at - https://github.com/pnggroup/libpng or + https://github.com/glennrp/libpng or https://git.code.sf.net/p/libpng/code.git or you can browse it with a web browser at - https://github.com/pnggroup/libpng or + https://github.com/glennrp/libpng or https://sourceforge.net/p/libpng/code/ci/libpng16/tree/ Patches can be sent to png-mng-implement at lists.sourceforge.net or @@ -5764,7 +5782,7 @@ uploaded to the libpng bug tracker at or as a "pull request" to - https://github.com/pnggroup/libpng/pulls + https://github.com/glennrp/libpng/pulls We also accept patches built from the tar or zip distributions, and simple verbal descriptions of bug fixes, reported either to the @@ -5977,25 +5995,35 @@ letter, until version 1.0.6j; from then on they were given the upcoming public release number plus "betaNN" or "rcNN". .SH "SEE ALSO" -.BR "png"(5) -.IP -The PNG (Portable Network Graphics) format specification. +.IR libpngpf(3) ", " png(5) .LP -.B libpng +.IR libpng : .IP -http://www.libpng.org/pub/png/libpng.html (canonical home page) -.br -https://github.com/pnggroup/libpng (canonical Git repository) -.br -https://libpng.sourceforge.io (downloadable archives) +https://libpng.sourceforge.io/ (follow the [DOWNLOAD] link) +http://www.libpng.org/pub/png + .LP -.B zlib +.IR zlib : .IP -https://zlib.net (canonical home page) +(generally) at the same location as +.I libpng +or at .br -https://github.com/madler/zlib (canonical Git repository) +https://zlib.net/ + +.LP +.IR PNG specification: RFC 2083 +.IP +(generally) at the same location as +.I libpng +or at .br -A copy of zlib may also be found at the same location as libpng. +https://www.ietf.org/rfc/rfc2083.txt +.br +or (as a W3C Recommendation) at +.br +https://www.w3.org/TR/REC-png.html + .LP In the case of any inconsistency between the PNG specification and this library, the specification takes precedence. @@ -6015,10 +6043,10 @@ Libpng: Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc. Maintained by Cosmin Truta. -Supported by the PNG development group. +Supported by the PNG development group .br -png-mng-implement at lists.sourceforge.net. (Subscription is required; -visit https://lists.sourceforge.net/lists/listinfo/png-mng-implement -to subscribe.) +png-mng-implement at lists.sourceforge.net (subscription required; visit +https://lists.sourceforge.net/lists/listinfo/png-mng-implement +to subscribe). .\" end of man page diff --git a/Engine/lib/lpng/libpng.pc.in b/Engine/lib/lpng/libpng.pc.in index de127d4f8..9708e9af2 100644 --- a/Engine/lib/lpng/libpng.pc.in +++ b/Engine/lib/lpng/libpng.pc.in @@ -6,7 +6,7 @@ includedir=@includedir@/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ Name: libpng Description: Loads and saves PNG files Version: @PNGLIB_VERSION@ -Requires.private: zlib +Requires: zlib Libs: -L${libdir} -lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ Libs.private: @LIBS@ Cflags: -I${includedir} diff --git a/Engine/lib/lpng/libpngpf.3 b/Engine/lib/lpng/libpngpf.3 index a1591ee36..6909c70a3 100644 --- a/Engine/lib/lpng/libpngpf.3 +++ b/Engine/lib/lpng/libpngpf.3 @@ -1,17 +1,24 @@ -.TH LIBPNGPF 3 "December 3, 2025" +.TH LIBPNGPF 3 "April 14, 2019" .SH NAME -libpng \- Portable Network Graphics (PNG) Reference Library 1.6.52 +libpng \- Portable Network Graphics (PNG) Reference Library 1.6.37 +(private functions) .SH SYNOPSIS -\fB#include "pngpriv.h"\fP +\fB#include \fI"pngpriv.h" + +\fBAs of libpng version \fP\fI1.5.1\fP\fB, this section is no longer +\fP\fImaintained\fP\fB, now that the private function prototypes are hidden in +\fP\fIpngpriv.h\fP\fB and not accessible to applications. Look in +\fP\fIpngpriv.h\fP\fB for the prototypes and a short description of each +function. .SH DESCRIPTION -As of libpng version 1.5.1, this manual is no longer maintained. The private -function prototypes, declared in private header files, should not be accessed -by applications. +The functions previously listed here are used privately by libpng and are not +available for use by applications. They are not "exported" to applications +using shared libraries. .SH "SEE ALSO" -.BR "libpng"(3) +.BR "png"(5), " libpng"(3), " zlib"(3), " deflate"(5), " " and " zlib"(5) .SH AUTHORS Cosmin Truta, Glenn Randers-Pehrson diff --git a/Engine/lib/lpng/loongarch/.editorconfig b/Engine/lib/lpng/loongarch/.editorconfig deleted file mode 100644 index de2e98ab4..000000000 --- a/Engine/lib/lpng/loongarch/.editorconfig +++ /dev/null @@ -1,8 +0,0 @@ -# https://editorconfig.org - -root = false - -# FIXME -[*.[ch]] -max_doc_length = unset -max_line_length = unset diff --git a/Engine/lib/lpng/loongarch/filter_lsx_intrinsics.c b/Engine/lib/lpng/loongarch/filter_lsx_intrinsics.c deleted file mode 100644 index af6cc763a..000000000 --- a/Engine/lib/lpng/loongarch/filter_lsx_intrinsics.c +++ /dev/null @@ -1,412 +0,0 @@ -/* filter_lsx_intrinsics.c - LSX optimized filter functions - * - * Copyright (c) 2021 Loongson Technology Corporation Limited - * All rights reserved. - * Copyright (c) 2018 Cosmin Truta - * Copyright (c) 2016 Glenn Randers-Pehrson - * Contributed by Jin Bo (jinbo@loongson.cn) - * - * This code is released under the libpng license. - * For conditions of distribution and use, see the disclaimer - * and license in png.h - */ - -#include "../pngpriv.h" - -#ifdef PNG_READ_SUPPORTED - -#if PNG_LOONGARCH_LSX_IMPLEMENTATION == 1 /* intrinsics code from pngpriv.h */ - -#include - -#define LSX_LD(psrc) __lsx_vld((psrc), 0) - -#define LSX_LD_2(psrc, stride, out0, out1) \ -{ \ - out0 = LSX_LD(psrc); \ - out1 = LSX_LD(psrc + stride); \ -} - -#define LSX_LD_4(psrc, stride, out0, out1, out2, out3) \ -{ \ - LSX_LD_2(psrc, stride, out0, out1); \ - LSX_LD_2(psrc + stride * 2, stride, out2, out3); \ -} - -#define LSX_ST(in, pdst) __lsx_vst(in, (pdst), 0) - -#define LSX_ST_2(in0, in1, pdst, stride) \ -{ \ - LSX_ST(in0, pdst); \ - LSX_ST(in1, pdst + stride); \ -} - -#define LSX_ST_4(in0, in1, in2, in3, pdst, stride) \ -{ \ - LSX_ST_2(in0, in1, pdst, stride); \ - LSX_ST_2(in2, in3, pdst + stride * 2, stride); \ -} - -#define LSX_ADD_B(in0, in1, out0) \ -{ \ - out0 = __lsx_vadd_b(in0, in1); \ -} - -#define LSX_ADD_B_2(in0, in1, in2, in3, out0, out1) \ -{ \ - LSX_ADD_B(in0, in1, out0); \ - LSX_ADD_B(in2, in3, out1); \ -} - -#define LSX_ADD_B_4(in0, in1, in2, in3, in4, in5, \ - in6, in7, out0, out1, out2, out3) \ -{ \ - LSX_ADD_B_2(in0, in1, in2, in3, out0, out1); \ - LSX_ADD_B_2(in4, in5, in6, in7, out2, out3); \ -} - -#define LSX_ABS_B_3(in0, in1, in2, out0, out1, out2) \ -{ \ - out0 = __lsx_vadda_h(in0, zero); \ - out1 = __lsx_vadda_h(in1, zero); \ - out2 = __lsx_vadda_h(in2, zero); \ -} - -#define LSX_ILVL_B(in_h, in_l, out0) \ -{ \ - out0 = __lsx_vilvl_b(in_h, in_l); \ -} - -#define LSX_ILVL_B_2(in0_h, in0_l, in1_h, in1_l, out0, out1) \ -{ \ - LSX_ILVL_B(in0_h, in0_l, out0); \ - LSX_ILVL_B(in1_h, in1_l, out1); \ -} - -#define LSX_HSUB_HU_BU_2(in0, in1, out0, out1) \ -{ \ - out0 = __lsx_vhsubw_hu_bu(in0, in0); \ - out1 = __lsx_vhsubw_hu_bu(in1, in1); \ -} - -#define LSX_CMP_PICK_SMALLER(in0, in1, in2, in3, in4, in5, out0) \ -{ \ - __m128i _cmph, _cmpb, _in0, _in3; \ - _cmph = __lsx_vslt_h(in1, in0); \ - _cmpb = __lsx_vpickev_b(_cmph, _cmph); \ - _in0 = __lsx_vmin_bu(in0,in1); \ - _in3 = __lsx_vbitsel_v(in3, in4, _cmpb); \ - _cmph = __lsx_vslt_h(in2, _in0); \ - _cmpb = __lsx_vpickev_b(_cmph, _cmph); \ - _in3 = __lsx_vbitsel_v(_in3, in5, _cmpb); \ - out0 = __lsx_vadd_b(out0, _in3); \ -} - -void png_read_filter_row_up_lsx(png_row_infop row_info, png_bytep row, - png_const_bytep prev_row) -{ - size_t n = row_info->rowbytes; - png_bytep rp = row; - png_const_bytep pp = prev_row; - __m128i vec_0, vec_1, vec_2, vec_3; - __m128i vec_4, vec_5, vec_6, vec_7; - - while (n >= 64) - { - LSX_LD_4(rp, 16, vec_0, vec_1, vec_2, vec_3); - LSX_LD_4(pp, 16, vec_4, vec_5, vec_6, vec_7); - pp += 64; - LSX_ADD_B_4(vec_0 ,vec_4, vec_1, vec_5, vec_2, vec_6, - vec_3, vec_7, vec_0, vec_1, vec_2, vec_3); - LSX_ST_4(vec_0, vec_1, vec_2, vec_3, rp, 16); - rp += 64; - n -= 64; - } - if (n & 63) - { - if (n >= 32) - { - LSX_LD_2(rp, 16, vec_0, vec_1); - LSX_LD_2(pp, 16, vec_2, vec_3); - pp += 32; - LSX_ADD_B_2(vec_0, vec_2, vec_1, vec_3, vec_0, vec_1); - LSX_ST_2(vec_0, vec_1, rp, 16); - rp += 32; - n -= 32; - } - if (n & 31) - { - if (n >= 16) - { - vec_0 = LSX_LD(rp); - vec_1 = LSX_LD(pp); - pp += 16; - LSX_ADD_B(vec_0, vec_1, vec_0); - LSX_ST(vec_0, rp); - rp += 16; - n -= 16; - } - if (n >= 8) - { - vec_0 = __lsx_vldrepl_d(rp, 0); - vec_1 = __lsx_vldrepl_d(pp, 0); - vec_0 = __lsx_vadd_b(vec_0, vec_1); - __lsx_vstelm_d(vec_0, rp, 0, 0); - rp += 8; - pp += 8; - n -= 8; - } - while (n--) - { - *rp = *rp + *pp++; - rp++; - } - } - } -} - -void png_read_filter_row_sub3_lsx(png_row_infop row_info, png_bytep row, - png_const_bytep prev_row) -{ - size_t n = row_info->rowbytes; - png_uint_32 tmp; - png_bytep nxt = row; - __m128i vec_0, vec_1; - - PNG_UNUSED(prev_row); - - vec_0 = __lsx_vldrepl_w(nxt, 0); - nxt += 3; - n -= 3; - - while (n >= 3) - { - vec_1 = __lsx_vldrepl_w(nxt, 0); - vec_1 = __lsx_vadd_b(vec_1, vec_0); - __lsx_vstelm_h(vec_1, nxt, 0, 0); - vec_0 = vec_1; - nxt += 2; - __lsx_vstelm_b(vec_1, nxt, 0, 2); - nxt += 1; - n -= 3; - } - - row = nxt - 3; - while (n--) - { - *nxt = *nxt + *row++; - nxt++; - } -} - -void png_read_filter_row_sub4_lsx(png_row_infop row_info, png_bytep row, - png_const_bytep prev_row) -{ - size_t n = row_info->rowbytes; - __m128i vec_0, vec_1; - - PNG_UNUSED(prev_row); - - vec_0 = __lsx_vldrepl_w(row, 0); - row += 4; - n -= 4; - - while (n >= 4) - { - vec_1 = __lsx_vldrepl_w(row, 0); - vec_1 = __lsx_vadd_b(vec_1, vec_0); - __lsx_vstelm_w(vec_1, row, 0, 0); - vec_0 = vec_1; - row += 4; - n -= 4; - } -} - -void png_read_filter_row_avg3_lsx(png_row_infop row_info, png_bytep row, - png_const_bytep prev_row) -{ - size_t n = row_info->rowbytes; - png_bytep nxt = row; - png_const_bytep prev_nxt = prev_row; - __m128i vec_0, vec_1, vec_2; - - vec_0 = __lsx_vldrepl_w(nxt, 0); - vec_1 = __lsx_vldrepl_w(prev_nxt, 0); - prev_nxt += 3; - vec_1 = __lsx_vsrli_b(vec_1, 1); - vec_1 = __lsx_vadd_b(vec_1, vec_0); - __lsx_vstelm_h(vec_1, nxt, 0, 0); - nxt += 2; - __lsx_vstelm_b(vec_1, nxt, 0, 2); - nxt += 1; - n -= 3; - - while (n >= 3) - { - vec_2 = vec_1; - vec_0 = __lsx_vldrepl_w(nxt, 0); - vec_1 = __lsx_vldrepl_w(prev_nxt, 0); - prev_nxt += 3; - - vec_1 = __lsx_vavg_bu(vec_1, vec_2); - vec_1 = __lsx_vadd_b(vec_1, vec_0); - - __lsx_vstelm_h(vec_1, nxt, 0, 0); - nxt += 2; - __lsx_vstelm_b(vec_1, nxt, 0, 2); - nxt += 1; - n -= 3; - } - - row = nxt - 3; - while (n--) - { - vec_2 = __lsx_vldrepl_b(row, 0); - row++; - vec_0 = __lsx_vldrepl_b(nxt, 0); - vec_1 = __lsx_vldrepl_b(prev_nxt, 0); - prev_nxt++; - - vec_1 = __lsx_vavg_bu(vec_1, vec_2); - vec_1 = __lsx_vadd_b(vec_1, vec_0); - - __lsx_vstelm_b(vec_1, nxt, 0, 0); - nxt++; - } -} - -void png_read_filter_row_avg4_lsx(png_row_infop row_info, png_bytep row, - png_const_bytep prev_row) -{ - size_t n = row_info->rowbytes; - __m128i vec_0, vec_1, vec_2; - - vec_0 = __lsx_vldrepl_w(row, 0); - vec_1 = __lsx_vldrepl_w(prev_row, 0); - prev_row += 4; - vec_1 = __lsx_vsrli_b(vec_1, 1); - vec_1 = __lsx_vadd_b(vec_1, vec_0); - __lsx_vstelm_w(vec_1, row, 0, 0); - row += 4; - n -= 4; - - while (n >= 4) - { - vec_2 = vec_1; - vec_0 = __lsx_vldrepl_w(row, 0); - vec_1 = __lsx_vldrepl_w(prev_row, 0); - prev_row += 4; - - vec_1 = __lsx_vavg_bu(vec_1, vec_2); - vec_1 = __lsx_vadd_b(vec_1, vec_0); - - __lsx_vstelm_w(vec_1, row, 0, 0); - row += 4; - n -= 4; - } -} - -void png_read_filter_row_paeth3_lsx(png_row_infop row_info, - png_bytep row, - png_const_bytep prev_row) -{ - size_t n = row_info->rowbytes; - png_bytep nxt = row; - png_const_bytep prev_nxt = prev_row; - __m128i vec_a, vec_b, vec_c, vec_d; - __m128i vec_pa, vec_pb, vec_pc; - __m128i zero = {0}; - - vec_a = __lsx_vldrepl_w(nxt, 0); - vec_b = __lsx_vldrepl_w(prev_nxt, 0); - prev_nxt += 3; - vec_d = __lsx_vadd_b(vec_a, vec_b); - __lsx_vstelm_h(vec_d, nxt, 0, 0); - nxt += 2; - __lsx_vstelm_b(vec_d, nxt, 0, 2); - nxt += 1; - n -= 3; - - while (n >= 3) - { - vec_a = vec_d; - vec_c = vec_b; - vec_b = __lsx_vldrepl_w(prev_nxt, 0); - prev_nxt += 3; - vec_d = __lsx_vldrepl_w(nxt, 0); - - LSX_ILVL_B_2(vec_b, vec_c, vec_a, vec_c, vec_pa, vec_pb); - LSX_HSUB_HU_BU_2(vec_pa, vec_pb, vec_pa, vec_pb); - vec_pc = __lsx_vadd_h(vec_pa, vec_pb); - LSX_ABS_B_3(vec_pa, vec_pb, vec_pc, vec_pa, vec_pb, vec_pc); - LSX_CMP_PICK_SMALLER(vec_pa, vec_pb, vec_pc, vec_a, vec_b, vec_c, vec_d); - - __lsx_vstelm_h(vec_d, nxt, 0, 0); - nxt += 2; - __lsx_vstelm_b(vec_d, nxt, 0, 2); - nxt += 1; - n -= 3; - } - - prev_row = prev_nxt - 3; - row = nxt - 3; - while (n--) - { - vec_a = __lsx_vldrepl_b(row, 0); - row++; - vec_b = __lsx_vldrepl_b(prev_nxt, 0); - prev_nxt++; - vec_c = __lsx_vldrepl_b(prev_row, 0); - prev_row++; - vec_d = __lsx_vldrepl_b(nxt, 0); - - LSX_ILVL_B_2(vec_b, vec_c, vec_a, vec_c, vec_pa, vec_pb); - LSX_HSUB_HU_BU_2(vec_pa, vec_pb, vec_pa, vec_pb); - vec_pc = __lsx_vadd_h(vec_pa, vec_pb); - LSX_ABS_B_3(vec_pa, vec_pb, vec_pc, vec_pa, vec_pb, vec_pc); - LSX_CMP_PICK_SMALLER(vec_pa, vec_pb, vec_pc, vec_a, vec_b, vec_c, vec_d); - - __lsx_vstelm_b(vec_d, nxt, 0, 0); - nxt++; - } -} - -void png_read_filter_row_paeth4_lsx(png_row_infop row_info, - png_bytep row, - png_const_bytep prev_row) -{ - size_t n = row_info->rowbytes; - __m128i vec_a, vec_b, vec_c, vec_d; - __m128i vec_pa, vec_pb, vec_pc; - __m128i zero = {0}; - - vec_a = __lsx_vldrepl_w(row, 0); - vec_b = __lsx_vldrepl_w(prev_row, 0); - prev_row += 4; - vec_d = __lsx_vadd_b(vec_a, vec_b); - __lsx_vstelm_w(vec_d, row, 0, 0); - row += 4; - n -= 4; - - while (n >= 4) - { - vec_a = vec_d; - vec_c = vec_b; - vec_b = __lsx_vldrepl_w(prev_row, 0); - prev_row += 4; - vec_d = __lsx_vldrepl_w(row, 0); - - LSX_ILVL_B_2(vec_b, vec_c, vec_a, vec_c, vec_pa, vec_pb); - LSX_HSUB_HU_BU_2(vec_pa, vec_pb, vec_pa, vec_pb); - vec_pc = __lsx_vadd_h(vec_pa, vec_pb); - LSX_ABS_B_3(vec_pa, vec_pb, vec_pc, vec_pa, vec_pb, vec_pc); - LSX_CMP_PICK_SMALLER(vec_pa, vec_pb, vec_pc, vec_a, vec_b, vec_c, vec_d); - - __lsx_vstelm_w(vec_d, row, 0, 0); - row += 4; - n -= 4; - } -} - -#endif /* PNG_LOONGARCH_LSX_IMPLEMENTATION == 1 (intrinsics) */ -#endif /* PNG_READ_SUPPORTED */ diff --git a/Engine/lib/lpng/loongarch/loongarch_lsx_init.c b/Engine/lib/lpng/loongarch/loongarch_lsx_init.c deleted file mode 100644 index 2c80fe81b..000000000 --- a/Engine/lib/lpng/loongarch/loongarch_lsx_init.c +++ /dev/null @@ -1,65 +0,0 @@ -/* loongarch_lsx_init.c - LSX optimized filter functions - * - * Copyright (c) 2021 Loongson Technology Corporation Limited - * All rights reserved. - * Contributed by Jin Bo - * - * This code is released under the libpng license. - * For conditions of distribution and use, see the disclaimer - * and license in png.h - */ - -#include "../pngpriv.h" - -#ifdef PNG_READ_SUPPORTED -#if PNG_LOONGARCH_LSX_IMPLEMENTATION == 1 - -#include - -#define LA_HWCAP_LSX (1<<4) -static int png_has_lsx(void) -{ - int flags = 0; - int flag = (int)getauxval(AT_HWCAP); - - if (flag & LA_HWCAP_LSX) - return 1; - - return 0; -} - -void -png_init_filter_functions_lsx(png_structp pp, unsigned int bpp) -{ - /* IMPORTANT: any new external functions used here must be declared using - * PNG_INTERNAL_FUNCTION in ../pngpriv.h. This is required so that the - * 'prefix' option to configure works: - * - * ./configure --with-libpng-prefix=foobar_ - * - * Verify you have got this right by running the above command, doing a build - * and examining pngprefix.h; it must contain a #define for every external - * function you add. (Notice that this happens automatically for the - * initialization function.) - */ - - if (png_has_lsx()) - { - pp->read_filter[PNG_FILTER_VALUE_UP-1] = png_read_filter_row_up_lsx; - if (bpp == 3) - { - pp->read_filter[PNG_FILTER_VALUE_SUB-1] = png_read_filter_row_sub3_lsx; - pp->read_filter[PNG_FILTER_VALUE_AVG-1] = png_read_filter_row_avg3_lsx; - pp->read_filter[PNG_FILTER_VALUE_PAETH-1] = png_read_filter_row_paeth3_lsx; - } - else if (bpp == 4) - { - pp->read_filter[PNG_FILTER_VALUE_SUB-1] = png_read_filter_row_sub4_lsx; - pp->read_filter[PNG_FILTER_VALUE_AVG-1] = png_read_filter_row_avg4_lsx; - pp->read_filter[PNG_FILTER_VALUE_PAETH-1] = png_read_filter_row_paeth4_lsx; - } - } -} - -#endif /* PNG_LOONGARCH_LSX_IMPLEMENTATION == 1 */ -#endif /* PNG_READ_SUPPORTED */ diff --git a/Engine/lib/lpng/ltmain.sh b/Engine/lib/lpng/ltmain.sh index 3e6a3db3a..0f0a2da3f 100644 --- a/Engine/lib/lpng/ltmain.sh +++ b/Engine/lib/lpng/ltmain.sh @@ -1,12 +1,12 @@ -#! /usr/bin/env sh +#! /bin/sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in -## by inline-source v2019-02-19.15 +## by inline-source v2014-01-03.01 -# libtool (GNU libtool) 2.5.4 +# libtool (GNU libtool) 2.4.6 # Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 -# Copyright (C) 1996-2019, 2021-2024 Free Software Foundation, Inc. +# Copyright (C) 1996-2015 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -31,8 +31,8 @@ PROGRAM=libtool PACKAGE=libtool -VERSION=2.5.4 -package_revision=2.5.4 +VERSION=2.4.6 +package_revision=2.4.6 ## ------ ## @@ -64,25 +64,34 @@ package_revision=2.5.4 # libraries, which are installed to $pkgauxdir. # Set a version string for this script. -scriptversion=2019-02-19.15; # UTC +scriptversion=2015-01-20.17; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 -# This is free software. There is NO warranty; not even for -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# -# Copyright (C) 2004-2019, 2021, 2023-2024 Bootstrap Authors -# -# This file is dual licensed under the terms of the MIT license -# , and GPL version 2 or later -# . You must apply one of -# these licenses when using or redistributing this software or any of -# the files within it. See the URLs above, or the file `LICENSE` -# included in the Bootstrap distribution for the full license texts. +# Copyright (C) 2004-2015 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# Please report bugs or propose patches to: -# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. + +# As a special exception to the GNU General Public License, if you distribute +# this file as part of a program or library that is built using GNU Libtool, +# you may include this file under the same distribution terms that you use +# for the rest of that program. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Please report bugs or propose patches to gary@gnu.org. ## ------ ## @@ -130,12 +139,9 @@ do _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done -# These NLS vars are set unconditionally (bootstrap issue #24). Unset those -# in case the environment reset is needed later and the $save_* variant is not -# defined (see the code above). -LC_ALL=C -LANGUAGE=C -export LANGUAGE LC_ALL + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Make sure IFS has a sensible default sp=' ' @@ -143,7 +149,7 @@ nl=' ' IFS="$sp $nl" -# There are apparently some systems that use ';' as a PATH separator! +# There are apparently some retarded systems that use ';' as a PATH separator! if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { @@ -153,26 +159,6 @@ if test "${PATH_SEPARATOR+set}" != set; then fi -# func_unset VAR -# -------------- -# Portably unset VAR. -# In some shells, an 'unset VAR' statement leaves a non-zero return -# status if VAR is already unset, which might be problematic if the -# statement is used at the end of a function (thus poisoning its return -# value) or when 'set -e' is active (causing even a spurious abort of -# the script in this case). -func_unset () -{ - { eval $1=; (eval unset $1) >/dev/null 2>&1 && eval unset $1 || : ; } -} - - -# Make sure CDPATH doesn't cause `cd` commands to output the target dir. -func_unset CDPATH - -# Make sure ${,E,F}GREP behave sanely. -func_unset GREP_OPTIONS - ## ------------------------- ## ## Locate command utilities. ## @@ -273,7 +259,7 @@ test -z "$SED" && { rm -f conftest.in conftest.tmp conftest.nl conftest.out } - func_path_progs "sed gsed" func_check_prog_sed "$PATH:/usr/xpg4/bin" + func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin rm -f conftest.sed SED=$func_path_progs_result } @@ -309,7 +295,7 @@ test -z "$GREP" && { rm -f conftest.in conftest.tmp conftest.nl conftest.out } - func_path_progs "grep ggrep" func_check_prog_grep "$PATH:/usr/xpg4/bin" + func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin GREP=$func_path_progs_result } @@ -374,35 +360,6 @@ sed_double_backslash="\ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" -# require_check_ifs_backslash -# --------------------------- -# Check if we can use backslash as IFS='\' separator, and set -# $check_ifs_backshlash_broken to ':' or 'false'. -require_check_ifs_backslash=func_require_check_ifs_backslash -func_require_check_ifs_backslash () -{ - _G_save_IFS=$IFS - IFS='\' - _G_check_ifs_backshlash='a\\b' - for _G_i in $_G_check_ifs_backshlash - do - case $_G_i in - a) - check_ifs_backshlash_broken=false - ;; - '') - break - ;; - *) - check_ifs_backshlash_broken=: - break - ;; - esac - done - IFS=$_G_save_IFS - require_check_ifs_backslash=: -} - ## ----------------- ## ## Global variables. ## @@ -589,7 +546,7 @@ func_require_term_colors () # _G_HAVE_PLUSEQ_OP # Can be empty, in which case the shell is probed, "yes" if += is - # usable or anything else if it does not work. + # useable or anything else if it does not work. test -z "$_G_HAVE_PLUSEQ_OP" \ && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ && _G_HAVE_PLUSEQ_OP=yes @@ -623,16 +580,16 @@ if test yes = "$_G_HAVE_PLUSEQ_OP"; then { $debug_cmd - func_quote_arg pretty "$2" - eval "$1+=\\ \$func_quote_arg_result" + func_quote_for_eval "$2" + eval "$1+=\\ \$func_quote_for_eval_result" }' else func_append_quoted () { $debug_cmd - func_quote_arg pretty "$2" - eval "$1=\$$1\\ \$func_quote_arg_result" + func_quote_for_eval "$2" + eval "$1=\$$1\\ \$func_quote_for_eval_result" } fi @@ -739,7 +696,7 @@ eval 'func_dirname () # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. -# value returned in "$func_basename_result" +# value retuned in "$func_basename_result" # For efficiency, we do not delegate to the functions above but instead # duplicate the functionality here. eval 'func_dirname_and_basename () @@ -897,7 +854,7 @@ func_mkdir_p () # While some portion of DIR does not yet exist... while test ! -d "$_G_directory_path"; do # ...make a list in topmost first order. Use a colon delimited - # list in case some portion of path contains whitespace. + # list incase some portion of path contains whitespace. _G_dir_list=$_G_directory_path:$_G_dir_list # If the last portion added has no slash in it, the list is done @@ -1134,206 +1091,88 @@ func_relative_path () } -# func_quote_portable EVAL ARG -# ---------------------------- -# Internal function to portably implement func_quote_arg. Note that we still -# keep attention to performance here so we as much as possible try to avoid -# calling sed binary (so far O(N) complexity as long as func_append is O(1)). -func_quote_portable () +# func_quote_for_eval ARG... +# -------------------------- +# Aesthetically quote ARGs to be evaled later. +# This function returns two values: +# i) func_quote_for_eval_result +# double-quoted, suitable for a subsequent eval +# ii) func_quote_for_eval_unquoted_result +# has all characters that are still active within double +# quotes backslashified. +func_quote_for_eval () { $debug_cmd - $require_check_ifs_backslash - - func_quote_portable_result=$2 - - # one-time-loop (easy break) - while true - do - if $1; then - func_quote_portable_result=`$ECHO "$2" | $SED \ - -e "$sed_double_quote_subst" -e "$sed_double_backslash"` - break + func_quote_for_eval_unquoted_result= + func_quote_for_eval_result= + while test 0 -lt $#; do + case $1 in + *[\\\`\"\$]*) + _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; + *) + _G_unquoted_arg=$1 ;; + esac + if test -n "$func_quote_for_eval_unquoted_result"; then + func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" + else + func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" fi - # Quote for eval. - case $func_quote_portable_result in - *[\\\`\"\$]*) - # Fallback to sed for $func_check_bs_ifs_broken=:, or when the string - # contains the shell wildcard characters. - case $check_ifs_backshlash_broken$func_quote_portable_result in - :*|*[\[\*\?]*) - func_quote_portable_result=`$ECHO "$func_quote_portable_result" \ - | $SED "$sed_quote_subst"` - break - ;; - esac - - func_quote_portable_old_IFS=$IFS - for _G_char in '\' '`' '"' '$' - do - # STATE($1) PREV($2) SEPARATOR($3) - set start "" "" - func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy - IFS=$_G_char - for _G_part in $func_quote_portable_result - do - case $1 in - quote) - func_append func_quote_portable_result "$3$2" - set quote "$_G_part" "\\$_G_char" - ;; - start) - set first "" "" - func_quote_portable_result= - ;; - first) - set quote "$_G_part" "" - ;; - esac - done - done - IFS=$func_quote_portable_old_IFS - ;; - *) ;; - esac - break - done - - func_quote_portable_unquoted_result=$func_quote_portable_result - case $func_quote_portable_result in - # double-quote args containing shell metacharacters to delay - # word splitting, command substitution and variable expansion - # for a subsequent eval. - # many bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - func_quote_portable_result=\"$func_quote_portable_result\" - ;; - esac -} - - -# func_quotefast_eval ARG -# ----------------------- -# Quote one ARG (internal). This is equivalent to 'func_quote_arg eval ARG', -# but optimized for speed. Result is stored in $func_quotefast_eval. -if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then - printf -v _GL_test_printf_tilde %q '~' - if test '\~' = "$_GL_test_printf_tilde"; then - func_quotefast_eval () - { - printf -v func_quotefast_eval_result %q "$1" - } - else - # Broken older Bash implementations. Make those faster too if possible. - func_quotefast_eval () - { - case $1 in - '~'*) - func_quote_portable false "$1" - func_quotefast_eval_result=$func_quote_portable_result + case $_G_unquoted_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting, command substitution and variable expansion + # for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + _G_quoted_arg=\"$_G_unquoted_arg\" ;; *) - printf -v func_quotefast_eval_result %q "$1" - ;; + _G_quoted_arg=$_G_unquoted_arg + ;; esac - } - fi -else - func_quotefast_eval () - { - func_quote_portable false "$1" - func_quotefast_eval_result=$func_quote_portable_result - } -fi - -# func_quote_arg MODEs ARG -# ------------------------ -# Quote one ARG to be evaled later. MODEs argument may contain zero or more -# specifiers listed below separated by ',' character. This function returns two -# values: -# i) func_quote_arg_result -# double-quoted (when needed), suitable for a subsequent eval -# ii) func_quote_arg_unquoted_result -# has all characters that are still active within double -# quotes backslashified. Available only if 'unquoted' is specified. -# -# Available modes: -# ---------------- -# 'eval' (default) -# - escape shell special characters -# 'expand' -# - the same as 'eval'; but do not quote variable references -# 'pretty' -# - request aesthetic output, i.e. '"a b"' instead of 'a\ b'. This might -# be used later in func_quote to get output like: 'echo "a b"' instead -# of 'echo a\ b'. This is slower than default on some shells. -# 'unquoted' -# - produce also $func_quote_arg_unquoted_result which does not contain -# wrapping double-quotes. -# -# Examples for 'func_quote_arg pretty,unquoted string': -# -# string | *_result | *_unquoted_result -# ------------+-----------------------+------------------- -# " | \" | \" -# a b | "a b" | a b -# "a b" | "\"a b\"" | \"a b\" -# * | "*" | * -# z="${x-$y}" | "z=\"\${x-\$y}\"" | z=\"\${x-\$y}\" -# -# Examples for 'func_quote_arg pretty,unquoted,expand string': -# -# string | *_result | *_unquoted_result -# --------------+---------------------+-------------------- -# z="${x-$y}" | "z=\"${x-$y}\"" | z=\"${x-$y}\" -func_quote_arg () -{ - _G_quote_expand=false - case ,$1, in - *,expand,*) - _G_quote_expand=: - ;; - esac - - case ,$1, in - *,pretty,*|*,expand,*|*,unquoted,*) - func_quote_portable $_G_quote_expand "$2" - func_quote_arg_result=$func_quote_portable_result - func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result - ;; - *) - # Faster quote-for-eval for some shells. - func_quotefast_eval "$2" - func_quote_arg_result=$func_quotefast_eval_result - ;; - esac -} - - -# func_quote MODEs ARGs... -# ------------------------ -# Quote all ARGs to be evaled later and join them into single command. See -# func_quote_arg's description for more info. -func_quote () -{ - $debug_cmd - _G_func_quote_mode=$1 ; shift - func_quote_result= - while test 0 -lt $#; do - func_quote_arg "$_G_func_quote_mode" "$1" - if test -n "$func_quote_result"; then - func_append func_quote_result " $func_quote_arg_result" + if test -n "$func_quote_for_eval_result"; then + func_append func_quote_for_eval_result " $_G_quoted_arg" else - func_append func_quote_result "$func_quote_arg_result" + func_append func_quote_for_eval_result "$_G_quoted_arg" fi shift done } +# func_quote_for_expand ARG +# ------------------------- +# Aesthetically quote ARG to be evaled later; same as above, +# but do not quote variable references. +func_quote_for_expand () +{ + $debug_cmd + + case $1 in + *[\\\`\"]*) + _G_arg=`$ECHO "$1" | $SED \ + -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; + *) + _G_arg=$1 ;; + esac + + case $_G_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting and command substitution for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + _G_arg=\"$_G_arg\" + ;; + esac + + func_quote_for_expand_result=$_G_arg +} + + # func_stripname PREFIX SUFFIX NAME # --------------------------------- # strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. @@ -1376,8 +1215,8 @@ func_show_eval () _G_cmd=$1 _G_fail_exp=${2-':'} - func_quote_arg pretty,expand "$_G_cmd" - eval "func_notquiet $func_quote_arg_result" + func_quote_for_expand "$_G_cmd" + eval "func_notquiet $func_quote_for_expand_result" $opt_dry_run || { eval "$_G_cmd" @@ -1402,8 +1241,8 @@ func_show_eval_locale () _G_fail_exp=${2-':'} $opt_quiet || { - func_quote_arg expand,pretty "$_G_cmd" - eval "func_echo $func_quote_arg_result" + func_quote_for_expand "$_G_cmd" + eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || { @@ -1530,26 +1369,30 @@ func_lt_ver () # End: #! /bin/sh +# Set a version string for this script. +scriptversion=2014-01-07.03; # UTC + # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 -# This is free software. There is NO warranty; not even for -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# -# Copyright (C) 2010-2019, 2021, 2023-2024 Bootstrap Authors -# -# This file is dual licensed under the terms of the MIT license -# , and GPL version 2 or later -# . You must apply one of -# these licenses when using or redistributing this software or any of -# the files within it. See the URLs above, or the file `LICENSE` -# included in the Bootstrap distribution for the full license texts. +# Copyright (C) 2010-2015 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# Please report bugs or propose patches to: -# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. -# Set a version string for this script. -scriptversion=2019-02-19.15; # UTC +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Please report bugs or propose patches to gary@gnu.org. ## ------ ## @@ -1572,7 +1415,7 @@ scriptversion=2019-02-19.15; # UTC # # In order for the '--version' option to work, you will need to have a # suitably formatted comment like the one at the top of this file -# starting with '# Written by ' and ending with '# Copyright'. +# starting with '# Written by ' and ending with '# warranty; '. # # For '-h' and '--help' to work, you will also need a one line # description of your script's purpose in a comment directly above the @@ -1584,7 +1427,7 @@ scriptversion=2019-02-19.15; # UTC # to display verbose messages only when your user has specified # '--verbose'. # -# After sourcing this file, you can plug in processing for additional +# After sourcing this file, you can plug processing for additional # options by amending the variables from the 'Configuration' section # below, and following the instructions in the 'Option parsing' # section further down. @@ -1633,8 +1476,8 @@ fatal_help="Try '\$progname --help' for more information." ## ------------------------- ## # This section contains functions for adding, removing, and running hooks -# in the main code. A hook is just a list of function names that can be -# run in order later on. +# to the main code. A hook is just a named list of of function, that can +# be run in order later on. # func_hookable FUNC_NAME # ----------------------- @@ -1667,8 +1510,7 @@ func_add_hook () # func_remove_hook FUNC_NAME HOOK_FUNC # ------------------------------------ -# Remove HOOK_FUNC from the list of hook functions to be called by -# FUNC_NAME. +# Remove HOOK_FUNC from the list of functions called by FUNC_NAME. func_remove_hook () { $debug_cmd @@ -1677,28 +1519,10 @@ func_remove_hook () } -# func_propagate_result FUNC_NAME_A FUNC_NAME_B -# --------------------------------------------- -# If the *_result variable of FUNC_NAME_A _is set_, assign its value to -# *_result variable of FUNC_NAME_B. -func_propagate_result () -{ - $debug_cmd - - func_propagate_result_result=: - if eval "test \"\${${1}_result+set}\" = set" - then - eval "${2}_result=\$${1}_result" - else - func_propagate_result_result=false - fi -} - - # func_run_hooks FUNC_NAME [ARG]... # --------------------------------- # Run all hook functions registered to FUNC_NAME. -# It's assumed that the list of hook functions contains nothing more +# It is assumed that the list of hook functions contains nothing more # than a whitespace-delimited list of legal shell function names, and # no effort is wasted trying to catch shell meta-characters or preserve # whitespace. @@ -1708,19 +1532,22 @@ func_run_hooks () case " $hookable_fns " in *" $1 "*) ;; - *) func_fatal_error "'$1' does not support hook functions." ;; + *) func_fatal_error "'$1' does not support hook funcions.n" ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do - func_unset "${_G_hook}_result" - eval $_G_hook '${1+"$@"}' - func_propagate_result $_G_hook func_run_hooks - if $func_propagate_result_result; then - eval set dummy "$func_run_hooks_result"; shift - fi + eval $_G_hook '"$@"' + + # store returned options list back into positional + # parameters for next 'cmd' execution. + eval _G_hook_result=\$${_G_hook}_result + eval set dummy "$_G_hook_result"; shift done + + func_quote_for_eval ${1+"$@"} + func_run_hooks_result=$func_quote_for_eval_result } @@ -1730,18 +1557,10 @@ func_run_hooks () ## --------------- ## # In order to add your own option parsing hooks, you must accept the -# full positional parameter list from your hook function. You may remove -# or edit any options that you action, and then pass back the remaining -# unprocessed options in '_result', escaped -# suitably for 'eval'. -# -# The '_result' variable is automatically unset -# before your hook gets called; for best performance, only set the -# *_result variable when necessary (i.e. don't call the 'func_quote' -# function unnecessarily because it can be an expensive operation on some -# machines). -# -# Like this: +# full positional parameter list in your hook function, remove any +# options that you action, and then pass back the remaining unprocessed +# options in '_result', escaped suitably for +# 'eval'. Like this: # # my_options_prep () # { @@ -1751,8 +1570,9 @@ func_run_hooks () # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' -# # No change in '$@' (ignored completely by this hook). Leave -# # my_options_prep_result variable intact. +# +# func_quote_for_eval ${1+"$@"} +# my_options_prep_result=$func_quote_for_eval_result # } # func_add_hook func_options_prep my_options_prep # @@ -1761,36 +1581,25 @@ func_run_hooks () # { # $debug_cmd # -# args_changed=false -# -# # Note that, for efficiency, we parse as many options as we can +# # Note that for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in -# --silent|-s) opt_silent=: -# args_changed=: -# ;; +# --silent|-s) opt_silent=: ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift -# args_changed=: # ;; -# *) # Make sure the first unrecognised option "$_G_opt" -# # is added back to "$@" in case we need it later, -# # if $args_changed was set to 'true'. -# set dummy "$_G_opt" ${1+"$@"}; shift; break ;; +# *) set dummy "$_G_opt" "$*"; shift; break ;; # esac # done # -# # Only call 'func_quote' here if we processed at least one argument. -# if $args_changed; then -# func_quote eval ${1+"$@"} -# my_silent_option_result=$func_quote_result -# fi +# func_quote_for_eval ${1+"$@"} +# my_silent_option_result=$func_quote_for_eval_result # } # func_add_hook func_parse_options my_silent_option # @@ -1801,26 +1610,17 @@ func_run_hooks () # # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." +# +# func_quote_for_eval ${1+"$@"} +# my_option_validation_result=$func_quote_for_eval_result # } # func_add_hook func_validate_options my_option_validation # -# You'll also need to manually amend $usage_message to reflect the extra +# You'll alse need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. -# func_options_finish [ARG]... -# ---------------------------- -# Finishing the option parse loop (call 'func_options' hooks ATM). -func_options_finish () -{ - $debug_cmd - - func_run_hooks func_options ${1+"$@"} - func_propagate_result func_run_hooks func_options_finish -} - - # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the @@ -1830,27 +1630,17 @@ func_options () { $debug_cmd - _G_options_quoted=false + func_options_prep ${1+"$@"} + eval func_parse_options \ + ${func_options_prep_result+"$func_options_prep_result"} + eval func_validate_options \ + ${func_parse_options_result+"$func_parse_options_result"} - for my_func in options_prep parse_options validate_options options_finish - do - func_unset func_${my_func}_result - func_unset func_run_hooks_result - eval func_$my_func '${1+"$@"}' - func_propagate_result func_$my_func func_options - if $func_propagate_result_result; then - eval set dummy "$func_options_result"; shift - _G_options_quoted=: - fi - done + eval func_run_hooks func_options \ + ${func_validate_options_result+"$func_validate_options_result"} - $_G_options_quoted || { - # As we (func_options) are top-level options-parser function and - # nobody quoted "$@" for us yet, we need to do it explicitly for - # caller. - func_quote eval ${1+"$@"} - func_options_result=$func_quote_result - } + # save modified positional parameters for caller + func_options_result=$func_run_hooks_result } @@ -1859,8 +1649,9 @@ func_options () # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and -# needs to propagate that back to rest of this script, then the complete -# modified list must be put in 'func_run_hooks_result' before returning. +# needs to propogate that back to rest of this script, then the complete +# modified list must be put in 'func_run_hooks_result' before +# returning. func_hookable func_options_prep func_options_prep () { @@ -1871,7 +1662,9 @@ func_options_prep () opt_warning_types= func_run_hooks func_options_prep ${1+"$@"} - func_propagate_result func_run_hooks func_options_prep + + # save modified positional parameters for caller + func_options_prep_result=$func_run_hooks_result } @@ -1883,32 +1676,25 @@ func_parse_options () { $debug_cmd - _G_parse_options_requote=false + func_parse_options_result= + # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. func_run_hooks func_parse_options ${1+"$@"} - func_propagate_result func_run_hooks func_parse_options - if $func_propagate_result_result; then - eval set dummy "$func_parse_options_result"; shift - # Even though we may have changed "$@", we passed the "$@" array - # down into the hook and it quoted it for us (because we are in - # this if-branch). No need to quote it again. - _G_parse_options_requote=false - fi + + # Adjust func_parse_options positional parameters to match + eval set dummy "$func_run_hooks_result"; shift # Break out of the loop if we already parsed every option. test $# -gt 0 || break - # We expect that one of the options parsed in this function matches - # and thus we remove _G_opt from "$@" and need to re-quote. - _G_match_parse_options=: _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' - func_echo "enabling shell trace mode" >&2 + func_echo "enabling shell trace mode" $debug_cmd ;; @@ -1918,10 +1704,7 @@ func_parse_options () ;; --warnings|--warning|-W) - if test $# = 0 && func_missing_arg $_G_opt; then - _G_parse_options_requote=: - break - fi + test $# = 0 && func_missing_arg $_G_opt && break case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above @@ -1974,24 +1757,15 @@ func_parse_options () shift ;; - --) _G_parse_options_requote=: ; break ;; + --) break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; - *) set dummy "$_G_opt" ${1+"$@"}; shift - _G_match_parse_options=false - break - ;; + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac - - if $_G_match_parse_options; then - _G_parse_options_requote=: - fi done - if $_G_parse_options_requote; then - # save modified positional parameters for caller - func_quote eval ${1+"$@"} - func_parse_options_result=$func_quote_result - fi + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + func_parse_options_result=$func_quote_for_eval_result } @@ -2008,10 +1782,12 @@ func_validate_options () test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" func_run_hooks func_validate_options ${1+"$@"} - func_propagate_result func_run_hooks func_validate_options # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE + + # save modified positional parameters for caller + func_validate_options_result=$func_run_hooks_result } @@ -2067,8 +1843,8 @@ func_missing_arg () # func_split_equals STRING # ------------------------ -# Set func_split_equals_lhs and func_split_equals_rhs shell variables -# after splitting STRING at the '=' sign. +# Set func_split_equals_lhs and func_split_equals_rhs shell variables after +# splitting STRING at the '=' sign. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ @@ -2083,9 +1859,8 @@ then func_split_equals_lhs=${1%%=*} func_split_equals_rhs=${1#*=} - if test "x$func_split_equals_lhs" = "x$1"; then - func_split_equals_rhs= - fi + test "x$func_split_equals_lhs" = "x$1" \ + && func_split_equals_rhs= }' else # ...otherwise fall back to using expr, which is often a shell builtin. @@ -2095,7 +1870,7 @@ else func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` func_split_equals_rhs= - test "x$func_split_equals_lhs=" = "x$1" \ + test "x$func_split_equals_lhs" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` } fi #func_split_equals @@ -2121,7 +1896,7 @@ else { $debug_cmd - func_split_short_opt_name=`expr "x$1" : 'x\(-.\)'` + func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt @@ -2163,44 +1938,31 @@ func_usage_message () # func_version # ------------ # Echo version message to standard output and exit. -# The version message is extracted from the calling file's header -# comments, with leading '# ' stripped: -# 1. First display the progname and version -# 2. Followed by the header comment line matching /^# Written by / -# 3. Then a blank line followed by the first following line matching -# /^# Copyright / -# 4. Immediately followed by any lines between the previous matches, -# except lines preceding the intervening completely blank line. -# For example, see the header comments of this file. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' - /^# Written by /!b - s|^# ||; p; n - - :fwd2blnk - /./ { - n - b fwd2blnk + /(C)/!b go + :more + /\./!{ + N + s|\n# | | + b more } - p; n - - :holdwrnt - s|^# || - s|^# *$|| - /^Copyright /!{ - /./H - n - b holdwrnt + :go + /^# Written by /,/# warranty; / { + s|^# || + s|^# *$|| + s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| + p } - - s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| - G - s|\(\n\)\n*|\1|g - p; q' < "$progpath" + /^# Written by / { + s|^# || + p + } + /^warranty; /q' < "$progpath" exit $? } @@ -2210,35 +1972,12 @@ func_version () # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-pattern: "30/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: # Set a version string. -scriptversion='(GNU libtool) 2.5.4' - -# func_version -# ------------ -# Echo version message to standard output and exit. -func_version () -{ - $debug_cmd - - year=`date +%Y` - - cat < -This is free software: you are free to change and redistribute it. -There is NO WARRANTY, to the extent permitted by law. - -Originally written by Gordon Matzigkeit, 1996 -(See AUTHORS for complete contributor listing) -EOF - - exit $? -} +scriptversion='(GNU libtool) 2.4.6' # func_echo ARG... @@ -2261,6 +2000,18 @@ func_echo () } +# func_warning ARG... +# ------------------- +# Libtool warnings are not categorized, so override funclib.sh +# func_warning with this simpler definition. +func_warning () +{ + $debug_cmd + + $warning_func ${1+"$@"} +} + + ## ---------------- ## ## Options parsing. ## ## ---------------- ## @@ -2272,23 +2023,19 @@ usage='$progpath [OPTION]... [MODE-ARG]...' # Short help message in response to '-h'. usage_message="Options: - --config show all configuration variables - --debug enable verbose shell tracing - -n, --dry-run display commands without modifying any files - --features display basic configuration information - --finish use operation '--mode=finish' - --mode=MODE use operation mode MODE - --no-finish don't update shared library cache - --no-quiet, --no-silent print default informational messages - --no-warnings equivalent to '-Wnone' - --preserve-dup-deps don't remove duplicate dependency libraries - --quiet, --silent don't print informational messages - --reorder-cache=DIRS reorder shared library cache for preferred DIRS - --tag=TAG use configuration variables from tag TAG - -v, --verbose print more informational messages than default - --version print version information - -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] - -h, --help, --help-all print short, long, or detailed help message + --config show all configuration variables + --debug enable verbose shell tracing + -n, --dry-run display commands without modifying any files + --features display basic configuration information and exit + --mode=MODE use operation mode MODE + --no-warnings equivalent to '-Wnone' + --preserve-dup-deps don't remove duplicate dependency libraries + --quiet, --silent don't print informational messages + --tag=TAG use configuration variables from tag TAG + -v, --verbose print more informational messages than default + --version print version information + -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] + -h, --help, --help-all print short, long, or detailed help message " # Additional text appended to 'usage_message' in response to '--help'. @@ -2321,13 +2068,13 @@ include the following information: compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) - version: $progname $scriptversion + version: $progname (GNU libtool) 2.4.6 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` Report bugs to . -GNU libtool home page: . -General help using GNU software: ." +GNU libtool home page: . +General help using GNU software: ." exit 0 } @@ -2377,7 +2124,7 @@ fi # a configuration failure hint, and exit. func_fatal_configuration () { - func_fatal_error ${1+"$@"} \ + func__fatal_error ${1+"$@"} \ "See the $PACKAGE documentation for more information." \ "Fatal configuration error." } @@ -2517,17 +2264,12 @@ libtool_options_prep () opt_dry_run=false opt_help=false opt_mode= - opt_reorder_cache=false opt_preserve_dup_deps=false opt_quiet=false - opt_finishing=true - opt_warning= nonopt= preserve_args= - _G_rc_lt_options_prep=: - # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) @@ -2551,16 +2293,11 @@ libtool_options_prep () uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; - *) - _G_rc_lt_options_prep=false - ;; esac - if $_G_rc_lt_options_prep; then - # Pass back the list of options. - func_quote eval ${1+"$@"} - libtool_options_prep_result=$func_quote_result - fi + # Pass back the list of options. + func_quote_for_eval ${1+"$@"} + libtool_options_prep_result=$func_quote_for_eval_result } func_add_hook func_options_prep libtool_options_prep @@ -2572,12 +2309,9 @@ libtool_parse_options () { $debug_cmd - _G_rc_lt_parse_options=false - # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do - _G_match_lt_parse_options=: _G_opt=$1 shift case $_G_opt in @@ -2611,18 +2345,14 @@ libtool_parse_options () clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error - *) func_error "invalid argument '$1' for $_G_opt" + *) func_error "invalid argument for $_G_opt" exit_cmd=exit + break ;; esac shift ;; - --no-finish) - opt_finishing=false - func_append preserve_args " $_G_opt" - ;; - --no-silent|--no-quiet) opt_quiet=false func_append preserve_args " $_G_opt" @@ -2638,24 +2368,6 @@ libtool_parse_options () func_append preserve_args " $_G_opt" ;; - --reorder-cache) - opt_reorder_cache=true - shared_lib_dirs=$1 - if test -n "$shared_lib_dirs"; then - case $1 in - # Must begin with /: - /*) ;; - - # Catch anything else as an error (relative paths) - *) func_error "invalid argument '$1' for $_G_opt" - func_error "absolute paths are required for $_G_opt" - exit_cmd=exit - ;; - esac - fi - shift - ;; - --silent|--quiet) opt_quiet=: opt_verbose=false @@ -2674,36 +2386,19 @@ libtool_parse_options () func_append preserve_args " $_G_opt" ;; - # An option not handled by this hook function: - *) set dummy "$_G_opt" ${1+"$@"} ; shift - _G_match_lt_parse_options=false - break - ;; + # An option not handled by this hook function: + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac - $_G_match_lt_parse_options && _G_rc_lt_parse_options=: done - if $_G_rc_lt_parse_options; then - # save modified positional parameters for caller - func_quote eval ${1+"$@"} - libtool_parse_options_result=$func_quote_result - fi + + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + libtool_parse_options_result=$func_quote_for_eval_result } func_add_hook func_parse_options libtool_parse_options -# func_warning ARG... -# ------------------- -# Libtool warnings are not categorized, so override funclib.sh -# func_warning with this simpler definition. -func_warning () -{ - if $opt_warning; then - $debug_cmd - $warning_func ${1+"$@"} - fi -} - # libtool_validate_options [ARG]... # --------------------------------- @@ -2720,10 +2415,10 @@ libtool_validate_options () # preserve --debug test : = "$debug_cmd" || func_append preserve_args " --debug" - case $host_os in + case $host in # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 - cygwin* | mingw* | windows* | pw32* | cegcc* | solaris2* | os2*) + *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; @@ -2756,8 +2451,8 @@ libtool_validate_options () } # Pass back the unparsed argument list - func_quote eval ${1+"$@"} - libtool_validate_options_result=$func_quote_result + func_quote_for_eval ${1+"$@"} + libtool_validate_options_result=$func_quote_for_eval_result } func_add_hook func_validate_options libtool_validate_options @@ -3055,7 +2750,7 @@ EOF # func_convert_core_file_wine_to_w32 ARG # Helper function used by file name conversion functions when $build is *nix, -# and $host is mingw, windows, cygwin, or some other w32 environment. Relies on a +# and $host is mingw, cygwin, or some other w32 environment. Relies on a # correctly configured wine environment available, with the winepath program # in $build's $PATH. # @@ -3087,10 +2782,9 @@ func_convert_core_file_wine_to_w32 () # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and -# $host is mingw, windows, cygwin, or some other w32 environment. Relies on a -# correctly configured wine environment available, with the winepath program -# in $build's $PATH. Assumes ARG has no leading or trailing path separator -# characters. +# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly +# configured wine environment available, with the winepath program in $build's +# $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. @@ -3233,15 +2927,6 @@ func_convert_path_front_back_pathsep () # end func_convert_path_front_back_pathsep -# func_convert_delimited_path PATH ORIG_DELIMITER NEW_DELIMITER -# Replaces a delimiter for a given path. -func_convert_delimited_path () -{ - converted_path=`$ECHO "$1" | $SED "s#$2#$3#g"` -} -# end func_convert_delimited_path - - ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## @@ -3576,65 +3261,6 @@ func_dll_def_p () } -# func_reorder_shared_lib_cache DIRS -# Reorder the shared library cache by unconfiguring previous shared library cache -# and configuring preferred search directories before previous search directories. -# Previous shared library cache: /usr/lib /usr/local/lib -# Preferred search directories: /tmp/testing -# Reordered shared library cache: /tmp/testing /usr/lib /usr/local/lib -func_reorder_shared_lib_cache () -{ - $debug_cmd - - case $host_os in - openbsd*) - get_search_directories=`PATH="$PATH:/sbin" ldconfig -r | $GREP "search directories" | $SED "s#.*search directories:\ ##g"` - func_convert_delimited_path "$get_search_directories" ':' '\ ' - save_search_directories=$converted_path - func_convert_delimited_path "$1" ':' '\ ' - - # Ensure directories exist - for dir in $converted_path; do - # Ensure each directory is an absolute path - case $dir in - /*) ;; - *) func_error "Directory '$dir' is not an absolute path" - exit $EXIT_FAILURE ;; - esac - # Ensure no trailing slashes - func_stripname '' '/' "$dir" - dir=$func_stripname_result - if test -d "$dir"; then - if test -n "$preferred_search_directories"; then - preferred_search_directories="$preferred_search_directories $dir" - else - preferred_search_directories=$dir - fi - else - func_error "Directory '$dir' does not exist" - exit $EXIT_FAILURE - fi - done - - PATH="$PATH:/sbin" ldconfig -U $save_search_directories - PATH="$PATH:/sbin" ldconfig -m $preferred_search_directories $save_search_directories - get_search_directories=`PATH="$PATH:/sbin" ldconfig -r | $GREP "search directories" | $SED "s#.*search directories:\ ##g"` - func_convert_delimited_path "$get_search_directories" ':' '\ ' - reordered_search_directories=$converted_path - - $ECHO "Original: $save_search_directories" - $ECHO "Reordered: $reordered_search_directories" - exit $EXIT_SUCCESS - ;; - *) - func_error "--reorder-cache is not supported for host_os=$host_os." - exit $EXIT_FAILURE - ;; - esac -} -# end func_reorder_shared_lib_cache - - # func_mode_compile arg... func_mode_compile () { @@ -3792,8 +3418,8 @@ func_mode_compile () esac done - func_quote_arg pretty "$libobj" - test "X$libobj" != "X$func_quote_arg_result" \ + func_quote_for_eval "$libobj" + test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" @@ -3813,7 +3439,7 @@ func_mode_compile () # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in - cygwin* | mingw* | windows* | pw32* | os2* | cegcc*) + cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac @@ -3866,8 +3492,8 @@ compiler." func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result - func_quote_arg pretty "$srcfile" - qsrcfile=$func_quote_arg_result + func_quote_for_eval "$srcfile" + qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test yes = "$build_libtool_libs"; then @@ -4022,8 +3648,7 @@ This mode accepts the following additional options: -prefer-non-pic try to build non-PIC objects only -shared do not build a '.o' file suitable for static linking -static only build a '.o' file suitable for static linking - -Wc,FLAG - -Xcompiler FLAG pass FLAG directly to the compiler + -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a 'standard' object file from the given SOURCEFILE. @@ -4129,8 +3754,6 @@ The following components of LINK-COMMAND are treated specially: -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler - -Wa,FLAG - -Xassembler FLAG pass linker-specific FLAG directly to the assembler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) @@ -4207,12 +3830,6 @@ if $opt_help; then fi -# If option '--reorder-cache', reorder the shared library cache and exit. -if $opt_reorder_cache; then - func_reorder_shared_lib_cache $shared_lib_dirs -fi - - # func_mode_execute arg... func_mode_execute () { @@ -4397,7 +4014,7 @@ func_mode_finish () fi fi - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs" && $opt_finishing; then + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. @@ -4422,12 +4039,6 @@ func_mode_finish () for libdir in $libdirs; do $ECHO " $libdir" done - if test "false" = "$opt_finishing"; then - echo - echo "NOTE: finish_cmds were not executed during testing, so you must" - echo "manually run ldconfig to add a given test directory, LIBDIR, to" - echo "the search path for generated executables." - fi echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" @@ -4485,8 +4096,8 @@ func_mode_install () case $nonopt in *shtool*) :;; *) false;; esac then # Aesthetically quote it. - func_quote_arg pretty "$nonopt" - install_prog="$func_quote_arg_result " + func_quote_for_eval "$nonopt" + install_prog="$func_quote_for_eval_result " arg=$1 shift else @@ -4496,8 +4107,8 @@ func_mode_install () # The real first argument should be the name of the installation program. # Aesthetically quote it. - func_quote_arg pretty "$arg" - func_append install_prog "$func_quote_arg_result" + func_quote_for_eval "$arg" + func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; @@ -4554,12 +4165,12 @@ func_mode_install () esac # Aesthetically quote the argument. - func_quote_arg pretty "$arg" - func_append install_prog " $func_quote_arg_result" + func_quote_for_eval "$arg" + func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then - func_quote_arg pretty "$arg2" + func_quote_for_eval "$arg2" fi - func_append install_shared_prog " $func_quote_arg_result" + func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ @@ -4570,8 +4181,8 @@ func_mode_install () if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else - func_quote_arg pretty "$install_override_mode" - func_append install_shared_prog " -m $func_quote_arg_result" + func_quote_for_eval "$install_override_mode" + func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi @@ -4664,15 +4275,8 @@ func_mode_install () func_append dir "$objdir" if test -n "$relink_command"; then - # Strip any trailing slash from the destination. - func_stripname '' '/' "$libdir" - destlibdir=$func_stripname_result - - func_stripname '' '/' "$destdir" - s_destdir=$func_stripname_result - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "X$s_destdir" | $Xsed -e "s%$destlibdir\$%%"` + inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that @@ -4709,7 +4313,7 @@ func_mode_install () 'exit $?' tstripme=$stripme case $host_os in - cygwin* | mingw* | windows* | pw32* | cegcc*) + cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme= @@ -4822,7 +4426,7 @@ func_mode_install () # Do a test to see if this is really a libtool program. case $host in - *cygwin* | *mingw* | *windows*) + *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result @@ -4874,8 +4478,8 @@ func_mode_install () relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_quiet || { - func_quote_arg expand,pretty "$relink_command" - eval "func_echo $func_quote_arg_result" + func_quote_for_expand "$relink_command" + eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else @@ -5050,7 +4654,7 @@ extern \"C\" { $RM $export_symbols eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in - *cygwin* | *mingw* | *windows* | *cegcc* ) + *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; @@ -5062,7 +4666,7 @@ extern \"C\" { eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in - *cygwin* | *mingw* | *windows* | *cegcc* ) + *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; @@ -5076,7 +4680,7 @@ extern \"C\" { func_basename "$dlprefile" name=$func_basename_result case $host in - *cygwin* | *mingw* | *windows* | *cegcc* ) + *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" @@ -5102,16 +4706,8 @@ extern \"C\" { eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - case $host in - i[3456]86-*-mingw32*) - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | - $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" - ;; - *) - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | - $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/__nm_//' >> '$nlist'" - ;; - esac + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | + $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { @@ -5259,7 +4855,7 @@ static const void *lt_preloaded_setup() { # Transform the symbol file into the correct name. symfileobj=$output_objdir/${my_outputname}S.$objext case $host in - *cygwin* | *mingw* | *windows* | *cegcc* ) + *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` @@ -5335,7 +4931,7 @@ func_win32_libid () *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | - $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|pe-aarch64)' >/dev/null; then + $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then case $nm_interface in "MS dumpbin") if func_cygming_ms_implib_p "$1" || @@ -5602,7 +5198,7 @@ func_extract_archives () # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to -# incorporate the script contents within a cygwin/mingw/windows +# incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. @@ -5610,7 +5206,7 @@ func_extract_archives () # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory where it is stored is -# the $objdir directory. This is a cygwin/mingw/windows-specific +# the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { @@ -5662,8 +5258,7 @@ else if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" - func_quote_arg pretty "$ECHO" - qECHO=$func_quote_arg_result + qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. @@ -5673,7 +5268,7 @@ func_fallback_echo () \$1 _LTECHO_EOF' } - ECHO=$qECHO + ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to @@ -5735,7 +5330,7 @@ func_exec_program_core () " case $host in # Backslashes separate directories on plain windows - *-*-mingw* | *-*-windows* | *-*-os2* | *-cegcc*) + *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 @@ -5803,7 +5398,7 @@ func_exec_program () file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done - # Usually 'no', except on cygwin/mingw/windows when embedded into + # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then @@ -5935,7 +5530,7 @@ EOF #endif #include #include -#if defined _WIN32 && !defined __GNUC__ +#ifdef _MSC_VER # include # include # include @@ -5960,7 +5555,7 @@ EOF /* declarations of non-ANSI functions */ #if defined __MINGW32__ # ifdef __STRICT_ANSI__ -_CRTIMP int __cdecl _putenv (const char *); +int _putenv (const char *); # endif #elif defined __CYGWIN__ # ifdef __STRICT_ANSI__ @@ -6158,7 +5753,7 @@ main (int argc, char *argv[]) { EOF case $host in - *mingw* | *windows* | *cygwin* ) + *mingw* | *cygwin* ) # make stdout use "unix" line endings echo " setmode(1,_O_BINARY);" ;; @@ -6177,7 +5772,7 @@ EOF { /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX namespace, but it is not one of the ones we know about and - have already dealt with, above (including dump-script), then + have already dealt with, above (inluding dump-script), then report an error. Otherwise, targets might begin to believe they are allowed to use options in the LTWRAPPER_OPTION_PREFIX namespace. The first time any user complains about this, we'll @@ -6261,7 +5856,7 @@ EOF EOF case $host_os in - mingw* | windows*) + mingw*) cat <<"EOF" { char* p; @@ -6303,7 +5898,7 @@ EOF EOF case $host_os in - mingw* | windows*) + mingw*) cat <<"EOF" /* execv doesn't actually work on mingw as expected on unix */ newargz = prepare_spawn (newargz); @@ -6722,7 +6317,7 @@ lt_update_lib_path (const char *name, const char *value) EOF case $host_os in - mingw* | windows*) + mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). @@ -6897,7 +6492,7 @@ func_mode_link () $debug_cmd case $host in - *-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-cegcc*) + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # what system we are compiling for in order to pass an extra @@ -6921,7 +6516,6 @@ func_mode_link () finalize_command=$nonopt compile_rpath= - compile_rpath_tail= finalize_rpath= compile_shlibpath= finalize_shlibpath= @@ -6962,12 +6556,10 @@ func_mode_link () xrpath= perm_rpath= temp_rpath= - temp_rpath_tail= thread_safe=no vinfo= vinfo_number=no weak_libs= - rpath_arg= single_module=$wl-single_module func_infer_tag $base_compile @@ -7019,9 +6611,9 @@ func_mode_link () while test "$#" -gt 0; do arg=$1 shift - func_quote_arg pretty,unquoted "$arg" - qarg=$func_quote_arg_unquoted_result - func_append libtool_args " $func_quote_arg_result" + func_quote_for_eval "$arg" + qarg=$func_quote_for_eval_unquoted_result + func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then @@ -7230,7 +6822,7 @@ func_mode_link () case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) - func_fatal_error "argument to -rpath is not absolute: $arg" + func_fatal_error "only absolute run-paths are allowed" ;; esac if test rpath = "$prev"; then @@ -7257,13 +6849,6 @@ func_mode_link () prev= continue ;; - xassembler) - func_append compiler_flags " -Xassembler $qarg" - prev= - func_append compile_command " -Xassembler $qarg" - func_append finalize_command " -Xassembler $qarg" - continue - ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" @@ -7406,7 +6991,7 @@ func_mode_link () ;; esac case $host in - *-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-cegcc*) + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; @@ -7426,7 +7011,7 @@ func_mode_link () -l*) if test X-lc = "X$arg" || test X-lm = "X$arg"; then case $host in - *-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; @@ -7434,7 +7019,7 @@ func_mode_link () # These systems don't actually have a C library (as such) test X-lc = "X$arg" && continue ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && continue ;; @@ -7454,7 +7039,7 @@ func_mode_link () esac elif test X-lc_r = "X$arg"; then case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc_r directly, use -pthread flag. continue ;; @@ -7477,29 +7062,16 @@ func_mode_link () # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. - # -q