cabextract-1.11/0000775000175000017500000000000014376123646010573 500000000000000cabextract-1.11/test-driver0000755000175000017500000001141714376123607012710 00000000000000#! /bin/sh # test-driver - basic testsuite driver script. scriptversion=2018-03-07.03; # UTC # Copyright (C) 2011-2021 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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 . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . # Make unconditional expansion of undefined variables an error. This # helps a lot in preventing typo-related bugs. set -u usage_error () { echo "$0: $*" >&2 print_usage >&2 exit 2 } print_usage () { cat <"$log_file" "$@" >>"$log_file" 2>&1 estatus=$? if test $enable_hard_errors = no && test $estatus -eq 99; then tweaked_estatus=1 else tweaked_estatus=$estatus fi case $tweaked_estatus:$expect_failure in 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:*) col=$grn res=PASS recheck=no gcopy=no;; 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; *:*) col=$red res=FAIL recheck=yes gcopy=yes;; esac # Report the test outcome and exit status in the logs, so that one can # know whether the test passed or failed simply by looking at the '.log' # file, without the need of also peaking into the corresponding '.trs' # file (automake bug#11814). echo "$res $test_name (exit status: $estatus)" >>"$log_file" # Report outcome to console. echo "${col}${res}${std}: $test_name" # Register the test result, and other relevant metadata. echo ":test-result: $res" > $trs_file echo ":global-test-result: $res" >> $trs_file echo ":recheck: $recheck" >> $trs_file echo ":copy-in-global-log: $gcopy" >> $trs_file # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: cabextract-1.11/NEWS0000664000175000017500000002206014376121047011203 00000000000000New in 1.11 * Fixed bug in creating directories given in archives, e.g. extracting file "a/b.c" from a cab file wouldn't create directory "a" (broken in 1.10) New in 1.10 * Multiple -F filters can be given. cabextract will extract files matching ANY of the filters * cabextract now overwrites symlinks by default. This is to be consistent with other archive tools. Use the new -k option for the old behaviour of keeping symlinks. This does not affect symlinks in the -d dirpath option * New "-n" option to never overwrite files. * New "-i" option to interactively prompt if you want to overwrite files New in 1.9 * Fixed invisible bad extraction when using cabextract -F (broken in 1.8) * Fixed configure --with-external-libmspack which was broken in 1.8 * configure --with-external-libmspack will now use pkg-config. To configure it manually, set environment variables libmspack_CFLAGS and libmspack_LIBS before running configure. * Now includes the test suite (make check) New in 1.8 * cabextract -f now extracts even more badly damaged files than before New in 1.7 * cabextract now supports an --encoding parameter, to specify the character encoding of CAB filenames if they are not ASCII or UTF8 * cabextract -L now lowercases non-ASCII characters New in 1.6 * cabextract now prevents archive files giving themselves absolute path access using badly UTF-8 encoded slashes. * Because Cygwin allows both '/' and '\' as path separators, cabextract now removes both leading '/'s and '\'s and changes both "../" and "..\" in CAB filenames to "xx". You can no longer have a CAB filename called e.g "\/t" (file "t" in the directory "\"). If you need this, create a CAB file where the filename is "./\/t" instead. New in 1.5 * cabextract replaces bad Unicode characters in filenames with the standard Unicode replacement character * wince_rename now puts files under the correct installation path * Several crashes and hangs were found by Debian project members using the afl (American fuzzy lop) tool to generate corrupt cabinet files. These crashes and hangs have been fixed. New in 1.4: * A bug in the LZX decompressor was fixed. * cabextract is now more tolerant when processing cabinet sets. * cabextract is now compatible with even more compilers, and now supports 64-bit file I/O on platforms where it's completely native, like Mac OS X 10.6 and Fedora x86_64. * cabextract will no longer print "library not compiled to support large files" while reading small files. * The Windows CE installation format document was improved. New in 1.3: * Bugs in the MS-ZIP and Quantum decompressors have been fixed. * MS-ZIP recovery has been improved. * cabextract should now compile with MinGW New in 1.2: * "-t" option: Allows you to test that every file can be extracted without having to extract it. This also prints the MD5 checksum of the file. * UTF-8 filenames are now decoded correctly. * Large files (>2GB) are now searched correctly for cabinets. * Problems with the GNU library code have been fixed. * Several bugs in the LZX and Quantum decompressors have been fixed. New in 1.1: * A security vulnerability has been fixed. If the files within a cabinet file include the directory ".." in their filename, this will be changed to "xx", to prevent directory traversal by a malicious cabinet (e.g. a cabinet with "..\etc\passwd", "..\..\etc\passwd" and so on) * The GNU library code used has been upgraded to the latest from libiberty, so it should now work better with Cygwin. * cabextract should now compile cleanly on AIX. New in 1.0: * The libmspack library is used for all the hard work. You should find cabextract more robust, and fractionally faster. See the libmspack website at https://www.cabextract.org.uk/libmspack/ for more on this library. * Fixed a bug (now moved to libmspack) where CAB files that had two kinds of compression would crash. * CAB files should no longer get "/" and "\" mixed up, even with non MS-DOS cabinet files created by tools like Powerarchiver and Cablinux. * Now ignores CAB files listed on the command line that have already been used as part of a multipart set. You can now type "cabextract *.cab" on your Win95 cabinet set, and cabextract will not extract all the files sixty times over. * Now supports reading and extracting large (more than 2Gb) files. * "-L" option: viewing the archive pays attention to the "-L" flag, and shows the filenames in lowercase. * "-L" option: cabextract now correctly lowercases cabinet files with Unicode filenames. * "-l" option: viewing the archive should always show forward slashes as directory seperators. * "-F" option: Now you can choose which files are extracted from the cab. For example, "cabextract -F '*.wav' music.cab" extracts only WAV files. * "-s" option: Now you can limit which multipart cabinets are used. For example, "cabextract -s WIN98_5*.CAB" will only extract files from WIN98_50.CAB through WIN98_59.CAB. * "-p" option: Now you can extract files to stdout rather than disk. * Now comes with an experimental "wince_info" and "wince_rename" perl scripts in the src/ directory, for examining and processing Windows CE installation cabinet header files. There is also the "cabinfo" command for examining the structure of a cab file. As this information is not very useful to most people, none of these three tools are installed. * Both the English and Japanese manual page have been updated. * cabextract now alerts you if you try to unpack InstallShield cabinets. * The definition of Microsoft cabinet files for UNIX's "magic" file, in doc/magic, has been fixed, and a definition of Windows CE install cabinet header files has also been added. New in 0.6: * Quantum method is now supported! Many thanks to Matthew Russotto for this. * Fixed more build problems on non-glibc systems. I have now followed the 'FSF approved' method for including getopt_long, so hopefully Solaris and all the other OSes won't have a problem building cabextract any more. * Japanese manual page included -- you will have to install the file ja/cabextract.1 by yourself, it's not part of the install process. * Now searches for spanning cabinet files in a case-insensitive way. It also searches in both directions for spanned cabinets (each spanned cabinet can include a 'previous' and 'next' cabinet filename), so you can also specify a cabinet in the middle of a set and get the full set, rather than have to work out what the first cabinet is. * An off-by-one month error in file dates was fixed. * Cabinets with files beginning with "/" (or rather, "\") no longer extract to your root directory. * A better embeded cabinet search algorithm was introduced for finding those elusive cabinets in files and executables :) * Now you can find more than one cabinet in a file (if there is more than one to find), and it will be extracted or listed as normal. * Files and directories created now honour your umask settings. * Errors and warnings are now printed to stderr. New in 0.5: * Fixed build problems on non-glibc systems. New in 0.4: * Fixed a new bug I added by myself to 0.3... :) It corrupts all MS-ZIP compressed cabinets after the first 32k, and it should be very obvious that corruption has taken place. * cabextract should be happier building on Cygwin and other such architectures -- you should be able to "./configure; make; make install" again. This was broken in 0.3 due to the getopt.c / getopt1.c weirdness I copied from GNU hello. * Now prints 'Finished processing cabinet.' after completing the extraction a cabinet. New in 0.3: * Fixed very rare, but invisible decrunching bug... if you have any important things you extracted with cabextract, extract them again to be sure they're not corrupt. * cabextract now tells you if a file isn't a cabinet file. * cabextract now goes on to the next file, if extracting one fails. * cabextract now goes on to the next cabinet, if extracting one fails. * cabextract lets you try to 'fix' some cabinets by skipping over bad blocks rather than failing on them. If you have a corrupt cabinet, try the '-f' option, and see how it goes. * Use the new '-d dir' option to extract cabinets to a given directory. * Use the new '-L' option to turn the extracted filenames to lowercase. * Use the new '-q' option to be quiet while extracting archives. * cabextract now prints more information while it's probing multi-part cabinets New in 0.2: * new even-easier installation: ./configure; make; make install * Extracted files now have their timestamps set * Fixed bug which occured when extracting tiny files * Fixed completely invisible intel E8 decoding bug... if you have any important things you extracted with cabextract, extract them again to be sure they're not corrupt. * cabinet search extended to look through *any* file for cabinets, not just MS-DOS/Windows executables. * Now looks for multipart cabinets in the same directory as the base cabinet. This means you can do stuff like 'cd /tmp && cabextract /cdrom/part01.cab' New in 0.1: * supports MSZIP and LZX compression methods * supports split cabs and cabs embedded in executables * initial release cabextract-1.11/compile0000755000175000017500000001635014376123607012071 00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2018-03-07.03; # UTC # Copyright (C) 1999-2021 Free Software Foundation, Inc. # Written by Tom Tromey . # # 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 2, or (at your option) # any later version. # # 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 . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # 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) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN* | MSYS*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. 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 . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: cabextract-1.11/config.guess0000755000175000017500000014051214376123607013031 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2022 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale timestamp='2022-01-09' # 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 # (at your option) any later version. # # 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 . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # 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 # # 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. Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2022 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." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi # Just in case it came from the environment. GUESS= # 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. # 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 c89 c99 ; 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 } # 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 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_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case $UNAME_SYSTEM in Linux|GNU|GNU/*) LIBC=unknown set_cc_for_build cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #elif defined(__GLIBC__) LIBC=gnu #else #include /* First heuristic to detect musl libc. */ #ifdef __DEFINED_va_list LIBC=musl #endif #endif EOF cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` eval "$cc_set_libc" # 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 fi ;; esac # Note: order is significant - the case branches are not exclusive. 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*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". 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 || \ echo unknown)` case $UNAME_MACHINE_ARCH in aarch64eb) machine=aarch64_be-unknown ;; armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; 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=$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 earm*) os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # Determine ABI tags. case $UNAME_MACHINE_ARCH in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # 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 Debian*) release='-gnu' ;; *) release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # 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-} ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE ;; *: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 ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE ;; *:MidnightBSD:*:*) GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE ;; *:ekkoBSD:*:*) GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE ;; *:SolidBSD:*:*) GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE ;; *:OS108:*:*) GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE ;; macppc:MirBSD:*:*) GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE ;; *:MirBSD:*:*) GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE ;; *:Sortix:*:*) GUESS=$UNAME_MACHINE-unknown-sortix ;; *:Twizzler:*:*) GUESS=$UNAME_MACHINE-unknown-twizzler ;; *:Redox:*:*) GUESS=$UNAME_MACHINE-unknown-redox ;; mips:OSF1:*.*) GUESS=mips-dec-osf1 ;; 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}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # 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 "EV4 (21064)") UNAME_MACHINE=alpha ;; "EV4.5 (21064)") UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") UNAME_MACHINE=alpha ;; "EV5 (21164)") UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # 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 ;; Amiga*:UNIX_System_V:4.0:*) GUESS=m68k-unknown-sysv4 ;; *:[Aa]miga[Oo][Ss]:*:*) GUESS=$UNAME_MACHINE-unknown-amigaos ;; *:[Mm]orph[Oo][Ss]:*:*) GUESS=$UNAME_MACHINE-unknown-morphos ;; *:OS/390:*:*) GUESS=i370-ibm-openedition ;; *:z/VM:*:*) GUESS=s390-ibm-zvmoe ;; *:OS400:*:*) GUESS=powerpc-ibm-os400 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) GUESS=arm-acorn-riscix$UNAME_RELEASE ;; arm*:riscos:*:*|arm*:RISCOS:*:*) GUESS=arm-unknown-riscos ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) GUESS=hppa1.1-hitachi-hiuxmpp ;; 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 ;; NILE*:*:*:dcosx) GUESS=pyramid-pyramid-svr4 ;; DRS?6000:unix:4.0:6*) GUESS=sparc-icl-nx6 ;; 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 ;; s390x:SunOS:*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL ;; sun4H:SunOS:5.*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=sparc-hal-solaris2$SUN_REL ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=sparc-sun-solaris2$SUN_REL ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) GUESS=i386-pc-auroraux$UNAME_RELEASE ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 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 (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -m64 -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 ;; 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 ;; sun4*:SunOS:*:*) 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 ;; sun3*:SunOS:*:*) GUESS=m68k-sun-sunos$UNAME_RELEASE ;; 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 sun3) GUESS=m68k-sun-sunos$UNAME_RELEASE ;; sun4) GUESS=sparc-sun-sunos$UNAME_RELEASE ;; esac ;; aushp:SunOS:*:*) GUESS=sparc-auspex-sunos$UNAME_RELEASE ;; # 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 # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # 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 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) GUESS=m68k-atari-mint$UNAME_RELEASE ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) GUESS=m68k-atari-mint$UNAME_RELEASE ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) GUESS=m68k-milan-mint$UNAME_RELEASE ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) GUESS=m68k-hades-mint$UNAME_RELEASE ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) GUESS=m68k-unknown-mint$UNAME_RELEASE ;; m68k:machten:*:*) GUESS=m68k-apple-machten$UNAME_RELEASE ;; powerpc:machten:*:*) GUESS=powerpc-apple-machten$UNAME_RELEASE ;; RISC*:Mach:*:*) GUESS=mips-dec-mach_bsd4.3 ;; RISC*:ULTRIX:*:*) GUESS=mips-dec-ultrix$UNAME_RELEASE ;; VAX*:ULTRIX*:*:*) GUESS=vax-dec-ultrix$UNAME_RELEASE ;; 2020:CLIX:*:* | 2430:CLIX:*:*) GUESS=clipper-intergraph-clix$UNAME_RELEASE ;; mips:*:*:UMIPS | mips:*:*:RISCos) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && 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 ;; Motorola:PowerMAX_OS:*:*) GUESS=powerpc-motorola-powermax ;; Motorola:*:4.3:PL8-*) GUESS=powerpc-harris-powermax ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) GUESS=powerpc-harris-powermax ;; Night_Hawk:Power_UNIX:*:*) GUESS=powerpc-harris-powerunix ;; m88k:CX/UX:7*:*) GUESS=m88k-harris-cxux7 ;; m88k:*:4*:R4*) GUESS=m88k-motorola-sysv4 ;; m88k:*:3*:R3*) GUESS=m88k-motorola-sysv3 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 then if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ test "$TARGET_BINARY_INTERFACE"x = x then GUESS=m88k-dg-dgux$UNAME_RELEASE else GUESS=m88k-dg-dguxbcs$UNAME_RELEASE fi else GUESS=i586-dg-dgux$UNAME_RELEASE fi ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) GUESS=m88k-dolphin-sysv3 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 GUESS=m88k-motorola-sysv3 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) GUESS=m88k-tektronix-sysv3 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) GUESS=m68k-tektronix-bsd ;; *:IRIX*:*:*) IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` GUESS=mips-sgi-irix$IRIX_REL ;; ????????: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 ' i*86:AIX:*:*) GUESS=i386-ibm-aix ;; ia64:AIX:*:*) if test -x /usr/bin/oslevel ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then GUESS=$SYSTEM_NAME else GUESS=rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then GUESS=rs6000-ibm-aix3.2.4 else GUESS=rs6000-ibm-aix3.2 fi ;; *: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 IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if test -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 fi GUESS=$IBM_ARCH-ibm-aix$IBM_REV ;; *:AIX:*:*) GUESS=rs6000-ibm-aix ;; ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) GUESS=romp-ibm-bsd4.4 ;; 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 *:BOSX:*:*) GUESS=rs6000-bull-bosx ;; DPX/2?00:B.O.S.:*:*) GUESS=m68k-bull-sysv3 ;; 9000/[34]??:4.3bsd:1.*:*) GUESS=m68k-hp-bsd ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) GUESS=m68k-hp-bsd4.4 ;; 9000/[34678]??:HP-UX:*:*) 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 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 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 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 sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if test "$HP_ARCH" = hppa2.0w then 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 # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH=hppa2.0w else HP_ARCH=hppa64 fi fi GUESS=$HP_ARCH-hp-hpux$HPUX_REV ;; ia64:HP-UX:*:*) HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` GUESS=ia64-hp-hpux$HPUX_REV ;; 3050*:HI-UX:*:*) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } GUESS=unknown-hitachi-hiuxwe2 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) GUESS=hppa1.1-hp-bsd ;; 9000/8??:4.3bsd:*:*) GUESS=hppa1.0-hp-bsd ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) GUESS=hppa1.0-hp-mpeix ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) GUESS=hppa1.1-hp-osf ;; hp8??:OSF1:*:*) GUESS=hppa1.0-hp-osf ;; i*86:OSF1:*:*) if test -x /usr/sbin/sysversion ; then GUESS=$UNAME_MACHINE-unknown-osf1mk else GUESS=$UNAME_MACHINE-unknown-osf1 fi ;; parisc*:Lites*:*:*) GUESS=hppa1.1-hp-lites ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) GUESS=c1-convex-bsd ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) GUESS=c34-convex-bsd ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) GUESS=c38-convex-bsd ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) GUESS=c4-convex-bsd ;; CRAY*Y-MP:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=ymp-cray-unicos$CRAY_REL ;; CRAY*[A-Z]90:*:*:*) echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=t90-cray-unicos$CRAY_REL ;; CRAY*T3E:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=alphaev5-cray-unicosmk$CRAY_REL ;; CRAY*SV1:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=sv1-cray-unicos$CRAY_REL ;; *:UNICOS/mp:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=craynv-cray-unicosmp$CRAY_REL ;; 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} ;; 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} ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE ;; sparc*:BSD/OS:*:*) GUESS=sparc-unknown-bsdi$UNAME_RELEASE ;; *: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 ;; *:FreeBSD:*:*) 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 ;; i*:CYGWIN*:*) GUESS=$UNAME_MACHINE-pc-cygwin ;; *:MINGW64*:*) GUESS=$UNAME_MACHINE-pc-mingw64 ;; *:MINGW*:*) GUESS=$UNAME_MACHINE-pc-mingw32 ;; *:MSYS*:*) GUESS=$UNAME_MACHINE-pc-msys ;; i*:PW*:*) GUESS=$UNAME_MACHINE-pc-pw32 ;; *:SerenityOS:*:*) GUESS=$UNAME_MACHINE-pc-serenity ;; *:Interix*:*) case $UNAME_MACHINE in x86) GUESS=i586-pc-interix$UNAME_RELEASE ;; authenticamd | genuineintel | EM64T) GUESS=x86_64-unknown-interix$UNAME_RELEASE ;; IA64) GUESS=ia64-unknown-interix$UNAME_RELEASE ;; esac ;; i*:UWIN*:*) GUESS=$UNAME_MACHINE-pc-uwin ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) GUESS=x86_64-pc-cygwin ;; prep*:SunOS:5.*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=powerpcle-unknown-solaris2$SUN_REL ;; *: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 ;; *: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 ;; *:Minix:*:*) GUESS=$UNAME_MACHINE-unknown-minix ;; aarch64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; 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 ;; arm*:Linux:*:*) 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 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 else GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf fi fi ;; avr32*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; cris:Linux:*:*) GUESS=$UNAME_MACHINE-axis-linux-$LIBC ;; crisv32:Linux:*:*) GUESS=$UNAME_MACHINE-axis-linux-$LIBC ;; e2k:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; frv:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; hexagon:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; i*86:Linux:*:*) GUESS=$UNAME_MACHINE-pc-linux-$LIBC ;; ia64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; k1om:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; m32r*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; m68*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; mips:Linux:*:* | mips64:Linux:*:*) set_cc_for_build IS_GLIBC=0 test x"${LIBC}" = xgnu && IS_GLIBC=1 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 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) MIPS_ENDIAN=el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) MIPS_ENDIAN= #else MIPS_ENDIAN= #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; } ;; mips64el:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; openrisc*:Linux:*:*) GUESS=or1k-unknown-linux-$LIBC ;; or32:Linux:*:* | or1k*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; padre:Linux:*:*) GUESS=sparc-unknown-linux-$LIBC ;; parisc64:Linux:*:* | hppa64:Linux:*:*) GUESS=hppa64-unknown-linux-$LIBC ;; 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 ;; esac ;; ppc64:Linux:*:*) GUESS=powerpc64-unknown-linux-$LIBC ;; ppc:Linux:*:*) GUESS=powerpc-unknown-linux-$LIBC ;; ppc64le:Linux:*:*) GUESS=powerpc64le-unknown-linux-$LIBC ;; ppcle:Linux:*:*) GUESS=powerpcle-unknown-linux-$LIBC ;; riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; s390:Linux:*:* | s390x:Linux:*:*) GUESS=$UNAME_MACHINE-ibm-linux-$LIBC ;; sh64*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; sh*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; sparc:Linux:*:* | sparc64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; tile*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; vax:Linux:*:*) GUESS=$UNAME_MACHINE-dec-linux-$LIBC ;; x86_64:Linux:*:*) set_cc_for_build LIBCABI=$LIBC if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_X32 >/dev/null then LIBCABI=${LIBC}x32 fi fi GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI ;; xtensa*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; 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 ;; 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 ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. GUESS=$UNAME_MACHINE-pc-os2-emx ;; i*86:XTS-300:*:STOP) GUESS=$UNAME_MACHINE-unknown-stop ;; i*86:atheos:*:*) GUESS=$UNAME_MACHINE-unknown-atheos ;; i*86:syllable:*:*) GUESS=$UNAME_MACHINE-pc-syllable ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) GUESS=i386-unknown-lynxos$UNAME_RELEASE ;; i*86:*DOS:*:*) GUESS=$UNAME_MACHINE-pc-msdosdjgpp ;; 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 else GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL fi ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} ;; 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 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL else GUESS=$UNAME_MACHINE-pc-sysv32 fi ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # 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 ;; Intel:Mach:3*:*) GUESS=i386-pc-mach3 ;; paragon:*:*:*) GUESS=i860-intel-osf1 ;; 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 else # Add other i860-SVR4 vendors below as they are discovered. GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 fi ;; mini*:CTIX:SYS*5:*) # "miniframe" GUESS=m68010-convergent-sysv ;; mc68k:UNIX:SYSTEM5:3.51m) GUESS=m68k-convergent-sysv ;; M680?0:D-NIX:5.3:*) GUESS=m68k-diab-dnix ;; 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) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } /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 ;; mc68030:UNIX_System_V:4.*:*) GUESS=m68k-atari-sysv4 ;; TSUNAMI:LynxOS:2.*:*) GUESS=sparc-unknown-lynxos$UNAME_RELEASE ;; rs6000:LynxOS:2.*:*) GUESS=rs6000-unknown-lynxos$UNAME_RELEASE ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) GUESS=powerpc-unknown-lynxos$UNAME_RELEASE ;; SM[BE]S:UNIX_SV:*:*) GUESS=mips-dde-sysv$UNAME_RELEASE ;; RM*:ReliantUNIX-*:*:*) GUESS=mips-sni-sysv4 ;; RM*:SINIX-*:*:*) GUESS=mips-sni-sysv4 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` GUESS=$UNAME_MACHINE-sni-sysv4 else GUESS=ns32k-sni-sysv fi ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says GUESS=i586-unisys-sysv4 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm GUESS=hppa1.1-stratus-sysv4 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. GUESS=i860-stratus-sysv4 ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. GUESS=$UNAME_MACHINE-stratus-vos ;; *:VOS:*:*) # From Paul.Green@stratus.com. GUESS=hppa1.1-stratus-vos ;; mc68*:A/UX:*:*) GUESS=m68k-apple-aux$UNAME_RELEASE ;; news*:NEWS-OS:6*:*) GUESS=mips-sony-newsos6 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if test -d /usr/nec; then GUESS=mips-nec-sysv$UNAME_RELEASE else GUESS=mips-unknown-sysv$UNAME_RELEASE fi ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. GUESS=powerpc-be-beos ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. GUESS=powerpc-apple-beos ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. GUESS=i586-pc-beos ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. GUESS=i586-pc-haiku ;; x86_64:Haiku:*:*) GUESS=x86_64-unknown-haiku ;; SX-4:SUPER-UX:*:*) GUESS=sx4-nec-superux$UNAME_RELEASE ;; SX-5:SUPER-UX:*:*) GUESS=sx5-nec-superux$UNAME_RELEASE ;; SX-6:SUPER-UX:*:*) GUESS=sx6-nec-superux$UNAME_RELEASE ;; SX-7:SUPER-UX:*:*) GUESS=sx7-nec-superux$UNAME_RELEASE ;; SX-8:SUPER-UX:*:*) GUESS=sx8-nec-superux$UNAME_RELEASE ;; SX-8R:SUPER-UX:*:*) GUESS=sx8r-nec-superux$UNAME_RELEASE ;; SX-ACE:SUPER-UX:*:*) GUESS=sxace-nec-superux$UNAME_RELEASE ;; Power*:Rhapsody:*:*) GUESS=powerpc-apple-rhapsody$UNAME_RELEASE ;; *:Rhapsody:*:*) GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE ;; arm64:Darwin:*:*) GUESS=aarch64-apple-darwin$UNAME_RELEASE ;; *: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 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 fi elif test "$UNAME_PROCESSOR" = i386 ; then # uname -m returns i386 or x86_64 UNAME_PROCESSOR=$UNAME_MACHINE fi GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE ;; *: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 ;; *:QNX:*:4*) GUESS=i386-pc-qnx ;; NEO-*:NONSTOP_KERNEL:*:*) GUESS=neo-tandem-nsk$UNAME_RELEASE ;; NSE-*:NONSTOP_KERNEL:*:*) GUESS=nse-tandem-nsk$UNAME_RELEASE ;; NSR-*:NONSTOP_KERNEL:*:*) GUESS=nsr-tandem-nsk$UNAME_RELEASE ;; NSV-*:NONSTOP_KERNEL:*:*) GUESS=nsv-tandem-nsk$UNAME_RELEASE ;; NSX-*:NONSTOP_KERNEL:*:*) GUESS=nsx-tandem-nsk$UNAME_RELEASE ;; *:NonStop-UX:*:*) GUESS=mips-compaq-nonstopux ;; BS2000:POSIX*:*:*) GUESS=bs2000-siemens-sysv ;; DS/*:UNIX_System_V:*:*) GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE ;; *: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 UNAME_MACHINE=i386 elif test "x${cputype-}" != x; then UNAME_MACHINE=$cputype fi GUESS=$UNAME_MACHINE-unknown-plan9 ;; *:TOPS-10:*:*) GUESS=pdp10-unknown-tops10 ;; *:TENEX:*:*) GUESS=pdp10-unknown-tenex ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) GUESS=pdp10-dec-tops20 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) GUESS=pdp10-xkl-tops20 ;; *:TOPS-20:*:*) GUESS=pdp10-unknown-tops20 ;; *:ITS:*:*) GUESS=pdp10-unknown-its ;; SEI:*:*:SEIUX) GUESS=mips-sei-seiux$UNAME_RELEASE ;; *:DragonFly:*:*) DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL ;; *:*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 ;; esac ;; *:XENIX:*:SysV) GUESS=i386-pc-xenix ;; i*86:skyos:*:*) SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL ;; i*86:rdos:*:*) GUESS=$UNAME_MACHINE-pc-rdos ;; i*86:Fiwix:*:*) GUESS=$UNAME_MACHINE-pc-fiwix ;; *:AROS:*:*) GUESS=$UNAME_MACHINE-unknown-aros ;; x86_64:VMkernel:*:*) GUESS=$UNAME_MACHINE-unknown-esx ;; amd64:Isilon\ OneFS:*:*) GUESS=x86_64-unknown-onefs ;; *:Unleashed:*:*) GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE ;; 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 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 mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&2 <&2 <&2 </dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = "$UNAME_MACHINE" UNAME_RELEASE = "$UNAME_RELEASE" UNAME_SYSTEM = "$UNAME_SYSTEM" UNAME_VERSION = "$UNAME_VERSION" EOF fi exit 1 # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: cabextract-1.11/config.h.in0000664000175000017500000001202214376123606012527 00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD /* Define to 1 if using 'alloca.c'. */ #undef C_ALLOCA /* Define to 1 if you have 'alloca', as a function or macro. */ #undef HAVE_ALLOCA /* Define to 1 if works. */ #undef HAVE_ALLOCA_H /* Define to 1 if you have the `btowc' function. */ #undef HAVE_BTOWC /* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. */ #undef HAVE_DECL_GETENV /* Define to 1 if your system has a working POSIX `fnmatch' function. */ #undef HAVE_FNMATCH /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ #undef HAVE_FSEEKO /* Define to 1 if you have the header file. */ #undef HAVE_GETOPT_H /* Define to 1 if you have the `getopt_long' function. */ #undef HAVE_GETOPT_LONG /* Define if you have the iconv() function and it works. */ #undef HAVE_ICONV /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `mspack' library (-lmspack). */ #undef HAVE_LIBMSPACK /* Define to 1 if you have the `mbsrtowcs' function. */ #undef HAVE_MBSRTOWCS /* Define to 1 if declares mbstate_t. */ #undef HAVE_MBSTATE_T /* Define to 1 if you have the `mempcpy' function. */ #undef HAVE_MEMPCPY /* Define to 1 if you have the `mkdir' function. */ #undef HAVE_MKDIR /* 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 /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the `towlower' function. */ #undef HAVE_TOWLOWER /* Define to 1 if you have the `umask' function. */ #undef HAVE_UMASK /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `utime' function. */ #undef HAVE_UTIME /* Define to 1 if you have the `utimes' function. */ #undef HAVE_UTIMES /* Define to 1 if you have the `wmempcpy' function. */ #undef HAVE_WMEMPCPY /* Define to 1 if you have the `_mkdir' function. */ #undef HAVE__MKDIR /* Define as const if the declaration of iconv() needs const. */ #undef ICONV_CONST /* Define if mkdir takes only one argument. */ #undef MKDIR_TAKES_ONE_ARG /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* The size of `off_t', as computed by sizeof. */ #undef SIZEOF_OFF_T /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at runtime. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION /* Define to 1 if all of the C90 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. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN # undef WORDS_BIGENDIAN # endif #endif /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ #undef _LARGEFILE_SOURCE /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to rpl_fnmatch if the replacement function should be used. */ #undef fnmatch /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Define to a type if does not define. */ #undef mbstate_t /* Define to `int' if does not define. */ #undef mode_t /* Define to `long int' if does not define. */ #undef off_t /* Define to `unsigned int' if does not define. */ #undef size_t cabextract-1.11/fnmatch_.h0000664000175000017500000000467313370030226012435 00000000000000/* Copyright 1991, 1992, 1993, 1996 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu. 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 2, or (at your option) any later version. 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, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _FNMATCH_H #define _FNMATCH_H 1 #ifdef __cplusplus extern "C" { #endif #if defined (__cplusplus) || (defined (__STDC__) && __STDC__) #undef __P #define __P(args) args #else /* Not C++ or ANSI C. */ #undef __P #define __P(args) () /* We can get away without defining `const' here only because in this file it is used only inside the prototype for `fnmatch', which is elided in non-ANSI C where `const' is problematical. */ #endif /* C++ or ANSI C. */ /* We #undef these before defining them because some losing systems (HP-UX A.08.07 for example) define these in . */ #undef FNM_PATHNAME #undef FNM_NOESCAPE #undef FNM_PERIOD /* Bits set in the FLAGS argument to `fnmatch'. */ #define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */ #define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */ #define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */ #if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_GNU_SOURCE) #define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */ #define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */ #define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */ #endif /* Value returned by `fnmatch' if STRING does not match PATTERN. */ #define FNM_NOMATCH 1 /* Match STRING against the filename pattern PATTERN, returning zero if it matches, FNM_NOMATCH if not. */ extern int fnmatch __P ((const char *__pattern, const char *__string, int __flags)); #ifdef __cplusplus } #endif #endif /* fnmatch.h */ cabextract-1.11/test/0000775000175000017500000000000014376123646011552 500000000000000cabextract-1.11/test/symlinks.test0000775000175000017500000000417114374407612014246 00000000000000#!/bin/sh # - test that cabextract doesn't follow symlinks when extracting files # (default behaviour) but does when given the -k option # - also check that it doesn't delete symlinks in the path supplied by the # user (-d option) # - also check that the -n option stops overwriting files . test/testcase set -e # every command is a test! # set up a symlinked file and symlinked directory # extract $tmpdir/plain.c and $tmpdir/1/2/3/4.c # check they did NOT get written to $tmpdir/other.c and $tmpdir/other/4.c touch $tmpdir/other.c mkdir $tmpdir/1 $tmpdir/1/2 $tmpdir/other ln -s $tmpdir/other.c $tmpdir/plain.c ln -s $tmpdir/other $tmpdir/1/2/3 "$cabextract" -q -d $tmpdir cabs/dir.cab [ -s $tmpdir/plain.c -a \! -s $tmpdir/other.c ] [ -s $tmpdir/1/2/3/4.c -a \! -s $tmpdir/other/4.c ] # restore the symlinked file/dir # extract again with -k option # check they DID get written to $tmpdir/other.c and $tmpdir/other/3/4.c rm -rf $tmpdir/1/2/3 $tmpdir/plain.c ln -s $tmpdir/other.c $tmpdir/plain.c ln -s $tmpdir/other $tmpdir/1/2/3 "$cabextract" -q -k -d $tmpdir cabs/dir.cab [ -s $tmpdir/other.c -a -h $tmpdir/plain.c ] [ -s $tmpdir/other/4.c -a -h $tmpdir/1/2/3 ] # extract to a user-selected directory path that has symlinks in it. # check that those symlinks are preserved, but symlinks in the parts # of the path that are archive-controlled are removed rm -rf $tmpdir/1 $tmpdir/other/4.c $tmpdir/other.c $tmpdir/plain.c find $tmpdir -ls touch $tmpdir/other.c mkdir $tmpdir/real ln -s $tmpdir/real $tmpdir/fake mkdir $tmpdir/fake/dest $tmpdir/fake/dest/1 $tmpdir/fake/dest/1/2 ln -s $tmpdir/other $tmpdir/fake/dest/1/2/3 ln -s $tmpdir/other.c $tmpdir/plain.c "$cabextract" -q -d $tmpdir/fake/dest cabs/dir.cab [ -s $tmpdir/fake/dest/plain.c -a \! -s $tmpdir/other.c ] [ -s $tmpdir/fake/dest/1/2/3/4.c -a \! -s $tmpdir/other/3/4.c ] [ -h $tmpdir/fake -a -d $tmpdir/fake/dest ] # check that -n option works echo hello > $tmpdir/fake/dest/plain.c echo world > $tmpdir/fake/dest/1/2/3/4.c "$cabextract" -q -n -d $tmpdir/fake/dest cabs/dir.cab read H < $tmpdir/fake/dest/plain.c read W < $tmpdir/fake/dest/1/2/3/4.c [ "$H" = "hello" -a "$W" = "world" ] exit 0 cabextract-1.11/test/cabs/0000775000175000017500000000000014367776050012465 500000000000000cabextract-1.11/test/cabs/split-cabs.sh0000775000175000017500000000321013367363373015000 00000000000000#!/bin/sh # creates a good mix of standalone folders, folders that # split backwards, split forwards, and split both ways, # with differing numbers of files in each dd if=/dev/urandom of=small1.bin bs=2000 count=1 2>/dev/null dd if=/dev/urandom of=small2.bin bs=8000 count=1 2>/dev/null dd if=/dev/urandom of=medium1.bin bs=40000 count=1 2>/dev/null dd if=/dev/urandom of=medium2.bin bs=50000 count=1 2>/dev/null dd if=/dev/urandom of=small3.bin bs=128 count=1 2>/dev/null dd if=/dev/urandom of=medium3.bin bs=40000 count=1 2>/dev/null # force differing case: wine will write the cab files as "split-1.cab" # but the cab file will have "Split-1.CAB" embedded in it touch split-1.cab split-2.cab split-3.cab split-4.cab split-5.cab cat >directives.txt < This generates a CAB file with two files in it, where the first file is 32768*blocks1 bytes long and the second file is 32768*blocks2 bytes long. Neither file can be more than 65535*32768 bytes long. EOF my $header = pack('A4V5C2v5', 'MSCF', 0, 0, 0, 0, 0, 3, 1, 2, 2, 0, 0, 0); my $folders = pack('Vvv', 0, $blocks1, 0) . pack('Vvv', 0, $blocks2, 0); my $files = pack('V2v4Z*', $blocks1*32768, 0, 0, 0x226C, 0x59BA, 0x20, 'test1.bin') . pack('V2v4Z*', $blocks2*32768, 0, 1, 0x226C, 0x59BA, 0x20, 'test2.bin'); my $block = pack('VvvC*', 0, 32768, 32768, ((0..255) x 128)); # fixup offsets my $files_offset = length($header) + length($folders); my $blocks_offset = $files_offset + length($files); my $cab_length = $blocks_offset + length($block) * ($blocks1 + $blocks2); substr($header, 0x08, 4, pack 'V', $cab_length); substr($header, 0x10, 4, pack 'V', $files_offset); substr($folders, 0x00, 4, pack 'V', $blocks_offset); substr($folders, 0x08, 4, pack 'V', $blocks_offset + length($block) * $blocks1); die "Overall cabinet is too large ($cab_length > 4294967295)\n" if $cab_length > 4294967295; # print cab file to stdout print $header . $folders . $files; map {print $block} 1 .. ($blocks1 + $blocks2); cabextract-1.11/test/cabs/split-2.cab0000644000175000017500000007246013323707071014341 00000000000000MSCF0uFdd2 Split-1.CABSplit cabinet file 1/5Split-3.CABSplit cabinet file 3/5™‹Q@ýÿñL›F small2.bin@œ@ýÿñL›F medium1.binPÃþÿñL›F medium2.binߺ.G€_xΩ“ˆ6©l¶ M Æ7œl—é˜Ü?·7`”VV›¡¸«ó˜­4î’#tE™áþXŸ×˜š¾Ö­^N¿«/m'lj¼·šìp™,º7Ârטñ Fcs“kø_ÿè|øúCzÎY ¢º7Ÿ*Ež¾¦¹§ü¥•ùÅ xâgìuþ™nlxù– rôPÔà›ú¿Qù*Ä×sȯœL’£¢'GŒ^F%;™IAx]­˜´îPÔ±»a¶Ø‹#ØÖmVQ}š[§zBÈõI2N§~ðLë™3g<°~LŽ›={ˆ¯ý§Ï‡!ƒ¸Ý]“tZy‚ÿiSoЬ¿Âíž¿ô÷Í‚Ì÷‚îuÅ66eÿA_£©ˆ˜u"ccÞ:O2H¹žá³ÙÄD‚rgg>gèyüç”»+¡B&˜ w¼üÅÔ^.>‹©šLXoƃEáOò- « ¼ß¿ %Ým”qxâÇ0ÃéÞuÏkð$¸h ÙsáBþG‹­¡SL[®’5ÞœM¤Ž^D@Œ qÃMý"DQ¬ªëÊÀK¬¿1! ë µÍp—Î_DéÂ9áo¢gõ€e¡òL|Õû0–µ¢—F¶oî°{ñ„%KŽ×Dü6ËàÏ šN¤ôe]öÔ¸œÌ76»‰ñ)ç`l%¡šÉsà·õ# YH¦` ÅÄ-|ïÀqX·ežJp†2(€R¹8çnN?cöb–ÂGúÅ1Þ ÖaR y‰Ñ=p3)„Á›šÔ~˜ºß1A”»!²Y3a\^ Óܯ$4cBTaˆçÒGËRS®U¦­ÊC]aÀSØÇbÊDUçk~Ïá{(gdÓ1]nÛ¸Eýü'$¥*C;w~ ïUü©€q¿Ê†s>ã‹#9õÖ]J¼ ïn¾™¾kï0cV4bH¿<^Ü{Íï4Ä«@å=•~‚¼¾­ß›"ßïï(Ôà9ßÀÚÚüqÈæG1b(#èÈ ô6î‹ý×'ÉoùŒiÑh7ëQ‘cPµêèApyDMv«aö§:hþ)±/7¥eY"±N¦4¯$S^ÏUéŸû’ÔÁö ÆjŠ­UÙ>[+u:”»@ŠÂpžbM……v7aÓ>K?{Ï,o;gIÄw üjé{®mÞ¯•Ä«?`wB0¿L«’KulP÷)AÁ6µ[ŸšŒØ.¹( øçN¨¿"·XÇÚŒ…²­wÅ(È`¼ÜõæûvÁÌ*åz"Ê«N/Ýë¿I°„Ž/×&óö*±#WÏ„åÈÑ@_¿ÈJÀÒ) `EéJ ±×r$švkψ«Û(Ñßî•<¹ _óOxG7 "5hÁRÖo/Îæ9q:}ÈÌu©Ï!HÙKŒd)¥`ÐwøÖGËázÚ\®‘..wHJé*öw¦¢d”¡þ„·øˆ6Cy­ƒ3Õ‘zNãͦ$}q(tÀiÒRéŒxV–‘xôû³n 2»§}8fTÌÝ iÌz1´LÂ=îÜ^a1G¶sØ3hix•ãùãZäôЍ0µèq—ˆÆ .¨§WšÙøR³°‘¾CWEQ¥ ªËðž9€—fç¸e/.×oÅT¼‹»ó®*’Rl‡¸5ì©äH˜ÎáF<y :Ø\fÓd“13dC„ß¾ùöžV؉ÿ¬n.—~Ö#nü~G\”°%¸mý:µ —nãÓËŸuU¯ÃƒöB™&« wÐI!-¦ߌµm°ÏÒäÊE«1C+Àve–Ú£5A›°­÷$[騜V”¯À,øVsµ`&ÈÞü`έWéå§‚ÖÔ{¢½A›¯¹œð»%‘êÊßæqBZÉø÷_9ÿM¡©ãjéz‡öÄÎ.=:ÚÌŸSØ)IÐ  és8´¥¹ò±äô˜Í®Ç¬ùzn1½ù@ñº|(vV_íUNÃ¥™d®MVß]θsk?<˜1“ã"]F+õøtÙ™Ù‹d"Úqõ»ÁÑ-«õ´/Jm/£Áýuè<½žòpÓjIô«þï,‹ °»ÉžPjÍ¢A¸Šî¨H÷õj€7ýǵõšNëk[D×ðËCïÓKVyuÔê.µÈ¾ v/ë¥jEžµãã5±4üQf·3›–âPAÜŸ§œÄu×·WB«UR×÷–'d>ª4÷:{S|.ÍãkÐJ¼+ÿ•–ë#8_1@ó ÙI‹DR•£{0BÅý¢>! îΚ@zÀXãõdÈ\Ðf>º­Ø­3¯”9È´ @EɤîB=À=ÄSo×;w!Ù…6Y#½¹úA‹ëLt…ÂÄGñ;_èPû¾ÐÉ2­÷ùhƒè&w6YË”^eWíüÍÐ-=ãA½¦<®£loÈï½i)£ÓK`QÝ.Õ¬ ó´s'CšôÜzˆ—ýcnvÝ=øSé‡Ê/Q·áštQÆÝωj jÀÑ¿ZÂ:cù€?lð³¶ŽM<]ꉨ8ú£ FáÈÈ-9#Ïç Ù¿´·I´üÜU€õ^»q1PL½jÑO2|¦æd–%¾ÿ2I‚ÌüæŒà) Ù öcNbKï ¹è—%!åîTï_bŒoSßÕæSéÃÓ]cÁ•šžßÅ…Íß hZ[³¢š  !FA’Sn»ÏA¤ê_ÂÓÇLJÞXŠËÕø˜S±]¹=SИÙTPÌØ[%ÈÛZ•ÞÑøÁì×Dž–©pÌÞ[0Àù wd"y3Kú¾£çm)"’˜LýK«ìK* ´Tb(4€ºŠ—´‚b£!«^®Ä nTÊfÙQ–ä*%ÍL€åçobÚ“ìBõYÇU”Ã1ZÿMlÅå%N?ù­Çü°Ëþ9b•dÿÙÅ™©"Pe“…ÜL¥Ñ6çóÌ€¿Ui Fê·îöUMÁ…{;2–—é˽H¸`L©6HáíÈοJÛª¡ÛFr-BÃN—nE ÊÚ>G¸ÅãÙ¬H—Óe §â2x@T x`’èо9¼3kÁ8ÝXæuRàêWpÅm’ƺ”$—תÊÏŸÌh²óŽý8`õMoÛ Ç^¶ ì$E‰‰Çà^3Ôfÿe¿¢X”ënjAˆ½þ"Þ¤ôà/i¹„<ËV]Žq Íp /´Üþ]¸ý#ÃK@õ˜úñÉ€¡þHt`Gãbšïf’S”èÎ)Ýöp™mé0΋,_4ü"J{ê4Æ9BŸ‚t¬lÇï{cøtŸ^ ÈLàúŒ ×àâËpUU]ûÊF$VÕ5}ˆ=x»ô9;¡fäwŠ€jxžá-e¶„×zè÷)¯'š’ÖЉÇ`›°Ô ÒÀçÈv¥À2ÂŽÛÅäµð®p¯}OÈV Âà l$öª²ÏßÉÛ¨Õ ¹<@7´k÷\à¤ÔLM"÷!¤PZþΙ3ä`‘jëÃt‰ú¯ÃC/Æo[Èœ;äO,˜/4ôåõët}æaL›D%ÒŽBÚnžõÈö0…ÜÄ ¶Ìz‘nðæó‹m€_ÈŸjÝk¿Ä•‰®)YHt{²0%G*á͆Øþ©ÏeŠ ö׃ö^.ó¯‚=KJâ~R¾™œ•±[nQ‰ŠjAèܺo̤T&˜° ôðÓì" îò]úƒ_òb*°Ý.®z4ö¬?ê˛Cß÷‰²‚a=ê€n ãìG%¨ Ò* xÖ³¦ÒÂÖ­Z!Ñññ{ÍýÆòñHùÁqêãä³Ï›yßó þƒD)Œ xáDß&«Ñ¼Jzýc+¼Ð1aŸ„ ɹHu)¤OŒÃVK“+Q"!ž/¬Ò3¬Îùœ:©ÝèlåzQ7 ˆÌØn‹&Ëb=RLÉî”H,îh 9)ñXj7C®÷2š•S~ä#Ž9'æ¨~QgErÆÁ”r,j¸MvZ{ã^LSå§IªT©ïÔ¬KsüÔ_úvy%ðiLÿ*U·ØKŠº…³ÄžßMŒjH5*ò P¤{¯K“Æ·œºä–!?ûÔ]jÂL9Æ7bw: òß›Á¾_ã9X³»X¢w†^µ<&g‹¡Ø\§j5æºðÎ »Á“êè\‡{®Á­1´ 2´õ-œk©çƒå<~`å'Ú-•‡Hn‘ßçty'¡/mÒG -uKëíêš)—>´tÐb0JúBŒÛÕZãÒþÆ%lídÿÃvo–ün{zIî7œS~í{Ýà³èDå¿¥Šƒ‰R¶ÝYŠ„=Ÿ‚sãoÚ¿¡Ö í¾öT—:½S`\ÓĤ×dF¸˜àITY„|;ñ E´Ç¬©Bu+V¢¤WËèˆj Xð—à¬D× Hbnx¤¹ølüÓîíÇsß),O’}©\X 5¼$;±6ÅQJ‚L‰˜+aˆj@à½óñGu÷ÃiêÓ¡½N¢öoVQnþ0o¸0ŠbosÓ2*[±%EÖç·lß©§ú%Õ6Öw*¬iùªÓ|ðn`ùÛmrptGk8%ʨÄÝ;1-Åãv™Áå,Î.6,É9–»‰WWÄ`M»=•¶jU’ŠB§23ù'C-/~Ö¤}k(]À ë5×2üöîžÃ-—„yNüâ0 “‰qapØsQµZM¬\: †c[ÆòÎ_<^ÖÚ†kF—`EÄF€JF¼TîÜAD´«K.`!T–™y¬àË;‰Þpþ«\£P²N&?Où³Séxž±dႾªm›áºµ[¸3½îŸÑöe:ÑÓ<Ô‘0}PÑÙ§ƒÆô*£> )ŒÉ-Ÿ‚•¯Eð%ƒ7&Qù’Wß×·ëydöCTÁ©T‰WºJUoÜ8ʪÝ4:9µßEõ@Ö©©D²¦3u†mKÃVZ•î(¶Ck'b¥ޝ±ÆqŠþ¬PlòíXÛeA–×tÇØg [­;Áœz­Qr!J—§ 5…!Ë}#ņ!Ä%íÑ›•ô% ¹' HGé7EÍŰŽ>F Ϫbã&¥@}hŽ13ò' [V%Ìe:ÇÀM¡°Ø ˜ÓuS;³?kÈè`É…J„ÿªå À°‰:vÚ~¹yˆgWÞ_„ˆÂÝéÀv0Í~OƒÚÃJgx¬Šl2á‚þº±b>AB¯üüç¿ `}D@õpÙ4‚v©Vs¢ÃVW>G&Ù€ó0}ä/]Ý‘SŒ~¡›r…ª „"rå’Ï+>Á™.„&v,‘$vÀˆ½›\ès ήi{]·¨J‡;€;CK€;Äq„¯ ºâP€¶¥ô.üUhÐ *R"[— ]„Å{—âôVWa¼"Lƒ¯qÞ]Ÿ:Ô×IIí ·¡cùȺ~_ÃNðC¬¿ÜÒÎO‰Z¤Îqy®& ÉO‹Ö›¦ØáŠ—hQ¹CGÀ„=ÀJd ŸnžD Nyê]ýÙ,)ã`„T“‹Fîwk!FæÐZŒ÷e=rxBÿ¿ÉÆC¼˜u"ùC½„H¦ËH2ɱx͹Œ˜ÓtÓ(îÏ3àZ û@¥0Þ3£`c2ÝP%ê¾–\BZ°ƒ±‰F(‰Quº•2³š·Ø)ŠTe"¬Ë)œiÜ”U¶VÊ ËF$¿…MËeñÍæ/XTn,1UVPäèô Ì\©ôLÌ xŽeg®Þ†ÑÜ~è_¶XÂÕØÊSÐå9umë¿Ue:ÜÎǤ@Q=Ðtëb„€Olzݵj¬riÂõá %8XõPŽ…B0dƨ|‹‹Mn5¡Y¤‡U¿¶»‹ |H°L‚$ Á“©Æ“6ào8¶¬%[´Ç€wºïö™1¾Æ¬ôA¾<‘š²Í]Ôr|šÀÀÔÙ€o°GrmC­.xW¾N²YM,Ô^òR2L¨îäµE]–2Y‰O ,ÎMtõ¬È´'}Âñ‘ây }k¯ÜDñùSÙvå³ÍN–´:J0Kv¥Ü1ã|v›Ú[1÷ÆÆѺ(†¶­ Á™l÷éjȽ©EÕ’ˆA¼³mÆ…„á)›C=÷Þ;úœŽ1›s5“bZ(;ó òo55|M5'éÉY4UÍ÷ôÙ ±n¤œÌÍ]|ž0F­­­ØÑzŸLðQÝmC ‡!$aÁm5|H÷ýUÒÊA&»q5‰T’Lìüu&Ôļ즣ÙJ€°ÀªG,•dEÄ$½(˜~šópcUp¤w—ÞÓ°²œ,CêGY’<§ Gµt+U8ÐG'ª¢ v¸ÜdWqý\xŒq²ÎáÁ«LÚ£àC¹±˜†xÂÖæÞ‹Üõj„›ù”¬hÁç›+¾Â*«Ç]=æ3*V•°§?1+ Ø‘p,ÞS 4Ô}f®¤7A¾&Î'„·‘V°*E&ah›î¯Pé˜ i Au0i¾_sí¶ýà ü[ÀïÎÅ„/OØ 6ÊÆÿýül8´q z{<"€ëùiqeÙd8¦‚ÚHª"Öj °IïУá…!I×8c ˜ÇQ¦Æ÷˜¡íJ%ïÌt„× oU0ú(ÎàµÙ¬­½˜BGú*tÔ1ÃÜ82OfKaþ·Ã÷÷цKSS³PK;ej»Ñ=uç² ¤sA¯ÆçzA•Å:ËÌÃr`‘‘ŒŠ…á­Q_;á¤ÏÐ+¼"<‚dz 8â$r&a¶dŠ.•¯ƒóÏ“2Í€Ùn_b*z¶3„J¼g¹õ¬¢eÅKhÚQis!¾°@³0…—ŒìYŸÎ’p÷ý¢ò |$¢V¥ß=kܶ£xX.ÕIІj0Ó| GçsS…\S«M#EC@•ÿ ›¦™#Y3OìŸfÝb(þVqV?ÊÊ›Áö·øºl’Äeõ¢1†`³ånÍ…àò-ç0’Üó˜j+¥™w õ}\~±*Jiá(½±Õd¨Á²µ6P4qú·ò8Àöɇ ƒjç©ùvÜ9Ó+§gìe™´´$,Ei¾ãQ\»äô§ë®ýM“L®N›©ƒ£h²sÅiÞtÄimD"Iܘ?s)‘íN75Ž]63AçLî²êA>TtĬš¡ëÀ4¯ÁÖ,¦òÒñþvA«ÆT €hAf÷9AÍ„‹E¶÷ƒ9ò²iÚÀdé3ÐGÔú£¿ýúÌí\ÎnÏ¢IÝœ³½[•ùׇ <½x•Š'øÞÜ“!±~ûŽSªHcÇÙÝ7‰“ö=n þJÜ[M[eØ”‚+úãÕÿt X,S:i«5ûÂPÑäm ÔÙ/•*’.Ä .î \!‹'>•~® @š²5®?W Â+Ù¥êÒ _²`‡/À½þ·ó¶99»[¿Àbyõbÿáý$@çØƒEûÂçD(?ÿÉnöjìÝL᎚š:¡é'¹þ•.; ‘Þ‰ç3¡W,]¿2ÂÙ4–‚RŃŧBˆŽ)5õ“ µ‹ÄÝzØ=œï©jøOÖ{NŸˆÞ邺CÌJ¥ûêº54cPÀ;A‹ïÖqy¶«Ÿý{=ÅÐ2ƒŠ`âs}QHéÙøv$fÅ ð÷¶»†ÏÛª#è×yz0µ‚wØ„rŠ¥qlé•×ä1¡çœé湪UŒÇdoá'Lù„̇‡ø‚Î[Þn&ùá !\BØ?Êž0( Ãk'[ƒIU¨ÚâF†øÝ1\"–"¼*1ŒŸ`CMöñ½&°¼Õ3†ŠB#a¦$i iËh}ýkÁ{x§TCXõx~ìôµ‚QµÛÏð)•‘‹SÐðýþQ¢ÀŠÞ‚jâF—vø}Wkìü»[ñ„_ÞbÔ}GÚÚdÌ­Ï¡³ïþw)åé«,À,è•_ IµúÚhÖ`÷Xvè¹¶=Êÿh(ØÆ6vÜl| ˜ø¡•“ë Ç*h*h»_Vôæ .|K„oY¨²žŠdÉk½ÄñõÑj&Øšþ2ƒú|¤ìÄ–ýÈs•IÉ]ïëöc+%Š1-Â_üÆœ²[3“P3S«ÇNw<ø|£xoþÂÚ¸¨T2Û µóCaÁO*ce¸•½ÞLÚa iÌu!d®ÄÓhÒ¸¸#:óãÙ´m ºÜ¿“Nœ^‡JÙž!¥P¾cÅ3³Ðcëj >´-šŽâéÞ ¦JØœ9@Ë,M°8ø³‘dh´3žo£bÏeÜÍ&z¥¸#.G"²5kbQøåhô· Žšüîü™GB ÛX±tQùʈ¹*ØnÔ^°Ñ¶Å ùöµ Fcû`Djz6»3;8:"šÕ(æI¥Ùrù™±qQÿ)4 ïMkw-BÖlósgã™W/µ±šbÊBA¨‡S¨P˜ݘFELh;b´ü!m7zySy’6Nªb¹¸s;)´‰)‘ e‡›Ö†‚Ý'B¢àV 3ȹ´£Î[€0Í=N…¼K‹X¨KÏš¥«^$§œA_g¦`X®h°©Q*ä>C%ÃA3N–Æ¿lR첫S,ÑÝ<Z–¢CYݨWN.>„ÌÞ)µZËN5 )RWçiÒýãêÑ`üÊúµø×©ÕÖòɸþ;Gé.tØÀ’±wö ÒÄ-PaW‰šƒy–1–L©@ŸQÂ~Ãû~ :Y©|/¼·‘­ß#b#p†AHiù9¹ÖvÝ[=æîgŽ›6È}ãùîÑ”°5ë+t£šÌÂÊGª‘ìB²Aw.S=µÏtß1}D¿`E.mQ* —>8™Sôçµì_ŠŸ:еq&ùF~{Íeshò…Öšò„’À¹dë—ŽvÅý«1h‘Fâ|ïˆÙѼäŠìqIÁIX/¾×Yð1 ¯åðžر ²P6r’az;ÿœº_$ϳ³wþx ÎUÿï Y„íæ’üT%.aZþë=h¯;Á{IúH@:–¬ƒ¤ÙI]iëWîÝP–p¤‡—Oô&Y¬¯/˜dYZßRœƒpÄ¥ZÜ~Œ´ZäoRq1 0Ã1Ð[ÃP£ä²Ò\Úý=½¢*­óÚs߆úàJ¼,Êú©=A“º‘[®:é¥`ÅÙwÔ¦(ntP†” @(–()Àk|‹­L²kâ[z“Z©à‡´Te¾ðÝ8¶+¥ÍÝ4±côí÷^†U}kè~§NLcë+GÀ&vµ‘0ªÕq.d'½ƒOúÁï×>®Ò¥À­&¨[9?‡^ý•ÃZ=¹zecÉÉHæ'K^¥F¡ ÏÔ3)¢ëÃä±ÒôêÉd§Àñ¤z8 @@ äaŸÒž:ˆžgqÖÛ•9)èm‡ÛCØ(­è]‚w¯ËØÑÇ}~©¯=Ï­¾Ñ— 9íÍsÆ~¦,žaÕzö¨‘xK4&RD[ãÇÒÑ¡¤1F‡zM‘« ¬ÒàR‘Î704vW—`dÊT³†ÆØõ+r|é3ë6o›v×(4¡¦Ôgó€|{jìZÈø9½.)”Úˆ3Ù©IÖ£!5Q^Þ7þsâ‰#:ê$­˜„‹ƒ¯WZÙŽµè¹àXô Tj=à/ÓðòâF\•]ѯð[?ð»IãM¼õYÑPUº±ß>ìï4Foy\z%iuÓ¼E%2û.ëTä©ÈYàÎ ·7· D?´“•Œ¡‰ÿwëËrRI²[îÃùœ.põ”¼†èhæ¶/Š-&¼Å…¸>•ðõÞž/x–%@n¿ÑÉKùdè—@ºl2ÁLΘ„5֘Ѵ Ú€ÄÔÈ/Õº–?VB(ìz~g2û˜úŒ3wøg÷Ò¾¶Iÿg`Ý4 Iàé0î½T8õuƒ——¯),ã|µjêñxcO [¿wIýÁ9 ä­4­ÿQôŠ4\cšøfón„Ô?ˆ2Qp·j1°}d=…H*Ô`ÄE N¾³äz]ÿŵ‘{«¼‹%sá‹ÚíPÿr8¼CØŒN ÌÀÅ¿ûU[Zøcè¡å„>cWRÁÙ¤…ضG"éX>×µÖù£xXÅ Ô*W¹§,dÚé,®õ„ø)ä ž ;yø:Ô®ð#œÿqhÛ«Vn\­Yóf|óJ›mi¾Ñ‰‚ŠhÏm-ºÔk°jOìÇöq$£9Þ}B… ú&\svè¿"zÖð§²ܰO&Nøÿ>DðKçIí[=”Ž1áCkIjˆ_Éé¦áÔ佺8»kCýì’1šØãM3×Xu}Úa¤YÿšU˜·Ñˆzx÷¦é$í¥ÒLd¿7’öh}ZW Rb°~÷‚­énRû}ß³¥Ä7ÑU¾Eí{•§vù¦r¹7Ú!ÚŠ ^ÇúxK×:1z›_*Û ·¿Yà ^æWÂf¼É_Bu\V6R+-ÃÈa%†Ð÷¦ÃËDàª%2ŽÂVî­§OŸ‹é0ïE/ãØZ‹M ¸rø¯¬c\µUål=Q ¬œøËÿiœ¦éáC^öt™Ä¿ßDpÄU+_“¾Òò‘ÌYê¤ï‚µÚ“#8>òØ|1d>•܇Yü0è4«®õy?ÎhK´¥…Z‚W_†3M3¬œÑãCUÓ±¼Í%(æ–²%ó>ã¤Æ—µU‰lÎýÇv`XŒŠ±ËHÙüvÿGxP»"/äý®[•ËX¶5úÐçÍk¸ŒàèØeþdå¹YG]&#f™‰}cqœ.èL]bFš{Ý}ú9 ZÅ‘—RÜ«:q†øhüG?z:ËÄCZ²‡“iÔtx 7é|qG*·¢êFÈÊ€ô¦±BgþJü-+ú†„Ø ›ê}¬»rìéÁÕ¶‹õ×—†z ¿ Ÿk(>Q9ŸI€8Ngl= 4Þ¹P¦kv¥)’§á/©Ò>.» IÛKyŘ{PÞ°ÃÏX•[ÀbÃøé©É¿•1zÅè=TÜt2HôOn{ä³ÕÀx›OП^ÜgáAÞSdTUhMÉÝŠÉYôâ£ÃŠøÀÅù/švÅ‹£ ôÁž®ÍÙùÁ¹ž©éW¦~H®==ëð‹°¦Âòøb>+ÀþßK`ËMWF–c©ÿ¨ñ¾E¢ç`ÖGù0Ä}Wš½è6£ÏÈ3ÂÎÞ¸-ýGPEKCmtº÷%î&S§ûúbë[ÛV¨‘›2dÇ#Ú>—›´bWê·~* ½‘Ðþ=’B‹Þ"¡R²ˆ%ÛP‘Ä.iä^€X:¿+Ç;‹mÉývþ%A{y]†kÙ5]li½ßºÈ\};àÜ÷ˆ>3gFÇïuµbÕÑÇÇŒl["‹d.œ”kNå‹2p¤J§ìMž«Ï›tE‘m­aw‹Ðk©)°’Þ´*W"I´Ñ؆î97¥Û!6è[%䟆“®ŒPÑLÅRÅúDË9­õ|ô|rˆçùù¦Zá;…J7«ÛÒwÿ²ödÝhä~ðÚ°­_…ë§Pf;Œ͘áÍ×â§)ÎNEF³ >Úª\ 7HÕ„“˜à(B³!µŽÑë1€U÷†%PéÔV$1‘r…&NNÚ3+«‡r5ÄZ#ªÓ¤¼–Kk^ø·"';T®y>Ý  ¦¸ï–hzd²™KD99Þ7a=%m£Oƒ˜¦Ek(%£mW\‡ý6YŒ‹ñN;C0Ç« ^6ãÞ ÃarÞB¼Óˆ±¼/2àlþVÜy·ÉÀ½ÛJ%0™ßKá$µ/S”AÖŸìQ0ò;Þ¢@Ÿ3÷ óãÿ†.­¨ Sx÷ƒÄ{(KmXeÁÕŒvÞˆ£›wcY­Rpn ã?(4IÈmá –Ë,·ÛÌR.¤e@ôM¦¤$†~ØN Dp“Ó«:U iIFº¤§,1VËâÇ®5ÇéoD­rFD8Ș²=­ü_ìDè†S–ׄIëbÛÄ”º)!\Á ÑüÈ8êç¿aUÆNì}Ó®.jaVJ¶Ùié˜L÷Ö “8Ù@sÅ£–rË_¾â‘jë¸k-Ï4}—(ñ]…Y­mkåÚ¶ÿË^¼î‚¤.ر3êÐHß1 Õà…ÈëeXù³‹kl_9§á•x"žÙ< -Y\”'ÅoŠ,œÂ> €§ 1ó‚ <&¹”ד:LØä”‹{6„ÿöº›§”Ñž‘æ„ë:—L¯î½‰°aq…©Lgø[Œne4h@\“Š5ÉíÖjøY !—¬#cHk~F÷¡“!×si¿ÿµø¸$ù ãÏG6Û²¹.Úsï¬öÞ\§«îôÈS•àsŸ‹qåÓìˆ_P}¹úÒ#w·§˜N=l}RC·&Yz°ž\$a Dcp çqµœ›¤$9¥f>dnI€ÇHâ¹J÷ ^gž!-¿µ¦Ûg7Ã"ßÚ œ™y–®·©Èê‘0%D‡Ý6Ø6ŸìzÊ&ãåɲïÓà)}xè&?´B E2TNÑ~AY©ØÚo²M¶ŒÓߺlÑÏõݘÓÅKJiE2´ 07§{[;·Ùùï*UžuÛs·$ ¯,ÿ‡=cPÜJüR]Ó/]> âöv…ÈæÐàYP¾o¦’::•½Jƹ ¦ì2 «žQ‰U»S¿3ZÝ ¹™íú¬Ô¹µ§—0ì'#EÊ­¿$ašíó9I–,ÜõèLHµ¿—ñ¹‰t¤õ3€¾6¼óvféR »¼(}’<¹YÜY©0^ — ˆêuÝlH0£eŸ=Âou¥áÂL<8ýbon÷ƒ8NɾGŽ'È#hõÙƒ¸·ž¡}ÎÑ‹5¼™|üþn ¿¦37:f~Ñ‚Kn–¶+G·I8/:êÉå[íÉþWKŠÐÕk»•`%ccñmP&¹ÄZ$1~Õ(:½àÔÓƒh¶ï>ÉïZé&Ö^§«zóΤÿmB“.Ý¿…œÿBñr²Ð#0%’~æþ˜|°æŽ+þoÕ(•{l¡Ê jGßÉUN@W<"d›/™q"½v &(èÓsCÝ®†îËsÛ„DšÍi†€È·dÿ(/ãyÝ·FÑké¶3[¶üp"öè¬xÛÝVïbB%ÁM„.ÊËm]òàªYÂ\’“㟤Uä”ÄVÊù¦YAQí‹Uî&¡p£^mÿR WÎc yBú~/ Ù銧ֱq3pŠjÝk,»iH5þ¯T©”ßQJH’™8EÍȇlg¯÷åc§^†äôŠyHù@oqÍÿ¡Á.ÕÆ’ëxèþ_Ž‹™™"Ýßí·É2j>’ºÔqöÔICŠähÑcZÔ—ú¨´Å¬q¼~'äÞ#@Ög#ƒ&¦OÜ­WfB`µ*dwý‹.–šÙå³QÙk <(«Å ñ©±„”ÃQ£À¾cp¡h&…ôm^ÑŸFü@¢n½„Ãä·€+3¤·û}ø…$Kª8nôH³Ý)c?˜SÿmÊ[U¤‡£|º›hÅÛrAI‹)ÃI ¸U6%]GüA:Ü!;ü¼~œÉJ»ÕéC–jŠäˆx%=Oƒ–q›=»U©âä’ÖcΑû¯)—¡úM‘£Ðk–*$×E'}¸×êªuã:D)+;†ª¤s˜s¸á§Bœ¡ùÈ•í(0âŠÊz˜¢J|È©dÅí$ÜT±ÿ£@ÿãí™E}ïN§Ù¹õoZŒœÃžuLµTŸë'º¢7ŽŠ„Ñ#f*»¶ÌO¶l5ÓWÜýeÕ*–lÛ¦•dz(œÑ yª–ÆÚÕfcœaF ?_xéèÊQeØÛ{¦=¨+пRìW2lyù=Ë +çŒ^$Þ‚ +ñÒmh.ì¡ØY;ò-1ÁI†:ÔﺚIÔü3O¯ÐØ1ýnEÉw³›‹ôî7r{L¦”ˆXLS”4 gÀ |óûV]ŸAÇòOh, D6hëbJ‚Šz­^ûŽ–vEÐ9Џū$gOÖUk>Hg”½mSÝ:WÛV¦î‚Æ Åâ[ÈFì.!»?§ýí½”çÀHO!ˆsÎÉé&f 4ÕVFÉ>¸-ù¿³ýŠ«î/—î´4 »Ü¹å§¢ Ð:žç…r©0ªykç\_š8¹+½ù¤7à’#]åÄOijÜ<úYü[1˼óÆÜ8k\ƒ(Ö«ëß­9ÊÛð÷ìÝGôJÙÖ||ŒðZ$¢Û´^ÈÐ*¢Öôš‰³ ±…ŽÚxÉã ŽùCîQxgô»Ý©`ú—?©áé!\–÷”Ý/}5Í+%êHºk^–TÉdÿïa?LºG”"^’é\ï‚CTt,z8¨sÓß%Y&§ëÁA„g§Üé1¶¹.ª´ñfùtÝ'–vMíšÏýz³‰ÓG°‡(ÂT oÊÂæFÒL•!fY1æAoìŸ `Û‹O÷?œ\´YÅö@jÀø’ r‘+žÐ4%Û?d&š¹ÎÌ <Ó”¾–Èê§\ZœOÐí?+0ûÎÛ†õš@!ö³1A¢…=›´ð}:+ï±pš"Øý~Q8ÐDz‚9ÇÖ0(ëÑ‹’ÙiazçÙÀ£ÃP†Ïûu¢µ,Vºxµhï,‰£H7£é¾%5=>p±kÖÉx1‘÷Ãë»Î •Xß,FˆY›³áJô?ÈzœÒcyLú¿yÞg¤Î¬±ð%_îÀ\Þ÷±3¸eµ˜^]D!Ô™5%PŸãDþœEÜ­£èÁÒƒ ½©æÓhdh¯¦¢{9‚ED.I³¹Æ®Ûâø‰cNÔ„jú-X&™S›Qΰù ·#’AHiÒc=}nâé¨f®ØPžÙvaSÙ‹C?VAÎHrc¥•]x2ß@ÐhâMoœ–ÓÛjjzñ(’ëÇx5ÐvòååÿT‚õ9¢E+TA×P›^ÿ°’þHµìÖèwøcâꦴt²Ô SÚb2cª¢øÝuì…ǰ×lKjòõæðªàµÛúx@¹Ù¬’[ŒJü±5{qA BXàQ£6c²ìùc×Xù=]ñe‡Un§¾¨¶5¢šR:A\Eg$õÚÉ©©Ù`G@àǾ~h•Ì›3£Sõ@Z;=¶%V@ñ{ë‚ëC+)@›¿=› 2¤¨R°Ý5˜‹÷Ý‚U?4,©îGÃR"4ÙœN*eãüY3=è­—5›ÿ÷˜ ů/ —78áD^Ÿ÷¦ ƒQ4} Ð#ùxóLa~bˆ³l>ØÛ} &´zÍÍ¢áû»„QÔm3Œ¹t‹õ*ù‘#†±¡X¼=Í%›¡éª\€nøìz×ÞXUcE0I?·èl°½ñAh.г Tï¸GixñaÐ ŠŒ¶w!j˜‹˜Îò$ÌлœE¢)wLÛé¾èq·òŽ“Û˜³Žc|ŠÛÔ¥º½ÁÙÎ¦Þ Ë–i¸Yû´¿/ÕJvïB1n·YeCÖƒˆñê /œBç„4Lp´ére¿4·qUšõë÷ù ¥û_”› €ðO­ÈV Y#hì, ·\Dt X ¤ÄÈÅ_ˈ"ο/_bØ—¢åW™ÕŒ 3P£Z͹k¯êéSdUî Ïqä)¨3†qÛÚtüUÌ0'}g~‹Lƒ•JÞ.ÜøÂ¨ænŸëΨNr©½"cKÄo`P‡LôJP·j‡+ðü }˜>âÔñÉIÃÇÆBޝ Dw—s€»·Ú´D1ÇÇÉVÖïØR–ë¯D úw¾oË B¢àaÅ3Ó —¿+þmÉ;Pé°j“ÿç((Ž,TqçaY2íöMÃk;Oªb¤†Ê èíuUø ñq™Ó€MˤqÉU. ŒÔþGuM@O¡>õ|§û}óáC×°•Ï鶈ê,ÑtæKW”̵"CoH÷×p+L­–Œhs©â`ƒçß6/ibj~ßogÖÏ:’òúO‡cvƒÞù&vI›Ò­ÀÑ—òxßïÿTXW‹6Ë^G¤‡n$YÕ[=Î{aË&A&vÈÔváÍõpFˆ1.îBO-Š'^ž×½|®ù@éözªošéa öú©cOnžòaÐÐŽß?¥IkIá§Pˆ¥\g­ÆÔǹÖ}#ö1éïå_ˆwm‡wÔ<ñ“ìJ“È’N4”¶.Ýêvw9axD6¢ÁIÈ™½¤ ÆÍ^R×ÎzNÊľˆóÓ´ù a¹Ž¿( ½Ô‚Íî(ûc–Ãçpš1×& }R°¨g9iKüoÈ(Lby§Ÿ"ø@Pð*[¤ò0CÛ+ƒ©…ù•T°;(wdïQP¼þÂe,>²ôa5ï¸dž2©\ÔµD®2ÍlNYp–"÷VMcC¼ÿzæ•H‰Iž26^-]t”óI$\-k¼ò¼à…¡@Ÿ.{mèÙ¶yGí­°Ñ莤¿0•³%ª6ž`­Ì˜G™°Í®¾µú«ù@ùN5€±J[`ºñÅGBûð¹ýRíª¤þ@²^öý”QwÊ8/­·&ÇÐß67ŠI"¼TKn¤F9E8öØu®ˆÜISóÇ= XÚ¸:ƒ=xÍ÷¸ådbúÐóÏV¢Dë^,p¢0Î|á¿€ÇÃ×êvXUÑ]L:Äĸûf†w‘P8%_xGæ®OÚðßmñ¡ŒÃ0V;ÖKc2¹{ ÒÞèZb¡>“i½('`qkÔl‰1IÔlM'ø N~kD"4Jd–H³¸9ÒÆÆÿ( ÿk@|ì>£áPe~O‰µ½ÒÔ©Žù‘ óªu5ÙÒª‰Ft1ù­hßÒ5€èBõû &#Müñk}ž7H[Ѻšôå|$X¡°—F‰äÞ«ÀcÃV“€É‘ûsŒi„Fë^¤,yxp¤~X²Þ#¿Á{fCÄ„ƒÄh(O?<ŽŒÒ³ç¹{|ˆ2ž˜,}ÅÂ×Ü X  Iq°§ÄÎJ§äÊÃD†Bº±û ¨nzp¥Ì;>}dÏ9ç?NíôòÏï$”#VïÓ*^Í"çOuøBùôƒ5pßМùïZ‘.Ö}„µ$ЍKùyízœr ޝ·é>¢TPaºI4…}©K°eìñ - Ü{ÌPOÝ“˜ H‡hG†xêã û=A…cskî\ÜȪÂxÍ4AÆÞ_ÿ’s‹fôRLQHÿ–Ο½ú›éHaƒàVÎŒ²è±É)~§zàsp®¡äDÍ—óö×U˜2C ۀŠM“øŒ/ôH£ì¤c°ÏhµöKlOz Ìo“+˜×%$„ѽ":ÂÖŒÜÓÜå=Kƒ-'hãñLHGÐ)h@ /Ls4O ÖŒõú–ù}Gï)®BH0Oüäå·”§ƒø%ÐÇR!û›P¥Ü¥c©óù±Œ…ý…Ý7ˆÓq¯é«ybª2x¹+¾žÁ´ Ê Â° iƒQ º!Þ¸}ê1Z6e”—?ÿ^˜éåPWûdy>Gc>«m"»:Ï‚÷,Api‹¡íBy8ŠS¸FI€cgX59!ä-M©f‰þH—”Á^àUxziÀÃm‹o­¯ß"ë0ü¯cc±Ž‰µúûó©8Ïæd­Ê¡Ý“˜ì„~0Ét‚T60H1ƒ¼Oð3„’WI£Ÿ5d Í¢êd¿ÄŠ}iÐt8Ÿ-—E¢°¿LÉW[ÖÐÑù$t\ܭ΃ü¿sFœjÅ-cÀæf>x œf±rÿ«_d<áüËÖ#¾Ä|,CÒ’ˆË W ²XôQèC‹ÔÝ•VÛÿ‚‹ Ô–²‘¬ÚƸÅRêy…S¡öü¤X¥â%BÒ³Í{‘«·|—Oh g½òožJ•€^«k%qñ¿ œÑŸÿùë£À‹0T8K³M‰ž”AR ã“%î'ö¼0wU;io¹Ç•] ôfÝøÔ¾( #G&äiwïéÉû|{Ñq@{žQf):Ÿ¬Íðz[³Z¦#ø©'eÏ{e¡Ü²å*äß “ÞhüG;žFÑ_v>Æ"K¥Y <ìïiÆv´™m)ÿçƒ<ê˜eïg|Œ ¢å }a±ƒÐ5aöíÕAžŠQ²Æ#×§MME®ÿãR1ãøVðF£upÎc%³û@bx€¤Ö‹¯à–q?w}ÇÓZ¯æéÙ’[¹–XbýŸDbkåh²G˜;‚+šÿÐýD•êù¿7zY®›ŸÐä~«qõù_7’ g“Úƒu*ˆPBÒ—Á¦1û:[ææ+V5¾¾ujt#uXJ1Ï Åɶ¦o댸†€0ñûÁúft6É&fùÐ2Û‘m ëÝ[W`¥(ºFo¤Æõ&Ý, û‹ãD*{_²7¥ Íˆ.y[/|ˆð˜´LŠe ’£Ë¯Þ•7ü3Ÿ’^0›HVo\9Åã?c(mÍ¨Êæ,BsúO“{%ïXe*üôZÓrs: ?,—é T¢|LŸmšyçÉßQt™Ý" ©Û,1°;^ LúÚǯqš^Qí˜ùäsõ»ì6÷{Ùº¾Ùü_ËòO¹ËJQm—nJ0‡æ9ˆc¨ÿRÔི‘tµÔÚ°6amÓ¬Ñã;ó*"•‘å+žRR†3;žÕÖ/°°}…åÅŽþ¹¨ÛTQá@±³WõÌáÑ€p¹—ŽÞ7·øÂý{]°¨ª)?âÚÙöÿû _†‰ ÑE¢Î”ÁËÒ»uDtº%™$¿úàsL?%et;¡fÁðç…ŽUóX¹nOlªáý——ÂD#®W˜8²„"ŽÕÇ탲óå‘ãÂÖW {'VA3p øÝ\ì£Éý³|ЮðUcµáçúe,÷öLµx.o¦d{cC¬ I`OÌà³îŸ&Å >J±r~¶©ëÞ+¥Aè¸ì“6U›—ן›c2`GÁ?-b$‘þšæ€Œ‚†\AøL]EÁ‘wéA¡˜ÏÂÌkâ‡âèÅ;ò}Ùa˜kdýJæòª}щTž´ŸX»ý(~RfW­H ‚÷s/É‚2êgKýrÌ3þ"VšGª–âÝÈ6úd†Ê+”©øÿ³ŽS¸whªR—¾‘ÁP\Ä.Û–ó»DÚb0*eDmªK1” š¦PUóË‘)f4ëéj«š“¯–êCrùä))g-’L\¢I`vÑUË"ŠÓ! ÕÎo·òŸÆµ\„…§ÉwJ§ò-QO‰nÐ{ -½«iÛX«éýiÐ@õp˜WM!p)Vh-ŽæW~ÞÏ Éy6ÌÐ+õÈl´M|ù_ïî6¼‡Ô¤w®9ú'ÄÀ{‡ÃšV®Ø_zl 3œP3Ö™àŠÿØŒOOSƒ’_…áº#9tþ‡wÈÐa°0Z2ìì¾S) Ä›ÝQuÇÛélhÞ8¸•{ðh k+óUÍ‹_Îy)DTnjô6þlñ/Ž‚€GDÞ?Êäþ¥›)vI ÕdðYîÍé%i´ @Þ†OÖy1ÈjÆ)–BËÚ»Æ^kYêÕ"cŠ8]èFXÜ'¶Wq}¸zõœB¿I‰ØˆázÝí%¤…´œËÈ£ò»t|q@*l ã›uÝ–õÁÉr #VX&ÈIܳޅ6þ­Ûñ°V'3¶12Â_¬(?_¦‘k5+ÏØü%@œn†;É;\.Ø>MyVÐgû\¼e¤P£– MÝhYLj( ÷0£äoöà.·*©ùøuž¼NϬqQçO¡XF€Êí7ÈEŒ{}W¹aéÕ/£ÆÁ>äT¥Ÿ‚Ì’‡ˆ>§0†;ó}w¾‚ˆ”s¥EËÿtÁtò9rBW»æuî(OŽâÉÝ\Ç@©á¤r€W.æðq»–)ÞVŸ´ã ­,áf½Î$ôNy+ ^§+׈äEe–^séþë5Æœ<&Œ&ÔÜfÓthõ€».óO˜.æì‘9§ß¶âèÎÛ’1øÌKüj'v´Ñ¼Ê>éÕKuþ0 Ká:„Ô”á¬XBÝ%#ú©.eϩ؂þú cò¬íiµ×W?ÄG›¿ô›òÀ—€¨+‚TÂçðü2Ì-u0ªøŠ³)*Ä«;~ 3ÂkK…!Ö;Iù^Ã<¢Á2ý"ØÑãàsNOÔ¢-¨ƒM2¤íõéC.02,ÄK“¬zÑþ¤!!ð9Ô52²×8c6ÁÖd…™IŸ‚Õ°¡Aif^%÷¹ô”M5î͵³dy¬¾².ÕH2¿#³€²©ŒãEq‚K m‹>2æ7ºªóÜô à74Aö¥§?—pzÅHÙ§xÔW˜4ìKáD&°Lò`~aB#¼µ|l‘Ã3Ë=†eP6³º@1%š'nS‘þƒÆÄÃq4ÎÐÖ¾öÿaðâŸPSh• NÙ¯beòdÍkŒ$Ìyäÿ[rìº-ˆ6b¯‰cyù Xú­c†@nŒÈ†UžA¦ ·ˆ¦ýõ§Ú xW+í×_X|·aÙ”ÁE,ª{¼c“gðžïÕ¿ƒ·VÒ><Ÿn[šç:kŸÿú«kùЦZ+¶wL+ÿwØ5Ã1@_m¦wæ3ÂÇ;GFA9êØS»Ào@¢Ö6°4e¥74 ŠÆ$wÅ­—ù‘eñ4ôÑX˜nø¦…µY¦ô–êX<ñÙ jçïÄ.²¨Ùª—å +ÑñA¨Ü€V˜f°+˜JZ…:C ¯5—?ì¥i9§˜ Š.U”6>Ú<éñ…fÐ÷6t"Íã9Ê0çyª²ºJì}Ê·æ`|U‡«Àfòù ²$ðó¤5¶ë´9 ƒÖ¢”öåR¥YN“yQQÖ|±¶ì1;‡ŒùŸs½«7›":}T¾8jÍ ¿¡!)$P‹ˆ<ú:ÐË•¾.ë„5¦Y LÊöƒ!Ñr•¿|ˆ2â—ïIµ!¹ ÚcÍ-+úˆ/½iKÀ4n’ ®ä`yÜšô Áð(4AÀ<#ç´; vöÚ á%ÇZb8¾!‡¬N$£¿yuÅ»ÈÄï ¾áfŸe”Ê&Ÿ?mú³Ù^v×£1 ˳èÍa¨i¨{m¦EgÖù;]Á™ŠE&¤;ÉöŸò€FŒD Kñp^W ‡Ã^Œš¨¢Ãÿ$p»÷t×÷pûªPÙørKm®/š ”Hg²‚5À÷ºƒêԔȀËãfÁ[Æh ÃÀ̈o5„ïXè/NÝÁîéÄÎe ð)-2í*Zr®Y-é2ŸCêÇt’©W›×HWy^OÀ·úùNZO·+&Æ©©D~ü¿õvKì3©“²´ z?àÇT!ò|v¦¤Ê8*ñó®Z ¤|íuŒOÆŒñÇp/RBÓ;Dê2Jc Ñ>œsEÿü/:$å)E ÃÉÑkÖ¼>̵ކNxØ«Ã~N$H4@c(ïJ£ù›êaáøy¼+‹÷Å5Ç#4hÝ sÚTÓè ¹ãƒ^7|‡E#x‡UÁ1 ¬´çxb×é2I*ÀyNä§-A¨Å0/ïæG¥ºÐm·Q¯J÷¾YaÔ`hiKWNH`|ÐïÈhå³$K-Cò.çhÙa°ÞŽ<9‡`9PS¡iõW“‹C+A9¨”wu†Îà˜Ïõx¹p4d§ºa-¹ZÌsKfikJ : *´¸œ`¥o‰;‡R-<^¶èo +ó‹ü2Î÷§bÉ+µ‘oWRÌ1¸9+ÿŸnÝP.oÏæ8ÓŠä äÉ¡¾¨¦&‚ áGo/u€ÒcfŠÝd¥àC®p6+Î/€ ì´³¼OàWëQáµs¥œó¡Ôbãr]*&‚ÃIqj™âA*bA!!&Otàmª® …UãÂG.N‚N'×ÚvEÈÒzƒ‚æ }ÛèûCûæ<¦…Áw;Zª±€‘`žõ1Ìh§™v©LšöN$žÐ‰$ÝÝümü€ XrõÌ´ÖŸ±o7[”=m;>×ÐQz “#CK€ÿêgR´©‚ÎDæÀàǦ'2™p²rCýé¸ǦXCœyRÿÙëb%ý6‡6Á- QÓ‚ÖSw!a'5…骼0†[™HŒqù¥RóíxÅ•©‚íP@:S÷ÌN >ÚÚæub;R'BJÿÇÇ¡FZ!!É¿KÊ13L—ø†¥‘¢Ûu€ÞU…§ÔCU»P*mã ̱²ºw#ô˜,×-ãÑù¬ûhàH#jstm¥‘1=7»0šâ×¼Ÿp˜ €¬|€lmÏHG5”!-½8M÷–’‰ÇX„n‘ÇÔ¥ÏÈøeˆ±£gÓÁ†ùÑöªM/ì̵«|än JÁ)Ùž*YÊ-C•”`müQ‹'À " 7n.8¸)òà |‰Ô5‚ÏJ+—y›œFCÞ…x‘dâU&н®Þ¨­A7U6-À^÷>lŒß€…±L]îM.jë±0C·ÐnÂá#µfø…>º».€E^œ¬ùC4×?/UÔ µRžÅI÷e¬ËóÝmÊ>ȵ÷9“á½Ù]_í’Yq”&@-9{fJô-`1CCOèÇNϼËËJ†¼Óº coú"Ý鯪ñÅÏ€!Âêc^üÀ)Ñü­/”EÍ^Ö¹£eÌñ¶_tšeuBûG0?X\ ÿèRDe¶¶bÀ@µYÉ÷§ïª¸òDâÀoñMBC¦$Ská±àµ`o̽VŽÜôGè=;'Æëkö_üívEìÈqÅê%+¼¼&„Çd‰z­Ÿ¶ë½€Jtq*0š±Šõ@C¤ ´Â„ £%ט¥´²™“ç½mÂÕLÛôð„›ÿüH\ìó ŽÚI.*¿§È¡RÝ9 ÛQœÆXÌ;nwÜ|XÃE$p\NOäRK¢vÓ³KwKšæt=ƒçVôp*Iþçdß®³$rnóª=Ì¡ìšX§wJvw@?@¢E%@éLuå…zTîê# ½ˆn·vˆ%ãÏ…ÙøeûWhüR$®X¶ pWåøá–[X;ï(ü*ŒN¢ý®=.^ÿi“µD‘$v²,¸Ü×Α½‡~8j B‹¢ ÃÓaJ”)ñ¯ ¾xGâúX§+ Ývähq wCìh8kgÅ/ìÂ`@±ð±@vÀn-É™VA¸]ÌNs¥"yô]Oògﱪk;'ïcÒÙ8QíiJ<É&ºõô@-On¥*DÝÑu?àÍß›iÐ$UÎËIœDFñr/…¶ß1ý¯¦º–é)üëåúpNsßÔ'$ dÇ]öÂ$€/m¨aû8/™âÌÙ<A< ž[E!#úÚÆnO-¥"Sîîó¬J—¼ÍBxj‚rÚhœF~Z~íµ;N|΃y=)~ÒŸ9‘¶~õPÉÊq=kž+`"±uµ¤ñ{7føžùû'U›Ï®f½aœÖrv£÷pÉgåsX§}§Q\³œß̨§õJk¢ìÈUc²Íax»„}6ò›(Â,徎Uè–•†Ñk9²0=ãËb ïnL×jû; Ž¥ïë«öù7Vàªáºº±1ØÙI•{”|Ê–&aŠï 3üè↋5 ó(r­%Åé¶Ž‡JT˜q»î(ž¼è›p· uõ=È讥E¨C¸Hé—u¤<^«åôN7´ÝïwÚ§A™^,>vÞ üÔË8¯ÈU¥l-p¼$OO9ØÉë5Æ3®¤^ z4` OKŠY{ÀýôÜNctÂ)’LS?AC ”ðWíÅ-ÜGYK¾këçÏÜ ˜½<œóC%Öôt*šddz2'CàT=réxýn´;¤¤„àR“ó£dK(ží¸t]Š•õV§>Œ¬MH¸Ð,-2AçœYë/hgi ¤EGÈ}\{çwJXqFøô3³¢oøþìvíåߢWé%É\3ßÃA(ž?°cÍ~ÐÚÛHç<ÿÔ/ÑV2ÉÖÖ¬®õŸùxÀ¨,½S„ËUÑQs¨°‰êŠ~± Åg„jÖ‰SÚHü¿¶‚ÙhŽJi´mÀh³ã±~ž®†a’€Í·çvÞ°%VºAf:|^¨‚¶,j¶3å<(ì8•ƒú )P®§*fâ‘"Zp´xã¯eì¿xŸ}FãêÓEÉG¼«&lÒÒ9«·÷Qe ñç4½à»ŽOð)oµâÔûì5)XW„¡I© xubòyœ¤D|,êPpýèÉ]_£^…ÕQÅÔ‡Þ÷hUœ.„áéÒž ;pÎ÷¼!ŽLÔ䇔͖á M=oÿ{¦cþu{°W±ÐFu—`·zXe!Õ`ªì¬_ØA&šË×h²ÓÍ^ˆ›+û)ŽåîÈëܾ›,&6é÷¼ʽ„,á*4í_£ÇìOtrFWæ2M׸ãVâÌo µ}Ðu˾‰Ø¾¾¨g9ÕÀ‹>‹%”lfjn›¤êË2“‹žpiÉ)ïן*¤Äƒ¼5ˆ¶ÿåcõ»Ü&òÏ–r¬¸g»Ã‚¨ù¤&P?]úZÕØTçI¼ôÈ®}M½” q×Ëê û•Zågs¢„º¢Åñ‰‰\­Ô­ë‹úà€,¯}˜Ê¼Æwó´Kw:úOZV¦®{ý-ÖŽe£BeùM£³  cmˆ»‚èvlÜ!D+0RÍô]¾ÃëFµk}Y<€úÒ ´]#Íî¶8Î\úxxÔzs}Õò¦‹Þø0–Y‡˜/´B—I5[R$ qò°„Þ%Û¾à–¶›rûÜ…\Èz1‰ÆJä×oéiîÉos`O\œ!âýÌ”å~Ü_äÿïÝÿ«âr³àÄ ÅÉ™µw°Invkí2zF<’ {áÙZÂwT”ûiµ9*9juÖ\–fÃßTß ,¹%úew›¡ü0Ø- ðèo£(4¯a_~SÒj3þ,{cJ¾Œ>Vr…MT‘ÕÅá4D®ÔA^ ñÎBj¥Þ"ìô»€¼]Ñ 9%ãů§l:7Á‡-ƒxûÛ¡„º­ÌB7¼š–*ñýU_–)üŒþG+¦»ô­¨ÄF[ï@˱\'›57Ï„GM9@mÚ¿ŸŸí!ç hztßÎæÒ®N›IÃVP´i}–éո¥ìøÑµóPAçÿßùÑHwJ»‹|ÏÀ32ƒó áFôwÍfS>äVräàc«æ.ÝÇu‰ É7‘Ò±Á0@TcH§"¯™±T“Æ4ܰLÎÁ”Z"§ikGÅÁîÊØ=Uh¹i}‹¹Dd¡¿<Ö›æw´PàVjÌ9Ì.p†–êS1“mæ>H:¿ø{k~¢· †T£?rUÛ]›ÅñÄ!îñ!H8hˆaƒ0˜7¯:øEDá3¾‰ä¤ŒÞÉR'sû êɃìV^¼ºçpQ•—7lÀ¿ÛMfø±q9ú—½¶ ¼ãá¼Mš[îߎŒ Sô¢)èiI¯òîöH£ÛSm5VaZ„­¸Æªо$Ñ“(Ú …잣§ópj¡óÉ(Ó(²“…´ ~R{KÒÍ’¼²ä=ì8ðcªø+rbƈ့ÎñF®/ÅÖ#´Ì¢rÞ?5ÃxkE²Y·&,ø(ž}™á")]>Àž¹ÊŠ7K¤¡ç,ØÁ2ÒßqõÈWæ@ñ .Ô¢>™O{†ØÜ³—×0!™ìÙßÃ³ÕÆâÙ+ÞpWm±»L1J–t¿/üLK6à/O’š!د_vÀºq  ÇVcQi Àó‡5+íõZ\MÒYJÖU+YWcÒWúÖùaÌÙÇkO>IÛ/ #¦ã܆èG½±GuÏši›hâŸSK%.# 4KFÄhÃIyO—þW±˜MT‚QVŽ{az61ŒºŒiù—´fh¼›Ç0…Yšžg €z£ÖÜñ>Þ²‡.=·»íH-˜/~G'¤~/ƒ®„ùžûB„oY°R‚×ßÁró"ûªÆXdÔ!@ãf¤¤(gIÛ’º –è"ÏÁö®í[«ja?€ùɦ¬ž?³¥6R¼xâ_¯ÍÊ 3½;ÁÂx‰¨Zªþ…F7LLÓ9¾ÏkšˆjÍfÜŸëY"öâA°6ÒªÏþN…ò ç yWTÀ! +6%ì.¬§Uµ¨A³/TÔidÿ‹ Ù‚äÐÁâêTœ3?2%YÓÅJ™Ô„åŠ0 0:Y|›³¢T¬¦çÐÑ¿3y$hŸ0´KP0Æ "ež`„ÊÙr|ÅÁŸÀć8_[„ ë÷ÑÜ¼ÑÆú lgþ—ÄáA@Wß~Ã(I'ÐÛºâÁÔâËÉJ^öwA—Lóƒ(‡U]!Ácö¹¯øã¸…Tâ¼ru=ÓN4¤‰ òÐê´Ø/ô²\¾Û1ŒL®D¼¢&VÛh3;â‹ ÁŠvHCxCI8)«\'×+Îù+c—ÞÓ*7q+"ÄsUˆìwÛ¡ð;›eº³ØÆq.bDÁƒu)/Ê? A¶–··£Ä (غ%6ÍÍj-^&üª•™DE¾¿Åi+HµŸêö ¾Ô.º‘{Ê!³÷n£PMN1tºãCT}¼›qApòÂl4°fRä+Í ¡ÿVƒÞ±`Q×1£S(­>p„/¾[Š/¬ eŒªé®öC† uÎîÁð[_ÂC±YÚÞê‘)‘äÒ||;åÚªÉ.ò®2òK,onföMs¢½~„>œ¦m.‘Z&  ¹ª°zT©ûw•I|ÀXªßÂ=U7 ],›Œq¤‚( ÉÇìcœì­÷E¡­HþïPØÁZnpxºŠpGŠŸÑû~¯”ß©ÎÙ¶8WtkM•Åú<îäv-gÝ~4 ŒBÀÒ£0žN4Xú i͙Ú¸5¡Fà½ö># f¿&Ì`ÝÒÉ>kß]‘ZÁƒƒ’šå&û¼­¯VÞ–=3q&Íu¿Ö÷]ÛçëO?Tà?óe)Â,U@Ž´‘û‹+4Cü!½Ž¡s]¼cl¯tÜÄ·çâ)KsR*ØvÉE»Î׳Iû†T(A®$Ô#ÉE·²‰‡v/|¹â…º´øï‚™ªõ*Ë"Œ(†QÙæagß3AMêé>­k‡µu4ýï~t¹»µš1# ÕÛ©Ë^H3{5#ðûÁMYã®D(Äþí qˆÅJ2?s-Kä/ "Õ cúš7Œf¼*ý!AÊÉÑö.ðyd«üqªî°l7{¹ÃèÝ–s¨RÕrÜ¥l ¯6wø ÖeÆ‚’ ;-C1èeØpIO].y§Q^2b—ôa‚5Ü•)nÜ¡ûé˜^ŒuXóv.5¡® …¡õ†š­HQD°œ8Œumsô#‰g #L¾ÅŸ|â8Ëhbv›ýÄÃð ó”4-,ºÈK£ærÝ¡afÖ»LŽZæ’q5MSvÚZ‰ºï sÔ¨UÊù6x¼¾,7:gKP2°ˆñeÞ‚éQ«-Ü¿ºÕ ¼¨èxÚ>”ÁY ¨Þð'˽üÀä™VÈGjÓ¶®_‡d+Ñvå„å¸Ó&´½}yžïÌ•¼‚)–ËŽ+ä°Åãô›{Ðj€“@{Ðõ’‡­“‰´aΖº! 7ÐE}›mQ“Aå‰Côña)Ýv PBur! èõíéZOOƃônÒQ€ª4—hM…i•p`Z»XÄk)¢mÑÈ Í‘j]=Gƒ)UVL™ÂÛá3¼‘^p6m[Ç43är°u–b6Àah;Õ‰?š&ÕÁ>ÁYû5Â]ØTùæò~Œl9í>udã݇:Pmì Ì=`œí5èæ[-V‰hTðùd:‰þ;Ë´‘ÅL=$âV•A»7cSšýàU(Çÿ[ć/$¶Ì5æ/”äOùÔ-¿š^•v‰E¿žv<Hyà1b(c é¥ð?½Ð­ ÷ Ù«á½ñ5Æ#D…|h"QIö0¯gŠNl.zèÑùì´æAy]|K¦güø˜ì wdöëÈC¡Ï) éBñl8ù08!šJi1aÂ\X%í%u±ŒË¸˜5úß¼Ç|x/>wšÜX_ûÇ/Œsk~¥éç:»hxûËl˜ aųd>„vS¨±(˜Ä¥AσlÑÑiÌ9ñQ7Îf@ˆ±?ŒVÇ«Þ-) ûÍQä/ÍëüLu›/îCg=µtéö¹‰‹}ªÂ èÖ¦z8—#+3ÆÄ) ‰¯šW#ô[ ÊôK9Sê•ivËRUð³ÛXˆ¸$‹¢a\x1^²9OðB»[¿¡82‹\²&ç}=k3½âUúÚA©U» ¶¥÷÷<ù”]åiÀhƒêXf§Tž­¤uj—±tí€TÿQ‚ößq"“œ×BÀä¦1¨ø±ä)M¼ ¡Ú ½S+a›”N Θ#QBt¼0j¸#¥å6ºôÌœ6Þ´bñ^Ï,¹‡º))€†Þ•«O6ö¾4Ÿ§,…¬nRs3»†ÆxÖ+bÓ4¥†‰`$ÏÃ9Ó_3¨¢¿GZTÎn=ån ñïá4v¶2œÅ:ß"*ÝS#]Y1û}#ÛÚñ?VÉÿ=!‰“¯.«­&tšyÅr ÿëF/Dz?TQuG5*ò5Ã{©‹ÈMÑÌMÂ'e{ñm=šÌg†Z¤?»Úä8çétçh7p÷SÆ•.ÅXŸŽßN_Q–ÕoÕJMŠÉõ£Fº7»Yýp:r™ß‹‹Ž|>~ü†5|µù7rc_œ„aÚµ^ÿ:p³t’ûGaÅC~qÁW9?À“sñ­3²gáVi<•¤>1Yô#W»‰B (Æ·`žÒ†ÀÜûnÎ_ú'Sç“È»P­r¬—ªqI¨ßPooºSÒlì$%’þ€VM•öžÛ¥•H×Ö]šá§´-@áEåÚ²OÛ™§±œ4[y¤ýÛWË€Ó.Ïñ#—­¿WE“ÑO#.Œ¬G¿ÐmMÔ‚ü+©òàš®;¬Yß²¤8Õ"Ùer;…DGKb!nrÖ;¤'™sûÃÜ•¥O@ÃËhAµ«^šUwE'à9^výAÑ Òò7Õ)Ëu ¥¶ Çfh1¢žŠëEd™öI’É»Ý÷}'”¤ïÕZ’>ìÙâÞ·Å´#™Â›Tögi^Æ ~ÊжxE ÅÎ˜Ž—hüž9 Õû8sü68-×Ö› e]Ùlã,3+¥¥„wy6å1õŒ 4#¡:¡8v¡²×ðokgRvõª$ìe:2«ì½6ä»ÄÛ{³ß9x<ªE6¢(1è`9U)P”ýÕ³›±2"èm†?Oõ­m¨ï$#¬Ú«'÷–Êut\8©QV¦Žiø¶xvoê™GSü+t¡¬gÙ/y8êkéþ%gÝ–osu§#ÇC$wä>[²J{êò-§´é4æ=öú´øëœð œóòó`5"8 /اÝÁ_y×ßX÷týQrhªMèjìRª(‡”HÓ¨\ñX?vÓ ºLîQ%ˆEŒâ>ä?£@ãÝ!άœòëntqt‰$Ý©âÓ.ÇhBÈ0QɉçzOÏ""]Zºgv²ÑtÎ_¼îé̮ؓEÐ<)€Ù”Äf”Ñ‹n›WŸÿCHz‘½ÆCÀp·Fª!=Ÿ?9Ù*o¾l«ÏXµîì¦öq· ¨"n˜ƒ¦Üi7ªNSÏȤÒÕɇoÁ±EãI¹<ȤQÚ_í°ª¨%*Òb£hëËÔ”|&rân ¿´ì‹0‚þ;1~¹ø-—X\Ý‘¤¥O—½N/ÙmºEÁ«ãÃzâdA›Ë'H vÀî—fN./ÀØb…” · {gƒTü¾•<Àò´^õ[ò +Ãs%è!ͤ¨µGƵµ®1w¸³¾ƒ_¹Áf’ª4Â<À¡œ¤Û²“ND¹P€m¦ÞêàAözÉMÄh¥J_.?R´þA<k íœ| v0óáÃÔ:ñ—›jšx;Ö&>]Pkà—ZR7âXkV%Ùxð9¦±Õñè A¶y.AqÂ(ËàOé8“êþåoƒÍ& !<ÆÞ¡>ìüŠÐ[;|‘râ.ÅòˆÛOŒÌãß‹J€BGÕ¿çéž('€Ý<¸uĤÆ%, ô’Œsµ^œw‚Ö§'õ?{ê¥mèßj@¢?&:Ö×c¨¬ Ô,ÜŒz’ïcÆÌYšz—Äè¸S°ø/ïEI¢…´Þß32¼Ë÷¹"Æàv7âñŒV&øæj|{lUàmžv؉¢F½9-‚ÿbÿ’×Y³Ìëå—¾bY“»ŒƒtÉì†ÒDÚ¹×i©6¤ÅrµÜXqõÁ^ŠKlHâ•%Xö3ÈOÝ_üK׈¶ö1¿¯Õ„,P [mÍ­à6|³TÙ(sã\B48˜›SÙ÷\Ð7žô6µm©ÖAm¢—Gwàù ¾cK§gÌ㵨,:Òˆ‹$_Û ó1Ÿ²2›kgŠ-`o¥5Wp¸Ý+ù‹÷>QJ(­ëiž³«(äc1 ′Æ,üàx4qß oáF‰} ÀÅ”òzU¼—tþÅ8WwaïÁ"5 S>}þ>h‚¹|…~”œÈg5ºëº µ?‰L ô±×§ùÆŸËÓ"™ ÷'g‚*é¦NÜÙ†FA/(*XýÏG®%²UHå6ßñízRÒ²ÔžŠóÅ ¹7òâ¯xù`”àuãôª7ÙQ…°¨NdÈМ0$¼VRžDCpLÓ½åÒ¨Üwâ˜ù.NÔfÐ:väF­rÐ)Š3¤¸x`ƒÖswFw)uÃáS~\†² Cd6Ë|F¯¦,·¯–˜O’Ø#ù(XO§¾–2gÀ©ÆU''þ¢¦ç¿?ö\e1½Iy0_«j¿fªÖ_0Üœ±dÌýz…³i¢-vü»–¥Ö£h%~ƒ‘Œ­èAJ‘ð¸pËÑÙß´ºWWœ†F÷CÐo^…—VÇÙiÞ§[ÊFóÅf2Ý=z‡é“oyø‡]‡põš÷ðhÄà‰²@]Vgè‹ ?ùjbÔìÂÜIy[šÍ Ù]¾dê ]:eÍA.qr[5ø‚ãgÐèÑkò/mkúMÚ•ãr„"Ñ™Kw–©„iªŸT£5·¤c½ŒAˆ3>5­”×½BcÕ‘Ù4ÄC“C$ewêàLhF2Ùø ÔÇ/rž§«xñ¯0H¼¬áÓâ|ÒKœì£®®ê}Œ…¤³Žuik9r'2Áû˜³ØœÚ[Î[o@ì$ «hÓ½ž‚|“ƒYÁ{®]â]_Ò·1çÍS­§Ös½!\ɧO©pEÁ¤.ªÆˆ÷5ˆ¶ùz«„óRft|ñp)N°(YL„”zÿO‰´ð44<ãõç•=vÎzµmö|ÂúÆÜ3"™Þ{(AT¸< MH[‹öÅ“oõ;ïÌþæ]žíОëœA9aŸª†9äö›8ZæÕ!1Øæå™>ç"F3§Ýì€a…Dv·`î, ¬%). ac}Eg†eL2‘&jžv™„ÿlé¤Yà`DÌ6k]c“0§ã?'¯g¹E8ÅÄ™Ûy»º“Óìn®WáÈ„õæc®_éJàÝ/ôúØRÏó'Ÿ¬$Ê c Áþp(#9+›Ö@&#‰m;¡¶j ožÍ`§ùYßÓ!´ßÜáïG9ûÌ?7w)cÛÙø4ú<ƒÞ’ô4k —€6/B ‚î÷ó:dɱ"(qÁEºçÍÉëFÌmý£4ší<§ …Ôì4Q­ÜÏ9À¯‹ ?t–t6Zgщ;Å ~XlâtÍfp‘Ž©Waü•M÷º'Þõ€XHíÉ#»HµT"„À½V°ácabextract-1.11/test/cabs/case-ascii.txt0000644000175000017500000000020313371306106015121 00000000000000# test that cabextract can lowercase ASCII filenames ascii\upper\ABCDEFGHIJKLMNOPQRSTUVWXYZ ascii\lower\abcdefghijklmnopqrstuvwxyz cabextract-1.11/test/cabs/dirwalk-vulns.txt0000644000175000017500000000332013323707071015730 00000000000000# absolute paths - cabextract removes leading slashes and replaces "../" with "xx/" /absolute/path /absolute/../../and/relative/path \absolute\path\reverse\slashes \absolute\..\..\and\relative\path\reverse\slashes # nothing but slashes - cabextract turns this to just "x" / \ /////////// \\\\\\\\\\\ # relative paths - cabextract replaces "../" with "xx/" ../relative/path ../../relative/path ../../../relative/path relative/../path relative/../../path relative/../../../path # absolute and relative paths with overlong encodings of "/" # 0x2F = correct encoding # 0xC0 0xAF = overlong (cabextract converts this to 2 replacement chars) # 0xE0 0x80 0xAF = overlong (cabextract accepts this encoding so blocks the "../") # 0xF0 0x80 0x80 0xAF = overlong (cabextract accepts this encoding so blocks the "../") # 0xF8 0x80 0x80 0x80 0xAF = overlong (cabextract converts this to 5 replacement chars) # 0xFC 0x80 0x80 0x80 0x80 0xAF = overlong (cabextract converts this to 6 replacement chars) À¯absoluteÀ¯path2b à€¯absoluteà€¯path3b ð€€¯absoluteð€€¯path4b ø€€€¯absoluteø€€€¯path5b ü€€€€¯absoluteü€€€€¯path6b relativeÀ¯..À¯..À¯path2b relativeà€¯..à€¯..à€¯path3b relativeð€€¯..ð€€¯..ð€€¯path4b relativeø€€€¯..ø€€€¯..ø€€€¯path5b relativeü€€€€¯..ü€€€€¯..ü€€€€¯path6b # relative paths hiding after overlong encodings of null byte # cabextract sees the 2,5,6 byte versions as 2,5,6 invalid bytes # and converts to 2,5,6 replacement chars. cabextract sees the # 3,4 byte versions as valid bytes, but rejects the resulting # null so replaces with a single replacement char innocuousÀ€/../../relative/path2b innocuousà€€/../../relative/path3b innocuousð€€€/../../relative/path4b innocuousø€€€€/../../relative/path5b innocuousü€€€€€/../../relative/path6b cabextract-1.11/test/cabs/dir.cab0000664000175000017500000000037514367776051013640 00000000000000MSCFý,"^Ml"ºY plain.cJMl"çY 1\2\3\4.c½Z¦0——#include void main(void) { printf("Hello, world!\n"); } #include void main(void) { printf("Welcome!\n"); } cabextract-1.11/test/cabs/encoding-latin1.cab0000644000175000017500000000030713371306112016004 00000000000000MSCFÇ,Ò¿l"ºY  ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿l"ºY ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßl"ºY àáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿcabextract-1.11/test/cabs/filename-cabs.sh0000775000175000017500000000070513371306035015416 00000000000000#!/bin/sh ./filenames.pl case-ascii.txt >case-ascii.cab ./filenames.pl case-utf8.txt >case-utf8.cab ./filenames.pl dirwalk-vulns.txt >dirwalk-vulns.cab FORCE_CODEPAGE=1 ./filenames.pl encoding-koi8.txt >encoding-koi8.cab FORCE_CODEPAGE=1 ./filenames.pl encoding-latin1.txt >encoding-latin1.cab FORCE_CODEPAGE=1 ./filenames.pl encoding-sjis.txt >encoding-sjis.cab FORCE_UTF8=1 ./filenames.pl utf8-stresstest.txt >utf8-stresstest.cab cabextract-1.11/test/cabs/large-files-cab.cab0000644000175000017500000006367213323707071015771 00000000000000MSCFºg,LÁÌ#àòLj‘ large-files.cabåw²€[€€ø&"–AE#ph€î!¹Ð:ú(Ò³"ÞÞ{AaõÇBD!5‘dMYnÃ}sþåV bE‚PÃ`JF\õ~_à$4üšnfxù€ €L÷çŸèãBBàco„¿ßü~€pÈØ‘0 ‹òTT„DDGDÛäÛj\1œNVý+ïãÇÖÕæ¶u×[÷«iëié/ÿûê:uŸüFß+ÖxÜÙÞÓØ{¾m¯Úlÿ/Nà‰{pz›M€Ûb=ö¯ðnwé˜;tò N:ãŽý³†ÁW§ÑªÚ§ÔÑ\p“¯:õÇZw9¶õêpá‡ã>=èŽÖJÕwÁýÓª}È p(IþQhüï‹ q?âЗ5w|¬øÆ?ó˜ƒó·Y¹…½ýJ57uÛ ú–Í3{Ózêæ%>aKìš6õœ“FÕ¬´í¦>m+…”¯†„¤´>÷ ‘™:Chî#¸Ÿüà¶Ë°¶èêÔa~Õ2n³ÇxúeýO ¹óBÙJ½ó²ÞG®ùѲyç¾Ür*Ú1ŽGqþuGÛ©F’wŸ=å×*=SÊÿþ1+NÖ ~_¯¨ù­ðwœÍ>Æ=½ÌmÖ³lV[_sý¼#Qt—gÀß¼ºÉºÅDÞXýw’4€W?F?Ì;bTHŽNv )Ù9¤8?‡¶80€NãÅÉ$Ç';ìRœù@ñîìn0€'U’­cŠ“HŽNv )˜H&JîJ€z²IqÞ1{¿þsK/ël€ä½š×_V¥î4Bù¼Jõ§£¿gÐÌ~@Z&£4€}QÓ{2‘44;}ż$F€ç[”"l=D$€ðéÄhf$€€fÌKã¢$€ão"°x$€°9€øÖê#$€êò¢+à$€ð…YpÖ$€p~}([ $€€ô~€x$4Âz$€S4‘üˆ $€y@HˆÌ(·&€–ÌÀ·€b$€Àøâéf$€f͈û¦D$€¦ßÄà‹¹&€à8À’ùÌÁÅ$€ÁèDPÄ7$€Ät±ÕàX$€àzñ¢*à$€àüyšˆ€"€ˆ¸V@¬$€ @4ÀÄ$€8ÜDL$€ Èët(&€ît¨c@ß $€ yûñR4&€34o€€(D€H$€l€¤d‘$€u 5±¿±$€ây1(€˜$€p|€'Œ›J$€Ì@€Ê;Î1$€Î±Þ@{$€{@ú‘Ó€Üã$€Ü€÷bš€"€¸Æ$€€0‘9N·A&€lÀŒ·ˆÅ€$€8ÿ€¸Ëm-&€f µ͈k$€€Ï€p$€ t‘÷Ñ$€@÷zQ`$€`0ˆÐL$€Ð>Ì+€ìü$€ü€}šˆ€"€ˆ¸'‚Ù$€ xH¢iš$$€4¹@½$€L{qÈö[&€`@ê0¶ˆN±$€–ü1J´š&€,¬@f~&€Àlxxÿ€ $$€ u5Ñ€¾$€€ú1Ä5²$€¸Šï‚d$€ÊÆD匀Ø$€Ô|€Xõ{¢$€ {ñ"¿ý $€€ý‰šˆ€"€ˆ¸^€}Q$€}€zÑj–ùû&€Ì–ø{€Ø(.$€(ü°„`8õ&€Íu`Æ3¢ÂØ$€œáÄZD$€eÄ¢R$€Å@ÒM$€\5‘Ѐ$€È<€ˆ üÿ$€ üþŸ($€þ;€¨ §t$€w 8ÀÐ4û,Ã$€,ßDZÄ$€D~€ˆÃ¶%&€¤c¶ˆYê$€Úz°UÒ$€°kâuÚ~È€ýÀù|RKkÕèeà~Ū°1î¿Ò+w$ä1è*÷ê5t¾šÕ>ýPŽ>‚£|婟ÖÒË9­¿‡³Wp8„÷™A´îªv Vè¿VuCž¡!ÜÚu*ú?àñ.gk[Ã=]WZÚ™-5Ͷ¯½î»IûݬO/æ¸nVánî<ûƬ+‡Õ‰râí×#.zCtלön´;…‘¥‡­µù'2OÚªøuÐ2G†pÝ„?yÊSEǵýêÒ<·eôgúñžÊs…@•æç³•ìÓªú¹§p¬Qȵ¦¶ü7>ï;;î ¸ˆÉÆh]Ëf€aÿk«žZ)êìtýñ²þCÍ–³;g¼ž4äý¥~×€ëåÝðÎtµÂû=ºTÍÛ=(ÞØöúýž2ÒÕÞêèiñÎÀF\Fìo:N€Áè÷{ÊRåÞìèiñÎÀFß3)£šîn—OówF6Šýo2úËžÞ¥iÞÎèFñÀØý€Ëü$Ð2€ÿ2šgÝI1–ÿtNœì é€Ü­Ž9:€'rçdI1ÉÎ’Îc“$ÇìH}§KÍlð“ât!þT€fÓßõ€WO­”uÛ½5ÍóŸ4³ÑºÏàÑööCtõoŒÐÕfQèßùíŒtÎ[Œ‚îˆò•ef&€y’ðE BÜ€Þ$€†ÿ€Ø)êê&€\[€167Ñ$€è€ûѰwñõ$€Ô@qñu›z@$€`zßÀšÚAœ$€€Ú>@Ëà¢$€àï"ÁàwÄ$€wàåDšˆ€"€ˆ¸§+&€)˜;¨®pTç&€ºfpŒbˆíˆ$€€ÏˆÕ€$€àèà Ä$€ÉàD–"$€Øj¢¾{ñ$€`{úqÁßD$€ßåĬ©j€&€®±ÀläÅÀyD$€yÀáĦ:á&€²PØ|€ÌØ$€èD>€$€@4>@™0$€ ºò˜$€Íˆšˆ€"€ˆ¸´añ€&€zÊf;èç&€c§ÀH߈L$€ˆûÒXÀµ$€@m|€X#ØM$€´Øy{©?(&€¨˜)<€Ø%¢$€îï"¿È$€~åHñ6Z&€·Z1€6QæÁ$€Àˆáå$€eÅëh$€hψ̞c$€žèâÄØ$€àDÂ`³$€`wæDj{à$€ {î`Ü´$€ðåÄ®¬–&€kÀšŒlâY@$€œáÀp$€ t‘§Ç“&€Çìÿ€î5Þ$€Êf18žr$€rºˆé¹$€¹ÍDm&†&€S­ÀmbUÀß$€À}q""Z &€·`7À @„A¥$€tzQ<r$€l@t²¿€è$€æ}€hÄ$€ÀçDËà¼$€àï"Áà³$€àwåDu ›V&€µÕ 6Rú$€Âˆ4€È$€lÀ|€ˆ6?"s$€² 8"ó,b$€àèâÄÈÈ$€ÉàHÂvÄ$€væDáXUr&€òxÆ ÆÒû$€æöðzÐS†&€S°à€8ÅÀ=$€ÀyáÄQ£$€²t‘Í’$€põb&è$€|ð~˜¾$€ ºˆy$€ÍˆÐjmP&€kÐŒm`UÜ¢$€Üq"AD$€eÄÎèÃZ€ùÔ«xt pâµ¼€–üJœ0q_À‘5x-–½-‘`çkë½Úeõdöð´¨–­¶èÐRvßüϸۡéQÊq²l93çŸoU©uV­ªá\÷2õþ™~Ó/ômöò-~›ÝÔt«3þ®eU«¬•_mËVqEÚ¹ž¼¯òâ«r¾ ÅuÅͺwš`eÏš¹Æì…oÙ¿9IW½{oãžw×§fë¹é?¼M¥Ü´ôlFŒ?ógôÓ^¿ÆûbL«³ÍÉ s׿)G§OéÚÜôãWÿówÔ 5ùÍtsÛmmaÎ|<³¶˜³ñ´z»þ騱Qc»ŒlÙ‹šr-êÏsaŽŸaÞÛñ=ls׳+â¯} wÛÕt?Ö¤/ñ/Öš—éë^j^ k󜗫ËÏ&×È»­öZÙÓ±°X »O›žvÇþ6)¿©dúcÜý—½éüà£üÃ}Ì7ñUþu.¾®½åÕõñMÍÝJü‹ÝVæ<ï’öå·½YŸmËUþžg,ñ;?´©ò[{˜£Í°Mâ´žô}‡Ão-çÛ1»57ò®)†½ Ïwá~[³Y¸×1W¬ë¡ë]ßÔÊCèÔ9mULs:™©jÙ÷ó=ÍKû¦võÓ*;[ݰŒ¼k¶ªË×ò¶|Ö¾V‹‘b®9¯†Ìï‚ØÖØµ«=³sãS3n»Íd¸úß[7^Ò~ooõÍ¥¿‡ÿÓ³quÏ#éÇþlƒ6ÚoZÎÖ“ëÌ™½aïžüåµ›?ÇïüO¬XŸ7×äté Ë´m'Ü–mvÎ=~Y§˜¡q×5}ìuEÌQ—»¨,×¥ž1—ég½ð#æŠþÃí˜r}³·ñî¾A×Ç tÛÕœûüò¾N5ÅÍš0R_Þ5Î|kbœÛНg­W]›6± ؤ۳w oÊ›5v¿.²­qiì÷Ô›ð^>ÄÌðX\õ¿~‹7uñ¾Þ½^Õ\±Ô½ø¶M9Ý®ø~úI×ùçnybÚY³ø®+Ÿsç‹ÖS¼©ÿÛÖ™F›a“bßþðº…×ß&g:öÇì±ôò°—0ë¾lg¼ð›)Y'¸zz¾ë›*yëíU¡Ô”­ÓN=e+Ÿ9Ó™åê ü0 R0Ä€jÜ^»ÿ²·pºíH°”r7@;6N^rö=iûÄøÄ¾Ú­Rä‚5>!סÐ÷·üwÂÙî§õ<1ΤñLÏÜàÖù4ÁßYÝmî›ËzáŽ8èÅ*cCûAûwûǧ;æïV0ŠÃÓ3Q>ãÛ³&¾Ùk¶™š|Ï/ýÀW-Ò)Õî}#ÛÍø*¾Û•‡ïá_½ÎM½_wè×au_Öí#|Uïì}V»+9Ž®×{ðF*¨C5ù¿í~:&öêћ騼qG¿ÀyjâÇV5åNÓ\¦K<«©¸¶zÿÌ—‹Öû­¬«¯éî_•ô¡\­Vo÷ù»EþÍÏí­˜,ÝÝ÷ŸZ£î;EǺûŒ·&ÊxÚù­*ŸâRë·0Z ÿfë,;—Ʊ{éõ-ú…³Cü­—ì±¼´{N§øìuš%ÓÍ„5w•,”/ÿÀ>ÛY®ÔhïÊ|®èzSS¯O-mñy>]DÃÖ¹|°ºUYçõùz_ ¤™¥Ö7>#¯BÏùGíß,ÛF£@IÕÕÜç[l^€/Mð(_{~ê8Wçdtª´ ®=ëFòÅY÷Bhé0ðãÛ~„¡ccç ¥q2n”QÒ‚Ý€Ò?y?O½ ¬ù[(œY>€ATà 9à”çeõ³?'ö£ðtÅú¯—j2„)V~ÔQiQÜ_õ¡1è¿>ùš‹õû²~Ž‘W®–ó/§Çþrø·éÛ¹|©Ÿ¢T×tÃ~û¸U>Ù2ƆèLÔr/‹ÜÜ6Ñ-ôc¨¥¸]oi佨æ­·:êþú»Cͦ} ÏÀ™Zp ¬ÍörÂíÜ//ÝĘ)M¤‰\Æ5)÷Û¹“oå'½Õù7êõmÕ‹‰>­[¬äK™ÖV3¥Þ1zîzÍy{âUëæÿÙýÌe+ðá[˜b–£ïíõûÕ%gð¹§ÿb£}ª6{¤·3êê4wÕ¾€2R {3ŽV]§ÿ«®UGØÛwr;nÑÍ¿÷ûrÁaüLf~t›êÔýºï-’sÞÉþ6Ó=è…ÿ¯“9ëu¬¿^´H>×s>éðngJwâ^ɉêÝÇåMv³Ï¦Œph‰Ô¹Ÿ–Q¡+Žù¥j/Óyzk¾ï·¦Zþ×w\ü ÀµYµ\—öqÂíTÁðh††GC½ÆòÅúcïù2äÝz€ö7¯ÀJ2ø¾Zòðcü@Ê·lÉZ€·ÁÊõqˆç×=ÕF FÏ "bÔC~Ïö»šÞ´ÕJNh Áî@i8?O½ LÚ€a>]8P€y]=®›ì×KÆã}Âf©áßÁ!ÈC#„—q|ÃZvé):MAØ(-þz@ººXŽìV€zsÏ ŒWÆu‘\ÚCa³‡–Gªêú³¶mÃ??†;VŸŠ³ò½ùÞ”tт݀Ò÷p䯚OkÌúf€zz¥«?žsC‹FÂà…aäÿìøóB}KÍåPÄ¡¡SÐzÂüÛìñðc¯cçÖqõÇÿöÏìlJ2j‘á?ž7s€É´€Q˜=äV€zwoš¿ß€ŽKŸ—F ×àT¿öÈŒëÛ0Öÿ þêÿ£ê¯ÑPFKS vJßÄŽ¿€â[€¾ûÊj:€­byÈLVC…ÞOú­›¸ø!@Œn€dÀkÒd(7 @€úi[O»ÉõW(ë_)þlÙ×jCZªöÝ ì£ ?¤3’·]^«X€¥Åj_GÜþÂH?ÿÑF{x?7F2[jÅ5áÐg CïËõ:Ë͹€ö7¯ÀJ2í/üµäà©ñÀQ>>\€ɽ~å6öýyX§JiOýûE«nVYi!D7°oóÞ¶ßnŒ_[ñÐí³Ì¿JÚh Áî@i§4ÕŸ€ijÀPáÜR€sÛGÀ‹_oÈG¿™RÏ· …Æ B8õ<7jñ¥?k·ew4´` õ¶€ü;(;ù¸·X€Ú—ÜøÐDFä§¹mPèì!aÝòËÜ2¶_1Âô©þðôÜ1çKCV1ß”“т݀ÒM~ùë¼n@EL_ˆ`€³6¸n§ÖÜÀóèϸúê{(d>W3D=ÞŽ¢ððëËû?üsãìðç¯ÏcGNöõìÿÏ2lJïgÇßÐ[x¬+ŒGH€B…ã`s8üÜö®7¾BX«»ý†ž?n¡·î>”ÝÒÒ‚€qï÷ ã¨|üoÙ8€Ìwµc`vùý{6éÏi„‹Èèˆ d^'ðÍ@€iw÷´çª?_NñQÃíEªÚæLvû Ñ\(hj©R€¢Àõ~æúy·ö­M9?Ï©f!êðÖ[•Ó·õoË}9û¦ @à™W%/|»ä@ïÀV§ègè\€7¶Ù]gfÕŸ€äùßËÈëKcjõ?_‘¢¢SÿYh_?Ï{Ú~É1¿mFCÛ–æþPÚGS vJy’XýÙë€v€+8€¬Ü%¿Þ’¿Úwðûû=§T%w4@М“ë¦÷4€“µÀ¦0~fI_ '&htɼýð®#d€n|‡žFs?ÇS¹-#Êúï4K5®ýЧB$Û4v(ûÿö±6Ë…>sx„¤Ý_þoðÌà$õßo[ÇÐþ@_I EJ€~GûÌ€¹7?÷¤+gðìÿs˜ EÿÃÆSÐÛwŸ JniiÁ@ñ÷Ðøðy$<Èf8€háOñ™€xÓ²ìé¤?6ÔŸÑ-Ê<˜Ü ê@â@€wk–;'Ð%ñû¯{ßVüºÕ@¶Qí›ØF7@ظjÿx¬¸"”V€l7iÓ®Ïû ÀaðÎäFó#ÔKö%ù-tÏÆÉ€÷ë‡úœåÛF } +ð’Ì€Â7Kþ^ô@y‚oYZ€|*Â[?O«ó½ÈxÂû9«%^YízñÆíÕ¼wí÷£0ªî‘V?~2š‚°;PZó°ú€ê”u]DLÆD€ëîGæÕ@nz{ÚoÕŸùåÿ+?_|hˆ/™ P’?âÛX€úùèÌ# Ì#äcabextract-1.11/test/cabs/split-5.cab0000644000175000017500000005320613323707071014341 00000000000000MSCF†Védd2 Split-4.CABSplit cabinet file 4/5 €ýÿñL›F small3.bin@œ€ýÿñL›F medium3.binyšÅÿ{8€˜»ï18ä”nÆh£_–’·(÷0I~L,·ªÀ5íJã“'qû…/¿ëÓQªpkÉåˆiß<îý­Ù&å†9î¼£ø~-ª]Ó>³˜±Ýp¶íbÆþ6ƒÌiªK‹˜t-g³õãW;ò£t¬>ŒÕc¦a&z;/¨I#é·¤Ö4ß“ V¥0‹ãb㊈'ÿ`´&Ó¶Òf[Ay©ÙshPÿxkqW5IY×rÚÙ2’“‰~P;ØßÏñDk+©_wÂ4¥!¨ zö»~)h§GÆJwýSgfOofˆ2úø.Lmà¦% =ÎnU¬>nº °¤ÞhvâülFù¹¤Kd˜Vs‡­i°!¢Ë5é 7›eˆ2B¸%D>ÆMn¨O8á5ô–§…*²µë\ÄEø„݈ oÖåÍ*ˆeòÄú9®çÓâßF’óNØ ¶ˆšªŸÛäÒh²`ó»Þ&aÁÿtˆ¤{hç”pËÆ“'¦v^Ó¡¡ï]v6|‹x7?&\“ gbž V™ÿ\M‰|†8ï¢]Þ$Œ Ñ šIšAeÆ£J§#ó¥{¶@À¿´W€ ¯þTŽôê‚qPþ%‘”v²Y®Ñexʲn@ÿ8/` h/OÉq­{s ^Ú¬#” hf'ÅË]AUž2Á>wOÑ¡8©|yÜ ö©`ñÅ£®!§‘Ö‘íLÂb[DÎ’íOôئ‡=cÞ·MÒ¢ñtÞmËm³­ Š·;؉êýfLoíh ` “»íþ,‡GUbÿ`XÀÜë)£¥Ô&ÞXëu·ìùŽ §É$68WlØÞ•ét§4~è©*›ÝóÑv„Š$÷m¶'n—ëϲհoî¥T«ƒ”³ dÝ^Îû¢‚U ^RÕ±ðÚ{r©a%˜©µ¥ ¬gH‹I÷™J>ØZHÚ ‰¤µ¥+vî·øiì[x4ô1D’ QHkZ ,ެÇõ+ }rKU«½¢A™X‰ytÎÀQ¶÷]¼´èBº´ÕÑ|Ôœ n©m'J;N ĉ´gò’à}üO‹·)sDÔɉ‰ÕMY6uøJº·åÁ¦eí,®œ/"aÆ–gLi°&K|œÐo¥ëˆé-UYQ‚‡•‘s&jŸkd$âå)h²Çž¥ÄCßïïdLí[}LEšÊH* „ÆäŒÉöúóßh=)s"ž‚ojC¢xŒl«(ª±¾éô“èíÑ+šˆyð©ÄÔÆ‹‘þ¸²‚ú$¿§ÏY´Åì|ä,m¯7 …« ›‹¢—njnv»íK”=!zÝÍŽM¿-nuNTp8Í2•íF N´$'ÝX4Ú£U³³³þóSz|6U¸?Èy°¦gW¥aÃ5£„öóÈ£BC¼EiJwž5®„;$’ôÜü½à¬õErýÚŠN~øKç 6¦€‡Ùº!a8h!{,ˆ¾ºïÓ*JbaØ;C¸‰Üݺ=u·ý»äÀvœ¬À¡ÜïI-÷뢱*&Ut÷þ]+?^ ëfùl@ÉD¹ï‹¨³^ÙŠ“„v°m¡¸€ƒ™úh„4³ý‘Ù£ÞÎiH*<›€žX [¯›wA …Áô?,­ÚȪ1Øæµ²MR¼ÉQºq/‘pDzÛH°8N/uŒçÀj¿›Ûš‹5$…. Ãñ.’J¬Ä*p¢' N‹:Wð©Ûe`G*Þ¡Ï빪JŒÌ<Ö ×/C ëìh(k:Ç Óï&€Åvn2j#{½É„:´þsº¨›·õT\9‹ðœEàú‡®?5a™Žñ]N¤k¦Ü»d$` Þ~ZaY &KP3v&üˆîÅ ¥²üYÅ>>^Þ˜¯ä- C6šDd"œ¡xéKʹŇ  njš†Ž­1¯1yºfo¤Lð Sa ¨6à’.”#>îÃÏÁºöà=£1á€ù'0[›¿cDêÓè¯R9oX0–·•® H€eexßbº†uÌû_—eò+Z®Š%òø/r9p„h¹]÷N8;ÚÙz–F,ùïòb¡zÐVÖ?FI k¬ñ]31ßÓ'Íßp€N+‘ò9Í\ÙåºioXöçqÉÍ *º“ìy Áu,SÜçƒ@Ódû‚W ýç²u#”$ú/ˆ;qdð‚v.L؋釔QÏsoöŸœm ÿ×ÅO5b„3.óÜNÒò]îzx2“ÎUò²ä¡˜do©ùF^yŽwKV;©”P,G±[Íãî9¦à…û:ínÖ`ÉÏ3åüV ’8²o§´é¦9ý{Ëß]»¥ ú4ï—ÿ#Lñ’lÀd|­ùTc´_ú$‘1Ðé].D°}˜AFªbns´b´ƒY ‡ëüÐIÝÏ{¹(FŽÍ¥æ½ä<y·\-æ÷/NC šd´D<*_;޾™ÎqöšÞ 7þ“ÎgÓÈý¡°áöWÛ“#ŒæÚ ¯ÉÂrÃEÃ4ó™5.`”õþàõáˆj¼¯@Øsëì»Ô ŒS×Kuª32_8e^x,n!"pE‚Ëß‚Ís>ÆHbÅz.¥ÕÿV™'!Ëä]Í_ÿ­ÄämÇ¿ÑÝ?e5ÙóØ­¬èøÓÐÚŒZ}ÅÿÜ"cV\eÏÕJô#Õ’R3ƒ?­Æ‘Ù5¬WGžœd!TÜÜI™_-»Rhy¶§ç™æÊÀ± ÃN”Û¥c £)…Ó ¾jb\óŒRb!©ã|k3mí›RŽ<ÕBµ§£,^æÁ\˜!iÛVÈÖEƒ¸Þ²›÷Œß4ï÷¹Ð €àcN1ú¸0}y5¡‰ˆ® ¸µõ»‰Uù0În¬5H¾ÛòB–.U¾aô>ÂYÇ/×.øûïÆ˜²ó ^Ž…’iŠœwŸÿ:†Ž1eà0ðˆÃlêmJŠ}¯È¨>$ÈG®\<4‡r¡·”¢6@–JvZç+PõS>a6?*­ß À½§´ÖÿU3'hìÈøy², q˜\}÷jFJµ5P… ÙÌ@²ðå¥lîºõ<±˜u<ØF&ÏŽ4ËÚC õùFé^XÛYv½äˆKÙˆþÆNË…·Ó@ÞôŒ$šªæ!Æê³ùªPš”–è¬Hâv¶º+ý M{÷º¢B‘Á&,-/¾¨ˆÍ|x³3lZ›Sé W ÷O×g-5¦÷\AÉ»‡\VƒQìÊs-åT¯}‚"䣕ÚÏ.J'/`7©P¶›kb»[\?åhŽ{"ûü ÙÆ*PvtJ=Ò= êvìä!ÓBÁSaÓ«Þ©~í+tòå,ÁYÝÞF.!Wöá7ç­w:…âNôÃ׺@äSó.©+{B($&=ëÏëüÔå蟽ٸØö¾Paì~ÎÃ^3öûî1n_/tè15œù!.#!úÇ·DDh+¬ä`º°dL"Â5·½;o#íT‰›n%Ù-Êñ= èD=ýƒÃŸÖb*öj¼Ù¥ý&_»U—f¶¨åYssöʘÝR=›Ž9B–ðÅb›ÔØæurhB‚kÌÁºÛ•\ê©b™¦)i™¶.¢Íl£&jžSßJS RäMù`híúÁád”Ÿ!¦hüˆ÷^©‡^ª+X/»…>­x›‰©Æ‚L…¹vê@G/!¥‘1c¯ßÚP¹ âYÛG[¹9Y;lWõê,G™ž°¿©é–D=ÀR‚WËy_ÎÆ©Sb¨›<#2V½ªöÞ¬4Ô·ˆËÂê?·dc­ŸÃ7<}ÄK5·RúIÆ(4lžj¡£Þ÷‹ŽðiR,ÒÚ’,„Ô¦RìÌÖÊW¬ 8QŞȈís¨¶BÚLr$t_’4ºC±úvz–X ¼¢˜ÀK–•Äõóê•«Fìpó…IüRÞo_î©Ïî³€~Nî¶DÍÁ°1âéI•Ê34y"Ó\L0M„íR$Øi^Æ•±Xç_å+ÖÕØ’ÝNu$ €ï$¼±SÞAš_P©¨>j6>¢3ÀÙž¡1œ‚C'³@æ“7Ý÷^}óX/x¹·³_åÕ¢TUî„msO5uœ«D&ìb»^<Ì2Ï!!C¤}AØ`*Êÿ[ wÊÁÈìöƺî«âpª2–¨Æ¿Éb%[]þW®n¦E IEÖsÏòb6c­i«é†ñ‘9L«‘˜ñÈí{>\é[r±¥šrÚyÄHGÍŠZ$ჭ£ h*A6v§­¡VbüÇ×0zäéXô^µa‡Ö‘¢Ä¢¸I>Í֤ߖÑñOVØ3ÀV §Ísù ¼ÓÿpÞÇUs§˜@ÒŒ‚­@’aD.BŽë±Å|Õ"iŽÜ‰ Å̦ŠR¡]Ì'Ù3ÝÈ`Ô<¦<ªÐioó‡rä~ÑÜÞÆR›Ìoã²µïÃþÞç¥éù·8žHaªõ%Å® u=æ{tµÀ‡NÇ×Ò‘àâdlÕq;ÓUúHglâòÚhã àŸ4¦ÞOŸ‹jÖrBèS}Áê¡â’GqSª3‰Oã.k ’…dŸÚk8̰=ßQQÿ7 îs}òOVج.è¥mðÕ»\ELyŠ,Õ@âœv\SH™!)%ÕÛ4oÈ ž^/ÇÇ%F–þO;+.;ÝÖø ümtb….®ZpÇþ…¥ÙoòÝr^ ÖÌTçÕØ%Šró<1åj_ˆB;¹/¢¼ë<5ÅÞ3÷3Y…•;°æK+‘¦›DWî•g}èøK‘¨Úïz ;s6nYàԢ筲†—¡Î»hòü÷_ß„ú^èk£¢"Öâ…¿ÊײB/D’ÖP`“RKña¿©6&j)Ø¢î2E"ÞEÜ/ÎW±Ÿ·cAÇ|-f>^kÀ.dÝ>W C˜7-õ,EAû šçæ,r‡%Pü.A¢#[¤DéH †õ} Ê̗ݬ0›LÀ˜÷w¼^¾1ñ¾ÍsßrQŸ¡yˆrä쟉n¡{Eu¦µFVóÛ×õ:åõæÐÑý3~Õ"’A!p[•}ƒ™ßa ³[¬h…}HŠv‘óâ»9"¨°\!ˆb–lx 1 VÃÏý‡ùeÖMp)w/çᦒ€¾^z ›“9êMœÛƒîñ‰g-Zl¡ó4¡ll sÅBçŒÞæ‘–Í•‰ÈyÛÜTïAªuk·!·$f„Sç#à¾a¼ *º8·/»±k †¯Pv=ÜÓSëå5ádìÖWc;:)qR¦Ý´&â  °=_¬•V0»T™~XÈræÏ®èÔ{ÁvNxwÒÑM`l¨Qj€bŸÌã;Ü™-.>ðï0•–)'Ã’îi†½sAOIu8‰üÈ–SU<%ÎÛ™ï\ÓùÊlö tv¬=;wȇ4~ˆ§ØæbÀÞeŽ÷eÄÍ”Í ?OµßÏ• âh‚@Í Û¼²÷jºàí$‘? ²1m² BU—‰ km¾,S‡pnGb„Á»¥Û î³CIòáJÒÉb†e/ýEŠá)€p¾½¨c!×bÎwÀ—6²Ð¢4b9µÈ &¶¿…×,–÷çLÓiÕÝég>:åK×ޙϸI±#Ô4q*¨w0SN´ÄY˜B–Ó'w¤ÅÕÿnEåÊDäÞ®ÿ)ÖuÊpqîW‹¼&'î­MXÅ„¾£ôo(‚@cX’ŠÅ76“.Ïw~ˆ´¥'uì^ v„êz'18Ôxôáã³î/ptÉSu­;ÐÛ0´µ—»tiôk¹c–É'csÂ–ÉØ„’—U\öª4fœ­Où¯ ëZbé6QÜŽ_Ìò|~Î@PKYtít/‹‰D@U| U0²í?ª]å…Sj:ƒj­ŽáW`äUmÀ}‹KͬïéŽg¬¸¨®‘JЕ"õ^ ôP䃥GW´Œl†+ÏhK@R]Œñ8Ï´— +¬é ²wú šÑÝÂòe*+dP¬2bfE°9ͺ¶çêK?vÖà“pË,Ë™/Ï0VˆCé½mjä»ìöÊîém[Žc¦e¢tR/Žø„ó6€[cj:ñWä'O™Z?J‡ÞÜÈ•y+s¾B®ðB(jF‡åš­ðn3ôÇ…§Ê0Q°·¿â_àt—ƒÏÙªæ¿öŽý|Vç¢p©Ÿ^5šp<ÍÏÀÏ\¹¶t…-¶X°§øò ŠÞ+ùîP91:W9³œ–-®žw@yWæFÎÑîµF }ªÓ^E/x7ETÝ—\ñæB1¥[ôð3)œ§fÎ ¬z%×x¨!žór>¦Eéj¯r°WÍ2î섵TwH¦Ü¥¤|?¬ ´ó?»Ó cŸùx’î/æOtØí^ @ÞÍûGí$âaG¹9Í7c»‘|FU5´Ysdûš]/ôYVsïÁÒ-†¢Ãi!úv îö%#HÑõN{.—mÊ{gã™vùó0æþß5úu×H{\ü½1€Þ ¬n—9 œ=Õ‡bÕsiÖÜQgíÅOŽVFyv5üÙ ŽsõdV¸“üÓã7ò3S>ùR² Z-ÃÒ6Ϊ™¨³ç†<"¨ir›Ä‡©SÐX1àÒ!w!“÷·`F»9Ái&jHeÿô» T˜dUâ÷†Þì}9Õ_W“­˜mÿ9=ÈÚs=„-Okjˆµv ª¼P5¿{`ŽŠ3ÏBì‹Ï5±Þd,Ö_ĦH¥ÞH¦¼é«±#^L¥=·­÷™8ºÛÔŸ¤`ô†«º>|ÓoNèü¤ƒ“>lâÉ„ 1ŨéM–Ì€¦OR8;­¬§üq›}$ûÕbE¸ìl<íf˜!u i)εLfÑäÓÈX]‘ïéhÔc~f©*æ 7¼>Wì+aÔ^ò‰S«Þy®Ê+°ADFQ:O‰¬¤iÝ×6ÃÓ w1Ý—m„o*Îâ¼yίF µÚ'b©xŒ®zP×°ç \]î·çÓäRå”'’ù`H Ê#în…PöàOXÆSnxiIj&e“!eÈ©4Ïe]b7X«æš«Ø›ÆûP§Âœš1ꪺ¿È0гxå½®à«òš‡"e­Þ°´ÌZyŽWwÎuÀï•{ÆÆÒÉtX6ARVôÈ{¨ëÐî+ñÑmÇVÉp¾w—çþ{žv×õ…þdŠƒ¦\c]›(Á(ŽØmÇÁzf˜-<|&ÆòÇÏ¡š4¦€YLSF߮۫H«âº^Ïô¶+hU§M®ù,ãÔ¸¶ZÃÕóŒF¦ F-†¹q6¤y¤kÊ#µcA·Ú±«+> ¥\Dù»I(!h@óÑ ß5Ñj/Sõ˜Ï€ÄÞã£vž7z¦É–ÎËÎÊŽN¬¼VGo–_]:‡DGÿ·ÙØIKøn–ýA©såQ?ˆ(Þ̪ÝÿÚô]õ”äÿh:zåË­º‘Qßp`NX•Û"îPÝB*.S‡DPDzh î×#Û³œ9A•\èˆí¹‡@2\Ý`uå•19ØP0ÔZçßX9ŽO2í´+4¹0(’6Äû½¨_M¯,þá™lØ}©{²™eï<ŒfeP¥‘äÁ8ºâ“D%·wŠ²Ë½>Ds—Üà—GíËø¸_YçaÇ ± ‚Û‹åDih³aµ>pÊ4ÒÎòªèŸLBÖpJЊàPpÌ®/¶Ø»GçU1¥·+•Ù( =ü/¾4cÁ}8Ï¿èñ åñà‘ÖIluÐäoÆïrh£¢CPäýJlÖÉĘ¿NUuÆŒ%˜è½ÃåuÀòãøç"6b{˜#³$±¡ò>mÇRuû£¶óU‰Ñ ™Nv ¤s½³ë2ð’¶8‚Ùxù+CÿAsäôPî mg¢ê.ñshM瞃†-¥‡¨¦½¥Ï/«QÚ*‰üøiâöIê2¸pçŠeþxrY>-ýÛÑŒßǘ*¶ V‡Öú÷ÂÅ .žS5ÍŒÃr›²_#lbE}ˆÛ.ù¹€œ• Òë2h7«¼ý§i€9È‘W¶‡>) ëËH"i;{Èx à{¤cÑU? C…Mê)³›ˆUèIƒ…j·Ty>˜U7’Ef齼ƒ" üvf¹ôÑ £ üÑ%š›@i(´ìlÀýOG«¡ï© âæÏUÉÓ{ÛµKO$Ý/!áZ` —®u€é-C!ÒZ¼µ©ÖZ„iªô÷åP›6Z+ØùTxÉü=Ü^A,|ö  î5¼X@ïäžÜý)× ”ü.tò–ãŸ$¿ÕyíI¼r8§k¬ —‘Î,Yê ¨Yª/?#lönÃà:¯cúf[Ã1mÜ×.(Ó×í°óbHgb®ßsþk­U«P\ѬT¿ªÏ™[<R‡¿Ó§"¦ûG¡&Hǃ¬_‡¬à;x·öêÀKÎ]> ­óŸ ž…:ç%ô@P úªK„Z)BŒn‘¥_²Sn|ÙròCf ŸaÞÉ5à&qíø³Àõ{G­ Œô£wâkÊ\`2\RÔ’[ÆßX‹Ã°e‡…cÇôfˆ$}„õÇ iÖ+æò踃ÕÏÓzG¤œhQ‡4õy¾ø›úK+f{.qÙH&îôúuŽŠöȧ:ždcˆ-ìBö=ñŽ•ÓHK Ï%lìqsÞ3ÀqÎ*rS„‚öþ3µöQ÷DÎaÊÍ–[™r„õ!F«¶àýôh¤š¹ƒDŽÜA¹AtÌ3¤µÜ“¶¤Ù8Ö%£ÂÉThÅ>Ä\%¡¨»ê¡€Éy&:/£L#¢u‚ ºpAF$š= ðâ$Ç]@fÃ&qØÞ&a¦Þ‰j±¶zÀ r~>7³®çXK˜ÐçkhâFBŸOÿezàÑÓ¢¾–(5ÜÿVyZ‚¾<‚‘-©AŒš÷8 ¾oTó1ïa× À5KÁ‰ôÐŒ’¿‚—]Ñ ‘|âæÚ=¦m ö…]Sɉð¿Ñé.3z¹ÓÖpYq)2cŽ^«ã•ØÀeGV¥‘Ê˞݊Åß`žDŸ¾MïGð]>*H¨”_MZ*êÚÁõÜø£öïõ.jQ–ÌÐêMñŒŒ c³›†’`§VïÉ !kêF¾òF®ãNÎ`ÅÀŠÆDW"¢,úçÔ#H©ñØQwÈþ@Œ‹‘ÏÔCPîÅ÷&DÊã«($ .¤‘„{nèÕMò²&éâ2êÒ9ÜM0KÉ£Fù€ù×,ü{-L¨ƒà ÿ¢¢ íàJÊ¿\óx<®‰¡³0üä”®ÿCsE$MË×·yz -ÙV7 ¿ID Úè6‚FB¥D¾2Z+¯µ…Ö'âÔþZê§QÌ¡-ͦd4àß°ñABÜLܬôNzøWVÙv¹È¹ ÍŒÉ[åµCHr‹¥ìV؃r@¾lŒ8[lÿMPÚÞGcð(÷n.ò&ÉM ò?'‚TW˜ä(Jné”tbî$÷ŠÒËTºB‹Ø’–ù¬“¾E® ¾b§SS…¿¶ƒ>£?T;ò6gðÐG´®C´üH4£´òS ¡ƒàÑxÌâ\{z§ÚÀŸÚTXÝQf…O¯ŸR_Ü.^R3êì38Ê…7Í#„Á”Wæ„”Ï@FQÿR›÷Ì·`´#šá£zL‰á¥jBìg‡! DÊ 1V À C<D°Ê °„HÌ''ð ê)šê§Ì|ÄÛ¥× Ö’²|Ž}dÉÚH?£û9Y/£­}m{›…ÑwþýÒšµp†xÅGÅ–3©Ãl¨È)¶/€ÆÜqåŽÆÝ<9(+H$ËBKßÂNªD¶—B²!6¾[ÆH3PÙãº*Ðþ·MŠ Ç3 ™ bi…e~¾GL&H* ¦¸Z¤¥è,ŸS>fï·¿"’0Œ{Ÿ»rä=Ø%É—lÒ ÅS—£ÀçÇ5||òL£2’;µf‚ÖilŠJ»×˜xØ/œNÚxþ®®‰1ÇQ æ"§µýš£þ/£Ëзúõ™YË’3žjúÙŒJÄ¢‚9U®ùÒätæõ è­-\…x{z%À-½ÆY¨Œ ÏÄ~g6:‘ˆþ§u•ÛÝÝ̯y盤yrÎ-!̱Åóp7ËP…Äí1=œòìHm0-G¸”hñÙΊˆ®7ßœ¥ëÚˆ…c d_ñó5]}éöîËÁÔºùTIå­é©-ŽxÕµ4¤-nlÎ’‰AaT¼b”…e¢Ûuü}ÃHLÙefû`°¤3GÌd›`”ËŠXçvöOÀÙA>GÒRGNõ4Ü«vó"»€Ú¢…™xÕ:Lʺ¼¦éÊ!Sø/Ûí¤å…’Õå\‹Ñ˜£m/¸+ÈšCXÍV‘Ô¼\Ò¶]±Š`…âm.2âV=ezcGäÝ©Ël×3ð¶#šÏ–ºÌ(³J™¿î×9x ±™®'¨úŒðýOL¢X³G¤Z€ý‰¢ WÎP&®Û»£ÔÕüÏã•Ô%ÝÀ"#šY¿=¡É-ÀêRÞŽÞ$-…Š`FnR%åÙ'Œ¥*lÌ4ý·^¼sVàåâÝ‘N[*”'±þô¡än§v¨ÀkS<ì“‚ñ¢¨Tˇ€ù)–=}¿^ò¯sx Ä‘ðx…Écì)Å¥Xc$ŠÝwá\XM/*4^ývO¶o¤˜Š•¡©úÿ>™…#&½{Úåü)Ü 5ÞŸ°a5O¥î»|ªé\±7 ¦9Z Þÿk±©Â‰ÌíÐ â'•ÕÞlÓ;ËgÂÚ‚„v#QÒ¾;ÿx@žÓ°Oø\ U»ðiêæŠ‰ò¡Õ ph5_”Ýȭ晇dîyuÍd–²Y(¸ÙŸ—îoÿ^ûèÏ2ÍØŽ07ß„…ûõx½‹ÃýxÐVOÆ$©á1ì6 zc¥ÚáÙ<©tsë™`å•öÆLŠÂ*DÐé'Ú2óXIû~%üo2! á¹w–¸õž©0ÐYØw›êÞÀòWéÏúe™u‰Ì¥þiI•KÞOË3¡ìö_³MIÌŽè:8«hoARVyÁ (˜‡&! ´ z Ó| ØÔ’q-ƒ¡gX)¨@³¬öÛµ’~ö÷©<†ßCÃSmÖf&¸‚\ƒ>¬Ú~!H}¶‡Q»;qºî Ä× VMÁS[Kß“©ØsYÏhÍ ìŠæV±Ø¯«®0 ܇6Ì 2ÉɳLU)êC}ï_ŸQÇ ]2Ùî<Ö³ßm3|0ùt…ÕV”s†~¿'aÛøPõjôªWŒò RüÎ7)ˆ­‘ön‡Bî÷–†;?¢Çf¤Qáç¥iQ­4'-7„-d‘†qp¹[ø#9£ÛâiPÿ•8ýjæH¶_øŠà`ã¶œ‘Š6æS.< 5‡ùæ…÷›â¢¯ûù¤©ÌbË–’q@$N‡Ñ:­:aUí‰xØÐR;ê‹ÛnB¨U`Þò^$%Âgú¢­Ö_`ÙÃo]o‘é=¤ÿس¥Ôe›9UŠŒóû-+/—Ìð6§Pª|ë‘¶&f kÝž½(v…sœB2æÑ`íC4ë`Û™n0©¶/^j 1Zu·/ˆ&ûa²ërÅcEéÌdÿ~¡Åöˆ iï_ódg;~˜9éË•Tܯ|6©SÇHWA"éÔ±6§ôŠ·þ‘Ï• ?Ùt˜¶sä‚•"©•Ûö²ŠN’µÓÖ}mKâNƒtCãxÆ’;€Ã^žÝ…ÇŸu]\}B™ ®CwhJ{éôlÕ´ƒk¿ ¿ˆu´7 í”쨩(\ôÅQ+Ž”ÑÕÉ&/ì~"ŸÔ½ó”â“™)â¸Ý :9›ïáÕÆ-l$KæXß)šºiŒ±Ûߤ^6”²Œž¯MåéZ…õ4tÉ“Î/`û3µ±°8Ì)—(”u6Q³BŸÎD±a2C&p ÍçAþ²Ña_à+ü¤>ºO–ñ©X3× þ¶òì0›ˆ§KÂÕ¹q©LÃ.5†V!NPÑs½{zÆ.š¼ßÀÊOšžƒ]¢-·D*—LÍä7ãµÂ6Š“M hf:?ká¸U-¢¥ÓÁE»—¤Òš„¹üB¸Ö ÄIýV€ VÁuYû[vD‚,ÿ‡~F=UÁœ‹ë9pΣ@* &›P]@ËòŸ’  ¶y“ÇÀmß8n„JjÒÁ òZ»å7qϼ·ývâyu´Z^6ZxÛéôõ¦¤FÏXöga«¥+’¥«T´Û5ÃÍp?ÿÄ–MJH­UÎÇÖÔý<òC?–5Z¿‡íUè°Rå +zÀPrÛ.wz´¶‘©›öD8äÞköG~èåí¤ï§T0¡‹Óž}ÏcëÔã>¬c2Ê)¦'C+²žQSáѵ÷ï¹X^AšÓƒ»KHQ‰õ,”Âg¥iáþ­h1¿m„,‹zxÎ÷Vgþ{pŸ¥u®e­”ÒwÇWmà uÙÁôMY,AÎAµH)€ÏŒëmšQ&jð\”'"þ烾8‘î¾s°|½«1ÜçµfEÑSšê[–î;ÞUº{‹8Ä":PŒi•g¦˜üøq‰ÐËboR”)cºÇ¨¿ ÿüiöƒD2üÜ—õªÔP}OáhF†µ_oUáœ!Á 7tнQ/R7a2B%(À‚Êæ 1· µZÚ§Uö~ Þbrˆƒñ¬Yj7n+Ft¯á;ÿ"ɬÊ*]-3Bæ'êÔ}k~4;Ås7”ËNv±1Ü=;¼@®Xöêxk‚ä4Ÿ¹¸iÝ„éQIœa{RôH–wÃaí&V¦[D¶+/¯qu¾L²I€bG=‚†fÒðÈ|í´äETn÷y •¬ãC÷# :q¸i|!ÌÙRdkkS®î8c†x]…-=§•@ ˜)¦u^à)@_Nz‹á,?úYwÉ\ÃÃ-»2Ëâê8¡€†ês½ñv=á0DµLë_[ª“–)ìç~tD!jUÇ'䥯÷˜}ûºœqø²©‚J~,¼ò§^_Ó ?&.ž‹ó zî0—z;ù%ÏÝ~¿%GšôÑeäØ5#¸ßã’LÓðäIÔ„¢-Û¹rá ›r8lÙ´Â+ûS3¯ÿBuüÿKÖB2%’^Pš¼‰ÖwwP‚å6Á¯8e¯áZ²}5/âÄØbº‰k#Hiû9rI˜ÛýÙP:ŘÙÁc:.÷UKŸêüH|(Âô¥„Ì¡¹ÔS‹¸½BÖ‰ˆF‰oÌ,¸CŸaüéÃÑGhƒ¦Ë¤8 œL$JJª› ÑúÚ'àQ…1S·Ùæù´g³ÜüS¢ïŒˆ¦øt'‰·Š;çžEñ¾YÄ}–U"Pú3{P uÔ9è˜Ç d~., t¹J곯P“ýO¢„ð|³QyÃkÈÆÔ;§­ C¢R˜•@û7wL®å‹’f·ÇD¿ðÞ?ìέqŽXú*´E¥Ì`ãi­Ì&ñï:•ß Ô#×£ÊQ‹sÌUM oÏçr_w"Cšÿn.ÌÚ]ȧÀØØÄPÏ\Êí-/ýg©jÛJ¦ 7iø…j4Èâqþ9zÍE‚½ Ë÷‚3¿¥<`Åâ,,k#°5_}‡é ½oÒëEÆn™Öúûâ‡MN-'Fh|yéÔ?·$ÌÙN¸5·œùÁSGc,‘©,£6X¨þM'îuæž,Ê®"²º÷ç ~fL3åíˆ̼}9‚n?ÚMºKÂ]âᕚeú®þwPôÆT4æzS‰á@HpŽCÆÂyʳðI¼÷8¥³f¤êù\ñù`I%l®Fw$Ï’NÄäì™ ã&ôa´ánú¡ê-‰RÚij/7‡¸"¸Ç£ú¹ ¯³zWbÖR±ˆˆkrñ‹@/;ÉÚÌERÚµ ×Ñ$™¬~„OHYš>}DI33jR!%O/g©>6Ofðsé æ»WGº>"Þ‘MJ‚ÀöW²åj€UP´”™º=Î`õ,5“ü!ÅÁ¿Ÿ ÙXSvé}Âaqi»«E ëè$‡Hý¤Ž‰îr9ýÔGðòQ¬¿eú(I¢¶ì_ާѺ¼Ûü¸ågßm¦Å !9òÓ„›#®&ð…oU°ar»0Ì®c€qórÒÚ†ù™+³S¿²¸Fköo2ê]2çöå"Í6'ÏM 7‹û=Æ}rÞZY—ÊÐÆI!(±~|ãùåü>‚qT·8'â{"N‘2Þ)åå—–š;ï[„<_»I_ Z»É’4ã>ÔçˆKHŽ_^Gä…þ f™@³Ûo<9â š9"§´í3DT‘tÚc‰/ñPÈhGQRÁt^bö-·Dœzu‘M­¾).rå LPcëu6þJ´aêw+5‘—0í®h¥:A+ú É«vá8Wú`kà\ã>Ûr =²Ý×öxÍì*.Õ트%ÔØ©!gï´ ¦¥¤QÏÞ©/ÝÁ7´ûsÇ nçWEtT%'±ý¶È8²!hSß?Kˆ`%D¾Ý{tâNZun¾‘Åžþ°ŸøáîbhÐñNG ׿Þüáv#ôªl{¬Õ˜Å?8 ÈZ.¨‹*¹™“R«= 0#Ï>Ò åÙÒêÃÍÕ„´þòœh[&-ÎÉÙ½{q’Ö´hP©/I.yo­±UaâÚʇŸ¨Ám•üUjY®ÇÀCKÀ?ãß‚ãdð0Ìz;ÕÍ7zT>Q*WPa¸Nž@­DD^gT•ü1õÞkeùÏvpö„{Y ×U«p×Ún< (2È­U(qî9ŠQ[6wz¿£\o!<®;EÞµÕ“•ùÛ+ ò&98©…/ù‡å%:Ïê = AÛ^|A¸ðoõ¥ÿé ¯C±¥è üÃöÃUÂl€p£{¬‘.CX\ÄêŽ4Ít°ú,Ogî$©×Ü'©fú'ËÜö›Þ_€uÐÈ%µ9€ù é`A°3㮋Hææï/l´›§îug]àaÈ‹ ĉp«Ù¢kQÔ­Ë&Â[¼áØu\-?ò“H»Ž ‹nÑxOÈ ·w5 ©ø¨R·9>•„æ”kù«ì¦|vçë|¤ð9ˆ_°:TËš#†? ?ñ Ÿ/­»EÌåtÈ]oþõŸJ­ìFXÁH;Ân„KÙÙø¨åÇ£“kQo‚IW1¾;/ðpƘô7Ì\˜ƒ¿Ü–(‘ühzBŽÉ‚§¡ÕÑ+nBLÉ-Í¿qú)~Àõƒ2U€.èÉÁN@âídLGB”5¸)T A­ÿ‡’8Ae²#%T€/$R»"K.%HK#¤÷>±ôÙ!']õXgYÑ`Õ¦dìš1Ë-½2šî·Z“•lSÖìS¥“ZP€âj V15›÷óL—‹Cƒ¿Ž7U¹ŽÆµxª|ïf“ —ÓîIÂîGŸ,±ÚŒg°çK±œÌWê+Ù´9dEj‹Š<](c߸±³Z­ÞI×#>z×¾ÃÖbŽN‡Ö7ta`SÖÏÕ/Dpê0ü QjÇß–ËÉ ƒo9=‹˜sOƒùýÑy:ê0I$M~w8¶Š’äÃ_ÔU[ÏA3)zke×/¡TÛF!­ú@ 2ˆru~(Ú§³¼Qó ¦±ÛG) d%Èßç~ƒyö[:O9[¦OËw<9xõªÁÎhÊ©D†[vÕ]èsnC^˜Òȧ4~š~ŠoϾ9 ð÷Ê!VÙ  9W¢ 1¶ï^¦Dâí†y0j™¥upÙ4ÏüŒ9‰­Æ >%âÓÃ㉬“و󉲼Cœ#=Gå1¶¼ؾ‰i͇A :餠IPh•%Üó1@’ÁˆfW]o!ͳá¡*:*­ß沄ÖÙí ›Äá2öã$'®½zÅ1© Ÿý¦ò ƒ¿…üa5Ófp¤+ BŸÙ5/)ã©KEI­ŸŒÁ¡ú¹‹þ4¥ù¼Í!þFö6t¡rµŸ¨JPNdCÍÎGÃXÚ!â"HÅŒX蔚Çê¾;™Î#X‘ ï'C.5YHEõÍ¡…1Ô4kàÕ nùÆ÷( üag3ÙêU¤÷–[•™äGÔ)RÓÕƒ%B‹¸ÚÏ%þà`†’hÌÜšÉøê°ºëŠn{ÌsžtB›:6Ìl÷âG›4!i¶ìØ™º¨Å±ƒ¶~ôi­)ÿ§Û"º„w ¨*Í­HÊÆÊ¤¯7•NÆ5ë†öÁZÿ ÌÍù³Ùo·no9ú†ðüî ÷?<ÔøÊWÂórgv‡Œm3 œ5~8P›TPŸ¹§ýb‰Ö§ÕàŠL‰3DêùŽ3#Üý…®›¹œ@SåT"ßñõöHU  ÷d²Ÿ¯+Û÷cw/%¢Ñð 1ÍèÙ2å:ôt8óX²fù5Šêä-¼OÏk.<áOÞ,:üObû¬šAÊýX:#ˆZC¹ LôD‹Ú Ç s“±ýÔâ‰J!/<È×PU$·~ý§öê¶ól8¯wÀß?J³{åw6Gâ&yÀY¦î #AÚÏ[‘|Jc&µb¬KQH«k#/Ḓø1‡WyþYy¤nðô?îÕÇ»è¯8Ò›dr&üva}]ZgË!TÀÞë Ã+å=/h‚hHŒ©@hž@•%F‹±¨è4½úoþxCÅo¸T¸!]aº8äV×çï´pc(ÎQ\öÍp-7†èll Té岫È5¸óúÁY‘w¢x2B… –á8n¤€FKÊ£Í}8†˜1qÂèoÿÊz=ËÞ,ؽšú+9Ö9kQ•º?÷Ü)c† %:N쪟ţ¯UÜeúW ȼ“ªX-æúýö ­²BÉ`JˆSQ¢û¬¤Ìù=ù0äŽn×nq`6ÉÃäöõw@yÃüoŠâ´|y‰ i8& LfJÇ~,4V}z(Är5N ˜šøò-Öj¤ßÉé&%Q¢öÆ¢HûÌñ¢i£–ðH§JCâ·c4žÍS{ê(€ëZƒž‹y£´—Æ ò+b0‰@¡¥U¯ëÉÃûp—ãôµòØMLñxˆwÒ Z„—+´á˜\0d9FÁ”±G3l÷Ùú™†º/?õ0ãäqƒØ†Þ¥¨¹ëg,ޱYÒFËc,Ð"Du#ÓÝàÊAPõX‹Vš´uŠ¿«?OâBܺm9«ì<i^ÉLh¥‰V?à‡—ÙóäýÅ5Tãm>džºPæ"ÌiÇóërûÔ¼ð%§/ê-_3{]ž ¡þ;í´0uº¡æ˜3uJ®‚àŽ%t6@öD¢È¨(ìÿ¹Åå•¢_äÁÖµÄ& ?± ‚?6—âRàÙE>Ì@Ä”Z² O%ÝâÜñKÊU V&¾ªÕѺͦ eMµ°" ”¼X^b+EfÛ‚qúÆFÉ(Ì ™]û–C¨uæJ¬^G]ðpúº–c-Okë&\÷aem¹´ÀZÐd­òßn[í'¥jzŸ?sÑgR׈ct%¯™(“”7ß¶(dñ~(éXHΗoÀ§ËhÚ7݈F‡ˆÊA̕ǵ`§Ï 2öäg¼hFƒ7†A'ôS8êp´ðÔ­¼pÖœ—K©À×*‘¨FDœJ° e{Wá<ü.…ÇB¬·2 w;¯6ªá”‘”LqìÄ!å0>–0MˆÂÔš–<2ã ¤ „á¯ZÆ‚jÒÙ`GÇ6®~ê­Zð)äÏÿæ4®ªÑï]¯ïÓÛX %Ô&ÙrEÃÆÏ%óïŠ<‚ ߺ¾Få >ðÁ9xo¿vÆO&gWã€QùG™0Ç5݈¢ž·žóóïÖç?Û8Çý-×ù9•—æ~eKÀÃ_”/AÇ¿¸37;î•çšjXðQûܹ,p†øKõ¼Žkœ»FUÈgWêá]Ä¿¸ó%,…SIÖ9™Q;ÔË9 =óû6üþº´óNËÇɰði`_¤}`ž¡V*EŒÔ¹°ÀÕA´sá¹µó½ð’ݯAÑh.,O[´ýWçC‰"¯Hƒ˜V©oáĴ̯fÕ­t [ºÞ½ä¿ Ö‚›Â×w‚׋°ðî¦,üéAq–P†“Ó TOß•0f¨m§°VÎ©å ¥vÿ8þ/&iÔ¦êﻃL"ÑÓŒœ5°úŠ\Q…gݼŽˆ9‰sD:X޽‡&išGïæÿH‡XvA9*tœ ?§OË«®™æ|M Xô׸]FR¤ ØíY<9[>f6î?—šúƒžëœcÀU'5ì™üáw·…Šh#¯6‰Ïn^®Þ±­×ý†÷§‰ÿ,T‹à¸æ¿èëÞ0¢7Ý;»tŽ’äµ bø˜HV(—0Ím1 N~<´!k|NÃÚõîîê! õD±£úó‹!øÿ·’H%×™½ÿ£ ¨²Ý‹;]ŒÊ¢D®» `¹-‘HÕ‹É–­0žÑÔÊÿéjlÜ<p8ÚÕV[†ýZ(>Þ{-¸->#‰ÑAQk[™ mh&åó‰Tï_u>Ëbá™ó=­nÅÓö -¢‘æxòô«hì2ŒØƒMüÚ Ëu€Z·2A^]ò6ŽOFgðóƒP­lÅ]®uîøô_×Ê|ðTLA-ýY~5ãüÉÐýox‡µþ%Å޹ô %“— xá£qxAVvA}?oõµÀµº)f“   dë_¸ùé0ŒÀóçƒn"ZclȨÒ>? iø{œf–5ˆ‡`£Î:Ô²Ì-&ª€ÎVXòÐ(õÂ2w„†:@EÿiaÊsWP+PD"¸^ÓÜxÚ”U*¼BÎ EݧñQòÑ9ö×?lo²Ï_÷¡$äÉ_ GOS2V’È ŸAJ¼r’Óâ«ôD4›çETžuMÑ·ñì~L¿=rÏÑRZ)pÈ0û®¯mÁ§ßå%O0Íø!ïiòÆ?Pͤ’Õ]²—Utkö—ŠcOrÉO¹dM¨llVÉkù×¹‚¡6‘kýlúO­ûâ‚'¢äíÍžx§©æ{0ÈÛ¦;nW¢-…uOòÞK2£#­9õ¸À!«þoåî«(¥v@˜µþ ÆGAOûê9A"aW7£^«wzlçˆ8ÓIXæž2#Æ«¢ø(}$P/ÓôvˆPÛQúðä„´n®_S»|LëÆ6ÿ!8Ñ ¦=@•C´çŽ&Dh)«œžKTQ¡X u¯hzTßOeW»fm‘þAŸYÉ $¬Ø 챿ó`¦-_&Ïõv¨c"ûÉŠ—ý)yXßÑŸ=Bü]N¶Ðý^àÃW ÊQGqÂþÕ-.Tˆ_ð¢~÷S8ÄoÇx¸‚øTnS¥œë ?dŠ·¶`ü"+28·ÈõQ2üMk 7 Ë”óý… „0`Ь†_ã!õ aD()\FQø½Jt»NµEjþ¬µýVÄMZ5øk±øbs(6¸Zh†x „xÍ~ò;~+%Myƒž!ªªà€S&ØÓ £ÅÂÚ%¹¶¡.I~•eEŸ,ÀŸà–U\ïI×…Žý¥:B.°ÜbNG k&FÎPáy¨EP†ßöô»D[¿^eRî“ðý3þYW ¸,­#š{ÛMo Ù•ä„Ô±øobŽÿ¹ “ÐÌ•ïŠÂµ™d‡ ›?`ë½-ëÍp¼âë—÷l`gõc—-ÿ+¦ð_RïìDZ?Ñ} h´ìºït¸`Ðå‡Á©á1É.õˆZ£ÞCÀÏÚc,N”ÙÉúl®jÇÁæyÜâYZ«®„Qšl½ìÆõ ê³}’%â–Šä|åß[ªFnN‹RZ hsµ%wärT÷ºj×I6"^ŽôôÌ^ÀÇKc&œÎ½ÃTâ-„ Èœ°Çéc `]©‘SÑdèØ”JA¾ŸI?Iжæ3’ó%âpP=ïcNWŒ^ÕƒK T+x'8â°ÁFL”(Sÿ§ƒÉ¢X¦ˆ >Δëç•ÚÕ‘Õ†yù,çO‡²Ñ%JÞ3ºÏâ¯Á ªäî„e\Þ/Ëø¾–Á1jc={¿W¨OTêÁW'[ùÎÅ´&_à»J¹µµ¸M nìUìz eqœü¥²÷ x †é'´K3lƒ}՘̋ìÐVððP˜!Õka,‡‹ªDF)ŠæsŽ©ÍA[ä šý2èkfçž-ÕyÃå:{hñgµÃ—÷æÝÊÔM äûŒÐ>IH’û£“)ô‡´ªÑA">½ÑgÆ¢¨„¦ñmì²,ž0!³{q yêG@Ò¾¨–½ýZš ~åd¤/>`z ¬Oì·™­)b­Þý¼Õïãr/´{Ú Œ‰~š‘«tâÅœ–aÀN2l´#œž6íÅ—ªLE¦ûp¥dlô#KƒÝ‘çÀ }¾†+ïÙNòÈ‹I¾V’X½€o¶¢‚€=CÁ‚DØÜ•u`¾dhríÕŸ3©cabextract-1.11/test/cabs/encoding-sjis.cab0000644000175000017500000000071713371306112015571 00000000000000MSCFÏ,ÒÇl"ºY ‰Ž‚à–Ø‚©‚ç—Ž‚¿‚él"ºY ŒÕŒŠ‚É“ü‚炸‚ñ‚ΌՎq‚𓾂¸l"ºY ‚±‚Ì•ƒ‚É‚µ‚Ä‚±‚ÌŽq‚ ‚èl"ºY ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝl"ºY ‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚´‚µ‚·‚¹‚»‚½‚¿‚‚ĂƂȂɂʂ˂̂͂Ђӂւق܂݂ނ߂à‚â‚䂿‚ç‚è‚é‚ê‚ë‚í‚ð‚ñl"ºY ƒAƒCƒEƒGƒIƒJƒLƒNƒPƒRƒTƒVƒXƒZƒ\ƒ^ƒ`ƒcƒeƒgƒiƒjƒkƒlƒmƒnƒqƒtƒwƒzƒ}ƒ~ƒ€ƒƒ‚ƒ„ƒ†ƒˆƒ‰ƒŠƒ‹ƒŒƒƒƒ’ƒ“cabextract-1.11/test/cabs/split-3.cab0000644000175000017500000007246013323707071014342 00000000000000MSCF0u dd2 Split-2.CABSplit cabinet file 2/5Split-4.CABSplit cabinet file 4/5(PÃÿÿñL›F medium2.binПŸt\€B‚’ýŒŠu ×S0K`#1›tñÔÙG„8²„^©v„ž­ï@¡ØÅ)¿ò´¸Ù^ °…vº»Þp(–Š¿ .Ó€íáÇ @ôW†9+„'ÈæÂZ)¸¬F¶ŽÂî„éýUT ÊC:n0qÈ€ô6ÙÜ…Ýÿ¬ßVÀ޽•\Ö PûÉ-À0ß0T¹DPm’ô\Kú”bòÊû7±ôj$þ /GhÖñï2«”½¼k)>ÿ?ŽDrKxÔíô|\àúá”Ãý%›hÉ"­ûïí(Ùž+¶äS6µ0ôMÈ MØ¤à ¡Ê¢ÂÅ›k˜Š–êM»&Γó*9J:‹Ò€¸´¤¿ñ!¥0ªH\¿+¶J!‹ˆË÷à]X;]’ kIա䋤9  ÊÃrÔÐW sÚ߃j_w'âzíéH¼5 ‹{jæ}¤müç¡s‹ÂÚdó™=héɱÿ:|ÏõÝÍg?¨d§«‚¦iÔžÐÂ0°nuüªÞ]cãÖƒM&·þË$~ëùÞÞ¿‡3Ýöö³háåy^›WvW§r8àÐU¹ÿDËîÙ(4Ûa’È3\T@[䨱”øÜËe"± yÏ¡-'^IVÛÙ«§a‘k&ȦJ§ð" 𥭓é[ÇAÐpV·úHŸ xñ‰¥Æ 5Åhñ|ÇF‹<öÏãèZFHÝÉv½8`ÃŽ"P#ã"¿éûæØ;x< òÎÇ·å{…ùœ‡#ß×§ƒF­÷[Ꜥ¿˜¦ZŸäMñß(ïÝ$ïœ9vÆ“ëqWÝ++ª¬ÑµÍÚÖ@ä­`ûÅTÁZÓ ]¦ÏÆ1®é')ímålN¸?¯Ï8…C´6¼ðíö ®tŠÂº‚ùüÒÒ„•yó‰ØÙÏR׆ ô<ýü‡lVxR{¶¬ìûç=„ˆãv¹Ó§Ö^¢OLT¾))0`Fò°Çæi[ODÍ–›âÑ÷%j³ÁïÆ-ŠŠJ<ë ‰Å’>Ä]ä4žPd* 1^Uwõ{…>#¹"´1ËîÐ ZƒOntjîãHå(ZìÐÖæX¡Ì­mB,@!£³Š§‚žÞ% Ë¿d=$Å€MýyöÝöõߥ*þܜԙt»£îáê”{i9›¢—XòeÒÓê\~d;Ó àçß$v.÷r¿(8ØÎgËGŒ¦ ØT©Z ²D¢=?(e¹ù°†vÙÚÖ~<¬u12ïO-€Å)RnWsþm-œM~•1f“#„åøð´´î<ÝâEé@tÓ¯’¤lõå[{¾ˆí‰l[¿Ø#4#zÝ«v Êj¤Icyß¡‚(ßiYHPP}ËôØë’*¾ˆ_é×˰NH°ñ Ób¹½.Õ…†+ßßSÐä`€)ŸA‹N¼ÅúÀ¼ ˆ¾4 w¸ÒÜLÔ4g½<‰] á”ù·à]¡ÄÅÂŒªRMÏu2útê÷«âÄ4EÎKlÕ§:º¥§V à8•ÛíÝ˄ЪbË€5És¾Gš~PßÌà@ §ô<Žzi~ó†>M²¾eì ÁiªÏ–#‡fy¦I˜† ôĉ®Üè<}ƒ=— e!ô@#šÞ­}›jMÂÁ-÷ó+“c¨XÃPÈPP9Š>¨m€W M©§kA€S'å(®ymH`ç²Ê-rl€l_–Ɖ3f~¨”=zè4:.i¥4…ccëêÙ‹êDeD'„ Û·æLÙøêd6É¿°TïÒ%+›@…¨iGùý¼u¾ööŸ©ÂßIÌLU)Èã 7·tÀ ‹ŽgB¿ aÏï0¡“l+øéòÄ—îÌ׳Ö€™C”Ø´Ï'1µ@Ø7Š.抩(@ß,¾AhœiÚq¸›Y³ªù¬DgÄÐàFO„Zaœ^ã…øe”ð b®Ê”q„O‹£`Í¿?ÙAઠ…ì7´ÿ€]„i÷Û"/9V³ý R8µƒ¥š¿ÏÛnJ:rQr†¥-^¡ÙO:úi¸£Ù ÷Øà~pRH݈µ°Êz>‡«º5nÐÖ­ÊêI¾û^òš÷rc’¿êeHGÓÿÏÓŸZrQ Aö6Q'-8sTp³R àþŸC³딃D¯±ë|¨½@˜tx©¹±9ŠØÙÒ)qnL@ŽÇÅ•¨ñÙÚp—3Ùhsƒ x6í ƒ×ôÎø gF2Ê2àfÀ˜â §y,`íÅüÆ Õœ¥ÁvÌ`S-‘yd0ˆõOä9᛬ü˜˜’ÀÒZ”KBü8#gÔ3ƒ¾« _üÖI;ˆÝ[áä}EP^Ô`W†ç·qff‚âÔn’@ äÑ®–-(Ÿ.È'ã}¦Ùí°é‚ý>£¯Æi5ã Á@”=÷„ íO,ŒŸU‚þV…ÿ­‘]b¢Ò¢»œk_3²\2„­¦¡ýg”Dqëñqd^÷ëË„c¾bOhbEB}Zjbb—’'ü¤‰ )8ÅZ¼qÙщ^, er7— 65FÕÀã‹‹ÄdûËÕ–öÁ0€ûHyPÞP¡Ò½Ÿ-Z:“7ã}ÅWÅfï¼¥m3Ê·ø °w[+¸üzE—ƒâøÁÁúG¶iJ·§ï›‘ÅxÞäkâͤÐàí‰O… %Î%V­.Í´YB4ïIcýÚíRÞž8IT·Îg$%ûs¹÷!¢uZý‹¸b@Á×P×'f•T˜¶GxÕ[&Á¡QAå)2íµn‘ë"åa”QÂzÐÊð #×| ¶w Ÿ†äÌB‡‹âÚÔGO%‹×Y2{ ã`âê+R™ÕÉqq ¸…;TŠRºšh§B}$^ãÎ `ûM û1b‹í˜]®5É¿þí…ø/gWÓÛô5W•áñV"ö%RZá¾z(ÜI›r]îªy¨6©C§×Á˜ßÂòŠM¤¨Õÿ¦›¶­w4Ùú¹V•Å›#ÊPlÂŒS;K‡—}BñKL4P©ù6g9ïQY^~ÓJ·FMšäã¦Á)àÎEóÞȉŽNâ6½ô$Å3 (ÓÞ켸 $¦U™1˜|¶‚S™â_;7^fïw}4$Q‚ΪÀ›NÍux‚bÑ #q)ˆ‚»ã†;û"þ0’¬Â&…çå{èœ@=* õêAĆT!0¢GIÏãÉ ¶µ” Í8Âi]|«|„}•¯0ß ÚÍ{.Ú½2X"¼íöxýµO›>SÊÞÞu8Õ¾‚uágŠG£ý×sQa7\6£G{­z‰Þì_mkŸ÷z݀Ŭf“ˆ w§½4JÎÀ¤Fƒ%u¼ÆRF¼˜ÉŸýÐ'ƒ|¶x–çÝw×Sôâ©a´¥UR^oþÈxÖÈ 7­CÇþ…s’K©1—I} zo(r¥KñÞ¸È0ìã2_? §RŸ”ÐK£å/ཨ+‹f—?‹teð˾…‰ÜHìÙæ¼-½ÒX³¤ò> ™Fvê‡M8¤œ?ËÕë7Äõä¢CƼ’¼¡ bõÈ÷›q±¤ëÌIU\ª¡›‹³ÏÆG®\U}nPbÈ £V3+­°=’¡‡Þ ÓÕŠÕ*ñæçC½>†ŠGÔ4(WX†6ZïCÀß3i¦‡„”BÇþAtïY¶/–©¸%aƒóœŽšP‘¨³”4@»ô™‰C >÷Ê"œ¶u×jt?°k¼ýÓº¶óM¼tÌî]4Rþí´¾›b`;‹ýÚ»_#d•-£çB؉ìáe%o)›Ô_­ÈÆK•µI Ö/cÅC=¢2"PæBû¬™¹ñf?h|“QlØ"fÂ.!tD8¤¢F4¿âð"òµ{A@G|X±¬•Pù¼²ÓVïÅN3Ë¢­=t«Ÿÿ#‰3Wèþ*Ë’rP%¿vQ«·›ðý:àV¿‘ɰuTgÏ7ã—åäÇ–ñ~&‰;N¬ Ó¹¸¢ã¢Ìz7Ú·ìä–omøVœñLˆÞ6󡾈éClôì·œ®Í®;Œ×Õ0+œzú¹ï¬_¢†/£¬”ëx±ºø_7¾Ù©LtAëÞÛüîĆ….¼ýÀïÕé¾"ðaCXj&/óµùëãò2v÷øŸ¿ÃæD”¥yQ-£…­(¼ïÈ™<êy¸A™o}£â^ÇœÐô”ÎB ~€ÃI±xÄgáð53Á< ™$ÃÕ1] Y²]ûÍ®¼gtÙ³Ð#¸J£Ì¼Ùš„Z"TvQm`Mû¼æ6‚!’²¨v rÝ+äF—«.Û¸]d‡Œð<ˆTèéNöçúñ`T ÇJ•Þ2‘òln~oû–He¾7‡_î¿`64O*'Ž ¸·Ì8T1‘SÜ–®Š~¶ò-³Gn¥¹ |éG§Â…mxy±ßJI‰Àæ,ø©EïÕ’dwæ‹cÃ7/îÅ aÙ¹«u†éÇ,eìW0U€0k‹È§fáƒpÍò„4:înظx}ÛÃ䟪·¥Dé3zVÀB»µÍ€ðmÙK*{f‰º‘íÉÇ&1±cIdæñøÛígáñËBø½k¾þèð‡Û¬Þ cïiÅeô'’*êg­‡Æ)ÜòëKg¿ï–èJÀ:«'ëÚktÏpï!–}›DÏÖ¡}ž˜1¬¯õ+uepFmÍÂê@>4QÒ£!Ld®X@4S¬£–í„“ òð,j’º3Óþˆq6OªxTwvì¹7Žwct¤JQ›‚ëúÆ$9Љõx0jjaOîØtšQrbLñÜè ½F7·Aªè³l{g6»W RêRË@lHסֿüÏ;©:?äÓ‚SA†<â³°´óÌS¢›ûßO¦•,³[ýºÊ*ž'¤Û-Ƽ?‰³‘l‡k8Ô æc MsŽ›Oßf÷×Y.éµhþÕØÆÔŽœ<8*.hî^A:[g/Ý<¤ÓU˜bx·FZ¥ÄªöMÉíÖä¡oê æ2õ:ìé8\‹ÆÜæ“0‹ipžÿ€+TLæ¿Èå2ÿ9Ã(rxÕjM¡†,d´éÞ[Ô·XêÓRÎÚ¬5I7­/6RWmö(ò·C~Vºç&j7‘g316…«bkÔËHK$Ê5^¢#¦°/’i ˜KåÇBûÌëÑ<Þ¾]Wúr+ V¯Õã­œ¯ôм×í]È)³MßÐ ™¤nJ½¥1¨Cy¯…›=œG= ÊZDVØ) üQ¨#<Þ;­Û\cO|‚·Ú&%õVw¨pêµën¢ñ3Th#͘ñÝã1_|û”2J&tg-ØùmDÕ `œ¸‘ÎsÕßBï€püf‘˜€CÔ®àØJ3OÚ›xÊ)|ÙÒ„¿š… NêðrûgºjŒ—mbÜ¥.Ê´ö>®8VrŸ ÷ˆ‹YÝ6­˜H&Qòa¹Ke‘Ê5‡^Üë_NlÀ/`ŸÔ0M>œõ’—>Hð=Þ¥Û*1’ð úÊDùéÖAû-Eçq–:ýY¶ü›³h„)vâ¨äÀCô{ãî”3Hõ®<º¯<~Ø!¥T-SH ¬PFñpËßVØóþ#PÚ𸶅] r+j:]ÑGÚpã´·Ç! “«¾ §ÍpŠBxŒÀX¬kT±/ì¼G9-O¸ap÷@d`&ÖäêÕ蕚£²òßkn1¼E¬YãØbg°,Þmè‚âÔVÞ(ë†êzÚ‡)·wïZ9EÑ‹™nä§~»‡G—£¥¼—®Ìç­—ÆêÕcð>ÀP½ïWLî¿bÓ7þëìçúu&]'¢Jú ?Ôá¬Á|³˜¬N®Â°~ä½=ÑáDhãh,dFW½F 3U&wxY\…f Eÿêµî§£‡QžÄñÌ% /r<÷§1úrŽ»døÓ©¢ÄÔ$s Hœït*õß…º ¯õººR’^ÓçYöF¹nþÍ\Dk¡ï×äÿ‰.^ëíÙbBhKÙ´2«HäóGœˆûTPi“üQ˜ gЛ®…¦ëz<,‘4EïßG‚¾“5 Tê\Hç(ð®&Kã…PÆSeœº¼$ E½ÛÖ•ÿUOÀ0·‰ýGRž«&µð, šHµDÿ÷‡R“ —VQ¸Õö:Þ;ú›† PÈ´–1CÙñŽÇ>pxxAÀ8wÚ+ñM ]cµ~Þ5­¯[YSÕ—ä…oDØÈtá<5ÜÈs‹mÚCª<Ç ´j;óõ»µ1m×ÌÉ6ÞNs˜UGC{S+(Â+Ï%Žñ‰æü³û‚¹ÃüâÔÐ| º½5 :¥¨Gj˜ŸæT¹Ëâ'"¸Ú—ÝT²{ÿC¥8ÝÚ‹p¥T`°µFÅ ·ÿg7#)2”l»g¨ÝÒk£Î:¦qÙ4`¤øÑ†ÖMã•Y©¾ô>sÑúSljãsas#•(Í3Öj"‚0ÍA) éemE‘Ûˆ‚>Ø‘RYÍaCøZ‡òÎËmÒ™ñ2–g)dR\(pè;bâJ‰I ‹tmw·ä$3Nד=ˆ&â¡zg4ƒþº[ÛÁ&¯¢AH‡|ÝŽ?[§Ñ,X®8uBز\ØÀç5MéYQVƒ—.akã¡¡Ë^;OGe!yV°pœ¤ô*0âY»!fÎÍÕÕûJç'æ²MÒë’O¨É#L…€‹VÈ"¦Ç –`EŽß$V{&vÓqMñ¨×}Öw’›† -D\¤'<<1±¶üjhbÙ’±+¾Ü? DÒø‚Æ›1DÂ"-õQ©°]4£©ë-Æá@E¾XwŸÃ;Äâ'èt<U¡xìË1y5¤=èô Çúéj(F}—ÔÇ ­hQóHuÔ+ ÎÎØO6øUBxãñ‹0Á} :pí>ûÇ;:òˆµåÉD‘¥Œ=?ü\6ö©Å+·ÇÝ%õ<ÑU&rÿÿÐRhSò~ §\ü2l¢5Š`;Td톢¥NNS r¼:Ɍ˸ȓá˜@Uí +}J Ÿ±Ÿ«öyÇ=‹ë´¤sê7MÒ™ù±`ÆA?£˜sÙ ªüâìÍ.G^ˆ*PÆŒ‰±ùƒ9søþ˜ƒLÞhz<}öPñ¸dîiÊd¾æs†êäú› ×³ÔVÁhÌçvJ ‚fo#냫ý{æˆLÐ1õenßC=@»iSiúH•¹#6áÁ!«XZFô'h+ïÛÓ8³;±qry)?+ s‰+‘Êf˜\Ùw ñ§öhºŽ»âYšzQó¦1’!س¸—†Â®Þ0÷–¹Máª`z‘¬<$[,’™ÂÚ¾”ª\/àÐŒFÛDõÏÐu¸` ·{7üÍ8¡-²ʱۆÛd$ ú@ôØ€mªÄ 'ê–,·<¶ÿW.ë­XW}?Œ0xËè^|Ý!&.MÕ`º^º5ºáŽO' À7é±âàã?F5äí‚)\s`f±á—Í+ïYÂ-swk¤R†v2b¼S§G>ôŸí“l^]}€ ðÂíǸ„¿¶iø3ZMXwÌiA4 ½‚Ä=½à¦mÛ2¨xˆ¾ŸÆÐ`XhK zbû^ öáEÑÔrÝÐLc)+ì<Ç1-7Z[jo½Ðh£NªvOŸ‘áâì9š‹\ôMhÔ±.ã|ZáíîŒrØñÒ¼€ꎑ•<…†‚á-“¡i¹/ÍšÌükþÇÇTwi8$ =[á*‘¾;TÒmÊÖö"°m±ý%qîë>8oÊß$z+>±Ì™]»^Ä÷ÎÿìËdmÖ\6ú~Úê¬4;Z%ÊI~ [§à¯öôFŽvmÿçÂëÀ£—Sj”›âÔQƉ³…7ç Õ‡úo1Ë4Ÿ¬æ»u<_lÒÍÿ³Y,G'ÊgoLhöñôÿ‹³™ÉØïXú?ùÌ(¨%׈’‘¦W#âúmÜÁ›ïûöÕÍôß—²?Pç ð°+Ø;Ú‘š34~^q*¹ñŒÆYšPíP3ÞÇØ jËv$r+S9­\1³ÜÃ@x ¦‘Ö¡ÿ»×œÛv™P Iý«óá£TSÙÂ@ú1›×„² g¬OH»,æO£‡ÖíoS ©ûú–˜ù;É€ø CKÊT]lfx¨ÏÕm(ŠÕ³?µŸœ‰*j^ÒJˆÎ¼G÷‘&Ë©5c ¤”žêàú¼E ³r¯°hµ¦|‘vÙÛµÚ²˜N¯ì ×4q .÷·Å&°õÑ-c=R¡¡Gv-¹œ7Íš•ÐúIfu¿üæòQ4®€÷Ê Îªû{'ªÿ¨k‘xxbب; '‚½+6qÿ¾îò\¬˜‚V1 =•é~ žÇR¶Ò7”H2x›qE QeŠA€+Šø¿I‘Û'ÂŽ0%ß•4ùp#QÌOqúÚªy36yïiF4ôœÌj÷jn(8®ùæ‚xð çâ{È.18_˜hXôéx~?>6NÆy,AѨ'³]7Aûrðn# óN?ÊHôš6æ~¶8#o<ª 27I’\Õ¿‡c*fÄý7T‡0¸°]窔Yø©ùÐ-Ž7‚z,#œ®T/Tëû‚Eù’A¸é¿Û‡X*ù¯AÜ,a @…Fƒ=拉~t5 _Pr‹¸ Þ3l5¬'zx@ÉH)“Á¦ƒ®*ƒÌdÇ©ù¤}íÒ¬}ú± ‘D&Ï÷‹j9½ñ¢Òkkyô'á«»bn·Ñ˜€îg j©Q>_¹àŒ- ¨±ßÚ(â\S6ÿF*¨ËÑNœ“Ö¦4ž×Û8¯Î}³Z> ó²Ö¾®¡,÷=¥qñO`È9ÿ‹ð²:AQñy\ˆ:.¦·.Ç:g…#9U2i¬'è%NB«HG—Õ³ƒ­-«^Í_¥ÇP#f"qæ ]–8™‡¥¹ )¨z¿ ©è” 62Š·›q MÃ@1L :Œ½ˆ£ºÿ?0®‰^« oÎd2°Â©J«£]F“à÷ó¯éOC*¨Õ…!ç%IÖ¤ç¬ßÌlΫ0Ðxs8lzQO%ÞÏFl–ÓiÈßKM“ª?öþòSMüJÑf¨ì!™3o :òD3áî>¶Ôn¥B1+ †oE öÉ9žÆp¬œâW?dRÝzÔí]#7S5©Ã“µ¤VÆ(J®Æhå½,HiëvXôêø<* …Î]å>Ê3øÃ’Eë\æCÑÈ<³Ë°ê\|ÅçÂìx î aÈl“Î0rK= G:—˶Œ»nèGuˆ)õ‚ÃîȱàB FÆqª~k n ©- XAlq"ýLupÇ‘{-`nåý‚•ZAÌOã *ºb—µcäGg‡þÇa/<²rÌlgöµbØ–e”%1%v¢¢’A ó~Ú•í•.ûÈy-†nìxèþ¤MÀwSKyŸEGôר¾ó.夲Ú'¹þzßW…r¤}ª/Ú H{ì`Ê&[ŠŠ-š¤3¬;ó"X…Ló#x⢀1ŠÞ®õÁ$Z´Ø!i`kOþ`”Gϲ4…£åwðÕÊé̬ô §d:Óìó¸&Y|·¦¨8£ærr°Œƒ"ã8ñO–¿t•0Ðéý~M–³m6Ôb“££¹5µ±ú°þûÂˬ cŸYA1x0ÅByƒ£÷mO´‡án¶Á$Q“çv ñ!w/ð@Oذ}˧ŽA‰Áêá¬y©sªªq¿‹Ãç?’$Hù*J‚nïåX#‚Ýp$ÁX”zÝO:+ѤÈg[9ø±Žp¿£ëÖ¢¹1€®ûõýÆd û4VIÏêjÐf[ž³]*º)ó¼Tá™Ð3ñ¨_"À¦MœEÏôÄ-e—ž|A5YY˪?Ä’®’ª.¶]QœdÍ1° $¹§k܃ÍrŽ *¹“Ð÷ {?ºŠpŠÝÒi&}b…6·{âkæ\Ôí‹ÂX.b¨¡n»òÍFL—‡‘|°¡$_pk¤0}, χ_RKü¤k9ØE¶VEûÏ‘.„—80ÕŒ¥öÈŠÉ·¢Ï¡¡ï"À¬kœƒ¢kÿ¦ìì”`ÿ( x°õ´\‘7c ÊØ¥FýÛ|ï4'pÿ¾`Û$ɰQÒ-‚¥ËoLΆŒ ¦ÈÓðzúgܵ¹ QRGÿJ ©3@„/÷õçK ÿ†ÝÊÛéy凤·¨èæž Áîa/Q-ö3V+;G>kØzÉ:™z¥çUpPa­ a,K=·«tQi:*Êg¢ºì;£A”Ÿa?6ņnvG8ñj³¦È^{L|zŸ}~~¸7泃JH9™¿X8gEð·4Gœ¡V…ì, _raŒ20$3÷š9g-^õ‰gàH‰È%|<ìl.k¾¡UÉñr˜¼ˆW(£A[32ó¬§/mûHÁ¸çx÷xxç‘V…è6à­—ˆ¯Ô}À>'A7Ï•j8#¹¶ÚêðZ~«IɆ¿ÑrÝ!}Èö‰­˜’rÏ,¶y|“d0 {‡–ŸåE°þ\=‚’Ü)„S)ÌØÑ²p>Þ“àÿЉóýõ÷Úéq7‚“ ˆœm†G†sW>cŒÙuÌêìw8AŸîÁ+ŸgÆËÒ>ž4º÷hTŸ{ÔŽI{ôxf0?æšZÒUаíì!¤g´ãEÙíOó+„xV7§7©ŸÝbG1hP?rá`ìèàõ ácqÔ“y”?ÝŠTfò À›ûIÙ“ ¯Ó—Ü9jky§ WE.bÂW­—U¯¦©Š´„ÑA–G£–vMï2øÉF½Y½üžÖf®<…Y<)="?¦×¯étªA7w•Ê9XxfW•þjïã•ç¨ÈåÎÀøwûJMpÒä+ê³AüõïÆmDíÌvѸÇTlQ_¦¡i®ÈzÄŠqOkš¸›,™-J ´¶àÏE=-ûQ0‰Êbm¦´^ˆú×35ƒßŸók4ˆìÑë˜ÂTi“oxÕ#èYR1Ò]Û_iÓW#Xbwe/jPn¹hs^¥àXqa"˜‡ƒQKYýì!«ëðwDza_Ž Ò7ËF"X#R'ÕUkØç<-k¹#9×í¥ØÄýó’¢ á†¼âêzÂmÌÅÅÔIîÞ)ö(r:±¹êþö\ø#«rÞNIȡ尭@& çŒ_„ªíüO.9ܱUjã‚%ÙlDß3¾&yñ ´‡mNI$Ã[2­gu„íÕ>´-¹Q¯ˆ|*Ńî•9…wxUCièÒ;Ë¿‘œjeR]jÎÒSð)iP¡XYéu$þøZ½Wñh¶\UÇž[Ô¢É,¿}/þTCç±K°ãƒ û“ïÅÁ~`1ËÛT¬•bw.Jt°#bÖ~´¢ å02óòü[7eÕbZïò¼:¦Õû)]ºBð}éçó”Çš ­ö³s¯îSáŒ4Sœ--–D¨ŒÞ.Õ±jz1GÃõ|('®qBÎÐX¨V˜¶Áq#ÓhRgÏ…™4Wƒþ -ª9p3áPI\ÊQ¹oä5³ËÝÚçeeq)*TuÇÐgãÓ£‹ŽÏÆ¢äazšELð÷ÂħÈ*0(p(-ª'Ýr–ë"Œ.¢æKºË´QNŸÑ@Éq¿dx’jšž…Òú{—¢¦%µû|à~¦U±Wv£I1= j\.Êh¥>û„c7aF1Fé×kƒ¿sÄtÓœYb/á4Xÿ?cѳ>Fï¾RX~ºNPÖÊ‘¾@?Ü9÷ì™·<|è}y]oŽ=#ÄaZ;æ3ãv³ý ß_’ÙÓ¹¼jàDƶ—Âßœ«Í‚š =¢€×(ß(vÐå-÷J»  ¼‡%á5h,¹âdb@’ý‘"9´Öt3jÇ «3ɺ1ô./Þ´vº—†›Eµ[sruH4þÓâæ›ôür L¦^VuºÅþ&lk(´cóÁx9V¤·$¶ÙeÐ*›Å–jQ¬:Ü3 ƒªº«Î5ËnÅÖ°YÀLP¤¦KxqeòWe€o‹7kN¹¤‹^Vn;ÚE¾—Ë…,ñ\Õ1ïR/ºo2§¿\{Šƒ鳊Þ1߃Å^݂ЮU×Ílç|á î69Íõ#-Þi+î?Œ“Kbį¸zFYÕ;P$Ûά˜¿Jû¡äÐÄ’Ã!áì26¯\3 GUºŽ‚À륾6­ÁÑ|€õ^Óéôu”¾-̘çAÚæà+]©"»M“×nUá4Šº'$®Æ¶8°›ßO±lxZK f•§*|¬.Ãì* e.>©; úÁÆ­òh f ÀùÒåõÃ+r7]ŒS(‰üÒ5ÇÅõ2tUÞCmkD 'Š‹dcÔ×F/ð§Qnz)§ €ï×ß#ÞðbÔ{åj£¤>%~táA?x~Ü”¸Eò_UM·àà[6[im?÷‘ü3‹· K›‹pݦý$Þî,úÊY~——ÜÛ/`½ï1iqƒ'ÇåùfþI 0«¾QT¨ÿ3š”ÙznVËɾDkÔ ‹9è\ÙõÝôÊÅ·D!Ñ­YºóÃ[Ó égFMæÂ@ÂŒ@ë±fw„!þ4¿kmšÏÚöIi vv*Ø †û½ȹKu¯y®7¡IÇÒžöZü{›[Y܆ó&WnœÇ`Ê=gsç‹'BI»Ì|bŽ!ˆÒÆêI0XŒ@Âøl|a_Ü{¥¡ª`µì¯>7 <0ä_=Õç}ãšÜgQLÒ¢,Ûî"AN˜è·_Xûÿ¡PƒÖR³å ¬ I÷çfIC–v´ÊZíÕßÃY”Gz× íaX70nôÜ¥ƒÊþC=¥ÅöLZgb­¢ÙØohCÐ$RÍ\‚‡¥ûeõº¢®rýø¯—ÓíK >Ì© ;¬7çlÏYÁÒë’ÅÄÂȶ Á&öU¥gÁÔÿ¶Äc_ {=âóEàQëáíSÝíòíaOc£](ž‡ùÜ:rM¨'Ó´ìC’5ãß5‹wa—«Ýc_?t7Å´Þ¸\ÀÐbª0¶>-Ø©ã!¨Œ(SÎx2¾µÌ¡å*•hÑî#ýWWdßA¿­¯[j«µópí(è 8êÚ]¿xíÇÞ´<Ìá)n${i• #5*ÖÊb´Þ]"_è±ÓôÛ}£;^ae”ÙÈH³É Áϲ½jÿ DæÓ¢GÑ#„±ƒpšW¤œ4±h:3!i&è…ç­óNóïÍT6œúŸ ò©J*Õê®+±ôvAlVE dKjõY&üÖ:†ð®Ë\XíAÂ×)oÕ$ù>ŸÉ}󠆱ÞÎ]復za¯´ºüE¡%':]â!•Ž ÉšÑâiâŒéùr `ÑØMM§ 1ˆ>²Ñf(ï—õfú¤;ÞfEΉbO Ðö¿áà0P¤¬æ!ÊP@mÙ­Õ‘Ðá,_Ç©#%ç6‘է҈:•È‹;¨®û*Û[5ôŽÃ;d¢ÞÚEtVõh“çôzU!k-®ù>ÕpÁì«WóàÊTSÿ“c€iû¬-®m²0,v5[a©Eµòìt"5’ϯ4§£`(˜| ¡›DQ ˦ô5®ô‡U¯ýŸâ_ÆÃjrÀ†Û¦¸ŸñfÇ—•qG¿Ã·õs6žRVô7ޤ=ÛÊÁŒ6"æŽÙíWª÷…jÜq7¨0ÄÎxhX¶z)xDÔˆàHIÐJˆTÏ#ƒÕ WNàÍý†ÖÜ»b¯°a‘è mëÌ9ã±ëönN ¨~°×§¯ê+6">Û¢úÏ~ÃþpJ™féµB,×JH±â"˜>EO‚@<›ù~“|o¾í~¶ˆ´tÞYöÛ¡RòíÚÓG˜NDŒý™ød]Er®ŽnJä­ÚºÏ ¸Fðš´ÇH)xÞZ;qµ(ž#Šâ,RÎRqåêž2ùÆPx=0Lƒ{—ÒË­M<;›ùXî¤úÅ÷ØÅ¨h²¥jœŸ¦ãv³Pè<û5·HyŒÔÀƒYRLµênü±2EìéÛvÕ\<¹d‡c’‚Œ`˜®á®Ýµ/pÉ<ð˜7Ȱ¨ÒŸ1Û¹'¥îÙ‘3-É~ij_™%E§FWâþÀï×?8Kán>Ä3‰4IêtµFh NáH&þ+4ÛûÇdk¢·ù”ñ ­ºžG¥]R[4—çÛ×ûˆ¾™™Å!¼|Û¤í>VrLzavŸ¤s­UˆŽ’éêKó@`„c ‹ÁÆoð}Š4’ã$x„ü=B§öj”‰^ÒFªø´Ô÷Ïš€¯ùtMù(ÆÄû%u—,¥ác”D|È·D\…ˆ5 ôæ¹­5Çá™»ÞC¿‚*#ÊWQöh+„Æãô°+Ë‘ÎxÝV¸Ô=N*'Òм*©ÀU+¼óhlm0Æ™ÚîÿÔ×Ó¹c —h7¹Èôž¡ºÑ‰»"jíG¯¦ÒÙziº& “ óBç6¬¶Ç!?ùÙHäà™Îñ”»âŠ{)†‚sq˜8]05CÝsdLÙx`å{64ýj|£P¥„ýÇT$´<ÚØuÿ¯”ì.Nxñ¿£ïŒIŒ°ä×¥"Ò¤x~Ù¾tô¹|Å×c¸C“`ÁéY’k béÕ€j“Ér£,³¦bÖ•„Nn9”í¹|‡UfñÓ@–4$½kð¶ÂÔi/ÖnÉjˆ§i´àXáêâæ áãü*þúgš‹ÈMæ¸ëÝ.Ÿ¨8] ½üó“9=x‹«L¬2“1(îø{K¼o•uà¾÷ "BW^qZÂ7=¨·oƒÝ$h˜°m2`!\ÛOô턹lÆÒln8Hü¤èç,oÒ|¯ ƒyÅÛ˜Óš¯ó»µý$w¨…(‡µÏÉÛØü:Y4º^o>šüJ³Àp\(#¡D…=‰×éX£f%?ÁnQ$ÿñÎÑþຠwƹŸ(*EFÈÇ.¸o]±ºY|ëfÑ$Ëê~Úî;w Á†Ï{i”¦”½ÓówÑí.ó:Lâu‰Þrõëuf 1‰Ô´OË¡`Š·UÇ7Ï´*u¢)Ë[<ÎF‡ÄØÁëÅj"dÌ厓lñŸBðK}—aíøpçûI¢š¬mËZY­Î†zoÒIn±¬[ÌxDßàÐP¿)XÐQ—²€m¥¨4"˜Ò±)c{'H´üØ»Ù{ƒƒÜõ?³Òz´lA‘sÅA½›PŠW¼±_rØMÆ>ö–áåö¡ ù×Û,)-LßjÞ¯ØïÄö(Ü[|ÍØÍÿçñæa7{ÉêCd‹:1ðOÚçòpXøÇ: àz‰›‹‚ÀpÀ=ë]öêh"Soìa$‰näwíM@8aÓ«¼”ÕÕÑhl%òC£&iÞ¹žåÝí¸7åLóVh¸¨¾«µòG5‚ŠnyàÉj ù¯ºÁ€‹gæ,Ô?»”£Ì?Y@¿‡‰ÝÊ0ÃrËyÕè7ÇóOŸvÁ8m!ØJ…Gœw°£ŠÛ&+D‹7ʬú¬šY}ew±•&㺠A'názË.7Öã¿p… €÷(Í++ª£Î),‚¦ÙWR›€HM \DÚÂ&ÿìüßMȼ—Ù_r¼Èlé±[Ç‘np ‹ßÛ„ò 0T3V6ñ$žü_Æëâ•>κ›{ìQ¶8Ë[ÕûÁÜråѬׂð±wÜÂ»ë— rX¸¶Ãý;-^,yëתþ—¯]3bÅ&zRn›™Ø©ÕXÔ‰ìinð4k6þ¨+%t°‹ dÛ˜Ž%Á¾òáV X4ãk”ÖÙf9n Ÿ¸»G=)Ý Ù Á:ú²%(—>:åõ{-ˆqΟ“‘Ô»Û²,@ˆáž›–ÆEn1óÊOKô"y ®çjŸœ|]#—#=2¼,T’»Q¿@Δ—Ä–¥×ÒlB|ÎQ.]­ô¼q ŠÊy-GóŒJ7 Npçu^ i7êôœÃ7âO†$+¶‰&BšyNæ áΗ®0±ña\KÁ'iEJ4°²i÷»ò8ñ‘ÐaÀUêeÿ+>zÀ󒿇N™Aû¿Æå*íŠ|̈P™vŒíF¢ 9=Qx³>¦·.S‹nñ#Í#r,%¡²ºL²ºÞ{=2B€¨Àx•dE¨ãÕ·}‰Ti=?î…„tÀïnKaà&^õô'àÑ iÊùª_ íQ4þÒ>ˆ˜r1ペ(s‰Ž¦Ocìú/ÓI Mv†§ìêld‡ÐR¨ç•×-£¤C%í ui§V5òGz”½ävBâ¯Yã“+:ÜYñŠ~¼©×šUs@¤hÖlƈfV6RãÇJÆëʾÍhÚ.8ys ¯M†ÚY'ô˸;Â0xÙ1Ø•(þx"ŸèDæ÷f`]Öaæ|Ì’_ÈåÙ ¢Òeø'è ßëý†¡xÉž¬sSÝ!Sd(};6×CÌÖM¸©ÍĈõ”v>+B¨)ŸÜ¨=}QÚ£ÖÃßÙÏ)(ù=€=XÜÇ-T5ª‹S–.…RÔþ‚l;!>„Bx5%ð6ÆäfXÛ¿EáÆ®<Ùœ“…Ðr”~gIƒ’&ídZ¦íM)’ü„¯Íy1ž¬¥p¹†–ž !êJíHOÔ$Œœ’é¦g“X°Í±ËJJG:V‘"0ßí°ý1YJäªo*tŠçs̯þí˜#Zïè@Ãðš£껇Ùö¤VÂHV/§Ÿ{·åÛ¬‰¿µ-ƒŽK.ÔÞ^,ޏ‘¨½¾guL<.é0ï"u&†T9Fð]8eŠeÏ@KçÕt£kÒ½óW`ý˜áõÔ4‰6‘_“®ÙM‹öw…=¼ø>²b@âæÑ[þªo+ÔÏzÞb ¿•±ûs(,ˆ+A*ŸÕÿ‡„)_¬Å­åHMâ© „a’d™—½| ›EFcÙg¦˜‘úR¯yZ/9_ «Šæ–ÊöøsBü½lÖÌliÇ«nDýüˆT›ÓË_'Ä(ø…o…ý¬¶ Rh˜Þž)#K’’¦“YÄ|¾ +,ƒ¢m¤Š^Ry¢þâ&ºSÆ#2\Ê5åbýô 'm½».fêƒ2ÿxvËGUß=êWƒ3‡Ai‚ü퓊2W¾R9kNÑ€^LrûÑÇ€žO€ºÈÓMÄè²°'Ó¦¹Kôáû¿ÆÏâÀãçÁ*âp ¾á<ŽiÔ;«.¬¶«áÉNã„”¡þ Íú–%¡MÐCJDhPÙ'ßC#ÕÔý>¼Ï*'œÒ¥œ&OMWðPéVECùI»I(e‚l P-Ô3î .鵿€^ ›‰ Ædctâê‰[|>ö;vém©<9†ßt@I«0È¿œ· ¿¾énœ;dÊNž'[;\>4¼åÿ¦œ+ÔÍ¢¯˜ñ%¼ûGO WÚYر«Q «šd°÷Gisìpó¸ü!·%±CAýR®ëÿÿÃ%HÆï£ƒ ¼ˆ p@uÃJä—GïÆ{QÜH@}\ä“n'tEÄ"¯'Ugž¨ó´ÿK4‰<ÞËÒdï|Õ«ø™?!x# _¢ó‹ùp;ø©.ÔÄ1ƒI|;ô æûL¹Çï`Â*5ÂxÓýfQÎêÚ¹9Ù-ŸöŠ`<1$ñØw’®ß”qNW›wá>²‹¯Ñ fbø=*AC.ßþ„ÔÜbUÚ2U{ÜÖœuùrþĺ »Î¼ ÏOL®†¬†>™sZÆŒ=_coË‹?}œ‚›wã8j³Tǘ1PŸ6 íC2K’FŠnl!péð—P,鸹K "¬md@,dG²wÝ&W&ëûᤠœ³?³+£ò&†ƒJøpY·“O,E4Îå - ›Szx@&˜s Ä +qjH–Oúr»Î]w׫¶ c¼ù¤^Õ’OÅ\‹ ¡ÐóQÝ·¼[´Ìv» rãÇ߯•"{Üà«ë1•G:ä¯4‹¹yH¤· .iðîá8÷ý_‰Û=_öxqÌ´9 ðè(ÁSº?š?ê6KK ÚUáÒ¿[¿U¤2#½ohöùÇ‚®ÊÀrë 0dÁ^ÏC½Z'šK©¹þ0À‚Φ`\lù—„ñî¨t¸‘‹E´?—Ì”ò_òªÅ#r,OðýŠcínzåÁêî‹”¾ÌDc·ûçtV~EÂñ Ù§,n[ãFÄOeu„ Ä;Ï—M›çDóEηlµ^׸ä:®Õ˜¸Ù¿r£bó|šىi±Ÿ’ü:Ò;37­ wÕË-â¶*«¯¾2._2Q®¹ ]X|JëÈÍ_á`‚SI#Hî*8ª gãȯžmAk„óTª\ÎÃ:¨5¥V˜TÌäöêXl.™ò£KVcî¥ÿâ¥ÍbêqÂ8¢¨ª³>ë§%ª é·bGøÐÁp£Â e®X¢Àvð‘¬Øy& ›°áÕ­>Þãéî¾â¹q-lŽöÍ ~îHšS(+÷æ¡ÂÁjy¯•€Ð…Bq 1 ztæ bm—ƒ¬æ4VÅõýsÀ D˜ ÿ¯¸×ú‚5ImÇâò|`£{¯ô»d@×ògA¯M™"r1pz1ËÙeÆî†TE=8#Á0}¼kÏè–ÙÊ͹á4ç7Ä-?xà×ÈÌÊw(ÊÚ_D휱0S[< ©«äbçSL¯nŒ¿º$¶JþŽp²”Á‚)Mäo+(š\(/)Ž•V# A‚»Fqêu(rÄ¥;,Àm*8:’Ê túw…Ͼ¦$®Eý¯å¤Ó3UŸà€_º‡àó½q%Æ´CÂÙÐk8ì ²òs%Í:“”Ùñq‰œSùåJJ’S!tJíõ#l)ô:–†QÕæA‹Ú—‘³W_™>=ä·Ð§Â.ìð&†˜;ºzà|‚ÔÅ3Í ;ïÎû,`UÊ*¶9M@Œ'ÚÔ ëÇpói\ŒëÔKqoŽ_νðÀ g(i¹ðTž½×¶°“­!ò8ÍÕÖ¢NI´ñ.[‡”£RT×Åñ$T¯õ™7Wõ寋´#ÿ˜í>âÆ×~òˆæßl"Ä€Aÿi¶c=GÓ¾#Foøú ºßël©lxgô(JÉBä:¿@§ôƱ5žq÷ÿ;k¦$`ãÓrbêØÞW6&‚þ÷ éCy“|ª0©Ò°Í§2"ÙÀaÖ›.(»3žRÒ ¤müÌÒ±-¤@,2»„˜—jâÜi—'=b$KO£ö¨¸ñ]‰Øô¬-š¦l€=@8Gе§ISæ9µÙä$Ü.š–ɺŠyf¨ÜfÀ(ÅïÊòe‹B`EƒFr~µtN5H{|;¼¦ÆÃmÁ*7ê~Š¢É1«©Œ=¤Yöøÿ½5Y–xlO(¿WÉáþ/»_÷º9X•š‚«¶ª}{y½€à'z\QN¥Tc¡2fDc~®¡øóïd6LÙéÕ”ˆT„Z(]ÙSÙö„4wBŒ^oÌì´«ï¡"RW`€U›üëKF¼F«JÆ#<¡PMNGØk`-ܬïSÿC¤çÓÖ:R“ö†Ê2BØ'§¿’×­áÀàÃ}ñÛ4Ï;éµ±ŒmëîÝ;|‹‚Cº_Ç×9Ýéw£ï¼4\/Å@bÿS“³îé£*»|w»2ÆI£~$ÖRíÄbqsãÉl(ËÍú2¼²ãB³z¦¨ÙŠP)Ϥnÿº Y_Š9ÍZäcšx±­n’\÷ìÚ(h"† %kEx€¼¥øÖŠÍ»²@bçãCÛ¼0šY® oÎÜË/W¿ó\±™}wBWó.~ñCÃ¥“5öYtd,3ÉôUOw}pÎ;8V0KÁ"ªËrÂ?TÖýzÖq쯷 °swóVF<Îο³Ž¾­Ú ƒÜÉÑõ…®³k[fÜáÕ›ŠÔZ– ÿôÕNü§Aàsl]µ]|õ?ÃÛ6ÚHe@€§w=[뽺D4KšWlز‡ª=OäñE¥¡üÛpÎ|¸#TU‹ùLBþA¯»æçÒ·Ù¹æ°|šgˆ2¤`©ulè“wj5AGXü1[̯¹¼ðy¶n^ÌÔÞÑ…Pb’Ó)È.¿ű<äÚT)w¤¾xý–Rþ×`þQ2ãÈä3× °ðÏ+¸8ysm¥6êlp”¤j¤Lj ÑÌð™4£¥^à;' ©'žз#³ ƒqNþ9¨A 6®3j¶%^2Ýž Úia€²WÁãù$–öóà[U…&™Xð¦·Oó/”ô”ˬZÜÿ éÜâ*ÞñÍ =CÄ“O«îÌ«öb﯋ոGLÚädÿ¦<ϵ£ñj=`„WBýæ“™“ë`¤…"òýX|Í,õäš=A¯7ÁÂdƒñønÅÁ·Qo,…¸NùÜlê4;ßj z?f@ ÌÑÂv{…A?¨3×3º$0вœÂÊÛHà…_¢Í½|8Óœï®E«2_ƒ{©Mù Ÿ]íŸkÞ—ä¥Ò¦HÉf«™+ù_Y Vl8?‹óéâS:fØFÓz¡UÉ&Ì_RÉÕ;¾LFE@gÇ:¡qUà0HSªä‰î^}hÏÅç»rÛ!³þÿôj·@©|ÛЈz©–µÖ4ðûée`×=Ìvüc}:̵öŠŠ&ƒ÷ð2‘ÿW~Öª›–UW‰šOfA¡äësjÞÓÒû,ÎÏã@PÍ0Z3’eŽ¡ÏƒjS6Þù= hõŸû{–âˆœÐ¸ÊÆ(±­êéÈà3à'4õÈ u‰µä¨FeóÅu-Û¸N2}i°rÑNwcUƒË×ÐFÀ ÒÚáf’’•Ì´ÏUw7áIT;ÝbDAS„`ú<èˆÁœÂŸáѾÅ,•H03ßȦ. ¸QÚšÛy »ÖI$̶ÍüÒÔÍ¢©›Ê«8ÔÙHº2šz˜ÛŸÞYðL9ì©6¶@ɺ®1­ÐaY=ÍŠ?ºnŠÀŽó»6}µ\Y(¶Væ-Sµ¶~«kTLºÎvQ¯¸ýwš„rïò<EOò©ù`Œ›DYFûvå_韯¹wDlá²øFtKq[8«¢¿»¢WÚ¢ý ª%ôRÏó ì{³¾*´ÊôM$·à^¡ù¿BkÇÀÑ2¸ÙãÊ@â‚õKÒ#©p7å½+N9~ÊÇo‡¬gÒ¯Y§“:ÌlÊÎl?j_®¹RÓÅ î ¯&‰©;KMI[ÐæèÏÒ±lEÞ\3É·ÁÛ‰Ïêúf‡[ähªÓ¾ Ô:¿‘·Áô€~ø·‘€ú/9V|L#šÁå<<*–ñ.aªwÿð^«[¤ã,ÁöQ¢ÿaCÅ€Iëðf˜HAQ„£/®Þ`ñ„_Í7®Ïaža×° ƒõ5à\÷¨£™ëè"š>hUâ ¬ó»D)v¼(ëì¾BSËî*ƒx‰Ž¥x Ëo—Yt®ŽÑÙ Ÿé˜D—,EGË= ˜Ô‚¨E5Ã0,¶bV©,OV% G¡É|çNÿ1…©¥œ&\cKˆ?Žl^Ú¡itO©Îº.ËE–Z@;®ízYž"ßqUb~oæÀ¨´ÅþßÙ‘! )Åû2³Où.ÁZ5 Ý5ÍúÇ¡’h áLg{s(Vd¸‰g‘©‘õ “gÎËzxaÌWÀ “q!jê]L[€Öý0Ü2ŒxR¶2ÓÅè+JÞï»õîÂ\¼/R+øÁÍ a¢‚÷ÌÑÆLë%–µ#ÉI’µƒê(´´ÙÑ;¡‰Bé_•bïüárx]ÆÞ¤¬kÊïM'¤½*t€u«js¨8µ9©„™à••‚ÿ=¯@j.mÁEW@ÖßoÃÓTI¦XIt™Æ’r>ö—+^ë’]¡€ÈA…ÉQØ|’HÁ~é BÐ'Dx–[kLf(ü«­û'CÜ©Bä^ósÄ;µ‡Îà@Ð/j¼o™ãôö+©Ql’81C1Îlõú5ÝW &ùqÛ$<}ÐSÄ×c~ú܉öÔüÿÒ»BÁ‰â-#G‘¸cÒŸ]YgH° *7Íñêqs•™ôϪv¨' u6\œ)MTÂRr$…ÍúëÀÒÃbd̸+ºõïkGÐ8Ûaq¦ÐMû¢EGÿ,gý™mp«XèçÖ•9ÕGÞm·.bq˜&Ï7žj‡ÆÈ,Ì“OgzæºùG1×ñ†…ª¢SRßÇ‹ª£¡õ·Î\"‹LÕ³óØ :÷¦×YÞC€ X½Å/àyúžz)‹±YSôßCD¹ÿ›œ'#ƒø9Óø4êe¹ç¹ÓdmKÁd*Ô/h aœKiôvî"¯¯L1jða•´;ÈÚ? °É —«p¡±q‰¸ôàž:?”†ATNËò¦ ¡â,#tyœý/†7;£›€gÄ2¸R·ÒËz00‹Cˆ –‰†uÕ<<¸yÐi‡¹ªšH²1>%Æ‚´Wý³ƒqâ¿`ïüU=È.ižŠM+ ö¼™#>›§‰ºÿ¶S9ïxòö ä˜lå‡&pƒ¹¦Döòà:êª5'EáÔº ÃóB¨èiŒh`¤ð³!UÃ_ÀÛ¼nQ¦4ãÄdEpÍ,ÉÅ›ÝVL\&'„ôt/IÄ"¨¡#lç³QëUoL]µÐÂAY©¥y']br“ûSS_(_roD‘Úˤ0Ç}@†Wyî GS‚iË3ÎfÆîKÊåSèî¬T ýÊŽ¨{‰Þž‚Q™›L^Ñ®s¹#Z‡ŽòËçì¿%5¼|B9ìçñ|Ò˜ëÐŽr;p«°ÏÌ‹­zrGFkó<7bi øŒ  TágÓ8.•ŽÔ ´à.ÕDug½VsH®õ9ÁGžFL®¯œàn¿fÿùHXõÓð®é„þnò[ŒÂ§þ CdÙA›«BbËzt¨-=Wy·Y¥xö?¦xž N û¬mHì RÐäàÙþlxvA »l(1úw:¦¢ª7¥É¹ìéìµ$u¾,Óííý°˜í…/5ÿ6‚l“UV$Ä|Ú-EJÖåBð”œ.gï[ø?p×"„€H•bà°,ÂÅ=WRÌÅ6$°ÇQ¬n¥ª`º-À&O  úõò¾ŠcrõŠ3Ç3ÒŒe#ï~ nzS„pÏoÌÌÍ‘ýÝ+þS¾É+l¼p惪ò¦#¾ê SËF¥ÁŠ]Nà¤,{Õé ÏÙx@茶ìAÈ¢)aäŒ ƒÚ-clÉ?ÓÁDeÚ‰§–U?úÙ3)^hIЈÚ}»0Ÿ³]ŽJ$­ÍZ ášS÷*Uépæ…0äÇB¸ C· ¿ÛÓ;ó_ %`AÓ¦Ôù÷e<¶U‚l;Ršœ5·ÿîE|f'I @¡|´B‘È=Õø®U(2Tb¹Ä§€¹kVX5ñÚGËñ£6‘ÀßϘë̃SžÕ’Ãw½/ëuÄ[OKiiÑÅ€NþcÞð»[2‚ØjV+`CñìMtO©f½}¼|׈XIÛp‘5l8rt }°a°øõ¡2Q¦¸ðM"áêÂlÞw¯¢î†¦9 ‘{fŸ£ wÛ’~Ï[J8ûÑè "bH XèWFö䫳Îa>3€[»Ê Þâ 'Í—pÊååæ‘è8g€âÂë—fEšÆ;Å­·¯gÏ•t.“nî hÄR-N·œ¾M±ÛφôÎ>ïþVeFD.{´N4±é£ cAþ·¢ˆ¤on~K(ÁŠym…V!8‚¹î`b@NåÚ?˜û®ãéß }qŒ†âSÏÒ-Ñ£þ\ÕEý8¿ÞQg}œÊxGÎ Ú†JÁ° hY 7 72õàD4;+ð=Ò’=°V=çØ ËUS½§ÊFÖÏUó¼*½×­.ýV8D;^UÍCÐììWÕ ÚŠÑ®v–„ýLM…w±”ü_ÂÉ.² ôJU…£óöÓV4É* v“ö¿`Ï’ ºJx’åTë ¢rÊçÉó¾ b×½d²ò”œct€j ƒozý ]l „ˆk ø•Ÿ:Öæ×Û—û$ŪΖZ ܘ– I:>Hð D‘×(H6¦Jž»GY¼œz³P#àQz5îMdGhv 6Ô¹ñÛ<çÙ5ÎÑCƒ9뀧Fªë¸°+ø>UΔú?̤šq8HÓi¢†=ËŸŒSš'g # N¹œšA•ãe}óöXªúÆs_<ùßâã)wQÊÜ<ç’ŒYjH«pÆ+ò)¤AÂñé•õjД|¾ü–U S½ZñWǺ Ë£ –ŒGk"0êeˆ «$oŒ-î¿z¯8wŠ6qõ€ õ½ƒ¢)¿„éEAœ‘²9òƒæY•šÔq®tëlË–†Ò•Äá™n2ëaàèk{ &2ˆÿR¶‘‚m×ÅK¿Gk† ‰›}¿)G|CJdÚãÙ¹ „Ò[iló„w<Üß6Üู. J!÷}CÏŸR¾XR÷Œsí ¼b8e±\Ìà7ìö¯KÇQÆöíÎÎÇFaÛ‰ÒC‡»?ºÙ]jÔ.áh¹÷ˆÛ‡¯ÕÑ¢,à¢Õûdh]ØšåÍ:+ßJVº”zòos¹]±ÍFÈ+rËycÐap8…m¡þÞ#žC€yVrÍ1Ž–) £ö×§ænzL'I…Û#ã&0ƒØw¬ÌMÍs&^dÀÔz,•ɪ¼kÓP)HÞß½Þ|b‡®+—Þšr³+u9§q»†‡‰éHö^ ×i[ˆ·Á,3 A‡ò¢`àGlRÀ'7÷·Š¼vTEYea×5@X6BÉ쌩ãíQJzG/É®`˜[†ÿ³˜àJéð(ÈÈ\ãâ-·zSöhË;m£¶ƒÍ¢JÿÕj)ÊI­+•p=æzU|è—Éð’¡,Ê("säj=ÞÆ–s xFh5ˆå÷àqÞ68“¥ìräsšL>ÄÒ„f5¤|/¿>’32A€f3uv¸þ@%bG0Ëï¶ÄukŽý"M…¬l>ÛÂ’S|潊¹8AÃö—JWè2 YÉès¯-­`“ÿÒϢυ Öÿ¹À­ñRþWÖ/8‘(þúd—›Ê5ÛówQO3┯ÔgoÅÔ ukƒäÖ£ú›ßâ=FG (<£·Ã=4Ò‹Å ôÔŠÿ›0½‘qÃZ-KøDY(fÖtþôªvU­m.S+’Y‹`ˆ( ²5ÂqeX­Úu6gÉD á_é´(±!“Ät2¢^°ìWÓe ÓC3J„n‘Aw†Ö¨st÷o)(y%"Ü¢ŸŒ§·Ÿáë„„À6{w‚açª|‘€è¨•¢µÒ"ƒãíÎ8rk:& è®]o‹!S¬§TÀî­X¦ò¹Qì™æ¡z<™Ïމ¸Â~{VbðˆI€,[ÕÕÚ€ÃÔì·ÏÀtÍËŠx¦äsÈ,­´¢ ·0ù»`<üQfq´xª/'¨>òS¶Ÿœ6 wÛ\¤Mà±`J@/¶îÔQJ?cN3- fª“ }˜ðšY ŠÞÞxÀeúâà3-›]Bœ½–fƹè'~NZ®âÈ“¼šæs¸@m %©Õ±Éñ£EBÀ¶í·`Ö-Ã4J´»ü­n¢l’´‡¿Ë8ÈBȨ$`øi‘ ¬ŸGcWÂ1aɆ˜•`B™—Jó ƒã4:»½÷Ñî缓ܲ۳{+ó)¸/(¥Ë¶L,‚iëŠH€¥r#݆Œñ†=giYÈònÊÒ†“`”FÛÀs©8@Fi9*ÐB2 ¾ÍÙã~ÑÇÿ\EööUïô¢oÃmÔ¬é>éíš¡·ßQCñUÒæZvƒeë›&î¥ïͤÞðFiÿƒWÂM)ñ%+N¹áÆIF¸Á>‚.öÔ÷Å?gFÉÿt ÊìñðªöP•°_)ˆ„Ÿ¬IFú5ËUö0‹çüdº0¹ÖÚ2'š0•_Z7A4å‰÷//Т¼'ŸImqFj*µY$6Ž!¼›ÅG…#gœA#Ðo˜’yû˜ºÚ“YFñ,è7ôX •ž1›ú¶ å'Fwìè½›b´Èá ›LªúˆONÒâqÇWˆ/O7sÚžÚ똊Ìp‰ç5À]<–y(þì š8å0•b’eО8dûyg¾'Xæ(ý‰unùGÅŽ•\PN—cS©WŒh‚@- d¢Ú¸ëÌï= òpý±¥Œ&AQþŠŠÛZ…Y·Zì±gšÓšëâ£ã&* Úkâ§oˑͫû«-‡!¦_žÁ°Ð±àR?ë'í(¶ÚL:Š6TNáHs÷y¤4°ŒýÏ%è[MS1“¶­Æ U÷ªÌ¹©ÅR2Ìþ‚º{üƒ§OZt’C¡3b`5š +Äj¡tûzS›!2K$øÀ1Å^>áÀ ¥Þ®D¶‰ŠàÅEQ¹4M}‘—Ð8y:7b–Mh¸kÅ~F"ôU'.÷ššX aEÖ(X„nðœÔ_.½œÚñ¥¬1çÕÐK~ºZ¼ÒDkÄÂÇÄ ÑÚ·Ô)ë“Uzì5cø… y³ðù±QRÙšApØ40æÂâµø&x¢¼—PÀ5b÷$±Q\uYÜ))JȉŒ[±V€H´û9Üà4ò˜´9iÞP1´Käj|Kåãï¢ÏÁËÍSVÏ3 œê­–÷BÃSÕ©jÏÛ«e-Í&ÿ¬¡È Q³*0Üô?€È££÷Åp3S럒g~ ªÖ<Õ̶䣢\ìàî\1)@@άv4´àÁŽ&¼Þ KvDNz{¢)ŸhÚ4uÛ¶©®wpCKPC¯¼çëRM»2›°Xh¨·cTÕökNÅõK~Æ·Üh]sæä“>Ä ÙµiS;‘x ¿Ð­ À]×´s ¼ÍK|"î §^‰–}á!>:Ÿƒ »)÷?—Äüê~"çø9’lf2³ˆLLçÀ˜N?`ÑXªÆN¶3$E·Ý7Síûë/Âu@4°2ÞÖë Òƒo<³ÞÞðOwKwÃóO s±àøXS—é¸:r ä„L{Øfp_M\õÈ!‚$dQÞÇËz³ ÏÓ¡‰øiËÓ[› šT¦æ æLh/>·:·ú³ ËçÞGÛx£>°±Cë*Zؑɫº‚V™¶Ñp[7KÍÔ 5inÄ—ðÀÉgßÙ‚Ãs`I)Ä”um–Pb’ØÎ#²x%» « ·Óåሶˆ–L|¹…š³AGj4Õ.OqTã†éÒx(væG[HUµ0?I 7ˆûŽŠ·–§\Ò(MíÀ°ÈÃ!ŸÔÐþôL™è±W ®»£öš}Ü´½ üÐ~",ø+ÑÌá²c¬IŠ~xT+çÇ]ܾ8;6rˆz©“æÚá@*bQ®r‹vå%ì#U~–¶=åA´ÿ|Fž8•Þù‡9}Rß–*ÏlûÛÖñDŸx3Š$Îb­—ºe_ …dBœî¬3ÔSÕWI<ÊQpE :•„@¼µQ;/%Ú£ª‰Fª$3LÍî‰ÉéÜÏœ5ÕÑÖ3R†9ÌŸ*Táp$ãLIqpoZ7 K !”vù}Sé¿%&x:FxÑÓ\u»C (’¤çº20x<®R›ì*ÄÙ ¹[dHÌ4ÓÄÞNAýSTaU ÝÓ~Ý9ÚûgÎÁ- ?«ã|Óí­O­1Ò…6ÒÂ*BõrÐÂP{‡wôd á‡`­7à4ÎYÏZÔŸ›&>"áú¨ í‰°o`²L–~ß³ƒkRUïgùžVÝì>‚ê{…ÙTç"Eއ/rʪ/‹-W Ë=t†¶Q}tv~Q‡ä‘í¯¢6?ú(Â8cë-•à·žªÕ>@Ü-K'sÞÍÚ\@—^ÁÄ °ÙšQíƒHyQtïȾ1Ñ&¸ ’eè×p·¼†G Ê)cq×ÖW1ão¯ã¾zcü‘mù„îð¼áçz¯îbJÈæ«R¹wŒ;Ê+“3!3V¹å¼Ã…ûéÔÅOÚ‹™ ^™­Ãi‹NÓKæM—ÊBÂõ“ô|ÄÚs¾gíããqóÙPsÄWGÊŽ$¯'oSâ{úYM±ºÌ´ÛD-ÄÙ ¸¼–Ï÷ÆœÎaH#l¼:ÐsgÁ=mwñ¡?ï v-¸Ø÷93³ò2vašÛ8©aÞ¨jN îƒQ ð®&‚EÁº@/=c%:-læÌË ´~H€©‘m2‰§BspAG˜K+8+JY*)5N÷«öÍ’[¤ø·q‹A$¹¹^¦‹3žÔ´Ÿ¥& 62^!7G·žKVhà_…ýŒ…WÜuÀƒœU…ÍTP²¢>ÙŠ¬s°Â/Õ.k•µhÊmp$B¢rÕÊVÂsÀnþf3žLò0aóýÑX1Ác}¾k¶…Ø!KŒÌpà 2bÍ6ž<ÆUì}ތĉŠ[ R* _òHû«óÑb;Ì:Pœå´^ÈP$›F#¤ž”R%+â““ú¼g¤·F°L‰Ð‘Öö&| pð…#ôȽ̧!qaÿØÝ1<æ$PÏÈâïhÝ+$½2µÎ€†ˆ¡ú>ö›$ùÔÕêÄpN U82êØ $¦ðŠ[$š%Ñ›øÛz¾°èê×ÜÒ!×liG“b^*w¼ò7ðˆEGïŒ0øû³Õ}$èq šQ»½lrÙPŒ®ÐRr;‘!›Òe~gCÁt57ÔQÙˆ§‚®™•|‘­Š»ÄïT •\[^Aá&É(ÚC xfz»SÖèÏ%dZs»0@éE’­óu`𡬦¾1šÏ®ÊÓÑ þþ·-!÷ð„©'bõˆ0w{ÙÉ÷L†o„W'Ý6ÔjŒ §×¼³¸ƒóƒ—]tY<‹›I2ѵ”PÿÅ]RÐAÑ‹ŠÃƹ“‚‘6À(3¨ÑC™T£…Ì’CPÎÆžíð¯¬Ã'á Ùûz¸‚št£Wjñn!2^ÀQpçQ-·BÏ_±ÁVLÐ Ô䣿;kz‚F)76„ÃÆa=•€¼8uvü½êÑVæxþ6%1Øëƒfeu{Pú‹†¸Vm%"‡Éö@9˜*¿‰])ä' \„ºì)rÈô½¹¢ £‹¢c)”›>qa·8¦îÇ-Ám‘Xî¼íûÞ¦mßfåðÅ®È@ä6MBç¤÷ˆÞü|‘¬Q• k‰±oÜð&ÉÖóÝz§ˆ¦ši¡ÁÌ„­wÍäÿCǤëéJ³šnÎX7""­ù§‘il‘þk¯nZbsu‚Eè+Ûµaðõ©8à·¼qdˆ`#ÛV)§rÜ•ÌkQ>÷-vf7Д¡¢ÈI±)¸§Z—Tn›«;8Nyþޜܪ–váF›—z’Žô‘QÖyÕ[”ôÇÇ­O­W{ý|çnÂûWc„à·è–Úú¶ã¼†q™£I‰3j› •(® é–CÆÑÛŽ_Î&õšè(ù2Žç4ŒÉYV9ibì,­î=ü:ÉÌ»4w7NƒÙ¤=  J¢R0ëUÚR¦ùN®†ïteIl¸¥u¹=—¡ÃαsÃ`µ:utîX/Ò .”)•CSjÚ4Rµ¬Ôo»#…ðV8<Á¯Ê*mUa?ºÜìR3Õ×ÛPñy〪…Oa¸¨Èí,s%øç‡ÅÞ1¡‚ ÑàÁk8Ë”®ûÅgšðæÝ›~8äË^ÌZS{U¯˜d7®i«a(AcÓ¦Û]Ìe€‰«mƒû Ì WR–ß:¹‹“ÙšˆxÙiÀ½fN—3†…RúÙ=Eø ÆjÝŽ†qéšÉ×ïSKr–…+ëðXž¨ˆê†Ñnvd—7Us¨æ`“dFƒ#@Kem 6,Q³€–zñØ !7{Ü›í|Úß\ë®.s¤?pÌÎOˆOÚãíî_€uÿ¼•±©p[æ7š²ÑÉ©8XS§“ï[ô[(u×T¿}ÙtCÃqu¨Aö]y¶öß×®Ìðò"Í3²&÷Љµ+¹—½Î–ÉÁƒ1 >Ʊ¶lX|\´k–­*ÃKcÀèÜnû4³fÊ}êp)e fSÌhv‘dVö3†‘ªÆ’Øtá0á:ßg ¨•O©Î:=¥mf&V¿Jæ«XCf8•uèò!â‡*v½?ŠC;êˆ î¾mWuvQiØ-äaËäBs±ú‚”û°>Ae|pÌZKù¤o«¡âq¨½ƒp’´ ±ð &ŒŠ.ïäÝœýAk‰u!?+¥ãc® <'MóâÜë}K[D©ohÈå%z®lw?óÏ{~)šuÄÆÖm[ ”¨’Ä÷ãà²ä'·Ž•†"Ä…‡ëw¸4dLbèµÆ<’ÄÑ"Ól­4Í<žTdˆæ"hÿÃÀ$òÊîs Î…)ÍùËmíÊ^Ј´žwo:ì¬]—ˆÍ†Bâ-È‘=3cV»I1¸ñU5êËð›òfŠaO‹)„èö³zû®þ–Ø ˜ÂTí[¤Õ¹Gl8º¤‘h¸Â’Ž ê½)ªsÓŸþª!Ê7Ž0scpY¥„6OvŽÜ=’«µ;¿ãÒ@êK)†€0Æ¥&У*é„mU‹a.Y+”öàuZã¬Í=JJÒÅ« w Ȇƒ}d‰òø¾Õê©I÷%’2€EÒiI¹ÈÀ–3›ºiàÛ†&q. —+ù¯TwR+Ò{w–zéàøDy  ÆÔ:#•¸¢`Ë4¼ZœSSH´ðî– =g¼]›CâÁ;AýQéòwîÍËÔ7ÇÄö¨s*5.oº¬ÏJð¿é#e[v©—´,-mƒ 7f³ƒÄ˜…¾lÝ<J\ôR϶ÚL ”H1pê<Á„ÄÔÄ}ÏTN 8R©ªg{L6X…îßЧ‚×ªÈµzèt3‚“_¹ôs¤3*X´®ÍÉí£¸Ôk¨ä¶Vs=eò¶’§^5 ¼'@mÄÙE7‡ˆ¦Ä@vï~#áýƒ¿Žègª9úÄ(e9»4Ìÿ5¢ÿõɼ÷7KɾtÈOgƒ—tí^>µÇjAýU&VÿÐ@éa62<õ!P}¨v]`fð—ûº—›T°çåd@Eœ™ÁåJdžUr£ß¨µAÈ é±¸=HÄdõ(Pê(Öº¡íiôòˆGÜ©sì¨bð°áEÛ¥Xa E, ‹JÈ|ñ=‰#tO0b¢îBQIñIZŒ-°Ý®„(³d 5––ÐØýdµÇޱåíÞ TIÉh.0|âBž ÑÆSlºYe šq}Ã×<ƃDÕz£|iúÁDdxRHôºÅhîWYƒf»D€\ÞÃU7ˆe‰ÒOÙU—v—éA‰ýåÀ¼CK:Beø{Ñ¡ÅÞ“$ýÍÅ£éÌí€rÇQ‹‘ l.ï”uØKìÊÕ^”'793®¿} &Z(š&´±[ªŒÕ™¨i8ܺËÊðÅsã8`‹Õùšƒ4W;ÀÆ£³‘`‚æòÉD%¡ YjR#㾫©hJè•Füè…Þ3¯5V0´7f)UýÞ€Ë@¾À ¦;«CÍÿ¥&'‘&§ùî0…¶ÒíÝñËVÂCÁ\¾þÖÓÍ«"<Øí©c’Ç*!¢øÆ ÿ‘LáÐMçu¸Úoú8GŠE ¯¹Ò.€ÌØIÀÿ¬ø¤z¬$®‚ïˆàð©ŠCõ8ý½^çãgoèÕÕ@£PYµ%¨ïî ÓñŒ+t")õ—Ë‚xÒÕzbuö2:ø–a½ªUô §Ôí¬"ÌÍÁÀ9D—ŸQZÆÁ¯ØrÁjê©P> “SÓpÐè5H﮲SçBd€N«ŸèÃ?K!60ËõT‹ÛK)KU,k^aQãC9 ’EªÄ÷ÅC¿ òÅötƒ¦ïþȦDØ(8Z‘‡#ÅôƒPÜmÈâ·}°sŽÚT_û•íæÏqmhƒÎ.¸>-tŸm‚YF–¢2Ãxä þ¡¦P†ª.œñQwÁiªY`ÏoªQ€æÏ>ÿñlZs#<¿r¶.`‚YDÁ!wûÁN{©#7gn猂º`”6'qÚIáb úz917D)Ìkö!$UðcÏO1‡õöÜ®¿¬]˺´Ì‹œœM¬˜¥ÎÞ2AÆÓÀ¡»’ö.ƒ¨Ýªo:‡„a„ç]È œÎ…c¥xTþvРK4ƒâtŽèbíb%~eÅëܽ²®„öþçŸr¨i5eåÄàñõÝj^xTp¥²Lœáx# êx‚q‡£ æ¶©’uŸ6&äÛ³ŸÇÿdh¶›´âš“Sµ6Õ¢çBv 2Oñ£>ÒÏB†³ïÕ1ÚÆ+^õü5xæ[Vxe=Â3k|Zqm”…vêŸF$öü³qÉÝeÄåa-’\Ö0èäBÅ kHxÙƒ;w"…Ö µxå1Bkjþ¥<ëzjQÃÙtØØ$À[#Ï3Þ¸ã.æ"¸ˆ=´H  ©³t¬Ã4j‘ 8U¹»'²Ä! |'?¨Tà¦ðv(ôÈ¡‚÷±}r>©ÃWf <·Ó¯þ–KfZ·X Çbœ.+žÕž…¾éÀê&Yù/¤ ,’‚#ôEÿv$l—x?$åʾGÕ=ïš3ì;æ©TNÑF+8i¾.n>°îÞ® }lk•í4eÎu»^¶ºÇ ¿ò{'Du~1R‹ׂü:OR‰êÛôo?”OŒˆ2¸öin)ÿ$›SßW]†³ÌÖhoLÞ_ »bˆ™£Üÿ^/Y8K»ùåìx#'ïN0jrÞÃI¤‚=ç䂳ˎ€n#ÖT þ¶j+õ†¢¤’4 <©\™šÊ˜¨4µ÷z>¦‡H4w44›eÆ35ù€Ú `"ù¹ä®Ú¼B€ÒéV"O%›.øoÍ6o‹âï ë¦Qœî¸¾wo]¬ã 4Ö¢¨Û_É–4Ÿx»S»ªŠÌdÝÎ*\åØËË®›B%ƒL–VßS=ÿ‰ce ÑÐC=ÞH˽cSž¿šÀÆ#Æ/2À3HgW ·Ç”Ú5Þn8ô™ÔìÇt à»Ùìw߃V»c ¬ò¾8Šq׉3ýC§RIt²qM¬WMq~Í´×gB¯SK'‰1óÒ´$ÿºÇ+`…8'^çõ‡»²+ Æ“’ߣº1œÑ«'³ÜCGÞ‹yJ¨×‰†emâ M¹ÇëÆ³'Ç„Ýülò„T>®²¢9îI.APþ¦ª÷„Á³º«<|^þ&þf¢CO""á²O±šá™_ Ò ¶~ë¥)æÄJEalg§Ýn$ºµC¾K·µ·_?‰ÆÙ2Mi %få\İ2Ö•Ÿia`Gõ¥F4 ´kýBvC ß„ö`*˜Æº^æJñNîm¶W~•éß^ZÉõ߳ϱ'J0…îD௾RŠN=ƒ0÷‰»'¼·àõ»E}ÔVbIgÒäÒŸÅ»®Ð—T9’Ù—hj›qŒS£«x?­œåºtzþ»iÛ8X­h88ˆöD—<œSóXÜ7Ä€ ­> äˆ+€§T‚¯~f/û”4é^Ëfºä±•uûôt©itàím·'8пQ®ó+Öª÷Ì¢JS$‘¦]б‹«ˆüÄ HT\ãb©uÄË3fgÒñ3…0|ÇÏ…GÙsA.ÜÔ¦†Ýî4â0Y$†‡pë«*0›—(Dãx‡žÎš‹fS f€©Òá…™_ˆâÈ2……kM¹ý-G_¬û+¡Å¶å™îæ±ý7]®î6NJWÁÏ}}/BË¢Ot;ýk^mæ83—¡Ýàªö/j}ÇTý Âå»’'ð´m‰‰½1.;È3v@ë*[ój—?ÚýNoåy¾ÿ]Ç‚ÀÓãèDSjßþ[Þ1—–¨l\ò®—’2A(Çk {cš7%¸¿ÛÊ\í.óCÆõ Coù›ÅuuÉÝàöGM3íàÑ¡¦šP¶ýøÂåfªß÷ቧÎã½Í9+bò@U(.|©ÈŸð[ ްÕVŒ˜ >XþA›òŒ&áÔ‰EmôBöIï3gFJ¥?a´ü ØxØ1VÕdåâv}×ÊÎú‘MÐJ×KðÇÔþ¬©ÃÄÎ “ïFĄˀ`©ÄàÑ ,[¬à±~ᄆ™q¹º©j^wáì¦tÿE>ÑØó³Œ0>`K’ðø­q³—xáÑïr•£ÞrM|Ðm45ƒõÔ×Ö,Ûߊ›ð3S ¿‚2FRèŸ?R^ Çà2Ò¢fÆ®ëé´lÈ ®âQï ˜gœÜÝ•sm&ÇyFjÝGY¨Þþ‚Œ@‹•×e{ñíTÚí µý0 ¨­‹43àå´ÊaûßÇžV¢3Ȳv~Â~’H€œÜrR!]èxíy%,“m#þÕW.Š­qË[|€¥y`fü‘S, Rã²MD¡ïòMFÞ„¼«eÖ3¾¯¨è^g¯vЩ'ˆ›ãƒ¡"„á “—†i±cabextract-1.11/test/cabs/encoding-koi8.txt0000644000175000017500000000011313370016543015560 00000000000000úÄÒÁ×ÓÔ×ÕÊÔÅ, ÜÔÏ ËÁÎÁÌ Ï ÁÎÉÍÅ? äÁ. ëÁË ÍÎÅ ÐÒÏÐÁÔÞÉÔØ KDE2 ÐÏÄ FreeBSD? cabextract-1.11/test/cabs/filenames.pl0000744000175000017500000000377213323707071014701 00000000000000#!/usr/bin/perl -w use strict; # reads filenames, from stdin or from files provided on the command ilne, # writes a cabinet file with those filenames in it to stdout my @filenames; while (<>) { chomp; next if /^$/ or /^#/; push @filenames, $_; } die "no filenames" if @filenames == 0; die "too many filenames" if @filenames > 65535; my (@folders, @files, @datablocks); my $header = pack 'A4V5C2v5', 'MSCF', 0, 0, 0, # signature, 0, cabinet size (fixup), 0, 0, 0, 3, 1, # files offset (fixup), 0, format rev, format ver 1, # number of folders scalar @filenames, # number of files 0, 1234, 0; # flags, set id, set index push @folders, pack 'Vvv', 0, # data offset (fixup) 0, # number of data blocks 0; # compression method for my $filename (@filenames) { my $attribs = ($filename =~ /[\x80-\xFF]/) ? 0xA0 : 0x20; $attribs = 0xA0 if $ENV{FORCE_UTF8}; $attribs = 0x20 if $ENV{FORCE_CODEPAGE}; push @files, pack 'V2v4Z*', 0, # uncompressed size 0, # folder offset 0, # folder index 0x226C, # time 0x59BA, # date $attribs, # attribs $filename; # filename } push @datablocks, pack 'Vvv', 0, # checksum 0, # compressed size 0; # uncompressed size # fixup header's cabinet length and files offset my $files_offset = length($header) + length(join '', @folders); my $blocks_offset = $files_offset + length(join '', @files); my $cab_length = $blocks_offset + length(join '', @datablocks); substr($header, 0x08, 4, pack 'V', $cab_length); substr($header, 0x10, 4, pack 'V', $files_offset); # fixup folders' data block offsets my $b = 0; for (my $f = 0; $f < @folders; $f++) { substr($folders[$f], 0x00, 4, pack 'V', $blocks_offset); my $num_blocks = (unpack 'Vvv', $folders[$f])[1]; while ($num_blocks-- > 0) { $blocks_offset += length($datablocks[$b++]); } } # print cab file to stdout print $header, @folders, @files, @datablocks; cabextract-1.11/test/cabs/encoding-koi8.cab0000644000175000017500000000025713371306112015472 00000000000000MSCF¯,Ò§l"ºY úÄÒÁ×ÓÔ×ÕÊÔÅ, ÜÔÏ ËÁÎÁÌ Ï ÁÎÉÍÅ?l"ºY äÁ.l"ºY ëÁË ÍÎÅ ÐÒÏÐÁÔÞÉÔØ KDE2 ÐÏÄ FreeBSD?cabextract-1.11/test/cabs/utf8-stresstest.cab0000664000175000017500000000371313371306112016145 00000000000000MSCFË,OÒÃl"ºY Îºá½¹ÏƒÎ¼Îµl"ºY Â€l"ºY à €l"ºY ð€€l"ºY øˆ€€€l"ºY ü„€€€€l"ºY l"ºY ß¿l"ºY ï¿¿l"ºY ÷¿¿¿l"ºY û¿¿¿¿l"ºY ý¿¿¿¿¿l"ºY íŸ¿l"ºY î€€l"ºY ï¿½l"ºY ô¿¿l"ºY ô€€l"ºY €l"ºY ¿l"ºY €¿l"ºY €¿€l"ºY €¿€¿l"ºY €¿€¿€l"ºY €¿€¿€¿l"ºY €¿€¿€¿€l"ºY €‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯l"ºY À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ïl"ºY à á â ã ä å æ ç è é ê ë ì í î ï l"ºY ð ñ ò ó ô õ ö ÷ l"ºY ø ù ú û l"ºY ü ý l"ºY Àl"ºY à€l"ºY ð€€l"ºY ø€€€l"ºY ü€€€€l"ºY ßl"ºY ï¿l"ºY ÷¿¿l"ºY û¿¿¿l"ºY ý¿¿¿¿l"ºY Àà€ð€€ø€€€ü€€€€ßï¿÷¿¿û¿¿¿ý¿¿¿¿l"ºY þl"ºY ÿl"ºY þþÿÿl"ºY À¯l"ºY à€¯l"ºY ð€€¯l"ºY ø€€€¯l"ºY ü€€€€¯l"ºY Á¿l"ºY àŸ¿l"ºY ð¿¿l"ºY ø‡¿¿¿l"ºY üƒ¿¿¿¿l"ºY À€l"ºY à€€l"ºY ð€€€l"ºY ø€€€€l"ºY ü€€€€€l"ºY í €l"ºY í­¿l"ºY í®€l"ºY í¯¿l"ºY í°€l"ºY í¾€l"ºY í¿¿l"ºY í €í°€l"ºY í €í¿¿l"ºY í­¿í°€l"ºY í­¿í¿¿l"ºY í®€í°€l"ºY í®€í¿¿l"ºY í¯¿í°€l"ºY í¯¿í¿¿l"ºY ï¿¾l"ºY ï¿¿l"ºY ï·ï·‘﷒﷓﷔﷕﷖﷗﷘﷙﷚﷛﷜ï·ï·žï·Ÿï· ï·¡ï·¢ï·£ï·¤ï·¥ï·¦ï·§ï·¨ï·©ï·ªï·«ï·¬ï·­ï·®ï·¯"|l"ºY ðŸ¿¾ðŸ¿¿ð¯¿¾ð¯¿¿ð¿¿¾ð¿¿¿ñ¿¾ñ¿¿ñŸ¿¾ñŸ¿¿ñ¯¿¾ñ¯¿¿ñ¿¿¾ñ¿¿¿ò¿¾ò¿¿cabextract-1.11/test/cabs/case-utf8.cab0000664000175000017500000000110213371306112014623 00000000000000MSCFB,Ò:l"ºY latin1\upper\ÀÃÂÃÄÅÆÇÈÉÊËÌÃÃŽÃÃÑÒÓÔÕÖØÙÚÛÜÃÞl"ºY latin1\lower\àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþl"ºY greek\upper\ΑΒΓΔΕΖΗΘΙΚΛΜÎΞΟΠΡΣΤΥΦΧΨΩl"ºY greek\lower\αβγδεζηθικλμνξοπÏςστυφχψl"ºY cyrillic\upper\ÐБВГДЕЖЗИЙКЛМÐОПРСТУФХЦЧШЩЪЫЬЭЮЯl"ºY cyrillic\lower\абвгдежзийклмнопрÑтуфхцчшщъыьÑÑŽÑcabextract-1.11/test/cabs/simple.cab0000644000175000017500000000037513323707071014334 00000000000000MSCFý,"^Ml"ºY hello.cJMl"çY welcome.c½Z¦0——#include void main(void) { printf("Hello, world!\n"); } #include void main(void) { printf("Welcome!\n"); } cabextract-1.11/test/cabs/encoding-sjis.txt0000644000175000017500000000047313323707071015670 00000000000000‰Ž‚à–Ø‚©‚ç—Ž‚¿‚é ŒÕŒŠ‚É“ü‚炸‚ñ‚ΌՎq‚𓾂¸ ‚±‚Ì•ƒ‚É‚µ‚Ä‚±‚ÌŽq‚ ‚è ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝ ‚ ‚¢‚¤‚¦‚¨‚©‚«‚­‚¯‚±‚´‚µ‚·‚¹‚»‚½‚¿‚‚ĂƂȂɂʂ˂̂͂Ђӂւق܂݂ނ߂à‚â‚䂿‚ç‚è‚é‚ê‚ë‚í‚ð‚ñ ƒAƒCƒEƒGƒIƒJƒLƒNƒPƒRƒTƒVƒXƒZƒ\ƒ^ƒ`ƒcƒeƒgƒiƒjƒkƒlƒmƒnƒqƒtƒwƒzƒ}ƒ~ƒ€ƒƒ‚ƒ„ƒ†ƒˆƒ‰ƒŠƒ‹ƒŒƒƒƒ’ƒ“ cabextract-1.11/test/cabs/split-4.cab0000644000175000017500000007246013323707071014343 00000000000000MSCF0uFdd2 Split-3.CABSplit cabinet file 3/5Split-5.CABSplit cabinet file 5/5™’-PÃýÿñL›F medium2.bin€þÿñL›F small3.bin@œ€þÿñL›F medium3.binï€ÿÊç+PCzk¼ –àºÀ.E+%+^ÑþÔp ƒ¨ªs`Êà q ÚKìÉc`b8ðéúPÕÌð†±lÕk ñSW´ýŸ¦®ù ÃX†¶Ìˆ“b.ºEÑÝÁ;–KD¶.*/öê{Z¸HË[š.¥¼Ëfyï åÆ' àUµŒâzö`‘Êû€v÷¨yý%½rñ%¶Á‡l:]…°´`¼¬#VS,ËeÛ‚q ÞDkõ_{󘇄b…%@Æ 1?$ÂÑ^e ¬ØƒÚ Ùù°y¼K¤pª"$/¥:‚Î9fP–HpÕìD]ΩÃ΂ ‚«ª]4é3m´Q—æ9¦´ÿ(޶¤q_$­hH/~ÉY4ÕÞE°‰È¤“† 5R„n±ÿc£”ñ­g¬÷rÉ —Þ?Ez’~€Ý•$¤Z±+ê.ή¤&y}‡.ø¸ÆÖ#±‚¼Qþʘұ—ðåe¨ë‡Ó¾ís"Ï©18ÎXõÛ\¸ù8Dó=º—,t´Îj£O^üÉñC™rV×\Ä'_o3<ÃxÂÝhƒPèFÊ’Ö-x-˜¬”(×]Tv)p+,©tK?s2ä~è íD ²`ÜÊÇ|½øOî]Œ ç6질ÑùòÚlV*°k|þœ‚;ðöÕØ)KˆØjt´Mò†ÄAˆ.çvrŠéíßÇÚ §¥Eº×&Å#žf¬Ä’a7Äl*)D[vÞx¤Ý`&í‡ Ôªêé@á·¾3¿fáz9Ž¿‹¶ç'&ô¿¯T"·¦ Ký3Žšáéú<¯s6 `†ï7µ%@V¬ʈnº QTtÅ»-l÷ÔO‡úŸ“Åæǰ¿Sï–ZDyPæHr‚zü„ÂPKQƒ&OÒ*[•ÎP÷ÕP6¸J™u°{ ®#L¹ý¯ªXË`çý؈"*ÊŽ1®ß'â¤Ø¾tÑÊl;^8=¿WæÛ=Ãt´š …2 ‡¥%ž u×<Žñй‹7Þ}ÒÞµNu^Nꪙ ùC"O|›øiñ–â+nx 1mßÌé‹“–ÆÎiÐト¹‘ø|'²çb„"R‡¬4jßÀ`û\5èFó¬’§33Ì͘á"j‹(bp2n–ò/å!Îþ7>&Ha´ñr–{ôÝs(;Hâ‡'z.i/‹[´AËëV#¬dèB¡e7€è¦ …D­žÚô~6 tøá±¯ š‹ãOÙbö:n²èér×êa¡‘ìààÔq\*ƒH6JQ!þaǼÈ5à ã—8γýÕЦì 0¦ôšL¶j²V*çU¥ˆBý}¡ê ,Jïåö|u5Ÿé½¤úË~r_?§D9`ÄC™< yiä÷OF¾Lýbéÿ==®%¼ÁkÒɵ±òàôÇGð÷‘È› *©ÇÚ)QbXð¡ÂTAÛº`†_Æ»ŽŽ*¥J<ûÎúS–߬³WUCCÄ4ÇÝuxÇ—pW›yQÁ¢ÌÌM.;(zcë"¹ÛVØŠý!O”*¥gÂPw‚\œ°ë(p(døí¿»ãªÏñåˆÓ)ˆ±¯sbÕsâiðØvúœ"p(»ª~·(„hò£8T§ø3“"q`<úÄ5·@€ßx†kf9¥§^ö¼¡Ç˜}ü †¨KMá"2ìØäÞ ÆE*”üÑhH­{ÜþnÎz/B;b®Ú<+ jó­%€ïEDáÖIorõj„7ZÔ}øùµŠ_ê]dé%]{8³FCî‡ÿ…(9Ü‚zÓÆ»){pÄó~Òo¯£ zš1ÆÓ­–‚æbAÌ®ZëÎ\ïªè 7±¤jQ+cfti7xÏ{ŽÑ•(ÌHŠ .í‡ rYÄx¤Z¶ˆ,X‰™1áú ¥}=M™ ²…7|òpmnU=L¢ÈÇ£U}‚$:}ÕɈŽ?ÝÞW\‘ Ü7@TÊuÜímó´gDÐÀŠôCÅj6Þd¯J öu½öw‘±c6$:µÝÍ ³£\‹ÐcýœBnÂürésJšÖõFDúŒ-‹akœª¸ýíÖ­…q3RÏñgŒ£[¦ëÿ[NcºH¼Â.*"‚‰gÑhg/ù<}–T¼¨ ×pPL…>4œ† m”køÄz­B·‡Û¹0Ó»3ÅØ®¥þhØmÌîî•;Õ*¹P€Êƒ¢f¯ò?ƒÞC<]îm6vü ¸½¶Luì¾½½µ­Õûâa\e;-ÿ>à¤KÊËMÒµ‡p¿ÓŒ ‰À;•u"¨c b€€¼â{±õ¬,±žý|d¿TxÎñ̪PÖ!’ìF§ªí±3ÅPæS7Ë“hùC`¬Œ (ሸÒHËΘŒ >ž®þ—5 c”6m×+ô9ˆó:%Áƒ¢û§_‡ÿCÏê/©Ò’Û²Š6 Í 6Ï–^®;b‹T^:“Ú.3Ä]ÄiT,6'õW,I§ŽÆ O³*’9qÏÚ[uË.|•0™Ü¢br‰û3µDÅÖB†ÐGPöØÍˆŒ¥Ñ‹[Øø“+$Dx|Ý—„³‚(^ÒJ6(+6( ¿ƒ†»)<Ù-®ÓY1_Õ')äa¶ãl“áh±ùÓn¯øõüÜPpEÃEÜÙÆÄšw\­Ê X3’X€©K“€«Y[Vݰ¬Ló<âG?Ä©|­Œô“0ã´SµŸ'›ÃûÚÔµ­r\ÔY"¨E½ÿÑÉ1sxµL$(äFØqÌáÎc…-ê=±¼Úeý±áÒ/€a'ßCl6¶¼dÐn‘)ƒ $!ƒìôê<ZÞ’‰wøp8'v?Ev™™«²¡>q®ÇðÍ©aàüò3-6õï„MNaÒ{ c[ÌLÃò‰}ïTˆº›¥Kɱxa8)7ÒšYí±ó,Ú÷3þºcz2ØÎ=©±°lÍd0¾áM…¡9™úÇqÞžIfAÚÄ<ÖŽ—ÂIZZ,š±Oú˜s(‰ÆŸßöŸyArz÷(-ÍCyÅwz‚)’´DùR[jm ÒEDpIDŽY÷ÅYóXy{·`ãNzþ:¬Fæøg§ÂmDÅüü(kd•^¡‚SêšÍ©i‡ŠI¤#>Ël¶í——ƪ§Û•ñã¤øöü8Š"‡†ƒbꃳ²©`Ìã«à¥c*ã½ ×Oº“¸ä m¸±OY†ÖúqF.¥‚ Ùÿd•ìID#c€¥¶?F• ½8 J•"ƒ/rxÔ!Ì$¨<ع9¸º›öð™H•¦ºwž„.rÛh”æ]uc¦B(ßíýRšU+¥/Væ¯y5°/ŸÅˆ·Zº9èBÐ}Ù''KñJk®ëqw‘ nÚ]vFœ´ûU D#±&¯›j‰wÚË5bÖèNô!…È‚pNž2û²^‹³€Í ¿÷ЖƒìûíPõr5†‚Çi£ÄyL‹-)\8Nž®þÏ+0TÇ ‘ ¾Y`3ÜKE–ö„îÿ^¬S£l É!¼CZv$uáðöXHÀUÉ”¤Hwvpm5 Ë$ÃùàÁ»&Ÿ•ã`¨² ³zO‰:i5•ë]ˆwˆåáYœ•à<àÄÈÖºu.Ϥ@ä ½§j©ø È}!mZß*§3äõP\ ÞÛÇu‹lïq¾FO{5‡ ·Ýš •¥ƒ>ÚÖþ‹9JÒWW¥:aÄd>úÜžAõ£áó›Ð£t4E?RqÖ/¬l÷Ç+ÿ0dUüeÍôŒ‚Ý¿¿Ž^$ΔçúUï e݉Ût°t^íóÍŒØMÔ)–!r­%íãôéÄj^Tžáîè$rx´Âl(§kšÙ7É+ÏùyÓW£ÔÞ²cèßм£Í¡LH1kè¤ÞÖ?¯P¼úIÂýyQ›<¸xÆÏÓѶ˜¦П/ã\Èä¿.î3+EÔn$UÌæ4,Ldú«©;OÝj5< Âă{+u5ˆ<˜x¿ãd2Pø„3 ˜Õ´Ÿ_%_Çü^"ª GŸ'^”¦Zñª“S†ê»õï#î8ú‚<Ǫ0QÑÅ;2ÜÜ!t41#’°uŒ”2d;ƒ5¿¬UGIŸÝ nÏx/¤ÑÎN£³õK¼~‡N ŒšnpÁÊ¢<¨÷¥¤9:¬ïd(g#3Æòt&Þu°ùƒé,/\U°ß`šÈñ¥b°„âŸ?°2ÌqRYäÀ¿ÖÒ{k«hþ9øê«ºá°Y`±aegƒnWl×(š:93ª£Ì!ZIçj­é_ظgWÜì âÙ¨Æ)ÚhR3Œ·N.ÂêõÚ'’ˆdŠµÎ‡Ž¿Þ†° ‚¤#¬´OÜîqôTESÊN˜xN/GZLì¨í»Ã«+—±ÔÝ¡0‘6-IJh? ŒFYq´b€·¸6‘9Œzu½ÁÆ]ÐZýTI*àx°Ý‚iÊÔAFѳ §@(à8-IæEͤŸ‚‚ï”=X×á*¥›š<.Fû þC!EÂßåm‘ˆmˆ‡@–NQç7ö¯~××E ç‹®£®£1 ¬fªŽð4Õ)5 能«ˬí9†ÆdôÞz¬…ý½‘J@O^OmÂÆ­ç:öÍ…_c?À½UCJ³‹òWX016Lƒ”õ•Zo>fGUŸda{Ý –¿ãf.ËcÀ äš¦"G½ÂiU»Ÿ7óG+„²@O`Ôϳ²òšÚµJuÄò–áÓΫµÏ´ú‹ÆS¶°UÀñ^Ô¶ Ó¦n|T¡ Æ ® ¹Œ!À G¡˜iutêíÞhʼ¦ rUñw”="ÖU§æçõž¥÷Ǡ܃7" èøÎ§kÅ&˜èQÀñ¡ Ÿó°ÓÍÖ™šZ™ ×YËî¨ÌÚüz€wh')1e¦R ­W½ÄÆÉÑaÜ*¶РÇù©Üó7\ ·ƒ—;ì( â÷Õ¹g„¹-B‚ÂæTòˆñ{í’ vë9.ø Xw6öãýÞO´’<âv¤ú~)æwŰ²HvT"í¡›ŠŠì·!OÜtðž9ú¥Bð¹»^ôNyëÁLÍs„P"»‚·Æ¸{¡zé´Ãð‘û¬±ú õ _Ï[v8BÛ Õ6Æ’-5¨%€Ô?E>¢ÜO>_mLe˜tòáëœÝŸ‘ŸD»½ºí3`þ^m§ð@µËWVÇÊ}>74¯ØK>nãÛ³Â8óñæÄêåNDkîž1‘$&„ôîšE7Š«æFà?v£–µî;ÍÓE$¥ÑÕú°T-YÆS ÄÑÒ…_+‰EGd`äÙqº|o˜°½S w “ôÎÃi’!ãu¯ýîs:<í¤IwÈ-J[Dh'¯w{…°„TWŠÔ|’Osî`x0ËÖ•“äèð¿ZMLq SšJu›bµŽC8ÈÍÁÌR­ðÅQ…_-•þ:9N)ñ;ò»&0”–2 ¡ê ÕB¢ýç 󯿣1qªÏe¼ Š¬ßèÕ™uHÒzè8úsUXQ¬÷§&aÜ6E=€~E|ù}  |s­ù àŒ¸-ý8i…n8^_ͧX°y-~NÁg§~­¨«G«.Ò[ü{OÞD€—PV[3Ìt¾°Ô«±RAxè‡\ì]õK 8Ã-A€h‚áÏÅ4EÓf‘ðõ|f/ƒ]íT„_<`_&x¯5/IÑBiЉÈBAµò| ŠŒç¨É|W¶qMæ%‡õ¶Äo¹³gKaWÒˆ /˜¹¯¯±Sô=bR6›cÙ“ìþÑS"¤$͜ѥ“Wqšcõéº\Ú䟾èýEòâ¶£Mø_au”™Y¿ y?ÿ²pÿ°Ñ‘yË]V{Ù·,ÚØÁw„4î;ͺ¾Ã*~(©­ËG½ŽxÔ‡ïÝDQ¤X&“é["yþŒ^Âä²²³€Ó&^«Ìl®ƒGÚgÀííå æ‰l 4Ø…È.ŒD9ˆ³ôߺWrëÅHƒÐžnÈè f) òϦôÕ+Tù`Ú¹‘5Œ! šã ^òž' çµÿ¶F…VŽ'éø>‡. ”“%ŠÙ^–¬ <µçÍ xRµa†–[žàæ3#oÆ™•ì:eŠ6uB$£*õF±2_OÂ0.˘è®è4 1®Ò¬{wù†¹!Û#Ƶž—ùç8^GòÝ2§B$¥v¿:Kb²*gí;|P†ƒy5{qÈq[ˆ¡ÕñÝ“4‚Nþü@u Mr67R+ð×ÍÉ´Üë6,R-û¼4€„§Åyœ7R±íÃ0(Ù¨ìŠD~…ãµWYð#Lü!6®t#Ù6Û…Üjqªæ<í{ÈY¢ªÊ=R§`4x¦¹e懹ˆr .b—¨Ã)»ñ-œëýÜ/‘-ïŠô i‹Æè»Å’qi°tRn盹=1èï@Mî¿Ö“U0á–ÙÅ*D„5+¬´£ï_už¬–¡ƒ?±J *=ðrBÛeUR/`45¢,ä˜Áím•–½ÝàX"•l…žåílØBwÀcßÉ®Çø£ÐY1þ?¿rU:àaq©ANá¤r„»Êdš^Õµ‡™v€1µÒoz"¹íãþ³pñGqÇ/„œ>p½¾@¨¼›˜4€.S§v4FRt ‹®U‡È5Z}ÛBÀ¦Y°•xv }ŽÌJôo¥ t!S9Ü,†Eìô•žyÌQËڭܘ—ŒóƒiíF¯¬.…ô_Ȥa7>¯ÁeµcÄðNWÔPRÐQìú>lVaë|Ar U(¾å}FDóC×çË“¹ì=VA¸‡ÔF!Q8˜]D²®¡Q鳬¦ü¶ŠÏüHËÅùÇê‚&ŽN¯fÅ,Æìy\q#úú,s»º —œ?žƒ¹Åi72ËÅ錒âBj²ƒ„Êî%Ê®ûTà“èåšÈŠS96{û ®R¼´÷e…È—‰s-”a÷QBQŠFÇe/ÿ Ÿ¯©ÕEŽ^‘ZÇÈ,@F}©å02~Y˜¦¤Û|º¥Ñ=º¯¡ >¨`Ößø3R<ë.DUFIõ2ÞD-Áôx ÙÔ'`÷å 6KkÆÚ¶ÌPþK‹gÑ9fņ¯‡“P;p£ˆÿ†ŽîI{‹¡¡¸ï ]àÓý.§n,iüôoEþå×Ì rÑpm½{tBbˆò°"R;בÆhó¥¬Ã»¤3Nb2a#{¶ñëV¼…1ä¢o¾ª-#ù!=Ø?}= žc%)¬ÿ+TÑ3R‡É!ª…ÑÖfƇEÅžÀœÖ¶¢'Ãí|<šHÏò¿É ;yi•ž»G‰¾åðaÃk'‚2îOŸdD#³d·Luº‹ìNfs.Ø'ÞÔ‡º,'×Ý!´â[žyo#;šè«ëâÆbUÄ1X¢ŸTnÅ ) l‹_t7ù»±–³A‰D56ŽéMûéÏZ *)õZž›à¥}Ç𥟔òùƒ,›(œX0á»ÔU¤7ÞÓ¤¿NŸÁ G¹oUƒÔ‚9Ǻ`@@#‰¤Ë-#É|uz(Öbž Æûüñ Êã^1º/=•íö«2ÏDö}¯C§GG=ïsÎÔ@ù«[›þ6Ô,º#’ý„þ7{d=¹ÿeœÿAÑù3~<ŽòW|X‡Ž£)!Çâ}9ÿÓîÛ·JÊ_<áRÚêGHxÒ…o˜Ó ?’¶^¢K—=ðt£gÚñ/(º{ã]jKzZìßÊE„üÔ•š–:Ù Íʉ0γþ1¥À"|Ë‘a]uÊTg힉õªB ÿÞª²ÇÄÄ_¹¼FÍ"Úî~m`pÁ½™íé}`ðK‹õïŒMÏi8\ ^>^6…ÎOnywË‹ ‡G[¸–í7 °ðp±Ðçï„ìUà g©(Þ63æUìÃ÷“xèqŽŽœ…“ZòÞ47¤Y9€‡ÚFàÑsEžÄ yîܱ7’øÏ±1×t↌‡@#ûCWŒˆ?®kÚÈoÌKQU%öz6¥v¾NH~õKGœ ÂÂW, Å„ºò^ñ¦5Ô˜®-ãMŠ6ƒ”ÞtËþ—Û0ÇmröŽÑŒJŸW1¬‘/qå”[ÊO™ñÚ,ç$ɹáÉ÷›Áx@Áw“îa0RŽ ‚®nUÎJxš0²¹ìÛ ¡5’ó¥ÖÁçøN¿²6äÙÌ4󿆳çÀø´ƒ(kØ•½døM#ál~n^jˆEð”™»©SÏýÔ´ÐËHÀ§‹™«þb-ÆKµÏ-ÆôIDKéY…Fãž¶JߺÅÔh§bâ-´ÇÆÕo=¸F«÷Ï ÓÉ_A®q¼vKœ»³ÍQÚw–½ÆÔ¥ÍÈÂVdŠA@€U*ì0v€²¡Ë\$¤¯!„}‹ =[#ôoÙ"Ô4ɬ / ÍC57W1?`Ÿ‰Q´ ]n‹‹¶M4뎵<âìI«8FB[’"§j5A{TsÐ8mÏ“:)–|üâéQüÛàùW›ŒŸD!_öÇûEë®|vN„Hë%…æ}¿Kâý6‘ªîÍéïÈGœ™ÀxQç“Ûêº4’$¿Ï¸(„'4ºã`oÏø‰öQò•&éñ\±Àã‘—˜7ETbÇShçKtÐÓz½bnö ïZÉžš8ÏÏuÞ× ôeå ßeñø(8„ùð¡¢Õã`s.úÿ)H×~9ºI¾ìÝK/ÇGÎ.ÍÿTÙK{Æp‰÷¥j¼¶ÈÚv$Ü’%›í¸˜¨¦´Èb¼]zsõ{ÑØ6Ê‚ Rè÷xZš\„Gø*ΉÄÖ†«@Äreïo7é#q*04¬ó¶ªžfµo ¾¡„âýŒE›ZL·ÓÁm@ƒë~ýƒ"'*L”:»ÄìB6ïuKBîêIâŸ.†ûNü¹Øw(ÄËP„‘JHú*ͳ¥¡A_ïã8 fÖ£Û¢b ŸL»Ù¼˜âš@îpC¦ó{uÇXvè4#€†Ú>Š|X‘Ë&3çñJÀ3Å›4H7Ék¸¹C·uÜ2;ô¡j€Ù³çy\Z³Ýv¢ü]œ¥™´-¬ùéB®üÌÁ‰Ôú)UªÄRÃW}´ΡSB2Ò0ú^WoÌ nN®ÖÚëVGYtÄWŸRl'ÅàßÆÂ¸}·{IÙ¶Òµ>èFS¡ TŸ©|Þy'W͸E|³a‹W¸ÛÚTW¸1˜bó ;®gР]SÇ‹Mb@ 5Þ…rÒ¢çÍæ’? 0ïfàBöb7¨W‚êª ÷Ò¼¬íy×B}½{Ž5¯Ú¹Ïïá©ËæÞxÇïâÀSbzy¯9+ÔÇÅmÈ–Îv°Úò{UàöäZÛq2„4x¢Å']sýã<·Ðm¯c„HD:ôÙl|¯<· ž3±é2[Á/³ŽAÏZè‡CÀ™Âüs䯽~oÀæâ«+ÑKÏ6P+Qnפ:]É´'8¯#&àob´«Ê—Ìbò.• Q”¤ ÄÔ”I^Dܾˆ3»%«a«±×eO]Þ=ªø®]ÄN0WQÂ#{¦2|þ+ñŒTg¯—1;“Óæ"U\Flš‡Æ·¡³ˆöu0~öúŠÐJæ,Ãj[Xo³›j…y+—ÑÚþ©ßÌ¡²,CMIà üäEÒTWÀD½ûzå…Œ“’ÚÙ:”g8u6¡”Q}vþ"_êCQ +¬-í,ÀsêœÌÍZvªÁúg’Ú´#Ñäò'ÍT1 H•ZiÜaƒ:#¹6”Ù1äzQóš9ErO½7Ý"Õ…#S=É …žÒ‰6Í‹j£6@qÜŽ&8 Èto·P’{¬¸»9I©‘×Î/»PÐm3Y§ÜA¢5ªß?‡_>‚Dårrv‘ Ub)¹Ñ—,r»:LQ{NöZ;åNìñ€š î¢øëÊs°®IEqóóx’‡fn߆ý§÷ ‘å:¬’õÍŧñ7åšÿ•a¤EÑ`Ø Ý:ão ¯<°!D´Ž¢È±E«ð3tÔÇÑ&=õ£GðôSŒ̆Â2Ö‰¼.0Ä‹xÑôeŠ#ÄâÇÞ™I=ø©ºaíðõ¯°kÐT1$Öª}znâ]wçØ%U }b³lÚ!æé$§âÝÉFMÑ£ÎE^Ú+ÞaS¶KüƒE@]AïóãTÑŸãgú‘uëÿVÉ Ù UG‹Kiäœa«Ýš_dûf†ú»ŽÍñÕL¾\Î~ßg—êè®Ï?‰˜FWœ`2ù™0"8cÝ‚ÛÅ\ÍQO^GK Ý-7_Ÿ¹mŒ›q–?"?“£÷m¸­QŒï°[¤eo£ˆ:9£Î+0П3”7‹[Ýqlª™‘w!Gø"Íð0B÷D:•¾«íÔ¸RlÞÝYÕWò(Ò•D1Xb~Z1"¦¶Ätžª“:ÊX”­X,Y~s½u«(÷pTâ 2>ä çOëVAI3þ„ánœwRMl`¼dJëËOU8¿Ñ)ÍÕ[y‰]eãì( ÜÆ¢uu\‘–VF—m7I…Ï`yV®à Pæ@¦*¬z >ܽH¢°qYŒÇÌÎDgиrž¦k§€®vðaÕ#˜({3ÐfÝ×èA?Yò¹À5ß>Ý ®×ê eÚ/où¿°²!l€Ža`£bP(îÿļ.V¥H§Û­2® —ùKëÈêªE„2è2B{QKÃÄɳ1ª%FÑ¿{L}œˆ\Æ19ë,ê]ۭÿ¯IÄ©—MÚ5QØÂgɪ ¼k^ÓuÈÊ›-ßågnH¼ØÖõXÕò’@›™IÄ`^ žÖ8C©“Ýl²¼Œ¦âu)q/ÂÓ§æý;"þóÍ1 ‰%¢¿c`³þ{i?E 2qPæd8M„‘@šuµŽõ³mSBÎ"%×W,ã›Eœ¿ üwnâ¾²B™M_$ó¼–j"¼[-PÚ0`ì²3&ñª¨Ç炪LCÈl)€!V-÷ v5…ˆÁ‡Â ØG݃¥X\”rXÓrR?¾Ë'%õ¢‰ã*ÓH蕉ÇÆJû¦ ÿ|‘0¿=WHnÚpï*m/ ³åïÁc 3Þ t È>ú .y ²ÊÓO<êÍÁœ÷¥@Ž£RÏ^3½RºQî•Øîõ$ñ&ý Zµèst…‹ÀCè"ÂeQy;¬‹T[á`8Ýè#Ú3®Ì¨ÆÜSC•83<û ÒÞ£· ®[^,ÆdðvHjwX†v”FSN“Z§Ìwû Ö[FÔ`c‡›RœD9É’Aþ/ðèðõWGL+»‰6fó|¯ä¹Á¼‹£ÚÕC„Qï”åùÃ4vëd È]úYÑGwæ¥n±WbVÙÝ^w®Š«±µQj‘ýü"ëÞ^á9~ÿ¹~Ûòž8xй7œÓäþÏôè£f$QÙÚã’}…œ$)ìz½‹¾ÿŽ{4r}›ÃC¸ŒØZã› t‡Âk˜(]ÌAyË~¶$®¨Döí®7ñ& DD¿!ºôNÞú¹ô­Ó‚S‘‘lfàRþ4ÓH•éˆÖ£Ãž%¸]ÚÍ,?9èz.¸ËqT8°½"jþ'!xnk²­ý„E…ï4¿¯ëç¼½ø1¤F.`Z·|±&žZ›Ãî9£Œ~Æc½:¢ðõ»™á–ùÚôí¨ÃŽvmØJs†D1\™„õ™ü£Bä¾Âª  J6 qNKýaù°¦v«òwò'Â!‹ŠÇ=èÑ­u¬ŽÙ hÖRït(çãÜ4ô‚怹BIBž"î[´Vlè®9v…ßç<²÷… L,dˆáŒGCK€ÿb$˜Íô¶øe§Ñpp^_ÿ?Ï^¢}óÜ=~,;~Ñ}Q*I,T %7JÙV¥¶S×i&{⽉}i¢µ/” \ îYdh)lNI œšp™Y¯º ÔŸÅc €®r0OãOtðpŽW6áJÇ©‹» OægÔiè“€–Z?úqùtp¬Ú°„Z^jÈ(7(ŒÂÞ1] £”§A¥=Þn†3Ü›|×z:)7–±«,ˆq®àŒEQ¿Ù©6ÿð áq4õfÓ5~I°ï×!졊j1§ñ ÕTï¬~ÌôŽý+À ÖôÑVŸköÿ ‡¸ˆ};¤ :\cÉ¿òÐ7^á–so;)Û3;ÀTŒ‡™i7Ü ú׋I8ÏßÅ*SV™ÄÏmÚ4Ë7&ÜÂnׇ4úËf8ŠG;²™µ z’´Í´õ‘äR&üq½¿!óˆo. ´µ«Ÿ©åRáK7&‚ä`K„à\þÐ0Ãâ¾Ì¢³Û{üc‚¥h®ì~ÖGÍÅ1Tš9iôѪ*Udüåš2Ï«-2k•IðmïÙB½)Ê-SBÙÚ€0È ëνñE%·ÓO·ºÜÚs6{óD4˲߿.\š’]î9Ò¿µ«à®$Ø ð<÷Uä¾iY÷O±åÞ ªÅ|Šø†Ç¸Cl[+õ ËWñ)ñð2Îa¹É@8¡ MæîîRþêJ#1ë(5Ô_Ø3pí½ËØB úƒj~Çb–&ÓÌæìO_oª/}­ájáÿot-Ó*Pî†:•t6Rí$î¾;â¼c­Tü1ÏÔº-Ç8qíxæƒYÓv³/{£uˆor þåw0ÈÒ(„Ò%†$üònyµ´ŠáæË+ᬠ€´uï¦û³×T9Cà©âœÜ,éé ñÉBqãåãèÓE µó赡D1±‘±àë­ðZCx^xâó,֜İ‚èFJe„ăMìo‹ TBßâô·ebIÃI*[ñÒÏÌ ‘Jµ¦g+åæ¡Ló FH™šÞ`è0¶AŒD*£ ¨·F&LÿqJûJMH—Wzåz°Ëxä£0Õ'¢n.,Š{È&_sgCý5y'_à‘¿Ud³&šÑ:ÂåtYÂÀNÀ¹áiÆP'}óý0ò½×H ³ƒ†2öÌà)][VÁ‚¥Æ˜Ü½ñ6£uààï•KYY¦èwzß/@½}·Jðîªy ª»såq¤íZ¦Ö~çæ¥Ÿà“…«a}d÷ÒÈ 3n[]ñz”’8`7ft–B Gd6è»;„!3ÜçQMnjϑ‡L"ŽÛ8tuh¶5øV¿-}¾gAaCŒJ޲AÇ&öò¹oÀ©¹}6ÖìîÝw/&lîNÀJ“/Þ²s%…ßozHn«)HÈio÷®ÆÙe ¯×ƒªÅ_ôüU`†U“BÚ¤8³7¡qt£Aª€rÌ]]g‡´ƒ.p°@ˉíæ+±¨¡@oÀªÍê‡Ì¨†yÕ)n¹ËÄy(äà3×Ï…˜Žú}Ÿm³Ê!ŠÒý¸ú¡z ÛFæÀ9z+ ‡„23ùâæÎd;s!ä+C‹ìi@tbD³)K…A"Dì(ªåFÛCWõæÂp– ûòì@íšë-‚uÇÉE?Âiè‹Ç åØJº y¶‡nÓÕœ‘*YŠIcÿxr´ÅØL-ÕA…MCUû·{Y±“ã,2¼®œëlÝ›îü´´`ƒþø®æréÖÙW :õŠ 3Ð'>{›óë“<^48‰çу!áä¦K†N`ü*¸8…gäX þÈ÷Oƒ¯%E£»¶:¶=áô§-ŽjŸY¨¶aÛ ƒbhäDt󤹑œUxLFý3o¸|©.jlÍZ‡,¹ÙwÌΙåý`’7¼Ú\KU µ•oÀwvÞäèÞN£ÅºnËLa¹ü„ÈŸ+  w\\±iÅì\ 8«‡}"@Ê~²â¾fÇï)v”2»9ø+¼\ 1DéÓ8¦ë‚Jƒ[9v®êsf8¼ºùdWØ"Lq4çraÏz°h¹Í4·údT#þ^ÎåZ¶*ãóhϱî},îÑÜ\ž-ÊÄðä'ø‚óÛ€š@L ¥¾<ÛÄb¯Øò%Ï„¾*ª¹’ì ­‚óËR‘ua‰Í «½e_¤KFvèÙó–)*“±'$=§ž´Rî*\¢Ñ|»’Sv@N¹V”8y—Á­ˆ0*}¿~• „¿YÕ¥Ëºf抪™ª¦¡¡^}†·+zé¹×)L|êK½K8lѸÊs÷oë² ÝÁƒhk<*ØÀÕÉÔ“tÖ¼ãMnOÙ4ñ´ca‘MÝ늳½J…ígÊåë?©0J F˨òý­ì8w’GIÛøi½&üóúnu˜;"h£ÃŒæüË*èÓ)³Øf»üV÷ s¤+õÏÃ+ü¶ƒÌÏpŠÀtUyZ™SÍ akÔ Bð-;*ª}ÚOX^BÞsÄq1L˵”"“‰£VU%l%Ò•—šã„ÚUØC0yÄOíÍgJ’ñžÀðKìSà ðç­eæ˜Èm ˆ˜kȨ*î³`ÑÄñê%˜â‘€AܹªŽrh5YDFªÜp««)QÚ–b@®°0šTõ;Ü®$ÕV€°ï|µÞ:¶¡àÔu)ç“Êÿ½ò=mSÈLC?É=qƒ3¨¸j²rŽövÏ›±›µ‡Úî™"ƒ—“·±ÛB¤–±*ùØF^ùS«ZòguÌæêRãÿÿ_¤Iz ˆµ:Öë6â—•IÚ?ð\åQ=¶¼Ë÷ÎÞð¿ d~²`„$õÆ8ß/Y©t&ãìéRß smÞ]U;¡ìtöô™V›ÐÏèo×H ¾’â˜íp‘N(—$£#ùØ«iÙûÒc\Ã"Î+˜ÎIxú˜¤š/ZÁë ÑJ§(ú¸xì8×rK²pµN}f&Ûç9"Ø (hïŒ?Æ$íì%ë7Êû=IMácOÂüÌVy& Õçjß(ÁZW#Bàâäðˆ¿õ?EÜQ7ñ8éLümJh«!ßWiÄX ±ÁÕ‰ÐËžxÅõ8FÖ•á +’)óÙ岘K°åÛQ0Ž/Ú/{pGSø[±R%örM™ïjWàδ} Þ_­œàú}<.·q·¤W5>w†gœ¯Àï6±MÖte…š®××/h-yÒˆÖŤLñW¥œíWýÛaW‰°‰vo;ÿöžìó“ã¬4T›ÃÀ8Bv”¡IÝ ˜ ¤ö›ñK÷ž¿Õn¤rFßy5/¾!í¦ i#A¤?œºa§Žõ÷àÉ™hw´Ï:š>̾µs&Ðg¹ÕÄú—üpy+y§® Y 󷝿¯_/ncnI‰„‘׫ ¹÷È1´ãÛ³ð‚¼ÆäÖÕ°/f Ô™ˆ•½IT_+£Ê_¡¯fe—š…˪$H¡½F… Û ?%™ ™iÆïþ ;axf@š®cp^IQ‹ë†Ó°÷Ó¬=ÞŽQ"ÚG|"W©‘I÷p*+:ŠF5šæD¦,"G¤EIcU„É–ïØäÑ– ²1–oû€k‡í&¯ã?ð1ôìGR·ÏEû—Î Fz N<. ^4!èÖ¼ÄuÆ#(!óm=ÔúeiÌ<17ôw5Û]‹u+ä.#ìñU#…;ÅšB 2G•"6sŒ[¹Íp¯y§åž åNˆÛ‚ìB¾ÜHyM­þöAíY/õdémÞ(”RR˜ižÖ% Å¥7T^ƒƒõ' þ%p'ÓîY] 3•lùAN¡¼ŽHL}"Xr—7]¹WRuGÕ–\êôÿRFUJ¢§¹@ÐMh£œÆWvÌý”kB­'íè¢E’,ìÿË îrÞ¶ª88Î< ËWh×¼ô˺mË«¬yßIußÉÔ½­øq?j¯Y XÜ‘rõ’t•(¾ ¢mF=€vŸØ"pªÞmÕŠ˜"8})ÒÄÛˆHÊáZ^Ùï}Þ¡O#¡+w‹ûyx5/zÓ[—8/3Zëó.™wâý8؈w”šýøHd޽£-wìú‰ã{僌Œ_ƘHç)}ûˆ_ëlüþÁŒŠ9ëúÆ!”N€u&»¬­Ïìb[Ìpî0ôû¼}Ô»Ý!ÛÊ%ð`qÖÍ:qéèípý-rÚoyƒ·œÐ—yøÉÏêïÝ[vSkhØ»Ú>”Î{Ÿª4ʼ&6ôñÂò½·R~eêˆè™Ú_`Ô^Ë€rýhD<qŸ}6¹j›5à±9ÑdKÁþc„ejLˆQl8–žŒçµ¨Bcïg<*+ƒir°´âte‰1Ô“œþþk¢öÌFª4Ÿ¨ pf,âªf„&µc üõÙ’3»ò¬;èõ[,À¼µÌhÿ-ýI Ÿ+[>‘4£“`3¼.Uñ6c-ôÐFȮ仑Í0šcÂE,fô¤~ Uªúf±¤> + Æ…ïÐyT*ÿIÿ8ͼ´ƒÒæ$#~/˜‹F=ú–É‘„}©;ehØRöõM}¿ÿ0T4ì£t0‘K#UQF#ô¡Æìïú¶]fŒŠ¢A'Â&ع÷f™Š vˈÇ» ªu*Qe˜½ßøEýåP*p£øû-®3´«Í«düëAá\Nä(`³Ô+AC€í1IÊ41b€^uOß3Î8í’:µ(÷5ä<½›%U…Ž—vYÔ7Õ.?:¡êr*P] IÐd0¦É‘Í@O;]T†Ô°û $Ëà>B(-…Yk˜–@µì”|•FÄ"Hµ¯Ç´tJáM&e²ìÚ`j–§etí/P®.1Š ‡Óß|ùq.6þj.·ìÉÉò¡Ä×;Ž©2AÎóã» ×]»ÕtYm 9KGaM@ÛN<¦Ñ4/³ iÄØcÖ‡Ã1…À= àØwpÆì]"3¾»dæAíj:ß *§B¡b4Ž} @­ñí ^/TùrÝÅ""U °A@únOº´¨GÙÖz³ºâ“¬ZÙ<%ãCN€ ¬øÖ'Pá×–¯˜æùAC¶s:w÷Èl˜\Ö‰îDxưè ÒØbêQfxôër”+]dlßH"¦®X:GmPùDçµÅ1,.„‡úò—PÀJÿldœF )UX1D+Eê²%úfYeää`+6%p *:¨G®cò¢Tig'ÁÅÃ3UÐ>B™<‘£±ÆœI F†¡ï;´Ÿ‹öcŒUpÌŶ7P½‡Šûc<;"kêcr[…¬ýt·1,®ëB² Ô÷° ^vB¯¾Và½I4Ã"r³áFaÚzó!©ɲs?X&Òü‘Ÿu/Ä—Xo4?Xrä>ΓYbÙ”Y¡ãmå2hµ#¥ëMèp‹kÑòÜ%‘ øãT´7$±“, ´pt+À¸¬ò šÞî7[Ùiguöø»Åk¡Û†ó™K뿪Ϲ¦„“ÁmÑïIÍðÑ8“ÈŽ#~°Å Ô-ô„ÀK‹3…”Õ)o,¶QYJÕÇØ;z½?Dêò;L!8“öÕ^óÒ8²(m=×o«Æøï]r/[èG£cä(<(¡:uWcaÉQ¿]7ÀDi¶å.8îݳy ?™]¹Ô)êPV«A!=æ]|¨×XÉ3'ôØŠ§šÃº]ìI3*˜ôFÿ*ÞNýµØ+LEç&ïL:>Ëh5¥ÃD»ÙÍ$¼Ã#ö¿‹ éIˆ'e%9<»6§· 2H‚ c¾žÛí|}] §ž‹Ø|9Cž7 ¨s^°nÔ¾‹Ç…0¶I‚oÞÞÀ²1¦ bµPF-ja‹ ´ æï]á×ûWóävŠë§Hݾoø=¸¤qés‘ÖÈÌÊK”bÝñZs{?´½üòÌžÇ*±›ßá*Ýq}u2Kä;*™2X ßÝW&zOÁ!¥ÇokmÇ­œÅÞQÉ,Ø»¤ª #R¾ ê™ËØiL3ŽÕô‚ܶÁ,š_—×’ò¢žw LY'wÈõ±Þ•ñ…­ ,ÄL¸8Láêæ¦ŠiT|,$_ŸL´aul’óÒ!®©ŒtEŸ0|¿â:ª¶ë /‡Š1©¢¡º{Ý¿ HˆÝóyé+›i’Òy¨‚Hò$Íá¡þÙMŠB,Éq=šÕ„é©rM*ºi8bHГLfºgtõ³ëMí"Kº‰þBùªBI¼½ _ôºL¥ˆ¤êÁÃ(â†êޤ’£àvVó aptOn´ë[ò‹™E [õWJ]]^îØó-­µ¨HE¿]ä÷ÚåÕ¹#ø9葇7×Oæl³+J"öÙƒzvElÚ¤ÂÓ´ÃñG6†g²µ%ú3Z¬ t±Á0ÙEfÉQàV3EVKÞl+¤°/ÍœWíîáAÿh¯ük/*èyÓE"&/õõ|ƒ¨Ø&IÖäWŽÆ ÒW£=°1hŸ<¡¸¡×ĵŽ8.«U•Ä»ÆßÈ‹%È”‰N„êuØy±œÚø²óBÓ0|kÖŽpØÝ;-SX–hà(tJ†)Ñ.ÜsÙÞ*U¢có3cÕ˺@ì5âõC›ÏÍõùÊHpCSXOöLAßÁE2E(ô "ƒøš¥ª8cZ˜–# ¬C¶ÜÛóC P™>C1x+=TªŽÊÊÐdW ¶[wÕ%®²àyÙÍhÉ!Øè>®s¦hþ]hq [7†Õq¢@Ø4ŸJÁcz7?PLiA˼9)B°aÀ•ø`'"äþ{Ž/~ô#ÀfiwªÙQæ„O™cr$ym:Õ±`íë͇èNu7°[ÒUãd*…(Y±àðÛÝ)w—¤ç7VeÄ2€ÇC(kX‡8þo™3áÆwúÎ'ˆCœô'7%Åøl“6Nä¿ÍÔü¶ŠŸsz ÅäóQdç£isç nM%(†Þž£¿9ÆX[üIû ¨ûýÒ&Z´XI³õrw/¥ˆ ;Íœ tu!Ê=>šTVïÚAÔãÎèè@ìQhÚ°ß&‡áóxLß„µN‘Ã-DZÈMö-# ›Ô;íkYÿºG€Ó ^K§ã_›—`ìx!úÜ’¾$µq¬ÊÖS¤};g@M °NŠÍ´ÞÜ®C!Ùš–¿.¹Œ+2yÍ1›:). 8G.[ ÕNÒ?Ò°£$‰‰?õa Õ€ m¥bÌuÙ¯}ͧ³vF¿L°5Œ,ª_ù"t¢6c€ï²5ßòƒØ=ÚþkÿÍÊzºü¿A%"œßSÎ:•¼{xóÄú¢ _LsOM Ê*b¾×A3þ™®:áL¥zWÄt»Tò6'ÈÏ/¶kN¾Å¹Axá˜NJ¾ö»‡ÉMÂ%¸ wëIêé+)€–#ˆ¶¨ qZàëï¥gø ]i‰­YÇ G‰2‡3–6Ý䆄 òžž\å)«Ï¸n¥+é™ÿ4Ó3Mé2cRWYæ¯@ù:8¹¯>®ußxS2¾ HÑž|Y ‡¡wrG€@´Y¶! §ÈÞ•÷0³º‹^°tÊGÖ©+q¹Xˆ†]œ1nžZýÛÇßR.»<3¿›µy’ÆÍ1nç¼ï½ªµÎ?ðR’J”„¢Wø8é²(n<¨|ÙZ4i! 3F MP8惛YÏQ´¬Â¥g©š‘Ážõ3¡¯ý+âc݆ó9%gˆ€fÇø/¼\ì•dV3mIÊYfcÕc±Tíh^M–™“‚&%,˜,¶½S‘®k‘¤Ýæ“‚#U€Y‚B¡wtðq· -L´6’ýš½ÂµÚNµlRì_É,‡ý"¯N =,ÿÓàÔ”Zgç,¥F§*Ždgwb-ê†}J°¶b¢ˆ¡#?‘¹V!_›¥iwØGÞP}ö5~:ò“¼êt¸Ûqçˆ{Ú¶‰ÛœÆg7°°p`‚R<”Ù2óû¸ýãh6d™D~d0b@ÓÌ™ëVÞ½ʱ_d9¹Õt”­ÞµV›Am/³ÇV4¤Øåø{²­…è¿r„kºVúl}ÝzŽÑyõረÝö³—xyÎ\Lmôªî[¥xK€±jb>™•F´ŽØÁaø¶Ø2ÎΔµW,¤áW(PÅ/„ßoŠŒ!äõZ`é€mvo EB“6 ú{k‰\ýñŸIR’°S¹Ù2§¨ˆO‡9[ooFD–´vöo¤\í‰=0Öác¸Œ;ãÀf¼ß&-…•³%óå ú+èSAQ¾ÿª yeö(%è<¬)Íá?a.¼ÃЬ›3¶¢bÊ\WP æu1rï:Øz8á´r5<€> Öì¼Ç\ælÂ(Š\ ÒU;ïT•.¹°RÅCÀeœÞ®Ö¢çFÞÍñ'&*@qn“ì7ZðmæIXå\ fë¦ù4³>8œX› åé'¤ÓWƒÀZ™úëP)_À3‹›¾ 7äžá«ž$~n ôšc¯r¹l…`=eK’ ×8Ê–GªÚ9‘ΓÈÃý¦Ýp;¸ú‰yƒü U4èë¸<»•zµ(³a‡–Ö L ô¬}žçfߣw„&ŸbwÕùf‡ÁÈv{ú Ür†æmîbõø’+ù]{zË»ÂÁSÈzJ]Љ5{î_O=È¥Ám»Öë¹a‡4és÷aÎtëa&Ý+BTV¹B­…iõGH½€J™×@˜nÛš(‹âgSA²vÉâ/ŒðÚ!F¢ek¸j 7x!XQÒäKÚGÒpíÕsf¥Ts6î¤mè}•ÕÙNÀUu{šÌ´×?æî;@¬,‹>#¥$_5%mb1zÇKì\Ú1L±Ç¤üKøMñ¿Óµ…)‚…¤÷  6çAulJ.·†V›Êó(É”NÜØ +üÞ; _Õ7§Ý.¿{~¨¸˜¸»J®!óª.Üv»]¢£·´Ž™ÿ ËJÓ¨üw‚ðÀ[A{××PU [—ýßûNqzrsÁ^SRèˆ%2‰-{0K˜¹$,%¯[¨÷±ˆK±ï±™ Ш'FP\ cGYO@ÕD—o‹û¹™Wè¢l¥,—ÖIÙj–Ü%zE,ýš±"ð>µ ï…ˆ ûù%q!ŽŽÕ"$m’õ¤?ðªX”…³àKäŒÔé”Axº6‰ËE{ï¿IX£®“¦Öœ»Õ+'!\Û ¥k¬iê0j¨ø¨•ÌlìO”)·‚rm±ò72Ý¿à·áj(„ ÂòõêÊ÷Ž O²cB9ÜÜ_s3‡õЭÍÓZ¦ÈßÛo߉Ç|IJ¨DŠèÚ?¾ïˆ¸K7+ØäðM T·â%X=º5ÀçI_”ÑÏ~©™°›3„…©PŘÄߪnNáüElÎçzÑ–á¨êêÉ‘‘íÁ ¦ƒÄ‘º3/N»ûX2…©BnŽRSkÁ$¿BDï2oûÒ¦Á½(´ž‡]ô¨š¥Ä®¾ÒŒbàChŒçU©Üææã I¹Ä:$©S Ož j<¦5ná©mÂ#’™–’‡`Þr!žê]®•h)AÑceªWWŽHì ¥v£ŠèQ1zyj¬šõYñ« aó×+'¨ß=++1yXXµR`!*:çÅùù~“ïˆ ï¥¶eM;«¶P¢ý¬]Ú"`Ó¼…µÑÄdCo…8ô­Ö2 Ft. Ç;Óí¿âðß"\@°–*z*½àc1ê3‚(Fc£Ïˆ«ßD†?/@ÊÝÞÆ‡02»oq®w`ïÁë)½/>˜zï[M&š­"P!Òfiåð/^^x•kŸú2 pœŠª€Ÿ¿I/8Mä4|¶Á^ÚO‡ôݼîZ‚eªõra^¼Ub­Æ-¹¹Ó…4ZpæA¨_)ˆÚlh™AŒÇ$Lô“xÒ˜¸—ÚÆLæJ¾ pk\ïnÆ¿%àøÁjÛ™yô„'½(ÙØ;fè^±ªôãõŠ,_yk]ÛR—~ßßü) ….¼Uœ^"”ǘùz¤µH£²ÒYæ4k™¿Ã_>Ãjœ.­‹šçììwäh?ë<Ë—ùŽ~äqÕf¯2 ”5Ž5F°I˜Êm‘¬Ä û$ÄaÌÁéÏU“6%š/1š¼þ ¦Ú‡¦’Øfÿ¿¸ ­S¼Ø»ndôëàÚÊXÖ =`-ÿ4IÖ7p×ÙÏ72Å‘Áך/äÔxÙn< –Ö#rxŽlõpÌÛujzZíÑgRVþ@îj"_ ÓXKÕÙæºQ©ýTýõ#ñ ΨÙËT“hD¥Iü"°~Q­Ò4M€%z—©Þó6»v.j¶¸Ìë‚AÖ *D¹*Kð:¦#ˆ¢_}?¤–ªŠò­ÚÏž áH9S<{Rˆ éÒa@—Öä!Íz2 ’#z:I`r·|sSóú!6°Ö±kqá“ØæÝ^M1í€j.@Z`ØäYÛï‘N¡ä4‡ò—¤»¡H‚SDš}7Ëò±xô}Œüye¯µ‹’‡‘cÜ˱¨™Éø†šöÁ†Ì–•ÍÞüü‹ÎLì¥]uYa+èaÞüÇ3M³Û怉îæÎ…ÁR zõ`S”G ñLé2Õµ°ßÔ–þI¯—xÁ*È8äcßÝãÀz¾lÅҌ޶EÏU7ëkx–ÎÛ7 Í>H°ˆJ žð É«ñÈs¿(Oí‡Q_­ýÆ+J‰¦d‘_ÿ¥ìÖ¶…®–ìãñ­‘$®|[ØÊ$µ%”ºw¢œƒ¢Š?€þ±Ïë*à,ƒŽTÒé×™°äÅ gÜ씨'×—›[ G =$:æåÁA)XÐûû1,X¢ð/ÒíÌ=Fjt@—ÂhUâj¨£hë$: B™c˜4ô<=W?Zmà#ñoæ„f³,¾6):pÑ£ÙÉ‚ަÜÝÚj¿,Lß¾ÅeB^/B6è5Öp'6ZŠŸ1Tn8ËÓTß{há¾%ʘì¬f÷L?`Þ„ó(Vpï&Gò @Êþ-‹|ø£ùL4³ VôRžÊÚÂfYOóq‡þ#A–XF\åÁ ‰ŽŒÎ6m™ÎLÐê-cÊ– ™ý`‰3‡¼¡Gà†°›cL•¼m­ý/ª «$]GfXÂ*´’6¨ÕÆ·:ÑÂzo©íáÔï&¹ 䦚'yí8Í+^2AN¡ý)’åF1â^.²lŽ ²+«†¦z‹µR*6nÒûñ¡nÙñÆë•ŒñìO–¹é“+¥‚Ë­#1oy;OÃú€ Œrÿ³“úªŸgª™¡‚UàžCrº‘ؘL¾JÞ÷Ï€„eÁTeϲotµSÎc‡¨ F þþîõ·âWÃH©í«l LoÈ‹l/¡î2kƒB¼Õ%mxÜ[XÃÜ~ ècÜú|ié¹UþÿŽ+}ªÕEТª‰õ)1~8ÊRòX@d¬ª¸:By8º@ý8äQG‹‚q™D|ÿgþª:zº9¸+åʈ½Iú9.ÊOŸʴ+ ‘ zú~P~{<-£Ú_“´u%3>8L/¡ÜîÛÚÕ£©-è@[ÑÖݰâ»_y.dÓ?‚—Îú°<»ÌfÔOãXõOIAj^d°¹ åÕ4Qb]ì6Õ+þ.çs!¹4µ©§.vþ^Ã*t|´CÅÜÍÞ‹Ûõs¢rO²9g'²ÇýúÚSóÇš¶ìà%›ÜÙ¸ì(:`ì¾Ð¦ûØq (ú:oG;™«N#4=¹Xk1jˆß­*ÊÑõh}é±r8°—?Œ=¬„ nu©°dð½iQÙ’º_î7oxv>ª-CÕ@[KãÐiKÐU9EVgy} ígF(Ù/ÿ‘,É'åK/<‚Â8ÅáÜ4ÎIžs°iògú!¥hÜ:Ì cˆ;ÅChÊú¥rOŽC¿ ~7Ï÷¬u¡æþ:éÙœÿïý¿êùa%äâ~~ h9Aÿ;Ë?Z‚d3!Õ! ¯ap/øcJ掺˷¼ÈA¾ã ·ŠÛ!¼;D}«Øoµ f%ÔÄweZëÔpYsNéf´vN,Ú'eH37¶Ñ.þðQÙéD[Ýç¡«ã±ú– :§£c¨Ëdvr9@o­U£ÿ¼WI±V8³¶O°$¸KF‹C+“ô0 ~¢€F¨a*e[iw‚Ңτ€<T8ªßˆåG¼¥Ÿ4·[ýí9u ÕK­lEØÍ/¬ú…†*-ãäIÆñÜAYv€~~âöÄŸ‡‘ÌvzµŽ£)õΤ`¥ ¿·Ï›¸åöÖDŒk÷jCüFòÚ 7t-ž±‡bëzØ—ÌðJË%eFpùAP†$'´/£¹¤ò>ƒúªÑÖˆzZàÈ©6Už’ÂoÅÕ˜eÿä 4,H¬ æw—¡Ü d<³ÔϼøM£©—ØBÿD…T>š$Ùñ xÍ’Töàᔑõ°ç¼Ìw¤­_ù³Q{OȬº¢>D1ñ*/eËAè8):¼£8^½ÚXœbÇN‹Eüp”\u¼õL¿‚G” Í•—=¥÷Øi“:x—½W¾Ø@MºX£" xzœzÿœì¼+ÕKIGIx kØÊ°Å-ÿôŸŸW›Rãÿ* ?ÚÞÖ£xçü𹮩wRKË[¾\Wö`cD{ ÜE‡êž:‚÷6pÎ8q‰Ø†µ! ¡qÃvÉÒàjͨ¦×ìu25]êê…OcKÈZ½æØ4ïI|6u0ÎJŒíR’›Š>ö!ýœçC‚ä9 [€Â…(èr˜©Û·.{“f A¡\è;oëì*k´¶WG_´@ĶöªÕ³´O)šŒx0¿Ñ­x¨Îd`¤>uΟH uóºý¯šŠ‘(˜mÁ:9`’¦g·J(˜;4>ÇÈoA«Z½x€Ÿ{us÷Ïî0Æ’Veã³ßÛ¨‚ œˆ´£´Àg|Ä.ùŽ®6FoÒ2 j¾„FûïÕp 7fàß¼ó}™å, ñ¡ Ïpÿ^×täqLÜÌÎÅýñý’Ð÷,Ø4M—ÛX£ËéqƒÿžS“yóˆKGñt X gSI´q¹8‚†e¬gý p Ú^äëø{ç&~ÅfLá+g~Ç]”ÖÎÉ?M‘+.{€ØÜì^oñ|ãwØš"‘Û®è 7ÿ±2 wj:kŽ20á½MªUT õ…‚[Ä@l 8ñøgý[5JM xúñÆx{3œ4=vâiÆoŽŸ;ñ_SkÚXïÈû«j"æ·\‹´úåеƲn£ßó|øØW"eë#TZnŒëÈ]%éY8ÜœSYñ×{/âN’á ‘îÊש|‡O9¦7ˆöá»§ìåZã‹ÿøCf‡ÌgºÒÑÌNz§ŒÓßĤšÖ‡âÔ5ñi£‘™kÀß"‡ÚÔ¨£"Ð8‡Ò½í:^á ­ô­ý^8¦@Yè ®~8ÿ“처‹`/7Fz§’'àØEVŽf°y]`+Èy^…Gº8TÑæ÷³ðçᮚ/U\‹ÊwšÐÕis…¶R+"Œä¸Í±Ê³+–ßE=®”˜ˆbè—ñÂ-J¢¸Ö‚*"æ¡þ£e±ƒ JR÷+Õ`ýf’iä_“È ÚŒ‚  ÿ¥KßUã ùqêÉQÒe U‘DÕØS[†ž|ºÑX«YÎv7»g-¢,Mãÿ°65û&Ø Ž°oµóxòËœ6^Â8c>DÌíªû­šÅÂíFÛoˆÎHŸ‹uêS¶”¢©]Kh™M”.‹æ{šU¶{jâC;­µÂ õÌË2©6wl¤Š%R}ôŒç(G’AÀáåx@É å÷H"Ij¢:O.‰ínÒEÍ4„ýgßÍt2@±™.²2‚OÇpíéÉúµÒX½`P$K¨KBO³µéwc—…ñ>{cޱpkœ˜…Ž-ˆB» “-2«äy±vñ”]>vw(9“>Œ‚ß,щ~…S+zHÛ]Œj‚EU&ý©'·ïÐió>ü¬çLÉ—-$M9þ½a’û«· ¯ $ä ø[q;Óÿ¤Z»ÌÀÈÍ;ê/ÿ2ruø>@öuc݃n9¬{Èš¨„!p_\{þQFµ™.Ï^—øIŸð1atînWžJëhòSª¤“Z,9ˆëok)Y×}k.Wâ-øÊÑîBÌ Éã¼}«Ê ¸<ä͵(x¯jÂQ<¡m^4‰ÂäÏP<ö±BÞ-FQö|:÷W¹ÄãHLuEª9.À•zoÑû·¯©8 E=2,&Õݘ{Ç”n‰dº±Î9–«/IM·U¿g¯IRÌ-NvúšÙpË_GX»:+tþŽ5¢ÚŽô§±FÀý[NO® Å ª{šzOÑ öRpú±êh\nÑ÷‹ š°Ž.9WJ›®ª)­vY“KÕ¼äv\ˆ O? »Cím{û½VLfüçx•VGøT”š“½@Å · n°F"— •KЃ‰Þ-Ö¥¾FÃ?,Q™!ÚÉ|Öt©“…“g¹íƒxÎoíK'NOßK¹ ;‹w±¢¢'ïûõØØÉ¦‰¼§éƃÁÀ,îÖ‘{xìÛp’¡ÚAmú]êí•åiÃméšK%·øaÒ°ubÇhZ '¦üÍ}èZfÃ{b€_ }D×l¾¾o‹LóIfúÌ&A¬Ìˆ(E¹-< p"©Œðþs£o—Œ¿ÚàÓæAOÕÁ|Œ%À<u¶¿¸²ëxðZ|&’º²%SˆÂï)Ž78ñoúÊÎ _ßÍ;®Ü$ÊM}3|áG”~ñ> B†¿6Üò3F¤"îÏë7ŒVk„É¢9Úv&.šÀ ƒÐÝ\V Tm8籊ƒÒ?b*äqºÓ»ýƒ|R,šGu“Š¡@çÄ up¢xoÚ·K^ $á‹üC û8##ܘfŸü[TºÉªRÍ+Ôüà¡2ö° ·ôäZíúƒÞà#v¶. ʧ`hŽºÜîãîž2Á’Ü üRRôUÙ 9R1"mÞ!;ç0‰îÞuj©¢´ÐE4ú_‘Ø ÎŒ©< ®èÃÄŒQ äõn½’-èP…þÐÖ*¹¾± dPÏË”lf´ºödM8¹_(Æfÿ|Š­Ží[2í?~\Šza @b¾y„ ± ìEù|P×›‹O~j2­[¹®Qm?»p‹ûJäAmQåù”2 2ö3)zN–QXåŸÈÖˆÀR×âr­†¬»#ógs»2Ûÿ"×ÿÿÁBû7|lwÛaá…ŠçÖCn•÷§è%ÍD"P8&tÿ@SJËÄ+¿²iÀsÉ4¶©<˜Ô­ÛÛ^,ƒ”¡¡Êõ/rí㛈JÞ• òß?ÿaAi# s2óÊ;±.ëö³‚B„Äß`F®^[zŠè´SXt=V[D¼úSñ‹׌Qp==MâÆ°Ë¦5Á(y§¥øìCÎò9ÎHFئx5Åyµ Gh4\•C6JjÐz•T·”]jÁapTù)µ¸Ü', hÖ‹W5,7¥‚ •ÄmM¦G5ÂÌW3÷Òø )<8Pr_¨dÅhk¿ßl³úÑî²à’©Y_E ÐPîqY[0ԪЅ=X!"š+({~^ŠXKǤjíýrx!ƒü4Ô²ùVM#Ûz¿cѲÌ~·#¼blÔhpéX¡%Xæ6™qÔtAMà‚¡áô²RFcân(×6g¼B½øÆÐ;švqF×U»U‘e"vL‹Š7·YÎz’žÞg4¥CÌ<2=› 5°W)°DàLæ+ A?˜¹Cñ“mƒ†%r÷1_à”£]–ç%Q‚¸Ÿ¸Xþ ±ûpkv¯ Ïóe…Û1ð·]ý¶K¡[U¬Õš{P¬±Å‡¥’#—gôŠ¨Î¹ § ‰Œ+²†y°­x8µ <›¤¨ÍËZÞX˜Mì«…æ6,[Ä©šµX†œDBo)ÃTF~¢ržzYØ/3­v:¼Õ…//§8˜2Øþ‚‘¶K_ –´õO¥ÍôÖöÙÃpKÛG*¡&ð’/ŽlØp\’…•€h“\(˜Çm΢Àzle_­JÖA} Ô]C| ‘ãɇ>œÌ›:e,×tÿ̘ââó]ôð)Z+¦ãÎH¢š+̽k!ÔD¡UÌN¾õë ̇g4Uõ¢."!Êfu> pô2î7ÝÍolé®2‹ê¾E½µ§ ¨*™çñ”ñÉoÁÐy¯ž–Ó6Ÿ¶|ó2̾é|M%‰3DÅÙ2–¡ª9X¸¢Êª°‰¸?8y›z¶¥qSÉ_"ý˹n¯=~¥Ž˜Å½ÓÆ~¾MuM\»î¼6ÓòÏ}!9‹W[MyÔÓs¶îë’Ôä~ŒqÄ–×§‹ç K„‹Èº ,hFEt›Ç8)}GxÓõfp†`&lùÔIÙWÌ‚sL‚k¹ 8“ª pá ËÄ7wzè%é2÷;`‡˜Öå³ ]ËÆ@¼.@‰°“)eËÆ/’Ó³„q{"ZOŸD’Ö¨®S†ñ…OÛJKÖÁÙ¶{¤¹ÿ’Ü«ö.ÔËÔZw§êôå"ª¶}îˆCUÏI#:dLT`§Ë#]Ô(Ä×)^ì*&¨Â¶•ÛŠÿ‚ù’Ü•‘ÐÎ4ÇÑçPŸc<Ë ¤‰«Ä‹Zr.ºƒÜ× ÓŠÍxºHIï ³ôD oÞ[ø‡ Ä ¿—[&œ»Ú‰u™„¬Ãr&€éªK?òþOÆ6¦ÎÌÆŸÂi;Â*€7Ç ÁÌ^¤Žã³`ÝDϯN Ü_l%‰‰Ô; ïž™IUYI®¶ðÏŽ˜5'ľi,9³@放"&LtCÏØ -ÇK"hüà²S-2•g)íæ°ú<Ó‰ˆÂ!%áÃŒûBrŽBUMúñ\’4iÿ+ä²ÒvãX—VJ蓲¡—8½Ë±5E²‚êÅl«É QV/"Lu«§å…Zî® öfÁ¦²Ó.[8¢ÀŸj–Œ'€ÁœnVG¬mÉ7wú{¥G“¶1Å« eª–Œ\1rñŒ…ƒÄíDs{?0Má…5ÌðÆ FDH•Êj–+RŒ!0ÉåQ`%"‰„Æ/a™¶óæ§Ú9Mš:7 ¹gËí#ìb¥á»ÜïðAÎ ýP>I ´1c2%¸ËÐ "¿àÞikÁk†Œ£ÎÏ|‘“Yãí¨¤GÐyðb¹ìˆ]UrsÄíj–†#DdÅò3ÄÚQqfP ¯Uúa²8[á1£ êÔAݧg„±Éï+£eȈè]7@w•*–V°gCáºç–wíO„ƒÈ®kå’Í·”n:^ôª˜»Øâ,š@#&ÁE™8òŸ²éÝ@ÂüÊö£ –0A?c‹Ù"ÂèòIC÷dWþ`¬ƒ{@¢É'‰nDçáóÒ¬#Þߢ†¨µ§ùU¢c—ññíX¢lU$Lñ)Gé䱬sõ&y‘BÚ©-ìKŸ®ö¹xx±ðØ-G­uæ‚J“[X…Tzµå6¤J2ÒäaÙ¡bùý,lÊ?l&GºF†ºšëæÛõ¶üweÞ…¹÷]ôHŸ¹ 1óìý“ÅÓ2^%(AÜjh·¦oò !MåÚ¶‰³)@:G† -_üñú(¬FW³‹åÎÌey²½!÷í >¼æ¼.Ìq¨ÐÄ$¹\–$º[ÎîzOfÇ))yÀd}4\úŒÜR¸|ÿáˆäÝ»:•4° ¡Á_ÝuªkÞ$;ÕîjŠÞƒSjÜÞÆ…3¯²EÝМ(õEIþ¡ZöjuŠñÄ¿o„õÕß9ÕO<W¨mq枪}µ_ɾADȤ š|$ª!°ý˜{óáPD¦vq”Jê#VxmP ¡ ©DëK×" ÛZR/h)>ÉÍ´ÚÏ*L¾á¡<š#0£‡Ìˆ¦7@¼êà×wåT*Ö¡Pµ•© íÕæº¨uVµß„]ßõhÔðe7Ag΂ñèȯÉõ)UúøñÑᕾJ¯ÀÑ“;µñÄy´³h»†v=þte«y+PÛ\ûôî77Þ°Ä“ÕD•.ç<§D÷H¦ÐC£ÄwfS>ù4æ1 ˜ÆÀZ¤¯$Õ"ÜÄ æˆéšüã@ÿ1¾‹Ç#Ñæ i²ãõñ»€{8æò*€ŒŠ™‚û &(Lj¨i*6v*  ïgíôÔ$bñäºPl¾¤÷¨•¶ú!·é´¶¢ÖܹBÜoÏJñCÜŒ½Fä~ b³NLÙdúÖ§4v¢amm1uÀ„aÅ}•LKgñ¦}¥ÔØ:uZe*C¬½TƒfÅû‡Ñü~ó·rZäF[9Ë A¤Úä„ЗÞ –áŬ)'¡DãWÃ^[–9fMVdHxu-yµÏå*e›.%"Õš… -¾LÏD)BØ}›Ïîg,À„sk\2ºŒïUŒÏ>‘N(…4¶Ù¿ªËìºxœ§Ì‹€ì[ÑÇîÙ’ ,ލ(¿[ȶ“8óàÆ"Ø4‡Ÿãå*9ºÖ,ýñZH5÷óÄVèÄk¥e¡Œ…È nN>b‹¤žØx›£r6hÞ°õa]7-"3Åz"gp tŽÈR£mü£ΓhyšÜµQ*Ydxt²E<‚n`Š X𓦅GVà‘¦`üPŸ"ƒg—nÞ5èÈÐýˆ*ÛÚ©6×ÊÔ®µ˜Vn‹nU£Ä"„LïLÈ©ó+»)ä§¿ÖóÍœS®KÉ£ùÌ‹ÈÉi¤«`èÚ§¡é Þ«õ1Ö ºåŒp*‚ÞrfôL„÷HÇŒAËp½ƒuô)ÈZǾ\g¼‡yXRJ’H¦)æã zš©õW«ËŸ±¤Rg$žLXÏÆ<›œÉÜkÀ,°L]vëà/Š IÌ´V<lŽYd¾ý8 T(ÈVãÚˆsAãb€LNKTM¤&Ùjcð‡ìâT37Ú#üî-ÑÖØÖÉ<…뇪­ŠÃx˜ÿótÿá3|øSø§ù”[áYµîÆ;ŠX.d·)ÏXNí}V‰mü qýCT'#òi}ÄQÊG¤ÿæ×K¶%¬>?ÓŽ|Qª•¸B¯ôÂkÕî 0ß* 1ðää°¶?‰$Œò„èƒ3¤7òbò eõšn›×æ°Jüù'¶nñÆ@"VäÐ…G*·LÛ†ÚÌmŸIM]5ïGVÂÄ@ÖÒÓb ÉÐ…M”JŒ~w# ¡B†U+•»wòß¹åêËÔüê»…ËÊ^¼}«<C°².&C KdÉÝëô±²Š³u†ƒ*Óã f©Ïî …½Q‚X6îÀ¾C2Ü“ s\pdŽ t¶ O™Ó»µ¦êµ.(It¦“¿…‰‡ î{¼Œ*#ŽyVH—f]è°¾´äd\›ÞðãšÃÕOϤDí)ŠÔÿ> ª¨®’™$ŽJ¾Æ7a9B Ë ¾âLðÙNýï·„f>_ÑqqEóm77Œ® gÕ Žn5}Ú) øØTu”Ëë,`6Ä@»|›ÜFÔŸwÑá‹Z2¢d<öù‚[ކÛ¸×58–m± ë{w0õ™w¶‹²«áà¾-ŒïÚ$œ5oFá šeº/E(J‚Ycabextract-1.11/test/cabs/mixed.cab0000644000175000017500000000057313323707071014151 00000000000000MSCF{<†ÉC"9l"ºY mszip.txt»l"ºY lzx.txt;l"ºY qtm.txt6y’‰;9CKóLS¨Ì/UHNÌS(JMLQ(ÉÈ,Ö’© ¾ÁQž )©Éù¹E©ÅÅùE ™Å åùEÙ™yéŠ\é"r»[€€² "UCÀRò>Œ‹sAð^‘¦—¼G¨ ,0x 1`_~¿@†Š!/ãsѾšÑ9س¼&YW?&a¦ãäß!ÚvÐõ9SÚ Ž—¹¶ý-ìK0;Öi ËGð,*:,«»<¹3‹ØXK{ºomQn:ÃgBKë6CÖfVÊžrÌ0cabextract-1.11/test/cabs/case-utf8.txt0000644000175000017500000000074313371306071014731 00000000000000# test that cabextract can lowercase UTF-8 filenames latin1\upper\ÀÃÂÃÄÅÆÇÈÉÊËÌÃÃŽÃÃÑÒÓÔÕÖØÙÚÛÜÃÞ latin1\lower\àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþ greek\upper\ΑΒΓΔΕΖΗΘΙΚΛΜÎΞΟΠΡΣΤΥΦΧΨΩ greek\lower\αβγδεζηθικλμνξοπÏςστυφχψ cyrillic\upper\ÐБВГДЕЖЗИЙКЛМÐОПРСТУФХЦЧШЩЪЫЬЭЮЯ cyrillic\lower\абвгдежзийклмнопрÑтуфхцчшщъыьÑÑŽÑ cabextract-1.11/test/cabs/split-1.cab0000644000175000017500000007246013323707071014340 00000000000000MSCF0u#dd2 Split-2.CABSplit cabinet file 2/5u^ ÐñL›F small1.bin@þÿñL›F small2.bin@œ@þÿñL›F medium1.binö ™¯×ÐCKÐ/ø ÚN.‚ ;Ö¹e ¢bXôݵI{š5"%R³-ŠÎz ­¯$ƒ ìºV–5Æbƒ`RÄÌÄɯ܀Ïξ Ðvö¡9¢è†hÌ ®I‡ì}gDÂõúüdvn$¥hú™:‚ï#x' ­´b}¿ÿÿåþÊþ©îzŽúæt›—ãbMÈJeFS¿ß”òšS¶†ñDõ:hÏ\–¡-Vû¯žq(ͤB×óé#](uúx(€Lªô¬S]Ö…Ùý˜áykÙËP¹õÐ=ü:§½!õt9.<°†9–È#¦Óãš¹ñ­üž‡rŠÂ#н³KtYò¬]×®„!‰ÓU¦— (=Ø´­Ñó<¼>~äŸ ‘~² <3 môçn̉™6­:‹†á„9wñNŠ&CeØmЛäÌq £EP¼Ëy‡Ú#‚Vf*7߫ħ^Õ¸ ]œVú¼»`™k^Åw™ÒJôR 'ÃøæL”˜,%ŠD›—¨¸ *¬A6ªâùlQÖó =Lê›C‹²*ú!ÅO‚^)^B ö“CÄ]ö$¶àð»ð—ø'’LÚ/ÑCo†ûåZïì ·½ƒãû+ŸœeºãÄÌ”ï]¤èr¨dMyù¥kA[•®ÑXp>+c°"c(¹ whÆ6€šîº=of²Àõ¤¢-{VªKà:û¥fŠø#GqÎf‡(îéGØ®™##&sPÂÙØ‰”*V€Ú:Jsó¯Iâ¦ÚU1(Ï£+V(öƒEKU¸9z`SùˆV;‡Ðñ4LÄ‹ÂXù¾’;¨EšÖ)Ÿu3Fù ÚÙ5>`ÉøixÄgbo¸Ãs%›rë–ï’šz´™4Úëæº1 ^b†T~ÿT.q» øêlZ…ëIjs]ÅiüâŽ[)`¾ ªCcf–‚\°P -Õ†-ýõó•B[Ï"ço~òh9‹x:ÐO—ö¿Ó*x¸ìí(ò,DçCÆÖÜ#á”Jû®Š+O¢ú{Ø@tÍ–y …‘pŸ•qžƒÖ;Gù_¬?D²d4¦íúóò’ËŠIWT¶à„äëÚÙ\1’Ù#^|¦‚§&ú‡Å0¥€"å‹è§FR¾]eœçPR‰Ü ñ4· óNØý[ý"‘%ú‚sWøçÆFPâÒoÑ*O?OŸÀ•„¦eÅè©Ëû´¶[·)aïWj!82byô_p²XM–OäDIAÍÌ*M8…¡÷—}ƒ…Ž8Ú¨¿û"K·ØüÖ« qÁ~ìÙöÞw[ŽXÕ$ê6[(J°d²ŒN¶€”C²ÒŽtý©»4TRÙ4yÔÈgÁ;Höq{©—ðýÆSEÜ>Tsq°µæãÕY/´ræD9^”å]&7ɬ»QÕ¦­©›ûÇÃÔ¢>-^LR+Ú£âVLþâ¶ž –x¹{œk(*çh_“´ {陸ÊÐCŒ[”%¤Ø°+À§(”›§ýPüxp¸P ŽI~åü{èEø §&#ð›Ö ¨?ãÐþ¤0ï¥ÈŒa:´[[B³¤4ÊD'e|kLGa¯ëõ¦ätåH &©Íˆ§ !3V¨I&ÉK(ŬºBþ^7ã©ÅD-t¦ª¬º´mT3쟥Ó>HÑö yAc#¼õ«ÖeB­÷**3q_2ƒeW?È]§±MŸ¿}°˜«Y€N™úÂótÏÊâ9FHJ734Òss›Äv/õÀ’W¤B='M¯#·]ê³wZAÌ!øùÑiÝ©®XDß/fô`oà'”…^MþØa™ÁÎBœN[®—[¨÷TÏõbéÊ?¶à^º epvasUŒ†æÓðÿä–uÆú;_àìÀ T…G’¢Ûû£Ð£æCxŒÌSÚtæËÚ)3FFâØÉl Š…@ö§ÌgðÜ|惒}[×Eè[‘%Œ>t)–)¢Òú‹ŒìEÞ»¶=°'¿Ó¦|²o0~¡¤5^h¼B­¬c}N·b8¶•`Bo:ºbÏ\BˆdêR0ß—6FðHÞêò¶¸GpžÙŸŽ ñ cÔBþ?h‘·”NZ—¶òbR x 5lªÏq¶ôô$t b!³Ý ‹øE}¦ÀkCK€ÿö20f}€ ôŒ±ß^MÅ{¨°WöÐlVØ—­gðºäc»‹¬ÚS›U‰E'lv×ç FˆsyB”í~ÙG`wFMPúm4â Ý<Áæ§€Ñâõ›„“†£™Ù>ů`[æúP:wôy_—í˜oð?7SkcQv³ªYÄècûèõ± 80♇­ÃR"&¬Û}”[5dÞ˜ˆÝòÉi~ŠÐÅëU¼ý»JÛ<æž›W3£4Ñ3D'¥2[Õñ «á¹.a¤ßdÖ¼^F±ùáz35­Jëõ¸VYª^½ùîÈpººÒY•Tx ¯5fæXæ IiáÒ¼“7JCÖéU¾=öÕ6_Œüw¡ˆ)æÆ ‚>£YS´žaû“`>Õ\²¿ñmáE„fð秊AMB,_‰4¦g„I 7^²…8Ÿl¬„“¼ôk¢IGG×Aj À i÷†“%¯ ýÕ8æ[ÔÊÆ‚“›Æ02äß3-Àl„G[~sÎ>XIUÃèI_¾{5 ^ÍyzÉ ©¶`É{b“õGš¿Â P£¬îøwt>Àý¡x0P–ù…Íêz¸"h³.¥ã!¤j>aiäVOgŒYl{¡ê ËŒê°Ü$0b–õA’›ž“èKy‡BòˆÞZõí_yÍ¿ê{«·1ú/•KÏ $NÛÓ—ÆZйÙÐЛ©Uâ55Æ“«+/±§«õWæp)±‰¼êõ@Á…½}á¡H5¦ðoõw ê›[ÏRè*ë3ž¥c³Hã…O,Ue÷Ýwìñ¬‘­ÚJÉó,.—Ãð\ˆÄPŠ—ô@X4w. mrk'ÁS›ŽšOÁ©ý-H^Q:öø¸‰E€)qZ¢ùyåâ?Ö{Èq´xÊg#WZºÌšÉ‘‹²X0V®¯2îþOÎ{€¤ qYýæù!s†&g&ÿ€{–‘ä¡aÙG9bŽ(»“<”•5P2DkP|±j’¿Š'`{­#^_XïTÅJYÄ`˜fï–ö×hvÙ/b¤YAž¾tH…šÇÞÌÓË H!ï>ìxŸeôùZ¼ëOŸ<ñÍÝC´¯„„?îaLi·š‡ûÒþ€ðò iB#wk}•¦áÇCP"Õgbûzʘ¨}Ç0•‹QU DÇbu2è@àÜB¡/ÚÐ]p]xm|3 "ˆÔl÷Üþî΀©Z@ðãBÂ$Û“œ;²Ä"ÇÓ•?½«©‚˜¸#)`zãÛì'Ø mcwÐ ÆÊX/ÖÒÛˆ½]5|ö>ÓÍJù¥lvÓwÍ]©!66ޝyN ¬ýu-1pïMà.Âi '–×$r#¯s}q0>Šv±Øo°º·æç9Ä)³`òçÅ]¢i”!]]›5!ñ5ªüR†¿46Ï)¥š“¡ÿ8/t±Ž €(Ž?/˜GÖæã®ËN¹¢½\¢WÈqaYþ/ÿ²ÈMÕWK?ÔX±|»ùéYz[ÒœjÊp9¨%µô´ ´o¸Ã*Iß;€ÔüU`%iŠ]Tg”®¿yÀ‘ÆÓîBÎtÿÒœNú'DÌPj„x_+§H2žx'ˆ±#OÖ/Éú*´õËÛƒˆ®<¸ $ŽwXãP‘{sëÓ¿‹;XØæ«uÛÏ ¾Èœ:Ÿ(íÙÃI^ñgÀÄ2}þ ôFo÷ 4°/‰qxlÒVìÄm7âˆÞËÚ¬‡WIȃý%¨X³t½u²ý fö[DøyÂß J‰yã³éµã+ÔĶ¢rxšÏem$UÉ 4ƒ¡0_£Ñ]Öºn$þá©£&4ä$œÅ¸NZpd°q2f ˜¿~¾Ê4[°ŽN’b›§”Û«³©&z ³÷M®ØŠ>e"ks~Þ]åÇü3ÆgŒIR<‚þOsÅ,êJÙy>A!RÖ˜¼ŸÇSCo“-ò H1øí•×6SL4Åú$Xñ™ƒFû¿afÞ»½@Éuuk³_m©þ<ѯäK=·kX9‘>w3§»P-`ì–Uüð’Piˆ|}¤1¯…ôoò*T/ÿª¸kØ¿]Úå“Ή¾Á™H- Æ^| ŽÊ1ÌF÷­ ³f³ â¢“(„3¹ûò¨ºPÙT‚'& /pµORRÚ×Å+÷hêèÁÆÍþå0!xÀ”g¬Ê¿Œ„q2„—íSz'±H<¹5g+ýÉ`ŸÉÕ .Ÿ‹°¦ÇÑO³. ­0ƒ3÷†š,R&R¯½§XçšÒ§„…|¾cúá(Fµ$p Hj¾<™^yg5dàÀÅ‚Ö>¿lä,“•NlKW(?¢ ÇÈCÉеäé?RòyŸI§O,u’ÙcÌ6¹žXËV¾ƒ^‘hAN-ãÆ¦ßùçƒIãÖkx átûzYµ}e¦‰ ¨ÉàùÕÎÝŒp…~Ù€þ„,Ræº7*ö"7ý¥v’¤Á4j;‡Ó||NÑe%ݯR~-qÂD¯#ù&l“~ç3ÿ 2b³º·Fs —‹aÔí@\ÄÚ ½2&0òë>pò*„Q­”_Í[Ò3ztÌØ3 ³hÛ§)=à2wêÖpÑüÕëÜZ³s¯¯Çî_~Ûü‹)-O1ÎòLú¼î¤šWÉÀF‹‘£¶»P@+ (P¢§?Ú¼~òûú|ÖͽEq›EÂ&èKìdªu —¥?ÍUâ-on¥Mk$IµÍÄâœØ£'“œÐ"ÓÁv„ÈàÑlœ3jñMÖª‰[œzÁDHŽü€á]Ãûæ©ÓØ" Èué’MT‘a—bh{Ýf¦$t0MV5«ÜrA\K]©Rßdxœ½1÷òÒÃÕêöCr•ݺ2Œ/ðiBîŸYl—¹Ù!ò–+Hy;`¤´/F·í`€3µìwÁi徜Ë}žt#¤C ¼Á?zäÉ3‘2¯a¸Âr#ÂÐ…µv0þ Öîw$$û¢‰äÜI†œœ@i€êз”6驌m)D/1žÅIS6ÄWc…òçs㯲[ž5•äñl!Çiú  ýUuÔAà21ò€^ÜÊfr«¡¾dkS ÞŠ®´ñI€yæ^¼ÛÊ6“y1¬kßFÿÀ£|Âõ!ù]ã±(°Ðc™„uÙ•èà\4 jžS·æ/ê·S°9W¯)¢âåòSžàô¸Ln.³…> ÕF…§Ö2½!÷¢•ÀÙs¸™‘MË{ný»Å2{7 `õ£b-ì¡mࢹçü²m3¶IcÏcñ¥z‹óM†om­¦Q•]öÚH‰íRe(µYÓ¯jä‚NžÙ\ˆKֽ즠ä‚Zk7™¤œyyrYÒªŽš}u³#Œ•^_Ž”1ѺähiqÐJN:ËóoWÀF‡ù«òè\¹KV®t}ãiñ@»<by­Oé1zŠêáÆ³Cåäô`a(àM˜ƒÉƒÑTptÖ©\ƽXxȹù¬”b%©‘;'TÇ‹ƒÚOWÂ#ÉÌêùÅoÂKZÀ m\vÔ¸VÚxým±ÎÒRÖâÃñUrh¡> 7­}‰I\fg¥^O§Gå­•À"—›3´Ø>#cäˆt ¿âMdèºTe˜-máEˆǬ¥Œy¹›ÐBkkV ñ5Hß%=X.»özöÀ@]Ú}Y¸K~‹¤¥â,Ã_"d%ÚòŒúcÕ0v»%pã<Ö+èC >­C:;vkH§Qà5Çž¬—ga)š}Ürwô”&¶=#„§ƒ=»èØ´·Ÿ4w¢Ey¤‘#Òr`ŠÌò³@ÏÏ6‘G’‰g§C0Lp݈¦jºÂV2 ”ѬCƒòYœg"ƒ‚ ˜ô;ßôŠSŽ ½EQÿPx0õΜ7@šXÄHfÈ­[äõÉTGŠý³rwHŸðųˆ†H±SØh™ƒ°W‹øo±Æùñ_м¾õØt*Ü+[‡K÷Ìá…6Çæ­š#rn çchŸŠLâ%EõjR%RÌwj,pÄ5J’*Çñ艰– HVO0Èÿ›=D„(×_9Â*Ù{þ‚¡9¦Y¶ïñ)ƒ>…€WñÎdã?Ów [A&¬Aør”.Ø«Y'sÿ­£çc"A¾,öeà|Þ{xòË+“KB9èMß,E<°v&s£öµd£d&¿1¡5žB6Þóö$Ž´óoh#ãÄE×RDöÜ`¨ÛªrÉ¯í©˜‹?ÂPV{œx=g)ú^蜽1÷GûÒéªÖRL­Lj¥öp´‹¶‘p6Ü80æó}¬­<îg¶îÄ`~"¬ wûau)ªåÊÃÈД§|œGTR@w†\ckï–Ž–ÜnÝÕ´”í7ÒXø±ØTÐ¥–¸×|&½ŒáЮÛ\Ü(N©`[ú &~|?fqꡬ)Ê<®„cö\Å<ñncëNT^{µü QüÛ+¥É>‡Ø]öDøþqåXo‡jÁ ÁÔ ´Åâýeô!@.Î)áÌþcµ°ô3K±%Á²{BQ ØëB2Êø 7_ZE‘õ¯ê†îÔcvÙ¾›DßpØ›âTƒó;ñ…ïíI“ÔÛfXŒ•˜þ._Õ¶g:;RÐ'Ðáâh?‘4y§d©Ë ù–˜o"଱zÒ?Ž;t+¹Ï•4’ßÄǃaÁT5Ž"§ìI°nþ·„¨’èèH¯E²—ÓL‰)"ì\4DìÅ–ÉÜ,óDêΙõ=?å©@/¶È:k®zID#ÑTñgÖèû-âƒ1Ǻâ„YŒ-yeˆj±Í;qù›Óö<ÛšîÀ½ª}Œo¾¡®©‹Š·ãî?Á¤Xø²w|Ç»dðâóÛE£¡á¡Füç-”f·S¼ÃÚÀ‡³€"ãaܽíÀq¯®^Å‘ z0&¨ô[ËÖDèQ`é7çÂCÆB®j†°3ŸÁBûTúïNçÚÃ(žOZÎÇæ‡G5ˆØÛסO´D„ðdÛ6Pê?u›gç1ŒJ¯û¶ÌK‚ëä¼çÉy9<…3z%é,šÅ»«Mzº×O?Ú8'h…MÝÍÀÈîY^˜õ¯‘¸|#;ú…˜ÅsÔ³UN;UŸ­å –Ù²qO Õ+ØãzäÖðÊ‘EyÚüŒÍ&á.8Øå„Ï ´ˆQ¶¡#teXyÙµØÊìG‚“C+!‡²àò³üGH§ó,)J­GXÏV0uØÉ ßœÄ.ÜwfõC[,uomœÁúÒ—Ò·³sàDhóþ÷EúdÑvkNP§Ówe|ò y,2‚iz–Ìc:£ÏåýÙO~Ê8ºÜÊjw}Tv è61â2èÂU± ¿¼/Jdí=ã„×ÛÃõ>FÃþã¤7û1”* óaB.Û’²Ëo6þ¶àÓ¸\ÇsÆý—H4ø oëSŒëÏSªrìå¹³Ôî^«Ü«ag_ Xsæ:ßv_%‚1‚ußÜl;‚è ê- y-É×Pyá[°þ21øÑþ1°¼3@à,ý‘>ÿv%K #ݻҽeU›ÿ!£„5µÙaׄ¡òUkøHÎK[ý+Æ(ò“ |qÄzQL…¸ÿÅ~˜¤ `k1wþóÿߦ;a! '·vÀQ4fsšé‚æÑ1­ ±C¬wÍös*]fb\ö°žLÝoT&œCݾ!uƒ¡~kCº¸Â¼€Ž¥³g§PT—S ²‚µ=xuÞñ®¶÷wrwÞÏ„”:]¼«çɰ·Ê™ç¿ëî>Ž kî|¬#}ð«èÓü‰p½{µóñ‹•NÅ ­0ÑÁÄúñï$%,‡}µ¤6Zó —Õu— CF¨Þ¬!O Ž¥ŒFpªo3sMžÅkzJßhÁ›³>Íĺi‡¬…'ë°ƒ}í®ŸAT\^£œƒläÇU,R.šNA··7~ç¸>ŒõýVò)Òt}ÈÖQŸOÏF—> Yhÿ1<y0ňßû¸Ø<ê+‚{󀲇Ä;ÎNã&:ª>βH¼&TÀ ³?”Ê*DÖÜÿ€# ©—Ÿ,þt‰uâ¢Ê&Î*ì 5«š ÉÝK¥}çüŸg´£³@Sr翽K%ìÑÓ±2„s……vèo¼óTBžBâÌÅe«“·žž·ÿH1ß^¤m3$ÌÞ‘þ9”L¼“°ÝÒ’Æé®ó æ]çc Ï¯ÂÍ”/¿Çú:{—9 ôý6M}ËX˜7Îñ'Ìxª‘PVÈ™)øråÓé^ʉà wô¦š‚Tœ“£ý9iðm«{[Îhf¿é˜à(ŽûqŽy¤¬ RÇa²ŒÎèÞSÅ“Z3AÔ»°.f–òÒmý;ä.³…†µJ…«ƒ·Hº½¯é/!çýG£$37÷e 6Œ6­¯ßõg~äÈšÝS°¦læýC•x —‰aüÓ6L†…ÍUÐèð ñ·Ý=^CÆ”\åA.àý1¡0Ûc>°MÆ¡ûœ­ÌšZë@¿ä‡ˆè‰ñ'è´tÊÅ3ñß:b è?Keùj¢ûÜãW2c óÄ"ÿ+÷™´‰)Žp(ün¤Rn)"vôi±Çÿ|€MÚWÔ©TF!«ßIV¿}éø°p³}ú.¬@®C§íq6Ä« z­ ~gU»2åÖ)¼H'\lÜa¿ÐDIãOÉ#€Xü£L¥-‹T#˜)K5:+”rrìWö^ÜÜGDù oj#ðÒ¦4ÅxÈŽÒ7þ.ùK3ç@S–)¶ ™.ž°èfù§H§^âXX:–“^DŽZA–ÔrÎ=¸R»“[Õ˜3sD¹½q ^¤;2L“»³î§'hLÉ:ÿÎIÆÐR[–¨ ˜_]Þdò h´>ì=ÙÄ_Fÿ*HP¤¯z¾¦ÿäŒ >ˆ[Y™ªÊ¼W‰—Ȇ•ê~¶ ¬jémûÿF·9“­RA½ˆUˆËk"“ów¤„šiý¥È‹ÉÉð3u³S@5¸Š¬°—¬HMÙÉ<-äáÅweæb¢è†}cF’L–,àRu“•ìc:±y—ïL¨Ô-Läj¾ÁæéÌiç ¶™ï†C›l–¬:úç´(ššG{Eô =øÜ8ój¦‰ÜfÌžg%å{öïê ¿?ìÎaM‚BõÜE:¯<ò0V¶®¦è É‹Æ9rš°zæO>{Éx•ÎYqµ Æ,Ä û‰5UÖíRe»ö;¨(a¦ˆH„U¡%Ü‹hÊF“ˆ•™„?3ךß?‡¨ á`³Þé<¡‘ÆiÔ‰+Ûû¹¥‡Ÿöê”ËÕÓ*`×ûš;16ôFo¥yª-¹¨u3ËÍ’?Q·5°dõ$µ… š*óP^Òºx=ž]éÌ~å=4°, V6z°+Cr å )…”œ_íM.¬ÜÔYœ>œbÉ]ÔN DV炯be\_dèw°ìá(Èe+FÞ±0n”½×|ñÕRÖåYµÔÇÅÛCBB3`dÇ!».¤„‚*­öo:r\ðGõ3Ñé²øË³1‰QK=: ·MêºTÞÚ‹ ‚ölc‡ÒuHNÃË¢ç¼àÅ,²þ„!_¨ÉÎÄ~DoÓa±šâ*W™~i«Ž~§0ˆ©N"/^@!¯æ¦ã|xÕN.¨$P/˜¬ÌˆÔ³ùbh=ƒ\²al2\.âè†N”Z¼‹2½öç…1SWuž¤²”ê®ËËnõòGKO „”|[ž,?¢?j¦S{„Á^jåE÷àb©_‡Ã9º²þÙ.ìvôïAÂ%á±÷ˉIˆ·Jå%øCsæ^׆ƒDŸ $p’¼~BeuùÄÎO«¸$çï <çÔYQ N^CÊ¡¡ ä”n¸½Rx5/ê¥?£g±={,!€A9Ïæä·JÏ’+¿Ð"'Žâ2""â`HTú5ÁãªÑËiE”%d)ÑÃ8þ›Ûƒÿ] 'T"C¢È¾‹àéÍÎ<Õ ê[$ÅoÙŽù0íä\M×…¸X0‡}Frêol 3«ªEø7ù+¾þyas†~ãiÙk@ЄËZàÇ1Zªk4LŒ }P@æÌöã„ðÚ@¨ëô+¬{¯í‰ù¯Qþ G² Ç6Û¥¬œ÷ϾÇPä „¨N!9ªÀñ6ÍÞ½eɹƒò\ .Êwiâ²BNƤ„Aѯåµ:¬ln˜ËJ=álXÂw œ˜(Еð KB›«äsEàÅǹìþÎA€ûÞ«ÑYº­±ýTÙ_FÑ*[?àÏ© k€üºesû¨lÓxrT|˜»š5)é„w—_æÌgxfã(¤µ½åÄ£½Ïm•.ÉC¦g¸Ú X‚+ »¸ÔomŒC©MÚûO]¹%ùäé¸1ä~‹ëqX-ÉÔwׯ´—ƒ¨î˜ï£„ÃÌIL”™_~xâ@8±^O€€¾XàpûÅ›ŠHc’q¨Qd»Iד"Þ‚-˜ÂŽ©Ò…¿Þ#ÝQ\Ã3^´2a6ºD,œ­'ü˲ÀàiÐBõ^—ª³ŽèÆh§ñò|ÝÚq6kòb[´xÏ"BtåËödd霧¼˜/•„Ïd @cyRý:ˉ™Q„ÕQx3êý@2…Œ±ïîÊÆâÄÆþã< ¤êÄ5X µqýwë\W÷(Ñø+9âw‘àö†móµ)ɲ‘ënNHZûƒ Öòëu4 ÌÖ­ [zß?Æ[»MõA³üôAòVÝå½ÔÃØé„å—[O2lþMœùA”…I/êÈáÉ›ù˜aJ†q“KØtdöÓÃ_´3XÁ*)gª° pL‚¥"Z N»É²ŽêŠÌÆ epxJˆÇ†À‡ñ¨Z†ñ±°Šç¹iŒïÐçüt úÕ–qÈbT›‹Ð/€ÔdœLø|Ýi¯Ü‡ÓªŒíYºþÐù˜ó?qD´´7¸ÿCNô†8<컊Ÿ„a6¸1“&ŽVü´ îz”:f€¬Äì¥Á=ìƒÄuÄæTÚùÔ àÙZòáó­Þ)½I›5ü(qáQšn!B®)|&‡?9$¯”êµôLÕâF¨VuåMÜËo­ƒ O'™ØkfÄŠŠ1óVŸbíõ¼T »{wCM­OVü†PNû*8VÉå—8ïfØ,ÍwÒ¶býPY«N—ÿ“!Õ­ÍTþ߸ÿëøçE÷SÛâÂwк <ñã¨?}KSbJlP(šHÞy¡é)Þ:ã8r!^z+^%é8ü†Ž£= ÎÄjxmË6(Ð÷á ÈŸ'ý²ÖÀÈ!|+e†/Ùù,?Þoäøk _|øžÞQ©î:]–»×ôû›*°q–:êýÌ.õòïo´îovq–õæiÃñÇÖcQ±éy` ^tNúí›BÉ~!'A[Í:î}ƒ(§‡ l…¹òhzn¬.5µ ðwõþg%²àH±kEŒæ3£<’´$â1â.K¸g“?ûU|¬Zc)%Ô,GF'éCiž ÷ v.‹€M¢Ié°/+QÈRTJ4*ª¶ ÍÃ|‡‹JëŸð 䉸ÍxãžCX-®0ÕšÓ©kNùɨ`±Aqx²ìÅH ¾Nn]§9OVÏjÔ­ëÁžpF˜mÉ:ôãMd<·§â˜ñ^¥Â½*l`;Ýg}%±9Û­E×¾6½nää3 ³$•ëYÓ­Fä•;Èc?ýy L Ié·ßj8g¤Áin<4p¥ÃoŽJÒ•†"²i^ÆÍ¬¿×ÙüÓäùž§¶÷B¦ ªEQa[Lédµ"o‹¶Ž³‚Aº=»6ÿd%a† ÄÜ1×àð”˺"Âñ–þ ÷µTìjÖvæ5.úH‘ð ˆ·S|$«l3VøÊ¯é6o]B}Ìü´|T1ˆ¢_F"²…ö3âØA_™˜à†¤ã¦_ŠÏ/ÿãþƃmÏV¼¼¡)mµP’—ƒo‚’4œ Ø<·YòûT²n£ˆdJþå’1Å‹$ÎÞ¦æµËH‹\0ÕTðGß•]Æ ?ÒÉíX؉äÒ é®7¯Š,h…B\#F@µ Íð’T.0 ÜMž·FFò`EI“øm„Hž\I© ^[†hµhnXn´muÚåkb0>ÍlïÁéD»K&lùoý@®éÞlÑwäšéºZ\ I¨ Cú„Õ‹ãMoÚvQõÙ¥uS€F„¾ ëÞb¥ [(Õ!vdÕ6óæ¥:½—·WlB jnçϯ¥^“æl„Çûu®›Æ˜6¨?7Q¾ù¯i6b¿1«Æù\»ð<»åõÜüM ¾{ ü—H,xµópœÖÇ/¤çŒZGi^;õz­N6µ0¤Sˆjð#2‚H’ûBÀ¡”ë:ý~,º¥pA‹€{«h]æyð0ᥦeŒ…E›` °nR=‡Ì2Žz{…Ñ]² V#Ù£m¿xIphL'ϧxJüež‘5 î}V'ë™êØîº1sȃue–DRÆ É]þ¿BYÝŠ ±HHMꂬÅþð\§P¯ŒfaâߦÁå–ƒq†ƒÓ½°”z G œ´ð®3¥š Ù¯aáZ C‰,)¡8_âkŸ/FTT#%—7ž„Kžß!7RíÉߨd—0›¥Ï\ Î5ÑÜw \ñ—"忘ÑÊÀ sDj¢VùíS:G‡â„ìU”e­Ã{+@âH˺! æbbË@º ùãŠQYx¾ì°ÀV Û…`Òˆ0ݦ$q7 ×sà²ÌéÕ¢kqE ó.ã¼à5nXc?laÂú0%p5åµJ »Q Ëݾ3EFô xq…Ù ±$ ¦0;Æ? C+Þ¤¶ÊlMñ¿¿Ã9Ðۜޡšß™‚›,GŒ³mƒU¢‰7… ÏÁn9>„¼ù×ïPIW÷ŸžsëCLá[ö§Î/~é^…ômÌ÷f‰P°¶œÂs¼È?A«Ð/®ù›« õnZ¶oU¤lHÎø’e#ã1µ ‰DeOÚ˜Ž¨Ð-q>Ë—2ºåP0‘ sFà}© óK ± §Óhäá*â§¡”pºš‘â?XꃺO/s„ ¦‹ÉË%ã$¡óe=žÆhÒ Ù™³Ÿ¹ ¡WÙ•¤ÊJq¾@cPÛî,¬hÙv/FôNážR‹…ǦO仪<¸ÝzŠü8ÏûÙÇ#Ïùâ¿•þÜmaB¶soÀaærËè°ÓvªàøÅ’¹V…A÷‡…Ú) Vfç_ƒ¬×Ò~ŽË ¸^SNX„Äf ›=ÏÍÝΫ}çaˆwiÙ{VzËð‚"Ë“º½ÙŒ_ @cÛB…_(y?×){ÏËsÜ7䂽Z-Lë28>…ø#Ö(J£zmüZ uT´ŽeÅkDáÞ=U3 ÆQqº˜»`û=\¿úà{úúG¨ãà`ÅiÄ$öl\Ä6Žõ.øЦ O¶v-îÍ2CD–˜ÐR…;ÿ6€j4d¨¨ b\{×ö»ä<㈠Ƥ—®Ì™àŽ “Cÿ ”â¶cWf4—Ù7\JE¤xx7#~YÉıš¦°XºÍe¤»Èš”#¶M §°B#J×çáAЇm ÞhfæÒ–Ù$ÕkK÷ÒíXËYPŽÍ,ÿcñ#=¸Z€TVÜ>ª4ß¿ïš<‹ÍÄø¢ò>ÙK™ðxú"ûâ$RLU»Ïâ†äG ”Í~fp^L©8²Ä™ñó8ÅyÖª…€¸×*==:ü]Ïóª: Wm®Uõ1£æaŠ •ߦµ.0 ÛCY2›?¸ìU|¦ouåváP)M{ê_Ä Ý(­-ÓGÊF ì†G³*†hò`b½dñ•T²$]Þõ„\·ã{d8¦±ùji³à]Êšól«Oo»á0¬•ž¶µ<¼¯‹hÜ®Á! ­šÿ˜ó¸b̸ãöPRÒ\nß$Zxäžüe媼Á6ç¹À„¾²ÔÂW¬&¨jOc›Ý(œ±ÊiZGk.çÄÉšImÁÃ'1Î]’™ô-è ÒQ‡ÓJÂùú³–'Õ,”&_Ô4Š8ð~¼FÕEÊEØE?‰,51kÒ‚ú ÒG#kŸ4ÿ¤·Ü¯ƒG¤ótaW¥kÆ®PI¹ä[´Âí×?å@Jz^ä*æy -¶øàÞ¨b¯öÛÇyUËÕQÿ@Â7ÈŽÎQo]FŒ([÷hÎ×:'¡Pe–ÆZ<'=+¥–˜û§@Äü‚^8àNb™ñ¿Ñ[ûúî;;s…”Ìê€}]ªbÎòr9T&?¸µÁ¤&Íôý¡úÙÄo\µ,é“+à Ôp©áoTcׄä\®ïÒsÚÒ¹ÝÖéÒç†]{ð_ù ȉ0C.ÑúlHrÇP…à#, 0p =£hj:8ÎÎ¥*FX#DzÁfM:Êøš•ľM°µõCƒtw¥mˆNßãìUö+A†²Åíz­Dj»6À ÛrZ¦z“Áœcù÷€`V<9Ÿ¨ÑÇÛì¶Š¸EI ÚŠJ\Ò/êîçvÓ#-Yƒ ´]B—Àc)µùå;÷Røá cnü¢¢ðÐX`&£$×”ŠimïÆ¦4¯^ÝÅâ]@óÒ„õP~ˆ:_"a2o Ñ¿)¡•èTë+etÎ 4½.¤–VÒPÞö®:I èëiøçì£aò®ŒEl©dBíaE«šαÕJ§ç}Ø ”¥iî1ÀŒAõÕÜÀ…¢'çz¤¥^uÓs¢ÕŽ 3K=,ybÌÔëáÍv07ä@Ý”¬ÐI4ë|vC¬Ð&M)x¢éo×Á\gÓ4ˆ2ƒ…¶?®Xá–ÓãË‘Ÿtç/%ˆ7)@Ýg\d+4g¡Çk±¤ƒô}d*Ñ9°‡TyœÚ±xÔþ=²ë"‚h÷iÚÙ 'S™*¶²„ÌSºº“êhމe2¼ú½"Òâa*(@‹ä*èOkÝ 2>Ï}ßbdv0¿ÔY–ðÁdåùå€õ’ì/“"Æó‹–)‹&Bÿ´ÀëHrIŠÃ°¥jÇ…NŸT;žÂE^’ýþYT)‰‰Ôz¦[ÈŸ™&¨íEnÒ’R ›åL4b3þàr`Ù}µêë¢'Ì"-ä狌¬ˆÔ¨½“DQ(”}œ`£gŸ5ó1»¤ß1z¸šº9ŽÖÀø‘vX=„ã7Žœ¤¦\Ä-o€lÎ&‹×4}HQMRûô7ýõ]È8 ·«qã¤oÜKå†éù6Ó_ŠŒioFÈyÍþ-2”òœfØ ,(Ÿ°fÌp¡óqÛ¨/¿÷)IËŒM]vW}ÑÉg­·uùÚ0´OóÓí6žðwÒ¥¶)Jĉ®ÜO÷m¹RbÜ3òò.eâšÉ)]ý+¯¯÷}ñþr J‰ÁËäþäscí%(÷zÜÇ…y»—§Dð[ À?4ëãiÙÍCŠH8Rø*­pÊÿù>ÛÊz0OX‰ËxB²bGùFü> mˆŸ÷ "r–ˆËz§O¡£ª±Á hKÿPdÜñ=Ùìh›+ãö×\¯óý¢ÞÔfe…43ÛÐi"xÆõ˜&#jféÉß”¾‚O$õ}3(~úd|ô¢îëÔS:/¤_¢]l­Ò óПiUwE›Ù;Ú- w÷6ÕºÀ¹šqÑ}#MeöŒ—î¦ãÎÝ® õÜv§ÊAÂâ|ËÑüÿ€3<9§=Cý1Ê’WÔNÙr„ kn&GÙp“´_ep?Rbf·p–2š…*a[5UHR×¾E<Ð×K1ž´ ¢Ù¥Ë>)¯ÓrNÓòCPØÍåHÃ’¡KYô)â¦Jb´÷Åô åç]éNƒÞÇ>ÞA¬k¬PIqÊ¿ªžo·d `U„æÆp‡d Œ`•zéŸ “8¢´Vßz÷£JªcR#F!ß!ÆOô–hÁ”g ­@tþ®‚ñˆ˜_oÕ´‚ßS®åý†¸u}HNÙØ÷¡v89Xت¶•QÄ 1ƒRÃuÄ‘i¡0õÏë³½¯ÎÇÔXÐbõ÷¡!{visÊ &pæ5ãNwåÚ”fü¹=vùpŸì”î.Õߤ{xg-iù\ð$ÑŠ>×`S¶!’Ré;€÷GÓ‚ôãlïásŒ>Oãž‹ÚWo!ò`[Vø1ÜôGøb’#×µr@}9; Å•ú OøÂ²ŠË«5‰†%_¤ÐdEé–R_ŠÊƒ6Ï^Dö€Qè.ÓÊäuÃe~EƒväjmZ™ôàŠJÈÄ¥¡î ÞxíÂI}¶7Hfhà„å§B·Åè&ß°§SCFó%´3¤t:8äÃL`ÚÅê¦Ï€wBø2¹Úñ¸6iõõ:êüÁV1 € o–¤R!2ÅÛ¸¶,É-±’ &/$îñù®·šeîC¼Q 4[+ $ŠN§²µUU™a(«[ÂkeOá¢|Aß\§ :^üßkxd=ä2ëncÒ-!ðÅO’òã›–Ú·r>~ØIjNxÈ‘ vÐ*hLêKIéfè( ,C…¨4‘ö€1]o“Ù¡Ë(jŽx¯†GÆŠpÞø·Ër[FŸ*¿[ŠºÇ@fìãáKGo¶¹ØÝÃ2€â¼+æc‹hæLG%PÕF¥oþûùU àžÛ-Š$þ‡›?•ÝM~öæê#Ñ;Œ¬ßY ‰?.sðxw\¥ô8=Éâ¡™Ú=ƒbhÁ]tŽ ûSLºšíI%¼ÌL›*¬t icîK„½Ð?™©VÀ³ü½óea è<¦MÔ)Æ£ø/×àa‰?pJ…Öæ@‚õÞeøJz”«Ðþ‹Âå0ˆ’(àÇ᪣ñ•ÎÉ7Hú Ó·9ß`g˜w¥‡˪;ØÐo⻦WÔÙ¼–o»ÇÇECQ;ž_rûd_nÁ‚–X“ UmANÄ…¬ÈŠ&2ÓòêÕk+š†xådoD. ë2Y&È8ð%Ç™fhL·è:!HëH[n…M¨§àøÆçÕËú *ì3fs8Éj=¡Š!úµ½A’^ïy=¥©RÖ*p§S$ x-¦”ÆÊñè"žÄ–d6dž|t?m¸‰®}Œ÷ï ]º=ûÿ6Fâ‹ÿ刻cíÓs}f÷ÛÛ”•3/“ÙG ,ôÿœl‰s‰óž¶¾ Â&}2¯Ö·æ³W£D?Ml¼ãµÏéád£7añ8V>ºb’~}ûU%Ör<¡í™?„»œ^'Ò}Í##ùÛäYË$Á²Ã“â¢qî TdÁçe)jEnR×г½.5Ìè=šL<Éþ˜OCZ ã”þ)Ò}S|_2$L=Y¹ó#®Ñ_gÃ|ö–/Òëå… ÔUÊÆx•ö:ÿF¬ntþQWH&ïÓ¯µ.U‰\çÿKe:-j¡Þ‡édç ­ ÁY«Ë*g·PI$^…Ñí+Ã]«¤áü¢€¢]f@\#­|±#1Ï•,ô|ÃO> ¶Tl„=”.Ù‚ß·U½~̈Ûnn—]L•¼]#ÏY ¸ìµÿ\pv(2òolùÑÃYól_•3ÇV èìV£ ÞUz¢ÐÍMA¢Îð¿YlíýÔeå:q*“7åvÖef0 sIh̤SwÿÚƒbv‘ç#¹€Ûƃ:Qð-={Ï÷*ië!,¦rðôʱ P¬•/vÖþ•DÙõ}fDƒÝ«; • —ØC‘ž¨Â'Å¥Œá)­–:Û³M.ž8Gng«7o«ðå8,DZLOÏ®¬%פÄý}’2{Ðí¡Ò”è 4N9¥2PØê—Ö Ø`í¼RÆ•]žï0äsB)m¿VÙ¯¿Ÿõqf\ÑC¼jŠ Ù^ç„Á¡ñ¨æŠz.b]DG~~Hçu[-‡9¨ºFcëB o¹K•ÆØ‹dô øÁqø½nÞ®Å!©"xn_\ÛÖ@5È)¾\x½_-×+°.æJ€zuDA&Ûò··ÑWcVh¨3‰ AêÉkjø—¢W2ÐJMâÛÁ¹F¼ãáƒ5:tO¹hßdÑ)_ó§ ¢Æ\5Ø4ùrs­ó™O0äÑ1]¬}ú˜Kl¬ÿ_x8Â:Êdx¯Š!)Ù¬-ý—†Ó½BÕÌÛŸÜÈH0>±H¹dUK¨×yÀ@¦÷1ƒ½¶!a²õqb¹©¼ááߢƒOòõFƒnömlR¼†AÓ PZŒùð1bï¿:uÔˆrîàÑiZ—ÌÄy‹[Óuc43êÈØôƒ;ÿ-¿ÕÐU×*áÞËÖ¨ECÉ"“Ä^g/G%ÍZcRaöxÞ¤ò~’‰£m8Ï©'ëSóbÞ_#õZ“œÇIùX}ÎŽ8*á2‡+6?n©#+ËTBâ^‘l”:Ëß ðØêH×Û{â¥GÞhµ„úqò`lp;bLMíç›G§Y„ÙjP‰§Ì¨ì0ü°„bvÛÆ+Í‚’B3º·U~†´ait? o ã¡DOŒ¤GàÅÛÄõ4tF ¼W€õÃWíž¼ÐglôõFÇȵ¤ œéLM$„‹XÏ _Ý« èº)±‚¸m UÎjU¿ÑÔâyzЦ2žñ»Óqg97ÕÔñ®Ô/'üää[~’Dý?³™I|kìw%÷×±“°fzä×Ô»ãœ^â÷A—¯Uc¡ì:±<ì­H®H]¥íåõc5·°CÿÈ£12Ä­›Ìz¼¤Š6èo©¿rÍù¯aM8—®¡X4 ßÅZúÓk›–¬Th“”jál«áîÝØ47ç¶#4,ÅÁ€iq¹ÑêÄØ‰„ð¤YÇÅ ¬2óaéL«z ëÀÕ>º§yì”îï9wÿv`ˆ*@žK$о!üv…Xí|üòXOÀ-üp7ÐûOXÛï p´¼Õòîw$å\k–ãh?*òðãÑ€÷³’âLÓ‰iØÞ nÎáíiõ±rW>1ÉLJß0¹¾LJìÛ×±!”~Tÿ)¼Û—D8öª‰éð~}&fçô•ͳ*CV_+¢sÉ5¦²Ü¥Ü³->–÷z=™§ÚÛã‡Êörùáºw‘•x!7ÕëkX4µ×O ^Í€è»bƒ4¦ñZ ¹§¯§#¸T­(*<Ò)È…º`UÄô‚o‡„÷ÒX§–BÍšk¼Ì&¬á¦±•aÂ1Mätv aãI̚ЯåßS†!v4c)œ¼=F½úåLÒR&ÈöÒ"|Ð:LF?›Øn Œ•øÑÖ¡ms¼lÖ¡î!tÂØ%´pô÷.ž§9¼zUŸ]nŽúl(ì7Ýx©4H—‚(2²ð,ÃûRa_ù_™ƒ-\#)¤·¶7£JsOg«W8XÄÏ«ª›ßa¯ëÝÎ5·†Æ%«þÁ¡¼šôz\×Ä%áÈ?¢’Ê´ï 4áT˜°èÌ© b°ç-¡÷Kg¤Ž<¿ð52§o"‹ÌðXÏ‚¾ÜM«¥ùõ0îj†QÕ2Ñ å8·<ÖŸé#’w_·ü¨ØÈb»Ñe7U&1 ý CúÂq8à+¹‘¤u ×˜µEÒ³ßëï„BO!DÂg‰¡ˆåì–ðž"ÃæìmDZȂA=«7&&±Æúæ²Æ§åuÉDš}\ó5…D¢d íî¬ÃÇø^Ũ¸¯ìîï˜HúuL 5¢„BúðžžDß=¹9Y`Ì{~U¨5AÌjÊí,ÇlŸRÎüÕƒílÙ•Ï­£ƒ ê'4¦míHØ› &ýÑÙB4±ä$e1Ã!á.îê®°€¹aò£CÎ#œ5®à¹Ø  ¦È€-p'ê‘,µ?¥nï'¿»„„Èm»eÚòås”@5 Ó®±$d-ŠLÞo˜ ´3üY†èí$N·]~ÐTÄažF$‘@úK”C•¼û'§¦ zëi¡)§µâ©Òã[ž¥jÉð§îVfxÞì+„ÏÛ‡KFÁW)¨ʘNÍ``)Ï9…Š£ïX³”ß\kc¡²,7Ë–ŒŒÏeZFl¹ŸëŸZ¿_Øüæg…î”Å„uTßÿžëm0Y‘<£,]ˆš8"ÞC‰ïЬƒÞ·¹Ê‡O•¹ h"Áù HëóœÿØ ÕøÁþ …åÿy²–Ðwñ§ÜÆFW"9„oñæëÆÉÜkú½Ç®eT¯±ê»`ˆB êm Ù \4æ•G›éÎìâ~ÁØÁ&w¼¾4•¢ªo rãHjûl颢©àuÓøùÂëLÜ‚€ÑŸh­Eñ'4®‘˜I4!Ú{MC Ã'ϯ¨k¨ ÚÑ(·¤øO'ÒÉe¿ÄÐXÍP{„WºÛ,‚¦"PøÊºð›)MøÍ²X5¶”?ê[öïòjd”)Ð2Õs[ð‹=#‡êgî²N7ßøo$VEtdIô­öÒ¼\ G>`½raæzŒ!KxGwm¶˜Sþ>¯¯h¡»…ì«0аv}- &t±¼®çŠRÆW&60ëŠ3·‹Uk™¬—IÑÏ”ÔÌ_C|Ó)XUtgêá¸Lµä6Ô|”ÓüsHY—!?ÊÒ0™aʼn$»qº,;5´”9àå ø)ÛG˜@Ë]/݆FÜB¨,ÊvÜȃëaù!”ìRTø¹YóÞ å\:îÎVøzhD·ÿ|b·²‰swN¹­­é‘ ¾î, ÷è2zh*RÐIžÂ €«=žfPKtÒÇÜÈ'Mm.ƒ‰C3cñ²ç ™TD$7Ľƒ>=JU“ÜÇ Ð(š¶D;EÜ b×÷ùÑ’¹àKtiù¿ïdKšu{Üõqö ZòG‚{ÔOvÊ5±Í3,®3Ñ]÷¹e»Âí^²aŽó,. wkû¡:B5lá¡òË…Ø$ï[^æÁ¹·Ž´Ì°5þʼ–Móˆ ŽQô¯ÍܘòÏ"›Ór+Àl…»Búm2(t«·£xêe²¤›JÿV‘’ïIp¦«AÙ5V¬ý­Çbf€;ôVìåZ¥i_ÓÓ³“ ™Q…>SÍêXqO­ã>¬QD…ðÉâÖÏv*¹¿j”ÿÕÚ›ráoŠc³‰ :ø ¾†+ç-¶épj©÷ dªl¶õ3é+Öu·N Kë¦O‹|0Ý·43mX0ç|+Ú-þ±ÑS›ùóA@³Ãàr캣٫Ê3—p©ãïb(^ÔÚïꟇ‰ oÕ9èfFe_Þ3nõµA»j€ßƒÂÏ„‰0½ÙmÊäb‚˜zI}òu¡VlÁã$u %aÒøz#°²ì>ÿk€XAþlÜ¢•ZÂcÏŸŠ«-ß§”#æ,ÎØêîfFý;-xÒÕ» T>ø­™yïxÁ)×cöàEùRr¤i²/ÿuYДR\ÂÚ@¤‹j5@ C’º€Úbå[á$Vt´þnBÌàJ¾EL+l^”ÙŠŠx? è5uŒ!ç±·ÕyÔ¾L¡xÏáR›Õ*™ˆ:ƒüfÆMfÂÒ‚Ÿ7ȆµÐû*:«×ÙäæˆÜ}v7¼§b'jÛòKzoñqÆÃáÙ=‹Œù3e —Ý÷̡逸︀½äýÓ‰F…áÃ÷uÑŒ~~+¨H a$f­½üé1n–:cm>'[ÆÊ*ô£VNsy>lþzo²½ib‚V8óFåû•<î¡E\¶ÌrÃZB%zß*°·=~ÞJ¬}¾Uíxª‡ŒáèçXG.-§§jJc¼¨´Èλ¤­ΣôfY] Ê»ŠyÃÓiˆ’Î"6_hƒR±„kRÞÝjÓ¡“«jR#G¦§Åö§fOƒuç_x=sDIÖZÇ›µ|Æyu‹sÞžˆ¸Ýíšæè’¡6ðBÃÒN .nh™àå”ff̸~:8ÄÍáö§Ïë­ ¤IO.¹ ·àkQØÆh½òƒ'Èè›ÖÕ’JPOƒÇ˜U¬ššùáéR|ÒX¡¼Jªx„^ã—þÁfyÞ­q¹ïªI€xy;9?ŒQ©Šwõ›ÃÕ™í'wch Iâè´ö¬»GPàºBHÛÚ´¢ÓäÇ:3g1¹Øg r\þÓ8  Úô"tMãsÿÉ¿bׯ˜¿Ú¹©û·jöR=·ÿ2?`,«BßÝñ°ö´oR@œZò¦Ña30¿ôÜÅ];$‘ð³"D×ïn/HÑ"=³-Vºa^ÐJIR¸Ç¼Gœñ7†:¿žT°n:‹°ÅU‰ã¦CTWSܤțNÚmgå7Ö¡ôO4¥§Êâ÷x{d‘ퟞÔ|5Rjqa¨4U{àÊyŒWxW3ζv™y„c_Œ˜yaqF'RÞ·_H;ž œ4a:[“­«{r÷ „^_Ì ¥Zú6[´Iý^¹Û¬:ÃSO„€ªÀQT®ƒx$s¾ AY3ézîo+–¿ù’A‰­Û ô`©bõð»=ÜàÎ<³!Ò€æÚ*~F´Ø::Ì&¼ÐQ™@ÞÍõ‚X€AÝñ8xnÓâ!·fÓfoŒC‚äD@TàcÕÉt—Õáô>À6Ö.fÏKi²Õ$g;¢Þ~æY5Š1AŠõ°ºx˨ùþ«ÎG®·Ãm°Çpñâ+ÃèSÜ‘° jÙâ^G[pyÛúþ”è Ý*>KŒKsDv±éi"±ÖY^^t먑j /ó?¼ñHý]çÉ–D,íðehöÛl”eí†éŽÀÞâ>”ö.MK¨ÑÇ2òN¤ ÿ%ì_ZoÛ`gDÏR¿ 6Uˆ¦â ®r óÔ jN4ÇtAèOü'Š Ï²p7ÓYŒæ©¤R f:Éæ.™#—}˜iiW‹ò™Zï µÚk¯êr3Ö^rˆÀ©%Ôíè Öš?«fŸì øtÏ­CChÄš.|²(ÖüÇÉt‡()ÙmOrÃL~cI'+·Ì—¾NÆÕÖ7!­š„á¡byð]7SG:ýÅGÍ=t )KO7>âmçxÙÙ ¤’Vö3~àmy(æ$ËÅH«š7™fV¡÷¶†<¥¤™ à íÓlGÁÛjE®¥øp”âžpÔ [ÊÔÂóá,Ó=–à\IŽÇ"/îR8sÝ—ÀU-²”ašåüŸäÉ^/2¦”ÁW‰TaÛñéA³iâ+‰ø^ ´jÏ7¶B Ó<†dïáÐ9‚ßÙØ0yp³ùn„X—¡Éìø7?Õº ]UvûÀ2+‘òLS¡t1U1Ž-2"Îä lB—Kñ“àFz­=¯’Y,3ß5¯Z ˆÚ•:}_Ê“:>íŒWì¿"œ°M…Úøµ/to¤›1^á€á(ïJ3ýe¯8š‹¯÷Òm%é¿"€O+Û-³ 5¨-"¦, Ù@T€Ð€¼Ê¤\_ƒ¦À[Ë÷å h¥l·zrQ÷ î¿8ŠÙ‘üÔxûð\$ÍòчŒG¿›ëzí]ÅsK.óV­·xÁ5ƒMõ6í”Âÿe_Òp|"ä#`@˜¼¦Æ`—­ÐÑf5üá ÖnÂðÝ󬛋8KdmQ… wð”Åü¾i¼²axâóu˜_Íó–G4†ë$¬9\‘“*ŇÐþpâàŽ Íby=¦1ÿª~®Ì³3ìö}qÀK#¿–ÍkôïÚÒ2‰¼Çcâ8ÈHê7cŠ|ìÕý##–µ·¨úlêźý¥žñ‰ÌÔåe$ïÊŠ,¬ælD_ \çMeܳBÀIÝøª©µ7î^ûž3â$p‡áè¹qŸþ&Kxø¨ UµvD0Yô¨þoþR[ªå ‡Üÿ1Ð6b³òÈË|ÿ-M¦QÒþ’ÊN±åõ3¨à5Ô>Áø†èYý°•¨ñ>vÊA³NÀÁ ŒQ„í¶!’è.Ï6à[cÊã@{ 1AZk¡dÊŸóµ‹ +JnX/¥V-ªÒ¾°À'i±WõfM›Íš”IÇÒÒ2<×½œl-yKõ”[!„¸®“5É„p£ÿ¨@S ú™ëA >Ç'>qZHfúGÂ7WêR3îÅØ¿mM6.T~{Œ|¹ÝoN7à»O [C¦C`Í7ËqýǺM£Ñ ×èè•kÏqìZƒô—É#@}‘9‡íй†8Èà‰ƒî®<ž³è.d~cìAn™ÍB¯'v>§kÏÁJ À–8åC8 KWŽ¡&:f,ý=˜å¢Ñp& `DÐÞûœ€(ƒ„ñg« õ¨çÝ#Ê¥ :QEP6DjíØv>oÏŒR€/4Z¥IvŒô<Ä«òðòýÉþŽ0Ó31õKÀóLæ(?|Áu37€[t¤8¾>ÙeUÿ^“á€Ücñp{ŠYCá>)ë‚/—$z¯$J*º_ûPL4þÀµÕ!uÞF Ôa›tVã„ÕïÁtA>gkwëïÚ£ú!RäÙœ°ØQ«ˆk2Fp§Ê3üÐXm ÜÌ Ãí.ÁµUЯ¢¯QIÔžœ%PƒÏS…Ü LÑþñ±U_‡§ªÏÓuš‹‹üùrô™ÒGnÂÉ϶FáþlQOÄ%5ÿϘý½pO®m^_xZHǬÍö‘úù c®|kÄ“W`RâZµ¼êaD\ȾËvÆ-Wlc×½BTç–säGC;W‡Ž¯R52!¨–‹å¤çÈC€ýiµQ8†óp£}¼Ñ›Îböz-¦Ož….U ü¼ ›/¾ùIYº1pCŸÞ©qBÓíZ4BL™Á/#ë²b¯4 å×;»háÆ‰wyþicº‹§UÁjI)‡æ^ía)Kf–¶">ÑËì’á¦KX»¬EŽbl»®®ŠÛ‚ (ú^!e‰B½ ì¯ÿÐß»54Ù=î`ÅSyÏO-Ç=[1ßh˜¾îc[fۙ滫d°Ž>”™Á UŸ^Ý^ù§`˜rçVu|QàJâæØr.‡fJøÙ&HB1Öƒ˜/ìé½£VÇó]˜½ûÉ:TuA„^…¢ãøÝMbi û oïµmßmþ~¢¬ñ-ÄUvVÝ:Þ{ñžÅÅÔËiV‰¤å)z¶!íñ•Ì„÷I/^Ýó)ÊûG$†† âÖkÆâYjÉ9ÞUóÁV·P%!eñ¯Ú×õjè­¨I¦÷Jå…[vkÑ98¼¿ µÇÈ}…“ž!½–úŠgºcñÝK€Ð¹nï“ôoIO:õÇ–DYð¼Aâm4=Ljû4dª.3š”C¿‘HF_¿LJÊ ÿVUWÃŽŸ ^÷WxÎu Ù[fþài±úÐbÎò.à[ǰS®V–úåë»%í(çbàÀ£f~rÐ"Bq^ÚÒÔ‘HÏ0X–HU~ã‰mä."i¸”¸¥ÙâÙ1öî@õ{P~g¸–æ|tIdböxU&ý#f‚ÁëJ8 #AL_%¨Æ‹q¥zã)u$òÙwu.'iDJÌzz=¡"ø÷Y/Kºímb.AJû!0ä%nÞ7Ã#ÕDEõ¤%Ñ ‡Ÿ\¼[ 5úéí-K›pk7dΦq‹½²Êö¦"eÃ׎{ùß9$Q—â+ð¿®q€½ðƒþî,y¿îÏ;®OßYá¢9ÃnÕÚvÉìJøqš<ÀÜÄjŠÆ8àûV[ãÍŸ‹ïM¾ÁÔìÝÿrC’!ûrÿeçyîñ˜fߥï;;åðr~޼JòýMráý÷HàWZ8º»ÜX£á®­°ºÖžodš š50ÚëÖñí >ÅX‘kÔÍÓ¢Vûè5ržâ>Æä(æc“hê8¶ê¼Üõ7/ÁhÇMlÔÈÍj±ë#¨a¼Ûói×%Ò”ùµ]îÉ£¶c^sáNJ0Lï¡N³Å]Á!¬mt´ _ZÌ|g+šàe„› Kóì£V–ªÜÜ9µ§ÆG:;½ö0¼½çH¬[5G ª˜tW\iÖÍß㵺1­²iãlM7JÓ±ñ„Èr*‚¼ÿ‚Têwq²ÆãÉ\SËp ¹l8ÐزcOΣ?èeªñHGIßo,†ÝóÖz²P-“š¶=E>(ëHQÛÒãÑZkÊ ñ†k½’ie…D‡^+|:áºæ‡¦‰ÀÇHdYJ©ºZ@òµv{HyÅÏ~õBpi´S*ô£»ÁO‚Á^õŽÙ€šÄ—¥t¤1 ÖQEé{+9ëÓ«bEÈ,i•/¡ ]€”€ÉCËD³¾H·zøý}Ý ¢È)ðØKokéPÞ¨À²ºÒó‡%KR g‰D [•ÚY ¼Â¨çä+‡M5½óbÃ3xØ£KB7cÖŽ·=_~J´6WÙÐ>E‰ Õ! ›xðÏ¥‹ö¾är‘À~áhƒK0’«yêPÝ $¨åA|H8V®Ò™Ÿ¦Å ˨eŸ¹äÜvß媩‡"™°OŠòÙ#©± «Â´;゜̴RXCt÷2 q_,«½8ÕAþ[¶gì3ê$^¨À¬mÍy‘.zÍ•ïmíCË)  G`¯ÂšÂõ©Ö\íYYëø87$D[/«ójý½ÍDf‹ <úà¸ý~ ö2[qí,þ£àÑÛw…¼ úQØg7 x®CéÍ”iM›Üß}8Ìàp4=̆^¨ÇiO) ðèÀÙŠYøpæÁºiF‘ÄÑ7lè)ò5ú!B]¦%´ñ œ²­šeV·¿#mG9²€ÌÞ¥ì7å§K³Ä,/ü+íÐÑ„£÷Z¯­çIße®¶ù ˆ•ñ¹FiA#„ ÷SÁ5øÔšÈM‚€èücÔQc~=~Ïò?½ ïFe¬­Y©¬ü(½°”UÕØF±m5¸vÛRöAÀà©,²§’Gr/L­W]­ F¯xè,“¯«Ç’˜#Ô˜à”±VýE•CÆÅ¬ ü– —S¥:BŠÝĤ6Dã’ýàtÀ#¿íÃ¥Í%6éÆö.†ÓÍÄ‹êöÎÇdk¦ª]š©—ûht\ÖÅIÝ-†ßI¼9–ç° ˜t-iw#fæß#G øyLëQ‰-Â#Õ£œ×û¤¾ª’u7´Ð›·Pæy%§˜düÅOGùìõ|¯5•Ýìð{“âµ´É¥`[0ÄÑVkc*î”ËÜ­ÅÎ6.»­Q!Ûc¾\kâ`¥å™ÌP-ÿ?³|À/çv5Žn¢i0¶«¢·œp+)1©Œúéùµ³Î…âÌ®3òÞà'ñy€­#DÑ ¦×ðô)›¿´!êWPîY½â°–ü.Å8ÿΖᇶžÇ·0X[^‚!‹žUŒò}šFbÄéÇ¡¤Ã|+%:×çÒ8•났v N§.jåƒ%³©$n.[i­ÿCÈ1Öö2ზÚ^°Î.ÕöÊ0×å™ïVÅú²TO “#(w `2wžJP;–WGŒwçaêÿ½ˆ#µê9á8ÖÀpú] :ÌjÌ6Ö¿š(Ê|R9WL†³Gé•õcabextract-1.11/test/cabs/search.cab0000644000175000017500000000572713323707071014316 00000000000000hello MSCF¢,ÒFTòLÂ{ hello.cabAf¹{TTMSCFT,ÒFòLÂ{ hello.txtd jlhello there MSCF¢,ÒFTòLÂ{ there.cabWkºoTTMSCFT,ÒFòLÂ{ there.txtx crthere general MSCF¨,ÒHXòLÂ{ general.cabSQ¾AXXMSCFX,ÒHòLÂ{ general.txt ogeneral kenobi MSCF¥,ÒGVòLÂ{ kenobi.cab ^†yVVMSCFV,ÒGòLÂ{ kenobi.txtf okenobi MSCFT,ÒFòLÂ{ hello.txtd jlhello MSCFT,ÒFòLÂ{ there.txtx crthere MSCFX,ÒHòLÂ{ general.txt ogeneral MSCFV,ÒGòLÂ{ kenobi.txtf okenobi kenobi MSCF¢,ÒFTòLÂ{ hello.cabAf¹{TTMSCFT,ÒFòLÂ{ hello.txtd jlhello MSCFT,ÒFòLÂ{ hello.txtd jlhello MSCF¢,ÒFTòLÂ{ hello.cabAf¹{TTMSCFT,ÒFòLÂ{ hello.txtd jlhello MSCFT,ÒFòLÂ{ hello.txtd jlhello MSCF¢,ÒFTòLÂ{ there.cabWkºoTTMSCFT,ÒFòLÂ{ there.txtx crthere MSCFT,ÒFòLÂ{ there.txtx crthere MSCF¢,ÒFTòLÂ{ there.cabWkºoTTMSCFT,ÒFòLÂ{ there.txtx crthere MSCFT,ÒFòLÂ{ there.txtx crthere MSCF¨,ÒHXòLÂ{ general.cabSQ¾AXXMSCFX,ÒHòLÂ{ general.txt ogeneral MSCFX,ÒHòLÂ{ general.txt ogeneral MSCF¨,ÒHXòLÂ{ general.cabSQ¾AXXMSCFX,ÒHòLÂ{ general.txt ogeneral MSCFX,ÒHòLÂ{ general.txt ogeneral MSCF¥,ÒGVòLÂ{ kenobi.cab ^†yVVMSCFV,ÒGòLÂ{ kenobi.txtf okenobi MSCFV,ÒGòLÂ{ kenobi.txtf okenobi MSCF¥,ÒGVòLÂ{ kenobi.cab ^†yVVMSCFV,ÒGòLÂ{ kenobi.txtf okenobi MSCFV,ÒGòLÂ{ kenobi.txtf okenobi cabextract-1.11/test/cabs/encoding-latin1.txt0000644000175000017500000000014313323707071016102 00000000000000 ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞß àáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ cabextract-1.11/test/cabs/large-files-cab.sh0000744000175000017500000000160713367363364015660 00000000000000#!/bin/sh # creates 2GB of highly-repeated ASCII text, then compresses it with # MSZIP and LZX in the same cabinet # largest possible file is 65535 blocks of 32768 byte which is nearly 2GB perl -e '$b="Fabulous secret powers were revealed to me the day I held aloft\n" x 512; for (1..65535) {print $b;}' >2gb.txt cat >directives.txt < 20kB wine makecab.exe /D CompressionType=LZX /D CompressionMemory=21 large-files.cab mv large-files.ca_ large-files-cab.cab cabextract-1.11/test/cabs/utf8-stresstest.txt0000644000175000017500000000411113323707071016234 00000000000000# from Markus Kuhn's UTF-8 decoder capability and stress test # https://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt # 1. The Greek word 'kosme' κόσμε # 2 Boundary condition test cases # 2.1 First possible sequence of a certain length € à € ð€€ øˆ€€€ ü„€€€€ # 2.2 Last possible sequence of a certain length  ß¿ ï¿¿ ÷¿¿¿ û¿¿¿¿ ý¿¿¿¿¿ # 2.3 Other boundary conditions ퟿  � ô¿¿ ô€€ # 3 Malformed sequences # 3.1 Unexpected continuation bytes € ¿ €¿ €¿€ €¿€¿ €¿€¿€ €¿€¿€¿ €¿€¿€¿€ # 3.1.9 Sequence of all 64 possible continuation bytes (0x80-0xbf): €‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯ # 3.2 Lonely start characters # 3.2.1 All 32 first bytes of 2-byte sequences (0xc0-0xdf), each followed by a space character: À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï # 3.2.2 All 16 first bytes of 3-byte sequences (0xe0-0xef), each followed by a space character: à á â ã ä å æ ç è é ê ë ì í î ï # 3.2.3 All 8 first bytes of 4-byte sequences (0xf0-0xf7), each followed by a space character: ð ñ ò ó ô õ ö ÷ # 3.2.4 All 4 first bytes of 5-byte sequences (0xf8-0xfb), each followed by a space character: ø ù ú û # 3.2.5 All 2 first bytes of 6-byte sequences (0xfc-0xfd), each followed by a space character: ü ý # 3.3 Sequences with last continuation byte missing À à€ ð€€ ø€€€ ü€€€€ ß ï¿ ÷¿¿ û¿¿¿ ý¿¿¿¿ # 3.4 Concatenation of incomplete sequences Àà€ð€€ø€€€ü€€€€ßï¿÷¿¿û¿¿¿ý¿¿¿¿ # 3.5 Impossible bytes þ ÿ þþÿÿ # 4 Overlong sequences # 4.1 Examples of an overlong ASCII character À¯ à€¯ ð€€¯ ø€€€¯ ü€€€€¯ # 4.2 Maximum overlong sequences Á¿ àŸ¿ ð¿¿ ø‡¿¿¿ üƒ¿¿¿¿ # 4.3 Overlong representation of the NUL character À€ à€€ ð€€€ ø€€€€ ü€€€€€ # 5 Illegal code positions # 5.1 Single UTF-16 surrogates í € í­¿ í®€ í¯¿ í°€ í¾€ í¿¿ # 5.2 Paired UTF-16 surrogates 𐀀 𐏿 í­¿í°€ í­¿í¿¿ 󰀀 󰏿 􏰀 􏿿 # 5.3 Noncharacter code positions ￾ ï¿¿ # Other noncharacters: ï·ï·‘﷒﷓﷔﷕﷖﷗﷘﷙﷚﷛﷜ï·ï·žï·Ÿï· ï·¡ï·¢ï·£ï·¤ï·¥ï·¦ï·§ï·¨ï·©ï·ªï·«ï·¬ï·­ï·®ï·¯"| # 5.3.4 U+nFFFE U+nFFFF (for n = 1..10) 🿾🿿𯿾𯿿𿿾𿿿ñ¿¾ñ¿¿ñŸ¿¾ñŸ¿¿ñ¯¿¾ñ¯¿¿ñ¿¿¾ñ¿¿¿ò¿¾ò¿¿ cabextract-1.11/test/bugs.test0000775000175000017500000000025613401177732013332 00000000000000#!/bin/sh # test that known crash bugs remain fixed . test/testcase "$cabextract" -t bugs/*.cab # fail if exit code indicates a crash (SIGBUS, SIGSEGV, etc.) test $? -le 1 cabextract-1.11/test/simple.test0000775000175000017500000000134613401177732013664 00000000000000#!/bin/sh # test cabextract gets the basics right (correct dates, filenames, checksums...) . test/testcase "$cabextract" -l cabs/simple.cab >$actual compare_with <<'EOF' Viewing cabinet: cabs/simple.cab File size | Date Time | Name -----------+---------------------+------------- 77 | 12.03.1997 11:13:52 | hello.c 74 | 12.03.1997 11:15:14 | welcome.c All done, no errors. EOF "$cabextract" -t cabs/simple.cab >$actual compare_with <<'EOF' Testing cabinet: cabs/simple.cab hello.c OK c2535936b8908b1f8a28b7724a2c2045 welcome.c OK 67c981a019c21f3f4bb8f92efe4d95a1 All done, no errors. EOF read status < $status && test "x$status" = xsuccess cabextract-1.11/test/case-utf8.test0000775000175000017500000000757113401177732014200 00000000000000#!/bin/sh # test cabextract --lowercase and --directory options . test/testcase # skip test if environment has no UTF-8 locale, where # cabextract can't lowercase non-ASCII characters "$cabextract" -l cabs/case-utf8.cab >$expected "$cabextract" -L -l cabs/case-utf8.cab >$actual if diff $expected $actual >/dev/null; then exit 77 fi "$cabextract" -l cabs/case-utf8.cab >$actual compare_with <<'EOF' Viewing cabinet: cabs/case-utf8.cab File size | Date Time | Name -----------+---------------------+------------- 0 | 12.03.1997 11:13:52 | latin1/upper/ÀÃÂÃÄÅÆÇÈÉÊËÌÃÃŽÃÃÑÒÓÔÕÖØÙÚÛÜÃÞ 0 | 12.03.1997 11:13:52 | latin1/lower/àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþ 0 | 12.03.1997 11:13:52 | greek/upper/ΑΒΓΔΕΖΗΘΙΚΛΜÎΞΟΠΡΣΤΥΦΧΨΩ 0 | 12.03.1997 11:13:52 | greek/lower/αβγδεζηθικλμνξοπÏςστυφχψ 0 | 12.03.1997 11:13:52 | cyrillic/upper/ÐБВГДЕЖЗИЙКЛМÐОПРСТУФХЦЧШЩЪЫЬЭЮЯ 0 | 12.03.1997 11:13:52 | cyrillic/lower/абвгдежзийклмнопрÑтуфхцчшщъыьÑÑŽÑ All done, no errors. EOF "$cabextract" -L -l cabs/case-utf8.cab >$actual compare_with <<'EOF' Viewing cabinet: cabs/case-utf8.cab File size | Date Time | Name -----------+---------------------+------------- 0 | 12.03.1997 11:13:52 | latin1/upper/àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþ 0 | 12.03.1997 11:13:52 | latin1/lower/àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþ 0 | 12.03.1997 11:13:52 | greek/upper/αβγδεζηθικλμνξοπÏστυφχψω 0 | 12.03.1997 11:13:52 | greek/lower/αβγδεζηθικλμνξοπÏςστυφχψ 0 | 12.03.1997 11:13:52 | cyrillic/upper/абвгдежзийклмнопрÑтуфхцчшщъыьÑÑŽÑ 0 | 12.03.1997 11:13:52 | cyrillic/lower/абвгдежзийклмнопрÑтуфхцчшщъыьÑÑŽÑ All done, no errors. EOF "$cabextract" -d DIR/PATH -l cabs/case-utf8.cab >$actual compare_with <<'EOF' Viewing cabinet: cabs/case-utf8.cab File size | Date Time | Name -----------+---------------------+------------- 0 | 12.03.1997 11:13:52 | DIR/PATH/latin1/upper/ÀÃÂÃÄÅÆÇÈÉÊËÌÃÃŽÃÃÑÒÓÔÕÖØÙÚÛÜÃÞ 0 | 12.03.1997 11:13:52 | DIR/PATH/latin1/lower/àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþ 0 | 12.03.1997 11:13:52 | DIR/PATH/greek/upper/ΑΒΓΔΕΖΗΘΙΚΛΜÎΞΟΠΡΣΤΥΦΧΨΩ 0 | 12.03.1997 11:13:52 | DIR/PATH/greek/lower/αβγδεζηθικλμνξοπÏςστυφχψ 0 | 12.03.1997 11:13:52 | DIR/PATH/cyrillic/upper/ÐБВГДЕЖЗИЙКЛМÐОПРСТУФХЦЧШЩЪЫЬЭЮЯ 0 | 12.03.1997 11:13:52 | DIR/PATH/cyrillic/lower/абвгдежзийклмнопрÑтуфхцчшщъыьÑÑŽÑ All done, no errors. EOF "$cabextract" -d DIR/PATH -L -l cabs/case-utf8.cab >$actual compare_with <<'EOF' Viewing cabinet: cabs/case-utf8.cab File size | Date Time | Name -----------+---------------------+------------- 0 | 12.03.1997 11:13:52 | DIR/PATH/latin1/upper/àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþ 0 | 12.03.1997 11:13:52 | DIR/PATH/latin1/lower/àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþ 0 | 12.03.1997 11:13:52 | DIR/PATH/greek/upper/αβγδεζηθικλμνξοπÏστυφχψω 0 | 12.03.1997 11:13:52 | DIR/PATH/greek/lower/αβγδεζηθικλμνξοπÏςστυφχψ 0 | 12.03.1997 11:13:52 | DIR/PATH/cyrillic/upper/абвгдежзийклмнопрÑтуфхцчшщъыьÑÑŽÑ 0 | 12.03.1997 11:13:52 | DIR/PATH/cyrillic/lower/абвгдежзийклмнопрÑтуфхцчшщъыьÑÑŽÑ All done, no errors. EOF read status < $status && test "x$status" = xsuccess cabextract-1.11/test/dirwalk-vulns.test0000775000175000017500000000423613401177732015176 00000000000000#!/bin/sh # test cabextract prevents directory path manipulation . test/testcase "$cabextract" -l cabs/dirwalk-vulns.cab >$actual compare_with <<'EOF' Viewing cabinet: cabs/dirwalk-vulns.cab File size | Date Time | Name -----------+---------------------+------------- 0 | 12.03.1997 11:13:52 | absolute/path 0 | 12.03.1997 11:13:52 | absolute/xx/xx/and/relative/path 0 | 12.03.1997 11:13:52 | absolute\path\reverse\slashes 0 | 12.03.1997 11:13:52 | absolute\xx\xx\and\relative\path\reverse\slashes 0 | 12.03.1997 11:13:52 | x 0 | 12.03.1997 11:13:52 | x 0 | 12.03.1997 11:13:52 | x 0 | 12.03.1997 11:13:52 | x 0 | 12.03.1997 11:13:52 | xx/relative/path 0 | 12.03.1997 11:13:52 | xx/xx/relative/path 0 | 12.03.1997 11:13:52 | xx/xx/xx/relative/path 0 | 12.03.1997 11:13:52 | relative/xx/path 0 | 12.03.1997 11:13:52 | relative/xx/xx/path 0 | 12.03.1997 11:13:52 | relative/xx/xx/xx/path 0 | 12.03.1997 11:13:52 | ��absolute��path2b 0 | 12.03.1997 11:13:52 | absolute/path3b 0 | 12.03.1997 11:13:52 | absolute/path4b 0 | 12.03.1997 11:13:52 | �����absolute�����path5b 0 | 12.03.1997 11:13:52 | ������absolute������path6b 0 | 12.03.1997 11:13:52 | relative��..��..��path2b 0 | 12.03.1997 11:13:52 | relative/xx/xx/path3b 0 | 12.03.1997 11:13:52 | relative/xx/xx/path4b 0 | 12.03.1997 11:13:52 | relative�����..�����..�����path5b 0 | 12.03.1997 11:13:52 | relative������..������..������path6b 0 | 12.03.1997 11:13:52 | innocuous��/xx/xx/relative/path2b 0 | 12.03.1997 11:13:52 | innocuous�/xx/xx/relative/path3b 0 | 12.03.1997 11:13:52 | innocuous�/xx/xx/relative/path4b 0 | 12.03.1997 11:13:52 | innocuous�����/xx/xx/relative/path5b 0 | 12.03.1997 11:13:52 | innocuous������/xx/xx/relative/path6b All done, no errors. EOF read status < $status && test "x$status" = xsuccess cabextract-1.11/test/encoding.test0000775000175000017500000000431713401177732014162 00000000000000#!/bin/sh # test cabextract --encoding option . test/testcase # skip test if cabextract has no --encoding option if [ `"$cabextract" -h 2>&1 | grep -c encoding` -eq 0 ]; then exit 77 fi "$cabextract" -e koi8-ru -l cabs/encoding-koi8.cab >$actual compare_with <<'EOF' Viewing cabinet: cabs/encoding-koi8.cab File size | Date Time | Name -----------+---------------------+------------- 0 | 12.03.1997 11:13:52 | ЗдравÑтвуйте, Ñто канал об аниме? 0 | 12.03.1997 11:13:52 | Да. 0 | 12.03.1997 11:13:52 | Как мне пропатчить KDE2 под FreeBSD? All done, no errors. EOF "$cabextract" -e iso-8859-1 -l cabs/encoding-latin1.cab >$actual compare_with <<'EOF' Viewing cabinet: cabs/encoding-latin1.cab File size | Date Time | Name -----------+---------------------+------------- 0 | 12.03.1997 11:13:52 |  ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ 0 | 12.03.1997 11:13:52 | ÀÃÂÃÄÅÆÇÈÉÊËÌÃÃŽÃÃÑÒÓÔÕÖרÙÚÛÜÃÞß 0 | 12.03.1997 11:13:52 | àáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ All done, no errors. EOF "$cabextract" -e sjis -l cabs/encoding-sjis.cab >$actual compare_with <<'EOF' Viewing cabinet: cabs/encoding-sjis.cab File size | Date Time | Name -----------+---------------------+------------- 0 | 12.03.1997 11:13:52 | 猿も木ã‹ã‚‰è½ã¡ã‚‹ 0 | 12.03.1997 11:13:52 | 虎穴ã«å…¥ã‚‰ãšã‚“ã°è™Žå­ã‚’å¾—ãš 0 | 12.03.1997 11:13:52 | ã“ã®çˆ¶ã«ã—ã¦ã“ã®å­ã‚り 0 | 12.03.1997 11:13:52 | 。「」、・ヲァィゥェォャュョッーアイウエオカキクケコサシスセソタï¾ï¾‚テトナニヌネノハヒフï¾ï¾Žï¾ï¾ï¾‘ï¾’ï¾“ï¾”ï¾•ï¾–ï¾—ï¾˜ï¾™ï¾šï¾›ï¾œï¾ 0 | 12.03.1997 11:13:52 | ã‚ã„ã†ãˆãŠã‹ããã‘ã“ã–ã—ã™ã›ããŸã¡ã¤ã¦ã¨ãªã«ã¬ã­ã®ã¯ã²ãµã¸ã»ã¾ã¿ã‚€ã‚もやゆよらりるれã‚ã‚ã‚’ã‚“ 0 | 12.03.1997 11:13:52 | アイウエオカキクケコサシスセソタãƒãƒ„テトナニヌãƒãƒŽãƒãƒ’フヘホマミムメモヤユヨラリルレロワヲン All done, no errors. EOF read status < $status && test "x$status" = xsuccess cabextract-1.11/test/dir.test0000775000175000017500000000261614374415236013156 00000000000000#!/bin/sh # test that cabextract creates directories as expected . test/testcase # extract to user-chosen absolute path "$cabextract" -d $tmpdir/test cabs/dir.cab >$actual compare_with <$actual compare_with <$actual compare_with <$actual compare_with <$actual compare_with <$actual compare_with <<'EOF' Viewing cabinet: cabs/search.cab File size | Date Time | Name -----------+---------------------+------------- 84 | 18.07.2018 15:30:04 | hello.cab 84 | 18.07.2018 15:30:04 | there.cab 88 | 18.07.2018 15:30:04 | general.cab 86 | 18.07.2018 15:30:04 | kenobi.cab 6 | 18.07.2018 15:30:04 | hello.txt 6 | 18.07.2018 15:30:04 | there.txt 8 | 18.07.2018 15:30:04 | general.txt 7 | 18.07.2018 15:30:04 | kenobi.txt 84 | 18.07.2018 15:30:04 | hello.cab 6 | 18.07.2018 15:30:04 | hello.txt 84 | 18.07.2018 15:30:04 | hello.cab 6 | 18.07.2018 15:30:04 | hello.txt 84 | 18.07.2018 15:30:04 | there.cab 6 | 18.07.2018 15:30:04 | there.txt 84 | 18.07.2018 15:30:04 | there.cab 6 | 18.07.2018 15:30:04 | there.txt 88 | 18.07.2018 15:30:04 | general.cab 8 | 18.07.2018 15:30:04 | general.txt 88 | 18.07.2018 15:30:04 | general.cab 8 | 18.07.2018 15:30:04 | general.txt 86 | 18.07.2018 15:30:04 | kenobi.cab 7 | 18.07.2018 15:30:04 | kenobi.txt 86 | 18.07.2018 15:30:04 | kenobi.cab 7 | 18.07.2018 15:30:04 | kenobi.txt All done, no errors. EOF "$cabextract" -t cabs/search.cab >$actual compare_with <<'EOF' Testing cabinet: cabs/search.cab hello.cab OK cabef68e0ded744846e41c05823a690c there.cab OK 82bfb679efc9d382ba315b3a2d459f0d general.cab OK 05d8826f088e942db74b03af56e6ffa9 kenobi.cab OK a83c633a08b9e6ef2343f4862ba2dabb hello.txt OK b1946ac92492d2347c6235b4d2611184 there.txt OK c4ff45bb1fab99f9164b7fec14b2292a general.txt OK 7ba5a8d2df7be8121b694c5c00d0919a kenobi.txt OK dd7f34d60a52ab6d8926eadc28b87042 hello.cab OK cabef68e0ded744846e41c05823a690c hello.txt OK b1946ac92492d2347c6235b4d2611184 hello.cab OK cabef68e0ded744846e41c05823a690c hello.txt OK b1946ac92492d2347c6235b4d2611184 there.cab OK 82bfb679efc9d382ba315b3a2d459f0d there.txt OK c4ff45bb1fab99f9164b7fec14b2292a there.cab OK 82bfb679efc9d382ba315b3a2d459f0d there.txt OK c4ff45bb1fab99f9164b7fec14b2292a general.cab OK 05d8826f088e942db74b03af56e6ffa9 general.txt OK 7ba5a8d2df7be8121b694c5c00d0919a general.cab OK 05d8826f088e942db74b03af56e6ffa9 general.txt OK 7ba5a8d2df7be8121b694c5c00d0919a kenobi.cab OK a83c633a08b9e6ef2343f4862ba2dabb kenobi.txt OK dd7f34d60a52ab6d8926eadc28b87042 kenobi.cab OK a83c633a08b9e6ef2343f4862ba2dabb kenobi.txt OK dd7f34d60a52ab6d8926eadc28b87042 All done, no errors. EOF read status < $status && test "x$status" = xsuccess cabextract-1.11/test/mixed.test0000775000175000017500000000350713453357623013510 00000000000000#!/bin/sh # test cabextract --filter and --pipe options . test/testcase "$cabextract" -p cabs/mixed.cab >$actual compare_with <<'EOF' If you can read this, the MSZIP decompressor is working! ----------------------------------------------------------------- If you can read this, the LZX decompressor is working! ----------------------------------------------------------------- If you can read this, the Quantum decompressor is working! EOF "$cabextract" -p -F 'mszip.*' cabs/mixed.cab >$actual compare_with <<'EOF' If you can read this, the MSZIP decompressor is working! EOF "$cabextract" -p -F '*zx*' cabs/mixed.cab >$actual compare_with <<'EOF' ----------------------------------------------------------------- If you can read this, the LZX decompressor is working! ----------------------------------------------------------------- EOF "$cabextract" -p -F '*m.txt' cabs/mixed.cab >$actual compare_with <<'EOF' If you can read this, the Quantum decompressor is working! EOF # test multiple -F options "$cabextract" -p -F qtm.txt -F lzx.txt -F mszip.txt cabs/mixed.cab >$actual compare_with <<'EOF' If you can read this, the MSZIP decompressor is working! ----------------------------------------------------------------- If you can read this, the LZX decompressor is working! ----------------------------------------------------------------- If you can read this, the Quantum decompressor is working! EOF "$cabextract" -p -F '???.txt' -F mszip.txt cabs/mixed.cab >$actual compare_with <<'EOF' If you can read this, the MSZIP decompressor is working! ----------------------------------------------------------------- If you can read this, the LZX decompressor is working! ----------------------------------------------------------------- If you can read this, the Quantum decompressor is working! EOF read status < $status && test "x$status" = xsuccess cabextract-1.11/test/split.test0000775000175000017500000001076313401177732013531 00000000000000#!/bin/sh # test cabextract can join up split cabinets, whichever you start with . test/testcase "$cabextract" -t cabs/split-1.cab >$actual compare_with <<'EOF' cabs/split-1.cab: extends to Split-2.CAB (Split cabinet file 2/5) cabs/split-1.cab: extends to Split-3.CAB (Split cabinet file 3/5) cabs/split-1.cab: extends to Split-4.CAB (Split cabinet file 4/5) cabs/split-1.cab: extends to Split-5.CAB (Split cabinet file 5/5) Testing cabinet: cabs/split-1.cab small1.bin OK 2ad5ba0f497f1e597ab187a2dfaa2e29 small2.bin OK 1f862f9e36a32a74202c1120b9f06af7 medium1.bin OK 0a7bd124a4c03a30329bd9ff06f71df7 medium2.bin OK b4b0a02ad6a1170d4b3db18cec616fcc small3.bin OK bbaecacfeba976165e9d77bbecb0cbde medium3.bin OK b98fe17e8afbcf05aefc5b2c4badbc28 All done, no errors. EOF "$cabextract" -t cabs/split-2.cab >$actual compare_with <<'EOF' cabs/split-2.cab: extends backwards to Split-1.CAB (Split cabinet file 1/5) cabs/split-2.cab: extends to Split-3.CAB (Split cabinet file 3/5) cabs/split-2.cab: extends to Split-4.CAB (Split cabinet file 4/5) cabs/split-2.cab: extends to Split-5.CAB (Split cabinet file 5/5) Testing cabinet: cabs/split-2.cab small1.bin OK 2ad5ba0f497f1e597ab187a2dfaa2e29 small2.bin OK 1f862f9e36a32a74202c1120b9f06af7 medium1.bin OK 0a7bd124a4c03a30329bd9ff06f71df7 medium2.bin OK b4b0a02ad6a1170d4b3db18cec616fcc small3.bin OK bbaecacfeba976165e9d77bbecb0cbde medium3.bin OK b98fe17e8afbcf05aefc5b2c4badbc28 All done, no errors. EOF "$cabextract" -t cabs/split-3.cab >$actual compare_with <<'EOF' cabs/split-3.cab: extends backwards to Split-2.CAB (Split cabinet file 2/5) cabs/split-3.cab: extends backwards to Split-1.CAB (Split cabinet file 1/5) cabs/split-3.cab: extends to Split-4.CAB (Split cabinet file 4/5) cabs/split-3.cab: extends to Split-5.CAB (Split cabinet file 5/5) Testing cabinet: cabs/split-3.cab small1.bin OK 2ad5ba0f497f1e597ab187a2dfaa2e29 small2.bin OK 1f862f9e36a32a74202c1120b9f06af7 medium1.bin OK 0a7bd124a4c03a30329bd9ff06f71df7 medium2.bin OK b4b0a02ad6a1170d4b3db18cec616fcc small3.bin OK bbaecacfeba976165e9d77bbecb0cbde medium3.bin OK b98fe17e8afbcf05aefc5b2c4badbc28 All done, no errors. EOF "$cabextract" -t cabs/split-4.cab >$actual compare_with <<'EOF' cabs/split-4.cab: extends backwards to Split-3.CAB (Split cabinet file 3/5) cabs/split-4.cab: extends backwards to Split-2.CAB (Split cabinet file 2/5) cabs/split-4.cab: extends backwards to Split-1.CAB (Split cabinet file 1/5) cabs/split-4.cab: extends to Split-5.CAB (Split cabinet file 5/5) Testing cabinet: cabs/split-4.cab small1.bin OK 2ad5ba0f497f1e597ab187a2dfaa2e29 small2.bin OK 1f862f9e36a32a74202c1120b9f06af7 medium1.bin OK 0a7bd124a4c03a30329bd9ff06f71df7 medium2.bin OK b4b0a02ad6a1170d4b3db18cec616fcc small3.bin OK bbaecacfeba976165e9d77bbecb0cbde medium3.bin OK b98fe17e8afbcf05aefc5b2c4badbc28 All done, no errors. EOF "$cabextract" -t cabs/split-5.cab >$actual compare_with <<'EOF' cabs/split-5.cab: extends backwards to Split-4.CAB (Split cabinet file 4/5) cabs/split-5.cab: extends backwards to Split-3.CAB (Split cabinet file 3/5) cabs/split-5.cab: extends backwards to Split-2.CAB (Split cabinet file 2/5) cabs/split-5.cab: extends backwards to Split-1.CAB (Split cabinet file 1/5) Testing cabinet: cabs/split-5.cab small1.bin OK 2ad5ba0f497f1e597ab187a2dfaa2e29 small2.bin OK 1f862f9e36a32a74202c1120b9f06af7 medium1.bin OK 0a7bd124a4c03a30329bd9ff06f71df7 medium2.bin OK b4b0a02ad6a1170d4b3db18cec616fcc small3.bin OK bbaecacfeba976165e9d77bbecb0cbde medium3.bin OK b98fe17e8afbcf05aefc5b2c4badbc28 All done, no errors. EOF read status < $status && test "x$status" = xsuccess cabextract-1.11/test/case-ascii.test0000775000175000017500000000320413401177732014367 00000000000000#!/bin/sh # test cabextract --lowercase and --directory options . test/testcase "$cabextract" -l cabs/case-ascii.cab >$actual compare_with <<'EOF' Viewing cabinet: cabs/case-ascii.cab File size | Date Time | Name -----------+---------------------+------------- 0 | 12.03.1997 11:13:52 | ascii/upper/ABCDEFGHIJKLMNOPQRSTUVWXYZ 0 | 12.03.1997 11:13:52 | ascii/lower/abcdefghijklmnopqrstuvwxyz All done, no errors. EOF "$cabextract" -L -l cabs/case-ascii.cab >$actual compare_with <<'EOF' Viewing cabinet: cabs/case-ascii.cab File size | Date Time | Name -----------+---------------------+------------- 0 | 12.03.1997 11:13:52 | ascii/upper/abcdefghijklmnopqrstuvwxyz 0 | 12.03.1997 11:13:52 | ascii/lower/abcdefghijklmnopqrstuvwxyz All done, no errors. EOF "$cabextract" -d DIR/PATH -l cabs/case-ascii.cab >$actual compare_with <<'EOF' Viewing cabinet: cabs/case-ascii.cab File size | Date Time | Name -----------+---------------------+------------- 0 | 12.03.1997 11:13:52 | DIR/PATH/ascii/upper/ABCDEFGHIJKLMNOPQRSTUVWXYZ 0 | 12.03.1997 11:13:52 | DIR/PATH/ascii/lower/abcdefghijklmnopqrstuvwxyz All done, no errors. EOF "$cabextract" -d DIR/PATH -L -l cabs/case-ascii.cab >$actual compare_with <<'EOF' Viewing cabinet: cabs/case-ascii.cab File size | Date Time | Name -----------+---------------------+------------- 0 | 12.03.1997 11:13:52 | DIR/PATH/ascii/upper/abcdefghijklmnopqrstuvwxyz 0 | 12.03.1997 11:13:52 | DIR/PATH/ascii/lower/abcdefghijklmnopqrstuvwxyz All done, no errors. EOF read status < $status && test "x$status" = xsuccess cabextract-1.11/test/bugs/0000755000175000017500000000000013367365525012513 500000000000000cabextract-1.11/test/bugs/filename-read-violation-3.cab0000644000175000017500000000012413323707071017716 00000000000000MSCFP,Ò€ÒFÿÿÿîpE•¬ hello.hello cabextract-1.11/test/bugs/lzx-premature-matches.cab0000644000175000017500000000017513323707071017332 00000000000000MSCF},ÒEl"ºY file.txt0 ÿÿÿÿÿ°ÿÿü@ÿCÿÿðcabextract-1.11/test/bugs/qtm-max-size-block.cab0000644000175000017500000011411613362372512016517 00000000000000MSCFN˜,Fr€l"ºY test1.bin˜€cabextract-1.11/test/bugs/cve-2015-4471-lzx-under-read.cab0000644000175000017500000000023013323707071017457 00000000000000MSCFÜ (uŠVreserved header test 12345~“’’’’’’’’’l"ºY test1.txtl"ºY test2.txtT5ST test cabextract-1.11/test/bugs/cve-2014-9556-qtm-infinite-loop.cab0000644000175000017500000000041413323707071020205 00000000000000MSCF ,ÒE ¿ÿÿÿÿgEÜ2 limerickó½L¿¿There was a young man from Japan Whose limericks never would scan. When asked why that was, He replied "It's because I always try to cram as many words into the last line as I possibly can." cabextract-1.11/test/bugs/filename-read-violation-4.cab0000644000175000017500000000012413323707071017717 00000000000000MSCFàP,ç€Ò€ÿÿÿüãEello cabextract-1.11/test/bugs/README0000644000175000017500000000040313323707071013274 00000000000000These cabinet files cause old versions of cabextract to crash, loop forever, or read outwith allocated memory. The current version of cabextract should no longer do that, however it will reject or fail to unpack most of these files because they are invalid. cabextract-1.11/test/bugs/cve-2010-2800-mszip-infinite-loop.cab0000644000175000017500000000012513323707071020522 00000000000000MSCFU,ÒEl"ºY file.txtCK€ïÿcabextract-1.11/test/bugs/lzx-main-tree-no-lengths.cab0000644000175000017500000000013513323707071017635 00000000000000MSCF],ÒEl"ºY file.txtcabextract-1.11/test/bugs/cve-2014-9732-folders-segfault.cab0000644000175000017500000000016413323707071020076 00000000000000MSCFt4Òjjl"ºY 1l"ºY 2l"ºY 3cabextract-1.11/test/bugs/cve-2010-2801-qtm-flush.cab0000644000175000017500000000043513323707071016533 00000000000000MSCF,˜C"ÿòLt zeroes!s“€ÿmÚ4b›©’Ò€ o5€€i3c€€bc`˜ˆ€€]ˆÀìT€iT€¦–€€c–Àï(€j(€áð€dð€î€k€QF€€”FÀü0ƒ€ù0Ì‹€€€ù‹€0vH€óH€Íကøá0—ú€€òú`úÎÀcabextract-1.11/test/bugs/filename-read-violation-1.cab0000644000175000017500000000012413323707071017714 00000000000000MSCFT,ÒFpE•¬ ello.txtd jlhello cabextract-1.11/test/bugs/filename-read-violation-2.cab0000644000175000017500000000011613323707071017716 00000000000000MSCFT,ÚÚFÿp€ÿ¬ hello.jlóhel cabextract-1.11/test/bugs/cve-2015-4470-mszip-over-read.cab0000644000175000017500000000032413323707071017645 00000000000000MSCFÜ,E¿ŒEol limerick‡¿CKê@ºC‚˜¡F¢¾8¶bŸ#ŸƒåßsnwG3¯À•ÑIAå”/2 >µd<é qïP”‘bæý®þqE/gÚ žän HwÞÐÃ@ Ô¦ðæŒÊGŠv\–vU¬ìéTv (uŠV/ð•²fz˜ºnŠ(¶·`eÒfyá ,8Šj\ÓÀL_Ücabextract-1.11/test/utf8-stresstest.test0000775000175000017500000001031113401177732015472 00000000000000#!/bin/sh # test cabextract handles bad UTF-8 filenames . test/testcase "$cabextract" -l cabs/utf8-stresstest.cab >$actual compare_with <<'EOF' Viewing cabinet: cabs/utf8-stresstest.cab File size | Date Time | Name -----------+---------------------+------------- 0 | 12.03.1997 11:13:52 | κόσμε 0 | 12.03.1997 11:13:52 | € 0 | 12.03.1997 11:13:52 | à € 0 | 12.03.1997 11:13:52 | ð€€ 0 | 12.03.1997 11:13:52 | ����� 0 | 12.03.1997 11:13:52 | ������ 0 | 12.03.1997 11:13:52 |  0 | 12.03.1997 11:13:52 | ß¿ 0 | 12.03.1997 11:13:52 | � 0 | 12.03.1997 11:13:52 | ���� 0 | 12.03.1997 11:13:52 | ����� 0 | 12.03.1997 11:13:52 | ������ 0 | 12.03.1997 11:13:52 | ퟿ 0 | 12.03.1997 11:13:52 |  0 | 12.03.1997 11:13:52 | � 0 | 12.03.1997 11:13:52 | ô¿¿ 0 | 12.03.1997 11:13:52 | � 0 | 12.03.1997 11:13:52 | � 0 | 12.03.1997 11:13:52 | � 0 | 12.03.1997 11:13:52 | �� 0 | 12.03.1997 11:13:52 | ��� 0 | 12.03.1997 11:13:52 | ���� 0 | 12.03.1997 11:13:52 | ����� 0 | 12.03.1997 11:13:52 | ������ 0 | 12.03.1997 11:13:52 | ������� 0 | 12.03.1997 11:13:52 | ������������������������������������������������ 0 | 12.03.1997 11:13:52 | � � � � � � � � � � � � � � � � 0 | 12.03.1997 11:13:52 | � � � � � � � � � � � � � � � � 0 | 12.03.1997 11:13:52 | � � � � � � � � 0 | 12.03.1997 11:13:52 | � � � � 0 | 12.03.1997 11:13:52 | � � 0 | 12.03.1997 11:13:52 | � 0 | 12.03.1997 11:13:52 | �� 0 | 12.03.1997 11:13:52 | ��� 0 | 12.03.1997 11:13:52 | ���� 0 | 12.03.1997 11:13:52 | ����� 0 | 12.03.1997 11:13:52 | � 0 | 12.03.1997 11:13:52 | �� 0 | 12.03.1997 11:13:52 | ��� 0 | 12.03.1997 11:13:52 | ���� 0 | 12.03.1997 11:13:52 | ����� 0 | 12.03.1997 11:13:52 | ������������������������������ 0 | 12.03.1997 11:13:52 | � 0 | 12.03.1997 11:13:52 | � 0 | 12.03.1997 11:13:52 | ���� 0 | 12.03.1997 11:13:52 | �� 0 | 12.03.1997 11:13:52 | x 0 | 12.03.1997 11:13:52 | x 0 | 12.03.1997 11:13:52 | ����� 0 | 12.03.1997 11:13:52 | ������ 0 | 12.03.1997 11:13:52 | �� 0 | 12.03.1997 11:13:52 | ß¿ 0 | 12.03.1997 11:13:52 | � 0 | 12.03.1997 11:13:52 | ����� 0 | 12.03.1997 11:13:52 | ������ 0 | 12.03.1997 11:13:52 | �� 0 | 12.03.1997 11:13:52 | � 0 | 12.03.1997 11:13:52 | � 0 | 12.03.1997 11:13:52 | ����� 0 | 12.03.1997 11:13:52 | ������ 0 | 12.03.1997 11:13:52 | � 0 | 12.03.1997 11:13:52 | � 0 | 12.03.1997 11:13:52 | � 0 | 12.03.1997 11:13:52 | � 0 | 12.03.1997 11:13:52 | � 0 | 12.03.1997 11:13:52 | � 0 | 12.03.1997 11:13:52 | � 0 | 12.03.1997 11:13:52 | �� 0 | 12.03.1997 11:13:52 | �� 0 | 12.03.1997 11:13:52 | �� 0 | 12.03.1997 11:13:52 | �� 0 | 12.03.1997 11:13:52 | �� 0 | 12.03.1997 11:13:52 | �� 0 | 12.03.1997 11:13:52 | �� 0 | 12.03.1997 11:13:52 | �� 0 | 12.03.1997 11:13:52 | � 0 | 12.03.1997 11:13:52 | � 0 | 12.03.1997 11:13:52 | ï·ï·‘﷒﷓﷔﷕﷖﷗﷘﷙﷚﷛﷜ï·ï·žï·Ÿï· ï·¡ï·¢ï·£ï·¤ï·¥ï·¦ï·§ï·¨ï·©ï·ªï·«ï·¬ï·­ï·®ï·¯"| 0 | 12.03.1997 11:13:52 | 🿾🿿𯿾𯿿𿿾𿿿ñ¿¾ñ¿¿ñŸ¿¾ñŸ¿¿ñ¯¿¾ñ¯¿¿ñ¿¿¾ñ¿¿¿ò¿¾ò¿¿ All done, no errors. EOF read status < $status && test "x$status" = xsuccess cabextract-1.11/test/testcase.in0000664000175000017500000000057114374526705013641 00000000000000cabextract="@abs_top_builddir@/cabextract@EXEEXT@" cd "@abs_srcdir@" tmpdir=`mktemp -d` status=$tmpdir/status expected=$status.expected actual=$status.actual echo success >$status || exit 1 trap cleanup 0 1 2 cleanup() { rm -rf $tmpdir } compare_with() { cat >$expected if diff -u $expected $actual; then : else echo failed >$status fi } cabextract-1.11/configure.ac0000664000175000017500000000306714376120743013002 00000000000000# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) AC_INIT([cabextract],[1.11],[kyzer@cabextract.org.uk]) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([src/cabextract.c]) AC_CONFIG_HEADERS([config.h]) # Checks for programs. AC_PROG_CC AM_PROG_AR AC_PROG_INSTALL AC_PROG_RANLIB # Checks for header files. AC_CHECK_HEADERS([getopt.h inttypes.h strings.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_C_INLINE AC_C_BIGENDIAN AC_TYPE_MODE_T AC_TYPE_OFF_T AC_TYPE_SIZE_T AC_SYS_LARGEFILE AC_CHECK_SIZEOF([off_t]) # Checks for library functions. AC_FUNC_FNMATCH AC_FUNC_FSEEKO AX_FUNC_MKDIR AC_CHECK_FUNCS([towlower umask utime utimes]) AC_CHECK_FUNCS([getopt_long],,[AC_CHECK_LIB([gnugetopt], [getopt_long], [AC_DEFINE([HAVE_GETOPT_LONG])],[AC_LIBOBJ(getopt) AC_LIBOBJ(getopt1)])]) AC_REPLACE_FNMATCH AM_ICONV # use an external libmspack if requested cabextract_external_libmspack=no AC_ARG_WITH([external-libmspack], [AS_HELP_STRING([--with-external-libmspack],[use external libmspack (default no)])], [cabextract_external_libmspack=$withval]) if test "z$cabextract_external_libmspack" != 'zno'; then PKG_CHECK_MODULES([libmspack], [libmspack >= 0.8alpha]) AC_CHECK_HEADER([mspack.h], ,[AC_MSG_ERROR([Cannot find libmspack header])]) AC_CHECK_LIB([mspack],[mspack_create_cab_decompressor], , [AC_MSG_ERROR([Cannot find libmspack library])]) fi AM_CONDITIONAL([EXTERNAL_LIBMSPACK], [test "z$cabextract_external_libmspack" != 'zno']) AC_CONFIG_FILES([Makefile cabextract.spec test/testcase]) AC_OUTPUT cabextract-1.11/acinclude.m40000644000175000017500000000725513364627464012716 00000000000000# =========================================================================== # https://www.gnu.org/software/autoconf-archive/ax_func_mkdir.html # =========================================================================== # # SYNOPSIS # # AX_FUNC_MKDIR # # DESCRIPTION # # Check whether mkdir() is mkdir or _mkdir, and whether it takes one or # two arguments. # # This macro can define HAVE_MKDIR, HAVE__MKDIR, and MKDIR_TAKES_ONE_ARG, # which are expected to be used as follows: # # #if HAVE_MKDIR # # if MKDIR_TAKES_ONE_ARG # /* MinGW32 */ # # define mkdir(a, b) mkdir(a) # # endif # #else # # if HAVE__MKDIR # /* plain Windows 32 */ # # define mkdir(a, b) _mkdir(a) # # else # # error "Don't know how to create a directory on this system." # # endif # #endif # # LICENSE # # Copyright (c) 2008 Alexandre Duret-Lutz # # 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 2 of the License, or (at your # option) any later version. # # 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 . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. #serial 6 AU_ALIAS([AC_FUNC_MKDIR], [AX_FUNC_MKDIR]) AC_DEFUN([AX_FUNC_MKDIR], [AC_CHECK_FUNCS([mkdir _mkdir]) AC_CACHE_CHECK([whether mkdir takes one argument], [ac_cv_mkdir_takes_one_arg], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #if HAVE_UNISTD_H # include #endif ]], [[mkdir (".");]])], [ac_cv_mkdir_takes_one_arg=yes], [ac_cv_mkdir_takes_one_arg=no])]) if test x"$ac_cv_mkdir_takes_one_arg" = xyes; then AC_DEFINE([MKDIR_TAKES_ONE_ARG], 1, [Define if mkdir takes only one argument.]) fi ]) dnl Note: dnl ===== dnl I have not implemented the following suggestion because I don't have dnl access to such a broken environment to test the macro. So I'm just dnl appending the comments here in case you have, and want to fix dnl AX_FUNC_MKDIR that way. dnl dnl |Thomas E. Dickey (dickey@herndon4.his.com) said: dnl | it doesn't cover the problem areas (compilers that mistreat mkdir dnl | may prototype it in dir.h and dirent.h, for instance). dnl | dnl |Alexandre: dnl | Would it be sufficient to check for these headers and #include dnl | them in the AC_COMPILE_IFELSE block? (and is AC_HEADER_DIRENT dnl | suitable for this?) dnl | dnl |Thomas: dnl | I think that might be a good starting point (with the set of recommended dnl | ifdef's and includes for AC_HEADER_DIRENT, of course). cabextract-1.11/config.sub0000755000175000017500000010511614376123607012475 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2022 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale timestamp='2022-01-03' # 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 # (at your option) any later version. # # 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 . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # 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 # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # 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="\ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2022 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." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; *local*) # First pass through any local machine types. echo "$1" exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Split fields of configuration type # shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read field1 field2 field3 field4 <&2 exit 1 ;; *-*-*-*) basic_machine=$field1-$field2 basic_os=$field3-$field4 ;; *-*-*) # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two # parts maybe_os=$field2-$field3 case $maybe_os in nto-qnx* | linux-* | uclinux-uclibc* \ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ | storm-chaos* | os2-emx* | rtmk-nova*) 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 ;; *-*) # A lone config we happen to match not fitting any pattern case $field1-$field2 in decstation-3100) basic_machine=mips-dec basic_os= ;; *-*) # Second component is usually, but not always the OS case $field2 in # Prevent following clause from handling this valid os sun*os*) basic_machine=$field1 basic_os=$field2 ;; zephyr*) basic_machine=$field1-unknown basic_os=$field2 ;; # Manufacturers dec* | mips* | sequent* | encore* | pc533* | 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* | sim | cisco \ | oki | wec | wrs | winbond) basic_machine=$field1-$field2 basic_os= ;; *) basic_machine=$field1 basic_os=$field2 ;; esac ;; esac ;; *) # 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 ;; convex-c1) basic_machine=c1-convex basic_os=bsd ;; convex-c2) basic_machine=c2-convex basic_os=bsd ;; convex-c32) basic_machine=c32-convex basic_os=bsd ;; convex-c34) basic_machine=c34-convex basic_os=bsd ;; convex-c38) basic_machine=c38-convex basic_os=bsd ;; 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 ;; esac # Decode 1-component or ad-hoc basic machines 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 ;; op50n) cpu=hppa1.1 vendor=oki ;; op60c) cpu=hppa1.1 vendor=oki ;; 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 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) cpu=m68k vendor=motorola ;; dpx2*) cpu=m68k vendor=bull basic_os=sysv3 ;; 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 case $basic_os in openstep*) ;; nextstep*) ;; ns2*) basic_os=nextstep2 ;; *) basic_os=nextstep3 ;; esac ;; 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 ;; leon|leon[3-9]) cpu=sparc vendor=$basic_machine ;; leon-*|leon[3-9]-*) cpu=sparc vendor=`echo "$basic_machine" | sed 's/-.*//'` ;; *-*) # shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read cpu vendor <&2 exit 1 ;; esac ;; esac # Here we canonicalize certain aliases for manufacturers. case $vendor in digital*) vendor=dec ;; commodore*) vendor=cbm ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if test x$basic_os != x then # First recognize some ad-hoc cases, or perhaps split kernel-os, or else just # set os. 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|'` ;; *-*) # shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read kernel os <&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 in linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \ | linux-musl* | linux-relibc* | linux-uclibc* ) ;; uclinux-uclibc* ) ;; -dietlibc* | -newlib* | -musl* | -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 ;; kfreebsd*-gnu* | kopensolaris*-gnu*) ;; vxworks-simlinux | vxworks-simwindows | vxworks-spe) ;; nto-qnx*) ;; os2-emx) ;; *-eabi* | *-gnueabi*) ;; -*) # Blank kernel with real OS 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=acorn ;; *-sunos*) vendor=sun ;; *-cnk* | *-aix*) vendor=ibm ;; *-beos*) vendor=be ;; *-hpux*) vendor=hp ;; *-mpeix*) vendor=hp ;; *-hiux*) vendor=hitachi ;; *-unos*) vendor=crds ;; *-dgux*) vendor=dg ;; *-luna*) vendor=omron ;; *-genix*) vendor=ns ;; *-clix*) vendor=intergraph ;; *-mvs* | *-opened*) vendor=ibm ;; *-os400*) vendor=ibm ;; s390-* | s390x-*) vendor=ibm ;; *-ptx*) vendor=sequent ;; *-tpf*) vendor=ibm ;; *-vxsim* | *-vxworks* | *-windiss*) vendor=wrs ;; *-aux*) vendor=apple ;; *-hms*) vendor=hitachi ;; *-mpw* | *-macos*) vendor=apple ;; *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) vendor=atari ;; *-vos*) vendor=stratus ;; esac ;; esac echo "$cpu-$vendor-${kernel:+$kernel-}$os" exit # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: cabextract-1.11/install-sh0000755000175000017500000003577614376123607012534 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2020-11-14.01; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # 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 # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} 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= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve 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. Email bug reports to bug-automake@gnu.org. Automake home page: https://www.gnu.org/software/automake/ " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -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 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src 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 # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dstbase=`basename "$src"` case $dst in */) dst=$dst$dstbase;; *) dst=$dst/$dstbase;; esac dstdir_status=0 else dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi fi case $dstdir in */) dstdirslash=$dstdir;; *) dstdirslash=$dstdir/;; esac obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= 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-$$ 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-writeable /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 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 if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # 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. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (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 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=${dstdirslash}_inst.$$_ rmtmp=${dstdirslash}_rm.$$_ # Trap to clean up those temp files at exit. 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") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 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 || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: cabextract-1.11/doc/0000775000175000017500000000000014376123646011340 500000000000000cabextract-1.11/doc/wince_cab_format.html0000644000175000017500000005630213323412475015424 00000000000000 Windows CE installation cabinet (.CAB) file format

Windows CE installation cabinet (.CAB) file format

Table of Contents

About the format

The Windows CE installation cabinet format was designed by Microsoft make it easy to create packaged software for the Windows CE platform. After generating all his executable programs, data files, help files and so on, a developer can then write an "installation script" which lists the name of the software package, where each file should be installed on the target device's filesystem, registry entries to make on the target system's Windows Registry, and so on. A tool called "CabWiz" takes the installation script and produces a single CAB file with a special control file stored in it. On the target Windows CE device, a program called WCELOAD.EXE will read cabinet files, install them, register them as installed packages, set their registry entries, and so on.

The Cabinet format was previously developed by Microsoft for creating a simple archive format for packaged software, from entire operating systems down to ActiveX Web plugins. They also intended to displace Sun's JAR format for packaging Java software, but this did not succeed.

Overall cabinet file format

Firstly, the overall file format of a Windows CE installation cabinet is the standard Microsoft Cabinet file format. This was originally documented in the Microsoft document CABFMT.DOC as part of the Microsoft Cabinet SDK (CAB-SDK.EXE), it is now documented in the Windows Installer documentation. The format can also be gleaned from open source tools and libraries such as cabextract and libmspack. Windows CE installation cabinets typically use no compression (the NONE compression method in the cabinet specification), sometimes MSZIP compression.

Cabinet file contents

The filenames of the files in the cabinet use the MS-DOS "8.3" convention, where the first eight characters in the filename come from the "true filename", and are followed by a period and three numeric digits. The digits form a decimal number from 000 to 999. The name part before the period is currently always 8 characters (shorter names are padded on the left with "0"), but this shouldn't be relied upon. Only the numeric extension should be used to identify the file. There should not be more than one file in the cabinet with the same numeric extension. As an example:

Name in cab fileOriginal filename
BLKJAC~4.000--- (installation data)
BLACKJ~1.999Blackjack Setup.dll
SELFRE~1.006SelfRegister.dll
0Blkjack.005Blkjack.exe
00Sample.004Sample.BJL
WINGAM~1.003Win Game.wav
LOSEGA~1.002Lose Game.wav
BLACKJ~1.001Blackjack Help.htp

The order of these files within the cab file is important. The first file in the cabinet should be the ".000" file. It should then be followed by all other files in descending numerical order of their extensions.

These original filenames are not recoverable, they are not stored anywhere. The only names available are the target filenames given in the FILES section of the .000 file.

All installation data is contained in the .000 file. If a .999 file exists, it is an "application specific Setup.DLL"; a Microsoft standard Dynamic Link Library that will be loaded and executed after installation by the installation program. All other files are files for installation on the Windows CE device, and the three digits should be resolved into an integer "file number".

Format of the .000 file

All multi-byte integers are little-endian. Values given in this document are in decimal, unless otherwise specified. The overall file format of the .000 file is as follows:

Only the fixed size header has a fixed file offset, all other strings and sections may be at any file offset, in any order. They are typically in the order given above. Each file offset is given in the fixed size header.

The fixed size header

The .000 file begins at file offset 0 with a fixed size header of exactly 100 bytes. The format of this header is as follows:

OffsetSize in bytesDescription
04An ASCII signature, "MSCE". This is 0x4543534D as a little-endian integer.
44Unknown purpose, usually 0.
84The overall length of this .000 header file, in bytes.
124Unknown purpose, usually 0.
164Unknown purpose, usually 1.
204Target architecture for this cabinet: see Appendix A.
244Minimal version of WinCE (major version number) required to install this cabinet, or 0 to indicate no restriction.
284Minimal version of WinCE (minor version number) required to install this cabinet, or 0 to indicate no restriction.
324Maximal version of WinCE (major version number) required to install this cabinet, or 0 to indicate no restriction.
364Maximal version of WinCE (minor version number) required to install this cabinet, or 0 to indicate no restriction.
404Minmal version of WinCE (build number) required to install this cabinet, or 0 to indicate no restriction.
444Maximal version of WinCE (build number) required to install this cabinet, or 0 to indicate no restriction.
482The number of entries in the STRINGS section.
502The number of entries in the DIRS section.
522The number of entries in the FILES section.
542The number of entries in the REGHIVES section.
562The number of entries in the REGKEYS section.
582The number of entries in the LINKS section.
604The file offset of the STRINGS section in bytes.
644The file offset of the DIRS section in bytes.
684The file offset of the FILES section in bytes.
724The file offset of the REGHIVES section in bytes.
764The file offset of the REGKEYS section in bytes.
804The file offset of the LINKS section, in bytes.
842The file offset of the APPNAME string in bytes.
862The length of the APPNAME string in bytes, including null terminating byte.
882The file offset of the PROVIDER string in bytes.
902The length of the PROVIDER string in bytes, including null terminating byte.
922The file offset of the UNSUPPORTED multi string in bytes.
942The length of the UNSUPPORTED multi string in bytes, including null terminating byte.
962Unknown purpose, usually 0.
982Unknown purpose, usually 0.

The APPNAME string

This is a null-terminated ASCII string that gives the name of the packaged application.

The PROVIDER string

This is a null-terminated ASCII string that gives the name of the author or publisher of the packaged application.

The UNSUPPORTED multi string

If this string has more than zero bytes length according to the fixed size header, then this is a sequence of consecutive null terminated ASCII strings. The sequence always terminates with an empty string. Each string is the ASCII name of a Windows CE platform where this software is not supported and will not run. Platforms seen in this sequence include "PALM PC", "HPC", "JORDAN", "PALM PC2" and "POCKETPC".

The STRINGS section

The STRINGS section is a number of common ASCII strings that may be used in the installation data. In other sections, strings from the STRINGS section are referred to by their string ID. The total number of entries in this section is given in the fixed size header. There is no padding between string entries. The format of each STRING entry is as follows:

  • 2 bytes: An integer string ID.
  • 2 bytes: The length of the string, including the null terminator byte.
  • X bytes: the string itself, for the length given above.

As an example, the hexadecimal byte stream 04 00 09 00 53 6F 66 74 77 61 72 65 00 decodes to "ID=4 (04 00), length=9 (09 00), string=Software". The hexadecimal byte stream 05 00 0A 00 4D 69 63 72 6F 73 6F 66 74 00 decodes to "ID=5 (05 00), length=10 (0A 00), string=Microsoft".

The DIRS section

The DIRS section is a list of directory paths used in the installation. In other sections, paths from the DIRS section are referred to by their directory ID. The total number of entries in this section is given in the fixed size header. There is no padding between directory entries. The format of each directory entry is as follows:

  • 2 bytes: An integer directory ID.
  • 2 bytes: The length of the following directory specification, in bytes.
  • X bytes: A directory specification. This is simply an array of 16-bit (2 byte) numbers, where each number is a string ID. The final number is always 0, which terminates the list.

For example, the hexidecimal byte stream 01 00 0A 00 01 00 02 00 03 00 04 00 00 translates "dir ID=1 (01 00), length=10 (0A 00), specification={1, 2, 3, 4}". Assuming string ID 1 is "foo", string ID 2 is "bar", string ID 3 is "baz" and string ID 4 is "quux", the specification translates from {1, 2, 3, 4} to "foo\bar\baz\quux".

The directory specification may begin with a path member of the form "%CEn%", where n is a decimal integer from 1 to 17. This is an abbreviation for one of the CE standard directories, as listed in Appendix B.

The FILES section

The FILES section is a list of files to be installed on the target device. All files in the list should be installed. In other sections, files from the FILES section are referred to by their file ID. The total number of entries in this section is given in the fixed size header. There is no padding between file entries. The format of each file entry is as follows:

  • 2 bytes: An integer file ID. The file for installation is the file in the cabinet which has this integer as a three digit file extension.
  • 2 bytes: The directory ID for where this file should be installed.
  • 2 bytes: Unknown purpose, usually the same as the file ID.
  • 4 bytes: File flags. A 32-bit integer. The following bits are known:
    FlagDescription
    Bit 31 (0x80000000) If bit is set, this file is a reference-counting shared file. It is not deleted at uninstall time unless its reference count is 0.
    Bit 30 (0x40000000)If bit is set, ignore file date (stored in the cabinet file) and always overwrite target (on CE device). Mutually exclusive with bit 29.
    Bit 29 (0x20000000)If bit is set, do not overwrite target if target is newer. Mutually exclusive with bit 30.
    Bit 28 (0x10000000)If bit is set, self-register this DLL.
    Bit 10 (0x00000400)If bit is set, do not copy this file to the target unless the target already exists. Mutually exclusive with bit 4.
    Bit 4 (0x00000010)If bit is set, do not overwrite target if it already exists. Mutually exclusive with bit 10.
    Bit 1 (0x00000002)If bit is set, do not skip this file.
    Bit 0 (0x00000001)If bit is set, warn the user if this file is skipped.
    All other bits are unknown.
  • 2 bytes: the length of the installed file's filename, including the null terminator.
  • X bytes: the installed file's filename, with the length given above. A null terminated ASCII string.

The REGHIVES section

The REGHIVES section is a list of hives in the Windows Registry. These hives are then used in the REGKEYS section for actual registry entries. In other sections, hives from the REGHIVES section are referred to by their hive ID. The total number of entries in this section is given in the fixed size header. There is no padding between hive entries. The format of each hive entry is as follows:

  • 2 bytes: An integer hive ID.
  • 2 bytes: The hive root, an integer from 1 to 4:
    1. HKCR: HKEY_CLASSES_ROOT
    2. HKCU: HKEY_CURRENT_USER
    3. HKLM: HKEY_LOCAL_MACHINE
    4. HKU: HKEY_USERS
  • 2 bytes: Unknown purpose, usually 0.
  • 2 bytes: Length of the registry hive specification to follow, in bytes.
  • X bytes: A registry hive specification. This is simply an array of 16-bit (2 byte) numbers, where each number is a string ID. The final number is always 0, which terminates the list.

The REGKEYS section

The REGKEYS is a list of registry entries -- key / data pairs -- to be added to the Windows Registry upon installation. All entries in the list should be added. The total number of entries in this section is given in the fixed size header. There is no padding between entries. The format of each entry is as follows:

  • 2 bytes: An integer key ID.
  • 2 bytes: The hive ID of the hive to store this entry in.
  • 2 bytes: A Boolean value, either 1 if variable substitution should be performed or 0 if not. The entry data should have substrings such as %InstallDir% or one the %CEn% values.
  • 4 bytes: The type of entry data, and flags.
    FlagDescription
    Bit 16 set, bit 0 set (0x00010001)This key is of type TYPE_DWORD, a 32-bit integer.
    Bit 16 clear, bit 0 clear (0x00000000)This key is of type TYPE_SZ, a null terminated ASCII string.
    Bit 16 set, bit 0 clear (0x00010000)This key is of type TYPE_MULTI_SZ, a list of null terminated ASCII strings.
    Bit 16 clear, bit 0 set (0x00000001)This key is of type TYPE_BINARY, raw binary data in no particular format.
    Bit 1 (0x00000002)This is the only known flag, NOCLOBBER. If this bit is set, the registry entry should not be overwritten if it already exists in the registry.
    All other bits are undefined.
  • 2 bytes: The length of entry data to follow, in bytes.
  • X bytes: Registry entry data. This begins with a null terminated ASCII string, giving the name of the registry key. If the empty string is used here, this is the default key for the given hive. Immediately following the null byte of the string is the data for the registry entry, whose format depends on the entry type given in the flags:
    • TYPE_DWORD: four bytes, giving a single 32-bit integer.
    • TYPE_SZ: a single null terminated ASCII string.
    • TYPE_MULTI_SZ: a sequence of consecutive null terminated ASCII strings. The sequence always terminates with an empty string.
    • TYPE_BINARY: no specific format, just raw data.

The LINKS section

The LINKS section is a list of symbolic links to be made in the standard installation directories, to link to installed directories or files. The total number of links in this section is given in the fixed size header. There is no padding between links. Each link has the following format:

  • 2 bytes: An integer link ID.
  • 2 bytes: Unknown purpose.
  • 2 bytes: The base directory where the link will be stored, either 0 to indicate "%InstallDir%", the default directory where the application is installed, or a number from 1 to 17 to indicate "%CEn%", one of the standard installation directories as defined in Appendix B. The link specification, given below, should be added to this base directory, to get the full name of the link.
  • 2 bytes: Integer ID of the file or directory that the link should point to. It is either a file ID, or a directory ID, depending on the link type. If it is a directory ID, the ID 0 can be used to refer to %InstallDir%.
  • 2 bytes: The link type. This is 0 if the link target is a directory, or 1 if the link target is a file.
  • 2 bytes: The length of the link specification in bytes.
  • X bytes: The link specification. This is simply an array of 16-bit (2 byte) numbers, where each number is a string ID. The final number is always 0, which terminates the list.

Appendix A: a list of processor architectures

ValueDescription
0No specific architecture
103SHx SH3
104SHx SH4
386Intel 386
486Intel 486
586Intel Pentium
601PowerPC 601
603PowerPC 603
604PowerPC 604
620PowerPC 620
821Motorola 821
1824ARM 720
2080ARM 820
2336ARM 920
2577StrongARM
4000MIPS R4000
10003Hitachi SH3
10004Hitachi SH3E
10005Hitachi SH4
21064Alpha 21064
70001ARM 7TDMI

Appendix B: a list of %CEn% shortcuts

First, for a Handheld PC:

ValueStandard directory
%CE1%\Program Files
%CE2%\Windows
%CE3%\Windows\Desktop
%CE4%\Windows\StartUp
%CE5%\My Documents
%CE6%\Program Files\Accessories
%CE7%\Program Files\Communications
%CE8%\Program Files\Games
%CE9%\Program Files\Pocket Outlook
%CE10%\Program Files\Office
%CE11%\Windows\Programs
%CE12%\Windows\Programs\Accessories
%CE13%\Windows\Programs\Communications
%CE14%\Windows\Programs\Games
%CE15%\Windows\Fonts
%CE16%\Windows\Recent
%CE17%\Windows\Favorites

For a Pocket PC version 1.0 or 2.0, as per Handheld PCs, except

ValueStandard directory
%CE3%undefined
%CE9%undefined
%CE10%undefined
%CE11%\Windows\Start Menu\Programs
%CE12%\Windows\Start Menu\Accessories
%CE13%\Windows\Start Menu\Communications
%CE14%\Windows\Start Menu\Games
%CE16%undefined
%CE17%\Windows\Start Menu

For a Pocket PC version 3.0, as for 1.0 or 2.0, except

ValueStandard directory
%CE6%undefined
%CE7%undefined
%CE8%undefined
%CE12%undefined
%CE13%undefined
%CE16%undefined
cabextract-1.11/doc/cabextract.10000664000175000017500000000646714367776050013502 00000000000000.TH CABEXTRACT 1 "March 7, 2018" .SH NAME cabextract \- program to extract files from Microsoft cabinet (.cab) archives .SH SYNOPSIS .B cabextract .RB [ -d \fIdir\fP ] .RB [ -e \fIencoding\fP ] .RB [ -f ] .RB [ -F \fIpattern\fP ] .RB [ -h ] .RB [ -i ] .RB [ -k ] .RB [ -l ] .RB [ -L ] .RB [ -n ] .RB [ -p ] .RB [ -q ] .RB [ -s ] .RB [ -t ] .RB [ -v ] .I " cabinet files" ... .SH DESCRIPTION .B cabextract is a program that un-archives files in the Microsoft cabinet file format (.cab) or any binary file which contains an embedded cabinet file (frequently found in .exe files). .PP .B cabextract will extract all files from all cabinet files specified on the command line. .PP To extract a multi\-part cabinet consisting of several files, only the .I first cabinet file needs to be given as an argument to .B cabextract as it will automatically look for the remaining files. To prevent .B cabextract from extracting cabinet files you did not specify, use the .B -s option. .SH OPTIONS A summary of options is included below. .TP .B \-d \fIdir\fP Extracts all files into the directory \fIdir\fP. .TP .B \-e \fIencoding\fP Specify the character encoding of filenames inside the cabinet files. This is only needed if you find cabinet files with garbled filenames; most software creates CAB files with either ASCII or UTF8 filenames. The list of supported encodings is given by the command "iconv \-l". .TP .B \-f Corrupted cabinet files will be 'fixed' to salvage whatever is possible from them. File entries with bad folders or names will be skipped rather than rejecting the entire cabinet file. Impossible file lengths will be truncated to extract as much as possible, including when you're missing later files in a cabinet set. Corrupted MSZIP blocks and failed block checksums will be ignored. Warnings will be printed if any of these conditions are met. .TP .B \-F \fIpattern\fP Only files with names that match the shell pattern \fIpattern\fP shall be listed, tested or extracted. On non-GNU systems, this match may be case-sensitive. Use the option repeatedly to supply more than one pattern. Files will be listed, tested or extracted if they match \fIany\fP pattern. .TP .B \-h Prints a page of help and exits. .TP .B \-i Prompts before overwriting files. .TP .B \-k Don't overwrite symlinks when extracting files. .TP .B \-l Lists the contents of the given cabinet files, rather than extracting them. .TP .B \-L When extracting cabinet files, makes each extracted file's name lowercase. .TP .B \-n Never overwrite existing files. .TP .B \-p Files shall be extracted to standard output. .TP .B \-q When extracting cabinet files, suppresses all messages except errors and warnings. .TP .B \-s When testing, listing or extracting cabinets which span multiple files, only cabinet files given on the command line shall be used. .TP .B \-t Tests the integrity of the cabinet. Files are decompressed, but not written to disk or standard output. If the file successfully decompresses, the MD5 checksum of the file is printed. .TP .B \-v If given alone on the command line, prints the version of .B cabextract and exits. Given with a list of cabinet files, it will list the contents of the cabinet files. .SH AUTHOR This manual page was written by Stuart Caie , based on the one written by Eric Sharkey , for the Debian GNU/Linux system. cabextract-1.11/doc/ja/0000775000175000017500000000000014376123646011732 500000000000000cabextract-1.11/doc/ja/cabextract.10000644000175000017500000000663512704420232014044 00000000000000.TH CABEXTRACT 1 "2005å¹´10月30æ—¥" .SH åå‰ cabextract \- Microsoft cabinet (.cab) archives ã‹ã‚‰ãƒ•ァイルを解å‡ã™ã‚‹ãƒ—ログラム .SH æ›¸å¼ .B cabextract .RB [ -d \fIdir\fP ] .RB [ -f ] .RB [ -F \fIpattern\fP ] .RB [ -h ] .RB [ -l ] .RB [ -L ] .RB [ -p ] .RB [ -q ] .RB [ -s ] .RB [ -t ] .RB [ -v ] .I " キャビãƒãƒƒãƒˆãƒ•ァイル" ... .SH 詳細 .B cabextract ã¯ã€Microsoft キャビãƒãƒƒãƒˆãƒ•ã‚¡ã‚¤ãƒ«å½¢å¼ (.cab) ã¾ãŸã¯ã€ キャビãƒãƒƒãƒˆãƒ•ァイルãŒåŸ‹ã‚è¾¼ã¾ã‚ŒãŸ ãƒã‚¤ãƒŠãƒªãƒ•ァイル (よã .exe ファイルã§è¦‹ã¤ã‹ã‚‹) ã‹ã‚‰è§£å‡ã™ã‚‹ãƒ—ログラムã§ã™ã€‚ .PP .B cabextract ã¯ã€ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ä¸Šã§æŒ‡å®šã•れãŸå…¨ã‚­ãƒ£ãƒ“ãƒãƒƒãƒˆãƒ•ァイルã‹ã‚‰ ファイルを抽出ã™ã‚‹ã§ã—ょã†ã€‚ .PP å¹¾ã¤ã‹ã®ãƒ•ァイルã«åˆ†å‰²ã•れãŸãƒžãƒ«ãƒãƒ‘ートã®ã‚­ãƒ£ãƒ“ãƒãƒƒãƒˆãƒ•ァイル ã®å ´åˆã¯ã€ .I 最åˆã® ファイルã®ã¿ã‚’ .B cabextract ã®å¼•æ•°ã«ä¸Žãˆã‚Œã°ã€æ®‹ã‚Šã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’è‡ªå‹•çš„ã«æ¤œå‡ºã—ã¾ã™ã€‚ 指定ã—ãªã„キャビãƒãƒƒãƒˆãƒ•ァイルを .B cabextract ãŒãƒªã‚¹ãƒˆã¾ãŸã¯è§£å‡ã—ã¦ã—ã¾ã†ã®ã‚’ 抑止ã™ã‚‹ã«ã¯ã€-s オプションを使用ã—ã¦ãã ã•ã„。 .SH オプション オプションã®è¦ç´„ã¯ã€ä»¥ä¸‹ã‚’å‚照下ã•ã„。 .TP .B \-d \fIdir\fP ディレクトリ \fIdir\fP ã«å…¨ã¦ã®ãƒ•ァイルを解å‡ã—ã¾ã™ã€‚ .TP .B \-f キャビãƒãƒƒãƒˆãƒ•ァイルを抽出ã™ã‚‹å ´åˆã€ å•題ãŒã‚ã£ãŸ MSZIP ブロックを無視ã—ã¾ã™ã€‚ å•題ãŒã‚ã£ãŸ MSZIP ブロックãŒã‚ã£ãŸå ´åˆã«ã¯ã€ 警告メッセージを表示ã—ã¾ã™ã€‚ .TP .B \-F \fIpattern\fP シェル・パターン \fIpattern\fP ã¨ä¸€è‡´ã™ã‚‹åå‰ã®ãƒ•ァイルã®ã¿ãŒè§£å‡ã•れã¾ã™ã€‚ éžGNU システムã«ãŠã„ã¦ã¯ã€ã“ã®ä¸€è‡´ã¯ã€ã‚±ãƒ¼ã‚¹ã‚»ãƒ³ã‚·ãƒ†ã‚£ãƒ–ã§ã™ã€‚ .TP .B \-h ヘルプã®ãƒšãƒ¼ã‚¸ã‚’表示ã—終了ã—ã¾ã™ã€‚ .TP .B \-l ãれらを抽出ã™ã‚‹ã®ã§ã¯ãªã〠指定ã•れãŸã‚­ãƒ£ãƒ“ãƒãƒƒãƒˆãƒ•ァイルã®å†…容を一覧表示ã—ã¾ã™ã€‚ .TP .B \-L キャビãƒãƒƒãƒˆãƒ•ァイルを抽出ã™ã‚‹å ´åˆã€ å„è§£å‡ã•れãŸãƒ•ァイルåã‚’å°æ–‡å­—ã¨ã—ã¦ä½œæˆã™ã‚‹ã€‚ .TP .B \-p ファイルã¯ã€æ¨™æº–出力ã«è§£å‡ã•れã¾ã™ã€‚ .TP .B \-q キャビãƒãƒƒãƒˆãƒ•ァイルを抽出ã™ã‚‹å ´åˆã€ エラーã¨è­¦å‘Šãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’除ãã€å…¨ã¦ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’表示ã—ã¾ã›ã‚“。 .TP .B \-s 複数ã®ãƒ•ァイルã«ã¾ãŸãŒã‚‹ã‚­ãƒ£ãƒ“ãƒãƒƒãƒˆã‚’リストã™ã‚‹ã‹è§£å‡ã™ã‚‹å ´åˆã€ ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ä¸Šã§æŒ‡å®šã—ãŸã‚­ãƒ£ãƒ“ãƒãƒƒãƒˆãƒ»ãƒ•ァイルã®ã¿ã‚’使用ã—ã¾ã™ã€‚ .TP .B \-t キャビãƒãƒƒãƒˆã®æ•´åˆæ€§ã‚’テストã—ã¾ã™ã€‚ファイルã¯ã€è§£å‡ã•れã¾ã™ãŒã€ ディスクã¾ãŸã¯æ¨™æº–出力ã«ã¯æ›¸ã‹ã‚Œã¾ã›ã‚“。ファイルã®è§£å‡ã«æˆåŠŸã—ãŸå ´åˆã«ã¯ã€ ファイルã®MD5ãƒã‚§ãƒƒã‚¯ã‚µãƒ ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ .TP .B \-v コマンドラインã‹ã‚‰ã€å˜ç‹¬ã§æŒ‡å®šã•れãŸå ´åˆã¯ã€ .B cabextract ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ã‚’表示ã—ã¦çµ‚了ã—ã¾ã™ã€‚ キャビãƒãƒƒãƒˆãƒ•ァイルã®ãƒªã‚¹ãƒˆã‚’与ãˆãŸå ´åˆã¯ã€ キャビãƒãƒƒãƒˆãƒ•ァイルã®å†…容を一覧表示ã—ã¾ã™ã€‚ .SH 著者 ã“ã®ãƒžãƒ‹ãƒ¥ã‚¢ãƒ«ãƒšãƒ¼ã‚¸ã¯ã€ Stuart Caie ã«ã‚ˆã£ã¦æ›¸ã‹ã‚Œã€ Debian GNU/Linux システムã®ãŸã‚ã«ã€ Eric Sharkey ã®ã¿ã«ã‚ˆã£ã¦ãƒ™ãƒ¼ã‚¹ãŒæ›¸ã‹ã‚Œã¾ã—ãŸã€‚ .SH 訳者 日本語訳ã¯ã€Katsumi Saito ãŒè¡Œã„ã¾ã—ãŸã€‚ cabextract-1.11/doc/magic0000664000175000017500000000335213370030321012242 00000000000000#------------------------------------------------------------------------------ # Microsoft Cabinet files # # From (part of cabextract package) 0 string MSCF\0\0\0\0 Microsoft Cabinet file >8 lelong x \b, %u bytes >28 leshort 1 \b, 1 file >28 leshort >1 \b, %u files #------------------------------------------------------------------------------ # InstallShield Cabinet files # # From (part of cabextract package) 0 string ISc( InstallShield Cabinet file >5 byte&0xf0 =0x60 version 6, >5 byte&0xf0 !0x60 version 4/5, >(12.l+40) lelong x %u files #------------------------------------------------------------------------------ # Windows CE package files # # From (part of cabextract package) 0 string MSCE\0\0\0\0 Microsoft WinCE install header >20 lelong 0 \b, architecture-independent >20 lelong 103 \b, Hitachi SH3 >20 lelong 104 \b, Hitachi SH4 >20 lelong 0xA11 \b, StrongARM >20 lelong 4000 \b, MIPS R4000 >20 lelong 10003 \b, Hitachi SH3 >20 lelong 10004 \b, Hitachi SH3E >20 lelong 10005 \b, Hitachi SH4 >20 lelong 70001 \b, ARM 7TDMI >52 leshort 1 \b, 1 file >52 leshort >1 \b, %u files >56 leshort 1 \b, 1 registry entry >56 leshort >1 \b, %u registry entries cabextract-1.11/TODO0000644000175000017500000000153512534254616011201 00000000000000Automatic renaming of files in their long form, for Windows CE install cabs. This would probably be another program using libmspack, rather than auto-detected by cabextract. Provide tool for finding OLE2 streams and dumping them. Some InstallShield Wizard use MS CAB files inside MS OLE2 streams. They look normal, but every so often, there's a 512 bytes extra here and a 512 bytes missing there, so the cabinets aren't contiguous. More advanced repair of corrupted CABs? Possible? cabjoin - a new program that will read multipart cabinets and output a single cabinet file containing all parts. Allow reading a cabinet from stdin. Allow an exacting list of files to be matched rather than a single pattern match. Allow more than one pattern match? cabextract should be localised. cabextract should not overwrite the source cabinet files when unpacking. cabextract-1.11/INSTALL0000644000175000017500000003662614376123607011554 00000000000000Installation Instructions ************************* Copyright (C) 1994-1996, 1999-2002, 2004-2017, 2020-2021 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell command './configure && make && make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the 'README' file for instructions specific to this package. Some packages provide this 'INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The 'configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a 'Makefile' in each directory of the package. It may also create one or more '.h' files containing system-dependent definitions. Finally, it creates a shell script 'config.status' that you can run in the future to recreate the current configuration, and a file 'config.log' containing compiler output (useful mainly for debugging 'configure'). It can also use an optional file (typically called 'config.cache' and enabled with '--cache-file=config.cache' or simply '-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how 'configure' could check whether to do them, and mail diffs or instructions to the address given in the 'README' so they can be considered for the next release. If you are using the cache, and at some point 'config.cache' contains results you don't want to keep, you may remove or edit it. The file 'configure.ac' (or 'configure.in') is used to create 'configure' by a program called 'autoconf'. You need 'configure.ac' if you want to change it or regenerate 'configure' using a newer version of 'autoconf'. The simplest way to compile this package is: 1. 'cd' to the directory containing the package's source code and type './configure' to configure the package for your system. Running 'configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type 'make' to compile the package. 3. Optionally, type 'make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type 'make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the 'make install' phase executed with root privileges. 5. Optionally, type 'make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior 'make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing 'make clean'. To also remove the files that 'configure' created (so you can compile the package for a different kind of computer), type 'make distclean'. There is also a 'make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type 'make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide 'make distcheck', which can by used by developers to test that all other targets like 'make install' and 'make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the 'configure' script does not know about. Run './configure --help' for details on some of the pertinent environment variables. You can give 'configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU 'make'. 'cd' to the directory where you want the object files and executables to go and run the 'configure' script. 'configure' automatically checks for the source code in the directory that 'configure' is in and in '..'. This is known as a "VPATH" build. With a non-GNU 'make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use 'make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple '-arch' options to the compiler but only a single '-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the 'lipo' tool if you have problems. Installation Names ================== By default, 'make install' installs the package's commands under '/usr/local/bin', include files under '/usr/local/include', etc. You can specify an installation prefix other than '/usr/local' by giving 'configure' the option '--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option '--exec-prefix=PREFIX' to 'configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like '--bindir=DIR' to specify different values for particular kinds of files. Run 'configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of '${prefix}', so that specifying just '--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to 'configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the 'make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, 'make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of '${prefix}'. Any directories that were specified during 'configure', but not in terms of '${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the 'DESTDIR' variable. For example, 'make install DESTDIR=/alternate/directory' will prepend '/alternate/directory' before all installation names. The approach of 'DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of '${prefix}' at 'configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving 'configure' the option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'. Some packages pay attention to '--enable-FEATURE' options to 'configure', where FEATURE indicates an optional part of the package. They may also pay attention to '--with-PACKAGE' options, where PACKAGE is something like 'gnu-as' or 'x' (for the X Window System). The 'README' should mention any '--enable-' and '--with-' options that the package recognizes. For packages that use the X Window System, 'configure' can usually find the X include and library files automatically, but if it doesn't, you can use the 'configure' options '--x-includes=DIR' and '--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of 'make' will be. For these packages, running './configure --enable-silent-rules' sets the default to minimal output, which can be overridden with 'make V=1'; while running './configure --disable-silent-rules' sets the default to verbose, which can be overridden with 'make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. HP-UX 'make' updates targets which have the same timestamps as their prerequisites, which makes it generally unusable when shipped generated files such as 'configure' are involved. Use GNU 'make' instead. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its '' header file. The option '-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put '/usr/ucb' early in your 'PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in '/usr/bin'. So, if you need '/usr/ucb' in your 'PATH', put it _after_ '/usr/bin'. On Haiku, software installed for all users goes in '/boot/common', not '/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features 'configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, 'configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the '--build=TYPE' option. TYPE can either be a short name for the system type, such as 'sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file 'config.sub' for the possible values of each field. If 'config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option '--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with '--host=TYPE'. Sharing Defaults ================ If you want to set default values for 'configure' scripts to share, you can create a site shell script called 'config.site' that gives default values for variables like 'CC', 'cache_file', and 'prefix'. 'configure' looks for 'PREFIX/share/config.site' if it exists, then 'PREFIX/etc/config.site' if it exists. Or, you can set the 'CONFIG_SITE' environment variable to the location of the site script. A warning: not all 'configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to 'configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the 'configure' command line, using 'VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified 'gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an Autoconf limitation. Until the limitation is lifted, you can use this workaround: CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash 'configure' Invocation ====================== 'configure' recognizes the following options to control how it operates. '--help' '-h' Print a summary of all of the options to 'configure', and exit. '--help=short' '--help=recursive' Print a summary of the options unique to this package's 'configure', and exit. The 'short' variant lists options used only in the top level, while the 'recursive' variant lists options also present in any nested packages. '--version' '-V' Print the version of Autoconf used to generate the 'configure' script, and exit. '--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally 'config.cache'. FILE defaults to '/dev/null' to disable caching. '--config-cache' '-C' Alias for '--cache-file=config.cache'. '--quiet' '--silent' '-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to '/dev/null' (any error messages will still be shown). '--srcdir=DIR' Look for the package's source code in directory DIR. Usually 'configure' can determine that directory automatically. '--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. '--no-create' '-n' Run the configure checks, but stop before creating any output files. 'configure' also accepts some other, not widely useful, options. Run 'configure --help' for more details. cabextract-1.11/md5.h0000664000175000017500000001305313464343137011347 00000000000000/* md5.h - Declaration of functions and data types used for MD5 sum computing library functions. Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu. 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 2, or (at your option) any later version. 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, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _MD5_H #define _MD5_H 1 #include #include /* The following contortions are an attempt to use the C preprocessor to determine an unsigned integral type that is 32 bits wide. An alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but doing that would require that the configure script compile and *run* the resulting executable. Locally running cross-compiled executables is usually not possible. */ #if HAVE_INTTYPES_H || HAVE_STDINT_H # if HAVE_INTTYPES_H # include # else # include # endif typedef uint32_t md5_uint32; typedef uintptr_t md5_uintptr; #else # if defined __STDC__ && __STDC__ # define UINT_MAX_32_BITS 4294967295U # else # define UINT_MAX_32_BITS 0xFFFFFFFF # endif /* If UINT_MAX isn't defined, assume it's a 32-bit type. This should be valid for all systems GNU cares about because that doesn't include 16-bit systems, and only modern systems (that certainly have ) have 64+-bit integral types. */ # ifndef UINT_MAX # define UINT_MAX UINT_MAX_32_BITS # endif # if UINT_MAX == UINT_MAX_32_BITS typedef unsigned int md5_uint32; # else # if USHRT_MAX == UINT_MAX_32_BITS typedef unsigned short md5_uint32; # else # if ULONG_MAX == UINT_MAX_32_BITS typedef unsigned long md5_uint32; # else /* The following line is intended to evoke an error. Using #error is not portable enough. */ "Cannot determine unsigned 32-bit data type." # endif # endif # endif /* We have to make a guess about the integer type equivalent in size to pointers which should always be correct. */ typedef unsigned long int md5_uintptr; #endif #undef __P #if defined (__STDC__) && __STDC__ #define __P(x) x #else #define __P(x) () #endif /* Structure to save state of computation between the single steps. */ struct md5_ctx { md5_uint32 A; md5_uint32 B; md5_uint32 C; md5_uint32 D; md5_uint32 total[2]; md5_uint32 buflen; char buffer[128]; }; /* * The following three functions are build up the low level used in * the functions `md5_stream' and `md5_buffer'. */ /* Initialize structure containing state of computation. (RFC 1321, 3.3: Step 3) */ extern void md5_init_ctx __P ((struct md5_ctx *ctx)); /* Starting with the result of former calls of this function (or the initialization function update the context for the next LEN bytes starting at BUFFER. It is necessary that LEN is a multiple of 64!!! */ extern void md5_process_block __P ((const void *buffer, size_t len, struct md5_ctx *ctx)); /* Starting with the result of former calls of this function (or the initialization function update the context for the next LEN bytes starting at BUFFER. It is NOT required that LEN is a multiple of 64. */ extern void md5_process_bytes __P ((const void *buffer, size_t len, struct md5_ctx *ctx)); /* Process the remaining bytes in the buffer and put result from CTX in first 16 bytes following RESBUF. The result is always in little endian byte order, so that a byte-wise output yields to the wanted ASCII representation of the message digest. IMPORTANT: On some systems it is required that RESBUF be correctly aligned for a 32 bits value. */ extern void *md5_finish_ctx __P ((struct md5_ctx *ctx, void *resbuf)); /* Put result from CTX in first 16 bytes following RESBUF. The result is always in little endian byte order, so that a byte-wise output yields to the wanted ASCII representation of the message digest. IMPORTANT: On some systems it is required that RESBUF is correctly aligned for a 32 bits value. */ extern void *md5_read_ctx __P ((const struct md5_ctx *ctx, void *resbuf)); /* Compute MD5 message digest for bytes read from STREAM. The resulting message digest number will be written into the 16 bytes beginning at RESBLOCK. */ extern int md5_stream __P ((FILE *stream, void *resblock)); /* Compute MD5 message digest for LEN bytes beginning at BUFFER. The result is always in little endian byte order, so that a byte-wise output yields to the wanted ASCII representation of the message digest. */ extern void *md5_buffer __P ((const char *buffer, size_t len, void *resblock)); /* The following is from gnupg-1.0.2's cipher/bithelp.h. */ /* Rotate a 32 bit integer by n bytes */ #if defined __GNUC__ && defined __i386__ static inline md5_uint32 rol(md5_uint32 x, int n) { __asm__("roll %%cl,%0" :"=r" (x) :"0" (x),"c" (n)); return x; } #else # define rol(x,n) ( ((x) << (n)) | ((x) >> (32-(n))) ) #endif #endif cabextract-1.11/ChangeLog0000664000175000017500000007446014374414524012274 000000000000002023-02-19 Stuart Caie * ensure_filepath(): had wrong logic, for the archive-controlled part of a pathname, it was using the result of lstat() whether it succeeded or not, and thus not creating directories when it ought to. Fixed and added a testcase for cabextract's --directory option. Thanks to iq2luc for raising the issue and offering a fix. 2023-02-04 Stuart Caie * src/cabextract.c: By default, cabextract will now overwrite symlinks if they're in the path of files it wants to extract, rather than follow them. This is also what unzip and tar do by default. If you want to keep symlinks, use the new -k option. This also adds new options regarding overwriting files. You can now add the -n option to never overwrite, or the -i option for an interactive prompt asking you if you want to overwrite. Thanks to wereii for raising this issue and working on the solution. 2023-02-03 Stuart Caie * configure.ac: do AC_CHECK_SIZEOF([off_t]) test only after AC_SYS_LARGEFILE, because the latter can alter the size of off_t. 2019-04-10 Stuart Caie * src/cabextract.c: support more than one filter (-F) option in cabextract, e.g. cabextract -F *.mov -F *.avi file.cab. Thanks to caesarshift for the idea. 2018-12-03 Stuart Caie * test: support builddir being on a path that includes spaces 2018-11-09 Stuart Caie * test/case-utf8.test: Some environments (e.g. DJGPP) don't have a UTF-8 locale, so won't pass the case.test testcase. Break it into case-ascii.test and case-utf8.test, and skip the latter if "cabextract -L" has no effect on non-ASCII filenames. Thanks to Robert Riebisch for highlighting this. 2018-11-08 Stuart Caie * src/cabextract.c: make multiple attempts at iconv_open() with different names for the UTF-8 encoding: "UTF-8", "UTF8" and "UTF_8". "UTF8" works with glibc, libiconv, newlib, Solaris libc and FreeBSD libc, while "UTF-8" doesn't work with newlib. But if you have libiconv >= 1.13, it removes "UTF8" support unless you define USE_HPUX_ALIASES, or patch it back in (as Cygwin does). Thanks to Ryan Schmidt for letting me know about this. 2018-11-03 Stuart Caie * test: use the autotools test system instead of a custom makefile. You can now use 'make check' to test cabextract, and the test files are now distributed with cabextract. 2018-10-30 Stuart Caie * configure.ac: remove obsolescent C library tests. AC_HEADER_STDC is removed, and so are most checks for standard C headers. cabextract now makes these assumptions: - exist - is protected from double-inclusion (AC_HEADER_TIME obsolete) - if you have iconv(), towlower(), utime(), utimes(), you also have their header files - BSD has memcpy(), memmove(), strrchr() in and has strcasecmp() in 2018-10-26 Stuart Caie * configure.ac, Makefile.am: use pkg-config's PKG_CHECK_MODULES when looking for an external libmspack. You still need to supply --with-external-libmspack to use an external libmspack. If you don't like or use pkg-config, you can set the environment variables libmspack_CFLAGS and libmspack_LIBS before running configure. 2018-10-26 Stuart Caie * autogen.sh, distcheck.sh: I've introduced new build scripts. Use cleanup.sh to remove all generated files, autogen.sh to generate the configure script, rebuild.sh to (re)build and test cabextract, and finally use distcheck.sh to both build and distcheck cabextract, both with the --with-external-libmspack configure option and without. 2018-10-22 Stuart Caie * amibuild.sh: include cabinfo in the Amiga distribution. Thanks to Stefan Haubenthal for the suggestion. 2018-10-16 Stuart Caie * src/cabinfo.c: thanks to Micah Snyder for sending some very corrupt files, where cabinet blocks can be found absolutely anywhere, not in a continguous sequence after the file entries, I found cabinfo unfit for purpose. I've updated it with a new output format, where the blocks for a folder appear immediately after each folder, rather than all at the end. 2018-10-16 Stuart Caie * src/cabextract.c: use libmspack's new MSCABD_PARAM_SALVAGE mode for cabextract -f, to allow extracting even more data from broken cabinet files. 2018-07-31 Stuart Caie * configure.ac: drop AC_FUNC_MKTIME. Looking into it, even C89 has a mktime() function, the configure test is mostly checking if it is POSIX-conformant or not, and substitutes mktime.c if not. But even the replacement has no TZ handling, so it seems OK to me to accept the system mktime() in any case. The fnmatch() and getopt() substitutions remain because they enable GNU extensions that cabextract uses (FNM_CASEFOLD and getopt_long() respectively). Thanks to Stefan Haubenthal for bringing up the issue. 2018-07-28 Stuart Caie * src/cabinfo.c: cabinfo now supports examining more than one file 2018-07-17 Stuart Caie * amibuild.sh: support using setlocale()/iconv() in the OS4 version. * amibuild.sh: build the 68K version with -noixemul so the resulting executable doesn't need ixemul.library, libnix is used instead. Because libnix has no umask(), add a HAVE_UMASK feature test. * src/cabextract.c: add a new feature flag, LATIN1_FILENAMES, which should be defined if the host environment expects ISO-8859-1 filenames rather than UTF-8. This adds in a step to translate even UTF-8 filenames to ISO-8859-1. It's only enabled for the Amiga build so far. 2018-03-07 Stuart Caie * configure.ac, src/cabextract.c: add support for choosing the character encoding of non-UTF8 filenames, using the iconv library. This is based on a patch originally developed by Kevin Tardif. * src/cabextract.c: try setting various UTF8 locales for LC_CTYPE, in order to get tolower() / towlower() to lowercase non-ASCII characters. Again, thanks to Kevin Tardif for discussing this and supplying a proposed patch. 2016-04-16 Stuart Caie * configure.ac: change my email address to kyzer@cabextract.org.uk 2015-05-10 Stuart Caie * wince_rename, wince_info: allow the possibility that strings have more than one null byte. Thanks to Stefan Riegler for the suggestion. 2015-05-10 Stuart Caie * Makefile.am: Add subdir-objects option as suggested by autoreconf. * configure.ac: Add AM_PROG_AR as suggested by autoreconf. 2015-02-25 Stuart Caie * create_output_name(): Simplify code; do path checking only after output name has been constructed. Use towlower to lowercase UTF-8 characters. Remove both leading '/' and '\' from cab filenames and change both "../" and "..\" to "xx", for Cygwin and other Cygwin-like environments that use both '/' and '\' as path separators. Thanks to Alexander Cherepanov and the MITRE team. 2015-02-18 Stuart Caie * create_output_name(): the check against leading slashes could be evaded with malformed UTF-8. Thanks to Alexander Cherepanov for reporting the issue. 2015-01-18 Stuart Caie * wince_rename: installed files now include their install directories. Thanks to Alfonso Acosta for sending a patch. 2015-01-08 Stuart Caie * create_output_name: avoid invalid memory reads because of invalid UTF-8 encodings. Use the Unicode substitution character for most bad UTF-8 or Unicode encodings. Thanks to Hanno Böck. * src/cabinfo.c: stop trying to convert UTF-8 to ASCII in filename. Instead, prepend "UTF: " and print it to the terminal verbatim. 2011-07-19 Stuart Caie * doc/ja/cabextract.1: Katsumi Saito updated the Japanese translation of cabextract's manpage to include the -t option. Thanks again! 2011-05-11 Stuart Caie * src/cabinfo.c: changed the largefile detection header to the same as mspack/system.h 2011-04-27 Stuart Caie * src/cabextract.c: changed char* to const char* in line with changes in libmspack. See mspack/ChangeLog for more details. 2011-04-25 Stuart Caie * load_spanning_cabinets(): Print the error code caused by a failed cabinet merge, before ruining the error code by calling cabd->close(). Thanks to Drew D'Addesio for reporting the problem. 2011-01-19 Stuart Caie * doc/wince_cab_format.html: Identified a new file flag in the WinCE header file. Thanks to Paul Sokolovsky for asking me to look into it. 2010-07-19 Stuart Caie * mspack: MS-ZIP recovery now recovers more bytes. Also, when a file fails to unpack because of a read error during decompression, all subsequent files in the same folder will give the same error, instead of claiming to be OK. See mspack/ChangeLog for full details. 2010-07-17 Stuart Caie * src/cabsplit: added new program, cabsplit, which splits cabinet files into one cabinet file per folder. Useful for debugging. 2010-06-17 Stuart Caie * configure.ac: Added --external-libmspack option, which allows you to use the libmspack library installed on your system rather than the copy bundled with cabextract. Thanks to Patrice Dumas for the patch. 2010-06-10 Stuart Caie * mspack: bugs in MS-ZIP and Quantum decoders have been fixed. See mspack/ChangeLog for full details. 2010-05-06 Stuart Caie * configure.ac, cabextract.c: added support for the one-arg mkdir() found in the MinGW32 environment. Thanks to Kevin O'Rourke for reporting this. 2009-09-24 Stuart Caie * doc/wince_cab_format.html, src/wince_info, src/wince_rename: The files in Windows CE cabinets are numbered after the first ID in the FILES section, rather than what I termed the "real ID". Fixed the documentation and the wince tools to match. The purpose of the field previously called "real ID" is now unknown. Thanks to Marco Schindler for discovering this. 2007-08-07 Stuart Caie * all: cabextract and libmspack have moved to the domain www.cabextract.org.uk. Updated the documentation to reflect this. 2007-01-20 Stuart Caie * create_output_name(): add UTF-8 support for 6-byte characters. Apparently they go that far these days. 2007-01-20 Stuart Caie * doc/wince_cab_format.html, src/wince_info: The REGKEYS "unknown" flag appears to be a boolean indicating whether variable substitution should take place. Thanks to Dominique Gallot for discovering it. 2006-06-21 Stuart Caie * create_output_name(): add UTF-8 support for 4-byte characters. 2006-03-01 Stuart Caie * process_cabinets(): on the advice of Mike Mohr, cabextract no longer skips entire cabinets, when create_output_filename() returns NULL, it only skips the affected files now. 2005-10-30 Stuart Caie * src/cabextract.c: added test mode to cabextract, wherein files aren't extracted, only passed through an MD5 checksum generator. cabextract then lists which files passed and which files failed. * process_cabinets(): fixed the problem where filters don't match when -d option is also used. The filters match on the full output-file path, including the -d directory specified. We now trim this off before matching. 2005-10-29 Stuart Caie * fnmatch.c, getopt.c: finally resolved problems with all the GNU replacement functions. Obtained new versions of fnmatch and getopt, removing the need for alloca.c, coded out the requirement for mempcpy in getopt.c (I don't think it was needed anyway, but just to be sure I changed it to use just memcpy). Tested on Mac OS X (both native and using fink), Solaris 8 and Cygwin as well as Debian. * configure.ac: Removed the AC_FUNC_ALLOCA and AC_REPLACE_FUNCS([mempcpy]) 2005-07-05 Stuart Caie * src/cabinfo.c: This can now search and print accurate output for cabinets (and files containing cabinets) over 2GB. 2005-04-21 Stuart Caie * src/cabinfo.c: This now prints if the NAME_IS_UTF flag is set for each file. 2004-10-19 Stuart Caie * create_output_name(): fixed out-by-one error in UTF-8 decoder. All UTF-8 filenames would reach the "error in UTF-8 decode" section, because the test for that section was "pointer >= last_character", not "pointer > last_character". 2004-10-18 Stuart Caie * process_cabinet(): now accepts that failure of create_output_name() is an error, and also lets that function print an error message rather than printing one itself. * create_output_name(): improved the two error messages that could be printed. 2004-10-15 Stuart Caie * create_output_name(): removes leading "./" and "../" as well as leading slashes from the input filename. Thanks to David Banz for pointing this out, as well as http://www.securityfocus.com/bid/11376/ 2004-07-16 Stuart Caie * Makefile.am: added -DMSPACK_NO_DEFAULT_SYSTEM. Why wasn't this in earlier? * src/cabextract.c: added prototypes of the cabx_ functions, removed the prototype of cabextract_system and moved the real cabextract_system to before main(). This is so AIX doesn't fail on seeing an extern and a static definition of the same global. That's messed up! * alloca.c, fnmatch*, getopt*, mempcpy.c: imported these from gcc's latest libiberty. This should fix problems with Cygwin. 2004-03-18 Stuart Caie * process_cabinet(): added missing printf argument when errors on extracting to stdout occur. Thanks to Moritz Barsnick for finding it. 2004-03-08 Stuart Caie * all: tidy-ups for 1.0 release 2003-09-04 Stuart Caie * set_date_and_perm(): implemented the utimes() alternative to utime(). * set_date_and_perm(): sets the date before the permissions are set, in case read-only files really do get -r--r--r-- permissions and your dumb OS won't let the date can't be changed. 2003-08-14 Stuart Caie * wince_cab_format.html: Shaun Jackman worked out six more fields in the header. 2003-08-12 Stuart Caie * cabextract.c: rewrote all function documentation in javadoc / doxygen format. * configure.ac: added AC_FUNC_ALLOCA / @ALLOCA@ / alloca.c because I noticed that fnmatch.c uses alloca(). 2003-08-11 Stuart Caie * main(): Removed the redundant args.list with args.view. I was wondering why cabextract -l file.cab was trying to extract instead of list... 2003-08-06 Stuart Caie * configure.in, Makefile.am: rewrote the configure and build scripts, in the new style. fnmatch sources are now bundled, and now all the support code and tools are in the top directory, leaving src/ with nothing but cabextract code in it. 2003-08-05 Stuart Caie * wince_cab_format.html: converted the WinCE CAB format document from text to HTML. 2003-07-29 Stuart Caie * cabextract.c: now rewritten to use libmspack. * process_cabinet(): the cabinet listing now has space for 10 digits in the size field, for those really big compressed files. The maximum size of a file is 4294967295 bytes. 2003-07-18 Stuart Caie * cabextract.c: started refactoring cabextract to use the libmspack library. Moved everything out of cabextract.c and will start moving things back in as necessary. * doc, mspack: added a doc directory, where fun things like manual pages, magic files and file format documents go. Made a directory for libmspack files. 2003-06-07 Stuart Caie * mspack: started creation of the libmspack library, based on the cabextract code. See http://www.kyz.uklinux.net/libmspack/ for more details about the library. 2003-05-14 Stuart Caie * magic.cabinet: fixed errors in CAB magic definition * magic.wince: added magic file entry for WinCE install format * configure.in: added large file support 2003-04-21 Stuart Caie * ja/cabextract.1: Katsumi Saito kindly translated the updated manual page into Japanese for me. 2003-04-20 Stuart Caie * cabextract.1: finally decided on feature set for cabextract 0.7, so I updated the manual to reflect that. 2003-03-12 Stuart Caie * wince_cab_format.txt: reverse engineered most of the file format for Windows CE installation CAB header files. Windows CE uses normal cabinet files, but the files inside the cabinets use short filenames and a special binary header to specify full filenames, install directories, registry entries and symbolic links. If anyone wants to help fill in the remaining fields, I'm all ears. 2002-11-19 Stuart Caie * cabextract.c: moved the generation of the correct unix filename for an extracted file out of file_open() and into the main process_cabinet() function (it now has a helper function called create_output_name()). This is to make the real filename available outside of file_open(). (See below) * file_close(): chmod() and utime() are now called on the correct filename :) 2002-11-13 Stuart Caie * unix_directory_seperators(): this is a new function added to determine whether the CAB file is using "wrong" UNIX-style forward slashes as directory seperators. Microsoft CAB files use MS-DOS backslashes, however the tools Cablinux and PowerArchiver create CABs with forward-slashes. 2002-09-12 Stuart Caie * file_cabs_in_file(): if the file itself doesn't exist, we no longer print "Not a Microsoft cabinet file" for not finding any cabinets in that file. 2002-09-08 Stuart Caie * cabextract.c: cabextract used to segv if an LZX or Quantum folder came after an MSZIP folder, because the window pointer would be filled in by MSZIP's state. To solve this, I took the window pointers and associated variables out of the state union, and I also started clearing the state structure on startup. I also removed the 'what was the old compression type / free window' code and replaced it with a simple 'free LZX/QTM window if it exists' before ZIP initialisation. 2002-09-08 Stuart Caie * find_cabs_in_file(): if a file begins with "ISc(", cabextract now prints a message about how to unpack InstallShield '.cab' files, which begin with this signature. 2002-09-08 Stuart Caie * cabextract.c: After seeing what some people think the command line syntax is for cabextract is (e.g. http://slashdot.org/comments.pl?sid=39401&cid=4210033) I have decided to be nice to people who don't read manuals, and refuse to extract files given on the command line if they've already been extracted as part of another cabinet. This does preclude the scenario where a file is not only part of a multi-part set, but has a cabinet at offset 0 and _also_ has embedded cabs later on. The new functionality is implemented by the new functions remember_cabinet() and known_cabinet(), which use a simple linked list. If you want the old behaviour of cabextract back, do "find -exec cabextract {} \;". 2002-09-08 Stuart Caie * configure.in: Upgraded my autoconf to one that has the AC_EXEEXT bug fixed (look up AC_EXEEXT xSYM on the Internet :). Now it complains about me writing to LIBOBJS directly, so I use the macro AC_LIBOBJ twice to add getopt and getopt1 to LIBOBJS. 2002-08-20 Stuart Caie * AUTHORS, ChangeLog, NEWS, cabextract.c: fixed mis-spellings of Matthew Russotto's name. * ChangeLog: finished a half-completed changelog entry. 2002-08-12 Stuart Caie * cabextract.c: now prints all errors and warnings to stderr rather that stdout. I finally noticed that perror() prints to stderr, and I want to follow suit. 2002-08-11 Stuart Caie * extract_file(): now prints out the correct cabinet name in error messages, in the case of files which are split over multiple cabinet files and the 2nd or later split cabinet contains the error. * QTMdecompress(): fixed the QTM decoding error - basically, Matthew used the bitstream reading macros from my LZX decompressor. Sadly, these macros can only guarantee at maximum 17 bits available in the bit buffer, and Quantum uses up to 19 bits. I rewrote the Quantum bit buffer macros to be multi-pass (and therefore slower) so they can get the requisite number of bits. * QTMinit(): after fixing the decoding bug, I noticed that files always failed extraction when going to a second folder. It turns out that I forgot to reset QTM's window_posn. * configure.in: added limits.h to the list of checked includes * cabextract.c: ULONG_BITS now defined in terms of CHAR_BIT from rather than fixed to 8 bits per char. Oddly, my system seems to include rather than . So, for people like me, I also define CHAR_BIT to be 8 if it's not already defined. 2002-07-29 Stuart Caie * cabextract.c: The Ministry of Sensible Naming dictates that load_cab() be renamed find_cabs_in_file(), and lose the 'search' argument. Calls to load_cab() where the search argument = 0 (i.e., when loading spanning cabinets) be changed to load_cab_offset(x,0). 2002-07-25 Stuart Caie * load_cab(): Bah! off_t is defined as a signed long int, and not an unsigned long int as I had previously thought. This means the 'valid cabinet' comparisions may fail. I have fixed this by making these comparisons unsigned. * cabinfo.c: added the new search mechanism to cabinfo. 2002-07-25 Stuart Caie * process_cabinet(): rewrote the loading mechanism. Uses the new load_cab() to get a list of cabinets in the base file. Also does bi-directional loading of spanning cabinets. * load_cab(): now takes a 'search' parameter. if search=0, the old loading behaviour is performed, but if search=1, it now does the exhaustive search for all matching cabinets and tries to load them. If a load succeeds, it skips that section of the file. Therefore, all embedded cabinets are found, yet most of the file does not need to be searched. * cabinet_find_header(): removed, see above. Also, in shifting the search, I altered the search mechanism. It now uses a state machine to get around border cases, rather than the flaky 'save the last 20 bytes and put them at the start the next time around'. * cabinet_read_entries(): now checks the MSCF signature, as there is no longer a cabinet_find_header() to do this. 2002-07-23 Stuart Caie * LZXdecompress(), QTMdecompress(): On systems where the LZ window pointer is in "low memory", runsrc (window pointer - match offset) could be below address 0, which wraps around to the end of memory, so it appears runsrc is ahead of the LZ window, and so it does not need 'fixing' before the match copy. Therefore the match data is read from the incorrect, high address. Thanks to the NetBSD team for discovering this and providing the patch. 2002-07-22 Stuart Caie * file_close(): now honours your umask settings when extracting files. Thanks to the NetBSD team for the patch. * cabinet_seek(), cabinet_skip(): these now print errors if fseek() returns an error. * QTMdecompress(): finally! Added an implementation of the Quantum method which was researched and written by Matthew Russotto. Many thanks to him for all the hard work he did to produce this. I tidied up the code to be more my style (and to be quite a bit faster by inlining the bit buffer, H, L and C), but it's still all his code running. * find_next_cabinet_file(): this is a new function which finds the "next cabinet" by opening the directory it would be in and reading each filename case-insensitively. It also handles any such "next cabinets" with directory elements (delimited with MS-DOS backslashes). * process_cabinet(): now uses find_next_cabinet_file() to get the next cabinet file. This function also replaces the hack that gets any directory path which might be embedded in the base cabinet filename (as mentioned on the command line). 2002-07-21 Stuart Caie * file_close(): fixed off-by-one error in setting the extracted file date. Thanks to Claus Rasmussen. 2002-07-20 Stuart Caie * file_open(): now removes any leading slashes from the name of the file to be extracted. Thanks to the James Henstridge and David Leonard for patches. * ensure_filepath(): now does not try to examine the directory "" (i.e. no directory at all) if given an absolute path (one that start with a slash). Thanks to the James Henstridge for the patch. 2002-04-30 Stuart Caie * cabextract.spec.in: changed the fixed version number to @VERSION@ 2002-04-06 Stuart Caie * Makefile.am, configure.in: used the guide no_getopt_long.txt included with the gengetopt package to add getopt_long configuration to cabextract. Hopefully it all works now. Thanks to the many people who pointed out this problem and to the many people who offered solutions. 2001-09-06 Stuart Caie * Makefile.am, configure.in: made cabextract.spec one of the auto- generated files. Now I can do 'make distcheck' here to build a distribution which can be installed using 'rpm -tb cabextract-0.6.tar.gz'. Thanks to Daniel Resare for the know-how. 2001-08-20 Stuart Caie * Makefile.am: added an LDADD line for cabextract's LIBOBJS generated by configure. This means the AC_REPLACE_FUNCS line should actually have an effect. * configure.in: Removed getopt_long and mktime from the AC_CHECK_FUNCS, as this is done anyway. 2001-08-19 Stuart Caie * Makefile.am, configure.in, cabextract.c: moved the GNU getopt sources to become an automatically added dependency if getopt_long() can't be found in the standard library, just like mktime() is handled. The getopt_long(), struct option and optarg and optind definitions are taken from getopt.h if possible. If they're not there, but getopt_long() was found with standard includes files, it's assumed they're defined in the standard include files. Otherwise, we define them ourselves. * cabextract.c: now gets VERSION defined from configure via config.h. * decompress(): if the 'fix' option was used, the output buffer would always be cleared before block decompression. A nice idea, but the MSZIP method likes to keep the output buffer between blocks. Thanks to Fernando Trias for spotting this. Stopped clearing the output buffer. * main(): the 'fix' variable wasn't initialised to zero, so on some architectures, where the stack-space allocated to the variable isn't cleared to zero, you always got the 'fix' option selected. See above for why this was bad. * process_cabinet(): now prints "Finished processing cabinet" when finished extracting, instead of just a blank line. Still prints blank lines for listing files. 2001-08-05 Stuart Caie * Makefile.am: the manpage wasn't included in the distribution. Fixed and re-issued the 0.3 release. 2001-08-02 Stuart Caie * decompress(): now takes a 'fix' flag, which causes MSZIP errors to be ignored. * cabinet_get_entries(): now keeps the printable information about previous and next cabinet parts * process_cabinet(): now prints the printable information about the next cabinet part in a multi-part cabinet * file_open(): now prepends a given directory if wanted, and can make the filename lowercase if wanted. * main(): changed to using getopt_long to parse arguments. Added -L (lowercase), -d (output to directory), -f (fix corrupt cabs), -h (help), -q (quiet) and -v was recycled to become --version, when used on its own. * LZXdecompress(): major bug fixed; the updated R0, R1 and R2 in uncompressed blocks were being stored in the uncomp_state block, not local variables. At the end of the function, the local values are always written back to the uncomp_state block. So the values placed there by the uncompressed block header were always overwritten. Thanks to Pavel Turbin for providing an example of this. * rindex(): this is the BSD precursor of the ANSI standard function strrchr(). Oops! Now uses strrchr(), or rindex() if strrchr() isn't available. * cabinet_find_header(): now prints an error message if it can't find a header. 2001-04-30 Stuart Caie * fixed includes to include both and if they both exist, and made some signedness conversions explicit. This should let cabextract compile with SGI's native compiler. Thanks to Markus Nullmeier for the patch. 2001-03-04 Stuart Caie * main(): now prints the version of cabextract in the copyright line. * cabinet_find_header(): now searches any kind of file, not just files beginning with 'MZ' header. Also, always searches entire file. This slows the search down, but increases the usefulness of the search overall, IMHO. Thanks to Eric Sharkey for pointing this out. * LZXdecompress(): fixed problem in intel decoding: E8 must not appear in the last 10 bytes, not the last 6 bytes... Thanks to Jae Jung who pointed this out to me. I didn't believe him at first, but he was quite right. Also thanks to Antoine Amanieux for providing example files affected by this. * process_cabinet(): now extends multipart cabinet filenames to be in the same directory as the base cabinet. * cabinet_open(): now only lowercases the filename part of a cabinet name, not the path part. 2001-03-03 Stuart Caie * LZXdecompress(): fixed LZX bit buffer exhaustion in where READ_HUFFSYM() requests more bits than the buffer actually contains: top-of-loop overflow check now allows for the input pointer to be 16 bits past the end of the buffer, but checks to ensure none of those 16 bits are actually used. Also increased decomp_state.inbuf by two bytes and clear the two bytes after loaded block in decompress(). Thanks to Jae Jung for pointing out this bug, and for providing example files which exposed the bug. 2001-02-26 Stuart Caie * added configure script / makefile using automake. * file_close(): now sets the timestamp on extracted files. cabextract-1.11/mspack/0000775000175000017500000000000014376123646012051 500000000000000cabextract-1.11/mspack/system.c0000664000175000017500000001433513645115345013462 00000000000000/* This file is part of libmspack. * (C) 2003-2004 Stuart Caie. * * libmspack is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License (LGPL) version 2.1 * * For further details, see the file COPYING.LIB distributed with libmspack */ #ifdef HAVE_CONFIG_H # include #endif #include int mspack_version(int entity) { switch (entity) { /* CHM decoder version 1 -> 2 changes: * - added mschmd_sec_mscompressed::spaninfo * - added mschmd_header::first_pmgl * - added mschmd_header::last_pmgl * - added mschmd_header::chunk_cache; */ case MSPACK_VER_MSCHMD: /* CAB decoder version 1 -> 2 changes: * - added MSCABD_PARAM_SALVAGE */ case MSPACK_VER_MSCABD: /* OAB decoder version 1 -> 2 changes: * - added msoab_decompressor::set_param and MSOABD_PARAM_DECOMPBUF */ case MSPACK_VER_MSOABD: return 2; case MSPACK_VER_LIBRARY: case MSPACK_VER_SYSTEM: case MSPACK_VER_MSSZDDD: case MSPACK_VER_MSKWAJD: return 1; case MSPACK_VER_MSCABC: case MSPACK_VER_MSCHMC: case MSPACK_VER_MSLITD: case MSPACK_VER_MSLITC: case MSPACK_VER_MSHLPD: case MSPACK_VER_MSHLPC: case MSPACK_VER_MSSZDDC: case MSPACK_VER_MSKWAJC: case MSPACK_VER_MSOABC: return 0; } return -1; } int mspack_sys_selftest_internal(int offt_size) { return (sizeof(off_t) == offt_size) ? MSPACK_ERR_OK : MSPACK_ERR_SEEK; } /* validates a system structure */ int mspack_valid_system(struct mspack_system *sys) { return (sys != NULL) && (sys->open != NULL) && (sys->close != NULL) && (sys->read != NULL) && (sys->write != NULL) && (sys->seek != NULL) && (sys->tell != NULL) && (sys->message != NULL) && (sys->alloc != NULL) && (sys->free != NULL) && (sys->copy != NULL) && (sys->null_ptr == NULL); } /* returns the length of a file opened for reading */ int mspack_sys_filelen(struct mspack_system *system, struct mspack_file *file, off_t *length) { off_t current; if (!system || !file || !length) return MSPACK_ERR_OPEN; /* get current offset */ current = system->tell(file); /* seek to end of file */ if (system->seek(file, (off_t) 0, MSPACK_SYS_SEEK_END)) { return MSPACK_ERR_SEEK; } /* get offset of end of file */ *length = system->tell(file); /* seek back to original offset */ if (system->seek(file, current, MSPACK_SYS_SEEK_START)) { return MSPACK_ERR_SEEK; } return MSPACK_ERR_OK; } /* definition of mspack_default_system -- if the library is compiled with * MSPACK_NO_DEFAULT_SYSTEM, no default system will be provided. Otherwise, * an appropriate default system (e.g. the standard C library, or some native * API calls) */ #ifdef MSPACK_NO_DEFAULT_SYSTEM struct mspack_system *mspack_default_system = NULL; #else /* implementation of mspack_default_system for standard C library */ #include #include #include #include struct mspack_file_p { FILE *fh; const char *name; }; static struct mspack_file *msp_open(struct mspack_system *self, const char *filename, int mode) { struct mspack_file_p *fh; const char *fmode; switch (mode) { case MSPACK_SYS_OPEN_READ: fmode = "rb"; break; case MSPACK_SYS_OPEN_WRITE: fmode = "wb"; break; case MSPACK_SYS_OPEN_UPDATE: fmode = "r+b"; break; case MSPACK_SYS_OPEN_APPEND: fmode = "ab"; break; default: return NULL; } if ((fh = (struct mspack_file_p *) malloc(sizeof(struct mspack_file_p)))) { fh->name = filename; if ((fh->fh = fopen(filename, fmode))) return (struct mspack_file *) fh; free(fh); } return NULL; } static void msp_close(struct mspack_file *file) { struct mspack_file_p *self = (struct mspack_file_p *) file; if (self) { fclose(self->fh); free(self); } } static int msp_read(struct mspack_file *file, void *buffer, int bytes) { struct mspack_file_p *self = (struct mspack_file_p *) file; if (self && buffer && bytes >= 0) { size_t count = fread(buffer, 1, (size_t) bytes, self->fh); if (!ferror(self->fh)) return (int) count; } return -1; } static int msp_write(struct mspack_file *file, void *buffer, int bytes) { struct mspack_file_p *self = (struct mspack_file_p *) file; if (self && buffer && bytes >= 0) { size_t count = fwrite(buffer, 1, (size_t) bytes, self->fh); if (!ferror(self->fh)) return (int) count; } return -1; } static int msp_seek(struct mspack_file *file, off_t offset, int mode) { struct mspack_file_p *self = (struct mspack_file_p *) file; if (self) { switch (mode) { case MSPACK_SYS_SEEK_START: mode = SEEK_SET; break; case MSPACK_SYS_SEEK_CUR: mode = SEEK_CUR; break; case MSPACK_SYS_SEEK_END: mode = SEEK_END; break; default: return -1; } #if HAVE_FSEEKO return fseeko(self->fh, offset, mode); #else return fseek(self->fh, offset, mode); #endif } return -1; } static off_t msp_tell(struct mspack_file *file) { struct mspack_file_p *self = (struct mspack_file_p *) file; #if HAVE_FSEEKO return (self) ? (off_t) ftello(self->fh) : 0; #else return (self) ? (off_t) ftell(self->fh) : 0; #endif } static void msp_msg(struct mspack_file *file, const char *format, ...) { va_list ap; if (file) fprintf(stderr, "%s: ", ((struct mspack_file_p *) file)->name); va_start(ap, format); vfprintf(stderr, format, ap); va_end(ap); fputc((int) '\n', stderr); fflush(stderr); } static void *msp_alloc(struct mspack_system *self, size_t bytes) { #if DEBUG /* make uninitialised data obvious */ char *buf = malloc(bytes + 8); if (buf) memset(buf, 0xDC, bytes); *((size_t *)buf) = bytes; return &buf[8]; #else return malloc(bytes); #endif } static void msp_free(void *buffer) { #if DEBUG char *buf = buffer; size_t bytes; if (buf) { buf -= 8; bytes = *((size_t *)buf); /* make freed data obvious */ memset(buf, 0xED, bytes); free(buf); } #else free(buffer); #endif } static void msp_copy(void *src, void *dest, size_t bytes) { memcpy(dest, src, bytes); } static struct mspack_system msp_system = { &msp_open, &msp_close, &msp_read, &msp_write, &msp_seek, &msp_tell, &msp_msg, &msp_alloc, &msp_free, &msp_copy, NULL }; struct mspack_system *mspack_default_system = &msp_system; #endif cabextract-1.11/mspack/cabd.c0000664000175000017500000014177514370020662013031 00000000000000/* This file is part of libmspack. * (C) 2003-2023 Stuart Caie. * * libmspack is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License (LGPL) version 2.1 * * For further details, see the file COPYING.LIB distributed with libmspack */ /* Cabinet (.CAB) files are a form of file archive. Each cabinet contains * "folders", which are compressed spans of data. Each cabinet has * "files", whose metadata is in the cabinet header, but whose actual data * is stored compressed in one of the "folders". Cabinets can span more * than one physical file on disk, in which case they are a "cabinet set", * and usually the last folder of each cabinet extends into the next * cabinet. * * For a complete description of the format, see the MSDN site: * http://msdn.microsoft.com/en-us/library/bb267310.aspx */ /* CAB decompression implementation */ #include #include #include #include #include /* Notes on compliance with cabinet specification: * * One of the main changes between cabextract 0.6 and libmspack's cab * decompressor is the move from block-oriented decompression to * stream-oriented decompression. * * cabextract would read one data block from disk, decompress it with the * appropriate method, then write the decompressed data. The CAB * specification is specifically designed to work like this, as it ensures * compression matches do not span the maximum decompressed block size * limit of 32kb. * * However, the compression algorithms used are stream oriented, with * specific hacks added to them to enforce the "individual 32kb blocks" * rule in CABs. In other file formats, they do not have this limitation. * * In order to make more generalised decompressors, libmspack's CAB * decompressor has moved from being block-oriented to more stream * oriented. This also makes decompression slightly faster. * * However, this leads to incompliance with the CAB specification. The * CAB controller can no longer ensure each block of input given to the * decompressors is matched with their output. The "decompressed size" of * each individual block is thrown away. * * Each CAB block is supposed to be seen as individually compressed. This * means each consecutive data block can have completely different * "uncompressed" sizes, ranging from 1 to 32768 bytes. However, in * reality, all data blocks in a folder decompress to exactly 32768 bytes, * excepting the final block. * * Given this situation, the decompression algorithms are designed to * realign their input bitstreams on 32768 output-byte boundaries, and * various other special cases have been made. libmspack will not * correctly decompress LZX or Quantum compressed folders where the blocks * do not follow this "32768 bytes until last block" pattern. It could be * implemented if needed, but hopefully this is not necessary -- it has * not been seen in over 3Gb of CAB archives. */ /* prototypes */ static struct mscabd_cabinet * cabd_open( struct mscab_decompressor *base, const char *filename); static void cabd_close( struct mscab_decompressor *base, struct mscabd_cabinet *origcab); static int cabd_read_headers( struct mspack_system *sys, struct mspack_file *fh, struct mscabd_cabinet_p *cab, off_t offset, int salvage, int quiet); static char *cabd_read_string( struct mspack_system *sys, struct mspack_file *fh, int permit_empty, int *error); static struct mscabd_cabinet *cabd_search( struct mscab_decompressor *base, const char *filename); static int cabd_find( struct mscab_decompressor_p *self, unsigned char *buf, struct mspack_file *fh, const char *filename, off_t flen, off_t *firstlen, struct mscabd_cabinet_p **firstcab); static int cabd_prepend( struct mscab_decompressor *base, struct mscabd_cabinet *cab, struct mscabd_cabinet *prevcab); static int cabd_append( struct mscab_decompressor *base, struct mscabd_cabinet *cab, struct mscabd_cabinet *nextcab); static int cabd_merge( struct mscab_decompressor *base, struct mscabd_cabinet *lcab, struct mscabd_cabinet *rcab); static int cabd_can_merge_folders( struct mspack_system *sys, struct mscabd_folder_p *lfol, struct mscabd_folder_p *rfol); static int cabd_extract( struct mscab_decompressor *base, struct mscabd_file *file, const char *filename); static int cabd_init_decomp( struct mscab_decompressor_p *self, unsigned int ct); static void cabd_free_decomp( struct mscab_decompressor_p *self); static int cabd_sys_read( struct mspack_file *file, void *buffer, int bytes); static int cabd_sys_write( struct mspack_file *file, void *buffer, int bytes); static int cabd_sys_read_block( struct mspack_system *sys, struct mscabd_decompress_state *d, int *out, int ignore_cksum, int ignore_blocksize); static unsigned int cabd_checksum( unsigned char *data, unsigned int bytes, unsigned int cksum); static struct noned_state *noned_init( struct mspack_system *sys, struct mspack_file *in, struct mspack_file *out, int bufsize); static int noned_decompress( struct noned_state *s, off_t bytes); static void noned_free( struct noned_state *state); static int cabd_param( struct mscab_decompressor *base, int param, int value); static int cabd_error( struct mscab_decompressor *base); /*************************************** * MSPACK_CREATE_CAB_DECOMPRESSOR *************************************** * constructor */ struct mscab_decompressor * mspack_create_cab_decompressor(struct mspack_system *sys) { struct mscab_decompressor_p *self = NULL; if (!sys) sys = mspack_default_system; if (!mspack_valid_system(sys)) return NULL; if ((self = (struct mscab_decompressor_p *) sys->alloc(sys, sizeof(struct mscab_decompressor_p)))) { self->base.open = &cabd_open; self->base.close = &cabd_close; self->base.search = &cabd_search; self->base.extract = &cabd_extract; self->base.prepend = &cabd_prepend; self->base.append = &cabd_append; self->base.set_param = &cabd_param; self->base.last_error = &cabd_error; self->system = sys; self->d = NULL; self->error = MSPACK_ERR_OK; self->searchbuf_size = 32768; self->fix_mszip = 0; self->buf_size = 4096; self->salvage = 0; } return (struct mscab_decompressor *) self; } /*************************************** * MSPACK_DESTROY_CAB_DECOMPRESSOR *************************************** * destructor */ void mspack_destroy_cab_decompressor(struct mscab_decompressor *base) { struct mscab_decompressor_p *self = (struct mscab_decompressor_p *) base; if (self) { struct mspack_system *sys = self->system; if (self->d) { if (self->d->infh) sys->close(self->d->infh); cabd_free_decomp(self); sys->free(self->d); } sys->free(self); } } /*************************************** * CABD_OPEN *************************************** * opens a file and tries to read it as a cabinet file */ static struct mscabd_cabinet *cabd_open(struct mscab_decompressor *base, const char *filename) { struct mscab_decompressor_p *self = (struct mscab_decompressor_p *) base; struct mscabd_cabinet_p *cab = NULL; struct mspack_system *sys; struct mspack_file *fh; int error; if (!base) return NULL; sys = self->system; if ((fh = sys->open(sys, filename, MSPACK_SYS_OPEN_READ))) { if ((cab = (struct mscabd_cabinet_p *) sys->alloc(sys, sizeof(struct mscabd_cabinet_p)))) { cab->base.filename = filename; error = cabd_read_headers(sys, fh, cab, (off_t) 0, self->salvage, 0); if (error) { cabd_close(base, (struct mscabd_cabinet *) cab); cab = NULL; } self->error = error; } else { self->error = MSPACK_ERR_NOMEMORY; } sys->close(fh); } else { self->error = MSPACK_ERR_OPEN; } return (struct mscabd_cabinet *) cab; } /*************************************** * CABD_CLOSE *************************************** * frees all memory associated with a given mscabd_cabinet. */ static void cabd_close(struct mscab_decompressor *base, struct mscabd_cabinet *origcab) { struct mscab_decompressor_p *self = (struct mscab_decompressor_p *) base; struct mscabd_folder_data *dat, *ndat; struct mscabd_cabinet *cab, *ncab; struct mscabd_folder *fol, *nfol; struct mscabd_file *fi, *nfi; struct mspack_system *sys; if (!base) return; sys = self->system; self->error = MSPACK_ERR_OK; while (origcab) { /* free files */ for (fi = origcab->files; fi; fi = nfi) { nfi = fi->next; sys->free(fi->filename); sys->free(fi); } /* free folders */ for (fol = origcab->folders; fol; fol = nfol) { nfol = fol->next; /* free folder decompression state if it has been decompressed */ if (self->d && (self->d->folder == (struct mscabd_folder_p *) fol)) { if (self->d->infh) sys->close(self->d->infh); cabd_free_decomp(self); sys->free(self->d); self->d = NULL; } /* free folder data segments */ for (dat = ((struct mscabd_folder_p *)fol)->data.next; dat; dat = ndat) { ndat = dat->next; sys->free(dat); } sys->free(fol); } /* free predecessor cabinets (and the original cabinet's strings) */ for (cab = origcab; cab; cab = ncab) { ncab = cab->prevcab; sys->free(cab->prevname); sys->free(cab->nextname); sys->free(cab->previnfo); sys->free(cab->nextinfo); if (cab != origcab) sys->free(cab); } /* free successor cabinets */ for (cab = origcab->nextcab; cab; cab = ncab) { ncab = cab->nextcab; sys->free(cab->prevname); sys->free(cab->nextname); sys->free(cab->previnfo); sys->free(cab->nextinfo); sys->free(cab); } /* free actual cabinet structure */ cab = origcab->next; sys->free(origcab); /* repeat full procedure again with the cab->next pointer (if set) */ origcab = cab; } } /*************************************** * CABD_READ_HEADERS *************************************** * reads the cabinet file header, folder list and file list. * fills out a pre-existing mscabd_cabinet structure, allocates memory * for folders and files as necessary */ static int cabd_read_headers(struct mspack_system *sys, struct mspack_file *fh, struct mscabd_cabinet_p *cab, off_t offset, int salvage, int quiet) { int num_folders, num_files, folder_resv, i, x, err, fidx; struct mscabd_folder_p *fol, *linkfol = NULL; struct mscabd_file *file, *linkfile = NULL; unsigned char buf[64]; /* initialise pointers */ cab->base.next = NULL; cab->base.files = NULL; cab->base.folders = NULL; cab->base.prevcab = cab->base.nextcab = NULL; cab->base.prevname = cab->base.nextname = NULL; cab->base.previnfo = cab->base.nextinfo = NULL; cab->base.base_offset = offset; /* seek to CFHEADER */ if (sys->seek(fh, offset, MSPACK_SYS_SEEK_START)) { return MSPACK_ERR_SEEK; } /* read in the CFHEADER */ if (sys->read(fh, &buf[0], cfhead_SIZEOF) != cfhead_SIZEOF) { return MSPACK_ERR_READ; } /* check for "MSCF" signature */ if (EndGetI32(&buf[cfhead_Signature]) != 0x4643534D) { return MSPACK_ERR_SIGNATURE; } /* some basic header fields */ cab->base.length = EndGetI32(&buf[cfhead_CabinetSize]); cab->base.set_id = EndGetI16(&buf[cfhead_SetID]); cab->base.set_index = EndGetI16(&buf[cfhead_CabinetIndex]); /* get the number of folders */ num_folders = EndGetI16(&buf[cfhead_NumFolders]); if (num_folders == 0) { if (!quiet) sys->message(fh, "no folders in cabinet."); return MSPACK_ERR_DATAFORMAT; } /* get the number of files */ num_files = EndGetI16(&buf[cfhead_NumFiles]); if (num_files == 0) { if (!quiet) sys->message(fh, "no files in cabinet."); return MSPACK_ERR_DATAFORMAT; } /* check cabinet version */ if ((buf[cfhead_MajorVersion] != 1) && (buf[cfhead_MinorVersion] != 3)) { if (!quiet) sys->message(fh, "WARNING; cabinet version is not 1.3"); } /* read the reserved-sizes part of header, if present */ cab->base.flags = EndGetI16(&buf[cfhead_Flags]); if (cab->base.flags & cfheadRESERVE_PRESENT) { if (sys->read(fh, &buf[0], cfheadext_SIZEOF) != cfheadext_SIZEOF) { return MSPACK_ERR_READ; } cab->base.header_resv = EndGetI16(&buf[cfheadext_HeaderReserved]); folder_resv = buf[cfheadext_FolderReserved]; cab->block_resv = buf[cfheadext_DataReserved]; if (cab->base.header_resv > 60000) { if (!quiet) sys->message(fh, "WARNING; reserved header > 60000."); } /* skip the reserved header */ if (cab->base.header_resv) { if (sys->seek(fh, (off_t) cab->base.header_resv, MSPACK_SYS_SEEK_CUR)) { return MSPACK_ERR_SEEK; } } } else { cab->base.header_resv = 0; folder_resv = 0; cab->block_resv = 0; } /* read name and info of preceeding cabinet in set, if present */ if (cab->base.flags & cfheadPREV_CABINET) { cab->base.prevname = cabd_read_string(sys, fh, 0, &err); if (err) return err; cab->base.previnfo = cabd_read_string(sys, fh, 1, &err); if (err) return err; } /* read name and info of next cabinet in set, if present */ if (cab->base.flags & cfheadNEXT_CABINET) { cab->base.nextname = cabd_read_string(sys, fh, 0, &err); if (err) return err; cab->base.nextinfo = cabd_read_string(sys, fh, 1, &err); if (err) return err; } /* read folders */ for (i = 0; i < num_folders; i++) { if (sys->read(fh, &buf[0], cffold_SIZEOF) != cffold_SIZEOF) { return MSPACK_ERR_READ; } if (folder_resv) { if (sys->seek(fh, (off_t) folder_resv, MSPACK_SYS_SEEK_CUR)) { return MSPACK_ERR_SEEK; } } if (!(fol = (struct mscabd_folder_p *) sys->alloc(sys, sizeof(struct mscabd_folder_p)))) { return MSPACK_ERR_NOMEMORY; } fol->base.next = NULL; fol->base.comp_type = EndGetI16(&buf[cffold_CompType]); fol->base.num_blocks = EndGetI16(&buf[cffold_NumBlocks]); fol->data.next = NULL; fol->data.cab = (struct mscabd_cabinet_p *) cab; fol->data.offset = offset + (off_t) ( (unsigned int) EndGetI32(&buf[cffold_DataOffset]) ); fol->merge_prev = NULL; fol->merge_next = NULL; /* link folder into list of folders */ if (!linkfol) cab->base.folders = (struct mscabd_folder *) fol; else linkfol->base.next = (struct mscabd_folder *) fol; linkfol = fol; } /* read files */ for (i = 0; i < num_files; i++) { if (sys->read(fh, &buf[0], cffile_SIZEOF) != cffile_SIZEOF) { return MSPACK_ERR_READ; } if (!(file = (struct mscabd_file *) sys->alloc(sys, sizeof(struct mscabd_file)))) { return MSPACK_ERR_NOMEMORY; } file->next = NULL; file->length = EndGetI32(&buf[cffile_UncompressedSize]); file->attribs = EndGetI16(&buf[cffile_Attribs]); file->offset = EndGetI32(&buf[cffile_FolderOffset]); /* set folder pointer */ fidx = EndGetI16(&buf[cffile_FolderIndex]); if (fidx < cffileCONTINUED_FROM_PREV) { /* normal folder index; count up to the correct folder */ if (fidx < num_folders) { struct mscabd_folder *ifol = cab->base.folders; while (fidx--) if (ifol) ifol = ifol->next; file->folder = ifol; } else { D(("invalid folder index")) file->folder = NULL; } } else { /* either CONTINUED_TO_NEXT, CONTINUED_FROM_PREV or * CONTINUED_PREV_AND_NEXT */ if ((fidx == cffileCONTINUED_TO_NEXT) || (fidx == cffileCONTINUED_PREV_AND_NEXT)) { /* get last folder */ struct mscabd_folder *ifol = cab->base.folders; while (ifol->next) ifol = ifol->next; file->folder = ifol; /* set "merge next" pointer */ fol = (struct mscabd_folder_p *) ifol; if (!fol->merge_next) fol->merge_next = file; } if ((fidx == cffileCONTINUED_FROM_PREV) || (fidx == cffileCONTINUED_PREV_AND_NEXT)) { /* get first folder */ file->folder = cab->base.folders; /* set "merge prev" pointer */ fol = (struct mscabd_folder_p *) file->folder; if (!fol->merge_prev) fol->merge_prev = file; } } /* get time */ x = EndGetI16(&buf[cffile_Time]); file->time_h = x >> 11; file->time_m = (x >> 5) & 0x3F; file->time_s = (x << 1) & 0x3E; /* get date */ x = EndGetI16(&buf[cffile_Date]); file->date_d = x & 0x1F; file->date_m = (x >> 5) & 0xF; file->date_y = (x >> 9) + 1980; /* get filename */ file->filename = cabd_read_string(sys, fh, 0, &err); /* if folder index or filename are bad, either skip it or fail */ if (err || !file->folder) { sys->free(file->filename); sys->free(file); if (salvage) continue; return err ? err : MSPACK_ERR_DATAFORMAT; } /* link file entry into file list */ if (!linkfile) cab->base.files = file; else linkfile->next = file; linkfile = file; } if (cab->base.files == NULL) { /* We never actually added any files to the file list. Something went wrong. * The file header may have been invalid */ D(("No files found, even though header claimed to have %d files", num_files)) return MSPACK_ERR_DATAFORMAT; } return MSPACK_ERR_OK; } static char *cabd_read_string(struct mspack_system *sys, struct mspack_file *fh, int permit_empty, int *error) { off_t base = sys->tell(fh); char buf[256], *str; int len, i, ok; /* read up to 256 bytes */ if ((len = sys->read(fh, &buf[0], 256)) <= 0) { *error = MSPACK_ERR_READ; return NULL; } /* search for a null terminator in the buffer */ for (i = 0, ok = 0; i < len; i++) if (!buf[i]) { ok = 1; break; } /* optionally reject empty strings */ if (i == 0 && !permit_empty) ok = 0; if (!ok) { *error = MSPACK_ERR_DATAFORMAT; return NULL; } len = i + 1; /* set the data stream to just after the string and return */ if (sys->seek(fh, base + (off_t)len, MSPACK_SYS_SEEK_START)) { *error = MSPACK_ERR_SEEK; return NULL; } if (!(str = (char *) sys->alloc(sys, len))) { *error = MSPACK_ERR_NOMEMORY; return NULL; } sys->copy(&buf[0], str, len); *error = MSPACK_ERR_OK; return str; } /*************************************** * CABD_SEARCH, CABD_FIND *************************************** * cabd_search opens a file, finds its extent, allocates a search buffer, * then reads through the whole file looking for possible cabinet headers. * if it finds any, it tries to read them as real cabinets. returns a linked * list of results * * cabd_find is the inner loop of cabd_search, to make it easier to * break out of the loop and be sure that all resources are freed */ static struct mscabd_cabinet *cabd_search(struct mscab_decompressor *base, const char *filename) { struct mscab_decompressor_p *self = (struct mscab_decompressor_p *) base; struct mscabd_cabinet_p *cab = NULL; struct mspack_system *sys; unsigned char *search_buf; struct mspack_file *fh; off_t filelen, firstlen = 0; if (!base) return NULL; sys = self->system; /* allocate a search buffer */ search_buf = (unsigned char *) sys->alloc(sys, (size_t) self->searchbuf_size); if (!search_buf) { self->error = MSPACK_ERR_NOMEMORY; return NULL; } /* open file and get its full file length */ if ((fh = sys->open(sys, filename, MSPACK_SYS_OPEN_READ))) { if (!(self->error = mspack_sys_filelen(sys, fh, &filelen))) { self->error = cabd_find(self, search_buf, fh, filename, filelen, &firstlen, &cab); } /* truncated / extraneous data warning: */ if (firstlen && (firstlen != filelen) && (!cab || (cab->base.base_offset == 0))) { if (firstlen < filelen) { sys->message(fh, "WARNING; possible %" LD " extra bytes at end of file.", filelen - firstlen); } else { sys->message(fh, "WARNING; file possibly truncated by %" LD " bytes.", firstlen - filelen); } } sys->close(fh); } else { self->error = MSPACK_ERR_OPEN; } /* free the search buffer */ sys->free(search_buf); return (struct mscabd_cabinet *) cab; } static int cabd_find(struct mscab_decompressor_p *self, unsigned char *buf, struct mspack_file *fh, const char *filename, off_t flen, off_t *firstlen, struct mscabd_cabinet_p **firstcab) { struct mscabd_cabinet_p *cab, *link = NULL; off_t caboff, offset, length; struct mspack_system *sys = self->system; unsigned char *p, *pend, state = 0; unsigned int cablen_u32 = 0, foffset_u32 = 0; int false_cabs = 0; #if SIZEOF_OFF_T < 8 /* detect 32-bit off_t overflow */ if (flen < 0) { sys->message(fh, "library not compiled to support large files."); return MSPACK_ERR_OK; } #endif /* search through the full file length */ for (offset = 0; offset < flen; offset += length) { /* search length is either the full length of the search buffer, or the * amount of data remaining to the end of the file, whichever is less. */ length = flen - offset; if (length > self->searchbuf_size) { length = self->searchbuf_size; } /* fill the search buffer with data from disk */ if (sys->read(fh, &buf[0], (int) length) != (int) length) { return MSPACK_ERR_READ; } /* FAQ avoidance strategy */ if ((offset == 0) && (EndGetI32(&buf[0]) == 0x28635349)) { sys->message(fh, "WARNING; found InstallShield header. Use unshield " "(https://github.com/twogood/unshield) to unpack this file"); } /* read through the entire buffer. */ for (p = &buf[0], pend = &buf[length]; p < pend; ) { switch (state) { /* starting state */ case 0: /* we spend most of our time in this while loop, looking for * a leading 'M' of the 'MSCF' signature */ while (p < pend && *p != 0x4D) p++; /* if we found tht 'M', advance state */ if (p++ < pend) state = 1; break; /* verify that the next 3 bytes are 'S', 'C' and 'F' */ case 1: state = (*p++ == 0x53) ? 2 : 0; break; case 2: state = (*p++ == 0x43) ? 3 : 0; break; case 3: state = (*p++ == 0x46) ? 4 : 0; break; /* we don't care about bytes 4-7 (see default: for action) */ /* bytes 8-11 are the overall length of the cabinet */ case 8: cablen_u32 = *p++; state++; break; case 9: cablen_u32 |= *p++ << 8; state++; break; case 10: cablen_u32 |= *p++ << 16; state++; break; case 11: cablen_u32 |= *p++ << 24; state++; break; /* we don't care about bytes 12-15 (see default: for action) */ /* bytes 16-19 are the offset within the cabinet of the filedata */ case 16: foffset_u32 = *p++; state++; break; case 17: foffset_u32 |= *p++ << 8; state++; break; case 18: foffset_u32 |= *p++ << 16; state++; break; case 19: foffset_u32 |= *p++ << 24; /* now we have recieved 20 bytes of potential cab header. work out * the offset in the file of this potential cabinet */ caboff = offset + (p - &buf[0]) - 20; /* should reading cabinet fail, restart search just after 'MSCF' */ offset = caboff + 4; /* capture the "length of cabinet" field if there is a cabinet at * offset 0 in the file, regardless of whether the cabinet can be * read correctly or not */ if (caboff == 0) *firstlen = (off_t) cablen_u32; /* check that the files offset is less than the alleged length of * the cabinet, and that the offset + the alleged length are * 'roughly' within the end of overall file length. In salvage * mode, don't check the alleged length, allow it to be garbage */ if ((foffset_u32 < cablen_u32) && ((caboff + (off_t) foffset_u32) < (flen + 32)) && (((caboff + (off_t) cablen_u32) < (flen + 32)) || self->salvage)) { /* likely cabinet found -- try reading it */ if (!(cab = (struct mscabd_cabinet_p *) sys->alloc(sys, sizeof(struct mscabd_cabinet_p)))) { return MSPACK_ERR_NOMEMORY; } cab->base.filename = filename; if (cabd_read_headers(sys, fh, cab, caboff, self->salvage, 1)) { /* destroy the failed cabinet */ cabd_close((struct mscab_decompressor *) self, (struct mscabd_cabinet *) cab); false_cabs++; } else { /* cabinet read correctly! */ /* link the cab into the list */ if (!link) *firstcab = cab; else link->base.next = (struct mscabd_cabinet *) cab; link = cab; /* cause the search to restart after this cab's data. */ offset = caboff + (off_t) cablen_u32; #if SIZEOF_OFF_T < 8 /* detect 32-bit off_t overflow */ if (offset < caboff) { sys->message(fh, "library not compiled to support large files."); return MSPACK_ERR_OK; } #endif } } /* restart search */ if (offset >= flen) return MSPACK_ERR_OK; if (sys->seek(fh, offset, MSPACK_SYS_SEEK_START)) { return MSPACK_ERR_SEEK; } length = 0; p = pend; state = 0; break; /* for bytes 4-7 and 12-15, just advance state/pointer */ default: p++, state++; } /* switch(state) */ } /* for (... p < pend ...) */ } /* for (... offset < length ...) */ if (false_cabs) { D(("%d false cabinets found", false_cabs)) } return MSPACK_ERR_OK; } /*************************************** * CABD_MERGE, CABD_PREPEND, CABD_APPEND *************************************** * joins cabinets together, also merges split folders between these two * cabinets only. This includes freeing the duplicate folder and file(s) * and allocating a further mscabd_folder_data structure to append to the * merged folder's data parts list. */ static int cabd_prepend(struct mscab_decompressor *base, struct mscabd_cabinet *cab, struct mscabd_cabinet *prevcab) { return cabd_merge(base, prevcab, cab); } static int cabd_append(struct mscab_decompressor *base, struct mscabd_cabinet *cab, struct mscabd_cabinet *nextcab) { return cabd_merge(base, cab, nextcab); } static int cabd_merge(struct mscab_decompressor *base, struct mscabd_cabinet *lcab, struct mscabd_cabinet *rcab) { struct mscab_decompressor_p *self = (struct mscab_decompressor_p *) base; struct mscabd_folder_data *data, *ndata; struct mscabd_folder_p *lfol, *rfol; struct mscabd_file *fi, *rfi, *lfi; struct mscabd_cabinet *cab; struct mspack_system *sys; if (!self) return MSPACK_ERR_ARGS; sys = self->system; /* basic args check */ if (!lcab || !rcab || (lcab == rcab)) { D(("lcab NULL, rcab NULL or lcab = rcab")) return self->error = MSPACK_ERR_ARGS; } /* check there's not already a cabinet attached */ if (lcab->nextcab || rcab->prevcab) { D(("cabs already joined")) return self->error = MSPACK_ERR_ARGS; } /* do not create circular cabinet chains */ for (cab = lcab->prevcab; cab; cab = cab->prevcab) { if (cab == rcab) {D(("circular!")) return self->error = MSPACK_ERR_ARGS;} } for (cab = rcab->nextcab; cab; cab = cab->nextcab) { if (cab == lcab) {D(("circular!")) return self->error = MSPACK_ERR_ARGS;} } /* warn about odd set IDs or indices */ if (lcab->set_id != rcab->set_id) { sys->message(NULL, "WARNING; merged cabinets with differing Set IDs."); } if (lcab->set_index > rcab->set_index) { sys->message(NULL, "WARNING; merged cabinets with odd order."); } /* merging the last folder in lcab with the first folder in rcab */ lfol = (struct mscabd_folder_p *) lcab->folders; rfol = (struct mscabd_folder_p *) rcab->folders; while (lfol->base.next) lfol = (struct mscabd_folder_p *) lfol->base.next; /* do we need to merge folders? */ if (!lfol->merge_next && !rfol->merge_prev) { /* no, at least one of the folders is not for merging */ /* attach cabs */ lcab->nextcab = rcab; rcab->prevcab = lcab; /* attach folders */ lfol->base.next = (struct mscabd_folder *) rfol; /* attach files */ fi = lcab->files; while (fi->next) fi = fi->next; fi->next = rcab->files; } else { /* folder merge required - do the files match? */ if (! cabd_can_merge_folders(sys, lfol, rfol)) { return self->error = MSPACK_ERR_DATAFORMAT; } /* allocate a new folder data structure */ if (!(data = (struct mscabd_folder_data *) sys->alloc(sys, sizeof(struct mscabd_folder_data)))) { return self->error = MSPACK_ERR_NOMEMORY; } /* attach cabs */ lcab->nextcab = rcab; rcab->prevcab = lcab; /* append rfol's data to lfol */ ndata = &lfol->data; while (ndata->next) ndata = ndata->next; ndata->next = data; *data = rfol->data; rfol->data.next = NULL; /* lfol becomes rfol. * NOTE: special case, don't merge if rfol is merge prev and next, * rfol->merge_next is going to be deleted, so keep lfol's version * instead */ lfol->base.num_blocks += rfol->base.num_blocks - 1; if ((rfol->merge_next == NULL) || (rfol->merge_next->folder != (struct mscabd_folder *) rfol)) { lfol->merge_next = rfol->merge_next; } /* attach the rfol's folder (except the merge folder) */ while (lfol->base.next) lfol = (struct mscabd_folder_p *) lfol->base.next; lfol->base.next = rfol->base.next; /* free disused merge folder */ sys->free(rfol); /* attach rfol's files */ fi = lcab->files; while (fi->next) fi = fi->next; fi->next = rcab->files; /* delete all files from rfol's merge folder */ lfi = NULL; for (fi = lcab->files; fi ; fi = rfi) { rfi = fi->next; /* if file's folder matches the merge folder, unlink and free it */ if (fi->folder == (struct mscabd_folder *) rfol) { if (lfi) lfi->next = rfi; else lcab->files = rfi; sys->free(fi->filename); sys->free(fi); } else lfi = fi; } } /* all done! fix files and folders pointers in all cabs so they all * point to the same list */ for (cab = lcab->prevcab; cab; cab = cab->prevcab) { cab->files = lcab->files; cab->folders = lcab->folders; } for (cab = lcab->nextcab; cab; cab = cab->nextcab) { cab->files = lcab->files; cab->folders = lcab->folders; } return self->error = MSPACK_ERR_OK; } /* decides if two folders are OK to merge */ static int cabd_can_merge_folders(struct mspack_system *sys, struct mscabd_folder_p *lfol, struct mscabd_folder_p *rfol) { struct mscabd_file *lfi, *rfi, *l, *r; int matching = 1; /* check that both folders use the same compression method/settings */ if (lfol->base.comp_type != rfol->base.comp_type) { D(("folder merge: compression type mismatch")) return 0; } /* check there are not too many data blocks after merging */ if ((lfol->base.num_blocks + rfol->base.num_blocks) > CAB_FOLDERMAX) { D(("folder merge: too many data blocks in merged folders")) return 0; } if (!(lfi = lfol->merge_next) || !(rfi = rfol->merge_prev)) { D(("folder merge: one cabinet has no files to merge")) return 0; } /* for all files in lfol (which is the last folder in whichever cab and * only has files to merge), compare them to the files from rfol. They * should be identical in number and order. to verify this, check the * offset and length of each file. */ for (l=lfi, r=rfi; l; l=l->next, r=r->next) { if (!r || (l->offset != r->offset) || (l->length != r->length)) { matching = 0; break; } } if (matching) return 1; /* if rfol does not begin with an identical copy of the files in lfol, make * make a judgement call; if at least ONE file from lfol is in rfol, allow * the merge with a warning about missing files. */ matching = 0; for (l = lfi; l; l = l->next) { for (r = rfi; r; r = r->next) { if (l->offset == r->offset && l->length == r->length) break; } if (r) matching = 1; else sys->message(NULL, "WARNING; merged file %s not listed in both cabinets", l->filename); } return matching; } /*************************************** * CABD_EXTRACT *************************************** * extracts a file from a cabinet */ static int cabd_extract(struct mscab_decompressor *base, struct mscabd_file *file, const char *filename) { struct mscab_decompressor_p *self = (struct mscab_decompressor_p *) base; struct mscabd_folder_p *fol; struct mspack_system *sys; struct mspack_file *fh; unsigned int filelen; if (!self) return MSPACK_ERR_ARGS; if (!file) return self->error = MSPACK_ERR_ARGS; sys = self->system; fol = (struct mscabd_folder_p *) file->folder; /* if offset is beyond 2GB, nothing can be extracted */ if (file->offset > CAB_LENGTHMAX) { return self->error = MSPACK_ERR_DATAFORMAT; } /* if file claims to go beyond 2GB either error out, * or in salvage mode reduce file length so it fits 2GB limit */ filelen = file->length; if (filelen > (CAB_LENGTHMAX - file->offset)) { if (self->salvage) { filelen = CAB_LENGTHMAX - file->offset; } else { return self->error = MSPACK_ERR_DATAFORMAT; } } /* extraction impossible if no folder, or folder needs predecessor */ if (!fol || fol->merge_prev) { sys->message(NULL, "ERROR; file \"%s\" cannot be extracted, " "cabinet set is incomplete", file->filename); return self->error = MSPACK_ERR_DECRUNCH; } /* if file goes beyond what can be decoded, given an error. * In salvage mode, don't assume block sizes, just try decoding */ if (!self->salvage) { unsigned int maxlen = fol->base.num_blocks * CAB_BLOCKMAX; if (file->offset > maxlen || filelen > (maxlen - file->offset)) { sys->message(NULL, "ERROR; file \"%s\" cannot be extracted, " "cabinet set is incomplete", file->filename); return self->error = MSPACK_ERR_DECRUNCH; } } /* allocate generic decompression state */ if (!self->d) { self->d = (struct mscabd_decompress_state *) sys->alloc(sys, sizeof(struct mscabd_decompress_state)); if (!self->d) return self->error = MSPACK_ERR_NOMEMORY; self->d->folder = NULL; self->d->data = NULL; self->d->sys = *sys; self->d->sys.read = &cabd_sys_read; self->d->sys.write = &cabd_sys_write; self->d->state = NULL; self->d->infh = NULL; self->d->incab = NULL; } /* do we need to change folder or reset the current folder? */ if ((self->d->folder != fol) || (self->d->offset > file->offset) || !self->d->state) { /* free any existing decompressor */ cabd_free_decomp(self); /* do we need to open a new cab file? */ if (!self->d->infh || (fol->data.cab != self->d->incab)) { /* close previous file handle if from a different cab */ if (self->d->infh) sys->close(self->d->infh); self->d->incab = fol->data.cab; self->d->infh = sys->open(sys, fol->data.cab->base.filename, MSPACK_SYS_OPEN_READ); if (!self->d->infh) return self->error = MSPACK_ERR_OPEN; } /* seek to start of data blocks */ if (sys->seek(self->d->infh, fol->data.offset, MSPACK_SYS_SEEK_START)) { return self->error = MSPACK_ERR_SEEK; } /* set up decompressor */ if (cabd_init_decomp(self, (unsigned int) fol->base.comp_type)) { return self->error; } /* initialise new folder state */ self->d->folder = fol; self->d->data = &fol->data; self->d->offset = 0; self->d->block = 0; self->d->outlen = 0; self->d->i_ptr = self->d->i_end = &self->d->input[0]; /* read_error lasts for the lifetime of a decompressor */ self->read_error = MSPACK_ERR_OK; } /* open file for output */ if (!(fh = sys->open(sys, filename, MSPACK_SYS_OPEN_WRITE))) { return self->error = MSPACK_ERR_OPEN; } self->error = MSPACK_ERR_OK; /* if file has more than 0 bytes */ if (filelen) { off_t bytes; int error; /* get to correct offset. * - use NULL fh to say 'no writing' to cabd_sys_write() * - if cabd_sys_read() has an error, it will set self->read_error * and pass back MSPACK_ERR_READ */ self->d->outfh = NULL; if ((bytes = file->offset - self->d->offset)) { error = self->d->decompress(self->d->state, bytes); self->error = (error == MSPACK_ERR_READ) ? self->read_error : error; } /* if getting to the correct offset was error free, unpack file */ if (!self->error) { self->d->outfh = fh; error = self->d->decompress(self->d->state, filelen); self->error = (error == MSPACK_ERR_READ) ? self->read_error : error; } } /* close output file */ sys->close(fh); self->d->outfh = NULL; return self->error; } /*************************************** * CABD_INIT_DECOMP, CABD_FREE_DECOMP *************************************** * cabd_init_decomp initialises decompression state, according to which * decompression method was used. relies on self->d->folder being the same * as when initialised. * * cabd_free_decomp frees decompression state, according to which method * was used. */ static int cabd_init_decomp(struct mscab_decompressor_p *self, unsigned int ct) { struct mspack_file *fh = (struct mspack_file *) self; self->d->comp_type = ct; switch (ct & cffoldCOMPTYPE_MASK) { case cffoldCOMPTYPE_NONE: self->d->decompress = (int (*)(void *, off_t)) &noned_decompress; self->d->state = noned_init(&self->d->sys, fh, fh, self->buf_size); break; case cffoldCOMPTYPE_MSZIP: self->d->decompress = (int (*)(void *, off_t)) &mszipd_decompress; self->d->state = mszipd_init(&self->d->sys, fh, fh, self->buf_size, self->fix_mszip); break; case cffoldCOMPTYPE_QUANTUM: self->d->decompress = (int (*)(void *, off_t)) &qtmd_decompress; self->d->state = qtmd_init(&self->d->sys, fh, fh, (int) (ct >> 8) & 0x1f, self->buf_size); break; case cffoldCOMPTYPE_LZX: self->d->decompress = (int (*)(void *, off_t)) &lzxd_decompress; self->d->state = lzxd_init(&self->d->sys, fh, fh, (int) (ct >> 8) & 0x1f, 0, self->buf_size, (off_t)0,0); break; default: return self->error = MSPACK_ERR_DATAFORMAT; } return self->error = (self->d->state) ? MSPACK_ERR_OK : MSPACK_ERR_NOMEMORY; } static void cabd_free_decomp(struct mscab_decompressor_p *self) { if (!self || !self->d || !self->d->state) return; switch (self->d->comp_type & cffoldCOMPTYPE_MASK) { case cffoldCOMPTYPE_NONE: noned_free((struct noned_state *) self->d->state); break; case cffoldCOMPTYPE_MSZIP: mszipd_free((struct mszipd_stream *) self->d->state); break; case cffoldCOMPTYPE_QUANTUM: qtmd_free((struct qtmd_stream *) self->d->state); break; case cffoldCOMPTYPE_LZX: lzxd_free((struct lzxd_stream *) self->d->state); break; } self->d->decompress = NULL; self->d->state = NULL; } /*************************************** * CABD_SYS_READ, CABD_SYS_WRITE *************************************** * cabd_sys_read is the internal reader function which the decompressors * use. will read data blocks (and merge split blocks) from the cabinet * and serve the read bytes to the decompressors * * cabd_sys_write is the internal writer function which the decompressors * use. it either writes data to disk (self->d->outfh) with the real * sys->write() function, or does nothing with the data when * self->d->outfh == NULL. advances self->d->offset */ static int cabd_sys_read(struct mspack_file *file, void *buffer, int bytes) { struct mscab_decompressor_p *self = (struct mscab_decompressor_p *) file; unsigned char *buf = (unsigned char *) buffer; struct mspack_system *sys = self->system; int avail, todo, outlen, ignore_cksum, ignore_blocksize; ignore_cksum = self->salvage || (self->fix_mszip && ((self->d->comp_type & cffoldCOMPTYPE_MASK) == cffoldCOMPTYPE_MSZIP)); ignore_blocksize = self->salvage; todo = bytes; while (todo > 0) { avail = self->d->i_end - self->d->i_ptr; /* if out of input data, read a new block */ if (avail) { /* copy as many input bytes available as possible */ if (avail > todo) avail = todo; sys->copy(self->d->i_ptr, buf, (size_t) avail); self->d->i_ptr += avail; buf += avail; todo -= avail; } else { /* out of data, read a new block */ /* check if we're out of input blocks, advance block counter */ if (self->d->block++ >= self->d->folder->base.num_blocks) { if (!self->salvage) { self->read_error = MSPACK_ERR_DATAFORMAT; } else { D(("Ran out of CAB input blocks prematurely")) } break; } /* read a block */ self->read_error = cabd_sys_read_block(sys, self->d, &outlen, ignore_cksum, ignore_blocksize); if (self->read_error) return -1; self->d->outlen += outlen; /* special Quantum hack -- trailer byte to allow the decompressor * to realign itself. CAB Quantum blocks, unlike LZX blocks, can have * anything from 0 to 4 trailing null bytes. */ if ((self->d->comp_type & cffoldCOMPTYPE_MASK)==cffoldCOMPTYPE_QUANTUM) { *self->d->i_end++ = 0xFF; } /* is this the last block? */ if (self->d->block >= self->d->folder->base.num_blocks) { if ((self->d->comp_type & cffoldCOMPTYPE_MASK) == cffoldCOMPTYPE_LZX) { /* special LZX hack -- on the last block, inform LZX of the * size of the output data stream. */ lzxd_set_output_length((struct lzxd_stream *) self->d->state, self->d->outlen); } } } /* if (avail) */ } /* while (todo > 0) */ return bytes - todo; } static int cabd_sys_write(struct mspack_file *file, void *buffer, int bytes) { struct mscab_decompressor_p *self = (struct mscab_decompressor_p *) file; self->d->offset += bytes; if (self->d->outfh) { return self->system->write(self->d->outfh, buffer, bytes); } return bytes; } /*************************************** * CABD_SYS_READ_BLOCK *************************************** * reads a whole data block from a cab file. the block may span more than * one cab file, if it does then the fragments will be reassembled */ static int cabd_sys_read_block(struct mspack_system *sys, struct mscabd_decompress_state *d, int *out, int ignore_cksum, int ignore_blocksize) { unsigned char hdr[cfdata_SIZEOF]; unsigned int cksum; int len, full_len; /* reset the input block pointer and end of block pointer */ d->i_ptr = d->i_end = &d->input[0]; do { /* read the block header */ if (sys->read(d->infh, &hdr[0], cfdata_SIZEOF) != cfdata_SIZEOF) { return MSPACK_ERR_READ; } /* skip any reserved block headers */ if (d->data->cab->block_resv && sys->seek(d->infh, (off_t) d->data->cab->block_resv, MSPACK_SYS_SEEK_CUR)) { return MSPACK_ERR_SEEK; } /* blocks must not be over CAB_INPUTMAX in size */ len = EndGetI16(&hdr[cfdata_CompressedSize]); full_len = (d->i_end - d->i_ptr) + len; /* include cab-spanning blocks */ if (full_len > CAB_INPUTMAX) { D(("block size %d > CAB_INPUTMAX", full_len)); /* in salvage mode, blocks can be 65535 bytes but no more than that */ if (!ignore_blocksize || full_len > CAB_INPUTMAX_SALVAGE) { return MSPACK_ERR_DATAFORMAT; } } /* blocks must not expand to more than CAB_BLOCKMAX */ if (EndGetI16(&hdr[cfdata_UncompressedSize]) > CAB_BLOCKMAX) { D(("block size > CAB_BLOCKMAX")) if (!ignore_blocksize) return MSPACK_ERR_DATAFORMAT; } /* read the block data */ if (sys->read(d->infh, d->i_end, len) != len) { return MSPACK_ERR_READ; } /* perform checksum test on the block (if one is stored) */ if ((cksum = EndGetI32(&hdr[cfdata_CheckSum]))) { unsigned int sum2 = cabd_checksum(d->i_end, (unsigned int) len, 0); if (cabd_checksum(&hdr[4], 4, sum2) != cksum) { if (!ignore_cksum) return MSPACK_ERR_CHECKSUM; sys->message(d->infh, "WARNING; bad block checksum found"); } } /* advance end of block pointer to include newly read data */ d->i_end += len; /* uncompressed size == 0 means this block was part of a split block * and it continues as the first block of the next cabinet in the set. * otherwise, this is the last part of the block, and no more block * reading needs to be done. */ /* EXIT POINT OF LOOP -- uncompressed size != 0 */ if ((*out = EndGetI16(&hdr[cfdata_UncompressedSize]))) { return MSPACK_ERR_OK; } /* otherwise, advance to next cabinet */ /* close current file handle */ sys->close(d->infh); d->infh = NULL; /* advance to next member in the cabinet set */ if (!(d->data = d->data->next)) { sys->message(d->infh, "WARNING; ran out of cabinets in set. Are any missing?"); return MSPACK_ERR_DATAFORMAT; } /* open next cab file */ d->incab = d->data->cab; if (!(d->infh = sys->open(sys, d->incab->base.filename, MSPACK_SYS_OPEN_READ))) { return MSPACK_ERR_OPEN; } /* seek to start of data blocks */ if (sys->seek(d->infh, d->data->offset, MSPACK_SYS_SEEK_START)) { return MSPACK_ERR_SEEK; } } while (1); /* not reached */ return MSPACK_ERR_OK; } static unsigned int cabd_checksum(unsigned char *data, unsigned int bytes, unsigned int cksum) { unsigned int len, ul = 0; for (len = bytes >> 2; len--; data += 4) { cksum ^= EndGetI32(data); } switch (bytes & 3) { case 3: ul |= *data++ << 16; /*@fallthrough@*/ case 2: ul |= *data++ << 8; /*@fallthrough@*/ case 1: ul |= *data; } cksum ^= ul; return cksum; } /*************************************** * NONED_INIT, NONED_DECOMPRESS, NONED_FREE *************************************** * the "not compressed" method decompressor */ struct noned_state { struct mspack_system *sys; struct mspack_file *i; struct mspack_file *o; unsigned char *buf; int bufsize; }; static struct noned_state *noned_init(struct mspack_system *sys, struct mspack_file *in, struct mspack_file *out, int bufsize) { struct noned_state *state = (struct noned_state *) sys->alloc(sys, sizeof(struct noned_state)); unsigned char *buf = (unsigned char *) sys->alloc(sys, (size_t) bufsize); if (state && buf) { state->sys = sys; state->i = in; state->o = out; state->buf = buf; state->bufsize = bufsize; } else { sys->free(buf); sys->free(state); state = NULL; } return state; } static int noned_decompress(struct noned_state *s, off_t bytes) { int run; while (bytes > 0) { run = (bytes > s->bufsize) ? s->bufsize : (int) bytes; if (s->sys->read(s->i, &s->buf[0], run) != run) return MSPACK_ERR_READ; if (s->sys->write(s->o, &s->buf[0], run) != run) return MSPACK_ERR_WRITE; bytes -= run; } return MSPACK_ERR_OK; } static void noned_free(struct noned_state *state) { struct mspack_system *sys; if (state) { sys = state->sys; sys->free(state->buf); sys->free(state); } } /*************************************** * CABD_PARAM *************************************** * allows a parameter to be set */ static int cabd_param(struct mscab_decompressor *base, int param, int value) { struct mscab_decompressor_p *self = (struct mscab_decompressor_p *) base; if (!self) return MSPACK_ERR_ARGS; switch (param) { case MSCABD_PARAM_SEARCHBUF: if (value < 4) return MSPACK_ERR_ARGS; self->searchbuf_size = value; break; case MSCABD_PARAM_FIXMSZIP: self->fix_mszip = value; break; case MSCABD_PARAM_DECOMPBUF: if (value < 4) return MSPACK_ERR_ARGS; self->buf_size = value; break; case MSCABD_PARAM_SALVAGE: self->salvage = value; break; default: return MSPACK_ERR_ARGS; } return MSPACK_ERR_OK; } /*************************************** * CABD_ERROR *************************************** * returns the last error that occurred */ static int cabd_error(struct mscab_decompressor *base) { struct mscab_decompressor_p *self = (struct mscab_decompressor_p *) base; return (self) ? self->error : MSPACK_ERR_ARGS; } cabextract-1.11/mspack/lzx.h0000664000175000017500000002430414370426615012756 00000000000000/* This file is part of libmspack. * (C) 2003-2013 Stuart Caie. * * The LZX method was created by Jonathan Forbes and Tomi Poutanen, adapted * by Microsoft Corporation. * * libmspack is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License (LGPL) version 2.1 * * For further details, see the file COPYING.LIB distributed with libmspack */ #ifndef MSPACK_LZX_H #define MSPACK_LZX_H 1 #ifdef __cplusplus extern "C" { #endif /* LZX compression / decompression definitions */ /* some constants defined by the LZX specification */ #define LZX_MIN_MATCH (2) #define LZX_MAX_MATCH (257) #define LZX_NUM_CHARS (256) #define LZX_BLOCKTYPE_INVALID (0) /* also blocktypes 4-7 invalid */ #define LZX_BLOCKTYPE_VERBATIM (1) #define LZX_BLOCKTYPE_ALIGNED (2) #define LZX_BLOCKTYPE_UNCOMPRESSED (3) #define LZX_PRETREE_NUM_ELEMENTS (20) #define LZX_ALIGNED_NUM_ELEMENTS (8) /* aligned offset tree #elements */ #define LZX_NUM_PRIMARY_LENGTHS (7) /* this one missing from spec! */ #define LZX_NUM_SECONDARY_LENGTHS (249) /* length tree #elements */ /* LZX huffman defines: tweak tablebits as desired */ #define LZX_PRETREE_MAXSYMBOLS (LZX_PRETREE_NUM_ELEMENTS) #define LZX_PRETREE_TABLEBITS (6) #define LZX_MAINTREE_MAXSYMBOLS (LZX_NUM_CHARS + 290*8) #define LZX_MAINTREE_TABLEBITS (12) #define LZX_LENGTH_MAXSYMBOLS (LZX_NUM_SECONDARY_LENGTHS+1) #define LZX_LENGTH_TABLEBITS (12) #define LZX_ALIGNED_MAXSYMBOLS (LZX_ALIGNED_NUM_ELEMENTS) #define LZX_ALIGNED_TABLEBITS (7) #define LZX_LENTABLE_SAFETY (64) /* table decoding overruns are allowed */ #define LZX_FRAME_SIZE (32768) /* the size of a frame in LZX */ struct lzxd_stream { struct mspack_system *sys; /* I/O routines */ struct mspack_file *input; /* input file handle */ struct mspack_file *output; /* output file handle */ off_t offset; /* number of bytes actually output */ off_t length; /* overall decompressed length of stream */ unsigned char *window; /* decoding window */ unsigned int window_size; /* window size */ unsigned int ref_data_size; /* LZX DELTA reference data size */ unsigned int num_offsets; /* number of match_offset entries in table */ unsigned int window_posn; /* decompression offset within window */ unsigned int frame_posn; /* current frame offset within in window */ unsigned int frame; /* the number of 32kb frames processed */ unsigned int reset_interval; /* which frame do we reset the compressor? */ unsigned int R0, R1, R2; /* for the LRU offset system */ unsigned int block_length; /* uncompressed length of this LZX block */ unsigned int block_remaining; /* uncompressed bytes still left to decode */ signed int intel_filesize; /* magic header value used for transform */ unsigned char intel_started; /* has intel E8 decoding started? */ unsigned char block_type; /* type of the current block */ unsigned char header_read; /* have we started decoding at all yet? */ unsigned char input_end; /* have we reached the end of input? */ unsigned char is_delta; /* does stream follow LZX DELTA spec? */ int error; /* I/O buffering */ unsigned char *inbuf, *i_ptr, *i_end, *o_ptr, *o_end; unsigned int bit_buffer, bits_left, inbuf_size; /* huffman code lengths */ unsigned char PRETREE_len [LZX_PRETREE_MAXSYMBOLS + LZX_LENTABLE_SAFETY]; unsigned char MAINTREE_len [LZX_MAINTREE_MAXSYMBOLS + LZX_LENTABLE_SAFETY]; unsigned char LENGTH_len [LZX_LENGTH_MAXSYMBOLS + LZX_LENTABLE_SAFETY]; unsigned char ALIGNED_len [LZX_ALIGNED_MAXSYMBOLS + LZX_LENTABLE_SAFETY]; /* huffman decoding tables */ unsigned short PRETREE_table [(1 << LZX_PRETREE_TABLEBITS) + (LZX_PRETREE_MAXSYMBOLS * 2)]; unsigned short MAINTREE_table[(1 << LZX_MAINTREE_TABLEBITS) + (LZX_MAINTREE_MAXSYMBOLS * 2)]; unsigned short LENGTH_table [(1 << LZX_LENGTH_TABLEBITS) + (LZX_LENGTH_MAXSYMBOLS * 2)]; unsigned short ALIGNED_table [(1 << LZX_ALIGNED_TABLEBITS) + (LZX_ALIGNED_MAXSYMBOLS * 2)]; unsigned char LENGTH_empty; /* this is used purely for doing the intel E8 transform */ unsigned char e8_buf[LZX_FRAME_SIZE]; }; /** * Allocates and initialises LZX decompression state for decoding an LZX * stream. * * This routine uses system->alloc() to allocate memory. If memory * allocation fails, or the parameters to this function are invalid, * NULL is returned. * * @param system an mspack_system structure used to read from * the input stream and write to the output * stream, also to allocate and free memory. * @param input an input stream with the LZX data. * @param output an output stream to write the decoded data to. * @param window_bits the size of the decoding window, which must be * between 15 and 21 inclusive for regular LZX * data, or between 17 and 25 inclusive for * LZX DELTA data. * @param reset_interval the interval at which the LZX bitstream is * reset, in multiples of LZX frames (32678 * bytes), e.g. a value of 2 indicates the input * stream resets after every 65536 output bytes. * A value of 0 indicates that the bitstream never * resets, such as in CAB LZX streams. * @param input_buffer_size the number of bytes to use as an input * bitstream buffer. * @param output_length the length in bytes of the entirely * decompressed output stream, if known in * advance. It is used to correctly perform the * Intel E8 transformation, which must stop 6 * bytes before the very end of the * decompressed stream. It is not otherwise used * or adhered to. If the full decompressed * length is known in advance, set it here. * If it is NOT known, use the value 0, and call * lzxd_set_output_length() once it is * known. If never set, 4 of the final 6 bytes * of the output stream may be incorrect. * @param is_delta should be zero for all regular LZX data, * non-zero for LZX DELTA encoded data. * @return a pointer to an initialised lzxd_stream structure, or NULL if * there was not enough memory or parameters to the function were wrong. */ extern struct lzxd_stream *lzxd_init(struct mspack_system *system, struct mspack_file *input, struct mspack_file *output, int window_bits, int reset_interval, int input_buffer_size, off_t output_length, char is_delta); /* see description of output_length in lzxd_init() */ extern void lzxd_set_output_length(struct lzxd_stream *lzx, off_t output_length); /** * Reads LZX DELTA reference data into the window and allows * lzxd_decompress() to reference it. * * Call this before the first call to lzxd_decompress(). * @param lzx the LZX stream to apply this reference data to * @param system an mspack_system implementation to use with the * input param. Only read() will be called. * @param input an input file handle to read reference data using * system->read(). * @param length the length of the reference data. Cannot be longer * than the LZX window size. * @return an error code, or MSPACK_ERR_OK if successful */ extern int lzxd_set_reference_data(struct lzxd_stream *lzx, struct mspack_system *system, struct mspack_file *input, unsigned int length); /** * Decompresses entire or partial LZX streams. * * The number of bytes of data that should be decompressed is given as the * out_bytes parameter. If more bytes are decoded than are needed, they * will be kept over for a later invocation. * * The output bytes will be passed to the system->write() function given in * lzxd_init(), using the output file handle given in lzxd_init(). More than * one call may be made to system->write(). * Input bytes will be read in as necessary using the system->read() * function given in lzxd_init(), using the input file handle given in * lzxd_init(). This will continue until system->read() returns 0 bytes, * or an error. Errors will be passed out of the function as * MSPACK_ERR_READ errors. Input streams should convey an "end of input * stream" by refusing to supply all the bytes that LZX asks for when they * reach the end of the stream, rather than return an error code. * * If any error code other than MSPACK_ERR_OK is returned, the stream * should be considered unusable and lzxd_decompress() should not be * called again on this stream. * * @param lzx LZX decompression state, as allocated by lzxd_init(). * @param out_bytes the number of bytes of data to decompress. * @return an error code, or MSPACK_ERR_OK if successful */ extern int lzxd_decompress(struct lzxd_stream *lzx, off_t out_bytes); /** * Frees all state associated with an LZX data stream. This will call * system->free() using the system pointer given in lzxd_init(). * * @param lzx LZX decompression state to free. */ void lzxd_free(struct lzxd_stream *lzx); #ifdef __cplusplus } #endif #endif cabextract-1.11/mspack/readhuff.h0000664000175000017500000001523614370426615013731 00000000000000/* This file is part of libmspack. * (C) 2003-2014 Stuart Caie. * * libmspack is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License (LGPL) version 2.1 * * For further details, see the file COPYING.LIB distributed with libmspack */ #ifndef MSPACK_READHUFF_H #define MSPACK_READHUFF_H 1 /* This implements a fast Huffman tree decoding system. */ #if !(defined(BITS_ORDER_MSB) || defined(BITS_ORDER_LSB)) # error "readhuff.h is used in conjunction with readbits.h, include that first" #endif #if !(defined(TABLEBITS) && defined(MAXSYMBOLS)) # error "define TABLEBITS(tbl) and MAXSYMBOLS(tbl) before using readhuff.h" #endif #if !(defined(HUFF_TABLE) && defined(HUFF_LEN)) # error "define HUFF_TABLE(tbl) and HUFF_LEN(tbl) before using readhuff.h" #endif #ifndef HUFF_ERROR # error "define HUFF_ERROR before using readhuff.h" #endif #ifndef HUFF_MAXBITS # define HUFF_MAXBITS 16 #endif #define DECLARE_HUFF_VARS \ DECLARE_BIT_VARS; \ register int huff_idx; \ register unsigned short huff_sym /* Decodes the next huffman symbol from the input bitstream into var. * Do not use this macro on a table unless build_decode_table() succeeded. */ #define READ_HUFFSYM(tbl, var) do { \ ENSURE_BITS(HUFF_MAXBITS); \ huff_sym = HUFF_TABLE(tbl, PEEK_BITS(TABLEBITS(tbl))); \ if (huff_sym >= MAXSYMBOLS(tbl)) HUFF_TRAVERSE(tbl); \ (var) = huff_sym; \ huff_idx = HUFF_LEN(tbl, huff_sym); \ REMOVE_BITS(huff_idx); \ } while (0) #ifdef BITS_ORDER_LSB # define HUFF_TRAVERSE(tbl) do { \ huff_idx = TABLEBITS(tbl) - 1; \ do { \ if (huff_idx++ > HUFF_MAXBITS) HUFF_ERROR; \ huff_sym = HUFF_TABLE(tbl, \ (huff_sym << 1) | ((bit_buffer >> huff_idx) & 1)); \ } while (huff_sym >= MAXSYMBOLS(tbl)); \ } while (0) #else #define HUFF_TRAVERSE(tbl) do { \ huff_idx = 1 << (BITBUF_WIDTH - TABLEBITS(tbl)); \ do { \ if ((huff_idx >>= 1) == 0) HUFF_ERROR; \ huff_sym = HUFF_TABLE(tbl, \ (huff_sym << 1) | ((bit_buffer & huff_idx) ? 1 : 0)); \ } while (huff_sym >= MAXSYMBOLS(tbl)); \ } while (0) #endif /* make_decode_table(nsyms, nbits, length[], table[]) * * This function was originally coded by David Tritscher. * It builds a fast huffman decoding table from * a canonical huffman code lengths table. * * nsyms = total number of symbols in this huffman tree. * nbits = any symbols with a code length of nbits or less can be decoded * in one lookup of the table. * length = A table to get code lengths from [0 to nsyms-1] * table = The table to fill up with decoded symbols and pointers. * Should be ((1<> 1; /* don't do 0 length codes */ /* fill entries for codes short enough for a direct mapping */ for (bit_num = 1; bit_num <= nbits; bit_num++) { for (sym = 0; sym < nsyms; sym++) { if (length[sym] != bit_num) continue; #ifdef BITS_ORDER_MSB leaf = pos; #else /* reverse the significant bits */ fill = length[sym]; reverse = pos >> (nbits - fill); leaf = 0; do {leaf <<= 1; leaf |= reverse & 1; reverse >>= 1;} while (--fill); #endif if((pos += bit_mask) > table_mask) return 1; /* table overrun */ /* fill all possible lookups of this symbol with the symbol itself */ #ifdef BITS_ORDER_MSB for (fill = bit_mask; fill-- > 0;) table[leaf++] = sym; #else fill = bit_mask; next_symbol = 1 << bit_num; do { table[leaf] = sym; leaf += next_symbol; } while (--fill); #endif } bit_mask >>= 1; } /* exit with success if table is now complete */ if (pos == table_mask) return 0; /* mark all remaining table entries as unused */ for (sym = pos; sym < table_mask; sym++) { #ifdef BITS_ORDER_MSB table[sym] = 0xFFFF; #else reverse = sym; leaf = 0; fill = nbits; do { leaf <<= 1; leaf |= reverse & 1; reverse >>= 1; } while (--fill); table[leaf] = 0xFFFF; #endif } /* next_symbol = base of allocation for long codes */ next_symbol = ((table_mask >> 1) < nsyms) ? nsyms : (table_mask >> 1); /* give ourselves room for codes to grow by up to 16 more bits. * codes now start at bit nbits+16 and end at (nbits+16-codelength) */ pos <<= 16; table_mask <<= 16; bit_mask = 1 << 15; for (bit_num = nbits+1; bit_num <= HUFF_MAXBITS; bit_num++) { for (sym = 0; sym < nsyms; sym++) { if (length[sym] != bit_num) continue; if (pos >= table_mask) return 1; /* table overflow */ #ifdef BITS_ORDER_MSB leaf = pos >> 16; #else /* leaf = the first nbits of the code, reversed */ reverse = pos >> 16; leaf = 0; fill = nbits; do {leaf <<= 1; leaf |= reverse & 1; reverse >>= 1;} while (--fill); #endif for (fill = 0; fill < (bit_num - nbits); fill++) { /* if this path hasn't been taken yet, 'allocate' two entries */ if (table[leaf] == 0xFFFF) { table[(next_symbol << 1) ] = 0xFFFF; table[(next_symbol << 1) + 1 ] = 0xFFFF; table[leaf] = next_symbol++; } /* follow the path and select either left or right for next bit */ leaf = table[leaf] << 1; if ((pos >> (15-fill)) & 1) leaf++; } table[leaf] = sym; pos += bit_mask; } bit_mask >>= 1; } /* full table? */ return (pos == table_mask) ? 0 : 1; } #endif cabextract-1.11/mspack/mszipd.c0000664000175000017500000004074614370426615013452 00000000000000/* This file is part of libmspack. * (C) 2003-2023 Stuart Caie. * * The deflate method was created by Phil Katz. MSZIP is equivalent to the * deflate method. * * libmspack is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License (LGPL) version 2.1 * * For further details, see the file COPYING.LIB distributed with libmspack */ /* MS-ZIP decompression implementation. */ #include #include /* import bit-reading macros and code */ #define BITS_TYPE struct mszipd_stream #define BITS_VAR zip #define BITS_ORDER_LSB #define BITS_LSB_TABLE #define READ_BYTES do { \ READ_IF_NEEDED; \ INJECT_BITS(*i_ptr++, 8); \ } while (0) #include /* import huffman macros and code */ #define TABLEBITS(tbl) MSZIP_##tbl##_TABLEBITS #define MAXSYMBOLS(tbl) MSZIP_##tbl##_MAXSYMBOLS #define HUFF_TABLE(tbl,idx) zip->tbl##_table[idx] #define HUFF_LEN(tbl,idx) zip->tbl##_len[idx] #define HUFF_ERROR return INF_ERR_HUFFSYM #include #define FLUSH_IF_NEEDED do { \ if (zip->window_posn == MSZIP_FRAME_SIZE) { \ if (zip->flush_window(zip, MSZIP_FRAME_SIZE)) { \ return INF_ERR_FLUSH; \ } \ zip->window_posn = 0; \ } \ } while (0) /* match lengths for literal codes 257.. 285 */ static const unsigned short lit_lengths[29] = { 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258 }; /* match offsets for distance codes 0 .. 29 */ static const unsigned short dist_offsets[30] = { 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577 }; /* extra bits required for literal codes 257.. 285 */ static const unsigned char lit_extrabits[29] = { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0 }; /* extra bits required for distance codes 0 .. 29 */ static const unsigned char dist_extrabits[30] = { 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13 }; /* the order of the bit length Huffman code lengths */ static const unsigned char bitlen_order[19] = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 }; /* inflate() error codes */ #define INF_ERR_BLOCKTYPE (-1) /* unknown block type */ #define INF_ERR_COMPLEMENT (-2) /* block size complement mismatch */ #define INF_ERR_FLUSH (-3) /* error from flush_window() callback */ #define INF_ERR_BITBUF (-4) /* too many bits in bit buffer */ #define INF_ERR_SYMLENS (-5) /* too many symbols in blocktype 2 header */ #define INF_ERR_BITLENTBL (-6) /* failed to build bitlens huffman table */ #define INF_ERR_LITERALTBL (-7) /* failed to build literals huffman table */ #define INF_ERR_DISTANCETBL (-8) /* failed to build distance huffman table */ #define INF_ERR_BITOVERRUN (-9) /* bitlen RLE code goes over table size */ #define INF_ERR_BADBITLEN (-10) /* invalid bit-length code */ #define INF_ERR_LITCODE (-11) /* out-of-range literal code */ #define INF_ERR_DISTCODE (-12) /* out-of-range distance code */ #define INF_ERR_DISTANCE (-13) /* somehow, distance is beyond 32k */ #define INF_ERR_HUFFSYM (-14) /* out of bits decoding huffman symbol */ static int zip_read_lens(struct mszipd_stream *zip) { DECLARE_BIT_VARS; /* bitlen Huffman codes -- immediate lookup, 7 bit max code length */ unsigned short bl_table[(1 << 7)]; unsigned char bl_len[19]; unsigned char lens[MSZIP_LITERAL_MAXSYMBOLS + MSZIP_DISTANCE_MAXSYMBOLS]; unsigned int lit_codes, dist_codes, code, last_code=0, bitlen_codes, i, run; RESTORE_BITS; /* read the number of codes */ READ_BITS(lit_codes, 5); lit_codes += 257; READ_BITS(dist_codes, 5); dist_codes += 1; READ_BITS(bitlen_codes, 4); bitlen_codes += 4; if (lit_codes > MSZIP_LITERAL_MAXSYMBOLS) return INF_ERR_SYMLENS; if (dist_codes > MSZIP_DISTANCE_MAXSYMBOLS) return INF_ERR_SYMLENS; /* read in the bit lengths in their unusual order */ for (i = 0; i < bitlen_codes; i++) READ_BITS(bl_len[bitlen_order[i]], 3); while (i < 19) bl_len[bitlen_order[i++]] = 0; /* create decoding table with an immediate lookup */ if (make_decode_table(19, 7, &bl_len[0], &bl_table[0])) { return INF_ERR_BITLENTBL; } /* read literal / distance code lengths */ for (i = 0; i < (lit_codes + dist_codes); i++) { /* single-level huffman lookup */ ENSURE_BITS(7); code = bl_table[PEEK_BITS(7)]; REMOVE_BITS(bl_len[code]); if (code < 16) lens[i] = last_code = code; else { switch (code) { case 16: READ_BITS(run, 2); run += 3; code = last_code; break; case 17: READ_BITS(run, 3); run += 3; code = 0; break; case 18: READ_BITS(run, 7); run += 11; code = 0; break; default: D(("bad code!: %u", code)) return INF_ERR_BADBITLEN; } if ((i + run) > (lit_codes + dist_codes)) return INF_ERR_BITOVERRUN; while (run--) lens[i++] = code; i--; } } /* copy LITERAL code lengths and clear any remaining */ i = lit_codes; zip->sys->copy(&lens[0], &zip->LITERAL_len[0], i); while (i < MSZIP_LITERAL_MAXSYMBOLS) zip->LITERAL_len[i++] = 0; i = dist_codes; zip->sys->copy(&lens[lit_codes], &zip->DISTANCE_len[0], i); while (i < MSZIP_DISTANCE_MAXSYMBOLS) zip->DISTANCE_len[i++] = 0; STORE_BITS; return 0; } /* a clean implementation of RFC 1951 / inflate */ static int inflate(struct mszipd_stream *zip) { DECLARE_HUFF_VARS; unsigned int last_block, block_type, distance, length, this_run; int i; RESTORE_BITS; do { /* read in last block bit */ READ_BITS(last_block, 1); /* read in block type */ READ_BITS(block_type, 2); if (block_type == 0) { /* uncompressed block */ unsigned char lens_buf[4]; /* go to byte boundary */ i = bits_left & 7; REMOVE_BITS(i); /* read 4 bytes of data, emptying the bit-buffer if necessary */ for (i = 0; (bits_left >= 8); i++) { if (i == 4) return INF_ERR_BITBUF; lens_buf[i] = PEEK_BITS(8); REMOVE_BITS(8); } if (bits_left != 0) return INF_ERR_BITBUF; while (i < 4) { READ_IF_NEEDED; lens_buf[i++] = *i_ptr++; } /* get the length and its complement */ length = lens_buf[0] | (lens_buf[1] << 8); i = lens_buf[2] | (lens_buf[3] << 8); if (length != (~i & 0xFFFF)) return INF_ERR_COMPLEMENT; /* read and copy the uncompressed data into the window */ while (length > 0) { READ_IF_NEEDED; this_run = length; if (this_run > (unsigned int)(i_end - i_ptr)) this_run = i_end - i_ptr; if (this_run > (MSZIP_FRAME_SIZE - zip->window_posn)) this_run = MSZIP_FRAME_SIZE - zip->window_posn; zip->sys->copy(i_ptr, &zip->window[zip->window_posn], this_run); zip->window_posn += this_run; i_ptr += this_run; length -= this_run; FLUSH_IF_NEEDED; } } else if ((block_type == 1) || (block_type == 2)) { /* Huffman-compressed LZ77 block */ unsigned int match_posn, code; if (block_type == 1) { /* block with fixed Huffman codes */ i = 0; while (i < 144) zip->LITERAL_len[i++] = 8; while (i < 256) zip->LITERAL_len[i++] = 9; while (i < 280) zip->LITERAL_len[i++] = 7; while (i < 288) zip->LITERAL_len[i++] = 8; for (i = 0; i < 32; i++) zip->DISTANCE_len[i] = 5; } else { /* block with dynamic Huffman codes */ STORE_BITS; if ((i = zip_read_lens(zip))) return i; RESTORE_BITS; } /* now huffman lengths are read for either kind of block, * create huffman decoding tables */ if (make_decode_table(MSZIP_LITERAL_MAXSYMBOLS, MSZIP_LITERAL_TABLEBITS, &zip->LITERAL_len[0], &zip->LITERAL_table[0])) { return INF_ERR_LITERALTBL; } if (make_decode_table(MSZIP_DISTANCE_MAXSYMBOLS,MSZIP_DISTANCE_TABLEBITS, &zip->DISTANCE_len[0], &zip->DISTANCE_table[0])) { return INF_ERR_DISTANCETBL; } /* decode forever until end of block code */ for (;;) { READ_HUFFSYM(LITERAL, code); if (code < 256) { zip->window[zip->window_posn++] = (unsigned char) code; FLUSH_IF_NEEDED; } else if (code == 256) { /* END OF BLOCK CODE: loop break point */ break; } else { code -= 257; /* codes 257-285 are matches */ if (code >= 29) return INF_ERR_LITCODE; /* codes 286-287 are illegal */ READ_BITS_T(length, lit_extrabits[code]); length += lit_lengths[code]; READ_HUFFSYM(DISTANCE, code); if (code >= 30) return INF_ERR_DISTCODE; READ_BITS_T(distance, dist_extrabits[code]); distance += dist_offsets[code]; /* match position is window position minus distance. If distance * is more than window position numerically, it must 'wrap * around' the frame size. */ match_posn = ((distance > zip->window_posn) ? MSZIP_FRAME_SIZE : 0) + zip->window_posn - distance; /* copy match */ if (length < 12) { /* short match, use slower loop but no loop setup code */ while (length--) { zip->window[zip->window_posn++] = zip->window[match_posn++]; match_posn &= MSZIP_FRAME_SIZE - 1; FLUSH_IF_NEEDED; } } else { /* longer match, use faster loop but with setup expense */ unsigned char *runsrc, *rundest; do { this_run = length; if ((match_posn + this_run) > MSZIP_FRAME_SIZE) this_run = MSZIP_FRAME_SIZE - match_posn; if ((zip->window_posn + this_run) > MSZIP_FRAME_SIZE) this_run = MSZIP_FRAME_SIZE - zip->window_posn; rundest = &zip->window[zip->window_posn]; zip->window_posn += this_run; runsrc = &zip->window[match_posn]; match_posn += this_run; length -= this_run; while (this_run--) *rundest++ = *runsrc++; if (match_posn == MSZIP_FRAME_SIZE) match_posn = 0; FLUSH_IF_NEEDED; } while (length > 0); } } /* else (code >= 257) */ } /* for(;;) -- break point at 'code == 256' */ } else { /* block_type == 3 -- bad block type */ return INF_ERR_BLOCKTYPE; } } while (!last_block); /* flush the remaining data */ if (zip->window_posn) { if (zip->flush_window(zip, zip->window_posn)) return INF_ERR_FLUSH; } STORE_BITS; /* return success */ return 0; } /* inflate() calls this whenever the window should be flushed. As * MSZIP only expands to the size of the window, the implementation used * simply keeps track of the amount of data flushed, and if more than 32k * is flushed, an error is raised. */ static int mszipd_flush_window(struct mszipd_stream *zip, unsigned int data_flushed) { zip->bytes_output += data_flushed; if (zip->bytes_output > MSZIP_FRAME_SIZE) { D(("overflow: %u bytes flushed, total is now %u", data_flushed, zip->bytes_output)) return 1; } return 0; } struct mszipd_stream *mszipd_init(struct mspack_system *system, struct mspack_file *input, struct mspack_file *output, int input_buffer_size, int repair_mode) { struct mszipd_stream *zip; if (!system) return NULL; /* round up input buffer size to multiple of two */ input_buffer_size = (input_buffer_size + 1) & -2; if (input_buffer_size < 2) return NULL; /* allocate decompression state */ if (!(zip = (struct mszipd_stream *) system->alloc(system, sizeof(struct mszipd_stream)))) { return NULL; } /* allocate input buffer */ zip->inbuf = (unsigned char *) system->alloc(system, input_buffer_size); if (!zip->inbuf) { system->free(zip); return NULL; } /* initialise decompression state */ zip->sys = system; zip->input = input; zip->output = output; zip->inbuf_size = input_buffer_size; zip->input_end = 0; zip->error = MSPACK_ERR_OK; zip->repair_mode = repair_mode; zip->flush_window = &mszipd_flush_window; zip->i_ptr = zip->i_end = &zip->inbuf[0]; zip->o_ptr = zip->o_end = NULL; zip->bit_buffer = 0; zip->bits_left = 0; return zip; } int mszipd_decompress(struct mszipd_stream *zip, off_t out_bytes) { /* for the bit buffer */ register unsigned int bit_buffer; register int bits_left; unsigned char *i_ptr, *i_end; int i, state, error; /* easy answers */ if (!zip || (out_bytes < 0)) return MSPACK_ERR_ARGS; if (zip->error) return zip->error; /* flush out any stored-up bytes before we begin */ i = zip->o_end - zip->o_ptr; if ((off_t) i > out_bytes) i = (int) out_bytes; if (i) { if (zip->sys->write(zip->output, zip->o_ptr, i) != i) { return zip->error = MSPACK_ERR_WRITE; } zip->o_ptr += i; out_bytes -= i; } if (out_bytes == 0) return MSPACK_ERR_OK; while (out_bytes > 0) { /* unpack another block */ RESTORE_BITS; /* skip to next read 'CK' header */ i = bits_left & 7; REMOVE_BITS(i); /* align to bytestream */ state = 0; do { READ_BITS(i, 8); if (i == 'C') state = 1; else if ((state == 1) && (i == 'K')) state = 2; else state = 0; } while (state != 2); /* inflate a block, repair and realign if necessary */ zip->window_posn = 0; zip->bytes_output = 0; STORE_BITS; if ((error = inflate(zip))) { D(("inflate error %d", error)) if (zip->repair_mode) { /* recover partially-inflated buffers */ if (zip->bytes_output == 0 && zip->window_posn > 0) { zip->flush_window(zip, zip->window_posn); } zip->sys->message(NULL, "MSZIP error, %u bytes of data lost.", MSZIP_FRAME_SIZE - zip->bytes_output); for (i = zip->bytes_output; i < MSZIP_FRAME_SIZE; i++) { zip->window[i] = '\0'; } zip->bytes_output = MSZIP_FRAME_SIZE; } else { return zip->error = (error > 0) ? error : MSPACK_ERR_DECRUNCH; } } zip->o_ptr = &zip->window[0]; zip->o_end = &zip->o_ptr[zip->bytes_output]; /* write a frame */ i = (out_bytes < (off_t)zip->bytes_output) ? (int)out_bytes : zip->bytes_output; if (zip->sys->write(zip->output, zip->o_ptr, i) != i) { return zip->error = MSPACK_ERR_WRITE; } /* mspack errors (i.e. read errors) are fatal and can't be recovered */ if ((error > 0) && zip->repair_mode) return error; zip->o_ptr += i; out_bytes -= i; } if (out_bytes) { D(("bytes left to output")) return zip->error = MSPACK_ERR_DECRUNCH; } return MSPACK_ERR_OK; } int mszipd_decompress_kwaj(struct mszipd_stream *zip) { DECLARE_BIT_VARS; int i, error, block_len; /* unpack blocks until block_len == 0 */ for (;;) { RESTORE_BITS; /* align to bytestream, read block_len */ i = bits_left & 7; REMOVE_BITS(i); READ_BITS(block_len, 8); READ_BITS(i, 8); block_len |= i << 8; if (block_len == 0) break; /* read "CK" header */ READ_BITS(i, 8); if (i != 'C') return MSPACK_ERR_DATAFORMAT; READ_BITS(i, 8); if (i != 'K') return MSPACK_ERR_DATAFORMAT; /* inflate block */ zip->window_posn = 0; zip->bytes_output = 0; STORE_BITS; if ((error = inflate(zip))) { D(("inflate error %d", error)) return zip->error = (error > 0) ? error : MSPACK_ERR_DECRUNCH; } /* write inflated block */ if (zip->sys->write(zip->output, &zip->window[0], zip->bytes_output) != zip->bytes_output) return zip->error = MSPACK_ERR_WRITE; } return MSPACK_ERR_OK; } void mszipd_free(struct mszipd_stream *zip) { struct mspack_system *sys; if (zip) { sys = zip->sys; sys->free(zip->inbuf); sys->free(zip); } } cabextract-1.11/mspack/lzxd.c0000664000175000017500000007247714372277271013137 00000000000000/* This file is part of libmspack. * (C) 2003-2023 Stuart Caie. * * The LZX method was created by Jonathan Forbes and Tomi Poutanen, adapted * by Microsoft Corporation. * * libmspack is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License (LGPL) version 2.1 * * For further details, see the file COPYING.LIB distributed with libmspack */ /* LZX decompression implementation */ #include #include /* Microsoft's LZX document (in cab-sdk.exe) and their implementation * of the com.ms.util.cab Java package do not concur. * * In the LZX document, there is a table showing the correlation between * window size and the number of position slots. It states that the 1MB * window = 40 slots and the 2MB window = 42 slots. In the implementation, * 1MB = 42 slots, 2MB = 50 slots. The actual calculation is 'find the * first slot whose position base is equal to or more than the required * window size'. This would explain why other tables in the document refer * to 50 slots rather than 42. * * The constant NUM_PRIMARY_LENGTHS used in the decompression pseudocode * is not defined in the specification. * * The LZX document does not state the uncompressed block has an * uncompressed length field. Where does this length field come from, so * we can know how large the block is? The implementation has it as the 24 * bits following after the 3 blocktype bits, before the alignment * padding. * * The LZX document states that aligned offset blocks have their aligned * offset huffman tree AFTER the main and length trees. The implementation * suggests that the aligned offset tree is BEFORE the main and length * trees. * * The LZX document decoding algorithm states that, in an aligned offset * block, if an extra_bits value is 1, 2 or 3, then that number of bits * should be read and the result added to the match offset. This is * correct for 1 and 2, but not 3, where just a huffman symbol (using the * aligned tree) should be read. * * Regarding the E8 preprocessing, the LZX document states 'No translation * may be performed on the last 6 bytes of the input block'. This is * correct. However, the pseudocode provided checks for the *E8 leader* * up to the last 6 bytes. If the leader appears between -10 and -7 bytes * from the end, this would cause the next four bytes to be modified, at * least one of which would be in the last 6 bytes, which is not allowed * according to the spec. * * The specification states that the huffman trees must always contain at * least one element. However, many CAB files contain blocks where the * length tree is completely empty (because there are no matches), and * this is expected to succeed. * * The errors in LZX documentation appear have been corrected in the * new documentation for the LZX DELTA format. * * http://msdn.microsoft.com/en-us/library/cc483133.aspx * * However, this is a different format, an extension of regular LZX. * I have noticed the following differences, there may be more: * * The maximum window size has increased from 2MB to 32MB. This also * increases the maximum number of position slots, etc. * * If the match length is 257 (the maximum possible), this signals * a further length decoding step, that allows for matches up to * 33024 bytes long. * * The format now allows for "reference data", supplied by the caller. * If match offsets go further back than the number of bytes * decompressed so far, that is them accessing the reference data. */ /* import bit-reading macros and code */ #define BITS_TYPE struct lzxd_stream #define BITS_VAR lzx #define BITS_ORDER_MSB #define READ_BYTES do { \ unsigned char b0, b1; \ READ_IF_NEEDED; b0 = *i_ptr++; \ READ_IF_NEEDED; b1 = *i_ptr++; \ INJECT_BITS((b1 << 8) | b0, 16); \ } while (0) #include /* import huffman-reading macros and code */ #define TABLEBITS(tbl) LZX_##tbl##_TABLEBITS #define MAXSYMBOLS(tbl) LZX_##tbl##_MAXSYMBOLS #define HUFF_TABLE(tbl,idx) lzx->tbl##_table[idx] #define HUFF_LEN(tbl,idx) lzx->tbl##_len[idx] #define HUFF_ERROR return lzx->error = MSPACK_ERR_DECRUNCH #include /* BUILD_TABLE(tbl) builds a huffman lookup table from code lengths */ #define BUILD_TABLE(tbl) \ if (make_decode_table(MAXSYMBOLS(tbl), TABLEBITS(tbl), \ &HUFF_LEN(tbl,0), &HUFF_TABLE(tbl,0))) \ { \ D(("failed to build %s table", #tbl)) \ return lzx->error = MSPACK_ERR_DECRUNCH; \ } #define BUILD_TABLE_MAYBE_EMPTY(tbl) do { \ lzx->tbl##_empty = 0; \ if (make_decode_table(MAXSYMBOLS(tbl), TABLEBITS(tbl), \ &HUFF_LEN(tbl,0), &HUFF_TABLE(tbl,0))) \ { \ for (i = 0; i < MAXSYMBOLS(tbl); i++) { \ if (HUFF_LEN(tbl, i) > 0) { \ D(("failed to build %s table", #tbl)) \ return lzx->error = MSPACK_ERR_DECRUNCH; \ } \ } \ /* empty tree - allow it, but don't decode symbols with it */ \ lzx->tbl##_empty = 1; \ } \ } while (0) /* READ_LENGTHS(tablename, first, last) reads in code lengths for symbols * first to last in the given table. The code lengths are stored in their * own special LZX way. */ #define READ_LENGTHS(tbl, first, last) do { \ STORE_BITS; \ if (lzxd_read_lens(lzx, &HUFF_LEN(tbl, 0), (first), \ (unsigned int)(last))) return lzx->error; \ RESTORE_BITS; \ } while (0) static int lzxd_read_lens(struct lzxd_stream *lzx, unsigned char *lens, unsigned int first, unsigned int last) { DECLARE_HUFF_VARS; unsigned int x, y; int z; RESTORE_BITS; /* read lengths for pretree (20 symbols, lengths stored in fixed 4 bits) */ for (x = 0; x < 20; x++) { READ_BITS(y, 4); lzx->PRETREE_len[x] = y; } BUILD_TABLE(PRETREE); for (x = first; x < last; ) { READ_HUFFSYM(PRETREE, z); if (z == 17) { /* code = 17, run of ([read 4 bits]+4) zeros */ READ_BITS(y, 4); y += 4; while (y--) lens[x++] = 0; } else if (z == 18) { /* code = 18, run of ([read 5 bits]+20) zeros */ READ_BITS(y, 5); y += 20; while (y--) lens[x++] = 0; } else if (z == 19) { /* code = 19, run of ([read 1 bit]+4) [read huffman symbol] */ READ_BITS(y, 1); y += 4; READ_HUFFSYM(PRETREE, z); z = lens[x] - z; if (z < 0) z += 17; while (y--) lens[x++] = z; } else { /* code = 0 to 16, delta current length entry */ z = lens[x] - z; if (z < 0) z += 17; lens[x++] = z; } } STORE_BITS; return MSPACK_ERR_OK; } /* LZX static data tables: * * LZX uses 'position slots' to represent match offsets. For every match, * a small 'position slot' number and a small offset from that slot are * encoded instead of one large offset. * * The number of slots is decided by how many are needed to encode the * largest offset for a given window size. This is easy when the gap between * slots is less than 128Kb, it's a linear relationship. But when extra_bits * reaches its limit of 17 (because LZX can only ensure reading 17 bits of * data at a time), we can only jump 128Kb at a time and have to start * using more and more position slots as each window size doubles. * * position_base[] is an index to the position slot bases * * extra_bits[] states how many bits of offset-from-base data is needed. * * They are calculated as follows: * extra_bits[i] = 0 where i < 4 * extra_bits[i] = floor(i/2)-1 where i >= 4 && i < 36 * extra_bits[i] = 17 where i >= 36 * position_base[0] = 0 * position_base[i] = position_base[i-1] + (1 << extra_bits[i-1]) */ static const unsigned int position_slots[11] = { 30, 32, 34, 36, 38, 42, 50, 66, 98, 162, 290 }; static const unsigned char extra_bits[36] = { 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16 }; static const unsigned int position_base[290] = { 0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576, 32768, 49152, 65536, 98304, 131072, 196608, 262144, 393216, 524288, 655360, 786432, 917504, 1048576, 1179648, 1310720, 1441792, 1572864, 1703936, 1835008, 1966080, 2097152, 2228224, 2359296, 2490368, 2621440, 2752512, 2883584, 3014656, 3145728, 3276800, 3407872, 3538944, 3670016, 3801088, 3932160, 4063232, 4194304, 4325376, 4456448, 4587520, 4718592, 4849664, 4980736, 5111808, 5242880, 5373952, 5505024, 5636096, 5767168, 5898240, 6029312, 6160384, 6291456, 6422528, 6553600, 6684672, 6815744, 6946816, 7077888, 7208960, 7340032, 7471104, 7602176, 7733248, 7864320, 7995392, 8126464, 8257536, 8388608, 8519680, 8650752, 8781824, 8912896, 9043968, 9175040, 9306112, 9437184, 9568256, 9699328, 9830400, 9961472, 10092544, 10223616, 10354688, 10485760, 10616832, 10747904, 10878976, 11010048, 11141120, 11272192, 11403264, 11534336, 11665408, 11796480, 11927552, 12058624, 12189696, 12320768, 12451840, 12582912, 12713984, 12845056, 12976128, 13107200, 13238272, 13369344, 13500416, 13631488, 13762560, 13893632, 14024704, 14155776, 14286848, 14417920, 14548992, 14680064, 14811136, 14942208, 15073280, 15204352, 15335424, 15466496, 15597568, 15728640, 15859712, 15990784, 16121856, 16252928, 16384000, 16515072, 16646144, 16777216, 16908288, 17039360, 17170432, 17301504, 17432576, 17563648, 17694720, 17825792, 17956864, 18087936, 18219008, 18350080, 18481152, 18612224, 18743296, 18874368, 19005440, 19136512, 19267584, 19398656, 19529728, 19660800, 19791872, 19922944, 20054016, 20185088, 20316160, 20447232, 20578304, 20709376, 20840448, 20971520, 21102592, 21233664, 21364736, 21495808, 21626880, 21757952, 21889024, 22020096, 22151168, 22282240, 22413312, 22544384, 22675456, 22806528, 22937600, 23068672, 23199744, 23330816, 23461888, 23592960, 23724032, 23855104, 23986176, 24117248, 24248320, 24379392, 24510464, 24641536, 24772608, 24903680, 25034752, 25165824, 25296896, 25427968, 25559040, 25690112, 25821184, 25952256, 26083328, 26214400, 26345472, 26476544, 26607616, 26738688, 26869760, 27000832, 27131904, 27262976, 27394048, 27525120, 27656192, 27787264, 27918336, 28049408, 28180480, 28311552, 28442624, 28573696, 28704768, 28835840, 28966912, 29097984, 29229056, 29360128, 29491200, 29622272, 29753344, 29884416, 30015488, 30146560, 30277632, 30408704, 30539776, 30670848, 30801920, 30932992, 31064064, 31195136, 31326208, 31457280, 31588352, 31719424, 31850496, 31981568, 32112640, 32243712, 32374784, 32505856, 32636928, 32768000, 32899072, 33030144, 33161216, 33292288, 33423360 }; static void lzxd_reset_state(struct lzxd_stream *lzx) { int i; lzx->R0 = 1; lzx->R1 = 1; lzx->R2 = 1; lzx->header_read = 0; lzx->block_remaining = 0; lzx->block_type = LZX_BLOCKTYPE_INVALID; /* initialise tables to 0 (because deltas will be applied to them) */ for (i = 0; i < LZX_MAINTREE_MAXSYMBOLS; i++) lzx->MAINTREE_len[i] = 0; for (i = 0; i < LZX_LENGTH_MAXSYMBOLS; i++) lzx->LENGTH_len[i] = 0; } /*-------- main LZX code --------*/ struct lzxd_stream *lzxd_init(struct mspack_system *system, struct mspack_file *input, struct mspack_file *output, int window_bits, int reset_interval, int input_buffer_size, off_t output_length, char is_delta) { unsigned int window_size = 1 << window_bits; struct lzxd_stream *lzx; if (!system) return NULL; /* LZX DELTA window sizes are between 2^17 (128KiB) and 2^25 (32MiB), * regular LZX windows are between 2^15 (32KiB) and 2^21 (2MiB) */ if (is_delta) { if (window_bits < 17 || window_bits > 25) return NULL; } else { if (window_bits < 15 || window_bits > 21) return NULL; } if (reset_interval < 0 || output_length < 0) { D(("reset interval or output length < 0")) return NULL; } /* round up input buffer size to multiple of two */ input_buffer_size = (input_buffer_size + 1) & -2; if (input_buffer_size < 2) return NULL; /* allocate decompression state */ if (!(lzx = (struct lzxd_stream *) system->alloc(system, sizeof(struct lzxd_stream)))) { return NULL; } /* allocate decompression window and input buffer */ lzx->window = (unsigned char *) system->alloc(system, window_size); lzx->inbuf = (unsigned char *) system->alloc(system, input_buffer_size); if (!lzx->window || !lzx->inbuf) { system->free(lzx->window); system->free(lzx->inbuf); system->free(lzx); return NULL; } /* initialise decompression state */ lzx->sys = system; lzx->input = input; lzx->output = output; lzx->offset = 0; lzx->length = output_length; lzx->inbuf_size = input_buffer_size; lzx->window_size = 1 << window_bits; lzx->ref_data_size = 0; lzx->window_posn = 0; lzx->frame_posn = 0; lzx->frame = 0; lzx->reset_interval = reset_interval; lzx->intel_filesize = 0; lzx->intel_started = 0; lzx->error = MSPACK_ERR_OK; lzx->num_offsets = position_slots[window_bits - 15] << 3; lzx->is_delta = is_delta; lzx->o_ptr = lzx->o_end = &lzx->e8_buf[0]; lzxd_reset_state(lzx); INIT_BITS; return lzx; } int lzxd_set_reference_data(struct lzxd_stream *lzx, struct mspack_system *system, struct mspack_file *input, unsigned int length) { if (!lzx) return MSPACK_ERR_ARGS; if (!lzx->is_delta) { D(("only LZX DELTA streams support reference data")) return MSPACK_ERR_ARGS; } if (lzx->offset) { D(("too late to set reference data after decoding starts")) return MSPACK_ERR_ARGS; } if (length > lzx->window_size) { D(("reference length (%u) is longer than the window", length)) return MSPACK_ERR_ARGS; } if (length > 0 && (!system || !input)) { D(("length > 0 but no system or input")) return MSPACK_ERR_ARGS; } lzx->ref_data_size = length; if (length > 0) { /* copy reference data */ unsigned char *pos = &lzx->window[lzx->window_size - length]; int bytes = system->read(input, pos, length); /* length can't be more than 2^25, so no signedness problem */ if (bytes < (int)length) return MSPACK_ERR_READ; } lzx->ref_data_size = length; return MSPACK_ERR_OK; } void lzxd_set_output_length(struct lzxd_stream *lzx, off_t out_bytes) { if (lzx && out_bytes > 0) lzx->length = out_bytes; } int lzxd_decompress(struct lzxd_stream *lzx, off_t out_bytes) { DECLARE_HUFF_VARS; unsigned char *window, *runsrc, *rundest, buf[12], warned = 0; unsigned int frame_size, end_frame, window_posn, R0, R1, R2; int bytes_todo, this_run, i, j; /* easy answers */ if (!lzx || (out_bytes < 0)) return MSPACK_ERR_ARGS; if (lzx->error) return lzx->error; /* flush out any stored-up bytes before we begin */ i = lzx->o_end - lzx->o_ptr; if ((off_t) i > out_bytes) i = (int) out_bytes; if (i) { if (lzx->sys->write(lzx->output, lzx->o_ptr, i) != i) { return lzx->error = MSPACK_ERR_WRITE; } lzx->o_ptr += i; lzx->offset += i; out_bytes -= i; } if (out_bytes == 0) return MSPACK_ERR_OK; /* restore local state */ RESTORE_BITS; window = lzx->window; window_posn = lzx->window_posn; R0 = lzx->R0; R1 = lzx->R1; R2 = lzx->R2; end_frame = (unsigned int)((lzx->offset + out_bytes) / LZX_FRAME_SIZE) + 1; while (lzx->frame < end_frame) { /* have we reached the reset interval? (if there is one?) */ if (lzx->reset_interval && ((lzx->frame % lzx->reset_interval) == 0)) { if (lzx->block_remaining) { /* this is a file format error, we can make a best effort to extract what we can */ D(("%d bytes remaining at reset interval", lzx->block_remaining)) if (!warned) { lzx->sys->message(NULL, "WARNING; invalid reset interval detected during LZX decompression"); warned++; } } /* re-read the intel header and reset the huffman lengths */ lzxd_reset_state(lzx); R0 = lzx->R0; R1 = lzx->R1; R2 = lzx->R2; } /* LZX DELTA format has chunk_size, not present in LZX format */ if (lzx->is_delta) { ENSURE_BITS(16); REMOVE_BITS(16); } /* read header if necessary */ if (!lzx->header_read) { /* read 1 bit. if bit=0, intel filesize = 0. * if bit=1, read intel filesize (32 bits) */ j = 0; READ_BITS(i, 1); if (i) { READ_BITS(i, 16); READ_BITS(j, 16); } lzx->intel_filesize = (i << 16) | j; lzx->header_read = 1; } /* calculate size of frame: all frames are 32k except the final frame * which is 32kb or less. this can only be calculated when lzx->length * has been filled in. */ frame_size = LZX_FRAME_SIZE; if (lzx->length && (lzx->length - lzx->offset) < (off_t)frame_size) { frame_size = lzx->length - lzx->offset; } /* decode until one more frame is available */ bytes_todo = lzx->frame_posn + frame_size - window_posn; while (bytes_todo > 0) { /* initialise new block, if one is needed */ if (lzx->block_remaining == 0) { /* realign if previous block was an odd-sized UNCOMPRESSED block */ if ((lzx->block_type == LZX_BLOCKTYPE_UNCOMPRESSED) && (lzx->block_length & 1)) { READ_IF_NEEDED; i_ptr++; } /* read block type (3 bits) and block length (24 bits) */ READ_BITS(lzx->block_type, 3); READ_BITS(i, 16); READ_BITS(j, 8); lzx->block_remaining = lzx->block_length = (i << 8) | j; /*D(("new block t%d len %u", lzx->block_type, lzx->block_length))*/ /* read individual block headers */ switch (lzx->block_type) { case LZX_BLOCKTYPE_ALIGNED: /* read lengths of and build aligned huffman decoding tree */ for (i = 0; i < 8; i++) { READ_BITS(j, 3); lzx->ALIGNED_len[i] = j; } BUILD_TABLE(ALIGNED); /* rest of aligned header is same as verbatim */ /*@fallthrough@*/ case LZX_BLOCKTYPE_VERBATIM: /* read lengths of and build main huffman decoding tree */ READ_LENGTHS(MAINTREE, 0, 256); READ_LENGTHS(MAINTREE, 256, LZX_NUM_CHARS + lzx->num_offsets); BUILD_TABLE(MAINTREE); /* if the literal 0xE8 is anywhere in the block... */ if (lzx->MAINTREE_len[0xE8] != 0) lzx->intel_started = 1; /* read lengths of and build lengths huffman decoding tree */ READ_LENGTHS(LENGTH, 0, LZX_NUM_SECONDARY_LENGTHS); BUILD_TABLE_MAYBE_EMPTY(LENGTH); break; case LZX_BLOCKTYPE_UNCOMPRESSED: /* because we can't assume otherwise */ lzx->intel_started = 1; /* read 1-16 (not 0-15) bits to align to bytes */ if (bits_left == 0) ENSURE_BITS(16); bits_left = 0; bit_buffer = 0; /* read 12 bytes of stored R0 / R1 / R2 values */ for (rundest = &buf[0], i = 0; i < 12; i++) { READ_IF_NEEDED; *rundest++ = *i_ptr++; } R0 = EndGetI32(&buf[0]); R1 = EndGetI32(&buf[4]); R2 = EndGetI32(&buf[8]); break; default: D(("bad block type")) return lzx->error = MSPACK_ERR_DECRUNCH; } } /* decode more of the block: * run = min(what's available, what's needed) */ this_run = lzx->block_remaining; if (this_run > bytes_todo) this_run = bytes_todo; /* assume we decode exactly this_run bytes, for now */ bytes_todo -= this_run; lzx->block_remaining -= this_run; /* decode at least this_run bytes */ switch (lzx->block_type) { case LZX_BLOCKTYPE_ALIGNED: case LZX_BLOCKTYPE_VERBATIM: while (this_run > 0) { int main_element, length_footer, verbatim_bits, aligned_bits, extra; int match_length; unsigned int match_offset; READ_HUFFSYM(MAINTREE, main_element); if (main_element < LZX_NUM_CHARS) { /* literal: 0 to LZX_NUM_CHARS-1 */ window[window_posn++] = main_element; this_run--; } else { /* match: LZX_NUM_CHARS + ((slot<<3) | length_header (3 bits)) */ main_element -= LZX_NUM_CHARS; /* get match length */ match_length = main_element & LZX_NUM_PRIMARY_LENGTHS; if (match_length == LZX_NUM_PRIMARY_LENGTHS) { if (lzx->LENGTH_empty) { D(("LENGTH symbol needed but tree is empty")) return lzx->error = MSPACK_ERR_DECRUNCH; } READ_HUFFSYM(LENGTH, length_footer); match_length += length_footer; } match_length += LZX_MIN_MATCH; /* get match offset */ switch ((match_offset = (main_element >> 3))) { case 0: match_offset = R0; break; case 1: match_offset = R1; R1=R0; R0 = match_offset; break; case 2: match_offset = R2; R2=R0; R0 = match_offset; break; default: extra = (match_offset >= 36) ? 17 : extra_bits[match_offset]; match_offset = position_base[match_offset] - 2; if (extra >= 3 && lzx->block_type == LZX_BLOCKTYPE_ALIGNED) { if (extra > 3) { READ_BITS(verbatim_bits, extra - 3); /* 1-14 bits */ match_offset += verbatim_bits << 3; } READ_HUFFSYM(ALIGNED, aligned_bits); match_offset += aligned_bits; } else if (extra) { READ_BITS(verbatim_bits, extra); /* 1-17 bits */ match_offset += verbatim_bits; } /* update repeated offset LRU queue */ R2 = R1; R1 = R0; R0 = match_offset; } /* LZX DELTA uses max match length to signal even longer match */ if (match_length == LZX_MAX_MATCH && lzx->is_delta) { int extra_len = 0; ENSURE_BITS(3); /* 4 entry huffman tree */ if (PEEK_BITS(1) == 0) { REMOVE_BITS(1); /* '0' -> 8 extra length bits */ READ_BITS(extra_len, 8); } else if (PEEK_BITS(2) == 2) { REMOVE_BITS(2); /* '10' -> 10 extra length bits + 0x100 */ READ_BITS(extra_len, 10); extra_len += 0x100; } else if (PEEK_BITS(3) == 6) { REMOVE_BITS(3); /* '110' -> 12 extra length bits + 0x500 */ READ_BITS(extra_len, 12); extra_len += 0x500; } else { REMOVE_BITS(3); /* '111' -> 15 extra length bits */ READ_BITS(extra_len, 15); } match_length += extra_len; } if ((window_posn + match_length) > lzx->window_size) { D(("match ran over window wrap")) return lzx->error = MSPACK_ERR_DECRUNCH; } /* copy match */ rundest = &window[window_posn]; i = match_length; /* does match offset wrap the window? */ if (match_offset > window_posn) { if ((off_t)match_offset > lzx->offset && (match_offset - window_posn) > lzx->ref_data_size) { D(("match offset beyond LZX stream")) return lzx->error = MSPACK_ERR_DECRUNCH; } /* j = length from match offset to end of window */ j = match_offset - window_posn; if (j > (int) lzx->window_size) { D(("match offset beyond window boundaries")) return lzx->error = MSPACK_ERR_DECRUNCH; } runsrc = &window[lzx->window_size - j]; if (j < i) { /* if match goes over the window edge, do two copy runs */ i -= j; while (j-- > 0) *rundest++ = *runsrc++; runsrc = window; } while (i-- > 0) *rundest++ = *runsrc++; } else { runsrc = rundest - match_offset; while (i-- > 0) *rundest++ = *runsrc++; } this_run -= match_length; window_posn += match_length; } } /* while (this_run > 0) */ break; case LZX_BLOCKTYPE_UNCOMPRESSED: /* as this_run is limited not to wrap a frame, this also means it * won't wrap the window (as the window is a multiple of 32k) */ rundest = &window[window_posn]; window_posn += this_run; while (this_run > 0) { if ((i = i_end - i_ptr) == 0) { READ_IF_NEEDED; } else { if (i > this_run) i = this_run; lzx->sys->copy(i_ptr, rundest, i); rundest += i; i_ptr += i; this_run -= i; } } break; default: return lzx->error = MSPACK_ERR_DECRUNCH; /* might as well */ } /* did the final match overrun our desired this_run length? */ if (this_run < 0) { if ((unsigned int)(-this_run) > lzx->block_remaining) { D(("overrun went past end of block by %d (%d remaining)", -this_run, lzx->block_remaining )) return lzx->error = MSPACK_ERR_DECRUNCH; } lzx->block_remaining -= -this_run; } } /* while (bytes_todo > 0) */ /* streams don't extend over frame boundaries */ if ((window_posn - lzx->frame_posn) != frame_size) { D(("decode beyond output frame limits! %d != %d", window_posn - lzx->frame_posn, frame_size)) return lzx->error = MSPACK_ERR_DECRUNCH; } /* re-align input bitstream */ if (bits_left > 0) ENSURE_BITS(16); if (bits_left & 15) REMOVE_BITS(bits_left & 15); /* check that we've used all of the previous frame first */ if (lzx->o_ptr != lzx->o_end) { D(("%ld avail bytes, new %d frame", (long)(lzx->o_end - lzx->o_ptr), frame_size)) return lzx->error = MSPACK_ERR_DECRUNCH; } /* does this intel block _really_ need decoding? */ if (lzx->intel_started && lzx->intel_filesize && (lzx->frame < 32768) && (frame_size > 10)) { unsigned char *data = &lzx->e8_buf[0]; unsigned char *dataend = &lzx->e8_buf[frame_size - 10]; signed int curpos = (int) lzx->offset; signed int filesize = lzx->intel_filesize; signed int abs_off, rel_off; /* copy e8 block to the e8 buffer and tweak if needed */ lzx->o_ptr = data; lzx->sys->copy(&lzx->window[lzx->frame_posn], data, frame_size); while (data < dataend) { if (*data++ != 0xE8) { curpos++; continue; } abs_off = EndGetI32(data); if ((abs_off >= -curpos) && (abs_off < filesize)) { rel_off = (abs_off >= 0) ? abs_off - curpos : abs_off + filesize; data[0] = (unsigned char) rel_off; data[1] = (unsigned char) (rel_off >> 8); data[2] = (unsigned char) (rel_off >> 16); data[3] = (unsigned char) (rel_off >> 24); } data += 4; curpos += 5; } } else { lzx->o_ptr = &lzx->window[lzx->frame_posn]; } lzx->o_end = &lzx->o_ptr[frame_size]; /* write a frame */ i = (out_bytes < (off_t)frame_size) ? (unsigned int)out_bytes : frame_size; if (lzx->sys->write(lzx->output, lzx->o_ptr, i) != i) { return lzx->error = MSPACK_ERR_WRITE; } lzx->o_ptr += i; lzx->offset += i; out_bytes -= i; /* advance frame start position */ lzx->frame_posn += frame_size; lzx->frame++; /* wrap window / frame position pointers */ if (window_posn == lzx->window_size) window_posn = 0; if (lzx->frame_posn == lzx->window_size) lzx->frame_posn = 0; } /* while (lzx->frame < end_frame) */ if (out_bytes) { D(("bytes left to output")) return lzx->error = MSPACK_ERR_DECRUNCH; } /* store local state */ STORE_BITS; lzx->window_posn = window_posn; lzx->R0 = R0; lzx->R1 = R1; lzx->R2 = R2; return MSPACK_ERR_OK; } void lzxd_free(struct lzxd_stream *lzx) { struct mspack_system *sys; if (lzx) { sys = lzx->sys; sys->free(lzx->inbuf); sys->free(lzx->window); sys->free(lzx); } } cabextract-1.11/mspack/readbits.h0000664000175000017500000002065514372277400013741 00000000000000/* This file is part of libmspack. * (C) 2003-2010 Stuart Caie. * * libmspack is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License (LGPL) version 2.1 * * For further details, see the file COPYING.LIB distributed with libmspack */ #ifndef MSPACK_READBITS_H #define MSPACK_READBITS_H 1 /* this header defines macros that read data streams by * the individual bits * * DECLARE_BIT_VARS declares local variables * INIT_BITS initialises bitstream state in state structure * STORE_BITS stores bitstream state in state structure * RESTORE_BITS restores bitstream state from state structure * ENSURE_BITS(n) ensure there are at least N bits in the bit buffer * READ_BITS(var,n) takes N bits from the buffer and puts them in var * PEEK_BITS(n) extracts without removing N bits from the bit buffer * REMOVE_BITS(n) removes N bits from the bit buffer * * READ_BITS simply calls ENSURE_BITS, PEEK_BITS and REMOVE_BITS, * which means it's limited to reading the number of bits you can * ensure at any one time. It also fails if asked to read zero bits. * If you need to read zero bits, or more bits than can be ensured in * one go, use READ_MANY_BITS instead. * * These macros have variable names baked into them, so to use them * you have to define some macros: * - BITS_TYPE: the type name of your state structure * - BITS_VAR: the variable that points to your state structure * - define BITS_ORDER_MSB if bits are read from the MSB, or * define BITS_ORDER_LSB if bits are read from the LSB * - READ_BYTES: some code that reads more data into the bit buffer, * it should use READ_IF_NEEDED (calls read_input if the byte buffer * is empty), then INJECT_BITS(data,n) to put data from the byte * buffer into the bit buffer. * * You also need to define some variables and structure members: * - unsigned char *i_ptr; // current position in the byte buffer * - unsigned char *i_end; // end of the byte buffer * - unsigned int bit_buffer; // the bit buffer itself * - unsigned int bits_left; // number of bits remaining * * If you use read_input() and READ_IF_NEEDED, they also expect these * structure members: * - struct mspack_system *sys; // to access sys->read() * - unsigned int error; // to record/return read errors * - unsigned char input_end; // to mark reaching the EOF * - unsigned char *inbuf; // the input byte buffer * - unsigned int inbuf_size; // the size of the input byte buffer * * Your READ_BYTES implementation should read data from *i_ptr and * put them in the bit buffer. READ_IF_NEEDED will call read_input() * if i_ptr reaches i_end, and will fill up inbuf and set i_ptr to * the start of inbuf and i_end to the end of inbuf. * * If you're reading in MSB order, the routines work by using the area * beyond the MSB and the LSB of the bit buffer as a free source of * zeroes when shifting. This avoids having to mask any bits. So we * have to know the bit width of the bit buffer variable. We use * and CHAR_BIT to find the size of the bit buffer in bits. * * If you are reading in LSB order, bits need to be masked. Normally * this is done by computing the mask: N bits are masked by the value * (1< #endif #ifndef CHAR_BIT # define CHAR_BIT (8) #endif #define BITBUF_WIDTH (sizeof(bitbuf_type) * CHAR_BIT) #define DECLARE_BIT_VARS \ unsigned char *i_ptr, *i_end; \ register bitbuf_type bit_buffer; \ register int bits_left #define INIT_BITS do { \ BITS_VAR->i_ptr = &BITS_VAR->inbuf[0]; \ BITS_VAR->i_end = &BITS_VAR->inbuf[0]; \ BITS_VAR->bit_buffer = 0; \ BITS_VAR->bits_left = 0; \ BITS_VAR->input_end = 0; \ } while (0) #define STORE_BITS do { \ BITS_VAR->i_ptr = i_ptr; \ BITS_VAR->i_end = i_end; \ BITS_VAR->bit_buffer = bit_buffer; \ BITS_VAR->bits_left = bits_left; \ } while (0) #define RESTORE_BITS do { \ i_ptr = BITS_VAR->i_ptr; \ i_end = BITS_VAR->i_end; \ bit_buffer = BITS_VAR->bit_buffer; \ bits_left = BITS_VAR->bits_left; \ } while (0) #define ENSURE_BITS(nbits) do { \ while (bits_left < (nbits)) READ_BYTES; \ } while (0) #define READ_BITS(val, nbits) do { \ ENSURE_BITS(nbits); \ (val) = PEEK_BITS(nbits); \ REMOVE_BITS(nbits); \ } while (0) #define READ_MANY_BITS(val, bits) do { \ unsigned char needed = (bits), bitrun; \ (val) = 0; \ while (needed > 0) { \ if (bits_left <= (int)(BITBUF_WIDTH - 16)) READ_BYTES; \ bitrun = (bits_left < needed) ? bits_left : needed; \ (val) = ((val) << bitrun) | PEEK_BITS(bitrun); \ REMOVE_BITS(bitrun); \ needed -= bitrun; \ } \ } while (0) #ifdef BITS_ORDER_MSB # define PEEK_BITS(nbits) (bit_buffer >> (BITBUF_WIDTH - (nbits))) # define REMOVE_BITS(nbits) ((bit_buffer <<= (nbits)), (bits_left -= (nbits))) # define INJECT_BITS(bitdata,nbits) ((bit_buffer |= \ (bitbuf_type)(bitdata) << (BITBUF_WIDTH - (nbits) - bits_left)), \ (bits_left += (nbits))) #else /* BITS_ORDER_LSB */ # define PEEK_BITS(nbits) (bit_buffer & ((bitbuf_type)(1 << (nbits))-1)) # define REMOVE_BITS(nbits) ((bit_buffer >>= (nbits)), (bits_left -= (nbits))) # define INJECT_BITS(bitdata,nbits) ((bit_buffer |= \ (bitbuf_type)(bitdata) << bits_left), (bits_left += (nbits))) #endif #ifdef BITS_LSB_TABLE /* lsb_bit_mask[n] = (1 << n) - 1 */ static const unsigned short lsb_bit_mask[17] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff }; # define PEEK_BITS_T(nbits) (bit_buffer & lsb_bit_mask[(nbits)]) # define READ_BITS_T(val, nbits) do { \ ENSURE_BITS(nbits); \ (val) = PEEK_BITS_T(nbits); \ REMOVE_BITS(nbits); \ } while (0) #endif #ifndef BITS_NO_READ_INPUT # define READ_IF_NEEDED do { \ if (i_ptr >= i_end) { \ if (read_input(BITS_VAR)) \ return BITS_VAR->error; \ i_ptr = BITS_VAR->i_ptr; \ i_end = BITS_VAR->i_end; \ } \ } while (0) static int read_input(BITS_TYPE *p) { int read = p->sys->read(p->input, &p->inbuf[0], (int)p->inbuf_size); if (read < 0) return p->error = MSPACK_ERR_READ; /* we might overrun the input stream by asking for bits we don't use, * so fake 2 more bytes at the end of input */ if (read == 0) { if (p->input_end) { D(("out of input bytes")) return p->error = MSPACK_ERR_READ; } else { read = 2; p->inbuf[0] = p->inbuf[1] = 0; p->input_end = 1; } } /* update i_ptr and i_end */ p->i_ptr = &p->inbuf[0]; p->i_end = &p->inbuf[read]; return MSPACK_ERR_OK; } #endif #endif cabextract-1.11/mspack/qtmd.c0000664000175000017500000004242314370426615013103 00000000000000/* This file is part of libmspack. * (C) 2003-2023 Stuart Caie. * * The Quantum method was created by David Stafford, adapted by Microsoft * Corporation. * * This decompressor is based on an implementation by Matthew Russotto, used * with permission. * * libmspack is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License (LGPL) version 2.1 * * For further details, see the file COPYING.LIB distributed with libmspack */ /* Quantum decompression implementation */ /* This decompressor was researched and implemented by Matthew Russotto. It * has since been tidied up by Stuart Caie. More information can be found at * http://www.speakeasy.org/~russotto/quantumcomp.html */ #include #include /* import bit-reading macros and code */ #define BITS_TYPE struct qtmd_stream #define BITS_VAR qtm #define BITS_ORDER_MSB #define READ_BYTES do { \ unsigned char b0, b1; \ READ_IF_NEEDED; b0 = *i_ptr++; \ READ_IF_NEEDED; b1 = *i_ptr++; \ INJECT_BITS((b0 << 8) | b1, 16); \ } while (0) #include /* Quantum static data tables: * * Quantum uses 'position slots' to represent match offsets. For every * match, a small 'position slot' number and a small offset from that slot * are encoded instead of one large offset. * * position_base[] is an index to the position slot bases * * extra_bits[] states how many bits of offset-from-base data is needed. * * length_base[] and length_extra[] are equivalent in function, but are * used for encoding selector 6 (variable length match) match lengths, * instead of match offsets. * * They are generated with the following code: * unsigned int i, offset; * for (i = 0, offset = 0; i < 42; i++) { * position_base[i] = offset; * extra_bits[i] = ((i < 2) ? 0 : (i - 2)) >> 1; * offset += 1 << extra_bits[i]; * } * for (i = 0, offset = 0; i < 26; i++) { * length_base[i] = offset; * length_extra[i] = (i < 2 ? 0 : i - 2) >> 2; * offset += 1 << length_extra[i]; * } * length_base[26] = 254; length_extra[26] = 0; */ static const unsigned int position_base[42] = { 0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576, 32768, 49152, 65536, 98304, 131072, 196608, 262144, 393216, 524288, 786432, 1048576, 1572864 }; static const unsigned char extra_bits[42] = { 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19 }; static const unsigned char length_base[27] = { 0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 18, 22, 26, 30, 38, 46, 54, 62, 78, 94, 110, 126, 158, 190, 222, 254 }; static const unsigned char length_extra[27] = { 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0 }; /* Arithmetic decoder: * * GET_SYMBOL(model, var) fetches the next symbol from the stated model * and puts it in var. * * If necessary, qtmd_update_model() is called. */ #define GET_SYMBOL(model, var) do { \ range = ((H - L) & 0xFFFF) + 1; \ symf = ((((C - L + 1) * model.syms[0].cumfreq)-1) / range) & 0xFFFF; \ \ for (i = 1; i < model.entries; i++) { \ if (model.syms[i].cumfreq <= symf) break; \ } \ (var) = model.syms[i-1].sym; \ \ range = (H - L) + 1; \ symf = model.syms[0].cumfreq; \ H = L + ((model.syms[i-1].cumfreq * range) / symf) - 1; \ L = L + ((model.syms[i].cumfreq * range) / symf); \ \ do { model.syms[--i].cumfreq += 8; } while (i > 0); \ if (model.syms[0].cumfreq > 3800) qtmd_update_model(&model); \ \ while (1) { \ if ((L & 0x8000) != (H & 0x8000)) { \ if ((L & 0x4000) && !(H & 0x4000)) { \ /* underflow case */ \ C ^= 0x4000; L &= 0x3FFF; H |= 0x4000; \ } \ else break; \ } \ L <<= 1; H = (H << 1) | 1; \ ENSURE_BITS(1); \ C = (C << 1) | PEEK_BITS(1); \ REMOVE_BITS(1); \ } \ } while (0) static void qtmd_update_model(struct qtmd_model *model) { struct qtmd_modelsym tmp; int i, j; if (--model->shiftsleft) { for (i = model->entries - 1; i >= 0; i--) { /* -1, not -2; the 0 entry saves this */ model->syms[i].cumfreq >>= 1; if (model->syms[i].cumfreq <= model->syms[i+1].cumfreq) { model->syms[i].cumfreq = model->syms[i+1].cumfreq + 1; } } } else { model->shiftsleft = 50; for (i = 0; i < model->entries; i++) { /* no -1, want to include the 0 entry */ /* this converts cumfreqs into frequencies, then shifts right */ model->syms[i].cumfreq -= model->syms[i+1].cumfreq; model->syms[i].cumfreq++; /* avoid losing things entirely */ model->syms[i].cumfreq >>= 1; } /* now sort by frequencies, decreasing order -- this must be an * inplace selection sort, or a sort with the same (in)stability * characteristics */ for (i = 0; i < model->entries - 1; i++) { for (j = i + 1; j < model->entries; j++) { if (model->syms[i].cumfreq < model->syms[j].cumfreq) { tmp = model->syms[i]; model->syms[i] = model->syms[j]; model->syms[j] = tmp; } } } /* then convert frequencies back to cumfreq */ for (i = model->entries - 1; i >= 0; i--) { model->syms[i].cumfreq += model->syms[i+1].cumfreq; } } } /* Initialises a model to decode symbols from [start] to [start]+[len]-1 */ static void qtmd_init_model(struct qtmd_model *model, struct qtmd_modelsym *syms, int start, int len) { int i; model->shiftsleft = 4; model->entries = len; model->syms = syms; for (i = 0; i <= len; i++) { syms[i].sym = start + i; /* actual symbol */ syms[i].cumfreq = len - i; /* current frequency of that symbol */ } } /*-------- main Quantum code --------*/ struct qtmd_stream *qtmd_init(struct mspack_system *system, struct mspack_file *input, struct mspack_file *output, int window_bits, int input_buffer_size) { unsigned int window_size = 1 << window_bits; struct qtmd_stream *qtm; int i; if (!system) return NULL; /* Quantum supports window sizes of 2^10 (1Kb) through 2^21 (2Mb) */ if (window_bits < 10 || window_bits > 21) return NULL; /* round up input buffer size to multiple of two */ input_buffer_size = (input_buffer_size + 1) & -2; if (input_buffer_size < 2) return NULL; /* allocate decompression state */ if (!(qtm = (struct qtmd_stream *) system->alloc(system, sizeof(struct qtmd_stream)))) { return NULL; } /* allocate decompression window and input buffer */ qtm->window = (unsigned char *) system->alloc(system, (size_t) window_size); qtm->inbuf = (unsigned char *) system->alloc(system, (size_t) input_buffer_size); if (!qtm->window || !qtm->inbuf) { system->free(qtm->window); system->free(qtm->inbuf); system->free(qtm); return NULL; } /* initialise decompression state */ qtm->sys = system; qtm->input = input; qtm->output = output; qtm->inbuf_size = input_buffer_size; qtm->window_size = window_size; qtm->window_posn = 0; qtm->frame_todo = QTM_FRAME_SIZE; qtm->header_read = 0; qtm->error = MSPACK_ERR_OK; qtm->i_ptr = qtm->i_end = &qtm->inbuf[0]; qtm->o_ptr = qtm->o_end = &qtm->window[0]; qtm->input_end = 0; qtm->bits_left = 0; qtm->bit_buffer = 0; /* initialise arithmetic coding models * - model 4 depends on window size, ranges from 20 to 24 * - model 5 depends on window size, ranges from 20 to 36 * - model 6pos depends on window size, ranges from 20 to 42 */ i = window_bits * 2; qtmd_init_model(&qtm->model0, &qtm->m0sym[0], 0, 64); qtmd_init_model(&qtm->model1, &qtm->m1sym[0], 64, 64); qtmd_init_model(&qtm->model2, &qtm->m2sym[0], 128, 64); qtmd_init_model(&qtm->model3, &qtm->m3sym[0], 192, 64); qtmd_init_model(&qtm->model4, &qtm->m4sym[0], 0, (i > 24) ? 24 : i); qtmd_init_model(&qtm->model5, &qtm->m5sym[0], 0, (i > 36) ? 36 : i); qtmd_init_model(&qtm->model6, &qtm->m6sym[0], 0, i); qtmd_init_model(&qtm->model6len, &qtm->m6lsym[0], 0, 27); qtmd_init_model(&qtm->model7, &qtm->m7sym[0], 0, 7); /* all ok */ return qtm; } int qtmd_decompress(struct qtmd_stream *qtm, off_t out_bytes) { DECLARE_BIT_VARS; unsigned int frame_todo, frame_end, window_posn, match_offset, range; unsigned char *window, *runsrc, *rundest; int i, j, selector, extra, sym, match_length; unsigned short H, L, C, symf; /* easy answers */ if (!qtm || (out_bytes < 0)) return MSPACK_ERR_ARGS; if (qtm->error) return qtm->error; /* flush out any stored-up bytes before we begin */ i = qtm->o_end - qtm->o_ptr; if ((off_t) i > out_bytes) i = (int) out_bytes; if (i) { if (qtm->sys->write(qtm->output, qtm->o_ptr, i) != i) { return qtm->error = MSPACK_ERR_WRITE; } qtm->o_ptr += i; out_bytes -= i; } if (out_bytes == 0) return MSPACK_ERR_OK; /* restore local state */ RESTORE_BITS; window = qtm->window; window_posn = qtm->window_posn; frame_todo = qtm->frame_todo; H = qtm->H; L = qtm->L; C = qtm->C; /* while we do not have enough decoded bytes in reserve: */ while ((qtm->o_end - qtm->o_ptr) < out_bytes) { /* read header if necessary. Initialises H, L and C */ if (!qtm->header_read) { H = 0xFFFF; L = 0; READ_BITS(C, 16); qtm->header_read = 1; } /* decode more, up to the number of bytes needed, the frame boundary, * or the window boundary, whichever comes first */ frame_end = window_posn + (out_bytes - (qtm->o_end - qtm->o_ptr)); if ((window_posn + frame_todo) < frame_end) { frame_end = window_posn + frame_todo; } if (frame_end > qtm->window_size) { frame_end = qtm->window_size; } while (window_posn < frame_end) { GET_SYMBOL(qtm->model7, selector); if (selector < 4) { /* literal byte */ struct qtmd_model *mdl = (selector == 0) ? &qtm->model0 : ((selector == 1) ? &qtm->model1 : ((selector == 2) ? &qtm->model2 : &qtm->model3)); GET_SYMBOL((*mdl), sym); window[window_posn++] = sym; frame_todo--; } else { /* match repeated string */ switch (selector) { case 4: /* selector 4 = fixed length match (3 bytes) */ GET_SYMBOL(qtm->model4, sym); READ_MANY_BITS(extra, extra_bits[sym]); match_offset = position_base[sym] + extra + 1; match_length = 3; break; case 5: /* selector 5 = fixed length match (4 bytes) */ GET_SYMBOL(qtm->model5, sym); READ_MANY_BITS(extra, extra_bits[sym]); match_offset = position_base[sym] + extra + 1; match_length = 4; break; case 6: /* selector 6 = variable length match */ GET_SYMBOL(qtm->model6len, sym); READ_MANY_BITS(extra, length_extra[sym]); match_length = length_base[sym] + extra + 5; GET_SYMBOL(qtm->model6, sym); READ_MANY_BITS(extra, extra_bits[sym]); match_offset = position_base[sym] + extra + 1; break; default: /* should be impossible, model7 can only return 0-6 */ D(("got %d from selector", selector)) return qtm->error = MSPACK_ERR_DECRUNCH; } rundest = &window[window_posn]; frame_todo -= match_length; /* does match destination wrap the window? This situation is possible * where the window size is less than the 32k frame size, but matches * must not go beyond a frame boundary */ if ((window_posn + match_length) > qtm->window_size) { /* copy first part of match, before window end */ i = qtm->window_size - window_posn; j = window_posn - match_offset; while (i--) *rundest++ = window[j++ & (qtm->window_size - 1)]; /* flush currently stored data */ i = (&window[qtm->window_size] - qtm->o_ptr); /* this should not happen, but if it does then this code * can't handle the situation (can't flush up to the end of * the window, but can't break out either because we haven't * finished writing the match). bail out in this case */ if (i > out_bytes) { D(("during window-wrap match; %d bytes to flush but only need %d", i, (int) out_bytes)) return qtm->error = MSPACK_ERR_DECRUNCH; } if (qtm->sys->write(qtm->output, qtm->o_ptr, i) != i) { return qtm->error = MSPACK_ERR_WRITE; } out_bytes -= i; qtm->o_ptr = &window[0]; qtm->o_end = &window[0]; /* copy second part of match, after window wrap */ rundest = &window[0]; i = match_length - (qtm->window_size - window_posn); while (i--) *rundest++ = window[j++ & (qtm->window_size - 1)]; window_posn = window_posn + match_length - qtm->window_size; break; /* because "window_posn < frame_end" has now failed */ } else { /* normal match - output won't wrap window or frame end */ i = match_length; /* does match _offset_ wrap the window? */ if (match_offset > window_posn) { /* j = length from match offset to end of window */ j = match_offset - window_posn; if (j > (int) qtm->window_size) { D(("match offset beyond window boundaries")) return qtm->error = MSPACK_ERR_DECRUNCH; } runsrc = &window[qtm->window_size - j]; if (j < i) { /* if match goes over the window edge, do two copy runs */ i -= j; while (j-- > 0) *rundest++ = *runsrc++; runsrc = window; } while (i-- > 0) *rundest++ = *runsrc++; } else { runsrc = rundest - match_offset; while (i-- > 0) *rundest++ = *runsrc++; } window_posn += match_length; } } /* if (window_posn+match_length > frame_end) */ } /* while (window_posn < frame_end) */ qtm->o_end = &window[window_posn]; /* if we subtracted too much from frame_todo, it will * wrap around past zero and go above its max value */ if (frame_todo > QTM_FRAME_SIZE) { D(("overshot frame alignment")) return qtm->error = MSPACK_ERR_DECRUNCH; } /* another frame completed? */ if (frame_todo == 0) { /* re-align input */ if (bits_left & 7) REMOVE_BITS(bits_left & 7); /* special Quantum hack -- cabd.c injects a trailer byte to allow the * decompressor to realign itself. CAB Quantum blocks, unlike LZX * blocks, can have anything from 0 to 4 trailing null bytes. */ do { READ_BITS(i, 8); } while (i != 0xFF); qtm->header_read = 0; frame_todo = QTM_FRAME_SIZE; } /* window wrap? */ if (window_posn == qtm->window_size) { /* flush all currently stored data */ i = (qtm->o_end - qtm->o_ptr); /* break out if we have more than enough to finish this request */ if (i >= out_bytes) break; if (qtm->sys->write(qtm->output, qtm->o_ptr, i) != i) { return qtm->error = MSPACK_ERR_WRITE; } out_bytes -= i; qtm->o_ptr = &window[0]; qtm->o_end = &window[0]; window_posn = 0; } } /* while (more bytes needed) */ if (out_bytes) { i = (int) out_bytes; if (qtm->sys->write(qtm->output, qtm->o_ptr, i) != i) { return qtm->error = MSPACK_ERR_WRITE; } qtm->o_ptr += i; } /* store local state */ STORE_BITS; qtm->window_posn = window_posn; qtm->frame_todo = frame_todo; qtm->H = H; qtm->L = L; qtm->C = C; return MSPACK_ERR_OK; } void qtmd_free(struct qtmd_stream *qtm) { struct mspack_system *sys; if (qtm) { sys = qtm->sys; sys->free(qtm->window); sys->free(qtm->inbuf); sys->free(qtm); } } cabextract-1.11/mspack/macros.h0000664000175000017500000000403414367456362013433 00000000000000/* This file is part of libmspack. * (C) 2003-2020 Stuart Caie. * * libmspack is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License (LGPL) version 2.1 * * For further details, see the file COPYING.LIB distributed with libmspack */ #ifndef MSPACK_MACROS_H #define MSPACK_MACROS_H 1 /* define LD and LU as printf-format for signed and unsigned long offsets */ #if HAVE_INTTYPES_H # include #else # define PRId64 "lld" # define PRIu64 "llu" # define PRId32 "ld" # define PRIu32 "lu" #endif #if SIZEOF_OFF_T >= 8 # define LD PRId64 # define LU PRIu64 #else # define LD PRId32 # define LU PRIu32 #endif /* endian-neutral reading of little-endian data */ #define __egi32(a,n) (((unsigned int) ((unsigned char *)(a))[n+3] << 24) | \ ((unsigned int) ((unsigned char *)(a))[n+2] << 16) | \ ((unsigned int) ((unsigned char *)(a))[n+1] << 8) | \ ((unsigned int) ((unsigned char *)(a))[n])) #define EndGetI64(a) (((unsigned long long int) __egi32(a,4) << 32) | __egi32(a,0)) #define EndGetI32(a) __egi32(a,0) #define EndGetI16(a) ((((a)[1])<<8)|((a)[0])) /* endian-neutral reading of big-endian data */ #define EndGetM32(a) (((unsigned int) ((unsigned char *)(a))[0] << 24) | \ ((unsigned int) ((unsigned char *)(a))[1] << 16) | \ ((unsigned int) ((unsigned char *)(a))[2] << 8) | \ ((unsigned int) ((unsigned char *)(a))[3])) #define EndGetM16(a) ((((a)[0])<<8)|((a)[1])) /* D(("formatstring", args)) prints debug messages if DEBUG defined */ #if DEBUG /* http://gcc.gnu.org/onlinedocs/gcc/Function-Names.html */ # if __STDC_VERSION__ < 199901L # if __GNUC__ >= 2 # define __func__ __FUNCTION__ # else # define __func__ "" # endif # endif # include # define D(x) do { printf("%s:%d (%s) ",__FILE__, __LINE__, __func__); \ printf x ; fputc('\n', stdout); fflush(stdout);} while (0); #else # define D(x) #endif #endif cabextract-1.11/mspack/ChangeLog0000664000175000017500000011374114372276540013550 000000000000002023-02-12 Stuart Caie * chmd.c: add a default tolower() if MSPACK_NO_DEFAULT_SYSTEM is set. 2023-02-03 Stuart Caie * configure.ac: do AC_CHECK_SIZEOF([off_t]) test only after AC_SYS_LARGEFILE, because the latter can alter the size of off_t. * cabd_extract(): file->offset and file->length are unsigned ints, both of them and their sum are checked to be <= CAB_LENGTHMAX. But recent code stuffs file->length into an off_t and checks that instead. On 32-bit architectures, if file->length > 2GiB then the off_t is negative, evading the check. Ultimately this causes the decompression functions to return MSPACK_ERR_ARGS as they already guard against being asked to decompress a negative number of bytes. 2023-02-01 Stuart Caie * readbits.h, readhuff.h, cabd.c, kwajd.c, lzxd.c, mszipd.c, qtmd.c: ensure bit operations (including intermediary ones) are considered as unsigned int, so UBSan is happy. 2023-01-31 Stuart Caie * chmd.c: replace READ_ENCINT() macro with stricter read_encint() function that reads no more than 63 or 31 bits so ENCINTs can never be negative. I'd prefer to use unsigned types, but off_t is used for file offsets and lengths to match the environment's file I/O, so changing it is tricky and would change the current public API. Additionally, UBSan complains about shifting a 1 into a signed type's MSB. https://www.cs.utah.edu/~regehr/papers/tosem15.pdf notes that this is legal in ANSI C and "fairly benign (and well- defined until C99)", but C99 made it undefined for no good reason. I don't agree with this, but I don't want someone else using a C99 compiler to end up miscompiling the code. * chmd_read_headers(): the CHM's internally declared file length is compared against its actual file length and a warning is printed if they don't match. * chmd_extract(): files in the uncompressed section will print a warning if their declared length goes beyond the declared end of the CHM file. This may not match the actual CHM file length. You will still get seek or read errors if a file's offset or length go beyond the actual CHM file length. Files in the compressed section will now cause a decrunch error if their declared offset goes beyond the uncompressed length of the section. If their offset is OK but their declared length goes beyond the end, they will print a warning and then decompress as much as possible before causing an error. 2023-01-02 Stuart Caie * kwajd_extract(): KWAJ compression method #2 is the QBasic variant of the SZDD compression algorithm. Thanks to Jason Summers for finding this and providing examples. 2021-07-20 Stuart Caie * lzxd_decompress(): simplified the code that decodes match_offset. Thanks to Jasper St. Pierre for prompting me to look at it. 2020-12-30 Stuart Caie * cabd_read_string(): libmspack no longer rejects CAB files with empty previnfo/nextinfo strings. Thanks to Simon Tatham for the patch, and for noting that WiX v4 currently generates such files. 2020-08-10 Stuart Caie * lzxd_decompress(): merged the code for decoding aligned and verbatim blocks, also verified there is no significant performance penalty. 2020-08-07 Stuart Caie * read_sys_file(): in a CHM file, the ControlData and ResetTable files are loaded entirely into memory, regardless of file size. This is not in the spirit of letting users control memory usage. ControlData previously had to be at least 28 bytes (in case a new, larger version of the file ever appeared), but is now rejected if not exactly 28 bytes. ResetTable can theoretically be huge; the longest LZX stream of 16 exabytes could have a 4 petabyte ResetTable. Practically, the largest seen in the wild is 46 kilobytes (PHP manuals). I picked an arbitrary upper limit of 1MB; please get in contact if you know of any CHM files in the wild that are largest than this. Thanks to seviezhou on Github for reporting this. 2020-04-13 Stuart Caie * system.h: clear up libmspack's large file support. To support large files, do this: 1. add any defines that your compiler needs to enable large file support. It may be supported by default. 2. Define HAVE_FSEEKO if fseeko() and ftello() are available. 3. Define SIZEOF_OFF_T to the value of sizeof(off_t); it must be a literal value because sizeof() can't be used in preprocessor tests. libmspack uses the off_t datatype for all file offsets. If off_t is less than 64 bits, libmspack will return an error when processing CHM files with offsets beyond 2GB, and won't search for CAB headers beyond 2GB into a file. In both cases, it prints a warning message that the library doesn't support large files. 2020-04-13 Stuart Caie * macros.h: new header for the D(), LD/LU and EndGet???() macros. Use this instead of system.h. * system.h: if MSPACK_NO_DEFAULT_SYSTEM is defined, define inline versions of the only standard C functions used in mspack (strlen, memcmp, memset), so that no standard C library functions are needed at all. 2020-01-08 Stuart Caie * lzxd_decompress(): do not apply the E8 transformation on the 32769th LZX frame! Thanks to Cezary Sliwa for discovering this bug and providing an example cab file (which is http://download.windowsupdate.com/d/msdownload/update/driver/ drvs/2019/11/016c7f3e-809d-4720-893b- e0d74f10c39d_35e12507628e8dc8ae5fb3332835f4253d2dab23.cab) * cabd_compare: use EXPAND.EXE instead of EXTRACT.EXE when testing files in a directory called 'expand'. The example cab file above is extracted wrongly by EXTRACT.EXE, but correctly by EXPAND.EXE because they take different approaches to E8 transformations: - EXTRACT.EXE writes "E8E8E8E8E8E8' to the last 6 bytes of frame, looks for E8 bytes up to the last 6 bytes, then restores the last 6 bytes, leaving partial transforms of 1-3 bytes if E8 byte is found near the end of the frame - EXPAND.EXE looks for E8 bytes up to the last 10 bytes of a frame, therefore the last 6 bytes are never altered and all transforms are 4 bytes 2019-02-18 Stuart Caie * chmd_read_headers(): a CHM file name beginning "::" but shorter than 33 bytes will lead to reading past the freshly-allocated name buffer - checks for specific control filenames didn't take length into account. Thanks to ADLab of Venustech for the report and proof of concept. 2019-02-18 Stuart Caie * chmd_read_headers(): CHM files can declare their chunks are any size up to 4GB, and libmspack will attempt to allocate that to read the file. This is not a security issue; libmspack doesn't promise how much memory it'll use to unpack files. You can set your own limits by returning NULL in a custom mspack_system.alloc() implementation. However, it would be good to validate chunk size further. With no offical specification, only empirical data is available. All files created by hhc.exe have a chunk size of 4096 bytes, and this is matched by all the files I've found in the wild, except for one which has a chunk size of 8192 bytes, which was created by someone developing a CHM file creator 15 years ago, and they appear to have abandoned it, so it seems 4096 is a de-facto standard. I've changed the "chunk size is not a power of two" warning to "chunk size is not 4096", and now only allow chunk sizes between 22 and 8192 bytes. If you have CHM files with a larger chunk size, please send them to me and I'll increase this upper limit. Thanks to ADLab of Venustech for the report. 2019-02-18 Stuart Caie * oabd.c: replaced one-shot copying of uncompressed blocks (which requires allocating a buffer of the size declared in the header, which can be 4GB) with a fixed-size buffer. The buffer size is user-controllable with the new msoab_decompressor::set_param() method (check you have version 2 of the OAB decompressor), and also controls the input buffer used for OAB's LZX decompression. Reminder: compression formats can dictate how much memory is needed to decompress them. If memory usage is a security concern to you, write a custom mspack_system.alloc() that returns NULL if "too much" memory is requested. Do not rely on libmspack adding special heuristics to know not to request "too much". Thanks to ADLab of Venustech for the report. 2018-11-03 Stuart Caie * configure.ac, doc/Makefile.in, doc/Doxyfile.in: remove these template files and replace with static files. You can still build the documentation with make -C doc 2018-11-03 Stuart Caie * Makefile.am, src: move the "useful" programs in src/ to examples/ and don't auto-install them. Even though they're useful, they are intended as examples and aren't productised (no commmand-line options, no man pages, etc.) -- if you disagree, feel free to send in a patch 2018-11-01 Stuart Caie * cabd_extract(): would not do decompression for random-access offsets if the folder type was LZX. This is a fairly major bug, and affects any decompression where you skip directly to a file, or decompress data out-of-order. Thanks to austin987 for alerting me to this. This bug was introduced by the recent 'salvage mode' patch. Even though I'd reviewed all the differences in clamav's copy of libmspack and said "wtf" to this particular change, I didn't notice it was still in the resulting patch I merged. Mea culpa :) * test/cabd_test.c: now has a regression test to cover this 2018-10-31 Stuart Caie * Makefile.am, test/*_test.c: use the automake test-suite system with the test-suite programs (cabd_test, chmd_test, kwajd_test). This also fixes a longstanding bugbear that these programs don't access their test files using an absolute path. Now this is passed to them and you can run them from any directory. Thanks to Richard Jones for requesting this. 2018-10-31 Stuart Caie * configure.ac: require at least automake 1.11, use AM_SILENT_RULES unconditionally 2018-10-30 Stuart Caie * configure.ac: remove obsolescent C library tests. AC_HEADER_STDC is removed, and so are most checks for standard C headers. libmspack now makes these assumptions: - exist - defines tolower() - defines memset(), memcmp(), strlen() - if towlower() exists, it's defined in 2018-10-22 Stuart Caie * cabd.c: remove the only use of assert() 2018-10-20 Stuart Caie * src/chmextract.c: add anti "../" and leading slash protection to chmextract. I'm not pleased about this. All the sample code provided with libmspack is meant to be simple examples of library use, not "productised" binaries. Making the "useful" code samples install as binaries was a mistake. They were never intended to protect you from unpacking archive files with relative/absolute paths, and I would prefer that they never will be. 2018-10-17 Stuart Caie * cab.h: Make the CAB block input buffer one byte larger, to allow a maximum-allowed-size input block and the special extra byte added after the block by cabd_sys_read_block to help Quantum alignment. Thanks to Henri Salo for reporting this. 2018-10-17 Stuart Caie * chmd_read_headers(): again reject files with blank filenames, this time because their 1st or 2nd byte is null, not because their length is zero. Thanks again to Hanno Böck for finding the issue. 2018-10-16 Stuart Caie * Makefile.am: using automake _DEPENDENCIES for chmd_test appears to override the default dependencies (e.g. sources), so libchmd.la was no longer considered a dependency of chmd_test. This breaks parallel builds like "make -j4". Added libchmd.la explicitly to dependencies. Thanks to Thomas Deutschmann for reporting this. 2018-10-16 Stuart Caie * cabd.c: add new parameter, MSCABD_PARAM_SALVAGE, which makes CAB file reading and extraction more lenient, to allow damaged or mangled CABs to be extracted. When enabled: - cabd->open() won't reject cabinets with files that have invalid folder indices or filenames. These files will simply be skipped - cabd->extract() won't reject files with invalid lengths, but will limit them to the maximum possible - block output sizes over 32768 bytes won't be rejected - invalid data block checksums won't be rejected It's still possible for corrupted files to fail extraction, but more data can be extracted before they do. This new parameter doesn't affect the existing MSCABD_PARAM_FIXMSZIP parameter, which ignores MSZIP decompression failures. You can enable both at once. Thanks to Micah Snyder from ClamAV for working with me to get this feature into libmspack. This also helps ClamAV move towards using a vanilla copy of libmspack without needing their own patchset. 2018-08-13 Stuart Caie * mspack.h: clarify that mspack_system.free() should allow NULL. If your mspack_system implementation doesn't, it would already have crashed, as there are several places where libmspack calls sys->free(NULL). This change makes it official, and amends a few "if (x) sys->free(x)" cases to the simpler "sys->free(x)" to make it clearer. 2018-08-09 Stuart Caie * Makefile.am: the test file cve-2015-4467-reset-interval-zero.chm is detected by ClamAV as BC.Legacy.Exploit.CVE_2012_1458-1 "infected". My hosting deletes anything that ClamAV calls "infected", so has been continually deleting the official libmspack 0.7alpha release. CVE-2012-1458 is the same issue as CVE-2015-4467: both libmspack, and ClamAV using libmspack, could get a division-by-zero crash when the LZX reset interval was zero. This was fixed years ago, but ClamAV still has it as a signature, which today prevents me from releasing libmspack. BC.Legacy.Exploit.CVE_2012_1458-1 is a bytecode signature, so I can't see the exact trigger conditions, but I can see that it looks for the "LZXC" signature of the LZX control file, so I've changed this to "lzxc" and added a step in the Makefile to change it back to LZXC, so I can release libmspack whether or not ClamAV keeps the signature. 2018-04-26 Stuart Caie * read_chunk(): the test that chunk numbers are in bounds was off by one, so read_chunk() returned a pointer taken from outside allocated memory that usually crashes libmspack when accessed. Thanks to Hanno Böck for finding the issue and providing a sample. * chmd_read_headers(): reject files with blank filenames. Thanks again to Hanno Böck for finding the issue and providing a sample file. 2018-02-06 Stuart Caie * chmd.c: fixed an off-by-one error in the TOLOWER() macro, reported by Dmitry Glavatskikh. Thanks Dmitry! 2017-11-26 Stuart Caie * kwajd_read_headers(): fix up the logic of reading the filename and extension headers to avoid a one or two byte overwrite. Thanks to Jakub Wilk for finding the issue. * test/kwajd_test.c: add tests for KWAJ filename.ext handling 2017-10-16 Stuart Caie * test/cabd_test.c: update the short string tests to expect not only MSPACK_ERR_DATAFORMAT but also MSPACK_ERR_READ, because of the recent change to cabd_read_string(). Thanks to maitreyee43 for spotting this. * test/msdecompile_md5: update the setup instructions for this script, and also change the script so it works with current Wine. Again, thanks to maitreyee43 for trying to use it and finding it not working. 2017-08-13 Stuart Caie * src/chmextract.c: support MinGW one-arg mkdir(). Thanks to AntumDeluge for reporting this. 2017-08-13 Stuart Caie * read_spaninfo(): a CHM file can have no ResetTable and have a negative length in SpanInfo, which then feeds a negative output length to lzxd_init(), which then sets frame_size to a value of your choosing, the lower 32 bits of output length, larger than LZX_FRAME_SIZE. If the first LZX block is uncompressed, this writes data beyond the end of the window. This issue was raised by ClamAV as CVE-2017-6419. Thanks to Sebastian Andrzej Siewior for finding this by chance! * lzxd_init(), lzxd_set_output_length(), mszipd_init(): due to the issue mentioned above, these functions now reject negative lengths 2017-08-05 Stuart Caie * cabd_read_string(): add missing error check on result of read(). If an mspack_system implementation returns an error, it's interpreted as a huge positive integer, which leads to reading past the end of the stack-based buffer. Thanks to Sebastian Andrzej Siewior for explaining the problem. This issue was raised by ClamAV as CVE-2017-11423 2016-04-20 Stuart Caie * configure.ac: change my email address to kyzer@cabextract.org.uk 2015-05-10 Stuart Caie * cabd_read_string(): correct rejection of empty strings. Thanks to Hanno Böck for finding the issue and providing a sample file. 2015-05-10 Stuart Caie * Makefile.am: Add subdir-objects option as suggested by autoreconf. * configure.ac: Add AM_PROG_AR as suggested by autoreconf. 2015-01-29 Stuart Caie * system.h: if C99 inttypes.h exists, use its PRI{d,u}{32,64} macros. Thanks to Johnathan Kollasch for the suggestion. 2015-01-18 Stuart Caie * lzxd_decompress(): the byte-alignment code for reading uncompressed block headers presumed it could wind i_ptr back 2 bytes, but this hasn't been true since READ_BYTES was allowed to read bytes straddling two blocks, leaving just 1 byte in the read buffer. Thanks to Jakub Wilk for finding the issue and providing a sample file. * inflate(): off-by-one error. Distance codes are 0-29, not 0-30. Thanks to Jakub Wilk again. * chmd_read_headers(), search_chunk(): another fix for checking pointer is within a chunk, thanks again to Jakub Wilk. 2015-01-17 Stuart Caie * GET_UTF8_CHAR(): Remove 5/6-byte encoding support and check decoded chars are no more than U+10FFFF. * chmd_init_decomp(): A reset interval of 0 is invalid. Thanks to Jakub Wilk for finding the issue and providing a sample and patch. 2015-01-15 Stuart Caie * chmd_read_headers(): add a bounds check to prevent over-reading data, which caused a segfault on 32-bit architectures. Thanks to Jakub Wilk. * search_chunk(): change the order of pointer arithmetic operations to avoid overflow during bounds checks, which lead to segfaults on 32-bit architectures. Again, thanks to Jakub Wilk for finding this issue, providing sample files and a patch. 2015-01-08 Stuart Caie * cabd_extract(): No longer uses broken state data if extracting from folder 1, 2, 1 and setting up folder 2 fails. This prevents a jump to null and thus segfault. Thanks to Jakub Wilk again. * cabd_read_string: reject empty strings. They are not found in any valid CAB files. Thanks to Hanno Böck for sending me an example. 2015-01-05 Stuart Caie * cabd_can_merge_folders(): disallow folder merging if the combined folder would have more than 65535 data blocks. * cabd_decompress(): disallow files if their offset, length or offset+length is more than 65535*32768, the maximum size of any folder. Thanks to Jakub Wilk for identifying the problem and providing a sample file. 2014-04-20 Stuart Caie * readhuff.h: fixed the table overflow check, which allowed one more code after capacity had been reached, resulting in a read of uninitialized data inside the decoding table. Thanks to Denis Kroshin for identifying the problem and providing a sample file. 2013-05-27 Stuart Caie * test/oabx.c: added new example command for unpacking OAB files. 2013-05-17 Stuart Caie * mspack.h: Support for decompressing a new file format, the Exchange Offline Address Book (OAB). Thanks to David Woodhouse for writing the implementation. I've bumped the version to 0.4alpha in celebration. 2012-04-15 Stuart Caie * chmd_read_headers(): More thorough validation of CHM header values. Thanks to Sergei Trofimovich for finding sample files. * read_reset_table(): Better test for overflow. Thanks again to Sergei Trofimovich for generating a good example. * test/chminfo.c: this test program reads the reset table by itself and was also susceptible to the same overflow problems. 2012-03-16 Stuart Caie * Makefile.am, configure.ac: make the GCC warning flags conditional on using the GCC compiler. Thanks to Dagobert Michelsen for letting me know. 2011-11-25 Stuart Caie * lzxd_decompress(): Prevent matches that go beyond the start of the LZX stream. Thanks to Sergei Trofimovich for testing with valgrind and finding a corrupt sample file that exercises this scenario. 2011-11-23 Stuart Caie * chmd_fast_find(): add a simple check against infinite PMGL loops. Thanks to Sergei Trofimovich for finding sample files. Multi-step PMGL/PMGI infinite loops remain possible. 2011-06-17 Stuart Caie * read_reset_table(): wasn't reading the right offset for getting the LZX uncompressed length. Thanks to Sergei Trofimovich for finding the bug. 2011-05-31 Stuart Caie * kwajd.c, mszipd.c: KWAJ type 4 files (MSZIP) are now supported. Thanks to Clive Turvey for sending me the format details. * doc/szdd_kwaj_format.html: Updated documentation to cover KWAJ's MSZIP compression. 2011-05-11 Stuart Caie * cabd_find(): rethought how large vs small file support is handled, as users were getting "library not compiled to support large files" message on some small files. Now checks for actual off_t overflow, rather than trying to preempt it. 2011-05-10: Stuart Caie * chmd.c: implemented fast_find() * test/chmx.c: removed the multiple extraction orders, now it just extracts in the fastest order * test/chmd_order.c: new program added to test that different extraction orders don't affect the results of extraction * test/chmd_find.c: new program to test that fast_find() works. Either supply your own filename to find, or it will try finding every file in the CHM. * configure.ac: because CHM fast find requires case-insensitive comparisons, tolower() or towlower() are used where possible. These functions and their headers are checked for. * mspack.h: exposed struct mschmd_sec_mscompressed's spaninfo and struct mschmd_header's first_pmgl, last_pmgl and chunk_cache to the world. Check that the CHM decoder version is v2 or higher before using them. * system.c: set CHM decoder version to v2 2011-04-27: Stuart Caie * many files: Made C++ compilers much happier with libmspack. Changed char * to const char * where possible. * mspack.h: Changed user-supplied char * to const char *. Unless you've written your own mspack_system implementation, you will likely be unaffected. If you have written your own mspack_system implementation: 1: change open() so it takes a const char *filename 2: change message() so it takes a const char *format If you cast your function into the mspack_system struct, you can change the cast instead of the function. 2011-04-27: Stuart Caie * Makefile.am: changed CFLAGS from "-Wsign-compare -Wconversion -pedantic" to "-W -Wno-unused". This enables more warnings, and disables these specific warnings which are now a hinderance. 2011-04-27: Stuart Caie * test/cabrip.c, test/chminfo.c: used macros from system.h for printing offsets and reading 64-bit values, rather than reinvent the wheel. * cabd_can_merge_folders(): declare variables at the start of a block so older C compilers won't choke. * cabd_find(): avoid compiler complaints about non-initialised variables. We know they'll get initialised before use, but the compiler can't reverse a state machine to draw the same conclusion. 2011-04-26: Stuart Caie * configure.ac, mspack/system.h: Added a configure test to get the size of off_t. If off_t is 8 bytes or more, we presume this system has large file support. This fixes LFS detection for Fedora x86_64 and Darwin/Mac OS X, neither of which declare FILESIZEBITS in . It's not against the POSIX standard to do this: "A definition of [FILESIZEBITS] shall be omitted from the header on specific implementations where the corresponding value is equal to or greater than the stated minimum, but where the value can vary depending on the file to which it is applied." (http://pubs.opengroup.org/onlinepubs/009695399/basedefs/limits.h.html) Thanks to Edward Sheldrake for the patch. 2011-04-26: Stuart Caie * chmd.c: all 64-bit integer reads are now consolidated into the read_off64() function * chmd_read_headers(): this function has been made resilient against accessing memory past the end of a chunk. Thanks to Sergei Trofimovich for sending me examples and analysis. * chmd_init_decomp(): this function now reads the SpanInfo file if the ResetTable file isn't available, it also checks that each system file it needs is large enough before accessing it, and some of its code has been split into several new functions: find_sys_file(), read_reset_table() and read_spaninfo() 2011-04-26: Stuart Caie * mspack.h, chmd.c: now reads the SpanInfo system file if the ResetTable file isn't available. This adds a new spaninfo pointer into struct mschmd_sec_mscompressed 2011-04-26: Stuart Caie * test/chminfo.c: more sanity checks for corrupted CHM files where entries go past the end of a PMGL/PMGI chunk, thanks to Sergei Trofimovich for sending me examples and analysis. 2011-04-25: Stuart Caie * cabd_merge(): Drew D'Addesio showed me spanning cabinets which don't have all the CFFILE entries they should, but otherwise have all necessary data for extraction. Changed the merging folders test to be less strict; if folders don't exactly match, warn which files are missing, but allow merging if at least one necessary file is present. 2010-09-24: Stuart Caie * readhuff.h: Don't let build_decode_table() allow empty trees. It's meant to be special case just for the LZX length tree, so move that logic out to the LZX code. Thanks to Danny Kroshin for discovering the bug. * lzxd.c: Allow empty length trees, but not other trees. If the length tree is empty, fail if asked to decode a length symbol. Again, thanks to Danny Kroshin for discovering the bug. 2010-09-20: Stuart Caie * Makefile.am: Set EXTRA_DIST so it doesn't include .svn directories in the distribution, but does include docs. 2010-09-20: Stuart Caie * Makefile.am, configure.ac: Use modern auto* practises; turn on automake silent rules where possible, use "m4" directory for libtool macros, use LT_INIT instead of AC_PROG_LIBTOOL and use AM_CPPFLAGS instead of INCLUDES. Thanks to Sergei Trofimovich for the patch. 2010-09-15: Stuart Caie * many files: Made the code compile with C++ - Renamed all 'this' variables/parameters to 'self' - Added casts to all memory allocations. - Added extern "C" to header files with extern declarations. - Made system.c include system.h. - Changed the K&R-style headers to ANSI-style headers in md5.c 2010-08-04: Stuart Caie * many files: removed unnecessary include 2010-07-19: Stuart Caie * cabd_md5.c, chmd_md5.c: Replace writing files to disk then MD5summing them, with an MD5summer built into mspack_system. Much, much faster results. * qtmd_decompress(): Robert Riebisch pointed out a Quantum data integrity check that could never be tripped, because frame_todo is unsigned, so it will never be decremented below zero. Replaced the check with one that assumes that decrementing past zero wraps frame_todo round to a number more than its maximum value (QTM_FRAME_SIZE). 2010-07-18: Stuart Caie * cabd.c: Special logic to pass cabd_sys_read() errors back to cabd_extract() wasn't compatible with the decompressor logic of returning the same error repeatedly once unpacking fails. This meant that if decompressing failed because of a read error, then the next file in the same folder would come back as "no error", but the decompressed wouldn't have even attempted to decompress the file. Added a new state variable, read_error, with the same lifespan as a decompressor, to pass the underlying reason for MSPACK_ERR_READ errors back. * mszipd.c: improve MS-ZIP recovery by saving all the bytes decoded prior to a block failing. This requires remembering how far we got through the block, so the code has been made slightly slower (about 0.003 seconds slower per gigabyte unpacked) by removing the local variable window_posn and keeping it in the state structure instead. 2010-07-16: Stuart Caie * Makefile.am: strange interactions. When -std=c99 is used, my Ubuntu's (libc6-dev 2.11.1-0ubuntu7.2) does NOT define fseeko() unless _LARGEFILE_SOURCE is also defined. But configure always uses -std=gnu99, not -std=c99, so its test determines _LARGEFILE_SOURCE isn't needed but HAVE_FSEEKO is true. The implicit fseeko definition has a 32-bit rather than 64-bit offset, which means the mode parameter is interpreted as part of the offset, and the mode is taken from the stack, which is generally 0 (SEEK_SET). This breaks all SEEK_CURs. The code works fine when -std=c99 is not set, so just remove it for the time being. 2010-07-12: Stuart Caie * system.c: Reject reading/writing a negative number of bytes. * chmd.c: allow zero-length files to be seen. Previously they were skipped because they were mistaken for directory entries. 2010-07-08: Stuart Caie * qtmd.c: Larry Frieson found an important bug in the Quantum decoder. Window wraps flush all unwritten data to disk. However, sometimes less data is needed, which makes out_bytes negative, which is then passed to write(). Some write() implementations treat negative sizes it as a large positive integer and segfault trying to write the buffer. * Makefile.am, test/*.c: fixed automake file so that the package passes a "make distcheck". 2010-07-07: Stuart Caie * doc/szdd_kwaj_format.html: explain SZDD/KWAJ file format. * lzssd.c: fixed SZDD decompression bugs. * test/chmd_compare: Add scripts for comparing chmd_md5 against Microsoft's own code. * test/chmd_md5.c: remove the need to decompress everything twice, as this is already in chmx.c if needed. 2010-07-06: Stuart Caie * many files: added SZDD and KWAJ decompression support. 2010-06-18: Stuart Caie * system.h: expanded the test for 64-bit largefile support so it also works on 64-bit native operating systems where you don't have to define _FILE_OFFSET_BITS. 2010-06-17: Stuart Caie * libmspack.pc.in: Added pkg-config support. Thanks to Patrice Dumas for the patch. 2010-06-14: Stuart Caie * qtmd.c, lzxd.c, mszipd.c: created new headers, readbits.h and readhuff.h, which bundle up the bit-reading and huffman-reading code found in the MSZIP, LZX and Quantum decoders. 2010-06-11: Stuart Caie * qtmd_static_init(): Removed function in favour of static const tables, same rationale as for lzxd_static_init(). * qtmd_read_input(), zipd_read_input(): After testing against my set of CABs from the wild, I've found both these functions _need_ an extra EOF flag, like lzxd_read_input() has. So I've added it. This means CABs get decoded properly AND there's no reading fictional bytes. 2010-06-03: Stuart Caie * test/cabd_md5.c: updated this so it has better output and doesn't need to be in the same directory as the files for multi- part sets. 2010-05-20: Stuart Caie * qtmd_read_input(), zipd_read_input(): Both these functions are essentially copies of lzxd_read_input(), but that has a feature they don't have - an extra EOF flag. So if EOF is encountered (sys->read() returns 0 bytes), these don't pass on the error. Their respective bit-reading functions that called them then go on to access at least one byte of the input buffer, which doesn't exist as sys->read() returned 0. Thanks to Michael Vidrevich for spotting this and providing a test case. 2010-05-20: Stuart Caie * system.h: It turns out no configure.ac tests are needed to decide between __func__ and __FUNCTION__, so I put the standard one (__func__) back into the D() macro, along with some special-case ifdefs for old versions of GCC. * lzxd_static_init(): Removed function in favour of static const tables. Jorge Lodos thinks it causes multithreading problems, I disagree. However, there are speed benefits to declaring the tables as static const. * cabd_init_decomp(): Fixed code which never runs but would write to a null pointer if it could. Changed it to an assert() as it will only trip if someone rewrites the internals of cabd.c. Thanks to Jorge Lodos for finding it. * inflate(): Fixed an off-by-one error: if the LITERAL table emitted code 286, this would read one byte past the end of lit_extrabits[]. Thanks to Jorge Lodos for finding it. 2010-05-06: Stuart Caie * test/cabrip.c, test/chminfo.c: add fseeko() support 2009-06-01: Stuart Caie * README: clarify the extended license terms * doc, Makefile.am: make the doxygen makefile work when using an alternate build directory 2006-09-20: Stuart Caie * system.h: I had a choice of adding more to configure.ac to test for __func__ and __FUNCTION__, or just removing __FUNCTION__ from the D() macro. I chose the latter. * Makefile.am: Now the --enable-debug in configure will actually apply -DDEBUG to the sources. 2006-09-20: Stuart Caie * qtmd_decompress(): Fixed a major bug in the QTM decoder, as reported by Tomasz Kojm last year. Removed the restriction on window sizes as a result. Correctly decodes the XLVIEW cabinets. 2006-08-31: Stuart Caie * lzxd_decompress(): Two major bugs fixed. Firstly, the R0/R1/R2 local variables weren't set to 1 after lzxd_reset_state(). Secondly, the LZX decompression stream can sometimes become odd-aligned (after an uncompressed block) and the next 16 bit fetch needs to be split across two input buffers, ENSURE_BITS() didn't cover this case. Many thanks to Igor Glucksmann for discovering both these bugs. 2005-06-30: Stuart Caie * cabd_search(): fixed problems with searching files > 4GB for cabinets. 2005-06-23: Stuart Caie * qtmd_init(): The QTM decoder is broken for QTM streams with a window size less than the frame size. Until this is fixed, fail to initialise QTM window sizes less than 15. Thanks to Tomasz Kojm for finding the bug. 2005-03-22: Stuart Caie * system.h: now undefs "read", as the latest glibc defines read() as a macro which messes everything up. Thanks to Ville Skyttä for the update. 2005-03-14: Stuart Caie * test/multifh.c: write an mspack_system implementation that can handle normal disk files, open file handles, open file descriptors and raw memory all at the same time. 2005-02-24: Stuart Caie * chmd_read_headers(): avoid infinite loop when chmhs1_ChunkSize is zero. Thanks to Serge Semashko for the research and discovery. 2005-02-18: Stuart Caie * mspack.h: renamed the "interface" parameter of mspack_version() to "entity", as interface is a reserved word in C++. Thanks to Yuriy Z for the discovery. 2004-12-09: Stuart Caie * lzss.h, szdd.h, szddd.h: more work on the SZDD/LZSS design. 2004-06-12: Stuart Caie * lzxd_static_init(): removed write to lzxd_extra_bits[52], thanks to Nigel Horne from the ClamAV project. 2004-04-23: Stuart Caie * mspack.h: changed 'this' parameters to 'self' to allow compiling in C++ compilers, thanks to Michal Cihar for the suggestion. * mspack.h, system.h, mspack.def, winbuild.sh: integrated some changes from Petr Blahos to let libmspack build as a Win32 DLL. * chmd_fast_find(): added the first part of this code, and comments sufficient to finish it :) 2004-04-08 Stuart Caie * test/chminfo.c: added a program for dumping useful data from CHM files, e.g. index entries and reset tables. I wrote this a while ago for investigating a corrupt cabinet, but I never committed it. 2004-03-26 Stuart Caie * test/cabd_memory.c: added a new test example which shows an mspack_system implementation that reads and writes from memory only, no file I/O. Even the source code has a little cab file embedded in it. 2004-03-10 Stuart Caie * cabd.c: updated the location of the CAB SDK. * cabd.c: changed a couple of MSPACK_ERR_READ errors not based on read() failures into MSPACK_ERR_DATAFORMAT errors. * mszipd_decompress(): repair mode now aborts after writing a repaired block if the error was a hard error (e.g. read error, out of blocks, etc) 2004-03-08 Stuart Caie * Makefile.am: now builds and installs a versioned library. * mszipd.c: completed a new MS-ZIP and inflate implementation. * system.c: added mspack_version() and committed to a versioned ABI for the library. * cabd.c: made mszip repair functionality work correctly. * cabd.c: now identifies invalid block headers * doc/: API documentation is now included with the library, not just on the web. * chmd.c: fixed error messages and 64-bit debug output. * chmd.c: now also catches NULL files in section 1. * test/chmx.c: now acts more like cabextract. 2003-08-29 Stuart Caie * ChangeLog: started keeping a ChangeLog :) cabextract-1.11/mspack/mszip.h0000664000175000017500000001111214370426615013274 00000000000000/* This file is part of libmspack. * (C) 2003-2004 Stuart Caie. * * The deflate method was created by Phil Katz. MSZIP is equivalent to the * deflate method. * * libmspack is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License (LGPL) version 2.1 * * For further details, see the file COPYING.LIB distributed with libmspack */ #ifndef MSPACK_MSZIP_H #define MSPACK_MSZIP_H 1 #ifdef __cplusplus extern "C" { #endif /* MSZIP (deflate) compression / (inflate) decompression definitions */ #define MSZIP_FRAME_SIZE (32768) /* size of LZ history window */ #define MSZIP_LITERAL_MAXSYMBOLS (288) /* literal/length huffman tree */ #define MSZIP_LITERAL_TABLEBITS (9) #define MSZIP_DISTANCE_MAXSYMBOLS (32) /* distance huffman tree */ #define MSZIP_DISTANCE_TABLEBITS (6) /* if there are less direct lookup entries than symbols, the longer * code pointers will be <= maxsymbols. This must not happen, or we * will decode entries badly */ #if (1 << MSZIP_LITERAL_TABLEBITS) < (MSZIP_LITERAL_MAXSYMBOLS * 2) # define MSZIP_LITERAL_TABLESIZE (MSZIP_LITERAL_MAXSYMBOLS * 4) #else # define MSZIP_LITERAL_TABLESIZE ((1 << MSZIP_LITERAL_TABLEBITS) + \ (MSZIP_LITERAL_MAXSYMBOLS * 2)) #endif #if (1 << MSZIP_DISTANCE_TABLEBITS) < (MSZIP_DISTANCE_MAXSYMBOLS * 2) # define MSZIP_DISTANCE_TABLESIZE (MSZIP_DISTANCE_MAXSYMBOLS * 4) #else # define MSZIP_DISTANCE_TABLESIZE ((1 << MSZIP_DISTANCE_TABLEBITS) + \ (MSZIP_DISTANCE_MAXSYMBOLS * 2)) #endif struct mszipd_stream { struct mspack_system *sys; /* I/O routines */ struct mspack_file *input; /* input file handle */ struct mspack_file *output; /* output file handle */ unsigned int window_posn; /* offset within window */ /* inflate() will call this whenever the window should be emptied. */ int (*flush_window)(struct mszipd_stream *, unsigned int); int error, repair_mode, bytes_output; /* I/O buffering */ unsigned char *inbuf, *i_ptr, *i_end, *o_ptr, *o_end, input_end; unsigned int bit_buffer, bits_left, inbuf_size; /* huffman code lengths */ unsigned char LITERAL_len[MSZIP_LITERAL_MAXSYMBOLS]; unsigned char DISTANCE_len[MSZIP_DISTANCE_MAXSYMBOLS]; /* huffman decoding tables */ unsigned short LITERAL_table [MSZIP_LITERAL_TABLESIZE]; unsigned short DISTANCE_table[MSZIP_DISTANCE_TABLESIZE]; /* 32kb history window */ unsigned char window[MSZIP_FRAME_SIZE]; }; /* allocates MS-ZIP decompression stream for decoding the given stream. * * - uses system->alloc() to allocate memory * * - returns NULL if not enough memory * * - input_buffer_size is how many bytes to use as an input bitstream buffer * * - if repair_mode is non-zero, errors in decompression will be skipped * and 'holes' left will be filled with zero bytes. This allows at least * a partial recovery of erroneous data. */ extern struct mszipd_stream *mszipd_init(struct mspack_system *system, struct mspack_file *input, struct mspack_file *output, int input_buffer_size, int repair_mode); /* decompresses, or decompresses more of, an MS-ZIP stream. * * - out_bytes of data will be decompressed and the function will return * with an MSPACK_ERR_OK return code. * * - decompressing will stop as soon as out_bytes is reached. if the true * amount of bytes decoded spills over that amount, they will be kept for * a later invocation of mszipd_decompress(). * * - the output bytes will be passed to the system->write() function given in * mszipd_init(), using the output file handle given in mszipd_init(). More * than one call may be made to system->write() * * - MS-ZIP will read input bytes as necessary using the system->read() * function given in mszipd_init(), using the input file handle given in * mszipd_init(). This will continue until system->read() returns 0 bytes, * or an error. */ extern int mszipd_decompress(struct mszipd_stream *zip, off_t out_bytes); /* decompresses an entire MS-ZIP stream in a KWAJ file. Acts very much * like mszipd_decompress(), but doesn't take an out_bytes parameter */ extern int mszipd_decompress_kwaj(struct mszipd_stream *zip); /* frees all stream associated with an MS-ZIP data stream * * - calls system->free() using the system pointer given in mszipd_init() */ void mszipd_free(struct mszipd_stream *zip); #ifdef __cplusplus } #endif #endif cabextract-1.11/mspack/system.h0000664000175000017500000000327714372272333013471 00000000000000/* This file is part of libmspack. * (C) 2003-2018 Stuart Caie. * * libmspack is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License (LGPL) version 2.1 * * For further details, see the file COPYING.LIB distributed with libmspack */ #ifndef MSPACK_SYSTEM_H #define MSPACK_SYSTEM_H 1 #ifdef __cplusplus extern "C" { #endif /* ensure config.h is read before mspack.h */ #ifdef HAVE_CONFIG_H # include #endif #include #include /* assume exists */ #ifndef MSPACK_NO_DEFAULT_SYSTEM # include #else /* but if no default system wanted, avoid using entirely, * to avoid linking to even these standard C library functions */ static inline int memcmp(const void *s1, const void *s2, size_t n) { const unsigned char *a = s1, *b = s2; while (n--) if (*a++ != *b++) return a[-1] - b[-1]; return 0; } static inline void *memset(void *s, int c, size_t n) { unsigned char *s2 = s, c2 = (unsigned char) c; while (n--) *s2++ = c2; return s; } static inline size_t strlen(const char *s) { size_t c = 0; while (*s++) c++; return c; } #endif /* fix for problem with GCC 4 and glibc (thanks to Ville Skytta) * http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=150429 */ #ifdef read # undef read #endif extern struct mspack_system *mspack_default_system; /* returns the length of a file opened for reading */ extern int mspack_sys_filelen(struct mspack_system *system, struct mspack_file *file, off_t *length); /* validates a system structure */ extern int mspack_valid_system(struct mspack_system *sys); #ifdef __cplusplus } #endif #endif cabextract-1.11/mspack/cab.h0000664000175000017500000001302714365655710012672 00000000000000/* This file is part of libmspack. * (C) 2003-2018 Stuart Caie. * * libmspack is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License (LGPL) version 2.1 * * For further details, see the file COPYING.LIB distributed with libmspack */ #ifndef MSPACK_CAB_H #define MSPACK_CAB_H 1 /* generic CAB definitions */ /* structure offsets */ #define cfhead_Signature (0x00) #define cfhead_CabinetSize (0x08) #define cfhead_FileOffset (0x10) #define cfhead_MinorVersion (0x18) #define cfhead_MajorVersion (0x19) #define cfhead_NumFolders (0x1A) #define cfhead_NumFiles (0x1C) #define cfhead_Flags (0x1E) #define cfhead_SetID (0x20) #define cfhead_CabinetIndex (0x22) #define cfhead_SIZEOF (0x24) #define cfheadext_HeaderReserved (0x00) #define cfheadext_FolderReserved (0x02) #define cfheadext_DataReserved (0x03) #define cfheadext_SIZEOF (0x04) #define cffold_DataOffset (0x00) #define cffold_NumBlocks (0x04) #define cffold_CompType (0x06) #define cffold_SIZEOF (0x08) #define cffile_UncompressedSize (0x00) #define cffile_FolderOffset (0x04) #define cffile_FolderIndex (0x08) #define cffile_Date (0x0A) #define cffile_Time (0x0C) #define cffile_Attribs (0x0E) #define cffile_SIZEOF (0x10) #define cfdata_CheckSum (0x00) #define cfdata_CompressedSize (0x04) #define cfdata_UncompressedSize (0x06) #define cfdata_SIZEOF (0x08) /* flags */ #define cffoldCOMPTYPE_MASK (0x000f) #define cffoldCOMPTYPE_NONE (0x0000) #define cffoldCOMPTYPE_MSZIP (0x0001) #define cffoldCOMPTYPE_QUANTUM (0x0002) #define cffoldCOMPTYPE_LZX (0x0003) #define cfheadPREV_CABINET (0x0001) #define cfheadNEXT_CABINET (0x0002) #define cfheadRESERVE_PRESENT (0x0004) #define cffileCONTINUED_FROM_PREV (0xFFFD) #define cffileCONTINUED_TO_NEXT (0xFFFE) #define cffileCONTINUED_PREV_AND_NEXT (0xFFFF) /* CAB data blocks are <= 32768 bytes in uncompressed form. Uncompressed * blocks have zero growth. MSZIP guarantees that it won't grow above * uncompressed size by more than 12 bytes. LZX guarantees it won't grow * more than 6144 bytes. Quantum has no documentation, but the largest * block seen in the wild is 337 bytes above uncompressed size. */ #define CAB_BLOCKMAX (32768) #define CAB_INPUTMAX (CAB_BLOCKMAX+6144) /* input buffer needs to be CAB_INPUTMAX + 1 byte to allow for max-sized block * plus 1 trailer byte added by cabd_sys_read_block() for Quantum alignment. * * When MSCABD_PARAM_SALVAGE is set, block size is not checked so can be * up to 65535 bytes, so max input buffer size needed is 65535 + 1 */ #define CAB_INPUTMAX_SALVAGE (65535) #define CAB_INPUTBUF (CAB_INPUTMAX_SALVAGE + 1) /* There are no more than 65535 data blocks per folder, so a folder cannot * be more than 32768*65535 bytes in length. As files cannot span more than * one folder, this is also their max offset, length and offset+length limit. */ #define CAB_FOLDERMAX (65535) #define CAB_LENGTHMAX (CAB_BLOCKMAX * CAB_FOLDERMAX) /* CAB compression definitions */ struct mscab_compressor_p { struct mscab_compressor base; struct mspack_system *system; /* todo */ }; /* CAB decompression definitions */ struct mscabd_decompress_state { struct mscabd_folder_p *folder; /* current folder we're extracting from */ struct mscabd_folder_data *data; /* current folder split we're in */ unsigned int offset; /* uncompressed offset within folder */ unsigned int block; /* which block are we decompressing? */ off_t outlen; /* cumulative sum of block output sizes */ struct mspack_system sys; /* special I/O code for decompressor */ int comp_type; /* type of compression used by folder */ int (*decompress)(void *, off_t); /* decompressor code */ void *state; /* decompressor state */ struct mscabd_cabinet_p *incab; /* cabinet where input data comes from */ struct mspack_file *infh; /* input file handle */ struct mspack_file *outfh; /* output file handle */ unsigned char *i_ptr, *i_end; /* input data consumed, end */ unsigned char input[CAB_INPUTBUF]; /* one input block of data */ }; struct mscab_decompressor_p { struct mscab_decompressor base; struct mscabd_decompress_state *d; struct mspack_system *system; int buf_size, searchbuf_size, fix_mszip, salvage; /* params */ int error, read_error; }; struct mscabd_cabinet_p { struct mscabd_cabinet base; off_t blocks_off; /* offset to data blocks */ int block_resv; /* reserved space in data blocks */ }; /* there is one of these for every cabinet a folder spans */ struct mscabd_folder_data { struct mscabd_folder_data *next; struct mscabd_cabinet_p *cab; /* cabinet file of this folder span */ off_t offset; /* cabinet offset of first datablock */ }; struct mscabd_folder_p { struct mscabd_folder base; struct mscabd_folder_data data; /* where are the data blocks? */ struct mscabd_file *merge_prev; /* first file needing backwards merge */ struct mscabd_file *merge_next; /* first file needing forwards merge */ }; #endif cabextract-1.11/mspack/qtm.h0000664000175000017500000001062314370426615012741 00000000000000/* This file is part of libmspack. * (C) 2003-2004 Stuart Caie. * * The Quantum method was created by David Stafford, adapted by Microsoft * Corporation. * * libmspack is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License (LGPL) version 2.1 * * For further details, see the file COPYING.LIB distributed with libmspack */ #ifndef MSPACK_QTM_H #define MSPACK_QTM_H 1 #ifdef __cplusplus extern "C" { #endif /* Quantum compression / decompression definitions */ #define QTM_FRAME_SIZE (32768) struct qtmd_modelsym { unsigned short sym, cumfreq; }; struct qtmd_model { int shiftsleft, entries; struct qtmd_modelsym *syms; }; struct qtmd_stream { struct mspack_system *sys; /* I/O routines */ struct mspack_file *input; /* input file handle */ struct mspack_file *output; /* output file handle */ unsigned char *window; /* decoding window */ unsigned int window_size; /* window size */ unsigned int window_posn; /* decompression offset within window */ unsigned int frame_todo; /* bytes remaining for current frame */ unsigned short H, L, C; /* high/low/current: arith coding state */ unsigned char header_read; /* have we started decoding a new frame? */ int error; /* I/O buffers */ unsigned char *inbuf, *i_ptr, *i_end, *o_ptr, *o_end; unsigned int bit_buffer, inbuf_size; unsigned char bits_left, input_end; /* four literal models, each representing 64 symbols * model0 for literals from 0 to 63 (selector = 0) * model1 for literals from 64 to 127 (selector = 1) * model2 for literals from 128 to 191 (selector = 2) * model3 for literals from 129 to 255 (selector = 3) */ struct qtmd_model model0, model1, model2, model3; /* three match models. * model4 for match with fixed length of 3 bytes * model5 for match with fixed length of 4 bytes * model6 for variable length match, encoded with model6len model */ struct qtmd_model model4, model5, model6, model6len; /* selector model. 0-6 to say literal (0,1,2,3) or match (4,5,6) */ struct qtmd_model model7; /* symbol arrays for all models */ struct qtmd_modelsym m0sym[64 + 1]; struct qtmd_modelsym m1sym[64 + 1]; struct qtmd_modelsym m2sym[64 + 1]; struct qtmd_modelsym m3sym[64 + 1]; struct qtmd_modelsym m4sym[24 + 1]; struct qtmd_modelsym m5sym[36 + 1]; struct qtmd_modelsym m6sym[42 + 1], m6lsym[27 + 1]; struct qtmd_modelsym m7sym[7 + 1]; }; /* allocates Quantum decompression state for decoding the given stream. * * - returns NULL if window_bits is outwith the range 10 to 21 (inclusive). * * - uses system->alloc() to allocate memory * * - returns NULL if not enough memory * * - window_bits is the size of the Quantum window, from 1Kb (10) to 2Mb (21). * * - input_buffer_size is the number of bytes to use to store bitstream data. */ extern struct qtmd_stream *qtmd_init(struct mspack_system *system, struct mspack_file *input, struct mspack_file *output, int window_bits, int input_buffer_size); /* decompresses, or decompresses more of, a Quantum stream. * * - out_bytes of data will be decompressed and the function will return * with an MSPACK_ERR_OK return code. * * - decompressing will stop as soon as out_bytes is reached. if the true * amount of bytes decoded spills over that amount, they will be kept for * a later invocation of qtmd_decompress(). * * - the output bytes will be passed to the system->write() function given in * qtmd_init(), using the output file handle given in qtmd_init(). More * than one call may be made to system->write() * * - Quantum will read input bytes as necessary using the system->read() * function given in qtmd_init(), using the input file handle given in * qtmd_init(). This will continue until system->read() returns 0 bytes, * or an error. */ extern int qtmd_decompress(struct qtmd_stream *qtm, off_t out_bytes); /* frees all state associated with a Quantum data stream * * - calls system->free() using the system pointer given in qtmd_init() */ void qtmd_free(struct qtmd_stream *qtm); #ifdef __cplusplus } #endif #endif cabextract-1.11/mspack/mspack.h0000664000175000017500000026300613644056376013431 00000000000000/* libmspack -- a library for working with Microsoft compression formats. * (C) 2003-2019 Stuart Caie * * libmspack is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License (LGPL) version 2.1 * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /** \mainpage * * \section intro Introduction * * libmspack is a library which provides compressors and decompressors, * archivers and dearchivers for Microsoft compression formats. * * \section formats Formats supported * * The following file formats are supported: * - SZDD files, which use LZSS compression * - KWAJ files, which use LZSS, LZSS+Huffman or deflate compression * - .HLP (MS Help) files, which use LZSS compression * - .CAB (MS Cabinet) files, which use deflate, LZX or Quantum compression * - .CHM (HTML Help) files, which use LZX compression * - .LIT (MS EBook) files, which use LZX compression and DES encryption * - .LZX (Exchange Offline Addressbook) files, which use LZX compression * * To determine the capabilities of the library, and the binary * compatibility version of any particular compressor or decompressor, use * the mspack_version() function. The UNIX library interface version is * defined as the highest-versioned library component. * * \section starting Getting started * * The macro MSPACK_SYS_SELFTEST() should be used to ensure the library can * be used. In particular, it checks if the caller is using 32-bit file I/O * when the library is compiled for 64-bit file I/O and vice versa. * * If compiled normally, the library includes basic file I/O and memory * management functionality using the standard C library. This can be * customised and replaced entirely by creating a mspack_system structure. * * A compressor or decompressor for the required format must be * instantiated before it can be used. Each construction function takes * one parameter, which is either a pointer to a custom mspack_system * structure, or NULL to use the default. The instantiation returned, if * not NULL, contains function pointers (methods) to work with the given * file format. * * For compression: * - mspack_create_cab_compressor() creates a mscab_compressor * - mspack_create_chm_compressor() creates a mschm_compressor * - mspack_create_lit_compressor() creates a mslit_compressor * - mspack_create_hlp_compressor() creates a mshlp_compressor * - mspack_create_szdd_compressor() creates a msszdd_compressor * - mspack_create_kwaj_compressor() creates a mskwaj_compressor * - mspack_create_oab_compressor() creates a msoab_compressor * * For decompression: * - mspack_create_cab_decompressor() creates a mscab_decompressor * - mspack_create_chm_decompressor() creates a mschm_decompressor * - mspack_create_lit_decompressor() creates a mslit_decompressor * - mspack_create_hlp_decompressor() creates a mshlp_decompressor * - mspack_create_szdd_decompressor() creates a msszdd_decompressor * - mspack_create_kwaj_decompressor() creates a mskwaj_decompressor * - mspack_create_oab_decompressor() creates a msoab_decompressor * * Once finished working with a format, each kind of * compressor/decompressor has its own specific destructor: * - mspack_destroy_cab_compressor() * - mspack_destroy_cab_decompressor() * - mspack_destroy_chm_compressor() * - mspack_destroy_chm_decompressor() * - mspack_destroy_lit_compressor() * - mspack_destroy_lit_decompressor() * - mspack_destroy_hlp_compressor() * - mspack_destroy_hlp_decompressor() * - mspack_destroy_szdd_compressor() * - mspack_destroy_szdd_decompressor() * - mspack_destroy_kwaj_compressor() * - mspack_destroy_kwaj_decompressor() * - mspack_destroy_oab_compressor() * - mspack_destroy_oab_decompressor() * * Destroying a compressor or decompressor does not destroy any objects, * structures or handles that have been created using that compressor or * decompressor. Ensure that everything created or opened is destroyed or * closed before compressor/decompressor is itself destroyed. * * \section errors Error codes * * All compressors and decompressors use the same set of error codes. Most * methods return an error code directly. For methods which do not * return error codes directly, the error code can be obtained with the * last_error() method. * * - #MSPACK_ERR_OK is used to indicate success. This error code is defined * as zero, all other code are non-zero. * - #MSPACK_ERR_ARGS indicates that a method was called with inappropriate * arguments. * - #MSPACK_ERR_OPEN indicates that mspack_system::open() failed. * - #MSPACK_ERR_READ indicates that mspack_system::read() failed. * - #MSPACK_ERR_WRITE indicates that mspack_system::write() failed. * - #MSPACK_ERR_SEEK indicates that mspack_system::seek() failed. * - #MSPACK_ERR_NOMEMORY indicates that mspack_system::alloc() failed. * - #MSPACK_ERR_SIGNATURE indicates that the file being read does not * have the correct "signature". It is probably not a valid file for * whatever format is being read. * - #MSPACK_ERR_DATAFORMAT indicates that the file being used or read * is corrupt. * - #MSPACK_ERR_CHECKSUM indicates that a data checksum has failed. * - #MSPACK_ERR_CRUNCH indicates an error occured during compression. * - #MSPACK_ERR_DECRUNCH indicates an error occured during decompression. * * \section threading Multi-threading * * libmspack methods are reentrant and multithreading-safe when each * thread has its own compressor or decompressor. * You should not call multiple methods simultaneously on a single * compressor or decompressor instance. * * If this may happen, you can either use one compressor or * decompressor per thread, or you can use your preferred lock, * semaphore or mutex library to ensure no more than one method on a * compressor/decompressor is called simultaneously. libmspack will * not do this locking for you. * * Example of incorrect behaviour: * - thread 1 calls mspack_create_cab_decompressor() * - thread 1 calls open() * - thread 1 calls extract() for one file * - thread 2 simultaneously calls extract() for another file * * Correct behaviour: * - thread 1 calls mspack_create_cab_decompressor() * - thread 2 calls mspack_create_cab_decompressor() * - thread 1 calls its own open() / extract() * - thread 2 simultaneously calls its own open() / extract() * * Also correct behaviour: * - thread 1 calls mspack_create_cab_decompressor() * - thread 1 locks a mutex for with the decompressor before * calling any methods on it, and unlocks the mutex after each * method returns. * - thread 1 can share the results of open() with thread 2, and both * can call extract(), provided they both guard against simultaneous * use of extract(), and any other methods, with the mutex */ #ifndef LIB_MSPACK_H #define LIB_MSPACK_H 1 #ifdef __cplusplus extern "C" { #endif #include #include /** * System self-test function, to ensure both library and calling program * can use one another. * * A result of MSPACK_ERR_OK means the library and caller are * compatible. Any other result indicates that the library and caller are * not compatible and should not be used. In particular, a value of * MSPACK_ERR_SEEK means the library and caller use different off_t * datatypes. * * It should be used like so: * * @code * int selftest_result; * MSPACK_SYS_SELFTEST(selftest_result); * if (selftest_result != MSPACK_ERR_OK) { * fprintf(stderr, "incompatible with this build of libmspack\n"); * exit(0); * } * @endcode * * @param result an int variable to store the result of the self-test */ #define MSPACK_SYS_SELFTEST(result) do { \ (result) = mspack_sys_selftest_internal(sizeof(off_t)); \ } while (0) /** Part of the MSPACK_SYS_SELFTEST() macro, must not be used directly. */ extern int mspack_sys_selftest_internal(int); /** * Enquire about the binary compatibility version of a specific interface in * the library. Currently, the following interfaces are defined: * * - #MSPACK_VER_LIBRARY: the overall library * - #MSPACK_VER_SYSTEM: the mspack_system interface * - #MSPACK_VER_MSCABD: the mscab_decompressor interface * - #MSPACK_VER_MSCABC: the mscab_compressor interface * - #MSPACK_VER_MSCHMD: the mschm_decompressor interface * - #MSPACK_VER_MSCHMC: the mschm_compressor interface * - #MSPACK_VER_MSLITD: the mslit_decompressor interface * - #MSPACK_VER_MSLITC: the mslit_compressor interface * - #MSPACK_VER_MSHLPD: the mshlp_decompressor interface * - #MSPACK_VER_MSHLPC: the mshlp_compressor interface * - #MSPACK_VER_MSSZDDD: the msszdd_decompressor interface * - #MSPACK_VER_MSSZDDC: the msszdd_compressor interface * - #MSPACK_VER_MSKWAJD: the mskwaj_decompressor interface * - #MSPACK_VER_MSKWAJC: the mskwaj_compressor interface * - #MSPACK_VER_MSOABD: the msoab_decompressor interface * - #MSPACK_VER_MSOABC: the msoab_compressor interface * * The result of the function should be interpreted as follows: * - -1: this interface is completely unknown to the library * - 0: this interface is known, but non-functioning * - 1: this interface has all basic functionality * - 2, 3, ...: this interface has additional functionality, clearly marked * in the documentation as "version 2", "version 3" and so on. * * @param entity the interface to request current version of * @return the version of the requested interface */ extern int mspack_version(int entity); /** Pass to mspack_version() to get the overall library version */ #define MSPACK_VER_LIBRARY (0) /** Pass to mspack_version() to get the mspack_system version */ #define MSPACK_VER_SYSTEM (1) /** Pass to mspack_version() to get the mscab_decompressor version */ #define MSPACK_VER_MSCABD (2) /** Pass to mspack_version() to get the mscab_compressor version */ #define MSPACK_VER_MSCABC (3) /** Pass to mspack_version() to get the mschm_decompressor version */ #define MSPACK_VER_MSCHMD (4) /** Pass to mspack_version() to get the mschm_compressor version */ #define MSPACK_VER_MSCHMC (5) /** Pass to mspack_version() to get the mslit_decompressor version */ #define MSPACK_VER_MSLITD (6) /** Pass to mspack_version() to get the mslit_compressor version */ #define MSPACK_VER_MSLITC (7) /** Pass to mspack_version() to get the mshlp_decompressor version */ #define MSPACK_VER_MSHLPD (8) /** Pass to mspack_version() to get the mshlp_compressor version */ #define MSPACK_VER_MSHLPC (9) /** Pass to mspack_version() to get the msszdd_decompressor version */ #define MSPACK_VER_MSSZDDD (10) /** Pass to mspack_version() to get the msszdd_compressor version */ #define MSPACK_VER_MSSZDDC (11) /** Pass to mspack_version() to get the mskwaj_decompressor version */ #define MSPACK_VER_MSKWAJD (12) /** Pass to mspack_version() to get the mskwaj_compressor version */ #define MSPACK_VER_MSKWAJC (13) /** Pass to mspack_version() to get the msoab_decompressor version */ #define MSPACK_VER_MSOABD (14) /** Pass to mspack_version() to get the msoab_compressor version */ #define MSPACK_VER_MSOABC (15) /* --- file I/O abstraction ------------------------------------------------ */ /** * A structure which abstracts file I/O and memory management. * * The library always uses the mspack_system structure for interaction * with the file system and to allocate, free and copy all memory. It also * uses it to send literal messages to the library user. * * When the library is compiled normally, passing NULL to a compressor or * decompressor constructor will result in a default mspack_system being * used, where all methods are implemented with the standard C library. * However, all constructors support being given a custom created * mspack_system structure, with the library user's own methods. This * allows for more abstract interaction, such as reading and writing files * directly to memory, or from a network socket or pipe. * * Implementors of an mspack_system structure should read all * documentation entries for every structure member, and write methods * which conform to those standards. */ struct mspack_system { /** * Opens a file for reading, writing, appending or updating. * * @param self a self-referential pointer to the mspack_system * structure whose open() method is being called. If * this pointer is required by close(), read(), write(), * seek() or tell(), it should be stored in the result * structure at this time. * @param filename the file to be opened. It is passed directly from the * library caller without being modified, so it is up to * the caller what this parameter actually represents. * @param mode one of #MSPACK_SYS_OPEN_READ (open an existing file * for reading), #MSPACK_SYS_OPEN_WRITE (open a new file * for writing), #MSPACK_SYS_OPEN_UPDATE (open an existing * file for reading/writing from the start of the file) or * #MSPACK_SYS_OPEN_APPEND (open an existing file for * reading/writing from the end of the file) * @return a pointer to a mspack_file structure. This structure officially * contains no members, its true contents are up to the * mspack_system implementor. It should contain whatever is needed * for other mspack_system methods to operate. Returning the NULL * pointer indicates an error condition. * @see close(), read(), write(), seek(), tell(), message() */ struct mspack_file * (*open)(struct mspack_system *self, const char *filename, int mode); /** * Closes a previously opened file. If any memory was allocated for this * particular file handle, it should be freed at this time. * * @param file the file to close * @see open() */ void (*close)(struct mspack_file *file); /** * Reads a given number of bytes from an open file. * * @param file the file to read from * @param buffer the location where the read bytes should be stored * @param bytes the number of bytes to read from the file. * @return the number of bytes successfully read (this can be less than * the number requested), zero to mark the end of file, or less * than zero to indicate an error. The library does not "retry" * reads and assumes short reads are due to EOF, so you should * avoid returning short reads because of transient errors. * @see open(), write() */ int (*read)(struct mspack_file *file, void *buffer, int bytes); /** * Writes a given number of bytes to an open file. * * @param file the file to write to * @param buffer the location where the written bytes should be read from * @param bytes the number of bytes to write to the file. * @return the number of bytes successfully written, this can be less * than the number requested. Zero or less can indicate an error * where no bytes at all could be written. All cases where less * bytes were written than requested are considered by the library * to be an error. * @see open(), read() */ int (*write)(struct mspack_file *file, void *buffer, int bytes); /** * Seeks to a specific file offset within an open file. * * Sometimes the library needs to know the length of a file. It does * this by seeking to the end of the file with seek(file, 0, * MSPACK_SYS_SEEK_END), then calling tell(). Implementations may want * to make a special case for this. * * Due to the potentially varying 32/64 bit datatype off_t on some * architectures, the #MSPACK_SYS_SELFTEST macro MUST be used before * using the library. If not, the error caused by the library passing an * inappropriate stackframe to seek() is subtle and hard to trace. * * @param file the file to be seeked * @param offset an offset to seek, measured in bytes * @param mode one of #MSPACK_SYS_SEEK_START (the offset should be * measured from the start of the file), #MSPACK_SYS_SEEK_CUR * (the offset should be measured from the current file offset) * or #MSPACK_SYS_SEEK_END (the offset should be measured from * the end of the file) * @return zero for success, non-zero for an error * @see open(), tell() */ int (*seek)(struct mspack_file *file, off_t offset, int mode); /** * Returns the current file position (in bytes) of the given file. * * @param file the file whose file position is wanted * @return the current file position of the file * @see open(), seek() */ off_t (*tell)(struct mspack_file *file); /** * Used to send messages from the library to the user. * * Occasionally, the library generates warnings or other messages in * plain english to inform the human user. These are informational only * and can be ignored if not wanted. * * @param file may be a file handle returned from open() if this message * pertains to a specific open file, or NULL if not related to * a specific file. * @param format a printf() style format string. It does NOT include a * trailing newline. * @see open() */ void (*message)(struct mspack_file *file, const char *format, ...); /** * Allocates memory. * * @param self a self-referential pointer to the mspack_system * structure whose alloc() method is being called. * @param bytes the number of bytes to allocate * @result a pointer to the requested number of bytes, or NULL if * not enough memory is available * @see free() */ void * (*alloc)(struct mspack_system *self, size_t bytes); /** * Frees memory. * * @param ptr the memory to be freed. NULL is accepted and ignored. * @see alloc() */ void (*free)(void *ptr); /** * Copies from one region of memory to another. * * The regions of memory are guaranteed not to overlap, are usually less * than 256 bytes, and may not be aligned. Please note that the source * parameter comes before the destination parameter, unlike the standard * C function memcpy(). * * @param src the region of memory to copy from * @param dest the region of memory to copy to * @param bytes the size of the memory region, in bytes */ void (*copy)(void *src, void *dest, size_t bytes); /** * A null pointer to mark the end of mspack_system. It must equal NULL. * * Should the mspack_system structure extend in the future, this NULL * will be seen, rather than have an invalid method pointer called. */ void *null_ptr; }; /** mspack_system::open() mode: open existing file for reading. */ #define MSPACK_SYS_OPEN_READ (0) /** mspack_system::open() mode: open new file for writing */ #define MSPACK_SYS_OPEN_WRITE (1) /** mspack_system::open() mode: open existing file for writing */ #define MSPACK_SYS_OPEN_UPDATE (2) /** mspack_system::open() mode: open existing file for writing */ #define MSPACK_SYS_OPEN_APPEND (3) /** mspack_system::seek() mode: seek relative to start of file */ #define MSPACK_SYS_SEEK_START (0) /** mspack_system::seek() mode: seek relative to current offset */ #define MSPACK_SYS_SEEK_CUR (1) /** mspack_system::seek() mode: seek relative to end of file */ #define MSPACK_SYS_SEEK_END (2) /** * A structure which represents an open file handle. The contents of this * structure are determined by the implementation of the * mspack_system::open() method. */ struct mspack_file { int dummy; }; /* --- error codes --------------------------------------------------------- */ /** Error code: no error */ #define MSPACK_ERR_OK (0) /** Error code: bad arguments to method */ #define MSPACK_ERR_ARGS (1) /** Error code: error opening file */ #define MSPACK_ERR_OPEN (2) /** Error code: error reading file */ #define MSPACK_ERR_READ (3) /** Error code: error writing file */ #define MSPACK_ERR_WRITE (4) /** Error code: seek error */ #define MSPACK_ERR_SEEK (5) /** Error code: out of memory */ #define MSPACK_ERR_NOMEMORY (6) /** Error code: bad "magic id" in file */ #define MSPACK_ERR_SIGNATURE (7) /** Error code: bad or corrupt file format */ #define MSPACK_ERR_DATAFORMAT (8) /** Error code: bad checksum or CRC */ #define MSPACK_ERR_CHECKSUM (9) /** Error code: error during compression */ #define MSPACK_ERR_CRUNCH (10) /** Error code: error during decompression */ #define MSPACK_ERR_DECRUNCH (11) /* --- functions available in library -------------------------------------- */ /** Creates a new CAB compressor. * @param sys a custom mspack_system structure, or NULL to use the default * @return a #mscab_compressor or NULL */ extern struct mscab_compressor * mspack_create_cab_compressor(struct mspack_system *sys); /** Creates a new CAB decompressor. * @param sys a custom mspack_system structure, or NULL to use the default * @return a #mscab_decompressor or NULL */ extern struct mscab_decompressor * mspack_create_cab_decompressor(struct mspack_system *sys); /** Destroys an existing CAB compressor. * @param self the #mscab_compressor to destroy */ extern void mspack_destroy_cab_compressor(struct mscab_compressor *self); /** Destroys an existing CAB decompressor. * @param self the #mscab_decompressor to destroy */ extern void mspack_destroy_cab_decompressor(struct mscab_decompressor *self); /** Creates a new CHM compressor. * @param sys a custom mspack_system structure, or NULL to use the default * @return a #mschm_compressor or NULL */ extern struct mschm_compressor * mspack_create_chm_compressor(struct mspack_system *sys); /** Creates a new CHM decompressor. * @param sys a custom mspack_system structure, or NULL to use the default * @return a #mschm_decompressor or NULL */ extern struct mschm_decompressor * mspack_create_chm_decompressor(struct mspack_system *sys); /** Destroys an existing CHM compressor. * @param self the #mschm_compressor to destroy */ extern void mspack_destroy_chm_compressor(struct mschm_compressor *self); /** Destroys an existing CHM decompressor. * @param self the #mschm_decompressor to destroy */ extern void mspack_destroy_chm_decompressor(struct mschm_decompressor *self); /** Creates a new LIT compressor. * @param sys a custom mspack_system structure, or NULL to use the default * @return a #mslit_compressor or NULL */ extern struct mslit_compressor * mspack_create_lit_compressor(struct mspack_system *sys); /** Creates a new LIT decompressor. * @param sys a custom mspack_system structure, or NULL to use the default * @return a #mslit_decompressor or NULL */ extern struct mslit_decompressor * mspack_create_lit_decompressor(struct mspack_system *sys); /** Destroys an existing LIT compressor. * @param self the #mslit_compressor to destroy */ extern void mspack_destroy_lit_compressor(struct mslit_compressor *self); /** Destroys an existing LIT decompressor. * @param self the #mslit_decompressor to destroy */ extern void mspack_destroy_lit_decompressor(struct mslit_decompressor *self); /** Creates a new HLP compressor. * @param sys a custom mspack_system structure, or NULL to use the default * @return a #mshlp_compressor or NULL */ extern struct mshlp_compressor * mspack_create_hlp_compressor(struct mspack_system *sys); /** Creates a new HLP decompressor. * @param sys a custom mspack_system structure, or NULL to use the default * @return a #mshlp_decompressor or NULL */ extern struct mshlp_decompressor * mspack_create_hlp_decompressor(struct mspack_system *sys); /** Destroys an existing hlp compressor. * @param self the #mshlp_compressor to destroy */ extern void mspack_destroy_hlp_compressor(struct mshlp_compressor *self); /** Destroys an existing hlp decompressor. * @param self the #mshlp_decompressor to destroy */ extern void mspack_destroy_hlp_decompressor(struct mshlp_decompressor *self); /** Creates a new SZDD compressor. * @param sys a custom mspack_system structure, or NULL to use the default * @return a #msszdd_compressor or NULL */ extern struct msszdd_compressor * mspack_create_szdd_compressor(struct mspack_system *sys); /** Creates a new SZDD decompressor. * @param sys a custom mspack_system structure, or NULL to use the default * @return a #msszdd_decompressor or NULL */ extern struct msszdd_decompressor * mspack_create_szdd_decompressor(struct mspack_system *sys); /** Destroys an existing SZDD compressor. * @param self the #msszdd_compressor to destroy */ extern void mspack_destroy_szdd_compressor(struct msszdd_compressor *self); /** Destroys an existing SZDD decompressor. * @param self the #msszdd_decompressor to destroy */ extern void mspack_destroy_szdd_decompressor(struct msszdd_decompressor *self); /** Creates a new KWAJ compressor. * @param sys a custom mspack_system structure, or NULL to use the default * @return a #mskwaj_compressor or NULL */ extern struct mskwaj_compressor * mspack_create_kwaj_compressor(struct mspack_system *sys); /** Creates a new KWAJ decompressor. * @param sys a custom mspack_system structure, or NULL to use the default * @return a #mskwaj_decompressor or NULL */ extern struct mskwaj_decompressor * mspack_create_kwaj_decompressor(struct mspack_system *sys); /** Destroys an existing KWAJ compressor. * @param self the #mskwaj_compressor to destroy */ extern void mspack_destroy_kwaj_compressor(struct mskwaj_compressor *self); /** Destroys an existing KWAJ decompressor. * @param self the #mskwaj_decompressor to destroy */ extern void mspack_destroy_kwaj_decompressor(struct mskwaj_decompressor *self); /** Creates a new OAB compressor. * @param sys a custom mspack_system structure, or NULL to use the default * @return a #msoab_compressor or NULL */ extern struct msoab_compressor * mspack_create_oab_compressor(struct mspack_system *sys); /** Creates a new OAB decompressor. * @param sys a custom mspack_system structure, or NULL to use the default * @return a #msoab_decompressor or NULL */ extern struct msoab_decompressor * mspack_create_oab_decompressor(struct mspack_system *sys); /** Destroys an existing OAB compressor. * @param self the #msoab_compressor to destroy */ extern void mspack_destroy_oab_compressor(struct msoab_compressor *self); /** Destroys an existing OAB decompressor. * @param self the #msoab_decompressor to destroy */ extern void mspack_destroy_oab_decompressor(struct msoab_decompressor *self); /* --- support for .CAB (MS Cabinet) file format --------------------------- */ /** * A structure which represents a single cabinet file. * * All fields are READ ONLY. * * If this cabinet is part of a merged cabinet set, the #files and #folders * fields are common to all cabinets in the set, and will be identical. * * @see mscab_decompressor::open(), mscab_decompressor::close(), * mscab_decompressor::search() */ struct mscabd_cabinet { /** * The next cabinet in a chained list, if this cabinet was opened with * mscab_decompressor::search(). May be NULL to mark the end of the * list. */ struct mscabd_cabinet *next; /** * The filename of the cabinet. More correctly, the filename of the * physical file that the cabinet resides in. This is given by the * library user and may be in any format. */ const char *filename; /** The file offset of cabinet within the physical file it resides in. */ off_t base_offset; /** The length of the cabinet file in bytes. */ unsigned int length; /** The previous cabinet in a cabinet set, or NULL. */ struct mscabd_cabinet *prevcab; /** The next cabinet in a cabinet set, or NULL. */ struct mscabd_cabinet *nextcab; /** The filename of the previous cabinet in a cabinet set, or NULL. */ char *prevname; /** The filename of the next cabinet in a cabinet set, or NULL. */ char *nextname; /** The name of the disk containing the previous cabinet in a cabinet * set, or NULL. */ char *previnfo; /** The name of the disk containing the next cabinet in a cabinet set, * or NULL. */ char *nextinfo; /** A list of all files in the cabinet or cabinet set. */ struct mscabd_file *files; /** A list of all folders in the cabinet or cabinet set. */ struct mscabd_folder *folders; /** * The set ID of the cabinet. All cabinets in the same set should have * the same set ID. */ unsigned short set_id; /** * The index number of the cabinet within the set. Numbering should * start from 0 for the first cabinet in the set, and increment by 1 for * each following cabinet. */ unsigned short set_index; /** * The number of bytes reserved in the header area of the cabinet. * * If this is non-zero and flags has MSCAB_HDR_RESV set, this data can * be read by the calling application. It is of the given length, * located at offset (base_offset + MSCAB_HDR_RESV_OFFSET) in the * cabinet file. * * @see flags */ unsigned short header_resv; /** * Header flags. * * - MSCAB_HDR_PREVCAB indicates the cabinet is part of a cabinet set, and * has a predecessor cabinet. * - MSCAB_HDR_NEXTCAB indicates the cabinet is part of a cabinet set, and * has a successor cabinet. * - MSCAB_HDR_RESV indicates the cabinet has reserved header space. * * @see prevname, previnfo, nextname, nextinfo, header_resv */ int flags; }; /** Offset from start of cabinet to the reserved header data (if present). */ #define MSCAB_HDR_RESV_OFFSET (0x28) /** Cabinet header flag: cabinet has a predecessor */ #define MSCAB_HDR_PREVCAB (0x01) /** Cabinet header flag: cabinet has a successor */ #define MSCAB_HDR_NEXTCAB (0x02) /** Cabinet header flag: cabinet has reserved header space */ #define MSCAB_HDR_RESV (0x04) /** * A structure which represents a single folder in a cabinet or cabinet set. * * All fields are READ ONLY. * * A folder is a single compressed stream of data. When uncompressed, it * holds the data of one or more files. A folder may be split across more * than one cabinet. */ struct mscabd_folder { /** * A pointer to the next folder in this cabinet or cabinet set, or NULL * if this is the final folder. */ struct mscabd_folder *next; /** * The compression format used by this folder. * * The macro MSCABD_COMP_METHOD() should be used on this field to get * the algorithm used. The macro MSCABD_COMP_LEVEL() should be used to get * the "compression level". * * @see MSCABD_COMP_METHOD(), MSCABD_COMP_LEVEL() */ int comp_type; /** * The total number of data blocks used by this folder. This includes * data blocks present in other files, if this folder spans more than * one cabinet. */ unsigned int num_blocks; }; /** * Returns the compression method used by a folder. * * @param comp_type a mscabd_folder::comp_type value * @return one of #MSCAB_COMP_NONE, #MSCAB_COMP_MSZIP, #MSCAB_COMP_QUANTUM * or #MSCAB_COMP_LZX */ #define MSCABD_COMP_METHOD(comp_type) ((comp_type) & 0x0F) /** * Returns the compression level used by a folder. * * @param comp_type a mscabd_folder::comp_type value * @return the compression level. This is only defined by LZX and Quantum * compression */ #define MSCABD_COMP_LEVEL(comp_type) (((comp_type) >> 8) & 0x1F) /** Compression mode: no compression. */ #define MSCAB_COMP_NONE (0) /** Compression mode: MSZIP (deflate) compression. */ #define MSCAB_COMP_MSZIP (1) /** Compression mode: Quantum compression */ #define MSCAB_COMP_QUANTUM (2) /** Compression mode: LZX compression */ #define MSCAB_COMP_LZX (3) /** * A structure which represents a single file in a cabinet or cabinet set. * * All fields are READ ONLY. */ struct mscabd_file { /** * The next file in the cabinet or cabinet set, or NULL if this is the * final file. */ struct mscabd_file *next; /** * The filename of the file. * * A null terminated string of up to 255 bytes in length, it may be in * either ISO-8859-1 or UTF8 format, depending on the file attributes. * * @see attribs */ char *filename; /** The uncompressed length of the file, in bytes. */ unsigned int length; /** * File attributes. * * The following attributes are defined: * - #MSCAB_ATTRIB_RDONLY indicates the file is write protected. * - #MSCAB_ATTRIB_HIDDEN indicates the file is hidden. * - #MSCAB_ATTRIB_SYSTEM indicates the file is a operating system file. * - #MSCAB_ATTRIB_ARCH indicates the file is "archived". * - #MSCAB_ATTRIB_EXEC indicates the file is an executable program. * - #MSCAB_ATTRIB_UTF_NAME indicates the filename is in UTF8 format rather * than ISO-8859-1. */ int attribs; /** File's last modified time, hour field. */ char time_h; /** File's last modified time, minute field. */ char time_m; /** File's last modified time, second field. */ char time_s; /** File's last modified date, day field. */ char date_d; /** File's last modified date, month field. */ char date_m; /** File's last modified date, year field. */ int date_y; /** A pointer to the folder that contains this file. */ struct mscabd_folder *folder; /** The uncompressed offset of this file in its folder. */ unsigned int offset; }; /** mscabd_file::attribs attribute: file is read-only. */ #define MSCAB_ATTRIB_RDONLY (0x01) /** mscabd_file::attribs attribute: file is hidden. */ #define MSCAB_ATTRIB_HIDDEN (0x02) /** mscabd_file::attribs attribute: file is an operating system file. */ #define MSCAB_ATTRIB_SYSTEM (0x04) /** mscabd_file::attribs attribute: file is "archived". */ #define MSCAB_ATTRIB_ARCH (0x20) /** mscabd_file::attribs attribute: file is an executable program. */ #define MSCAB_ATTRIB_EXEC (0x40) /** mscabd_file::attribs attribute: filename is UTF8, not ISO-8859-1. */ #define MSCAB_ATTRIB_UTF_NAME (0x80) /** mscab_decompressor::set_param() parameter: search buffer size. */ #define MSCABD_PARAM_SEARCHBUF (0) /** mscab_decompressor::set_param() parameter: repair MS-ZIP streams? */ #define MSCABD_PARAM_FIXMSZIP (1) /** mscab_decompressor::set_param() parameter: size of decompression buffer */ #define MSCABD_PARAM_DECOMPBUF (2) /** mscab_decompressor::set_param() parameter: salvage data from bad cabinets? * If enabled, open() will skip file with bad folder indices or filenames * rather than reject the whole cabinet, and extract() will limit rather than * reject files with invalid offsets and lengths, and bad data block checksums * will be ignored. Available only in CAB decoder version 2 and above. */ #define MSCABD_PARAM_SALVAGE (3) /** TODO */ struct mscab_compressor { int dummy; }; /** * A decompressor for .CAB (Microsoft Cabinet) files * * All fields are READ ONLY. * * @see mspack_create_cab_decompressor(), mspack_destroy_cab_decompressor() */ struct mscab_decompressor { /** * Opens a cabinet file and reads its contents. * * If the file opened is a valid cabinet file, all headers will be read * and a mscabd_cabinet structure will be returned, with a full list of * folders and files. * * In the case of an error occuring, NULL is returned and the error code * is available from last_error(). * * The filename pointer should be considered "in use" until close() is * called on the cabinet. * * @param self a self-referential pointer to the mscab_decompressor * instance being called * @param filename the filename of the cabinet file. This is passed * directly to mspack_system::open(). * @return a pointer to a mscabd_cabinet structure, or NULL on failure * @see close(), search(), last_error() */ struct mscabd_cabinet * (*open) (struct mscab_decompressor *self, const char *filename); /** * Closes a previously opened cabinet or cabinet set. * * This closes a cabinet, all cabinets associated with it via the * mscabd_cabinet::next, mscabd_cabinet::prevcab and * mscabd_cabinet::nextcab pointers, and all folders and files. All * memory used by these entities is freed. * * The cabinet pointer is now invalid and cannot be used again. All * mscabd_folder and mscabd_file pointers from that cabinet or cabinet * set are also now invalid, and cannot be used again. * * If the cabinet pointer given was created using search(), it MUST be * the cabinet pointer returned by search() and not one of the later * cabinet pointers further along the mscabd_cabinet::next chain. * If extra cabinets have been added using append() or prepend(), these * will all be freed, even if the cabinet pointer given is not the first * cabinet in the set. Do NOT close() more than one cabinet in the set. * * The mscabd_cabinet::filename is not freed by the library, as it is * not allocated by the library. The caller should free this itself if * necessary, before it is lost forever. * * @param self a self-referential pointer to the mscab_decompressor * instance being called * @param cab the cabinet to close * @see open(), search(), append(), prepend() */ void (*close)(struct mscab_decompressor *self, struct mscabd_cabinet *cab); /** * Searches a regular file for embedded cabinets. * * This opens a normal file with the given filename and will search the * entire file for embedded cabinet files * * If any cabinets are found, the equivalent of open() is called on each * potential cabinet file at the offset it was found. All successfully * open()ed cabinets are kept in a list. * * The first cabinet found will be returned directly as the result of * this method. Any further cabinets found will be chained in a list * using the mscabd_cabinet::next field. * * In the case of an error occuring anywhere other than the simulated * open(), NULL is returned and the error code is available from * last_error(). * * If no error occurs, but no cabinets can be found in the file, NULL is * returned and last_error() returns MSPACK_ERR_OK. * * The filename pointer should be considered in use until close() is * called on the cabinet. * * close() should only be called on the result of search(), not on any * subsequent cabinets in the mscabd_cabinet::next chain. * * @param self a self-referential pointer to the mscab_decompressor * instance being called * @param filename the filename of the file to search for cabinets. This * is passed directly to mspack_system::open(). * @return a pointer to a mscabd_cabinet structure, or NULL * @see close(), open(), last_error() */ struct mscabd_cabinet * (*search) (struct mscab_decompressor *self, const char *filename); /** * Appends one mscabd_cabinet to another, forming or extending a cabinet * set. * * This will attempt to append one cabinet to another such that * (cab->nextcab == nextcab) && (nextcab->prevcab == cab) and * any folders split between the two cabinets are merged. * * The cabinets MUST be part of a cabinet set -- a cabinet set is a * cabinet that spans more than one physical cabinet file on disk -- and * must be appropriately matched. * * It can be determined if a cabinet has further parts to load by * examining the mscabd_cabinet::flags field: * * - if (flags & MSCAB_HDR_PREVCAB) is non-zero, there is a * predecessor cabinet to open() and prepend(). Its MS-DOS * case-insensitive filename is mscabd_cabinet::prevname * - if (flags & MSCAB_HDR_NEXTCAB) is non-zero, there is a * successor cabinet to open() and append(). Its MS-DOS case-insensitive * filename is mscabd_cabinet::nextname * * If the cabinets do not match, an error code will be returned. Neither * cabinet has been altered, and both should be closed seperately. * * Files and folders in a cabinet set are a single entity. All cabinets * in a set use the same file list, which is updated as cabinets in the * set are added. All pointers to mscabd_folder and mscabd_file * structures in either cabinet must be discarded and re-obtained after * merging. * * @param self a self-referential pointer to the mscab_decompressor * instance being called * @param cab the cabinet which will be appended to, * predecessor of nextcab * @param nextcab the cabinet which will be appended, * successor of cab * @return an error code, or MSPACK_ERR_OK if successful * @see prepend(), open(), close() */ int (*append) (struct mscab_decompressor *self, struct mscabd_cabinet *cab, struct mscabd_cabinet *nextcab); /** * Prepends one mscabd_cabinet to another, forming or extending a * cabinet set. * * This will attempt to prepend one cabinet to another, such that * (cab->prevcab == prevcab) && (prevcab->nextcab == cab). In * all other respects, it is identical to append(). See append() for the * full documentation. * * @param self a self-referential pointer to the mscab_decompressor * instance being called * @param cab the cabinet which will be prepended to, * successor of prevcab * @param prevcab the cabinet which will be prepended, * predecessor of cab * @return an error code, or MSPACK_ERR_OK if successful * @see append(), open(), close() */ int (*prepend) (struct mscab_decompressor *self, struct mscabd_cabinet *cab, struct mscabd_cabinet *prevcab); /** * Extracts a file from a cabinet or cabinet set. * * This extracts a compressed file in a cabinet and writes it to the given * filename. * * The MS-DOS filename of the file, mscabd_file::filename, is NOT USED * by extract(). The caller must examine this MS-DOS filename, copy and * change it as necessary, create directories as necessary, and provide * the correct filename as a parameter, which will be passed unchanged * to the decompressor's mspack_system::open() * * If the file belongs to a split folder in a multi-part cabinet set, * and not enough parts of the cabinet set have been loaded and appended * or prepended, an error will be returned immediately. * * @param self a self-referential pointer to the mscab_decompressor * instance being called * @param file the file to be decompressed * @param filename the filename of the file being written to * @return an error code, or MSPACK_ERR_OK if successful */ int (*extract)(struct mscab_decompressor *self, struct mscabd_file *file, const char *filename); /** * Sets a CAB decompression engine parameter. * * The following parameters are defined: * - #MSCABD_PARAM_SEARCHBUF: How many bytes should be allocated as a * buffer when using search()? The minimum value is 4. The default * value is 32768. * - #MSCABD_PARAM_FIXMSZIP: If non-zero, extract() will ignore bad * checksums and recover from decompression errors in MS-ZIP * compressed folders. The default value is 0 (don't recover). * - #MSCABD_PARAM_DECOMPBUF: How many bytes should be used as an input * bit buffer by decompressors? The minimum value is 4. The default * value is 4096. * * @param self a self-referential pointer to the mscab_decompressor * instance being called * @param param the parameter to set * @param value the value to set the parameter to * @return MSPACK_ERR_OK if all is OK, or MSPACK_ERR_ARGS if there * is a problem with either parameter or value. * @see search(), extract() */ int (*set_param)(struct mscab_decompressor *self, int param, int value); /** * Returns the error code set by the most recently called method. * * This is useful for open() and search(), which do not return an error * code directly. * * @param self a self-referential pointer to the mscab_decompressor * instance being called * @return the most recent error code * @see open(), search() */ int (*last_error)(struct mscab_decompressor *self); }; /* --- support for .CHM (HTMLHelp) file format ----------------------------- */ /** * A structure which represents a file to be placed in a CHM helpfile. * * A contiguous array of these structures should be passed to * mschm_compressor::generate(). The array list is terminated with an * entry whose mschmc_file::section field is set to #MSCHMC_ENDLIST, the * other fields in this entry are ignored. */ struct mschmc_file { /** One of #MSCHMC_ENDLIST, #MSCHMC_UNCOMP or #MSCHMC_MSCOMP. */ int section; /** The filename of the source file that will be added to the CHM. This * is passed directly to mspack_system::open(). */ const char *filename; /** The full path and filename of the file within the CHM helpfile, a * UTF-1 encoded null-terminated string. */ char *chm_filename; /** The length of the file, in bytes. This will be adhered to strictly * and a read error will be issued if this many bytes cannot be read * from the real file at CHM generation time. */ off_t length; }; /** * A structure which represents a section of a CHM helpfile. * * All fields are READ ONLY. * * Not used directly, but used as a generic base type for * mschmd_sec_uncompressed and mschmd_sec_mscompressed. */ struct mschmd_section { /** A pointer to the CHM helpfile that contains this section. */ struct mschmd_header *chm; /** * The section ID. Either 0 for the uncompressed section * mschmd_sec_uncompressed, or 1 for the LZX compressed section * mschmd_sec_mscompressed. No other section IDs are known. */ unsigned int id; }; /** * A structure which represents the uncompressed section of a CHM helpfile. * * All fields are READ ONLY. */ struct mschmd_sec_uncompressed { /** Generic section data. */ struct mschmd_section base; /** The file offset of where this section begins in the CHM helpfile. */ off_t offset; }; /** * A structure which represents the LZX compressed section of a CHM helpfile. * * All fields are READ ONLY. */ struct mschmd_sec_mscompressed { /** Generic section data. */ struct mschmd_section base; /** A pointer to the meta-file which represents all LZX compressed data. */ struct mschmd_file *content; /** A pointer to the file which contains the LZX control data. */ struct mschmd_file *control; /** A pointer to the file which contains the LZX reset table. */ struct mschmd_file *rtable; /** A pointer to the file which contains the LZX span information. * Available only in CHM decoder version 2 and above. */ struct mschmd_file *spaninfo; }; /** * A structure which represents a CHM helpfile. * * All fields are READ ONLY. */ struct mschmd_header { /** The version of the CHM file format used in this file. */ unsigned int version; /** * The "timestamp" of the CHM helpfile. * * It is the lower 32 bits of a 64-bit value representing the number of * centiseconds since 1601-01-01 00:00:00 UTC, plus 42. It is not useful * as a timestamp, but it is useful as a semi-unique ID. */ unsigned int timestamp; /** * The default Language and Country ID (LCID) of the user who ran the * HTMLHelp Compiler. This is not the language of the CHM file itself. */ unsigned int language; /** * The filename of the CHM helpfile. This is given by the library user * and may be in any format. */ const char *filename; /** The length of the CHM helpfile, in bytes. */ off_t length; /** A list of all non-system files in the CHM helpfile. */ struct mschmd_file *files; /** * A list of all system files in the CHM helpfile. * * System files are files which begin with "::". They are meta-files * generated by the CHM creation process. */ struct mschmd_file *sysfiles; /** The section 0 (uncompressed) data in this CHM helpfile. */ struct mschmd_sec_uncompressed sec0; /** The section 1 (MSCompressed) data in this CHM helpfile. */ struct mschmd_sec_mscompressed sec1; /** The file offset of the first PMGL/PMGI directory chunk. */ off_t dir_offset; /** The number of PMGL/PMGI directory chunks in this CHM helpfile. */ unsigned int num_chunks; /** The size of each PMGL/PMGI chunk, in bytes. */ unsigned int chunk_size; /** The "density" of the quick-reference section in PMGL/PMGI chunks. */ unsigned int density; /** The depth of the index tree. * * - if 1, there are no PMGI chunks, only PMGL chunks. * - if 2, there is 1 PMGI chunk. All chunk indices point to PMGL chunks. * - if 3, the root PMGI chunk points to secondary PMGI chunks, which in * turn point to PMGL chunks. * - and so on... */ unsigned int depth; /** * The number of the root PMGI chunk. * * If there is no index in the CHM helpfile, this will be 0xFFFFFFFF. */ unsigned int index_root; /** * The number of the first PMGL chunk. Usually zero. * Available only in CHM decoder version 2 and above. */ unsigned int first_pmgl; /** * The number of the last PMGL chunk. Usually num_chunks-1. * Available only in CHM decoder version 2 and above. */ unsigned int last_pmgl; /** * A cache of loaded chunks, filled in by mschm_decoder::fast_find(). * Available only in CHM decoder version 2 and above. */ unsigned char **chunk_cache; }; /** * A structure which represents a file stored in a CHM helpfile. * * All fields are READ ONLY. */ struct mschmd_file { /** * A pointer to the next file in the list, or NULL if this is the final * file. */ struct mschmd_file *next; /** * A pointer to the section that this file is located in. Indirectly, * it also points to the CHM helpfile the file is located in. */ struct mschmd_section *section; /** The offset within the section data that this file is located at. */ off_t offset; /** The length of this file, in bytes */ off_t length; /** The filename of this file -- a null terminated string in UTF-8. */ char *filename; }; /** mschmc_file::section value: end of CHM file list */ #define MSCHMC_ENDLIST (0) /** mschmc_file::section value: this file is in the Uncompressed section */ #define MSCHMC_UNCOMP (1) /** mschmc_file::section value: this file is in the MSCompressed section */ #define MSCHMC_MSCOMP (2) /** mschm_compressor::set_param() parameter: "timestamp" header */ #define MSCHMC_PARAM_TIMESTAMP (0) /** mschm_compressor::set_param() parameter: "language" header */ #define MSCHMC_PARAM_LANGUAGE (1) /** mschm_compressor::set_param() parameter: LZX window size */ #define MSCHMC_PARAM_LZXWINDOW (2) /** mschm_compressor::set_param() parameter: intra-chunk quickref density */ #define MSCHMC_PARAM_DENSITY (3) /** mschm_compressor::set_param() parameter: whether to create indices */ #define MSCHMC_PARAM_INDEX (4) /** * A compressor for .CHM (Microsoft HTMLHelp) files. * * All fields are READ ONLY. * * @see mspack_create_chm_compressor(), mspack_destroy_chm_compressor() */ struct mschm_compressor { /** * Generates a CHM help file. * * The help file will contain up to two sections, an Uncompressed * section and potentially an MSCompressed (LZX compressed) * section. * * While the contents listing of a CHM file is always in lexical order, * the file list passed in will be taken as the correct order for files * within the sections. It is in your interest to place similar files * together for better compression. * * There are two modes of generation, to use a temporary file or not to * use one. See use_temporary_file() for the behaviour of generate() in * these two different modes. * * @param self a self-referential pointer to the mschm_compressor * instance being called * @param file_list an array of mschmc_file structures, terminated * with an entry whose mschmc_file::section field is * #MSCHMC_ENDLIST. The order of the list is * preserved within each section. The length of any * mschmc_file::chm_filename string cannot exceed * roughly 4096 bytes. Each source file must be able * to supply as many bytes as given in the * mschmc_file::length field. * @param output_file the file to write the generated CHM helpfile to. * This is passed directly to mspack_system::open() * @return an error code, or MSPACK_ERR_OK if successful * @see use_temporary_file() set_param() */ int (*generate)(struct mschm_compressor *self, struct mschmc_file file_list[], const char *output_file); /** * Specifies whether a temporary file is used during CHM generation. * * The CHM file format includes data about the compressed section (such * as its overall size) that is stored in the output CHM file prior to * the compressed section itself. This unavoidably requires that the * compressed section has to be generated, before these details can be * set. There are several ways this can be handled. Firstly, the * compressed section could be generated entirely in memory before * writing any of the output CHM file. This approach is not used in * libmspack, as the compressed section can exceed the addressable * memory space on most architectures. * * libmspack has two options, either to write these unknowable sections * with blank data, generate the compressed section, then re-open the * output file for update once the compressed section has been * completed, or to write the compressed section to a temporary file, * then write the entire output file at once, performing a simple * file-to-file copy for the compressed section. * * The simple solution of buffering the entire compressed section in * memory can still be used, if desired. As the temporary file's * filename is passed directly to mspack_system::open(), it is possible * for a custom mspack_system implementation to hold this file in memory, * without writing to a disk. * * If a temporary file is set, generate() performs the following * sequence of events: the temporary file is opened for writing, the * compression algorithm writes to the temporary file, the temporary * file is closed. Then the output file is opened for writing and the * temporary file is re-opened for reading. The output file is written * and the temporary file is read from. Both files are then closed. The * temporary file itself is not deleted. If that is desired, the * temporary file should be deleted after the completion of generate(), * if it exists. * * If a temporary file is set not to be used, generate() performs the * following sequence of events: the output file is opened for writing, * then it is written and closed. The output file is then re-opened for * update, the appropriate sections are seek()ed to and re-written, then * the output file is closed. * * @param self a self-referential pointer to the * mschm_compressor instance being called * @param use_temp_file non-zero if the temporary file should be used, * zero if the temporary file should not be used. * @param temp_file a file to temporarily write compressed data to, * before opening it for reading and copying the * contents to the output file. This is passed * directly to mspack_system::open(). * @return an error code, or MSPACK_ERR_OK if successful * @see generate() */ int (*use_temporary_file)(struct mschm_compressor *self, int use_temp_file, const char *temp_file); /** * Sets a CHM compression engine parameter. * * The following parameters are defined: * - #MSCHMC_PARAM_TIMESTAMP: Sets the "timestamp" of the CHM file * generated. This is not a timestamp, see mschmd_header::timestamp * for a description. If this timestamp is 0, generate() will use its * own algorithm for making a unique ID, based on the lengths and * names of files in the CHM itself. Defaults to 0, any value between * 0 and (2^32)-1 is valid. * - #MSCHMC_PARAM_LANGUAGE: Sets the "language" of the CHM file * generated. This is not the language used in the CHM file, but the * language setting of the user who ran the HTMLHelp compiler. It * defaults to 0x0409. The valid range is between 0x0000 and 0x7F7F. * - #MSCHMC_PARAM_LZXWINDOW: Sets the size of the LZX history window, * which is also the interval at which the compressed data stream can be * randomly accessed. The value is not a size in bytes, but a power of * two. The default value is 16 (which makes the window 2^16 bytes, or * 64 kilobytes), the valid range is from 15 (32 kilobytes) to 21 (2 * megabytes). * - #MSCHMC_PARAM_DENSITY: Sets the "density" of quick reference * entries stored at the end of directory listing chunk. Each chunk is * 4096 bytes in size, and contains as many file entries as there is * room for. At the other end of the chunk, a list of "quick reference" * pointers is included. The offset of every 'N'th file entry is given a * quick reference, where N = (2^density) + 1. The default density is * 2. The smallest density is 0 (N=2), the maximum is 10 (N=1025). As * each file entry requires at least 5 bytes, the maximum number of * entries in a single chunk is roughly 800, so the maximum value 10 * can be used to indicate there are no quickrefs at all. * - #MSCHMC_PARAM_INDEX: Sets whether or not to include quick lookup * index chunk(s), in addition to normal directory listing chunks. A * value of zero means no index chunks will be created, a non-zero value * means index chunks will be created. The default is zero, "don't * create an index". * * @param self a self-referential pointer to the mschm_compressor * instance being called * @param param the parameter to set * @param value the value to set the parameter to * @return MSPACK_ERR_OK if all is OK, or MSPACK_ERR_ARGS if there * is a problem with either parameter or value. * @see generate() */ int (*set_param)(struct mschm_compressor *self, int param, int value); /** * Returns the error code set by the most recently called method. * * @param self a self-referential pointer to the mschm_compressor * instance being called * @return the most recent error code * @see set_param(), generate() */ int (*last_error)(struct mschm_compressor *self); }; /** * A decompressor for .CHM (Microsoft HTMLHelp) files * * All fields are READ ONLY. * * @see mspack_create_chm_decompressor(), mspack_destroy_chm_decompressor() */ struct mschm_decompressor { /** * Opens a CHM helpfile and reads its contents. * * If the file opened is a valid CHM helpfile, all headers will be read * and a mschmd_header structure will be returned, with a full list of * files. * * In the case of an error occuring, NULL is returned and the error code * is available from last_error(). * * The filename pointer should be considered "in use" until close() is * called on the CHM helpfile. * * @param self a self-referential pointer to the mschm_decompressor * instance being called * @param filename the filename of the CHM helpfile. This is passed * directly to mspack_system::open(). * @return a pointer to a mschmd_header structure, or NULL on failure * @see close() */ struct mschmd_header *(*open)(struct mschm_decompressor *self, const char *filename); /** * Closes a previously opened CHM helpfile. * * This closes a CHM helpfile, frees the mschmd_header and all * mschmd_file structures associated with it (if any). This works on * both helpfiles opened with open() and helpfiles opened with * fast_open(). * * The CHM header pointer is now invalid and cannot be used again. All * mschmd_file pointers referencing that CHM are also now invalid, and * cannot be used again. * * @param self a self-referential pointer to the mschm_decompressor * instance being called * @param chm the CHM helpfile to close * @see open(), fast_open() */ void (*close)(struct mschm_decompressor *self, struct mschmd_header *chm); /** * Extracts a file from a CHM helpfile. * * This extracts a file from a CHM helpfile and writes it to the given * filename. The filename of the file, mscabd_file::filename, is not * used by extract(), but can be used by the caller as a guide for * constructing an appropriate filename. * * This method works both with files found in the mschmd_header::files * and mschmd_header::sysfiles list and mschmd_file structures generated * on the fly by fast_find(). * * @param self a self-referential pointer to the mschm_decompressor * instance being called * @param file the file to be decompressed * @param filename the filename of the file being written to * @return an error code, or MSPACK_ERR_OK if successful */ int (*extract)(struct mschm_decompressor *self, struct mschmd_file *file, const char *filename); /** * Returns the error code set by the most recently called method. * * This is useful for open() and fast_open(), which do not return an * error code directly. * * @param self a self-referential pointer to the mschm_decompressor * instance being called * @return the most recent error code * @see open(), extract() */ int (*last_error)(struct mschm_decompressor *self); /** * Opens a CHM helpfile quickly. * * If the file opened is a valid CHM helpfile, only essential headers * will be read. A mschmd_header structure will be still be returned, as * with open(), but the mschmd_header::files field will be NULL. No * files details will be automatically read. The fast_find() method * must be used to obtain file details. * * In the case of an error occuring, NULL is returned and the error code * is available from last_error(). * * The filename pointer should be considered "in use" until close() is * called on the CHM helpfile. * * @param self a self-referential pointer to the mschm_decompressor * instance being called * @param filename the filename of the CHM helpfile. This is passed * directly to mspack_system::open(). * @return a pointer to a mschmd_header structure, or NULL on failure * @see open(), close(), fast_find(), extract() */ struct mschmd_header *(*fast_open)(struct mschm_decompressor *self, const char *filename); /** * Finds file details quickly. * * Instead of reading all CHM helpfile headers and building a list of * files, fast_open() and fast_find() are intended for finding file * details only when they are needed. The CHM file format includes an * on-disk file index to allow this. * * Given a case-sensitive filename, fast_find() will search the on-disk * index for that file. * * If the file was found, the caller-provided mschmd_file structure will * be filled out like so: * - section: the correct value for the found file * - offset: the correct value for the found file * - length: the correct value for the found file * - all other structure elements: NULL or 0 * * If the file was not found, MSPACK_ERR_OK will still be returned as the * result, but the caller-provided structure will be filled out like so: * - section: NULL * - offset: 0 * - length: 0 * - all other structure elements: NULL or 0 * * This method is intended to be used in conjunction with CHM helpfiles * opened with fast_open(), but it also works with helpfiles opened * using the regular open(). * * @param self a self-referential pointer to the mschm_decompressor * instance being called * @param chm the CHM helpfile to search for the file * @param filename the filename of the file to search for * @param f_ptr a pointer to a caller-provded mschmd_file structure * @param f_size sizeof(struct mschmd_file) * @return an error code, or MSPACK_ERR_OK if successful * @see open(), close(), fast_find(), extract() */ int (*fast_find)(struct mschm_decompressor *self, struct mschmd_header *chm, const char *filename, struct mschmd_file *f_ptr, int f_size); }; /* --- support for .LIT (EBook) file format -------------------------------- */ /** TODO */ struct mslit_compressor { int dummy; }; /** TODO */ struct mslit_decompressor { int dummy; }; /* --- support for .HLP (MS Help) file format ------------------------------ */ /** TODO */ struct mshlp_compressor { int dummy; }; /** TODO */ struct mshlp_decompressor { int dummy; }; /* --- support for SZDD file format ---------------------------------------- */ /** msszdd_compressor::set_param() parameter: the missing character */ #define MSSZDDC_PARAM_MISSINGCHAR (0) /** msszddd_header::format value - a regular SZDD file */ #define MSSZDD_FMT_NORMAL (0) /** msszddd_header::format value - a special QBasic SZDD file */ #define MSSZDD_FMT_QBASIC (1) /** * A structure which represents an SZDD compressed file. * * All fields are READ ONLY. */ struct msszddd_header { /** The file format; either #MSSZDD_FMT_NORMAL or #MSSZDD_FMT_QBASIC */ int format; /** The amount of data in the SZDD file once uncompressed. */ off_t length; /** * The last character in the filename, traditionally replaced with an * underscore to show the file is compressed. The null character is used * to show that this character has not been stored (e.g. because the * filename is not known). Generally, only characters that may appear in * an MS-DOS filename (except ".") are valid. */ char missing_char; }; /** * A compressor for the SZDD file format. * * All fields are READ ONLY. * * @see mspack_create_szdd_compressor(), mspack_destroy_szdd_compressor() */ struct msszdd_compressor { /** * Reads an input file and creates a compressed output file in the * SZDD compressed file format. The SZDD compression format is quick * but gives poor compression. It is possible for the compressed output * file to be larger than the input file. * * Conventionally, SZDD compressed files have the final character in * their filename replaced with an underscore, to show they are * compressed. The missing character is stored in the compressed file * itself. This is due to the restricted filename conventions of MS-DOS, * most operating systems, such as UNIX, simply append another file * extension to the existing filename. As mspack does not deal with * filenames, this is left up to you. If you wish to set the missing * character stored in the file header, use set_param() with the * #MSSZDDC_PARAM_MISSINGCHAR parameter. * * "Stream" compression (where the length of the input data is not * known) is not possible. The length of the input data is stored in the * header of the SZDD file and must therefore be known before any data * is compressed. Due to technical limitations of the file format, the * maximum size of uncompressed file that will be accepted is 2147483647 * bytes. * * @param self a self-referential pointer to the msszdd_compressor * instance being called * @param input the name of the file to compressed. This is passed * passed directly to mspack_system::open() * @param output the name of the file to write compressed data to. * This is passed directly to mspack_system::open(). * @param length the length of the uncompressed file, or -1 to indicate * that this should be determined automatically by using * mspack_system::seek() on the input file. * @return an error code, or MSPACK_ERR_OK if successful * @see set_param() */ int (*compress)(struct msszdd_compressor *self, const char *input, const char *output, off_t length); /** * Sets an SZDD compression engine parameter. * * The following parameters are defined: * - #MSSZDDC_PARAM_CHARACTER: the "missing character", the last character * in the uncompressed file's filename, which is traditionally replaced * with an underscore to show the file is compressed. Traditionally, * this can only be a character that is a valid part of an MS-DOS, * filename, but libmspack permits any character between 0x00 and 0xFF * to be stored. 0x00 is the default, and it represents "no character * stored". * * @param self a self-referential pointer to the msszdd_compressor * instance being called * @param param the parameter to set * @param value the value to set the parameter to * @return MSPACK_ERR_OK if all is OK, or MSPACK_ERR_ARGS if there * is a problem with either parameter or value. * @see compress() */ int (*set_param)(struct msszdd_compressor *self, int param, int value); /** * Returns the error code set by the most recently called method. * * @param self a self-referential pointer to the msszdd_compressor * instance being called * @return the most recent error code * @see compress() */ int (*last_error)(struct mschm_decompressor *self); }; /** * A decompressor for SZDD compressed files. * * All fields are READ ONLY. * * @see mspack_create_szdd_decompressor(), mspack_destroy_szdd_decompressor() */ struct msszdd_decompressor { /** * Opens a SZDD file and reads the header. * * If the file opened is a valid SZDD file, all headers will be read and * a msszddd_header structure will be returned. * * In the case of an error occuring, NULL is returned and the error code * is available from last_error(). * * The filename pointer should be considered "in use" until close() is * called on the SZDD file. * * @param self a self-referential pointer to the msszdd_decompressor * instance being called * @param filename the filename of the SZDD compressed file. This is * passed directly to mspack_system::open(). * @return a pointer to a msszddd_header structure, or NULL on failure * @see close() */ struct msszddd_header *(*open)(struct msszdd_decompressor *self, const char *filename); /** * Closes a previously opened SZDD file. * * This closes a SZDD file and frees the msszddd_header associated with * it. * * The SZDD header pointer is now invalid and cannot be used again. * * @param self a self-referential pointer to the msszdd_decompressor * instance being called * @param szdd the SZDD file to close * @see open() */ void (*close)(struct msszdd_decompressor *self, struct msszddd_header *szdd); /** * Extracts the compressed data from a SZDD file. * * This decompresses the compressed SZDD data stream and writes it to * an output file. * * @param self a self-referential pointer to the msszdd_decompressor * instance being called * @param szdd the SZDD file to extract data from * @param filename the filename to write the decompressed data to. This * is passed directly to mspack_system::open(). * @return an error code, or MSPACK_ERR_OK if successful */ int (*extract)(struct msszdd_decompressor *self, struct msszddd_header *szdd, const char *filename); /** * Decompresses an SZDD file to an output file in one step. * * This opens an SZDD file as input, reads the header, then decompresses * the compressed data immediately to an output file, finally closing * both the input and output file. It is more convenient to use than * open() then extract() then close(), if you do not need to know the * SZDD output size or missing character. * * @param self a self-referential pointer to the msszdd_decompressor * instance being called * @param input the filename of the input SZDD file. This is passed * directly to mspack_system::open(). * @param output the filename to write the decompressed data to. This * is passed directly to mspack_system::open(). * @return an error code, or MSPACK_ERR_OK if successful */ int (*decompress)(struct msszdd_decompressor *self, const char *input, const char *output); /** * Returns the error code set by the most recently called method. * * This is useful for open() which does not return an * error code directly. * * @param self a self-referential pointer to the msszdd_decompressor * instance being called * @return the most recent error code * @see open(), extract(), decompress() */ int (*last_error)(struct msszdd_decompressor *self); }; /* --- support for KWAJ file format ---------------------------------------- */ /** mskwaj_compressor::set_param() parameter: compression type */ #define MSKWAJC_PARAM_COMP_TYPE (0) /** mskwaj_compressor::set_param() parameter: include the length of the * uncompressed file in the header? */ #define MSKWAJC_PARAM_INCLUDE_LENGTH (1) /** KWAJ compression type: no compression. */ #define MSKWAJ_COMP_NONE (0) /** KWAJ compression type: no compression, 0xFF XOR "encryption". */ #define MSKWAJ_COMP_XOR (1) /** KWAJ compression type: LZSS (same method as SZDD) */ #define MSKWAJ_COMP_SZDD (2) /** KWAJ compression type: LZ+Huffman compression */ #define MSKWAJ_COMP_LZH (3) /** KWAJ compression type: MSZIP */ #define MSKWAJ_COMP_MSZIP (4) /** KWAJ optional header flag: decompressed file length is included */ #define MSKWAJ_HDR_HASLENGTH (0x01) /** KWAJ optional header flag: unknown 2-byte structure is included */ #define MSKWAJ_HDR_HASUNKNOWN1 (0x02) /** KWAJ optional header flag: unknown multi-sized structure is included */ #define MSKWAJ_HDR_HASUNKNOWN2 (0x04) /** KWAJ optional header flag: file name (no extension) is included */ #define MSKWAJ_HDR_HASFILENAME (0x08) /** KWAJ optional header flag: file extension is included */ #define MSKWAJ_HDR_HASFILEEXT (0x10) /** KWAJ optional header flag: extra text is included */ #define MSKWAJ_HDR_HASEXTRATEXT (0x20) /** * A structure which represents an KWAJ compressed file. * * All fields are READ ONLY. */ struct mskwajd_header { /** The compression type; should be one of #MSKWAJ_COMP_NONE, * #MSKWAJ_COMP_XOR, #MSKWAJ_COMP_SZDD or #MSKWAJ_COMP_LZH */ unsigned short comp_type; /** The offset in the file where the compressed data stream begins */ off_t data_offset; /** Flags indicating which optional headers were included. */ int headers; /** The amount of uncompressed data in the file, or 0 if not present. */ off_t length; /** output filename, or NULL if not present */ char *filename; /** extra uncompressed data (usually text) in the header. * This data can contain nulls so use extra_length to get the size. */ char *extra; /** length of extra uncompressed data in the header */ unsigned short extra_length; }; /** * A compressor for the KWAJ file format. * * All fields are READ ONLY. * * @see mspack_create_kwaj_compressor(), mspack_destroy_kwaj_compressor() */ struct mskwaj_compressor { /** * Reads an input file and creates a compressed output file in the * KWAJ compressed file format. The KWAJ compression format is quick * but gives poor compression. It is possible for the compressed output * file to be larger than the input file. * * @param self a self-referential pointer to the mskwaj_compressor * instance being called * @param input the name of the file to compressed. This is passed * passed directly to mspack_system::open() * @param output the name of the file to write compressed data to. * This is passed directly to mspack_system::open(). * @param length the length of the uncompressed file, or -1 to indicate * that this should be determined automatically by using * mspack_system::seek() on the input file. * @return an error code, or MSPACK_ERR_OK if successful * @see set_param() */ int (*compress)(struct mskwaj_compressor *self, const char *input, const char *output, off_t length); /** * Sets an KWAJ compression engine parameter. * * The following parameters are defined: * * - #MSKWAJC_PARAM_COMP_TYPE: the compression method to use. Must * be one of #MSKWAJC_COMP_NONE, #MSKWAJC_COMP_XOR, #MSKWAJ_COMP_SZDD * or #MSKWAJ_COMP_LZH. The default is #MSKWAJ_COMP_LZH. * * - #MSKWAJC_PARAM_INCLUDE_LENGTH: a boolean; should the compressed * output file should include the uncompressed length of the input * file in the header? This adds 4 bytes to the size of the output * file. A value of zero says "no", non-zero says "yes". The default * is "no". * * @param self a self-referential pointer to the mskwaj_compressor * instance being called * @param param the parameter to set * @param value the value to set the parameter to * @return MSPACK_ERR_OK if all is OK, or MSPACK_ERR_ARGS if there * is a problem with either parameter or value. * @see generate() */ int (*set_param)(struct mskwaj_compressor *self, int param, int value); /** * Sets the original filename of the file before compression, * which will be stored in the header of the output file. * * The filename should be a null-terminated string, it must be an * MS-DOS "8.3" type filename (up to 8 bytes for the filename, then * optionally a "." and up to 3 bytes for a filename extension). * * If NULL is passed as the filename, no filename is included in the * header. This is the default. * * @param self a self-referential pointer to the mskwaj_compressor * instance being called * @param filename the original filename to use * @return MSPACK_ERR_OK if all is OK, or MSPACK_ERR_ARGS if the * filename is too long */ int (*set_filename)(struct mskwaj_compressor *self, const char *filename); /** * Sets arbitrary data that will be stored in the header of the * output file, uncompressed. It can be up to roughly 64 kilobytes, * as the overall size of the header must not exceed 65535 bytes. * The data can contain null bytes if desired. * * If NULL is passed as the data pointer, or zero is passed as the * length, no extra data is included in the header. This is the * default. * * @param self a self-referential pointer to the mskwaj_compressor * instance being called * @param data a pointer to the data to be stored in the header * @param bytes the length of the data in bytes * @return MSPACK_ERR_OK if all is OK, or MSPACK_ERR_ARGS extra data * is too long */ int (*set_extra_data)(struct mskwaj_compressor *self, void *data, size_t bytes); /** * Returns the error code set by the most recently called method. * * @param self a self-referential pointer to the mskwaj_compressor * instance being called * @return the most recent error code * @see compress() */ int (*last_error)(struct mschm_decompressor *self); }; /** * A decompressor for KWAJ compressed files. * * All fields are READ ONLY. * * @see mspack_create_kwaj_decompressor(), mspack_destroy_kwaj_decompressor() */ struct mskwaj_decompressor { /** * Opens a KWAJ file and reads the header. * * If the file opened is a valid KWAJ file, all headers will be read and * a mskwajd_header structure will be returned. * * In the case of an error occuring, NULL is returned and the error code * is available from last_error(). * * The filename pointer should be considered "in use" until close() is * called on the KWAJ file. * * @param self a self-referential pointer to the mskwaj_decompressor * instance being called * @param filename the filename of the KWAJ compressed file. This is * passed directly to mspack_system::open(). * @return a pointer to a mskwajd_header structure, or NULL on failure * @see close() */ struct mskwajd_header *(*open)(struct mskwaj_decompressor *self, const char *filename); /** * Closes a previously opened KWAJ file. * * This closes a KWAJ file and frees the mskwajd_header associated * with it. The KWAJ header pointer is now invalid and cannot be * used again. * * @param self a self-referential pointer to the mskwaj_decompressor * instance being called * @param kwaj the KWAJ file to close * @see open() */ void (*close)(struct mskwaj_decompressor *self, struct mskwajd_header *kwaj); /** * Extracts the compressed data from a KWAJ file. * * This decompresses the compressed KWAJ data stream and writes it to * an output file. * * @param self a self-referential pointer to the mskwaj_decompressor * instance being called * @param kwaj the KWAJ file to extract data from * @param filename the filename to write the decompressed data to. This * is passed directly to mspack_system::open(). * @return an error code, or MSPACK_ERR_OK if successful */ int (*extract)(struct mskwaj_decompressor *self, struct mskwajd_header *kwaj, const char *filename); /** * Decompresses an KWAJ file to an output file in one step. * * This opens an KWAJ file as input, reads the header, then decompresses * the compressed data immediately to an output file, finally closing * both the input and output file. It is more convenient to use than * open() then extract() then close(), if you do not need to know the * KWAJ output size or output filename. * * @param self a self-referential pointer to the mskwaj_decompressor * instance being called * @param input the filename of the input KWAJ file. This is passed * directly to mspack_system::open(). * @param output the filename to write the decompressed data to. This * is passed directly to mspack_system::open(). * @return an error code, or MSPACK_ERR_OK if successful */ int (*decompress)(struct mskwaj_decompressor *self, const char *input, const char *output); /** * Returns the error code set by the most recently called method. * * This is useful for open() which does not return an * error code directly. * * @param self a self-referential pointer to the mskwaj_decompressor * instance being called * @return the most recent error code * @see open(), search() */ int (*last_error)(struct mskwaj_decompressor *self); }; /* --- support for .LZX (Offline Address Book) file format ----------------- */ /** * A compressor for the Offline Address Book (OAB) format. * * All fields are READ ONLY. * * @see mspack_create_oab_compressor(), mspack_destroy_oab_compressor() */ struct msoab_compressor { /** * Compress a full OAB file. * * The input file will be read and the compressed contents written to the * output file. * * @param self a self-referential pointer to the msoab_decompressor * instance being called * @param input the filename of the input file. This is passed * directly to mspack_system::open(). * @param output the filename of the output file. This is passed * directly to mspack_system::open(). * @return an error code, or MSPACK_ERR_OK if successful */ int (*compress) (struct msoab_compressor *self, const char *input, const char *output); /** * Generate a compressed incremental OAB patch file. * * The two uncompressed files "input" and "base" will be read, and an * incremental patch to generate "input" from "base" will be written to * the output file. * * @param self a self-referential pointer to the msoab_compressor * instance being called * @param input the filename of the input file containing the new * version of its contents. This is passed directly * to mspack_system::open(). * @param base the filename of the original base file containing * the old version of its contents, against which the * incremental patch shall generated. This is passed * directly to mspack_system::open(). * @param output the filename of the output file. This is passed * directly to mspack_system::open(). * @return an error code, or MSPACK_ERR_OK if successful */ int (*compress_incremental) (struct msoab_compressor *self, const char *input, const char *base, const char *output); }; /** * A decompressor for .LZX (Offline Address Book) files * * All fields are READ ONLY. * * @see mspack_create_oab_decompressor(), mspack_destroy_oab_decompressor() */ struct msoab_decompressor { /** * Decompresses a full Offline Address Book file. * * If the input file is a valid compressed Offline Address Book file, * it will be read and the decompressed contents will be written to * the output file. * * @param self a self-referential pointer to the msoab_decompressor * instance being called * @param input the filename of the input file. This is passed * directly to mspack_system::open(). * @param output the filename of the output file. This is passed * directly to mspack_system::open(). * @return an error code, or MSPACK_ERR_OK if successful */ int (*decompress) (struct msoab_decompressor *self, const char *input, const char *output); /** * Decompresses an Offline Address Book with an incremental patch file. * * This requires both a full UNCOMPRESSED Offline Address Book file to * act as the "base", and a compressed incremental patch file as input. * If the input file is valid, it will be decompressed with reference to * the base file, and the decompressed contents will be written to the * output file. * * There is no way to tell what the right base file is for the given * incremental patch, but if you get it wrong, this will usually result * in incorrect data being decompressed, which will then fail a checksum * test. * * @param self a self-referential pointer to the msoab_decompressor * instance being called * @param input the filename of the input file. This is passed * directly to mspack_system::open(). * @param base the filename of the base file to which the * incremental patch shall be applied. This is passed * directly to mspack_system::open(). * @param output the filename of the output file. This is passed * directly to mspack_system::open(). * @return an error code, or MSPACK_ERR_OK if successful */ int (*decompress_incremental) (struct msoab_decompressor *self, const char *input, const char *base, const char *output); /** * Sets an OAB decompression engine parameter. Available only in OAB * decompressor version 2 and above. * * - #MSOABD_PARAM_DECOMPBUF: How many bytes should be used as an input * buffer by decompressors? The minimum value is 16. The default value * is 4096. * * @param self a self-referential pointer to the msoab_decompressor * instance being called * @param param the parameter to set * @param value the value to set the parameter to * @return MSPACK_ERR_OK if all is OK, or MSPACK_ERR_ARGS if there * is a problem with either parameter or value. */ int (*set_param)(struct msoab_decompressor *self, int param, int value); }; /** msoab_decompressor::set_param() parameter: size of decompression buffer */ #define MSOABD_PARAM_DECOMPBUF (0) #ifdef __cplusplus } #endif #endif cabextract-1.11/config.rpath0000744000175000017500000004421613247753370013025 00000000000000#! /bin/sh # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # # Copyright 1996-2015 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # # 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. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld # should be set by the caller. # # The set of defined variables is at the end of this script. # Known limitations: # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer # than 256 bytes, otherwise the compiler driver will dump core. The only # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a shrext=.so host="$1" host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Code taken from libtool.m4's _LT_CC_BASENAME. for cc_temp in $CC""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` # Code taken from libtool.m4's _LT_COMPILER_PIC. wl= if test "$GCC" = yes; then wl='-Wl,' else case "$host_os" in aix*) wl='-Wl,' ;; mingw* | cygwin* | pw32* | os2* | cegcc*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6* | nonstopux*) wl='-Wl,' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in ecc*) wl='-Wl,' ;; icc* | ifort*) wl='-Wl,' ;; lf95*) wl='-Wl,' ;; nagfor*) wl='-Wl,-Wl,,' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) wl='-Wl,' ;; ccc*) wl='-Wl,' ;; xl* | bgxl* | bgf* | mpixl*) wl='-Wl,' ;; como) wl='-lopt=' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) wl= ;; *Sun\ C*) wl='-Wl,' ;; esac ;; esac ;; newsos6) ;; *nto* | *qnx*) ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; rdos*) ;; solaris*) case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) wl='-Qoption ld ' ;; *) wl='-Wl,' ;; esac ;; sunos4*) wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3*) wl='-Wl,' ;; sysv4*MP*) ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) wl='-Wl,' ;; unicos*) wl='-Wl,' ;; uts4*) ;; esac fi # Code taken from libtool.m4's _LT_LINKER_SHLIBS. hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no case "$host_os" in 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++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. # Unlike libtool, we use -rpath here, not --rpath, since the documented # option of GNU ld is called -rpath, not --rpath. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' case "$host_os" in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no fi ;; amigaos*) case "$host_cpu" in powerpc) ;; m68k) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then : else ld_shlibs=no fi ;; haiku*) ;; interix[3-9]*) hardcode_direct=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; netbsd*) ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' else ld_shlibs=no fi ;; esac ;; sunos4*) hardcode_direct=yes ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then hardcode_libdir_flag_spec= fi else case "$host_os" in aix3*) # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac fi hardcode_direct=yes hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac fi # Begin _LT_AC_SYS_LIBPATH_AIX. echo 'int main () { return 0; }' > conftest.c ${CC} ${LDFLAGS} conftest.c -o conftest aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` fi if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib" fi rm -f conftest.c conftest # End _LT_AC_SYS_LIBPATH_AIX. if test "$aix_use_runtimelinking" = yes; then hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' else hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" fi fi ;; amigaos*) case "$host_cpu" in powerpc) ;; m68k) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' libext=lib ;; darwin* | rhapsody*) hardcode_direct=no if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then : else ld_shlibs=no fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; freebsd2.[01]*) hardcode_direct=yes hardcode_minus_L=yes ;; freebsd* | dragonfly*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; hpux9*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; hpux10*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no ;; *) hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; newsos6) hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then hardcode_libdir_flag_spec='${wl}-rpath,$libdir' else case "$host_os" in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) hardcode_libdir_flag_spec='-R$libdir' ;; *) hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; osf3*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) if test "$GCC" = yes; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else # Both cc and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; sunos4*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; sysv4) case $host_vendor in sni) hardcode_direct=yes # is this really true??? ;; siemens) hardcode_direct=no ;; motorola) hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac ;; sysv4.3*) ;; sysv4*MP*) if test -d /usr/nec; then ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) ;; sysv5* | sco3.2v5* | sco5v6*) hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' ;; *) ld_shlibs=no ;; esac fi # Check dynamic linker characteristics # Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER. # Unlike libtool.m4, here we don't care about _all_ names of the library, but # only about the one the linker finds when passed -lNAME. This is the last # element of library_names_spec in libtool.m4, or possibly two of them if the # linker has special search rules. library_names_spec= # the last element of library_names_spec in libtool.m4 libname_spec='lib$name' case "$host_os" in aix3*) library_names_spec='$libname.a' ;; aix[4-9]*) library_names_spec='$libname$shrext' ;; amigaos*) case "$host_cpu" in powerpc*) library_names_spec='$libname$shrext' ;; m68k) library_names_spec='$libname.a' ;; esac ;; beos*) library_names_spec='$libname$shrext' ;; bsdi[45]*) library_names_spec='$libname$shrext' ;; cygwin* | mingw* | pw32* | cegcc*) shrext=.dll library_names_spec='$libname.dll.a $libname.lib' ;; darwin* | rhapsody*) shrext=.dylib library_names_spec='$libname$shrext' ;; dgux*) library_names_spec='$libname$shrext' ;; freebsd[23].*) library_names_spec='$libname$shrext$versuffix' ;; freebsd* | dragonfly*) library_names_spec='$libname$shrext' ;; gnu*) library_names_spec='$libname$shrext' ;; haiku*) library_names_spec='$libname$shrext' ;; hpux9* | hpux10* | hpux11*) case $host_cpu in ia64*) shrext=.so ;; hppa*64*) shrext=.sl ;; *) shrext=.sl ;; esac library_names_spec='$libname$shrext' ;; interix[3-9]*) library_names_spec='$libname$shrext' ;; irix5* | irix6* | nonstopux*) library_names_spec='$libname$shrext' case "$host_os" in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; *) libsuff= shlibsuff= ;; esac ;; esac ;; linux*oldld* | linux*aout* | linux*coff*) ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) library_names_spec='$libname$shrext' ;; knetbsd*-gnu) library_names_spec='$libname$shrext' ;; netbsd*) library_names_spec='$libname$shrext' ;; newsos6) library_names_spec='$libname$shrext' ;; *nto* | *qnx*) library_names_spec='$libname$shrext' ;; openbsd*) library_names_spec='$libname$shrext$versuffix' ;; os2*) libname_spec='$name' shrext=.dll library_names_spec='$libname.a' ;; osf3* | osf4* | osf5*) library_names_spec='$libname$shrext' ;; rdos*) ;; solaris*) library_names_spec='$libname$shrext' ;; sunos4*) library_names_spec='$libname$shrext$versuffix' ;; sysv4 | sysv4.3*) library_names_spec='$libname$shrext' ;; sysv4*MP*) library_names_spec='$libname$shrext' ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) library_names_spec='$libname$shrext' ;; tpf*) library_names_spec='$libname$shrext' ;; uts4*) library_names_spec='$libname$shrext' ;; esac sed_quote_subst='s/\(["`$\\]\)/\\\1/g' escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` shlibext=`echo "$shrext" | sed -e 's,^\.,,'` escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' < * * 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 2 of the License, or * (at your option) any later version. * * 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, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include /* include some headers from the cut-down copy of libmspack * - mspack.h for MSCAB_ATTRIB_?? defines * - macros.h for LD and EndGetI?? macros * - cab.h for cab structure offsets * cabinfo does not use the system-wide nor does it * link with any libmspack functions. It's a standalone program. */ #include "mspack/mspack.h" #include "mspack/macros.h" #include "mspack/cab.h" #if HAVE_FSEEKO # define FSEEK fseeko # define FTELL ftello # define FILELEN off_t #else # define FSEEK fseek # define FTELL ftell # define FILELEN long #endif void search(); void getinfo(FILELEN base_offset); char *read_name(); FILE *fh; char *filename; FILELEN filelen; int main(int argc, char *argv[]) { int i; printf("Cabinet information dumper by Stuart Caie \n"); if (argc <= 1) { printf("Usage: %s \n", argv[0]); return 1; } for (i = 1; i < argc; i++) { if ((fh = fopen((filename = argv[i]), "rb"))) { search(); fclose(fh); } else { perror(filename); } } return 0; } #define MIN(a,b) ((a)<(b)?(a):(b)) #define GETOFFSET (FTELL(fh)) #define READ(buf,len) if (myread((void *)(buf),(len))) return #define SKIP(offset) if (FSEEK(fh,(offset),SEEK_CUR)) return #define SEEK(offset) if (FSEEK(fh,(offset),SEEK_SET)) return int myread(void *buf, size_t length) { length = MIN(length, (int)(filelen - GETOFFSET)); return fread(buf, 1, length, fh) != length; } #define SEARCH_SIZE (32*1024) unsigned char search_buf[SEARCH_SIZE]; void search() { unsigned char *pstart = &search_buf[0], *pend, *p; FILELEN offset, caboff, length; unsigned long cablen32 = 0, foffset32 = 0; int state = 0; if (FSEEK(fh, 0, SEEK_END) != 0) { perror(filename); return; } filelen = FTELL(fh); if (FSEEK(fh, 0, SEEK_SET) != 0) { perror(filename); return; } printf("Examining file \"%s\" (%"LD" bytes)...\n", filename, filelen); for (offset = 0; offset < filelen; offset += length) { /* search length is either the full length of the search buffer, * or the amount of data remaining to the end of the file, * whichever is less. */ length = filelen - offset; if (length > SEARCH_SIZE) length = SEARCH_SIZE; /* fill the search buffer with data from disk */ SEEK(offset); READ(&search_buf[0], length); /* read through the entire buffer. */ p = pstart; pend = &search_buf[length]; while (p < pend) { switch (state) { /* starting state */ case 0: /* we spend most of our time in this while loop, looking for * a leading 'M' of the 'MSCF' signature */ while (*p++ != 0x4D && p < pend); if (p < pend) state = 1; /* if we found the 'M', advance state */ break; /* verify that the next 3 bytes are 'S', 'C' and 'F' */ case 1: state = (*p++ == 0x53) ? 2 : 0; break; case 2: state = (*p++ == 0x43) ? 3 : 0; break; case 3: state = (*p++ == 0x46) ? 4 : 0; break; /* we don't care about bytes 4-7 */ /* bytes 8-11 are the overall length of the cabinet */ case 8: cablen32 = *p++; state++; break; case 9: cablen32 |= *p++ << 8; state++; break; case 10: cablen32 |= *p++ << 16; state++; break; case 11: cablen32 |= *p++ << 24; state++; break; /* we don't care about bytes 12-15 */ /* bytes 16-19 are the offset within the cabinet of the filedata */ case 16: foffset32 = *p++; state++; break; case 17: foffset32 |= *p++ << 8; state++; break; case 18: foffset32 |= *p++ << 16; state++; break; case 19: foffset32 |= *p++ << 24; /* now we have recieved 20 bytes of potential cab header. */ /* work out the offset in the file of this potential cabinet */ caboff = offset + (p-pstart) - 20; /* check that the files offset is less than the alleged length * of the cabinet */ if (foffset32 < cablen32) { /* found a potential result - try loading it */ getinfo(caboff); offset = caboff + (FILELEN) cablen32; length = 0; p = pend; } state = 0; break; default: p++, state++; break; } /* switch state */ } /* while p < pend */ } /* while offset < filelen */ } #define GETLONG(n) EndGetI32(&buf[n]) #define GETWORD(n) EndGetI16(&buf[n]) #define GETBYTE(n) ((int)buf[n]) void getinfo(FILELEN base_offset) { unsigned char buf[64]; int header_res = 0, folder_res = 0, data_res = 0; int num_folders, num_files, flags, i, j; FILELEN files_offset, min_data_offset = filelen; SEEK(base_offset); READ(&buf, cfhead_SIZEOF); files_offset = base_offset + GETLONG(cfhead_FileOffset); num_folders = GETWORD(cfhead_NumFolders), num_files = GETWORD(cfhead_NumFiles), flags = GETWORD(cfhead_Flags); printf("CABINET HEADER @%"LD":\n", base_offset); printf("- signature = '%4.4s'\n", buf); printf("- overall length = %u bytes\n", GETLONG(cfhead_CabinetSize)); printf("- files offset = %"LD"\n", files_offset); printf("- format version = %d.%d\n", GETBYTE(cfhead_MajorVersion), GETBYTE(cfhead_MinorVersion)); printf("- folder count = %u\n", num_folders); printf("- file count = %u\n", num_files); printf("- header flags = 0x%04x%s%s%s\n", flags, ((flags & cfheadPREV_CABINET) ? " PREV_CABINET" : ""), ((flags & cfheadNEXT_CABINET) ? " NEXT_CABINET" : ""), ((flags & cfheadRESERVE_PRESENT) ? " RESERVE_PRESENT" : "")); printf("- set ID = %u\n", GETWORD(cfhead_SetID)); printf("- set index = %u\n", GETWORD(cfhead_CabinetIndex)); if (flags & cfheadRESERVE_PRESENT) { READ(&buf, cfheadext_SIZEOF); header_res = GETWORD(cfheadext_HeaderReserved); folder_res = GETBYTE(cfheadext_FolderReserved); data_res = GETBYTE(cfheadext_DataReserved); printf("- header reserve = %u bytes (@%"LD")\n", header_res, GETOFFSET); printf("- folder reserve = %u bytes\n", folder_res); printf("- data reserve = %u bytes\n", data_res); SKIP(header_res); } if (flags & cfheadPREV_CABINET) { printf("- prev cabinet = %s\n", read_name()); printf("- prev disk = %s\n", read_name()); } if (flags & cfheadNEXT_CABINET) { printf("- next cabinet = %s\n", read_name()); printf("- next disk = %s\n", read_name()); } printf("FOLDERS SECTION @%"LD":\n", GETOFFSET); for (i = 0; i < num_folders; i++) { FILELEN folder_offset, data_offset; int comp_type, num_blocks, offset_ok; char *type_name; folder_offset = GETOFFSET; READ(&buf, cffold_SIZEOF); data_offset = base_offset + GETLONG(cffold_DataOffset); num_blocks = GETWORD(cffold_NumBlocks), comp_type = GETWORD(cffold_CompType); min_data_offset = MIN(data_offset, min_data_offset); offset_ok = data_offset < filelen; switch (comp_type & cffoldCOMPTYPE_MASK) { case cffoldCOMPTYPE_NONE: type_name = "stored"; break; case cffoldCOMPTYPE_MSZIP: type_name = "MSZIP"; break; case cffoldCOMPTYPE_QUANTUM: type_name = "Quantum"; break; case cffoldCOMPTYPE_LZX: type_name = "LZX"; break; default: type_name = "unknown"; break; } printf("- folder 0x%04x @%"LD" %u data blocks @%"LD"%s %s compression (0x%04x)\n", i, folder_offset, num_blocks, data_offset, offset_ok ? "" : " [INVALID OFFSET]", type_name, comp_type); SEEK(data_offset); for (j = 0; j < num_blocks; j++) { int clen, ulen; if (GETOFFSET > filelen) { printf(" - datablock %d @%"LD" [INVALID OFFSET]\n", j, GETOFFSET); break; } READ(&buf, cfdata_SIZEOF); clen = GETWORD(cfdata_CompressedSize); ulen = GETWORD(cfdata_UncompressedSize); printf(" - datablock %d @%"LD" csum=%08x c=%5u u=%5u%s\n", j, data_offset, GETLONG(cfdata_CheckSum), clen, ulen, ((clen > (32768+6144)) || (ulen > 32768)) ? " INVALID" : ""); data_offset += cfdata_SIZEOF + data_res + clen; SKIP(data_res + clen); } SEEK(folder_offset + cffold_SIZEOF + folder_res); } printf("FILES SECTION @%"LD":\n", GETOFFSET); if (files_offset != GETOFFSET) { printf("INVALID: file offset in header %"LD " doesn't match start of files %"LD"\n", files_offset, GETOFFSET); } for (i = 0; i < num_files; i++) { FILELEN file_offset = GETOFFSET; char *folder_type; int attribs, folder; if (file_offset > filelen) return; READ(&buf, cffile_SIZEOF); folder = GETWORD(cffile_FolderIndex); attribs = GETWORD(cffile_Attribs); switch (folder) { case cffileCONTINUED_PREV_AND_NEXT: folder_type = "continued from prev and to next cabinet"; break; case cffileCONTINUED_FROM_PREV: folder_type = "continued from prev cabinet"; break; case cffileCONTINUED_TO_NEXT: folder_type = "continued to next cabinet"; break; default: folder_type = folder >= num_folders ? "INVALID FOLDER INDEX" : "normal folder"; break; } printf("- file %-5d @%-12"LD"%s\n", i, file_offset, (file_offset > min_data_offset ? " [INVALID FILE OFFSET]" : "")); printf(" - name = %s%s\n", read_name(), (attribs & MSCAB_ATTRIB_UTF_NAME) ? " (UTF-8)" : ""); printf(" - folder = 0x%04x [%s]\n", folder, folder_type); printf(" - length = %u bytes\n", GETLONG(cffile_UncompressedSize)); printf(" - offset = %u bytes\n", GETLONG(cffile_FolderOffset)); printf(" - date = %02d/%02d/%4d %02d:%02d:%02d\n", (GETWORD(cffile_Date)) & 0x1f, (GETWORD(cffile_Date) >> 5) & 0xf, (GETWORD(cffile_Date) >> 9) + 1980, (GETWORD(cffile_Time) >> 11), (GETWORD(cffile_Time) >> 5) & 0x3f, (GETWORD(cffile_Time) << 1) & 0x3e); printf(" - attrs = 0x%02x %s%s%s%s%s%s\n", attribs, (attribs & MSCAB_ATTRIB_RDONLY) ? "RDONLY " : "", (attribs & MSCAB_ATTRIB_HIDDEN) ? "HIDDEN " : "", (attribs & MSCAB_ATTRIB_SYSTEM) ? "SYSTEM " : "", (attribs & MSCAB_ATTRIB_ARCH) ? "ARCH " : "", (attribs & MSCAB_ATTRIB_EXEC) ? "EXEC " : "", (attribs & MSCAB_ATTRIB_UTF_NAME) ? "UTF-8" : ""); } } #define CAB_NAMEMAX (1024) char namebuf[CAB_NAMEMAX]; char *read_name() { FILELEN name_start = GETOFFSET; int i; if (myread(&namebuf, CAB_NAMEMAX)) return "READ FAILED"; for (i = 0; i <= 256; i++) { if (!namebuf[i]) { FSEEK(fh, name_start + i + 1, SEEK_SET); return namebuf; } } printf("INVALID: name length > 256 for at offset %"LD"\n", name_start); namebuf[256] = 0; FSEEK(fh, name_start + 257, SEEK_SET); return namebuf; } cabextract-1.11/src/cabextract.c0000664000175000017500000012740514376123032013564 00000000000000/* cabextract - a program to extract Microsoft Cabinet files * (C) 2000-2023 Stuart Caie * * 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 2 of the License, or * (at your option) any later version. * * 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, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* cabextract uses libmspack to access cabinet files. libmspack is * available from https://www.cabextract.org.uk/libmspack/ */ #define _GNU_SOURCE 1 #if HAVE_CONFIG_H # include #endif #include #include #include #include #include #include #include #include #include #include #include #ifdef HAVE_STRINGS_H # include /* BSD defines strcasecmp() here */ #endif #include #include #include #if HAVE_ICONV # include #endif #if HAVE_TOWLOWER # include #endif #if HAVE_UTIME # include #endif #if HAVE_UTIMES # include #endif /* ensure mkdir(pathname, mode) exists */ #if HAVE_MKDIR # if MKDIR_TAKES_ONE_ARG # define mkdir(a, b) mkdir(a) # endif #else # if HAVE__MKDIR # define mkdir(a, b) _mkdir(a) # else # error "Don't know how to create a directory on this system." # endif #endif #ifndef FNM_CASEFOLD # define FNM_CASEFOLD (0) #endif #include "getopt.h" #include #include /* structures and global variables */ struct option optlist[] = { { "directory", 1, NULL, 'd' }, #if HAVE_ICONV { "encoding", 1, NULL, 'e' }, #endif { "fix", 0, NULL, 'f' }, { "filter", 1, NULL, 'F' }, { "help", 0, NULL, 'h' }, { "list", 0, NULL, 'l' }, { "lowercase", 0, NULL, 'L' }, { "pipe", 0, NULL, 'p' }, { "quiet", 0, NULL, 'q' }, { "single", 0, NULL, 's' }, { "test", 0, NULL, 't' }, { "version", 0, NULL, 'v' }, { "interactive", 0, NULL, 'i' }, { "no-overwrite", 0, NULL, 'n' }, { "keep-symlinks",0, NULL, 'k' }, { NULL, 0, NULL, 0 } }; #if HAVE_ICONV const char *OPTSTRING = "d:e:fF:hlLpqstvink"; #else const char *OPTSTRING = "d:fF:hlLpqstvink"; #endif struct file_mem { struct file_mem *next; dev_t st_dev; ino_t st_ino; char *from; }; struct filter { struct filter *next; char *filter; }; struct cabextract_args { int help, lower, pipe, view, quiet, single, fix, test, interactive, no_overwrite, keep_symlinks; char *dir, *encoding; struct filter *filters; }; /* global variables */ struct mscab_decompressor *cabd = NULL; struct file_mem *cab_args = NULL; struct file_mem *cab_exts = NULL; struct file_mem *cab_seen = NULL; mode_t user_umask = 0; /* answer from user to "overwrite file?" prompt */ char answer[8] = ""; struct cabextract_args args = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL }; #if HAVE_ICONV iconv_t converter = NULL; /* names for the UTF-8 charset recognised by different iconv_open()s */ char *utf8_names[] = { "UTF-8", /* glibc, libiconv, FreeBSD, Solaris, not newlib or HPUX */ "UTF8", /* glibc, libiconv (< 1.13), newlib, HPUX */ "UTF_8", /* newlib, Solaris */ }; #endif /** A special filename. Extracting to this filename will send the output * to standard output instead of a file on disk. The magic happens in * cabx_open() when the STDOUT_FNAME pointer is given as a filename, so * treat this like a constant rather than a string. */ const char *STDOUT_FNAME = "stdout"; /** A special filename. Extracting to this filename will send the output * through an MD5 checksum calculator, instead of a file on disk. The * magic happens in cabx_open() when the TEST_FNAME pointer is given as a * filename, so treat this like a constant rather than a string. */ const char *TEST_FNAME = "test"; /** A global MD5 context, used when a file is written to TEST_FNAME */ struct md5_ctx md5_context; /** The resultant MD5 checksum, used when a file is written to TEST_FNAME */ unsigned char md5_result[16]; /* prototypes */ static int process_cabinet(char *cabname); static void load_spanning_cabinets(struct mscabd_cabinet *basecab, char *basename); static char *find_cabinet_file(char *origcab, char *cabname); static int unix_path_seperators(struct mscabd_file *files); static char *create_output_name(const char *fname, const char *dir, int lower, int isunix, int unicode); static int can_write(char *fname); static void set_date_and_perm(struct mscabd_file *file, char *filename); #if HAVE_ICONV static void convert_filenames(struct mscabd_file *files); #endif #if LATIN1_FILENAMES static void convert_utf8_to_latin1(char *str); #endif static void memorise_file(struct file_mem **fml, char *name, char *from); static int recall_file(struct file_mem *fml, char *name, char **from); static void forget_files(struct file_mem **fml); static void add_filter(char *arg); static void free_filters(); static int ensure_filepath(char *path, int n); static char *cab_error(struct mscab_decompressor *cd); static void print_cli_args_error(const char *reason, const char *exec_name); static struct mspack_file *cabx_open(struct mspack_system *this, const char *filename, int mode); static void cabx_close(struct mspack_file *file); static int cabx_read(struct mspack_file *file, void *buffer, int bytes); static int cabx_write(struct mspack_file *file, void *buffer, int bytes); static int cabx_seek(struct mspack_file *file, off_t offset, int mode); static off_t cabx_tell(struct mspack_file *file); static void cabx_msg(struct mspack_file *file, const char *format, ...); static void *cabx_alloc(struct mspack_system *this, size_t bytes); static void cabx_free(void *buffer); static void cabx_copy(void *src, void *dest, size_t bytes); /** * A cabextract-specific implementation of mspack_system that allows * the NULL filename to be opened for writing as a synonym for writing * to stdout. */ static struct mspack_system cabextract_system = { &cabx_open, &cabx_close, &cabx_read, &cabx_write, &cabx_seek, &cabx_tell, &cabx_msg, &cabx_alloc, &cabx_free, &cabx_copy, NULL }; int main(int argc, char *argv[]) { int i, err; /* attempt to set a UTF8-based locale, so that tolower()/towlower() * in create_output_name() lowercase more than just A-Z in ASCII. * * We don't attempt to pick up the system default locale, "", * because it might not be compatible with ASCII/ISO-8859-1/Unicode * character codes and would mess up lowercased filenames */ char *locales[] = { "C.UTF-8", /* https://sourceware.org/glibc/wiki/Proposals/C.UTF-8 */ "en_US.UTF-8", "en_GB.UTF8", "de_DE.UTF-8", "UTF-8", "UTF8" }; for (i = 0; i < (sizeof(locales)/sizeof(*locales)); i++) { if (setlocale(LC_CTYPE, locales[i])) break; } /* parse options */ while ((i = getopt_long(argc, argv, OPTSTRING, optlist, NULL)) != -1) { switch (i) { case 'd': args.dir = optarg; break; case 'e': args.encoding = optarg; break; case 'f': args.fix = 1; break; case 'F': add_filter(optarg); break; case 'h': args.help = 1; break; case 'l': args.view = 1; break; case 'L': args.lower = 1; break; case 'p': args.pipe = 1; break; case 'q': args.quiet = 1; break; case 's': args.single = 1; break; case 't': args.test = 1; break; case 'v': args.view = 1; break; case 'i': args.interactive = 1; break; case 'n': args.no_overwrite = 1; break; case 'k': args.keep_symlinks = 1; break; } } if (args.help) { fprintf(stderr, "Usage: %s [options] [-d dir] \n\n" "This will extract all files from a cabinet or executable cabinet.\n" "For multi-part cabinets, only specify the first file in the set.\n\n", argv[0]); fprintf(stderr, "Options:\n" " -v --version print version / list cabinet\n" " -h --help show this help page\n" " -l --list list contents of cabinet\n" " -t --test test cabinet integrity\n" " -q --quiet only print errors and warnings\n" " -L --lowercase make filenames lowercase\n" " -f --fix salvage as much as possible from corrupted cabinets\n" " -i --interactive prompt whether to overwrite existing files\n" " -n --no-overwrite don't overwrite (skip) existing files\n" " -k --keep-symlinks follow symlinked files/dirs when extracting\n"); fprintf(stderr, " -p --pipe pipe extracted files to stdout\n" " -s --single restrict search to cabs on the command line\n" " -F --filter extract only files that match the given pattern\n" #if HAVE_ICONV " -e --encoding assume non-UTF8 filenames have the given encoding\n" #endif " -d --directory extract all files to the given directory\n\n" "cabextract %s (C) 2000-2023 Stuart Caie \n" "This is free software with ABSOLUTELY NO WARRANTY.\n", VERSION); return EXIT_FAILURE; } if (args.test && args.view) { print_cli_args_error("You cannot use --test and --list at the same time.", argv[0]); return EXIT_FAILURE; } if (args.interactive) { if (args.no_overwrite) { print_cli_args_error("Option --interactive can't be used with" " --no-overwrite.", argv[0]); return EXIT_FAILURE; } if (args.pipe) { print_cli_args_error("Option --interactive cannot be used with --pipe.", argv[0]); return EXIT_FAILURE; } } if (optind == argc) { /* no arguments other than the options */ if (args.view) { printf("cabextract version %s\n", VERSION); return 0; } else { print_cli_args_error("No cabinet files specified.", argv[0]); return EXIT_FAILURE; } } /* memorise command-line cabs if necessary */ if (args.single) { for (i = optind; i < argc; i++) memorise_file(&cab_args, argv[i], NULL); } /* extracting to stdout implies shutting up on stdout */ if (args.pipe && !args.view) args.quiet = 1; /* open libmspack */ MSPACK_SYS_SELFTEST(err); if (err) { if (err == MSPACK_ERR_SEEK) { fprintf(stderr, "FATAL ERROR: libmspack is compiled for %d-bit file IO,\n" " cabextract is compiled for %d-bit file IO.\n", (sizeof(off_t) == 4) ? 64 : 32, (sizeof(off_t) == 4) ? 32 : 64); } else { fprintf(stderr, "FATAL ERROR: libmspack self-test returned %d\n", err); } return EXIT_FAILURE; } if (!(cabd = mspack_create_cab_decompressor(&cabextract_system))) { fprintf(stderr, "can't create libmspack CAB decompressor\n"); return EXIT_FAILURE; } /* obtain user's umask */ #if HAVE_UMASK umask(user_umask = umask(0)); #endif /* turn on/off 'fix MSZIP' and 'salvage' mode */ cabd->set_param(cabd, MSCABD_PARAM_FIXMSZIP, args.fix); cabd->set_param(cabd, MSCABD_PARAM_SALVAGE, args.fix); #if HAVE_ICONV /* set up converter from given encoding to UTF-8 */ if (args.encoding) { for (i = 0; i < (sizeof(utf8_names)/sizeof(*utf8_names)); i++) { converter = iconv_open(utf8_names[i], args.encoding); if (converter != (iconv_t) -1) break; } if (converter == (iconv_t) -1) { fprintf(stderr, "FATAL ERROR: encoding '%s' is not recognised\n", args.encoding); return EXIT_FAILURE; } } #endif /* process cabinets */ for (i = optind, err = 0; i < argc; i++) { err += process_cabinet(argv[i]); } /* error summary */ if (!args.quiet) { if (err) printf("\nAll done, errors in processing %d file(s)\n", err); else printf("\nAll done, no errors.\n"); } #if HAVE_ICONV if (converter) { iconv_close(converter); } #endif /* close libmspack */ mspack_destroy_cab_decompressor(cabd); /* empty file-memory lists */ forget_files(&cab_args); forget_files(&cab_exts); forget_files(&cab_seen); return err ? EXIT_FAILURE : EXIT_SUCCESS; } /** * Processes each file argument on the command line, as specified by the * command line options. This does the main bulk of work in cabextract. * * @param basename the file to process * @return the number of files with errors, usually 0 for success or 1 for * failure */ static int process_cabinet(char *basename) { struct mscabd_cabinet *basecab, *cab, *cab2; struct mscabd_file *file; int isunix, fname_offset, viewhdr = 0; char *from, *name; int errors = 0; /* do not process repeat cabinets */ if (recall_file(cab_seen, basename, &from) || recall_file(cab_exts, basename, &from)) { if (!args.quiet) { if (!from) printf("%s: skipping known cabinet\n", basename); else printf("%s: skipping known cabinet (from %s)\n", basename, from); } return 0; /* return success */ } memorise_file(&cab_seen, basename, NULL); /* search the file for cabinets */ if (!(basecab = cabd->search(cabd, basename))) { if (cabd->last_error(cabd)) { fprintf(stderr, "%s: %s\n", basename, cab_error(cabd)); } else { fprintf(stderr, "%s: no valid cabinets found\n", basename); } return 1; } /* iterate over all cabinets found in that file */ for (cab = basecab; cab; cab = cab->next) { /* load all spanning cabinets */ load_spanning_cabinets(cab, basename); #if HAVE_ICONV /* convert all non-UTF8 filenames to UTF8 using given encoding */ if (converter) convert_filenames(cab->files); #endif /* determine whether UNIX or MS-DOS path seperators are used */ isunix = unix_path_seperators(cab->files); /* print headers */ if (!viewhdr) { if (args.view) { if (!args.quiet) printf("Viewing cabinet: %s\n", basename); printf(" File size | Date Time | Name\n"); printf("-----------+---------------------+-------------\n"); } else { if (!args.quiet) { printf("%s cabinet: %s\n", args.test ? "Testing" : "Extracting", basename); } } viewhdr = 1; } /* the full UNIX output filename includes the output * directory. However, for filtering purposes, we don't want to * include that. So, we work out where the filename part of the * output name begins. This is the same for every extracted file. */ fname_offset = args.dir ? (strlen(args.dir) + 1) : 0; /* process all files */ for (file = cab->files; file; file = file->next) { /* create the full UNIX output filename */ if (!(name = create_output_name(file->filename, args.dir, args.lower, isunix, file->attribs & MSCAB_ATTRIB_UTF_NAME))) { errors++; continue; } /* if filtering, do so now. skip if file doesn't match any filter */ if (args.filters) { int matched = 0; struct filter *f; for (f = args.filters; f; f = f->next) { if (!fnmatch(f->filter, &name[fname_offset], FNM_CASEFOLD)) { matched = 1; break; } } if (!matched) { free(name); continue; } } /* view, extract or test the file */ if (args.view) { printf("%10u | %02d.%02d.%04d %02d:%02d:%02d | %s\n", file->length, file->date_d, file->date_m, file->date_y, file->time_h, file->time_m, file->time_s, name); } else if (args.test) { if (cabd->extract(cabd, file, TEST_FNAME)) { /* file failed to extract */ printf(" %s failed (%s)\n", name, cab_error(cabd)); errors++; } else { /* file extracted OK, print the MD5 checksum in md5_result. Print * the checksum right-aligned to 79 columns if that's possible, * otherwise just print it 2 spaces after the filename and "OK" */ /* " filename OK " is 8 chars + the length of filename, * the MD5 checksum itself is 32 chars. */ int spaces = 79 - (strlen(name) + 8 + 32); printf(" %s OK ", name); while (spaces-- > 0) putchar(' '); printf("%02x%02x%02x%02x%02x%02x%02x%02x" "%02x%02x%02x%02x%02x%02x%02x%02x\n", md5_result[0], md5_result[1], md5_result[2], md5_result[3], md5_result[4], md5_result[5], md5_result[6], md5_result[7], md5_result[8], md5_result[9], md5_result[10],md5_result[11], md5_result[12],md5_result[13],md5_result[14],md5_result[15]); } } else { /* extract the file */ if (args.pipe) { /* extracting to stdout */ if (cabd->extract(cabd, file, STDOUT_FNAME)) { fprintf(stderr, "%s(%s): %s\n", STDOUT_FNAME, name, cab_error(cabd)); errors++; } } else if (can_write(name)) { /* extracting to a regular file */ if (!args.quiet) printf(" extracting %s\n", name); if (!ensure_filepath(name, fname_offset)) { fprintf(stderr, "%s: can't create file path\n", name); errors++; } else { if (cabd->extract(cabd, file, name)) { fprintf(stderr, "%s: %s\n", name, cab_error(cabd)); errors++; } else { set_date_and_perm(file, name); } } } else { /* can_write() said no */ if (!args.quiet) printf(" skipping %s\n", name); } } free(name); } /* for (all files in cab) */ /* free the spanning cabinet filenames [not freed by cabd->close()] */ for (cab2 = cab->prevcab; cab2; cab2 = cab2->prevcab) free((void*)cab2->filename); for (cab2 = cab->nextcab; cab2; cab2 = cab2->nextcab) free((void*)cab2->filename); } /* for (all cabs) */ /* free all loaded cabinets */ cabd->close(cabd, basecab); return errors; } /** * Follows the spanning cabinet chain specified in a cabinet, loading * and attaching the spanning cabinets as it goes. * * @param basecab the base cabinet to start the chain from. * @param basename the full pathname of the base cabinet, so spanning * cabinets can be found in the same path as the base cabinet. * @see find_cabinet_file() */ static void load_spanning_cabinets(struct mscabd_cabinet *basecab, char *basename) { struct mscabd_cabinet *cab, *cab2; char *name; /* load any spanning cabinets -- backwards */ for (cab = basecab; cab->flags & MSCAB_HDR_PREVCAB; cab = cab->prevcab) { if (!(name = find_cabinet_file(basename, cab->prevname))) { fprintf(stderr, "%s: can't find %s\n", basename, cab->prevname); break; } if (args.single && !recall_file(cab_args, name, NULL)) break; if (!args.quiet) { printf("%s: extends backwards to %s (%s)\n", basename, cab->prevname, cab->previnfo); } if (!(cab2 = cabd->open(cabd,name)) || cabd->prepend(cabd, cab, cab2)) { fprintf(stderr, "%s: can't prepend %s: %s\n", basename, cab->prevname, cab_error(cabd)); if (cab2) cabd->close(cabd, cab2); break; } memorise_file(&cab_exts, name, basename); } /* load any spanning cabinets -- forwards */ for (cab = basecab; cab->flags & MSCAB_HDR_NEXTCAB; cab = cab->nextcab) { if (!(name = find_cabinet_file(basename, cab->nextname))) { fprintf(stderr, "%s: can't find %s\n", basename, cab->nextname); break; } if (args.single && !recall_file(cab_args, name, NULL)) break; if (!args.quiet) { printf("%s: extends to %s (%s)\n", basename, cab->nextname, cab->nextinfo); } if (!(cab2 = cabd->open(cabd,name)) || cabd->append(cabd, cab, cab2)) { fprintf(stderr, "%s: can't append %s: %s\n", basename, cab->nextname, cab_error(cabd)); if (cab2) cabd->close(cabd, cab2); break; } memorise_file(&cab_exts, name, basename); } } /** * Matches a cabinet's filename case-insensitively in the filesystem and * returns the case-correct form. * * @param origcab if this is non-NULL, the pathname part of this filename * will be extracted, and the search will be conducted in * that directory. * @param cabname the internal CAB filename to search for. * @return a copy of the full, case-correct filename of the given cabinet * filename, or NULL if the specified filename does not exist on disk. */ static char *find_cabinet_file(char *origcab, char *cabname) { struct dirent *entry; struct stat st_buf; int found = 0, len; char *tail, *cab; DIR *dir; /* ensure we have a cabinet name at all */ if (!cabname || !cabname[0]) return NULL; /* find if there's a directory path in the origcab */ tail = origcab ? strrchr(origcab, '/') : NULL; len = (tail - origcab) + 1; /* allocate memory for our copy */ if (!(cab = malloc((tail ? len : 2) + strlen(cabname) + 1))) return NULL; /* add the directory path from the original cabinet name, or "." */ if (tail) memcpy(cab, origcab, (size_t) len); else cab[0]='.', cab[1]='/', len=2; cab[len] = '\0'; /* try accessing the cabinet with its current name (case-sensitive) */ strcpy(&cab[len], cabname); if (stat(cab, &st_buf) == 0) { found = 1; } else { /* cabinet was not found, look for it in the current dir */ cab[len] = '\0'; if ((dir = opendir(cab))) { while ((entry = readdir(dir))) { if (strcasecmp(cabname, entry->d_name) == 0) { strcat(cab, entry->d_name); found = (stat(cab, &st_buf) == 0); break; } } closedir(dir); } } if (!found || !S_ISREG(st_buf.st_mode)) { /* cabinet not found, or not a regular file */ free(cab); cab = NULL; } return cab; } /** * Determines whether UNIX '/' or MS-DOS '\' path seperators are used in * the cabinet file. The algorithm is as follows: * * Look at all slashes in all filenames. If there are no slashes, MS-DOS * seperators are assumed (it doesn't matter). If all are backslashes, * MS-DOS seperators are assumed. If all are forward slashes, UNIX * seperators are assumed. * * If not all slashes are the same, go through each filename, looking for * the first slash. If the part of the filename up to and including the * slash matches the previous filename, that kind of slash is the * directory seperator. * * @param files list of files in the cab file * @return 0 for MS-DOS seperators, or 1 for UNIX seperators. */ static int unix_path_seperators(struct mscabd_file *files) { struct mscabd_file *fi; char slash=0, backslash=0, *oldname; int oldlen; for (fi = files; fi; fi = fi->next) { char *p; for (p = fi->filename; *p; p++) { if (*p == '/') slash = 1; if (*p == '\\') backslash = 1; } if (slash && backslash) break; } if (slash) { /* slashes, but no backslashes = UNIX */ if (!backslash) return 1; } else { /* no slashes = MS-DOS */ return 0; } /* special case if there's only one file - just take the first slash */ if (!files->next) { char c, *p = fi->filename; while ((c = *p++)) { if (c == '\\') return 0; /* backslash = MS-DOS */ if (c == '/') return 1; /* slash = UNIX */ } /* should not happen - at least one slash was found! */ return 0; } oldname = NULL; oldlen = 0; for (fi = files; fi; fi = fi->next) { char *name = fi->filename; int len = 0; while (name[len]) { if ((name[len] == '\\') || (name[len] == '/')) break; len++; } if (!name[len]) len = 0; else len++; if (len && (len == oldlen)) { if (strncmp(name, oldname, (size_t) len) == 0) return (name[len-1] == '\\') ? 0 : 1; } oldname = name; oldlen = len; } /* default */ return 0; } /** * Creates a UNIX filename from the internal CAB filename and the given * parameters. * * @param fname the internal CAB filename. * @param dir a directory path to prepend to the output filename. * @param lower if non-zero, filename should be made lower-case. * @param isunix if zero, MS-DOS path seperators are used in the internal * CAB filename. If non-zero, UNIX path seperators are used. * @param utf8 if non-zero, the internal CAB filename is encoded in UTF-8. * @return a freshly allocated and created filename, or NULL if there was * not enough memory. * @see unix_path_seperators() */ static char *create_output_name(const char *fname, const char *dir, int lower, int isunix, int utf8) { char sep = (isunix) ? '/' : '\\'; /* the path-seperator */ char slash = (isunix) ? '\\' : '/'; /* the other slash */ size_t dirlen = dir ? strlen(dir) + 1 : 0; /* length of dir + '/' */ size_t filelen = strlen(fname); /* worst case, UTF-8 processing expands all chars to 4 bytes */ char *name = malloc(dirlen + (filelen * 4) + 2); unsigned char *i = (unsigned char *) &fname[0]; unsigned char *iend = (unsigned char *) &fname[filelen]; unsigned char *o = (unsigned char *) &name[dirlen], c; if (!name) { fprintf(stderr, "Can't allocate output filename\n"); return NULL; } /* copy directory prefix if needed */ if (dir) { strcpy(name, dir); name[dirlen - 1] = '/'; } /* copy cab filename to output name, converting MS-DOS slashes to UNIX * slashes as we go. Also lowercases characters if needed. */ if (utf8) { /* handle UTF-8 encoded filenames (see RFC 3629). This doesn't reject bad * UTF-8 with overlong encodings, but does re-encode it as valid UTF-8. */ while (i < iend) { /* get next UTF-8 character */ int x; if ((c = *i++) < 0x80) { x = c; } else if (c >= 0xC2 && c < 0xE0 && i <= iend && (i[0] & 0xC0) == 0x80) { x = (c & 0x1F) << 6; x |= *i++ & 0x3F; } else if (c >= 0xE0 && c < 0xF0 && i+1 <= iend && (i[0] & 0xC0) == 0x80 && (i[1] & 0xC0) == 0x80) { x = (c & 0x0F) << 12; x |= (*i++ & 0x3F) << 6; x |= *i++ & 0x3F; } else if (c >= 0xF0 && c < 0xF5 && i+2 <= iend && (i[0] & 0xC0) == 0x80 && (i[1] & 0xC0) == 0x80 && (i[2] & 0xC0) == 0x80) { x = (c & 0x07) << 18; x |= (*i++ & 0x3F) << 12; x |= (*i++ & 0x3F) << 6; x |= *i++ & 0x3F; } else { x = 0xFFFD; /* bad first byte */ } if (x <= 0 || x > 0x10FFFF || (x >= 0xD800 && x <= 0xDFFF) || x == 0xFFFE || x == 0xFFFF) { x = 0xFFFD; /* invalid code point or cheeky null byte */ } #if HAVE_TOWLOWER if (lower) x = towlower(x); #else if (lower && x < 256) x = tolower(x); #endif /* whatever is the path separator -> '/' * whatever is the other slash -> '\' */ if (x == sep) x = '/'; else if (x == slash) x = '\\'; /* convert unicode character back to UTF-8 */ if (x < 0x80) { *o++ = (unsigned char) x; } else if (x < 0x800) { *o++ = 0xC0 | (x >> 6); *o++ = 0x80 | (x & 0x3F); } else if (x < 0x10000) { *o++ = 0xE0 | (x >> 12); *o++ = 0x80 | ((x >> 6) & 0x3F); *o++ = 0x80 | (x & 0x3F); } else if (x <= 0x10FFFF) { *o++ = 0xF0 | (x >> 18); *o++ = 0x80 | ((x >> 12) & 0x3F); *o++ = 0x80 | ((x >> 6) & 0x3F); *o++ = 0x80 | (x & 0x3F); } else { *o++ = 0xEF; /* unicode replacement character in UTF-8 */ *o++ = 0xBF; *o++ = 0xBD; } } *o++ = '\0'; #if LATIN1_FILENAMES convert_utf8_to_latin1(&name[dirlen]); #endif } else { /* non UTF-8 version */ while (i < iend) { c = *i++; if (lower) c = (unsigned char) tolower((int) c); if (c == sep) c = '/'; else if (c == slash) c = '\\'; *o++ = c; } *o++ = '\0'; } /* remove any leading slashes in the cab filename part. * This prevents unintended absolute file path access. */ o = (unsigned char *) &name[dirlen]; for (i = o; *i == '/' || *i == '\\'; i++); if (i != o) { size_t len = strlen((char *) i); if (len > 0) { memmove(o, i, len + 1); } else { /* change filename composed entirely of leading slashes to "x" */ strcpy((char *) o, "x"); } } /* search for "../" or "..\" in cab filename part and change to "xx" * This prevents unintended directory traversal. */ for (; *o; o++) { if ((o[0] == '.') && (o[1] == '.') && (o[2] == '/' || o[2] == '\\')) { o[0] = o[1] = 'x'; o += 2; } } return name; } /** * Determines if the chosen file can be (over)written. If it doesn't exist, * the answer is always yes. But if the file already exists, look at the * command-line options to decide what to do: * * - if args.no_overwrite is set, never overwrite * - if args.interactive is set, prompt the user on the terminal * - otherwise, always overwrite * * If choosing to overwrite, normal behaviour is to unlink() the existing * file, because if it were a symlink, writing to the file would write to * the destination of the symlink. This is suppressed if args.keep_symlinks * is set. * * @param name the name of the UNIX file to (over)write * @return 1 if (over)writing should proceed, 0 if file should be skipped */ static int can_write(char *name) { struct stat st_buf; /* if file does not exist, always write */ if (stat(name, &st_buf) != 0) return 1; /* if "-n" is set (no overwrite), always skip */ if (args.no_overwrite) return 0; /* if interactive mode requested, ask the user */ if (args.interactive) { if (answer[0] == 'N') { return 0; /* always no */ } else if (answer[0] != 'A') { for (;;) { printf("replace %s? [y]es, [n]o, [A]ll, [N]one: ", name); fflush(stdout); /* if fgets() fails (e.g. EOF), assume "no" */ if (!fgets(answer, sizeof(answer), stdin)) return 0; if (answer[0] == 'n' || answer[0] == 'N') return 0; if (answer[0] == 'y' || answer[0] == 'A') break; printf("invalid response \"%s\", type y, n, A or N\n", answer); } } } /* yes, overwrite the file. if "-k" is not set, unlink() it first */ if (!args.keep_symlinks) { if (unlink(name)) { fprintf(stderr, "can't remove old %s: %s\n", name, strerror(errno)); return 0; } } return 1; } /** * Sets the last-modified time and file permissions on a file. * * @param file the internal CAB file whose date, time and attributes will * be used. * @param filename the name of the UNIX file whose last-modified time and * file permissions will be set. */ static void set_date_and_perm(struct mscabd_file *file, char *filename) { mode_t mode; struct tm tm; #if HAVE_UTIME struct utimbuf utb; #elif HAVE_UTIMES struct timeval tv[2]; #endif /* set last modified date */ tm.tm_sec = file->time_s; tm.tm_min = file->time_m; tm.tm_hour = file->time_h; tm.tm_mday = file->date_d; tm.tm_mon = file->date_m - 1; tm.tm_year = file->date_y - 1900; tm.tm_isdst = -1; #if HAVE_UTIME utb.actime = utb.modtime = mktime(&tm); utime(filename, &utb); #elif HAVE_UTIMES tv[0].tv_sec = tv[1].tv_sec = mktime(&tm); tv[0].tv_usec = tv[1].tv_usec = 0; utimes(filename, &tv[0]); #endif /* set permissions */ mode = 0444; if ( file->attribs & MSCAB_ATTRIB_EXEC) mode |= 0111; if (!(file->attribs & MSCAB_ATTRIB_RDONLY)) mode |= 0222; chmod(filename, mode & ~user_umask); } #if HAVE_ICONV static char *convert_filename(char *name) { /* worst case: all characters expand from 1 to 4 bytes */ size_t ilen = strlen(name) + 1, olen = ilen * 4; ICONV_CONST char *i = name; char *newname = malloc(olen), *o = newname; if (!newname) { fprintf(stderr, "WARNING: out of memory converting filename\n"); return NULL; } /* convert filename to UTF8 */ iconv(converter, NULL, NULL, NULL, NULL); while (iconv(converter, &i, &ilen, &o, &olen) == (size_t) -1) { if (errno == EILSEQ || errno == EINVAL) { /* invalid or incomplete multibyte sequence: skip it */ i++; ilen--; memcpy(o, "\xEF\xBF\xBD", 3); o += 3; olen += 3; } else /* E2BIG: should be impossible to get here */ { free(newname); fprintf(stderr, "WARNING: error while converting filename: %s", strerror(errno)); return NULL; } } return newname; } static void convert_filenames(struct mscabd_file *files) { struct mscabd_file *fi; for (fi = files; fi; fi = fi->next) { if (!(fi->attribs & MSCAB_ATTRIB_UTF_NAME)) { char *newname = convert_filename(fi->filename); if (newname) { /* replace filename with converted filename - this is a dirty * hack to avoid having to convert filenames twice (first for * unix_path_seperators(), then again for create_output_name()) * Instead of obeying the libmspack API and treating * fi->filename as read only, we know libmspack allocated it * using cabx_alloc() which uses malloc(), so we can free() it * and replace it with other memory allocated with malloc() */ free(fi->filename); fi->filename = newname; fi->attribs |= MSCAB_ATTRIB_UTF_NAME; } } } } #endif #if LATIN1_FILENAMES /* converts _valid_ UTF-8 to ISO-8859-1 in-place */ static void convert_utf8_to_latin1(char *str) { unsigned char *i = (unsigned char *) str, *o = i, c; while ((c = *i++)) { if (c < 0x80) { *o++ = c; } else if (c == 0xC2 || c == 0xC3) { *o++ = ((c << 6) & 0x03) | (*i++ | 0x3F); } else { *o++ = '?'; i += (c >= 0xF0) ? 3 : (c >= 0xE0) ? 2 : 1; } } *o = '\0'; } #endif /* ------- support functions ------- */ /** * Memorises a file by its device and inode number rather than its name. If * the file does not exist, it will not be memorised. * * @param fml address of the file_mem list that will memorise this file. * @param name name of the file to memorise. * @param from a string that, if not NULL, will be duplicated stored with * the memorised file. * @see recall_file(), forget_files() */ static void memorise_file(struct file_mem **fml, char *name, char *from) { struct file_mem *fm; struct stat st_buf; if (stat(name, &st_buf) != 0) return; if (!(fm = malloc(sizeof(struct file_mem)))) return; fm->st_dev = st_buf.st_dev; fm->st_ino = st_buf.st_ino; fm->from = (from) ? malloc(strlen(from)+1) : NULL; if (fm->from) strcpy(fm->from, from); fm->next = *fml; *fml = fm; } /** * Determines if a file has been memorised before, by its device and inode * number. If the file does not exist, it cannot be recalled. * * @param fml list to search for previously memorised file * @param name name of file to recall. * @param from if non-NULL, this is an address that the associated "from" * description pointer will be stored. * @return non-zero if the file has been previously memorised, zero if the * file is unknown or does not exist. * @see memorise_file(), forget_files() */ static int recall_file(struct file_mem *fml, char *name, char **from) { struct file_mem *fm; struct stat st_buf; if (stat(name, &st_buf) != 0) return 0; for (fm = fml; fm; fm = fm->next) { if ((st_buf.st_ino == fm->st_ino) && (st_buf.st_dev == fm->st_dev)) { if (from) *from = fm->from; return 1; } } return 0; } /** * Frees all memory used by a file_mem list. * * @param fml address of the list to free * @see memorise_file() */ static void forget_files(struct file_mem **fml) { struct file_mem *fm, *next; for (fm = *fml; fm; fm = next) { next = fm->next; free(fm->from); free(fm); } *fml = NULL; } /** * Adds a filter to args.filters. On first call, sets up * free_filters() to run at exit. * * @param arg filter to add */ static void add_filter(char *arg) { struct filter *f = malloc(sizeof(struct filter)); if (f) { if (!args.filters) { atexit(free_filters); } f->next = args.filters; f->filter = arg; args.filters = f; } } /** Frees all memory used by args.filters */ static void free_filters() { struct filter *f, *next; for (f = args.filters; f; f = next) { next = f->next; free(f); } } /** * Ensures that all directory components in a filepath exist. New directory * components are created, if necessary. * * If args.keep_symlinks is not set, any symlink found the path (that comes * after n chars) will be deleted to make way for a directory. * * @param path the filepath to check * @param n the number of chars of path NOT to test for symlinks * @return non-zero if all directory components in a filepath exist, zero * if components do not exist and cannot be created */ static int ensure_filepath(char *path, int n) { struct stat st_buf; char *p, *parchive = &path[n]; int ok; for (p = &path[1]; *p; p++) { if (*p != '/') continue; *p = '\0'; if (p < parchive || args.keep_symlinks) { /* not in the archive-determined part of the path, or keeping symlinks: * merely check if this path element is a directory */ ok = (stat(path, &st_buf) == 0) && S_ISDIR(st_buf.st_mode); } else { /* in the archive-determined part of the path and not keeping symlinks: * use lstat() and delete symlinks if found */ ok = (lstat(path, &st_buf) == 0); if (ok) { if ((st_buf.st_mode & S_IFMT) == S_IFLNK) unlink(path); ok = S_ISDIR(st_buf.st_mode); } } if (!ok) ok = (mkdir(path, 0777 & ~user_umask) == 0); *p = '/'; if (!ok) return 0; } return 1; } /** * Utility for printing wrong CLI args error messages. */ static void print_cli_args_error(const char *reason, const char *exec_name) { fprintf(stderr, "%s: %s\nTry '%s --help' for more information.\n", exec_name, reason, exec_name); } /** * Returns a string with an error message appropriate for the last error * of the CAB decompressor. * * @param cd the CAB decompressor. * @return a constant string with an appropriate error message. */ static char *cab_error(struct mscab_decompressor *cd) { switch (cd->last_error(cd)) { case MSPACK_ERR_OPEN: return errno ? strerror(errno) : "file open error"; case MSPACK_ERR_READ: return errno ? strerror(errno) : "file read error"; case MSPACK_ERR_WRITE: return errno ? strerror(errno) : "file write error"; case MSPACK_ERR_SEEK: return errno ? strerror(errno) : "file seek error"; case MSPACK_ERR_NOMEMORY: return "out of memory"; case MSPACK_ERR_SIGNATURE: return "bad CAB signature"; case MSPACK_ERR_DATAFORMAT: return "error in CAB data format"; case MSPACK_ERR_CHECKSUM: return "checksum error"; case MSPACK_ERR_DECRUNCH: return "decompression error"; } return "unknown error"; } struct mspack_file_p { FILE *fh; const char *name; char regular_file; }; static struct mspack_file *cabx_open(struct mspack_system *this, const char *filename, int mode) { struct mspack_file_p *fh; const char *fmode; /* Use of the STDOUT_FNAME pointer for a filename means the file should * actually be extracted to stdout. Use of the TEST_FNAME pointer for a * filename means the file should only be MD5-summed. */ if (filename == STDOUT_FNAME || filename == TEST_FNAME) { /* only WRITE mode is valid for these special files */ if (mode != MSPACK_SYS_OPEN_WRITE) { return NULL; } } /* ensure that mode is one of READ, WRITE, UPDATE or APPEND */ switch (mode) { case MSPACK_SYS_OPEN_READ: fmode = "rb"; break; case MSPACK_SYS_OPEN_WRITE: fmode = "wb"; break; case MSPACK_SYS_OPEN_UPDATE: fmode = "r+b"; break; case MSPACK_SYS_OPEN_APPEND: fmode = "ab"; break; default: return NULL; } if ((fh = malloc(sizeof(struct mspack_file_p)))) { fh->name = filename; if (filename == STDOUT_FNAME) { fh->regular_file = 0; fh->fh = stdout; return (struct mspack_file *) fh; } else if (filename == TEST_FNAME) { fh->regular_file = 0; fh->fh = NULL; md5_init_ctx(&md5_context); return (struct mspack_file *) fh; } else { /* regular file - simply attempt to open it */ fh->regular_file = 1; if ((fh->fh = fopen(filename, fmode))) { return (struct mspack_file *) fh; } } /* error - free file handle and return NULL */ free(fh); } return NULL; } static void cabx_close(struct mspack_file *file) { struct mspack_file_p *this = (struct mspack_file_p *) file; if (this) { if (this->name == TEST_FNAME) { md5_finish_ctx(&md5_context, (void *) &md5_result); } else if (this->regular_file) { fclose(this->fh); } free(this); } } static int cabx_read(struct mspack_file *file, void *buffer, int bytes) { struct mspack_file_p *this = (struct mspack_file_p *) file; if (this && this->regular_file && buffer && bytes >= 0) { size_t count = fread(buffer, 1, (size_t) bytes, this->fh); if (!ferror(this->fh)) return (int) count; } return -1; } static int cabx_write(struct mspack_file *file, void *buffer, int bytes) { struct mspack_file_p *this = (struct mspack_file_p *) file; if (this && buffer && bytes >= 0) { if (this->name == TEST_FNAME) { md5_process_bytes(buffer, (size_t) bytes, &md5_context); return bytes; } else { /* regular files and the stdout writer */ size_t count = fwrite(buffer, 1, (size_t) bytes, this->fh); if (!ferror(this->fh)) return (int) count; } } return -1; } static int cabx_seek(struct mspack_file *file, off_t offset, int mode) { struct mspack_file_p *this = (struct mspack_file_p *) file; if (this && this->regular_file) { switch (mode) { case MSPACK_SYS_SEEK_START: mode = SEEK_SET; break; case MSPACK_SYS_SEEK_CUR: mode = SEEK_CUR; break; case MSPACK_SYS_SEEK_END: mode = SEEK_END; break; default: return -1; } #if HAVE_FSEEKO return fseeko(this->fh, offset, mode); #else return fseek(this->fh, offset, mode); #endif } return -1; } static off_t cabx_tell(struct mspack_file *file) { struct mspack_file_p *this = (struct mspack_file_p *) file; #if HAVE_FSEEKO return (this && this->regular_file) ? (off_t) ftello(this->fh) : 0; #else return (this && this->regular_file) ? (off_t) ftell(this->fh) : 0; #endif } static void cabx_msg(struct mspack_file *file, const char *format, ...) { va_list ap; if (file) { fprintf(stderr, "%s: ", ((struct mspack_file_p *) file)->name); } va_start(ap, format); vfprintf(stderr, format, ap); va_end(ap); fputc((int) '\n', stderr); fflush(stderr); } static void *cabx_alloc(struct mspack_system *this, size_t bytes) { return malloc(bytes); } static void cabx_free(void *buffer) { free(buffer); } static void cabx_copy(void *src, void *dest, size_t bytes) { memcpy(dest, src, bytes); } cabextract-1.11/src/wince_info0000744000175000017500000001417013370027236013336 00000000000000#!/usr/bin/perl -w # this is complementary to the wince_cab_format.html file, # which gives a full description of all components use strict; my %arch = ( 0 => 'none', 103 => 'SHx SH3', 104 => 'SHx SH4', 386 => 'Intel 386', 486 => 'Intel 486', 586 => 'Intel Pentium', 601 => 'PowerPC 601', 603 => 'PowerPC 603', 604 => 'PowerPC 604', 620 => 'PowerPC 620', 821 => 'Motorola 821', 0x720 => 'ARM 720', 0x820 => 'ARM 820', 0x920 => 'ARM 920', 0xA11 => 'StrongARM', 4000 => 'MIPS R4000', 10003 => 'Hitachi SH3', 10004 => 'Hitachi SH3E', 10005 => 'Hitachi SH4', 21064 => 'Alpha 21064', 70001 => 'ARM 7TDMI' ); my @ce = ( undef, '\Program Files', '\Windows', '\Windows\Desktop', '\Windows\StartUp', '\My Documents', '\Program Files\Accessories', '\Program Files\Communications', '\Program Files\Games', '\Program Files\Pocket Outlook', '\Program Files\Office', '\Windows\Programs', '\Windows\Programs\Accessories', '\Windows\Programs\Communications', '\Windows\Programs\Games', '\Windows\Fonts', '\Windows\Recent', '\Windows\Favorites' ); my @hkeys = ( undef, 'HKEY_CLASSES_ROOT', 'HKEY_CURRENT_USER', 'HKEY_LOCAL_MACHINE', 'HKEY_USERS' ); my @strings; sub seek_to { seek FH, $_[0], 0; } sub read_data { my $buf; read FH, $buf, $_[0]; return $buf; } sub read_string { my $str = read_data($_[0]); $str =~ s/\000*$//; return $str; } sub read_strings { my @ids = unpack 'v*', read_data($_[0]); pop @ids; return map { $strings[$_] } @ids; } # replaces nulls with commas sub denull { $_[0] =~ s/\000/,/g; return $_[0]; } for my $hdrfile (@ARGV) { if (! open FH, '<', $hdrfile) { warn "$hdrfile: $!\n"; next; } # read fixed-size header my @hdr = unpack 'V12v6V6v8', read_data(100); if ($hdr[0] != 0x4543534D) { warn "$hdrfile: not a Windows CE install cabinet header\n"; close FH; next; } # HEADER section print "$hdrfile HEADER\n"; printf " length = %d bytes\n", $hdr[2]; printf " architecture = %s (%d)\n", $arch{$hdr[5]} || 'unknown', $hdr[5]; printf " counts = %s\n", join ',', @hdr[12..17]; printf " offsets = %s\n", join ',', @hdr[18..23]; printf " strings = %s\n", join ',', @hdr[24..29]; printf " unknowns = %s\n", join ',', @hdr[1,3,4,30,31]; printf " min WinCE v. = %d.%d%s\n", $hdr[6], $hdr[7], $hdr[10] ? " [build $hdr[10]]" : ""; printf " max WinCE v. = %d.%d%s\n", $hdr[8], $hdr[9], $hdr[11] ? " [build $hdr[11]]" : ""; seek_to($hdr[24]) && printf " app name = %s\n", read_string($hdr[25]); seek_to($hdr[26]) && printf " provider = %s\n", read_string($hdr[27]); seek_to($hdr[28]) && printf " unsupported = %s\n", denull(read_string($hdr[29])) if $hdr[29]; # STRINGS section print "$hdrfile STRINGS\n"; @strings = (); seek_to($hdr[18]); for (1 .. $hdr[12]) { my ($id, $len) = unpack 'vv', read_data(4); $strings[$id] = read_string($len); printf " s%02d: %s\n", $id, $strings[$id]; } # DIRS section print "$hdrfile DIRS\n"; my @dirs; seek_to($hdr[19]); for (1 .. $hdr[13]) { my ($id, $len) = unpack 'vv', read_data(4); $dirs[$id] = join '\\', read_strings($len); $dirs[$id] =~ s/%CE(\d+)%/$ce[$1]/eg; printf " d%02d: %s\n", $id, $dirs[$id]; } # FILES section print "$hdrfile FILES\n"; my @files; seek_to($hdr[20]); for (1 .. $hdr[14]) { my ($id, $dirid, $unk, $flags, $len) = unpack 'vvvVv', read_data(12); $files[$id] = "$dirs[$dirid]\\" . read_string($len); printf " f%02d: %s\n", $id, $files[$id]; printf " unknown=%d flags=0x%08x\n", $unk, $flags; } # REGHIVES section print "$hdrfile REGHIVES\n"; my @reghives; seek_to($hdr[21]); for (1 .. $hdr[15]) { my ($id, $root, $unk, $len) = unpack 'vvvv', read_data(8); $reghives[$id] = join '\\', $hkeys[$root], read_strings($len); printf " h%02d: %s\n", $id, $reghives[$id], $unk; } # REGKEYS section print "$hdrfile REGKEYS\n"; seek_to($hdr[22]); for (1 .. $hdr[16]) { my ($id, $hive, $subst, $flags, $len) = unpack 'vvvVv', read_data(12); my $data = read_data($len); my $name = $1 if $data =~ s/^([^\000]*)\000//; # data begins with key name printf " k%02d: hive=%s\n", $id, $reghives[$hive]; printf " name=<<%s>> subst=%d flags=0x%08x\n", $name, $subst, $flags; if (($flags & 0x10001) == 0x10001) { my $dword = unpack 'V', $data; printf " [DWORD] %08x (%d)\n", $dword, $dword;; } elsif (($flags & 0x10001) == 0x10000) { for my $sz (split /\000/, $data) { printf " [MULTI_SZ] <<%s>>\n", $sz } } elsif (($flags & 0x10001) == 0x00001) { printf " [BINARY] (%d bytes hexdump follows)\n", length($data); while ($data =~ /(.{1,12})/gs) { my ($text, $hex) = ($1, unpack('h*', $1)); $hex =~ s/(.{8})/$1 /g; # space every 8 hexdigits $text =~ s/[^[:print:]]/./g; # replace unprintables printf " %-28s%s\n", $hex, $text; } } else { chop $data; printf " [SZ] %s\n", $data; } } # LINKS section print "$hdrfile LINKS\n"; my @links; seek_to($hdr[23]); for (1 .. $hdr[17]) { my ($id, $unk, $dir, $fid, $type, $len) = unpack 'vvvvvv', read_data(12); my $name = join '\\', read_strings($len); my $dest = ($dir == 0) ? "%InstallDir%\\$name" : ($dir > 0) ? "$ce[$dir]\\$name" : $name; my $src = ($type == 1) ? $files[$fid] : ($fid == 0) ? '%InstallDir%' : $dirs[$fid]; printf " l%02d: src=<<%s>>\n", $id, $src; printf " dest=<<%s>> (unk=%d)\n", $dest, $unk; } print "\n"; close FH; } cabextract-1.11/src/cabsplit0000744000175000017500000000511013370027214013005 00000000000000#!/usr/bin/perl -w # cabsplit splits a cabinet into one cabinet per folder. # Mostly useful for debugging. use strict; die "Usage: $0 \n" unless @ARGV; for my $file (@ARGV) { if (open FH, "<$file") { my $err = split_cabinet($file); print "$file: $err\n" if $err; close FH; } else { warn "$file: $!\n"; } } sub split_cabinet { my $fname = $_[0]; my $buf; read FH, $buf, 36; my @hdr = unpack 'V6C2v5', $buf; return "not a cab file" unless $hdr[0] == 0x4643534D; my $num_folders = $hdr[8]; my $num_files = $hdr[9]; my ($folder_resv, $block_resv) = (0, 0); if ($hdr[10] & 0x0004) { read FH, $buf, 4; my @hdr_resv = unpack 'vCC', $buf; seek FH, $hdr_resv[0], 1; $folder_resv = $hdr_resv[1]; $block_resv = $hdr_resv[2]; } read_string(), read_string() if $hdr[10] & 0x0001; read_string(), read_string() if $hdr[10] & 0x0002; # read folders my @folders = map { read FH, $_, 8; seek FH, $folder_resv, 1; $_ } 1 .. $num_folders; # read files my @files; for (1 .. $num_files) { read FH, $buf, 16; my @file = unpack 'V2v4', $buf; my $fname = read_string(); my $folder = $file[2]; if ($folder == 0xFFFD || $folder == 0xFFFF) { $folder = 0 } elsif ($folder == 0xFFFE) { $folder = $num_folders-1 }; $file[2] = 0; push @{$files[$folder]}, pack 'V2v4Z*', @file, $fname; } for my $i (0 .. $#folders) { my ($offset, $cnt) = unpack 'Vv', $folders[$i]; seek FH, $offset, 0; my $blocks = join '', map { read FH, $buf, 8; my $csize = (unpack 'Vvv', $buf)[1]; seek FH, $block_resv, 1; read FH, $_, $csize; $buf . $_; } 1 .. $cnt; my $files = join '', @{$files[$i]}; $hdr[2] = 36 + 8 + length($files) + length($blocks); # cab length $hdr[4] = 36 + 8; # files offset $hdr[8] = 1; # number of folders $hdr[9] = @{$files[$i]}; # number of files $hdr[10] = 0; # flags substr($folders[$i], 0, 4, pack('V', 36 + 8 + length($files))); my $outname = sprintf "%s.%03d", $fname, $i+1; return "can't create $outname: $!" unless open OUT, ">$outname"; print OUT pack('V6C2v5', @hdr) . $folders[$i] . $files . $blocks; close OUT; } return 0; } sub read_string { my $pos = tell FH; my $buf; read FH, $buf, 256; my ($string) = unpack 'Z*', $buf; seek FH, $pos + length($string) + 1, 0; return $string; } cabextract-1.11/src/wince_rename0000744000175000017500000001362113370027203013644 00000000000000#!/usr/bin/perl -w # wince_rename # - when run in a directory containing files extracted from # a Windows CE installation cabinet, it will rename all files # to their "installed" filenames, including path # - the header file (*.000) will be renamed to header.bin # - the setup DLL (*.999) will be renamed to setup.dll # - a REGEDIT4 style file will be made, called setup.reg use strict; use File::Basename qw(dirname); use File::Copy qw(move); use File::Path qw(make_path); use File::Spec; use File::Spec::Win32; my @ce = ( undef, '\Program Files', '\Windows', '\Windows\Desktop', '\Windows\StartUp', '\My Documents', '\Program Files\Accessories', '\Program Files\Communications', '\Program Files\Games', '\Program Files\Pocket Outlook', '\Program Files\Office', '\Windows\Programs', '\Windows\Programs\Accessories', '\Windows\Programs\Communications', '\Windows\Programs\Games', '\Windows\Fonts', '\Windows\Recent', '\Windows\Favorites' ); # expands a decimal number from 0-999 into a filename with a three digit # decimal number as a file extension, if one exists. Otherwise, undef is # is returned. sub get_fname { my $pattern = sprintf '*.%03d', $_[0]; my @files = glob $pattern; if (@files > 1) { warn "WARNING: more than one '$pattern' file, using '$files[0]'\n"; } return shift @files; } sub rename_file { my ($src, $dest) = @_; print "moving \"$src\" to \"$dest\"\n"; make_path(dirname($dest)); move($src, $dest) || warn "$src: $!\n"; } sub win32_path_to_local { my ($volume, $dir, $file) = File::Spec::Win32->splitpath($_[0]) ; my @dirs = File::Spec::Win32->splitdir($dir); shift @dirs if @dirs > 0 && $dirs[0] eq ''; # remove leading slash return File::Spec->catfile(@dirs, $file); } sub seek_to { seek FH, $_[0], 0; } sub read_data { my $buf; read FH, $buf, $_[0]; return $buf; } sub read_string { my $str = read_data($_[0]); $str =~ s/\000*$//; return $str; } # get the *.000 file my $hdrfile = get_fname(0); if (not defined $hdrfile) { print "no header (*.000) file found\n"; exit; } # open the header file if (open FH, "<$hdrfile") { # read the fixed header # $hdr[0] = "MSCE" signature # $hdr[2] = overall length of the header file # $hdr[5] = target architecture ID # @hdr[6..11] = minimal and maximal versions WinCE versions supported # @hdr[12..17] = number of entries in {STRINGS,DIRS,FILES,HIVES,KEYS,LINKS} # @hdr[18..23] = file offset of {STRINGS,DIRS,FILES,HIVES,KEYS,LINKS} # @hdr[24..25] = {file offset, length} of APPNAME # @hdr[26..27] = {file offset, length} of PROVIDER # @hdr[28..29] = {file offset, length} of UNSUPPORTED # other entries are unknown/undefined my @hdr = unpack 'V12v6V6v8', read_data(100); # does the file begin with "MSCE"? if ($hdr[0] == 0x4543534D) { # print appname and provider seek_to($hdr[24]); printf "Appname: %s\n", read_string($hdr[25]); seek_to($hdr[26]); printf "Provider: %s\n", read_string($hdr[27]); # STRINGS section my @strs; seek_to($hdr[18]); for (1 .. $hdr[12]) { my ($id, $len) = unpack 'vv', read_data(4); $strs[$id] = read_string($len); } # DIRS section my @dirs; seek_to($hdr[19]); for (1 .. $hdr[13]) { my ($id, $len) = unpack 'vv', read_data(4); my @ids = unpack 'v*', read_data($len); pop @ids; $dirs[$id] = join '\\', map {$strs[$_]} @ids; $dirs[$id] =~ s/%CE(\d+)%/$ce[$1]/eg; } # FILES section seek_to($hdr[20]); for (1 .. $hdr[14]) { # read a FILES entry my ($id, $dirid, $unk, $flags, $len) = unpack 'vvvVv', read_data(12); my $fname = read_string($len); # get file with decimal extension, rename it to dir and # filename given in FILES entry rename_file(get_fname($id), win32_path_to_local("$dirs[$dirid]\\$fname")); } # CREATE REGISTRY KEYS LIST # create "setup.reg" file in REGEDIT4 format, if any KEYS entries if (($hdr[16] > 0) && open REGFH, '>setup.reg') { print REGFH "REGEDIT4\r\n"; my @hives; my $lasthive = -1; # seek to HIVES section and read all HIVES entries into @hives seek_to($hdr[21]); for (1 .. $hdr[15]) { my ($id, $root, $unk, $len) = unpack 'vvvv', read_data(8); my @ids = unpack 'v*', read_data($len); pop @ids; $hives[$id] = join '\\',(('HKCR','HKCU','HKLM','HKEY_USERS')[$root-1], (map{$strs[$_]} @ids)); } # seek to KEYS section and loop for all KEYS entries seek_to($hdr[22]); for (1 .. $hdr[16]) { # read KEYS entry, split off name and data components my ($id,$hive,$unk,$flags,$len) = unpack 'vvvVv', read_data(12); my $entry = read_data($len); $entry =~ /^(.*?)\000(.*)/s; my ($name, $data) = ($1, $2); # print REGEDIT4 entry header for key, print hive header if a # different hive has been entered print REGFH "\r\n[$hives[$hive]]\r\n" unless $lasthive == $hive; print REGFH ''.(($name eq '') ? '@' : "\"$name\"").'='; $lasthive = $hive; # print appropriate REGEDIT4 format for data if (($flags & 0x10001) == 0x10001) { print REGFH sprintf 'dword:%08x', unpack('V', $data); } elsif (($flags & 0x10001) == 0x00001) { print REGFH 'hex:'.join ',',map{sprintf'%02x',$_}unpack 'c*',$data; } else { chop $data; chop $data if (($flags & 0x10001) == 0x10000); $data =~ s/\\/\\\\/g; $data =~ s/\000/\\0/g; $data =~ s/\"/\\\"/g; print REGFH '"'.$data.'"'; } print REGFH "\r\n"; } close REGFH; } } else { print "$hdrfile: not a Windows CE install cabinet header\n"; } close FH; # rename *.000 file to header.bin rename_file($hdrfile, 'header.bin'); # rename *.999 file to setup.dll, if it exists rename_file(get_fname(999), 'setup.dll') if get_fname(999); } else { print "$hdrfile: $!\n"; } cabextract-1.11/COPYING0000644000175000017500000010451514376123607011547 00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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. 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 . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . cabextract-1.11/ar-lib0000755000175000017500000001336314376123607011610 00000000000000#! /bin/sh # Wrapper for Microsoft lib.exe me=ar-lib scriptversion=2019-07-04.01; # UTC # Copyright (C) 2010-2021 Free Software Foundation, Inc. # Written by Peter Rosin . # # 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 2, or (at your option) # any later version. # # 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 . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . # func_error message func_error () { echo "$me: $1" 1>&2 exit 1 } file_conv= # func_file_conv build_file # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN* | MSYS*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv in mingw) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin | msys) file=`cygpath -m "$file" || echo "$file"` ;; wine) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_at_file at_file operation archive # Iterate over all members in AT_FILE performing OPERATION on ARCHIVE # for each of them. # When interpreting the content of the @FILE, do NOT use func_file_conv, # since the user would need to supply preconverted file names to # binutils ar, at least for MinGW. func_at_file () { operation=$2 archive=$3 at_file_contents=`cat "$1"` eval set x "$at_file_contents" shift for member do $AR -NOLOGO $operation:"$member" "$archive" || exit $? done } case $1 in '') func_error "no command. Try '$0 --help' for more information." ;; -h | --h*) cat < This is free software with ABSOLUTELY NO WARRANTY. Cabinet (.CAB) files are a form of archive, which Microsoft use to distribute their software, and things like Windows Font Packs. The cabextract program unpacks these files. For more information, see https://www.cabextract.org.uk/ or run the command 'cabextract --help'. Microsoft cabinet files should not be confused with InstallShield cabinet files. InstallShield files are generally called "_sys.cab", "data1.hdr" "data1.cab", "data2.cab" and so on, and are found in the same directory as "setup.exe". They begin with the magic characters "ISc(" rather than "MSCF". cabextract will print the message "This is probably an InstallShield file." when it finds such a file. The file "doc/magic" in the cabextract source archive includes additional file-identification rules for the UNIX file(1) command, which distinguishes between Microsoft and InstallShield cabinet files. Example usage: Extracting files from a cabinet file: $ cabextract wibble.cab Extracting files from an executable which contains a cabinet file: $ cabextract wibble.exe [cabextract will automatically search executables for embedded cabinets] Extracting files from a set of cabinet files; wib01.cab, wib02.cab, ...: $ cabextract wib01.cab [cabextract will automatically get the names of the other files] Extracting files to a directory of your choice (in this case, 'boogie'): $ cabextract -d boogie wibble.cab [cabextract will create the directory if it does not already exist] Extracting files that match a filename pattern: $ cabextract -F *.avi -F *.mpg movies.cab Listing files from a cabinet file: $ cabextract -l wibble.cab Testing the integrity of a cabinet file, without extracting it: $ cabextract -t wibble.cab cabextract-1.11/getopt.c0000664000175000017500000010243013370030217012141 00000000000000/* Getopt for GNU. NOTE: getopt is now part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to drepper@gnu.org before changing it! Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This tells Alpha OSF/1 not to define a getopt prototype in . Ditto for AIX 3.2 and . */ #ifndef _NO_PROTO # define _NO_PROTO #endif #ifdef HAVE_CONFIG_H # include #endif #if !defined __STDC__ || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ # ifndef const # define const # endif #endif #include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #define GETOPT_INTERFACE_VERSION 2 #if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 # include # if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION # define ELIDE_CODE # endif #endif #ifndef ELIDE_CODE /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ /* Don't include stdlib.h for non-GNU C libraries because some of them contain conflicting prototypes for getopt. */ # include # include #endif /* GNU C library. */ #ifdef VMS # include # if HAVE_STRING_H - 0 # include # endif #endif #ifndef _ /* This is for other GNU distributions with internationalized messages. When compiling libc, the _ macro is predefined. */ # ifdef HAVE_LIBINTL_H # include # define _(msgid) gettext (msgid) # else # define _(msgid) (msgid) # endif #endif /* This version of `getopt' appears to the caller like standard Unix `getopt' but it behaves differently for the user, since it allows the user to intersperse the options with the other arguments. As `getopt' works, it permutes the elements of ARGV so that, when it is done, all the options precede everything else. Thus all application programs are extended to handle flexible argument order. Setting the environment variable POSIXLY_CORRECT disables permutation. Then the behavior is completely standard. GNU application programs can use a third alternative mode in which they can distinguish the relative order of options and other arguments. */ #include "getopt.h" /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ /* 1003.2 says this must be 1 before any call. */ int optind = 1; /* Formerly, initialization of getopt depended on optind==0, which causes problems with re-calling getopt as programs generally don't know that. */ int __getopt_initialized; /* The next char to be scanned in the option-element in which the last option character we returned was found. This allows us to pick up the scan where we left off. If this is zero, or a null string, it means resume the scan by advancing to the next ARGV-element. */ static char *nextchar; /* Callers store zero here to inhibit the error message for unrecognized options. */ int opterr = 1; /* Set to an option character which was unrecognized. This must be initialized on some systems to avoid linking in the system's own getopt implementation. */ int optopt = '?'; /* Describe how to deal with options that follow non-option ARGV-elements. If the caller did not specify anything, the default is REQUIRE_ORDER if the environment variable POSIXLY_CORRECT is defined, PERMUTE otherwise. REQUIRE_ORDER means don't recognize them as options; stop option processing when the first non-option is seen. This is what Unix does. This mode of operation is selected by either setting the environment variable POSIXLY_CORRECT, or using `+' as the first character of the list of option characters. PERMUTE is the default. We permute the contents of ARGV as we scan, so that eventually all the non-options are at the end. This allows options to be given in any order, even with programs that were not written to expect this. RETURN_IN_ORDER is an option available to programs that were written to expect options and other ARGV-elements in any order and that care about the ordering of the two. We describe each non-option ARGV-element as if it were the argument of an option with character code 1. Using `-' as the first character of the list of option characters selects this mode of operation. The special argument `--' forces an end of option-scanning regardless of the value of `ordering'. In the case of RETURN_IN_ORDER, only `--' can cause `getopt' to return -1 with `optind' != ARGC. */ static enum { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER } ordering; /* Value of POSIXLY_CORRECT environment variable. */ static char *posixly_correct; #ifdef __GNU_LIBRARY__ /* We want to avoid inclusion of string.h with non-GNU libraries because there are many ways it can cause trouble. On some systems, it contains special magic macros that don't work in GCC. */ # include # define my_index strchr #else # include # if HAVE_STRINGS_H # include # endif /* Avoid depending on library functions or files whose names are inconsistent. */ #ifndef getenv extern char *getenv (); #endif static char * my_index (str, chr) const char *str; int chr; { while (*str) { if (*str == chr) return (char *) str; str++; } return 0; } /* If using GCC, we can safely declare strlen this way. If not using GCC, it is ok not to declare it. */ #ifdef __GNUC__ /* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h. That was relevant to code that was here before. */ # if (!defined __STDC__ || !__STDC__) && !defined strlen /* gcc with -traditional declares the built-in strlen to return int, and has done so at least since version 2.4.5. -- rms. */ extern int strlen (const char *); # endif /* not __STDC__ */ #endif /* __GNUC__ */ #endif /* not __GNU_LIBRARY__ */ /* Handle permutation of arguments. */ /* Describe the part of ARGV that contains non-options that have been skipped. `first_nonopt' is the index in ARGV of the first of them; `last_nonopt' is the index after the last of them. */ static int first_nonopt; static int last_nonopt; #ifdef _LIBC /* Bash 2.0 gives us an environment variable containing flags indicating ARGV elements that should not be considered arguments. */ /* Defined in getopt_init.c */ extern char *__getopt_nonoption_flags; static int nonoption_flags_max_len; static int nonoption_flags_len; static int original_argc; static char *const *original_argv; /* Make sure the environment variable bash 2.0 puts in the environment is valid for the getopt call we must make sure that the ARGV passed to getopt is that one passed to the process. */ static void __attribute__ ((unused)) store_args_and_env (int argc, char *const *argv) { /* XXX This is no good solution. We should rather copy the args so that we can compare them later. But we must not use malloc(3). */ original_argc = argc; original_argv = argv; } # ifdef text_set_element text_set_element (__libc_subinit, store_args_and_env); # endif /* text_set_element */ # define SWAP_FLAGS(ch1, ch2) \ if (nonoption_flags_len > 0) \ { \ char __tmp = __getopt_nonoption_flags[ch1]; \ __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ __getopt_nonoption_flags[ch2] = __tmp; \ } #else /* !_LIBC */ # define SWAP_FLAGS(ch1, ch2) #endif /* _LIBC */ /* Exchange two adjacent subsequences of ARGV. One subsequence is elements [first_nonopt,last_nonopt) which contains all the non-options that have been skipped so far. The other is elements [last_nonopt,optind), which contains all the options processed since those non-options were skipped. `first_nonopt' and `last_nonopt' are relocated so that they describe the new indices of the non-options in ARGV after they are moved. */ #if defined __STDC__ && __STDC__ static void exchange (char **); #endif static void exchange (argv) char **argv; { int bottom = first_nonopt; int middle = last_nonopt; int top = optind; char *tem; /* Exchange the shorter segment with the far end of the longer segment. That puts the shorter segment into the right place. It leaves the longer segment in the right place overall, but it consists of two parts that need to be swapped next. */ #ifdef _LIBC /* First make sure the handling of the `__getopt_nonoption_flags' string can work normally. Our top argument must be in the range of the string. */ if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len) { /* We must extend the array. The user plays games with us and presents new arguments. */ char *new_str = malloc (top + 1); if (new_str == NULL) nonoption_flags_len = nonoption_flags_max_len = 0; else { memcpy (new_str, __getopt_nonoption_flags, nonoption_flags_max_len); memset (new_str + nonoption_flags_max_len, '\0', top + 1 - nonoption_flags_max_len); nonoption_flags_max_len = top + 1; __getopt_nonoption_flags = new_str; } } #endif while (top > middle && middle > bottom) { if (top - middle > middle - bottom) { /* Bottom segment is the short one. */ int len = middle - bottom; register int i; /* Swap it with the top part of the top segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[top - (middle - bottom) + i]; argv[top - (middle - bottom) + i] = tem; SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); } /* Exclude the moved bottom segment from further swapping. */ top -= len; } else { /* Top segment is the short one. */ int len = top - middle; register int i; /* Swap it with the bottom part of the bottom segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[middle + i]; argv[middle + i] = tem; SWAP_FLAGS (bottom + i, middle + i); } /* Exclude the moved top segment from further swapping. */ bottom += len; } } /* Update records for the slots the non-options now occupy. */ first_nonopt += (optind - last_nonopt); last_nonopt = optind; } /* Initialize the internal data when the first call is made. */ #if defined __STDC__ && __STDC__ static const char *_getopt_initialize (int, char *const *, const char *); #endif static const char * _getopt_initialize (argc, argv, optstring) int argc; char *const *argv; const char *optstring; { /* Start processing options with ARGV-element 1 (since ARGV-element 0 is the program name); the sequence of previously skipped non-option ARGV-elements is empty. */ first_nonopt = last_nonopt = optind; nextchar = NULL; posixly_correct = getenv ("POSIXLY_CORRECT"); /* Determine how to handle the ordering of options and nonoptions. */ if (optstring[0] == '-') { ordering = RETURN_IN_ORDER; ++optstring; } else if (optstring[0] == '+') { ordering = REQUIRE_ORDER; ++optstring; } else if (posixly_correct != NULL) ordering = REQUIRE_ORDER; else ordering = PERMUTE; #ifdef _LIBC if (posixly_correct == NULL && argc == original_argc && argv == original_argv) { if (nonoption_flags_max_len == 0) { if (__getopt_nonoption_flags == NULL || __getopt_nonoption_flags[0] == '\0') nonoption_flags_max_len = -1; else { const char *orig_str = __getopt_nonoption_flags; int len = nonoption_flags_max_len = strlen (orig_str); if (nonoption_flags_max_len < argc) nonoption_flags_max_len = argc; __getopt_nonoption_flags = (char *) malloc (nonoption_flags_max_len); if (__getopt_nonoption_flags == NULL) nonoption_flags_max_len = -1; else { memcpy (__getopt_nonoption_flags, orig_str, len); memset (__getopt_nonoption_flags + len, '\0', nonoption_flags_max_len - len); } } } nonoption_flags_len = nonoption_flags_max_len; } else nonoption_flags_len = 0; #endif return optstring; } /* Scan elements of ARGV (whose length is ARGC) for option characters given in OPTSTRING. If an element of ARGV starts with '-', and is not exactly "-" or "--", then it is an option element. The characters of this element (aside from the initial '-') are option characters. If `getopt' is called repeatedly, it returns successively each of the option characters from each of the option elements. If `getopt' finds another option character, it returns that character, updating `optind' and `nextchar' so that the next call to `getopt' can resume the scan with the following option character or ARGV-element. If there are no more option characters, `getopt' returns -1. Then `optind' is the index in ARGV of the first ARGV-element that is not an option. (The ARGV-elements have been permuted so that those that are not options now come last.) OPTSTRING is a string containing the legitimate option characters. If an option character is seen that is not listed in OPTSTRING, return '?' after printing an error message. If you set `opterr' to zero, the error message is suppressed but we still return '?'. If a char in OPTSTRING is followed by a colon, that means it wants an arg, so the following text in the same ARGV-element, or the text of the following ARGV-element, is returned in `optarg'. Two colons mean an option that wants an optional arg; if there is text in the current ARGV-element, it is returned in `optarg', otherwise `optarg' is set to zero. If OPTSTRING starts with `-' or `+', it requests different methods of handling the non-option ARGV-elements. See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. Long-named options begin with `--' instead of `-'. Their names may be abbreviated as long as the abbreviation is unique or is an exact match for some defined option. If they have an argument, it follows the option name in the same ARGV-element, separated from the option name by a `=', or else the in next ARGV-element. When `getopt' finds a long-named option, it returns 0 if that option's `flag' field is nonzero, the value of the option's `val' field if the `flag' field is zero. The elements of ARGV aren't really const, because we permute them. But we pretend they're const in the prototype to be compatible with other systems. LONGOPTS is a vector of `struct option' terminated by an element containing a name which is zero. LONGIND returns the index in LONGOPT of the long-named option found. It is only valid when a long-named option has been found by the most recent call. If LONG_ONLY is nonzero, '-' as well as '--' can introduce long-named options. */ int _getopt_internal (argc, argv, optstring, longopts, longind, long_only) int argc; char *const *argv; const char *optstring; const struct option *longopts; int *longind; int long_only; { int print_errors = opterr; if (optstring[0] == ':') print_errors = 0; optarg = NULL; if (optind == 0 || !__getopt_initialized) { if (optind == 0) optind = 1; /* Don't scan ARGV[0], the program name. */ optstring = _getopt_initialize (argc, argv, optstring); __getopt_initialized = 1; } /* Test whether ARGV[optind] points to a non-option argument. Either it does not have option syntax, or there is an environment flag from the shell indicating it is not an option. The later information is only used when the used in the GNU libc. */ #ifdef _LIBC # define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \ || (optind < nonoption_flags_len \ && __getopt_nonoption_flags[optind] == '1')) #else # define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0') #endif if (nextchar == NULL || *nextchar == '\0') { /* Advance to the next ARGV-element. */ /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been moved back by the user (who may also have changed the arguments). */ if (last_nonopt > optind) last_nonopt = optind; if (first_nonopt > optind) first_nonopt = optind; if (ordering == PERMUTE) { /* If we have just processed some options following some non-options, exchange them so that the options come first. */ if (first_nonopt != last_nonopt && last_nonopt != optind) exchange ((char **) argv); else if (last_nonopt != optind) first_nonopt = optind; /* Skip any additional non-options and extend the range of non-options previously skipped. */ while (optind < argc && NONOPTION_P) optind++; last_nonopt = optind; } /* The special ARGV-element `--' means premature end of options. Skip it like a null option, then exchange with previous non-options as if it were an option, then skip everything else like a non-option. */ if (optind != argc && !strcmp (argv[optind], "--")) { optind++; if (first_nonopt != last_nonopt && last_nonopt != optind) exchange ((char **) argv); else if (first_nonopt == last_nonopt) first_nonopt = optind; last_nonopt = argc; optind = argc; } /* If we have done all the ARGV-elements, stop the scan and back over any non-options that we skipped and permuted. */ if (optind == argc) { /* Set the next-arg-index to point at the non-options that we previously skipped, so the caller will digest them. */ if (first_nonopt != last_nonopt) optind = first_nonopt; return -1; } /* If we have come to a non-option and did not permute it, either stop the scan or describe it to the caller and pass it by. */ if (NONOPTION_P) { if (ordering == REQUIRE_ORDER) return -1; optarg = argv[optind++]; return 1; } /* We have found another option-ARGV-element. Skip the initial punctuation. */ nextchar = (argv[optind] + 1 + (longopts != NULL && argv[optind][1] == '-')); } /* Decode the current option-ARGV-element. */ /* Check whether the ARGV-element is a long option. If long_only and the ARGV-element has the form "-f", where f is a valid short option, don't consider it an abbreviated form of a long option that starts with f. Otherwise there would be no way to give the -f short option. On the other hand, if there's a long option "fubar" and the ARGV-element is "-fu", do consider that an abbreviation of the long option, just like "--fu", and not "-f" with arg "u". This distinction seems to be the most useful approach. */ if (longopts != NULL && (argv[optind][1] == '-' || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1]))))) { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = -1; int option_index; for (nameend = nextchar; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, nextchar, nameend - nextchar)) { if ((unsigned int) (nameend - nextchar) == (unsigned int) strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (print_errors) fprintf (stderr, _("%s: option `%s' is ambiguous\n"), argv[0], argv[optind]); nextchar += strlen (nextchar); optind++; optopt = 0; return '?'; } if (pfound != NULL) { option_index = indfound; optind++; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) optarg = nameend + 1; else { if (print_errors) { if (argv[optind - 1][1] == '-') /* --option */ fprintf (stderr, _("%s: option `--%s' doesn't allow an argument\n"), argv[0], pfound->name); else /* +option or -option */ fprintf (stderr, _("%s: option `%c%s' doesn't allow an argument\n"), argv[0], argv[optind - 1][0], pfound->name); } nextchar += strlen (nextchar); optopt = pfound->val; return '?'; } } else if (pfound->has_arg == 1) { if (optind < argc) optarg = argv[optind++]; else { if (print_errors) fprintf (stderr, _("%s: option `%s' requires an argument\n"), argv[0], argv[optind - 1]); nextchar += strlen (nextchar); optopt = pfound->val; return optstring[0] == ':' ? ':' : '?'; } } nextchar += strlen (nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } /* Can't find it as a long option. If this is not getopt_long_only, or the option starts with '--' or is not a valid short option, then it's an error. Otherwise interpret it as a short option. */ if (!long_only || argv[optind][1] == '-' || my_index (optstring, *nextchar) == NULL) { if (print_errors) { if (argv[optind][1] == '-') /* --option */ fprintf (stderr, _("%s: unrecognized option `--%s'\n"), argv[0], nextchar); else /* +option or -option */ fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), argv[0], argv[optind][0], nextchar); } nextchar = (char *) ""; optind++; optopt = 0; return '?'; } } /* Look at and handle the next short option-character. */ { char c = *nextchar++; char *temp = my_index (optstring, c); /* Increment `optind' when we start to process its last character. */ if (*nextchar == '\0') ++optind; if (temp == NULL || c == ':') { if (print_errors) { if (posixly_correct) /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c); else fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c); } optopt = c; return '?'; } /* Convenience. Treat POSIX -W foo same as long option --foo */ if (temp[0] == 'W' && temp[1] == ';') { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = 0; int option_index; /* This is an option that requires an argument. */ if (*nextchar != '\0') { optarg = nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ optind++; } else if (optind == argc) { if (print_errors) { /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); } optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; return c; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ optarg = argv[optind++]; /* optarg is now the argument, see if it's in the table of longopts. */ for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, nextchar, nameend - nextchar)) { if ((unsigned int) (nameend - nextchar) == strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (print_errors) fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"), argv[0], argv[optind]); nextchar += strlen (nextchar); optind++; return '?'; } if (pfound != NULL) { option_index = indfound; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) optarg = nameend + 1; else { if (print_errors) fprintf (stderr, _("%s: option `-W %s' doesn't allow an argument\n"), argv[0], pfound->name); nextchar += strlen (nextchar); return '?'; } } else if (pfound->has_arg == 1) { if (optind < argc) optarg = argv[optind++]; else { if (print_errors) fprintf (stderr, _("%s: option `%s' requires an argument\n"), argv[0], argv[optind - 1]); nextchar += strlen (nextchar); return optstring[0] == ':' ? ':' : '?'; } } nextchar += strlen (nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } nextchar = NULL; return 'W'; /* Let the application handle it. */ } if (temp[1] == ':') { if (temp[2] == ':') { /* This is an option that accepts an argument optionally. */ if (*nextchar != '\0') { optarg = nextchar; optind++; } else optarg = NULL; nextchar = NULL; } else { /* This is an option that requires an argument. */ if (*nextchar != '\0') { optarg = nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ optind++; } else if (optind == argc) { if (print_errors) { /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); } optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ optarg = argv[optind++]; nextchar = NULL; } } return c; } } int getopt (argc, argv, optstring) int argc; char *const *argv; const char *optstring; { return _getopt_internal (argc, argv, optstring, (const struct option *) 0, (int *) 0, 0); } #endif /* Not ELIDE_CODE. */ cabextract-1.11/AUTHORS0000644000175000017500000000106013330015232011532 00000000000000Principal author: Stuart Caie cabextract uses a cut-down version of the libmspack library, available at https://www.cabextract.org.uk/libmspack/ Japanese manual page by Katsumi Saito. Original manual page and Debian packaging by Eric Sharkey. FreeBSD packaging by Maxim Sovolev. NetBSD packaging by Ben Collver et al. SuSE packaging by Stefan Dirsch. RPM spec file by Soos Peter. cabextract uses GNU versions of the getopt_long() and fnmatch() functions, (C) Free Software Foundation, if not found as part of the operating system. cabextract-1.11/aclocal.m40000664000175000017500000042374614376123605012366 00000000000000# generated automatically by aclocal 1.16.5 -*- Autoconf -*- # Copyright (C) 1996-2021 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. 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.71],, [m4_warning([this file was generated for autoconf 2.71. 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'.])]) # host-cpu-c-abi.m4 serial 13 dnl Copyright (C) 2002-2020 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible and Sam Steingold. dnl Sets the HOST_CPU variable to the canonical name of the CPU. dnl Sets the HOST_CPU_C_ABI variable to the canonical name of the CPU with its dnl C language ABI (application binary interface). dnl Also defines __${HOST_CPU}__ and __${HOST_CPU_C_ABI}__ as C macros in dnl config.h. dnl dnl This canonical name can be used to select a particular assembly language dnl source file that will interoperate with C code on the given host. dnl dnl For example: dnl * 'i386' and 'sparc' are different canonical names, because code for i386 dnl will not run on SPARC CPUs and vice versa. They have different dnl instruction sets. dnl * 'sparc' and 'sparc64' are different canonical names, because code for dnl 'sparc' and code for 'sparc64' cannot be linked together: 'sparc' code dnl contains 32-bit instructions, whereas 'sparc64' code contains 64-bit dnl instructions. A process on a SPARC CPU can be in 32-bit mode or in 64-bit dnl mode, but not both. dnl * 'mips' and 'mipsn32' are different canonical names, because they use dnl different argument passing and return conventions for C functions, and dnl although the instruction set of 'mips' is a large subset of the dnl instruction set of 'mipsn32'. dnl * 'mipsn32' and 'mips64' are different canonical names, because they use dnl different sizes for the C types like 'int' and 'void *', and although dnl the instruction sets of 'mipsn32' and 'mips64' are the same. dnl * The same canonical name is used for different endiannesses. You can dnl determine the endianness through preprocessor symbols: dnl - 'arm': test __ARMEL__. dnl - 'mips', 'mipsn32', 'mips64': test _MIPSEB vs. _MIPSEL. dnl - 'powerpc64': test _BIG_ENDIAN vs. _LITTLE_ENDIAN. dnl * The same name 'i386' is used for CPUs of type i386, i486, i586 dnl (Pentium), AMD K7, Pentium II, Pentium IV, etc., because dnl - Instructions that do not exist on all of these CPUs (cmpxchg, dnl MMX, SSE, SSE2, 3DNow! etc.) are not frequently used. If your dnl assembly language source files use such instructions, you will dnl need to make the distinction. dnl - Speed of execution of the common instruction set is reasonable across dnl the entire family of CPUs. If you have assembly language source files dnl that are optimized for particular CPU types (like GNU gmp has), you dnl will need to make the distinction. dnl See . AC_DEFUN([gl_HOST_CPU_C_ABI], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([gl_C_ASM]) AC_CACHE_CHECK([host CPU and C ABI], [gl_cv_host_cpu_c_abi], [case "$host_cpu" in changequote(,)dnl i[34567]86 ) changequote([,])dnl gl_cv_host_cpu_c_abi=i386 ;; x86_64 ) # On x86_64 systems, the C compiler may be generating code in one of # these ABIs: # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64. # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64 # with native Windows (mingw, MSVC). # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32. # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if (defined __x86_64__ || defined __amd64__ \ || defined _M_X64 || defined _M_AMD64) int ok; #else error fail #endif ]])], [AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined __ILP32__ || defined _ILP32 int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=x86_64-x32], [gl_cv_host_cpu_c_abi=x86_64])], [gl_cv_host_cpu_c_abi=i386]) ;; changequote(,)dnl alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] ) changequote([,])dnl gl_cv_host_cpu_c_abi=alpha ;; arm* | aarch64 ) # Assume arm with EABI. # On arm64 systems, the C compiler may be generating code in one of # these ABIs: # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64. # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32. # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#ifdef __aarch64__ int ok; #else error fail #endif ]])], [AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined __ILP32__ || defined _ILP32 int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=arm64-ilp32], [gl_cv_host_cpu_c_abi=arm64])], [# Don't distinguish little-endian and big-endian arm, since they # don't require different machine code for simple operations and # since the user can distinguish them through the preprocessor # defines __ARMEL__ vs. __ARMEB__. # But distinguish arm which passes floating-point arguments and # return values in integer registers (r0, r1, ...) - this is # gcc -mfloat-abi=soft or gcc -mfloat-abi=softfp - from arm which # passes them in float registers (s0, s1, ...) and double registers # (d0, d1, ...) - this is gcc -mfloat-abi=hard. GCC 4.6 or newer # sets the preprocessor defines __ARM_PCS (for the first case) and # __ARM_PCS_VFP (for the second case), but older GCC does not. echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c # Look for a reference to the register d0 in the .s file. AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) >/dev/null 2>&1 if LC_ALL=C grep 'd0,' conftest.$gl_asmext >/dev/null; then gl_cv_host_cpu_c_abi=armhf else gl_cv_host_cpu_c_abi=arm fi rm -f conftest* ]) ;; hppa1.0 | hppa1.1 | hppa2.0* | hppa64 ) # On hppa, the C compiler may be generating 32-bit code or 64-bit # code. In the latter case, it defines _LP64 and __LP64__. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#ifdef __LP64__ int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=hppa64], [gl_cv_host_cpu_c_abi=hppa]) ;; ia64* ) # On ia64 on HP-UX, the C compiler may be generating 64-bit code or # 32-bit code. In the latter case, it defines _ILP32. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#ifdef _ILP32 int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=ia64-ilp32], [gl_cv_host_cpu_c_abi=ia64]) ;; mips* ) # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this # at 32. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64) int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=mips64], [# In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined (but # may later get defined by ), and _MIPS_SIM == _ABIN32. # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but # may later get defined by ), and _MIPS_SIM == _ABIO32. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if (_MIPS_SIM == _ABIN32) int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=mipsn32], [gl_cv_host_cpu_c_abi=mips])]) ;; powerpc* ) # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD. # No need to distinguish them here; the caller may distinguish # them based on the OS. # On powerpc64 systems, the C compiler may still be generating # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may # be generating 64-bit code. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined __powerpc64__ || defined _ARCH_PPC64 int ok; #else error fail #endif ]])], [# On powerpc64, there are two ABIs on Linux: The AIX compatible # one and the ELFv2 one. The latter defines _CALL_ELF=2. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined _CALL_ELF && _CALL_ELF == 2 int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=powerpc64-elfv2], [gl_cv_host_cpu_c_abi=powerpc64]) ], [gl_cv_host_cpu_c_abi=powerpc]) ;; rs6000 ) gl_cv_host_cpu_c_abi=powerpc ;; riscv32 | riscv64 ) # There are 2 architectures (with variants): rv32* and rv64*. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if __riscv_xlen == 64 int ok; #else error fail #endif ]])], [cpu=riscv64], [cpu=riscv32]) # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d. # Size of 'long' and 'void *': AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined __LP64__ int ok; #else error fail #endif ]])], [main_abi=lp64], [main_abi=ilp32]) # Float ABIs: # __riscv_float_abi_double: # 'float' and 'double' are passed in floating-point registers. # __riscv_float_abi_single: # 'float' are passed in floating-point registers. # __riscv_float_abi_soft: # No values are passed in floating-point registers. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined __riscv_float_abi_double int ok; #else error fail #endif ]])], [float_abi=d], [AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined __riscv_float_abi_single int ok; #else error fail #endif ]])], [float_abi=f], [float_abi='']) ]) gl_cv_host_cpu_c_abi="${cpu}-${main_abi}${float_abi}" ;; s390* ) # On s390x, the C compiler may be generating 64-bit (= s390x) code # or 31-bit (= s390) code. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined __LP64__ || defined __s390x__ int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=s390x], [gl_cv_host_cpu_c_abi=s390]) ;; sparc | sparc64 ) # UltraSPARCs running Linux have `uname -m` = "sparc64", but the # C compiler still generates 32-bit code. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined __sparcv9 || defined __arch64__ int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=sparc64], [gl_cv_host_cpu_c_abi=sparc]) ;; *) gl_cv_host_cpu_c_abi="$host_cpu" ;; esac ]) dnl In most cases, $HOST_CPU and $HOST_CPU_C_ABI are the same. HOST_CPU=`echo "$gl_cv_host_cpu_c_abi" | sed -e 's/-.*//'` HOST_CPU_C_ABI="$gl_cv_host_cpu_c_abi" AC_SUBST([HOST_CPU]) AC_SUBST([HOST_CPU_C_ABI]) # This was # AC_DEFINE_UNQUOTED([__${HOST_CPU}__]) # AC_DEFINE_UNQUOTED([__${HOST_CPU_C_ABI}__]) # earlier, but KAI C++ 3.2d doesn't like this. sed -e 's/-/_/g' >> confdefs.h < #include ]], [[iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);]])], [am_cv_func_iconv=yes]) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #include ]], [[iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);]])], [am_cv_lib_iconv=yes] [am_cv_func_iconv=yes]) LIBS="$am_save_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11, dnl Solaris 10. am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi am_cv_func_iconv_works=no for ac_iconv_const in '' 'const'; do AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[ #include #include #ifndef ICONV_CONST # define ICONV_CONST $ac_iconv_const #endif ]], [[int result = 0; /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 1; iconv_close (cd_utf8_to_88591); } } /* Test against Solaris 10 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\263"; char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 2; iconv_close (cd_ascii_to_88591); } } /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ { iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\304"; static char buf[2] = { (char)0xDE, (char)0xAD }; ICONV_CONST char *inptr = input; size_t inbytesleft = 1; char *outptr = buf; size_t outbytesleft = 1; size_t res = iconv (cd_88591_to_utf8, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) result |= 4; iconv_close (cd_88591_to_utf8); } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) result |= 8; iconv_close (cd_88591_to_utf8); } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ { /* Try standardized names. */ iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP"); /* Try IRIX, OSF/1 names. */ iconv_t cd2 = iconv_open ("UTF-8", "eucJP"); /* Try AIX names. */ iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP"); /* Try HP-UX names. */ iconv_t cd4 = iconv_open ("utf8", "eucJP"); if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1) && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1)) result |= 16; if (cd1 != (iconv_t)(-1)) iconv_close (cd1); if (cd2 != (iconv_t)(-1)) iconv_close (cd2); if (cd3 != (iconv_t)(-1)) iconv_close (cd3); if (cd4 != (iconv_t)(-1)) iconv_close (cd4); } return result; ]])], [am_cv_func_iconv_works=yes], , [case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac]) test "$am_cv_func_iconv_works" = no || break done LIBS="$am_save_LIBS" ]) case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then AC_DEFINE([HAVE_ICONV], [1], [Define if you have the iconv() function and it works.]) fi if test "$am_cv_lib_iconv" = yes; then AC_MSG_CHECKING([how to link with libiconv]) AC_MSG_RESULT([$LIBICONV]) else dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV dnl either. CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi AC_SUBST([LIBICONV]) AC_SUBST([LTLIBICONV]) ]) dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to dnl avoid warnings like dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". dnl This is tricky because of the way 'aclocal' is implemented: dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. dnl Otherwise aclocal's initial scan pass would miss the macro definition. dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. dnl Otherwise aclocal would emit many "Use of uninitialized value $1" dnl warnings. m4_define([gl_iconv_AC_DEFUN], m4_version_prereq([2.64], [[AC_DEFUN_ONCE( [$1], [$2])]], [m4_ifdef([gl_00GNULIB], [[AC_DEFUN_ONCE( [$1], [$2])]], [[AC_DEFUN( [$1], [$2])]])])) gl_iconv_AC_DEFUN([AM_ICONV], [ AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING([for iconv declaration]) AC_CACHE_VAL([am_cv_proto_iconv], [ AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif ]], [[]])], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"]) am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` AC_MSG_RESULT([ $am_cv_proto_iconv]) else dnl When compiling GNU libiconv on a system that does not have iconv yet, dnl pick the POSIX compliant declaration without 'const'. am_cv_proto_iconv_arg1="" fi AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], [Define as const if the declaration of iconv() needs const.]) dnl Also substitute ICONV_CONST in the gnulib generated . m4_ifdef([gl_ICONV_H_DEFAULTS], [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) if test -n "$am_cv_proto_iconv_arg1"; then ICONV_CONST="const" fi ]) ]) # lib-ld.m4 serial 9 dnl Copyright (C) 1996-2003, 2009-2020 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Subroutines of libtool.m4, dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid dnl collision with libtool.m4. dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no. AC_DEFUN([AC_LIB_PROG_LD_GNU], [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld], [# I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 /dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi if test -n "$LD"; then AC_MSG_CHECKING([for ld]) elif test "$GCC" = yes; then AC_MSG_CHECKING([for ld used by $CC]) elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi if test -n "$LD"; then # Let the user override the test with a path. : else AC_CACHE_VAL([acl_cv_path_LD], [ acl_cv_path_LD= # Final result of this test ac_prog=ld # Program to search in $PATH if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) acl_output=`($CC -print-prog-name=ld) 2>&5` ;; esac case $acl_output in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'` while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do acl_output=`echo $acl_output | sed "s%$re_direlt%/%"` done # Got the pathname. No search in PATH is needed. acl_cv_path_LD="$acl_output" ac_prog= ;; "") # If it fails, then pretend we aren't using GCC. ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac fi if test -n "$ac_prog"; then # Search for $ac_prog in $PATH. acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$acl_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done ]) wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" dnl Determine whether the user wants rpath handling at all. AC_ARG_ENABLE([rpath], [ --disable-rpath do not hardcode runtime library paths], :, enable_rpath=yes) ]) dnl AC_LIB_FROMPACKAGE(name, package) dnl declares that libname comes from the given package. The configure file dnl will then not have a --with-libname-prefix option but a dnl --with-package-prefix option. Several libraries can come from the same dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar dnl macro call that searches for libname. AC_DEFUN([AC_LIB_FROMPACKAGE], [ pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) define([acl_frompackage_]NAME, [$2]) popdef([NAME]) pushdef([PACK],[$2]) pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) define([acl_libsinpackage_]PACKUP, m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1]) popdef([PACKUP]) popdef([PACK]) ]) dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" ]) AC_ARG_WITH(PACK[-prefix], [[ --with-]]PACK[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib --without-]]PACK[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" additional_libdir2="$withval/$acl_libdirstem2" additional_libdir3="$withval/$acl_libdirstem3" fi fi ]) if test "X$additional_libdir2" = "X$additional_libdir"; then additional_libdir2= fi if test "X$additional_libdir3" = "X$additional_libdir"; then additional_libdir3= fi dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Using breadth-first-seach. LIB[]NAME= LTLIB[]NAME= INC[]NAME= LIB[]NAME[]_PREFIX= dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been dnl computed. So it has to be reset here. HAVE_LIB[]NAME= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='$1 $2' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" dnl See if it was already located by an earlier AC_LIB_LINKFLAGS dnl or AC_LIB_HAVE_LINKFLAGS call. uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" else dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined dnl that this library doesn't exist. So just drop it. : fi else dnl Search the library lib$name in $additional_libdir and $LDFLAGS dnl and the already constructed $LIBNAME/$LTLIBNAME. found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do if test "X$found_dir" = "X"; then eval dir=\$$additional_libdir_variable if test -n "$dir"; then dnl The same code as in the loop below: dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi fi done fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then dnl Found the library. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the dnl standard /usr/lib. if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2" \ || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl Use an explicit option to hardcode DIR into the resulting dnl binary. dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi dnl The hardcoding into $LIBNAME is system dependent. if test "$acl_hardcode_direct" = yes; then dnl Using DIR/libNAME.so during linking hardcodes DIR into the dnl resulting binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode DIR into the resulting dnl binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else dnl Rely on "-L$found_dir". dnl But don't add it if it's already contained in the LDFLAGS dnl or the already constructed $LIBNAME haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH dnl here, because this doesn't fit in flags passed to the dnl compiler. So give up. No hardcoding. This affects only dnl very old systems. dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then dnl Linking with a static library. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" else dnl We shouldn't come here, but anyway it's good to have a dnl fallback. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" fi fi dnl Assume the include files are nearby. additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem3 | */$acl_libdirstem3/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then dnl Potentially add $additional_includedir to $INCNAME. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's /usr/local/include and we are using GCC on Linux, dnl 3. if it's already present in $CPPFLAGS or the already dnl constructed $INCNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INC[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $INCNAME. INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" fi fi fi fi fi dnl Look for dependencies. if test -n "$found_la"; then dnl Read the .la file. It defines the variables dnl dlname, library_names, old_library, dependency_libs, current, dnl age, revision, installed, dlopen, dlpreopen, libdir. save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" dnl We use only dependency_libs. for dep in $dependency_libs; do case "$dep" in -L*) dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'` dnl Potentially add $dependency_libdir to $LIBNAME and $LTLIBNAME. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's /usr/local/lib and we are using GCC on Linux, dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then haveit= if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$dependency_libdir"; then dnl Really add $dependency_libdir to $LIBNAME. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$dependency_libdir" fi fi haveit= for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$dependency_libdir"; then dnl Really add $dependency_libdir to $LTLIBNAME. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$dependency_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) dnl Handle this in the next round. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) dnl Handle this in the next round. Throw away the .la's dnl directory; it is already contained in a preceding -L dnl option. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) dnl Most likely an immediate library name. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" ;; esac done fi else dnl Didn't find the library; assume it is in the system directories dnl known to the linker and runtime loader. (All the system dnl directories known to the linker should also be known to the dnl runtime loader, otherwise the system is severely misconfigured.) LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user must dnl pass all path elements in one option. We can arrange that for a dnl single library, but not when more than one $LIBNAMEs are used. alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" else dnl The -rpath options are cumulative. for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then dnl When using libtool, the option that works for both libraries and dnl executables is -R. The -R options are cumulative. for found_dir in $ltrpathdirs; do LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" done fi popdef([PACKLIBS]) popdef([PACKUP]) popdef([PACK]) popdef([NAME]) ]) dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, dnl unless already present in VAR. dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes dnl contains two or three consecutive elements that belong together. AC_DEFUN([AC_LIB_APPENDTOVAR], [ for element in [$2]; do haveit= for x in $[$1]; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then [$1]="${[$1]}${[$1]:+ }$element" fi done ]) dnl For those cases where a variable contains several -L and -l options dnl referring to unknown libraries and directories, this macro determines the dnl necessary additional linker options for the runtime path. dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) dnl sets LDADDVAR to linker options needed together with LIBSVALUE. dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, dnl otherwise linking without libtool is assumed. AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], [ AC_REQUIRE([AC_LIB_RPATH]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) $1= if test "$enable_rpath" != no; then if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode directories into the resulting dnl binary. rpathdirs= next= for opt in $2; do if test -n "$next"; then dir="$next" dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ && test "X$dir" != "X/usr/$acl_libdirstem2" \ && test "X$dir" != "X/usr/$acl_libdirstem3"; then rpathdirs="$rpathdirs $dir" fi next= else case $opt in -L) next=yes ;; -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ && test "X$dir" != "X/usr/$acl_libdirstem2" \ && test "X$dir" != "X/usr/$acl_libdirstem3"; then rpathdirs="$rpathdirs $dir" fi next= ;; *) next= ;; esac fi done if test "X$rpathdirs" != "X"; then if test -n ""$3""; then dnl libtool is used for linking. Use -R options. for dir in $rpathdirs; do $1="${$1}${$1:+ }-R$dir" done else dnl The linker is used for linking directly. if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user dnl must pass all path elements in one option. alldirs= for dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="$flag" else dnl The -rpath options are cumulative. for dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="${$1}${$1:+ }$flag" done fi fi fi fi fi AC_SUBST([$1]) ]) # lib-prefix.m4 serial 17 dnl Copyright (C) 2001-2005, 2008-2020 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl to access previously installed libraries. The basic assumption is that dnl a user will want packages to use other packages he previously installed dnl with the same --prefix option. dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate dnl libraries, but is otherwise very convenient. AC_DEFUN([AC_LIB_PREFIX], [ AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_ARG_WITH([lib-prefix], [[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib --without-lib-prefix don't search for libraries in includedir and libdir]], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi ]) if test $use_additional = yes; then dnl Potentially add $additional_includedir to $CPPFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's already present in $CPPFLAGS, dnl 3. if it's /usr/local/include and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= for x in $CPPFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $CPPFLAGS. CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" fi fi fi fi dnl Potentially add $additional_libdir to $LDFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's already present in $LDFLAGS, dnl 3. if it's /usr/local/lib and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= for x in $LDFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LDFLAGS. LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" fi fi fi fi fi ]) dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, dnl acl_final_exec_prefix, containing the values to which $prefix and dnl $exec_prefix will expand at the end of the configure script. AC_DEFUN([AC_LIB_PREPARE_PREFIX], [ dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" ]) dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the dnl variables prefix and exec_prefix bound to the values they will have dnl at the end of the configure script. AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], [ acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" $1 exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" ]) dnl AC_LIB_PREPARE_MULTILIB creates dnl - a function acl_is_expected_elfclass, that tests whether standard input dn; has a 32-bit or 64-bit ELF header, depending on the host CPU ABI, dnl - 3 variables acl_libdirstem, acl_libdirstem2, acl_libdirstem3, containing dnl the basename of the libdir to try in turn, either "lib" or "lib64" or dnl "lib/64" or "lib32" or "lib/sparcv9" or "lib/amd64" or similar. AC_DEFUN([AC_LIB_PREPARE_MULTILIB], [ dnl There is no formal standard regarding lib, lib32, and lib64. dnl On most glibc systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. However, on dnl Arch Linux based distributions, it's the opposite: 32-bit libraries go dnl under $prefix/lib32 and 64-bit libraries go under $prefix/lib. dnl We determine the compiler's default mode by looking at the compiler's dnl library search path. If at least one of its elements ends in /lib64 or dnl points to a directory whose absolute pathname ends in /lib64, we use that dnl for 64-bit ABIs. Similarly for 32-bit ABIs. Otherwise we use the default, dnl namely "lib". dnl On Solaris systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([gl_HOST_CPU_C_ABI_32BIT]) AC_CACHE_CHECK([for ELF binary format], [gl_cv_elf], [AC_EGREP_CPP([Extensible Linking Format], [#ifdef __ELF__ Extensible Linking Format #endif ], [gl_cv_elf=yes], [gl_cv_elf=no]) ]) if test $gl_cv_elf; then # Extract the ELF class of a file (5th byte) in decimal. # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header if od -A x < /dev/null >/dev/null 2>/dev/null; then # Use POSIX od. func_elfclass () { od -A n -t d1 -j 4 -N 1 } else # Use BSD hexdump. func_elfclass () { dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "' echo } fi changequote(,)dnl case $HOST_CPU_C_ABI_32BIT in yes) # 32-bit ABI. acl_is_expected_elfclass () { test "`func_elfclass | sed -e 's/[ ]//g'`" = 1 } ;; no) # 64-bit ABI. acl_is_expected_elfclass () { test "`func_elfclass | sed -e 's/[ ]//g'`" = 2 } ;; *) # Unknown. acl_is_expected_elfclass () { : } ;; esac changequote([,])dnl else acl_is_expected_elfclass () { : } fi dnl Allow the user to override the result by setting acl_cv_libdirstems. AC_CACHE_CHECK([for the common suffixes of directories in the library search path], [acl_cv_libdirstems], [dnl Try 'lib' first, because that's the default for libdir in GNU, see dnl . acl_libdirstem=lib acl_libdirstem2= acl_libdirstem3= case "$host_os" in solaris*) dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment dnl . dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the dnl symlink is missing, so we set acl_libdirstem2 too. if test $HOST_CPU_C_ABI_32BIT = no; then acl_libdirstem2=lib/64 case "$host_cpu" in sparc*) acl_libdirstem3=lib/sparcv9 ;; i*86 | x86_64) acl_libdirstem3=lib/amd64 ;; esac fi ;; *) dnl If $CC generates code for a 32-bit ABI, the libraries are dnl surely under $prefix/lib or $prefix/lib32, not $prefix/lib64. dnl Similarly, if $CC generates code for a 64-bit ABI, the libraries dnl are surely under $prefix/lib or $prefix/lib64, not $prefix/lib32. dnl Find the compiler's search path. However, non-system compilers dnl sometimes have odd library search paths. But we can't simply invoke dnl '/usr/bin/gcc -print-search-dirs' because that would not take into dnl account the -m32/-m31 or -m64 options from the $CC or $CFLAGS. searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \ | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test $HOST_CPU_C_ABI_32BIT != no; then # 32-bit or unknown ABI. if test -d /usr/lib32; then acl_libdirstem2=lib32 fi fi if test $HOST_CPU_C_ABI_32BIT != yes; then # 64-bit or unknown ABI. if test -d /usr/lib64; then acl_libdirstem3=lib64 fi fi if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;; */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;; */../ | */.. ) # Better ignore directories of this form. They are misleading. ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib32 ) acl_libdirstem2=lib32 ;; */lib64 ) acl_libdirstem3=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" if test $HOST_CPU_C_ABI_32BIT = yes; then # 32-bit ABI. acl_libdirstem3= fi if test $HOST_CPU_C_ABI_32BIT = no; then # 64-bit ABI. acl_libdirstem2= fi fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem" acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3" ]) dnl Decompose acl_cv_libdirstems into acl_libdirstem, acl_libdirstem2, and dnl acl_libdirstem3. changequote(,)dnl acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'` acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'` changequote([,])dnl ]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 11 (pkg-config-0.29.1) dnl Copyright © 2004 Scott James Remnant . dnl Copyright © 2012-2015 Dan Nicholson dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU dnl General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA dnl 02111-1307, USA. dnl dnl As a special exception to the GNU General Public License, if you dnl distribute this file as part of a program that contains a dnl configuration script generated by Autoconf, you may include it under dnl the same distribution terms that you use for the rest of that dnl program. dnl PKG_PREREQ(MIN-VERSION) dnl ----------------------- dnl Since: 0.29 dnl dnl Verify that the version of the pkg-config macros are at least dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's dnl installed version of pkg-config, this checks the developer's version dnl of pkg.m4 when generating configure. dnl dnl To ensure that this macro is defined, also add: dnl m4_ifndef([PKG_PREREQ], dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) dnl dnl See the "Since" comment for each macro you use to see what version dnl of the macros you require. m4_defun([PKG_PREREQ], [m4_define([PKG_MACROS_VERSION], [0.29.1]) m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) ])dnl PKG_PREREQ dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) dnl ---------------------------------- dnl Since: 0.16 dnl dnl Search for the pkg-config tool and set the PKG_CONFIG variable to dnl first found in the path. Checks that the version of pkg-config found dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is dnl used since that's the first version where most current features of dnl pkg-config existed. AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])dnl PKG_PROG_PKG_CONFIG dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------------------------------- dnl Since: 0.18 dnl dnl Check to see whether a particular set of modules exists. Similar to dnl PKG_CHECK_MODULES(), but does not set variables or print errors. dnl dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) dnl only at the first occurence in configure.ac, so if the first place dnl it's called might be skipped (such as if it is within an "if", you dnl have to call PKG_CHECK_EXISTS manually AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) dnl --------------------------------------------- dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting dnl pkg_failed based on the result. m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])dnl _PKG_CONFIG dnl _PKG_SHORT_ERRORS_SUPPORTED dnl --------------------------- dnl Internal check to see if pkg-config supports short errors. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])dnl _PKG_SHORT_ERRORS_SUPPORTED dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl -------------------------------------------------------------- dnl Since: 0.4.0 dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES might not happen, you should be sure to include an dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])dnl PKG_CHECK_MODULES dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl --------------------------------------------------------------------- dnl Since: 0.29 dnl dnl Checks for existence of MODULES and gathers its build flags with dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags dnl and VARIABLE-PREFIX_LIBS from --libs. dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to dnl include an explicit call to PKG_PROG_PKG_CONFIG in your dnl configure.ac. AC_DEFUN([PKG_CHECK_MODULES_STATIC], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl _save_PKG_CONFIG=$PKG_CONFIG PKG_CONFIG="$PKG_CONFIG --static" PKG_CHECK_MODULES($@) PKG_CONFIG=$_save_PKG_CONFIG[]dnl ])dnl PKG_CHECK_MODULES_STATIC dnl PKG_INSTALLDIR([DIRECTORY]) dnl ------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable pkgconfigdir as the location where a module dnl should install pkg-config .pc files. By default the directory is dnl $libdir/pkgconfig, but the default can be changed by passing dnl DIRECTORY. The user can override through the --with-pkgconfigdir dnl parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([pkgconfigdir], [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, [with_pkgconfigdir=]pkg_default) AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_INSTALLDIR dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) dnl -------------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable noarch_pkgconfigdir as the location where a dnl module should install arch-independent pkg-config .pc files. By dnl default the directory is $datadir/pkgconfig, but the default can be dnl changed by passing DIRECTORY. The user can override through the dnl --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([noarch-pkgconfigdir], [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, [with_noarch_pkgconfigdir=]pkg_default) AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_NOARCH_INSTALLDIR dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------- dnl Since: 0.28 dnl dnl Retrieves the value of the pkg-config variable for the given module. AC_DEFUN([PKG_CHECK_VAR], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl _PKG_CONFIG([$1], [variable="][$3]["], [$2]) AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ])dnl PKG_CHECK_VAR dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], dnl [DESCRIPTION], [DEFAULT]) dnl ------------------------------------------ dnl dnl Prepare a "--with-" configure option using the lowercase dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and dnl PKG_CHECK_MODULES in a single macro. AC_DEFUN([PKG_WITH_MODULES], [ m4_pushdef([with_arg], m4_tolower([$1])) m4_pushdef([description], [m4_default([$5], [build with ]with_arg[ support])]) m4_pushdef([def_arg], [m4_default([$6], [auto])]) m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) m4_case(def_arg, [yes],[m4_pushdef([with_without], [--without-]with_arg)], [m4_pushdef([with_without],[--with-]with_arg)]) AC_ARG_WITH(with_arg, AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, [AS_TR_SH([with_]with_arg)=def_arg]) AS_CASE([$AS_TR_SH([with_]with_arg)], [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], [auto],[PKG_CHECK_MODULES([$1],[$2], [m4_n([def_action_if_found]) $3], [m4_n([def_action_if_not_found]) $4])]) m4_popdef([with_arg]) m4_popdef([description]) m4_popdef([def_arg]) ])dnl PKG_WITH_MODULES dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, dnl [DESCRIPTION], [DEFAULT]) dnl ----------------------------------------------- dnl dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES dnl check._[VARIABLE-PREFIX] is exported as make variable. AC_DEFUN([PKG_HAVE_WITH_MODULES], [ PKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) AM_CONDITIONAL([HAVE_][$1], [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) ])dnl PKG_HAVE_WITH_MODULES dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, dnl [DESCRIPTION], [DEFAULT]) dnl ------------------------------------------------------ dnl dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make dnl and preprocessor variable. AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], [ PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) ])dnl PKG_HAVE_DEFINE_WITH_MODULES # Copyright (C) 2002-2021 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_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # 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.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.16.5], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_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.16.5])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # Copyright (C) 2011-2021 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_AR([ACT-IF-FAIL]) # ------------------------- # Try to determine the archiver interface, and trigger the ar-lib wrapper # if it is needed. If the detection of archiver interface fails, run # ACT-IF-FAIL (default is to abort configure with a proper error message). AC_DEFUN([AM_PROG_AR], [AC_BEFORE([$0], [LT_INIT])dnl AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([ar-lib])dnl AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) : ${AR=ar} AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], [AC_LANG_PUSH([C]) am_cv_ar_interface=ar AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([am_ar_try]) if test "$ac_status" -eq 0; then am_cv_ar_interface=ar else am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([am_ar_try]) if test "$ac_status" -eq 0; then am_cv_ar_interface=lib else am_cv_ar_interface=unknown fi fi rm -f conftest.lib libconftest.a ]) AC_LANG_POP([C])]) case $am_cv_ar_interface in ar) ;; lib) # Microsoft lib, so override with the ar-lib wrapper script. # FIXME: It is wrong to rewrite AR. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__AR in this case, # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something # similar. AR="$am_aux_dir/ar-lib $AR" ;; unknown) m4_default([$1], [AC_MSG_ERROR([could not determine $AR interface])]) ;; esac AC_SUBST([AR])dnl ]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2021 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. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2021 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_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2021 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. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [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 # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # 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 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 if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2021 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_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. AS_CASE([$CONFIG_FILES], [*\'*], [eval set x "$CONFIG_FILES"], [*], [set x $CONFIG_FILES]) shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. 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 # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`AS_DIRNAME(["$am_mf"])` am_filepart=`AS_BASENAME(["$am_mf"])` AM_RUN_LOG([cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles]) || am_rc=$? 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 '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi AS_UNSET([am_dirpart]) AS_UNSET([am_filepart]) AS_UNSET([am_mf]) AS_UNSET([am_rc]) rm -f conftest-deps.mk } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking is enabled. # This creates each '.Po' and '.Plo' makefile fragment that we'll need in # order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2021 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. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # 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 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_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]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. 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_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([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 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. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # 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. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2021 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_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2021 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. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2021 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_MAKE_INCLUDE() # ----------------- # Check whether make has an 'include' directive that can support all # the idioms we need for our automatic dependency tracking code. AC_DEFUN([AM_MAKE_INCLUDE], [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) AS_CASE([$?:`cat confinc.out 2>/dev/null`], ['0:this is the am__doit target'], [AS_CASE([$s], [BSD], [am__include='.include' am__quote='"'], [am__include='include' am__quote=''])]) if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* AC_MSG_RESULT([${_am_result}]) AC_SUBST([am__include])]) AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2021 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_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. 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'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2021 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_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2021 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_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2021 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_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2021 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_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [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_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). 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 # 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= 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 # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2021 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([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")]) 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. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 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 ]) # Copyright (C) 2001-2021 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_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2021 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_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2021 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_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# 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` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # 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_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -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 $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -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_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([acinclude.m4]) cabextract-1.11/md5.c0000664000175000017500000003566013370030217011336 00000000000000/* md5.c - Functions to compute MD5 message digest of files or memory blocks according to the definition of MD5 in RFC 1321 from April 1992. Copyright (C) 1995, 1996, 2001, 2003 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu. 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 2, or (at your option) any later version. 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, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Written by Ulrich Drepper , 1995. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #ifdef _LIBC # include # if __BYTE_ORDER == __BIG_ENDIAN # define WORDS_BIGENDIAN 1 # endif /* We need to keep the namespace clean so define the MD5 function protected using leading __ . */ # define md5_init_ctx __md5_init_ctx # define md5_process_block __md5_process_block # define md5_process_bytes __md5_process_bytes # define md5_finish_ctx __md5_finish_ctx # define md5_read_ctx __md5_read_ctx # define md5_stream __md5_stream # define md5_buffer __md5_buffer #endif #ifdef WORDS_BIGENDIAN # define SWAP(n) \ (((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24)) #else # define SWAP(n) (n) #endif #define BLOCKSIZE 4096 /* Ensure that BLOCKSIZE is a multiple of 64. */ #if BLOCKSIZE % 64 != 0 /* FIXME-someday (soon?): use #error instead of this kludge. */ "invalid BLOCKSIZE" #endif /* This array contains the bytes used to pad the buffer to the next 64-byte boundary. (RFC 1321, 3.1: Step 1) */ static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ }; /* Initialize structure containing state of computation. (RFC 1321, 3.3: Step 3) */ void md5_init_ctx (struct md5_ctx *ctx) { ctx->A = 0x67452301; ctx->B = 0xefcdab89; ctx->C = 0x98badcfe; ctx->D = 0x10325476; ctx->total[0] = ctx->total[1] = 0; ctx->buflen = 0; } /* Put result from CTX in first 16 bytes following RESBUF. The result must be in little endian byte order. IMPORTANT: On some systems it is required that RESBUF is correctly aligned for a 32 bits value. */ void * md5_read_ctx (const struct md5_ctx *ctx, void *resbuf) { ((md5_uint32 *) resbuf)[0] = SWAP (ctx->A); ((md5_uint32 *) resbuf)[1] = SWAP (ctx->B); ((md5_uint32 *) resbuf)[2] = SWAP (ctx->C); ((md5_uint32 *) resbuf)[3] = SWAP (ctx->D); return resbuf; } /* Process the remaining bytes in the internal buffer and the usual prolog according to the standard and write the result to RESBUF. IMPORTANT: On some systems it is required that RESBUF is correctly aligned for a 32 bits value. */ void * md5_finish_ctx (struct md5_ctx *ctx, void *resbuf) { /* Take yet unprocessed bytes into account. */ md5_uint32 bytes = ctx->buflen; size_t pad; /* Now count remaining bytes. */ ctx->total[0] += bytes; if (ctx->total[0] < bytes) ++ctx->total[1]; pad = bytes >= 56 ? 64 + 56 - bytes : 56 - bytes; memcpy (&ctx->buffer[bytes], fillbuf, pad); /* Put the 64-bit file length in *bits* at the end of the buffer. */ *(md5_uint32 *) &ctx->buffer[bytes + pad] = SWAP (ctx->total[0] << 3); *(md5_uint32 *) &ctx->buffer[bytes + pad + 4] = SWAP ((ctx->total[1] << 3) | (ctx->total[0] >> 29)); /* Process last bytes. */ md5_process_block (ctx->buffer, bytes + pad + 8, ctx); return md5_read_ctx (ctx, resbuf); } /* Compute MD5 message digest for bytes read from STREAM. The resulting message digest number will be written into the 16 bytes beginning at RESBLOCK. */ int md5_stream (FILE *stream, void *resblock) { struct md5_ctx ctx; char buffer[BLOCKSIZE + 72]; size_t sum; /* Initialize the computation context. */ md5_init_ctx (&ctx); /* Iterate over full file contents. */ while (1) { /* We read the file in blocks of BLOCKSIZE bytes. One call of the computation function processes the whole buffer so that with the next round of the loop another block can be read. */ size_t n; sum = 0; /* Read block. Take care for partial reads. */ while (1) { n = fread (buffer + sum, 1, BLOCKSIZE - sum, stream); sum += n; if (sum == BLOCKSIZE) break; if (n == 0) { /* Check for the error flag IFF N == 0, so that we don't exit the loop after a partial read due to e.g., EAGAIN or EWOULDBLOCK. */ if (ferror (stream)) return 1; goto process_partial_block; } /* We've read at least one byte, so ignore errors. But always check for EOF, since feof may be true even though N > 0. Otherwise, we could end up calling fread after EOF. */ if (feof (stream)) goto process_partial_block; } /* Process buffer with BLOCKSIZE bytes. Note that BLOCKSIZE % 64 == 0 */ md5_process_block (buffer, BLOCKSIZE, &ctx); } process_partial_block:; /* Process any remaining bytes. */ if (sum > 0) md5_process_bytes (buffer, sum, &ctx); /* Construct result in desired memory. */ md5_finish_ctx (&ctx, resblock); return 0; } /* Compute MD5 message digest for LEN bytes beginning at BUFFER. The result is always in little endian byte order, so that a byte-wise output yields to the wanted ASCII representation of the message digest. */ void * md5_buffer (const char *buffer, size_t len, void *resblock) { struct md5_ctx ctx; /* Initialize the computation context. */ md5_init_ctx (&ctx); /* Process whole buffer but last len % 64 bytes. */ md5_process_bytes (buffer, len, &ctx); /* Put result in desired memory area. */ return md5_finish_ctx (&ctx, resblock); } void md5_process_bytes ( const void *buffer, size_t len, struct md5_ctx *ctx) { /* When we already have some bits in our internal buffer concatenate both inputs first. */ if (ctx->buflen != 0) { size_t left_over = ctx->buflen; size_t add = 128 - left_over > len ? len : 128 - left_over; memcpy (&ctx->buffer[left_over], buffer, add); ctx->buflen += add; if (ctx->buflen > 64) { md5_process_block (ctx->buffer, ctx->buflen & ~63, ctx); ctx->buflen &= 63; /* The regions in the following copy operation cannot overlap. */ memcpy (ctx->buffer, &ctx->buffer[(left_over + add) & ~63], ctx->buflen); } buffer = (const char *) buffer + add; len -= add; } /* Process available complete blocks. */ if (len >= 64) { #if !_STRING_ARCH_unaligned /* To check alignment gcc has an appropriate operator. Other compilers don't. */ # if __GNUC__ >= 2 # define UNALIGNED_P(p) (((md5_uintptr) p) % __alignof__ (md5_uint32) != 0) # else # define UNALIGNED_P(p) (((md5_uintptr) p) % sizeof (md5_uint32) != 0) # endif if (UNALIGNED_P (buffer)) while (len > 64) { memcpy (ctx->buffer, buffer, 64); md5_process_block (ctx->buffer, 64, ctx); buffer = (const char *) buffer + 64; len -= 64; } else #endif { md5_process_block (buffer, len & ~63, ctx); buffer = (const char *) buffer + (len & ~63); len &= 63; } } /* Move remaining bytes in internal buffer. */ if (len > 0) { size_t left_over = ctx->buflen; memcpy (&ctx->buffer[left_over], buffer, len); left_over += len; if (left_over >= 64) { md5_process_block (ctx->buffer, 64, ctx); left_over -= 64; memcpy (ctx->buffer, &ctx->buffer[64], left_over); } ctx->buflen = left_over; } } /* These are the four functions used in the four steps of the MD5 algorithm and defined in the RFC 1321. The first function is a little bit optimized (as found in Colin Plumbs public domain implementation). */ /* #define FF(b, c, d) ((b & c) | (~b & d)) */ #define FF(b, c, d) (d ^ (b & (c ^ d))) #define FG(b, c, d) FF (d, b, c) #define FH(b, c, d) (b ^ c ^ d) #define FI(b, c, d) (c ^ (b | ~d)) /* Process LEN bytes of BUFFER, accumulating context into CTX. It is assumed that LEN % 64 == 0. */ void md5_process_block (const void *buffer, size_t len, struct md5_ctx *ctx) { md5_uint32 correct_words[16]; const md5_uint32 *words = (const md5_uint32 *) buffer; size_t nwords = len / sizeof (md5_uint32); const md5_uint32 *endp = words + nwords; md5_uint32 A = ctx->A; md5_uint32 B = ctx->B; md5_uint32 C = ctx->C; md5_uint32 D = ctx->D; /* First increment the byte count. RFC 1321 specifies the possible length of the file up to 2^64 bits. Here we only compute the number of bytes. Do a double word increment. */ ctx->total[0] += len; if (ctx->total[0] < len) ++ctx->total[1]; /* Process all bytes in the buffer with 64 bytes in each round of the loop. */ while (words < endp) { md5_uint32 *cwp = correct_words; md5_uint32 A_save = A; md5_uint32 B_save = B; md5_uint32 C_save = C; md5_uint32 D_save = D; /* First round: using the given function, the context and a constant the next context is computed. Because the algorithms processing unit is a 32-bit word and it is determined to work on words in little endian byte order we perhaps have to change the byte order before the computation. To reduce the work for the next steps we store the swapped words in the array CORRECT_WORDS. */ #define OP(a, b, c, d, s, T) \ do \ { \ a += FF (b, c, d) + (*cwp++ = SWAP (*words)) + T; \ ++words; \ a = rol (a, s); \ a += b; \ } \ while (0) /* Before we start, one word to the strange constants. They are defined in RFC 1321 as T[i] = (int) (4294967296.0 * fabs (sin (i))), i=1..64, or perl -e 'foreach(1..64){printf "0x%08x\n", int (4294967296 * abs (sin $_))}' */ /* Round 1. */ OP (A, B, C, D, 7, 0xd76aa478); OP (D, A, B, C, 12, 0xe8c7b756); OP (C, D, A, B, 17, 0x242070db); OP (B, C, D, A, 22, 0xc1bdceee); OP (A, B, C, D, 7, 0xf57c0faf); OP (D, A, B, C, 12, 0x4787c62a); OP (C, D, A, B, 17, 0xa8304613); OP (B, C, D, A, 22, 0xfd469501); OP (A, B, C, D, 7, 0x698098d8); OP (D, A, B, C, 12, 0x8b44f7af); OP (C, D, A, B, 17, 0xffff5bb1); OP (B, C, D, A, 22, 0x895cd7be); OP (A, B, C, D, 7, 0x6b901122); OP (D, A, B, C, 12, 0xfd987193); OP (C, D, A, B, 17, 0xa679438e); OP (B, C, D, A, 22, 0x49b40821); /* For the second to fourth round we have the possibly swapped words in CORRECT_WORDS. Redefine the macro to take an additional first argument specifying the function to use. */ #undef OP #define OP(f, a, b, c, d, k, s, T) \ do \ { \ a += f (b, c, d) + correct_words[k] + T; \ a = rol (a, s); \ a += b; \ } \ while (0) /* Round 2. */ OP (FG, A, B, C, D, 1, 5, 0xf61e2562); OP (FG, D, A, B, C, 6, 9, 0xc040b340); OP (FG, C, D, A, B, 11, 14, 0x265e5a51); OP (FG, B, C, D, A, 0, 20, 0xe9b6c7aa); OP (FG, A, B, C, D, 5, 5, 0xd62f105d); OP (FG, D, A, B, C, 10, 9, 0x02441453); OP (FG, C, D, A, B, 15, 14, 0xd8a1e681); OP (FG, B, C, D, A, 4, 20, 0xe7d3fbc8); OP (FG, A, B, C, D, 9, 5, 0x21e1cde6); OP (FG, D, A, B, C, 14, 9, 0xc33707d6); OP (FG, C, D, A, B, 3, 14, 0xf4d50d87); OP (FG, B, C, D, A, 8, 20, 0x455a14ed); OP (FG, A, B, C, D, 13, 5, 0xa9e3e905); OP (FG, D, A, B, C, 2, 9, 0xfcefa3f8); OP (FG, C, D, A, B, 7, 14, 0x676f02d9); OP (FG, B, C, D, A, 12, 20, 0x8d2a4c8a); /* Round 3. */ OP (FH, A, B, C, D, 5, 4, 0xfffa3942); OP (FH, D, A, B, C, 8, 11, 0x8771f681); OP (FH, C, D, A, B, 11, 16, 0x6d9d6122); OP (FH, B, C, D, A, 14, 23, 0xfde5380c); OP (FH, A, B, C, D, 1, 4, 0xa4beea44); OP (FH, D, A, B, C, 4, 11, 0x4bdecfa9); OP (FH, C, D, A, B, 7, 16, 0xf6bb4b60); OP (FH, B, C, D, A, 10, 23, 0xbebfbc70); OP (FH, A, B, C, D, 13, 4, 0x289b7ec6); OP (FH, D, A, B, C, 0, 11, 0xeaa127fa); OP (FH, C, D, A, B, 3, 16, 0xd4ef3085); OP (FH, B, C, D, A, 6, 23, 0x04881d05); OP (FH, A, B, C, D, 9, 4, 0xd9d4d039); OP (FH, D, A, B, C, 12, 11, 0xe6db99e5); OP (FH, C, D, A, B, 15, 16, 0x1fa27cf8); OP (FH, B, C, D, A, 2, 23, 0xc4ac5665); /* Round 4. */ OP (FI, A, B, C, D, 0, 6, 0xf4292244); OP (FI, D, A, B, C, 7, 10, 0x432aff97); OP (FI, C, D, A, B, 14, 15, 0xab9423a7); OP (FI, B, C, D, A, 5, 21, 0xfc93a039); OP (FI, A, B, C, D, 12, 6, 0x655b59c3); OP (FI, D, A, B, C, 3, 10, 0x8f0ccc92); OP (FI, C, D, A, B, 10, 15, 0xffeff47d); OP (FI, B, C, D, A, 1, 21, 0x85845dd1); OP (FI, A, B, C, D, 8, 6, 0x6fa87e4f); OP (FI, D, A, B, C, 15, 10, 0xfe2ce6e0); OP (FI, C, D, A, B, 6, 15, 0xa3014314); OP (FI, B, C, D, A, 13, 21, 0x4e0811a1); OP (FI, A, B, C, D, 4, 6, 0xf7537e82); OP (FI, D, A, B, C, 11, 10, 0xbd3af235); OP (FI, C, D, A, B, 2, 15, 0x2ad7d2bb); OP (FI, B, C, D, A, 9, 21, 0xeb86d391); /* Add the starting values of the context. */ A += A_save; B += B_save; C += C_save; D += D_save; } /* Put checksum in context given as argument. */ ctx->A = A; ctx->B = B; ctx->C = C; ctx->D = D; } cabextract-1.11/cabextract.spec.in0000644000175000017500000000161313323412475014103 00000000000000Summary: A program to extract Microsoft Cabinet files Name: cabextract Version: @VERSION@ Release: 1 License: GPL Group: Applications/Archiving Source: https://www.cabextract.org.uk/%{name}-%{version}.tar.gz URL: https://www.cabextract.org.uk/ Vendor: Stuart Caie Packager: Stuart Caie BuildRoot: %{_tmppath}/%{name}-%{version}-root Prefix: /usr %description Cabinet (.CAB) files are a form of archive, which Microsoft use to distribute their software, and things like Windows Font Packs. The cabextract program unpacks these files. %prep %setup %build CFLAGS=${RPM_OPT_FLAGS} ./configure --prefix=%{prefix} make %install rm -rf ${RPM_BUILD_ROOT} %makeinstall %clean [ ${RPM_BUILD_ROOT} != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(0644, root, root, 0755) %doc AUTHORS ChangeLog NEWS README %attr(0755, root, root) %{_bindir}/cabextract %{_mandir}/man1/cabextract.1* cabextract-1.11/getopt.h0000664000175000017500000001403313370030226012147 00000000000000/* Declarations for getopt. Copyright (C) 1989,90,91,92,93,94,96,97,98 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _GETOPT_H #ifndef __need_getopt # define _GETOPT_H 1 #endif #ifdef __cplusplus extern "C" { #endif /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ extern char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ extern int optind; /* Callers store zero here to inhibit the error message `getopt' prints for unrecognized options. */ extern int opterr; /* Set to an option character which was unrecognized. */ extern int optopt; #ifndef __need_getopt /* Describe the long-named options requested by the application. The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector of `struct option' terminated by an element containing a name which is zero. The field `has_arg' is: no_argument (or 0) if the option does not take an argument, required_argument (or 1) if the option requires an argument, optional_argument (or 2) if the option takes an optional argument. If the field `flag' is not NULL, it points to a variable that is set to the value given in the field `val' when the option is found, but left unchanged if the option is not found. To have a long-named option do something other than set an `int' to a compiled-in constant, such as set a value from `optarg', set the option's `flag' field to zero and its `val' field to a nonzero value (the equivalent single-letter option character, if there is one). For long options that have a zero `flag' field, `getopt' returns the contents of the `val' field. */ struct option { # if defined __STDC__ && __STDC__ const char *name; # else char *name; # endif /* has_arg can't be an enum because some compilers complain about type mismatches in all the code that assumes it is an int. */ int has_arg; int *flag; int val; }; /* Names for the values of the `has_arg' field of `struct option'. */ # define no_argument 0 # define required_argument 1 # define optional_argument 2 #endif /* need getopt */ /* Get definitions and prototypes for functions to process the arguments in ARGV (ARGC of them, minus the program name) for options given in OPTS. Return the option character from OPTS just read. Return -1 when there are no more options. For unrecognized options, or options missing arguments, `optopt' is set to the option letter, and '?' is returned. The OPTS string is a list of characters which are recognized option letters, optionally followed by colons, specifying that that letter takes an argument, to be placed in `optarg'. If a letter in OPTS is followed by two colons, its argument is optional. This behavior is specific to the GNU `getopt'. The argument `--' causes premature termination of argument scanning, explicitly telling `getopt' that there are no more options. If OPTS begins with `--', then non-option arguments are treated as arguments to the option '\0'. This behavior is specific to the GNU `getopt'. */ #if defined __STDC__ && __STDC__ # ifdef __GNU_LIBRARY__ /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ extern int getopt (int __argc, char *const *__argv, const char *__shortopts); # else /* not __GNU_LIBRARY__ */ extern int getopt (); # endif /* __GNU_LIBRARY__ */ # ifndef __need_getopt extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts, const struct option *__longopts, int *__longind); extern int getopt_long_only (int __argc, char *const *__argv, const char *__shortopts, const struct option *__longopts, int *__longind); /* Internal only. Users should not call this directly. */ extern int _getopt_internal (int __argc, char *const *__argv, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only); # endif #else /* not __STDC__ */ extern int getopt (); # ifndef __need_getopt extern int getopt_long (); extern int getopt_long_only (); extern int _getopt_internal (); # endif #endif /* __STDC__ */ #ifdef __cplusplus } #endif /* Make sure we later can get all the definitions and declarations. */ #undef __need_getopt #endif /* getopt.h */ cabextract-1.11/configure0000775000175000017500000107073214376123606012430 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.71 for cabextract 1.11. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, # Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh as_nop=: if test ${ZSH_VERSION+y} && (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 $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; 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 # The user is always right. if ${PATH_SEPARATOR+false} :; 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 || PATH_SEPARATOR=';' } fi # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) 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 -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' # 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 exit 1 fi # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; 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 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="as_nop=: if test \${ZSH_VERSION+y} && (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 \$as_nop case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 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 : else \$as_nop 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 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null then : as_have_required=yes else $as_nop as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null then : else $as_nop 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 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 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 : CONFIG_SHELL=$as_shell as_have_required=yes if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null then : break 2 fi fi done;; esac as_found=false done IFS=$as_save_IFS if $as_found then : else $as_nop if { test -f "$SHELL" || test -f "$SHELL.exe"; } && as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$SHELL as_have_required=yes fi fi 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 # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; 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 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." else printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and $0: kyzer@cabextract.org.uk about your system, including $0: any error possibly output before this message. Then $0: install a modern shell, or manually run the script $0: under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_nop # --------- # Do nothing but, unlike ":", preserve the value of $?. as_fn_nop () { return $? } as_nop=as_fn_nop # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $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" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # 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 : eval 'as_fn_append () { eval $1+=\$2 }' else $as_nop as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # 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 : eval 'as_fn_arith () { as_val=$(( $* )) }' else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_nop # --------- # Do nothing but, unlike ":", preserve the value of $?. as_fn_nop () { return $? } as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. 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 fi printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop 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; } # 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 # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. 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*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) 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 else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi 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'. 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 as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. 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_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='cabextract' PACKAGE_TARNAME='cabextract' PACKAGE_VERSION='1.11' PACKAGE_STRING='cabextract 1.11' PACKAGE_BUGREPORT='kyzer@cabextract.org.uk' PACKAGE_URL='' ac_unique_file="src/cabextract.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_STDIO_H # include #endif #ifdef HAVE_STDLIB_H # include #endif #ifdef HAVE_STRING_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_func_c_list= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS EXTERNAL_LIBMSPACK_FALSE EXTERNAL_LIBMSPACK_TRUE libmspack_LIBS libmspack_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG LTLIBICONV LIBICONV EGREP GREP CPP host_os host_vendor host_cpu host build_os build_vendor build_cpu build ALLOCA LIBOBJS RANLIB ac_ct_AR AR am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V CSCOPE ETAGS CTAGS am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir runstatedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL am__quote' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_dependency_tracking enable_largefile with_gnu_ld enable_rpath with_libiconv_prefix with_external_libmspack ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR libmspack_CFLAGS libmspack_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' 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}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) 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'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) 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'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -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=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) 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'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) 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'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --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" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # 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'" ;; 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 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi 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 ;; esac fi # Check all directory arguments for consistency. 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 do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac 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' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $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" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi 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_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # 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 cabextract 1.11 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --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 --cache-file=FILE cache test results in FILE [disabled] -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 \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --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'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --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] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/cabextract] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of cabextract 1.11:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --disable-largefile omit support for large files --disable-rpath do not hardcode runtime library paths 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-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir --with-external-libmspack use external libmspack (default no) Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path libmspack_CFLAGS C compiler flags for libmspack, overriding pkg-config libmspack_LIBS linker flags for libmspack, overriding pkg-config 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 . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. 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|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`printf "%s\n" "$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/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; 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. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF cabextract configure 1.11 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. 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 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 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$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 : ac_retval=0 else $as_nop printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. 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 $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" else $as_nop eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam 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; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_run LINENO # ---------------------- # Try to run 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\"" printf "%s\n" "$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; } && { 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\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } then : ac_retval=0 else $as_nop printf "%s\n" "$as_me: program exited with status $ac_status" >&5 printf "%s\n" "$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_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 { 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 $as_nop eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { 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 (void) { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else $as_nop eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam 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; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES # -------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes # INCLUDES, setting VAR accordingly. Returns whether the value could be # computed ac_fn_c_compute_int () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { static int test_array [1 - 2 * !(($2) >= 0)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_lo=0 ac_mid=0 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_hi=$ac_mid; break else $as_nop as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { static int test_array [1 - 2 * !(($2) < 0)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_hi=-1 ac_mid=-1 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_lo=$ac_mid; break else $as_nop as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done else $as_nop ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_hi=$ac_mid else $as_nop as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done case $ac_lo in #(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; '') ac_retval=1 ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 static long int longval (void) { return $2; } static unsigned long int ulongval (void) { return $2; } #include #include int main (void) { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (($2) < 0) { long int i = longval (); if (i != ($2)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != ($2)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : echo >>conftest.val; read $3 &5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$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 : ac_retval=0 else $as_nop printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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 # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. 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_link # 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 $as_nop 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 (); below. */ #include #undef $2 /* 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 $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. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main (void) { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$3=yes" else $as_nop eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ 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; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR # ------------------------------------------------------------------ # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR # accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR. ac_fn_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 printf %s "checking whether $as_decl_name is declared... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else $as_nop as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` eval ac_save_FLAGS=\$$6 as_fn_append $6 " $5" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { #ifndef $as_decl_name #ifdef __cplusplus (void) $as_decl_use; #else (void) $as_decl_name; #endif #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" else $as_nop eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext eval $6=\$ac_save_FLAGS fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_check_decl # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" 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 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$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 : ac_retval=0 else $as_nop printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp 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 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 cabextract $as_me 1.11, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME 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" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # 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" "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var 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;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo printf "%s\n" "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then printf "%s\n" "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then printf "%s\n" "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && printf "%s\n" "$as_me: caught signal $ac_signal" printf "%s\n" "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done 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 # Predefined preprocessor variables. printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then ac_site_files="$CONFIG_SITE" elif test "x$prefix" != xNONE; then ac_site_files="$prefix/share/config.site $prefix/etc/config.site" else ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi for ac_site_file in $ac_site_files 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;} 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_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done 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;} 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;} >$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 (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; } /* 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 #include extern int puts (const char *); extern int printf (const char *, ...); extern int dprintf (int, const char *, ...); extern void *malloc (size_t); // 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) { // See if C++-style comments work. // 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; // 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" as_fn_append ac_func_c_list " btowc HAVE_BTOWC" as_fn_append ac_func_c_list " mbsrtowcs HAVE_MBSRTOWCS" as_fn_append ac_func_c_list " mempcpy HAVE_MEMPCPY" as_fn_append ac_func_c_list " wmempcpy HAVE_WMEMPCPY" # Auxiliary files required by this configure script. ac_aux_files="config.rpath config.guess config.sub ar-lib 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 $as_nop as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$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. 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 for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value 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;} 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;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. 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;} 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;} 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;} 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=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac 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 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## 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 am__api_version='1.16' # 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 # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # 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; } if test -z "$INSTALL"; then if test ${ac_cv_path_install+y} then : printf %s "(cached) " >&6 else $as_nop 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]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # 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 test $ac_prog = install && 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 # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir 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/" && 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" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test ${ac_cv_path_install+y}; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL 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. INSTALL=$ac_install_sh fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 printf "%s\n" "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' 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 build environment is sane" >&5 printf %s "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]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). 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 # 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "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 grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. 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. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`printf "%s\n" "$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'" 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;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. 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 $as_nop 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 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_STRIP="${ac_tool_prefix}strip" 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 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; } 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_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 $as_nop 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 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_STRIP="strip" 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 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; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" 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 STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" 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; } if test -z "$MKDIR_P"; then if test ${ac_cv_path_mkdir+y} then : printf %s "(cached) " >&6 else $as_nop 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 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 '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test ${ac_cv_path_mkdir+y}; then MKDIR_P="$ac_cv_path_mkdir -p" else # 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; } 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 $as_nop 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 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_AWK="$ac_prog" 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 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; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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; } 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 $as_nop cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; 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; } SET_MAKE= else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test ${enable_silent_rules+y} 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 $as_nop if printf "%s\n" 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi 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; } 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='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='cabextract' VERSION='1.11' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # 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 # 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 ac_config_headers="$ac_config_headers config.h" # 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 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 $as_nop 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}gcc" 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 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 "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 $as_nop 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="gcc" 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 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 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 $as_nop 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}cc" 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 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 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 $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no 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 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 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # 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+' '}$@" fi fi 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; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe 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 $as_nop 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$ac_prog" 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 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 test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe 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 $as_nop 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="$ac_prog" 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 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 test -n "$ac_ct_CC" && break done 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 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 $as_nop 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 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 $as_nop 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 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;} as_fn_error $? "no acceptable C compiler found in \$PATH 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 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion -version; 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 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files 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[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" 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 (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' # 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. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test ${ac_cv_exeext+y} && 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' # 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. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else $as_nop 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 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_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "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; } 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; } 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 (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'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else $as_nop { { 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 $? "cannot compute suffix of executables: cannot compile and link 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; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _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; } if test "$cross_compiling" != yes; then { { 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 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_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\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? printf "%s\n" "$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; } fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 printf "%s\n" "$cross_compiling" >&6; } 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 $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF rm -f conftest.o conftest.obj 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 (eval "$ac_compile") 2>&5 ac_status=$? printf "%s\n" "$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 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_nop printf "%s\n" "$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_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi 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; } 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 $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes else $as_nop ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu 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 if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+y} 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 $as_nop ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes else $as_nop CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else $as_nop ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF 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 fi rm -f core conftest.err conftest.$ac_objext conftest.beam 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 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 CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" 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 $as_nop ac_cv_prog_cc_c11=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 fi 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 $as_nop 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 $as_nop { 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" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 ac_prog_cc_stdc=c11 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 $as_nop 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 fi 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 $as_nop 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 $as_nop { 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" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 ac_prog_cc_stdc=c99 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 $as_nop 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 _ACEOF 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 : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi 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 $as_nop 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 $as_nop { 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" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 ac_prog_cc_stdc=c89 fi fi 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' 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 $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done 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; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi 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 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; } cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } case $?:`cat confinc.out 2>/dev/null` in #( '0:this is the am__doit target') : case $s in #( BSD) : am__include='.include' am__quote='"' ;; #( *) : am__include='include' am__quote='' ;; esac ;; #( *) : ;; esac if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 printf "%s\n" "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. if test ${enable_dependency_tracking+y} then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= 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 $as_nop 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 # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # 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 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 if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi 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; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi if test -n "$ac_tool_prefix"; then for ac_prog in ar lib "link -lib" 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 $as_nop 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 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_AR="$ac_tool_prefix$ac_prog" 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 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; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar lib "link -lib" 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 $as_nop 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 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_AR="$ac_prog" 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 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; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" 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 AR=$ac_ct_AR fi fi : ${AR=ar} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5 printf %s "checking the archiver ($AR) interface... " >&6; } if test ${am_cv_ar_interface+y} then : printf %s "(cached) " >&6 else $as_nop 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 am_cv_ar_interface=ar cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int some_variable = 0; _ACEOF if ac_fn_c_try_compile "$LINENO" then : am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 (eval $am_ar_try) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then am_cv_ar_interface=ar else am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 (eval $am_ar_try) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then am_cv_ar_interface=lib else am_cv_ar_interface=unknown fi fi rm -f conftest.lib libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.beam 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 fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 printf "%s\n" "$am_cv_ar_interface" >&6; } case $am_cv_ar_interface in ar) ;; lib) # Microsoft lib, so override with the ar-lib wrapper script. # FIXME: It is wrong to rewrite AR. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__AR in this case, # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something # similar. AR="$am_aux_dir/ar-lib $AR" ;; unknown) as_fn_error $? "could not determine $AR interface" "$LINENO" 5 ;; esac 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 $as_nop 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 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 $as_nop 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 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 # Checks for header files. 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 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" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" if test "x$ac_cv_header_getopt_h" = xyes then : printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" if test "x$ac_cv_header_inttypes_h" = xyes then : printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default" if test "x$ac_cv_header_strings_h" = xyes then : printf "%s\n" "#define HAVE_STRINGS_H 1" >>confdefs.h fi # Checks for typedefs, structures, and compiler characteristics. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 printf %s "checking for an ANSI C-conforming const... " >&6; } if test ${ac_cv_c_const+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #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}; /* IBM 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; } { /* IBM 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 $as_nop ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 printf "%s\n" "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then printf "%s\n" "#define const /**/" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 printf %s "checking for inline... " >&6; } if test ${ac_cv_c_inline+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo (void) {return 0; } $ac_kw foo_t foo (void) {return 0; } #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 printf "%s\n" "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 printf %s "checking whether byte ordering is bigendian... " >&6; } if test ${ac_cv_c_bigendian+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO" then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_bigendian=yes else $as_nop ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_bigendian=yes else $as_nop ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ unsigned short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; unsigned short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } unsigned short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; unsigned short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main (void) { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main (void) { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_c_bigendian=no else $as_nop ac_cv_c_bigendian=yes 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 printf "%s\n" "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h ;; #( no) ;; #( universal) printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) as_fn_error $? "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" if test "x$ac_cv_type_mode_t" = xyes then : else $as_nop printf "%s\n" "#define mode_t int" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" if test "x$ac_cv_type_off_t" = xyes then : else $as_nop printf "%s\n" "#define off_t long int" >>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 $as_nop printf "%s\n" "#define size_t unsigned int" >>confdefs.h fi # Check whether --enable-largefile was given. if test ${enable_largefile+y} then : enableval=$enable_largefile; fi if test "$enable_largefile" != no; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 printf %s "checking for special C compiler options needed for large files... " >&6; } if test ${ac_cv_sys_largefile_CC+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : break fi rm -f core conftest.err conftest.$ac_objext conftest.beam CC="$CC -n32" if ac_fn_c_try_compile "$LINENO" then : ac_cv_sys_largefile_CC=' -n32'; break fi rm -f core conftest.err conftest.$ac_objext conftest.beam break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } if test ${ac_cv_sys_file_offset_bits+y} then : printf %s "(cached) " >&6 else $as_nop while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_sys_file_offset_bits=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_sys_file_offset_bits=64; break fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_sys_file_offset_bits=unknown break done fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; *) printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h ;; esac rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 printf %s "checking for _LARGE_FILES value needed for large files... " >&6; } if test ${ac_cv_sys_large_files+y} then : printf %s "(cached) " >&6 else $as_nop while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_sys_large_files=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGE_FILES 1 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_sys_large_files=1; break fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_sys_large_files=unknown break done fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 printf "%s\n" "$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; *) printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h ;; esac rm -rf conftest* fi fi # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5 printf %s "checking size of off_t... " >&6; } if test ${ac_cv_sizeof_off_t+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type_off_t" = yes; 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_fn_error 77 "cannot compute sizeof (off_t) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_off_t=0 fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5 printf "%s\n" "$ac_cv_sizeof_off_t" >&6; } printf "%s\n" "#define SIZEOF_OFF_T $ac_cv_sizeof_off_t" >>confdefs.h # Checks for library functions. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working POSIX fnmatch" >&5 printf %s "checking for working POSIX fnmatch... " >&6; } if test ${ac_cv_func_fnmatch_works+y} then : printf %s "(cached) " >&6 else $as_nop # Some versions of Solaris, SCO, and the GNU C Library # have a broken or incompatible fnmatch. # So we run a test program. If we are cross-compiling, take no chance. # Thanks to John Oleynick, Franc,ois Pinard, and Paul Eggert for this test. if test "$cross_compiling" = yes then : ac_cv_func_fnmatch_works=cross else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include # define y(a, b, c) (fnmatch (a, b, c) == 0) # define n(a, b, c) (fnmatch (a, b, c) == FNM_NOMATCH) int main (void) { return (!(y ("a*", "abc", 0) && n ("d*/*1", "d/s/1", FNM_PATHNAME) && y ("a\\\\bc", "abc", 0) && n ("a\\\\bc", "abc", FNM_NOESCAPE) && y ("*x", ".x", 0) && n ("*x", ".x", FNM_PERIOD) && 1)); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_fnmatch_works=yes else $as_nop ac_cv_func_fnmatch_works=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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fnmatch_works" >&5 printf "%s\n" "$ac_cv_func_fnmatch_works" >&6; } if test $ac_cv_func_fnmatch_works = yes then : printf "%s\n" "#define HAVE_FNMATCH 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 printf %s "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } if test ${ac_cv_sys_largefile_source+y} then : printf %s "(cached) " >&6 else $as_nop while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* for off_t */ #include int main (void) { int (*fp) (FILE *, off_t, int) = fseeko; return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_sys_largefile_source=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGEFILE_SOURCE 1 #include /* for off_t */ #include int main (void) { int (*fp) (FILE *, off_t, int) = fseeko; return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_sys_largefile_source=1; break fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ac_cv_sys_largefile_source=unknown break done fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 printf "%s\n" "$ac_cv_sys_largefile_source" >&6; } case $ac_cv_sys_largefile_source in #( no | unknown) ;; *) printf "%s\n" "#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source" >>confdefs.h ;; esac rm -rf conftest* # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug # in glibc 2.1.3, but that breaks too many other things. # If you want fseeko and ftello with glibc, upgrade to a fixed glibc. if test $ac_cv_sys_largefile_source != unknown; then printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "mkdir" "ac_cv_func_mkdir" if test "x$ac_cv_func_mkdir" = xyes then : printf "%s\n" "#define HAVE_MKDIR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "_mkdir" "ac_cv_func__mkdir" if test "x$ac_cv_func__mkdir" = xyes then : printf "%s\n" "#define HAVE__MKDIR 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir takes one argument" >&5 printf %s "checking whether mkdir takes one argument... " >&6; } if test ${ac_cv_mkdir_takes_one_arg+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if HAVE_UNISTD_H # include #endif int main (void) { mkdir ("."); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_mkdir_takes_one_arg=yes else $as_nop ac_cv_mkdir_takes_one_arg=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mkdir_takes_one_arg" >&5 printf "%s\n" "$ac_cv_mkdir_takes_one_arg" >&6; } if test x"$ac_cv_mkdir_takes_one_arg" = xyes; then printf "%s\n" "#define MKDIR_TAKES_ONE_ARG 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower" if test "x$ac_cv_func_towlower" = xyes then : printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "umask" "ac_cv_func_umask" if test "x$ac_cv_func_umask" = xyes then : printf "%s\n" "#define HAVE_UMASK 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "utime" "ac_cv_func_utime" if test "x$ac_cv_func_utime" = xyes then : printf "%s\n" "#define HAVE_UTIME 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "utimes" "ac_cv_func_utimes" if test "x$ac_cv_func_utimes" = xyes then : printf "%s\n" "#define HAVE_UTIMES 1" >>confdefs.h fi for ac_func in getopt_long do : ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long" if test "x$ac_cv_func_getopt_long" = xyes then : printf "%s\n" "#define HAVE_GETOPT_LONG 1" >>confdefs.h else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getopt_long in -lgnugetopt" >&5 printf %s "checking for getopt_long in -lgnugetopt... " >&6; } if test ${ac_cv_lib_gnugetopt_getopt_long+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lgnugetopt $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. */ char getopt_long (); int main (void) { return getopt_long (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_gnugetopt_getopt_long=yes else $as_nop ac_cv_lib_gnugetopt_getopt_long=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnugetopt_getopt_long" >&5 printf "%s\n" "$ac_cv_lib_gnugetopt_getopt_long" >&6; } if test "x$ac_cv_lib_gnugetopt_getopt_long" = xyes then : printf "%s\n" "#define HAVE_GETOPT_LONG 1" >>confdefs.h else $as_nop case " $LIBOBJS " in *" getopt.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS getopt.$ac_objext" ;; esac case " $LIBOBJS " in *" getopt1.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS getopt1.$ac_objext" ;; esac fi fi done # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 printf %s "checking for working alloca.h... " >&6; } if test ${ac_cv_working_alloca_h+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_working_alloca_h=yes else $as_nop ac_cv_working_alloca_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 printf "%s\n" "$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 printf %s "checking for alloca... " >&6; } if test ${ac_cv_func_alloca_works+y} then : printf %s "(cached) " >&6 else $as_nop if test $ac_cv_working_alloca_h = yes; then ac_cv_func_alloca_works=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifndef alloca # ifdef __GNUC__ # define alloca __builtin_alloca # elif defined _MSC_VER # include # define alloca _alloca # else # ifdef __cplusplus extern "C" # endif void *alloca (size_t); # endif #endif int main (void) { char *p = (char *) alloca (1); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_func_alloca_works=yes else $as_nop ac_cv_func_alloca_works=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 printf "%s\n" "$ac_cv_func_alloca_works" >&6; } fi if test $ac_cv_func_alloca_works = yes; then printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h else # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=\${LIBOBJDIR}alloca.$ac_objext printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 printf %s "checking stack direction for C alloca... " >&6; } if test ${ac_cv_c_stack_direction+y} then : printf %s "(cached) " >&6 else $as_nop if test "$cross_compiling" = yes then : ac_cv_c_stack_direction=0 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int find_stack_direction (int *addr, int depth) { int dir, dummy = 0; if (! addr) addr = &dummy; *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; dir = depth ? find_stack_direction (addr, depth - 1) : 0; return dir + dummy; } int main (int argc, char **argv) { return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_c_stack_direction=1 else $as_nop ac_cv_c_stack_direction=-1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 printf "%s\n" "$ac_cv_c_stack_direction" >&6; } printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 printf %s "checking for mbstate_t... " >&6; } if test ${ac_cv_type_mbstate_t+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default # include int main (void) { mbstate_t x; return sizeof x; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_type_mbstate_t=yes else $as_nop ac_cv_type_mbstate_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5 printf "%s\n" "$ac_cv_type_mbstate_t" >&6; } if test $ac_cv_type_mbstate_t = yes; then printf "%s\n" "#define HAVE_MBSTATE_T 1" >>confdefs.h else printf "%s\n" "#define mbstate_t int" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5 printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; } if test ${ac_cv_c_undeclared_builtin_options+y} then : printf %s "(cached) " >&6 else $as_nop ac_save_CFLAGS=$CFLAGS ac_cv_c_undeclared_builtin_options='cannot detect' for ac_arg in '' -fno-builtin; do CFLAGS="$ac_save_CFLAGS $ac_arg" # This test program should *not* compile successfully. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { (void) strchr; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else $as_nop # This test program should compile successfully. # No library function is consistently available on # freestanding implementations, so test against a dummy # declaration. Include always-available headers on the # off chance that they somehow elicit warnings. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include extern void ac_decl (int, char *); int main (void) { (void) ac_decl (0, (char *) 0); (void) ac_decl; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : if test x"$ac_arg" = x then : ac_cv_c_undeclared_builtin_options='none needed' else $as_nop ac_cv_c_undeclared_builtin_options=$ac_arg fi break fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done CFLAGS=$ac_save_CFLAGS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5 printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; } case $ac_cv_c_undeclared_builtin_options in #( 'cannot detect') : { { 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 $? "cannot make $CC report undeclared builtins See \`config.log' for more details" "$LINENO" 5; } ;; #( 'none needed') : ac_c_undeclared_builtin_options='' ;; #( *) : ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;; esac ac_fn_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_getenv" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_GETENV $ac_have_decl" >>confdefs.h ac_func= for ac_item in $ac_func_c_list do if test $ac_func; then ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then echo "#define $ac_item 1" >> confdefs.h fi ac_func= else ac_func=$ac_item fi done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working POSIX fnmatch" >&5 printf %s "checking for working POSIX fnmatch... " >&6; } if test ${ac_cv_func_fnmatch_works+y} then : printf %s "(cached) " >&6 else $as_nop # Some versions of Solaris, SCO, and the GNU C Library # have a broken or incompatible fnmatch. # So we run a test program. If we are cross-compiling, take no chance. # Thanks to John Oleynick, Franc,ois Pinard, and Paul Eggert for this test. if test "$cross_compiling" = yes then : ac_cv_func_fnmatch_works=cross else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include # define y(a, b, c) (fnmatch (a, b, c) == 0) # define n(a, b, c) (fnmatch (a, b, c) == FNM_NOMATCH) int main (void) { return (!(y ("a*", "abc", 0) && n ("d*/*1", "d/s/1", FNM_PATHNAME) && y ("a\\\\bc", "abc", 0) && n ("a\\\\bc", "abc", FNM_NOESCAPE) && y ("*x", ".x", 0) && n ("*x", ".x", FNM_PERIOD) && 1)); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_fnmatch_works=yes else $as_nop ac_cv_func_fnmatch_works=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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fnmatch_works" >&5 printf "%s\n" "$ac_cv_func_fnmatch_works" >&6; } if test $ac_cv_func_fnmatch_works = yes then : rm -f "$ac_config_libobj_dir/fnmatch.h" else $as_nop case " $LIBOBJS " in *" fnmatch.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS fnmatch.$ac_objext" ;; esac ac_config_links="$ac_config_links $ac_config_libobj_dir/fnmatch.h:$ac_config_libobj_dir/fnmatch_.h" printf "%s\n" "#define fnmatch rpl_fnmatch" >>confdefs.h 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 { 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 $as_nop ac_build_alias=$build_alias test "x$ac_build_alias" = x && 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 fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 printf "%s\n" "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* 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 $as_nop 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 fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 printf "%s\n" "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" # Check whether --with-gnu-ld was given. if test ${with_gnu_ld+y} then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else $as_nop with_gnu_ld=no fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi if test -n "$LD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld" >&5 printf %s "checking for ld... " >&6; } elif test "$GCC" = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 printf %s "checking for ld used by $CC... " >&6; } elif test "$with_gnu_ld" = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 printf %s "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; } fi if test -n "$LD"; then # Let the user override the test with a path. : else if test ${acl_cv_path_LD+y} then : printf %s "(cached) " >&6 else $as_nop acl_cv_path_LD= # Final result of this test ac_prog=ld # Program to search in $PATH if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) acl_output=`($CC -print-prog-name=ld) 2>&5` ;; esac case $acl_output in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'` while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do acl_output=`echo $acl_output | sed "s%$re_direlt%/%"` done # Got the pathname. No search in PATH is needed. acl_cv_path_LD="$acl_output" ac_prog= ;; "") # If it fails, then pretend we aren't using GCC. ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac fi if test -n "$ac_prog"; then # Search for $ac_prog in $PATH. acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$acl_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 conftest.$ac_ext /* end confdefs.h. */ #if defined __powerpc64__ || defined _ARCH_PPC64 int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : # The compiler produces 64-bit code. Add option '-b64' so that the # linker groks 64-bit object files. case "$acl_cv_path_LD " in *" -b64 "*) ;; *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; sparc64-*-netbsd*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined __sparcv9 || defined __arch64__ int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : else $as_nop # The compiler produces 32-bit code. Add option '-m elf32_sparc' # so that the linker groks 32-bit object files. case "$acl_cv_path_LD " in *" -m elf32_sparc "*) ;; *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi LD="$acl_cv_path_LD" fi if test -n "$LD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 printf "%s\n" "$LD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 fi { 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 ${acl_cv_prog_gnu_ld+y} then : printf %s "(cached) " >&6 else $as_nop # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 printf %s "checking for shared library run path origin... " >&6; } if test ${acl_cv_rpath+y} then : printf %s "(cached) " >&6 else $as_nop CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 printf "%s\n" "$acl_cv_rpath" >&6; } wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath was given. if test ${enable_rpath+y} then : enableval=$enable_rpath; : else $as_nop enable_rpath=yes fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5 printf %s "checking 32-bit host C ABI... " >&6; } if test ${gl_cv_host_cpu_c_abi_32bit+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$gl_cv_host_cpu_c_abi"; then case "$gl_cv_host_cpu_c_abi" in i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc) gl_cv_host_cpu_c_abi_32bit=yes ;; x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 ) gl_cv_host_cpu_c_abi_32bit=no ;; *) gl_cv_host_cpu_c_abi_32bit=unknown ;; esac else case "$host_cpu" in # CPUs that only support a 32-bit ABI. arc \ | bfin \ | cris* \ | csky \ | epiphany \ | ft32 \ | h8300 \ | m68k \ | microblaze | microblazeel \ | nds32 | nds32le | nds32be \ | nios2 | nios2eb | nios2el \ | or1k* \ | or32 \ | sh | sh1234 | sh1234elb \ | tic6x \ | xtensa* ) gl_cv_host_cpu_c_abi_32bit=yes ;; # CPUs that only support a 64-bit ABI. alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \ | mmix ) gl_cv_host_cpu_c_abi_32bit=no ;; i[34567]86 ) gl_cv_host_cpu_c_abi_32bit=yes ;; x86_64 ) # On x86_64 systems, the C compiler may be generating code in one of # these ABIs: # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64. # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64 # with native Windows (mingw, MSVC). # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32. # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if (defined __x86_64__ || defined __amd64__ \ || defined _M_X64 || defined _M_AMD64) \ && !(defined __ILP32__ || defined _ILP32) int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_host_cpu_c_abi_32bit=no else $as_nop gl_cv_host_cpu_c_abi_32bit=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; arm* | aarch64 ) # Assume arm with EABI. # On arm64 systems, the C compiler may be generating code in one of # these ABIs: # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64. # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32. # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32) int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_host_cpu_c_abi_32bit=no else $as_nop gl_cv_host_cpu_c_abi_32bit=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; hppa1.0 | hppa1.1 | hppa2.0* | hppa64 ) # On hppa, the C compiler may be generating 32-bit code or 64-bit # code. In the latter case, it defines _LP64 and __LP64__. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __LP64__ int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_host_cpu_c_abi_32bit=no else $as_nop gl_cv_host_cpu_c_abi_32bit=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; ia64* ) # On ia64 on HP-UX, the C compiler may be generating 64-bit code or # 32-bit code. In the latter case, it defines _ILP32. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef _ILP32 int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_host_cpu_c_abi_32bit=yes else $as_nop gl_cv_host_cpu_c_abi_32bit=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; mips* ) # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this # at 32. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64) int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_host_cpu_c_abi_32bit=no else $as_nop gl_cv_host_cpu_c_abi_32bit=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; powerpc* ) # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD. # No need to distinguish them here; the caller may distinguish # them based on the OS. # On powerpc64 systems, the C compiler may still be generating # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may # be generating 64-bit code. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined __powerpc64__ || defined _ARCH_PPC64 int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_host_cpu_c_abi_32bit=no else $as_nop gl_cv_host_cpu_c_abi_32bit=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; rs6000 ) gl_cv_host_cpu_c_abi_32bit=yes ;; riscv32 | riscv64 ) # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d. # Size of 'long' and 'void *': cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined __LP64__ int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_host_cpu_c_abi_32bit=no else $as_nop gl_cv_host_cpu_c_abi_32bit=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; s390* ) # On s390x, the C compiler may be generating 64-bit (= s390x) code # or 31-bit (= s390) code. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined __LP64__ || defined __s390x__ int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_host_cpu_c_abi_32bit=no else $as_nop gl_cv_host_cpu_c_abi_32bit=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; sparc | sparc64 ) # UltraSPARCs running Linux have `uname -m` = "sparc64", but the # C compiler still generates 32-bit code. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined __sparcv9 || defined __arch64__ int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_host_cpu_c_abi_32bit=no else $as_nop gl_cv_host_cpu_c_abi_32bit=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; *) gl_cv_host_cpu_c_abi_32bit=unknown ;; esac fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5 printf "%s\n" "$gl_cv_host_cpu_c_abi_32bit" >&6; } HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit" 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 how to run the C preprocessor" >&5 printf %s "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 $as_nop # Double quotes because $CC needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" 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. # 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 Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO" then : else $as_nop # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO" then : # Broken: success on invalid input. continue else $as_nop # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # 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 : break fi done ac_cv_prog_CPP=$CPP 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; } 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. # 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 Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO" then : else $as_nop # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO" then : # Broken: success on invalid input. continue else $as_nop # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # 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 : else $as_nop { { 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 $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi 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 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 $as_nop 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 for ac_exec_ext in '' $ac_executable_extensions; do 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 *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 printf %s 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" "$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 if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 printf "%s\n" "$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 $as_nop if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_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 egrep do for ac_exec_ext in '' $ac_executable_extensions; do 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 *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 printf %s 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" "$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 if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 printf "%s\n" "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ELF binary format" >&5 printf %s "checking for ELF binary format... " >&6; } if test ${gl_cv_elf+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __ELF__ Extensible Linking Format #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Extensible Linking Format" >/dev/null 2>&1 then : gl_cv_elf=yes else $as_nop gl_cv_elf=no fi rm -rf conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_elf" >&5 printf "%s\n" "$gl_cv_elf" >&6; } if test $gl_cv_elf; then # Extract the ELF class of a file (5th byte) in decimal. # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header if od -A x < /dev/null >/dev/null 2>/dev/null; then # Use POSIX od. func_elfclass () { od -A n -t d1 -j 4 -N 1 } else # Use BSD hexdump. func_elfclass () { dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "' echo } fi case $HOST_CPU_C_ABI_32BIT in yes) # 32-bit ABI. acl_is_expected_elfclass () { test "`func_elfclass | sed -e 's/[ ]//g'`" = 1 } ;; no) # 64-bit ABI. acl_is_expected_elfclass () { test "`func_elfclass | sed -e 's/[ ]//g'`" = 2 } ;; *) # Unknown. acl_is_expected_elfclass () { : } ;; esac else acl_is_expected_elfclass () { : } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5 printf %s "checking for the common suffixes of directories in the library search path... " >&6; } if test ${acl_cv_libdirstems+y} then : printf %s "(cached) " >&6 else $as_nop acl_libdirstem=lib acl_libdirstem2= acl_libdirstem3= case "$host_os" in solaris*) if test $HOST_CPU_C_ABI_32BIT = no; then acl_libdirstem2=lib/64 case "$host_cpu" in sparc*) acl_libdirstem3=lib/sparcv9 ;; i*86 | x86_64) acl_libdirstem3=lib/amd64 ;; esac fi ;; *) searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \ | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test $HOST_CPU_C_ABI_32BIT != no; then # 32-bit or unknown ABI. if test -d /usr/lib32; then acl_libdirstem2=lib32 fi fi if test $HOST_CPU_C_ABI_32BIT != yes; then # 64-bit or unknown ABI. if test -d /usr/lib64; then acl_libdirstem3=lib64 fi fi if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;; */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;; */../ | */.. ) # Better ignore directories of this form. They are misleading. ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib32 ) acl_libdirstem2=lib32 ;; */lib64 ) acl_libdirstem3=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" if test $HOST_CPU_C_ABI_32BIT = yes; then # 32-bit ABI. acl_libdirstem3= fi if test $HOST_CPU_C_ABI_32BIT = no; then # 64-bit ABI. acl_libdirstem2= fi fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem" acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5 printf "%s\n" "$acl_cv_libdirstems" >&6; } acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'` acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'` use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libiconv-prefix was given. if test ${with_libiconv_prefix+y} then : withval=$with_libiconv_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" additional_libdir2="$withval/$acl_libdirstem2" additional_libdir3="$withval/$acl_libdirstem3" fi fi fi if test "X$additional_libdir2" = "X$additional_libdir"; then additional_libdir2= fi if test "X$additional_libdir3" = "X$additional_libdir"; then additional_libdir3= fi LIBICONV= LTLIBICONV= INCICONV= LIBICONV_PREFIX= HAVE_LIBICONV= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='iconv ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" else : fi else found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do if test "X$found_dir" = "X"; then eval dir=\$$additional_libdir_variable if test -n "$dir"; then if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi fi done fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2" \ || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$acl_hardcode_direct" = yes; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" else LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = 'iconv'; then LIBICONV_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = 'iconv'; then LIBICONV_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem3 | */$acl_libdirstem3/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'` if test "$name" = 'iconv'; then LIBICONV_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then haveit= if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$dependency_libdir"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$dependency_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$dependency_libdir"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$dependency_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" ;; esac done fi else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" done fi am_save_CPPFLAGS="$CPPFLAGS" for element in $INCICONV; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 printf %s "checking for iconv... " >&6; } if test ${am_cv_func_iconv+y} then : printf %s "(cached) " >&6 else $as_nop am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : am_cv_lib_iconv=yes am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 printf "%s\n" "$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 printf %s "checking for working iconv... " >&6; } if test ${am_cv_func_iconv_works+y} then : printf %s "(cached) " >&6 else $as_nop am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi am_cv_func_iconv_works=no for ac_iconv_const in '' 'const'; do if test "$cross_compiling" = yes then : case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifndef ICONV_CONST # define ICONV_CONST $ac_iconv_const #endif int main (void) { int result = 0; /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 1; iconv_close (cd_utf8_to_88591); } } /* Test against Solaris 10 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\263"; char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 2; iconv_close (cd_ascii_to_88591); } } /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ { iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\304"; static char buf[2] = { (char)0xDE, (char)0xAD }; ICONV_CONST char *inptr = input; size_t inbytesleft = 1; char *outptr = buf; size_t outbytesleft = 1; size_t res = iconv (cd_88591_to_utf8, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) result |= 4; iconv_close (cd_88591_to_utf8); } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) result |= 8; iconv_close (cd_88591_to_utf8); } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ { /* Try standardized names. */ iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP"); /* Try IRIX, OSF/1 names. */ iconv_t cd2 = iconv_open ("UTF-8", "eucJP"); /* Try AIX names. */ iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP"); /* Try HP-UX names. */ iconv_t cd4 = iconv_open ("utf8", "eucJP"); if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1) && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1)) result |= 16; if (cd1 != (iconv_t)(-1)) iconv_close (cd1); if (cd2 != (iconv_t)(-1)) iconv_close (cd2); if (cd3 != (iconv_t)(-1)) iconv_close (cd3); if (cd4 != (iconv_t)(-1)) iconv_close (cd4); } return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : am_cv_func_iconv_works=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi test "$am_cv_func_iconv_works" = no || break done LIBS="$am_save_LIBS" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 printf "%s\n" "$am_cv_func_iconv_works" >&6; } case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h fi if test "$am_cv_lib_iconv" = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 printf %s "checking how to link with libiconv... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 printf "%s\n" "$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi if test "$am_cv_func_iconv" = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 printf %s "checking for iconv declaration... " >&6; } if test ${am_cv_proto_iconv+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : am_cv_proto_iconv_arg1="" else $as_nop am_cv_proto_iconv_arg1="const" fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" fi am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_proto_iconv" >&5 printf "%s\n" " $am_cv_proto_iconv" >&6; } else am_cv_proto_iconv_arg1="" fi printf "%s\n" "#define ICONV_CONST $am_cv_proto_iconv_arg1" >>confdefs.h # use an external libmspack if requested cabextract_external_libmspack=no # Check whether --with-external-libmspack was given. if test ${with_external_libmspack+y} then : withval=$with_external_libmspack; cabextract_external_libmspack=$withval fi if test "z$cabextract_external_libmspack" != 'zno'; then if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; 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_path_PKG_CONFIG+y} then : printf %s "(cached) " >&6 else $as_nop case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) 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_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" 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 ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 printf "%s\n" "$PKG_CONFIG" >&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_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; 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_path_ac_pt_PKG_CONFIG+y} then : printf %s "(cached) " >&6 else $as_nop case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) 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_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" 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 ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" 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 PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; 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; } PKG_CONFIG="" fi fi pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libmspack" >&5 printf %s "checking for libmspack... " >&6; } if test -n "$libmspack_CFLAGS"; then pkg_cv_libmspack_CFLAGS="$libmspack_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libmspack >= 0.8alpha\""; } >&5 ($PKG_CONFIG --exists --print-errors "libmspack >= 0.8alpha") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libmspack_CFLAGS=`$PKG_CONFIG --cflags "libmspack >= 0.8alpha" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libmspack_LIBS"; then pkg_cv_libmspack_LIBS="$libmspack_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libmspack >= 0.8alpha\""; } >&5 ($PKG_CONFIG --exists --print-errors "libmspack >= 0.8alpha") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libmspack_LIBS=`$PKG_CONFIG --libs "libmspack >= 0.8alpha" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libmspack_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libmspack >= 0.8alpha" 2>&1` else libmspack_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libmspack >= 0.8alpha" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libmspack_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (libmspack >= 0.8alpha) were not met: $libmspack_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables libmspack_CFLAGS and libmspack_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { 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 $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables libmspack_CFLAGS and libmspack_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else libmspack_CFLAGS=$pkg_cv_libmspack_CFLAGS libmspack_LIBS=$pkg_cv_libmspack_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi ac_fn_c_check_header_compile "$LINENO" "mspack.h" "ac_cv_header_mspack_h" "$ac_includes_default" if test "x$ac_cv_header_mspack_h" = xyes then : else $as_nop as_fn_error $? "Cannot find libmspack header" "$LINENO" 5 fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mspack_create_cab_decompressor in -lmspack" >&5 printf %s "checking for mspack_create_cab_decompressor in -lmspack... " >&6; } if test ${ac_cv_lib_mspack_mspack_create_cab_decompressor+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lmspack $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. */ char mspack_create_cab_decompressor (); int main (void) { return mspack_create_cab_decompressor (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_mspack_mspack_create_cab_decompressor=yes else $as_nop ac_cv_lib_mspack_mspack_create_cab_decompressor=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mspack_mspack_create_cab_decompressor" >&5 printf "%s\n" "$ac_cv_lib_mspack_mspack_create_cab_decompressor" >&6; } if test "x$ac_cv_lib_mspack_mspack_create_cab_decompressor" = xyes then : printf "%s\n" "#define HAVE_LIBMSPACK 1" >>confdefs.h LIBS="-lmspack $LIBS" else $as_nop as_fn_error $? "Cannot find libmspack library" "$LINENO" 5 fi fi if test "z$cabextract_external_libmspack" != 'zno'; then EXTERNAL_LIBMSPACK_TRUE= EXTERNAL_LIBMSPACK_FALSE='#' else EXTERNAL_LIBMSPACK_TRUE='#' EXTERNAL_LIBMSPACK_FALSE= fi ac_config_files="$ac_config_files Makefile cabextract.spec test/testcase" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # 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 # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var 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;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (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 # 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. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ 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;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac 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;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= 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"` # 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" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done 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; } 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; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EXTERNAL_LIBMSPACK_TRUE}" && test -z "${EXTERNAL_LIBMSPACK_FALSE}"; then as_fn_error $? "conditional \"EXTERNAL_LIBMSPACK\" 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_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh as_nop=: if test ${ZSH_VERSION+y} && (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 $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; 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 # The user is always right. if ${PATH_SEPARATOR+false} :; 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 || PATH_SEPARATOR=';' } fi # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) 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 -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' # 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 exit 1 fi # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. 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 fi printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. 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 : eval 'as_fn_append () { eval $1+=\$2 }' else $as_nop as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # 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 : eval 'as_fn_arith () { as_val=$(( $* )) }' else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 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*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) 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 else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi 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'. 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 as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $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" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. 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_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by cabextract $as_me 1.11, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_links="$ac_config_links" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$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. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration links: $config_links Configuration commands: $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_version="\\ cabextract config.status 1.11 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" Copyright (C) 2021 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -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 ;; --config | --confi | --conf | --con | --co | --c ) printf "%s\n" "$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"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`printf "%s\n" "$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.";; --help | --hel | -h ) printf "%s\n" "$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_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF 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 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX printf "%s\n" "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "$ac_config_libobj_dir/fnmatch.h") CONFIG_LINKS="$CONFIG_LINKS $ac_config_libobj_dir/fnmatch.h:$ac_config_libobj_dir/fnmatch_.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "cabextract.spec") CONFIG_FILES="$CONFIG_FILES cabextract.spec" ;; "test/testcase") CONFIG_FILES="$CONFIG_FILES test/testcase" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # 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_LINKS+y} || CONFIG_LINKS=$config_links test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # 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'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 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'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 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'. 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 # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) 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 `:'. 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;; esac case $ac_f in *\'*) ac_f=`printf "%s\n" "$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 # 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' `' 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;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`printf "%s\n" "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $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" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. 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|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`printf "%s\n" "$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/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' 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;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # 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 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 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' 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' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { printf "%s\n" "/* $configure_input */" >&1 \ && 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;} 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 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $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" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :L) # # CONFIG_LINK # if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then : else # Prefer the file from the source tree if names are identical. if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then ac_source=$srcdir/$ac_source fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 printf "%s\n" "$as_me: linking $ac_source to $ac_file" >&6;} if test ! -r "$ac_source"; then as_fn_error $? "$ac_source: file not found" "$LINENO" 5 fi rm -f "$ac_file" # Try a relative symlink, then a hard link, then a copy. case $ac_source in [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; *) ac_rel_source=$ac_top_build_prefix$ac_source ;; esac ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || ln "$ac_source" "$ac_file" 2>/dev/null || cp -p "$ac_source" "$ac_file" || as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 fi ;; :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 printf "%s\n" "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. case $CONFIG_FILES in #( *\'*) : eval set x "$CONFIG_FILES" ;; #( *) : set x $CONFIG_FILES ;; #( *) : ;; esac shift # Used to flag and report bootstrapping failures. am_rc=0 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/:.*$//'` # 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 # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`$as_dirname -- "$am_mf" || $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" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` am_filepart=`$as_basename -- "$am_mf" || $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$am_mf" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` { echo "$as_me:$LINENO: cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles" >&5 (cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (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_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 '--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; } fi { am_dirpart=; unset am_dirpart;} { am_filepart=; unset am_filepart;} { am_mf=; unset am_mf;} { am_rc=; unset am_rc;} rm -f conftest-deps.mk } ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $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;} fi cabextract-1.11/fnmatch.c0000664000175000017500000002242413370030217012263 00000000000000/* fnmatch.c (description) Copyright (C) 1991, 1992, 1993 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 the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 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, write to: Free Software Foundation, Inc. 59 Temple Place - Suite 330 Boston, MA 02111-1307, USA */ static const char rcsid[] = "$Id: fnmatch.c,v 1.3 2006-03-01 21:11:32 kyz Exp $"; #ifdef HAVE_CONFIG_H # include "config.h" #endif #ifndef _GNU_SOURCE # define _GNU_SOURCE #endif #include #include #include "fnmatch.h" /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #if defined (_LIBC) || !defined (__GNU_LIBRARY__) #if !defined(__GNU_LIBRARY__) && !defined(STDC_HEADERS) #endif /* Match STRING against the filename pattern PATTERN, returning zero if it matches, nonzero if not. */ int fnmatch (pattern, string, flags) const char *pattern; const char *string; int flags; { register const char *p = pattern, *n = string; register unsigned char c; /* Note that this evalutes C many times. */ #define FOLD(c) ((flags & FNM_CASEFOLD) && isupper (c) ? tolower (c) : (c)) #ifdef _WIN32 flags |= FNM_CASEFOLD; #endif while ((c = *p++) != '\0') { c = FOLD (c); switch (c) { case '?': if (*n == '\0') return FNM_NOMATCH; else if ((flags & FNM_FILE_NAME) && *n == '/') return FNM_NOMATCH; else if ((flags & FNM_PERIOD) && *n == '.' && (n == string || ((flags & FNM_FILE_NAME) && n[-1] == '/'))) return FNM_NOMATCH; break; case '\\': if (!(flags & FNM_NOESCAPE)) { c = *p++; c = FOLD (c); } if (FOLD ((unsigned char) *n) != c) return FNM_NOMATCH; break; case '*': if ((flags & FNM_PERIOD) && *n == '.' && (n == string || ((flags & FNM_FILE_NAME) && n[-1] == '/'))) return FNM_NOMATCH; for (c = *p++; c == '?' || c == '*'; c = *p++, ++n) if (((flags & FNM_FILE_NAME) && *n == '/') || (c == '?' && *n == '\0')) return FNM_NOMATCH; if (c == '\0') return 0; { unsigned char c1 = (!(flags & FNM_NOESCAPE) && c == '\\') ? *p : c; c1 = FOLD (c1); for (--p; *n != '\0'; ++n) if ((c == '[' || FOLD ((unsigned char) *n) == c1) && fnmatch (p, n, flags & ~FNM_PERIOD) == 0) return 0; return FNM_NOMATCH; } case '[': { /* Nonzero if the sense of the character class is inverted. */ register int not; if (*n == '\0') return FNM_NOMATCH; if ((flags & FNM_PERIOD) && *n == '.' && (n == string || ((flags & FNM_FILE_NAME) && n[-1] == '/'))) return FNM_NOMATCH; not = (*p == '!' || *p == '^'); if (not) ++p; c = *p++; for (;;) { register unsigned char cstart = c, cend = c; if (!(flags & FNM_NOESCAPE) && c == '\\') cstart = cend = *p++; cstart = cend = FOLD (cstart); if (c == '\0') /* [ (unterminated) loses. */ return FNM_NOMATCH; c = *p++; c = FOLD (c); if ((flags & FNM_FILE_NAME) && c == '/') /* [/] can never match. */ return FNM_NOMATCH; if (c == '-' && *p != ']') { cend = *p++; if (!(flags & FNM_NOESCAPE) && cend == '\\') cend = *p++; if (cend == '\0') return FNM_NOMATCH; cend = FOLD (cend); c = *p++; } if (FOLD ((unsigned char) *n) >= cstart && FOLD ((unsigned char) *n) <= cend) goto matched; if (c == ']') break; } if (!not) return FNM_NOMATCH; break; matched:; /* Skip the rest of the [...] that already matched. */ while (c != ']') { if (c == '\0') /* [... (unterminated) loses. */ return FNM_NOMATCH; c = *p++; if (!(flags & FNM_NOESCAPE) && c == '\\') /* XXX 1003.2d11 is unclear if this is right. */ ++p; } if (not) return FNM_NOMATCH; } break; default: if (c != FOLD ((unsigned char) *n)) return FNM_NOMATCH; } ++n; } if (*n == '\0') return 0; if ((flags & FNM_LEADING_DIR) && *n == '/') /* The FNM_LEADING_DIR flag says that "foo*" matches "foobar/frobozz". */ return 0; return FNM_NOMATCH; } #endif /* _LIBC or not __GNU_LIBRARY__. */ cabextract-1.11/Makefile.am0000664000175000017500000000317314374414615012550 00000000000000AUTOMAKE_OPTIONS = no-dependencies subdir-objects bundled_mspack = mspack/mspack.h \ mspack/system.h mspack/system.c \ mspack/cab.h mspack/cabd.c \ mspack/lzx.h mspack/lzxd.c \ mspack/mszip.h mspack/mszipd.c \ mspack/qtm.h mspack/qtmd.c \ mspack/macros.h mspack/readbits.h mspack/readhuff.h TESTS = test/bugs.test test/case-ascii.test test/case-utf8.test \ test/dir.test test/dirwalk-vulns.test test/encoding.test \ test/mixed.test test/search.test test/simple.test \ test/split.test test/utf8-stresstest.test \ test/symlinks.test EXTRA_DIST = cabextract.spec \ doc/cabextract.1 doc/ja/cabextract.1 \ doc/magic doc/wince_cab_format.html \ fnmatch_.h getopt.h src/cabsplit \ src/wince_info src/wince_rename \ mspack/ChangeLog $(bundled_mspack) \ $(TESTS) test/bugs test/cabs bin_PROGRAMS = cabextract check_PROGRAMS = cabextract noinst_PROGRAMS = src/cabinfo man_MANS = doc/cabextract.1 cabextract_SOURCES = src/cabextract.c md5.h md5.c cabextract_LDADD = @LIBOBJS@ @LIBICONV@ if !EXTERNAL_LIBMSPACK cabextract_LDADD += libmscab.a noinst_LIBRARIES = libmscab.a libmscab_a_SOURCES = $(bundled_mspack) AM_CPPFLAGS = -I$(srcdir)/mspack -DMSPACK_NO_DEFAULT_SYSTEM endif cabextract-1.11/getopt1.c0000664000175000017500000000573013370030217012227 00000000000000/* getopt_long and getopt_long_only entry points for GNU getopt. Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include #endif #include "getopt.h" #if !defined __STDC__ || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ #ifndef const #define const #endif #endif #include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #define GETOPT_INTERFACE_VERSION 2 #if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 #include #if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION #define ELIDE_CODE #endif #endif #ifndef ELIDE_CODE /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ #include #endif int getopt_long (argc, argv, options, long_options, opt_index) int argc; char *const *argv; const char *options; const struct option *long_options; int *opt_index; { return _getopt_internal (argc, argv, options, long_options, opt_index, 0); } /* Like getopt_long, but '-' as well as '--' can indicate a long option. If an option that starts with '-' (not '--') doesn't match a long option, but does match a short option, it is parsed as a short option instead. */ int getopt_long_only (argc, argv, options, long_options, opt_index) int argc; char *const *argv; const char *options; const struct option *long_options; int *opt_index; { return _getopt_internal (argc, argv, options, long_options, opt_index, 1); } #endif /* Not ELIDE_CODE. */ cabextract-1.11/Makefile.in0000664000175000017500000012540114376123607012560 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ 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)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = cabextract$(EXEEXT) check_PROGRAMS = cabextract$(EXEEXT) noinst_PROGRAMS = src/cabinfo$(EXEEXT) @EXTERNAL_LIBMSPACK_FALSE@am__append_1 = libmscab.a subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = cabextract.spec test/testcase CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; am__v_AR_1 = libmscab_a_AR = $(AR) $(ARFLAGS) libmscab_a_LIBADD = am__libmscab_a_SOURCES_DIST = mspack/mspack.h mspack/system.h \ mspack/system.c mspack/cab.h mspack/cabd.c mspack/lzx.h \ mspack/lzxd.c mspack/mszip.h mspack/mszipd.c mspack/qtm.h \ mspack/qtmd.c mspack/macros.h mspack/readbits.h \ mspack/readhuff.h am__dirstamp = $(am__leading_dot)dirstamp am__objects_1 = mspack/system.$(OBJEXT) mspack/cabd.$(OBJEXT) \ mspack/lzxd.$(OBJEXT) mspack/mszipd.$(OBJEXT) \ mspack/qtmd.$(OBJEXT) @EXTERNAL_LIBMSPACK_FALSE@am_libmscab_a_OBJECTS = $(am__objects_1) libmscab_a_OBJECTS = $(am_libmscab_a_OBJECTS) am_cabextract_OBJECTS = src/cabextract.$(OBJEXT) md5.$(OBJEXT) cabextract_OBJECTS = $(am_cabextract_OBJECTS) cabextract_DEPENDENCIES = @LIBOBJS@ $(am__append_1) src_cabinfo_SOURCES = src/cabinfo.c src_cabinfo_OBJECTS = src/cabinfo.$(OBJEXT) src_cabinfo_LDADD = $(LDADD) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libmscab_a_SOURCES) $(cabextract_SOURCES) src/cabinfo.c DIST_SOURCES = $(am__libmscab_a_SOURCES_DIST) $(cabextract_SOURCES) \ src/cabinfo.c am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' 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 -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man_MANS) 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. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` AM_RECURSIVE_TARGETS = cscope check recheck am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no am__tty_colors = { \ $(am__tty_colors_dummy); \ if test "X$(AM_COLOR_TESTS)" = Xno; then \ am__color_tests=no; \ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ am__color_tests=yes; \ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ am__color_tests=yes; \ fi; \ if test $$am__color_tests = yes; then \ red=''; \ grn=''; \ lgn=''; \ blu=''; \ mgn=''; \ brg=''; \ std=''; \ fi; \ } am__recheck_rx = ^[ ]*:recheck:[ ]* am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* # A command that, given a newline-separated list of test names on the # standard input, print the name of the tests that are to be re-run # upon "make recheck". am__list_recheck_tests = $(AWK) '{ \ recheck = 1; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ { \ if ((getline line2 < ($$0 ".log")) < 0) \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ { \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ { \ break; \ } \ }; \ if (recheck) \ print $$0; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # A command that, given a newline-separated list of test names on the # standard input, create the global log from their .trs and .log files. am__create_global_log = $(AWK) ' \ function fatal(msg) \ { \ print "fatal: making $@: " msg | "cat >&2"; \ exit 1; \ } \ function rst_section(header) \ { \ print header; \ len = length(header); \ for (i = 1; i <= len; i = i + 1) \ printf "="; \ printf "\n\n"; \ } \ { \ copy_in_global_log = 1; \ global_test_result = "RUN"; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".trs"); \ if (line ~ /$(am__global_test_result_rx)/) \ { \ sub("$(am__global_test_result_rx)", "", line); \ sub("[ ]*$$", "", line); \ global_test_result = line; \ } \ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ copy_in_global_log = 0; \ }; \ if (copy_in_global_log) \ { \ rst_section(global_test_result ": " $$0); \ while ((rc = (getline line < ($$0 ".log"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".log"); \ print line; \ }; \ printf "\n"; \ }; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # Restructured Text title. am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } # Solaris 10 'make', and several other traditional 'make' implementations, # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it # by disabling -e (using the XSI extension "set +e") if it's set. 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" \ --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 # passes TESTS_ENVIRONMENT. Set up options for the wrapper that # will run the test scripts (or their associated LOG_COMPILER, if # thy have one). am__check_pre = \ $(am__sh_e_setup); \ $(am__vpath_adj_setup) $(am__vpath_adj) \ $(am__tty_colors); \ srcdir=$(srcdir); export srcdir; \ case "$@" in \ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ *) am__odir=.;; \ esac; \ test "x$$am__odir" = x"." || test -d "$$am__odir" \ || $(MKDIR_P) "$$am__odir" || exit $$?; \ if test -f "./$$f"; then dir=./; \ elif test -f "$$f"; then dir=; \ else dir="$(srcdir)/"; fi; \ tst=$$dir$$f; log='$@'; \ if test -n '$(DISABLE_HARD_ERRORS)'; then \ am__enable_hard_errors=no; \ else \ am__enable_hard_errors=yes; \ fi; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ am__expect_failure=yes;; \ *) \ am__expect_failure=no;; \ esac; \ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) # A shell command to get the names of the tests scripts with any registered # extension removed (i.e., equivalently, the names of the test logs, with # the '.log' extension removed). The result is saved in the shell variable # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", # since that might cause problem with VPATH rewrites for suffix-less tests. # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. 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 am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) TEST_LOGS = $(am__test_logs2:.test.log=.log) TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) am__set_b = \ case '$@' in \ */*) \ case '$*' in \ */*) b='$*';; \ *) b=`echo '$@' | sed 's/\.log$$//'`; \ esac;; \ *) \ b='$*';; \ esac am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/cabextract.spec.in \ $(srcdir)/config.h.in $(top_srcdir)/test/testcase.in AUTHORS \ COPYING ChangeLog INSTALL NEWS README TODO ar-lib compile \ config.guess config.rpath config.sub fnmatch.c getopt.c \ getopt1.c install-sh missing test-driver DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ 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 GZIP_ENV = --best DIST_TARGETS = 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 -print ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libmspack_CFLAGS = @libmspack_CFLAGS@ libmspack_LIBS = @libmspack_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = no-dependencies subdir-objects bundled_mspack = mspack/mspack.h \ mspack/system.h mspack/system.c \ mspack/cab.h mspack/cabd.c \ mspack/lzx.h mspack/lzxd.c \ mspack/mszip.h mspack/mszipd.c \ mspack/qtm.h mspack/qtmd.c \ mspack/macros.h mspack/readbits.h mspack/readhuff.h TESTS = test/bugs.test test/case-ascii.test test/case-utf8.test \ test/dir.test test/dirwalk-vulns.test test/encoding.test \ test/mixed.test test/search.test test/simple.test \ test/split.test test/utf8-stresstest.test \ test/symlinks.test EXTRA_DIST = cabextract.spec \ doc/cabextract.1 doc/ja/cabextract.1 \ doc/magic doc/wince_cab_format.html \ fnmatch_.h getopt.h src/cabsplit \ src/wince_info src/wince_rename \ mspack/ChangeLog $(bundled_mspack) \ $(TESTS) test/bugs test/cabs man_MANS = doc/cabextract.1 cabextract_SOURCES = src/cabextract.c md5.h md5.c cabextract_LDADD = @LIBOBJS@ @LIBICONV@ $(am__append_1) @EXTERNAL_LIBMSPACK_FALSE@noinst_LIBRARIES = libmscab.a @EXTERNAL_LIBMSPACK_FALSE@libmscab_a_SOURCES = $(bundled_mspack) @EXTERNAL_LIBMSPACK_FALSE@AM_CPPFLAGS = -I$(srcdir)/mspack -DMSPACK_NO_DEFAULT_SYSTEM all: config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .log .o .obj .test .test$(EXEEXT) .trs am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 cabextract.spec: $(top_builddir)/config.status $(srcdir)/cabextract.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ test/testcase: $(top_builddir)/config.status $(top_srcdir)/test/testcase.in cd $(top_builddir) && $(SHELL) ./config.status $@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) clean-checkPROGRAMS: -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS) clean-noinstPROGRAMS: -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) mspack/$(am__dirstamp): @$(MKDIR_P) mspack @: > mspack/$(am__dirstamp) mspack/system.$(OBJEXT): mspack/$(am__dirstamp) mspack/cabd.$(OBJEXT): mspack/$(am__dirstamp) mspack/lzxd.$(OBJEXT): mspack/$(am__dirstamp) mspack/mszipd.$(OBJEXT): mspack/$(am__dirstamp) mspack/qtmd.$(OBJEXT): mspack/$(am__dirstamp) libmscab.a: $(libmscab_a_OBJECTS) $(libmscab_a_DEPENDENCIES) $(EXTRA_libmscab_a_DEPENDENCIES) $(AM_V_at)-rm -f libmscab.a $(AM_V_AR)$(libmscab_a_AR) libmscab.a $(libmscab_a_OBJECTS) $(libmscab_a_LIBADD) $(AM_V_at)$(RANLIB) libmscab.a src/$(am__dirstamp): @$(MKDIR_P) src @: > src/$(am__dirstamp) src/cabextract.$(OBJEXT): src/$(am__dirstamp) cabextract$(EXEEXT): $(cabextract_OBJECTS) $(cabextract_DEPENDENCIES) $(EXTRA_cabextract_DEPENDENCIES) @rm -f cabextract$(EXEEXT) $(AM_V_CCLD)$(LINK) $(cabextract_OBJECTS) $(cabextract_LDADD) $(LIBS) src/cabinfo.$(OBJEXT): src/$(am__dirstamp) src/cabinfo$(EXEEXT): $(src_cabinfo_OBJECTS) $(src_cabinfo_DEPENDENCIES) $(EXTRA_src_cabinfo_DEPENDENCIES) src/$(am__dirstamp) @rm -f src/cabinfo$(EXEEXT) $(AM_V_CCLD)$(LINK) $(src_cabinfo_OBJECTS) $(src_cabinfo_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f mspack/*.$(OBJEXT) -rm -f src/*.$(OBJEXT) distclean-compile: -rm -f *.tab.c .c.o: $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` install-man1: $(man_MANS) @$(NORMAL_INSTALL) @list1=''; \ list2='$(man_MANS)'; \ test -n "$(man1dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.1[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files # Recover from deleted '.trs' file; this should ensure that # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells # to avoid problems with "make -n". .log.trs: rm -f $< $@ $(MAKE) $(AM_MAKEFLAGS) $< # Leading 'am--fnord' is there to ensure the list of targets does not # expand to empty, as could happen e.g. with make check TESTS=''. 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"; }; \ redo_bases=`for i in $$bases; do \ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ done`; \ if test -n "$$redo_bases"; then \ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ if $(am__make_dryrun); then :; else \ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ fi; \ if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ elif test -n "$$redo_logs"; then \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ st=0; \ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ for i in $$redo_bases; do \ test -f $$i.trs && test -r $$i.trs \ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ test -f $$i.log && test -r $$i.log \ || { echo "$$errmsg $$i.log" >&2; st=1; }; \ done; \ test $$st -eq 0 || exit 1; \ fi @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ ws='[ ]'; \ results=`for b in $$bases; do echo $$b.trs; done`; \ test -n "$$results" || results=/dev/null; \ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ if test `expr $$fail + $$xpass + $$error` -eq 0; then \ success=true; \ else \ success=false; \ fi; \ br='==================='; br=$$br$$br$$br$$br; \ result_count () \ { \ if test x"$$1" = x"--maybe-color"; then \ maybe_colorize=yes; \ elif test x"$$1" = x"--no-color"; then \ maybe_colorize=no; \ else \ echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ shift; \ desc=$$1 count=$$2; \ if test $$maybe_colorize = yes && test $$count -gt 0; then \ color_start=$$3 color_end=$$std; \ else \ color_start= color_end=; \ fi; \ echo "$${color_start}# $$desc $$count$${color_end}"; \ }; \ create_testsuite_report () \ { \ result_count $$1 "TOTAL:" $$all "$$brg"; \ result_count $$1 "PASS: " $$pass "$$grn"; \ result_count $$1 "SKIP: " $$skip "$$blu"; \ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ result_count $$1 "FAIL: " $$fail "$$red"; \ result_count $$1 "XPASS:" $$xpass "$$red"; \ result_count $$1 "ERROR:" $$error "$$mgn"; \ }; \ { \ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ $(am__rst_title); \ create_testsuite_report --no-color; \ echo; \ echo ".. contents:: :depth: 2"; \ echo; \ for b in $$bases; do echo $$b; done \ | $(am__create_global_log); \ } >$(TEST_SUITE_LOG).tmp || exit 1; \ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ if $$success; then \ col="$$grn"; \ else \ col="$$red"; \ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${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)$${std}"; \ if test -n "$(PACKAGE_BUGREPORT)"; then \ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ fi; \ echo "$$col$$br$$std"; \ fi; \ $$success || exit 1 check-TESTS: $(check_PROGRAMS) @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`; \ 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) @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; \ log_list=`for i in $$bases; do echo $$i.log; done`; \ log_list=`echo $$log_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ am__force_recheck=am--force-recheck \ TEST_LOGS="$$log_list"; \ exit $$? .test.log: @p='$<'; \ $(am__set_b); \ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) @am__EXEEXT_TRUE@.test$(EXEEXT).log: @am__EXEEXT_TRUE@ @p='$<'; \ @am__EXEEXT_TRUE@ $(am__set_b); \ @am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) 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 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ 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) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile $(PROGRAMS) $(LIBRARIES) $(MANS) config.h installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: -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: distclean-generic: -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 mspack/$(am__dirstamp) -rm -f src/$(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." clean: clean-am clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ clean-noinstLIBRARIES clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-man uninstall-man: uninstall-man1 .MAKE: all check-am install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-TESTS \ check-am clean clean-binPROGRAMS clean-checkPROGRAMS \ clean-cscope clean-generic clean-noinstLIBRARIES \ clean-noinstPROGRAMS cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ dist-xz dist-zip dist-zstd distcheck distclean \ distclean-compile distclean-generic distclean-hdr \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-man1 install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am recheck tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-man uninstall-man1 .PRECIOUS: Makefile # 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: cabextract-1.11/missing0000755000175000017500000001533614376123607012115 00000000000000#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2018-03-07.03; # UTC # Copyright (C) 1996-2021 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # 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 2, or (at your option) # any later version. # 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 . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=https://www.perl.org/ flex_URL=https://github.com/westes/flex gnu_software_URL=https://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: cabextract-1.11/cabextract.spec0000664000175000017500000000160614376123644013510 00000000000000Summary: A program to extract Microsoft Cabinet files Name: cabextract Version: 1.11 Release: 1 License: GPL Group: Applications/Archiving Source: https://www.cabextract.org.uk/%{name}-%{version}.tar.gz URL: https://www.cabextract.org.uk/ Vendor: Stuart Caie Packager: Stuart Caie BuildRoot: %{_tmppath}/%{name}-%{version}-root Prefix: /usr %description Cabinet (.CAB) files are a form of archive, which Microsoft use to distribute their software, and things like Windows Font Packs. The cabextract program unpacks these files. %prep %setup %build CFLAGS=${RPM_OPT_FLAGS} ./configure --prefix=%{prefix} make %install rm -rf ${RPM_BUILD_ROOT} %makeinstall %clean [ ${RPM_BUILD_ROOT} != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(0644, root, root, 0755) %doc AUTHORS ChangeLog NEWS README %attr(0755, root, root) %{_bindir}/cabextract %{_mandir}/man1/cabextract.1*