SDL2_gfx-1.0.4/ 40777 0 0 0 13240163226 6102 5SDL2_gfx-1.0.4/acinclude/ 40777 0 0 0 13240160030 10017 5SDL2_gfx-1.0.4/acinclude/libtool.m4100777 0 0 1044727 12217637577 12160 0# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written 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. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 57 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2010 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES # -------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case "$ECHO" in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; haiku*) version_type=linux need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_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 `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= 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 _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # 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. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=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 exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi 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 exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ 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 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; 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. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS="$save_LDFLAGS"]) if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], [[If ld is used when linking, flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; 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 exp_sym_flag='-Bexport' no_entry_flag="" 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 case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ 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 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS SDL2_gfx-1.0.4/acinclude/ltdl.m4100777 0 0 64051 12021530027 11351 0############################################################################## # ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*- # # Copyright (C) 1999-2006, 2007, 2008 Free Software Foundation, Inc. # Written by Thomas Tanner, 1999 # # 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. # serial 17 LTDL_INIT # LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE]) # ------------------------------------------ # DIRECTORY contains the libltdl sources. It is okay to call this # function multiple times, as long as the same DIRECTORY is always given. AC_DEFUN([LT_CONFIG_LTDL_DIR], [AC_BEFORE([$0], [LTDL_INIT]) _$0($*) ])# LT_CONFIG_LTDL_DIR # We break this out into a separate macro, so that we can call it safely # internally without being caught accidentally by the sed scan in libtoolize. m4_defun([_LT_CONFIG_LTDL_DIR], [dnl remove trailing slashes m4_pushdef([_ARG_DIR], m4_bpatsubst([$1], [/*$])) m4_case(_LTDL_DIR, [], [dnl only set lt_ltdl_dir if _ARG_DIR is not simply `.' m4_if(_ARG_DIR, [.], [], [m4_define([_LTDL_DIR], _ARG_DIR) _LT_SHELL_INIT([lt_ltdl_dir=']_ARG_DIR['])])], [m4_if(_ARG_DIR, _LTDL_DIR, [], [m4_fatal([multiple libltdl directories: `]_LTDL_DIR[', `]_ARG_DIR['])])]) m4_popdef([_ARG_DIR]) ])# _LT_CONFIG_LTDL_DIR # Initialise: m4_define([_LTDL_DIR], []) # _LT_BUILD_PREFIX # ---------------- # If Autoconf is new enough, expand to `${top_build_prefix}', otherwise # to `${top_builddir}/'. m4_define([_LT_BUILD_PREFIX], [m4_ifdef([AC_AUTOCONF_VERSION], [m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.62]), [-1], [m4_ifdef([_AC_HAVE_TOP_BUILD_PREFIX], [${top_build_prefix}], [${top_builddir}/])], [${top_build_prefix}])], [${top_builddir}/])[]dnl ]) # LTDL_CONVENIENCE # ---------------- # sets LIBLTDL to the link flags for the libltdl convenience library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-convenience to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. LIBLTDL will be prefixed with # '${top_build_prefix}' if available, otherwise with '${top_builddir}/', # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single # quotes!). If your package is not flat and you're not using automake, # define top_build_prefix, top_builddir, and top_srcdir appropriately # in your Makefiles. AC_DEFUN([LTDL_CONVENIENCE], [AC_BEFORE([$0], [LTDL_INIT])dnl dnl Although the argument is deprecated and no longer documented, dnl LTDL_CONVENIENCE used to take a DIRECTORY orgument, if we have one dnl here make sure it is the same as any other declaration of libltdl's dnl location! This also ensures lt_ltdl_dir is set when configure.ac is dnl not yet using an explicit LT_CONFIG_LTDL_DIR. m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl _$0() ])# LTDL_CONVENIENCE # AC_LIBLTDL_CONVENIENCE accepted a directory argument in older libtools, # now we have LT_CONFIG_LTDL_DIR: AU_DEFUN([AC_LIBLTDL_CONVENIENCE], [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])]) _LTDL_CONVENIENCE]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBLTDL_CONVENIENCE], []) # _LTDL_CONVENIENCE # ----------------- # Code shared by LTDL_CONVENIENCE and LTDL_INIT([convenience]). m4_defun([_LTDL_CONVENIENCE], [case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la" LTDLDEPS=$LIBLTDL LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}" AC_SUBST([LIBLTDL]) AC_SUBST([LTDLDEPS]) AC_SUBST([LTDLINCL]) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" AC_SUBST([INCLTDL]) ])# _LTDL_CONVENIENCE # LTDL_INSTALLABLE # ---------------- # sets LIBLTDL to the link flags for the libltdl installable library # and LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-install to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called from here. If an installed libltdl # is not found, LIBLTDL will be prefixed with '${top_build_prefix}' if # available, otherwise with '${top_builddir}/', and LTDLINCL will be # prefixed with '${top_srcdir}/' (note the single quotes!). If your # package is not flat and you're not using automake, define top_build_prefix, # top_builddir, and top_srcdir appropriately in your Makefiles. # In the future, this macro may have to be called after LT_INIT. AC_DEFUN([LTDL_INSTALLABLE], [AC_BEFORE([$0], [LTDL_INIT])dnl dnl Although the argument is deprecated and no longer documented, dnl LTDL_INSTALLABLE used to take a DIRECTORY orgument, if we have one dnl here make sure it is the same as any other declaration of libltdl's dnl location! This also ensures lt_ltdl_dir is set when configure.ac is dnl not yet using an explicit LT_CONFIG_LTDL_DIR. m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl _$0() ])# LTDL_INSTALLABLE # AC_LIBLTDL_INSTALLABLE accepted a directory argument in older libtools, # now we have LT_CONFIG_LTDL_DIR: AU_DEFUN([AC_LIBLTDL_INSTALLABLE], [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])]) _LTDL_INSTALLABLE]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBLTDL_INSTALLABLE], []) # _LTDL_INSTALLABLE # ----------------- # Code shared by LTDL_INSTALLABLE and LTDL_INIT([installable]). m4_defun([_LTDL_INSTALLABLE], [if test -f $prefix/lib/libltdl.la; then lt_save_LDFLAGS="$LDFLAGS" LDFLAGS="-L$prefix/lib $LDFLAGS" AC_CHECK_LIB([ltdl], [lt_dlinit], [lt_lib_ltdl=yes]) LDFLAGS="$lt_save_LDFLAGS" if test x"${lt_lib_ltdl-no}" = xyes; then if test x"$enable_ltdl_install" != xyes; then # Don't overwrite $prefix/lib/libltdl.la without --enable-ltdl-install AC_MSG_WARN([not overwriting libltdl at $prefix, force with `--enable-ltdl-install']) enable_ltdl_install=no fi elif test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) fi fi # If configure.ac declared an installable ltdl, and the user didn't override # with --disable-ltdl-install, we will install the shipped libltdl. case $enable_ltdl_install in no) ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" LTDLDEPS= LTDLINCL= ;; *) enable_ltdl_install=yes ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdl.la" LTDLDEPS=$LIBLTDL LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}" ;; esac AC_SUBST([LIBLTDL]) AC_SUBST([LTDLDEPS]) AC_SUBST([LTDLINCL]) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" AC_SUBST([INCLTDL]) ])# LTDL_INSTALLABLE # _LTDL_MODE_DISPATCH # ------------------- m4_define([_LTDL_MODE_DISPATCH], [dnl If _LTDL_DIR is `.', then we are configuring libltdl itself: m4_if(_LTDL_DIR, [], [], dnl if _LTDL_MODE was not set already, the default value is `subproject': [m4_case(m4_default(_LTDL_MODE, [subproject]), [subproject], [AC_CONFIG_SUBDIRS(_LTDL_DIR) _LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"])], [nonrecursive], [_LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"; lt_libobj_prefix="$lt_ltdl_dir/"])], [recursive], [], [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])dnl dnl Be careful not to expand twice: m4_define([$0], []) ])# _LTDL_MODE_DISPATCH # _LT_LIBOBJ(MODULE_NAME) # ----------------------- # Like AC_LIBOBJ, except that MODULE_NAME goes into _LT_LIBOBJS instead # of into LIBOBJS. AC_DEFUN([_LT_LIBOBJ], [ m4_pattern_allow([^_LT_LIBOBJS$]) _LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext" ])# _LT_LIBOBJS # LTDL_INIT([OPTIONS]) # -------------------- # Clients of libltdl can use this macro to allow the installer to # choose between a shipped copy of the ltdl sources or a preinstalled # version of the library. If the shipped ltdl sources are not in a # subdirectory named libltdl, the directory name must be given by # LT_CONFIG_LTDL_DIR. AC_DEFUN([LTDL_INIT], [dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) dnl We need to keep our own list of libobjs separate from our parent project, dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while dnl we look for our own LIBOBJs. m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ])) m4_pushdef([AC_LIBSOURCES]) dnl If not otherwise defined, default to the 1.5.x compatible subproject mode: m4_if(_LTDL_MODE, [], [m4_define([_LTDL_MODE], m4_default([$2], [subproject])) m4_if([-1], [m4_bregexp(_LTDL_MODE, [\(subproject\|\(non\)?recursive\)])], [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])]) AC_ARG_WITH([included_ltdl], [AS_HELP_STRING([--with-included-ltdl], [use the GNU ltdl sources included here])]) if test "x$with_included_ltdl" != xyes; then # We are not being forced to use the included libltdl sources, so # decide whether there is a useful installed version we can use. AC_CHECK_HEADER([ltdl.h], [AC_CHECK_DECL([lt_dlinterface_register], [AC_CHECK_LIB([ltdl], [lt_dladvise_preload], [with_included_ltdl=no], [with_included_ltdl=yes])], [with_included_ltdl=yes], [AC_INCLUDES_DEFAULT #include ])], [with_included_ltdl=yes], [AC_INCLUDES_DEFAULT] ) fi dnl If neither LT_CONFIG_LTDL_DIR, LTDL_CONVENIENCE nor LTDL_INSTALLABLE dnl was called yet, then for old times' sake, we assume libltdl is in an dnl eponymous directory: AC_PROVIDE_IFELSE([LT_CONFIG_LTDL_DIR], [], [_LT_CONFIG_LTDL_DIR([libltdl])]) AC_ARG_WITH([ltdl_include], [AS_HELP_STRING([--with-ltdl-include=DIR], [use the ltdl headers installed in DIR])]) if test -n "$with_ltdl_include"; then if test -f "$with_ltdl_include/ltdl.h"; then : else AC_MSG_ERROR([invalid ltdl include directory: `$with_ltdl_include']) fi else with_ltdl_include=no fi AC_ARG_WITH([ltdl_lib], [AS_HELP_STRING([--with-ltdl-lib=DIR], [use the libltdl.la installed in DIR])]) if test -n "$with_ltdl_lib"; then if test -f "$with_ltdl_lib/libltdl.la"; then : else AC_MSG_ERROR([invalid ltdl library directory: `$with_ltdl_lib']) fi else with_ltdl_lib=no fi case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in ,yes,no,no,) m4_case(m4_default(_LTDL_TYPE, [convenience]), [convenience], [_LTDL_CONVENIENCE], [installable], [_LTDL_INSTALLABLE], [m4_fatal([unknown libltdl build type: ]_LTDL_TYPE)]) ;; ,no,no,no,) # If the included ltdl is not to be used, then use the # preinstalled libltdl we found. AC_DEFINE([HAVE_LTDL], [1], [Define this if a modern libltdl is already installed]) LIBLTDL=-lltdl LTDLDEPS= LTDLINCL= ;; ,no*,no,*) AC_MSG_ERROR([`--with-ltdl-include' and `--with-ltdl-lib' options must be used together]) ;; *) with_included_ltdl=no LIBLTDL="-L$with_ltdl_lib -lltdl" LTDLDEPS= LTDLINCL="-I$with_ltdl_include" ;; esac INCLTDL="$LTDLINCL" # Report our decision... AC_MSG_CHECKING([where to find libltdl headers]) AC_MSG_RESULT([$LTDLINCL]) AC_MSG_CHECKING([where to find libltdl library]) AC_MSG_RESULT([$LIBLTDL]) _LTDL_SETUP dnl restore autoconf definition. m4_popdef([AC_LIBOBJ]) m4_popdef([AC_LIBSOURCES]) AC_CONFIG_COMMANDS_PRE([ _ltdl_libobjs= _ltdl_ltlibobjs= if test -n "$_LT_LIBOBJS"; then # Remove the extension. _lt_sed_drop_objext='s/\.o$//;s/\.obj$//' for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext" _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo" done fi AC_SUBST([ltdl_LIBOBJS], [$_ltdl_libobjs]) AC_SUBST([ltdl_LTLIBOBJS], [$_ltdl_ltlibobjs]) ]) # Only expand once: m4_define([LTDL_INIT]) ])# LTDL_INIT # Old names: AU_DEFUN([AC_LIB_LTDL], [LTDL_INIT($@)]) AU_DEFUN([AC_WITH_LTDL], [LTDL_INIT($@)]) AU_DEFUN([LT_WITH_LTDL], [LTDL_INIT($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIB_LTDL], []) dnl AC_DEFUN([AC_WITH_LTDL], []) dnl AC_DEFUN([LT_WITH_LTDL], []) # _LTDL_SETUP # ----------- # Perform all the checks necessary for compilation of the ltdl objects # -- including compiler checks and header checks. This is a public # interface mainly for the benefit of libltdl's own configure.ac, most # other users should call LTDL_INIT instead. AC_DEFUN([_LTDL_SETUP], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_SYS_MODULE_EXT])dnl AC_REQUIRE([LT_SYS_MODULE_PATH])dnl AC_REQUIRE([LT_SYS_DLSEARCH_PATH])dnl AC_REQUIRE([LT_LIB_DLLOAD])dnl AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl AC_REQUIRE([LT_FUNC_DLSYM_USCORE])dnl AC_REQUIRE([LT_SYS_DLOPEN_DEPLIBS])dnl AC_REQUIRE([gl_FUNC_ARGZ])dnl m4_require([_LT_CHECK_OBJDIR])dnl m4_require([_LT_HEADER_DLFCN])dnl m4_require([_LT_CHECK_DLPREOPEN])dnl m4_require([_LT_DECL_SED])dnl dnl Don't require this, or it will be expanded earlier than the code dnl that sets the variables it relies on: _LT_ENABLE_INSTALL dnl _LTDL_MODE specific code must be called at least once: _LTDL_MODE_DISPATCH # In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS # the user used. This is so that ltdl.h can pick up the parent projects # config.h file, The first file in AC_CONFIG_HEADERS must contain the # definitions required by ltdl.c. # FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility). AC_CONFIG_COMMANDS_PRE([dnl m4_pattern_allow([^LT_CONFIG_H$])dnl m4_ifset([AH_HEADER], [LT_CONFIG_H=AH_HEADER], [m4_ifset([AC_LIST_HEADERS], [LT_CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's,^[[ ]]*,,;s,[[ :]].*$,,'`], [])])]) AC_SUBST([LT_CONFIG_H]) AC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h], [], [], [AC_INCLUDES_DEFAULT]) AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])]) AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])]) AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension]) name=ltdl LTDLOPEN=`eval "\\$ECHO \"$libname_spec\""` AC_SUBST([LTDLOPEN]) ])# _LTDL_SETUP # _LT_ENABLE_INSTALL # ------------------ m4_define([_LT_ENABLE_INSTALL], [AC_ARG_ENABLE([ltdl-install], [AS_HELP_STRING([--enable-ltdl-install], [install libltdl])]) case ,${enable_ltdl_install},${enable_ltdl_convenience} in *yes*) ;; *) enable_ltdl_convenience=yes ;; esac m4_ifdef([AM_CONDITIONAL], [AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno) AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)]) ])# _LT_ENABLE_INSTALL # LT_SYS_DLOPEN_DEPLIBS # --------------------- AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_CACHE_CHECK([whether deplibs are loaded by dlopen], [lt_cv_sys_dlopen_deplibs], [# PORTME does your system automatically load deplibs for dlopen? # or its logical equivalent (e.g. shl_load for HP-UX < 11) # For now, we just catch OSes we know something about -- in the # future, we'll try test this programmatically. lt_cv_sys_dlopen_deplibs=unknown case $host_os in aix3*|aix4.1.*|aix4.2.*) # Unknown whether this is true for these versions of AIX, but # we want this `case' here to explicitly catch those versions. lt_cv_sys_dlopen_deplibs=unknown ;; aix[[4-9]]*) lt_cv_sys_dlopen_deplibs=yes ;; amigaos*) case $host_cpu in powerpc) lt_cv_sys_dlopen_deplibs=no ;; esac ;; darwin*) # Assuming the user has installed a libdl from somewhere, this is true # If you are looking for one http://www.opendarwin.org/projects/dlcompat lt_cv_sys_dlopen_deplibs=yes ;; freebsd* | dragonfly*) lt_cv_sys_dlopen_deplibs=yes ;; gnu* | linux* | k*bsd*-gnu) # GNU and its variants, using gnu ld.so (Glibc) lt_cv_sys_dlopen_deplibs=yes ;; hpux10*|hpux11*) lt_cv_sys_dlopen_deplibs=yes ;; interix*) lt_cv_sys_dlopen_deplibs=yes ;; irix[[12345]]*|irix6.[[01]]*) # Catch all versions of IRIX before 6.2, and indicate that we don't # know how it worked for any of those versions. lt_cv_sys_dlopen_deplibs=unknown ;; irix*) # The case above catches anything before 6.2, and it's known that # at 6.2 and later dlopen does load deplibs. lt_cv_sys_dlopen_deplibs=yes ;; netbsd*) lt_cv_sys_dlopen_deplibs=yes ;; openbsd*) lt_cv_sys_dlopen_deplibs=yes ;; osf[[1234]]*) # dlopen did load deplibs (at least at 4.x), but until the 5.x series, # it did *not* use an RPATH in a shared library to find objects the # library depends on, so we explicitly say `no'. lt_cv_sys_dlopen_deplibs=no ;; osf5.0|osf5.0a|osf5.1) # dlopen *does* load deplibs and with the right loader patch applied # it even uses RPATH in a shared library to search for shared objects # that the library depends on, but there's no easy way to know if that # patch is installed. Since this is the case, all we can really # say is unknown -- it depends on the patch being installed. If # it is, this changes to `yes'. Without it, it would be `no'. lt_cv_sys_dlopen_deplibs=unknown ;; osf*) # the two cases above should catch all versions of osf <= 5.1. Read # the comments above for what we know about them. # At > 5.1, deplibs are loaded *and* any RPATH in a shared library # is used to find them so we can finally say `yes'. lt_cv_sys_dlopen_deplibs=yes ;; qnx*) lt_cv_sys_dlopen_deplibs=yes ;; solaris*) lt_cv_sys_dlopen_deplibs=yes ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) libltdl_cv_sys_dlopen_deplibs=yes ;; esac ]) if test "$lt_cv_sys_dlopen_deplibs" != yes; then AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1], [Define if the OS needs help to load dependent libraries for dlopen().]) fi ])# LT_SYS_DLOPEN_DEPLIBS # Old name: AU_ALIAS([AC_LTDL_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], []) # LT_SYS_MODULE_EXT # ----------------- AC_DEFUN([LT_SYS_MODULE_EXT], [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl AC_CACHE_CHECK([which extension is used for runtime loadable modules], [libltdl_cv_shlibext], [ module=yes eval libltdl_cv_shlibext=$shrext_cmds ]) if test -n "$libltdl_cv_shlibext"; then m4_pattern_allow([LT_MODULE_EXT])dnl AC_DEFINE_UNQUOTED([LT_MODULE_EXT], ["$libltdl_cv_shlibext"], [Define to the extension used for runtime loadable modules, say, ".so".]) fi ])# LT_SYS_MODULE_EXT # Old name: AU_ALIAS([AC_LTDL_SHLIBEXT], [LT_SYS_MODULE_EXT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LTDL_SHLIBEXT], []) # LT_SYS_MODULE_PATH # ------------------ AC_DEFUN([LT_SYS_MODULE_PATH], [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl AC_CACHE_CHECK([which variable specifies run-time module search path], [lt_cv_module_path_var], [lt_cv_module_path_var="$shlibpath_var"]) if test -n "$lt_cv_module_path_var"; then m4_pattern_allow([LT_MODULE_PATH_VAR])dnl AC_DEFINE_UNQUOTED([LT_MODULE_PATH_VAR], ["$lt_cv_module_path_var"], [Define to the name of the environment variable that determines the run-time module search path.]) fi ])# LT_SYS_MODULE_PATH # Old name: AU_ALIAS([AC_LTDL_SHLIBPATH], [LT_SYS_MODULE_PATH]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LTDL_SHLIBPATH], []) # LT_SYS_DLSEARCH_PATH # -------------------- AC_DEFUN([LT_SYS_DLSEARCH_PATH], [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl AC_CACHE_CHECK([for the default library search path], [lt_cv_sys_dlsearch_path], [lt_cv_sys_dlsearch_path="$sys_lib_dlsearch_path_spec"]) if test -n "$lt_cv_sys_dlsearch_path"; then sys_dlsearch_path= for dir in $lt_cv_sys_dlsearch_path; do if test -z "$sys_dlsearch_path"; then sys_dlsearch_path="$dir" else sys_dlsearch_path="$sys_dlsearch_path$PATH_SEPARATOR$dir" fi done m4_pattern_allow([LT_DLSEARCH_PATH])dnl AC_DEFINE_UNQUOTED([LT_DLSEARCH_PATH], ["$sys_dlsearch_path"], [Define to the system default library search path.]) fi ])# LT_SYS_DLSEARCH_PATH # Old name: AU_ALIAS([AC_LTDL_SYSSEARCHPATH], [LT_SYS_DLSEARCH_PATH]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LTDL_SYSSEARCHPATH], []) # _LT_CHECK_DLPREOPEN # ------------------- m4_defun([_LT_CHECK_DLPREOPEN], [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen], [libltdl_cv_preloaded_symbols], [if test -n "$lt_cv_sys_global_symbol_pipe"; then libltdl_cv_preloaded_symbols=yes else libltdl_cv_preloaded_symbols=no fi ]) if test x"$libltdl_cv_preloaded_symbols" = xyes; then AC_DEFINE([HAVE_PRELOADED_SYMBOLS], [1], [Define if libtool can extract symbol lists from object files.]) fi ])# _LT_CHECK_DLPREOPEN # LT_LIB_DLLOAD # ------------- AC_DEFUN([LT_LIB_DLLOAD], [m4_pattern_allow([^LT_DLLOADERS$]) LT_DLLOADERS= AC_SUBST([LT_DLLOADERS]) AC_LANG_PUSH([C]) LIBADD_DLOPEN= AC_SEARCH_LIBS([dlopen], [dl], [AC_DEFINE([HAVE_LIBDL], [1], [Define if you have the libdl library or equivalent.]) if test "$ac_cv_search_dlopen" != "none required" ; then LIBADD_DLOPEN="-ldl" fi libltdl_cv_lib_dl_dlopen="yes" LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"], [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H # include #endif ]], [[dlopen(0, 0);]])], [AC_DEFINE([HAVE_LIBDL], [1], [Define if you have the libdl library or equivalent.]) libltdl_cv_func_dlopen="yes" LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"], [AC_CHECK_LIB([svld], [dlopen], [AC_DEFINE([HAVE_LIBDL], [1], [Define if you have the libdl library or equivalent.]) LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes" LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])]) if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes then lt_save_LIBS="$LIBS" LIBS="$LIBS $LIBADD_DLOPEN" AC_CHECK_FUNCS([dlerror]) LIBS="$lt_save_LIBS" fi AC_SUBST([LIBADD_DLOPEN]) LIBADD_SHL_LOAD= AC_CHECK_FUNC([shl_load], [AC_DEFINE([HAVE_SHL_LOAD], [1], [Define if you have the shl_load function.]) LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"], [AC_CHECK_LIB([dld], [shl_load], [AC_DEFINE([HAVE_SHL_LOAD], [1], [Define if you have the shl_load function.]) LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la" LIBADD_SHL_LOAD="-ldld"])]) AC_SUBST([LIBADD_SHL_LOAD]) case $host_os in darwin[[1567]].*) # We only want this for pre-Mac OS X 10.4. AC_CHECK_FUNC([_dyld_func_lookup], [AC_DEFINE([HAVE_DYLD], [1], [Define if you have the _dyld_func_lookup function.]) LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"]) ;; beos*) LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la" ;; cygwin* | mingw* | os2* | pw32*) AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include ]]) LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la" ;; esac AC_CHECK_LIB([dld], [dld_link], [AC_DEFINE([HAVE_DLD], [1], [Define if you have the GNU dld library.]) LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"]) AC_SUBST([LIBADD_DLD_LINK]) m4_pattern_allow([^LT_DLPREOPEN$]) LT_DLPREOPEN= if test -n "$LT_DLLOADERS" then for lt_loader in $LT_DLLOADERS; do LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader " done AC_DEFINE([HAVE_LIBDLLOADER], [1], [Define if libdlloader will be built on this platform]) fi AC_SUBST([LT_DLPREOPEN]) dnl This isn't used anymore, but set it for backwards compatibility LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD" AC_SUBST([LIBADD_DL]) AC_LANG_POP ])# LT_LIB_DLLOAD # Old name: AU_ALIAS([AC_LTDL_DLLIB], [LT_LIB_DLLOAD]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LTDL_DLLIB], []) # LT_SYS_SYMBOL_USCORE # -------------------- # does the compiler prefix global symbols with an underscore? AC_DEFUN([LT_SYS_SYMBOL_USCORE], [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl AC_CACHE_CHECK([for _ prefix in compiled symbols], [lt_cv_sys_symbol_underscore], [lt_cv_sys_symbol_underscore=no cat > conftest.$ac_ext <<_LT_EOF void nm_test_func(){} int main(){nm_test_func;return 0;} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. ac_nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then # See whether the symbols have a leading underscore. if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then lt_cv_sys_symbol_underscore=yes else if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then : else echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD fi fi else echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.c >&AS_MESSAGE_LOG_FD fi rm -rf conftest* ]) sys_symbol_underscore=$lt_cv_sys_symbol_underscore AC_SUBST([sys_symbol_underscore]) ])# LT_SYS_SYMBOL_USCORE # Old name: AU_ALIAS([AC_LTDL_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LTDL_SYMBOL_USCORE], []) # LT_FUNC_DLSYM_USCORE # -------------------- AC_DEFUN([LT_FUNC_DLSYM_USCORE], [AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl if test x"$lt_cv_sys_symbol_underscore" = xyes; then if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then AC_CACHE_CHECK([whether we have to add an underscore for dlsym], [libltdl_cv_need_uscore], [libltdl_cv_need_uscore=unknown save_LIBS="$LIBS" LIBS="$LIBS $LIBADD_DLOPEN" _LT_TRY_DLOPEN_SELF( [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes], [], [libltdl_cv_need_uscore=cross]) LIBS="$save_LIBS" ]) fi fi if test x"$libltdl_cv_need_uscore" = xyes; then AC_DEFINE([NEED_USCORE], [1], [Define if dlsym() requires a leading underscore in symbol names.]) fi ])# LT_FUNC_DLSYM_USCORE # Old name: AU_ALIAS([AC_LTDL_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LTDL_DLSYM_USCORE], []) SDL2_gfx-1.0.4/acinclude/ltoptions.m4100777 0 0 27256 12217637577 12504 0# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, # Inc. # Written by Gary V. Vaughan, 2004 # # 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. # serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) SDL2_gfx-1.0.4/acinclude/ltsugar.m4100777 0 0 10424 12217637577 12117 0# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # 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. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) SDL2_gfx-1.0.4/acinclude/ltversion.m4100777 0 0 1256 12217637577 12446 0# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # 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. # @configure_input@ # serial 3294 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4]) m4_define([LT_PACKAGE_REVISION], [1.3294]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4' macro_revision='1.3294' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) SDL2_gfx-1.0.4/acinclude/lt~obsolete.m4100777 0 0 13232 12021530027 12757 0############################################################################## # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # 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. # serial 4 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) SDL2_gfx-1.0.4/acinclude/pkg.m4100777 0 0 12145 12021530027 11170 0# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # # Copyright © 2004 Scott James Remnant . # # 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # 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. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 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 ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # # Similar to PKG_CHECK_MODULES, make sure that the first instance of # this or PKG_CHECK_MODULES is called, or make sure 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_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$PKG_CONFIG"; then if test -n "$$1"; then pkg_cv_[]$1="$$1" else PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], [pkg_failed=yes]) fi else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- 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 ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # 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 _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` else $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD ifelse([$4], , [AC_MSG_ERROR(dnl [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 ])], [AC_MSG_RESULT([no]) $4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl [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 .])], [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES SDL2_gfx-1.0.4/acinclude/sdl2.m4100777 0 0 15465 12021530027 11263 0# Configure paths for SDL # Sam Lantinga 9/21/99 # stolen from Manish Singh # stolen back from Frank Belew # stolen from Manish Singh # Shamelessly stolen from Owen Taylor # serial 1 dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS dnl AC_DEFUN([AM_PATH_SDL2], [dnl dnl Get the cflags and libraries from the sdl2-config script dnl AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)], sdl_prefix="$withval", sdl_prefix="") AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)], sdl_exec_prefix="$withval", sdl_exec_prefix="") AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program], , enable_sdltest=yes) min_sdl_version=ifelse([$1], ,0.9.0,$1) if test "x$sdl_prefix$sdl_exec_prefix" = x ; then PKG_CHECK_MODULES([SDL], [sdl2 >= $min_sdl_version], [sdl_pc=yes], [sdl_pc=no]) else sdl_pc=no if test x$sdl_exec_prefix != x ; then sdl_config_args="$sdl_config_args --exec-prefix=$sdl_exec_prefix" if test x${SDL_CONFIG+set} != xset ; then SDL_CONFIG=$sdl_exec_prefix/bin/sdl2-config fi fi if test x$sdl_prefix != x ; then sdl_config_args="$sdl_config_args --prefix=$sdl_prefix" if test x${SDL_CONFIG+set} != xset ; then SDL_CONFIG=$sdl_prefix/bin/sdl2-config fi fi fi if test "x$sdl_pc" = xyes ; then no_sdl="" SDL_CONFIG="pkg-config sdl2" else as_save_PATH="$PATH" if test "x$prefix" != xNONE && test "$cross_compiling" != yes; then PATH="$prefix/bin:$prefix/usr/bin:$PATH" fi AC_PATH_PROG(SDL_CONFIG, sdl2-config, no, [$PATH]) PATH="$as_save_PATH" AC_MSG_CHECKING(for SDL - version >= $min_sdl_version) no_sdl="" if test "$SDL_CONFIG" = "no" ; then no_sdl=yes else SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags` SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs` sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` if test "x$enable_sdltest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_CXXFLAGS="$CXXFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $SDL_CFLAGS" CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" LIBS="$LIBS $SDL_LIBS" dnl dnl Now check if the installed SDL is sufficiently new. (Also sanity dnl checks the results of sdl2-config to some extent dnl rm -f conf.sdltest AC_TRY_RUN([ #include #include #include #include "SDL.h" char* my_strdup (char *str) { char *new_str; if (str) { new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); strcpy (new_str, str); } else new_str = NULL; return new_str; } int main (int argc, char *argv[]) { int major, minor, micro; char *tmp_version; /* This hangs on some systems (?) system ("touch conf.sdltest"); */ { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); } /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = my_strdup("$min_sdl_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_sdl_version"); exit(1); } if (($sdl_major_version > major) || (($sdl_major_version == major) && ($sdl_minor_version > minor)) || (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro))) { return 0; } else { printf("\n*** 'sdl2-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version); printf("*** of SDL required is %d.%d.%d. If sdl2-config is correct, then it is\n", major, minor, micro); printf("*** best to upgrade to the required version.\n"); printf("*** If sdl2-config was wrong, set the environment variable SDL_CONFIG\n"); printf("*** to point to the correct copy of sdl2-config, and remove the file\n"); printf("*** config.cache before re-running configure\n"); return 1; } } ],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" CXXFLAGS="$ac_save_CXXFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_sdl" = x ; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi fi if test "x$no_sdl" = x ; then ifelse([$2], , :, [$2]) else if test "$SDL_CONFIG" = "no" ; then echo "*** The sdl2-config script installed by SDL could not be found" echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the SDL_CONFIG environment variable to the" echo "*** full path to sdl2-config." else if test -f conf.sdltest ; then : else echo "*** Could not run SDL test program, checking why..." CFLAGS="$CFLAGS $SDL_CFLAGS" CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" LIBS="$LIBS $SDL_LIBS" AC_TRY_LINK([ #include #include "SDL.h" int main(int argc, char *argv[]) { return 0; } #undef main #define main K_and_R_C_main ], [ return 0; ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding SDL or finding the wrong" echo "*** version of SDL. If it is not finding SDL, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means SDL was incorrectly installed" echo "*** or that you have moved SDL since it was installed. In the latter case, you" echo "*** may want to edit the sdl2-config script: $SDL_CONFIG" ]) CFLAGS="$ac_save_CFLAGS" CXXFLAGS="$ac_save_CXXFLAGS" LIBS="$ac_save_LIBS" fi fi SDL_CFLAGS="" SDL_LIBS="" ifelse([$3], , :, [$3]) fi AC_SUBST(SDL_CFLAGS) AC_SUBST(SDL_LIBS) rm -f conf.sdltest ]) SDL2_gfx-1.0.4/aclocal.m4100777 0 0 120556 12632323332 10113 0# generated automatically by aclocal 1.11.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009, 2010, 2011 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_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software # Foundation, Inc. # Written by Scott James Remnant, 2004. # # 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. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 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. # serial 1 # 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.11' 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.11.6], [], [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.11.6])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005, 2011 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. # serial 1 # 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], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # 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. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$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, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, # 2010, 2011 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. # serial 12 # 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", "GCJ", or "OBJC". # 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 ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" 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 8's {/usr,}/bin/sh. touch 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, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) 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, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # 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. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 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. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _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. FIXME. This creates each `.P' file that we will # 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" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 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. # serial 16 # 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. # 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.62])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], [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_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [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([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. 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)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl 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 ]) 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, 2003, 2005, 2008, 2011 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. # serial 1 # 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}" != 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, 2005 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. # serial 2 # 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, 2002, 2003, 2005, 2009 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. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # 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. # serial 6 # 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 supports --run. # If it does, 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 case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006, 2011 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. # serial 1 # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 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. # serial 5 # _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])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # 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. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # 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 ( 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 rm -f conftest.file 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 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)]) # Copyright (C) 2001, 2003, 2005, 2011 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. # serial 1 # 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, 2008, 2010 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. # serial 3 # _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, 2005, 2012 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. # serial 2 # _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}']) m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. 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/libtool.m4]) m4_include([acinclude/ltoptions.m4]) m4_include([acinclude/ltsugar.m4]) m4_include([acinclude/ltversion.m4]) m4_include([acinclude/lt~obsolete.m4]) m4_include([acinclude/pkg.m4]) m4_include([acinclude/sdl2.m4]) SDL2_gfx-1.0.4/AUTHORS100777 0 0 37 12021530027 7203 0aschiffler at ferzkopp dot net SDL2_gfx-1.0.4/autogen.sh100777 0 0 236 12021530027 10152 0#!/bin/sh # aclocal -I acinclude automake --foreign --include-deps --add-missing --copy autoconf #./configure $* echo "Now you are ready to run ./configure" SDL2_gfx-1.0.4/autom4te.cache/ 40777 0 0 0 13052747045 10716 5SDL2_gfx-1.0.4/ChangeLog100777 0 0 4471 13240162666 7771 0SDL2_gfx ChangeLog Sun, Feb 11, 2018 16:55:00 PM - version rev to 1.0.4 - fix int overflow in ellipseRGBA for large radii (thanks for reporting David) - fix aaline wrong direction hline bug (thanks Andre) - fix off-by-1 error in rotateSurface90Degrees (thanks Austin) Mon, Feb 20, 2017 9:04:29 PM - version rev to 1.0.3 - updates to VS solution - update README for VS2015 - fix to rotozoomSurfaceSizeTrig (thanks hydren) - fix for special case of roundedBoxRGBA (thanks LukeMS) Thu, Dec 10, 2015 8:11:26 AM - added XCode.zip (thanks Matthias for contributing) Sun, Jul 13, 2014 9:21:00 AM - added TestFramerate Fri, Jul 11, 2014 7:33:12 PM - rewrote thick line algorithm using polygon drawing (much less code and faster than original Murphy-Bresenham algorithm) - update TestThickLine accuracy test in TestGfx - update file headers Fri, Jul 04, 2014 4:00:21 PM - rewrote ellipse algorithm used by non-AA line/filled circle/ellipse functions: integer midpoint algorithm with 4x overscan for visual accuracy - fix bugs in TestGfx - add screenshot image Sun, Jun 15, 2014 3:12:31 PM - fixed roundedBox by rewriting algorithm and base it on filledCircle - fixed textured polygon algorithm - updated testgfx extensively (visual accuracy tests, updated tests for textured polygon) - updated README Mon, Jun 09, 2014 8:48:50 AM - removed VS2010 solution files; updated VS2012 solution files for SDL2 updates Mon, Jun 02, 2014 7:36:24 AM - add patch for pkg-config support (thanks Sylvain) - update tests to use SDLTest library - fix commandline parsing in testgfx Mon, May 12, 2014 7:29:24 AM - fixed BoxRGBA size-off-by-1 error (thanks Stefan for reporting) Sun, Feb 02, 2014 12:00:00 PM - fixed and optimized rotateSurface90Degrees - updated testrotozoom to allow specification of test range Sun, Nov 03, 2013 10:11:16 AM - updated testgfx program for benchmarking primitive rendering performance - updated test programs based on VS warnings - fixed VS2012 solution for Release build Mon, Oct 28, 2013 8:00:05 AM - bugfix to _aaline special cases - added image filter functions - added to documentation - updated readme and changelog - updated solutions for VS2010 and VS2012 Tue, Sep 04, 2012 8:27:44 AM - initial release of development version (partially finished) SDL2_gfx-1.0.4/config.guess100777 0 0 127161 12021530027 10560 0#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012 Free Software Foundation, Inc. timestamp='2012-01-01' # 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 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., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # 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. # Originally written by Per Bothner. Please send patches (context # diff format) to and include a ChangeLog # entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -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 (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 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 trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # 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". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-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. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $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 # 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/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) 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. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; 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'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > 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:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $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; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $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 echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 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 [ -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 [ "${HP_ARCH}" = "" ]; then eval $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 [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # 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 echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $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; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; 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*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` 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="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-gnueabi else echo ${UNAME_MACHINE}-unknown-linux-gnueabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/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 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; 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 configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) 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*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in i386) eval $set_cc_for_build if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then UNAME_PROCESSOR="x86_64" fi fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #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 (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #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 printf ("vax-dec-ultrix\n"); exit (0); # 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; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp 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` /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 exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: SDL2_gfx-1.0.4/config.sub100777 0 0 104716 12021530027 10224 0#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012 Free Software Foundation, Inc. timestamp='2012-01-01' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # 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 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., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # 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. # Please send patches to . Submit a context # diff and a properly formatted GNU ChangeLog entry. # # 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: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # 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. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -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 (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 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" 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 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 \ | ns16k | ns32k \ | open8 \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze) basic_machine=microblaze-xilinx ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i386-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $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 ;; -mvs* | -opened*) vendor=ibm ;; -os400*) 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 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: SDL2_gfx-1.0.4/configure100777 0 0 1574022 12355420160 10200 0#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69. # # # Copyright (C) 1992-1996, 1998-2012 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 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # 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 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. 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'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(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 exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || 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 -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS 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'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi 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_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=`$as_echo "$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 || $as_echo 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_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_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # 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 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$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 || $as_echo 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" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # 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 } 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 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'" SHELL=${CONFIG_SHELL-/bin/sh} 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= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= PACKAGE_URL= ac_unique_file="README" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS SDL_CONFIG SDL_LIBS SDL_CFLAGS PKG_CONFIG SDL_VERSION WINDRES am__fastdepOBJC_FALSE am__fastdepOBJC_TRUE OBJCDEPMODE ac_ct_OBJC OBJCFLAGS OBJC am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR am__untar am__tar AMTAR am__leading_dot SET_MAKE mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM LT_AGE LT_REVISION LT_CURRENT LT_RELEASE CPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL AWK RANLIB STRIP ac_ct_AR AR LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC host_os host_vendor host_cpu host build_os build_vendor build_cpu build LIBTOOL OBJDUMP DLLTOOL AS VERSION BINARY_AGE INTERFACE_AGE MICRO_VERSION MINOR_VERSION MAJOR_VERSION 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 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' ac_subst_files='' ac_user_opts=' enable_option_checking enable_shared enable_static with_pic enable_fast_install with_gnu_ld with_sysroot enable_libtool_lock enable_dependency_tracking enable_imageio enable_mmx with_sdl_prefix with_sdl_exec_prefix enable_sdltest ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP OBJC OBJCFLAGS PKG_CONFIG SDL_CFLAGS SDL_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' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' 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 # Accept the important Cygnus configure options, so we can diagnose typos. 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=`$as_echo "$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=`$as_echo "$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 ;; -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=`$as_echo "$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=`$as_echo "$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. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$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" ;; *) $as_echo "$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 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 || $as_echo 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 this package 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] --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/PACKAGE] --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 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-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-imageio use native Mac OS X frameworks for loading images [default=yes] --enable-mmx use mmx assembly on x86 default=yes, disable this on non-x86 platforms --disable-sdltest Do not try to compile and run a test SDL program Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-sdl-prefix=PFX Prefix where SDL is installed (optional) --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional) 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 OBJC Objective C compiler command OBJCFLAGS Objective C compiler flags PKG_CONFIG path to pkg-config utility SDL_CFLAGS C compiler flags for SDL, overriding pkg-config SDL_LIBS linker flags for SDL, 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 the package provider. _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=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 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 guested configure. 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 $as_echo "$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 configure generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF 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 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\"" $as_echo "$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 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$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_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&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 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$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_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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # 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\"" $as_echo "$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 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$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_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #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 () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_objc_try_compile LINENO # ----------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_objc_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$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 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_objc_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$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_objc_try_compile # 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 () { 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 () { 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_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.$ac_ext done else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { 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 () { 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_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.$ac_ext done else ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext 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 () { 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_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi rm -f core conftest.err conftest.$ac_objext 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 () { return $2; } static unsigned long int ulongval () { return $2; } #include #include int main () { 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 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 $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _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 test -z "$as_dir" && as_dir=. $as_echo "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=`$as_echo "$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=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## 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_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( 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 $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && 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 $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } 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 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file 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,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) 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 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## 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 # Making releases: # MICRO_VERSION += 1; # INTERFACE_AGE += 1; # BINARY_AGE += 1; # if any functions have been added, set INTERFACE_AGE to 0. # if backwards compatibility has been broken, # set BINARY_AGE and INTERFACE_AGE to 0. MAJOR_VERSION=1 MINOR_VERSION=0 MICRO_VERSION=2 INTERFACE_AGE=2 BINARY_AGE=2 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION # libtool versioning ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4' macro_revision='1.3294' ltmain="$ac_aux_dir/ltmain.sh" # 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; 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 # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case "$ECHO" in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; 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\"" $as_echo "$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 $as_echo "$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 () { ; 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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" 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\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. 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+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # 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 ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; 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_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { 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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 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\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; 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\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; 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.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" 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 test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_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 do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_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_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" 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 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then 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 test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" 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 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_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 test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_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_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_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 `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test "$GCC" != yes; then reload_cmds=false fi ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 $as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # 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 # 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # 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 # 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_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AS"; then ac_cv_prog_AS="$AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AS="${ac_tool_prefix}as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AS=$ac_cv_prog_AS if test -n "$AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 $as_echo "$AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AS"; then ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AS="as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 $as_echo "$ac_ct_AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AS" = x; then AS="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AS=$ac_ct_AS fi else AS="$ac_cv_prog_AS" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi ;; esac test -z "$AS" && AS=as test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$OBJDUMP" && OBJDUMP=objdump enable_dlopen=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" 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 # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' lt_prog_compiler_pic='-Xcompiler -fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= 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 # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # 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. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. 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 cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld='-rpath $libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 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 cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; 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 exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi 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 exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ 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 # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; 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. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi 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 export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # 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 "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test x"$lt_cv_prog_compiler__b" = xyes; then archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi 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_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # 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*) if test "$GCC" = yes; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test "$lt_cv_irix_exported_symbol" = yes; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 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 allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([A-Za-z]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; haiku*) version_type=linux need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } 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 CC="$lt_save_CC" ac_config_commands="$ac_config_commands libtool" # Only expand once: LT_RELEASE=$MAJOR_VERSION.$MINOR_VERSION LT_CURRENT=`expr $MICRO_VERSION - $INTERFACE_AGE` LT_REVISION=$INTERFACE_AGE LT_AGE=`expr $BINARY_AGE - $INTERFACE_AGE` am__api_version='1.11' # 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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # 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+set}" = set; 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # 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 ( 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 rm -f conftest.file 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 test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } 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=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ '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+set}" = set; 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; 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 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=SDL2_gfx VERSION=$VERSION cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # 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"} # We need awk for the "check" target. 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}' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # 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 8's {/usr,}/bin/sh. touch 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if 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 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; 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\"" $as_echo "$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 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; 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.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" 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 test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : 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=m ac_cpp='$OBJCPP $CPPFLAGS' ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_objc_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in gcc objcc objc cc CC 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJC"; then ac_cv_prog_OBJC="$OBJC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJC=$ac_cv_prog_OBJC if test -n "$OBJC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5 $as_echo "$OBJC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$OBJC" && break done fi if test -z "$OBJC"; then ac_ct_OBJC=$OBJC for ac_prog in gcc objcc objc cc CC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJC"; then ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC if test -n "$ac_ct_OBJC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5 $as_echo "$ac_ct_OBJC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_OBJC" && break done if test "x$ac_ct_OBJC" = x; then OBJC="gcc" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJC=$ac_ct_OBJC fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$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 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; } if ${ac_cv_objc_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_objc_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_objc_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5 $as_echo "$ac_cv_objc_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GOBJC=yes else GOBJC= fi ac_test_OBJCFLAGS=${OBJCFLAGS+set} ac_save_OBJCFLAGS=$OBJCFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5 $as_echo_n "checking whether $OBJC accepts -g... " >&6; } if ${ac_cv_prog_objc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_objc_werror_flag=$ac_objc_werror_flag ac_objc_werror_flag=yes ac_cv_prog_objc_g=no OBJCFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_objc_try_compile "$LINENO"; then : ac_cv_prog_objc_g=yes else OBJCFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_objc_try_compile "$LINENO"; then : else ac_objc_werror_flag=$ac_save_objc_werror_flag OBJCFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_objc_try_compile "$LINENO"; then : ac_cv_prog_objc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_objc_werror_flag=$ac_save_objc_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5 $as_echo "$ac_cv_prog_objc_g" >&6; } if test "$ac_test_OBJCFLAGS" = set; then OBJCFLAGS=$ac_save_OBJCFLAGS elif test $ac_cv_prog_objc_g = yes; then if test "$GOBJC" = yes; then OBJCFLAGS="-g -O2" else OBJCFLAGS="-g" fi else if test "$GOBJC" = yes; then OBJCFLAGS="-O2" else OBJCFLAGS= 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 depcc="$OBJC" am_compiler_list='gcc3 gcc' { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_OBJC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # 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_OBJC_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 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 8's {/usr,}/bin/sh. touch 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_OBJC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_OBJC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_OBJC_dependencies_compiler_type" >&5 $as_echo "$am_cv_OBJC_dependencies_compiler_type" >&6; } OBJCDEPMODE=depmode=$am_cv_OBJC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_OBJC_dependencies_compiler_type" = gcc3; then am__fastdepOBJC_TRUE= am__fastdepOBJC_FALSE='#' else am__fastdepOBJC_TRUE='#' am__fastdepOBJC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else 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 () {return 0; } $ac_kw foo_t foo () {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.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi if test -z "$host_alias"; then hostaliaswindres= else hostaliaswindres="$host_alias-windres" fi for ac_prog in windres $hostaliaswindres $host_os-windres do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_WINDRES+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$WINDRES"; then ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_WINDRES="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi WINDRES=$ac_cv_prog_WINDRES if test -n "$WINDRES"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 $as_echo "$WINDRES" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$WINDRES" && break done case "$host" in *-*-beos*) ac_default_prefix=/boot/develop/tools/gnupro ;; *-*-cygwin* | *-*-mingw32*) if test "$build" != "$host"; then # cross-compiling # Default cross-compile location ac_default_prefix=/usr/local/cross-tools/i386-mingw32 else # Look for the location of the tools and install there if test "$BUILD_PREFIX" != ""; then ac_default_prefix=$BUILD_PREFIX fi fi if test x$WINDRES != x; then use_version_rc=true fi ;; *-*-darwin*) # Check whether --enable-imageio was given. if test "${enable_imageio+set}" = set; then : enableval=$enable_imageio; else enable_imageio=yes fi if test x$enable_imageio = xyes; then IMG_LIBS="-Wl,-framework,ApplicationServices $IMG_LIBS" else CFLAGS="$CFLAGS -DSDL_IMAGE_USE_COMMON_BACKEND" fi ;; esac base_libdir=`echo \${libdir} | sed 's/.*\/\(.*\)/\1/; q'` find_lib() { gcc_bin_path=`$CC -print-search-dirs 2>/dev/null | fgrep programs: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'` gcc_lib_path=`$CC -print-search-dirs 2>/dev/null | fgrep libraries: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'` env_lib_path=`echo $LIBS $LDFLAGS $* | sed 's/-L[ ]*//g'` if test "$cross_compiling" = yes; then host_lib_path="" else host_lib_path="/usr/$base_libdir /usr/local/$base_libdir" fi for path in $gcc_bin_path $gcc_lib_path $env_lib_path $host_lib_path; do lib=`ls -- $path/$1 2>/dev/null | sort | sed 's/.*\/\(.*\)/\1/; q'` if test x$lib != x; then echo $lib return fi done } # Check whether --enable-mmx was given. if test "${enable_mmx+set}" = set; then : enableval=$enable_mmx; else enable_mmx=yes fi if test x$enable_mmx = xyes; then CFLAGS="$CFLAGS -O -DUSE_MMX" # 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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 $as_echo_n "checking size of long... " >&6; } if ${ac_cv_sizeof_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : else if test "$ac_cv_type_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 $as_echo "$ac_cv_sizeof_long" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF if test "$ac_cv_sizeof_long" = "4"; then CFLAGS="$CFLAGS -mmmx" fi fi SDL_VERSION=2.0.0 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi # Check whether --with-sdl-prefix was given. if test "${with_sdl_prefix+set}" = set; then : withval=$with_sdl_prefix; sdl_prefix="$withval" else sdl_prefix="" fi # Check whether --with-sdl-exec-prefix was given. if test "${with_sdl_exec_prefix+set}" = set; then : withval=$with_sdl_exec_prefix; sdl_exec_prefix="$withval" else sdl_exec_prefix="" fi # Check whether --enable-sdltest was given. if test "${enable_sdltest+set}" = set; then : enableval=$enable_sdltest; else enable_sdltest=yes fi min_sdl_version=$SDL_VERSION if test "x$sdl_prefix$sdl_exec_prefix" = x ; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SDL" >&5 $as_echo_n "checking for SDL... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$SDL_CFLAGS"; then pkg_cv_SDL_CFLAGS="$SDL_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sdl2 >= \$min_sdl_version\""; } >&5 ($PKG_CONFIG --exists --print-errors "sdl2 >= $min_sdl_version") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SDL_CFLAGS=`$PKG_CONFIG --cflags "sdl2 >= $min_sdl_version" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$SDL_LIBS"; then pkg_cv_SDL_LIBS="$SDL_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sdl2 >= \$min_sdl_version\""; } >&5 ($PKG_CONFIG --exists --print-errors "sdl2 >= $min_sdl_version") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SDL_LIBS=`$PKG_CONFIG --libs "sdl2 >= $min_sdl_version" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then 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 SDL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "sdl2 >= $min_sdl_version"` else SDL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "sdl2 >= $min_sdl_version"` fi # Put the nasty error message in config.log where it belongs echo "$SDL_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } sdl_pc=no elif test $pkg_failed = untried; then sdl_pc=no else SDL_CFLAGS=$pkg_cv_SDL_CFLAGS SDL_LIBS=$pkg_cv_SDL_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } sdl_pc=yes fi else sdl_pc=no if test x$sdl_exec_prefix != x ; then sdl_config_args="$sdl_config_args --exec-prefix=$sdl_exec_prefix" if test x${SDL_CONFIG+set} != xset ; then SDL_CONFIG=$sdl_exec_prefix/bin/sdl2-config fi fi if test x$sdl_prefix != x ; then sdl_config_args="$sdl_config_args --prefix=$sdl_prefix" if test x${SDL_CONFIG+set} != xset ; then SDL_CONFIG=$sdl_prefix/bin/sdl2-config fi fi fi if test "x$sdl_pc" = xyes ; then no_sdl="" SDL_CONFIG="pkg-config sdl2" else as_save_PATH="$PATH" if test "x$prefix" != xNONE && test "$cross_compiling" != yes; then PATH="$prefix/bin:$prefix/usr/bin:$PATH" fi # Extract the first word of "sdl2-config", so it can be a program name with args. set dummy sdl2-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_SDL_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $SDL_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_SDL_CONFIG="$SDL_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 test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SDL_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no" ;; esac fi SDL_CONFIG=$ac_cv_path_SDL_CONFIG if test -n "$SDL_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDL_CONFIG" >&5 $as_echo "$SDL_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi PATH="$as_save_PATH" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SDL - version >= $min_sdl_version" >&5 $as_echo_n "checking for SDL - version >= $min_sdl_version... " >&6; } no_sdl="" if test "$SDL_CONFIG" = "no" ; then no_sdl=yes else SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags` SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs` sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` if test "x$enable_sdltest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_CXXFLAGS="$CXXFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $SDL_CFLAGS" CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" LIBS="$LIBS $SDL_LIBS" rm -f conf.sdltest if test "$cross_compiling" = yes; then : echo $ac_n "cross compiling; assumed OK... $ac_c" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include "SDL.h" char* my_strdup (char *str) { char *new_str; if (str) { new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); strcpy (new_str, str); } else new_str = NULL; return new_str; } int main (int argc, char *argv[]) { int major, minor, micro; char *tmp_version; /* This hangs on some systems (?) system ("touch conf.sdltest"); */ { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); } /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = my_strdup("$min_sdl_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_sdl_version"); exit(1); } if (($sdl_major_version > major) || (($sdl_major_version == major) && ($sdl_minor_version > minor)) || (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro))) { return 0; } else { printf("\n*** 'sdl2-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version); printf("*** of SDL required is %d.%d.%d. If sdl2-config is correct, then it is\n", major, minor, micro); printf("*** best to upgrade to the required version.\n"); printf("*** If sdl2-config was wrong, set the environment variable SDL_CONFIG\n"); printf("*** to point to the correct copy of sdl2-config, and remove the file\n"); printf("*** config.cache before re-running configure\n"); return 1; } } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else no_sdl=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi CFLAGS="$ac_save_CFLAGS" CXXFLAGS="$ac_save_CXXFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_sdl" = x ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test "x$no_sdl" = x ; then : else if test "$SDL_CONFIG" = "no" ; then echo "*** The sdl2-config script installed by SDL could not be found" echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the SDL_CONFIG environment variable to the" echo "*** full path to sdl2-config." else if test -f conf.sdltest ; then : else echo "*** Could not run SDL test program, checking why..." CFLAGS="$CFLAGS $SDL_CFLAGS" CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" LIBS="$LIBS $SDL_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include "SDL.h" int main(int argc, char *argv[]) { return 0; } #undef main #define main K_and_R_C_main int main () { return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding SDL or finding the wrong" echo "*** version of SDL. If it is not finding SDL, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" else echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means SDL was incorrectly installed" echo "*** or that you have moved SDL since it was installed. In the latter case, you" echo "*** may want to edit the sdl2-config script: $SDL_CONFIG" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" CXXFLAGS="$ac_save_CXXFLAGS" LIBS="$ac_save_LIBS" fi fi SDL_CFLAGS="" SDL_LIBS="" as_fn_error $? "*** SDL version $SDL_VERSION not found!" "$LINENO" 5 fi rm -f conf.sdltest CFLAGS="$CFLAGS $SDL_CFLAGS" LIBS="$LIBS $SDL_LIBS" saved_LIBS="$LIBS" OBJCFLAGS=$CFLAGS # Finally create all the generated files ac_config_files="$ac_config_files Makefile SDL2_gfx.pc" 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_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( 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+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.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=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs 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 -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${am__fastdepOBJC_TRUE}" && test -z "${am__fastdepOBJC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepOBJC\" 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" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # 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 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # 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 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # 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 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$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_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_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 || $as_echo 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 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 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=`$as_echo "$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 || $as_echo 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 $as_me, which was generated by GNU Autoconf 2.69. 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 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" 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 Configuration files: $config_files Configuration commands: $config_commands Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." 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 ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_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 \$as_echo "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 $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in AS \ DLLTOOL \ OBJDUMP \ SHELL \ ECHO \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _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 "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "SDL2_gfx.pc") CONFIG_FILES="$CONFIG_FILES SDL2_gfx.pc" ;; *) 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+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_COMMANDS+set}" = set || 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" eval set X " :F $CONFIG_FILES :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=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$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 || $as_echo 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=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 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@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' 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"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" 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 ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="" # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Assembler program. AS=$lt_AS # DLL creation program. DLLTOOL=$lt_DLLTOOL # Object dumper program. OBJDUMP=$lt_OBJDUMP # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and in which our libraries should be installed. lt_sysroot=$lt_sysroot # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) if test x"$xsi_shell" = xyes; then sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ func_dirname ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_basename ()$/,/^} # func_basename /c\ func_basename ()\ {\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ func_dirname_and_basename ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ func_stripname ()\ {\ \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ \ # positional parameters, so assign one to ordinary parameter first.\ \ func_stripname_result=${3}\ \ func_stripname_result=${func_stripname_result#"${1}"}\ \ func_stripname_result=${func_stripname_result%"${2}"}\ } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ func_split_long_opt ()\ {\ \ func_split_long_opt_name=${1%%=*}\ \ func_split_long_opt_arg=${1#*=}\ } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ func_split_short_opt ()\ {\ \ func_split_short_opt_arg=${1#??}\ \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ func_lo2o ()\ {\ \ case ${1} in\ \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ \ *) func_lo2o_result=${1} ;;\ \ esac\ } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_xform ()$/,/^} # func_xform /c\ func_xform ()\ {\ func_xform_result=${1%.*}.lo\ } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_arith ()$/,/^} # func_arith /c\ func_arith ()\ {\ func_arith_result=$(( $* ))\ } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_len ()$/,/^} # func_len /c\ func_len ()\ {\ func_len_result=${#1}\ } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$lt_shell_append" = xyes; then sed -e '/^func_append ()$/,/^} # func_append /c\ func_append ()\ {\ eval "${1}+=\\${2}"\ } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ func_append_quoted ()\ {\ \ func_quote_for_eval "${2}"\ \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} fi mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 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. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; 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 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi echo echo "Options summary:" echo "* --enable-mmx: $enable_mmx" SDL2_gfx-1.0.4/configure.in100777 0 0 10021 12355420160 10524 0dnl Process this file with autoconf to produce a configure script. AC_INIT(README) dnl Set various version strings - taken gratefully from the GTk sources # Making releases: # MICRO_VERSION += 1; # INTERFACE_AGE += 1; # BINARY_AGE += 1; # if any functions have been added, set INTERFACE_AGE to 0. # if backwards compatibility has been broken, # set BINARY_AGE and INTERFACE_AGE to 0. MAJOR_VERSION=1 MINOR_VERSION=0 MICRO_VERSION=2 INTERFACE_AGE=2 BINARY_AGE=2 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION AC_SUBST(MAJOR_VERSION) AC_SUBST(MINOR_VERSION) AC_SUBST(MICRO_VERSION) AC_SUBST(INTERFACE_AGE) AC_SUBST(BINARY_AGE) AC_SUBST(VERSION) # libtool versioning LT_INIT([win32-dll]) LT_RELEASE=$MAJOR_VERSION.$MINOR_VERSION LT_CURRENT=`expr $MICRO_VERSION - $INTERFACE_AGE` LT_REVISION=$INTERFACE_AGE LT_AGE=`expr $BINARY_AGE - $INTERFACE_AGE` AC_SUBST(LT_RELEASE) AC_SUBST(LT_CURRENT) AC_SUBST(LT_REVISION) AC_SUBST(LT_AGE) dnl Detect the canonical build and host environments AC_CANONICAL_HOST dnl Setup for automake AM_INIT_AUTOMAKE(SDL2_gfx, $VERSION) dnl Check for tools AC_PROG_LIBTOOL AC_PROG_CC AC_PROG_OBJC AC_C_INLINE AC_PROG_INSTALL AC_PROG_MAKE_SET if test -z "$host_alias"; then hostaliaswindres= else hostaliaswindres="$host_alias-windres" fi AC_CHECK_PROGS(WINDRES, [windres $hostaliaswindres $host_os-windres]) case "$host" in *-*-beos*) ac_default_prefix=/boot/develop/tools/gnupro ;; *-*-cygwin* | *-*-mingw32*) if test "$build" != "$host"; then # cross-compiling # Default cross-compile location ac_default_prefix=/usr/local/cross-tools/i386-mingw32 else # Look for the location of the tools and install there if test "$BUILD_PREFIX" != ""; then ac_default_prefix=$BUILD_PREFIX fi fi if test x$WINDRES != x; then use_version_rc=true fi ;; *-*-darwin*) AC_ARG_ENABLE([imageio], [AC_HELP_STRING([--enable-imageio], [use native Mac OS X frameworks for loading images [default=yes]])], [], [enable_imageio=yes]) if test x$enable_imageio = xyes; then IMG_LIBS="-Wl,-framework,ApplicationServices $IMG_LIBS" else CFLAGS="$CFLAGS -DSDL_IMAGE_USE_COMMON_BACKEND" fi ;; esac dnl set this to use on systems that use lib64 instead of lib base_libdir=`echo \${libdir} | sed 's/.*\/\(.*\)/\1/; q'` dnl Function to find a library in the compiler search path find_lib() { gcc_bin_path=[`$CC -print-search-dirs 2>/dev/null | fgrep programs: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`] gcc_lib_path=[`$CC -print-search-dirs 2>/dev/null | fgrep libraries: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`] env_lib_path=[`echo $LIBS $LDFLAGS $* | sed 's/-L[ ]*//g'`] if test "$cross_compiling" = yes; then host_lib_path="" else host_lib_path="/usr/$base_libdir /usr/local/$base_libdir" fi for path in $gcc_bin_path $gcc_lib_path $env_lib_path $host_lib_path; do lib=[`ls -- $path/$1 2>/dev/null | sort | sed 's/.*\/\(.*\)/\1/; q'`] if test x$lib != x; then echo $lib return fi done } dnl Check for NASM (for x86 assembly blit routines) AC_ARG_ENABLE(mmx,[ --enable-mmx use mmx assembly on x86 [default=yes], disable this on non-x86 platforms],, enable_mmx=yes) if test x$enable_mmx = xyes; then CFLAGS="$CFLAGS -O -DUSE_MMX" dnl MMX enabled by default in GCC on x86_64, but not i386: AC_CHECK_SIZEOF([long]) if test "$ac_cv_sizeof_long" = "4"; then CFLAGS="$CFLAGS -mmmx" fi fi dnl Check for SDL SDL_VERSION=2.0.0 AC_SUBST(SDL_VERSION) AM_PATH_SDL2($SDL_VERSION, :, AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) ) CFLAGS="$CFLAGS $SDL_CFLAGS" LIBS="$LIBS $SDL_LIBS" saved_LIBS="$LIBS" AC_SUBST([WINDRES]) OBJCFLAGS=$CFLAGS # Finally create all the generated files AC_OUTPUT([ Makefile SDL2_gfx.pc ]) echo echo "Options summary:" echo "* --enable-mmx: $enable_mmx" SDL2_gfx-1.0.4/COPYING100777 0 0 145 12021530027 7206 0SDL2_gfx COPYING Library is governed under the ZLib license. http://www.zlib.net/zlib_license.html SDL2_gfx-1.0.4/depcomp100777 0 0 47556 12021530027 7606 0#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2011-12-04.11; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, # 2011 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. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test "$stat" = 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/ \1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/ / G p }' >> "$depfile" rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: SDL2_gfx-1.0.4/Docs/ 40777 0 0 0 13240160030 6760 5SDL2_gfx-1.0.4/Docs/html/ 40777 0 0 0 13240160030 7724 5SDL2_gfx-1.0.4/Docs/html.doxyfile100777 0 0 231647 12355420160 11657 0# Doxyfile 1.8.0 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file # that follow. The default is UTF-8 which is also the encoding used for all # text before the first occurrence of this tag. Doxygen uses libiconv (or the # iconv built into libc) for the transcoding. See # http://www.gnu.org/software/libiconv for the list of possible encodings. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or sequence of words) that should # identify the project. Note that if you do not use Doxywizard you need # to put quotes around the project name if it contains spaces. PROJECT_NAME = SDL2_gfx # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = 1.0.2 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer # a quick idea about the purpose of the project. Keep the description short. PROJECT_BRIEF = Graphics primitives and surface functions for SDL2 # With the PROJECT_LOGO tag one can specify an logo or icon that is # included in the documentation. The maximum height of the logo should not # exceed 55 pixels and the maximum width should not exceed 200 pixels. # Doxygen will copy the logo to the output directory. PROJECT_LOGO = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = . # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output # format and will distribute the generated files over these directories. # Enabling this option can be useful when feeding doxygen a huge amount of # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, # Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, # Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English # messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, # Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, # Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator # that is used to form the text in various listings. Each string # in this list, if found as the leading text of the brief description, will be # stripped from the text and the result after processing the whole list, is # used as the annotated text. Otherwise, the brief description is used as-is. # If left blank, the following values are used ("$name" is automatically # replaced with the name of the entity): "The $name class" "The $name widget" # "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" ABBREVIATE_BRIEF = "The $name class" \ "The $name widget" \ "The $name file" \ is \ provides \ specifies \ contains \ represents \ a \ an \ the # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = YES # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user-defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the # path to strip. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # the path mentioned in the documentation of a class, which tells # the reader which header file to include in order to use a class. # If left blank only the name of the header file containing the class # definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful if your file system # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like regular Qt-style comments # (thus requiring an explicit @brief command for a brief description.) JAVADOC_AUTOBRIEF = NO # If the QT_AUTOBRIEF tag is set to YES then Doxygen will # interpret the first line (until the first dot) of a Qt-style # comment as the brief description. If set to NO, the comments # will behave just like regular Qt-style comments (thus requiring # an explicit \brief command for a brief description.) QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce # a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding # "class=itcl::class" will allow you to use the command class in the # itcl::class meaning. TCL_SUBST = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. # For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = YES # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java # sources only. Doxygen will then generate output that is more tailored for # Java. For instance, namespaces will be presented as packages, qualified # scopes will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources only. Doxygen will then generate output that is more tailored for # Fortran. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for # VHDL. OPTIMIZE_OUTPUT_VHDL = NO # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given extension. # Doxygen has a built-in mapping, but you can override or extend it using this # tag. The format is ext=language, where ext is a file extension, and language # is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, # C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make # doxygen treat .inc files as Fortran files (default is PHP), and .f files as C # (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions # you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. EXTENSION_MAPPING = # If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all # comments according to the Markdown format, which allows for more readable # documentation. See http://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you # can mix doxygen, HTML, and XML commands with Markdown formatting. # Disable only in case of backward compatibilities issues. MARKDOWN_SUPPORT = YES # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should # set this tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. # func(std::string) {}). This also makes the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. # Doxygen will parse them like normal C++ but will assume all classes use public # instead of private inheritance when no explicit protection keyword is present. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate getter # and setter methods for a property. Setting this option to YES (the default) # will make doxygen replace the get and set methods by a property in the # documentation. This will only work if the methods are indeed getting or # setting a simple type. If this is not the case, or you want to show the # methods anyway, you should set this option to NO. IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a # subgroup of that type (e.g. under the Public Functions section). Set it to # NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and # unions are shown inside the group in which they are included (e.g. using # @ingroup) instead of on a separate page (for HTML and Man pages) or # section (for LaTeX and RTF). INLINE_GROUPED_CLASSES = NO # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and # unions with only public data fields will be shown inline in the documentation # of the scope in which they are defined (i.e. file, namespace, or group # documentation), provided this scope is documented. If set to NO (the default), # structs, classes, and unions are shown on a separate page (for HTML and Man # pages) or section (for LaTeX and RTF). INLINE_SIMPLE_STRUCTS = NO # When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum # is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically # be useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. TYPEDEF_HIDES_STRUCT = NO # The SYMBOL_CACHE_SIZE determines the size of the internal cache use to # determine which symbols to keep in memory and which to flush to disk. # When the cache is full, less often used symbols will be written to disk. # For small to medium size projects (<1000 input files) the default value is # probably good enough. For larger projects a too small cache size can cause # doxygen to be busy swapping symbols to and from disk most of the time # causing a significant performance penalty. # If the system has enough physical memory increasing the cache will improve the # performance by keeping more symbols in memory. Note that the value works on # a logarithmic scale so increasing the size by one will roughly double the # memory usage. The cache size is given by this formula: # 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, # corresponding to a cache size of 2^16 = 65536 symbols. SYMBOL_CACHE_SIZE = 0 # Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be # set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given # their name and scope. Since this can be an expensive process and often the # same symbol appear multiple times in the code, doxygen keeps a cache of # pre-resolved symbols. If the cache is too small doxygen will become slower. # If the cache is too large, memory is wasted. The cache size is given by this # formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0, # corresponding to a cache size of 2^16 = 65536 symbols. LOOKUP_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO # If the EXTRACT_PACKAGE tag is set to YES all members with package or internal # scope will be included in the documentation. EXTRACT_PACKAGE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = NO # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. When set to YES local # methods, which are defined in the implementation section but not in # the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base # name of the file that contains the anonymous namespace. By default # anonymous namespaces are hidden. EXTRACT_ANON_NSPACES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any # documentation blocks found inside the body of a function. # If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = NO # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = YES # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen # will list include files with double quotes in the documentation # rather than with sharp brackets. FORCE_LOCAL_INCLUDES = NO # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the # brief documentation of file, namespace and class members alphabetically # by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen # will sort the (brief and detailed) documentation of class members so that # constructors and destructors are listed first. If set to NO (the default) # the constructors will appear in the respective orders defined by # SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. # This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO # and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. SORT_MEMBERS_CTORS_1ST = NO # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the # hierarchy of group names into alphabetical order. If set to NO (the default) # the group names will appear in their defined order. SORT_GROUP_NAMES = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be # sorted by fully-qualified names, including namespaces. If set to # NO (the default), the class list will be sorted only by class name, # not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to # do proper type resolution of all parameters of a function it will reject a # match between the prototype and the implementation of a member function even # if there is only one candidate or it is obvious which candidate to choose # by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen # will still accept a match between prototype and implementation in such cases. STRICT_PROTO_MATCHING = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or macro consists of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and macros in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES # If the sources in your project are distributed over multiple directories # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. SHOW_DIRECTORIES = NO # Set the SHOW_FILES tag to NO to disable the generation of the Files page. # This will remove the Files entry from the Quick Index and from the # Folder Tree View (if specified). The default is YES. SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the # Namespaces page. This will remove the Namespaces entry from the Quick Index # and from the Folder Tree View (if specified). The default is YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command , where is the value of # the FILE_VERSION_FILTER tag, and is the name of an input file # provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated # output files in an output format independent way. The create the layout file # that represents doxygen's defaults, run doxygen with the -l option. # You can optionally specify a file name after the option, if omitted # DoxygenLayout.xml will be used as the name of the layout file. LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files # containing the references data. This must be a list of .bib files. The # .bib extension is automatically appended if omitted. Using this command # requires the bibtex tool to be installed. See also # http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style # of the bibliography can be controlled using LATEX_BIB_STYLE. To use this # feature you need bibtex and perl available in the search path. CITE_BIB_FILES = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some # parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES # The WARN_NO_PARAMDOC option can be enabled to get warnings for # functions that are documented, but have no documentation for their parameters # or return value. If set to NO (the default) doxygen will only warn about # wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. Optionally the format may contain # $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = .. # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is # also the default input encoding. Doxygen uses libiconv (or the iconv built # into libc) for the transcoding. See http://www.gnu.org/software/libiconv for # the list of possible encodings. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh # *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py # *.f90 *.f *.for *.vhd *.vhdl FILE_PATTERNS = *.c \ *.cc \ *.cxx \ *.cpp \ *.c++ \ *.d \ *.java \ *.ii \ *.ixx \ *.ipp \ *.i++ \ *.inl \ *.h \ *.hh \ *.hxx \ *.hpp \ *.h++ \ *.idl \ *.odl \ *.cs \ *.php \ *.php3 \ *.inc \ *.m \ *.mm \ *.dox \ *.py \ *.f90 \ *.f \ *.vhd \ *.vhdl \ README # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = NO # The EXCLUDE tag can be used to specify files and/or directories that should be # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. # Note that relative paths are relative to the directory from which doxygen is # run. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. Note that the wildcards are matched # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = .. # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = * # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. If FILTER_PATTERNS is specified, this tag will be # ignored. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the # filter if there is a match. The filters are a list of the form: # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further # info on how filters are used. If FILTER_PATTERNS is empty or if # non of the patterns match the file name, INPUT_FILTER is applied. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file # pattern. A pattern will override the setting for FILTER_PATTERN (if any) # and it is also possible to disable source filtering for a specific pattern # using *.ext= (so without naming a filter). This option only has effect when # FILTER_SOURCE_FILES is enabled. FILTER_SOURCE_PATTERNS = #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. # Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = YES # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = NO # If the REFERENCES_RELATION tag is set to YES # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = NO # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will # link to the source code. Otherwise they will link to the documentation. REFERENCES_LINK_SOURCE = YES # If the USE_HTAGS tag is set to YES then the references to source code # will point to the HTML generated by the htags(1) tool instead of doxygen # built-in source browser. The htags tool is part of GNU's global source # tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = YES # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. Note that when using a custom header you are responsible # for the proper inclusion of any scripts and style sheets that doxygen # needs, which is dependent on the configuration options used. # It is advised to generate a default header using "doxygen -w html # header.html footer.html stylesheet.css YourConfigFile" and then modify # that header. Note that the header is subject to change so you typically # have to redo this when upgrading to a newer version of doxygen or when # changing the value of configuration settings such as GENERATE_TREEVIEW! HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen # will generate a default style sheet. Note that doxygen will try to copy # the style sheet file to the HTML output directory, so don't put your own # style sheet in the HTML output directory as well, or it will be erased! HTML_STYLESHEET = # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note # that these files will be copied to the base HTML output directory. Use the # $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these # files. In the HTML_STYLESHEET file, use the file name only. Also note that # the files will be copied as-is; there are no commands or markers available. HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. # Doxygen will adjust the colors in the style sheet and background images # according to this color. Hue is specified as an angle on a colorwheel, # see http://en.wikipedia.org/wiki/Hue for more information. # For instance the value 0 represents red, 60 is yellow, 120 is green, # 180 is cyan, 240 is blue, 300 purple, and 360 is red again. # The allowed range is 0 to 359. HTML_COLORSTYLE_HUE = 220 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of # the colors in the HTML output. For a value of 0 the output will use # grayscales only. A value of 255 will produce the most vivid colors. HTML_COLORSTYLE_SAT = 100 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to # the luminance component of the colors in the HTML output. Values below # 100 gradually make the output lighter, whereas values above 100 make # the output darker. The value divided by 100 is the actual gamma applied, # so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, # and 100 does not change the gamma. HTML_COLORSTYLE_GAMMA = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML # page will contain the date and time when the page was generated. Setting # this to NO can help when comparing the output of multiple runs. HTML_TIMESTAMP = NO # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. For this to work a browser that supports # JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox # Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). HTML_DYNAMIC_SECTIONS = NO # If the GENERATE_DOCSET tag is set to YES, additional index files # will be generated that can be used as input for Apple's Xcode 3 # integrated development environment, introduced with OSX 10.5 (Leopard). # To create a documentation set, doxygen will generate a Makefile in the # HTML output directory. Running make will produce the docset in that # directory and running "make install" will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find # it at startup. # See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html # for more information. GENERATE_DOCSET = NO # When GENERATE_DOCSET tag is set to YES, this tag determines the name of the # feed. A documentation feed provides an umbrella under which multiple # documentation sets from a single provider (such as a company or product suite) # can be grouped. DOCSET_FEEDNAME = "Doxygen generated docs" # When GENERATE_DOCSET tag is set to YES, this tag specifies a string that # should uniquely identify the documentation set bundle. This should be a # reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen # will append .docset to the name. DOCSET_BUNDLE_ID = org.doxygen.Project # When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify # the documentation publisher. This should be a reverse domain-name style # string, e.g. com.mycompany.MyDocSet.documentation. DOCSET_PUBLISHER_ID = org.doxygen.Publisher # The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compiled HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be # written to the html output directory. CHM_FILE = # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. HHC_LOCATION = # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING # is used to encode HtmlHelp index (hhk), content (hhc) and project file # content. CHM_INDEX_ENCODING = # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated # that can be used as input for Qt's qhelpgenerator to generate a # Qt Compressed Help (.qch) of the generated HTML documentation. GENERATE_QHP = NO # If the QHG_LOCATION tag is specified, the QCH_FILE tag can # be used to specify the file name of the resulting .qch file. # The path specified is relative to the HTML output folder. QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating # Qt Help Project output. For more information please see # http://doc.trolltech.com/qthelpproject.html#namespace QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating # Qt Help Project output. For more information please see # http://doc.trolltech.com/qthelpproject.html#virtual-folders QHP_VIRTUAL_FOLDER = doc # If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to # add. For more information please see # http://doc.trolltech.com/qthelpproject.html#custom-filters QHP_CUST_FILTER_NAME = # The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see # # Qt Help Project / Custom Filters. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's # filter section matches. # # Qt Help Project / Filter Attributes. QHP_SECT_FILTER_ATTRS = # If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can # be used to specify the location of Qt's qhelpgenerator. # If non-empty doxygen will try to run qhelpgenerator on the generated # .qhp file. QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files # will be generated, which together with the HTML files, form an Eclipse help # plugin. To install this plugin and make it available under the help contents # menu in Eclipse, the contents of the directory containing the HTML and XML # files needs to be copied into the plugins directory of eclipse. The name of # the directory within the plugins directory should be the same as # the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before # the help appears. GENERATE_ECLIPSEHELP = NO # A unique identifier for the eclipse help plugin. When installing the plugin # the directory name containing the HTML and XML files should also have # this name. ECLIPSE_DOC_ID = org.doxygen.Project # The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) # at top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. Since the tabs have the same information as the # navigation tree you can set this option to NO if you already set # GENERATE_TREEVIEW to YES. DISABLE_INDEX = NO # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. # If the tag value is set to YES, a side panel will be generated # containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). # Windows users are probably better off using the HTML help feature. # Since the tree basically has the same information as the tab index you # could consider to set DISABLE_INDEX to NO when enabling this option. GENERATE_TREEVIEW = NO # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values # (range [0,1..20]) that doxygen will group on one line in the generated HTML # documentation. Note that a value of 0 will completely suppress the enum # values from appearing in the overview section. ENUM_VALUES_PER_LINE = 4 # By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, # and Class Hierarchy pages using a tree view instead of an ordered list. USE_INLINE_TREES = NO # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 # When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open # links to external symbols imported via tag files in a separate window. EXT_LINKS_IN_WINDOW = NO # Use this tag to change the font size of Latex formulas included # as images in the HTML documentation. The default is 10. Note that # when you change the font size after a successful doxygen run you need # to manually remove any form_*.png images from the HTML output directory # to force them to be regenerated. FORMULA_FONTSIZE = 10 # Use the FORMULA_TRANPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are # not supported properly for IE 6.0, but are supported on all modern browsers. # Note that when changing this option you need to delete any form_*.png files # in the HTML output before the changes have effect. FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax # (see http://www.mathjax.org) which uses client side Javascript for the # rendering instead of using prerendered bitmaps. Use this if you do not # have LaTeX installed or if you want to formulas look prettier in the HTML # output. When enabled you may also need to install MathJax separately and # configure the path to it using the MATHJAX_RELPATH option. USE_MATHJAX = NO # When MathJax is enabled you need to specify the location relative to the # HTML output directory using the MATHJAX_RELPATH option. The destination # directory should contain the MathJax.js script. For instance, if the mathjax # directory is located at the same level as the HTML output directory, then # MATHJAX_RELPATH should be ../mathjax. The default value points to # the MathJax Content Delivery Network so you can quickly see the result without # installing MathJax. However, it is strongly recommended to install a local # copy of MathJax from http://www.mathjax.org before deployment. MATHJAX_RELPATH = http://www.mathjax.org/mathjax # The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension # names that should be enabled during MathJax rendering. MATHJAX_EXTENSIONS = # When the SEARCHENGINE tag is enabled doxygen will generate a search box # for the HTML output. The underlying search engine uses javascript # and DHTML and should work on any modern browser. Note that when using # HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets # (GENERATE_DOCSET) there is already a search function so this one should # typically be disabled. For large projects the javascript based search engine # can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. SEARCHENGINE = NO # When the SERVER_BASED_SEARCH tag is enabled the search engine will be # implemented using a PHP enabled web server instead of at the web client # using Javascript. Doxygen will generate the search PHP script and index # file to put on the web server. The advantage of the server # based approach is that it scales better to large projects and allows # full text search. The disadvantages are that it is more difficult to setup # and does not have live searching capabilities. SERVER_BASED_SEARCH = NO #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = NO # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. # Note that when enabling USE_PDFLATEX this option is only used for # generating bitmaps for formulas in the HTML output, but not in the # Makefile that is written to the output directory. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for # the generated latex document. The footer should contain everything after # the last chapter. If it is left blank doxygen will generate a # standard footer. Notice: only use this tag if you know what you are doing! LATEX_FOOTER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = YES # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = YES # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO # If LATEX_HIDE_INDICES is set to YES then doxygen will not # include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO # If LATEX_SOURCE_CODE is set to YES then doxygen will include # source code with syntax highlighting in the LaTeX output. # Note that which sources are shown also depends on other settings # such as SOURCE_BROWSER. LATEX_SOURCE_CODE = NO # The LATEX_BIB_STYLE tag can be used to specify the style to use for the # bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See # http://en.wikipedia.org/wiki/BibTeX for more info. LATEX_BIB_STYLE = plain #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load style sheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO # The XML_OUTPUT tag is used to specify where the XML pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml # The XML_SCHEMA tag can be used to specify an XML schema, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_SCHEMA = # The XML_DTD tag can be used to specify an XML DTD, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_DTD = # If the XML_PROGRAMLISTING tag is set to YES Doxygen will # dump the program listings (including syntax highlighting # and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- # If the GENERATE_PERLMOD tag is set to YES Doxygen will # generate a Perl module file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO # If the PERLMOD_LATEX tag is set to YES Doxygen will generate # the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be # nicely formatted so it can be parsed by a human reader. This is useful # if you want to understand what is going on. On the other hand, if this # tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES # The names of the make variables in the generated doxyrules.make file # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. # This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = NO # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # pointed to by INCLUDE_PATH will be searched when a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. To prevent a macro definition from being # undefined via #undef or recursively expanded use the := operator # instead of the = operator. PREDEFINED = # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition that # overrules the definition found in the source code. EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all references to function-like macros # that are alone on a line, have an all uppercase name, and do not end with a # semicolon, because these will confuse the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. For each # tag file the location of the external documentation should be added. The # format of a tag file without this location is as follows: # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths # or URLs. Note that each tag file must have a unique name (where the name does # NOT include the path). If a tag file is not located in the directory in which # doxygen is run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base # or super classes. Setting the tag to NO turns the diagrams off. Note that # this option also works with HAVE_DOT disabled, but it is recommended to # install and use dot, since it yields more powerful graphs. CLASS_DIAGRAMS = NO # You can define message sequence charts within doxygen comments using the \msc # command. Doxygen will then run the mscgen tool (see # http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the # documentation. The MSCGEN_PATH tag allows you to specify the directory where # the mscgen tool resides. If left empty the tool is assumed to be found in the # default search path. MSCGEN_PATH = # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is # allowed to run in parallel. When set to 0 (the default) doxygen will # base this on the number of processors available in the system. You can set it # explicitly to a value larger than 0 to get control over the balance # between CPU load and processing speed. DOT_NUM_THREADS = 0 # By default doxygen will use the Helvetica font for all dot files that # doxygen generates. When you want a differently looking font you can specify # the font name using DOT_FONTNAME. You need to make sure dot is able to find # the font, which can be done by putting it in a standard location or by setting # the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the # directory containing the font. DOT_FONTNAME = FreeSans # The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. # The default size is 10pt. DOT_FONTSIZE = 10 # By default doxygen will tell dot to use the Helvetica font. # If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to # set the path where dot can find it. DOT_FONTPATH = # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES # If the UML_LOOK tag is set to YES doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO # If the UML_LOOK tag is enabled, the fields and methods are shown inside # the class node. If there are many fields or methods and many nodes the # graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS # threshold limits the number of items for each type to make the size more # managable. Set this to 0 for no limit. Note that the threshold may be # exceeded by 50% before the limit is enforced. UML_LIMIT_NUM_FIELDS = 10 # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the CALL_GRAPH and HAVE_DOT options are set to YES then # doxygen will generate a call dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable call graphs # for selected functions only using the \callgraph command. CALL_GRAPH = NO # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then # doxygen will generate a caller dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable caller # graphs for selected functions only using the \callergraph command. CALLER_GRAPH = NO # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will generate a graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES # then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are svg, png, jpg, or gif. # If left blank png will be used. If you choose svg you need to set # HTML_FILE_EXTENSION to xhtml in order to make the SVG files # visible in IE 9+ (other browsers do not have this requirement). DOT_IMAGE_FORMAT = png # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to # enable generation of interactive SVG images that allow zooming and panning. # Note that this requires a modern browser other than Internet Explorer. # Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you # need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files # visible. Older versions of IE do not have SVG support. INTERACTIVE_SVG = NO # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The MSCFILE_DIRS tag can be used to specify one or more directories that # contain msc files that are included in the documentation (see the # \mscfile command). MSCFILE_DIRS = # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of # nodes that will be shown in the graph. If the number of nodes in a graph # becomes larger than this value, doxygen will truncate the graph, which is # visualized by representing a node as a red box. Note that doxygen if the # number of direct children of the root node in a graph is already larger than # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. DOT_GRAPH_MAX_NODES = 50 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable # from the root by following a path via at most 3 edges will be shown. Nodes # that lay further from the root node will be omitted. Note that setting this # option to 1 or 2 may greatly reduce the computation time needed for large # code bases. Also note that the size of a graph can be further restricted by # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. MAX_DOT_GRAPH_DEPTH = 0 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is disabled by default, because dot on Windows does not # seem to support this out of the box. Warning: Depending on the platform used, # enabling this option may lead to badly anti-aliased labels on the edges of # a graph (i.e. they become hard to read). DOT_TRANSPARENT = NO # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES SDL2_gfx-1.0.4/Docs/html/annotated.html100777 0 0 7573 12632323332 12715 0 SDL2_gfx: Data Structures
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
Data Structures
Here are the data structures with brief descriptions:
 CFPSmanagerStructure holding the state and timing information of the framerate controller
 CSDL2_gfxBresenhamIteratorThe structure passed to the internal Bresenham iterator
 CSDL2_gfxMurphyIteratorThe structure passed to the internal Murphy iterator
 CtColorRGBAA 32 bit RGBA pixel
 CtColorYA 8bit Y/palette pixel
SDL2_gfx-1.0.4/Docs/html/bc_s.png100777 0 0 1244 12632323332 11453 0PNG  IHDR_ kIDATxkQϝ̤I&m&156*nąܸR,4 +H(Ub1J.(EmߏhJmKS'C(х & r3g(z&_9}՟@mu ` h`ԯ &~M4%3?h)\Yi>Jb @giވkg\轭EUv+?E"pB\Y&$vM+Dn)}:Xo 3گ'.f0u9Ljf6%3Gf#sm(,k*ʒJJˢou_~ r]%%mnu]zr5[ưXeI+ Kch` ^ލnIENDB`SDL2_gfx-1.0.4/Docs/html/classes.html100777 0 0 7514 12632323332 12370 0 SDL2_gfx: Data Structure Index
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
Data Structure Index
F | S | T
  F  
  S  
SDL2_gfxMurphyIterator   tColorY   
  t  
FPSmanager   SDL2_gfxBresenhamIterator   
tColorRGBA   
F | S | T
SDL2_gfx-1.0.4/Docs/html/closed.png100777 0 0 204 12632323332 11771 0PNG  IHDR KIDATxm @!Gk7-`&sts@k}2 P%_N .:0Dk›x" ֛)x5IENDB`SDL2_gfx-1.0.4/Docs/html/doxygen.css100777 0 0 61711 12632323332 12253 0/* The standard CSS for doxygen 1.8.10 */ body, table, div, p, dl { font: 400 14px/22px Roboto,sans-serif; } /* @group Heading Levels */ h1.groupheader { font-size: 150%; } .title { font: 400 14px/28px Roboto,sans-serif; font-size: 150%; font-weight: bold; margin: 10px 2px; } h2.groupheader { border-bottom: 1px solid #879ECB; color: #354C7B; font-size: 150%; font-weight: normal; margin-top: 1.75em; padding-top: 8px; padding-bottom: 4px; width: 100%; } h3.groupheader { font-size: 100%; } h1, h2, h3, h4, h5, h6 { -webkit-transition: text-shadow 0.5s linear; -moz-transition: text-shadow 0.5s linear; -ms-transition: text-shadow 0.5s linear; -o-transition: text-shadow 0.5s linear; transition: text-shadow 0.5s linear; margin-right: 15px; } h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { text-shadow: 0 0 15px cyan; } dt { font-weight: bold; } div.multicol { -moz-column-gap: 1em; -webkit-column-gap: 1em; -moz-column-count: 3; -webkit-column-count: 3; } p.startli, p.startdd { margin-top: 2px; } p.starttd { margin-top: 0px; } p.endli { margin-bottom: 0px; } p.enddd { margin-bottom: 4px; } p.endtd { margin-bottom: 2px; } /* @end */ caption { font-weight: bold; } span.legend { font-size: 70%; text-align: center; } h3.version { font-size: 90%; text-align: center; } div.qindex, div.navtab{ background-color: #EBEFF6; border: 1px solid #A3B4D7; text-align: center; } div.qindex, div.navpath { width: 100%; line-height: 140%; } div.navtab { margin-right: 15px; } /* @group Link Styling */ a { color: #3D578C; font-weight: normal; text-decoration: none; } .contents a:visited { color: #4665A2; } a:hover { text-decoration: underline; } a.qindex { font-weight: bold; } a.qindexHL { font-weight: bold; background-color: #9CAFD4; color: #ffffff; border: 1px double #869DCA; } .contents a.qindexHL:visited { color: #ffffff; } a.el { font-weight: bold; } a.elRef { } a.code, a.code:visited, a.line, a.line:visited { color: #4665A2; } a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { color: #4665A2; } /* @end */ dl.el { margin-left: -1cm; } pre.fragment { border: 1px solid #C4CFE5; background-color: #FBFCFD; padding: 4px 6px; margin: 4px 8px 4px 2px; overflow: auto; word-wrap: break-word; font-size: 9pt; line-height: 125%; font-family: monospace, fixed; font-size: 105%; } div.fragment { padding: 4px 6px; margin: 4px 8px 4px 2px; background-color: #FBFCFD; border: 1px solid #C4CFE5; } div.line { font-family: monospace, fixed; font-size: 13px; min-height: 13px; line-height: 1.0; text-wrap: unrestricted; white-space: -moz-pre-wrap; /* Moz */ white-space: -pre-wrap; /* Opera 4-6 */ white-space: -o-pre-wrap; /* Opera 7 */ white-space: pre-wrap; /* CSS3 */ word-wrap: break-word; /* IE 5.5+ */ text-indent: -53px; padding-left: 53px; padding-bottom: 0px; margin: 0px; -webkit-transition-property: background-color, box-shadow; -webkit-transition-duration: 0.5s; -moz-transition-property: background-color, box-shadow; -moz-transition-duration: 0.5s; -ms-transition-property: background-color, box-shadow; -ms-transition-duration: 0.5s; -o-transition-property: background-color, box-shadow; -o-transition-duration: 0.5s; transition-property: background-color, box-shadow; transition-duration: 0.5s; } div.line.glow { background-color: cyan; box-shadow: 0 0 10px cyan; } span.lineno { padding-right: 4px; text-align: right; border-right: 2px solid #0F0; background-color: #E8E8E8; white-space: pre; } span.lineno a { background-color: #D8D8D8; } span.lineno a:hover { background-color: #C8C8C8; } div.ah, span.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px; padding: 0.2em; border: solid thin #333; border-radius: 0.5em; -webkit-border-radius: .5em; -moz-border-radius: .5em; box-shadow: 2px 2px 3px #999; -webkit-box-shadow: 2px 2px 3px #999; -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); } div.classindex ul { list-style: none; padding-left: 0; } div.classindex span.ai { display: inline-block; } div.groupHeader { margin-left: 16px; margin-top: 12px; font-weight: bold; } div.groupText { margin-left: 16px; font-style: italic; } body { background-color: white; color: black; margin: 0; } div.contents { margin-top: 10px; margin-left: 12px; margin-right: 8px; } td.indexkey { background-color: #EBEFF6; font-weight: bold; border: 1px solid #C4CFE5; margin: 2px 0px 2px 0; padding: 2px 10px; white-space: nowrap; vertical-align: top; } td.indexvalue { background-color: #EBEFF6; border: 1px solid #C4CFE5; padding: 2px 10px; margin: 2px 0px; } tr.memlist { background-color: #EEF1F7; } p.formulaDsp { text-align: center; } img.formulaDsp { } img.formulaInl { vertical-align: middle; } div.center { text-align: center; margin-top: 0px; margin-bottom: 0px; padding: 0px; } div.center img { border: 0px; } address.footer { text-align: right; padding-right: 12px; } img.footer { border: 0px; vertical-align: middle; } /* @group Code Colorization */ span.keyword { color: #008000 } span.keywordtype { color: #604020 } span.keywordflow { color: #e08000 } span.comment { color: #800000 } span.preprocessor { color: #806020 } span.stringliteral { color: #002080 } span.charliteral { color: #008080 } span.vhdldigit { color: #ff00ff } span.vhdlchar { color: #000000 } span.vhdlkeyword { color: #700070 } span.vhdllogic { color: #ff0000 } blockquote { background-color: #F7F8FB; border-left: 2px solid #9CAFD4; margin: 0 24px 0 4px; padding: 0 12px 0 16px; } /* @end */ /* .search { color: #003399; font-weight: bold; } form.search { margin-bottom: 0px; margin-top: 0px; } input.search { font-size: 75%; color: #000080; font-weight: normal; background-color: #e8eef2; } */ td.tiny { font-size: 75%; } .dirtab { padding: 4px; border-collapse: collapse; border: 1px solid #A3B4D7; } th.dirtab { background: #EBEFF6; font-weight: bold; } hr { height: 0px; border: none; border-top: 1px solid #4A6AAA; } hr.footer { height: 1px; } /* @group Member Descriptions */ table.memberdecls { border-spacing: 0px; padding: 0px; } .memberdecls td, .fieldtable tr { -webkit-transition-property: background-color, box-shadow; -webkit-transition-duration: 0.5s; -moz-transition-property: background-color, box-shadow; -moz-transition-duration: 0.5s; -ms-transition-property: background-color, box-shadow; -ms-transition-duration: 0.5s; -o-transition-property: background-color, box-shadow; -o-transition-duration: 0.5s; transition-property: background-color, box-shadow; transition-duration: 0.5s; } .memberdecls td.glow, .fieldtable tr.glow { background-color: cyan; box-shadow: 0 0 15px cyan; } .mdescLeft, .mdescRight, .memItemLeft, .memItemRight, .memTemplItemLeft, .memTemplItemRight, .memTemplParams { background-color: #F9FAFC; border: none; margin: 4px; padding: 1px 0 0 8px; } .mdescLeft, .mdescRight { padding: 0px 8px 4px 8px; color: #555; } .memSeparator { border-bottom: 1px solid #DEE4F0; line-height: 1px; margin: 0px; padding: 0px; } .memItemLeft, .memTemplItemLeft { white-space: nowrap; } .memItemRight { width: 100%; } .memTemplParams { color: #4665A2; white-space: nowrap; font-size: 80%; } /* @end */ /* @group Member Details */ /* Styles for detailed member documentation */ .memtemplate { font-size: 80%; color: #4665A2; font-weight: normal; margin-left: 9px; } .memnav { background-color: #EBEFF6; border: 1px solid #A3B4D7; text-align: center; margin: 2px; margin-right: 15px; padding: 2px; } .mempage { width: 100%; } .memitem { padding: 0; margin-bottom: 10px; margin-right: 5px; -webkit-transition: box-shadow 0.5s linear; -moz-transition: box-shadow 0.5s linear; -ms-transition: box-shadow 0.5s linear; -o-transition: box-shadow 0.5s linear; transition: box-shadow 0.5s linear; display: table !important; width: 100%; } .memitem.glow { box-shadow: 0 0 15px cyan; } .memname { font-weight: bold; margin-left: 6px; } .memname td { vertical-align: bottom; } .memproto, dl.reflist dt { border-top: 1px solid #A8B8D9; border-left: 1px solid #A8B8D9; border-right: 1px solid #A8B8D9; padding: 6px 0px 6px 0px; color: #253555; font-weight: bold; text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); background-image:url('nav_f.png'); background-repeat:repeat-x; background-color: #E2E8F2; /* opera specific markup */ box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); border-top-right-radius: 4px; border-top-left-radius: 4px; /* firefox specific markup */ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; -moz-border-radius-topright: 4px; -moz-border-radius-topleft: 4px; /* webkit specific markup */ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); -webkit-border-top-right-radius: 4px; -webkit-border-top-left-radius: 4px; } .memdoc, dl.reflist dd { border-bottom: 1px solid #A8B8D9; border-left: 1px solid #A8B8D9; border-right: 1px solid #A8B8D9; padding: 6px 10px 2px 10px; background-color: #FBFCFD; border-top-width: 0; background-image:url('nav_g.png'); background-repeat:repeat-x; background-color: #FFFFFF; /* opera specific markup */ border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); /* firefox specific markup */ -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; /* webkit specific markup */ -webkit-border-bottom-left-radius: 4px; -webkit-border-bottom-right-radius: 4px; -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); } dl.reflist dt { padding: 5px; } dl.reflist dd { margin: 0px 0px 10px 0px; padding: 5px; } .paramkey { text-align: right; } .paramtype { white-space: nowrap; } .paramname { color: #602020; white-space: nowrap; } .paramname em { font-style: normal; } .paramname code { line-height: 14px; } .params, .retval, .exception, .tparams { margin-left: 0px; padding-left: 0px; } .params .paramname, .retval .paramname { font-weight: bold; vertical-align: top; } .params .paramtype { font-style: italic; vertical-align: top; } .params .paramdir { font-family: "courier new",courier,monospace; vertical-align: top; } table.mlabels { border-spacing: 0px; } td.mlabels-left { width: 100%; padding: 0px; } td.mlabels-right { vertical-align: bottom; padding: 0px; white-space: nowrap; } span.mlabels { margin-left: 8px; } span.mlabel { background-color: #728DC1; border-top:1px solid #5373B4; border-left:1px solid #5373B4; border-right:1px solid #C4CFE5; border-bottom:1px solid #C4CFE5; text-shadow: none; color: white; margin-right: 4px; padding: 2px 3px; border-radius: 3px; font-size: 7pt; white-space: nowrap; vertical-align: middle; } /* @end */ /* these are for tree view inside a (index) page */ div.directory { margin: 10px 0px; border-top: 1px solid #9CAFD4; border-bottom: 1px solid #9CAFD4; width: 100%; } .directory table { border-collapse:collapse; } .directory td { margin: 0px; padding: 0px; vertical-align: top; } .directory td.entry { white-space: nowrap; padding-right: 6px; padding-top: 3px; } .directory td.entry a { outline:none; } .directory td.entry a img { border: none; } .directory td.desc { width: 100%; padding-left: 6px; padding-right: 6px; padding-top: 3px; border-left: 1px solid rgba(0,0,0,0.05); } .directory tr.even { padding-left: 6px; background-color: #F7F8FB; } .directory img { vertical-align: -30%; } .directory .levels { white-space: nowrap; width: 100%; text-align: right; font-size: 9pt; } .directory .levels span { cursor: pointer; padding-left: 2px; padding-right: 2px; color: #3D578C; } .arrow { color: #9CAFD4; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: pointer; font-size: 80%; display: inline-block; width: 16px; height: 22px; } .icon { font-family: Arial, Helvetica; font-weight: bold; font-size: 12px; height: 14px; width: 16px; display: inline-block; background-color: #728DC1; color: white; text-align: center; border-radius: 4px; margin-left: 2px; margin-right: 2px; } .icona { width: 24px; height: 22px; display: inline-block; } .iconfopen { width: 24px; height: 18px; margin-bottom: 4px; background-image:url('folderopen.png'); background-position: 0px -4px; background-repeat: repeat-y; vertical-align:top; display: inline-block; } .iconfclosed { width: 24px; height: 18px; margin-bottom: 4px; background-image:url('folderclosed.png'); background-position: 0px -4px; background-repeat: repeat-y; vertical-align:top; display: inline-block; } .icondoc { width: 24px; height: 18px; margin-bottom: 4px; background-image:url('doc.png'); background-position: 0px -4px; background-repeat: repeat-y; vertical-align:top; display: inline-block; } table.directory { font: 400 14px Roboto,sans-serif; } /* @end */ div.dynheader { margin-top: 8px; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } address { font-style: normal; color: #2A3D61; } table.doxtable { border-collapse:collapse; margin-top: 4px; margin-bottom: 4px; } table.doxtable td, table.doxtable th { border: 1px solid #2D4068; padding: 3px 7px 2px; } table.doxtable th { background-color: #374F7F; color: #FFFFFF; font-size: 110%; padding-bottom: 4px; padding-top: 5px; } table.fieldtable { /*width: 100%;*/ margin-bottom: 10px; border: 1px solid #A8B8D9; border-spacing: 0px; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); } .fieldtable td, .fieldtable th { padding: 3px 7px 2px; } .fieldtable td.fieldtype, .fieldtable td.fieldname { white-space: nowrap; border-right: 1px solid #A8B8D9; border-bottom: 1px solid #A8B8D9; vertical-align: top; } .fieldtable td.fieldname { padding-top: 3px; } .fieldtable td.fielddoc { border-bottom: 1px solid #A8B8D9; /*width: 100%;*/ } .fieldtable td.fielddoc p:first-child { margin-top: 0px; } .fieldtable td.fielddoc p:last-child { margin-bottom: 2px; } .fieldtable tr:last-child td { border-bottom: none; } .fieldtable th { background-image:url('nav_f.png'); background-repeat:repeat-x; background-color: #E2E8F2; font-size: 90%; color: #253555; padding-bottom: 4px; padding-top: 5px; text-align:left; -moz-border-radius-topleft: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-left-radius: 4px; -webkit-border-top-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom: 1px solid #A8B8D9; } .tabsearch { top: 0px; left: 10px; height: 36px; background-image: url('tab_b.png'); z-index: 101; overflow: hidden; font-size: 13px; } .navpath ul { font-size: 11px; background-image:url('tab_b.png'); background-repeat:repeat-x; background-position: 0 -5px; height:30px; line-height:30px; color:#8AA0CC; border:solid 1px #C2CDE4; overflow:hidden; margin:0px; padding:0px; } .navpath li { list-style-type:none; float:left; padding-left:10px; padding-right:15px; background-image:url('bc_s.png'); background-repeat:no-repeat; background-position:right; color:#364D7C; } .navpath li.navelem a { height:32px; display:block; text-decoration: none; outline: none; color: #283A5D; font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); text-decoration: none; } .navpath li.navelem a:hover { color:#6884BD; } .navpath li.footer { list-style-type:none; float:right; padding-left:10px; padding-right:15px; background-image:none; background-repeat:no-repeat; background-position:right; color:#364D7C; font-size: 8pt; } div.summary { float: right; font-size: 8pt; padding-right: 5px; width: 50%; text-align: right; } div.summary a { white-space: nowrap; } div.ingroups { font-size: 8pt; width: 50%; text-align: left; } div.ingroups a { white-space: nowrap; } div.header { background-image:url('nav_h.png'); background-repeat:repeat-x; background-color: #F9FAFC; margin: 0px; border-bottom: 1px solid #C4CFE5; } div.headertitle { padding: 5px 5px 5px 10px; } dl { padding: 0 0 0 10px; } /* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */ dl.section { margin-left: 0px; padding-left: 0px; } dl.note { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #D0C000; } dl.warning, dl.attention { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #FF0000; } dl.pre, dl.post, dl.invariant { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #00D000; } dl.deprecated { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #505050; } dl.todo { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #00C0E0; } dl.test { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #3030E0; } dl.bug { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #C08050; } dl.section dd { margin-bottom: 6px; } #projectlogo { text-align: center; vertical-align: bottom; border-collapse: separate; } #projectlogo img { border: 0px none; } #projectalign { vertical-align: middle; } #projectname { font: 300% Tahoma, Arial,sans-serif; margin: 0px; padding: 2px 0px; } #projectbrief { font: 120% Tahoma, Arial,sans-serif; margin: 0px; padding: 0px; } #projectnumber { font: 50% Tahoma, Arial,sans-serif; margin: 0px; padding: 0px; } #titlearea { padding: 0px; margin: 0px; width: 100%; border-bottom: 1px solid #5373B4; } .image { text-align: center; } .dotgraph { text-align: center; } .mscgraph { text-align: center; } .diagraph { text-align: center; } .caption { font-weight: bold; } div.zoom { border: 1px solid #90A5CE; } dl.citelist { margin-bottom:50px; } dl.citelist dt { color:#334975; float:left; font-weight:bold; margin-right:10px; padding:5px; } dl.citelist dd { margin:2px 0; padding:5px 0; } div.toc { padding: 14px 25px; background-color: #F4F6FA; border: 1px solid #D8DFEE; border-radius: 7px 7px 7px 7px; float: right; height: auto; margin: 0 20px 10px 10px; width: 200px; } div.toc li { background: url("bdwn.png") no-repeat scroll 0 5px transparent; font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; margin-top: 5px; padding-left: 10px; padding-top: 2px; } div.toc h3 { font: bold 12px/1.2 Arial,FreeSans,sans-serif; color: #4665A2; border-bottom: 0 none; margin: 0; } div.toc ul { list-style: none outside none; border: medium none; padding: 0px; } div.toc li.level1 { margin-left: 0px; } div.toc li.level2 { margin-left: 15px; } div.toc li.level3 { margin-left: 30px; } div.toc li.level4 { margin-left: 45px; } .inherit_header { font-weight: bold; color: gray; cursor: pointer; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .inherit_header td { padding: 6px 0px 2px 5px; } .inherit { display: none; } tr.heading h2 { margin-top: 12px; margin-bottom: 4px; } /* tooltip related style info */ .ttc { position: absolute; display: none; } #powerTip { cursor: default; white-space: nowrap; background-color: white; border: 1px solid gray; border-radius: 4px 4px 4px 4px; box-shadow: 1px 1px 7px gray; display: none; font-size: smaller; max-width: 80%; opacity: 0.9; padding: 1ex 1em 1em; position: absolute; z-index: 2147483647; } #powerTip div.ttdoc { color: grey; font-style: italic; } #powerTip div.ttname a { font-weight: bold; } #powerTip div.ttname { font-weight: bold; } #powerTip div.ttdeci { color: #006318; } #powerTip div { margin: 0px; padding: 0px; font: 12px/16px Roboto,sans-serif; } #powerTip:before, #powerTip:after { content: ""; position: absolute; margin: 0px; } #powerTip.n:after, #powerTip.n:before, #powerTip.s:after, #powerTip.s:before, #powerTip.w:after, #powerTip.w:before, #powerTip.e:after, #powerTip.e:before, #powerTip.ne:after, #powerTip.ne:before, #powerTip.se:after, #powerTip.se:before, #powerTip.nw:after, #powerTip.nw:before, #powerTip.sw:after, #powerTip.sw:before { border: solid transparent; content: " "; height: 0; width: 0; position: absolute; } #powerTip.n:after, #powerTip.s:after, #powerTip.w:after, #powerTip.e:after, #powerTip.nw:after, #powerTip.ne:after, #powerTip.sw:after, #powerTip.se:after { border-color: rgba(255, 255, 255, 0); } #powerTip.n:before, #powerTip.s:before, #powerTip.w:before, #powerTip.e:before, #powerTip.nw:before, #powerTip.ne:before, #powerTip.sw:before, #powerTip.se:before { border-color: rgba(128, 128, 128, 0); } #powerTip.n:after, #powerTip.n:before, #powerTip.ne:after, #powerTip.ne:before, #powerTip.nw:after, #powerTip.nw:before { top: 100%; } #powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { border-top-color: #ffffff; border-width: 10px; margin: 0px -10px; } #powerTip.n:before { border-top-color: #808080; border-width: 11px; margin: 0px -11px; } #powerTip.n:after, #powerTip.n:before { left: 50%; } #powerTip.nw:after, #powerTip.nw:before { right: 14px; } #powerTip.ne:after, #powerTip.ne:before { left: 14px; } #powerTip.s:after, #powerTip.s:before, #powerTip.se:after, #powerTip.se:before, #powerTip.sw:after, #powerTip.sw:before { bottom: 100%; } #powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { border-bottom-color: #ffffff; border-width: 10px; margin: 0px -10px; } #powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { border-bottom-color: #808080; border-width: 11px; margin: 0px -11px; } #powerTip.s:after, #powerTip.s:before { left: 50%; } #powerTip.sw:after, #powerTip.sw:before { right: 14px; } #powerTip.se:after, #powerTip.se:before { left: 14px; } #powerTip.e:after, #powerTip.e:before { left: 100%; } #powerTip.e:after { border-left-color: #ffffff; border-width: 10px; top: 50%; margin-top: -10px; } #powerTip.e:before { border-left-color: #808080; border-width: 11px; top: 50%; margin-top: -11px; } #powerTip.w:after, #powerTip.w:before { right: 100%; } #powerTip.w:after { border-right-color: #ffffff; border-width: 10px; top: 50%; margin-top: -10px; } #powerTip.w:before { border-right-color: #808080; border-width: 11px; top: 50%; margin-top: -11px; } @media print { #top { display: none; } #side-nav { display: none; } #nav-path { display: none; } body { overflow:visible; } h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } .summary { display: none; } .memitem { page-break-inside: avoid; } #doc-content { margin-left:0 !important; height:auto !important; width:auto !important; overflow:inherit; display:inline; } } SDL2_gfx-1.0.4/Docs/html/doxygen.png100777 0 0 7303 12632323332 12224 0PNG  IHDRh ;IDATx]y\պ~45%TL QPE"q11]8aw*(*" z`8 m,p$%B(8k6lk[߷;?kPx'tz3_Q4g@m ci{~4:Hc'PP7^h zbcP 3}OqNkT(?d ~z<4ǡ؞vz٦Zd,6k]Fz< Zs?sU2Sw1c`[}%ѽ.Լ6BLZ!F8[ T #g]:vu?vbR?wgb$kF~;عƕX?lNʪ,HCgAzlӺg ]jM3oҳ'=$f}GS_co.ȹ:ds:1={9?zqviDp moaEqҵw}~{j{ºFNë[OqOSXO]>muľe5{Jկ(bl}`UyacCAklysA7oJ .Be. Z'-PyF.lp&.j7rez19HG%qz׈c_k_")HJn~֘5 q5#+9T Rܸrzϴ̝ =υ{áOfwg|/$;֙ƭ]W"/< DఽB}yIEc^=[VhM$l];Kr¦* t$]M;I1!M (f<5~z mՠ>کIz;u[ie^ӳNF6B\}7+,'a -yHY,^f~?Hc{Z+4\sٷnߣFơsغD?<vkx0MlذIxdEEAMg*YE7ۙ^[uv[wG=Edn׶l'pGk+C82 dz3H BS[wŘ ~xptmţiQ歉AB1fى4uI]6% 1t.NJphz̠R1"3-"&1[:N mW0_œ 6&)ꦬ}~{m]zMP~^:eQT_*798ˍ 347E¿uSɻU_ NWeNӏ|;;d"ȉ޵ᆴ"ĴMM+bY_E]PXKНIޥoE<_(EP|m,өZߺk,kM`jzeU t36˷r}w:Χ |TܵQK_pໃYd0!a –W$$/\$ 2mLH dHV,:RZJaz*>_NT(‚^SVFU8E܈nd;8\C]=m:bDd=ߞUU5O|]Pv\]2"y[yzg{Y{Ù5;w{N3nĨwKݭ29Id y)P8ũ@mPwjl,6 hWd ump.DžtwR xBδYcxg*vo y򑕓[?V0NO난~󒯷h#Hk8kӍ^q@]ӓ,56-κUn[>]@nϜp[6# 4tn:}8T9_Y$/GK(ђM`dѺ;OB &P{qhJ+閧l2M_1ӫtlya L^y.۽[ u/]iS}N>e1qjf&iT\=kϛX-.84V5u!TE .OH4zwTr. xքHHg hT$yqzp< qrwI]I鲘s":ՖbզL69VW<;3?M3AV#ޯKUr9!qtH+6V/TS^pqgLP'5E ޺ n"2|;W"֬TwtO' +W+Z̖<&nO,I06.Z.h*INڒOegBXZ9hDSʍ A/c`A"z|ş;H#|%OOD mcƤqmu&~n πZj =_n[nN$_bE)8?6l}#bW( d-p&a"9ņ$ڛA!;{~8ޣ10`#kuN Qbh 8Mawhq(bK Z%m֍(J)@> 7% {y ohf>{p.­_%glZ\B2B #Һphݚ[<#SpA7Ht4:|gtL*($Ʃ$;b`=MM5ǾHH.HeA5}rd)T};Q5i2O00;,냔}g]79_{C>h{.II?[Kswz6u;OJa˶zvd l舊yc'rTWӰL |ʽhB T'ò]K(=Kx  L,Pʵu׈ž1ݫ;pGDxZY kf676oھH~޸ 8Up6(? K+?%ݷ/19U?B)l @=ޞkIENDB`SDL2_gfx-1.0.4/Docs/html/files.html100777 0 0 12136 12632323332 12051 0 SDL2_gfx: File List
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
File List
SDL2_gfx-1.0.4/Docs/html/functions.html100777 0 0 22666 12632323332 12770 0 SDL2_gfx: Data Fields
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
Here is a list of all struct and union fields with links to the structures/unions they belong to:

- a -

- b -

- c -

- d -

- e -

- f -

- g -

- k -

- l -

- o -

- q -

- r -

- s -

- t -

- u -

- v -

- x -

- y -

SDL2_gfx-1.0.4/Docs/html/functions_vars.html100777 0 0 22512 12632323332 14011 0 SDL2_gfx: Data Fields - Variables
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
SDL2_gfx-1.0.4/Docs/html/globals.html100777 0 0 13141 12632323332 12367 0 SDL2_gfx: Globals
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- _ -

SDL2_gfx-1.0.4/Docs/html/globals_0x61.html100777 0 0 15170 12355420160 13150 0 SDL2_gfx: Globals
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- a -

SDL2_gfx-1.0.4/Docs/html/globals_0x62.html100777 0 0 10600 12355420160 13142 0 SDL2_gfx: Globals
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- b -

SDL2_gfx-1.0.4/Docs/html/globals_0x63.html100777 0 0 10614 12355420160 13150 0 SDL2_gfx: Globals
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- c -

SDL2_gfx-1.0.4/Docs/html/globals_0x65.html100777 0 0 10036 12355420160 13150 0 SDL2_gfx: Globals
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- e -

SDL2_gfx-1.0.4/Docs/html/globals_0x66.html100777 0 0 14674 12355420160 13165 0 SDL2_gfx: Globals
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- f -

SDL2_gfx-1.0.4/Docs/html/globals_0x67.html100777 0 0 10275 12355420160 13157 0 SDL2_gfx: Globals
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- g -

SDL2_gfx-1.0.4/Docs/html/globals_0x68.html100777 0 0 10021 12360250626 13151 0 SDL2_gfx: Globals
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- h -

SDL2_gfx-1.0.4/Docs/html/globals_0x6c.html100777 0 0 10016 12355420160 13224 0 SDL2_gfx: Globals
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- l -

SDL2_gfx-1.0.4/Docs/html/globals_0x6d.html100777 0 0 7365 12355420160 13222 0 SDL2_gfx: Globals
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- m -

SDL2_gfx-1.0.4/Docs/html/globals_0x70.html100777 0 0 12417 12355420160 13151 0 SDL2_gfx: Globals
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- p -

SDL2_gfx-1.0.4/Docs/html/globals_0x72.html100777 0 0 14104 12355420160 13146 0 SDL2_gfx: Globals
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- r -

SDL2_gfx-1.0.4/Docs/html/globals_0x73.html100777 0 0 40511 12355420160 13150 0 SDL2_gfx: Globals
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- s -

SDL2_gfx-1.0.4/Docs/html/globals_0x74.html100777 0 0 12226 12355420160 13153 0 SDL2_gfx: Globals
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- t -

SDL2_gfx-1.0.4/Docs/html/globals_0x76.html100777 0 0 10216 12355420160 13152 0 SDL2_gfx: Globals
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- v -

SDL2_gfx-1.0.4/Docs/html/globals_0x7a.html100777 0 0 7550 12355420160 13214 0 SDL2_gfx: Globals
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- z -

SDL2_gfx-1.0.4/Docs/html/globals_defs.html100777 0 0 12224 12632323332 13371 0 SDL2_gfx: Globals
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
 
SDL2_gfx-1.0.4/Docs/html/globals_func.html100777 0 0 12742 12632323332 13410 0 SDL2_gfx: Globals
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
 

- _ -

SDL2_gfx-1.0.4/Docs/html/globals_func_0x61.html100777 0 0 14356 12355420160 14170 0 SDL2_gfx: Globals
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
SDL2_gfx-1.0.4/Docs/html/globals_func_0x62.html100777 0 0 10376 12355420160 14167 0 SDL2_gfx: Globals
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
SDL2_gfx-1.0.4/Docs/html/globals_func_0x63.html100777 0 0 10412 12355420160 14157 0 SDL2_gfx: Globals
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
SDL2_gfx-1.0.4/Docs/html/globals_func_0x65.html100777 0 0 7417 12355420160 14154 0 SDL2_gfx: Globals
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
SDL2_gfx-1.0.4/Docs/html/globals_func_0x66.html100777 0 0 13665 12355420160 14177 0 SDL2_gfx: Globals
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
 

- f -

SDL2_gfx-1.0.4/Docs/html/globals_func_0x67.html100777 0 0 7450 12355420160 14153 0 SDL2_gfx: Globals
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
 

- g -

SDL2_gfx-1.0.4/Docs/html/globals_func_0x68.html100777 0 0 7617 12355420160 14161 0 SDL2_gfx: Globals
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
SDL2_gfx-1.0.4/Docs/html/globals_func_0x6c.html100777 0 0 7614 12355420160 14231 0 SDL2_gfx: Globals
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
SDL2_gfx-1.0.4/Docs/html/globals_func_0x70.html100777 0 0 12215 12355420160 14160 0 SDL2_gfx: Globals
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
SDL2_gfx-1.0.4/Docs/html/globals_func_0x72.html100777 0 0 13702 12355420160 14164 0 SDL2_gfx: Globals
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
 

- r -

SDL2_gfx-1.0.4/Docs/html/globals_func_0x73.html100777 0 0 35532 12355420160 14172 0 SDL2_gfx: Globals
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
 

- s -

SDL2_gfx-1.0.4/Docs/html/globals_func_0x74.html100777 0 0 11437 12355420160 14171 0 SDL2_gfx: Globals
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
 

- t -

SDL2_gfx-1.0.4/Docs/html/globals_func_0x76.html100777 0 0 7617 12355420160 14160 0 SDL2_gfx: Globals
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
SDL2_gfx-1.0.4/Docs/html/globals_func_0x7a.html100777 0 0 7346 12355420160 14232 0 SDL2_gfx: Globals
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
 

- z -

SDL2_gfx-1.0.4/Docs/html/globals_type.html100777 0 0 5025 12632323332 13412 0 SDL2_gfx: Globals
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
 
SDL2_gfx-1.0.4/Docs/html/index.html100777 0 0 3504 12632323332 12035 0 SDL2_gfx: Main Page
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
SDL2_gfx Documentation
SDL2_gfx-1.0.4/Docs/html/nav_f.png100777 0 0 231 12632323332 11611 0PNG  IHDR8`IDATxK Eі[BmkHprӼ.ꎤR6Z VIE5jliIJ0/u޿6sH yIENDB`SDL2_gfx-1.0.4/Docs/html/nav_h.png100777 0 0 142 12632323332 11614 0PNG  IHDR ,@)IDATxA @BQۛТ) ) aܿoRlIENDB`SDL2_gfx-1.0.4/Docs/html/open.png100777 0 0 173 12632323332 11466 0PNG  IHDR BIDATx 0 ׬ՙ\39b!9{|I>$#ߴ8/z/>2[giU,/~\ 9ٸIENDB`SDL2_gfx-1.0.4/Docs/html/structt_color_r_g_b_a.html100777 0 0 14270 12632323332 15306 0 SDL2_gfx: tColorRGBA Struct Reference
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
tColorRGBA Struct Reference

A 32 bit RGBA pixel. More...

Data Fields

Uint8 r
 
Uint8 g
 
Uint8 b
 
Uint8 a
 

Detailed Description

A 32 bit RGBA pixel.

Definition at line 44 of file SDL2_rotozoom.c.

Field Documentation

Uint8 a

Definition at line 48 of file SDL2_rotozoom.c.

Uint8 b

Definition at line 47 of file SDL2_rotozoom.c.

Uint8 g

Definition at line 46 of file SDL2_rotozoom.c.

Uint8 r

Definition at line 45 of file SDL2_rotozoom.c.


The documentation for this struct was generated from the following file:
SDL2_gfx-1.0.4/Docs/html/structt_color_y.html100777 0 0 7450 12632323332 14170 0 SDL2_gfx: tColorY Struct Reference
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
tColorY Struct Reference

A 8bit Y/palette pixel. More...

Data Fields

Uint8 y
 

Detailed Description

A 8bit Y/palette pixel.

Definition at line 54 of file SDL2_rotozoom.c.

Field Documentation

Uint8 y

Definition at line 55 of file SDL2_rotozoom.c.


The documentation for this struct was generated from the following file:
SDL2_gfx-1.0.4/Docs/html/struct_f_p_smanager.html100777 0 0 16444 12632323332 15002 0 SDL2_gfx: FPSmanager Struct Reference
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
FPSmanager Struct Reference

Structure holding the state and timing information of the framerate controller. More...

#include <SDL2_framerate.h>

Data Fields

Uint32 framecount
 
float rateticks
 
Uint32 baseticks
 
Uint32 lastticks
 
Uint32 rate
 

Detailed Description

Structure holding the state and timing information of the framerate controller.

Definition at line 62 of file SDL2_framerate.h.

Field Documentation

Uint32 baseticks

Definition at line 65 of file SDL2_framerate.h.

Uint32 framecount

Definition at line 63 of file SDL2_framerate.h.

Uint32 lastticks

Definition at line 66 of file SDL2_framerate.h.

Uint32 rate

Definition at line 67 of file SDL2_framerate.h.

float rateticks

Definition at line 64 of file SDL2_framerate.h.


The documentation for this struct was generated from the following file:
SDL2_gfx-1.0.4/Docs/html/struct_s_d_l2__gfx_bresenham_iterator.html100777 0 0 25141 12632323332 20455 0 SDL2_gfx: SDL2_gfxBresenhamIterator Struct Reference
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
SDL2_gfxBresenhamIterator Struct Reference

The structure passed to the internal Bresenham iterator. More...

Data Fields

Sint16 x
 
Sint16 y
 
int dx
 
int dy
 
int s1
 
int s2
 
int swapdir
 
int error
 
Uint32 count
 

Detailed Description

The structure passed to the internal Bresenham iterator.

Definition at line 44 of file SDL2_gfxPrimitives.c.

Field Documentation

Uint32 count

Definition at line 47 of file SDL2_gfxPrimitives.c.

int dx

Definition at line 46 of file SDL2_gfxPrimitives.c.

int dy

Definition at line 46 of file SDL2_gfxPrimitives.c.

int error

Definition at line 46 of file SDL2_gfxPrimitives.c.

int s1

Definition at line 46 of file SDL2_gfxPrimitives.c.

int s2

Definition at line 46 of file SDL2_gfxPrimitives.c.

int swapdir

Definition at line 46 of file SDL2_gfxPrimitives.c.

Sint16 x

Definition at line 45 of file SDL2_gfxPrimitives.c.

Sint16 y

Definition at line 45 of file SDL2_gfxPrimitives.c.


The documentation for this struct was generated from the following file:
SDL2_gfx-1.0.4/Docs/html/struct_s_d_l2__gfx_murphy_iterator.html100777 0 0 45632 12632323332 20044 0 SDL2_gfx: SDL2_gfxMurphyIterator Struct Reference
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
SDL2_gfxMurphyIterator Struct Reference

The structure passed to the internal Murphy iterator. More...

Data Fields

SDL_Renderer * renderer
 
int u
 
int v
 
int ku
 
int kt
 
int kv
 
int kd
 
int oct2
 
int quad4
 
Sint16 last1x
 
Sint16 last1y
 
Sint16 last2x
 
Sint16 last2y
 
Sint16 first1x
 
Sint16 first1y
 
Sint16 first2x
 
Sint16 first2y
 
Sint16 tempx
 
Sint16 tempy
 

Detailed Description

The structure passed to the internal Murphy iterator.

Definition at line 53 of file SDL2_gfxPrimitives.c.

Field Documentation

Sint16 first1x

Definition at line 59 of file SDL2_gfxPrimitives.c.

Sint16 first1y

Definition at line 59 of file SDL2_gfxPrimitives.c.

Sint16 first2x

Definition at line 59 of file SDL2_gfxPrimitives.c.

Sint16 first2y

Definition at line 59 of file SDL2_gfxPrimitives.c.

int kd

Definition at line 56 of file SDL2_gfxPrimitives.c.

int kt

Definition at line 56 of file SDL2_gfxPrimitives.c.

int ku

Definition at line 56 of file SDL2_gfxPrimitives.c.

int kv

Definition at line 56 of file SDL2_gfxPrimitives.c.

Sint16 last1x

Definition at line 59 of file SDL2_gfxPrimitives.c.

Sint16 last1y

Definition at line 59 of file SDL2_gfxPrimitives.c.

Sint16 last2x

Definition at line 59 of file SDL2_gfxPrimitives.c.

Sint16 last2y

Definition at line 59 of file SDL2_gfxPrimitives.c.

int oct2

Definition at line 57 of file SDL2_gfxPrimitives.c.

int quad4

Definition at line 58 of file SDL2_gfxPrimitives.c.

SDL_Renderer* renderer

Definition at line 54 of file SDL2_gfxPrimitives.c.

Sint16 tempx

Definition at line 59 of file SDL2_gfxPrimitives.c.

Sint16 tempy

Definition at line 59 of file SDL2_gfxPrimitives.c.

int u

Definition at line 55 of file SDL2_gfxPrimitives.c.

int v

Definition at line 55 of file SDL2_gfxPrimitives.c.


The documentation for this struct was generated from the following file:
SDL2_gfx-1.0.4/Docs/html/tabs.css100777 0 0 2213 12632323332 11477 0.tabs, .tabs2, .tabs3 { background-image: url('tab_b.png'); width: 100%; z-index: 101; font-size: 13px; font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; } .tabs2 { font-size: 10px; } .tabs3 { font-size: 9px; } .tablist { margin: 0; padding: 0; display: table; } .tablist li { float: left; display: table-cell; background-image: url('tab_b.png'); line-height: 36px; list-style: none; } .tablist a { display: block; padding: 0 20px; font-weight: bold; background-image:url('tab_s.png'); background-repeat:no-repeat; background-position:right; color: #283A5D; text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); text-decoration: none; outline: none; } .tabs3 .tablist a { padding: 0 10px; } .tablist a:hover { background-image: url('tab_h.png'); background-repeat:repeat-x; color: #fff; text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); text-decoration: none; } .tablist li.current a { background-image: url('tab_a.png'); background-repeat:repeat-x; color: #fff; text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); } SDL2_gfx-1.0.4/Docs/html/tab_a.png100777 0 0 216 12632323332 11571 0PNG  IHDR$[UIDATxK 0C'o([Ž%x#٩ We# 3t I 3+E~\D9wM}Y_A4Y}IENDB`SDL2_gfx-1.0.4/Docs/html/tab_b.png100777 0 0 251 12632323332 11571 0PNG  IHDR$[pIDATxM EǻԸu`V0}:t]Ds䮂u|x>1&m8SxLU޲iEOsnxKN~jIENDB`SDL2_gfx-1.0.4/Docs/html/tab_h.png100777 0 0 261 12632323332 11600 0PNG  IHDR$[xIDATxM@~ΒEv"!d*rGq={SݧH uO^[_Xvyұ=VCff{R%_rug(?gh\i>|sIENDB`SDL2_gfx-1.0.4/Docs/html/tab_s.png100777 0 0 270 12632323332 11613 0PNG  IHDR$[IDATx݁ @@ѣ?Q"%If6[HQ<]dr s?O=w'F -~rÍ[芭m֬ݯнF)Y% `n,9B!ь\<#IENDB`SDL2_gfx-1.0.4/Docs/html/_r_e_a_d_m_e.html100777 0 0 4254 12632323332 13260 0 SDL2_gfx: /cygdrive/i/Sources/sdl2gfx/README File Reference
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
/cygdrive/i/Sources/sdl2gfx/README File Reference
SDL2_gfx-1.0.4/Docs/html/_r_e_a_d_m_e_source.html100777 0 0 31642 12632323332 14661 0 SDL2_gfx: /cygdrive/i/Sources/sdl2gfx/README Source File
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
/cygdrive/i/Sources/sdl2gfx/README
Go to the documentation of this file.
1 /*!
2 
3 \mainpage SDL2_gfx - Graphics primitives and surface functions for SDL2
4 
5 \section contact_sec Contact and License
6 
7 Email aschiffler at ferzkopp dot net to contact the author
8 or better check author's homepage at http://www.ferzkopp.net
9 for the most up-to-date contact information.
10 
11 This library is licenced under the zlib License, see the file LICENSE for details.
12 
13 
14 \section intro_sec Introduction
15 
16 The SDL2_gfx library provides the basic drawing functions such as lines,
17 circles or polygons provided by SDL_gfx on SDL2 against renderers of SDL2.
18 
19 The current components of the SDL2_gfx library are:
20 - Graphic Primitives (SDL2_gfxPrimitives.h, SDL2_gfxPrimitives.c)
21 - Surface Rotozoomer (SDL2_rotozoom.h, SDL2_rotozoom.c)
22 - Framerate control (SDL2_framerate.h, SDL2_framerate.c)
23 - MMX image filters (SDL2_imageFilter.h, SDL2_imageFilter.c)
24 - Build-in 8x8 Font (SDL2_gfxPrimitives_font.h)
25 
26 Note that SDL2_gfx is compatible with SDL version 2.0 (not SDL 1.2).
27 
28 \section install_sec Installation
29 
30 \subsection unix Unix/Linux
31 
32 Use the standard autoconf/automake sequence to compile and install the library.
33 \verbatim
34  ./autogen.sh # (optional, recommended)
35  ./configure
36  make
37  make install
38 \endverbatim
39 
40 \\subsubsection nommx Linker Configuration
41 
42 The default location for the installation is /usr/local/lib and /usr/local/include.
43 This libary path may need to be added to the file the linker configuration file:
44 \verbatim
45  vi /etc/ld.so.conf
46  ldconfig
47 \endverbatim
48 
49 \\subsubsection nommx Non-MMX Platforms
50 
51 To build without MMX code enabled (i.e. ARM, PPC, AMD64 architectures):
52 \verbatim
53  ./configure --disable-mmx
54  make
55  make install
56 \endverbatim
57 
58 \subsection visualstudio Windows (VS2012, VS2013)
59 
60 Open the SDL2_gfx.sln solution file, right click on the solution and choose 'Rebuild'.
61 
62 The SDL2 Visual Studio solution must be placed in a directory alongside SDL2_gfx and build in the same configuration, i.e. Debug or Release, beforehand so the referenced SDL2.lib file can be found.
63 
64 \subsection platformosx Mac OSX
65 
66 The usual autotools build chain should be used. MacPorts or fink may be required.
67 
68 Xcode is supported via templates. See Xcode.zip - this template only supports SDL2_gfx
69 and not the tests. For this template, the Deployment Target (the lowest version to run on)
70 is set to 10.11 and expects the SDL2.framework preinstalled in the default location: /Library/Frameworks.
71 
72 \section test_sec Test Programs
73 
74 Change to the ./test directory and run
75 \verbatim
76  ./autogen.sh
77  ./configure
78  make
79 \endverbatim
80 to create several test programs for the libraries functions. This requires
81 the SDL2_gfx library to be previously compiled and installed.
82 
83 See the source in the test/*.c files for some sample code and implementation hints.
84 
85 \section documentation_sec Documentation
86 
87 Please refer to the Doxygen-generated API documentation found in the
88 Docs/html folder as well as the test programs in the test folder.
89 
90 \section changelog_sec Change Log
91 
92 \verbinclude ChangeLog
93 
94 */
SDL2_gfx-1.0.4/Docs/html/_s_d_l2__framerate_8c.html100777 0 0 32121 12632323332 15023 0 SDL2_gfx: /cygdrive/i/Sources/sdl2gfx/SDL2_framerate.c File Reference
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
/cygdrive/i/Sources/sdl2gfx/SDL2_framerate.c File Reference
#include "SDL2_framerate.h"

Go to the source code of this file.

Functions

Uint32 _getTicks ()
 Internal wrapper to SDL_GetTicks that ensures a non-zero return value. More...
 
void SDL_initFramerate (FPSmanager *manager)
 Initialize the framerate manager. More...
 
int SDL_setFramerate (FPSmanager *manager, Uint32 rate)
 Set the framerate in Hz. More...
 
int SDL_getFramerate (FPSmanager *manager)
 Return the current target framerate in Hz. More...
 
int SDL_getFramecount (FPSmanager *manager)
 Return the current framecount. More...
 
Uint32 SDL_framerateDelay (FPSmanager *manager)
 Delay execution to maintain a constant framerate and calculate fps. More...
 

Function Documentation

Uint32 _getTicks ( )

Internal wrapper to SDL_GetTicks that ensures a non-zero return value.

Returns
The tick count.

Definition at line 37 of file SDL2_framerate.c.

Uint32 SDL_framerateDelay ( FPSmanager manager)

Delay execution to maintain a constant framerate and calculate fps.

Generate a delay to accomodate currently set framerate. Call once in the graphics/rendering loop. If the computer cannot keep up with the rate (i.e. drawing too slow), the delay is zero and the delay interpolation is reset.

Parameters
managerPointer to the framerate manager.
Returns
The time that passed since the last call to the function in ms. May return 0.

Definition at line 146 of file SDL2_framerate.c.

int SDL_getFramecount ( FPSmanager manager)

Return the current framecount.

Get the current framecount from the framerate manager. A frame is counted each time SDL_framerateDelay is called.

Parameters
managerPointer to the framerate manager.
Returns
Current frame count or -1 for error.

Definition at line 126 of file SDL2_framerate.c.

int SDL_getFramerate ( FPSmanager manager)

Return the current target framerate in Hz.

Get the currently set framerate of the manager.

Parameters
managerPointer to the framerate manager.
Returns
Current framerate in Hz or -1 for error.

Definition at line 107 of file SDL2_framerate.c.

void SDL_initFramerate ( FPSmanager manager)

Initialize the framerate manager.

Initialize the framerate manager, set default framerate of 30Hz and reset delay interpolation.

Parameters
managerPointer to the framerate manager.

Definition at line 62 of file SDL2_framerate.c.

int SDL_setFramerate ( FPSmanager manager,
Uint32  rate 
)

Set the framerate in Hz.

Sets a new framerate for the manager and reset delay interpolation. Rate values must be between FPS_LOWER_LIMIT and FPS_UPPER_LIMIT inclusive to be accepted.

Parameters
managerPointer to the framerate manager.
rateThe new framerate in Hz (frames per second).
Returns
0 for sucess and -1 for error.

Definition at line 86 of file SDL2_framerate.c.

SDL2_gfx-1.0.4/Docs/html/_s_d_l2__framerate_8c_source.html100777 0 0 72401 12632323332 16410 0 SDL2_gfx: /cygdrive/i/Sources/sdl2gfx/SDL2_framerate.c Source File
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
/cygdrive/i/Sources/sdl2gfx/SDL2_framerate.c
Go to the documentation of this file.
1 /*
2 
3 SDL2_framerate.c: framerate manager
4 
5 Copyright (C) 2012-2014 Andreas Schiffler
6 
7 This software is provided 'as-is', without any express or implied
8 warranty. In no event will the authors be held liable for any damages
9 arising from the use of this software.
10 
11 Permission is granted to anyone to use this software for any purpose,
12 including commercial applications, and to alter it and redistribute it
13 freely, subject to the following restrictions:
14 
15 1. The origin of this software must not be misrepresented; you must not
16 claim that you wrote the original software. If you use this software
17 in a product, an acknowledgment in the product documentation would be
18 appreciated but is not required.
19 
20 2. Altered source versions must be plainly marked as such, and must not be
21 misrepresented as being the original software.
22 
23 3. This notice may not be removed or altered from any source
24 distribution.
25 
26 Andreas Schiffler -- aschiffler at ferzkopp dot net
27 
28 */
29 
30 #include "SDL2_framerate.h"
31 
37 Uint32 _getTicks()
38 {
39  Uint32 ticks = SDL_GetTicks();
40 
41  /*
42  * Since baseticks!=0 is used to track initialization
43  * we need to ensure that the tick count is always >0
44  * since SDL_GetTicks may not have incremented yet and
45  * return 0 depending on the timing of the calls.
46  */
47  if (ticks == 0) {
48  return 1;
49  } else {
50  return ticks;
51  }
52 }
53 
63 {
64  /*
65  * Store some sane values
66  */
67  manager->framecount = 0;
68  manager->rate = FPS_DEFAULT;
69  manager->rateticks = (1000.0f / (float) FPS_DEFAULT);
70  manager->baseticks = _getTicks();
71  manager->lastticks = manager->baseticks;
72 
73 }
74 
86 int SDL_setFramerate(FPSmanager * manager, Uint32 rate)
87 {
88  if ((rate >= FPS_LOWER_LIMIT) && (rate <= FPS_UPPER_LIMIT)) {
89  manager->framecount = 0;
90  manager->rate = rate;
91  manager->rateticks = (1000.0f / (float) rate);
92  return (0);
93  } else {
94  return (-1);
95  }
96 }
97 
108 {
109  if (manager == NULL) {
110  return (-1);
111  } else {
112  return ((int)manager->rate);
113  }
114 }
115 
127 {
128  if (manager == NULL) {
129  return (-1);
130  } else {
131  return ((int)manager->framecount);
132  }
133 }
134 
147 {
148  Uint32 current_ticks;
149  Uint32 target_ticks;
150  Uint32 the_delay;
151  Uint32 time_passed = 0;
152 
153  /*
154  * No manager, no delay
155  */
156  if (manager == NULL) {
157  return 0;
158  }
159 
160  /*
161  * Initialize uninitialized manager
162  */
163  if (manager->baseticks == 0) {
164  SDL_initFramerate(manager);
165  }
166 
167  /*
168  * Next frame
169  */
170  manager->framecount++;
171 
172  /*
173  * Get/calc ticks
174  */
175  current_ticks = _getTicks();
176  time_passed = current_ticks - manager->lastticks;
177  manager->lastticks = current_ticks;
178  target_ticks = manager->baseticks + (Uint32) ((float) manager->framecount * manager->rateticks);
179 
180  if (current_ticks <= target_ticks) {
181  the_delay = target_ticks - current_ticks;
182  SDL_Delay(the_delay);
183  } else {
184  manager->framecount = 0;
185  manager->baseticks = _getTicks();
186  }
187 
188  return time_passed;
189 }
Uint32 framecount
Uint32 lastticks
Structure holding the state and timing information of the framerate controller.
Uint32 SDL_framerateDelay(FPSmanager *manager)
Delay execution to maintain a constant framerate and calculate fps.
#define FPS_UPPER_LIMIT
Highest possible rate supported by framerate controller in Hz (1/s).
Uint32 _getTicks()
Internal wrapper to SDL_GetTicks that ensures a non-zero return value.
#define FPS_DEFAULT
Default rate of framerate controller in Hz (1/s).
float rateticks
void SDL_initFramerate(FPSmanager *manager)
Initialize the framerate manager.
int SDL_getFramerate(FPSmanager *manager)
Return the current target framerate in Hz.
Uint32 baseticks
int SDL_setFramerate(FPSmanager *manager, Uint32 rate)
Set the framerate in Hz.
int SDL_getFramecount(FPSmanager *manager)
Return the current framecount.
#define FPS_LOWER_LIMIT
Lowest possible rate supported by framerate controller in Hz (1/s).
SDL2_gfx-1.0.4/Docs/html/_s_d_l2__framerate_8h.html100777 0 0 44153 12632323332 15040 0 SDL2_gfx: /cygdrive/i/Sources/sdl2gfx/SDL2_framerate.h File Reference
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
/cygdrive/i/Sources/sdl2gfx/SDL2_framerate.h File Reference
#include "SDL.h"

Go to the source code of this file.

Data Structures

struct  FPSmanager
 Structure holding the state and timing information of the framerate controller. More...
 

Macros

#define FPS_UPPER_LIMIT   200
 Highest possible rate supported by framerate controller in Hz (1/s). More...
 
#define FPS_LOWER_LIMIT   1
 Lowest possible rate supported by framerate controller in Hz (1/s). More...
 
#define FPS_DEFAULT   30
 Default rate of framerate controller in Hz (1/s). More...
 
#define SDL2_FRAMERATE_SCOPE   extern
 

Functions

SDL2_FRAMERATE_SCOPE void SDL_initFramerate (FPSmanager *manager)
 Initialize the framerate manager. More...
 
SDL2_FRAMERATE_SCOPE int SDL_setFramerate (FPSmanager *manager, Uint32 rate)
 Set the framerate in Hz. More...
 
SDL2_FRAMERATE_SCOPE int SDL_getFramerate (FPSmanager *manager)
 Return the current target framerate in Hz. More...
 
SDL2_FRAMERATE_SCOPE int SDL_getFramecount (FPSmanager *manager)
 Return the current framecount. More...
 
SDL2_FRAMERATE_SCOPE Uint32 SDL_framerateDelay (FPSmanager *manager)
 Delay execution to maintain a constant framerate and calculate fps. More...
 

Macro Definition Documentation

#define FPS_DEFAULT   30

Default rate of framerate controller in Hz (1/s).

Definition at line 57 of file SDL2_framerate.h.

#define FPS_LOWER_LIMIT   1

Lowest possible rate supported by framerate controller in Hz (1/s).

Definition at line 52 of file SDL2_framerate.h.

#define FPS_UPPER_LIMIT   200

Highest possible rate supported by framerate controller in Hz (1/s).

Definition at line 47 of file SDL2_framerate.h.

#define SDL2_FRAMERATE_SCOPE   extern

Definition at line 82 of file SDL2_framerate.h.

Function Documentation

SDL2_FRAMERATE_SCOPE Uint32 SDL_framerateDelay ( FPSmanager manager)

Delay execution to maintain a constant framerate and calculate fps.

Generate a delay to accomodate currently set framerate. Call once in the graphics/rendering loop. If the computer cannot keep up with the rate (i.e. drawing too slow), the delay is zero and the delay interpolation is reset.

Parameters
managerPointer to the framerate manager.
Returns
The time that passed since the last call to the function in ms. May return 0.

Definition at line 146 of file SDL2_framerate.c.

SDL2_FRAMERATE_SCOPE int SDL_getFramecount ( FPSmanager manager)

Return the current framecount.

Get the current framecount from the framerate manager. A frame is counted each time SDL_framerateDelay is called.

Parameters
managerPointer to the framerate manager.
Returns
Current frame count or -1 for error.

Definition at line 126 of file SDL2_framerate.c.

SDL2_FRAMERATE_SCOPE int SDL_getFramerate ( FPSmanager manager)

Return the current target framerate in Hz.

Get the currently set framerate of the manager.

Parameters
managerPointer to the framerate manager.
Returns
Current framerate in Hz or -1 for error.

Definition at line 107 of file SDL2_framerate.c.

SDL2_FRAMERATE_SCOPE void SDL_initFramerate ( FPSmanager manager)

Initialize the framerate manager.

Initialize the framerate manager, set default framerate of 30Hz and reset delay interpolation.

Parameters
managerPointer to the framerate manager.

Definition at line 62 of file SDL2_framerate.c.

SDL2_FRAMERATE_SCOPE int SDL_setFramerate ( FPSmanager manager,
Uint32  rate 
)

Set the framerate in Hz.

Sets a new framerate for the manager and reset delay interpolation. Rate values must be between FPS_LOWER_LIMIT and FPS_UPPER_LIMIT inclusive to be accepted.

Parameters
managerPointer to the framerate manager.
rateThe new framerate in Hz (frames per second).
Returns
0 for sucess and -1 for error.

Definition at line 86 of file SDL2_framerate.c.

SDL2_gfx-1.0.4/Docs/html/_s_d_l2__framerate_8h_source.html100777 0 0 52413 12632323332 16416 0 SDL2_gfx: /cygdrive/i/Sources/sdl2gfx/SDL2_framerate.h Source File
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
/cygdrive/i/Sources/sdl2gfx/SDL2_framerate.h
Go to the documentation of this file.
1 /*
2 
3 SDL2_framerate.h: framerate manager
4 
5 Copyright (C) 2012-2014 Andreas Schiffler
6 
7 This software is provided 'as-is', without any express or implied
8 warranty. In no event will the authors be held liable for any damages
9 arising from the use of this software.
10 
11 Permission is granted to anyone to use this software for any purpose,
12 including commercial applications, and to alter it and redistribute it
13 freely, subject to the following restrictions:
14 
15 1. The origin of this software must not be misrepresented; you must not
16 claim that you wrote the original software. If you use this software
17 in a product, an acknowledgment in the product documentation would be
18 appreciated but is not required.
19 
20 2. Altered source versions must be plainly marked as such, and must not be
21 misrepresented as being the original software.
22 
23 3. This notice may not be removed or altered from any source
24 distribution.
25 
26 Andreas Schiffler -- aschiffler at ferzkopp dot net
27 
28 */
29 
30 #ifndef _SDL2_framerate_h
31 #define _SDL2_framerate_h
32 
33 /* Set up for C function definitions, even when using C++ */
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38  /* --- */
39 
40 #include "SDL.h"
41 
42  /* --------- Definitions */
43 
47 #define FPS_UPPER_LIMIT 200
48 
52 #define FPS_LOWER_LIMIT 1
53 
57 #define FPS_DEFAULT 30
58 
62  typedef struct {
63  Uint32 framecount;
64  float rateticks;
65  Uint32 baseticks;
66  Uint32 lastticks;
67  Uint32 rate;
68  } FPSmanager;
69 
70  /* ---- Function Prototypes */
71 
72 #ifdef _MSC_VER
73 # if defined(DLL_EXPORT) && !defined(LIBSDL2_GFX_DLL_IMPORT)
74 # define SDL2_FRAMERATE_SCOPE __declspec(dllexport)
75 # else
76 # ifdef LIBSDL2_GFX_DLL_IMPORT
77 # define SDL2_FRAMERATE_SCOPE __declspec(dllimport)
78 # endif
79 # endif
80 #endif
81 #ifndef SDL2_FRAMERATE_SCOPE
82 # define SDL2_FRAMERATE_SCOPE extern
83 #endif
84 
85  /* Functions return 0 or value for sucess and -1 for error */
86 
88  SDL2_FRAMERATE_SCOPE int SDL_setFramerate(FPSmanager * manager, Uint32 rate);
92 
93  /* --- */
94 
95  /* Ends C function definitions when using C++ */
96 #ifdef __cplusplus
97 }
98 #endif
99 
100 #endif /* _SDL2_framerate_h */
SDL2_FRAMERATE_SCOPE void SDL_initFramerate(FPSmanager *manager)
Initialize the framerate manager.
SDL2_FRAMERATE_SCOPE int SDL_getFramerate(FPSmanager *manager)
Return the current target framerate in Hz.
SDL2_FRAMERATE_SCOPE int SDL_setFramerate(FPSmanager *manager, Uint32 rate)
Set the framerate in Hz.
Uint32 framecount
Uint32 lastticks
Structure holding the state and timing information of the framerate controller.
float rateticks
SDL2_FRAMERATE_SCOPE int SDL_getFramecount(FPSmanager *manager)
Return the current framecount.
SDL2_FRAMERATE_SCOPE Uint32 SDL_framerateDelay(FPSmanager *manager)
Delay execution to maintain a constant framerate and calculate fps.
#define SDL2_FRAMERATE_SCOPE
Uint32 baseticks
SDL2_gfx-1.0.4/Docs/html/_s_d_l2__gfx_primitives_8c.html100777 0 0 1012611 12632323332 16157 0 SDL2_gfx: /cygdrive/i/Sources/sdl2gfx/SDL2_gfxPrimitives.c File Reference
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
/cygdrive/i/Sources/sdl2gfx/SDL2_gfxPrimitives.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include "SDL2_gfxPrimitives.h"
#include "SDL2_rotozoom.h"
#include "SDL2_gfxPrimitives_font.h"

Go to the source code of this file.

Data Structures

struct  SDL2_gfxBresenhamIterator
 The structure passed to the internal Bresenham iterator. More...
 
struct  SDL2_gfxMurphyIterator
 The structure passed to the internal Murphy iterator. More...
 

Macros

#define AAlevels   256
 
#define AAbits   8
 
#define ELLIPSE_OVERSCAN   4
 Internal function to draw ellipse or filled ellipse with blending. More...
 

Functions

int pixel (SDL_Renderer *renderer, Sint16 x, Sint16 y)
 Draw pixel in currently set color. More...
 
int pixelColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, Uint32 color)
 Draw pixel with blending enabled if a<255. More...
 
int pixelRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw pixel with blending enabled if a<255. More...
 
int pixelRGBAWeight (SDL_Renderer *renderer, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a, Uint32 weight)
 Draw pixel with blending enabled and using alpha weight on color. More...
 
int hline (SDL_Renderer *renderer, Sint16 x1, Sint16 x2, Sint16 y)
 Draw horizontal line in currently set color. More...
 
int hlineColor (SDL_Renderer *renderer, Sint16 x1, Sint16 x2, Sint16 y, Uint32 color)
 Draw horizontal line with blending. More...
 
int hlineRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 x2, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw horizontal line with blending. More...
 
int vline (SDL_Renderer *renderer, Sint16 x, Sint16 y1, Sint16 y2)
 Draw vertical line in currently set color. More...
 
int vlineColor (SDL_Renderer *renderer, Sint16 x, Sint16 y1, Sint16 y2, Uint32 color)
 Draw vertical line with blending. More...
 
int vlineRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y1, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw vertical line with blending. More...
 
int rectangleColor (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
 Draw rectangle with blending. More...
 
int rectangleRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw rectangle with blending. More...
 
int roundedRectangleColor (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint32 color)
 Draw rounded-corner rectangle with blending. More...
 
int roundedRectangleRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw rounded-corner rectangle with blending. More...
 
int roundedBoxColor (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint32 color)
 Draw rounded-corner box (filled rectangle) with blending. More...
 
int roundedBoxRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw rounded-corner box (filled rectangle) with blending. More...
 
int boxColor (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
 Draw box (filled rectangle) with blending. More...
 
int boxRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw box (filled rectangle) with blending. More...
 
int line (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2)
 Draw line with alpha blending using the currently set color. More...
 
int lineColor (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
 Draw line with alpha blending. More...
 
int lineRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw line with alpha blending. More...
 
int _aalineRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a, int draw_endpoint)
 Internal function to draw anti-aliased line with alpha blending and endpoint control. More...
 
int aalineColor (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
 Draw anti-aliased line with alpha blending. More...
 
int aalineRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw anti-aliased line with alpha blending. More...
 
int circleColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint32 color)
 Draw circle with blending. More...
 
int circleRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw circle with blending. More...
 
int arcColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color)
 Arc with blending. More...
 
int arcRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Arc with blending. More...
 
int aacircleColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint32 color)
 Draw anti-aliased circle with blending. More...
 
int aacircleRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw anti-aliased circle with blending. More...
 
int _drawQuadrants (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 dx, Sint16 dy, Sint32 f)
 Internal function to draw pixels or lines in 4 quadrants. More...
 
int _ellipseRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a, Sint32 f)
 
int ellipseColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color)
 Draw ellipse with blending. More...
 
int ellipseRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw ellipse with blending. More...
 
int filledCircleColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint32 color)
 Draw filled circle with blending. More...
 
int filledCircleRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw filled circle with blending. More...
 
int aaellipseColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color)
 Draw anti-aliased ellipse with blending. More...
 
int aaellipseRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw anti-aliased ellipse with blending. More...
 
int filledEllipseColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color)
 Draw filled ellipse with blending. More...
 
int filledEllipseRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw filled ellipse with blending. More...
 
int _pieRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a, Uint8 filled)
 Internal float (low-speed) pie-calc implementation by drawing polygons. More...
 
int pieColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color)
 Draw pie (outline) with alpha blending. More...
 
int pieRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw pie (outline) with alpha blending. More...
 
int filledPieColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color)
 Draw filled pie with alpha blending. More...
 
int filledPieRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw filled pie with alpha blending. More...
 
int trigonColor (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color)
 Draw trigon (triangle outline) with alpha blending. More...
 
int trigonRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw trigon (triangle outline) with alpha blending. More...
 
int aatrigonColor (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color)
 Draw anti-aliased trigon (triangle outline) with alpha blending. More...
 
int aatrigonRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw anti-aliased trigon (triangle outline) with alpha blending. More...
 
int filledTrigonColor (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color)
 Draw filled trigon (triangle) with alpha blending. More...
 
int filledTrigonRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw filled trigon (triangle) with alpha blending. More...
 
int polygonColor (SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint32 color)
 Draw polygon with alpha blending. More...
 
int polygon (SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n)
 Draw polygon with the currently set color and blend mode. More...
 
int polygonRGBA (SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw polygon with alpha blending. More...
 
int aapolygonColor (SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint32 color)
 Draw anti-aliased polygon with alpha blending. More...
 
int aapolygonRGBA (SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw anti-aliased polygon with alpha blending. More...
 
int _gfxPrimitivesCompareInt (const void *a, const void *b)
 Internal helper qsort callback functions used in filled polygon drawing. More...
 
int filledPolygonRGBAMT (SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a, int **polyInts, int *polyAllocated)
 Draw filled polygon with alpha blending (multi-threaded capable). More...
 
int filledPolygonColor (SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint32 color)
 Draw filled polygon with alpha blending. More...
 
int filledPolygonRGBA (SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw filled polygon with alpha blending. More...
 
int _HLineTextured (SDL_Renderer *renderer, Sint16 x1, Sint16 x2, Sint16 y, SDL_Texture *texture, int texture_w, int texture_h, int texture_dx, int texture_dy)
 Internal function to draw a textured horizontal line. More...
 
int texturedPolygonMT (SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, SDL_Surface *texture, int texture_dx, int texture_dy, int **polyInts, int *polyAllocated)
 Draws a polygon filled with the given texture (Multi-Threading Capable). More...
 
int texturedPolygon (SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, SDL_Surface *texture, int texture_dx, int texture_dy)
 Draws a polygon filled with the given texture. More...
 
void gfxPrimitivesSetFont (const void *fontdata, Uint32 cw, Uint32 ch)
 Sets or resets the current global font data. More...
 
void gfxPrimitivesSetFontRotation (Uint32 rotation)
 Sets current global font character rotation steps. More...
 
int characterRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, char c, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw a character of the currently set font. More...
 
int characterColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, char c, Uint32 color)
 Draw a character of the currently set font. More...
 
int stringColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, const char *s, Uint32 color)
 Draw a string in the currently set font. More...
 
int stringRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, const char *s, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw a string in the currently set font. More...
 
double _evaluateBezier (double *data, int ndata, double t)
 Internal function to calculate bezier interpolator of data array with ndata values at position 't'. More...
 
int bezierColor (SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, int s, Uint32 color)
 Draw a bezier curve with alpha blending. More...
 
int bezierRGBA (SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, int s, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw a bezier curve with alpha blending. More...
 
int thickLineColor (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 width, Uint32 color)
 Draw a thick line with alpha blending. More...
 
int thickLineRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 width, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw a thick line with alpha blending. More...
 

Macro Definition Documentation

#define AAbits   8

Definition at line 857 of file SDL2_gfxPrimitives.c.

#define AAlevels   256

Definition at line 856 of file SDL2_gfxPrimitives.c.

#define ELLIPSE_OVERSCAN   4

Internal function to draw ellipse or filled ellipse with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the ellipse.
yY coordinate of the center of the ellipse.
rxHorizontal radius in pixels of the ellipse.
ryVertical radius in pixels of the ellipse.
rThe red value of the ellipse to draw.
gThe green value of the ellipse to draw.
bThe blue value of the ellipse to draw.
aThe alpha value of the ellipse to draw.
fFlag indicating if the ellipse should be filled (1) or not (0).
Returns
Returns 0 on success, -1 on failure.

Definition at line 1529 of file SDL2_gfxPrimitives.c.

Function Documentation

int _aalineRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a,
int  draw_endpoint 
)

Internal function to draw anti-aliased line with alpha blending and endpoint control.

This implementation of the Wu antialiasing code is based on Mike Abrash's DDJ article which was reprinted as Chapter 42 of his Graphics Programming Black Book, but has been optimized to work with SDL and utilizes 32-bit fixed-point arithmetic by A. Schiffler. The endpoint control allows the supression to draw the last pixel useful for rendering continous aa-lines with alpha<255.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the aa-line.
y1Y coordinate of the first point of the aa-line.
x2X coordinate of the second point of the aa-line.
y2Y coordinate of the second point of the aa-line.
rThe red value of the aa-line to draw.
gThe green value of the aa-line to draw.
bThe blue value of the aa-line to draw.
aThe alpha value of the aa-line to draw.
draw_endpointFlag indicating if the endpoint should be drawn; draw if non-zero.
Returns
Returns 0 on success, -1 on failure.

Definition at line 882 of file SDL2_gfxPrimitives.c.

int _drawQuadrants ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  dx,
Sint16  dy,
Sint32  f 
)

Internal function to draw pixels or lines in 4 quadrants.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the quadrant.
yY coordinate of the center of the quadrant.
dxX offset in pixels of the corners of the quadrant.
dyY offset in pixels of the corners of the quadrant.
fFlag indicating if the quadrant should be filled (1) or not (0).
Returns
Returns 0 on success, -1 on failure.

Definition at line 1475 of file SDL2_gfxPrimitives.c.

int _ellipseRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rx,
Sint16  ry,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a,
Sint32  f 
)

Definition at line 1530 of file SDL2_gfxPrimitives.c.

double _evaluateBezier ( double *  data,
int  ndata,
double  t 
)

Internal function to calculate bezier interpolator of data array with ndata values at position 't'.

Parameters
dataArray of values.
ndataSize of array.
tPosition for which to calculate interpolated value. t should be between [0, ndata].
Returns
Interpolated value at position t, value[0] when t<0, value[n-1] when t>n.

Definition at line 3556 of file SDL2_gfxPrimitives.c.

int _gfxPrimitivesCompareInt ( const void *  a,
const void *  b 
)

Internal helper qsort callback functions used in filled polygon drawing.

Parameters
aThe surface to draw on.
bVertex array containing X coordinates of the points of the polygon.
Returns
Returns 0 if a==b, a negative number if a<b or a positive number if a>b.

Definition at line 2674 of file SDL2_gfxPrimitives.c.

int _HLineTextured ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  x2,
Sint16  y,
SDL_Texture *  texture,
int  texture_w,
int  texture_h,
int  texture_dx,
int  texture_dy 
)

Internal function to draw a textured horizontal line.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point (i.e. left) of the line.
x2X coordinate of the second point (i.e. right) of the line.
yY coordinate of the points of the line.
textureThe texture to retrieve color information from.
texture_wThe width of the texture.
texture_hThe height of the texture.
texture_dxThe X offset for the texture lookup.
texture_dyThe Y offset for the textured lookup.
Returns
Returns 0 on success, -1 on failure.

Definition at line 2921 of file SDL2_gfxPrimitives.c.

int _pieRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Sint16  start,
Sint16  end,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a,
Uint8  filled 
)

Internal float (low-speed) pie-calc implementation by drawing polygons.

Note: Determines vertex array and uses polygon or filledPolygon drawing routines to render.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the pie.
yY coordinate of the center of the pie.
radRadius in pixels of the pie.
startStarting radius in degrees of the pie.
endEnding radius in degrees of the pie.
rThe red value of the pie to draw.
gThe green value of the pie to draw.
bThe blue value of the pie to draw.
aThe alpha value of the pie to draw.
filledFlag indicating if the pie should be filled (=1) or not (=0).
Returns
Returns 0 on success, -1 on failure.

Definition at line 2055 of file SDL2_gfxPrimitives.c.

int aacircleColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Uint32  color 
)

Draw anti-aliased circle with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the aa-circle.
yY coordinate of the center of the aa-circle.
radRadius in pixels of the aa-circle.
colorThe color value of the aa-circle to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 1433 of file SDL2_gfxPrimitives.c.

int aacircleRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw anti-aliased circle with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the aa-circle.
yY coordinate of the center of the aa-circle.
radRadius in pixels of the aa-circle.
rThe red value of the aa-circle to draw.
gThe green value of the aa-circle to draw.
bThe blue value of the aa-circle to draw.
aThe alpha value of the aa-circle to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 1453 of file SDL2_gfxPrimitives.c.

int aaellipseColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rx,
Sint16  ry,
Uint32  color 
)

Draw anti-aliased ellipse with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the aa-ellipse.
yY coordinate of the center of the aa-ellipse.
rxHorizontal radius in pixels of the aa-ellipse.
ryVertical radius in pixels of the aa-ellipse.
colorThe color value of the aa-ellipse to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 1791 of file SDL2_gfxPrimitives.c.

int aaellipseRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rx,
Sint16  ry,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw anti-aliased ellipse with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the aa-ellipse.
yY coordinate of the center of the aa-ellipse.
rxHorizontal radius in pixels of the aa-ellipse.
ryVertical radius in pixels of the aa-ellipse.
rThe red value of the aa-ellipse to draw.
gThe green value of the aa-ellipse to draw.
bThe blue value of the aa-ellipse to draw.
aThe alpha value of the aa-ellipse to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 1812 of file SDL2_gfxPrimitives.c.

int aalineColor ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint32  color 
)

Draw anti-aliased line with alpha blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the aa-line.
y1Y coordinate of the first point of the aa-line.
x2X coordinate of the second point of the aa-line.
y2Y coordinate of the second point of the aa-line.
colorThe color value of the aa-line to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 1096 of file SDL2_gfxPrimitives.c.

int aalineRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw anti-aliased line with alpha blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the aa-line.
y1Y coordinate of the first point of the aa-line.
x2X coordinate of the second point of the aa-line.
y2Y coordinate of the second point of the aa-line.
rThe red value of the aa-line to draw.
gThe green value of the aa-line to draw.
bThe blue value of the aa-line to draw.
aThe alpha value of the aa-line to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 1117 of file SDL2_gfxPrimitives.c.

int aapolygonColor ( SDL_Renderer *  renderer,
const Sint16 *  vx,
const Sint16 *  vy,
int  n,
Uint32  color 
)

Draw anti-aliased polygon with alpha blending.

Parameters
rendererThe renderer to draw on.
vxVertex array containing X coordinates of the points of the aa-polygon.
vyVertex array containing Y coordinates of the points of the aa-polygon.
nNumber of points in the vertex array. Minimum number is 3.
colorThe color value of the aa-polygon to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 2596 of file SDL2_gfxPrimitives.c.

int aapolygonRGBA ( SDL_Renderer *  renderer,
const Sint16 *  vx,
const Sint16 *  vy,
int  n,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw anti-aliased polygon with alpha blending.

Parameters
rendererThe renderer to draw on.
vxVertex array containing X coordinates of the points of the aa-polygon.
vyVertex array containing Y coordinates of the points of the aa-polygon.
nNumber of points in the vertex array. Minimum number is 3.
rThe red value of the aa-polygon to draw.
gThe green value of the aa-polygon to draw.
bThe blue value of the aa-polygon to draw.
aThe alpha value of the aa-polygon to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 2616 of file SDL2_gfxPrimitives.c.

int aatrigonColor ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  x3,
Sint16  y3,
Uint32  color 
)

Draw anti-aliased trigon (triangle outline) with alpha blending.

Note: Creates vertex array and uses aapolygon routine to render.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the aa-trigon.
y1Y coordinate of the first point of the aa-trigon.
x2X coordinate of the second point of the aa-trigon.
y2Y coordinate of the second point of the aa-trigon.
x3X coordinate of the third point of the aa-trigon.
y3Y coordinate of the third point of the aa-trigon.
colorThe color value of the aa-trigon to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 2324 of file SDL2_gfxPrimitives.c.

int aatrigonRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  x3,
Sint16  y3,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw anti-aliased trigon (triangle outline) with alpha blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the aa-trigon.
y1Y coordinate of the first point of the aa-trigon.
x2X coordinate of the second point of the aa-trigon.
y2Y coordinate of the second point of the aa-trigon.
x3X coordinate of the third point of the aa-trigon.
y3Y coordinate of the third point of the aa-trigon.
rThe red value of the aa-trigon to draw.
gThe green value of the aa-trigon to draw.
bThe blue value of the aa-trigon to draw.
aThe alpha value of the aa-trigon to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 2356 of file SDL2_gfxPrimitives.c.

int arcColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Sint16  start,
Sint16  end,
Uint32  color 
)

Arc with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the arc.
yY coordinate of the center of the arc.
radRadius in pixels of the arc.
startStarting radius in degrees of the arc. 0 degrees is down, increasing counterclockwise.
endEnding radius in degrees of the arc. 0 degrees is down, increasing counterclockwise.
colorThe color value of the arc to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 1175 of file SDL2_gfxPrimitives.c.

int arcRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Sint16  start,
Sint16  end,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Arc with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the arc.
yY coordinate of the center of the arc.
radRadius in pixels of the arc.
startStarting radius in degrees of the arc. 0 degrees is down, increasing counterclockwise.
endEnding radius in degrees of the arc. 0 degrees is down, increasing counterclockwise.
rThe red value of the arc to draw.
gThe green value of the arc to draw.
bThe blue value of the arc to draw.
aThe alpha value of the arc to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 1198 of file SDL2_gfxPrimitives.c.

int bezierColor ( SDL_Renderer *  renderer,
const Sint16 *  vx,
const Sint16 *  vy,
int  n,
int  s,
Uint32  color 
)

Draw a bezier curve with alpha blending.

Parameters
rendererThe renderer to draw on.
vxVertex array containing X coordinates of the points of the bezier curve.
vyVertex array containing Y coordinates of the points of the bezier curve.
nNumber of points in the vertex array. Minimum number is 3.
sNumber of steps for the interpolation. Minimum number is 2.
colorThe color value of the bezier curve to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 3615 of file SDL2_gfxPrimitives.c.

int bezierRGBA ( SDL_Renderer *  renderer,
const Sint16 *  vx,
const Sint16 *  vy,
int  n,
int  s,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw a bezier curve with alpha blending.

Parameters
rendererThe renderer to draw on.
vxVertex array containing X coordinates of the points of the bezier curve.
vyVertex array containing Y coordinates of the points of the bezier curve.
nNumber of points in the vertex array. Minimum number is 3.
sNumber of steps for the interpolation. Minimum number is 2.
rThe red value of the bezier curve to draw.
gThe green value of the bezier curve to draw.
bThe blue value of the bezier curve to draw.
aThe alpha value of the bezier curve to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 3636 of file SDL2_gfxPrimitives.c.

int boxColor ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint32  color 
)

Draw box (filled rectangle) with blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point (i.e. top right) of the box.
y1Y coordinate of the first point (i.e. top right) of the box.
x2X coordinate of the second point (i.e. bottom left) of the box.
y2Y coordinate of the second point (i.e. bottom left) of the box.
colorThe color value of the box to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 710 of file SDL2_gfxPrimitives.c.

int boxRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw box (filled rectangle) with blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point (i.e. top right) of the box.
y1Y coordinate of the first point (i.e. top right) of the box.
x2X coordinate of the second point (i.e. bottom left) of the box.
y2Y coordinate of the second point (i.e. bottom left) of the box.
rThe red value of the box to draw.
gThe green value of the box to draw.
bThe blue value of the box to draw.
aThe alpha value of the box to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 731 of file SDL2_gfxPrimitives.c.

int characterColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
char  c,
Uint32  color 
)

Draw a character of the currently set font.

Parameters
rendererThe renderer to draw on.
xX (horizontal) coordinate of the upper left corner of the character.
yY (vertical) coordinate of the upper left corner of the character.
cThe character to draw.
colorThe color value of the character to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 3474 of file SDL2_gfxPrimitives.c.

int characterRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
char  c,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw a character of the currently set font.

Parameters
rendererThe Renderer to draw on.
xX (horizontal) coordinate of the upper left corner of the character.
yY (vertical) coordinate of the upper left corner of the character.
cThe character to draw.
rThe red value of the character to draw.
gThe green value of the character to draw.
bThe blue value of the character to draw.
aThe alpha value of the character to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 3352 of file SDL2_gfxPrimitives.c.

int circleColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Uint32  color 
)

Draw circle with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the circle.
yY coordinate of the center of the circle.
radRadius in pixels of the circle.
colorThe color value of the circle to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 1135 of file SDL2_gfxPrimitives.c.

int circleRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw circle with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the circle.
yY coordinate of the center of the circle.
radRadius in pixels of the circle.
rThe red value of the circle to draw.
gThe green value of the circle to draw.
bThe blue value of the circle to draw.
aThe alpha value of the circle to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 1155 of file SDL2_gfxPrimitives.c.

int ellipseColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rx,
Sint16  ry,
Uint32  color 
)

Draw ellipse with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the ellipse.
yY coordinate of the center of the ellipse.
rxHorizontal radius in pixels of the ellipse.
ryVertical radius in pixels of the ellipse.
colorThe color value of the ellipse to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 1672 of file SDL2_gfxPrimitives.c.

int ellipseRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rx,
Sint16  ry,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw ellipse with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the ellipse.
yY coordinate of the center of the ellipse.
rxHorizontal radius in pixels of the ellipse.
ryVertical radius in pixels of the ellipse.
rThe red value of the ellipse to draw.
gThe green value of the ellipse to draw.
bThe blue value of the ellipse to draw.
aThe alpha value of the ellipse to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 1693 of file SDL2_gfxPrimitives.c.

int filledCircleColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Uint32  color 
)

Draw filled circle with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the filled circle.
yY coordinate of the center of the filled circle.
radRadius in pixels of the filled circle.
colorThe color value of the filled circle to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 1711 of file SDL2_gfxPrimitives.c.

int filledCircleRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw filled circle with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the filled circle.
yY coordinate of the center of the filled circle.
radRadius in pixels of the filled circle.
rThe red value of the filled circle to draw.
gThe green value of the filled circle to draw.
bThe blue value of the filled circle to draw.
aThe alpha value of the filled circle to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 1731 of file SDL2_gfxPrimitives.c.

int filledEllipseColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rx,
Sint16  ry,
Uint32  color 
)

Draw filled ellipse with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the filled ellipse.
yY coordinate of the center of the filled ellipse.
rxHorizontal radius in pixels of the filled ellipse.
ryVertical radius in pixels of the filled ellipse.
colorThe color value of the filled ellipse to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 2007 of file SDL2_gfxPrimitives.c.

int filledEllipseRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rx,
Sint16  ry,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw filled ellipse with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the filled ellipse.
yY coordinate of the center of the filled ellipse.
rxHorizontal radius in pixels of the filled ellipse.
ryVertical radius in pixels of the filled ellipse.
rThe red value of the filled ellipse to draw.
gThe green value of the filled ellipse to draw.
bThe blue value of the filled ellipse to draw.
aThe alpha value of the filled ellipse to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 2028 of file SDL2_gfxPrimitives.c.

int filledPieColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Sint16  start,
Sint16  end,
Uint32  color 
)

Draw filled pie with alpha blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the filled pie.
yY coordinate of the center of the filled pie.
radRadius in pixels of the filled pie.
startStarting radius in degrees of the filled pie.
endEnding radius in degrees of the filled pie.
colorThe color value of the filled pie to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 2212 of file SDL2_gfxPrimitives.c.

int filledPieRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Sint16  start,
Sint16  end,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw filled pie with alpha blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the filled pie.
yY coordinate of the center of the filled pie.
radRadius in pixels of the filled pie.
startStarting radius in degrees of the filled pie.
endEnding radius in degrees of the filled pie.
rThe red value of the filled pie to draw.
gThe green value of the filled pie to draw.
bThe blue value of the filled pie to draw.
aThe alpha value of the filled pie to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 2234 of file SDL2_gfxPrimitives.c.

int filledPolygonColor ( SDL_Renderer *  renderer,
const Sint16 *  vx,
const Sint16 *  vy,
int  n,
Uint32  color 
)

Draw filled polygon with alpha blending.

Parameters
rendererThe renderer to draw on.
vxVertex array containing X coordinates of the points of the filled polygon.
vyVertex array containing Y coordinates of the points of the filled polygon.
nNumber of points in the vertex array. Minimum number is 3.
colorThe color value of the filled polygon to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 2879 of file SDL2_gfxPrimitives.c.

int filledPolygonRGBA ( SDL_Renderer *  renderer,
const Sint16 *  vx,
const Sint16 *  vy,
int  n,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw filled polygon with alpha blending.

Parameters
rendererThe renderer to draw on.
vxVertex array containing X coordinates of the points of the filled polygon.
vyVertex array containing Y coordinates of the points of the filled polygon.
nNumber of points in the vertex array. Minimum number is 3.
rThe red value of the filled polygon to draw.
gThe green value of the filled polygon to draw.
bThe blue value of the filed polygon to draw.
aThe alpha value of the filled polygon to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 2899 of file SDL2_gfxPrimitives.c.

int filledPolygonRGBAMT ( SDL_Renderer *  renderer,
const Sint16 *  vx,
const Sint16 *  vy,
int  n,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a,
int **  polyInts,
int *  polyAllocated 
)

Draw filled polygon with alpha blending (multi-threaded capable).

Note: The last two parameters are optional; but are required for multithreaded operation.

Parameters
rendererThe renderer to draw on.
vxVertex array containing X coordinates of the points of the filled polygon.
vyVertex array containing Y coordinates of the points of the filled polygon.
nNumber of points in the vertex array. Minimum number is 3.
rThe red value of the filled polygon to draw.
gThe green value of the filled polygon to draw.
bThe blue value of the filled polygon to draw.
aThe alpha value of the filled polygon to draw.
polyIntsPreallocated, temporary vertex array used for sorting vertices. Required for multithreaded operation; set to NULL otherwise.
polyAllocatedFlag indicating if temporary vertex array was allocated. Required for multithreaded operation; set to NULL otherwise.
Returns
Returns 0 on success, -1 on failure.

Definition at line 2711 of file SDL2_gfxPrimitives.c.

int filledTrigonColor ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  x3,
Sint16  y3,
Uint32  color 
)

Draw filled trigon (triangle) with alpha blending.

Note: Creates vertex array and uses aapolygon routine to render.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the filled trigon.
y1Y coordinate of the first point of the filled trigon.
x2X coordinate of the second point of the filled trigon.
y2Y coordinate of the second point of the filled trigon.
x3X coordinate of the third point of the filled trigon.
y3Y coordinate of the third point of the filled trigon.
colorThe color value of the filled trigon to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 2390 of file SDL2_gfxPrimitives.c.

int filledTrigonRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  x3,
Sint16  y3,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw filled trigon (triangle) with alpha blending.

Note: Creates vertex array and uses aapolygon routine to render.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the filled trigon.
y1Y coordinate of the first point of the filled trigon.
x2X coordinate of the second point of the filled trigon.
y2Y coordinate of the second point of the filled trigon.
x3X coordinate of the third point of the filled trigon.
y3Y coordinate of the third point of the filled trigon.
rThe red value of the filled trigon to draw.
gThe green value of the filled trigon to draw.
bThe blue value of the filled trigon to draw.
aThe alpha value of the filled trigon to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 2424 of file SDL2_gfxPrimitives.c.

void gfxPrimitivesSetFont ( const void *  fontdata,
Uint32  cw,
Uint32  ch 
)

Sets or resets the current global font data.

The font data array is organized in follows: [fontdata] = [character 0][character 1]...[character 255] where [character n] = [byte 1 row 1][byte 2 row 1]...[byte {pitch} row 1][byte 1 row 2] ...[byte {pitch} row height] where [byte n] = [bit 0]...[bit 7] where [bit n] = [0 for transparent pixel|1 for colored pixel]

Parameters
fontdataPointer to array of font data. Set to NULL, to reset global font to the default 8x8 font.
cwWidth of character in bytes. Ignored if fontdata==NULL.
chHeight of character in bytes. Ignored if fontdata==NULL.

Definition at line 3260 of file SDL2_gfxPrimitives.c.

void gfxPrimitivesSetFontRotation ( Uint32  rotation)

Sets current global font character rotation steps.

Default is 0 (no rotation). 1 = 90deg clockwise. 2 = 180deg clockwise. 3 = 270deg clockwise. Changing the rotation, will reset the character cache.

Parameters
rotationNumber of 90deg clockwise steps to rotate

Definition at line 3306 of file SDL2_gfxPrimitives.c.

int hline ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  x2,
Sint16  y 
)

Draw horizontal line in currently set color.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point (i.e. left) of the line.
x2X coordinate of the second point (i.e. right) of the line.
yY coordinate of the points of the line.
Returns
Returns 0 on success, -1 on failure.

Definition at line 158 of file SDL2_gfxPrimitives.c.

int hlineColor ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  x2,
Sint16  y,
Uint32  color 
)

Draw horizontal line with blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point (i.e. left) of the line.
x2X coordinate of the second point (i.e. right) of the line.
yY coordinate of the points of the line.
colorThe color value of the line to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 175 of file SDL2_gfxPrimitives.c.

int hlineRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  x2,
Sint16  y,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw horizontal line with blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point (i.e. left) of the line.
x2X coordinate of the second point (i.e. right) of the line.
yY coordinate of the points of the line.
rThe red value of the line to draw.
gThe green value of the line to draw.
bThe blue value of the line to draw.
aThe alpha value of the line to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 195 of file SDL2_gfxPrimitives.c.

int line ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2 
)

Draw line with alpha blending using the currently set color.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the line.
y1Y coordinate of the first point of the line.
x2X coordinate of the second point of the line.
y2Y coordinate of the second point of the line.
Returns
Returns 0 on success, -1 on failure.

Definition at line 801 of file SDL2_gfxPrimitives.c.

int lineColor ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint32  color 
)

Draw line with alpha blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the line.
y1Y coordinate of the first point of the line.
x2X coordinate of the second point of the line.
y2Y coordinate of the seond point of the line.
colorThe color value of the line to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 821 of file SDL2_gfxPrimitives.c.

int lineRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw line with alpha blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the line.
y1Y coordinate of the first point of the line.
x2X coordinate of the second point of the line.
y2Y coordinate of the second point of the line.
rThe red value of the line to draw.
gThe green value of the line to draw.
bThe blue value of the line to draw.
aThe alpha value of the line to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 842 of file SDL2_gfxPrimitives.c.

int pieColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Sint16  start,
Sint16  end,
Uint32  color 
)

Draw pie (outline) with alpha blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the pie.
yY coordinate of the center of the pie.
radRadius in pixels of the pie.
startStarting radius in degrees of the pie.
endEnding radius in degrees of the pie.
colorThe color value of the pie to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 2170 of file SDL2_gfxPrimitives.c.

int pieRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Sint16  start,
Sint16  end,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw pie (outline) with alpha blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the pie.
yY coordinate of the center of the pie.
radRadius in pixels of the pie.
startStarting radius in degrees of the pie.
endEnding radius in degrees of the pie.
rThe red value of the pie to draw.
gThe green value of the pie to draw.
bThe blue value of the pie to draw.
aThe alpha value of the pie to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 2193 of file SDL2_gfxPrimitives.c.

int pixel ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y 
)

Draw pixel in currently set color.

Parameters
rendererThe renderer to draw on.
xX (horizontal) coordinate of the pixel.
yY (vertical) coordinate of the pixel.
Returns
Returns 0 on success, -1 on failure.

Definition at line 73 of file SDL2_gfxPrimitives.c.

int pixelColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Uint32  color 
)

Draw pixel with blending enabled if a<255.

Parameters
rendererThe renderer to draw on.
xX (horizontal) coordinate of the pixel.
yY (vertical) coordinate of the pixel.
colorThe color value of the pixel to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 88 of file SDL2_gfxPrimitives.c.

int pixelRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw pixel with blending enabled if a<255.

Parameters
rendererThe renderer to draw on.
xX (horizontal) coordinate of the pixel.
yY (vertical) coordinate of the pixel.
rThe red color value of the pixel to draw.
gThe green color value of the pixel to draw.
bThe blue color value of the pixel to draw.
aThe alpha value of the pixel to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 107 of file SDL2_gfxPrimitives.c.

int pixelRGBAWeight ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a,
Uint32  weight 
)

Draw pixel with blending enabled and using alpha weight on color.

Parameters
rendererThe renderer to draw on.
xThe horizontal coordinate of the pixel.
yThe vertical position of the pixel.
rThe red color value of the pixel to draw.
gThe green color value of the pixel to draw.
bThe blue color value of the pixel to draw.
aThe alpha value of the pixel to draw.
weightThe weight multiplied into the alpha value of the pixel.
Returns
Returns 0 on success, -1 on failure.

Definition at line 130 of file SDL2_gfxPrimitives.c.

int polygon ( SDL_Renderer *  renderer,
const Sint16 *  vx,
const Sint16 *  vy,
int  n 
)

Draw polygon with the currently set color and blend mode.

Parameters
rendererThe renderer to draw on.
vxVertex array containing X coordinates of the points of the polygon.
vyVertex array containing Y coordinates of the points of the polygon.
nNumber of points in the vertex array. Minimum number is 3.
Returns
Returns 0 on success, -1 on failure.

Definition at line 2469 of file SDL2_gfxPrimitives.c.

int polygonColor ( SDL_Renderer *  renderer,
const Sint16 *  vx,
const Sint16 *  vy,
int  n,
Uint32  color 
)

Draw polygon with alpha blending.

Parameters
rendererThe renderer to draw on.
vxVertex array containing X coordinates of the points of the polygon.
vyVertex array containing Y coordinates of the points of the polygon.
nNumber of points in the vertex array. Minimum number is 3.
colorThe color value of the polygon to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 2453 of file SDL2_gfxPrimitives.c.

int polygonRGBA ( SDL_Renderer *  renderer,
const Sint16 *  vx,
const Sint16 *  vy,
int  n,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw polygon with alpha blending.

Parameters
rendererThe renderer to draw on.
vxVertex array containing X coordinates of the points of the polygon.
vyVertex array containing Y coordinates of the points of the polygon.
nNumber of points in the vertex array. Minimum number is 3.
rThe red value of the polygon to draw.
gThe green value of the polygon to draw.
bThe blue value of the polygon to draw.
aThe alpha value of the polygon to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 2535 of file SDL2_gfxPrimitives.c.

int rectangleColor ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint32  color 
)

Draw rectangle with blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point (i.e. top right) of the rectangle.
y1Y coordinate of the first point (i.e. top right) of the rectangle.
x2X coordinate of the second point (i.e. bottom left) of the rectangle.
y2Y coordinate of the second point (i.e. bottom left) of the rectangle.
colorThe color value of the rectangle to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 275 of file SDL2_gfxPrimitives.c.

int rectangleRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw rectangle with blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point (i.e. top right) of the rectangle.
y1Y coordinate of the first point (i.e. top right) of the rectangle.
x2X coordinate of the second point (i.e. bottom left) of the rectangle.
y2Y coordinate of the second point (i.e. bottom left) of the rectangle.
rThe red value of the rectangle to draw.
gThe green value of the rectangle to draw.
bThe blue value of the rectangle to draw.
aThe alpha value of the rectangle to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 296 of file SDL2_gfxPrimitives.c.

int roundedBoxColor ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  rad,
Uint32  color 
)

Draw rounded-corner box (filled rectangle) with blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point (i.e. top right) of the box.
y1Y coordinate of the first point (i.e. top right) of the box.
x2X coordinate of the second point (i.e. bottom left) of the box.
y2Y coordinate of the second point (i.e. bottom left) of the box.
radThe radius of the corner arcs of the box.
colorThe color value of the box to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 513 of file SDL2_gfxPrimitives.c.

int roundedBoxRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  rad,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw rounded-corner box (filled rectangle) with blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point (i.e. top right) of the box.
y1Y coordinate of the first point (i.e. top right) of the box.
x2X coordinate of the second point (i.e. bottom left) of the box.
y2Y coordinate of the second point (i.e. bottom left) of the box.
radThe radius of the corner arcs of the box.
rThe red value of the box to draw.
gThe green value of the box to draw.
bThe blue value of the box to draw.
aThe alpha value of the box to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 535 of file SDL2_gfxPrimitives.c.

int roundedRectangleColor ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  rad,
Uint32  color 
)

Draw rounded-corner rectangle with blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point (i.e. top right) of the rectangle.
y1Y coordinate of the first point (i.e. top right) of the rectangle.
x2X coordinate of the second point (i.e. bottom left) of the rectangle.
y2Y coordinate of the second point (i.e. bottom left) of the rectangle.
radThe radius of the corner arc.
colorThe color value of the rectangle to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 368 of file SDL2_gfxPrimitives.c.

int roundedRectangleRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  rad,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw rounded-corner rectangle with blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point (i.e. top right) of the rectangle.
y1Y coordinate of the first point (i.e. top right) of the rectangle.
x2X coordinate of the second point (i.e. bottom left) of the rectangle.
y2Y coordinate of the second point (i.e. bottom left) of the rectangle.
radThe radius of the corner arc.
rThe red value of the rectangle to draw.
gThe green value of the rectangle to draw.
bThe blue value of the rectangle to draw.
aThe alpha value of the rectangle to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 390 of file SDL2_gfxPrimitives.c.

int stringColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
const char *  s,
Uint32  color 
)

Draw a string in the currently set font.

The spacing between consequtive characters in the string is the fixed number of pixels of the character width of the current global font.

Parameters
rendererThe renderer to draw on.
xX (horizontal) coordinate of the upper left corner of the string.
yY (vertical) coordinate of the upper left corner of the string.
sThe string to draw.
colorThe color value of the string to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 3495 of file SDL2_gfxPrimitives.c.

int stringRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
const char *  s,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw a string in the currently set font.

Parameters
rendererThe renderer to draw on.
xX (horizontal) coordinate of the upper left corner of the string.
yY (vertical) coordinate of the upper left corner of the string.
sThe string to draw.
rThe red value of the string to draw.
gThe green value of the string to draw.
bThe blue value of the string to draw.
aThe alpha value of the string to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 3515 of file SDL2_gfxPrimitives.c.

int texturedPolygon ( SDL_Renderer *  renderer,
const Sint16 *  vx,
const Sint16 *  vy,
int  n,
SDL_Surface *  texture,
int  texture_dx,
int  texture_dy 
)

Draws a polygon filled with the given texture.

This standard version is calling multithreaded versions with NULL cache parameters.

Parameters
rendererThe renderer to draw on.
vxarray of x vector components
vyarray of x vector components
nthe amount of vectors in the vx and vy array
texturethe sdl surface to use to fill the polygon
texture_dxthe offset of the texture relative to the screeen. if you move the polygon 10 pixels to the left and want the texture to apear the same you need to increase the texture_dx value
texture_dysee texture_dx
Returns
Returns 0 on success, -1 on failure.

Definition at line 3192 of file SDL2_gfxPrimitives.c.

int texturedPolygonMT ( SDL_Renderer *  renderer,
const Sint16 *  vx,
const Sint16 *  vy,
int  n,
SDL_Surface *  texture,
int  texture_dx,
int  texture_dy,
int **  polyInts,
int *  polyAllocated 
)

Draws a polygon filled with the given texture (Multi-Threading Capable).

Parameters
rendererThe renderer to draw on.
vxarray of x vector components
vyarray of x vector components
nthe amount of vectors in the vx and vy array
texturethe sdl surface to use to fill the polygon
texture_dxthe offset of the texture relative to the screeen. If you move the polygon 10 pixels to the left and want the texture to apear the same you need to increase the texture_dx value
texture_dysee texture_dx
polyIntsPreallocated temp array storage for vertex sorting (used for multi-threaded operation)
polyAllocatedFlag indicating oif the temp array was allocated (used for multi-threaded operation)
Returns
Returns 0 on success, -1 on failure.

Definition at line 3020 of file SDL2_gfxPrimitives.c.

int thickLineColor ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint8  width,
Uint32  color 
)

Draw a thick line with alpha blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the line.
y1Y coordinate of the first point of the line.
x2X coordinate of the second point of the line.
y2Y coordinate of the second point of the line.
widthWidth of the line in pixels. Must be >0.
colorThe color value of the line to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 3716 of file SDL2_gfxPrimitives.c.

int thickLineRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint8  width,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw a thick line with alpha blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the line.
y1Y coordinate of the first point of the line.
x2X coordinate of the second point of the line.
y2Y coordinate of the second point of the line.
widthWidth of the line in pixels. Must be >0.
rThe red value of the character to draw.
gThe green value of the character to draw.
bThe blue value of the character to draw.
aThe alpha value of the character to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 3738 of file SDL2_gfxPrimitives.c.

int trigonColor ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  x3,
Sint16  y3,
Uint32  color 
)

Draw trigon (triangle outline) with alpha blending.

Note: Creates vertex array and uses polygon routine to render.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the trigon.
y1Y coordinate of the first point of the trigon.
x2X coordinate of the second point of the trigon.
y2Y coordinate of the second point of the trigon.
x3X coordinate of the third point of the trigon.
y3Y coordinate of the third point of the trigon.
colorThe color value of the trigon to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 2258 of file SDL2_gfxPrimitives.c.

int trigonRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  x3,
Sint16  y3,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw trigon (triangle outline) with alpha blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the trigon.
y1Y coordinate of the first point of the trigon.
x2X coordinate of the second point of the trigon.
y2Y coordinate of the second point of the trigon.
x3X coordinate of the third point of the trigon.
y3Y coordinate of the third point of the trigon.
rThe red value of the trigon to draw.
gThe green value of the trigon to draw.
bThe blue value of the trigon to draw.
aThe alpha value of the trigon to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 2290 of file SDL2_gfxPrimitives.c.

int vline ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y1,
Sint16  y2 
)

Draw vertical line in currently set color.

Parameters
rendererThe renderer to draw on.
xX coordinate of points of the line.
y1Y coordinate of the first point (i.e. top) of the line.
y2Y coordinate of the second point (i.e. bottom) of the line.
Returns
Returns 0 on success, -1 on failure.

Definition at line 216 of file SDL2_gfxPrimitives.c.

int vlineColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y1,
Sint16  y2,
Uint32  color 
)

Draw vertical line with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the points of the line.
y1Y coordinate of the first point (i.e. top) of the line.
y2Y coordinate of the second point (i.e. bottom) of the line.
colorThe color value of the line to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 232 of file SDL2_gfxPrimitives.c.

int vlineRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y1,
Sint16  y2,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw vertical line with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the points of the line.
y1Y coordinate of the first point (i.e. top) of the line.
y2Y coordinate of the second point (i.e. bottom) of the line.
rThe red value of the line to draw.
gThe green value of the line to draw.
bThe blue value of the line to draw.
aThe alpha value of the line to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 252 of file SDL2_gfxPrimitives.c.

SDL2_gfx-1.0.4/Docs/html/_s_d_l2__gfx_primitives_8c_source.html100777 0 0 1534102 12632323332 17543 0 SDL2_gfx: /cygdrive/i/Sources/sdl2gfx/SDL2_gfxPrimitives.c Source File
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
/cygdrive/i/Sources/sdl2gfx/SDL2_gfxPrimitives.c
Go to the documentation of this file.
1 /*
2 
3 SDL2_gfxPrimitives.c: graphics primitives for SDL2 renderers
4 
5 Copyright (C) 2012-2014 Andreas Schiffler
6 
7 This software is provided 'as-is', without any express or implied
8 warranty. In no event will the authors be held liable for any damages
9 arising from the use of this software.
10 
11 Permission is granted to anyone to use this software for any purpose,
12 including commercial applications, and to alter it and redistribute it
13 freely, subject to the following restrictions:
14 
15 1. The origin of this software must not be misrepresented; you must not
16 claim that you wrote the original software. If you use this software
17 in a product, an acknowledgment in the product documentation would be
18 appreciated but is not required.
19 
20 2. Altered source versions must be plainly marked as such, and must not be
21 misrepresented as being the original software.
22 
23 3. This notice may not be removed or altered from any source
24 distribution.
25 
26 Andreas Schiffler -- aschiffler at ferzkopp dot net
27 
28 */
29 
30 #include <stdio.h>
31 #include <stdlib.h>
32 #include <math.h>
33 #include <string.h>
34 
35 #include "SDL2_gfxPrimitives.h"
36 #include "SDL2_rotozoom.h"
38 
39 /* ---- Structures */
40 
44 typedef struct {
45  Sint16 x, y;
46  int dx, dy, s1, s2, swapdir, error;
47  Uint32 count;
49 
53 typedef struct {
54  SDL_Renderer *renderer;
55  int u, v; /* delta x , delta y */
56  int ku, kt, kv, kd; /* loop constants */
57  int oct2;
58  int quad4;
59  Sint16 last1x, last1y, last2x, last2y, first1x, first1y, first2x, first2y, tempx, tempy;
61 
62 /* ---- Pixel */
63 
73 int pixel(SDL_Renderer *renderer, Sint16 x, Sint16 y)
74 {
75  return SDL_RenderDrawPoint(renderer, x, y);
76 }
77 
88 int pixelColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Uint32 color)
89 {
90  Uint8 *c = (Uint8 *)&color;
91  return pixelRGBA(renderer, x, y, c[0], c[1], c[2], c[3]);
92 }
93 
107 int pixelRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
108 {
109  int result = 0;
110  result |= SDL_SetRenderDrawBlendMode(renderer, (a == 255) ? SDL_BLENDMODE_NONE : SDL_BLENDMODE_BLEND);
111  result |= SDL_SetRenderDrawColor(renderer, r, g, b, a);
112  result |= SDL_RenderDrawPoint(renderer, x, y);
113  return result;
114 }
115 
130 int pixelRGBAWeight(SDL_Renderer * renderer, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a, Uint32 weight)
131 {
132  /*
133  * Modify Alpha by weight
134  */
135  Uint32 ax = a;
136  ax = ((ax * weight) >> 8);
137  if (ax > 255) {
138  a = 255;
139  } else {
140  a = (Uint8)(ax & 0x000000ff);
141  }
142 
143  return pixelRGBA(renderer, x, y, r, g, b, a);
144 }
145 
146 /* ---- Hline */
147 
158 int hline(SDL_Renderer * renderer, Sint16 x1, Sint16 x2, Sint16 y)
159 {
160  return SDL_RenderDrawLine(renderer, x1, y, x2, y);;
161 }
162 
163 
175 int hlineColor(SDL_Renderer * renderer, Sint16 x1, Sint16 x2, Sint16 y, Uint32 color)
176 {
177  Uint8 *c = (Uint8 *)&color;
178  return hlineRGBA(renderer, x1, x2, y, c[0], c[1], c[2], c[3]);
179 }
180 
195 int hlineRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 x2, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
196 {
197  int result = 0;
198  result |= SDL_SetRenderDrawBlendMode(renderer, (a == 255) ? SDL_BLENDMODE_NONE : SDL_BLENDMODE_BLEND);
199  result |= SDL_SetRenderDrawColor(renderer, r, g, b, a);
200  result |= SDL_RenderDrawLine(renderer, x1, y, x2, y);
201  return result;
202 }
203 
204 /* ---- Vline */
205 
216 int vline(SDL_Renderer * renderer, Sint16 x, Sint16 y1, Sint16 y2)
217 {
218  return SDL_RenderDrawLine(renderer, x, y1, x, y2);;
219 }
220 
232 int vlineColor(SDL_Renderer * renderer, Sint16 x, Sint16 y1, Sint16 y2, Uint32 color)
233 {
234  Uint8 *c = (Uint8 *)&color;
235  return vlineRGBA(renderer, x, y1, y2, c[0], c[1], c[2], c[3]);
236 }
237 
252 int vlineRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y1, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
253 {
254  int result = 0;
255  result |= SDL_SetRenderDrawBlendMode(renderer, (a == 255) ? SDL_BLENDMODE_NONE : SDL_BLENDMODE_BLEND);
256  result |= SDL_SetRenderDrawColor(renderer, r, g, b, a);
257  result |= SDL_RenderDrawLine(renderer, x, y1, x, y2);
258  return result;
259 }
260 
261 /* ---- Rectangle */
262 
275 int rectangleColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
276 {
277  Uint8 *c = (Uint8 *)&color;
278  return rectangleRGBA(renderer, x1, y1, x2, y2, c[0], c[1], c[2], c[3]);
279 }
280 
296 int rectangleRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
297 {
298  int result;
299  Sint16 tmp;
300  SDL_Rect rect;
301 
302  /*
303  * Test for special cases of straight lines or single point
304  */
305  if (x1 == x2) {
306  if (y1 == y2) {
307  return (pixelRGBA(renderer, x1, y1, r, g, b, a));
308  } else {
309  return (vlineRGBA(renderer, x1, y1, y2, r, g, b, a));
310  }
311  } else {
312  if (y1 == y2) {
313  return (hlineRGBA(renderer, x1, x2, y1, r, g, b, a));
314  }
315  }
316 
317  /*
318  * Swap x1, x2 if required
319  */
320  if (x1 > x2) {
321  tmp = x1;
322  x1 = x2;
323  x2 = tmp;
324  }
325 
326  /*
327  * Swap y1, y2 if required
328  */
329  if (y1 > y2) {
330  tmp = y1;
331  y1 = y2;
332  y2 = tmp;
333  }
334 
335  /*
336  * Create destination rect
337  */
338  rect.x = x1;
339  rect.y = y1;
340  rect.w = x2 - x1;
341  rect.h = y2 - y1;
342 
343  /*
344  * Draw
345  */
346  result = 0;
347  result |= SDL_SetRenderDrawBlendMode(renderer, (a == 255) ? SDL_BLENDMODE_NONE : SDL_BLENDMODE_BLEND);
348  result |= SDL_SetRenderDrawColor(renderer, r, g, b, a);
349  result |= SDL_RenderDrawRect(renderer, &rect);
350  return result;
351 }
352 
353 /* ---- Rounded Rectangle */
354 
368 int roundedRectangleColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint32 color)
369 {
370  Uint8 *c = (Uint8 *)&color;
371  return roundedRectangleRGBA(renderer, x1, y1, x2, y2, rad, c[0], c[1], c[2], c[3]);
372 }
373 
390 int roundedRectangleRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
391 {
392  int result = 0;
393  Sint16 tmp;
394  Sint16 w, h;
395  Sint16 xx1, xx2;
396  Sint16 yy1, yy2;
397 
398  /*
399  * Check renderer
400  */
401  if (renderer == NULL)
402  {
403  return -1;
404  }
405 
406  /*
407  * Check radius vor valid range
408  */
409  if (rad < 0) {
410  return -1;
411  }
412 
413  /*
414  * Special case - no rounding
415  */
416  if (rad <= 1) {
417  return rectangleRGBA(renderer, x1, y1, x2, y2, r, g, b, a);
418  }
419 
420  /*
421  * Test for special cases of straight lines or single point
422  */
423  if (x1 == x2) {
424  if (y1 == y2) {
425  return (pixelRGBA(renderer, x1, y1, r, g, b, a));
426  } else {
427  return (vlineRGBA(renderer, x1, y1, y2, r, g, b, a));
428  }
429  } else {
430  if (y1 == y2) {
431  return (hlineRGBA(renderer, x1, x2, y1, r, g, b, a));
432  }
433  }
434 
435  /*
436  * Swap x1, x2 if required
437  */
438  if (x1 > x2) {
439  tmp = x1;
440  x1 = x2;
441  x2 = tmp;
442  }
443 
444  /*
445  * Swap y1, y2 if required
446  */
447  if (y1 > y2) {
448  tmp = y1;
449  y1 = y2;
450  y2 = tmp;
451  }
452 
453  /*
454  * Calculate width&height
455  */
456  w = x2 - x1;
457  h = y2 - y1;
458 
459  /*
460  * Maybe adjust radius
461  */
462  if ((rad * 2) > w)
463  {
464  rad = w / 2;
465  }
466  if ((rad * 2) > h)
467  {
468  rad = h / 2;
469  }
470 
471  /*
472  * Draw corners
473  */
474  xx1 = x1 + rad;
475  xx2 = x2 - rad;
476  yy1 = y1 + rad;
477  yy2 = y2 - rad;
478  result |= arcRGBA(renderer, xx1, yy1, rad, 180, 270, r, g, b, a);
479  result |= arcRGBA(renderer, xx2, yy1, rad, 270, 360, r, g, b, a);
480  result |= arcRGBA(renderer, xx1, yy2, rad, 90, 180, r, g, b, a);
481  result |= arcRGBA(renderer, xx2, yy2, rad, 0, 90, r, g, b, a);
482 
483  /*
484  * Draw lines
485  */
486  if (xx1 <= xx2) {
487  result |= hlineRGBA(renderer, xx1, xx2, y1, r, g, b, a);
488  result |= hlineRGBA(renderer, xx1, xx2, y2, r, g, b, a);
489  }
490  if (yy1 <= yy2) {
491  result |= vlineRGBA(renderer, x1, yy1, yy2, r, g, b, a);
492  result |= vlineRGBA(renderer, x2, yy1, yy2, r, g, b, a);
493  }
494 
495  return result;
496 }
497 
498 /* ---- Rounded Box */
499 
513 int roundedBoxColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint32 color)
514 {
515  Uint8 *c = (Uint8 *)&color;
516  return roundedBoxRGBA(renderer, x1, y1, x2, y2, rad, c[0], c[1], c[2], c[3]);
517 }
518 
535 int roundedBoxRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2,
536  Sint16 y2, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
537 {
538  int result;
539  Sint16 w, h, r2, tmp;
540  Sint16 cx = 0;
541  Sint16 cy = rad;
542  Sint16 ocx = (Sint16) 0xffff;
543  Sint16 ocy = (Sint16) 0xffff;
544  Sint16 df = 1 - rad;
545  Sint16 d_e = 3;
546  Sint16 d_se = -2 * rad + 5;
547  Sint16 xpcx, xmcx, xpcy, xmcy;
548  Sint16 ypcy, ymcy, ypcx, ymcx;
549  Sint16 x, y, dx, dy;
550 
551  /*
552  * Check destination renderer
553  */
554  if (renderer == NULL)
555  {
556  return -1;
557  }
558 
559  /*
560  * Check radius vor valid range
561  */
562  if (rad < 0) {
563  return -1;
564  }
565 
566  /*
567  * Special case - no rounding
568  */
569  if (rad <= 1) {
570  return rectangleRGBA(renderer, x1, y1, x2, y2, r, g, b, a);
571  }
572 
573  /*
574  * Test for special cases of straight lines or single point
575  */
576  if (x1 == x2) {
577  if (y1 == y2) {
578  return (pixelRGBA(renderer, x1, y1, r, g, b, a));
579  } else {
580  return (vlineRGBA(renderer, x1, y1, y2, r, g, b, a));
581  }
582  } else {
583  if (y1 == y2) {
584  return (hlineRGBA(renderer, x1, x2, y1, r, g, b, a));
585  }
586  }
587 
588  /*
589  * Swap x1, x2 if required
590  */
591  if (x1 > x2) {
592  tmp = x1;
593  x1 = x2;
594  x2 = tmp;
595  }
596 
597  /*
598  * Swap y1, y2 if required
599  */
600  if (y1 > y2) {
601  tmp = y1;
602  y1 = y2;
603  y2 = tmp;
604  }
605 
606  /*
607  * Calculate width&height
608  */
609  w = x2 - x1 + 1;
610  h = y2 - y1 + 1;
611 
612  /*
613  * Maybe adjust radius
614  */
615  r2 = rad + rad;
616  if (r2 > w)
617  {
618  rad = w / 2;
619  r2 = rad + rad;
620  }
621  if (r2 > h)
622  {
623  rad = h / 2;
624  }
625 
626  /* Setup filled circle drawing for corners */
627  x = x1 + rad;
628  y = y1 + rad;
629  dx = x2 - x1 - rad - rad;
630  dy = y2 - y1 - rad - rad;
631 
632  /*
633  * Set color
634  */
635  result = 0;
636  result |= SDL_SetRenderDrawBlendMode(renderer, (a == 255) ? SDL_BLENDMODE_NONE : SDL_BLENDMODE_BLEND);
637  result |= SDL_SetRenderDrawColor(renderer, r, g, b, a);
638 
639  /*
640  * Draw corners
641  */
642  do {
643  xpcx = x + cx;
644  xmcx = x - cx;
645  xpcy = x + cy;
646  xmcy = x - cy;
647  if (ocy != cy) {
648  if (cy > 0) {
649  ypcy = y + cy;
650  ymcy = y - cy;
651  result |= hline(renderer, xmcx, xpcx + dx, ypcy + dy);
652  result |= hline(renderer, xmcx, xpcx + dx, ymcy);
653  } else {
654  result |= hline(renderer, xmcx, xpcx + dx, y);
655  }
656  ocy = cy;
657  }
658  if (ocx != cx) {
659  if (cx != cy) {
660  if (cx > 0) {
661  ypcx = y + cx;
662  ymcx = y - cx;
663  result |= hline(renderer, xmcy, xpcy + dx, ymcx);
664  result |= hline(renderer, xmcy, xpcy + dx, ypcx + dy);
665  } else {
666  result |= hline(renderer, xmcy, xpcy + dx, y);
667  }
668  }
669  ocx = cx;
670  }
671 
672  /*
673  * Update
674  */
675  if (df < 0) {
676  df += d_e;
677  d_e += 2;
678  d_se += 2;
679  } else {
680  df += d_se;
681  d_e += 2;
682  d_se += 4;
683  cy--;
684  }
685  cx++;
686  } while (cx <= cy);
687 
688  /* Inside */
689  if (dx > 0 && dy > 0) {
690  result |= boxRGBA(renderer, x1, y1 + rad + 1, x2, y2 - rad, r, g, b, a);
691  }
692 
693  return (result);
694 }
695 
696 /* ---- Box */
697 
710 int boxColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
711 {
712  Uint8 *c = (Uint8 *)&color;
713  return boxRGBA(renderer, x1, y1, x2, y2, c[0], c[1], c[2], c[3]);
714 }
715 
731 int boxRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
732 {
733  int result;
734  Sint16 tmp;
735  SDL_Rect rect;
736 
737  /*
738  * Test for special cases of straight lines or single point
739  */
740  if (x1 == x2) {
741  if (y1 == y2) {
742  return (pixelRGBA(renderer, x1, y1, r, g, b, a));
743  } else {
744  return (vlineRGBA(renderer, x1, y1, y2, r, g, b, a));
745  }
746  } else {
747  if (y1 == y2) {
748  return (hlineRGBA(renderer, x1, x2, y1, r, g, b, a));
749  }
750  }
751 
752  /*
753  * Swap x1, x2 if required
754  */
755  if (x1 > x2) {
756  tmp = x1;
757  x1 = x2;
758  x2 = tmp;
759  }
760 
761  /*
762  * Swap y1, y2 if required
763  */
764  if (y1 > y2) {
765  tmp = y1;
766  y1 = y2;
767  y2 = tmp;
768  }
769 
770  /*
771  * Create destination rect
772  */
773  rect.x = x1;
774  rect.y = y1;
775  rect.w = x2 - x1 + 1;
776  rect.h = y2 - y1 + 1;
777 
778  /*
779  * Draw
780  */
781  result = 0;
782  result |= SDL_SetRenderDrawBlendMode(renderer, (a == 255) ? SDL_BLENDMODE_NONE : SDL_BLENDMODE_BLEND);
783  result |= SDL_SetRenderDrawColor(renderer, r, g, b, a);
784  result |= SDL_RenderFillRect(renderer, &rect);
785  return result;
786 }
787 
788 /* ----- Line */
789 
801 int line(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2)
802 {
803  /*
804  * Draw
805  */
806  return SDL_RenderDrawLine(renderer, x1, y1, x2, y2);
807 }
808 
821 int lineColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
822 {
823  Uint8 *c = (Uint8 *)&color;
824  return lineRGBA(renderer, x1, y1, x2, y2, c[0], c[1], c[2], c[3]);
825 }
826 
842 int lineRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
843 {
844  /*
845  * Draw
846  */
847  int result = 0;
848  result |= SDL_SetRenderDrawBlendMode(renderer, (a == 255) ? SDL_BLENDMODE_NONE : SDL_BLENDMODE_BLEND);
849  result |= SDL_SetRenderDrawColor(renderer, r, g, b, a);
850  result |= SDL_RenderDrawLine(renderer, x1, y1, x2, y2);
851  return result;
852 }
853 
854 /* ---- AA Line */
855 
856 #define AAlevels 256
857 #define AAbits 8
858 
882 int _aalineRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a, int draw_endpoint)
883 {
884  Sint32 xx0, yy0, xx1, yy1;
885  int result;
886  Uint32 intshift, erracc, erradj;
887  Uint32 erracctmp, wgt, wgtcompmask;
888  int dx, dy, tmp, xdir, y0p1, x0pxdir;
889 
890  /*
891  * Keep on working with 32bit numbers
892  */
893  xx0 = x1;
894  yy0 = y1;
895  xx1 = x2;
896  yy1 = y2;
897 
898  /*
899  * Reorder points to make dy positive
900  */
901  if (yy0 > yy1) {
902  tmp = yy0;
903  yy0 = yy1;
904  yy1 = tmp;
905  tmp = xx0;
906  xx0 = xx1;
907  xx1 = tmp;
908  }
909 
910  /*
911  * Calculate distance
912  */
913  dx = xx1 - xx0;
914  dy = yy1 - yy0;
915 
916  /*
917  * Adjust for negative dx and set xdir
918  */
919  if (dx >= 0) {
920  xdir = 1;
921  } else {
922  xdir = -1;
923  dx = (-dx);
924  }
925 
926  /*
927  * Check for special cases
928  */
929  if (dx == 0) {
930  /*
931  * Vertical line
932  */
933  if (draw_endpoint)
934  {
935  return (vlineRGBA(renderer, x1, y1, y2, r, g, b, a));
936  } else {
937  if (dy > 0) {
938  return (vlineRGBA(renderer, x1, yy0, yy0+dy, r, g, b, a));
939  } else {
940  return (pixelRGBA(renderer, x1, y1, r, g, b, a));
941  }
942  }
943  } else if (dy == 0) {
944  /*
945  * Horizontal line
946  */
947  if (draw_endpoint)
948  {
949  return (hlineRGBA(renderer, x1, x2, y1, r, g, b, a));
950  } else {
951  if (dx > 0) {
952  return (hlineRGBA(renderer, xx0, xx0+dx, y1, r, g, b, a));
953  } else {
954  return (pixelRGBA(renderer, x1, y1, r, g, b, a));
955  }
956  }
957  } else if ((dx == dy) && (draw_endpoint)) {
958  /*
959  * Diagonal line (with endpoint)
960  */
961  return (lineRGBA(renderer, x1, y1, x2, y2, r, g, b, a));
962  }
963 
964 
965  /*
966  * Line is not horizontal, vertical or diagonal (with endpoint)
967  */
968  result = 0;
969 
970  /*
971  * Zero accumulator
972  */
973  erracc = 0;
974 
975  /*
976  * # of bits by which to shift erracc to get intensity level
977  */
978  intshift = 32 - AAbits;
979 
980  /*
981  * Mask used to flip all bits in an intensity weighting
982  */
983  wgtcompmask = AAlevels - 1;
984 
985  /*
986  * Draw the initial pixel in the foreground color
987  */
988  result |= pixelRGBA(renderer, x1, y1, r, g, b, a);
989 
990  /*
991  * x-major or y-major?
992  */
993  if (dy > dx) {
994 
995  /*
996  * y-major. Calculate 16-bit fixed point fractional part of a pixel that
997  * X advances every time Y advances 1 pixel, truncating the result so that
998  * we won't overrun the endpoint along the X axis
999  */
1000  /*
1001  * Not-so-portable version: erradj = ((Uint64)dx << 32) / (Uint64)dy;
1002  */
1003  erradj = ((dx << 16) / dy) << 16;
1004 
1005  /*
1006  * draw all pixels other than the first and last
1007  */
1008  x0pxdir = xx0 + xdir;
1009  while (--dy) {
1010  erracctmp = erracc;
1011  erracc += erradj;
1012  if (erracc <= erracctmp) {
1013  /*
1014  * rollover in error accumulator, x coord advances
1015  */
1016  xx0 = x0pxdir;
1017  x0pxdir += xdir;
1018  }
1019  yy0++; /* y-major so always advance Y */
1020 
1021  /*
1022  * the AAbits most significant bits of erracc give us the intensity
1023  * weighting for this pixel, and the complement of the weighting for
1024  * the paired pixel.
1025  */
1026  wgt = (erracc >> intshift) & 255;
1027  result |= pixelRGBAWeight (renderer, xx0, yy0, r, g, b, a, 255 - wgt);
1028  result |= pixelRGBAWeight (renderer, x0pxdir, yy0, r, g, b, a, wgt);
1029  }
1030 
1031  } else {
1032 
1033  /*
1034  * x-major line. Calculate 16-bit fixed-point fractional part of a pixel
1035  * that Y advances each time X advances 1 pixel, truncating the result so
1036  * that we won't overrun the endpoint along the X axis.
1037  */
1038  /*
1039  * Not-so-portable version: erradj = ((Uint64)dy << 32) / (Uint64)dx;
1040  */
1041  erradj = ((dy << 16) / dx) << 16;
1042 
1043  /*
1044  * draw all pixels other than the first and last
1045  */
1046  y0p1 = yy0 + 1;
1047  while (--dx) {
1048 
1049  erracctmp = erracc;
1050  erracc += erradj;
1051  if (erracc <= erracctmp) {
1052  /*
1053  * Accumulator turned over, advance y
1054  */
1055  yy0 = y0p1;
1056  y0p1++;
1057  }
1058  xx0 += xdir; /* x-major so always advance X */
1059  /*
1060  * the AAbits most significant bits of erracc give us the intensity
1061  * weighting for this pixel, and the complement of the weighting for
1062  * the paired pixel.
1063  */
1064  wgt = (erracc >> intshift) & 255;
1065  result |= pixelRGBAWeight (renderer, xx0, yy0, r, g, b, a, 255 - wgt);
1066  result |= pixelRGBAWeight (renderer, xx0, y0p1, r, g, b, a, wgt);
1067  }
1068  }
1069 
1070  /*
1071  * Do we have to draw the endpoint
1072  */
1073  if (draw_endpoint) {
1074  /*
1075  * Draw final pixel, always exactly intersected by the line and doesn't
1076  * need to be weighted.
1077  */
1078  result |= pixelRGBA (renderer, x2, y2, r, g, b, a);
1079  }
1080 
1081  return (result);
1082 }
1083 
1096 int aalineColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
1097 {
1098  Uint8 *c = (Uint8 *)&color;
1099  return _aalineRGBA(renderer, x1, y1, x2, y2, c[0], c[1], c[2], c[3], 1);
1100 }
1101 
1117 int aalineRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
1118 {
1119  return _aalineRGBA(renderer, x1, y1, x2, y2, r, g, b, a, 1);
1120 }
1121 
1122 /* ----- Circle */
1123 
1135 int circleColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Uint32 color)
1136 {
1137  Uint8 *c = (Uint8 *)&color;
1138  return ellipseRGBA(renderer, x, y, rad, rad, c[0], c[1], c[2], c[3]);
1139 }
1140 
1155 int circleRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
1156 {
1157  return ellipseRGBA(renderer, x, y, rad, rad, r, g, b, a);
1158 }
1159 
1160 /* ----- Arc */
1161 
1175 int arcColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color)
1176 {
1177  Uint8 *c = (Uint8 *)&color;
1178  return arcRGBA(renderer, x, y, rad, start, end, c[0], c[1], c[2], c[3]);
1179 }
1180 
1197 /* TODO: rewrite algorithm; arc endpoints are not always drawn */
1198 int arcRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
1199 {
1200  int result;
1201  Sint16 cx = 0;
1202  Sint16 cy = rad;
1203  Sint16 df = 1 - rad;
1204  Sint16 d_e = 3;
1205  Sint16 d_se = -2 * rad + 5;
1206  Sint16 xpcx, xmcx, xpcy, xmcy;
1207  Sint16 ypcy, ymcy, ypcx, ymcx;
1208  Uint8 drawoct;
1209  int startoct, endoct, oct, stopval_start = 0, stopval_end = 0;
1210  double dstart, dend, temp = 0.;
1211 
1212  /*
1213  * Sanity check radius
1214  */
1215  if (rad < 0) {
1216  return (-1);
1217  }
1218 
1219  /*
1220  * Special case for rad=0 - draw a point
1221  */
1222  if (rad == 0) {
1223  return (pixelRGBA(renderer, x, y, r, g, b, a));
1224  }
1225 
1226  /*
1227  Octant labeling
1228 
1229  \ 5 | 6 /
1230  \ | /
1231  4 \ | / 7
1232  \|/
1233  ------+------ +x
1234  /|\
1235  3 / | \ 0
1236  / | \
1237  / 2 | 1 \
1238  +y
1239 
1240  Initially reset bitmask to 0x00000000
1241  the set whether or not to keep drawing a given octant.
1242  For example: 0x00111100 means we're drawing in octants 2-5
1243  */
1244  drawoct = 0;
1245 
1246  /*
1247  * Fixup angles
1248  */
1249  start %= 360;
1250  end %= 360;
1251  /* 0 <= start & end < 360; note that sometimes start > end - if so, arc goes back through 0. */
1252  while (start < 0) start += 360;
1253  while (end < 0) end += 360;
1254  start %= 360;
1255  end %= 360;
1256 
1257  /* now, we find which octants we're drawing in. */
1258  startoct = start / 45;
1259  endoct = end / 45;
1260  oct = startoct - 1;
1261 
1262  /* stopval_start, stopval_end; what values of cx to stop at. */
1263  do {
1264  oct = (oct + 1) % 8;
1265 
1266  if (oct == startoct) {
1267  /* need to compute stopval_start for this octant. Look at picture above if this is unclear */
1268  dstart = (double)start;
1269  switch (oct)
1270  {
1271  case 0:
1272  case 3:
1273  temp = sin(dstart * M_PI / 180.);
1274  break;
1275  case 1:
1276  case 6:
1277  temp = cos(dstart * M_PI / 180.);
1278  break;
1279  case 2:
1280  case 5:
1281  temp = -cos(dstart * M_PI / 180.);
1282  break;
1283  case 4:
1284  case 7:
1285  temp = -sin(dstart * M_PI / 180.);
1286  break;
1287  }
1288  temp *= rad;
1289  stopval_start = (int)temp;
1290 
1291  /*
1292  This isn't arbitrary, but requires graph paper to explain well.
1293  The basic idea is that we're always changing drawoct after we draw, so we
1294  stop immediately after we render the last sensible pixel at x = ((int)temp).
1295  and whether to draw in this octant initially
1296  */
1297  if (oct % 2) drawoct |= (1 << oct); /* this is basically like saying drawoct[oct] = true, if drawoct were a bool array */
1298  else drawoct &= 255 - (1 << oct); /* this is basically like saying drawoct[oct] = false */
1299  }
1300  if (oct == endoct) {
1301  /* need to compute stopval_end for this octant */
1302  dend = (double)end;
1303  switch (oct)
1304  {
1305  case 0:
1306  case 3:
1307  temp = sin(dend * M_PI / 180);
1308  break;
1309  case 1:
1310  case 6:
1311  temp = cos(dend * M_PI / 180);
1312  break;
1313  case 2:
1314  case 5:
1315  temp = -cos(dend * M_PI / 180);
1316  break;
1317  case 4:
1318  case 7:
1319  temp = -sin(dend * M_PI / 180);
1320  break;
1321  }
1322  temp *= rad;
1323  stopval_end = (int)temp;
1324 
1325  /* and whether to draw in this octant initially */
1326  if (startoct == endoct) {
1327  /* note: we start drawing, stop, then start again in this case */
1328  /* otherwise: we only draw in this octant, so initialize it to false, it will get set back to true */
1329  if (start > end) {
1330  /* unfortunately, if we're in the same octant and need to draw over the whole circle, */
1331  /* we need to set the rest to true, because the while loop will end at the bottom. */
1332  drawoct = 255;
1333  } else {
1334  drawoct &= 255 - (1 << oct);
1335  }
1336  }
1337  else if (oct % 2) drawoct &= 255 - (1 << oct);
1338  else drawoct |= (1 << oct);
1339  } else if (oct != startoct) { /* already verified that it's != endoct */
1340  drawoct |= (1 << oct); /* draw this entire segment */
1341  }
1342  } while (oct != endoct);
1343 
1344  /* so now we have what octants to draw and when to draw them. all that's left is the actual raster code. */
1345 
1346  /*
1347  * Set color
1348  */
1349  result = 0;
1350  result |= SDL_SetRenderDrawBlendMode(renderer, (a == 255) ? SDL_BLENDMODE_NONE : SDL_BLENDMODE_BLEND);
1351  result |= SDL_SetRenderDrawColor(renderer, r, g, b, a);
1352 
1353  /*
1354  * Draw arc
1355  */
1356  do {
1357  ypcy = y + cy;
1358  ymcy = y - cy;
1359  if (cx > 0) {
1360  xpcx = x + cx;
1361  xmcx = x - cx;
1362 
1363  /* always check if we're drawing a certain octant before adding a pixel to that octant. */
1364  if (drawoct & 4) result |= pixel(renderer, xmcx, ypcy);
1365  if (drawoct & 2) result |= pixel(renderer, xpcx, ypcy);
1366  if (drawoct & 32) result |= pixel(renderer, xmcx, ymcy);
1367  if (drawoct & 64) result |= pixel(renderer, xpcx, ymcy);
1368  } else {
1369  if (drawoct & 96) result |= pixel(renderer, x, ymcy);
1370  if (drawoct & 6) result |= pixel(renderer, x, ypcy);
1371  }
1372 
1373  xpcy = x + cy;
1374  xmcy = x - cy;
1375  if (cx > 0 && cx != cy) {
1376  ypcx = y + cx;
1377  ymcx = y - cx;
1378  if (drawoct & 8) result |= pixel(renderer, xmcy, ypcx);
1379  if (drawoct & 1) result |= pixel(renderer, xpcy, ypcx);
1380  if (drawoct & 16) result |= pixel(renderer, xmcy, ymcx);
1381  if (drawoct & 128) result |= pixel(renderer, xpcy, ymcx);
1382  } else if (cx == 0) {
1383  if (drawoct & 24) result |= pixel(renderer, xmcy, y);
1384  if (drawoct & 129) result |= pixel(renderer, xpcy, y);
1385  }
1386 
1387  /*
1388  * Update whether we're drawing an octant
1389  */
1390  if (stopval_start == cx) {
1391  /* works like an on-off switch. */
1392  /* This is just in case start & end are in the same octant. */
1393  if (drawoct & (1 << startoct)) drawoct &= 255 - (1 << startoct);
1394  else drawoct |= (1 << startoct);
1395  }
1396  if (stopval_end == cx) {
1397  if (drawoct & (1 << endoct)) drawoct &= 255 - (1 << endoct);
1398  else drawoct |= (1 << endoct);
1399  }
1400 
1401  /*
1402  * Update pixels
1403  */
1404  if (df < 0) {
1405  df += d_e;
1406  d_e += 2;
1407  d_se += 2;
1408  } else {
1409  df += d_se;
1410  d_e += 2;
1411  d_se += 4;
1412  cy--;
1413  }
1414  cx++;
1415  } while (cx <= cy);
1416 
1417  return (result);
1418 }
1419 
1420 /* ----- AA Circle */
1421 
1433 int aacircleColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Uint32 color)
1434 {
1435  Uint8 *c = (Uint8 *)&color;
1436  return aaellipseRGBA(renderer, x, y, rad, rad, c[0], c[1], c[2], c[3]);
1437 }
1438 
1453 int aacircleRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
1454 {
1455  /*
1456  * Draw
1457  */
1458  return aaellipseRGBA(renderer, x, y, rad, rad, r, g, b, a);
1459 }
1460 
1461 /* ----- Ellipse */
1462 
1475 int _drawQuadrants(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 dx, Sint16 dy, Sint32 f)
1476 {
1477  int result = 0;
1478  Sint16 xpdx, xmdx;
1479  Sint16 ypdy, ymdy;
1480 
1481  if (dx == 0) {
1482  if (dy == 0) {
1483  result |= pixel(renderer, x, y);
1484  } else {
1485  ypdy = y + dy;
1486  ymdy = y - dy;
1487  if (f) {
1488  result |= vline(renderer, x, ymdy, ypdy);
1489  } else {
1490  result |= pixel(renderer, x, ypdy);
1491  result |= pixel(renderer, x, ymdy);
1492  }
1493  }
1494  } else {
1495  xpdx = x + dx;
1496  xmdx = x - dx;
1497  ypdy = y + dy;
1498  ymdy = y - dy;
1499  if (f) {
1500  result |= vline(renderer, xpdx, ymdy, ypdy);
1501  result |= vline(renderer, xmdx, ymdy, ypdy);
1502  } else {
1503  result |= pixel(renderer, xpdx, ypdy);
1504  result |= pixel(renderer, xmdx, ypdy);
1505  result |= pixel(renderer, xpdx, ymdy);
1506  result |= pixel(renderer, xmdx, ymdy);
1507  }
1508  }
1509 
1510  return result;
1511 }
1512 
1529 #define ELLIPSE_OVERSCAN 4
1530 int _ellipseRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a, Sint32 f)
1531 {
1532  int result;
1533  Sint32 rx2, ry2, rx22, ry22;
1534  Sint32 error;
1535  Sint32 curX, curY, curXp1, curYm1;
1536  Sint32 scrX, scrY, oldX, oldY;
1537  Sint32 deltaX, deltaY;
1538 
1539  /*
1540  * Sanity check radii
1541  */
1542  if ((rx < 0) || (ry < 0)) {
1543  return (-1);
1544  }
1545 
1546  /*
1547  * Set color
1548  */
1549  result = 0;
1550  result |= SDL_SetRenderDrawBlendMode(renderer, (a == 255) ? SDL_BLENDMODE_NONE : SDL_BLENDMODE_BLEND);
1551  result |= SDL_SetRenderDrawColor(renderer, r, g, b, a);
1552 
1553  /*
1554  * Special cases for rx=0 and/or ry=0: draw a hline/vline/pixel
1555  */
1556  if (rx == 0) {
1557  if (ry == 0) {
1558  return (pixel(renderer, x, y));
1559  } else {
1560  return (vline(renderer, x, y - ry, y + ry));
1561  }
1562  } else {
1563  if (ry == 0) {
1564  return (hline(renderer, x - rx, x + rx, y));
1565  }
1566  }
1567 
1568  /*
1569  * Top/bottom center points.
1570  */
1571  oldX = scrX = 0;
1572  oldY = scrY = ry;
1573  result |= _drawQuadrants(renderer, x, y, 0, ry, f);
1574 
1575  /* Midpoint ellipse algorithm with overdraw */
1576  rx *= ELLIPSE_OVERSCAN;
1577  ry *= ELLIPSE_OVERSCAN;
1578  rx2 = rx * rx;
1579  rx22 = rx2 + rx2;
1580  ry2 = ry * ry;
1581  ry22 = ry2 + ry2;
1582  curX = 0;
1583  curY = ry;
1584  deltaX = 0;
1585  deltaY = rx22 * curY;
1586 
1587  /* Points in segment 1 */
1588  error = ry2 - rx2 * ry + rx2 / 4;
1589  while (deltaX <= deltaY)
1590  {
1591  curX++;
1592  deltaX += ry22;
1593 
1594  error += deltaX + ry2;
1595  if (error >= 0)
1596  {
1597  curY--;
1598  deltaY -= rx22;
1599  error -= deltaY;
1600  }
1601 
1602  scrX = curX/ELLIPSE_OVERSCAN;
1603  scrY = curY/ELLIPSE_OVERSCAN;
1604  if ((scrX != oldX && scrY == oldY) || (scrX != oldX && scrY != oldY)) {
1605  result |= _drawQuadrants(renderer, x, y, scrX, scrY, f);
1606  oldX = scrX;
1607  oldY = scrY;
1608  }
1609  }
1610 
1611  /* Points in segment 2 */
1612  if (curY > 0)
1613  {
1614  curXp1 = curX + 1;
1615  curYm1 = curY - 1;
1616  error = ry2 * curX * curXp1 + ((ry2 + 3) / 4) + rx2 * curYm1 * curYm1 - rx2 * ry2;
1617  while (curY > 0)
1618  {
1619  curY--;
1620  deltaY -= rx22;
1621 
1622  error += rx2;
1623  error -= deltaY;
1624 
1625  if (error <= 0)
1626  {
1627  curX++;
1628  deltaX += ry22;
1629  error += deltaX;
1630  }
1631 
1632  scrX = curX/ELLIPSE_OVERSCAN;
1633  scrY = curY/ELLIPSE_OVERSCAN;
1634  if ((scrX != oldX && scrY == oldY) || (scrX != oldX && scrY != oldY)) {
1635  oldY--;
1636  for (;oldY >= scrY; oldY--) {
1637  result |= _drawQuadrants(renderer, x, y, scrX, oldY, f);
1638  /* prevent overdraw */
1639  if (f) {
1640  oldY = scrY - 1;
1641  }
1642  }
1643  oldX = scrX;
1644  oldY = scrY;
1645  }
1646  }
1647 
1648  /* Remaining points in vertical */
1649  if (!f) {
1650  oldY--;
1651  for (;oldY >= 0; oldY--) {
1652  result |= _drawQuadrants(renderer, x, y, scrX, oldY, f);
1653  }
1654  }
1655  }
1656 
1657  return (result);
1658 }
1659 
1672 int ellipseColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color)
1673 {
1674  Uint8 *c = (Uint8 *)&color;
1675  return _ellipseRGBA(renderer, x, y, rx, ry, c[0], c[1], c[2], c[3], 0);
1676 }
1677 
1693 int ellipseRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
1694 {
1695  return _ellipseRGBA(renderer, x, y, rx, ry, r, g, b, a, 0);
1696 }
1697 
1698 /* ----- Filled Circle */
1699 
1711 int filledCircleColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Uint32 color)
1712 {
1713  Uint8 *c = (Uint8 *)&color;
1714  return filledEllipseRGBA(renderer, x, y, rad, rad, c[0], c[1], c[2], c[3]);
1715 }
1716 
1731 int filledCircleRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
1732 {
1733  return _ellipseRGBA(renderer, x, y, rad, rad, r, g ,b, a, 1);
1734 }
1735 
1736 
1737 /* ----- AA Ellipse */
1738 
1739 /* Windows targets do not have lrint, so provide a local inline version */
1740 #if defined(_MSC_VER)
1741 /* Detect 64bit and use intrinsic version */
1742 #ifdef _M_X64
1743 #include <emmintrin.h>
1744 static __inline long
1745  lrint(float f)
1746 {
1747  return _mm_cvtss_si32(_mm_load_ss(&f));
1748 }
1749 #elif defined(_M_IX86)
1750 __inline long int
1751  lrint (double flt)
1752 {
1753  int intgr;
1754  _asm
1755  {
1756  fld flt
1757  fistp intgr
1758  };
1759  return intgr;
1760 }
1761 #elif defined(_M_ARM)
1762 #include <armintr.h>
1763 #pragma warning(push)
1764 #pragma warning(disable: 4716)
1765 __declspec(naked) long int
1766  lrint (double flt)
1767 {
1768  __emit(0xEC410B10); // fmdrr d0, r0, r1
1769  __emit(0xEEBD0B40); // ftosid s0, d0
1770  __emit(0xEE100A10); // fmrs r0, s0
1771  __emit(0xE12FFF1E); // bx lr
1772 }
1773 #pragma warning(pop)
1774 #else
1775 #error lrint needed for MSVC on non X86/AMD64/ARM targets.
1776 #endif
1777 #endif
1778 
1791 int aaellipseColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color)
1792 {
1793  Uint8 *c = (Uint8 *)&color;
1794  return aaellipseRGBA(renderer, x, y, rx, ry, c[0], c[1], c[2], c[3]);
1795 }
1796 
1812 int aaellipseRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
1813 {
1814  int result;
1815  int i;
1816  int a2, b2, ds, dt, dxt, t, s, d;
1817  Sint16 xp, yp, xs, ys, dyt, od, xx, yy, xc2, yc2;
1818  float cp;
1819  double sab;
1820  Uint8 weight, iweight;
1821 
1822  /*
1823  * Sanity check radii
1824  */
1825  if ((rx < 0) || (ry < 0)) {
1826  return (-1);
1827  }
1828 
1829  /*
1830  * Special cases for rx=0 and/or ry=0: draw a hline/vline/pixel
1831  */
1832  if (rx == 0) {
1833  if (ry == 0) {
1834  return (pixelRGBA(renderer, x, y, r, g, b, a));
1835  } else {
1836  return (vlineRGBA(renderer, x, y - ry, y + ry, r, g, b, a));
1837  }
1838  } else {
1839  if (ry == 0) {
1840  return (hlineRGBA(renderer, x - rx, x + rx, y, r, g, b, a));
1841  }
1842  }
1843 
1844  /* Variable setup */
1845  a2 = rx * rx;
1846  b2 = ry * ry;
1847 
1848  ds = 2 * a2;
1849  dt = 2 * b2;
1850 
1851  xc2 = 2 * x;
1852  yc2 = 2 * y;
1853 
1854  sab = sqrt((double)(a2 + b2));
1855  od = (Sint16)lrint(sab*0.01) + 1; /* introduce some overdraw */
1856  dxt = (Sint16)lrint((double)a2 / sab) + od;
1857 
1858  t = 0;
1859  s = -2 * a2 * ry;
1860  d = 0;
1861 
1862  xp = x;
1863  yp = y - ry;
1864 
1865  /* Draw */
1866  result = 0;
1867  result |= SDL_SetRenderDrawBlendMode(renderer, (a == 255) ? SDL_BLENDMODE_NONE : SDL_BLENDMODE_BLEND);
1868 
1869  /* "End points" */
1870  result |= pixelRGBA(renderer, xp, yp, r, g, b, a);
1871  result |= pixelRGBA(renderer, xc2 - xp, yp, r, g, b, a);
1872  result |= pixelRGBA(renderer, xp, yc2 - yp, r, g, b, a);
1873  result |= pixelRGBA(renderer, xc2 - xp, yc2 - yp, r, g, b, a);
1874 
1875  for (i = 1; i <= dxt; i++) {
1876  xp--;
1877  d += t - b2;
1878 
1879  if (d >= 0)
1880  ys = yp - 1;
1881  else if ((d - s - a2) > 0) {
1882  if ((2 * d - s - a2) >= 0)
1883  ys = yp + 1;
1884  else {
1885  ys = yp;
1886  yp++;
1887  d -= s + a2;
1888  s += ds;
1889  }
1890  } else {
1891  yp++;
1892  ys = yp + 1;
1893  d -= s + a2;
1894  s += ds;
1895  }
1896 
1897  t -= dt;
1898 
1899  /* Calculate alpha */
1900  if (s != 0) {
1901  cp = (float) abs(d) / (float) abs(s);
1902  if (cp > 1.0) {
1903  cp = 1.0;
1904  }
1905  } else {
1906  cp = 1.0;
1907  }
1908 
1909  /* Calculate weights */
1910  weight = (Uint8) (cp * 255);
1911  iweight = 255 - weight;
1912 
1913  /* Upper half */
1914  xx = xc2 - xp;
1915  result |= pixelRGBAWeight(renderer, xp, yp, r, g, b, a, iweight);
1916  result |= pixelRGBAWeight(renderer, xx, yp, r, g, b, a, iweight);
1917 
1918  result |= pixelRGBAWeight(renderer, xp, ys, r, g, b, a, weight);
1919  result |= pixelRGBAWeight(renderer, xx, ys, r, g, b, a, weight);
1920 
1921  /* Lower half */
1922  yy = yc2 - yp;
1923  result |= pixelRGBAWeight(renderer, xp, yy, r, g, b, a, iweight);
1924  result |= pixelRGBAWeight(renderer, xx, yy, r, g, b, a, iweight);
1925 
1926  yy = yc2 - ys;
1927  result |= pixelRGBAWeight(renderer, xp, yy, r, g, b, a, weight);
1928  result |= pixelRGBAWeight(renderer, xx, yy, r, g, b, a, weight);
1929  }
1930 
1931  /* Replaces original approximation code dyt = abs(yp - yc); */
1932  dyt = (Sint16)lrint((double)b2 / sab ) + od;
1933 
1934  for (i = 1; i <= dyt; i++) {
1935  yp++;
1936  d -= s + a2;
1937 
1938  if (d <= 0)
1939  xs = xp + 1;
1940  else if ((d + t - b2) < 0) {
1941  if ((2 * d + t - b2) <= 0)
1942  xs = xp - 1;
1943  else {
1944  xs = xp;
1945  xp--;
1946  d += t - b2;
1947  t -= dt;
1948  }
1949  } else {
1950  xp--;
1951  xs = xp - 1;
1952  d += t - b2;
1953  t -= dt;
1954  }
1955 
1956  s += ds;
1957 
1958  /* Calculate alpha */
1959  if (t != 0) {
1960  cp = (float) abs(d) / (float) abs(t);
1961  if (cp > 1.0) {
1962  cp = 1.0;
1963  }
1964  } else {
1965  cp = 1.0;
1966  }
1967 
1968  /* Calculate weight */
1969  weight = (Uint8) (cp * 255);
1970  iweight = 255 - weight;
1971 
1972  /* Left half */
1973  xx = xc2 - xp;
1974  yy = yc2 - yp;
1975  result |= pixelRGBAWeight(renderer, xp, yp, r, g, b, a, iweight);
1976  result |= pixelRGBAWeight(renderer, xx, yp, r, g, b, a, iweight);
1977 
1978  result |= pixelRGBAWeight(renderer, xp, yy, r, g, b, a, iweight);
1979  result |= pixelRGBAWeight(renderer, xx, yy, r, g, b, a, iweight);
1980 
1981  /* Right half */
1982  xx = xc2 - xs;
1983  result |= pixelRGBAWeight(renderer, xs, yp, r, g, b, a, weight);
1984  result |= pixelRGBAWeight(renderer, xx, yp, r, g, b, a, weight);
1985 
1986  result |= pixelRGBAWeight(renderer, xs, yy, r, g, b, a, weight);
1987  result |= pixelRGBAWeight(renderer, xx, yy, r, g, b, a, weight);
1988  }
1989 
1990  return (result);
1991 }
1992 
1993 /* ---- Filled Ellipse */
1994 
2007 int filledEllipseColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color)
2008 {
2009  Uint8 *c = (Uint8 *)&color;
2010  return _ellipseRGBA(renderer, x, y, rx, ry, c[0], c[1], c[2], c[3], 1);
2011 }
2012 
2028 int filledEllipseRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
2029 {
2030  return _ellipseRGBA(renderer, x, y, rx, ry, r, g, b, a, 1);
2031 }
2032 
2033 /* ----- Pie */
2034 
2054 /* TODO: rewrite algorithm; pie is not always accurate */
2055 int _pieRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a, Uint8 filled)
2056 {
2057  int result;
2058  double angle, start_angle, end_angle;
2059  double deltaAngle;
2060  double dr;
2061  int numpoints, i;
2062  Sint16 *vx, *vy;
2063 
2064  /*
2065  * Sanity check radii
2066  */
2067  if (rad < 0) {
2068  return (-1);
2069  }
2070 
2071  /*
2072  * Fixup angles
2073  */
2074  start = start % 360;
2075  end = end % 360;
2076 
2077  /*
2078  * Special case for rad=0 - draw a point
2079  */
2080  if (rad == 0) {
2081  return (pixelRGBA(renderer, x, y, r, g, b, a));
2082  }
2083 
2084  /*
2085  * Variable setup
2086  */
2087  dr = (double) rad;
2088  deltaAngle = 3.0 / dr;
2089  start_angle = (double) start *(2.0 * M_PI / 360.0);
2090  end_angle = (double) end *(2.0 * M_PI / 360.0);
2091  if (start > end) {
2092  end_angle += (2.0 * M_PI);
2093  }
2094 
2095  /* We will always have at least 2 points */
2096  numpoints = 2;
2097 
2098  /* Count points (rather than calculating it) */
2099  angle = start_angle;
2100  while (angle < end_angle) {
2101  angle += deltaAngle;
2102  numpoints++;
2103  }
2104 
2105  /* Allocate combined vertex array */
2106  vx = vy = (Sint16 *) malloc(2 * sizeof(Uint16) * numpoints);
2107  if (vx == NULL) {
2108  return (-1);
2109  }
2110 
2111  /* Update point to start of vy */
2112  vy += numpoints;
2113 
2114  /* Center */
2115  vx[0] = x;
2116  vy[0] = y;
2117 
2118  /* First vertex */
2119  angle = start_angle;
2120  vx[1] = x + (int) (dr * cos(angle));
2121  vy[1] = y + (int) (dr * sin(angle));
2122 
2123  if (numpoints<3)
2124  {
2125  result = lineRGBA(renderer, vx[0], vy[0], vx[1], vy[1], r, g, b, a);
2126  }
2127  else
2128  {
2129  /* Calculate other vertices */
2130  i = 2;
2131  angle = start_angle;
2132  while (angle < end_angle) {
2133  angle += deltaAngle;
2134  if (angle>end_angle)
2135  {
2136  angle = end_angle;
2137  }
2138  vx[i] = x + (int) (dr * cos(angle));
2139  vy[i] = y + (int) (dr * sin(angle));
2140  i++;
2141  }
2142 
2143  /* Draw */
2144  if (filled) {
2145  result = filledPolygonRGBA(renderer, vx, vy, numpoints, r, g, b, a);
2146  } else {
2147  result = polygonRGBA(renderer, vx, vy, numpoints, r, g, b, a);
2148  }
2149  }
2150 
2151  /* Free combined vertex array */
2152  free(vx);
2153 
2154  return (result);
2155 }
2156 
2170 int pieColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad,
2171  Sint16 start, Sint16 end, Uint32 color)
2172 {
2173  Uint8 *c = (Uint8 *)&color;
2174  return _pieRGBA(renderer, x, y, rad, start, end, c[0], c[1], c[2], c[3], 0);
2175 }
2176 
2193 int pieRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad,
2194  Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
2195 {
2196  return _pieRGBA(renderer, x, y, rad, start, end, r, g, b, a, 0);
2197 }
2198 
2212 int filledPieColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color)
2213 {
2214  Uint8 *c = (Uint8 *)&color;
2215  return _pieRGBA(renderer, x, y, rad, start, end, c[0], c[1], c[2], c[3], 1);
2216 }
2217 
2234 int filledPieRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad,
2235  Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
2236 {
2237  return _pieRGBA(renderer, x, y, rad, start, end, r, g, b, a, 1);
2238 }
2239 
2240 /* ------ Trigon */
2241 
2258 int trigonColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color)
2259 {
2260  Sint16 vx[3];
2261  Sint16 vy[3];
2262 
2263  vx[0]=x1;
2264  vx[1]=x2;
2265  vx[2]=x3;
2266  vy[0]=y1;
2267  vy[1]=y2;
2268  vy[2]=y3;
2269 
2270  return(polygonColor(renderer,vx,vy,3,color));
2271 }
2272 
2290 int trigonRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3,
2291  Uint8 r, Uint8 g, Uint8 b, Uint8 a)
2292 {
2293  Sint16 vx[3];
2294  Sint16 vy[3];
2295 
2296  vx[0]=x1;
2297  vx[1]=x2;
2298  vx[2]=x3;
2299  vy[0]=y1;
2300  vy[1]=y2;
2301  vy[2]=y3;
2302 
2303  return(polygonRGBA(renderer,vx,vy,3,r,g,b,a));
2304 }
2305 
2306 /* ------ AA-Trigon */
2307 
2324 int aatrigonColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color)
2325 {
2326  Sint16 vx[3];
2327  Sint16 vy[3];
2328 
2329  vx[0]=x1;
2330  vx[1]=x2;
2331  vx[2]=x3;
2332  vy[0]=y1;
2333  vy[1]=y2;
2334  vy[2]=y3;
2335 
2336  return(aapolygonColor(renderer,vx,vy,3,color));
2337 }
2338 
2356 int aatrigonRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3,
2357  Uint8 r, Uint8 g, Uint8 b, Uint8 a)
2358 {
2359  Sint16 vx[3];
2360  Sint16 vy[3];
2361 
2362  vx[0]=x1;
2363  vx[1]=x2;
2364  vx[2]=x3;
2365  vy[0]=y1;
2366  vy[1]=y2;
2367  vy[2]=y3;
2368 
2369  return(aapolygonRGBA(renderer,vx,vy,3,r,g,b,a));
2370 }
2371 
2372 /* ------ Filled Trigon */
2373 
2390 int filledTrigonColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color)
2391 {
2392  Sint16 vx[3];
2393  Sint16 vy[3];
2394 
2395  vx[0]=x1;
2396  vx[1]=x2;
2397  vx[2]=x3;
2398  vy[0]=y1;
2399  vy[1]=y2;
2400  vy[2]=y3;
2401 
2402  return(filledPolygonColor(renderer,vx,vy,3,color));
2403 }
2404 
2424 int filledTrigonRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3,
2425  Uint8 r, Uint8 g, Uint8 b, Uint8 a)
2426 {
2427  Sint16 vx[3];
2428  Sint16 vy[3];
2429 
2430  vx[0]=x1;
2431  vx[1]=x2;
2432  vx[2]=x3;
2433  vy[0]=y1;
2434  vy[1]=y2;
2435  vy[2]=y3;
2436 
2437  return(filledPolygonRGBA(renderer,vx,vy,3,r,g,b,a));
2438 }
2439 
2440 /* ---- Polygon */
2441 
2453 int polygonColor(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n, Uint32 color)
2454 {
2455  Uint8 *c = (Uint8 *)&color;
2456  return polygonRGBA(renderer, vx, vy, n, c[0], c[1], c[2], c[3]);
2457 }
2458 
2469 int polygon(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n)
2470 {
2471  /*
2472  * Draw
2473  */
2474  int result = 0;
2475  int i, nn;
2476  SDL_Point* points;
2477 
2478  /*
2479  * Vertex array NULL check
2480  */
2481  if (vx == NULL) {
2482  return (-1);
2483  }
2484  if (vy == NULL) {
2485  return (-1);
2486  }
2487 
2488  /*
2489  * Sanity check
2490  */
2491  if (n < 3) {
2492  return (-1);
2493  }
2494 
2495  /*
2496  * Create array of points
2497  */
2498  nn = n + 1;
2499  points = (SDL_Point*)malloc(sizeof(SDL_Point) * nn);
2500  if (points == NULL)
2501  {
2502  return -1;
2503  }
2504  for (i=0; i<n; i++)
2505  {
2506  points[i].x = vx[i];
2507  points[i].y = vy[i];
2508  }
2509  points[n].x = vx[0];
2510  points[n].y = vy[0];
2511 
2512  /*
2513  * Draw
2514  */
2515  result |= SDL_RenderDrawLines(renderer, points, nn);
2516  free(points);
2517 
2518  return (result);
2519 }
2520 
2535 int polygonRGBA(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
2536 {
2537  /*
2538  * Draw
2539  */
2540  int result;
2541  const Sint16 *x1, *y1, *x2, *y2;
2542 
2543  /*
2544  * Vertex array NULL check
2545  */
2546  if (vx == NULL) {
2547  return (-1);
2548  }
2549  if (vy == NULL) {
2550  return (-1);
2551  }
2552 
2553  /*
2554  * Sanity check
2555  */
2556  if (n < 3) {
2557  return (-1);
2558  }
2559 
2560  /*
2561  * Pointer setup
2562  */
2563  x1 = x2 = vx;
2564  y1 = y2 = vy;
2565  x2++;
2566  y2++;
2567 
2568  /*
2569  * Set color
2570  */
2571  result = 0;
2572  result |= SDL_SetRenderDrawBlendMode(renderer, (a == 255) ? SDL_BLENDMODE_NONE : SDL_BLENDMODE_BLEND);
2573  result |= SDL_SetRenderDrawColor(renderer, r, g, b, a);
2574 
2575  /*
2576  * Draw
2577  */
2578  result |= polygon(renderer, vx, vy, n);
2579 
2580  return (result);
2581 }
2582 
2583 /* ---- AA-Polygon */
2584 
2596 int aapolygonColor(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n, Uint32 color)
2597 {
2598  Uint8 *c = (Uint8 *)&color;
2599  return aapolygonRGBA(renderer, vx, vy, n, c[0], c[1], c[2], c[3]);
2600 }
2601 
2616 int aapolygonRGBA(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
2617 {
2618  int result;
2619  int i;
2620  const Sint16 *x1, *y1, *x2, *y2;
2621 
2622  /*
2623  * Vertex array NULL check
2624  */
2625  if (vx == NULL) {
2626  return (-1);
2627  }
2628  if (vy == NULL) {
2629  return (-1);
2630  }
2631 
2632  /*
2633  * Sanity check
2634  */
2635  if (n < 3) {
2636  return (-1);
2637  }
2638 
2639  /*
2640  * Pointer setup
2641  */
2642  x1 = x2 = vx;
2643  y1 = y2 = vy;
2644  x2++;
2645  y2++;
2646 
2647  /*
2648  * Draw
2649  */
2650  result = 0;
2651  for (i = 1; i < n; i++) {
2652  result |= _aalineRGBA(renderer, *x1, *y1, *x2, *y2, r, g, b, a, 0);
2653  x1 = x2;
2654  y1 = y2;
2655  x2++;
2656  y2++;
2657  }
2658 
2659  result |= _aalineRGBA(renderer, *x1, *y1, *vx, *vy, r, g, b, a, 0);
2660 
2661  return (result);
2662 }
2663 
2664 /* ---- Filled Polygon */
2665 
2674 int _gfxPrimitivesCompareInt(const void *a, const void *b)
2675 {
2676  return (*(const int *) a) - (*(const int *) b);
2677 }
2678 
2684 static int *gfxPrimitivesPolyIntsGlobal = NULL;
2685 
2691 static int gfxPrimitivesPolyAllocatedGlobal = 0;
2692 
2711 int filledPolygonRGBAMT(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a, int **polyInts, int *polyAllocated)
2712 {
2713  int result;
2714  int i;
2715  int y, xa, xb;
2716  int miny, maxy;
2717  int x1, y1;
2718  int x2, y2;
2719  int ind1, ind2;
2720  int ints;
2721  int *gfxPrimitivesPolyInts = NULL;
2722  int *gfxPrimitivesPolyIntsNew = NULL;
2723  int gfxPrimitivesPolyAllocated = 0;
2724 
2725  /*
2726  * Vertex array NULL check
2727  */
2728  if (vx == NULL) {
2729  return (-1);
2730  }
2731  if (vy == NULL) {
2732  return (-1);
2733  }
2734 
2735  /*
2736  * Sanity check number of edges
2737  */
2738  if (n < 3) {
2739  return -1;
2740  }
2741 
2742  /*
2743  * Map polygon cache
2744  */
2745  if ((polyInts==NULL) || (polyAllocated==NULL)) {
2746  /* Use global cache */
2747  gfxPrimitivesPolyInts = gfxPrimitivesPolyIntsGlobal;
2748  gfxPrimitivesPolyAllocated = gfxPrimitivesPolyAllocatedGlobal;
2749  } else {
2750  /* Use local cache */
2751  gfxPrimitivesPolyInts = *polyInts;
2752  gfxPrimitivesPolyAllocated = *polyAllocated;
2753  }
2754 
2755  /*
2756  * Allocate temp array, only grow array
2757  */
2758  if (!gfxPrimitivesPolyAllocated) {
2759  gfxPrimitivesPolyInts = (int *) malloc(sizeof(int) * n);
2760  gfxPrimitivesPolyAllocated = n;
2761  } else {
2762  if (gfxPrimitivesPolyAllocated < n) {
2763  gfxPrimitivesPolyIntsNew = (int *) realloc(gfxPrimitivesPolyInts, sizeof(int) * n);
2764  if (!gfxPrimitivesPolyIntsNew) {
2765  if (!gfxPrimitivesPolyInts) {
2766  free(gfxPrimitivesPolyInts);
2767  gfxPrimitivesPolyInts = NULL;
2768  }
2769  gfxPrimitivesPolyAllocated = 0;
2770  } else {
2771  gfxPrimitivesPolyInts = gfxPrimitivesPolyIntsNew;
2772  gfxPrimitivesPolyAllocated = n;
2773  }
2774  }
2775  }
2776 
2777  /*
2778  * Check temp array
2779  */
2780  if (gfxPrimitivesPolyInts==NULL) {
2781  gfxPrimitivesPolyAllocated = 0;
2782  }
2783 
2784  /*
2785  * Update cache variables
2786  */
2787  if ((polyInts==NULL) || (polyAllocated==NULL)) {
2788  gfxPrimitivesPolyIntsGlobal = gfxPrimitivesPolyInts;
2789  gfxPrimitivesPolyAllocatedGlobal = gfxPrimitivesPolyAllocated;
2790  } else {
2791  *polyInts = gfxPrimitivesPolyInts;
2792  *polyAllocated = gfxPrimitivesPolyAllocated;
2793  }
2794 
2795  /*
2796  * Check temp array again
2797  */
2798  if (gfxPrimitivesPolyInts==NULL) {
2799  return(-1);
2800  }
2801 
2802  /*
2803  * Determine Y maxima
2804  */
2805  miny = vy[0];
2806  maxy = vy[0];
2807  for (i = 1; (i < n); i++) {
2808  if (vy[i] < miny) {
2809  miny = vy[i];
2810  } else if (vy[i] > maxy) {
2811  maxy = vy[i];
2812  }
2813  }
2814 
2815  /*
2816  * Draw, scanning y
2817  */
2818  result = 0;
2819  for (y = miny; (y <= maxy); y++) {
2820  ints = 0;
2821  for (i = 0; (i < n); i++) {
2822  if (!i) {
2823  ind1 = n - 1;
2824  ind2 = 0;
2825  } else {
2826  ind1 = i - 1;
2827  ind2 = i;
2828  }
2829  y1 = vy[ind1];
2830  y2 = vy[ind2];
2831  if (y1 < y2) {
2832  x1 = vx[ind1];
2833  x2 = vx[ind2];
2834  } else if (y1 > y2) {
2835  y2 = vy[ind1];
2836  y1 = vy[ind2];
2837  x2 = vx[ind1];
2838  x1 = vx[ind2];
2839  } else {
2840  continue;
2841  }
2842  if ( ((y >= y1) && (y < y2)) || ((y == maxy) && (y > y1) && (y <= y2)) ) {
2843  gfxPrimitivesPolyInts[ints++] = ((65536 * (y - y1)) / (y2 - y1)) * (x2 - x1) + (65536 * x1);
2844  }
2845  }
2846 
2847  qsort(gfxPrimitivesPolyInts, ints, sizeof(int), _gfxPrimitivesCompareInt);
2848 
2849  /*
2850  * Set color
2851  */
2852  result = 0;
2853  result |= SDL_SetRenderDrawBlendMode(renderer, (a == 255) ? SDL_BLENDMODE_NONE : SDL_BLENDMODE_BLEND);
2854  result |= SDL_SetRenderDrawColor(renderer, r, g, b, a);
2855 
2856  for (i = 0; (i < ints); i += 2) {
2857  xa = gfxPrimitivesPolyInts[i] + 1;
2858  xa = (xa >> 16) + ((xa & 32768) >> 15);
2859  xb = gfxPrimitivesPolyInts[i+1] - 1;
2860  xb = (xb >> 16) + ((xb & 32768) >> 15);
2861  result |= hline(renderer, xa, xb, y);
2862  }
2863  }
2864 
2865  return (result);
2866 }
2867 
2879 int filledPolygonColor(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n, Uint32 color)
2880 {
2881  Uint8 *c = (Uint8 *)&color;
2882  return filledPolygonRGBAMT(renderer, vx, vy, n, c[0], c[1], c[2], c[3], NULL, NULL);
2883 }
2884 
2899 int filledPolygonRGBA(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
2900 {
2901  return filledPolygonRGBAMT(renderer, vx, vy, n, r, g, b, a, NULL, NULL);
2902 }
2903 
2904 /* ---- Textured Polygon */
2905 
2921 int _HLineTextured(SDL_Renderer *renderer, Sint16 x1, Sint16 x2, Sint16 y, SDL_Texture *texture, int texture_w, int texture_h, int texture_dx, int texture_dy)
2922 {
2923  Sint16 w;
2924  Sint16 xtmp;
2925  int result = 0;
2926  int texture_x_walker;
2927  int texture_y_start;
2928  SDL_Rect source_rect,dst_rect;
2929  int pixels_written,write_width;
2930 
2931  /*
2932  * Swap x1, x2 if required to ensure x1<=x2
2933  */
2934  if (x1 > x2) {
2935  xtmp = x1;
2936  x1 = x2;
2937  x2 = xtmp;
2938  }
2939 
2940  /*
2941  * Calculate width to draw
2942  */
2943  w = x2 - x1 + 1;
2944 
2945  /*
2946  * Determine where in the texture we start drawing
2947  */
2948  texture_x_walker = (x1 - texture_dx) % texture_w;
2949  if (texture_x_walker < 0){
2950  texture_x_walker = texture_w + texture_x_walker ;
2951  }
2952 
2953  texture_y_start = (y + texture_dy) % texture_h;
2954  if (texture_y_start < 0){
2955  texture_y_start = texture_h + texture_y_start;
2956  }
2957 
2958  /* setup the source rectangle; we are only drawing one horizontal line */
2959  source_rect.y = texture_y_start;
2960  source_rect.x = texture_x_walker;
2961  source_rect.h = 1;
2962 
2963  /* we will draw to the current y */
2964  dst_rect.y = y;
2965  dst_rect.h = 1;
2966 
2967  /* if there are enough pixels left in the current row of the texture */
2968  /* draw it all at once */
2969  if (w <= texture_w -texture_x_walker){
2970  source_rect.w = w;
2971  source_rect.x = texture_x_walker;
2972  dst_rect.x= x1;
2973  dst_rect.w = source_rect.w;
2974  result = (SDL_RenderCopy(renderer, texture, &source_rect, &dst_rect) == 0);
2975  } else {
2976  /* we need to draw multiple times */
2977  /* draw the first segment */
2978  pixels_written = texture_w - texture_x_walker;
2979  source_rect.w = pixels_written;
2980  source_rect.x = texture_x_walker;
2981  dst_rect.x= x1;
2982  dst_rect.w = source_rect.w;
2983  result |= (SDL_RenderCopy(renderer, texture, &source_rect, &dst_rect) == 0);
2984  write_width = texture_w;
2985 
2986  /* now draw the rest */
2987  /* set the source x to 0 */
2988  source_rect.x = 0;
2989  while (pixels_written < w){
2990  if (write_width >= w - pixels_written) {
2991  write_width = w - pixels_written;
2992  }
2993  source_rect.w = write_width;
2994  dst_rect.x = x1 + pixels_written;
2995  dst_rect.w = source_rect.w;
2996  result |= (SDL_RenderCopy(renderer, texture, &source_rect, &dst_rect) == 0);
2997  pixels_written += write_width;
2998  }
2999  }
3000 
3001  return result;
3002 }
3003 
3020 int texturedPolygonMT(SDL_Renderer *renderer, const Sint16 * vx, const Sint16 * vy, int n,
3021  SDL_Surface * texture, int texture_dx, int texture_dy, int **polyInts, int *polyAllocated)
3022 {
3023  int result;
3024  int i;
3025  int y, xa, xb;
3026  int minx,maxx,miny, maxy;
3027  int x1, y1;
3028  int x2, y2;
3029  int ind1, ind2;
3030  int ints;
3031  int *gfxPrimitivesPolyInts = NULL;
3032  int *gfxPrimitivesPolyIntsTemp = NULL;
3033  int gfxPrimitivesPolyAllocated = 0;
3034  SDL_Texture *textureAsTexture = NULL;
3035 
3036  /*
3037  * Sanity check number of edges
3038  */
3039  if (n < 3) {
3040  return -1;
3041  }
3042 
3043  /*
3044  * Map polygon cache
3045  */
3046  if ((polyInts==NULL) || (polyAllocated==NULL)) {
3047  /* Use global cache */
3048  gfxPrimitivesPolyInts = gfxPrimitivesPolyIntsGlobal;
3049  gfxPrimitivesPolyAllocated = gfxPrimitivesPolyAllocatedGlobal;
3050  } else {
3051  /* Use local cache */
3052  gfxPrimitivesPolyInts = *polyInts;
3053  gfxPrimitivesPolyAllocated = *polyAllocated;
3054  }
3055 
3056  /*
3057  * Allocate temp array, only grow array
3058  */
3059  if (!gfxPrimitivesPolyAllocated) {
3060  gfxPrimitivesPolyInts = (int *) malloc(sizeof(int) * n);
3061  gfxPrimitivesPolyAllocated = n;
3062  } else {
3063  if (gfxPrimitivesPolyAllocated < n) {
3064  gfxPrimitivesPolyIntsTemp = (int *) realloc(gfxPrimitivesPolyInts, sizeof(int) * n);
3065  if (gfxPrimitivesPolyIntsTemp == NULL) {
3066  /* Realloc failed - keeps original memory block, but fails this operation */
3067  return(-1);
3068  }
3069  gfxPrimitivesPolyInts = gfxPrimitivesPolyIntsTemp;
3070  gfxPrimitivesPolyAllocated = n;
3071  }
3072  }
3073 
3074  /*
3075  * Check temp array
3076  */
3077  if (gfxPrimitivesPolyInts==NULL) {
3078  gfxPrimitivesPolyAllocated = 0;
3079  }
3080 
3081  /*
3082  * Update cache variables
3083  */
3084  if ((polyInts==NULL) || (polyAllocated==NULL)) {
3085  gfxPrimitivesPolyIntsGlobal = gfxPrimitivesPolyInts;
3086  gfxPrimitivesPolyAllocatedGlobal = gfxPrimitivesPolyAllocated;
3087  } else {
3088  *polyInts = gfxPrimitivesPolyInts;
3089  *polyAllocated = gfxPrimitivesPolyAllocated;
3090  }
3091 
3092  /*
3093  * Check temp array again
3094  */
3095  if (gfxPrimitivesPolyInts==NULL) {
3096  return(-1);
3097  }
3098 
3099  /*
3100  * Determine X,Y minima,maxima
3101  */
3102  miny = vy[0];
3103  maxy = vy[0];
3104  minx = vx[0];
3105  maxx = vx[0];
3106  for (i = 1; (i < n); i++) {
3107  if (vy[i] < miny) {
3108  miny = vy[i];
3109  } else if (vy[i] > maxy) {
3110  maxy = vy[i];
3111  }
3112  if (vx[i] < minx) {
3113  minx = vx[i];
3114  } else if (vx[i] > maxx) {
3115  maxx = vx[i];
3116  }
3117  }
3118 
3119  /* Create texture for drawing */
3120  textureAsTexture = SDL_CreateTextureFromSurface(renderer, texture);
3121  if (textureAsTexture == NULL)
3122  {
3123  return -1;
3124  }
3125  SDL_SetTextureBlendMode(textureAsTexture, SDL_BLENDMODE_BLEND);
3126 
3127  /*
3128  * Draw, scanning y
3129  */
3130  result = 0;
3131  for (y = miny; (y <= maxy); y++) {
3132  ints = 0;
3133  for (i = 0; (i < n); i++) {
3134  if (!i) {
3135  ind1 = n - 1;
3136  ind2 = 0;
3137  } else {
3138  ind1 = i - 1;
3139  ind2 = i;
3140  }
3141  y1 = vy[ind1];
3142  y2 = vy[ind2];
3143  if (y1 < y2) {
3144  x1 = vx[ind1];
3145  x2 = vx[ind2];
3146  } else if (y1 > y2) {
3147  y2 = vy[ind1];
3148  y1 = vy[ind2];
3149  x2 = vx[ind1];
3150  x1 = vx[ind2];
3151  } else {
3152  continue;
3153  }
3154  if ( ((y >= y1) && (y < y2)) || ((y == maxy) && (y > y1) && (y <= y2)) ) {
3155  gfxPrimitivesPolyInts[ints++] = ((65536 * (y - y1)) / (y2 - y1)) * (x2 - x1) + (65536 * x1);
3156  }
3157  }
3158 
3159  qsort(gfxPrimitivesPolyInts, ints, sizeof(int), _gfxPrimitivesCompareInt);
3160 
3161  for (i = 0; (i < ints); i += 2) {
3162  xa = gfxPrimitivesPolyInts[i] + 1;
3163  xa = (xa >> 16) + ((xa & 32768) >> 15);
3164  xb = gfxPrimitivesPolyInts[i+1] - 1;
3165  xb = (xb >> 16) + ((xb & 32768) >> 15);
3166  result |= _HLineTextured(renderer, xa, xb, y, textureAsTexture, texture->w, texture->h, texture_dx, texture_dy);
3167  }
3168  }
3169 
3170  SDL_RenderPresent(renderer);
3171  SDL_DestroyTexture(textureAsTexture);
3172 
3173  return (result);
3174 }
3175 
3192 int texturedPolygon(SDL_Renderer *renderer, const Sint16 * vx, const Sint16 * vy, int n, SDL_Surface *texture, int texture_dx, int texture_dy)
3193 {
3194  /*
3195  * Draw
3196  */
3197  return (texturedPolygonMT(renderer, vx, vy, n, texture, texture_dx, texture_dy, NULL, NULL));
3198 }
3199 
3200 /* ---- Character */
3201 
3205 static SDL_Texture *gfxPrimitivesFont[256];
3206 
3210 static const unsigned char *currentFontdata = gfxPrimitivesFontdata;
3211 
3215 static Uint32 charWidth = 8;
3216 
3220 static Uint32 charHeight = 8;
3221 
3225 static Uint32 charWidthLocal = 8;
3226 
3230 static Uint32 charHeightLocal = 8;
3231 
3235 static Uint32 charPitch = 1;
3236 
3240 static Uint32 charRotation = 0;
3241 
3245 static Uint32 charSize = 8;
3246 
3260 void gfxPrimitivesSetFont(const void *fontdata, Uint32 cw, Uint32 ch)
3261 {
3262  int i;
3263 
3264  if ((fontdata) && (cw) && (ch)) {
3265  currentFontdata = (unsigned char *)fontdata;
3266  charWidth = cw;
3267  charHeight = ch;
3268  } else {
3269  currentFontdata = gfxPrimitivesFontdata;
3270  charWidth = 8;
3271  charHeight = 8;
3272  }
3273 
3274  charPitch = (charWidth+7)/8;
3275  charSize = charPitch * charHeight;
3276 
3277  /* Maybe flip width/height for rendering */
3278  if ((charRotation==1) || (charRotation==3))
3279  {
3280  charWidthLocal = charHeight;
3281  charHeightLocal = charWidth;
3282  }
3283  else
3284  {
3285  charWidthLocal = charWidth;
3286  charHeightLocal = charHeight;
3287  }
3288 
3289  /* Clear character cache */
3290  for (i = 0; i < 256; i++) {
3291  if (gfxPrimitivesFont[i]) {
3292  SDL_DestroyTexture(gfxPrimitivesFont[i]);
3293  gfxPrimitivesFont[i] = NULL;
3294  }
3295  }
3296 }
3297 
3306 void gfxPrimitivesSetFontRotation(Uint32 rotation)
3307 {
3308  int i;
3309 
3310  rotation = rotation & 3;
3311  if (charRotation != rotation)
3312  {
3313  /* Store rotation */
3314  charRotation = rotation;
3315 
3316  /* Maybe flip width/height for rendering */
3317  if ((charRotation==1) || (charRotation==3))
3318  {
3319  charWidthLocal = charHeight;
3320  charHeightLocal = charWidth;
3321  }
3322  else
3323  {
3324  charWidthLocal = charWidth;
3325  charHeightLocal = charHeight;
3326  }
3327 
3328  /* Clear character cache */
3329  for (i = 0; i < 256; i++) {
3330  if (gfxPrimitivesFont[i]) {
3331  SDL_DestroyTexture(gfxPrimitivesFont[i]);
3332  gfxPrimitivesFont[i] = NULL;
3333  }
3334  }
3335  }
3336 }
3337 
3352 int characterRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, char c, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
3353 {
3354  SDL_Rect srect;
3355  SDL_Rect drect;
3356  int result;
3357  Uint32 ix, iy;
3358  const unsigned char *charpos;
3359  Uint8 *curpos;
3360  Uint8 patt, mask;
3361  Uint8 *linepos;
3362  Uint32 pitch;
3363  SDL_Surface *character;
3364  SDL_Surface *rotatedCharacter;
3365  Uint32 ci;
3366 
3367  /*
3368  * Setup source rectangle
3369  */
3370  srect.x = 0;
3371  srect.y = 0;
3372  srect.w = charWidthLocal;
3373  srect.h = charHeightLocal;
3374 
3375  /*
3376  * Setup destination rectangle
3377  */
3378  drect.x = x;
3379  drect.y = y;
3380  drect.w = charWidthLocal;
3381  drect.h = charHeightLocal;
3382 
3383  /* Character index in cache */
3384  ci = (unsigned char) c;
3385 
3386  /*
3387  * Create new charWidth x charHeight bitmap surface if not already present.
3388  * Might get rotated later.
3389  */
3390  if (gfxPrimitivesFont[ci] == NULL) {
3391  /*
3392  * Redraw character into surface
3393  */
3394  character = SDL_CreateRGBSurface(SDL_SWSURFACE,
3395  charWidth, charHeight, 32,
3396  0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF);
3397  if (character == NULL) {
3398  return (-1);
3399  }
3400 
3401  charpos = currentFontdata + ci * charSize;
3402  linepos = (Uint8 *)character->pixels;
3403  pitch = character->pitch;
3404 
3405  /*
3406  * Drawing loop
3407  */
3408  patt = 0;
3409  for (iy = 0; iy < charHeight; iy++) {
3410  mask = 0x00;
3411  curpos = linepos;
3412  for (ix = 0; ix < charWidth; ix++) {
3413  if (!(mask >>= 1)) {
3414  patt = *charpos++;
3415  mask = 0x80;
3416  }
3417  if (patt & mask) {
3418  *(Uint32 *)curpos = 0xffffffff;
3419  } else {
3420  *(Uint32 *)curpos = 0;
3421  }
3422  curpos += 4;
3423  }
3424  linepos += pitch;
3425  }
3426 
3427  /* Maybe rotate and replace cached image */
3428  if (charRotation>0)
3429  {
3430  rotatedCharacter = rotateSurface90Degrees(character, charRotation);
3431  SDL_FreeSurface(character);
3432  character = rotatedCharacter;
3433  }
3434 
3435  /* Convert temp surface into texture */
3436  gfxPrimitivesFont[ci] = SDL_CreateTextureFromSurface(renderer, character);
3437  SDL_FreeSurface(character);
3438 
3439  /*
3440  * Check pointer
3441  */
3442  if (gfxPrimitivesFont[ci] == NULL) {
3443  return (-1);
3444  }
3445  }
3446 
3447  /*
3448  * Set color
3449  */
3450  result = 0;
3451  result |= SDL_SetTextureColorMod(gfxPrimitivesFont[ci], r, g, b);
3452  result |= SDL_SetTextureAlphaMod(gfxPrimitivesFont[ci], a);
3453 
3454  /*
3455  * Draw texture onto destination
3456  */
3457  result |= SDL_RenderCopy(renderer, gfxPrimitivesFont[ci], &srect, &drect);
3458 
3459  return (result);
3460 }
3461 
3462 
3474 int characterColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, char c, Uint32 color)
3475 {
3476  Uint8 *co = (Uint8 *)&color;
3477  return characterRGBA(renderer, x, y, c, co[0], co[1], co[2], co[3]);
3478 }
3479 
3480 
3495 int stringColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, const char *s, Uint32 color)
3496 {
3497  Uint8 *c = (Uint8 *)&color;
3498  return stringRGBA(renderer, x, y, s, c[0], c[1], c[2], c[3]);
3499 }
3500 
3515 int stringRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, const char *s, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
3516 {
3517  int result = 0;
3518  Sint16 curx = x;
3519  Sint16 cury = y;
3520  const char *curchar = s;
3521 
3522  while (*curchar && !result) {
3523  result |= characterRGBA(renderer, curx, cury, *curchar, r, g, b, a);
3524  switch (charRotation)
3525  {
3526  case 0:
3527  curx += charWidthLocal;
3528  break;
3529  case 2:
3530  curx -= charWidthLocal;
3531  break;
3532  case 1:
3533  cury += charHeightLocal;
3534  break;
3535  case 3:
3536  cury -= charHeightLocal;
3537  break;
3538  }
3539  curchar++;
3540  }
3541 
3542  return (result);
3543 }
3544 
3545 /* ---- Bezier curve */
3546 
3556 double _evaluateBezier (double *data, int ndata, double t)
3557 {
3558  double mu, result;
3559  int n,k,kn,nn,nkn;
3560  double blend,muk,munk;
3561 
3562  /* Sanity check bounds */
3563  if (t<0.0) {
3564  return(data[0]);
3565  }
3566  if (t>=(double)ndata) {
3567  return(data[ndata-1]);
3568  }
3569 
3570  /* Adjust t to the range 0.0 to 1.0 */
3571  mu=t/(double)ndata;
3572 
3573  /* Calculate interpolate */
3574  n=ndata-1;
3575  result=0.0;
3576  muk = 1;
3577  munk = pow(1-mu,(double)n);
3578  for (k=0;k<=n;k++) {
3579  nn = n;
3580  kn = k;
3581  nkn = n - k;
3582  blend = muk * munk;
3583  muk *= mu;
3584  munk /= (1-mu);
3585  while (nn >= 1) {
3586  blend *= nn;
3587  nn--;
3588  if (kn > 1) {
3589  blend /= (double)kn;
3590  kn--;
3591  }
3592  if (nkn > 1) {
3593  blend /= (double)nkn;
3594  nkn--;
3595  }
3596  }
3597  result += data[k] * blend;
3598  }
3599 
3600  return (result);
3601 }
3602 
3615 int bezierColor(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n, int s, Uint32 color)
3616 {
3617  Uint8 *c = (Uint8 *)&color;
3618  return bezierRGBA(renderer, vx, vy, n, s, c[0], c[1], c[2], c[3]);
3619 }
3620 
3636 int bezierRGBA(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n, int s, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
3637 {
3638  int result;
3639  int i;
3640  double *x, *y, t, stepsize;
3641  Sint16 x1, y1, x2, y2;
3642 
3643  /*
3644  * Sanity check
3645  */
3646  if (n < 3) {
3647  return (-1);
3648  }
3649  if (s < 2) {
3650  return (-1);
3651  }
3652 
3653  /*
3654  * Variable setup
3655  */
3656  stepsize=(double)1.0/(double)s;
3657 
3658  /* Transfer vertices into float arrays */
3659  if ((x=(double *)malloc(sizeof(double)*(n+1)))==NULL) {
3660  return(-1);
3661  }
3662  if ((y=(double *)malloc(sizeof(double)*(n+1)))==NULL) {
3663  free(x);
3664  return(-1);
3665  }
3666  for (i=0; i<n; i++) {
3667  x[i]=(double)vx[i];
3668  y[i]=(double)vy[i];
3669  }
3670  x[n]=(double)vx[0];
3671  y[n]=(double)vy[0];
3672 
3673  /*
3674  * Set color
3675  */
3676  result = 0;
3677  result |= SDL_SetRenderDrawBlendMode(renderer, (a == 255) ? SDL_BLENDMODE_NONE : SDL_BLENDMODE_BLEND);
3678  result |= SDL_SetRenderDrawColor(renderer, r, g, b, a);
3679 
3680  /*
3681  * Draw
3682  */
3683  t=0.0;
3684  x1=(Sint16)lrint(_evaluateBezier(x,n+1,t));
3685  y1=(Sint16)lrint(_evaluateBezier(y,n+1,t));
3686  for (i = 0; i <= (n*s); i++) {
3687  t += stepsize;
3688  x2=(Sint16)_evaluateBezier(x,n,t);
3689  y2=(Sint16)_evaluateBezier(y,n,t);
3690  result |= line(renderer, x1, y1, x2, y2);
3691  x1 = x2;
3692  y1 = y2;
3693  }
3694 
3695  /* Clean up temporary array */
3696  free(x);
3697  free(y);
3698 
3699  return (result);
3700 }
3701 
3702 
3716 int thickLineColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 width, Uint32 color)
3717 {
3718  Uint8 *c = (Uint8 *)&color;
3719  return thickLineRGBA(renderer, x1, y1, x2, y2, width, c[0], c[1], c[2], c[3]);
3720 }
3721 
3738 int thickLineRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 width, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
3739 {
3740  int wh;
3741  double dx, dy, dx1, dy1, dx2, dy2;
3742  double l, wl2, nx, ny, ang, adj;
3743  Sint16 px[4], py[4];
3744 
3745  if (renderer == NULL) {
3746  return -1;
3747  }
3748 
3749  if (width < 1) {
3750  return -1;
3751  }
3752 
3753  /* Special case: thick "point" */
3754  if ((x1 == x2) && (y1 == y2)) {
3755  wh = width / 2;
3756  return boxRGBA(renderer, x1 - wh, y1 - wh, x2 + width, y2 + width, r, g, b, a);
3757  }
3758 
3759  /* Special case: width == 1 */
3760  if (width == 1) {
3761  return lineRGBA(renderer, x1, y1, x2, y2, r, g, b, a);
3762  }
3763 
3764  /* Calculate offsets for sides */
3765  dx = (double)(x2 - x1);
3766  dy = (double)(y2 - y1);
3767  l = SDL_sqrt(dx*dx + dy*dy);
3768  ang = SDL_atan2(dx, dy);
3769  adj = 0.1 + 0.9 * SDL_fabs(SDL_cos(2.0 * ang));
3770  wl2 = ((double)width - adj)/(2.0 * l);
3771  nx = dx * wl2;
3772  ny = dy * wl2;
3773 
3774  /* Build polygon */
3775  dx1 = (double)x1;
3776  dy1 = (double)y1;
3777  dx2 = (double)x2;
3778  dy2 = (double)y2;
3779  px[0] = (Sint16)(dx1 + ny);
3780  px[1] = (Sint16)(dx1 - ny);
3781  px[2] = (Sint16)(dx2 - ny);
3782  px[3] = (Sint16)(dx2 + ny);
3783  py[0] = (Sint16)(dy1 - nx);
3784  py[1] = (Sint16)(dy1 + nx);
3785  py[2] = (Sint16)(dy2 + nx);
3786  py[3] = (Sint16)(dy2 - nx);
3787 
3788  /* Draw polygon */
3789  return filledPolygonRGBA(renderer, px, py, 4, r, g, b, a);
3790 }
int polygonColor(SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint32 color)
Draw polygon with alpha blending.
int filledPieColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color)
Draw filled pie with alpha blending.
int line(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2)
Draw line with alpha blending using the currently set color.
int _drawQuadrants(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 dx, Sint16 dy, Sint32 f)
Internal function to draw pixels or lines in 4 quadrants.
int filledPolygonRGBAMT(SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a, int **polyInts, int *polyAllocated)
Draw filled polygon with alpha blending (multi-threaded capable).
int roundedBoxRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw rounded-corner box (filled rectangle) with blending.
int boxColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
Draw box (filled rectangle) with blending.
int pixelColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Uint32 color)
Draw pixel with blending enabled if a<255.
The structure passed to the internal Murphy iterator.
int ellipseRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw ellipse with blending.
int filledEllipseRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw filled ellipse with blending.
int trigonRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw trigon (triangle outline) with alpha blending.
The structure passed to the internal Bresenham iterator.
int arcColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color)
Arc with blending.
int aatrigonColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color)
Draw anti-aliased trigon (triangle outline) with alpha blending.
int filledPolygonColor(SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint32 color)
Draw filled polygon with alpha blending.
void gfxPrimitivesSetFont(const void *fontdata, Uint32 cw, Uint32 ch)
Sets or resets the current global font data.
int pixelRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw pixel with blending enabled if a<255.
int ellipseColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color)
Draw ellipse with blending.
int roundedRectangleColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint32 color)
Draw rounded-corner rectangle with blending.
int boxRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw box (filled rectangle) with blending.
int roundedRectangleRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw rounded-corner rectangle with blending.
int polygon(SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n)
Draw polygon with the currently set color and blend mode.
int circleColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint32 color)
Draw circle with blending.
int hlineRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 x2, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw horizontal line with blending.
int rectangleColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
Draw rectangle with blending.
int texturedPolygon(SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, SDL_Surface *texture, int texture_dx, int texture_dy)
Draws a polygon filled with the given texture.
int stringRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, const char *s, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw a string in the currently set font.
int aapolygonColor(SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint32 color)
Draw anti-aliased polygon with alpha blending.
#define AAbits
int pixelRGBAWeight(SDL_Renderer *renderer, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a, Uint32 weight)
Draw pixel with blending enabled and using alpha weight on color.
int pixel(SDL_Renderer *renderer, Sint16 x, Sint16 y)
Draw pixel in currently set color.
int aacircleColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint32 color)
Draw anti-aliased circle with blending.
int filledCircleColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint32 color)
Draw filled circle with blending.
int lineRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw line with alpha blending.
int aaellipseRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw anti-aliased ellipse with blending.
int filledTrigonRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw filled trigon (triangle) with alpha blending.
int _HLineTextured(SDL_Renderer *renderer, Sint16 x1, Sint16 x2, Sint16 y, SDL_Texture *texture, int texture_w, int texture_h, int texture_dx, int texture_dy)
Internal function to draw a textured horizontal line.
double _evaluateBezier(double *data, int ndata, double t)
Internal function to calculate bezier interpolator of data array with ndata values at position 't'...
int aalineColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
Draw anti-aliased line with alpha blending.
void gfxPrimitivesSetFontRotation(Uint32 rotation)
Sets current global font character rotation steps.
int bezierRGBA(SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, int s, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw a bezier curve with alpha blending.
int lineColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
Draw line with alpha blending.
int thickLineRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 width, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw a thick line with alpha blending.
#define AAlevels
int circleRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw circle with blending.
int _gfxPrimitivesCompareInt(const void *a, const void *b)
Internal helper qsort callback functions used in filled polygon drawing.
int _ellipseRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a, Sint32 f)
int hlineColor(SDL_Renderer *renderer, Sint16 x1, Sint16 x2, Sint16 y, Uint32 color)
Draw horizontal line with blending.
int stringColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, const char *s, Uint32 color)
Draw a string in the currently set font.
int rectangleRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw rectangle with blending.
int polygonRGBA(SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw polygon with alpha blending.
int vline(SDL_Renderer *renderer, Sint16 x, Sint16 y1, Sint16 y2)
Draw vertical line in currently set color.
int aacircleRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw anti-aliased circle with blending.
int filledCircleRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw filled circle with blending.
int filledTrigonColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color)
Draw filled trigon (triangle) with alpha blending.
int characterRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, char c, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw a character of the currently set font.
int aapolygonRGBA(SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw anti-aliased polygon with alpha blending.
int _aalineRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a, int draw_endpoint)
Internal function to draw anti-aliased line with alpha blending and endpoint control.
int trigonColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color)
Draw trigon (triangle outline) with alpha blending.
int aatrigonRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw anti-aliased trigon (triangle outline) with alpha blending.
int thickLineColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 width, Uint32 color)
Draw a thick line with alpha blending.
#define M_PI
int texturedPolygonMT(SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, SDL_Surface *texture, int texture_dx, int texture_dy, int **polyInts, int *polyAllocated)
Draws a polygon filled with the given texture (Multi-Threading Capable).
int characterColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, char c, Uint32 color)
Draw a character of the currently set font.
int bezierColor(SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, int s, Uint32 color)
Draw a bezier curve with alpha blending.
int _pieRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a, Uint8 filled)
Internal float (low-speed) pie-calc implementation by drawing polygons.
int filledEllipseColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color)
Draw filled ellipse with blending.
int hline(SDL_Renderer *renderer, Sint16 x1, Sint16 x2, Sint16 y)
Draw horizontal line in currently set color.
int filledPolygonRGBA(SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw filled polygon with alpha blending.
int pieColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color)
Draw pie (outline) with alpha blending.
#define ELLIPSE_OVERSCAN
Internal function to draw ellipse or filled ellipse with blending.
int filledPieRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw filled pie with alpha blending.
int vlineRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y1, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw vertical line with blending.
int aalineRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw anti-aliased line with alpha blending.
int roundedBoxColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint32 color)
Draw rounded-corner box (filled rectangle) with blending.
int pieRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw pie (outline) with alpha blending.
int aaellipseColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color)
Draw anti-aliased ellipse with blending.
int vlineColor(SDL_Renderer *renderer, Sint16 x, Sint16 y1, Sint16 y2, Uint32 color)
Draw vertical line with blending.
int arcRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Arc with blending.
SDL_Surface * rotateSurface90Degrees(SDL_Surface *src, int numClockwiseTurns)
Rotates a 8/16/24/32 bit surface in increments of 90 degrees.
SDL2_gfx-1.0.4/Docs/html/_s_d_l2__gfx_primitives_8h.html100777 0 0 701726 12632323332 16157 0 SDL2_gfx: /cygdrive/i/Sources/sdl2gfx/SDL2_gfxPrimitives.h File Reference
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
/cygdrive/i/Sources/sdl2gfx/SDL2_gfxPrimitives.h File Reference
#include <math.h>
#include "SDL.h"

Go to the source code of this file.

Macros

#define M_PI   3.1415926535897932384626433832795
 
#define SDL2_GFXPRIMITIVES_MAJOR   1
 
#define SDL2_GFXPRIMITIVES_MINOR   0
 
#define SDL2_GFXPRIMITIVES_MICRO   2
 
#define SDL2_GFXPRIMITIVES_SCOPE   extern
 

Functions

SDL2_GFXPRIMITIVES_SCOPE int pixelColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, Uint32 color)
 Draw pixel with blending enabled if a<255. More...
 
SDL2_GFXPRIMITIVES_SCOPE int pixelRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw pixel with blending enabled if a<255. More...
 
SDL2_GFXPRIMITIVES_SCOPE int hlineColor (SDL_Renderer *renderer, Sint16 x1, Sint16 x2, Sint16 y, Uint32 color)
 Draw horizontal line with blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int hlineRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 x2, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw horizontal line with blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int vlineColor (SDL_Renderer *renderer, Sint16 x, Sint16 y1, Sint16 y2, Uint32 color)
 Draw vertical line with blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int vlineRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y1, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw vertical line with blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int rectangleColor (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
 Draw rectangle with blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int rectangleRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw rectangle with blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int roundedRectangleColor (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint32 color)
 Draw rounded-corner rectangle with blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int roundedRectangleRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw rounded-corner rectangle with blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int boxColor (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
 Draw box (filled rectangle) with blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int boxRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw box (filled rectangle) with blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int roundedBoxColor (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint32 color)
 Draw rounded-corner box (filled rectangle) with blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int roundedBoxRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw rounded-corner box (filled rectangle) with blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int lineColor (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
 Draw line with alpha blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int lineRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw line with alpha blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int aalineColor (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
 Draw anti-aliased line with alpha blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int aalineRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw anti-aliased line with alpha blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int thickLineColor (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 width, Uint32 color)
 Draw a thick line with alpha blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int thickLineRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 width, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw a thick line with alpha blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int circleColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint32 color)
 Draw circle with blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int circleRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw circle with blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int arcColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color)
 Arc with blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int arcRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Arc with blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int aacircleColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint32 color)
 Draw anti-aliased circle with blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int aacircleRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw anti-aliased circle with blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int filledCircleColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 r, Uint32 color)
 Draw filled circle with blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int filledCircleRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw filled circle with blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int ellipseColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color)
 Draw ellipse with blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int ellipseRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw ellipse with blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int aaellipseColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color)
 Draw anti-aliased ellipse with blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int aaellipseRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw anti-aliased ellipse with blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int filledEllipseColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color)
 Draw filled ellipse with blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int filledEllipseRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw filled ellipse with blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int pieColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color)
 Draw pie (outline) with alpha blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int pieRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw pie (outline) with alpha blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int filledPieColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color)
 Draw filled pie with alpha blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int filledPieRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw filled pie with alpha blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int trigonColor (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color)
 Draw trigon (triangle outline) with alpha blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int trigonRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw trigon (triangle outline) with alpha blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int aatrigonColor (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color)
 Draw anti-aliased trigon (triangle outline) with alpha blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int aatrigonRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw anti-aliased trigon (triangle outline) with alpha blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int filledTrigonColor (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color)
 Draw filled trigon (triangle) with alpha blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int filledTrigonRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw filled trigon (triangle) with alpha blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int polygonColor (SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint32 color)
 Draw polygon with alpha blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int polygonRGBA (SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw polygon with alpha blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int aapolygonColor (SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint32 color)
 Draw anti-aliased polygon with alpha blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int aapolygonRGBA (SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw anti-aliased polygon with alpha blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int filledPolygonColor (SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint32 color)
 Draw filled polygon with alpha blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int filledPolygonRGBA (SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw filled polygon with alpha blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int texturedPolygon (SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, SDL_Surface *texture, int texture_dx, int texture_dy)
 Draws a polygon filled with the given texture. More...
 
SDL2_GFXPRIMITIVES_SCOPE int bezierColor (SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, int s, Uint32 color)
 Draw a bezier curve with alpha blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE int bezierRGBA (SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, int s, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw a bezier curve with alpha blending. More...
 
SDL2_GFXPRIMITIVES_SCOPE void gfxPrimitivesSetFont (const void *fontdata, Uint32 cw, Uint32 ch)
 Sets or resets the current global font data. More...
 
SDL2_GFXPRIMITIVES_SCOPE void gfxPrimitivesSetFontRotation (Uint32 rotation)
 Sets current global font character rotation steps. More...
 
SDL2_GFXPRIMITIVES_SCOPE int characterColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, char c, Uint32 color)
 Draw a character of the currently set font. More...
 
SDL2_GFXPRIMITIVES_SCOPE int characterRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, char c, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw a character of the currently set font. More...
 
SDL2_GFXPRIMITIVES_SCOPE int stringColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, const char *s, Uint32 color)
 Draw a string in the currently set font. More...
 
SDL2_GFXPRIMITIVES_SCOPE int stringRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, const char *s, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw a string in the currently set font. More...
 

Macro Definition Documentation

#define M_PI   3.1415926535897932384626433832795

Definition at line 35 of file SDL2_gfxPrimitives.h.

#define SDL2_GFXPRIMITIVES_MAJOR   1

Definition at line 47 of file SDL2_gfxPrimitives.h.

#define SDL2_GFXPRIMITIVES_MICRO   2

Definition at line 49 of file SDL2_gfxPrimitives.h.

#define SDL2_GFXPRIMITIVES_MINOR   0

Definition at line 48 of file SDL2_gfxPrimitives.h.

#define SDL2_GFXPRIMITIVES_SCOPE   extern

Definition at line 64 of file SDL2_gfxPrimitives.h.

Function Documentation

SDL2_GFXPRIMITIVES_SCOPE int aacircleColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Uint32  color 
)

Draw anti-aliased circle with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the aa-circle.
yY coordinate of the center of the aa-circle.
radRadius in pixels of the aa-circle.
colorThe color value of the aa-circle to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 1433 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int aacircleRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw anti-aliased circle with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the aa-circle.
yY coordinate of the center of the aa-circle.
radRadius in pixels of the aa-circle.
rThe red value of the aa-circle to draw.
gThe green value of the aa-circle to draw.
bThe blue value of the aa-circle to draw.
aThe alpha value of the aa-circle to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 1453 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int aaellipseColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rx,
Sint16  ry,
Uint32  color 
)

Draw anti-aliased ellipse with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the aa-ellipse.
yY coordinate of the center of the aa-ellipse.
rxHorizontal radius in pixels of the aa-ellipse.
ryVertical radius in pixels of the aa-ellipse.
colorThe color value of the aa-ellipse to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 1791 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int aaellipseRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rx,
Sint16  ry,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw anti-aliased ellipse with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the aa-ellipse.
yY coordinate of the center of the aa-ellipse.
rxHorizontal radius in pixels of the aa-ellipse.
ryVertical radius in pixels of the aa-ellipse.
rThe red value of the aa-ellipse to draw.
gThe green value of the aa-ellipse to draw.
bThe blue value of the aa-ellipse to draw.
aThe alpha value of the aa-ellipse to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 1812 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int aalineColor ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint32  color 
)

Draw anti-aliased line with alpha blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the aa-line.
y1Y coordinate of the first point of the aa-line.
x2X coordinate of the second point of the aa-line.
y2Y coordinate of the second point of the aa-line.
colorThe color value of the aa-line to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 1096 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int aalineRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw anti-aliased line with alpha blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the aa-line.
y1Y coordinate of the first point of the aa-line.
x2X coordinate of the second point of the aa-line.
y2Y coordinate of the second point of the aa-line.
rThe red value of the aa-line to draw.
gThe green value of the aa-line to draw.
bThe blue value of the aa-line to draw.
aThe alpha value of the aa-line to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 1117 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int aapolygonColor ( SDL_Renderer *  renderer,
const Sint16 *  vx,
const Sint16 *  vy,
int  n,
Uint32  color 
)

Draw anti-aliased polygon with alpha blending.

Parameters
rendererThe renderer to draw on.
vxVertex array containing X coordinates of the points of the aa-polygon.
vyVertex array containing Y coordinates of the points of the aa-polygon.
nNumber of points in the vertex array. Minimum number is 3.
colorThe color value of the aa-polygon to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 2596 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int aapolygonRGBA ( SDL_Renderer *  renderer,
const Sint16 *  vx,
const Sint16 *  vy,
int  n,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw anti-aliased polygon with alpha blending.

Parameters
rendererThe renderer to draw on.
vxVertex array containing X coordinates of the points of the aa-polygon.
vyVertex array containing Y coordinates of the points of the aa-polygon.
nNumber of points in the vertex array. Minimum number is 3.
rThe red value of the aa-polygon to draw.
gThe green value of the aa-polygon to draw.
bThe blue value of the aa-polygon to draw.
aThe alpha value of the aa-polygon to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 2616 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int aatrigonColor ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  x3,
Sint16  y3,
Uint32  color 
)

Draw anti-aliased trigon (triangle outline) with alpha blending.

Note: Creates vertex array and uses aapolygon routine to render.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the aa-trigon.
y1Y coordinate of the first point of the aa-trigon.
x2X coordinate of the second point of the aa-trigon.
y2Y coordinate of the second point of the aa-trigon.
x3X coordinate of the third point of the aa-trigon.
y3Y coordinate of the third point of the aa-trigon.
colorThe color value of the aa-trigon to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 2324 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int aatrigonRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  x3,
Sint16  y3,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw anti-aliased trigon (triangle outline) with alpha blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the aa-trigon.
y1Y coordinate of the first point of the aa-trigon.
x2X coordinate of the second point of the aa-trigon.
y2Y coordinate of the second point of the aa-trigon.
x3X coordinate of the third point of the aa-trigon.
y3Y coordinate of the third point of the aa-trigon.
rThe red value of the aa-trigon to draw.
gThe green value of the aa-trigon to draw.
bThe blue value of the aa-trigon to draw.
aThe alpha value of the aa-trigon to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 2356 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int arcColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Sint16  start,
Sint16  end,
Uint32  color 
)

Arc with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the arc.
yY coordinate of the center of the arc.
radRadius in pixels of the arc.
startStarting radius in degrees of the arc. 0 degrees is down, increasing counterclockwise.
endEnding radius in degrees of the arc. 0 degrees is down, increasing counterclockwise.
colorThe color value of the arc to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 1175 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int arcRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Sint16  start,
Sint16  end,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Arc with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the arc.
yY coordinate of the center of the arc.
radRadius in pixels of the arc.
startStarting radius in degrees of the arc. 0 degrees is down, increasing counterclockwise.
endEnding radius in degrees of the arc. 0 degrees is down, increasing counterclockwise.
rThe red value of the arc to draw.
gThe green value of the arc to draw.
bThe blue value of the arc to draw.
aThe alpha value of the arc to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 1198 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int bezierColor ( SDL_Renderer *  renderer,
const Sint16 *  vx,
const Sint16 *  vy,
int  n,
int  s,
Uint32  color 
)

Draw a bezier curve with alpha blending.

Parameters
rendererThe renderer to draw on.
vxVertex array containing X coordinates of the points of the bezier curve.
vyVertex array containing Y coordinates of the points of the bezier curve.
nNumber of points in the vertex array. Minimum number is 3.
sNumber of steps for the interpolation. Minimum number is 2.
colorThe color value of the bezier curve to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 3615 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int bezierRGBA ( SDL_Renderer *  renderer,
const Sint16 *  vx,
const Sint16 *  vy,
int  n,
int  s,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw a bezier curve with alpha blending.

Parameters
rendererThe renderer to draw on.
vxVertex array containing X coordinates of the points of the bezier curve.
vyVertex array containing Y coordinates of the points of the bezier curve.
nNumber of points in the vertex array. Minimum number is 3.
sNumber of steps for the interpolation. Minimum number is 2.
rThe red value of the bezier curve to draw.
gThe green value of the bezier curve to draw.
bThe blue value of the bezier curve to draw.
aThe alpha value of the bezier curve to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 3636 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int boxColor ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint32  color 
)

Draw box (filled rectangle) with blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point (i.e. top right) of the box.
y1Y coordinate of the first point (i.e. top right) of the box.
x2X coordinate of the second point (i.e. bottom left) of the box.
y2Y coordinate of the second point (i.e. bottom left) of the box.
colorThe color value of the box to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 710 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int boxRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw box (filled rectangle) with blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point (i.e. top right) of the box.
y1Y coordinate of the first point (i.e. top right) of the box.
x2X coordinate of the second point (i.e. bottom left) of the box.
y2Y coordinate of the second point (i.e. bottom left) of the box.
rThe red value of the box to draw.
gThe green value of the box to draw.
bThe blue value of the box to draw.
aThe alpha value of the box to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 731 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int characterColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
char  c,
Uint32  color 
)

Draw a character of the currently set font.

Parameters
rendererThe renderer to draw on.
xX (horizontal) coordinate of the upper left corner of the character.
yY (vertical) coordinate of the upper left corner of the character.
cThe character to draw.
colorThe color value of the character to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 3474 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int characterRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
char  c,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw a character of the currently set font.

Parameters
rendererThe Renderer to draw on.
xX (horizontal) coordinate of the upper left corner of the character.
yY (vertical) coordinate of the upper left corner of the character.
cThe character to draw.
rThe red value of the character to draw.
gThe green value of the character to draw.
bThe blue value of the character to draw.
aThe alpha value of the character to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 3352 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int circleColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Uint32  color 
)

Draw circle with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the circle.
yY coordinate of the center of the circle.
radRadius in pixels of the circle.
colorThe color value of the circle to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 1135 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int circleRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw circle with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the circle.
yY coordinate of the center of the circle.
radRadius in pixels of the circle.
rThe red value of the circle to draw.
gThe green value of the circle to draw.
bThe blue value of the circle to draw.
aThe alpha value of the circle to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 1155 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int ellipseColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rx,
Sint16  ry,
Uint32  color 
)

Draw ellipse with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the ellipse.
yY coordinate of the center of the ellipse.
rxHorizontal radius in pixels of the ellipse.
ryVertical radius in pixels of the ellipse.
colorThe color value of the ellipse to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 1672 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int ellipseRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rx,
Sint16  ry,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw ellipse with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the ellipse.
yY coordinate of the center of the ellipse.
rxHorizontal radius in pixels of the ellipse.
ryVertical radius in pixels of the ellipse.
rThe red value of the ellipse to draw.
gThe green value of the ellipse to draw.
bThe blue value of the ellipse to draw.
aThe alpha value of the ellipse to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 1693 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int filledCircleColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Uint32  color 
)

Draw filled circle with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the filled circle.
yY coordinate of the center of the filled circle.
radRadius in pixels of the filled circle.
colorThe color value of the filled circle to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 1711 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int filledCircleRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw filled circle with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the filled circle.
yY coordinate of the center of the filled circle.
radRadius in pixels of the filled circle.
rThe red value of the filled circle to draw.
gThe green value of the filled circle to draw.
bThe blue value of the filled circle to draw.
aThe alpha value of the filled circle to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 1731 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int filledEllipseColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rx,
Sint16  ry,
Uint32  color 
)

Draw filled ellipse with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the filled ellipse.
yY coordinate of the center of the filled ellipse.
rxHorizontal radius in pixels of the filled ellipse.
ryVertical radius in pixels of the filled ellipse.
colorThe color value of the filled ellipse to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 2007 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int filledEllipseRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rx,
Sint16  ry,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw filled ellipse with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the filled ellipse.
yY coordinate of the center of the filled ellipse.
rxHorizontal radius in pixels of the filled ellipse.
ryVertical radius in pixels of the filled ellipse.
rThe red value of the filled ellipse to draw.
gThe green value of the filled ellipse to draw.
bThe blue value of the filled ellipse to draw.
aThe alpha value of the filled ellipse to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 2028 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int filledPieColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Sint16  start,
Sint16  end,
Uint32  color 
)

Draw filled pie with alpha blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the filled pie.
yY coordinate of the center of the filled pie.
radRadius in pixels of the filled pie.
startStarting radius in degrees of the filled pie.
endEnding radius in degrees of the filled pie.
colorThe color value of the filled pie to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 2212 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int filledPieRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Sint16  start,
Sint16  end,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw filled pie with alpha blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the filled pie.
yY coordinate of the center of the filled pie.
radRadius in pixels of the filled pie.
startStarting radius in degrees of the filled pie.
endEnding radius in degrees of the filled pie.
rThe red value of the filled pie to draw.
gThe green value of the filled pie to draw.
bThe blue value of the filled pie to draw.
aThe alpha value of the filled pie to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 2234 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int filledPolygonColor ( SDL_Renderer *  renderer,
const Sint16 *  vx,
const Sint16 *  vy,
int  n,
Uint32  color 
)

Draw filled polygon with alpha blending.

Parameters
rendererThe renderer to draw on.
vxVertex array containing X coordinates of the points of the filled polygon.
vyVertex array containing Y coordinates of the points of the filled polygon.
nNumber of points in the vertex array. Minimum number is 3.
colorThe color value of the filled polygon to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 2879 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int filledPolygonRGBA ( SDL_Renderer *  renderer,
const Sint16 *  vx,
const Sint16 *  vy,
int  n,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw filled polygon with alpha blending.

Parameters
rendererThe renderer to draw on.
vxVertex array containing X coordinates of the points of the filled polygon.
vyVertex array containing Y coordinates of the points of the filled polygon.
nNumber of points in the vertex array. Minimum number is 3.
rThe red value of the filled polygon to draw.
gThe green value of the filled polygon to draw.
bThe blue value of the filed polygon to draw.
aThe alpha value of the filled polygon to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 2899 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int filledTrigonColor ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  x3,
Sint16  y3,
Uint32  color 
)

Draw filled trigon (triangle) with alpha blending.

Note: Creates vertex array and uses aapolygon routine to render.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the filled trigon.
y1Y coordinate of the first point of the filled trigon.
x2X coordinate of the second point of the filled trigon.
y2Y coordinate of the second point of the filled trigon.
x3X coordinate of the third point of the filled trigon.
y3Y coordinate of the third point of the filled trigon.
colorThe color value of the filled trigon to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 2390 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int filledTrigonRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  x3,
Sint16  y3,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw filled trigon (triangle) with alpha blending.

Note: Creates vertex array and uses aapolygon routine to render.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the filled trigon.
y1Y coordinate of the first point of the filled trigon.
x2X coordinate of the second point of the filled trigon.
y2Y coordinate of the second point of the filled trigon.
x3X coordinate of the third point of the filled trigon.
y3Y coordinate of the third point of the filled trigon.
rThe red value of the filled trigon to draw.
gThe green value of the filled trigon to draw.
bThe blue value of the filled trigon to draw.
aThe alpha value of the filled trigon to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 2424 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE void gfxPrimitivesSetFont ( const void *  fontdata,
Uint32  cw,
Uint32  ch 
)

Sets or resets the current global font data.

The font data array is organized in follows: [fontdata] = [character 0][character 1]...[character 255] where [character n] = [byte 1 row 1][byte 2 row 1]...[byte {pitch} row 1][byte 1 row 2] ...[byte {pitch} row height] where [byte n] = [bit 0]...[bit 7] where [bit n] = [0 for transparent pixel|1 for colored pixel]

Parameters
fontdataPointer to array of font data. Set to NULL, to reset global font to the default 8x8 font.
cwWidth of character in bytes. Ignored if fontdata==NULL.
chHeight of character in bytes. Ignored if fontdata==NULL.

Definition at line 3260 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE void gfxPrimitivesSetFontRotation ( Uint32  rotation)

Sets current global font character rotation steps.

Default is 0 (no rotation). 1 = 90deg clockwise. 2 = 180deg clockwise. 3 = 270deg clockwise. Changing the rotation, will reset the character cache.

Parameters
rotationNumber of 90deg clockwise steps to rotate

Definition at line 3306 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int hlineColor ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  x2,
Sint16  y,
Uint32  color 
)

Draw horizontal line with blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point (i.e. left) of the line.
x2X coordinate of the second point (i.e. right) of the line.
yY coordinate of the points of the line.
colorThe color value of the line to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 175 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int hlineRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  x2,
Sint16  y,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw horizontal line with blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point (i.e. left) of the line.
x2X coordinate of the second point (i.e. right) of the line.
yY coordinate of the points of the line.
rThe red value of the line to draw.
gThe green value of the line to draw.
bThe blue value of the line to draw.
aThe alpha value of the line to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 195 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int lineColor ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint32  color 
)

Draw line with alpha blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the line.
y1Y coordinate of the first point of the line.
x2X coordinate of the second point of the line.
y2Y coordinate of the seond point of the line.
colorThe color value of the line to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 821 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int lineRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw line with alpha blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the line.
y1Y coordinate of the first point of the line.
x2X coordinate of the second point of the line.
y2Y coordinate of the second point of the line.
rThe red value of the line to draw.
gThe green value of the line to draw.
bThe blue value of the line to draw.
aThe alpha value of the line to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 842 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int pieColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Sint16  start,
Sint16  end,
Uint32  color 
)

Draw pie (outline) with alpha blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the pie.
yY coordinate of the center of the pie.
radRadius in pixels of the pie.
startStarting radius in degrees of the pie.
endEnding radius in degrees of the pie.
colorThe color value of the pie to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 2170 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int pieRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Sint16  start,
Sint16  end,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw pie (outline) with alpha blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the pie.
yY coordinate of the center of the pie.
radRadius in pixels of the pie.
startStarting radius in degrees of the pie.
endEnding radius in degrees of the pie.
rThe red value of the pie to draw.
gThe green value of the pie to draw.
bThe blue value of the pie to draw.
aThe alpha value of the pie to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 2193 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int pixelColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Uint32  color 
)

Draw pixel with blending enabled if a<255.

Parameters
rendererThe renderer to draw on.
xX (horizontal) coordinate of the pixel.
yY (vertical) coordinate of the pixel.
colorThe color value of the pixel to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 88 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int pixelRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw pixel with blending enabled if a<255.

Parameters
rendererThe renderer to draw on.
xX (horizontal) coordinate of the pixel.
yY (vertical) coordinate of the pixel.
rThe red color value of the pixel to draw.
gThe green color value of the pixel to draw.
bThe blue color value of the pixel to draw.
aThe alpha value of the pixel to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 107 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int polygonColor ( SDL_Renderer *  renderer,
const Sint16 *  vx,
const Sint16 *  vy,
int  n,
Uint32  color 
)

Draw polygon with alpha blending.

Parameters
rendererThe renderer to draw on.
vxVertex array containing X coordinates of the points of the polygon.
vyVertex array containing Y coordinates of the points of the polygon.
nNumber of points in the vertex array. Minimum number is 3.
colorThe color value of the polygon to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 2453 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int polygonRGBA ( SDL_Renderer *  renderer,
const Sint16 *  vx,
const Sint16 *  vy,
int  n,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw polygon with alpha blending.

Parameters
rendererThe renderer to draw on.
vxVertex array containing X coordinates of the points of the polygon.
vyVertex array containing Y coordinates of the points of the polygon.
nNumber of points in the vertex array. Minimum number is 3.
rThe red value of the polygon to draw.
gThe green value of the polygon to draw.
bThe blue value of the polygon to draw.
aThe alpha value of the polygon to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 2535 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int rectangleColor ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint32  color 
)

Draw rectangle with blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point (i.e. top right) of the rectangle.
y1Y coordinate of the first point (i.e. top right) of the rectangle.
x2X coordinate of the second point (i.e. bottom left) of the rectangle.
y2Y coordinate of the second point (i.e. bottom left) of the rectangle.
colorThe color value of the rectangle to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 275 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int rectangleRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw rectangle with blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point (i.e. top right) of the rectangle.
y1Y coordinate of the first point (i.e. top right) of the rectangle.
x2X coordinate of the second point (i.e. bottom left) of the rectangle.
y2Y coordinate of the second point (i.e. bottom left) of the rectangle.
rThe red value of the rectangle to draw.
gThe green value of the rectangle to draw.
bThe blue value of the rectangle to draw.
aThe alpha value of the rectangle to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 296 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int roundedBoxColor ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  rad,
Uint32  color 
)

Draw rounded-corner box (filled rectangle) with blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point (i.e. top right) of the box.
y1Y coordinate of the first point (i.e. top right) of the box.
x2X coordinate of the second point (i.e. bottom left) of the box.
y2Y coordinate of the second point (i.e. bottom left) of the box.
radThe radius of the corner arcs of the box.
colorThe color value of the box to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 513 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int roundedBoxRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  rad,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw rounded-corner box (filled rectangle) with blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point (i.e. top right) of the box.
y1Y coordinate of the first point (i.e. top right) of the box.
x2X coordinate of the second point (i.e. bottom left) of the box.
y2Y coordinate of the second point (i.e. bottom left) of the box.
radThe radius of the corner arcs of the box.
rThe red value of the box to draw.
gThe green value of the box to draw.
bThe blue value of the box to draw.
aThe alpha value of the box to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 535 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int roundedRectangleColor ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  rad,
Uint32  color 
)

Draw rounded-corner rectangle with blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point (i.e. top right) of the rectangle.
y1Y coordinate of the first point (i.e. top right) of the rectangle.
x2X coordinate of the second point (i.e. bottom left) of the rectangle.
y2Y coordinate of the second point (i.e. bottom left) of the rectangle.
radThe radius of the corner arc.
colorThe color value of the rectangle to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 368 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int roundedRectangleRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  rad,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw rounded-corner rectangle with blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point (i.e. top right) of the rectangle.
y1Y coordinate of the first point (i.e. top right) of the rectangle.
x2X coordinate of the second point (i.e. bottom left) of the rectangle.
y2Y coordinate of the second point (i.e. bottom left) of the rectangle.
radThe radius of the corner arc.
rThe red value of the rectangle to draw.
gThe green value of the rectangle to draw.
bThe blue value of the rectangle to draw.
aThe alpha value of the rectangle to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 390 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int stringColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
const char *  s,
Uint32  color 
)

Draw a string in the currently set font.

The spacing between consequtive characters in the string is the fixed number of pixels of the character width of the current global font.

Parameters
rendererThe renderer to draw on.
xX (horizontal) coordinate of the upper left corner of the string.
yY (vertical) coordinate of the upper left corner of the string.
sThe string to draw.
colorThe color value of the string to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 3495 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int stringRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
const char *  s,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw a string in the currently set font.

Parameters
rendererThe renderer to draw on.
xX (horizontal) coordinate of the upper left corner of the string.
yY (vertical) coordinate of the upper left corner of the string.
sThe string to draw.
rThe red value of the string to draw.
gThe green value of the string to draw.
bThe blue value of the string to draw.
aThe alpha value of the string to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 3515 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int texturedPolygon ( SDL_Renderer *  renderer,
const Sint16 *  vx,
const Sint16 *  vy,
int  n,
SDL_Surface *  texture,
int  texture_dx,
int  texture_dy 
)

Draws a polygon filled with the given texture.

This standard version is calling multithreaded versions with NULL cache parameters.

Parameters
rendererThe renderer to draw on.
vxarray of x vector components
vyarray of x vector components
nthe amount of vectors in the vx and vy array
texturethe sdl surface to use to fill the polygon
texture_dxthe offset of the texture relative to the screeen. if you move the polygon 10 pixels to the left and want the texture to apear the same you need to increase the texture_dx value
texture_dysee texture_dx
Returns
Returns 0 on success, -1 on failure.

Definition at line 3192 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int thickLineColor ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint8  width,
Uint32  color 
)

Draw a thick line with alpha blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the line.
y1Y coordinate of the first point of the line.
x2X coordinate of the second point of the line.
y2Y coordinate of the second point of the line.
widthWidth of the line in pixels. Must be >0.
colorThe color value of the line to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 3716 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int thickLineRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint8  width,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw a thick line with alpha blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the line.
y1Y coordinate of the first point of the line.
x2X coordinate of the second point of the line.
y2Y coordinate of the second point of the line.
widthWidth of the line in pixels. Must be >0.
rThe red value of the character to draw.
gThe green value of the character to draw.
bThe blue value of the character to draw.
aThe alpha value of the character to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 3738 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int trigonColor ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  x3,
Sint16  y3,
Uint32  color 
)

Draw trigon (triangle outline) with alpha blending.

Note: Creates vertex array and uses polygon routine to render.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the trigon.
y1Y coordinate of the first point of the trigon.
x2X coordinate of the second point of the trigon.
y2Y coordinate of the second point of the trigon.
x3X coordinate of the third point of the trigon.
y3Y coordinate of the third point of the trigon.
colorThe color value of the trigon to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 2258 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int trigonRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  x3,
Sint16  y3,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw trigon (triangle outline) with alpha blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the trigon.
y1Y coordinate of the first point of the trigon.
x2X coordinate of the second point of the trigon.
y2Y coordinate of the second point of the trigon.
x3X coordinate of the third point of the trigon.
y3Y coordinate of the third point of the trigon.
rThe red value of the trigon to draw.
gThe green value of the trigon to draw.
bThe blue value of the trigon to draw.
aThe alpha value of the trigon to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 2290 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int vlineColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y1,
Sint16  y2,
Uint32  color 
)

Draw vertical line with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the points of the line.
y1Y coordinate of the first point (i.e. top) of the line.
y2Y coordinate of the second point (i.e. bottom) of the line.
colorThe color value of the line to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

Definition at line 232 of file SDL2_gfxPrimitives.c.

SDL2_GFXPRIMITIVES_SCOPE int vlineRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y1,
Sint16  y2,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw vertical line with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the points of the line.
y1Y coordinate of the first point (i.e. top) of the line.
y2Y coordinate of the second point (i.e. bottom) of the line.
rThe red value of the line to draw.
gThe green value of the line to draw.
bThe blue value of the line to draw.
aThe alpha value of the line to draw.
Returns
Returns 0 on success, -1 on failure.

Definition at line 252 of file SDL2_gfxPrimitives.c.

SDL2_gfx-1.0.4/Docs/html/_s_d_l2__gfx_primitives_8h_source.html100777 0 0 247267 12632323332 17544 0 SDL2_gfx: /cygdrive/i/Sources/sdl2gfx/SDL2_gfxPrimitives.h Source File
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
/cygdrive/i/Sources/sdl2gfx/SDL2_gfxPrimitives.h
Go to the documentation of this file.
1 /*
2 
3 SDL2_gfxPrimitives.h: graphics primitives for SDL
4 
5 Copyright (C) 2012-2014 Andreas Schiffler
6 
7 This software is provided 'as-is', without any express or implied
8 warranty. In no event will the authors be held liable for any damages
9 arising from the use of this software.
10 
11 Permission is granted to anyone to use this software for any purpose,
12 including commercial applications, and to alter it and redistribute it
13 freely, subject to the following restrictions:
14 
15 1. The origin of this software must not be misrepresented; you must not
16 claim that you wrote the original software. If you use this software
17 in a product, an acknowledgment in the product documentation would be
18 appreciated but is not required.
19 
20 2. Altered source versions must be plainly marked as such, and must not be
21 misrepresented as being the original software.
22 
23 3. This notice may not be removed or altered from any source
24 distribution.
25 
26 Andreas Schiffler -- aschiffler at ferzkopp dot net
27 
28 */
29 
30 #ifndef _SDL2_gfxPrimitives_h
31 #define _SDL2_gfxPrimitives_h
32 
33 #include <math.h>
34 #ifndef M_PI
35 #define M_PI 3.1415926535897932384626433832795
36 #endif
37 
38 #include "SDL.h"
39 
40 /* Set up for C function definitions, even when using C++ */
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
45  /* ----- Versioning */
46 
47 #define SDL2_GFXPRIMITIVES_MAJOR 1
48 #define SDL2_GFXPRIMITIVES_MINOR 0
49 #define SDL2_GFXPRIMITIVES_MICRO 2
50 
51 
52  /* ---- Function Prototypes */
53 
54 #ifdef _MSC_VER
55 # if defined(DLL_EXPORT) && !defined(LIBSDL2_GFX_DLL_IMPORT)
56 # define SDL2_GFXPRIMITIVES_SCOPE __declspec(dllexport)
57 # else
58 # ifdef LIBSDL2_GFX_DLL_IMPORT
59 # define SDL2_GFXPRIMITIVES_SCOPE __declspec(dllimport)
60 # endif
61 # endif
62 #endif
63 #ifndef SDL2_GFXPRIMITIVES_SCOPE
64 # define SDL2_GFXPRIMITIVES_SCOPE extern
65 #endif
66 
67  /* Note: all ___Color routines expect the color to be in format 0xRRGGBBAA */
68 
69  /* Pixel */
70 
71  SDL2_GFXPRIMITIVES_SCOPE int pixelColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Uint32 color);
72  SDL2_GFXPRIMITIVES_SCOPE int pixelRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
73 
74  /* Horizontal line */
75 
76  SDL2_GFXPRIMITIVES_SCOPE int hlineColor(SDL_Renderer * renderer, Sint16 x1, Sint16 x2, Sint16 y, Uint32 color);
77  SDL2_GFXPRIMITIVES_SCOPE int hlineRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 x2, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
78 
79  /* Vertical line */
80 
81  SDL2_GFXPRIMITIVES_SCOPE int vlineColor(SDL_Renderer * renderer, Sint16 x, Sint16 y1, Sint16 y2, Uint32 color);
82  SDL2_GFXPRIMITIVES_SCOPE int vlineRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y1, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
83 
84  /* Rectangle */
85 
86  SDL2_GFXPRIMITIVES_SCOPE int rectangleColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color);
87  SDL2_GFXPRIMITIVES_SCOPE int rectangleRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1,
88  Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
89 
90  /* Rounded-Corner Rectangle */
91 
92  SDL2_GFXPRIMITIVES_SCOPE int roundedRectangleColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint32 color);
93  SDL2_GFXPRIMITIVES_SCOPE int roundedRectangleRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1,
94  Sint16 x2, Sint16 y2, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
95 
96  /* Filled rectangle (Box) */
97 
98  SDL2_GFXPRIMITIVES_SCOPE int boxColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color);
99  SDL2_GFXPRIMITIVES_SCOPE int boxRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2,
100  Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
101 
102  /* Rounded-Corner Filled rectangle (Box) */
103 
104  SDL2_GFXPRIMITIVES_SCOPE int roundedBoxColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint32 color);
105  SDL2_GFXPRIMITIVES_SCOPE int roundedBoxRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2,
106  Sint16 y2, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
107 
108  /* Line */
109 
110  SDL2_GFXPRIMITIVES_SCOPE int lineColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color);
111  SDL2_GFXPRIMITIVES_SCOPE int lineRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1,
112  Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
113 
114  /* AA Line */
115 
116  SDL2_GFXPRIMITIVES_SCOPE int aalineColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color);
117  SDL2_GFXPRIMITIVES_SCOPE int aalineRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1,
118  Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
119 
120  /* Thick Line */
121  SDL2_GFXPRIMITIVES_SCOPE int thickLineColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2,
122  Uint8 width, Uint32 color);
123  SDL2_GFXPRIMITIVES_SCOPE int thickLineRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2,
124  Uint8 width, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
125 
126  /* Circle */
127 
128  SDL2_GFXPRIMITIVES_SCOPE int circleColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Uint32 color);
129  SDL2_GFXPRIMITIVES_SCOPE int circleRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
130 
131  /* Arc */
132 
133  SDL2_GFXPRIMITIVES_SCOPE int arcColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color);
134  SDL2_GFXPRIMITIVES_SCOPE int arcRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end,
135  Uint8 r, Uint8 g, Uint8 b, Uint8 a);
136 
137  /* AA Circle */
138 
139  SDL2_GFXPRIMITIVES_SCOPE int aacircleColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Uint32 color);
140  SDL2_GFXPRIMITIVES_SCOPE int aacircleRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y,
141  Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
142 
143  /* Filled Circle */
144 
145  SDL2_GFXPRIMITIVES_SCOPE int filledCircleColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 r, Uint32 color);
146  SDL2_GFXPRIMITIVES_SCOPE int filledCircleRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y,
147  Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
148 
149  /* Ellipse */
150 
151  SDL2_GFXPRIMITIVES_SCOPE int ellipseColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color);
152  SDL2_GFXPRIMITIVES_SCOPE int ellipseRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y,
153  Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
154 
155  /* AA Ellipse */
156 
157  SDL2_GFXPRIMITIVES_SCOPE int aaellipseColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color);
158  SDL2_GFXPRIMITIVES_SCOPE int aaellipseRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y,
159  Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
160 
161  /* Filled Ellipse */
162 
163  SDL2_GFXPRIMITIVES_SCOPE int filledEllipseColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color);
164  SDL2_GFXPRIMITIVES_SCOPE int filledEllipseRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y,
165  Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
166 
167  /* Pie */
168 
169  SDL2_GFXPRIMITIVES_SCOPE int pieColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad,
170  Sint16 start, Sint16 end, Uint32 color);
171  SDL2_GFXPRIMITIVES_SCOPE int pieRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad,
172  Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
173 
174  /* Filled Pie */
175 
176  SDL2_GFXPRIMITIVES_SCOPE int filledPieColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad,
177  Sint16 start, Sint16 end, Uint32 color);
178  SDL2_GFXPRIMITIVES_SCOPE int filledPieRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad,
179  Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
180 
181  /* Trigon */
182 
183  SDL2_GFXPRIMITIVES_SCOPE int trigonColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color);
184  SDL2_GFXPRIMITIVES_SCOPE int trigonRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3,
185  Uint8 r, Uint8 g, Uint8 b, Uint8 a);
186 
187  /* AA-Trigon */
188 
189  SDL2_GFXPRIMITIVES_SCOPE int aatrigonColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color);
190  SDL2_GFXPRIMITIVES_SCOPE int aatrigonRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3,
191  Uint8 r, Uint8 g, Uint8 b, Uint8 a);
192 
193  /* Filled Trigon */
194 
195  SDL2_GFXPRIMITIVES_SCOPE int filledTrigonColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color);
196  SDL2_GFXPRIMITIVES_SCOPE int filledTrigonRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3,
197  Uint8 r, Uint8 g, Uint8 b, Uint8 a);
198 
199  /* Polygon */
200 
201  SDL2_GFXPRIMITIVES_SCOPE int polygonColor(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n, Uint32 color);
202  SDL2_GFXPRIMITIVES_SCOPE int polygonRGBA(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy,
203  int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
204 
205  /* AA-Polygon */
206 
207  SDL2_GFXPRIMITIVES_SCOPE int aapolygonColor(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n, Uint32 color);
208  SDL2_GFXPRIMITIVES_SCOPE int aapolygonRGBA(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy,
209  int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
210 
211  /* Filled Polygon */
212 
213  SDL2_GFXPRIMITIVES_SCOPE int filledPolygonColor(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n, Uint32 color);
214  SDL2_GFXPRIMITIVES_SCOPE int filledPolygonRGBA(SDL_Renderer * renderer, const Sint16 * vx,
215  const Sint16 * vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
216 
217  /* Textured Polygon */
218 
219  SDL2_GFXPRIMITIVES_SCOPE int texturedPolygon(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n, SDL_Surface * texture,int texture_dx,int texture_dy);
220 
221  /* Bezier */
222 
223  SDL2_GFXPRIMITIVES_SCOPE int bezierColor(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n, int s, Uint32 color);
224  SDL2_GFXPRIMITIVES_SCOPE int bezierRGBA(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy,
225  int n, int s, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
226 
227  /* Characters/Strings */
228 
229  SDL2_GFXPRIMITIVES_SCOPE void gfxPrimitivesSetFont(const void *fontdata, Uint32 cw, Uint32 ch);
231  SDL2_GFXPRIMITIVES_SCOPE int characterColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, char c, Uint32 color);
232  SDL2_GFXPRIMITIVES_SCOPE int characterRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, char c, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
233  SDL2_GFXPRIMITIVES_SCOPE int stringColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, const char *s, Uint32 color);
234  SDL2_GFXPRIMITIVES_SCOPE int stringRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, const char *s, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
235 
236  /* Ends C function definitions when using C++ */
237 #ifdef __cplusplus
238 }
239 #endif
240 
241 #endif /* _SDL2_gfxPrimitives_h */
SDL2_GFXPRIMITIVES_SCOPE int roundedBoxColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint32 color)
Draw rounded-corner box (filled rectangle) with blending.
SDL2_GFXPRIMITIVES_SCOPE int ellipseColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color)
Draw ellipse with blending.
SDL2_GFXPRIMITIVES_SCOPE int filledEllipseColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color)
Draw filled ellipse with blending.
SDL2_GFXPRIMITIVES_SCOPE int bezierRGBA(SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, int s, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw a bezier curve with alpha blending.
SDL2_GFXPRIMITIVES_SCOPE int aacircleRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw anti-aliased circle with blending.
SDL2_GFXPRIMITIVES_SCOPE int stringRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, const char *s, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw a string in the currently set font.
SDL2_GFXPRIMITIVES_SCOPE int thickLineColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 width, Uint32 color)
Draw a thick line with alpha blending.
SDL2_GFXPRIMITIVES_SCOPE int hlineRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 x2, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw horizontal line with blending.
SDL2_GFXPRIMITIVES_SCOPE int texturedPolygon(SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, SDL_Surface *texture, int texture_dx, int texture_dy)
Draws a polygon filled with the given texture.
SDL2_GFXPRIMITIVES_SCOPE int circleRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw circle with blending.
SDL2_GFXPRIMITIVES_SCOPE int trigonRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw trigon (triangle outline) with alpha blending.
SDL2_GFXPRIMITIVES_SCOPE int aalineRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw anti-aliased line with alpha blending.
SDL2_GFXPRIMITIVES_SCOPE int arcColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color)
Arc with blending.
SDL2_GFXPRIMITIVES_SCOPE void gfxPrimitivesSetFontRotation(Uint32 rotation)
Sets current global font character rotation steps.
SDL2_GFXPRIMITIVES_SCOPE int characterColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, char c, Uint32 color)
Draw a character of the currently set font.
SDL2_GFXPRIMITIVES_SCOPE void gfxPrimitivesSetFont(const void *fontdata, Uint32 cw, Uint32 ch)
Sets or resets the current global font data.
SDL2_GFXPRIMITIVES_SCOPE int filledEllipseRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw filled ellipse with blending.
SDL2_GFXPRIMITIVES_SCOPE int arcRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Arc with blending.
SDL2_GFXPRIMITIVES_SCOPE int hlineColor(SDL_Renderer *renderer, Sint16 x1, Sint16 x2, Sint16 y, Uint32 color)
Draw horizontal line with blending.
SDL2_GFXPRIMITIVES_SCOPE int trigonColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color)
Draw trigon (triangle outline) with alpha blending.
SDL2_GFXPRIMITIVES_SCOPE int aacircleColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint32 color)
Draw anti-aliased circle with blending.
SDL2_GFXPRIMITIVES_SCOPE int pixelRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw pixel with blending enabled if a<255.
SDL2_GFXPRIMITIVES_SCOPE int pixelColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Uint32 color)
Draw pixel with blending enabled if a<255.
SDL2_GFXPRIMITIVES_SCOPE int filledPieRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw filled pie with alpha blending.
SDL2_GFXPRIMITIVES_SCOPE int filledPieColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color)
Draw filled pie with alpha blending.
SDL2_GFXPRIMITIVES_SCOPE int boxColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
Draw box (filled rectangle) with blending.
SDL2_GFXPRIMITIVES_SCOPE int roundedRectangleRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw rounded-corner rectangle with blending.
SDL2_GFXPRIMITIVES_SCOPE int filledCircleRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw filled circle with blending.
SDL2_GFXPRIMITIVES_SCOPE int rectangleRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw rectangle with blending.
SDL2_GFXPRIMITIVES_SCOPE int pieRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw pie (outline) with alpha blending.
SDL2_GFXPRIMITIVES_SCOPE int filledTrigonRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw filled trigon (triangle) with alpha blending.
SDL2_GFXPRIMITIVES_SCOPE int characterRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, char c, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw a character of the currently set font.
SDL2_GFXPRIMITIVES_SCOPE int aapolygonRGBA(SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw anti-aliased polygon with alpha blending.
SDL2_GFXPRIMITIVES_SCOPE int filledPolygonRGBA(SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw filled polygon with alpha blending.
SDL2_GFXPRIMITIVES_SCOPE int ellipseRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw ellipse with blending.
SDL2_GFXPRIMITIVES_SCOPE int vlineRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y1, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw vertical line with blending.
SDL2_GFXPRIMITIVES_SCOPE int thickLineRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 width, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw a thick line with alpha blending.
SDL2_GFXPRIMITIVES_SCOPE int lineColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
Draw line with alpha blending.
SDL2_GFXPRIMITIVES_SCOPE int roundedRectangleColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint32 color)
Draw rounded-corner rectangle with blending.
SDL2_GFXPRIMITIVES_SCOPE int stringColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, const char *s, Uint32 color)
Draw a string in the currently set font.
SDL2_GFXPRIMITIVES_SCOPE int filledTrigonColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color)
Draw filled trigon (triangle) with alpha blending.
SDL2_GFXPRIMITIVES_SCOPE int bezierColor(SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, int s, Uint32 color)
Draw a bezier curve with alpha blending.
SDL2_GFXPRIMITIVES_SCOPE int polygonColor(SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint32 color)
Draw polygon with alpha blending.
SDL2_GFXPRIMITIVES_SCOPE int polygonRGBA(SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw polygon with alpha blending.
SDL2_GFXPRIMITIVES_SCOPE int aalineColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
Draw anti-aliased line with alpha blending.
SDL2_GFXPRIMITIVES_SCOPE int filledPolygonColor(SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint32 color)
Draw filled polygon with alpha blending.
SDL2_GFXPRIMITIVES_SCOPE int aatrigonRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw anti-aliased trigon (triangle outline) with alpha blending.
SDL2_GFXPRIMITIVES_SCOPE int aapolygonColor(SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint32 color)
Draw anti-aliased polygon with alpha blending.
SDL2_GFXPRIMITIVES_SCOPE int boxRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw box (filled rectangle) with blending.
SDL2_GFXPRIMITIVES_SCOPE int pieColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color)
Draw pie (outline) with alpha blending.
#define SDL2_GFXPRIMITIVES_SCOPE
SDL2_GFXPRIMITIVES_SCOPE int lineRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw line with alpha blending.
SDL2_GFXPRIMITIVES_SCOPE int filledCircleColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 r, Uint32 color)
Draw filled circle with blending.
SDL2_GFXPRIMITIVES_SCOPE int aaellipseRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw anti-aliased ellipse with blending.
SDL2_GFXPRIMITIVES_SCOPE int aatrigonColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color)
Draw anti-aliased trigon (triangle outline) with alpha blending.
SDL2_GFXPRIMITIVES_SCOPE int circleColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint32 color)
Draw circle with blending.
SDL2_GFXPRIMITIVES_SCOPE int rectangleColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
Draw rectangle with blending.
SDL2_GFXPRIMITIVES_SCOPE int aaellipseColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color)
Draw anti-aliased ellipse with blending.
SDL2_GFXPRIMITIVES_SCOPE int roundedBoxRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw rounded-corner box (filled rectangle) with blending.
SDL2_GFXPRIMITIVES_SCOPE int vlineColor(SDL_Renderer *renderer, Sint16 x, Sint16 y1, Sint16 y2, Uint32 color)
Draw vertical line with blending.
SDL2_gfx-1.0.4/Docs/html/_s_d_l2__gfx_primitives__font_8h.html100777 0 0 6647 12632323332 17304 0 SDL2_gfx: /cygdrive/i/Sources/sdl2gfx/SDL2_gfxPrimitives_font.h File Reference
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
/cygdrive/i/Sources/sdl2gfx/SDL2_gfxPrimitives_font.h File Reference

Go to the source code of this file.

Macros

#define GFX_FONTDATAMAX   (8*256)
 

Macro Definition Documentation

#define GFX_FONTDATAMAX   (8*256)

Definition at line 30 of file SDL2_gfxPrimitives_font.h.

SDL2_gfx-1.0.4/Docs/html/_s_d_l2__gfx_primitives__font_8h_source.html100777 0 0 1575451 12632323332 20751 0 SDL2_gfx: /cygdrive/i/Sources/sdl2gfx/SDL2_gfxPrimitives_font.h Source File
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
/cygdrive/i/Sources/sdl2gfx/SDL2_gfxPrimitives_font.h
Go to the documentation of this file.
1 /*
2 
3 SDL2_gfxPrimitives_font.h: 8x8 font definition
4 
5 Copyright (C) 2012-2014 Andreas Schiffler
6 
7 This software is provided 'as-is', without any express or implied
8 warranty. In no event will the authors be held liable for any damages
9 arising from the use of this software.
10 
11 Permission is granted to anyone to use this software for any purpose,
12 including commercial applications, and to alter it and redistribute it
13 freely, subject to the following restrictions:
14 
15 1. The origin of this software must not be misrepresented; you must not
16 claim that you wrote the original software. If you use this software
17 in a product, an acknowledgment in the product documentation would be
18 appreciated but is not required.
19 
20 2. Altered source versions must be plainly marked as such, and must not be
21 misrepresented as being the original software.
22 
23 3. This notice may not be removed or altered from any source
24 distribution.
25 
26 Andreas Schiffler -- aschiffler at ferzkopp dot net
27 
28 */
29 
30 #define GFX_FONTDATAMAX (8*256)
31 
32 static unsigned char gfxPrimitivesFontdata[GFX_FONTDATAMAX] = {
33 
34  /*
35  * 0 0x00 '^@'
36  */
37  0x00, /* 00000000 */
38  0x00, /* 00000000 */
39  0x00, /* 00000000 */
40  0x00, /* 00000000 */
41  0x00, /* 00000000 */
42  0x00, /* 00000000 */
43  0x00, /* 00000000 */
44  0x00, /* 00000000 */
45 
46  /*
47  * 1 0x01 '^A'
48  */
49  0x7e, /* 01111110 */
50  0x81, /* 10000001 */
51  0xa5, /* 10100101 */
52  0x81, /* 10000001 */
53  0xbd, /* 10111101 */
54  0x99, /* 10011001 */
55  0x81, /* 10000001 */
56  0x7e, /* 01111110 */
57 
58  /*
59  * 2 0x02 '^B'
60  */
61  0x7e, /* 01111110 */
62  0xff, /* 11111111 */
63  0xdb, /* 11011011 */
64  0xff, /* 11111111 */
65  0xc3, /* 11000011 */
66  0xe7, /* 11100111 */
67  0xff, /* 11111111 */
68  0x7e, /* 01111110 */
69 
70  /*
71  * 3 0x03 '^C'
72  */
73  0x6c, /* 01101100 */
74  0xfe, /* 11111110 */
75  0xfe, /* 11111110 */
76  0xfe, /* 11111110 */
77  0x7c, /* 01111100 */
78  0x38, /* 00111000 */
79  0x10, /* 00010000 */
80  0x00, /* 00000000 */
81 
82  /*
83  * 4 0x04 '^D'
84  */
85  0x10, /* 00010000 */
86  0x38, /* 00111000 */
87  0x7c, /* 01111100 */
88  0xfe, /* 11111110 */
89  0x7c, /* 01111100 */
90  0x38, /* 00111000 */
91  0x10, /* 00010000 */
92  0x00, /* 00000000 */
93 
94  /*
95  * 5 0x05 '^E'
96  */
97  0x38, /* 00111000 */
98  0x7c, /* 01111100 */
99  0x38, /* 00111000 */
100  0xfe, /* 11111110 */
101  0xfe, /* 11111110 */
102  0xd6, /* 11010110 */
103  0x10, /* 00010000 */
104  0x38, /* 00111000 */
105 
106  /*
107  * 6 0x06 '^F'
108  */
109  0x10, /* 00010000 */
110  0x38, /* 00111000 */
111  0x7c, /* 01111100 */
112  0xfe, /* 11111110 */
113  0xfe, /* 11111110 */
114  0x7c, /* 01111100 */
115  0x10, /* 00010000 */
116  0x38, /* 00111000 */
117 
118  /*
119  * 7 0x07 '^G'
120  */
121  0x00, /* 00000000 */
122  0x00, /* 00000000 */
123  0x18, /* 00011000 */
124  0x3c, /* 00111100 */
125  0x3c, /* 00111100 */
126  0x18, /* 00011000 */
127  0x00, /* 00000000 */
128  0x00, /* 00000000 */
129 
130  /*
131  * 8 0x08 '^H'
132  */
133  0xff, /* 11111111 */
134  0xff, /* 11111111 */
135  0xe7, /* 11100111 */
136  0xc3, /* 11000011 */
137  0xc3, /* 11000011 */
138  0xe7, /* 11100111 */
139  0xff, /* 11111111 */
140  0xff, /* 11111111 */
141 
142  /*
143  * 9 0x09 '^I'
144  */
145  0x00, /* 00000000 */
146  0x3c, /* 00111100 */
147  0x66, /* 01100110 */
148  0x42, /* 01000010 */
149  0x42, /* 01000010 */
150  0x66, /* 01100110 */
151  0x3c, /* 00111100 */
152  0x00, /* 00000000 */
153 
154  /*
155  * 10 0x0a '^J'
156  */
157  0xff, /* 11111111 */
158  0xc3, /* 11000011 */
159  0x99, /* 10011001 */
160  0xbd, /* 10111101 */
161  0xbd, /* 10111101 */
162  0x99, /* 10011001 */
163  0xc3, /* 11000011 */
164  0xff, /* 11111111 */
165 
166  /*
167  * 11 0x0b '^K'
168  */
169  0x0f, /* 00001111 */
170  0x07, /* 00000111 */
171  0x0f, /* 00001111 */
172  0x7d, /* 01111101 */
173  0xcc, /* 11001100 */
174  0xcc, /* 11001100 */
175  0xcc, /* 11001100 */
176  0x78, /* 01111000 */
177 
178  /*
179  * 12 0x0c '^L'
180  */
181  0x3c, /* 00111100 */
182  0x66, /* 01100110 */
183  0x66, /* 01100110 */
184  0x66, /* 01100110 */
185  0x3c, /* 00111100 */
186  0x18, /* 00011000 */
187  0x7e, /* 01111110 */
188  0x18, /* 00011000 */
189 
190  /*
191  * 13 0x0d '^M'
192  */
193  0x3f, /* 00111111 */
194  0x33, /* 00110011 */
195  0x3f, /* 00111111 */
196  0x30, /* 00110000 */
197  0x30, /* 00110000 */
198  0x70, /* 01110000 */
199  0xf0, /* 11110000 */
200  0xe0, /* 11100000 */
201 
202  /*
203  * 14 0x0e '^N'
204  */
205  0x7f, /* 01111111 */
206  0x63, /* 01100011 */
207  0x7f, /* 01111111 */
208  0x63, /* 01100011 */
209  0x63, /* 01100011 */
210  0x67, /* 01100111 */
211  0xe6, /* 11100110 */
212  0xc0, /* 11000000 */
213 
214  /*
215  * 15 0x0f '^O'
216  */
217  0x18, /* 00011000 */
218  0xdb, /* 11011011 */
219  0x3c, /* 00111100 */
220  0xe7, /* 11100111 */
221  0xe7, /* 11100111 */
222  0x3c, /* 00111100 */
223  0xdb, /* 11011011 */
224  0x18, /* 00011000 */
225 
226  /*
227  * 16 0x10 '^P'
228  */
229  0x80, /* 10000000 */
230  0xe0, /* 11100000 */
231  0xf8, /* 11111000 */
232  0xfe, /* 11111110 */
233  0xf8, /* 11111000 */
234  0xe0, /* 11100000 */
235  0x80, /* 10000000 */
236  0x00, /* 00000000 */
237 
238  /*
239  * 17 0x11 '^Q'
240  */
241  0x02, /* 00000010 */
242  0x0e, /* 00001110 */
243  0x3e, /* 00111110 */
244  0xfe, /* 11111110 */
245  0x3e, /* 00111110 */
246  0x0e, /* 00001110 */
247  0x02, /* 00000010 */
248  0x00, /* 00000000 */
249 
250  /*
251  * 18 0x12 '^R'
252  */
253  0x18, /* 00011000 */
254  0x3c, /* 00111100 */
255  0x7e, /* 01111110 */
256  0x18, /* 00011000 */
257  0x18, /* 00011000 */
258  0x7e, /* 01111110 */
259  0x3c, /* 00111100 */
260  0x18, /* 00011000 */
261 
262  /*
263  * 19 0x13 '^S'
264  */
265  0x66, /* 01100110 */
266  0x66, /* 01100110 */
267  0x66, /* 01100110 */
268  0x66, /* 01100110 */
269  0x66, /* 01100110 */
270  0x00, /* 00000000 */
271  0x66, /* 01100110 */
272  0x00, /* 00000000 */
273 
274  /*
275  * 20 0x14 '^T'
276  */
277  0x7f, /* 01111111 */
278  0xdb, /* 11011011 */
279  0xdb, /* 11011011 */
280  0x7b, /* 01111011 */
281  0x1b, /* 00011011 */
282  0x1b, /* 00011011 */
283  0x1b, /* 00011011 */
284  0x00, /* 00000000 */
285 
286  /*
287  * 21 0x15 '^U'
288  */
289  0x3e, /* 00111110 */
290  0x61, /* 01100001 */
291  0x3c, /* 00111100 */
292  0x66, /* 01100110 */
293  0x66, /* 01100110 */
294  0x3c, /* 00111100 */
295  0x86, /* 10000110 */
296  0x7c, /* 01111100 */
297 
298  /*
299  * 22 0x16 '^V'
300  */
301  0x00, /* 00000000 */
302  0x00, /* 00000000 */
303  0x00, /* 00000000 */
304  0x00, /* 00000000 */
305  0x7e, /* 01111110 */
306  0x7e, /* 01111110 */
307  0x7e, /* 01111110 */
308  0x00, /* 00000000 */
309 
310  /*
311  * 23 0x17 '^W'
312  */
313  0x18, /* 00011000 */
314  0x3c, /* 00111100 */
315  0x7e, /* 01111110 */
316  0x18, /* 00011000 */
317  0x7e, /* 01111110 */
318  0x3c, /* 00111100 */
319  0x18, /* 00011000 */
320  0xff, /* 11111111 */
321 
322  /*
323  * 24 0x18 '^X'
324  */
325  0x18, /* 00011000 */
326  0x3c, /* 00111100 */
327  0x7e, /* 01111110 */
328  0x18, /* 00011000 */
329  0x18, /* 00011000 */
330  0x18, /* 00011000 */
331  0x18, /* 00011000 */
332  0x00, /* 00000000 */
333 
334  /*
335  * 25 0x19 '^Y'
336  */
337  0x18, /* 00011000 */
338  0x18, /* 00011000 */
339  0x18, /* 00011000 */
340  0x18, /* 00011000 */
341  0x7e, /* 01111110 */
342  0x3c, /* 00111100 */
343  0x18, /* 00011000 */
344  0x00, /* 00000000 */
345 
346  /*
347  * 26 0x1a '^Z'
348  */
349  0x00, /* 00000000 */
350  0x18, /* 00011000 */
351  0x0c, /* 00001100 */
352  0xfe, /* 11111110 */
353  0x0c, /* 00001100 */
354  0x18, /* 00011000 */
355  0x00, /* 00000000 */
356  0x00, /* 00000000 */
357 
358  /*
359  * 27 0x1b '^['
360  */
361  0x00, /* 00000000 */
362  0x30, /* 00110000 */
363  0x60, /* 01100000 */
364  0xfe, /* 11111110 */
365  0x60, /* 01100000 */
366  0x30, /* 00110000 */
367  0x00, /* 00000000 */
368  0x00, /* 00000000 */
369 
370  /*
371  * 28 0x1c '^\'
372  */
373  0x00, /* 00000000 */
374  0x00, /* 00000000 */
375  0xc0, /* 11000000 */
376  0xc0, /* 11000000 */
377  0xc0, /* 11000000 */
378  0xfe, /* 11111110 */
379  0x00, /* 00000000 */
380  0x00, /* 00000000 */
381 
382  /*
383  * 29 0x1d '^]'
384  */
385  0x00, /* 00000000 */
386  0x24, /* 00100100 */
387  0x66, /* 01100110 */
388  0xff, /* 11111111 */
389  0x66, /* 01100110 */
390  0x24, /* 00100100 */
391  0x00, /* 00000000 */
392  0x00, /* 00000000 */
393 
394  /*
395  * 30 0x1e '^^'
396  */
397  0x00, /* 00000000 */
398  0x18, /* 00011000 */
399  0x3c, /* 00111100 */
400  0x7e, /* 01111110 */
401  0xff, /* 11111111 */
402  0xff, /* 11111111 */
403  0x00, /* 00000000 */
404  0x00, /* 00000000 */
405 
406  /*
407  * 31 0x1f '^_'
408  */
409  0x00, /* 00000000 */
410  0xff, /* 11111111 */
411  0xff, /* 11111111 */
412  0x7e, /* 01111110 */
413  0x3c, /* 00111100 */
414  0x18, /* 00011000 */
415  0x00, /* 00000000 */
416  0x00, /* 00000000 */
417 
418  /*
419  * 32 0x20 ' '
420  */
421  0x00, /* 00000000 */
422  0x00, /* 00000000 */
423  0x00, /* 00000000 */
424  0x00, /* 00000000 */
425  0x00, /* 00000000 */
426  0x00, /* 00000000 */
427  0x00, /* 00000000 */
428  0x00, /* 00000000 */
429 
430  /*
431  * 33 0x21 '!'
432  */
433  0x18, /* 00011000 */
434  0x3c, /* 00111100 */
435  0x3c, /* 00111100 */
436  0x18, /* 00011000 */
437  0x18, /* 00011000 */
438  0x00, /* 00000000 */
439  0x18, /* 00011000 */
440  0x00, /* 00000000 */
441 
442  /*
443  * 34 0x22 '"'
444  */
445  0x66, /* 01100110 */
446  0x66, /* 01100110 */
447  0x24, /* 00100100 */
448  0x00, /* 00000000 */
449  0x00, /* 00000000 */
450  0x00, /* 00000000 */
451  0x00, /* 00000000 */
452  0x00, /* 00000000 */
453 
454  /*
455  * 35 0x23 '#'
456  */
457  0x6c, /* 01101100 */
458  0x6c, /* 01101100 */
459  0xfe, /* 11111110 */
460  0x6c, /* 01101100 */
461  0xfe, /* 11111110 */
462  0x6c, /* 01101100 */
463  0x6c, /* 01101100 */
464  0x00, /* 00000000 */
465 
466  /*
467  * 36 0x24 '$'
468  */
469  0x18, /* 00011000 */
470  0x3e, /* 00111110 */
471  0x60, /* 01100000 */
472  0x3c, /* 00111100 */
473  0x06, /* 00000110 */
474  0x7c, /* 01111100 */
475  0x18, /* 00011000 */
476  0x00, /* 00000000 */
477 
478  /*
479  * 37 0x25 '%'
480  */
481  0x00, /* 00000000 */
482  0xc6, /* 11000110 */
483  0xcc, /* 11001100 */
484  0x18, /* 00011000 */
485  0x30, /* 00110000 */
486  0x66, /* 01100110 */
487  0xc6, /* 11000110 */
488  0x00, /* 00000000 */
489 
490  /*
491  * 38 0x26 '&'
492  */
493  0x38, /* 00111000 */
494  0x6c, /* 01101100 */
495  0x38, /* 00111000 */
496  0x76, /* 01110110 */
497  0xdc, /* 11011100 */
498  0xcc, /* 11001100 */
499  0x76, /* 01110110 */
500  0x00, /* 00000000 */
501 
502  /*
503  * 39 0x27 '''
504  */
505  0x18, /* 00011000 */
506  0x18, /* 00011000 */
507  0x30, /* 00110000 */
508  0x00, /* 00000000 */
509  0x00, /* 00000000 */
510  0x00, /* 00000000 */
511  0x00, /* 00000000 */
512  0x00, /* 00000000 */
513 
514  /*
515  * 40 0x28 '('
516  */
517  0x0c, /* 00001100 */
518  0x18, /* 00011000 */
519  0x30, /* 00110000 */
520  0x30, /* 00110000 */
521  0x30, /* 00110000 */
522  0x18, /* 00011000 */
523  0x0c, /* 00001100 */
524  0x00, /* 00000000 */
525 
526  /*
527  * 41 0x29 ')'
528  */
529  0x30, /* 00110000 */
530  0x18, /* 00011000 */
531  0x0c, /* 00001100 */
532  0x0c, /* 00001100 */
533  0x0c, /* 00001100 */
534  0x18, /* 00011000 */
535  0x30, /* 00110000 */
536  0x00, /* 00000000 */
537 
538  /*
539  * 42 0x2a '*'
540  */
541  0x00, /* 00000000 */
542  0x66, /* 01100110 */
543  0x3c, /* 00111100 */
544  0xff, /* 11111111 */
545  0x3c, /* 00111100 */
546  0x66, /* 01100110 */
547  0x00, /* 00000000 */
548  0x00, /* 00000000 */
549 
550  /*
551  * 43 0x2b '+'
552  */
553  0x00, /* 00000000 */
554  0x18, /* 00011000 */
555  0x18, /* 00011000 */
556  0x7e, /* 01111110 */
557  0x18, /* 00011000 */
558  0x18, /* 00011000 */
559  0x00, /* 00000000 */
560  0x00, /* 00000000 */
561 
562  /*
563  * 44 0x2c ','
564  */
565  0x00, /* 00000000 */
566  0x00, /* 00000000 */
567  0x00, /* 00000000 */
568  0x00, /* 00000000 */
569  0x00, /* 00000000 */
570  0x18, /* 00011000 */
571  0x18, /* 00011000 */
572  0x30, /* 00110000 */
573 
574  /*
575  * 45 0x2d '-'
576  */
577  0x00, /* 00000000 */
578  0x00, /* 00000000 */
579  0x00, /* 00000000 */
580  0x7e, /* 01111110 */
581  0x00, /* 00000000 */
582  0x00, /* 00000000 */
583  0x00, /* 00000000 */
584  0x00, /* 00000000 */
585 
586  /*
587  * 46 0x2e '.'
588  */
589  0x00, /* 00000000 */
590  0x00, /* 00000000 */
591  0x00, /* 00000000 */
592  0x00, /* 00000000 */
593  0x00, /* 00000000 */
594  0x18, /* 00011000 */
595  0x18, /* 00011000 */
596  0x00, /* 00000000 */
597 
598  /*
599  * 47 0x2f '/'
600  */
601  0x06, /* 00000110 */
602  0x0c, /* 00001100 */
603  0x18, /* 00011000 */
604  0x30, /* 00110000 */
605  0x60, /* 01100000 */
606  0xc0, /* 11000000 */
607  0x80, /* 10000000 */
608  0x00, /* 00000000 */
609 
610  /*
611  * 48 0x30 '0'
612  */
613  0x38, /* 00111000 */
614  0x6c, /* 01101100 */
615  0xc6, /* 11000110 */
616  0xd6, /* 11010110 */
617  0xc6, /* 11000110 */
618  0x6c, /* 01101100 */
619  0x38, /* 00111000 */
620  0x00, /* 00000000 */
621 
622  /*
623  * 49 0x31 '1'
624  */
625  0x18, /* 00011000 */
626  0x38, /* 00111000 */
627  0x18, /* 00011000 */
628  0x18, /* 00011000 */
629  0x18, /* 00011000 */
630  0x18, /* 00011000 */
631  0x7e, /* 01111110 */
632  0x00, /* 00000000 */
633 
634  /*
635  * 50 0x32 '2'
636  */
637  0x7c, /* 01111100 */
638  0xc6, /* 11000110 */
639  0x06, /* 00000110 */
640  0x1c, /* 00011100 */
641  0x30, /* 00110000 */
642  0x66, /* 01100110 */
643  0xfe, /* 11111110 */
644  0x00, /* 00000000 */
645 
646  /*
647  * 51 0x33 '3'
648  */
649  0x7c, /* 01111100 */
650  0xc6, /* 11000110 */
651  0x06, /* 00000110 */
652  0x3c, /* 00111100 */
653  0x06, /* 00000110 */
654  0xc6, /* 11000110 */
655  0x7c, /* 01111100 */
656  0x00, /* 00000000 */
657 
658  /*
659  * 52 0x34 '4'
660  */
661  0x1c, /* 00011100 */
662  0x3c, /* 00111100 */
663  0x6c, /* 01101100 */
664  0xcc, /* 11001100 */
665  0xfe, /* 11111110 */
666  0x0c, /* 00001100 */
667  0x1e, /* 00011110 */
668  0x00, /* 00000000 */
669 
670  /*
671  * 53 0x35 '5'
672  */
673  0xfe, /* 11111110 */
674  0xc0, /* 11000000 */
675  0xc0, /* 11000000 */
676  0xfc, /* 11111100 */
677  0x06, /* 00000110 */
678  0xc6, /* 11000110 */
679  0x7c, /* 01111100 */
680  0x00, /* 00000000 */
681 
682  /*
683  * 54 0x36 '6'
684  */
685  0x38, /* 00111000 */
686  0x60, /* 01100000 */
687  0xc0, /* 11000000 */
688  0xfc, /* 11111100 */
689  0xc6, /* 11000110 */
690  0xc6, /* 11000110 */
691  0x7c, /* 01111100 */
692  0x00, /* 00000000 */
693 
694  /*
695  * 55 0x37 '7'
696  */
697  0xfe, /* 11111110 */
698  0xc6, /* 11000110 */
699  0x0c, /* 00001100 */
700  0x18, /* 00011000 */
701  0x30, /* 00110000 */
702  0x30, /* 00110000 */
703  0x30, /* 00110000 */
704  0x00, /* 00000000 */
705 
706  /*
707  * 56 0x38 '8'
708  */
709  0x7c, /* 01111100 */
710  0xc6, /* 11000110 */
711  0xc6, /* 11000110 */
712  0x7c, /* 01111100 */
713  0xc6, /* 11000110 */
714  0xc6, /* 11000110 */
715  0x7c, /* 01111100 */
716  0x00, /* 00000000 */
717 
718  /*
719  * 57 0x39 '9'
720  */
721  0x7c, /* 01111100 */
722  0xc6, /* 11000110 */
723  0xc6, /* 11000110 */
724  0x7e, /* 01111110 */
725  0x06, /* 00000110 */
726  0x0c, /* 00001100 */
727  0x78, /* 01111000 */
728  0x00, /* 00000000 */
729 
730  /*
731  * 58 0x3a ':'
732  */
733  0x00, /* 00000000 */
734  0x18, /* 00011000 */
735  0x18, /* 00011000 */
736  0x00, /* 00000000 */
737  0x00, /* 00000000 */
738  0x18, /* 00011000 */
739  0x18, /* 00011000 */
740  0x00, /* 00000000 */
741 
742  /*
743  * 59 0x3b ';'
744  */
745  0x00, /* 00000000 */
746  0x18, /* 00011000 */
747  0x18, /* 00011000 */
748  0x00, /* 00000000 */
749  0x00, /* 00000000 */
750  0x18, /* 00011000 */
751  0x18, /* 00011000 */
752  0x30, /* 00110000 */
753 
754  /*
755  * 60 0x3c '<'
756  */
757  0x06, /* 00000110 */
758  0x0c, /* 00001100 */
759  0x18, /* 00011000 */
760  0x30, /* 00110000 */
761  0x18, /* 00011000 */
762  0x0c, /* 00001100 */
763  0x06, /* 00000110 */
764  0x00, /* 00000000 */
765 
766  /*
767  * 61 0x3d '='
768  */
769  0x00, /* 00000000 */
770  0x00, /* 00000000 */
771  0x7e, /* 01111110 */
772  0x00, /* 00000000 */
773  0x00, /* 00000000 */
774  0x7e, /* 01111110 */
775  0x00, /* 00000000 */
776  0x00, /* 00000000 */
777 
778  /*
779  * 62 0x3e '>'
780  */
781  0x60, /* 01100000 */
782  0x30, /* 00110000 */
783  0x18, /* 00011000 */
784  0x0c, /* 00001100 */
785  0x18, /* 00011000 */
786  0x30, /* 00110000 */
787  0x60, /* 01100000 */
788  0x00, /* 00000000 */
789 
790  /*
791  * 63 0x3f '?'
792  */
793  0x7c, /* 01111100 */
794  0xc6, /* 11000110 */
795  0x0c, /* 00001100 */
796  0x18, /* 00011000 */
797  0x18, /* 00011000 */
798  0x00, /* 00000000 */
799  0x18, /* 00011000 */
800  0x00, /* 00000000 */
801 
802  /*
803  * 64 0x40 '@'
804  */
805  0x7c, /* 01111100 */
806  0xc6, /* 11000110 */
807  0xde, /* 11011110 */
808  0xde, /* 11011110 */
809  0xde, /* 11011110 */
810  0xc0, /* 11000000 */
811  0x78, /* 01111000 */
812  0x00, /* 00000000 */
813 
814  /*
815  * 65 0x41 'A'
816  */
817  0x38, /* 00111000 */
818  0x6c, /* 01101100 */
819  0xc6, /* 11000110 */
820  0xfe, /* 11111110 */
821  0xc6, /* 11000110 */
822  0xc6, /* 11000110 */
823  0xc6, /* 11000110 */
824  0x00, /* 00000000 */
825 
826  /*
827  * 66 0x42 'B'
828  */
829  0xfc, /* 11111100 */
830  0x66, /* 01100110 */
831  0x66, /* 01100110 */
832  0x7c, /* 01111100 */
833  0x66, /* 01100110 */
834  0x66, /* 01100110 */
835  0xfc, /* 11111100 */
836  0x00, /* 00000000 */
837 
838  /*
839  * 67 0x43 'C'
840  */
841  0x3c, /* 00111100 */
842  0x66, /* 01100110 */
843  0xc0, /* 11000000 */
844  0xc0, /* 11000000 */
845  0xc0, /* 11000000 */
846  0x66, /* 01100110 */
847  0x3c, /* 00111100 */
848  0x00, /* 00000000 */
849 
850  /*
851  * 68 0x44 'D'
852  */
853  0xf8, /* 11111000 */
854  0x6c, /* 01101100 */
855  0x66, /* 01100110 */
856  0x66, /* 01100110 */
857  0x66, /* 01100110 */
858  0x6c, /* 01101100 */
859  0xf8, /* 11111000 */
860  0x00, /* 00000000 */
861 
862  /*
863  * 69 0x45 'E'
864  */
865  0xfe, /* 11111110 */
866  0x62, /* 01100010 */
867  0x68, /* 01101000 */
868  0x78, /* 01111000 */
869  0x68, /* 01101000 */
870  0x62, /* 01100010 */
871  0xfe, /* 11111110 */
872  0x00, /* 00000000 */
873 
874  /*
875  * 70 0x46 'F'
876  */
877  0xfe, /* 11111110 */
878  0x62, /* 01100010 */
879  0x68, /* 01101000 */
880  0x78, /* 01111000 */
881  0x68, /* 01101000 */
882  0x60, /* 01100000 */
883  0xf0, /* 11110000 */
884  0x00, /* 00000000 */
885 
886  /*
887  * 71 0x47 'G'
888  */
889  0x3c, /* 00111100 */
890  0x66, /* 01100110 */
891  0xc0, /* 11000000 */
892  0xc0, /* 11000000 */
893  0xce, /* 11001110 */
894  0x66, /* 01100110 */
895  0x3a, /* 00111010 */
896  0x00, /* 00000000 */
897 
898  /*
899  * 72 0x48 'H'
900  */
901  0xc6, /* 11000110 */
902  0xc6, /* 11000110 */
903  0xc6, /* 11000110 */
904  0xfe, /* 11111110 */
905  0xc6, /* 11000110 */
906  0xc6, /* 11000110 */
907  0xc6, /* 11000110 */
908  0x00, /* 00000000 */
909 
910  /*
911  * 73 0x49 'I'
912  */
913  0x3c, /* 00111100 */
914  0x18, /* 00011000 */
915  0x18, /* 00011000 */
916  0x18, /* 00011000 */
917  0x18, /* 00011000 */
918  0x18, /* 00011000 */
919  0x3c, /* 00111100 */
920  0x00, /* 00000000 */
921 
922  /*
923  * 74 0x4a 'J'
924  */
925  0x1e, /* 00011110 */
926  0x0c, /* 00001100 */
927  0x0c, /* 00001100 */
928  0x0c, /* 00001100 */
929  0xcc, /* 11001100 */
930  0xcc, /* 11001100 */
931  0x78, /* 01111000 */
932  0x00, /* 00000000 */
933 
934  /*
935  * 75 0x4b 'K'
936  */
937  0xe6, /* 11100110 */
938  0x66, /* 01100110 */
939  0x6c, /* 01101100 */
940  0x78, /* 01111000 */
941  0x6c, /* 01101100 */
942  0x66, /* 01100110 */
943  0xe6, /* 11100110 */
944  0x00, /* 00000000 */
945 
946  /*
947  * 76 0x4c 'L'
948  */
949  0xf0, /* 11110000 */
950  0x60, /* 01100000 */
951  0x60, /* 01100000 */
952  0x60, /* 01100000 */
953  0x62, /* 01100010 */
954  0x66, /* 01100110 */
955  0xfe, /* 11111110 */
956  0x00, /* 00000000 */
957 
958  /*
959  * 77 0x4d 'M'
960  */
961  0xc6, /* 11000110 */
962  0xee, /* 11101110 */
963  0xfe, /* 11111110 */
964  0xfe, /* 11111110 */
965  0xd6, /* 11010110 */
966  0xc6, /* 11000110 */
967  0xc6, /* 11000110 */
968  0x00, /* 00000000 */
969 
970  /*
971  * 78 0x4e 'N'
972  */
973  0xc6, /* 11000110 */
974  0xe6, /* 11100110 */
975  0xf6, /* 11110110 */
976  0xde, /* 11011110 */
977  0xce, /* 11001110 */
978  0xc6, /* 11000110 */
979  0xc6, /* 11000110 */
980  0x00, /* 00000000 */
981 
982  /*
983  * 79 0x4f 'O'
984  */
985  0x7c, /* 01111100 */
986  0xc6, /* 11000110 */
987  0xc6, /* 11000110 */
988  0xc6, /* 11000110 */
989  0xc6, /* 11000110 */
990  0xc6, /* 11000110 */
991  0x7c, /* 01111100 */
992  0x00, /* 00000000 */
993 
994  /*
995  * 80 0x50 'P'
996  */
997  0xfc, /* 11111100 */
998  0x66, /* 01100110 */
999  0x66, /* 01100110 */
1000  0x7c, /* 01111100 */
1001  0x60, /* 01100000 */
1002  0x60, /* 01100000 */
1003  0xf0, /* 11110000 */
1004  0x00, /* 00000000 */
1005 
1006  /*
1007  * 81 0x51 'Q'
1008  */
1009  0x7c, /* 01111100 */
1010  0xc6, /* 11000110 */
1011  0xc6, /* 11000110 */
1012  0xc6, /* 11000110 */
1013  0xc6, /* 11000110 */
1014  0xce, /* 11001110 */
1015  0x7c, /* 01111100 */
1016  0x0e, /* 00001110 */
1017 
1018  /*
1019  * 82 0x52 'R'
1020  */
1021  0xfc, /* 11111100 */
1022  0x66, /* 01100110 */
1023  0x66, /* 01100110 */
1024  0x7c, /* 01111100 */
1025  0x6c, /* 01101100 */
1026  0x66, /* 01100110 */
1027  0xe6, /* 11100110 */
1028  0x00, /* 00000000 */
1029 
1030  /*
1031  * 83 0x53 'S'
1032  */
1033  0x3c, /* 00111100 */
1034  0x66, /* 01100110 */
1035  0x30, /* 00110000 */
1036  0x18, /* 00011000 */
1037  0x0c, /* 00001100 */
1038  0x66, /* 01100110 */
1039  0x3c, /* 00111100 */
1040  0x00, /* 00000000 */
1041 
1042  /*
1043  * 84 0x54 'T'
1044  */
1045  0x7e, /* 01111110 */
1046  0x7e, /* 01111110 */
1047  0x5a, /* 01011010 */
1048  0x18, /* 00011000 */
1049  0x18, /* 00011000 */
1050  0x18, /* 00011000 */
1051  0x3c, /* 00111100 */
1052  0x00, /* 00000000 */
1053 
1054  /*
1055  * 85 0x55 'U'
1056  */
1057  0xc6, /* 11000110 */
1058  0xc6, /* 11000110 */
1059  0xc6, /* 11000110 */
1060  0xc6, /* 11000110 */
1061  0xc6, /* 11000110 */
1062  0xc6, /* 11000110 */
1063  0x7c, /* 01111100 */
1064  0x00, /* 00000000 */
1065 
1066  /*
1067  * 86 0x56 'V'
1068  */
1069  0xc6, /* 11000110 */
1070  0xc6, /* 11000110 */
1071  0xc6, /* 11000110 */
1072  0xc6, /* 11000110 */
1073  0xc6, /* 11000110 */
1074  0x6c, /* 01101100 */
1075  0x38, /* 00111000 */
1076  0x00, /* 00000000 */
1077 
1078  /*
1079  * 87 0x57 'W'
1080  */
1081  0xc6, /* 11000110 */
1082  0xc6, /* 11000110 */
1083  0xc6, /* 11000110 */
1084  0xd6, /* 11010110 */
1085  0xd6, /* 11010110 */
1086  0xfe, /* 11111110 */
1087  0x6c, /* 01101100 */
1088  0x00, /* 00000000 */
1089 
1090  /*
1091  * 88 0x58 'X'
1092  */
1093  0xc6, /* 11000110 */
1094  0xc6, /* 11000110 */
1095  0x6c, /* 01101100 */
1096  0x38, /* 00111000 */
1097  0x6c, /* 01101100 */
1098  0xc6, /* 11000110 */
1099  0xc6, /* 11000110 */
1100  0x00, /* 00000000 */
1101 
1102  /*
1103  * 89 0x59 'Y'
1104  */
1105  0x66, /* 01100110 */
1106  0x66, /* 01100110 */
1107  0x66, /* 01100110 */
1108  0x3c, /* 00111100 */
1109  0x18, /* 00011000 */
1110  0x18, /* 00011000 */
1111  0x3c, /* 00111100 */
1112  0x00, /* 00000000 */
1113 
1114  /*
1115  * 90 0x5a 'Z'
1116  */
1117  0xfe, /* 11111110 */
1118  0xc6, /* 11000110 */
1119  0x8c, /* 10001100 */
1120  0x18, /* 00011000 */
1121  0x32, /* 00110010 */
1122  0x66, /* 01100110 */
1123  0xfe, /* 11111110 */
1124  0x00, /* 00000000 */
1125 
1126  /*
1127  * 91 0x5b '['
1128  */
1129  0x3c, /* 00111100 */
1130  0x30, /* 00110000 */
1131  0x30, /* 00110000 */
1132  0x30, /* 00110000 */
1133  0x30, /* 00110000 */
1134  0x30, /* 00110000 */
1135  0x3c, /* 00111100 */
1136  0x00, /* 00000000 */
1137 
1138  /*
1139  * 92 0x5c '\'
1140  */
1141  0xc0, /* 11000000 */
1142  0x60, /* 01100000 */
1143  0x30, /* 00110000 */
1144  0x18, /* 00011000 */
1145  0x0c, /* 00001100 */
1146  0x06, /* 00000110 */
1147  0x02, /* 00000010 */
1148  0x00, /* 00000000 */
1149 
1150  /*
1151  * 93 0x5d ']'
1152  */
1153  0x3c, /* 00111100 */
1154  0x0c, /* 00001100 */
1155  0x0c, /* 00001100 */
1156  0x0c, /* 00001100 */
1157  0x0c, /* 00001100 */
1158  0x0c, /* 00001100 */
1159  0x3c, /* 00111100 */
1160  0x00, /* 00000000 */
1161 
1162  /*
1163  * 94 0x5e '^'
1164  */
1165  0x10, /* 00010000 */
1166  0x38, /* 00111000 */
1167  0x6c, /* 01101100 */
1168  0xc6, /* 11000110 */
1169  0x00, /* 00000000 */
1170  0x00, /* 00000000 */
1171  0x00, /* 00000000 */
1172  0x00, /* 00000000 */
1173 
1174  /*
1175  * 95 0x5f '_'
1176  */
1177  0x00, /* 00000000 */
1178  0x00, /* 00000000 */
1179  0x00, /* 00000000 */
1180  0x00, /* 00000000 */
1181  0x00, /* 00000000 */
1182  0x00, /* 00000000 */
1183  0x00, /* 00000000 */
1184  0xff, /* 11111111 */
1185 
1186  /*
1187  * 96 0x60 '`'
1188  */
1189  0x30, /* 00110000 */
1190  0x18, /* 00011000 */
1191  0x0c, /* 00001100 */
1192  0x00, /* 00000000 */
1193  0x00, /* 00000000 */
1194  0x00, /* 00000000 */
1195  0x00, /* 00000000 */
1196  0x00, /* 00000000 */
1197 
1198  /*
1199  * 97 0x61 'a'
1200  */
1201  0x00, /* 00000000 */
1202  0x00, /* 00000000 */
1203  0x78, /* 01111000 */
1204  0x0c, /* 00001100 */
1205  0x7c, /* 01111100 */
1206  0xcc, /* 11001100 */
1207  0x76, /* 01110110 */
1208  0x00, /* 00000000 */
1209 
1210  /*
1211  * 98 0x62 'b'
1212  */
1213  0xe0, /* 11100000 */
1214  0x60, /* 01100000 */
1215  0x7c, /* 01111100 */
1216  0x66, /* 01100110 */
1217  0x66, /* 01100110 */
1218  0x66, /* 01100110 */
1219  0xdc, /* 11011100 */
1220  0x00, /* 00000000 */
1221 
1222  /*
1223  * 99 0x63 'c'
1224  */
1225  0x00, /* 00000000 */
1226  0x00, /* 00000000 */
1227  0x7c, /* 01111100 */
1228  0xc6, /* 11000110 */
1229  0xc0, /* 11000000 */
1230  0xc6, /* 11000110 */
1231  0x7c, /* 01111100 */
1232  0x00, /* 00000000 */
1233 
1234  /*
1235  * 100 0x64 'd'
1236  */
1237  0x1c, /* 00011100 */
1238  0x0c, /* 00001100 */
1239  0x7c, /* 01111100 */
1240  0xcc, /* 11001100 */
1241  0xcc, /* 11001100 */
1242  0xcc, /* 11001100 */
1243  0x76, /* 01110110 */
1244  0x00, /* 00000000 */
1245 
1246  /*
1247  * 101 0x65 'e'
1248  */
1249  0x00, /* 00000000 */
1250  0x00, /* 00000000 */
1251  0x7c, /* 01111100 */
1252  0xc6, /* 11000110 */
1253  0xfe, /* 11111110 */
1254  0xc0, /* 11000000 */
1255  0x7c, /* 01111100 */
1256  0x00, /* 00000000 */
1257 
1258  /*
1259  * 102 0x66 'f'
1260  */
1261  0x3c, /* 00111100 */
1262  0x66, /* 01100110 */
1263  0x60, /* 01100000 */
1264  0xf8, /* 11111000 */
1265  0x60, /* 01100000 */
1266  0x60, /* 01100000 */
1267  0xf0, /* 11110000 */
1268  0x00, /* 00000000 */
1269 
1270  /*
1271  * 103 0x67 'g'
1272  */
1273  0x00, /* 00000000 */
1274  0x00, /* 00000000 */
1275  0x76, /* 01110110 */
1276  0xcc, /* 11001100 */
1277  0xcc, /* 11001100 */
1278  0x7c, /* 01111100 */
1279  0x0c, /* 00001100 */
1280  0xf8, /* 11111000 */
1281 
1282  /*
1283  * 104 0x68 'h'
1284  */
1285  0xe0, /* 11100000 */
1286  0x60, /* 01100000 */
1287  0x6c, /* 01101100 */
1288  0x76, /* 01110110 */
1289  0x66, /* 01100110 */
1290  0x66, /* 01100110 */
1291  0xe6, /* 11100110 */
1292  0x00, /* 00000000 */
1293 
1294  /*
1295  * 105 0x69 'i'
1296  */
1297  0x18, /* 00011000 */
1298  0x00, /* 00000000 */
1299  0x38, /* 00111000 */
1300  0x18, /* 00011000 */
1301  0x18, /* 00011000 */
1302  0x18, /* 00011000 */
1303  0x3c, /* 00111100 */
1304  0x00, /* 00000000 */
1305 
1306  /*
1307  * 106 0x6a 'j'
1308  */
1309  0x06, /* 00000110 */
1310  0x00, /* 00000000 */
1311  0x06, /* 00000110 */
1312  0x06, /* 00000110 */
1313  0x06, /* 00000110 */
1314  0x66, /* 01100110 */
1315  0x66, /* 01100110 */
1316  0x3c, /* 00111100 */
1317 
1318  /*
1319  * 107 0x6b 'k'
1320  */
1321  0xe0, /* 11100000 */
1322  0x60, /* 01100000 */
1323  0x66, /* 01100110 */
1324  0x6c, /* 01101100 */
1325  0x78, /* 01111000 */
1326  0x6c, /* 01101100 */
1327  0xe6, /* 11100110 */
1328  0x00, /* 00000000 */
1329 
1330  /*
1331  * 108 0x6c 'l'
1332  */
1333  0x38, /* 00111000 */
1334  0x18, /* 00011000 */
1335  0x18, /* 00011000 */
1336  0x18, /* 00011000 */
1337  0x18, /* 00011000 */
1338  0x18, /* 00011000 */
1339  0x3c, /* 00111100 */
1340  0x00, /* 00000000 */
1341 
1342  /*
1343  * 109 0x6d 'm'
1344  */
1345  0x00, /* 00000000 */
1346  0x00, /* 00000000 */
1347  0xec, /* 11101100 */
1348  0xfe, /* 11111110 */
1349  0xd6, /* 11010110 */
1350  0xd6, /* 11010110 */
1351  0xd6, /* 11010110 */
1352  0x00, /* 00000000 */
1353 
1354  /*
1355  * 110 0x6e 'n'
1356  */
1357  0x00, /* 00000000 */
1358  0x00, /* 00000000 */
1359  0xdc, /* 11011100 */
1360  0x66, /* 01100110 */
1361  0x66, /* 01100110 */
1362  0x66, /* 01100110 */
1363  0x66, /* 01100110 */
1364  0x00, /* 00000000 */
1365 
1366  /*
1367  * 111 0x6f 'o'
1368  */
1369  0x00, /* 00000000 */
1370  0x00, /* 00000000 */
1371  0x7c, /* 01111100 */
1372  0xc6, /* 11000110 */
1373  0xc6, /* 11000110 */
1374  0xc6, /* 11000110 */
1375  0x7c, /* 01111100 */
1376  0x00, /* 00000000 */
1377 
1378  /*
1379  * 112 0x70 'p'
1380  */
1381  0x00, /* 00000000 */
1382  0x00, /* 00000000 */
1383  0xdc, /* 11011100 */
1384  0x66, /* 01100110 */
1385  0x66, /* 01100110 */
1386  0x7c, /* 01111100 */
1387  0x60, /* 01100000 */
1388  0xf0, /* 11110000 */
1389 
1390  /*
1391  * 113 0x71 'q'
1392  */
1393  0x00, /* 00000000 */
1394  0x00, /* 00000000 */
1395  0x76, /* 01110110 */
1396  0xcc, /* 11001100 */
1397  0xcc, /* 11001100 */
1398  0x7c, /* 01111100 */
1399  0x0c, /* 00001100 */
1400  0x1e, /* 00011110 */
1401 
1402  /*
1403  * 114 0x72 'r'
1404  */
1405  0x00, /* 00000000 */
1406  0x00, /* 00000000 */
1407  0xdc, /* 11011100 */
1408  0x76, /* 01110110 */
1409  0x60, /* 01100000 */
1410  0x60, /* 01100000 */
1411  0xf0, /* 11110000 */
1412  0x00, /* 00000000 */
1413 
1414  /*
1415  * 115 0x73 's'
1416  */
1417  0x00, /* 00000000 */
1418  0x00, /* 00000000 */
1419  0x7e, /* 01111110 */
1420  0xc0, /* 11000000 */
1421  0x7c, /* 01111100 */
1422  0x06, /* 00000110 */
1423  0xfc, /* 11111100 */
1424  0x00, /* 00000000 */
1425 
1426  /*
1427  * 116 0x74 't'
1428  */
1429  0x30, /* 00110000 */
1430  0x30, /* 00110000 */
1431  0xfc, /* 11111100 */
1432  0x30, /* 00110000 */
1433  0x30, /* 00110000 */
1434  0x36, /* 00110110 */
1435  0x1c, /* 00011100 */
1436  0x00, /* 00000000 */
1437 
1438  /*
1439  * 117 0x75 'u'
1440  */
1441  0x00, /* 00000000 */
1442  0x00, /* 00000000 */
1443  0xcc, /* 11001100 */
1444  0xcc, /* 11001100 */
1445  0xcc, /* 11001100 */
1446  0xcc, /* 11001100 */
1447  0x76, /* 01110110 */
1448  0x00, /* 00000000 */
1449 
1450  /*
1451  * 118 0x76 'v'
1452  */
1453  0x00, /* 00000000 */
1454  0x00, /* 00000000 */
1455  0xc6, /* 11000110 */
1456  0xc6, /* 11000110 */
1457  0xc6, /* 11000110 */
1458  0x6c, /* 01101100 */
1459  0x38, /* 00111000 */
1460  0x00, /* 00000000 */
1461 
1462  /*
1463  * 119 0x77 'w'
1464  */
1465  0x00, /* 00000000 */
1466  0x00, /* 00000000 */
1467  0xc6, /* 11000110 */
1468  0xd6, /* 11010110 */
1469  0xd6, /* 11010110 */
1470  0xfe, /* 11111110 */
1471  0x6c, /* 01101100 */
1472  0x00, /* 00000000 */
1473 
1474  /*
1475  * 120 0x78 'x'
1476  */
1477  0x00, /* 00000000 */
1478  0x00, /* 00000000 */
1479  0xc6, /* 11000110 */
1480  0x6c, /* 01101100 */
1481  0x38, /* 00111000 */
1482  0x6c, /* 01101100 */
1483  0xc6, /* 11000110 */
1484  0x00, /* 00000000 */
1485 
1486  /*
1487  * 121 0x79 'y'
1488  */
1489  0x00, /* 00000000 */
1490  0x00, /* 00000000 */
1491  0xc6, /* 11000110 */
1492  0xc6, /* 11000110 */
1493  0xc6, /* 11000110 */
1494  0x7e, /* 01111110 */
1495  0x06, /* 00000110 */
1496  0xfc, /* 11111100 */
1497 
1498  /*
1499  * 122 0x7a 'z'
1500  */
1501  0x00, /* 00000000 */
1502  0x00, /* 00000000 */
1503  0x7e, /* 01111110 */
1504  0x4c, /* 01001100 */
1505  0x18, /* 00011000 */
1506  0x32, /* 00110010 */
1507  0x7e, /* 01111110 */
1508  0x00, /* 00000000 */
1509 
1510  /*
1511  * 123 0x7b '{'
1512  */
1513  0x0e, /* 00001110 */
1514  0x18, /* 00011000 */
1515  0x18, /* 00011000 */
1516  0x70, /* 01110000 */
1517  0x18, /* 00011000 */
1518  0x18, /* 00011000 */
1519  0x0e, /* 00001110 */
1520  0x00, /* 00000000 */
1521 
1522  /*
1523  * 124 0x7c '|'
1524  */
1525  0x18, /* 00011000 */
1526  0x18, /* 00011000 */
1527  0x18, /* 00011000 */
1528  0x18, /* 00011000 */
1529  0x18, /* 00011000 */
1530  0x18, /* 00011000 */
1531  0x18, /* 00011000 */
1532  0x00, /* 00000000 */
1533 
1534  /*
1535  * 125 0x7d '}'
1536  */
1537  0x70, /* 01110000 */
1538  0x18, /* 00011000 */
1539  0x18, /* 00011000 */
1540  0x0e, /* 00001110 */
1541  0x18, /* 00011000 */
1542  0x18, /* 00011000 */
1543  0x70, /* 01110000 */
1544  0x00, /* 00000000 */
1545 
1546  /*
1547  * 126 0x7e '~'
1548  */
1549  0x76, /* 01110110 */
1550  0xdc, /* 11011100 */
1551  0x00, /* 00000000 */
1552  0x00, /* 00000000 */
1553  0x00, /* 00000000 */
1554  0x00, /* 00000000 */
1555  0x00, /* 00000000 */
1556  0x00, /* 00000000 */
1557 
1558  /*
1559  * 127 0x7f ''
1560  */
1561  0x00, /* 00000000 */
1562  0x10, /* 00010000 */
1563  0x38, /* 00111000 */
1564  0x6c, /* 01101100 */
1565  0xc6, /* 11000110 */
1566  0xc6, /* 11000110 */
1567  0xfe, /* 11111110 */
1568  0x00, /* 00000000 */
1569 
1570  /*
1571  * 128 0x80 ''
1572  */
1573  0x7c, /* 01111100 */
1574  0xc6, /* 11000110 */
1575  0xc0, /* 11000000 */
1576  0xc0, /* 11000000 */
1577  0xc6, /* 11000110 */
1578  0x7c, /* 01111100 */
1579  0x0c, /* 00001100 */
1580  0x78, /* 01111000 */
1581 
1582  /*
1583  * 129 0x81 ''
1584  */
1585  0xcc, /* 11001100 */
1586  0x00, /* 00000000 */
1587  0xcc, /* 11001100 */
1588  0xcc, /* 11001100 */
1589  0xcc, /* 11001100 */
1590  0xcc, /* 11001100 */
1591  0x76, /* 01110110 */
1592  0x00, /* 00000000 */
1593 
1594  /*
1595  * 130 0x82 ''
1596  */
1597  0x0c, /* 00001100 */
1598  0x18, /* 00011000 */
1599  0x7c, /* 01111100 */
1600  0xc6, /* 11000110 */
1601  0xfe, /* 11111110 */
1602  0xc0, /* 11000000 */
1603  0x7c, /* 01111100 */
1604  0x00, /* 00000000 */
1605 
1606  /*
1607  * 131 0x83 ''
1608  */
1609  0x7c, /* 01111100 */
1610  0x82, /* 10000010 */
1611  0x78, /* 01111000 */
1612  0x0c, /* 00001100 */
1613  0x7c, /* 01111100 */
1614  0xcc, /* 11001100 */
1615  0x76, /* 01110110 */
1616  0x00, /* 00000000 */
1617 
1618  /*
1619  * 132 0x84 ''
1620  */
1621  0xc6, /* 11000110 */
1622  0x00, /* 00000000 */
1623  0x78, /* 01111000 */
1624  0x0c, /* 00001100 */
1625  0x7c, /* 01111100 */
1626  0xcc, /* 11001100 */
1627  0x76, /* 01110110 */
1628  0x00, /* 00000000 */
1629 
1630  /*
1631  * 133 0x85 ''
1632  */
1633  0x30, /* 00110000 */
1634  0x18, /* 00011000 */
1635  0x78, /* 01111000 */
1636  0x0c, /* 00001100 */
1637  0x7c, /* 01111100 */
1638  0xcc, /* 11001100 */
1639  0x76, /* 01110110 */
1640  0x00, /* 00000000 */
1641 
1642  /*
1643  * 134 0x86 ''
1644  */
1645  0x30, /* 00110000 */
1646  0x30, /* 00110000 */
1647  0x78, /* 01111000 */
1648  0x0c, /* 00001100 */
1649  0x7c, /* 01111100 */
1650  0xcc, /* 11001100 */
1651  0x76, /* 01110110 */
1652  0x00, /* 00000000 */
1653 
1654  /*
1655  * 135 0x87 ''
1656  */
1657  0x00, /* 00000000 */
1658  0x00, /* 00000000 */
1659  0x7e, /* 01111110 */
1660  0xc0, /* 11000000 */
1661  0xc0, /* 11000000 */
1662  0x7e, /* 01111110 */
1663  0x0c, /* 00001100 */
1664  0x38, /* 00111000 */
1665 
1666  /*
1667  * 136 0x88 ''
1668  */
1669  0x7c, /* 01111100 */
1670  0x82, /* 10000010 */
1671  0x7c, /* 01111100 */
1672  0xc6, /* 11000110 */
1673  0xfe, /* 11111110 */
1674  0xc0, /* 11000000 */
1675  0x7c, /* 01111100 */
1676  0x00, /* 00000000 */
1677 
1678  /*
1679  * 137 0x89 ''
1680  */
1681  0xc6, /* 11000110 */
1682  0x00, /* 00000000 */
1683  0x7c, /* 01111100 */
1684  0xc6, /* 11000110 */
1685  0xfe, /* 11111110 */
1686  0xc0, /* 11000000 */
1687  0x7c, /* 01111100 */
1688  0x00, /* 00000000 */
1689 
1690  /*
1691  * 138 0x8a ''
1692  */
1693  0x30, /* 00110000 */
1694  0x18, /* 00011000 */
1695  0x7c, /* 01111100 */
1696  0xc6, /* 11000110 */
1697  0xfe, /* 11111110 */
1698  0xc0, /* 11000000 */
1699  0x7c, /* 01111100 */
1700  0x00, /* 00000000 */
1701 
1702  /*
1703  * 139 0x8b ''
1704  */
1705  0x66, /* 01100110 */
1706  0x00, /* 00000000 */
1707  0x38, /* 00111000 */
1708  0x18, /* 00011000 */
1709  0x18, /* 00011000 */
1710  0x18, /* 00011000 */
1711  0x3c, /* 00111100 */
1712  0x00, /* 00000000 */
1713 
1714  /*
1715  * 140 0x8c ''
1716  */
1717  0x7c, /* 01111100 */
1718  0x82, /* 10000010 */
1719  0x38, /* 00111000 */
1720  0x18, /* 00011000 */
1721  0x18, /* 00011000 */
1722  0x18, /* 00011000 */
1723  0x3c, /* 00111100 */
1724  0x00, /* 00000000 */
1725 
1726  /*
1727  * 141 0x8d ''
1728  */
1729  0x30, /* 00110000 */
1730  0x18, /* 00011000 */
1731  0x00, /* 00000000 */
1732  0x38, /* 00111000 */
1733  0x18, /* 00011000 */
1734  0x18, /* 00011000 */
1735  0x3c, /* 00111100 */
1736  0x00, /* 00000000 */
1737 
1738  /*
1739  * 142 0x8e ''
1740  */
1741  0xc6, /* 11000110 */
1742  0x38, /* 00111000 */
1743  0x6c, /* 01101100 */
1744  0xc6, /* 11000110 */
1745  0xfe, /* 11111110 */
1746  0xc6, /* 11000110 */
1747  0xc6, /* 11000110 */
1748  0x00, /* 00000000 */
1749 
1750  /*
1751  * 143 0x8f ''
1752  */
1753  0x38, /* 00111000 */
1754  0x6c, /* 01101100 */
1755  0x7c, /* 01111100 */
1756  0xc6, /* 11000110 */
1757  0xfe, /* 11111110 */
1758  0xc6, /* 11000110 */
1759  0xc6, /* 11000110 */
1760  0x00, /* 00000000 */
1761 
1762  /*
1763  * 144 0x90 ''
1764  */
1765  0x18, /* 00011000 */
1766  0x30, /* 00110000 */
1767  0xfe, /* 11111110 */
1768  0xc0, /* 11000000 */
1769  0xf8, /* 11111000 */
1770  0xc0, /* 11000000 */
1771  0xfe, /* 11111110 */
1772  0x00, /* 00000000 */
1773 
1774  /*
1775  * 145 0x91 ''
1776  */
1777  0x00, /* 00000000 */
1778  0x00, /* 00000000 */
1779  0x7e, /* 01111110 */
1780  0x18, /* 00011000 */
1781  0x7e, /* 01111110 */
1782  0xd8, /* 11011000 */
1783  0x7e, /* 01111110 */
1784  0x00, /* 00000000 */
1785 
1786  /*
1787  * 146 0x92 ''
1788  */
1789  0x3e, /* 00111110 */
1790  0x6c, /* 01101100 */
1791  0xcc, /* 11001100 */
1792  0xfe, /* 11111110 */
1793  0xcc, /* 11001100 */
1794  0xcc, /* 11001100 */
1795  0xce, /* 11001110 */
1796  0x00, /* 00000000 */
1797 
1798  /*
1799  * 147 0x93 ''
1800  */
1801  0x7c, /* 01111100 */
1802  0x82, /* 10000010 */
1803  0x7c, /* 01111100 */
1804  0xc6, /* 11000110 */
1805  0xc6, /* 11000110 */
1806  0xc6, /* 11000110 */
1807  0x7c, /* 01111100 */
1808  0x00, /* 00000000 */
1809 
1810  /*
1811  * 148 0x94 ''
1812  */
1813  0xc6, /* 11000110 */
1814  0x00, /* 00000000 */
1815  0x7c, /* 01111100 */
1816  0xc6, /* 11000110 */
1817  0xc6, /* 11000110 */
1818  0xc6, /* 11000110 */
1819  0x7c, /* 01111100 */
1820  0x00, /* 00000000 */
1821 
1822  /*
1823  * 149 0x95 ''
1824  */
1825  0x30, /* 00110000 */
1826  0x18, /* 00011000 */
1827  0x7c, /* 01111100 */
1828  0xc6, /* 11000110 */
1829  0xc6, /* 11000110 */
1830  0xc6, /* 11000110 */
1831  0x7c, /* 01111100 */
1832  0x00, /* 00000000 */
1833 
1834  /*
1835  * 150 0x96 ''
1836  */
1837  0x78, /* 01111000 */
1838  0x84, /* 10000100 */
1839  0x00, /* 00000000 */
1840  0xcc, /* 11001100 */
1841  0xcc, /* 11001100 */
1842  0xcc, /* 11001100 */
1843  0x76, /* 01110110 */
1844  0x00, /* 00000000 */
1845 
1846  /*
1847  * 151 0x97 ''
1848  */
1849  0x60, /* 01100000 */
1850  0x30, /* 00110000 */
1851  0xcc, /* 11001100 */
1852  0xcc, /* 11001100 */
1853  0xcc, /* 11001100 */
1854  0xcc, /* 11001100 */
1855  0x76, /* 01110110 */
1856  0x00, /* 00000000 */
1857 
1858  /*
1859  * 152 0x98 ''
1860  */
1861  0xc6, /* 11000110 */
1862  0x00, /* 00000000 */
1863  0xc6, /* 11000110 */
1864  0xc6, /* 11000110 */
1865  0xc6, /* 11000110 */
1866  0x7e, /* 01111110 */
1867  0x06, /* 00000110 */
1868  0xfc, /* 11111100 */
1869 
1870  /*
1871  * 153 0x99 ''
1872  */
1873  0xc6, /* 11000110 */
1874  0x38, /* 00111000 */
1875  0x6c, /* 01101100 */
1876  0xc6, /* 11000110 */
1877  0xc6, /* 11000110 */
1878  0x6c, /* 01101100 */
1879  0x38, /* 00111000 */
1880  0x00, /* 00000000 */
1881 
1882  /*
1883  * 154 0x9a ''
1884  */
1885  0xc6, /* 11000110 */
1886  0x00, /* 00000000 */
1887  0xc6, /* 11000110 */
1888  0xc6, /* 11000110 */
1889  0xc6, /* 11000110 */
1890  0xc6, /* 11000110 */
1891  0x7c, /* 01111100 */
1892  0x00, /* 00000000 */
1893 
1894  /*
1895  * 155 0x9b ''
1896  */
1897  0x18, /* 00011000 */
1898  0x18, /* 00011000 */
1899  0x7e, /* 01111110 */
1900  0xc0, /* 11000000 */
1901  0xc0, /* 11000000 */
1902  0x7e, /* 01111110 */
1903  0x18, /* 00011000 */
1904  0x18, /* 00011000 */
1905 
1906  /*
1907  * 156 0x9c ''
1908  */
1909  0x38, /* 00111000 */
1910  0x6c, /* 01101100 */
1911  0x64, /* 01100100 */
1912  0xf0, /* 11110000 */
1913  0x60, /* 01100000 */
1914  0x66, /* 01100110 */
1915  0xfc, /* 11111100 */
1916  0x00, /* 00000000 */
1917 
1918  /*
1919  * 157 0x9d ''
1920  */
1921  0x66, /* 01100110 */
1922  0x66, /* 01100110 */
1923  0x3c, /* 00111100 */
1924  0x7e, /* 01111110 */
1925  0x18, /* 00011000 */
1926  0x7e, /* 01111110 */
1927  0x18, /* 00011000 */
1928  0x18, /* 00011000 */
1929 
1930  /*
1931  * 158 0x9e ''
1932  */
1933  0xf8, /* 11111000 */
1934  0xcc, /* 11001100 */
1935  0xcc, /* 11001100 */
1936  0xfa, /* 11111010 */
1937  0xc6, /* 11000110 */
1938  0xcf, /* 11001111 */
1939  0xc6, /* 11000110 */
1940  0xc7, /* 11000111 */
1941 
1942  /*
1943  * 159 0x9f ''
1944  */
1945  0x0e, /* 00001110 */
1946  0x1b, /* 00011011 */
1947  0x18, /* 00011000 */
1948  0x3c, /* 00111100 */
1949  0x18, /* 00011000 */
1950  0xd8, /* 11011000 */
1951  0x70, /* 01110000 */
1952  0x00, /* 00000000 */
1953 
1954  /*
1955  * 160 0xa0 ''
1956  */
1957  0x18, /* 00011000 */
1958  0x30, /* 00110000 */
1959  0x78, /* 01111000 */
1960  0x0c, /* 00001100 */
1961  0x7c, /* 01111100 */
1962  0xcc, /* 11001100 */
1963  0x76, /* 01110110 */
1964  0x00, /* 00000000 */
1965 
1966  /*
1967  * 161 0xa1 ''
1968  */
1969  0x0c, /* 00001100 */
1970  0x18, /* 00011000 */
1971  0x00, /* 00000000 */
1972  0x38, /* 00111000 */
1973  0x18, /* 00011000 */
1974  0x18, /* 00011000 */
1975  0x3c, /* 00111100 */
1976  0x00, /* 00000000 */
1977 
1978  /*
1979  * 162 0xa2 ''
1980  */
1981  0x0c, /* 00001100 */
1982  0x18, /* 00011000 */
1983  0x7c, /* 01111100 */
1984  0xc6, /* 11000110 */
1985  0xc6, /* 11000110 */
1986  0xc6, /* 11000110 */
1987  0x7c, /* 01111100 */
1988  0x00, /* 00000000 */
1989 
1990  /*
1991  * 163 0xa3 ''
1992  */
1993  0x18, /* 00011000 */
1994  0x30, /* 00110000 */
1995  0xcc, /* 11001100 */
1996  0xcc, /* 11001100 */
1997  0xcc, /* 11001100 */
1998  0xcc, /* 11001100 */
1999  0x76, /* 01110110 */
2000  0x00, /* 00000000 */
2001 
2002  /*
2003  * 164 0xa4 ''
2004  */
2005  0x76, /* 01110110 */
2006  0xdc, /* 11011100 */
2007  0x00, /* 00000000 */
2008  0xdc, /* 11011100 */
2009  0x66, /* 01100110 */
2010  0x66, /* 01100110 */
2011  0x66, /* 01100110 */
2012  0x00, /* 00000000 */
2013 
2014  /*
2015  * 165 0xa5 ''
2016  */
2017  0x76, /* 01110110 */
2018  0xdc, /* 11011100 */
2019  0x00, /* 00000000 */
2020  0xe6, /* 11100110 */
2021  0xf6, /* 11110110 */
2022  0xde, /* 11011110 */
2023  0xce, /* 11001110 */
2024  0x00, /* 00000000 */
2025 
2026  /*
2027  * 166 0xa6 ''
2028  */
2029  0x3c, /* 00111100 */
2030  0x6c, /* 01101100 */
2031  0x6c, /* 01101100 */
2032  0x3e, /* 00111110 */
2033  0x00, /* 00000000 */
2034  0x7e, /* 01111110 */
2035  0x00, /* 00000000 */
2036  0x00, /* 00000000 */
2037 
2038  /*
2039  * 167 0xa7 ''
2040  */
2041  0x38, /* 00111000 */
2042  0x6c, /* 01101100 */
2043  0x6c, /* 01101100 */
2044  0x38, /* 00111000 */
2045  0x00, /* 00000000 */
2046  0x7c, /* 01111100 */
2047  0x00, /* 00000000 */
2048  0x00, /* 00000000 */
2049 
2050  /*
2051  * 168 0xa8 ''
2052  */
2053  0x18, /* 00011000 */
2054  0x00, /* 00000000 */
2055  0x18, /* 00011000 */
2056  0x18, /* 00011000 */
2057  0x30, /* 00110000 */
2058  0x63, /* 01100011 */
2059  0x3e, /* 00111110 */
2060  0x00, /* 00000000 */
2061 
2062  /*
2063  * 169 0xa9 ''
2064  */
2065  0x00, /* 00000000 */
2066  0x00, /* 00000000 */
2067  0x00, /* 00000000 */
2068  0xfe, /* 11111110 */
2069  0xc0, /* 11000000 */
2070  0xc0, /* 11000000 */
2071  0x00, /* 00000000 */
2072  0x00, /* 00000000 */
2073 
2074  /*
2075  * 170 0xaa ''
2076  */
2077  0x00, /* 00000000 */
2078  0x00, /* 00000000 */
2079  0x00, /* 00000000 */
2080  0xfe, /* 11111110 */
2081  0x06, /* 00000110 */
2082  0x06, /* 00000110 */
2083  0x00, /* 00000000 */
2084  0x00, /* 00000000 */
2085 
2086  /*
2087  * 171 0xab ''
2088  */
2089  0x63, /* 01100011 */
2090  0xe6, /* 11100110 */
2091  0x6c, /* 01101100 */
2092  0x7e, /* 01111110 */
2093  0x33, /* 00110011 */
2094  0x66, /* 01100110 */
2095  0xcc, /* 11001100 */
2096  0x0f, /* 00001111 */
2097 
2098  /*
2099  * 172 0xac ''
2100  */
2101  0x63, /* 01100011 */
2102  0xe6, /* 11100110 */
2103  0x6c, /* 01101100 */
2104  0x7a, /* 01111010 */
2105  0x36, /* 00110110 */
2106  0x6a, /* 01101010 */
2107  0xdf, /* 11011111 */
2108  0x06, /* 00000110 */
2109 
2110  /*
2111  * 173 0xad ''
2112  */
2113  0x18, /* 00011000 */
2114  0x00, /* 00000000 */
2115  0x18, /* 00011000 */
2116  0x18, /* 00011000 */
2117  0x3c, /* 00111100 */
2118  0x3c, /* 00111100 */
2119  0x18, /* 00011000 */
2120  0x00, /* 00000000 */
2121 
2122  /*
2123  * 174 0xae ''
2124  */
2125  0x00, /* 00000000 */
2126  0x33, /* 00110011 */
2127  0x66, /* 01100110 */
2128  0xcc, /* 11001100 */
2129  0x66, /* 01100110 */
2130  0x33, /* 00110011 */
2131  0x00, /* 00000000 */
2132  0x00, /* 00000000 */
2133 
2134  /*
2135  * 175 0xaf ''
2136  */
2137  0x00, /* 00000000 */
2138  0xcc, /* 11001100 */
2139  0x66, /* 01100110 */
2140  0x33, /* 00110011 */
2141  0x66, /* 01100110 */
2142  0xcc, /* 11001100 */
2143  0x00, /* 00000000 */
2144  0x00, /* 00000000 */
2145 
2146  /*
2147  * 176 0xb0 ''
2148  */
2149  0x22, /* 00100010 */
2150  0x88, /* 10001000 */
2151  0x22, /* 00100010 */
2152  0x88, /* 10001000 */
2153  0x22, /* 00100010 */
2154  0x88, /* 10001000 */
2155  0x22, /* 00100010 */
2156  0x88, /* 10001000 */
2157 
2158  /*
2159  * 177 0xb1 ''
2160  */
2161  0x55, /* 01010101 */
2162  0xaa, /* 10101010 */
2163  0x55, /* 01010101 */
2164  0xaa, /* 10101010 */
2165  0x55, /* 01010101 */
2166  0xaa, /* 10101010 */
2167  0x55, /* 01010101 */
2168  0xaa, /* 10101010 */
2169 
2170  /*
2171  * 178 0xb2 ''
2172  */
2173  0x77, /* 01110111 */
2174  0xdd, /* 11011101 */
2175  0x77, /* 01110111 */
2176  0xdd, /* 11011101 */
2177  0x77, /* 01110111 */
2178  0xdd, /* 11011101 */
2179  0x77, /* 01110111 */
2180  0xdd, /* 11011101 */
2181 
2182  /*
2183  * 179 0xb3 ''
2184  */
2185  0x18, /* 00011000 */
2186  0x18, /* 00011000 */
2187  0x18, /* 00011000 */
2188  0x18, /* 00011000 */
2189  0x18, /* 00011000 */
2190  0x18, /* 00011000 */
2191  0x18, /* 00011000 */
2192  0x18, /* 00011000 */
2193 
2194  /*
2195  * 180 0xb4 ''
2196  */
2197  0x18, /* 00011000 */
2198  0x18, /* 00011000 */
2199  0x18, /* 00011000 */
2200  0x18, /* 00011000 */
2201  0xf8, /* 11111000 */
2202  0x18, /* 00011000 */
2203  0x18, /* 00011000 */
2204  0x18, /* 00011000 */
2205 
2206  /*
2207  * 181 0xb5 ''
2208  */
2209  0x18, /* 00011000 */
2210  0x18, /* 00011000 */
2211  0xf8, /* 11111000 */
2212  0x18, /* 00011000 */
2213  0xf8, /* 11111000 */
2214  0x18, /* 00011000 */
2215  0x18, /* 00011000 */
2216  0x18, /* 00011000 */
2217 
2218  /*
2219  * 182 0xb6 ''
2220  */
2221  0x36, /* 00110110 */
2222  0x36, /* 00110110 */
2223  0x36, /* 00110110 */
2224  0x36, /* 00110110 */
2225  0xf6, /* 11110110 */
2226  0x36, /* 00110110 */
2227  0x36, /* 00110110 */
2228  0x36, /* 00110110 */
2229 
2230  /*
2231  * 183 0xb7 ''
2232  */
2233  0x00, /* 00000000 */
2234  0x00, /* 00000000 */
2235  0x00, /* 00000000 */
2236  0x00, /* 00000000 */
2237  0xfe, /* 11111110 */
2238  0x36, /* 00110110 */
2239  0x36, /* 00110110 */
2240  0x36, /* 00110110 */
2241 
2242  /*
2243  * 184 0xb8 ''
2244  */
2245  0x00, /* 00000000 */
2246  0x00, /* 00000000 */
2247  0xf8, /* 11111000 */
2248  0x18, /* 00011000 */
2249  0xf8, /* 11111000 */
2250  0x18, /* 00011000 */
2251  0x18, /* 00011000 */
2252  0x18, /* 00011000 */
2253 
2254  /*
2255  * 185 0xb9 ''
2256  */
2257  0x36, /* 00110110 */
2258  0x36, /* 00110110 */
2259  0xf6, /* 11110110 */
2260  0x06, /* 00000110 */
2261  0xf6, /* 11110110 */
2262  0x36, /* 00110110 */
2263  0x36, /* 00110110 */
2264  0x36, /* 00110110 */
2265 
2266  /*
2267  * 186 0xba ''
2268  */
2269  0x36, /* 00110110 */
2270  0x36, /* 00110110 */
2271  0x36, /* 00110110 */
2272  0x36, /* 00110110 */
2273  0x36, /* 00110110 */
2274  0x36, /* 00110110 */
2275  0x36, /* 00110110 */
2276  0x36, /* 00110110 */
2277 
2278  /*
2279  * 187 0xbb ''
2280  */
2281  0x00, /* 00000000 */
2282  0x00, /* 00000000 */
2283  0xfe, /* 11111110 */
2284  0x06, /* 00000110 */
2285  0xf6, /* 11110110 */
2286  0x36, /* 00110110 */
2287  0x36, /* 00110110 */
2288  0x36, /* 00110110 */
2289 
2290  /*
2291  * 188 0xbc ''
2292  */
2293  0x36, /* 00110110 */
2294  0x36, /* 00110110 */
2295  0xf6, /* 11110110 */
2296  0x06, /* 00000110 */
2297  0xfe, /* 11111110 */
2298  0x00, /* 00000000 */
2299  0x00, /* 00000000 */
2300  0x00, /* 00000000 */
2301 
2302  /*
2303  * 189 0xbd ''
2304  */
2305  0x36, /* 00110110 */
2306  0x36, /* 00110110 */
2307  0x36, /* 00110110 */
2308  0x36, /* 00110110 */
2309  0xfe, /* 11111110 */
2310  0x00, /* 00000000 */
2311  0x00, /* 00000000 */
2312  0x00, /* 00000000 */
2313 
2314  /*
2315  * 190 0xbe ''
2316  */
2317  0x18, /* 00011000 */
2318  0x18, /* 00011000 */
2319  0xf8, /* 11111000 */
2320  0x18, /* 00011000 */
2321  0xf8, /* 11111000 */
2322  0x00, /* 00000000 */
2323  0x00, /* 00000000 */
2324  0x00, /* 00000000 */
2325 
2326  /*
2327  * 191 0xbf ''
2328  */
2329  0x00, /* 00000000 */
2330  0x00, /* 00000000 */
2331  0x00, /* 00000000 */
2332  0x00, /* 00000000 */
2333  0xf8, /* 11111000 */
2334  0x18, /* 00011000 */
2335  0x18, /* 00011000 */
2336  0x18, /* 00011000 */
2337 
2338  /*
2339  * 192 0xc0 ''
2340  */
2341  0x18, /* 00011000 */
2342  0x18, /* 00011000 */
2343  0x18, /* 00011000 */
2344  0x18, /* 00011000 */
2345  0x1f, /* 00011111 */
2346  0x00, /* 00000000 */
2347  0x00, /* 00000000 */
2348  0x00, /* 00000000 */
2349 
2350  /*
2351  * 193 0xc1 ''
2352  */
2353  0x18, /* 00011000 */
2354  0x18, /* 00011000 */
2355  0x18, /* 00011000 */
2356  0x18, /* 00011000 */
2357  0xff, /* 11111111 */
2358  0x00, /* 00000000 */
2359  0x00, /* 00000000 */
2360  0x00, /* 00000000 */
2361 
2362  /*
2363  * 194 0xc2 ''
2364  */
2365  0x00, /* 00000000 */
2366  0x00, /* 00000000 */
2367  0x00, /* 00000000 */
2368  0x00, /* 00000000 */
2369  0xff, /* 11111111 */
2370  0x18, /* 00011000 */
2371  0x18, /* 00011000 */
2372  0x18, /* 00011000 */
2373 
2374  /*
2375  * 195 0xc3 ''
2376  */
2377  0x18, /* 00011000 */
2378  0x18, /* 00011000 */
2379  0x18, /* 00011000 */
2380  0x18, /* 00011000 */
2381  0x1f, /* 00011111 */
2382  0x18, /* 00011000 */
2383  0x18, /* 00011000 */
2384  0x18, /* 00011000 */
2385 
2386  /*
2387  * 196 0xc4 ''
2388  */
2389  0x00, /* 00000000 */
2390  0x00, /* 00000000 */
2391  0x00, /* 00000000 */
2392  0x00, /* 00000000 */
2393  0xff, /* 11111111 */
2394  0x00, /* 00000000 */
2395  0x00, /* 00000000 */
2396  0x00, /* 00000000 */
2397 
2398  /*
2399  * 197 0xc5 ''
2400  */
2401  0x18, /* 00011000 */
2402  0x18, /* 00011000 */
2403  0x18, /* 00011000 */
2404  0x18, /* 00011000 */
2405  0xff, /* 11111111 */
2406  0x18, /* 00011000 */
2407  0x18, /* 00011000 */
2408  0x18, /* 00011000 */
2409 
2410  /*
2411  * 198 0xc6 ''
2412  */
2413  0x18, /* 00011000 */
2414  0x18, /* 00011000 */
2415  0x1f, /* 00011111 */
2416  0x18, /* 00011000 */
2417  0x1f, /* 00011111 */
2418  0x18, /* 00011000 */
2419  0x18, /* 00011000 */
2420  0x18, /* 00011000 */
2421 
2422  /*
2423  * 199 0xc7 ''
2424  */
2425  0x36, /* 00110110 */
2426  0x36, /* 00110110 */
2427  0x36, /* 00110110 */
2428  0x36, /* 00110110 */
2429  0x37, /* 00110111 */
2430  0x36, /* 00110110 */
2431  0x36, /* 00110110 */
2432  0x36, /* 00110110 */
2433 
2434  /*
2435  * 200 0xc8 ''
2436  */
2437  0x36, /* 00110110 */
2438  0x36, /* 00110110 */
2439  0x37, /* 00110111 */
2440  0x30, /* 00110000 */
2441  0x3f, /* 00111111 */
2442  0x00, /* 00000000 */
2443  0x00, /* 00000000 */
2444  0x00, /* 00000000 */
2445 
2446  /*
2447  * 201 0xc9 ''
2448  */
2449  0x00, /* 00000000 */
2450  0x00, /* 00000000 */
2451  0x3f, /* 00111111 */
2452  0x30, /* 00110000 */
2453  0x37, /* 00110111 */
2454  0x36, /* 00110110 */
2455  0x36, /* 00110110 */
2456  0x36, /* 00110110 */
2457 
2458  /*
2459  * 202 0xca ''
2460  */
2461  0x36, /* 00110110 */
2462  0x36, /* 00110110 */
2463  0xf7, /* 11110111 */
2464  0x00, /* 00000000 */
2465  0xff, /* 11111111 */
2466  0x00, /* 00000000 */
2467  0x00, /* 00000000 */
2468  0x00, /* 00000000 */
2469 
2470  /*
2471  * 203 0xcb ''
2472  */
2473  0x00, /* 00000000 */
2474  0x00, /* 00000000 */
2475  0xff, /* 11111111 */
2476  0x00, /* 00000000 */
2477  0xf7, /* 11110111 */
2478  0x36, /* 00110110 */
2479  0x36, /* 00110110 */
2480  0x36, /* 00110110 */
2481 
2482  /*
2483  * 204 0xcc ''
2484  */
2485  0x36, /* 00110110 */
2486  0x36, /* 00110110 */
2487  0x37, /* 00110111 */
2488  0x30, /* 00110000 */
2489  0x37, /* 00110111 */
2490  0x36, /* 00110110 */
2491  0x36, /* 00110110 */
2492  0x36, /* 00110110 */
2493 
2494  /*
2495  * 205 0xcd ''
2496  */
2497  0x00, /* 00000000 */
2498  0x00, /* 00000000 */
2499  0xff, /* 11111111 */
2500  0x00, /* 00000000 */
2501  0xff, /* 11111111 */
2502  0x00, /* 00000000 */
2503  0x00, /* 00000000 */
2504  0x00, /* 00000000 */
2505 
2506  /*
2507  * 206 0xce ''
2508  */
2509  0x36, /* 00110110 */
2510  0x36, /* 00110110 */
2511  0xf7, /* 11110111 */
2512  0x00, /* 00000000 */
2513  0xf7, /* 11110111 */
2514  0x36, /* 00110110 */
2515  0x36, /* 00110110 */
2516  0x36, /* 00110110 */
2517 
2518  /*
2519  * 207 0xcf ''
2520  */
2521  0x18, /* 00011000 */
2522  0x18, /* 00011000 */
2523  0xff, /* 11111111 */
2524  0x00, /* 00000000 */
2525  0xff, /* 11111111 */
2526  0x00, /* 00000000 */
2527  0x00, /* 00000000 */
2528  0x00, /* 00000000 */
2529 
2530  /*
2531  * 208 0xd0 ''
2532  */
2533  0x36, /* 00110110 */
2534  0x36, /* 00110110 */
2535  0x36, /* 00110110 */
2536  0x36, /* 00110110 */
2537  0xff, /* 11111111 */
2538  0x00, /* 00000000 */
2539  0x00, /* 00000000 */
2540  0x00, /* 00000000 */
2541 
2542  /*
2543  * 209 0xd1 ''
2544  */
2545  0x00, /* 00000000 */
2546  0x00, /* 00000000 */
2547  0xff, /* 11111111 */
2548  0x00, /* 00000000 */
2549  0xff, /* 11111111 */
2550  0x18, /* 00011000 */
2551  0x18, /* 00011000 */
2552  0x18, /* 00011000 */
2553 
2554  /*
2555  * 210 0xd2 ''
2556  */
2557  0x00, /* 00000000 */
2558  0x00, /* 00000000 */
2559  0x00, /* 00000000 */
2560  0x00, /* 00000000 */
2561  0xff, /* 11111111 */
2562  0x36, /* 00110110 */
2563  0x36, /* 00110110 */
2564  0x36, /* 00110110 */
2565 
2566  /*
2567  * 211 0xd3 ''
2568  */
2569  0x36, /* 00110110 */
2570  0x36, /* 00110110 */
2571  0x36, /* 00110110 */
2572  0x36, /* 00110110 */
2573  0x3f, /* 00111111 */
2574  0x00, /* 00000000 */
2575  0x00, /* 00000000 */
2576  0x00, /* 00000000 */
2577 
2578  /*
2579  * 212 0xd4 ''
2580  */
2581  0x18, /* 00011000 */
2582  0x18, /* 00011000 */
2583  0x1f, /* 00011111 */
2584  0x18, /* 00011000 */
2585  0x1f, /* 00011111 */
2586  0x00, /* 00000000 */
2587  0x00, /* 00000000 */
2588  0x00, /* 00000000 */
2589 
2590  /*
2591  * 213 0xd5 ''
2592  */
2593  0x00, /* 00000000 */
2594  0x00, /* 00000000 */
2595  0x1f, /* 00011111 */
2596  0x18, /* 00011000 */
2597  0x1f, /* 00011111 */
2598  0x18, /* 00011000 */
2599  0x18, /* 00011000 */
2600  0x18, /* 00011000 */
2601 
2602  /*
2603  * 214 0xd6 ''
2604  */
2605  0x00, /* 00000000 */
2606  0x00, /* 00000000 */
2607  0x00, /* 00000000 */
2608  0x00, /* 00000000 */
2609  0x3f, /* 00111111 */
2610  0x36, /* 00110110 */
2611  0x36, /* 00110110 */
2612  0x36, /* 00110110 */
2613 
2614  /*
2615  * 215 0xd7 ''
2616  */
2617  0x36, /* 00110110 */
2618  0x36, /* 00110110 */
2619  0x36, /* 00110110 */
2620  0x36, /* 00110110 */
2621  0xff, /* 11111111 */
2622  0x36, /* 00110110 */
2623  0x36, /* 00110110 */
2624  0x36, /* 00110110 */
2625 
2626  /*
2627  * 216 0xd8 ''
2628  */
2629  0x18, /* 00011000 */
2630  0x18, /* 00011000 */
2631  0xff, /* 11111111 */
2632  0x18, /* 00011000 */
2633  0xff, /* 11111111 */
2634  0x18, /* 00011000 */
2635  0x18, /* 00011000 */
2636  0x18, /* 00011000 */
2637 
2638  /*
2639  * 217 0xd9 ''
2640  */
2641  0x18, /* 00011000 */
2642  0x18, /* 00011000 */
2643  0x18, /* 00011000 */
2644  0x18, /* 00011000 */
2645  0xf8, /* 11111000 */
2646  0x00, /* 00000000 */
2647  0x00, /* 00000000 */
2648  0x00, /* 00000000 */
2649 
2650  /*
2651  * 218 0xda ''
2652  */
2653  0x00, /* 00000000 */
2654  0x00, /* 00000000 */
2655  0x00, /* 00000000 */
2656  0x00, /* 00000000 */
2657  0x1f, /* 00011111 */
2658  0x18, /* 00011000 */
2659  0x18, /* 00011000 */
2660  0x18, /* 00011000 */
2661 
2662  /*
2663  * 219 0xdb ''
2664  */
2665  0xff, /* 11111111 */
2666  0xff, /* 11111111 */
2667  0xff, /* 11111111 */
2668  0xff, /* 11111111 */
2669  0xff, /* 11111111 */
2670  0xff, /* 11111111 */
2671  0xff, /* 11111111 */
2672  0xff, /* 11111111 */
2673 
2674  /*
2675  * 220 0xdc ''
2676  */
2677  0x00, /* 00000000 */
2678  0x00, /* 00000000 */
2679  0x00, /* 00000000 */
2680  0x00, /* 00000000 */
2681  0xff, /* 11111111 */
2682  0xff, /* 11111111 */
2683  0xff, /* 11111111 */
2684  0xff, /* 11111111 */
2685 
2686  /*
2687  * 221 0xdd ''
2688  */
2689  0xf0, /* 11110000 */
2690  0xf0, /* 11110000 */
2691  0xf0, /* 11110000 */
2692  0xf0, /* 11110000 */
2693  0xf0, /* 11110000 */
2694  0xf0, /* 11110000 */
2695  0xf0, /* 11110000 */
2696  0xf0, /* 11110000 */
2697 
2698  /*
2699  * 222 0xde ''
2700  */
2701  0x0f, /* 00001111 */
2702  0x0f, /* 00001111 */
2703  0x0f, /* 00001111 */
2704  0x0f, /* 00001111 */
2705  0x0f, /* 00001111 */
2706  0x0f, /* 00001111 */
2707  0x0f, /* 00001111 */
2708  0x0f, /* 00001111 */
2709 
2710  /*
2711  * 223 0xdf ''
2712  */
2713  0xff, /* 11111111 */
2714  0xff, /* 11111111 */
2715  0xff, /* 11111111 */
2716  0xff, /* 11111111 */
2717  0x00, /* 00000000 */
2718  0x00, /* 00000000 */
2719  0x00, /* 00000000 */
2720  0x00, /* 00000000 */
2721 
2722  /*
2723  * 224 0xe0 ''
2724  */
2725  0x00, /* 00000000 */
2726  0x00, /* 00000000 */
2727  0x76, /* 01110110 */
2728  0xdc, /* 11011100 */
2729  0xc8, /* 11001000 */
2730  0xdc, /* 11011100 */
2731  0x76, /* 01110110 */
2732  0x00, /* 00000000 */
2733 
2734  /*
2735  * 225 0xe1 ''
2736  */
2737  0x78, /* 01111000 */
2738  0xcc, /* 11001100 */
2739  0xcc, /* 11001100 */
2740  0xd8, /* 11011000 */
2741  0xcc, /* 11001100 */
2742  0xc6, /* 11000110 */
2743  0xcc, /* 11001100 */
2744  0x00, /* 00000000 */
2745 
2746  /*
2747  * 226 0xe2 ''
2748  */
2749  0xfe, /* 11111110 */
2750  0xc6, /* 11000110 */
2751  0xc0, /* 11000000 */
2752  0xc0, /* 11000000 */
2753  0xc0, /* 11000000 */
2754  0xc0, /* 11000000 */
2755  0xc0, /* 11000000 */
2756  0x00, /* 00000000 */
2757 
2758  /*
2759  * 227 0xe3 ''
2760  */
2761  0x00, /* 00000000 */
2762  0x00, /* 00000000 */
2763  0xfe, /* 11111110 */
2764  0x6c, /* 01101100 */
2765  0x6c, /* 01101100 */
2766  0x6c, /* 01101100 */
2767  0x6c, /* 01101100 */
2768  0x00, /* 00000000 */
2769 
2770  /*
2771  * 228 0xe4 ''
2772  */
2773  0xfe, /* 11111110 */
2774  0xc6, /* 11000110 */
2775  0x60, /* 01100000 */
2776  0x30, /* 00110000 */
2777  0x60, /* 01100000 */
2778  0xc6, /* 11000110 */
2779  0xfe, /* 11111110 */
2780  0x00, /* 00000000 */
2781 
2782  /*
2783  * 229 0xe5 ''
2784  */
2785  0x00, /* 00000000 */
2786  0x00, /* 00000000 */
2787  0x7e, /* 01111110 */
2788  0xd8, /* 11011000 */
2789  0xd8, /* 11011000 */
2790  0xd8, /* 11011000 */
2791  0x70, /* 01110000 */
2792  0x00, /* 00000000 */
2793 
2794  /*
2795  * 230 0xe6 ''
2796  */
2797  0x00, /* 00000000 */
2798  0x00, /* 00000000 */
2799  0x66, /* 01100110 */
2800  0x66, /* 01100110 */
2801  0x66, /* 01100110 */
2802  0x66, /* 01100110 */
2803  0x7c, /* 01111100 */
2804  0xc0, /* 11000000 */
2805 
2806  /*
2807  * 231 0xe7 ''
2808  */
2809  0x00, /* 00000000 */
2810  0x76, /* 01110110 */
2811  0xdc, /* 11011100 */
2812  0x18, /* 00011000 */
2813  0x18, /* 00011000 */
2814  0x18, /* 00011000 */
2815  0x18, /* 00011000 */
2816  0x00, /* 00000000 */
2817 
2818  /*
2819  * 232 0xe8 ''
2820  */
2821  0x7e, /* 01111110 */
2822  0x18, /* 00011000 */
2823  0x3c, /* 00111100 */
2824  0x66, /* 01100110 */
2825  0x66, /* 01100110 */
2826  0x3c, /* 00111100 */
2827  0x18, /* 00011000 */
2828  0x7e, /* 01111110 */
2829 
2830  /*
2831  * 233 0xe9 ''
2832  */
2833  0x38, /* 00111000 */
2834  0x6c, /* 01101100 */
2835  0xc6, /* 11000110 */
2836  0xfe, /* 11111110 */
2837  0xc6, /* 11000110 */
2838  0x6c, /* 01101100 */
2839  0x38, /* 00111000 */
2840  0x00, /* 00000000 */
2841 
2842  /*
2843  * 234 0xea ''
2844  */
2845  0x38, /* 00111000 */
2846  0x6c, /* 01101100 */
2847  0xc6, /* 11000110 */
2848  0xc6, /* 11000110 */
2849  0x6c, /* 01101100 */
2850  0x6c, /* 01101100 */
2851  0xee, /* 11101110 */
2852  0x00, /* 00000000 */
2853 
2854  /*
2855  * 235 0xeb ''
2856  */
2857  0x0e, /* 00001110 */
2858  0x18, /* 00011000 */
2859  0x0c, /* 00001100 */
2860  0x3e, /* 00111110 */
2861  0x66, /* 01100110 */
2862  0x66, /* 01100110 */
2863  0x3c, /* 00111100 */
2864  0x00, /* 00000000 */
2865 
2866  /*
2867  * 236 0xec ''
2868  */
2869  0x00, /* 00000000 */
2870  0x00, /* 00000000 */
2871  0x7e, /* 01111110 */
2872  0xdb, /* 11011011 */
2873  0xdb, /* 11011011 */
2874  0x7e, /* 01111110 */
2875  0x00, /* 00000000 */
2876  0x00, /* 00000000 */
2877 
2878  /*
2879  * 237 0xed ''
2880  */
2881  0x06, /* 00000110 */
2882  0x0c, /* 00001100 */
2883  0x7e, /* 01111110 */
2884  0xdb, /* 11011011 */
2885  0xdb, /* 11011011 */
2886  0x7e, /* 01111110 */
2887  0x60, /* 01100000 */
2888  0xc0, /* 11000000 */
2889 
2890  /*
2891  * 238 0xee ''
2892  */
2893  0x1e, /* 00011110 */
2894  0x30, /* 00110000 */
2895  0x60, /* 01100000 */
2896  0x7e, /* 01111110 */
2897  0x60, /* 01100000 */
2898  0x30, /* 00110000 */
2899  0x1e, /* 00011110 */
2900  0x00, /* 00000000 */
2901 
2902  /*
2903  * 239 0xef ''
2904  */
2905  0x00, /* 00000000 */
2906  0x7c, /* 01111100 */
2907  0xc6, /* 11000110 */
2908  0xc6, /* 11000110 */
2909  0xc6, /* 11000110 */
2910  0xc6, /* 11000110 */
2911  0xc6, /* 11000110 */
2912  0x00, /* 00000000 */
2913 
2914  /*
2915  * 240 0xf0 ''
2916  */
2917  0x00, /* 00000000 */
2918  0xfe, /* 11111110 */
2919  0x00, /* 00000000 */
2920  0xfe, /* 11111110 */
2921  0x00, /* 00000000 */
2922  0xfe, /* 11111110 */
2923  0x00, /* 00000000 */
2924  0x00, /* 00000000 */
2925 
2926  /*
2927  * 241 0xf1 ''
2928  */
2929  0x18, /* 00011000 */
2930  0x18, /* 00011000 */
2931  0x7e, /* 01111110 */
2932  0x18, /* 00011000 */
2933  0x18, /* 00011000 */
2934  0x00, /* 00000000 */
2935  0x7e, /* 01111110 */
2936  0x00, /* 00000000 */
2937 
2938  /*
2939  * 242 0xf2 ''
2940  */
2941  0x30, /* 00110000 */
2942  0x18, /* 00011000 */
2943  0x0c, /* 00001100 */
2944  0x18, /* 00011000 */
2945  0x30, /* 00110000 */
2946  0x00, /* 00000000 */
2947  0x7e, /* 01111110 */
2948  0x00, /* 00000000 */
2949 
2950  /*
2951  * 243 0xf3 ''
2952  */
2953  0x0c, /* 00001100 */
2954  0x18, /* 00011000 */
2955  0x30, /* 00110000 */
2956  0x18, /* 00011000 */
2957  0x0c, /* 00001100 */
2958  0x00, /* 00000000 */
2959  0x7e, /* 01111110 */
2960  0x00, /* 00000000 */
2961 
2962  /*
2963  * 244 0xf4 ''
2964  */
2965  0x0e, /* 00001110 */
2966  0x1b, /* 00011011 */
2967  0x1b, /* 00011011 */
2968  0x18, /* 00011000 */
2969  0x18, /* 00011000 */
2970  0x18, /* 00011000 */
2971  0x18, /* 00011000 */
2972  0x18, /* 00011000 */
2973 
2974  /*
2975  * 245 0xf5 ''
2976  */
2977  0x18, /* 00011000 */
2978  0x18, /* 00011000 */
2979  0x18, /* 00011000 */
2980  0x18, /* 00011000 */
2981  0x18, /* 00011000 */
2982  0xd8, /* 11011000 */
2983  0xd8, /* 11011000 */
2984  0x70, /* 01110000 */
2985 
2986  /*
2987  * 246 0xf6 ''
2988  */
2989  0x00, /* 00000000 */
2990  0x18, /* 00011000 */
2991  0x00, /* 00000000 */
2992  0x7e, /* 01111110 */
2993  0x00, /* 00000000 */
2994  0x18, /* 00011000 */
2995  0x00, /* 00000000 */
2996  0x00, /* 00000000 */
2997 
2998  /*
2999  * 247 0xf7 ''
3000  */
3001  0x00, /* 00000000 */
3002  0x76, /* 01110110 */
3003  0xdc, /* 11011100 */
3004  0x00, /* 00000000 */
3005  0x76, /* 01110110 */
3006  0xdc, /* 11011100 */
3007  0x00, /* 00000000 */
3008  0x00, /* 00000000 */
3009 
3010  /*
3011  * 248 0xf8 ''
3012  */
3013  0x38, /* 00111000 */
3014  0x6c, /* 01101100 */
3015  0x6c, /* 01101100 */
3016  0x38, /* 00111000 */
3017  0x00, /* 00000000 */
3018  0x00, /* 00000000 */
3019  0x00, /* 00000000 */
3020  0x00, /* 00000000 */
3021 
3022  /*
3023  * 249 0xf9 ''
3024  */
3025  0x00, /* 00000000 */
3026  0x00, /* 00000000 */
3027  0x00, /* 00000000 */
3028  0x18, /* 00011000 */
3029  0x18, /* 00011000 */
3030  0x00, /* 00000000 */
3031  0x00, /* 00000000 */
3032  0x00, /* 00000000 */
3033 
3034  /*
3035  * 250 0xfa ''
3036  */
3037  0x00, /* 00000000 */
3038  0x00, /* 00000000 */
3039  0x00, /* 00000000 */
3040  0x18, /* 00011000 */
3041  0x00, /* 00000000 */
3042  0x00, /* 00000000 */
3043  0x00, /* 00000000 */
3044  0x00, /* 00000000 */
3045 
3046  /*
3047  * 251 0xfb ''
3048  */
3049  0x0f, /* 00001111 */
3050  0x0c, /* 00001100 */
3051  0x0c, /* 00001100 */
3052  0x0c, /* 00001100 */
3053  0xec, /* 11101100 */
3054  0x6c, /* 01101100 */
3055  0x3c, /* 00111100 */
3056  0x1c, /* 00011100 */
3057 
3058  /*
3059  * 252 0xfc ''
3060  */
3061  0x6c, /* 01101100 */
3062  0x36, /* 00110110 */
3063  0x36, /* 00110110 */
3064  0x36, /* 00110110 */
3065  0x36, /* 00110110 */
3066  0x00, /* 00000000 */
3067  0x00, /* 00000000 */
3068  0x00, /* 00000000 */
3069 
3070  /*
3071  * 253 0xfd ''
3072  */
3073  0x78, /* 01111000 */
3074  0x0c, /* 00001100 */
3075  0x18, /* 00011000 */
3076  0x30, /* 00110000 */
3077  0x7c, /* 01111100 */
3078  0x00, /* 00000000 */
3079  0x00, /* 00000000 */
3080  0x00, /* 00000000 */
3081 
3082  /*
3083  * 254 0xfe ''
3084  */
3085  0x00, /* 00000000 */
3086  0x00, /* 00000000 */
3087  0x3c, /* 00111100 */
3088  0x3c, /* 00111100 */
3089  0x3c, /* 00111100 */
3090  0x3c, /* 00111100 */
3091  0x00, /* 00000000 */
3092  0x00, /* 00000000 */
3093 
3094  /*
3095  * 255 0xff ' '
3096  */
3097  0x00, /* 00000000 */
3098  0x00, /* 00000000 */
3099  0x00, /* 00000000 */
3100  0x00, /* 00000000 */
3101  0x00, /* 00000000 */
3102  0x00, /* 00000000 */
3103  0x00, /* 00000000 */
3104  0x00, /* 00000000 */
3105 
3106 };
#define GFX_FONTDATAMAX
SDL2_gfx-1.0.4/Docs/html/_s_d_l2__image_filter_8c.html100777 0 0 362630 12632323332 15537 0 SDL2_gfx: /cygdrive/i/Sources/sdl2gfx/SDL2_imageFilter.c File Reference
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
/cygdrive/i/Sources/sdl2gfx/SDL2_imageFilter.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "SDL.h"
#include "SDL2_imageFilter.h"

Go to the source code of this file.

Macros

#define SWAP_32(x)   (((x) >> 24) | (((x) & 0x00ff0000) >> 8) | (((x) & 0x0000ff00) << 8) | ((x) << 24))
 Swaps the byte order in a 32bit integer (LSB becomes MSB, etc.). More...
 

Functions

int SDL_imageFilterMMXdetect (void)
 MMX detection routine (with override flag). More...
 
void SDL_imageFilterMMXoff ()
 Disable MMX check for filter functions and and force to use non-MMX C based code. More...
 
void SDL_imageFilterMMXon ()
 Enable MMX check for filter functions and use MMX code if available. More...
 
int SDL_imageFilterAdd (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
 Filter using Add: D = saturation255(S1 + S2) More...
 
int SDL_imageFilterMean (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
 Filter using Mean: D = S1/2 + S2/2. More...
 
int SDL_imageFilterSub (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
 Filter using Sub: D = saturation0(S1 - S2) More...
 
int SDL_imageFilterAbsDiff (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
 Filter using AbsDiff: D = | S1 - S2 |. More...
 
int SDL_imageFilterMult (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
 Filter using Mult: D = saturation255(S1 * S2) More...
 
int SDL_imageFilterMultNorASM (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength)
 Internal ASM Filter using MultNor: D = S1 * S2. More...
 
int SDL_imageFilterMultNor (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
 Filter using MultNor: D = S1 * S2. More...
 
int SDL_imageFilterMultDivby2 (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
 Filter using MultDivby2: D = saturation255(S1/2 * S2) More...
 
int SDL_imageFilterMultDivby4 (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
 Filter using MultDivby4: D = saturation255(S1/2 * S2/2) More...
 
int SDL_imageFilterBitAnd (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
 Filter using BitAnd: D = S1 & S2. More...
 
int SDL_imageFilterBitOr (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
 Filter using BitOr: D = S1 | S2. More...
 
int SDL_imageFilterDiv (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
 Filter using Div: D = S1 / S2. More...
 
int SDL_imageFilterBitNegation (unsigned char *Src1, unsigned char *Dest, unsigned int length)
 Filter using BitNegation: D = !S. More...
 
int SDL_imageFilterAddByte (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C)
 Filter using AddByte: D = saturation255(S + C) More...
 
int SDL_imageFilterAddUint (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned int C)
 Filter using AddUint: D = saturation255((S[i] + Cs[i % 4]), Cs=Swap32((uint)C) More...
 
int SDL_imageFilterAddByteToHalf (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C)
 Filter using AddByteToHalf: D = saturation255(S/2 + C) More...
 
int SDL_imageFilterSubByteMMX (unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char C)
 Internal MMX Filter using SubByte: D = saturation0(S - C) More...
 
int SDL_imageFilterSubByte (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C)
 Filter using SubByte: D = saturation0(S - C) More...
 
int SDL_imageFilterSubUint (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned int C)
 Filter using SubUint: D = saturation0(S[i] - Cs[i % 4]), Cs=Swap32((uint)C) More...
 
int SDL_imageFilterShiftRight (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
 Filter using ShiftRight: D = saturation0(S >> N) More...
 
int SDL_imageFilterShiftRightUint (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
 Filter using ShiftRightUint: D = saturation0((uint)S[i] >> N) More...
 
int SDL_imageFilterMultByByte (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C)
 Filter using MultByByte: D = saturation255(S * C) More...
 
int SDL_imageFilterShiftRightAndMultByByte (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N, unsigned char C)
 Filter using ShiftRightAndMultByByte: D = saturation255((S >> N) * C) More...
 
int SDL_imageFilterShiftLeftByte (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
 Filter using ShiftLeftByte: D = (S << N) More...
 
int SDL_imageFilterShiftLeftUint (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
 Filter using ShiftLeftUint: D = ((uint)S << N) More...
 
int SDL_imageFilterShiftLeft (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
 Filter ShiftLeft: D = saturation255(S << N) More...
 
int SDL_imageFilterBinarizeUsingThreshold (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char T)
 Filter using BinarizeUsingThreshold: D = (S >= T) ? 255:0. More...
 
int SDL_imageFilterClipToRange (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char Tmin, unsigned char Tmax)
 Filter using ClipToRange: D = (S >= Tmin) & (S <= Tmax) S:Tmin | Tmax. More...
 
int SDL_imageFilterNormalizeLinear (unsigned char *Src, unsigned char *Dest, unsigned int length, int Cmin, int Cmax, int Nmin, int Nmax)
 Filter using NormalizeLinear: D = saturation255((Nmax - Nmin)/(Cmax - Cmin)*(S - Cmin) + Nmin) More...
 
int SDL_imageFilterConvolveKernel3x3Divide (unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char Divisor)
 Filter using ConvolveKernel3x3Divide: Dij = saturation0and255( ... ) More...
 
int SDL_imageFilterConvolveKernel5x5Divide (unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char Divisor)
 Filter using ConvolveKernel5x5Divide: Dij = saturation0and255( ... ) More...
 
int SDL_imageFilterConvolveKernel7x7Divide (unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char Divisor)
 Filter using ConvolveKernel7x7Divide: Dij = saturation0and255( ... ) More...
 
int SDL_imageFilterConvolveKernel9x9Divide (unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char Divisor)
 Filter using ConvolveKernel9x9Divide: Dij = saturation0and255( ... ) More...
 
int SDL_imageFilterConvolveKernel3x3ShiftRight (unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char NRightShift)
 Filter using ConvolveKernel3x3ShiftRight: Dij = saturation0and255( ... ) More...
 
int SDL_imageFilterConvolveKernel5x5ShiftRight (unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char NRightShift)
 Filter using ConvolveKernel5x5ShiftRight: Dij = saturation0and255( ... ) More...
 
int SDL_imageFilterConvolveKernel7x7ShiftRight (unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char NRightShift)
 Filter using ConvolveKernel7x7ShiftRight: Dij = saturation0and255( ... ) More...
 
int SDL_imageFilterConvolveKernel9x9ShiftRight (unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char NRightShift)
 Filter using ConvolveKernel9x9ShiftRight: Dij = saturation255( ... ) More...
 
int SDL_imageFilterSobelX (unsigned char *Src, unsigned char *Dest, int rows, int columns)
 Filter using SobelX: Dij = saturation255( ... ) More...
 
int SDL_imageFilterSobelXShiftRight (unsigned char *Src, unsigned char *Dest, int rows, int columns, unsigned char NRightShift)
 Filter using SobelXShiftRight: Dij = saturation255( ... ) More...
 
void SDL_imageFilterAlignStack (void)
 Align stack to 32 byte boundary,. More...
 
void SDL_imageFilterRestoreStack (void)
 Restore previously aligned stack. More...
 

Macro Definition Documentation

#define SWAP_32 (   x)    (((x) >> 24) | (((x) & 0x00ff0000) >> 8) | (((x) & 0x0000ff00) << 8) | ((x) << 24))

Swaps the byte order in a 32bit integer (LSB becomes MSB, etc.).

Definition at line 61 of file SDL2_imageFilter.c.

Function Documentation

int SDL_imageFilterAbsDiff ( unsigned char *  Src1,
unsigned char *  Src2,
unsigned char *  Dest,
unsigned int  length 
)

Filter using AbsDiff: D = | S1 - S2 |.

Parameters
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
Returns
Returns 0 for success or -1 for error.

Definition at line 542 of file SDL2_imageFilter.c.

int SDL_imageFilterAdd ( unsigned char *  Src1,
unsigned char *  Src2,
unsigned char *  Dest,
unsigned int  length 
)

Filter using Add: D = saturation255(S1 + S2)

Parameters
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
Returns
Returns 0 for success or -1 for error.

Definition at line 173 of file SDL2_imageFilter.c.

int SDL_imageFilterAddByte ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  length,
unsigned char  C 
)

Filter using AddByte: D = saturation255(S + C)

Parameters
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
CConstant value to add (C).
Returns
Returns 0 for success or -1 for error.

Definition at line 1791 of file SDL2_imageFilter.c.

int SDL_imageFilterAddByteToHalf ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  length,
unsigned char  C 
)

Filter using AddByteToHalf: D = saturation255(S/2 + C)

Parameters
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
CConstant to add (C).
Returns
Returns 0 for success or -1 for error.

Definition at line 2068 of file SDL2_imageFilter.c.

int SDL_imageFilterAddUint ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  length,
unsigned int  C 
)

Filter using AddUint: D = saturation255((S[i] + Cs[i % 4]), Cs=Swap32((uint)C)

Parameters
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
CConstant to add (C).
Returns
Returns 0 for success or -1 for error.

Definition at line 1919 of file SDL2_imageFilter.c.

void SDL_imageFilterAlignStack ( void  )

Align stack to 32 byte boundary,.

Definition at line 7326 of file SDL2_imageFilter.c.

int SDL_imageFilterBinarizeUsingThreshold ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  length,
unsigned char  T 
)

Filter using BinarizeUsingThreshold: D = (S >= T) ? 255:0.

Parameters
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
TThe threshold boundary (inclusive).
Returns
Returns 0 for success or -1 for error.

Definition at line 3534 of file SDL2_imageFilter.c.

int SDL_imageFilterBitAnd ( unsigned char *  Src1,
unsigned char *  Src2,
unsigned char *  Dest,
unsigned int  length 
)

Filter using BitAnd: D = S1 & S2.

Parameters
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
Returns
Returns 0 for success or -1 for error.

Definition at line 1278 of file SDL2_imageFilter.c.

int SDL_imageFilterBitNegation ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  length 
)

Filter using BitNegation: D = !S.

Parameters
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
Returns
Returns 0 for success or -1 for error.

Definition at line 1671 of file SDL2_imageFilter.c.

int SDL_imageFilterBitOr ( unsigned char *  Src1,
unsigned char *  Src2,
unsigned char *  Dest,
unsigned int  length 
)

Filter using BitOr: D = S1 | S2.

Parameters
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
Returns
Returns 0 for success or -1 for error.

Definition at line 1392 of file SDL2_imageFilter.c.

int SDL_imageFilterClipToRange ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  length,
unsigned char  Tmin,
unsigned char  Tmax 
)

Filter using ClipToRange: D = (S >= Tmin) & (S <= Tmax) S:Tmin | Tmax.

Parameters
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
TminLower (inclusive) boundary of the clipping range.
TmaxUpper (inclusive) boundary of the clipping range.
Returns
Returns 0 for success or -1 for error.

Definition at line 3691 of file SDL2_imageFilter.c.

int SDL_imageFilterConvolveKernel3x3Divide ( unsigned char *  Src,
unsigned char *  Dest,
int  rows,
int  columns,
signed short *  Kernel,
unsigned char  Divisor 
)

Filter using ConvolveKernel3x3Divide: Dij = saturation0and255( ... )

Parameters
SrcThe source 2D byte array to convolve. Should be different from destination.
DestThe destination 2D byte array to store the result in. Should be different from source.
rowsNumber of rows in source/destination array. Must be >2.
columnsNumber of columns in source/destination array. Must be >2.
KernelThe 2D convolution kernel of size 3x3.
DivisorThe divisor of the convolution sum. Must be >0.

Note: Non-MMX implementation not available for this function.

Returns
Returns 1 if filter was applied, 0 otherwise.

Definition at line 3980 of file SDL2_imageFilter.c.

int SDL_imageFilterConvolveKernel3x3ShiftRight ( unsigned char *  Src,
unsigned char *  Dest,
int  rows,
int  columns,
signed short *  Kernel,
unsigned char  NRightShift 
)

Filter using ConvolveKernel3x3ShiftRight: Dij = saturation0and255( ... )

Parameters
SrcThe source 2D byte array to convolve. Should be different from destination.
DestThe destination 2D byte array to store the result in. Should be different from source.
rowsNumber of rows in source/destination array. Must be >2.
columnsNumber of columns in source/destination array. Must be >2.
KernelThe 2D convolution kernel of size 3x3.
NRightShiftThe number of right bit shifts to apply to the convolution sum. Must be <7.

Note: Non-MMX implementation not available for this function.

Returns
Returns 1 if filter was applied, 0 otherwise.

Definition at line 5378 of file SDL2_imageFilter.c.

int SDL_imageFilterConvolveKernel5x5Divide ( unsigned char *  Src,
unsigned char *  Dest,
int  rows,
int  columns,
signed short *  Kernel,
unsigned char  Divisor 
)

Filter using ConvolveKernel5x5Divide: Dij = saturation0and255( ... )

Parameters
SrcThe source 2D byte array to convolve. Should be different from destination.
DestThe destination 2D byte array to store the result in. Should be different from source.
rowsNumber of rows in source/destination array. Must be >4.
columnsNumber of columns in source/destination array. Must be >4.
KernelThe 2D convolution kernel of size 5x5.
DivisorThe divisor of the convolution sum. Must be >0.

Note: Non-MMX implementation not available for this function.

Returns
Returns 1 if filter was applied, 0 otherwise.

Definition at line 4170 of file SDL2_imageFilter.c.

int SDL_imageFilterConvolveKernel5x5ShiftRight ( unsigned char *  Src,
unsigned char *  Dest,
int  rows,
int  columns,
signed short *  Kernel,
unsigned char  NRightShift 
)

Filter using ConvolveKernel5x5ShiftRight: Dij = saturation0and255( ... )

Parameters
SrcThe source 2D byte array to convolve. Should be different from destination.
DestThe destination 2D byte array to store the result in. Should be different from source.
rowsNumber of rows in source/destination array. Must be >4.
columnsNumber of columns in source/destination array. Must be >4.
KernelThe 2D convolution kernel of size 5x5.
NRightShiftThe number of right bit shifts to apply to the convolution sum. Must be <7.

Note: Non-MMX implementation not available for this function.

Returns
Returns 1 if filter was applied, 0 otherwise.

Definition at line 5555 of file SDL2_imageFilter.c.

int SDL_imageFilterConvolveKernel7x7Divide ( unsigned char *  Src,
unsigned char *  Dest,
int  rows,
int  columns,
signed short *  Kernel,
unsigned char  Divisor 
)

Filter using ConvolveKernel7x7Divide: Dij = saturation0and255( ... )

Parameters
SrcThe source 2D byte array to convolve. Should be different from destination.
DestThe destination 2D byte array to store the result in. Should be different from source.
rowsNumber of rows in source/destination array. Must be >6.
columnsNumber of columns in source/destination array. Must be >6.
KernelThe 2D convolution kernel of size 7x7.
DivisorThe divisor of the convolution sum. Must be >0.

Note: Non-MMX implementation not available for this function.

Returns
Returns 1 if filter was applied, 0 otherwise.

Definition at line 4473 of file SDL2_imageFilter.c.

int SDL_imageFilterConvolveKernel7x7ShiftRight ( unsigned char *  Src,
unsigned char *  Dest,
int  rows,
int  columns,
signed short *  Kernel,
unsigned char  NRightShift 
)

Filter using ConvolveKernel7x7ShiftRight: Dij = saturation0and255( ... )

Parameters
SrcThe source 2D byte array to convolve. Should be different from destination.
DestThe destination 2D byte array to store the result in. Should be different from source.
rowsNumber of rows in source/destination array. Must be >6.
columnsNumber of columns in source/destination array. Must be >6.
KernelThe 2D convolution kernel of size 7x7.
NRightShiftThe number of right bit shifts to apply to the convolution sum. Must be <7.

Note: Non-MMX implementation not available for this function.

Returns
Returns 1 if filter was applied, 0 otherwise.

Definition at line 5856 of file SDL2_imageFilter.c.

int SDL_imageFilterConvolveKernel9x9Divide ( unsigned char *  Src,
unsigned char *  Dest,
int  rows,
int  columns,
signed short *  Kernel,
unsigned char  Divisor 
)

Filter using ConvolveKernel9x9Divide: Dij = saturation0and255( ... )

Parameters
SrcThe source 2D byte array to convolve. Should be different from destination.
DestThe destination 2D byte array to store the result in. Should be different from source.
rowsNumber of rows in source/destination array. Must be >8.
columnsNumber of columns in source/destination array. Must be >8.
KernelThe 2D convolution kernel of size 9x9.
DivisorThe divisor of the convolution sum. Must be >0.

Note: Non-MMX implementation not available for this function.

Returns
Returns 1 if filter was applied, 0 otherwise.

Definition at line 4830 of file SDL2_imageFilter.c.

int SDL_imageFilterConvolveKernel9x9ShiftRight ( unsigned char *  Src,
unsigned char *  Dest,
int  rows,
int  columns,
signed short *  Kernel,
unsigned char  NRightShift 
)

Filter using ConvolveKernel9x9ShiftRight: Dij = saturation255( ... )

Parameters
SrcThe source 2D byte array to convolve. Should be different from destination.
DestThe destination 2D byte array to store the result in. Should be different from source.
rowsNumber of rows in source/destination array. Must be >8.
columnsNumber of columns in source/destination array. Must be >8.
KernelThe 2D convolution kernel of size 9x9.
NRightShiftThe number of right bit shifts to apply to the convolution sum. Must be <7.

Note: Non-MMX implementation not available for this function.

Returns
Returns 1 if filter was applied, 0 otherwise.

Definition at line 6219 of file SDL2_imageFilter.c.

int SDL_imageFilterDiv ( unsigned char *  Src1,
unsigned char *  Src2,
unsigned char *  Dest,
unsigned int  length 
)

Filter using Div: D = S1 / S2.

Parameters
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
Returns
Returns 0 for success or -1 for error.

Definition at line 1549 of file SDL2_imageFilter.c.

int SDL_imageFilterMean ( unsigned char *  Src1,
unsigned char *  Src2,
unsigned char *  Dest,
unsigned int  length 
)

Filter using Mean: D = S1/2 + S2/2.

Parameters
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
Returns
Returns 0 for success or -1 for error.

Definition at line 308 of file SDL2_imageFilter.c.

int SDL_imageFilterMMXdetect ( void  )

MMX detection routine (with override flag).

Returns
1 of MMX was detected, 0 otherwise.

Definition at line 80 of file SDL2_imageFilter.c.

void SDL_imageFilterMMXoff ( void  )

Disable MMX check for filter functions and and force to use non-MMX C based code.

Definition at line 93 of file SDL2_imageFilter.c.

void SDL_imageFilterMMXon ( void  )

Enable MMX check for filter functions and use MMX code if available.

Definition at line 101 of file SDL2_imageFilter.c.

int SDL_imageFilterMult ( unsigned char *  Src1,
unsigned char *  Src2,
unsigned char *  Dest,
unsigned int  length 
)

Filter using Mult: D = saturation255(S1 * S2)

Parameters
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
Returns
Returns 0 for success or -1 for error.

Definition at line 729 of file SDL2_imageFilter.c.

int SDL_imageFilterMultByByte ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  length,
unsigned char  C 
)

Filter using MultByByte: D = saturation255(S * C)

Parameters
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
CConstant to multiply with (C).
Returns
Returns 0 for success or -1 for error.

Definition at line 2790 of file SDL2_imageFilter.c.

int SDL_imageFilterMultDivby2 ( unsigned char *  Src1,
unsigned char *  Src2,
unsigned char *  Dest,
unsigned int  length 
)

Filter using MultDivby2: D = saturation255(S1/2 * S2)

Parameters
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
Returns
Returns 0 for success or -1 for error.

Definition at line 1000 of file SDL2_imageFilter.c.

int SDL_imageFilterMultDivby4 ( unsigned char *  Src1,
unsigned char *  Src2,
unsigned char *  Dest,
unsigned int  length 
)

Filter using MultDivby4: D = saturation255(S1/2 * S2/2)

Parameters
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
Returns
Returns 0 for success or -1 for error.

Definition at line 1141 of file SDL2_imageFilter.c.

int SDL_imageFilterMultNor ( unsigned char *  Src1,
unsigned char *  Src2,
unsigned char *  Dest,
unsigned int  length 
)

Filter using MultNor: D = S1 * S2.

Parameters
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
Returns
Returns 0 for success or -1 for error.

Definition at line 862 of file SDL2_imageFilter.c.

int SDL_imageFilterMultNorASM ( unsigned char *  Src1,
unsigned char *  Src2,
unsigned char *  Dest,
unsigned int  SrcLength 
)

Internal ASM Filter using MultNor: D = S1 * S2.

Parameters
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
SrcLengthThe number of bytes in the source arrays.
Returns
Returns 0 for success or -1 for error.

Definition at line 792 of file SDL2_imageFilter.c.

int SDL_imageFilterNormalizeLinear ( unsigned char *  Src,
unsigned char *  Dest,
unsigned int  length,
int  Cmin,
int  Cmax,
int  Nmin,
int  Nmax 
)

Filter using NormalizeLinear: D = saturation255((Nmax - Nmin)/(Cmax - Cmin)*(S - Cmin) + Nmin)

Parameters
SrcPointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
CminNormalization constant.
CmaxNormalization constant.
NminNormalization constant.
NmaxNormalization constant.
Returns
Returns 0 for success or -1 for error.

Definition at line 3909 of file SDL2_imageFilter.c.

void SDL_imageFilterRestoreStack ( void  )

Restore previously aligned stack.

Definition at line 7354 of file SDL2_imageFilter.c.

int SDL_imageFilterShiftLeft ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  length,
unsigned char  N 
)

Filter ShiftLeft: D = saturation255(S << N)

Parameters
Src1Pointer to the start of the source byte array (S1).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
NNumber of bit-positions to shift (N). Valid range is 0 to 8.
Returns
Returns 0 for success or -1 for error.

Definition at line 3393 of file SDL2_imageFilter.c.

int SDL_imageFilterShiftLeftByte ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  length,
unsigned char  N 
)

Filter using ShiftLeftByte: D = (S << N)

Parameters
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
NNumber of bit-positions to shift (N). Valid range is 0 to 8.
Returns
Returns 0 for success or -1 for error.

Definition at line 3093 of file SDL2_imageFilter.c.

int SDL_imageFilterShiftLeftUint ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  length,
unsigned char  N 
)

Filter using ShiftLeftUint: D = ((uint)S << N)

Parameters
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
NNumber of bit-positions to shift (N). Valid range is 0 to 32.
Returns
Returns 0 for success or -1 for error.

Definition at line 3210 of file SDL2_imageFilter.c.

int SDL_imageFilterShiftRight ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  length,
unsigned char  N 
)

Filter using ShiftRight: D = saturation0(S >> N)

Parameters
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
NNumber of bit-positions to shift (N). Valid range is 0 to 8.
Returns
Returns 0 for success or -1 for error.

Definition at line 2476 of file SDL2_imageFilter.c.

int SDL_imageFilterShiftRightAndMultByByte ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  length,
unsigned char  N,
unsigned char  C 
)

Filter using ShiftRightAndMultByByte: D = saturation255((S >> N) * C)

Parameters
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
NNumber of bit-positions to shift (N). Valid range is 0 to 8.
CConstant to multiply with (C).
Returns
Returns 0 for success or -1 for error.

Definition at line 2943 of file SDL2_imageFilter.c.

int SDL_imageFilterShiftRightUint ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  length,
unsigned char  N 
)

Filter using ShiftRightUint: D = saturation0((uint)S[i] >> N)

Parameters
Src1Pointer to the start of the source byte array (S1).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
NNumber of bit-positions to shift (N). Valid range is 0 to 32.
Returns
Returns 0 for success or -1 for error.

Definition at line 2594 of file SDL2_imageFilter.c.

int SDL_imageFilterSobelX ( unsigned char *  Src,
unsigned char *  Dest,
int  rows,
int  columns 
)

Filter using SobelX: Dij = saturation255( ... )

Parameters
SrcThe source 2D byte array to sobel-filter. Should be different from destination.
DestThe destination 2D byte array to store the result in. Should be different from source.
rowsNumber of rows in source/destination array. Must be >2.
columnsNumber of columns in source/destination array. Must be >7.

Note: Non-MMX implementation not available for this function.

Returns
Returns 1 if filter was applied, 0 otherwise.

Definition at line 6799 of file SDL2_imageFilter.c.

int SDL_imageFilterSobelXShiftRight ( unsigned char *  Src,
unsigned char *  Dest,
int  rows,
int  columns,
unsigned char  NRightShift 
)

Filter using SobelXShiftRight: Dij = saturation255( ... )

Parameters
SrcThe source 2D byte array to sobel-filter. Should be different from destination.
DestThe destination 2D byte array to store the result in. Should be different from source.
rowsNumber of rows in source/destination array. Must be >2.
columnsNumber of columns in source/destination array. Must be >8.
NRightShiftThe number of right bit shifts to apply to the filter sum. Must be <7.

Note: Non-MMX implementation not available for this function.

Returns
Returns 1 if filter was applied, 0 otherwise.

Definition at line 7052 of file SDL2_imageFilter.c.

int SDL_imageFilterSub ( unsigned char *  Src1,
unsigned char *  Src2,
unsigned char *  Dest,
unsigned int  length 
)

Filter using Sub: D = saturation0(S1 - S2)

Parameters
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
Returns
Returns 0 for success or -1 for error.

Definition at line 422 of file SDL2_imageFilter.c.

int SDL_imageFilterSubByte ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  length,
unsigned char  C 
)

Filter using SubByte: D = saturation0(S - C)

Parameters
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
CConstant to subtract (C).
Returns
Returns 0 for success or -1 for error.

Definition at line 2196 of file SDL2_imageFilter.c.

int SDL_imageFilterSubByteMMX ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  SrcLength,
unsigned char  C 
)

Internal MMX Filter using SubByte: D = saturation0(S - C)

Parameters
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
SrcLengthThe number of bytes in the source array.
CConstant to subtract (C).
Returns
Returns 0 for success or -1 for error.

Definition at line 2130 of file SDL2_imageFilter.c.

int SDL_imageFilterSubUint ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  length,
unsigned int  C 
)

Filter using SubUint: D = saturation0(S[i] - Cs[i % 4]), Cs=Swap32((uint)C)

Parameters
Src1Pointer to the start of the source byte array (S1).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
CConstant to subtract (C).
Returns
Returns 0 for success or -1 for error.

Definition at line 2325 of file SDL2_imageFilter.c.

SDL2_gfx-1.0.4/Docs/html/_s_d_l2__image_filter_8c_source.html100777 0 0 4625011 12632323332 17136 0 SDL2_gfx: /cygdrive/i/Sources/sdl2gfx/SDL2_imageFilter.c Source File
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
/cygdrive/i/Sources/sdl2gfx/SDL2_imageFilter.c
Go to the documentation of this file.
1 /*
2 
3 SDL2_imageFilter.c: byte-image "filter" routines
4 
5 Copyright (C) 2012-2014 Andreas Schiffler
6 Copyright (C) 2013 Sylvain Beucler
7 
8 This software is provided 'as-is', without any express or implied
9 warranty. In no event will the authors be held liable for any damages
10 arising from the use of this software.
11 
12 Permission is granted to anyone to use this software for any purpose,
13 including commercial applications, and to alter it and redistribute it
14 freely, subject to the following restrictions:
15 
16  1. The origin of this software must not be misrepresented; you must not
17  claim that you wrote the original software. If you use this software
18  in a product, an acknowledgment in the product documentation would be
19  appreciated but is not required.
20 
21  2. Altered source versions must be plainly marked as such, and must not be
22  misrepresented as being the original software.
23 
24  3. This notice may not be removed or altered from any source
25  distribution.
26 
27 Andreas Schiffler -- aschiffler at ferzkopp dot net
28 
29 */
30 
31 /*
32 
33 Note: Uses inline x86 MMX or ASM optimizations if available and enabled.
34 
35 Note: Most of the MMX code is based on published routines
36 by Vladimir Kravtchenko at vk@cs.ubc.ca - credits go to
37 him for his work.
38 
39 */
40 
41 #include <stdio.h>
42 #include <stdlib.h>
43 #include <string.h>
44 
45 #include "SDL.h"
46 
47 /* Use GCC intrinsics if available: they support both i386 and x86_64,
48  provide ASM-grade performances, and lift the PUSHA/POPA issues. */
49 #ifdef __GNUC__
50 # ifdef USE_MMX
51 # include <mmintrin.h>
52 # endif
53 # include <SDL_cpuinfo.h>
54 #endif
55 
56 #include "SDL2_imageFilter.h"
57 
61 #define SWAP_32(x) (((x) >> 24) | (((x) & 0x00ff0000) >> 8) | (((x) & 0x0000ff00) << 8) | ((x) << 24))
62 
63 /* ------ Static variables ----- */
64 
68 static int SDL_imageFilterUseMMX = 1;
69 
70 /* Detect GCC */
71 #if defined(__GNUC__)
72 #define GCC__
73 #endif
74 
81 {
82  /* Check override flag */
83  if (SDL_imageFilterUseMMX == 0) {
84  return (0);
85  }
86 
87  return SDL_HasMMX();
88 }
89 
94 {
95  SDL_imageFilterUseMMX = 0;
96 }
97 
102 {
103  SDL_imageFilterUseMMX = 1;
104 }
105 
106 /* ------------------------------------------------------------------------------------ */
107 
118 static int SDL_imageFilterAddMMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength)
119 {
120 #ifdef USE_MMX
121 #if !defined(GCC__)
122  __asm
123  {
124  pusha
125  mov eax, Src1 /* load Src1 address into eax */
126  mov ebx, Src2 /* load Src2 address into ebx */
127  mov edi, Dest /* load Dest address into edi */
128  mov ecx, SrcLength /* load loop counter (SIZE) into ecx */
129  shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */
130  align 16 /* 16 byte alignment of the loop entry */
131 L1010:
132  movq mm1, [eax] /* load 8 bytes from Src1 into mm1 */
133  paddusb mm1, [ebx] /* mm1=Src1+Src2 (add 8 bytes with saturation) */
134  movq [edi], mm1 /* store result in Dest */
135  add eax, 8 /* increase Src1, Src2 and Dest */
136  add ebx, 8 /* register pointers by 8 */
137  add edi, 8
138  dec ecx /* decrease loop counter */
139  jnz L1010 /* check loop termination, proceed if required */
140  emms /* exit MMX state */
141  popa
142  }
143 #else
144  /* i386 and x86_64 */
145  __m64 *mSrc1 = (__m64*)Src1;
146  __m64 *mSrc2 = (__m64*)Src2;
147  __m64 *mDest = (__m64*)Dest;
148  int i;
149  for (i = 0; i < SrcLength/8; i++) {
150  *mDest = _m_paddusb(*mSrc1, *mSrc2); /* Src1+Src2 (add 8 bytes with saturation) */
151  mSrc1++;
152  mSrc2++;
153  mDest++;
154  }
155  _m_empty(); /* clean MMX state */
156 #endif
157  return (0);
158 #else
159  return (-1);
160 #endif
161 }
162 
173 int SDL_imageFilterAdd(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
174 {
175  unsigned int i, istart;
176  unsigned char *cursrc1, *cursrc2, *curdst;
177  int result;
178 
179  /* Validate input parameters */
180  if ((Src1 == NULL) || (Src2 == NULL) || (Dest == NULL))
181  return(-1);
182  if (length == 0)
183  return(0);
184 
185  if ((SDL_imageFilterMMXdetect()) && (length > 7)) {
186 
187  /* Use MMX assembly routine */
188  SDL_imageFilterAddMMX(Src1, Src2, Dest, length);
189 
190  /* Check for unaligned bytes */
191  if ((length & 7) > 0) {
192  /* Setup to process unaligned bytes */
193  istart = length & 0xfffffff8;
194  cursrc1 = &Src1[istart];
195  cursrc2 = &Src2[istart];
196  curdst = &Dest[istart];
197  } else {
198  /* No unaligned bytes - we are done */
199  return (0);
200  }
201  } else {
202  /* Setup to process whole image */
203  istart = 0;
204  cursrc1 = Src1;
205  cursrc2 = Src2;
206  curdst = Dest;
207  }
208 
209  /* C routine to process image */
210  for (i = istart; i < length; i++) {
211  result = (int) *cursrc1 + (int) *cursrc2;
212  if (result > 255)
213  result = 255;
214  *curdst = (unsigned char) result;
215  /* Advance pointers */
216  cursrc1++;
217  cursrc2++;
218  curdst++;
219  }
220 
221  return (0);
222 }
223 
235 static int SDL_imageFilterMeanMMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength,
236  unsigned char *Mask)
237 {
238 #ifdef USE_MMX
239 #if !defined(GCC__)
240  __asm
241  {
242  pusha
243  mov edx, Mask /* load Mask address into edx */
244  movq mm0, [edx] /* load Mask into mm0 */
245  mov eax, Src1 /* load Src1 address into eax */
246  mov ebx, Src2 /* load Src2 address into ebx */
247  mov edi, Dest /* load Dest address into edi */
248  mov ecx, SrcLength /* load loop counter (SIZE) into ecx */
249  shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */
250  align 16 /* 16 byte alignment of the loop entry */
251 L21011:
252  movq mm1, [eax] /* load 8 bytes from Src1 into mm1 */
253  movq mm2, [ebx] /* load 8 bytes from Src2 into mm2 */
254  /* --- Byte shift via Word shift --- */
255  psrlw mm1, 1 /* shift 4 WORDS of mm1 1 bit to the right */
256  psrlw mm2, 1 /* shift 4 WORDS of mm2 1 bit to the right */
257  pand mm1, mm0 // apply Mask to 8 BYTES of mm1 */
258  /* byte 0x0f, 0xdb, 0xc8 */
259  pand mm2, mm0 // apply Mask to 8 BYTES of mm2 */
260  /* byte 0x0f, 0xdb, 0xd0 */
261  paddusb mm1, mm2 /* mm1=mm1+mm2 (add 8 bytes with saturation) */
262  movq [edi], mm1 /* store result in Dest */
263  add eax, 8 /* increase Src1, Src2 and Dest */
264  add ebx, 8 /* register pointers by 8 */
265  add edi, 8
266  dec ecx /* decrease loop counter */
267  jnz L21011 /* check loop termination, proceed if required */
268  emms /* exit MMX state */
269  popa
270  }
271 #else
272  /* i386 and x86_64 */
273  __m64 *mSrc1 = (__m64*)Src1;
274  __m64 *mSrc2 = (__m64*)Src2;
275  __m64 *mDest = (__m64*)Dest;
276  __m64 *mMask = (__m64*)Mask;
277  int i;
278  for (i = 0; i < SrcLength/8; i++) {
279  __m64 mm1 = *mSrc1,
280  mm2 = *mSrc2;
281  mm1 = _m_psrlwi(mm1, 1); /* shift 4 WORDS of mm1 1 bit to the right */
282  mm2 = _m_psrlwi(mm2, 1); /* shift 4 WORDS of mm2 1 bit to the right */
283  mm1 = _m_pand(mm1, *mMask); /* apply Mask to 8 BYTES of mm1 */
284  mm2 = _m_pand(mm2, *mMask); /* apply Mask to 8 BYTES of mm2 */
285  *mDest = _m_paddusb(mm1, mm2); /* mm1+mm2 (add 8 bytes with saturation) */
286  mSrc1++;
287  mSrc2++;
288  mDest++;
289  }
290  _m_empty(); /* clean MMX state */
291 #endif
292  return (0);
293 #else
294  return (-1);
295 #endif
296 }
297 
308 int SDL_imageFilterMean(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
309 {
310  static unsigned char Mask[8] = { 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F };
311  unsigned int i, istart;
312  unsigned char *cursrc1, *cursrc2, *curdst;
313  int result;
314 
315  /* Validate input parameters */
316  if ((Src1 == NULL) || (Src2 == NULL) || (Dest == NULL))
317  return(-1);
318  if (length == 0)
319  return(0);
320 
321  if ((SDL_imageFilterMMXdetect()) && (length > 7)) {
322  /* MMX routine */
323  SDL_imageFilterMeanMMX(Src1, Src2, Dest, length, Mask);
324 
325  /* Check for unaligned bytes */
326  if ((length & 7) > 0) {
327  /* Setup to process unaligned bytes */
328  istart = length & 0xfffffff8;
329  cursrc1 = &Src1[istart];
330  cursrc2 = &Src2[istart];
331  curdst = &Dest[istart];
332  } else {
333  /* No unaligned bytes - we are done */
334  return (0);
335  }
336  } else {
337  /* Setup to process whole image */
338  istart = 0;
339  cursrc1 = Src1;
340  cursrc2 = Src2;
341  curdst = Dest;
342  }
343 
344  /* C routine to process image */
345  for (i = istart; i < length; i++) {
346  result = (int) *cursrc1 / 2 + (int) *cursrc2 / 2;
347  *curdst = (unsigned char) result;
348  /* Advance pointers */
349  cursrc1++;
350  cursrc2++;
351  curdst++;
352  }
353 
354  return (0);
355 }
356 
367 static int SDL_imageFilterSubMMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength)
368 {
369 #ifdef USE_MMX
370 #if !defined(GCC__)
371  __asm
372  {
373  pusha
374  mov eax, Src1 /* load Src1 address into eax */
375  mov ebx, Src2 /* load Src2 address into ebx */
376  mov edi, Dest /* load Dest address into edi */
377  mov ecx, SrcLength /* load loop counter (SIZE) into ecx */
378  shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */
379  align 16 /* 16 byte alignment of the loop entry */
380 L1012:
381  movq mm1, [eax] /* load 8 bytes from Src1 into mm1 */
382  psubusb mm1, [ebx] /* mm1=Src1-Src2 (sub 8 bytes with saturation) */
383  movq [edi], mm1 /* store result in Dest */
384  add eax, 8 /* increase Src1, Src2 and Dest */
385  add ebx, 8 /* register pointers by 8 */
386  add edi, 8
387  dec ecx /* decrease loop counter */
388  jnz L1012 /* check loop termination, proceed if required */
389  emms /* exit MMX state */
390  popa
391  }
392 #else
393  /* i386 and x86_64 */
394  __m64 *mSrc1 = (__m64*)Src1;
395  __m64 *mSrc2 = (__m64*)Src2;
396  __m64 *mDest = (__m64*)Dest;
397  int i;
398  for (i = 0; i < SrcLength/8; i++) {
399  *mDest = _m_psubusb(*mSrc1, *mSrc2); /* Src1-Src2 (sub 8 bytes with saturation) */
400  mSrc1++;
401  mSrc2++;
402  mDest++;
403  }
404  _m_empty(); /* clean MMX state */
405 #endif
406  return (0);
407 #else
408  return (-1);
409 #endif
410 }
411 
422 int SDL_imageFilterSub(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
423 {
424  unsigned int i, istart;
425  unsigned char *cursrc1, *cursrc2, *curdst;
426  int result;
427 
428  /* Validate input parameters */
429  if ((Src1 == NULL) || (Src2 == NULL) || (Dest == NULL))
430  return(-1);
431  if (length == 0)
432  return(0);
433 
434  if ((SDL_imageFilterMMXdetect()) && (length > 7)) {
435  /* MMX routine */
436  SDL_imageFilterSubMMX(Src1, Src2, Dest, length);
437 
438  /* Check for unaligned bytes */
439  if ((length & 7) > 0) {
440  /* Setup to process unaligned bytes */
441  istart = length & 0xfffffff8;
442  cursrc1 = &Src1[istart];
443  cursrc2 = &Src2[istart];
444  curdst = &Dest[istart];
445  } else {
446  /* No unaligned bytes - we are done */
447  return (0);
448  }
449  } else {
450  /* Setup to process whole image */
451  istart = 0;
452  cursrc1 = Src1;
453  cursrc2 = Src2;
454  curdst = Dest;
455  }
456 
457  /* C routine to process image */
458  for (i = istart; i < length; i++) {
459  result = (int) *cursrc1 - (int) *cursrc2;
460  if (result < 0)
461  result = 0;
462  *curdst = (unsigned char) result;
463  /* Advance pointers */
464  cursrc1++;
465  cursrc2++;
466  curdst++;
467  }
468 
469  return (0);
470 }
471 
482 static int SDL_imageFilterAbsDiffMMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength)
483 {
484 #ifdef USE_MMX
485 #if !defined(GCC__)
486  __asm
487  {
488  pusha
489  mov eax, Src1 /* load Src1 address into eax */
490  mov ebx, Src2 /* load Src2 address into ebx */
491  mov edi, Dest /* load Dest address into edi */
492  mov ecx, SrcLength /* load loop counter (SIZE) into ecx */
493  shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */
494  align 16 /* 16 byte alignment of the loop entry */
495 L1013:
496  movq mm1, [eax] /* load 8 bytes from Src1 into mm1 */
497  movq mm2, [ebx] /* load 8 bytes from Src2 into mm2 */
498  psubusb mm1, [ebx] /* mm1=Src1-Src2 (sub 8 bytes with saturation) */
499  psubusb mm2, [eax] /* mm2=Src2-Src1 (sub 8 bytes with saturation) */
500  por mm1, mm2 /* combine both mm2 and mm1 results */
501  movq [edi], mm1 /* store result in Dest */
502  add eax, 8 /* increase Src1, Src2 and Dest */
503  add ebx, 8 /* register pointers by 8 */
504  add edi, 8
505  dec ecx /* decrease loop counter */
506  jnz L1013 /* check loop termination, proceed if required */
507  emms /* exit MMX state */
508  popa
509  }
510 #else
511  /* i386 and x86_64 */
512  __m64 *mSrc1 = (__m64*)Src1;
513  __m64 *mSrc2 = (__m64*)Src2;
514  __m64 *mDest = (__m64*)Dest;
515  int i;
516  for (i = 0; i < SrcLength/8; i++) {
517  __m64 mm1 = _m_psubusb(*mSrc2, *mSrc1); /* Src1-Src2 (sub 8 bytes with saturation) */
518  __m64 mm2 = _m_psubusb(*mSrc1, *mSrc2); /* Src2-Src1 (sub 8 bytes with saturation) */
519  *mDest = _m_por(mm1, mm2); /* combine both mm2 and mm1 results */
520  mSrc1++;
521  mSrc2++;
522  mDest++;
523  }
524  _m_empty(); /* clean MMX state */
525 #endif
526  return (0);
527 #else
528  return (-1);
529 #endif
530 }
531 
542 int SDL_imageFilterAbsDiff(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
543 {
544  unsigned int i, istart;
545  unsigned char *cursrc1, *cursrc2, *curdst;
546  int result;
547 
548  /* Validate input parameters */
549  if ((Src1 == NULL) || (Src2 == NULL) || (Dest == NULL))
550  return(-1);
551  if (length == 0)
552  return(0);
553 
554  if ((SDL_imageFilterMMXdetect()) && (length > 7)) {
555  /* MMX routine */
556  SDL_imageFilterAbsDiffMMX(Src1, Src2, Dest, length);
557 
558  /* Check for unaligned bytes */
559  if ((length & 7) > 0) {
560  /* Setup to process unaligned bytes */
561  istart = length & 0xfffffff8;
562  cursrc1 = &Src1[istart];
563  cursrc2 = &Src2[istart];
564  curdst = &Dest[istart];
565  } else {
566  /* No unaligned bytes - we are done */
567  return (0);
568  }
569  } else {
570  /* Setup to process whole image */
571  istart = 0;
572  cursrc1 = Src1;
573  cursrc2 = Src2;
574  curdst = Dest;
575  }
576 
577  /* C routine to process image */
578  for (i = istart; i < length; i++) {
579  result = abs((int) *cursrc1 - (int) *cursrc2);
580  *curdst = (unsigned char) result;
581  /* Advance pointers */
582  cursrc1++;
583  cursrc2++;
584  curdst++;
585  }
586 
587  return (0);
588 }
589 
600 static int SDL_imageFilterMultMMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength)
601 {
602 #ifdef USE_MMX
603 #if !defined(GCC__)
604  __asm
605  {
606  pusha
607  mov eax, Src1 /* load Src1 address into eax */
608  mov ebx, Src2 /* load Src2 address into ebx */
609  mov edi, Dest /* load Dest address into edi */
610  mov ecx, SrcLength /* load loop counter (SIZE) into ecx */
611  shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */
612  pxor mm0, mm0 /* zero mm0 register */
613  align 16 /* 16 byte alignment of the loop entry */
614 L1014:
615  movq mm1, [eax] /* load 8 bytes from Src1 into mm1 */
616  movq mm3, [ebx] /* load 8 bytes from Src2 into mm3 */
617  movq mm2, mm1 /* copy mm1 into mm2 */
618  movq mm4, mm3 /* copy mm3 into mm4 */
619  punpcklbw mm1, mm0 /* unpack low bytes of Src1 into words */
620  punpckhbw mm2, mm0 /* unpack high bytes of Src1 into words */
621  punpcklbw mm3, mm0 /* unpack low bytes of Src2 into words */
622  punpckhbw mm4, mm0 /* unpack high bytes of Src2 into words */
623  pmullw mm1, mm3 /* mul low bytes of Src1 and Src2 */
624  pmullw mm2, mm4 /* mul high bytes of Src1 and Src2 */
625  /* Take abs value of the results (signed words) */
626  movq mm5, mm1 /* copy mm1 into mm5 */
627  movq mm6, mm2 /* copy mm2 into mm6 */
628  psraw mm5, 15 /* fill mm5 words with word sign bit */
629  psraw mm6, 15 /* fill mm6 words with word sign bit */
630  pxor mm1, mm5 /* take 1's compliment of only neg. words */
631  pxor mm2, mm6 /* take 1's compliment of only neg. words */
632  psubsw mm1, mm5 /* add 1 to only neg. words, W-(-1) or W-0 */
633  psubsw mm2, mm6 /* add 1 to only neg. words, W-(-1) or W-0 */
634  packuswb mm1, mm2 /* pack words back into bytes with saturation */
635  movq [edi], mm1 /* store result in Dest */
636  add eax, 8 /* increase Src1, Src2 and Dest */
637  add ebx, 8 /* register pointers by 8 */
638  add edi, 8
639  dec ecx /* decrease loop counter */
640  jnz L1014 /* check loop termination, proceed if required */
641  emms /* exit MMX state */
642  popa
643  }
644 #else
645  /* i386 ASM with constraints: */
646  /* asm volatile ( */
647  /* "shr $3, %%ecx \n\t" /\* counter/8 (MMX loads 8 bytes at a time) *\/ */
648  /* "pxor %%mm0, %%mm0 \n\t" /\* zero mm0 register *\/ */
649  /* ".align 16 \n\t" /\* 16 byte alignment of the loop entry *\/ */
650  /* "1: movq (%%eax), %%mm1 \n\t" /\* load 8 bytes from Src1 into mm1 *\/ */
651  /* "movq (%%ebx), %%mm3 \n\t" /\* load 8 bytes from Src2 into mm3 *\/ */
652  /* "movq %%mm1, %%mm2 \n\t" /\* copy mm1 into mm2 *\/ */
653  /* "movq %%mm3, %%mm4 \n\t" /\* copy mm3 into mm4 *\/ */
654  /* "punpcklbw %%mm0, %%mm1 \n\t" /\* unpack low bytes of Src1 into words *\/ */
655  /* "punpckhbw %%mm0, %%mm2 \n\t" /\* unpack high bytes of Src1 into words *\/ */
656  /* "punpcklbw %%mm0, %%mm3 \n\t" /\* unpack low bytes of Src2 into words *\/ */
657  /* "punpckhbw %%mm0, %%mm4 \n\t" /\* unpack high bytes of Src2 into words *\/ */
658  /* "pmullw %%mm3, %%mm1 \n\t" /\* mul low bytes of Src1 and Src2 *\/ */
659  /* "pmullw %%mm4, %%mm2 \n\t" /\* mul high bytes of Src1 and Src2 *\/ */
660  /* /\* Take abs value of the results (signed words) *\/ */
661  /* "movq %%mm1, %%mm5 \n\t" /\* copy mm1 into mm5 *\/ */
662  /* "movq %%mm2, %%mm6 \n\t" /\* copy mm2 into mm6 *\/ */
663  /* "psraw $15, %%mm5 \n\t" /\* fill mm5 words with word sign bit *\/ */
664  /* "psraw $15, %%mm6 \n\t" /\* fill mm6 words with word sign bit *\/ */
665  /* "pxor %%mm5, %%mm1 \n\t" /\* take 1's compliment of only neg. words *\/ */
666  /* "pxor %%mm6, %%mm2 \n\t" /\* take 1's compliment of only neg. words *\/ */
667  /* "psubsw %%mm5, %%mm1 \n\t" /\* add 1 to only neg. words, W-(-1) or W-0 *\/ */
668  /* "psubsw %%mm6, %%mm2 \n\t" /\* add 1 to only neg. words, W-(-1) or W-0 *\/ */
669  /* "packuswb %%mm2, %%mm1 \n\t" /\* pack words back into bytes with saturation *\/ */
670  /* "movq %%mm1, (%%edi) \n\t" /\* store result in Dest *\/ */
671  /* "add $8, %%eax \n\t" /\* increase Src1, Src2 and Dest *\/ */
672  /* "add $8, %%ebx \n\t" /\* register pointers by 8 *\/ */
673  /* "add $8, %%edi \n\t" */
674  /* "dec %%ecx \n\t" /\* decrease loop counter *\/ */
675  /* "jnz 1b \n\t" /\* check loop termination, proceed if required *\/ */
676  /* "emms \n\t" /\* exit MMX state *\/ */
677  /* : "+a" (Src1), /\* load Src1 address into rax, modified by the loop *\/ */
678  /* "+b" (Src2), /\* load Src2 address into rbx, modified by the loop *\/ */
679  /* "+c" (SrcLength), /\* load loop counter (SIZE) into rcx, modified by the loop *\/ */
680  /* "+D" (Dest) /\* load Dest address into rdi, modified by the loop *\/ */
681  /* : */
682  /* : "memory", /\* *Dest is modified *\/ */
683  /* "mm0","mm1","mm2","mm3","mm4","mm5","mm6" /\* registers modified *\/ */
684  /* ); */
685 
686  /* i386 and x86_64 */
687  __m64 *mSrc1 = (__m64*)Src1;
688  __m64 *mSrc2 = (__m64*)Src2;
689  __m64 *mDest = (__m64*)Dest;
690  __m64 mm0 = _m_from_int(0); /* zero mm0 register */
691  int i;
692  for (i = 0; i < SrcLength/8; i++) {
693  __m64 mm1, mm2, mm3, mm4, mm5, mm6;
694  mm1 = _m_punpcklbw(*mSrc1, mm0); /* unpack low bytes of Src1 into words */
695  mm2 = _m_punpckhbw(*mSrc1, mm0); /* unpack high bytes of Src1 into words */
696  mm3 = _m_punpcklbw(*mSrc2, mm0); /* unpack low bytes of Src2 into words */
697  mm4 = _m_punpckhbw(*mSrc2, mm0); /* unpack high bytes of Src2 into words */
698  mm1 = _m_pmullw(mm1, mm3); /* mul low bytes of Src1 and Src2 */
699  mm2 = _m_pmullw(mm2, mm4); /* mul high bytes of Src1 and Src2 */
700  mm5 = _m_psrawi(mm1, 15); /* fill mm5 words with word sign bit */
701  mm6 = _m_psrawi(mm2, 15); /* fill mm6 words with word sign bit */
702  mm1 = _m_pxor(mm1, mm5); /* take 1's compliment of only neg. words */
703  mm2 = _m_pxor(mm2, mm6); /* take 1's compliment of only neg. words */
704  mm1 = _m_psubsw(mm1, mm5); /* add 1 to only neg. words, W-(-1) or W-0 */
705  mm2 = _m_psubsw(mm2, mm6); /* add 1 to only neg. words, W-(-1) or W-0 */
706  *mDest = _m_packuswb(mm1, mm2); /* pack words back into bytes with saturation */
707  mSrc1++;
708  mSrc2++;
709  mDest++;
710  }
711  _m_empty(); /* clean MMX state */
712 #endif
713  return (0);
714 #else
715  return (-1);
716 #endif
717 }
718 
729 int SDL_imageFilterMult(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
730 {
731  unsigned int i, istart;
732  unsigned char *cursrc1, *cursrc2, *curdst;
733  int result;
734 
735  /* Validate input parameters */
736  if ((Src1 == NULL) || (Src2 == NULL) || (Dest == NULL))
737  return(-1);
738  if (length == 0)
739  return(0);
740 
741  if ((SDL_imageFilterMMXdetect()) && (length > 7)) {
742  /* MMX routine */
743  SDL_imageFilterMultMMX(Src1, Src2, Dest, length);
744 
745  /* Check for unaligned bytes */
746  if ((length & 7) > 0) {
747  /* Setup to process unaligned bytes */
748  istart = length & 0xfffffff8;
749  cursrc1 = &Src1[istart];
750  cursrc2 = &Src2[istart];
751  curdst = &Dest[istart];
752  } else {
753  /* No unaligned bytes - we are done */
754  return (0);
755  }
756  } else {
757  /* Setup to process whole image */
758  istart = 0;
759  cursrc1 = Src1;
760  cursrc2 = Src2;
761  curdst = Dest;
762  }
763 
764  /* C routine to process image */
765  for (i = istart; i < length; i++) {
766 
767  /* NOTE: this is probably wrong - dunno what the MMX code does */
768 
769  result = (int) *cursrc1 * (int) *cursrc2;
770  if (result > 255)
771  result = 255;
772  *curdst = (unsigned char) result;
773  /* Advance pointers */
774  cursrc1++;
775  cursrc2++;
776  curdst++;
777  }
778 
779  return (0);
780 }
781 
792 int SDL_imageFilterMultNorASM(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength)
793 {
794 #ifdef USE_MMX
795 #if !defined(GCC__)
796  __asm
797  {
798  pusha
799  mov edx, Src1 /* load Src1 address into edx */
800  mov esi, Src2 /* load Src2 address into esi */
801  mov edi, Dest /* load Dest address into edi */
802  mov ecx, SrcLength /* load loop counter (SIZE) into ecx */
803  align 16 /* 16 byte alignment of the loop entry */
804 L10141:
805  mov al, [edx] /* load a byte from Src1 */
806  mul [esi] /* mul with a byte from Src2 */
807  mov [edi], al /* move a byte result to Dest */
808  inc edx /* increment Src1, Src2, Dest */
809  inc esi /* pointer registers by one */
810  inc edi
811  dec ecx /* decrease loop counter */
812  jnz L10141 /* check loop termination, proceed if required */
813  popa
814  }
815 #else
816  /* Note: ~5% gain on i386, less efficient than C on x86_64 */
817  /* Also depends on whether this function is static (?!) */
818  asm volatile (
819  ".align 16 \n\t" /* 16 byte alignment of the loop entry */
820 # if defined(i386)
821  "1:mov (%%edx), %%al \n\t" /* load a byte from Src1 */
822  "mulb (%%esi) \n\t" /* mul with a byte from Src2 */
823  "mov %%al, (%%edi) \n\t" /* move a byte result to Dest */
824  "inc %%edx \n\t" /* increment Src1, Src2, Dest */
825  "inc %%esi \n\t" /* pointer registers by one */
826  "inc %%edi \n\t"
827  "dec %%ecx \n\t" /* decrease loop counter */
828 # elif defined(__x86_64__)
829  "1:mov (%%rdx), %%al \n\t" /* load a byte from Src1 */
830  "mulb (%%rsi) \n\t" /* mul with a byte from Src2 */
831  "mov %%al, (%%rdi) \n\t" /* move a byte result to Dest */
832  "inc %%rdx \n\t" /* increment Src1, Src2, Dest */
833  "inc %%rsi \n\t" /* pointer registers by one */
834  "inc %%rdi \n\t"
835  "dec %%rcx \n\t" /* decrease loop counter */
836 # endif
837  "jnz 1b \n\t" /* check loop termination, proceed if required */
838  : "+d" (Src1), /* load Src1 address into edx */
839  "+S" (Src2), /* load Src2 address into esi */
840  "+c" (SrcLength), /* load loop counter (SIZE) into ecx */
841  "+D" (Dest) /* load Dest address into edi */
842  :
843  : "memory", "rax"
844  );
845 #endif
846  return (0);
847 #else
848  return (-1);
849 #endif
850 }
851 
862 int SDL_imageFilterMultNor(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
863 {
864  unsigned int i, istart;
865  unsigned char *cursrc1, *cursrc2, *curdst;
866 
867  /* Validate input parameters */
868  if ((Src1 == NULL) || (Src2 == NULL) || (Dest == NULL))
869  return(-1);
870  if (length == 0)
871  return(0);
872 
873  if (SDL_imageFilterMMXdetect()) {
874  if (length > 0) {
875  /* ASM routine */
876  SDL_imageFilterMultNorASM(Src1, Src2, Dest, length);
877 
878  /* Check for unaligned bytes */
879  if ((length & 7) > 0) {
880  /* Setup to process unaligned bytes */
881  istart = length & 0xfffffff8;
882  cursrc1 = &Src1[istart];
883  cursrc2 = &Src2[istart];
884  curdst = &Dest[istart];
885  } else {
886  /* No unaligned bytes - we are done */
887  return (0);
888  }
889  } else {
890  /* No bytes - we are done */
891  return (0);
892  }
893  } else {
894  /* Setup to process whole image */
895  istart = 0;
896  cursrc1 = Src1;
897  cursrc2 = Src2;
898  curdst = Dest;
899  }
900 
901  /* C routine to process image */
902  for (i = istart; i < length; i++) {
903  *curdst = (int)*cursrc1 * (int)*cursrc2; // (int) for efficiency
904  /* Advance pointers */
905  cursrc1++;
906  cursrc2++;
907  curdst++;
908  }
909 
910  return (0);
911 }
912 
923 static int SDL_imageFilterMultDivby2MMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength)
924 {
925 #ifdef USE_MMX
926 #if !defined(GCC__)
927  __asm
928  {
929  pusha
930  mov eax, Src1 /* load Src1 address into eax */
931  mov ebx, Src2 /* load Src2 address into ebx */
932  mov edi, Dest /* load Dest address into edi */
933  mov ecx, SrcLength /* load loop counter (SIZE) into ecx */
934  shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */
935  pxor mm0, mm0 /* zero mm0 register */
936  align 16 /* 16 byte alignment of the loop entry */
937 L1015:
938  movq mm1, [eax] /* load 8 bytes from Src1 into mm1 */
939  movq mm3, [ebx] /* load 8 bytes from Src2 into mm3 */
940  movq mm2, mm1 /* copy mm1 into mm2 */
941  movq mm4, mm3 /* copy mm3 into mm4 */
942  punpcklbw mm1, mm0 /* unpack low bytes of Src1 into words */
943  punpckhbw mm2, mm0 /* unpack high bytes of Src1 into words */
944  punpcklbw mm3, mm0 /* unpack low bytes of Src2 into words */
945  punpckhbw mm4, mm0 /* unpack high bytes of Src2 into words */
946  psrlw mm1, 1 /* divide mm1 words by 2, Src1 low bytes */
947  psrlw mm2, 1 /* divide mm2 words by 2, Src1 high bytes */
948  pmullw mm1, mm3 /* mul low bytes of Src1 and Src2 */
949  pmullw mm2, mm4 /* mul high bytes of Src1 and Src2 */
950  packuswb mm1, mm2 /* pack words back into bytes with saturation */
951  movq [edi], mm1 /* store result in Dest */
952  add eax, 8 /* increase Src1, Src2 and Dest */
953  add ebx, 8 /* register pointers by 8 */
954  add edi, 8
955  dec ecx /* decrease loop counter */
956  jnz L1015 /* check loop termination, proceed if required */
957  emms /* exit MMX state */
958  popa
959  }
960 #else
961  /* i386 and x86_64 */
962  __m64 *mSrc1 = (__m64*)Src1;
963  __m64 *mSrc2 = (__m64*)Src2;
964  __m64 *mDest = (__m64*)Dest;
965  __m64 mm0 = _m_from_int(0); /* zero mm0 register */
966  int i;
967  for (i = 0; i < SrcLength/8; i++) {
968  __m64 mm1, mm2, mm3, mm4, mm5, mm6;
969  mm1 = _m_punpcklbw(*mSrc1, mm0); /* unpack low bytes of Src1 into words */
970  mm2 = _m_punpckhbw(*mSrc1, mm0); /* unpack high bytes of Src1 into words */
971  mm3 = _m_punpcklbw(*mSrc2, mm0); /* unpack low bytes of Src2 into words */
972  mm4 = _m_punpckhbw(*mSrc2, mm0); /* unpack high bytes of Src2 into words */
973  mm1 = _m_psrlwi(mm1, 1); /* divide mm1 words by 2, Src1 low bytes */
974  mm2 = _m_psrlwi(mm2, 1); /* divide mm2 words by 2, Src1 high bytes */
975  mm1 = _m_pmullw(mm1, mm3); /* mul low bytes of Src1 and Src2 */
976  mm2 = _m_pmullw(mm2, mm4); /* mul high bytes of Src1 and Src2 */
977  *mDest = _m_packuswb(mm1, mm2); /* pack words back into bytes with saturation */
978  mSrc1++;
979  mSrc2++;
980  mDest++;
981  }
982  _m_empty(); /* clean MMX state */
983 #endif
984  return (0);
985 #else
986  return (-1);
987 #endif
988 }
989 
1000 int SDL_imageFilterMultDivby2(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
1001 {
1002  unsigned int i, istart;
1003  unsigned char *cursrc1, *cursrc2, *curdst;
1004  int result;
1005 
1006  /* Validate input parameters */
1007  if ((Src1 == NULL) || (Src2 == NULL) || (Dest == NULL))
1008  return(-1);
1009  if (length == 0)
1010  return(0);
1011 
1012  if ((SDL_imageFilterMMXdetect()) && (length > 7)) {
1013  /* MMX routine */
1014  SDL_imageFilterMultDivby2MMX(Src1, Src2, Dest, length);
1015 
1016  /* Check for unaligned bytes */
1017  if ((length & 7) > 0) {
1018  /* Setup to process unaligned bytes */
1019  istart = length & 0xfffffff8;
1020  cursrc1 = &Src1[istart];
1021  cursrc2 = &Src2[istart];
1022  curdst = &Dest[istart];
1023  } else {
1024  /* No unaligned bytes - we are done */
1025  return (0);
1026  }
1027  } else {
1028  /* Setup to process whole image */
1029  istart = 0;
1030  cursrc1 = Src1;
1031  cursrc2 = Src2;
1032  curdst = Dest;
1033  }
1034 
1035  /* C routine to process image */
1036  for (i = istart; i < length; i++) {
1037  result = ((int) *cursrc1 / 2) * (int) *cursrc2;
1038  if (result > 255)
1039  result = 255;
1040  *curdst = (unsigned char) result;
1041  /* Advance pointers */
1042  cursrc1++;
1043  cursrc2++;
1044  curdst++;
1045  }
1046 
1047  return (0);
1048 }
1049 
1060 static int SDL_imageFilterMultDivby4MMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength)
1061 {
1062 #ifdef USE_MMX
1063 #if !defined(GCC__)
1064  __asm
1065  {
1066  pusha
1067  mov eax, Src1 /* load Src1 address into eax */
1068  mov ebx, Src2 /* load Src2 address into ebx */
1069  mov edi, Dest /* load Dest address into edi */
1070  mov ecx, SrcLength /* load loop counter (SIZE) into ecx */
1071  shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */
1072  pxor mm0, mm0 /* zero mm0 register */
1073  align 16 /* 16 byte alignment of the loop entry */
1074 L1016:
1075  movq mm1, [eax] /* load 8 bytes from Src1 into mm1 */
1076  movq mm3, [ebx] /* load 8 bytes from Src2 into mm3 */
1077  movq mm2, mm1 /* copy mm1 into mm2 */
1078  movq mm4, mm3 /* copy mm3 into mm4 */
1079  punpcklbw mm1, mm0 /* unpack low bytes of Src1 into words */
1080  punpckhbw mm2, mm0 /* unpack high bytes of Src1 into words */
1081  punpcklbw mm3, mm0 /* unpack low bytes of Src2 into words */
1082  punpckhbw mm4, mm0 /* unpack high bytes of Src2 into words */
1083  psrlw mm1, 1 /* divide mm1 words by 2, Src1 low bytes */
1084  psrlw mm2, 1 /* divide mm2 words by 2, Src1 high bytes */
1085  psrlw mm3, 1 /* divide mm3 words by 2, Src2 low bytes */
1086  psrlw mm4, 1 /* divide mm4 words by 2, Src2 high bytes */
1087  pmullw mm1, mm3 /* mul low bytes of Src1 and Src2 */
1088  pmullw mm2, mm4 /* mul high bytes of Src1 and Src2 */
1089  packuswb mm1, mm2 /* pack words back into bytes with saturation */
1090  movq [edi], mm1 /* store result in Dest */
1091  add eax, 8 /* increase Src1, Src2 and Dest */
1092  add ebx, 8 /* register pointers by 8 */
1093  add edi, 8
1094  dec ecx /* decrease loop counter */
1095  jnz L1016 /* check loop termination, proceed if required */
1096  emms /* exit MMX state */
1097  popa
1098  }
1099 #else
1100  /* i386 and x86_64 */
1101  __m64 *mSrc1 = (__m64*)Src1;
1102  __m64 *mSrc2 = (__m64*)Src2;
1103  __m64 *mDest = (__m64*)Dest;
1104  __m64 mm0 = _m_from_int(0); /* zero mm0 register */
1105  int i;
1106  for (i = 0; i < SrcLength/8; i++) {
1107  __m64 mm1, mm2, mm3, mm4, mm5, mm6;
1108  mm1 = _m_punpcklbw(*mSrc1, mm0); /* unpack low bytes of Src1 into words */
1109  mm2 = _m_punpckhbw(*mSrc1, mm0); /* unpack high bytes of Src1 into words */
1110  mm3 = _m_punpcklbw(*mSrc2, mm0); /* unpack low bytes of Src2 into words */
1111  mm4 = _m_punpckhbw(*mSrc2, mm0); /* unpack high bytes of Src2 into words */
1112  mm1 = _m_psrlwi(mm1, 1); /* divide mm1 words by 2, Src1 low bytes */
1113  mm2 = _m_psrlwi(mm2, 1); /* divide mm2 words by 2, Src1 high bytes */
1114  mm3 = _m_psrlwi(mm3, 1); /* divide mm3 words by 2, Src2 low bytes */
1115  mm4 = _m_psrlwi(mm4, 1); /* divide mm4 words by 2, Src2 high bytes */
1116  mm1 = _m_pmullw(mm1, mm3); /* mul low bytes of Src1 and Src2 */
1117  mm2 = _m_pmullw(mm2, mm4); /* mul high bytes of Src1 and Src2 */
1118  *mDest = _m_packuswb(mm1, mm2); /* pack words back into bytes with saturation */
1119  mSrc1++;
1120  mSrc2++;
1121  mDest++;
1122  }
1123  _m_empty(); /* clean MMX state */
1124 #endif
1125  return (0);
1126 #else
1127  return (-1);
1128 #endif
1129 }
1130 
1141 int SDL_imageFilterMultDivby4(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
1142 {
1143  unsigned int i, istart;
1144  unsigned char *cursrc1, *cursrc2, *curdst;
1145  int result;
1146 
1147  /* Validate input parameters */
1148  if ((Src1 == NULL) || (Src2 == NULL) || (Dest == NULL))
1149  return(-1);
1150  if (length == 0)
1151  return(0);
1152 
1153  if ((SDL_imageFilterMMXdetect()) && (length > 7)) {
1154  /* MMX routine */
1155  SDL_imageFilterMultDivby4MMX(Src1, Src2, Dest, length);
1156 
1157  /* Check for unaligned bytes */
1158  if ((length & 7) > 0) {
1159  /* Setup to process unaligned bytes */
1160  istart = length & 0xfffffff8;
1161  cursrc1 = &Src1[istart];
1162  cursrc2 = &Src2[istart];
1163  curdst = &Dest[istart];
1164  } else {
1165  /* No unaligned bytes - we are done */
1166  return (0);
1167  }
1168  } else {
1169  /* Setup to process whole image */
1170  istart = 0;
1171  cursrc1 = Src1;
1172  cursrc2 = Src2;
1173  curdst = Dest;
1174  }
1175 
1176  /* C routine to process image */
1177  for (i = istart; i < length; i++) {
1178  result = ((int) *cursrc1 / 2) * ((int) *cursrc2 / 2);
1179  if (result > 255)
1180  result = 255;
1181  *curdst = (unsigned char) result;
1182  /* Advance pointers */
1183  cursrc1++;
1184  cursrc2++;
1185  curdst++;
1186  }
1187 
1188  return (0);
1189 }
1190 
1201 static int SDL_imageFilterBitAndMMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength)
1202 {
1203 #ifdef USE_MMX
1204 #if !defined(GCC__)
1205  __asm
1206  {
1207  pusha
1208  mov eax, Src1 /* load Src1 address into eax */
1209  mov ebx, Src2 /* load Src2 address into ebx */
1210  mov edi, Dest /* load Dest address into edi */
1211  mov ecx, SrcLength /* load loop counter (SIZE) into ecx */
1212  shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */
1213  align 16 /* 16 byte alignment of the loop entry */
1214 L1017:
1215  movq mm1, [eax] /* load 8 bytes from Src1 into mm1 */
1216  pand mm1, [ebx] /* mm1=Src1&Src2 */
1217  movq [edi], mm1 /* store result in Dest */
1218  add eax, 8 /* increase Src1, Src2 and Dest */
1219  add ebx, 8 /* register pointers by 8 */
1220  add edi, 8
1221  dec ecx /* decrease loop counter */
1222  jnz L1017 /* check loop termination, proceed if required */
1223  emms /* exit MMX state */
1224  popa
1225  }
1226 #else
1227  /* x86_64 ASM with constraints: */
1228  /* asm volatile ( */
1229  /* "shr $3, %%rcx \n\t" /\* counter/8 (MMX loads 8 bytes at a time) *\/ */
1230  /* ".align 16 \n\t" /\* 16 byte alignment of the loop entry *\/ */
1231  /* "1: movq (%%rax), %%mm1 \n\t" /\* load 8 bytes from Src1 into mm1 *\/ */
1232  /* "pand (%%rbx), %%mm1 \n\t" /\* mm1=Src1&Src2 *\/ */
1233  /* "movq %%mm1, (%%rdi) \n\t" /\* store result in Dest *\/ */
1234  /* "add $8, %%rax \n\t" /\* increase Src1, Src2 and Dest *\/ */
1235  /* "add $8, %%rbx \n\t" /\* register pointers by 8 *\/ */
1236  /* "add $8, %%rdi \n\t" */
1237  /* "dec %%rcx \n\t" /\* decrease loop counter *\/ */
1238  /* "jnz 1b \n\t" /\* check loop termination, proceed if required *\/ */
1239  /* "emms \n\t" /\* exit MMX state *\/ */
1240  /* : "+a" (Src1), /\* load Src1 address into rax, modified by the loop *\/ */
1241  /* "+b" (Src2), /\* load Src2 address into rbx, modified by the loop *\/ */
1242  /* "+c" (SrcLength), /\* load loop counter (SIZE) into rcx, modified by the loop *\/ */
1243  /* "+D" (Dest) /\* load Dest address into rdi, modified by the loop *\/ */
1244  /* : */
1245  /* : "memory", /\* *Dest is modified *\/ */
1246  /* "mm1" /\* register mm1 modified *\/ */
1247  /* ); */
1248 
1249  /* i386 and x86_64 */
1250  __m64 *mSrc1 = (__m64*)Src1;
1251  __m64 *mSrc2 = (__m64*)Src2;
1252  __m64 *mDest = (__m64*)Dest;
1253  int i;
1254  for (i = 0; i < SrcLength/8; i++) {
1255  *mDest = _m_pand(*mSrc1, *mSrc2); /* Src1&Src2 */
1256  mSrc1++;
1257  mSrc2++;
1258  mDest++;
1259  }
1260  _m_empty(); /* clean MMX state */
1261 #endif
1262  return (0);
1263 #else
1264  return (-1);
1265 #endif
1266 }
1267 
1278 int SDL_imageFilterBitAnd(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
1279 {
1280  unsigned int i, istart;
1281  unsigned char *cursrc1, *cursrc2, *curdst;
1282 
1283  /* Validate input parameters */
1284  if ((Src1 == NULL) || (Src2 == NULL) || (Dest == NULL))
1285  return(-1);
1286  if (length == 0)
1287  return(0);
1288 
1289  if ((SDL_imageFilterMMXdetect()>0) && (length>7)) {
1290  /* if (length > 7) { */
1291  /* Call MMX routine */
1292 
1293  SDL_imageFilterBitAndMMX(Src1, Src2, Dest, length);
1294 
1295  /* Check for unaligned bytes */
1296  if ((length & 7) > 0) {
1297 
1298  /* Setup to process unaligned bytes */
1299  istart = length & 0xfffffff8;
1300  cursrc1 = &Src1[istart];
1301  cursrc2 = &Src2[istart];
1302  curdst = &Dest[istart];
1303  } else {
1304  /* No unaligned bytes - we are done */
1305  return (0);
1306  }
1307  } else {
1308  /* Setup to process whole image */
1309  istart = 0;
1310  cursrc1 = Src1;
1311  cursrc2 = Src2;
1312  curdst = Dest;
1313  }
1314 
1315  /* C routine to process image */
1316  for (i = istart; i < length; i++) {
1317  *curdst = (*cursrc1) & (*cursrc2);
1318  /* Advance pointers */
1319  cursrc1++;
1320  cursrc2++;
1321  curdst++;
1322  }
1323 
1324  return (0);
1325 }
1326 
1337 static int SDL_imageFilterBitOrMMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength)
1338 {
1339 #ifdef USE_MMX
1340 #if !defined(GCC__)
1341  __asm
1342  {
1343  pusha
1344  mov eax, Src1 /* load Src1 address into eax */
1345  mov ebx, Src2 /* load Src2 address into ebx */
1346  mov edi, Dest /* load Dest address into edi */
1347  mov ecx, SrcLength /* load loop counter (SIZE) into ecx */
1348  shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */
1349  align 16 /* 16 byte alignment of the loop entry */
1350 L91017:
1351  movq mm1, [eax] /* load 8 bytes from Src1 into mm1 */
1352  por mm1, [ebx] /* mm1=Src1|Src2 */
1353  movq [edi], mm1 /* store result in Dest */
1354  add eax, 8 /* increase Src1, Src2 and Dest */
1355  add ebx, 8 /* register pointers by 8 */
1356  add edi, 8
1357  dec ecx /* decrease loop counter */
1358  jnz L91017 /* check loop termination, proceed if required */
1359  emms /* exit MMX state */
1360  popa
1361  }
1362 #else
1363  /* i386 and x86_64 */
1364  __m64 *mSrc1 = (__m64*)Src1;
1365  __m64 *mSrc2 = (__m64*)Src2;
1366  __m64 *mDest = (__m64*)Dest;
1367  int i;
1368  for (i = 0; i < SrcLength/8; i++) {
1369  *mDest = _m_por(*mSrc1, *mSrc2); /* Src1|Src2 */
1370  mSrc1++;
1371  mSrc2++;
1372  mDest++;
1373  }
1374  _m_empty(); /* clean MMX state */
1375 #endif
1376  return (0);
1377 #else
1378  return (-1);
1379 #endif
1380 }
1381 
1392 int SDL_imageFilterBitOr(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
1393 {
1394  unsigned int i, istart;
1395  unsigned char *cursrc1, *cursrc2, *curdst;
1396 
1397  /* Validate input parameters */
1398  if ((Src1 == NULL) || (Src2 == NULL) || (Dest == NULL))
1399  return(-1);
1400  if (length == 0)
1401  return(0);
1402 
1403  if ((SDL_imageFilterMMXdetect()) && (length > 7)) {
1404 
1405  /* MMX routine */
1406  SDL_imageFilterBitOrMMX(Src1, Src2, Dest, length);
1407 
1408  /* Check for unaligned bytes */
1409  if ((length & 7) > 0) {
1410  /* Setup to process unaligned bytes */
1411  istart = length & 0xfffffff8;
1412  cursrc1 = &Src1[istart];
1413  cursrc2 = &Src2[istart];
1414  curdst = &Dest[istart];
1415  } else {
1416  /* No unaligned bytes - we are done */
1417  return (0);
1418  }
1419  } else {
1420  /* Setup to process whole image */
1421  istart = 0;
1422  cursrc1 = Src1;
1423  cursrc2 = Src2;
1424  curdst = Dest;
1425  }
1426 
1427  /* C routine to process image */
1428  for (i = istart; i < length; i++) {
1429  *curdst = *cursrc1 | *cursrc2;
1430  /* Advance pointers */
1431  cursrc1++;
1432  cursrc2++;
1433  curdst++;
1434  }
1435  return (0);
1436 }
1437 
1448 static int SDL_imageFilterDivASM(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength)
1449 {
1450 #ifdef USE_MMX
1451 #if !defined(GCC__)
1452  __asm
1453  {
1454  pusha
1455  mov edx, Src1 /* load Src1 address into edx */
1456  mov esi, Src2 /* load Src2 address into esi */
1457  mov edi, Dest /* load Dest address into edi */
1458  mov ecx, SrcLength /* load loop counter (SIZE) into ecx */
1459  align 16 /* 16 byte alignment of the loop entry */
1460 L10191:
1461  mov bl, [esi] /* load a byte from Src2 */
1462  cmp bl, 0 /* check if it zero */
1463  jnz L10192
1464  mov [edi], 255 /* division by zero = 255 !!! */
1465  jmp L10193
1466 L10192:
1467  xor ah, ah /* prepare AX, zero AH register */
1468  mov al, [edx] /* load a byte from Src1 into AL */
1469  div bl /* divide AL by BL */
1470  mov [edi], al /* move a byte result to Dest */
1471 L10193:
1472  inc edx /* increment Src1, Src2, Dest */
1473  inc esi /* pointer registers by one */
1474  inc edi
1475  dec ecx /* decrease loop counter */
1476  jnz L10191 /* check loop termination, proceed if required */
1477  popa
1478  }
1479 #else
1480  /* Note: ~15% gain on i386, less efficient than C on x86_64 */
1481  /* Also depends on whether the function is static (?!) */
1482  /* Also depends on whether we work on malloc() or static char[] */
1483  asm volatile (
1484 # if defined(i386)
1485  "pushl %%ebx \n\t" /* %ebx may be the PIC register. */
1486  ".align 16 \n\t" /* 16 byte alignment of the loop entry */
1487  "1: mov (%%esi), %%bl \n\t" /* load a byte from Src2 */
1488  "cmp $0, %%bl \n\t" /* check if it zero */
1489  "jnz 2f \n\t"
1490  "movb $255, (%%edi) \n\t" /* division by zero = 255 !!! */
1491  "jmp 3f \n\t"
1492  "2: xor %%ah, %%ah \n\t" /* prepare AX, zero AH register */
1493  "mov (%%edx), %%al \n\t" /* load a byte from Src1 into AL */
1494  "div %%bl \n\t" /* divide AL by BL */
1495  "mov %%al, (%%edi) \n\t" /* move a byte result to Dest */
1496  "3: inc %%edx \n\t" /* increment Src1, Src2, Dest */
1497  "inc %%esi \n\t" /* pointer registers by one */
1498  "inc %%edi \n\t"
1499  "dec %%ecx \n\t" /* decrease loop counter */
1500  "jnz 1b \n\t" /* check loop termination, proceed if required */
1501  "popl %%ebx \n\t" /* restore %ebx */
1502  : "+d" (Src1), /* load Src1 address into edx */
1503  "+S" (Src2), /* load Src2 address into esi */
1504  "+c" (SrcLength), /* load loop counter (SIZE) into ecx */
1505  "+D" (Dest) /* load Dest address into edi */
1506  :
1507  : "memory", "rax"
1508 # elif defined(__x86_64__)
1509  ".align 16 \n\t" /* 16 byte alignment of the loop entry */
1510  "1: mov (%%rsi), %%bl \n\t" /* load a byte from Src2 */
1511  "cmp $0, %%bl \n\t" /* check if it zero */
1512  "jnz 2f \n\t"
1513  "movb $255, (%%rdi) \n\t" /* division by zero = 255 !!! */
1514  "jmp 3f \n\t"
1515  "2: xor %%ah, %%ah \n\t" /* prepare AX, zero AH register */
1516  "mov (%%rdx), %%al \n\t" /* load a byte from Src1 into AL */
1517  "div %%bl \n\t" /* divide AL by BL */
1518  "mov %%al, (%%rdi) \n\t" /* move a byte result to Dest */
1519  "3: inc %%rdx \n\t" /* increment Src1, Src2, Dest */
1520  "inc %%rsi \n\t" /* pointer registers by one */
1521  "inc %%rdi \n\t"
1522  "dec %%rcx \n\t" /* decrease loop counter */
1523  "jnz 1b \n\t" /* check loop termination, proceed if required */
1524  : "+d" (Src1), /* load Src1 address into edx */
1525  "+S" (Src2), /* load Src2 address into esi */
1526  "+c" (SrcLength), /* load loop counter (SIZE) into ecx */
1527  "+D" (Dest) /* load Dest address into edi */
1528  :
1529  : "memory", "rax", "rbx"
1530 # endif
1531  );
1532 #endif
1533  return (0);
1534 #else
1535  return (-1);
1536 #endif
1537 }
1538 
1549 int SDL_imageFilterDiv(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
1550 {
1551  unsigned int i, istart;
1552  unsigned char *cursrc1, *cursrc2, *curdst;
1553 
1554  /* Validate input parameters */
1555  if ((Src1 == NULL) || (Src2 == NULL) || (Dest == NULL))
1556  return(-1);
1557  if (length == 0)
1558  return(0);
1559 
1560  if (SDL_imageFilterMMXdetect()) {
1561  if (length > 0) {
1562  /* Call ASM routine */
1563  SDL_imageFilterDivASM(Src1, Src2, Dest, length);
1564 
1565  /* Never unaligned bytes - we are done */
1566  return (0);
1567  } else {
1568  return (-1);
1569  }
1570  }
1571 
1572  /* Setup to process whole image */
1573  istart = 0;
1574  cursrc1 = Src1;
1575  cursrc2 = Src2;
1576  curdst = Dest;
1577 
1578  /* C routine to process image */
1579  /* for (i = istart; i < length; i++) { */
1580  /* if (*cursrc2 == 0) { */
1581  /* *curdst = 255; */
1582  /* } else { */
1583  /* result = (int) *cursrc1 / (int) *cursrc2; */
1584  /* *curdst = (unsigned char) result; */
1585  /* } */
1586  /* /\* Advance pointers *\/ */
1587  /* cursrc1++; */
1588  /* cursrc2++; */
1589  /* curdst++; */
1590  /* } */
1591  for (i = istart; i < length; i++) {
1592  if (*cursrc2 == 0) {
1593  *curdst = 255;
1594  } else {
1595  *curdst = (int)*cursrc1 / (int)*cursrc2; // (int) for efficiency
1596  }
1597  /* Advance pointers */
1598  cursrc1++;
1599  cursrc2++;
1600  curdst++;
1601  }
1602 
1603  return (0);
1604 }
1605 
1606 /* ------------------------------------------------------------------------------------ */
1607 
1617 static int SDL_imageFilterBitNegationMMX(unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength)
1618 {
1619 #ifdef USE_MMX
1620 #if !defined(GCC__)
1621  __asm
1622  {
1623  pusha
1624  pcmpeqb mm1, mm1 /* generate all 1's in mm1 */
1625  mov eax, Src1 /* load Src1 address into eax */
1626  mov edi, Dest /* load Dest address into edi */
1627  mov ecx, SrcLength /* load loop counter (SIZE) into ecx */
1628  shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */
1629  align 16 /* 16 byte alignment of the loop entry */
1630 L91117:
1631  movq mm0, [eax] /* load 8 bytes from Src1 into mm1 */
1632  pxor mm0, mm1 /* negate mm0 by xoring with mm1 */
1633  movq [edi], mm0 /* store result in Dest */
1634  add eax, 8 /* increase Src1, Src2 and Dest */
1635  add edi, 8
1636  dec ecx /* decrease loop counter */
1637  jnz L91117 /* check loop termination, proceed if required */
1638  emms /* exit MMX state */
1639  popa
1640  }
1641 #else
1642  /* i386 and x86_64 */
1643  __m64 *mSrc1 = (__m64*)Src1;
1644  __m64 *mDest = (__m64*)Dest;
1645  __m64 mm1;
1646  mm1 = _m_pcmpeqb(mm1, mm1); /* generate all 1's in mm1 */
1647  int i;
1648  for (i = 0; i < SrcLength/8; i++) {
1649  *mDest = _m_pxor(*mSrc1, mm1); /* negate mm0 by xoring with mm1 */
1650  mSrc1++;
1651  mDest++;
1652  }
1653  _m_empty(); /* clean MMX state */
1654 
1655 #endif
1656  return (0);
1657 #else
1658  return (-1);
1659 #endif
1660 }
1661 
1671 int SDL_imageFilterBitNegation(unsigned char *Src1, unsigned char *Dest, unsigned int length)
1672 {
1673  unsigned int i, istart;
1674  unsigned char *cursrc1, *curdst;
1675 
1676  /* Validate input parameters */
1677  if ((Src1 == NULL) || (Dest == NULL))
1678  return(-1);
1679  if (length == 0)
1680  return(0);
1681 
1682  if ((SDL_imageFilterMMXdetect()) && (length > 7)) {
1683  /* MMX routine */
1684  SDL_imageFilterBitNegationMMX(Src1, Dest, length);
1685 
1686  /* Check for unaligned bytes */
1687  if ((length & 7) > 0) {
1688  /* Setup to process unaligned bytes */
1689  istart = length & 0xfffffff8;
1690  cursrc1 = &Src1[istart];
1691  curdst = &Dest[istart];
1692  } else {
1693  /* No unaligned bytes - we are done */
1694  return (0);
1695  }
1696  } else {
1697  /* Setup to process whole image */
1698  istart = 0;
1699  cursrc1 = Src1;
1700  curdst = Dest;
1701  }
1702 
1703  /* C routine to process image */
1704  for (i = istart; i < length; i++) {
1705  *curdst = ~(*cursrc1);
1706  /* Advance pointers */
1707  cursrc1++;
1708  curdst++;
1709  }
1710 
1711  return (0);
1712 }
1713 
1724 static int SDL_imageFilterAddByteMMX(unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char C)
1725 {
1726 #ifdef USE_MMX
1727 #if !defined(GCC__)
1728  __asm
1729  {
1730  pusha
1731  /* ** Duplicate C in 8 bytes of MM1 ** */
1732  mov al, C /* load C into AL */
1733  mov ah, al /* copy AL into AH */
1734  mov bx, ax /* copy AX into BX */
1735  shl eax, 16 /* shift 2 bytes of EAX left */
1736  mov ax, bx /* copy BX into AX */
1737  movd mm1, eax /* copy EAX into MM1 */
1738  movd mm2, eax /* copy EAX into MM2 */
1739  punpckldq mm1, mm2 /* fill higher bytes of MM1 with C */
1740  mov eax, Src1 /* load Src1 address into eax */
1741  mov edi, Dest /* load Dest address into edi */
1742  mov ecx, SrcLength /* load loop counter (SIZE) into ecx */
1743  shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */
1744  align 16 /* 16 byte alignment of the loop entry */
1745 L1021:
1746  movq mm0, [eax] /* load 8 bytes from Src1 into MM0 */
1747  paddusb mm0, mm1 /* MM0=SrcDest+C (add 8 bytes with saturation) */
1748  movq [edi], mm0 /* store result in Dest */
1749  add eax, 8 /* increase Dest register pointer by 8 */
1750  add edi, 8 /* increase Dest register pointer by 8 */
1751  dec ecx /* decrease loop counter */
1752  jnz L1021 /* check loop termination, proceed if required */
1753  emms /* exit MMX state */
1754  popa
1755  }
1756 #else
1757  /* i386 and x86_64 */
1758  __m64 *mSrc1 = (__m64*)Src1;
1759  __m64 *mDest = (__m64*)Dest;
1760  /* Duplicate C in 8 bytes of MM1 */
1761  int i;
1762  memset(&i, C, 4);
1763  __m64 mm1 = _m_from_int(i);
1764  __m64 mm2 = _m_from_int(i);
1765  mm1 = _m_punpckldq(mm1, mm2); /* fill higher bytes of MM1 with C */
1766  //__m64 mm1 = _m_from_int64(lli); // x86_64 only
1767  for (i = 0; i < SrcLength/8; i++) {
1768  *mDest = _m_paddusb(*mSrc1, mm1); /* Src1+C (add 8 bytes with saturation) */
1769  mSrc1++;
1770  mDest++;
1771  }
1772  _m_empty(); /* clean MMX state */
1773 #endif
1774  return (0);
1775 #else
1776  return (-1);
1777 #endif
1778 }
1779 
1791 int SDL_imageFilterAddByte(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C)
1792 {
1793  unsigned int i, istart;
1794  int iC;
1795  unsigned char *cursrc1, *curdest;
1796  int result;
1797 
1798  /* Validate input parameters */
1799  if ((Src1 == NULL) || (Dest == NULL))
1800  return(-1);
1801  if (length == 0)
1802  return(0);
1803 
1804  /* Special case: C==0 */
1805  if (C == 0) {
1806  memcpy(Src1, Dest, length);
1807  return (0);
1808  }
1809 
1810  if ((SDL_imageFilterMMXdetect()) && (length > 7)) {
1811 
1812  /* MMX routine */
1813  SDL_imageFilterAddByteMMX(Src1, Dest, length, C);
1814 
1815  /* Check for unaligned bytes */
1816  if ((length & 7) > 0) {
1817  /* Setup to process unaligned bytes */
1818  istart = length & 0xfffffff8;
1819  cursrc1 = &Src1[istart];
1820  curdest = &Dest[istart];
1821  } else {
1822  /* No unaligned bytes - we are done */
1823  return (0);
1824  }
1825  } else {
1826  /* Setup to process whole image */
1827  istart = 0;
1828  cursrc1 = Src1;
1829  curdest = Dest;
1830  }
1831 
1832  /* C routine to process image */
1833  iC = (int) C;
1834  for (i = istart; i < length; i++) {
1835  result = (int) *cursrc1 + iC;
1836  if (result > 255)
1837  result = 255;
1838  *curdest = (unsigned char) result;
1839  /* Advance pointers */
1840  cursrc1++;
1841  curdest++;
1842  }
1843  return (0);
1844 }
1845 
1857 static int SDL_imageFilterAddUintMMX(unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned int C, unsigned int D)
1858 {
1859 #ifdef USE_MMX
1860 #if !defined(GCC__)
1861  __asm
1862  {
1863  pusha
1864  /* ** Duplicate (int)C in 8 bytes of MM1 ** */
1865  mov eax, C /* load C into EAX */
1866  movd mm1, eax /* copy EAX into MM1 */
1867  mov eax, D /* load D into EAX */
1868  movd mm2, eax /* copy EAX into MM2 */
1869  punpckldq mm1, mm2 /* fill higher bytes of MM1 with C */
1870  mov eax, Src1 /* load Src1 address into eax */
1871  mov edi, Dest /* load Dest address into edi */
1872  mov ecx, SrcLength /* load loop counter (SIZE) into ecx */
1873  shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */
1874  align 16 /* 16 byte alignment of the loop entry */
1875 L11023:
1876  movq mm0, [eax] /* load 8 bytes from SrcDest into MM0 */
1877  paddusb mm0, mm1 /* MM0=SrcDest+C (add 8 bytes with saturation) */
1878  movq [edi], mm0 /* store result in SrcDest */
1879  add eax, 8 /* increase Src1 register pointer by 8 */
1880  add edi, 8 /* increase Dest register pointer by 8 */
1881  dec ecx /* decrease loop counter */
1882  jnz L11023 /* check loop termination, proceed if required */
1883  emms /* exit MMX state */
1884  popa
1885  }
1886 #else
1887  /* i386 and x86_64 */
1888  __m64 *mSrc1 = (__m64*)Src1;
1889  __m64 *mDest = (__m64*)Dest;
1890  /* Duplicate (int)C in 8 bytes of MM1 */
1891  __m64 mm1 = _m_from_int(C);
1892  __m64 mm2 = _m_from_int(C);
1893  mm1 = _m_punpckldq(mm1, mm2); /* fill higher bytes of MM1 with C */
1894  //__m64 mm1 = _m_from_int64(lli); // x86_64 only
1895  int i;
1896  for (i = 0; i < SrcLength/8; i++) {
1897  *mDest = _m_paddusb(*mSrc1, mm1); /* Src1+C (add 8 bytes with saturation) */
1898  mSrc1++;
1899  mDest++;
1900  }
1901  _m_empty(); /* clean MMX state */
1902 #endif
1903  return (0);
1904 #else
1905  return (-1);
1906 #endif
1907 }
1908 
1919 int SDL_imageFilterAddUint(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned int C)
1920 {
1921  unsigned int i, j, istart, D;
1922  int iC[4];
1923  unsigned char *cursrc1;
1924  unsigned char *curdest;
1925  int result;
1926 
1927  /* Validate input parameters */
1928  if ((Src1 == NULL) || (Dest == NULL))
1929  return(-1);
1930  if (length == 0)
1931  return(0);
1932 
1933  /* Special case: C==0 */
1934  if (C == 0) {
1935  memcpy(Src1, Dest, length);
1936  return (0);
1937  }
1938 
1939  if ((SDL_imageFilterMMXdetect()) && (length > 7)) {
1940 
1941  /* MMX routine */
1942  D=SWAP_32(C);
1943  SDL_imageFilterAddUintMMX(Src1, Dest, length, C, D);
1944 
1945  /* Check for unaligned bytes */
1946  if ((length & 7) > 0) {
1947  /* Setup to process unaligned bytes */
1948  istart = length & 0xfffffff8;
1949  cursrc1 = &Src1[istart];
1950  curdest = &Dest[istart];
1951  } else {
1952  /* No unaligned bytes - we are done */
1953  return (0);
1954  }
1955  } else {
1956  /* Setup to process whole image */
1957  istart = 0;
1958  cursrc1 = Src1;
1959  curdest = Dest;
1960  }
1961 
1962  /* C routine to process bytes */
1963  iC[3] = (int) ((C >> 24) & 0xff);
1964  iC[2] = (int) ((C >> 16) & 0xff);
1965  iC[1] = (int) ((C >> 8) & 0xff);
1966  iC[0] = (int) ((C >> 0) & 0xff);
1967  for (i = istart; i < length; i += 4) {
1968  for (j = 0; j < 4; j++) {
1969  if ((i+j)<length) {
1970  result = (int) *cursrc1 + iC[j];
1971  if (result > 255) result = 255;
1972  *curdest = (unsigned char) result;
1973  /* Advance pointers */
1974  cursrc1++;
1975  curdest++;
1976  }
1977  }
1978  }
1979  return (0);
1980 }
1981 
1993 static int SDL_imageFilterAddByteToHalfMMX(unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char C,
1994  unsigned char *Mask)
1995 {
1996 #ifdef USE_MMX
1997 #if !defined(GCC__)
1998  __asm
1999  {
2000  pusha
2001  /* ** Duplicate C in 8 bytes of MM1 ** */
2002  mov al, C /* load C into AL */
2003  mov ah, al /* copy AL into AH */
2004  mov bx, ax /* copy AX into BX */
2005  shl eax, 16 /* shift 2 bytes of EAX left */
2006  mov ax, bx /* copy BX into AX */
2007  movd mm1, eax /* copy EAX into MM1 */
2008  movd mm2, eax /* copy EAX into MM2 */
2009  punpckldq mm1, mm2 /* fill higher bytes of MM1 with C */
2010  mov edx, Mask /* load Mask address into edx */
2011  movq mm0, [edx] /* load Mask into mm0 */
2012  mov eax, Src1 /* load Src1 address into eax */
2013  mov edi, Dest /* load Dest address into edi */
2014  mov ecx, SrcLength /* load loop counter (SIZE) into ecx */
2015  shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */
2016  align 16 /* 16 byte alignment of the loop entry */
2017 L1022:
2018  movq mm2, [eax] /* load 8 bytes from Src1 into MM2 */
2019  psrlw mm2, 1 /* shift 4 WORDS of MM2 1 bit to the right */
2020  pand mm2, mm0 // apply Mask to 8 BYTES of MM2 */
2021  paddusb mm2, mm1 /* MM2=SrcDest+C (add 8 bytes with saturation) */
2022  movq [edi], mm2 /* store result in Dest */
2023  add eax, 8 /* increase Src1 register pointer by 8 */
2024  add edi, 8 /* increase Dest register pointer by 8 */
2025  dec ecx /* decrease loop counter */
2026  jnz L1022 /* check loop termination, proceed if required */
2027  emms /* exit MMX state */
2028  popa
2029  }
2030 #else
2031  /* i386 and x86_64 */
2032  __m64 *mSrc1 = (__m64*)Src1;
2033  __m64 *mDest = (__m64*)Dest;
2034  __m64 *mMask = (__m64*)Mask;
2035  /* Duplicate C in 8 bytes of MM1 */
2036  int i;
2037  memset(&i, C, 4);
2038  __m64 mm1 = _m_from_int(i);
2039  __m64 mm2 = _m_from_int(i);
2040  mm1 = _m_punpckldq(mm1, mm2); /* fill higher bytes of MM1 with C */
2041  //__m64 mm1 = _m_from_int64(lli); // x86_64 only
2042  for (i = 0; i < SrcLength/8; i++) {
2043  __m64 mm2 = _m_psrlwi(*mSrc1, 1); /* shift 4 WORDS of MM2 1 bit to the right */
2044  mm2 = _m_pand(mm2, *mMask); /* apply Mask to 8 BYTES of MM2 */
2045  /* byte 0x0f, 0xdb, 0xd0 */
2046  *mDest = _m_paddusb(mm1, mm2); /* Src1+C (add 8 bytes with saturation) */
2047  mSrc1++;
2048  mDest++;
2049  }
2050  _m_empty(); /* clean MMX state */
2051 #endif
2052  return (0);
2053 #else
2054  return (-1);
2055 #endif
2056 }
2057 
2068 int SDL_imageFilterAddByteToHalf(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C)
2069 {
2070  static unsigned char Mask[8] = { 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F };
2071  unsigned int i, istart;
2072  int iC;
2073  unsigned char *cursrc1;
2074  unsigned char *curdest;
2075  int result;
2076 
2077  /* Validate input parameters */
2078  if ((Src1 == NULL) || (Dest == NULL))
2079  return(-1);
2080  if (length == 0)
2081  return(0);
2082 
2083  if ((SDL_imageFilterMMXdetect()) && (length > 7)) {
2084 
2085  /* MMX routine */
2086  SDL_imageFilterAddByteToHalfMMX(Src1, Dest, length, C, Mask);
2087 
2088  /* Check for unaligned bytes */
2089  if ((length & 7) > 0) {
2090  /* Setup to process unaligned bytes */
2091  istart = length & 0xfffffff8;
2092  cursrc1 = &Src1[istart];
2093  curdest = &Dest[istart];
2094  } else {
2095  /* No unaligned bytes - we are done */
2096  return (0);
2097  }
2098  } else {
2099  /* Setup to process whole image */
2100  istart = 0;
2101  cursrc1 = Src1;
2102  curdest = Dest;
2103  }
2104 
2105  /* C routine to process image */
2106  iC = (int) C;
2107  for (i = istart; i < length; i++) {
2108  result = (int) (*cursrc1 / 2) + iC;
2109  if (result > 255)
2110  result = 255;
2111  *curdest = (unsigned char) result;
2112  /* Advance pointers */
2113  cursrc1++;
2114  curdest++;
2115  }
2116 
2117  return (0);
2118 }
2119 
2130 int SDL_imageFilterSubByteMMX(unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char C)
2131 {
2132 #ifdef USE_MMX
2133 #if !defined(GCC__)
2134  __asm
2135  {
2136  pusha
2137  /* ** Duplicate C in 8 bytes of MM1 ** */
2138  mov al, C /* load C into AL */
2139  mov ah, al /* copy AL into AH */
2140  mov bx, ax /* copy AX into BX */
2141  shl eax, 16 /* shift 2 bytes of EAX left */
2142  mov ax, bx /* copy BX into AX */
2143  movd mm1, eax /* copy EAX into MM1 */
2144  movd mm2, eax /* copy EAX into MM2 */
2145  punpckldq mm1, mm2 /* fill higher bytes of MM1 with C */
2146  mov eax, Src1 /* load Src1 address into eax */
2147  mov edi, Dest /* load Dest address into edi */
2148  mov ecx, SrcLength /* load loop counter (SIZE) into ecx */
2149  shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */
2150  align 16 /* 16 byte alignment of the loop entry */
2151 L1023:
2152  movq mm0, [eax] /* load 8 bytes from SrcDest into MM0 */
2153  psubusb mm0, mm1 /* MM0=SrcDest-C (sub 8 bytes with saturation) */
2154  movq [edi], mm0 /* store result in SrcDest */
2155  add eax, 8 /* increase Src1 register pointer by 8 */
2156  add edi, 8 /* increase Dest register pointer by 8 */
2157  dec ecx /* decrease loop counter */
2158  jnz L1023 /* check loop termination, proceed if required */
2159  emms /* exit MMX state */
2160  popa
2161  }
2162 #else
2163  /* i386 and x86_64 */
2164  __m64 *mSrc1 = (__m64*)Src1;
2165  __m64 *mDest = (__m64*)Dest;
2166  /* Duplicate C in 8 bytes of MM1 */
2167  int i;
2168  memset(&i, C, 4);
2169  __m64 mm1 = _m_from_int(i);
2170  __m64 mm2 = _m_from_int(i);
2171  mm1 = _m_punpckldq(mm1, mm2); /* fill higher bytes of MM1 with C */
2172  //__m64 mm1 = _m_from_int64(lli); // x86_64 only
2173  for (i = 0; i < SrcLength/8; i++) {
2174  *mDest = _m_psubusb(*mSrc1, mm1); /* Src1-C (sub 8 bytes with saturation) */
2175  mSrc1++;
2176  mDest++;
2177  }
2178  _m_empty(); /* clean MMX state */
2179 #endif
2180  return (0);
2181 #else
2182  return (-1);
2183 #endif
2184 }
2185 
2196 int SDL_imageFilterSubByte(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C)
2197 {
2198  unsigned int i, istart;
2199  int iC;
2200  unsigned char *cursrc1;
2201  unsigned char *curdest;
2202  int result;
2203 
2204  /* Validate input parameters */
2205  if ((Src1 == NULL) || (Dest == NULL))
2206  return(-1);
2207  if (length == 0)
2208  return(0);
2209 
2210  /* Special case: C==0 */
2211  if (C == 0) {
2212  memcpy(Src1, Dest, length);
2213  return (0);
2214  }
2215 
2216  if ((SDL_imageFilterMMXdetect()) && (length > 7)) {
2217 
2218  /* MMX routine */
2219  SDL_imageFilterSubByteMMX(Src1, Dest, length, C);
2220 
2221  /* Check for unaligned bytes */
2222  if ((length & 7) > 0) {
2223  /* Setup to process unaligned bytes */
2224  istart = length & 0xfffffff8;
2225  cursrc1 = &Src1[istart];
2226  curdest = &Dest[istart];
2227  } else {
2228  /* No unaligned bytes - we are done */
2229  return (0);
2230  }
2231  } else {
2232  /* Setup to process whole image */
2233  istart = 0;
2234  cursrc1 = Src1;
2235  curdest = Dest;
2236  }
2237 
2238  /* C routine to process image */
2239  iC = (int) C;
2240  for (i = istart; i < length; i++) {
2241  result = (int) *cursrc1 - iC;
2242  if (result < 0)
2243  result = 0;
2244  *curdest = (unsigned char) result;
2245  /* Advance pointers */
2246  cursrc1++;
2247  curdest++;
2248  }
2249  return (0);
2250 }
2251 
2263 static int SDL_imageFilterSubUintMMX(unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned int C, unsigned int D)
2264 {
2265 #ifdef USE_MMX
2266 #if !defined(GCC__)
2267  __asm
2268  {
2269  pusha
2270  /* ** Duplicate (int)C in 8 bytes of MM1 ** */
2271  mov eax, C /* load C into EAX */
2272  movd mm1, eax /* copy EAX into MM1 */
2273  mov eax, D /* load D into EAX */
2274  movd mm2, eax /* copy EAX into MM2 */
2275  punpckldq mm1, mm2 /* fill higher bytes of MM1 with C */
2276  mov eax, Src1 /* load Src1 address into eax */
2277  mov edi, Dest /* load Dest address into edi */
2278  mov ecx, SrcLength /* load loop counter (SIZE) into ecx */
2279  shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */
2280  align 16 /* 16 byte alignment of the loop entry */
2281 L11024:
2282  movq mm0, [eax] /* load 8 bytes from SrcDest into MM0 */
2283  psubusb mm0, mm1 /* MM0=SrcDest-C (sub 8 bytes with saturation) */
2284  movq [edi], mm0 /* store result in SrcDest */
2285  add eax, 8 /* increase Src1 register pointer by 8 */
2286  add edi, 8 /* increase Dest register pointer by 8 */
2287  dec ecx /* decrease loop counter */
2288  jnz L11024 /* check loop termination, proceed if required */
2289  emms /* exit MMX state */
2290  popa
2291  }
2292 #else
2293  /* i386 and x86_64 */
2294  __m64 *mSrc1 = (__m64*)Src1;
2295  __m64 *mDest = (__m64*)Dest;
2296  /* Duplicate (int)C in 8 bytes of MM1 */
2297  __m64 mm1 = _m_from_int(C);
2298  __m64 mm2 = _m_from_int(C);
2299  mm1 = _m_punpckldq(mm1, mm2); /* fill higher bytes of MM1 with C */
2300  //__m64 mm1 = _m_from_int64(lli); // x86_64 only
2301  int i;
2302  for (i = 0; i < SrcLength/8; i++) {
2303  *mDest = _m_psubusb(*mSrc1, mm1); /* Src1-C (sub 8 bytes with saturation) */
2304  mSrc1++;
2305  mDest++;
2306  }
2307  _m_empty(); /* clean MMX state */
2308 #endif
2309  return (0);
2310 #else
2311  return (-1);
2312 #endif
2313 }
2314 
2325 int SDL_imageFilterSubUint(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned int C)
2326 {
2327  unsigned int i, j, istart, D;
2328  int iC[4];
2329  unsigned char *cursrc1;
2330  unsigned char *curdest;
2331  int result;
2332 
2333  /* Validate input parameters */
2334  if ((Src1 == NULL) || (Dest == NULL))
2335  return(-1);
2336  if (length == 0)
2337  return(0);
2338 
2339  /* Special case: C==0 */
2340  if (C == 0) {
2341  memcpy(Src1, Dest, length);
2342  return (0);
2343  }
2344 
2345  if ((SDL_imageFilterMMXdetect()) && (length > 7)) {
2346 
2347  /* MMX routine */
2348  D=SWAP_32(C);
2349  SDL_imageFilterSubUintMMX(Src1, Dest, length, C, D);
2350 
2351  /* Check for unaligned bytes */
2352  if ((length & 7) > 0) {
2353  /* Setup to process unaligned bytes */
2354  istart = length & 0xfffffff8;
2355  cursrc1 = &Src1[istart];
2356  curdest = &Dest[istart];
2357  } else {
2358  /* No unaligned bytes - we are done */
2359  return (0);
2360  }
2361  } else {
2362  /* Setup to process whole image */
2363  istart = 0;
2364  cursrc1 = Src1;
2365  curdest = Dest;
2366  }
2367 
2368  /* C routine to process image */
2369  iC[3] = (int) ((C >> 24) & 0xff);
2370  iC[2] = (int) ((C >> 16) & 0xff);
2371  iC[1] = (int) ((C >> 8) & 0xff);
2372  iC[0] = (int) ((C >> 0) & 0xff);
2373  for (i = istart; i < length; i += 4) {
2374  for (j = 0; j < 4; j++) {
2375  if ((i+j)<length) {
2376  result = (int) *cursrc1 - iC[j];
2377  if (result < 0) result = 0;
2378  *curdest = (unsigned char) result;
2379  /* Advance pointers */
2380  cursrc1++;
2381  curdest++;
2382  }
2383  }
2384  }
2385  return (0);
2386 }
2387 
2399 static int SDL_imageFilterShiftRightMMX(unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char N,
2400  unsigned char *Mask)
2401 {
2402 #ifdef USE_MMX
2403 #if !defined(GCC__)
2404  __asm
2405  {
2406  pusha
2407  mov edx, Mask /* load Mask address into edx */
2408  movq mm0, [edx] /* load Mask into mm0 */
2409  xor ecx, ecx /* zero ECX */
2410  mov cl, N /* load loop counter (N) into CL */
2411  movd mm3, ecx /* copy (N) into MM3 */
2412  pcmpeqb mm1, mm1 /* generate all 1's in mm1 */
2413 L10240: /* ** Prepare proper bit-Mask in MM1 ** */
2414  psrlw mm1, 1 /* shift 4 WORDS of MM1 1 bit to the right */
2415  pand mm1, mm0 // apply Mask to 8 BYTES of MM1 */
2416  /* byte 0x0f, 0xdb, 0xc8 */
2417  dec cl /* decrease loop counter */
2418  jnz L10240 /* check loop termination, proceed if required */
2419  /* ** Shift all bytes of the image ** */
2420  mov eax, Src1 /* load Src1 address into eax */
2421  mov edi, Dest /* load Dest address into edi */
2422  mov ecx, SrcLength /* load loop counter (SIZE) into ecx */
2423  shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */
2424  align 16 /* 16 byte alignment of the loop entry */
2425 L10241:
2426  movq mm0, [eax] /* load 8 bytes from SrcDest into MM0 */
2427  psrlw mm0, mm3 /* shift 4 WORDS of MM0 (N) bits to the right */
2428  pand mm0, mm1 // apply proper bit-Mask to 8 BYTES of MM0 */
2429  /* byte 0x0f, 0xdb, 0xc1 */
2430  movq [edi], mm0 /* store result in SrcDest */
2431  add eax, 8 /* increase Src1 register pointer by 8 */
2432  add edi, 8 /* increase Dest register pointer by 8 */
2433  dec ecx /* decrease loop counter */
2434  jnz L10241 /* check loop termination, proceed if required */
2435  emms /* exit MMX state */
2436  popa
2437  }
2438 #else
2439  /* i386 and x86_64 */
2440  __m64 *mSrc1 = (__m64*)Src1;
2441  __m64 *mDest = (__m64*)Dest;
2442  __m64 *mMask = (__m64*)Mask;
2443  __m64 mm1;
2444  int i;
2445  mm1 = _m_pcmpeqb(mm1, mm1); /* generate all 1's in mm1 */
2446  /* Prepare proper bit-Mask in MM1 */
2447  for (i = 0; i < N; i++) {
2448  mm1 = _m_psrlwi(mm1, 1); /* shift 4 WORDS of MM1 1 bit to the right */
2449  mm1 = _m_pand(mm1, *mMask); /* apply Mask to 8 BYTES of MM1 */
2450  }
2451  /* Shift all bytes of the image */
2452  for (i = 0; i < SrcLength/8; i++) {
2453  __m64 mm0 = _m_psrlwi(*mSrc1, N); /* shift 4 WORDS of MM0 (N) bits to the right */
2454  *mDest = _m_pand(mm0, mm1); /* apply proper bit-Mask to 8 BYTES of MM0 */
2455  mSrc1++;
2456  mDest++;
2457  }
2458  _m_empty(); /* clean MMX state */
2459 #endif
2460  return (0);
2461 #else
2462  return (-1);
2463 #endif
2464 }
2465 
2476 int SDL_imageFilterShiftRight(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
2477 {
2478  static unsigned char Mask[8] = { 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F };
2479  unsigned int i, istart;
2480  unsigned char *cursrc1;
2481  unsigned char *curdest;
2482 
2483  /* Validate input parameters */
2484  if ((Src1 == NULL) || (Dest == NULL))
2485  return(-1);
2486  if (length == 0)
2487  return(0);
2488 
2489  /* Check shift */
2490  if (N > 8) {
2491  return (-1);
2492  }
2493 
2494  /* Special case: N==0 */
2495  if (N == 0) {
2496  memcpy(Src1, Dest, length);
2497  return (0);
2498  }
2499 
2500  if ((SDL_imageFilterMMXdetect()) && (length > 7)) {
2501 
2502  /* MMX routine */
2503  SDL_imageFilterShiftRightMMX(Src1, Dest, length, N, Mask);
2504 
2505  /* Check for unaligned bytes */
2506  if ((length & 7) > 0) {
2507  /* Setup to process unaligned bytes */
2508  istart = length & 0xfffffff8;
2509  cursrc1 = &Src1[istart];
2510  curdest = &Dest[istart];
2511  } else {
2512  /* No unaligned bytes - we are done */
2513  return (0);
2514  }
2515  } else {
2516  /* Setup to process whole image */
2517  istart = 0;
2518  cursrc1 = Src1;
2519  curdest = Dest;
2520  }
2521 
2522  /* C routine to process image */
2523  for (i = istart; i < length; i++) {
2524  *curdest = (unsigned char) *cursrc1 >> N;
2525  /* Advance pointers */
2526  cursrc1++;
2527  curdest++;
2528  }
2529 
2530  return (0);
2531 }
2532 
2543 static int SDL_imageFilterShiftRightUintMMX(unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char N)
2544 {
2545 #ifdef USE_MMX
2546 #if !defined(GCC__)
2547  __asm
2548  {
2549  pusha
2550  mov eax, Src1 /* load Src1 address into eax */
2551  mov edi, Dest /* load Dest address into edi */
2552  mov ecx, SrcLength /* load loop counter (SIZE) into ecx */
2553  shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */
2554  align 16 /* 16 byte alignment of the loop entry */
2555 L13023:
2556  movq mm0, [eax] /* load 8 bytes from SrcDest into MM0 */
2557  psrld mm0, N
2558  movq [edi], mm0 /* store result in SrcDest */
2559  add eax, 8 /* increase Src1 register pointer by 8 */
2560  add edi, 8 /* increase Dest register pointer by 8 */
2561  dec ecx /* decrease loop counter */
2562  jnz L13023 /* check loop termination, proceed if required */
2563  emms /* exit MMX state */
2564  popa
2565  }
2566 #else
2567  /* i386 and x86_64 */
2568  __m64 *mSrc1 = (__m64*)Src1;
2569  __m64 *mDest = (__m64*)Dest;
2570  int i;
2571  for (i = 0; i < SrcLength/8; i++) {
2572  *mDest = _m_psrldi(*mSrc1, N);
2573  mSrc1++;
2574  mDest++;
2575  }
2576  _m_empty(); /* clean MMX state */
2577 #endif
2578  return (0);
2579 #else
2580  return (-1);
2581 #endif
2582 }
2583 
2594 int SDL_imageFilterShiftRightUint(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
2595 {
2596  unsigned int i, istart;
2597  unsigned char *cursrc1, *curdest;
2598  unsigned int *icursrc1, *icurdest;
2599  unsigned int result;
2600 
2601  /* Validate input parameters */
2602  if ((Src1 == NULL) || (Dest == NULL))
2603  return(-1);
2604  if (length == 0)
2605  return(0);
2606 
2607  if (N > 32) {
2608  return (-1);
2609  }
2610 
2611  /* Special case: N==0 */
2612  if (N == 0) {
2613  memcpy(Src1, Dest, length);
2614  return (0);
2615  }
2616 
2617  if ((SDL_imageFilterMMXdetect()) && (length > 7)) {
2618 
2619  SDL_imageFilterShiftRightUintMMX(Src1, Dest, length, N);
2620 
2621  /* Check for unaligned bytes */
2622  if ((length & 7) > 0) {
2623  /* Setup to process unaligned bytes */
2624  istart = length & 0xfffffff8;
2625  cursrc1 = &Src1[istart];
2626  curdest = &Dest[istart];
2627  } else {
2628  /* No unaligned bytes - we are done */
2629  return (0);
2630  }
2631  } else {
2632  /* Setup to process whole image */
2633  istart = 0;
2634  cursrc1 = Src1;
2635  curdest = Dest;
2636  }
2637 
2638  /* C routine to process image */
2639  icursrc1=(unsigned int *)cursrc1;
2640  icurdest=(unsigned int *)curdest;
2641  for (i = istart; i < length; i += 4) {
2642  if ((i+4)<length) {
2643  result = ((unsigned int)*icursrc1 >> N);
2644  *icurdest = result;
2645  }
2646  /* Advance pointers */
2647  icursrc1++;
2648  icurdest++;
2649  }
2650 
2651  return (0);
2652 }
2653 
2664 static int SDL_imageFilterMultByByteMMX(unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char C)
2665 {
2666 #ifdef USE_MMX
2667 #if !defined(GCC__)
2668  __asm
2669  {
2670  pusha
2671  /* ** Duplicate C in 4 words of MM1 ** */
2672  mov al, C /* load C into AL */
2673  xor ah, ah /* zero AH */
2674  mov bx, ax /* copy AX into BX */
2675  shl eax, 16 /* shift 2 bytes of EAX left */
2676  mov ax, bx /* copy BX into AX */
2677  movd mm1, eax /* copy EAX into MM1 */
2678  movd mm2, eax /* copy EAX into MM2 */
2679  punpckldq mm1, mm2 /* fill higher words of MM1 with C */
2680  pxor mm0, mm0 /* zero MM0 register */
2681  mov eax, Src1 /* load Src1 address into eax */
2682  mov edi, Dest /* load Dest address into edi */
2683  mov ecx, SrcLength /* load loop counter (SIZE) into ecx */
2684  shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */
2685  cmp al, 128 /* if (C <= 128) execute more efficient code */
2686  jg L10251
2687  align 16 /* 16 byte alignment of the loop entry */
2688 L10250:
2689  movq mm3, [eax] /* load 8 bytes from Src1 into MM3 */
2690  movq mm4, mm3 /* copy MM3 into MM4 */
2691  punpcklbw mm3, mm0 /* unpack low bytes of SrcDest into words */
2692  punpckhbw mm4, mm0 /* unpack high bytes of SrcDest into words */
2693  pmullw mm3, mm1 /* mul low bytes of SrcDest and MM1 */
2694  pmullw mm4, mm1 /* mul high bytes of SrcDest and MM1 */
2695  packuswb mm3, mm4 /* pack words back into bytes with saturation */
2696  movq [edi], mm3 /* store result in Dest */
2697  add eax, 8 /* increase Src1 register pointer by 8 */
2698  add edi, 8 /* increase Dest register pointer by 8 */
2699  dec ecx /* decrease loop counter */
2700  jnz L10250 /* check loop termination, proceed if required */
2701  jmp L10252
2702  align 16 /* 16 byte alignment of the loop entry */
2703 L10251:
2704  movq mm3, [eax] /* load 8 bytes from Src1 into MM3 */
2705  movq mm4, mm3 /* copy MM3 into MM4 */
2706  punpcklbw mm3, mm0 /* unpack low bytes of SrcDest into words */
2707  punpckhbw mm4, mm0 /* unpack high bytes of SrcDest into words */
2708  pmullw mm3, mm1 /* mul low bytes of SrcDest and MM1 */
2709  pmullw mm4, mm1 /* mul high bytes of SrcDest and MM1 */
2710  /* ** Take abs value of the results (signed words) ** */
2711  movq mm5, mm3 /* copy mm3 into mm5 */
2712  movq mm6, mm4 /* copy mm4 into mm6 */
2713  psraw mm5, 15 /* fill mm5 words with word sign bit */
2714  psraw mm6, 15 /* fill mm6 words with word sign bit */
2715  pxor mm3, mm5 /* take 1's compliment of only neg words */
2716  pxor mm4, mm6 /* take 1's compliment of only neg words */
2717  psubsw mm3, mm5 /* add 1 to only neg words, W-(-1) or W-0 */
2718  psubsw mm4, mm6 /* add 1 to only neg words, W-(-1) or W-0 */
2719  packuswb mm3, mm4 /* pack words back into bytes with saturation */
2720  movq [edi], mm3 /* store result in Dest */
2721  add eax, 8 /* increase Src1 register pointer by 8 */
2722  add edi, 8 /* increase Dest register pointer by 8 */
2723  dec ecx /* decrease loop counter */
2724  jnz L10251 /* check loop termination, proceed if required */
2725 L10252:
2726  emms /* exit MMX state */
2727  popa
2728  }
2729 #else
2730  /* i386 and x86_64 */
2731  __m64 *mSrc1 = (__m64*)Src1;
2732  __m64 *mDest = (__m64*)Dest;
2733  __m64 mm0 = _m_from_int(0); /* zero mm0 register */
2734  /* Duplicate C in 4 words of MM1 */
2735  int i;
2736  i = C | C<<16;
2737  __m64 mm1 = _m_from_int(i);
2738  __m64 mm2 = _m_from_int(i);
2739  mm1 = _m_punpckldq(mm1, mm2); /* fill higher words of MM1 with C */
2740  // long long lli = C | C<<16 | (long long)C<<32 | (long long)C<<48;
2741  //__m64 mm1 = _m_from_int64(lli); // x86_64 only
2742  if (C <= 128) { /* if (C <= 128) execute more efficient code */
2743  for (i = 0; i < SrcLength/8; i++) {
2744  __m64 mm3, mm4;
2745  mm3 = _m_punpcklbw(*mSrc1, mm0); /* unpack low bytes of Src1 into words */
2746  mm4 = _m_punpckhbw(*mSrc1, mm0); /* unpack high bytes of Src1 into words */
2747  mm3 = _m_pmullw(mm3, mm1); /* mul low bytes of Src1 and MM1 */
2748  mm4 = _m_pmullw(mm4, mm1); /* mul high bytes of Src1 and MM1 */
2749  *mDest = _m_packuswb(mm3, mm4); /* pack words back into bytes with saturation */
2750  mSrc1++;
2751  mDest++;
2752  }
2753  } else {
2754  for (i = 0; i < SrcLength/8; i++) {
2755  __m64 mm3, mm4, mm5, mm6;
2756  mm3 = _m_punpcklbw(*mSrc1, mm0); /* unpack low bytes of Src1 into words */
2757  mm4 = _m_punpckhbw(*mSrc1, mm0); /* unpack high bytes of Src1 into words */
2758  mm3 = _m_pmullw(mm3, mm1); /* mul low bytes of Src1 and MM1 */
2759  mm4 = _m_pmullw(mm4, mm1); /* mul high bytes of Src1 and MM1 */
2760  /* Take abs value of the results (signed words) */
2761  mm5 = _m_psrawi(mm3, 15); /* fill mm5 words with word sign bit */
2762  mm6 = _m_psrawi(mm4, 15); /* fill mm6 words with word sign bit */
2763  mm3 = _m_pxor(mm3, mm5); /* take 1's compliment of only neg. words */
2764  mm4 = _m_pxor(mm4, mm6); /* take 1's compliment of only neg. words */
2765  mm3 = _m_psubsw(mm3, mm5); /* add 1 to only neg. words, W-(-1) or W-0 */
2766  mm4 = _m_psubsw(mm4, mm6); /* add 1 to only neg. words, W-(-1) or W-0 */
2767  *mDest = _m_packuswb(mm3, mm4); /* pack words back into bytes with saturation */
2768  mSrc1++;
2769  mDest++;
2770  }
2771  }
2772  _m_empty(); /* clean MMX state */
2773 #endif
2774  return (0);
2775 #else
2776  return (-1);
2777 #endif
2778 }
2779 
2790 int SDL_imageFilterMultByByte(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C)
2791 {
2792  unsigned int i, istart;
2793  int iC;
2794  unsigned char *cursrc1;
2795  unsigned char *curdest;
2796  int result;
2797 
2798  /* Validate input parameters */
2799  if ((Src1 == NULL) || (Dest == NULL))
2800  return(-1);
2801  if (length == 0)
2802  return(0);
2803 
2804  /* Special case: C==1 */
2805  if (C == 1) {
2806  memcpy(Src1, Dest, length);
2807  return (0);
2808  }
2809 
2810  if ((SDL_imageFilterMMXdetect()) && (length > 7)) {
2811 
2812  SDL_imageFilterMultByByteMMX(Src1, Dest, length, C);
2813 
2814  /* Check for unaligned bytes */
2815  if ((length & 7) > 0) {
2816  /* Setup to process unaligned bytes */
2817  istart = length & 0xfffffff8;
2818  cursrc1 = &Src1[istart];
2819  curdest = &Dest[istart];
2820  } else {
2821  /* No unaligned bytes - we are done */
2822  return (0);
2823  }
2824  } else {
2825  /* Setup to process whole image */
2826  istart = 0;
2827  cursrc1 = Src1;
2828  curdest = Dest;
2829  }
2830 
2831  /* C routine to process image */
2832  iC = (int) C;
2833  for (i = istart; i < length; i++) {
2834  result = (int) *cursrc1 * iC;
2835  if (result > 255)
2836  result = 255;
2837  *curdest = (unsigned char) result;
2838  /* Advance pointers */
2839  cursrc1++;
2840  curdest++;
2841  }
2842 
2843  return (0);
2844 }
2845 
2857 static int SDL_imageFilterShiftRightAndMultByByteMMX(unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char N,
2858  unsigned char C)
2859 {
2860 #ifdef USE_MMX
2861 #if !defined(GCC__)
2862  __asm
2863  {
2864  pusha
2865  /* ** Duplicate C in 4 words of MM1 ** */
2866  mov al, C /* load C into AL */
2867  xor ah, ah /* zero AH */
2868  mov bx, ax /* copy AX into BX */
2869  shl eax, 16 /* shift 2 bytes of EAX left */
2870  mov ax, bx /* copy BX into AX */
2871  movd mm1, eax /* copy EAX into MM1 */
2872  movd mm2, eax /* copy EAX into MM2 */
2873  punpckldq mm1, mm2 /* fill higher words of MM1 with C */
2874  xor ecx, ecx /* zero ECX */
2875  mov cl, N /* load N into CL */
2876  movd mm7, ecx /* copy N into MM7 */
2877  pxor mm0, mm0 /* zero MM0 register */
2878  mov eax, Src1 /* load Src1 address into eax */
2879  mov edi, Dest /* load Dest address into edi */
2880  mov ecx, SrcLength /* load loop counter (SIZE) into ecx */
2881  shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */
2882  align 16 /* 16 byte alignment of the loop entry */
2883 L1026:
2884  movq mm3, [eax] /* load 8 bytes from Src1 into MM3 */
2885  movq mm4, mm3 /* copy MM3 into MM4 */
2886  punpcklbw mm3, mm0 /* unpack low bytes of SrcDest into words */
2887  punpckhbw mm4, mm0 /* unpack high bytes of SrcDest into words */
2888  psrlw mm3, mm7 /* shift 4 WORDS of MM3 (N) bits to the right */
2889  psrlw mm4, mm7 /* shift 4 WORDS of MM4 (N) bits to the right */
2890  pmullw mm3, mm1 /* mul low bytes of SrcDest by MM1 */
2891  pmullw mm4, mm1 /* mul high bytes of SrcDest by MM1 */
2892  packuswb mm3, mm4 /* pack words back into bytes with saturation */
2893  movq [edi], mm3 /* store result in Dest */
2894  add eax, 8 /* increase Src1 register pointer by 8 */
2895  add edi, 8 /* increase Dest register pointer by 8 */
2896  dec ecx /* decrease loop counter */
2897  jnz L1026 /* check loop termination, proceed if required */
2898  emms /* exit MMX state */
2899  popa
2900  }
2901 #else
2902  /* i386 and x86_64 */
2903  __m64 *mSrc1 = (__m64*)Src1;
2904  __m64 *mDest = (__m64*)Dest;
2905  __m64 mm0 = _m_from_int(0); /* zero mm0 register */
2906  /* Duplicate C in 4 words of MM1 */
2907  int i;
2908  i = (C<<16)|C;
2909  __m64 mm1 = _m_from_int(i);
2910  __m64 mm2 = _m_from_int(i);
2911  mm1 = _m_punpckldq(mm1, mm2); /* fill higher words of MM1 with C */
2912  for (i = 0; i < SrcLength/8; i++) {
2913  __m64 mm3, mm4, mm5, mm6;
2914  mm3 = _m_punpcklbw(*mSrc1, mm0); /* unpack low bytes of Src1 into words */
2915  mm4 = _m_punpckhbw(*mSrc1, mm0); /* unpack high bytes of Src1 into words */
2916  mm3 = _m_psrlwi(mm3, N); /* shift 4 WORDS of MM3 (N) bits to the right */
2917  mm4 = _m_psrlwi(mm4, N); /* shift 4 WORDS of MM4 (N) bits to the right */
2918  mm3 = _m_pmullw(mm3, mm1); /* mul low bytes of Src1 and MM1 */
2919  mm4 = _m_pmullw(mm4, mm1); /* mul high bytes of Src1 and MM1 */
2920  *mDest = _m_packuswb(mm3, mm4); /* pack words back into bytes with saturation */
2921  mSrc1++;
2922  mDest++;
2923  }
2924  _m_empty(); /* clean MMX state */
2925 #endif
2926  return (0);
2927 #else
2928  return (-1);
2929 #endif
2930 }
2931 
2943 int SDL_imageFilterShiftRightAndMultByByte(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N,
2944  unsigned char C)
2945 {
2946  unsigned int i, istart;
2947  int iC;
2948  unsigned char *cursrc1;
2949  unsigned char *curdest;
2950  int result;
2951 
2952  /* Validate input parameters */
2953  if ((Src1 == NULL) || (Dest == NULL))
2954  return(-1);
2955  if (length == 0)
2956  return(0);
2957 
2958  /* Check shift */
2959  if (N > 8) {
2960  return (-1);
2961  }
2962 
2963  /* Special case: N==0 && C==1 */
2964  if ((N == 0) && (C == 1)) {
2965  memcpy(Src1, Dest, length);
2966  return (0);
2967  }
2968 
2969  if ((SDL_imageFilterMMXdetect()) && (length > 7)) {
2970 
2971  SDL_imageFilterShiftRightAndMultByByteMMX(Src1, Dest, length, N, C);
2972 
2973  /* Check for unaligned bytes */
2974  if ((length & 7) > 0) {
2975  /* Setup to process unaligned bytes */
2976  istart = length & 0xfffffff8;
2977  cursrc1 = &Src1[istart];
2978  curdest = &Dest[istart];
2979  } else {
2980  /* No unaligned bytes - we are done */
2981  return (0);
2982  }
2983  } else {
2984  /* Setup to process whole image */
2985  istart = 0;
2986  cursrc1 = Src1;
2987  curdest = Dest;
2988  }
2989 
2990  /* C routine to process image */
2991  iC = (int) C;
2992  for (i = istart; i < length; i++) {
2993  result = (int) (*cursrc1 >> N) * iC;
2994  if (result > 255)
2995  result = 255;
2996  *curdest = (unsigned char) result;
2997  /* Advance pointers */
2998  cursrc1++;
2999  curdest++;
3000  }
3001 
3002  return (0);
3003 }
3004 
3016 static int SDL_imageFilterShiftLeftByteMMX(unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char N,
3017  unsigned char *Mask)
3018 {
3019 #ifdef USE_MMX
3020 #if !defined(GCC__)
3021  __asm
3022  {
3023  pusha
3024  mov edx, Mask /* load Mask address into edx */
3025  movq mm0, [edx] /* load Mask into mm0 */
3026  xor ecx, ecx /* zero ECX */
3027  mov cl, N /* load loop counter (N) into CL */
3028  movd mm3, ecx /* copy (N) into MM3 */
3029  pcmpeqb mm1, mm1 /* generate all 1's in mm1 */
3030 L10270: /* ** Prepare proper bit-Mask in MM1 ** */
3031  psllw mm1, 1 /* shift 4 WORDS of MM1 1 bit to the left */
3032  pand mm1, mm0 // apply Mask to 8 BYTES of MM1 */
3033  /* byte 0x0f, 0xdb, 0xc8 */
3034  dec cl /* decrease loop counter */
3035  jnz L10270 /* check loop termination, proceed if required */
3036  /* ** Shift all bytes of the image ** */
3037  mov eax, Src1 /* load Src1 address into eax */
3038  mov edi, Dest /* load SrcDest address into edi */
3039  mov ecx, SrcLength /* load loop counter (SIZE) into ecx */
3040  shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */
3041  align 16 /* 16 byte alignment of the loop entry */
3042 L10271:
3043  movq mm0, [eax] /* load 8 bytes from Src1 into MM0 */
3044  psllw mm0, mm3 /* shift 4 WORDS of MM0 (N) bits to the left */
3045  pand mm0, mm1 // apply proper bit-Mask to 8 BYTES of MM0 */
3046  /* byte 0x0f, 0xdb, 0xc1 */
3047  movq [edi], mm0 /* store result in Dest */
3048  add eax, 8 /* increase Src1 register pointer by 8 */
3049  add edi, 8 /* increase Dest register pointer by 8 */
3050  dec ecx /* decrease loop counter */
3051  jnz L10271 /* check loop termination, proceed if required */
3052  emms /* exit MMX state */
3053  popa
3054  }
3055 #else
3056  /* i386 and x86_64 */
3057  __m64 *mSrc1 = (__m64*)Src1;
3058  __m64 *mDest = (__m64*)Dest;
3059  __m64 *mMask = (__m64*)Mask;
3060  __m64 mm1;
3061  int i;
3062  mm1 = _m_pcmpeqb(mm1, mm1); /* generate all 1's in mm1 */
3063  /* Prepare proper bit-Mask in MM1 */
3064  for (i = 0; i < N; i++) {
3065  mm1 = _m_psllwi(mm1, 1); /* shift 4 WORDS of MM1 1 bit to the left */
3066  mm1 = _m_pand(mm1, *mMask); /* apply Mask to 8 BYTES of MM1 */
3067  }
3068  /* ** Shift all bytes of the image ** */
3069  for (i = 0; i < SrcLength/8; i++) {
3070  __m64 mm0 = _m_psllwi(*mSrc1, N); /* shift 4 WORDS of MM0 (N) bits to the left */
3071  *mDest = _m_pand(mm0, mm1); /* apply proper bit-Mask to 8 BYTES of MM0 */
3072  mSrc1++;
3073  mDest++;
3074  }
3075  _m_empty(); /* clean MMX state */
3076 #endif
3077  return (0);
3078 #else
3079  return (-1);
3080 #endif
3081 }
3082 
3093 int SDL_imageFilterShiftLeftByte(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
3094 {
3095  static unsigned char Mask[8] = { 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE };
3096  unsigned int i, istart;
3097  unsigned char *cursrc1, *curdest;
3098  int result;
3099 
3100  /* Validate input parameters */
3101  if ((Src1 == NULL) || (Dest == NULL))
3102  return(-1);
3103  if (length == 0)
3104  return(0);
3105 
3106  if (N > 8) {
3107  return (-1);
3108  }
3109 
3110  /* Special case: N==0 */
3111  if (N == 0) {
3112  memcpy(Src1, Dest, length);
3113  return (0);
3114  }
3115 
3116  if ((SDL_imageFilterMMXdetect()) && (length > 7)) {
3117 
3118  SDL_imageFilterShiftLeftByteMMX(Src1, Dest, length, N, Mask);
3119 
3120  /* Check for unaligned bytes */
3121  if ((length & 7) > 0) {
3122  /* Setup to process unaligned bytes */
3123  istart = length & 0xfffffff8;
3124  cursrc1 = &Src1[istart];
3125  curdest = &Dest[istart];
3126  } else {
3127  /* No unaligned bytes - we are done */
3128  return (0);
3129  }
3130  } else {
3131  /* Setup to process whole image */
3132  istart = 0;
3133  cursrc1 = Src1;
3134  curdest = Dest;
3135  }
3136 
3137  /* C routine to process image */
3138  for (i = istart; i < length; i++) {
3139  result = ((int) *cursrc1 << N) & 0xff;
3140  *curdest = (unsigned char) result;
3141  /* Advance pointers */
3142  cursrc1++;
3143  curdest++;
3144  }
3145 
3146  return (0);
3147 }
3148 
3159 static int SDL_imageFilterShiftLeftUintMMX(unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char N)
3160 {
3161 #ifdef USE_MMX
3162 #if !defined(GCC__)
3163  __asm
3164  {
3165  pusha
3166  mov eax, Src1 /* load Src1 address into eax */
3167  mov edi, Dest /* load Dest address into edi */
3168  mov ecx, SrcLength /* load loop counter (SIZE) into ecx */
3169  shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */
3170  align 16 /* 16 byte alignment of the loop entry */
3171 L12023:
3172  movq mm0, [eax] /* load 8 bytes from SrcDest into MM0 */
3173  pslld mm0, N /* MM0=SrcDest+C (add 8 bytes with saturation) */
3174  movq [edi], mm0 /* store result in SrcDest */
3175  add eax, 8 /* increase Src1 register pointer by 8 */
3176  add edi, 8 /* increase Dest register pointer by 8 */
3177  dec ecx /* decrease loop counter */
3178  jnz L12023 /* check loop termination, proceed if required */
3179  emms /* exit MMX state */
3180  popa
3181  }
3182 #else
3183  /* i386 and x86_64 */
3184  __m64 *mSrc1 = (__m64*)Src1;
3185  __m64 *mDest = (__m64*)Dest;
3186  int i;
3187  for (i = 0; i < SrcLength/8; i++) {
3188  *mDest = _m_pslldi(*mSrc1, N); /* Src1+C (add 8 bytes with saturation) */
3189  mSrc1++;
3190  mDest++;
3191  }
3192  _m_empty(); /* clean MMX state */
3193 #endif
3194  return (0);
3195 #else
3196  return (-1);
3197 #endif
3198 }
3199 
3210 int SDL_imageFilterShiftLeftUint(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
3211 {
3212  unsigned int i, istart;
3213  unsigned char *cursrc1, *curdest;
3214  unsigned int *icursrc1, *icurdest;
3215  unsigned int result;
3216 
3217  /* Validate input parameters */
3218  if ((Src1 == NULL) || (Dest == NULL))
3219  return(-1);
3220  if (length == 0)
3221  return(0);
3222 
3223  if (N > 32) {
3224  return (-1);
3225  }
3226 
3227  /* Special case: N==0 */
3228  if (N == 0) {
3229  memcpy(Src1, Dest, length);
3230  return (0);
3231  }
3232 
3233  if ((SDL_imageFilterMMXdetect()) && (length > 7)) {
3234 
3235  SDL_imageFilterShiftLeftUintMMX(Src1, Dest, length, N);
3236 
3237  /* Check for unaligned bytes */
3238  if ((length & 7) > 0) {
3239  /* Setup to process unaligned bytes */
3240  istart = length & 0xfffffff8;
3241  cursrc1 = &Src1[istart];
3242  curdest = &Dest[istart];
3243  } else {
3244  /* No unaligned bytes - we are done */
3245  return (0);
3246  }
3247  } else {
3248  /* Setup to process whole image */
3249  istart = 0;
3250  cursrc1 = Src1;
3251  curdest = Dest;
3252  }
3253 
3254  /* C routine to process image */
3255  icursrc1=(unsigned int *)cursrc1;
3256  icurdest=(unsigned int *)curdest;
3257  for (i = istart; i < length; i += 4) {
3258  if ((i+4)<length) {
3259  result = ((unsigned int)*icursrc1 << N);
3260  *icurdest = result;
3261  }
3262  /* Advance pointers */
3263  icursrc1++;
3264  icurdest++;
3265  }
3266 
3267  return (0);
3268 }
3269 
3280 static int SDL_imageFilterShiftLeftMMX(unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char N)
3281 {
3282 #ifdef USE_MMX
3283 #if !defined(GCC__)
3284  __asm
3285  {
3286  pusha
3287  xor eax, eax /* zero EAX */
3288  mov al, N /* load N into AL */
3289  movd mm7, eax /* copy N into MM7 */
3290  pxor mm0, mm0 /* zero MM0 register */
3291  mov eax, Src1 /* load Src1 address into eax */
3292  mov edi, Dest /* load Dest address into edi */
3293  mov ecx, SrcLength /* load loop counter (SIZE) into ecx */
3294  shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */
3295  cmp al, 7 /* if (N <= 7) execute more efficient code */
3296  jg L10281
3297  align 16 /* 16 byte alignment of the loop entry */
3298 L10280:
3299  movq mm3, [eax] /* load 8 bytes from Src1 into MM3 */
3300  movq mm4, mm3 /* copy MM3 into MM4 */
3301  punpcklbw mm3, mm0 /* unpack low bytes of SrcDest into words */
3302  punpckhbw mm4, mm0 /* unpack high bytes of SrcDest into words */
3303  psllw mm3, mm7 /* shift 4 WORDS of MM3 (N) bits to the left */
3304  psllw mm4, mm7 /* shift 4 WORDS of MM4 (N) bits to the left */
3305  packuswb mm3, mm4 /* pack words back into bytes with saturation */
3306  movq [edi], mm3 /* store result in Dest */
3307  add eax, 8 /* increase Src1 register pointer by 8 */
3308  add edi, 8 /* increase Dest register pointer by 8 */
3309  dec ecx /* decrease loop counter */
3310  jnz L10280 /* check loop termination, proceed if required */
3311  jmp L10282
3312  align 16 /* 16 byte alignment of the loop entry */
3313 L10281:
3314  movq mm3, [eax] /* load 8 bytes from Src1 into MM3 */
3315  movq mm4, mm3 /* copy MM3 into MM4 */
3316  punpcklbw mm3, mm0 /* unpack low bytes of SrcDest into words */
3317  punpckhbw mm4, mm0 /* unpack high bytes of SrcDest into words */
3318  psllw mm3, mm7 /* shift 4 WORDS of MM3 (N) bits to the left */
3319  psllw mm4, mm7 /* shift 4 WORDS of MM4 (N) bits to the left */
3320  /* ** Take abs value of the signed words ** */
3321  movq mm5, mm3 /* copy mm3 into mm5 */
3322  movq mm6, mm4 /* copy mm4 into mm6 */
3323  psraw mm5, 15 /* fill mm5 words with word sign bit */
3324  psraw mm6, 15 /* fill mm6 words with word sign bit */
3325  pxor mm3, mm5 /* take 1's compliment of only neg words */
3326  pxor mm4, mm6 /* take 1's compliment of only neg words */
3327  psubsw mm3, mm5 /* add 1 to only neg words, W-(-1) or W-0 */
3328  psubsw mm4, mm6 /* add 1 to only neg words, W-(-1) or W-0 */
3329  packuswb mm3, mm4 /* pack words back into bytes with saturation */
3330  movq [edi], mm3 /* store result in Dest */
3331  add eax, 8 /* increase Src1 register pointer by 8 */
3332  add edi, 8 /* increase Dest register pointer by 8 */
3333  dec ecx /* decrease loop counter */
3334  jnz L10281 /* check loop termination, proceed if required */
3335 L10282:
3336  emms /* exit MMX state */
3337  popa
3338  }
3339 #else
3340  /* i386 and x86_64 */
3341  __m64 *mSrc1 = (__m64*)Src1;
3342  __m64 *mDest = (__m64*)Dest;
3343  __m64 mm0 = _m_from_int(0); /* zero mm0 register */
3344  int i;
3345  if (N <= 7) { /* if (N <= 7) execute more efficient code */
3346  for (i = 0; i < SrcLength/8; i++) {
3347  __m64 mm3, mm4;
3348  mm3 = _m_punpcklbw(*mSrc1, mm0); /* unpack low bytes of Src1 into words */
3349  mm4 = _m_punpckhbw(*mSrc1, mm0); /* unpack high bytes of Src1 into words */
3350  mm3 = _m_psllwi(mm3, N); /* shift 4 WORDS of MM3 (N) bits to the left */
3351  mm4 = _m_psllwi(mm4, N); /* shift 4 WORDS of MM4 (N) bits to the left */
3352  *mDest = _m_packuswb(mm3, mm4); /* pack words back into bytes with saturation */
3353  mSrc1++;
3354  mDest++;
3355  }
3356  } else {
3357  for (i = 0; i < SrcLength/8; i++) {
3358  __m64 mm3, mm4, mm5, mm6;
3359  mm3 = _m_punpcklbw(*mSrc1, mm0); /* unpack low bytes of Src1 into words */
3360  mm4 = _m_punpckhbw(*mSrc1, mm0); /* unpack high bytes of Src1 into words */
3361  mm3 = _m_psllwi(mm3, N); /* shift 4 WORDS of MM3 (N) bits to the left */
3362  mm4 = _m_psllwi(mm4, N); /* shift 4 WORDS of MM4 (N) bits to the left */
3363  /* Take abs value of the signed words */
3364  mm5 = _m_psrawi(mm3, 15); /* fill mm5 words with word sign bit */
3365  mm6 = _m_psrawi(mm4, 15); /* fill mm6 words with word sign bit */
3366  mm3 = _m_pxor(mm3, mm5); /* take 1's compliment of only neg. words */
3367  mm4 = _m_pxor(mm4, mm6); /* take 1's compliment of only neg. words */
3368  mm3 = _m_psubsw(mm3, mm5); /* add 1 to only neg. words, W-(-1) or W-0 */
3369  mm4 = _m_psubsw(mm4, mm6); /* add 1 to only neg. words, W-(-1) or W-0 */
3370  *mDest = _m_packuswb(mm3, mm4); /* pack words back into bytes with saturation */
3371  mSrc1++;
3372  mDest++;
3373  }
3374  }
3375  _m_empty(); /* clean MMX state */
3376 #endif
3377  return (0);
3378 #else
3379  return (-1);
3380 #endif
3381 }
3382 
3393 int SDL_imageFilterShiftLeft(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
3394 {
3395  unsigned int i, istart;
3396  unsigned char *cursrc1, *curdest;
3397  int result;
3398 
3399  /* Validate input parameters */
3400  if ((Src1 == NULL) || (Dest == NULL))
3401  return(-1);
3402  if (length == 0)
3403  return(0);
3404 
3405  if (N > 8) {
3406  return (-1);
3407  }
3408 
3409  /* Special case: N==0 */
3410  if (N == 0) {
3411  memcpy(Src1, Dest, length);
3412  return (0);
3413  }
3414 
3415  if ((SDL_imageFilterMMXdetect()) && (length > 7)) {
3416 
3417  SDL_imageFilterShiftLeftMMX(Src1, Dest, length, N);
3418 
3419  /* Check for unaligned bytes */
3420  if ((length & 7) > 0) {
3421  /* Setup to process unaligned bytes */
3422  istart = length & 0xfffffff8;
3423  cursrc1 = &Src1[istart];
3424  curdest = &Dest[istart];
3425  } else {
3426  /* No unaligned bytes - we are done */
3427  return (0);
3428  }
3429  } else {
3430  /* Setup to process whole image */
3431  istart = 0;
3432  cursrc1 = Src1;
3433  curdest = Dest;
3434  }
3435 
3436  /* C routine to process image */
3437  for (i = istart; i < length; i++) {
3438  result = (int) *cursrc1 << N;
3439  if (result > 255)
3440  result = 255;
3441  *curdest = (unsigned char) result;
3442  /* Advance pointers */
3443  cursrc1++;
3444  curdest++;
3445  }
3446 
3447  return (0);
3448 }
3449 
3460 static int SDL_imageFilterBinarizeUsingThresholdMMX(unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char T)
3461 {
3462 #ifdef USE_MMX
3463 #if !defined(GCC__)
3464  __asm
3465  {
3466  pusha
3467  /* ** Duplicate T in 8 bytes of MM3 ** */
3468  pcmpeqb mm1, mm1 /* generate all 1's in mm1 */
3469  pcmpeqb mm2, mm2 /* generate all 1's in mm2 */
3470  mov al, T /* load T into AL */
3471  mov ah, al /* copy AL into AH */
3472  mov bx, ax /* copy AX into BX */
3473  shl eax, 16 /* shift 2 bytes of EAX left */
3474  mov ax, bx /* copy BX into AX */
3475  movd mm3, eax /* copy EAX into MM3 */
3476  movd mm4, eax /* copy EAX into MM4 */
3477  punpckldq mm3, mm4 /* fill higher bytes of MM3 with T */
3478  psubusb mm2, mm3 /* store 0xFF - T in MM2 */
3479  mov eax, Src1 /* load Src1 address into eax */
3480  mov edi, Dest /* load Dest address into edi */
3481  mov ecx, SrcLength /* load loop counter (SIZE) into ecx */
3482  shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */
3483  align 16 /* 16 byte alignment of the loop entry */
3484 L1029:
3485  movq mm0, [eax] /* load 8 bytes from SrcDest into MM0 */
3486  paddusb mm0, mm2 /* MM0=SrcDest+(0xFF-T) (add 8 bytes with saturation) */
3487  pcmpeqb mm0, mm1 /* binarize 255:0, comparing to 255 */
3488  movq [edi], mm0 /* store result in SrcDest */
3489  add eax, 8 /* increase Src1 register pointer by 8 */
3490  add edi, 8 /* increase Dest register pointer by 8 */
3491  dec ecx /* decrease loop counter */
3492  jnz L1029 /* check loop termination, proceed if required */
3493  emms /* exit MMX state */
3494  popa
3495  }
3496 #else
3497  /* i386 and x86_64 */
3498  __m64 *mSrc1 = (__m64*)Src1;
3499  __m64 *mDest = (__m64*)Dest;
3500  /* Duplicate T in 8 bytes of MM3 */
3501  __m64 mm1 = _m_pcmpeqb(mm1, mm1); /* generate all 1's in mm1 */
3502  __m64 mm2 = _m_pcmpeqb(mm2, mm2); /* generate all 1's in mm1 */
3503  int i;
3504  memset(&i, T, 4);
3505  __m64 mm3 = _m_from_int(i);
3506  __m64 mm4 = _m_from_int(i);
3507  mm3 = _m_punpckldq(mm3, mm4); /* fill higher bytes of MM3 with T */
3508  mm2 = _m_psubusb(mm2, mm3); /* store 0xFF - T in MM2 */
3509  //__m64 mm3 = _m_from_int64(lli); // x86_64 only
3510  for (i = 0; i < SrcLength/8; i++) {
3511  __m64 mm0 = _m_paddusb(*mSrc1, mm2); /* Src1+(0xFF-T) (add 8 bytes with saturation) */
3512  *mDest = _m_pcmpeqb(mm0, mm1); /* binarize 255:0, comparing to 255 */
3513  mSrc1++;
3514  mDest++;
3515  }
3516  _m_empty(); /* clean MMX state */
3517 #endif
3518  return (0);
3519 #else
3520  return (-1);
3521 #endif
3522 }
3523 
3534 int SDL_imageFilterBinarizeUsingThreshold(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char T)
3535 {
3536  unsigned int i, istart;
3537  unsigned char *cursrc1;
3538  unsigned char *curdest;
3539 
3540  /* Validate input parameters */
3541  if ((Src1 == NULL) || (Dest == NULL))
3542  return(-1);
3543  if (length == 0)
3544  return(0);
3545 
3546  /* Special case: T==0 */
3547  if (T == 0) {
3548  memset(Dest, 255, length);
3549  return (0);
3550  }
3551 
3552  if ((SDL_imageFilterMMXdetect()) && (length > 7)) {
3553 
3554  SDL_imageFilterBinarizeUsingThresholdMMX(Src1, Dest, length, T);
3555 
3556  /* Check for unaligned bytes */
3557  if ((length & 7) > 0) {
3558  /* Setup to process unaligned bytes */
3559  istart = length & 0xfffffff8;
3560  cursrc1 = &Src1[istart];
3561  curdest = &Dest[istart];
3562  } else {
3563  /* No unaligned bytes - we are done */
3564  return (0);
3565  }
3566  } else {
3567  /* Setup to process whole image */
3568  istart = 0;
3569  cursrc1 = Src1;
3570  curdest = Dest;
3571  }
3572 
3573  /* C routine to process image */
3574  for (i = istart; i < length; i++) {
3575  *curdest = (unsigned char)(((unsigned char)*cursrc1 >= T) ? 255 : 0);
3576  /* Advance pointers */
3577  cursrc1++;
3578  curdest++;
3579  }
3580 
3581  return (0);
3582 }
3583 
3595 static int SDL_imageFilterClipToRangeMMX(unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char Tmin,
3596  unsigned char Tmax)
3597 {
3598 #ifdef USE_MMX
3599 #if !defined(GCC__)
3600  __asm
3601  {
3602  pusha
3603  pcmpeqb mm1, mm1 /* generate all 1's in mm1 */
3604  /* ** Duplicate Tmax in 8 bytes of MM3 ** */
3605  mov al, Tmax /* load Tmax into AL */
3606  mov ah, al /* copy AL into AH */
3607  mov bx, ax /* copy AX into BX */
3608  shl eax, 16 /* shift 2 bytes of EAX left */
3609  mov ax, bx /* copy BX into AX */
3610  movd mm3, eax /* copy EAX into MM3 */
3611  movd mm4, eax /* copy EAX into MM4 */
3612  punpckldq mm3, mm4 /* fill higher bytes of MM3 with Tmax */
3613  psubusb mm1, mm3 /* store 0xFF - Tmax in MM1 */
3614  /* ** Duplicate Tmin in 8 bytes of MM5 ** */
3615  mov al, Tmin /* load Tmin into AL */
3616  mov ah, al /* copy AL into AH */
3617  mov bx, ax /* copy AX into BX */
3618  shl eax, 16 /* shift 2 bytes of EAX left */
3619  mov ax, bx /* copy BX into AX */
3620  movd mm5, eax /* copy EAX into MM5 */
3621  movd mm4, eax /* copy EAX into MM4 */
3622  punpckldq mm5, mm4 /* fill higher bytes of MM5 with Tmin */
3623  movq mm7, mm5 /* copy MM5 into MM7 */
3624  paddusb mm7, mm1 /* store 0xFF - Tmax + Tmin in MM7 */
3625  mov eax, Src1 /* load Src1 address into eax */
3626  mov edi, Dest /* load Dest address into edi */
3627  mov ecx, SrcLength /* load loop counter (SIZE) into ecx */
3628  shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */
3629  align 16 /* 16 byte alignment of the loop entry */
3630 L1030:
3631  movq mm0, [eax] /* load 8 bytes from Src1 into MM0 */
3632  paddusb mm0, mm1 /* MM0=SrcDest+(0xFF-Tmax) */
3633  psubusb mm0, mm7 /* MM0=MM0-(0xFF-Tmax+Tmin) */
3634  paddusb mm0, mm5 /* MM0=MM0+Tmin */
3635  movq [edi], mm0 /* store result in Dest */
3636  add eax, 8 /* increase Src1 register pointer by 8 */
3637  add edi, 8 /* increase Dest register pointer by 8 */
3638  dec ecx /* decrease loop counter */
3639  jnz L1030 /* check loop termination, proceed if required */
3640  emms /* exit MMX state */
3641  popa
3642  }
3643 #else
3644  /* i386 and x86_64 */
3645  __m64 *mSrc1 = (__m64*)Src1;
3646  __m64 *mDest = (__m64*)Dest;
3647  __m64 mm1 = _m_pcmpeqb(mm1, mm1); /* generate all 1's in mm1 */
3648  int i;
3649  /* Duplicate Tmax in 8 bytes of MM3 */
3650  __m64 mm3, mm4;
3651  memset(&i, Tmax, 4);
3652  mm3 = _m_from_int(i);
3653  mm4 = _m_from_int(i);
3654  mm3 = _m_punpckldq(mm3, mm4); /* fill higher bytes of MM3 with Tmax */
3655  mm1 = _m_psubusb(mm1, mm3); /* store 0xFF - Tmax in MM1 */
3656  //__m64 mm3 = _m_from_int64(lli); // x86_64 only
3657  /* Duplicate Tmax in 8 bytes of MM3 */
3658  __m64 mm5, mm7;
3659  memset(&i, Tmin, 4);
3660  mm5 = _m_from_int(i);
3661  mm4 = _m_from_int(i);
3662  mm5 = _m_punpckldq(mm5, mm4); /* fill higher bytes of MM5 with Tmin */
3663  mm7 = _m_paddusb(mm5, mm1); /* store 0xFF - Tmax + Tmin in MM7 */
3664  for (i = 0; i < SrcLength/8; i++) {
3665  __m64 mm0;
3666  mm0 = _m_paddusb(*mSrc1, mm1); /* MM0=Src1+(0xFF-Tmax) */
3667  mm0 = _m_psubusb(mm0, mm7); /* MM0=MM0-(0xFF-Tmax+Tmin) */
3668  *mDest = _m_paddusb(mm0, mm5); /* MM0+Tmin */
3669  mSrc1++;
3670  mDest++;
3671  }
3672  _m_empty(); /* clean MMX state */
3673 #endif
3674  return (0);
3675 #else
3676  return (-1);
3677 #endif
3678 }
3679 
3691 int SDL_imageFilterClipToRange(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char Tmin,
3692  unsigned char Tmax)
3693 {
3694  unsigned int i, istart;
3695  unsigned char *cursrc1;
3696  unsigned char *curdest;
3697 
3698  /* Validate input parameters */
3699  if ((Src1 == NULL) || (Dest == NULL))
3700  return(-1);
3701  if (length == 0)
3702  return(0);
3703 
3704  /* Special case: Tmin==0 && Tmax = 255 */
3705  if ((Tmin == 0) && (Tmax == 25)) {
3706  memcpy(Src1, Dest, length);
3707  return (0);
3708  }
3709 
3710  if ((SDL_imageFilterMMXdetect()) && (length > 7)) {
3711 
3712  SDL_imageFilterClipToRangeMMX(Src1, Dest, length, Tmin, Tmax);
3713 
3714  /* Check for unaligned bytes */
3715  if ((length & 7) > 0) {
3716  /* Setup to process unaligned bytes */
3717  istart = length & 0xfffffff8;
3718  cursrc1 = &Src1[istart];
3719  curdest = &Dest[istart];
3720  } else {
3721  /* No unaligned bytes - we are done */
3722  return (0);
3723  }
3724  } else {
3725  /* Setup to process whole image */
3726  istart = 0;
3727  cursrc1 = Src1;
3728  curdest = Dest;
3729  }
3730 
3731  /* C routine to process image */
3732  for (i = istart; i < length; i++) {
3733  if (*cursrc1 < Tmin) {
3734  *curdest = Tmin;
3735  } else if (*cursrc1 > Tmax) {
3736  *curdest = Tmax;
3737  } else {
3738  *curdest = *cursrc1;
3739  }
3740  /* Advance pointers */
3741  cursrc1++;
3742  curdest++;
3743  }
3744 
3745  return (0);
3746 }
3747 
3761 static int SDL_imageFilterNormalizeLinearMMX(unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, int Cmin, int Cmax,
3762  int Nmin, int Nmax)
3763 {
3764 #ifdef USE_MMX
3765 #if !defined(GCC__)
3766  __asm
3767  {
3768  pusha
3769  mov ax, WORD PTR Nmax /* load Nmax in AX */
3770  mov bx, WORD PTR Cmax /* load Cmax in BX */
3771  sub ax, WORD PTR Nmin /* AX = Nmax - Nmin */
3772  sub bx, WORD PTR Cmin /* BX = Cmax - Cmin */
3773  jz L10311 /* check division by zero */
3774  xor dx, dx /* prepare for division, zero DX */
3775  div bx /* AX = AX/BX */
3776  jmp L10312
3777 L10311:
3778  mov ax, 255 /* if div by zero, assume result max byte value */
3779 L10312: /* ** Duplicate AX in 4 words of MM0 ** */
3780  mov bx, ax /* copy AX into BX */
3781  shl eax, 16 /* shift 2 bytes of EAX left */
3782  mov ax, bx /* copy BX into AX */
3783  movd mm0, eax /* copy EAX into MM0 */
3784  movd mm1, eax /* copy EAX into MM1 */
3785  punpckldq mm0, mm1 /* fill higher words of MM0 with AX */
3786  /* ** Duplicate Cmin in 4 words of MM1 ** */
3787  mov ax, WORD PTR Cmin /* load Cmin into AX */
3788  mov bx, ax /* copy AX into BX */
3789  shl eax, 16 /* shift 2 bytes of EAX left */
3790  mov ax, bx /* copy BX into AX */
3791  movd mm1, eax /* copy EAX into MM1 */
3792  movd mm2, eax /* copy EAX into MM2 */
3793  punpckldq mm1, mm2 /* fill higher words of MM1 with Cmin */
3794  /* ** Duplicate Nmin in 4 words of MM2 ** */
3795  mov ax, WORD PTR Nmin /* load Nmin into AX */
3796  mov bx, ax /* copy AX into BX */
3797  shl eax, 16 /* shift 2 bytes of EAX left */
3798  mov ax, bx /* copy BX into AX */
3799  movd mm2, eax /* copy EAX into MM2 */
3800  movd mm3, eax /* copy EAX into MM3 */
3801  punpckldq mm2, mm3 /* fill higher words of MM2 with Nmin */
3802  pxor mm7, mm7 /* zero MM7 register */
3803  mov eax, Src1 /* load Src1 address into eax */
3804  mov edi, Dest /* load Dest address into edi */
3805  mov ecx, SrcLength /* load loop counter (SIZE) into ecx */
3806  shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */
3807  align 16 /* 16 byte alignment of the loop entry */
3808 L1031:
3809  movq mm3, [eax] /* load 8 bytes from Src1 into MM3 */
3810  movq mm4, mm3 /* copy MM3 into MM4 */
3811  punpcklbw mm3, mm7 /* unpack low bytes of SrcDest into words */
3812  punpckhbw mm4, mm7 /* unpack high bytes of SrcDest into words */
3813  psubusb mm3, mm1 /* S-Cmin, low bytes */
3814  psubusb mm4, mm1 /* S-Cmin, high bytes */
3815  pmullw mm3, mm0 /* MM0*(S-Cmin), low bytes */
3816  pmullw mm4, mm0 /* MM0*(S-Cmin), high bytes */
3817  paddusb mm3, mm2 /* MM0*(S-Cmin)+Nmin, low bytes */
3818  paddusb mm4, mm2 /* MM0*(S-Cmin)+Nmin, high bytes */
3819  /* ** Take abs value of the signed words ** */
3820  movq mm5, mm3 /* copy mm3 into mm5 */
3821  movq mm6, mm4 /* copy mm4 into mm6 */
3822  psraw mm5, 15 /* fill mm5 words with word sign bit */
3823  psraw mm6, 15 /* fill mm6 words with word sign bit */
3824  pxor mm3, mm5 /* take 1's compliment of only neg words */
3825  pxor mm4, mm6 /* take 1's compliment of only neg words */
3826  psubsw mm3, mm5 /* add 1 to only neg words, W-(-1) or W-0 */
3827  psubsw mm4, mm6 /* add 1 to only neg words, W-(-1) or W-0 */
3828  packuswb mm3, mm4 /* pack words back into bytes with saturation */
3829  movq [edi], mm3 /* store result in Dest */
3830  add eax, 8 /* increase Src1 register pointer by 8 */
3831  add edi, 8 /* increase Dest register pointer by 8 */
3832  dec ecx /* decrease loop counter */
3833  jnz L1031 /* check loop termination, proceed if required */
3834  emms /* exit MMX state */
3835  popa
3836  }
3837 #else
3838  /* i386 and x86_64 */
3839  __m64 *mSrc1 = (__m64*)Src1;
3840  __m64 *mDest = (__m64*)Dest;
3841  __m64 mm0, mm1, mm2, mm3;
3842 
3843  int i;
3844  /* Duplicate (Nmax-Nmin)/(Cmax-Cmin) in 4 words of MM0 */
3845  unsigned short a = Nmax - Nmin;
3846  unsigned short b = Cmax - Cmin;
3847  if (b == 0) {
3848  a = 255;
3849  } else {
3850  a /= b;
3851  }
3852  i = (a<<16)|a;
3853  mm0 = _m_from_int(i);
3854  mm1 = _m_from_int(i);
3855  mm0 = _m_punpckldq(mm0, mm1); /* fill higher words of MM0 with AX */
3856  /* Duplicate Cmin in 4 words of MM1 */
3857  i = (Cmin<<16)|(short)Cmin;
3858  mm1 = _m_from_int(i);
3859  mm2 = _m_from_int(i);
3860  mm1 = _m_punpckldq(mm1, mm2); /* fill higher words of MM1 with Cmin */
3861  /* Duplicate Nmin in 4 words of MM2 */
3862  i = (Nmin<<16)|(short)Nmin;
3863  mm2 = _m_from_int(i);
3864  mm3 = _m_from_int(i);
3865  mm2 = _m_punpckldq(mm2, mm3); /* fill higher words of MM2 with Nmin */
3866  __m64 mm7 = _m_from_int(0); /* zero mm0 register */
3867  for (i = 0; i < SrcLength/8; i++) {
3868  __m64 mm3, mm4, mm5, mm6;
3869  mm3 = _m_punpcklbw(*mSrc1, mm7); /* unpack low bytes of Src1 into words */
3870  mm4 = _m_punpckhbw(*mSrc1, mm7); /* unpack high bytes of Src1 into words */
3871  mm3 = _m_psubusb(mm3, mm1); /* S-Cmin, low bytes */
3872  mm4 = _m_psubusb(mm4, mm1); /* S-Cmin, high bytes */
3873  mm3 = _m_pmullw(mm3, mm0); /* MM0*(S-Cmin), low bytes */
3874  mm4 = _m_pmullw(mm4, mm0); /* MM0*(S-Cmin), high bytes */
3875  mm3 = _m_paddusb(mm3, mm2); /* MM0*(S-Cmin)+Nmin, low bytes */
3876  mm4 = _m_paddusb(mm4, mm2); /* MM0*(S-Cmin)+Nmin, high bytes */
3877  /* Take abs value of the signed words */
3878  mm5 = _m_psrawi(mm3, 15); /* fill mm5 words with word sign bit */
3879  mm6 = _m_psrawi(mm4, 15); /* fill mm6 words with word sign bit */
3880  mm3 = _m_pxor(mm3, mm5); /* take 1's compliment of only neg. words */
3881  mm4 = _m_pxor(mm4, mm6); /* take 1's compliment of only neg. words */
3882  mm3 = _m_psubsw(mm3, mm5); /* add 1 to only neg. words, W-(-1) or W-0 */
3883  mm4 = _m_psubsw(mm4, mm6); /* add 1 to only neg. words, W-(-1) or W-0 */
3884  *mDest = _m_packuswb(mm3, mm4); /* pack words back into bytes with saturation */
3885  mSrc1++;
3886  mDest++;
3887  }
3888  _m_empty(); /* clean MMX state */
3889 #endif
3890  return (0);
3891 #else
3892  return (-1);
3893 #endif
3894 }
3895 
3909 int SDL_imageFilterNormalizeLinear(unsigned char *Src, unsigned char *Dest, unsigned int length, int Cmin, int Cmax, int Nmin,
3910  int Nmax)
3911 {
3912  unsigned int i, istart;
3913  unsigned char *cursrc;
3914  unsigned char *curdest;
3915  int dN, dC, factor;
3916  int result;
3917 
3918  /* Validate input parameters */
3919  if ((Src == NULL) || (Dest == NULL))
3920  return(-1);
3921  if (length == 0)
3922  return(0);
3923 
3924  if ((SDL_imageFilterMMXdetect()) && (length > 7)) {
3925 
3926  SDL_imageFilterNormalizeLinearMMX(Src, Dest, length, Cmin, Cmax, Nmin, Nmax);
3927 
3928  /* Check for unaligned bytes */
3929  if ((length & 7) > 0) {
3930  /* Setup to process unaligned bytes */
3931  istart = length & 0xfffffff8;
3932  cursrc = &Src[istart];
3933  curdest = &Dest[istart];
3934  } else {
3935  /* No unaligned bytes - we are done */
3936  return (0);
3937  }
3938  } else {
3939  /* Setup to process whole image */
3940  istart = 0;
3941  cursrc = Src;
3942  curdest = Dest;
3943  }
3944 
3945  /* C routine to process image */
3946  dC = Cmax - Cmin;
3947  if (dC == 0)
3948  return (0);
3949  dN = Nmax - Nmin;
3950  factor = dN / dC;
3951  for (i = istart; i < length; i++) {
3952  result = factor * ((int) (*cursrc) - Cmin) + Nmin;
3953  if (result > 255)
3954  result = 255;
3955  *curdest = (unsigned char) result;
3956  /* Advance pointers */
3957  cursrc++;
3958  curdest++;
3959  }
3960 
3961  return (0);
3962 }
3963 
3964 /* ------------------------------------------------------------------------------------ */
3965 
3980 int SDL_imageFilterConvolveKernel3x3Divide(unsigned char *Src, unsigned char *Dest, int rows, int columns,
3981  signed short *Kernel, unsigned char Divisor)
3982 {
3983  /* Validate input parameters */
3984  if ((Src == NULL) || (Dest == NULL) || (Kernel == NULL))
3985  return(-1);
3986 
3987  if ((columns < 3) || (rows < 3) || (Divisor == 0))
3988  return (-1);
3989 
3990  if ((SDL_imageFilterMMXdetect())) {
3991 //#ifdef USE_MMX
3992 #if defined(USE_MMX) && defined(i386)
3993 #if !defined(GCC__)
3994  __asm
3995  {
3996  pusha
3997  pxor mm0, mm0 /* zero MM0 */
3998  xor ebx, ebx /* zero EBX */
3999  mov bl, Divisor /* load Divisor into BL */
4000  mov edx, Kernel /* load Kernel address into EDX */
4001  movq mm5, [edx] /* MM5 = {0,K2,K1,K0} */
4002  add edx, 8 /* second row |K0 K1 K2 0| */
4003  movq mm6, [edx] /* MM6 = {0,K5,K4,K3} K = |K3 K4 K5 0| */
4004  add edx, 8 /* third row |K6 K7 K8 0| */
4005  movq mm7, [edx] /* MM7 = {0,K8,K7,K6} */
4006  /* ---, */
4007  mov eax, columns /* load columns into EAX */
4008  mov esi, Src /* ESI = Src row 0 address */
4009  mov edi, Dest /* load Dest address to EDI */
4010  add edi, eax /* EDI = EDI + columns */
4011  inc edi /* 1 byte offset from the left edge */
4012  mov edx, rows /* initialize ROWS counter */
4013  sub edx, 2 /* do not use first and last row */
4014  /* ---, */
4015 L10320:
4016  mov ecx, eax /* initialize COLUMS counter */
4017  sub ecx, 2 /* do not use first and last column */
4018  align 16 /* 16 byte alignment of the loop entry */
4019 L10322:
4020  /* ---, */
4021  movq mm1, [esi] /* load 8 bytes of the image first row */
4022  add esi, eax /* move one row below */
4023  movq mm2, [esi] /* load 8 bytes of the image second row */
4024  add esi, eax /* move one row below */
4025  movq mm3, [esi] /* load 8 bytes of the image third row */
4026  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
4027  punpcklbw mm2, mm0 /* unpack first 4 bytes into words */
4028  punpcklbw mm3, mm0 /* unpack first 4 bytes into words */
4029  pmullw mm1, mm5 /* multiply words first row image*Kernel */
4030  pmullw mm2, mm6 /* multiply words second row image*Kernel */
4031  pmullw mm3, mm7 /* multiply words third row image*Kernel */
4032  paddsw mm1, mm2 /* add 4 words of the first and second rows */
4033  paddsw mm1, mm3 /* add 4 words of the third row and result */
4034  movq mm2, mm1 /* copy MM1 into MM2 */
4035  psrlq mm1, 32 /* shift 2 left words to the right */
4036  paddsw mm1, mm2 /* add 2 left and 2 right result words */
4037  movq mm3, mm1 /* copy MM1 into MM3 */
4038  psrlq mm1, 16 /* shift 1 left word to the right */
4039  paddsw mm1, mm3 /* add 1 left and 1 right result words */
4040  /* --, */
4041  movd mm2, eax /* save EAX in MM2 */
4042  movd mm3, edx /* save EDX in MM3 */
4043  movd eax, mm1 /* copy MM1 into EAX */
4044  psraw mm1, 15 /* spread sign bit of the result */
4045  movd edx, mm1 /* fill EDX with a sign bit */
4046  idiv bx /* IDIV - VERY EXPENSIVE */
4047  movd mm1, eax /* move result of division into MM1 */
4048  packuswb mm1, mm0 /* pack division result with saturation */
4049  movd eax, mm1 /* copy saturated result into EAX */
4050  mov [edi], al /* copy a byte result into Dest */
4051  movd edx, mm3 /* restore saved EDX */
4052  movd eax, mm2 /* restore saved EAX */
4053  /* --, */
4054  sub esi, eax /* move two rows up */
4055  sub esi, eax /* */
4056  inc esi /* move Src pointer to the next pixel */
4057  inc edi /* move Dest pointer to the next pixel */
4058  /* ---, */
4059  dec ecx /* decrease loop counter COLUMNS */
4060  jnz L10322 /* check loop termination, proceed if required */
4061  add esi, 2 /* move to the next row in Src */
4062  add edi, 2 /* move to the next row in Dest */
4063  dec edx /* decrease loop counter ROWS */
4064  jnz L10320 /* check loop termination, proceed if required */
4065  /* ---, */
4066  emms /* exit MMX state */
4067  popa
4068  }
4069 #else
4070  asm volatile
4071  ("pusha \n\t" "pxor %%mm0, %%mm0 \n\t" /* zero MM0 */
4072  "xor %%ebx, %%ebx \n\t" /* zero EBX */
4073  "mov %5, %%bl \n\t" /* load Divisor into BL */
4074  "mov %4, %%edx \n\t" /* load Kernel address into EDX */
4075  "movq (%%edx), %%mm5 \n\t" /* MM5 = {0,K2,K1,K0} */
4076  "add $8, %%edx \n\t" /* second row |K0 K1 K2 0| */
4077  "movq (%%edx), %%mm6 \n\t" /* MM6 = {0,K5,K4,K3} K = |K3 K4 K5 0| */
4078  "add $8, %%edx \n\t" /* third row |K6 K7 K8 0| */
4079  "movq (%%edx), %%mm7 \n\t" /* MM7 = {0,K8,K7,K6} */
4080  /* --- */
4081  "mov %3, %%eax \n\t" /* load columns into EAX */
4082  "mov %1, %%esi \n\t" /* ESI = Src row 0 address */
4083  "mov %0, %%edi \n\t" /* load Dest address to EDI */
4084  "add %%eax, %%edi \n\t" /* EDI = EDI + columns */
4085  "inc %%edi \n\t" /* 1 byte offset from the left edge */
4086  "mov %2, %%edx \n\t" /* initialize ROWS counter */
4087  "sub $2, %%edx \n\t" /* do not use first and last row */
4088  /* --- */
4089  ".L10320: \n\t" "mov %%eax, %%ecx \n\t" /* initialize COLUMS counter */
4090  "sub $2, %%ecx \n\t" /* do not use first and last column */
4091  ".align 16 \n\t" /* 16 byte alignment of the loop entry */
4092  ".L10322: \n\t"
4093  /* --- */
4094  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the image first row */
4095  "add %%eax, %%esi \n\t" /* move one row below */
4096  "movq (%%esi), %%mm2 \n\t" /* load 8 bytes of the image second row */
4097  "add %%eax, %%esi \n\t" /* move one row below */
4098  "movq (%%esi), %%mm3 \n\t" /* load 8 bytes of the image third row */
4099  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
4100  "punpcklbw %%mm0, %%mm2 \n\t" /* unpack first 4 bytes into words */
4101  "punpcklbw %%mm0, %%mm3 \n\t" /* unpack first 4 bytes into words */
4102  "pmullw %%mm5, %%mm1 \n\t" /* multiply words first row image*Kernel */
4103  "pmullw %%mm6, %%mm2 \n\t" /* multiply words second row image*Kernel */
4104  "pmullw %%mm7, %%mm3 \n\t" /* multiply words third row image*Kernel */
4105  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the first and second rows */
4106  "paddsw %%mm3, %%mm1 \n\t" /* add 4 words of the third row and result */
4107  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
4108  "psrlq $32, %%mm1 \n\t" /* shift 2 left words to the right */
4109  "paddsw %%mm2, %%mm1 \n\t" /* add 2 left and 2 right result words */
4110  "movq %%mm1, %%mm3 \n\t" /* copy MM1 into MM3 */
4111  "psrlq $16, %%mm1 \n\t" /* shift 1 left word to the right */
4112  "paddsw %%mm3, %%mm1 \n\t" /* add 1 left and 1 right result words */
4113  /* -- */
4114  "movd %%eax, %%mm2 \n\t" /* save EAX in MM2 */
4115  "movd %%edx, %%mm3 \n\t" /* save EDX in MM3 */
4116  "movd %%mm1, %%eax \n\t" /* copy MM1 into EAX */
4117  "psraw $15, %%mm1 \n\t" /* spread sign bit of the result */
4118  "movd %%mm1, %%edx \n\t" /* fill EDX with a sign bit */
4119  "idivw %%bx \n\t" /* IDIV - VERY EXPENSIVE */
4120  "movd %%eax, %%mm1 \n\t" /* move result of division into MM1 */
4121  "packuswb %%mm0, %%mm1 \n\t" /* pack division result with saturation */
4122  "movd %%mm1, %%eax \n\t" /* copy saturated result into EAX */
4123  "mov %%al, (%%edi) \n\t" /* copy a byte result into Dest */
4124  "movd %%mm3, %%edx \n\t" /* restore saved EDX */
4125  "movd %%mm2, %%eax \n\t" /* restore saved EAX */
4126  /* -- */
4127  "sub %%eax, %%esi \n\t" /* move two rows up */
4128  "sub %%eax, %%esi \n\t" /* */
4129  "inc %%esi \n\t" /* move Src pointer to the next pixel */
4130  "inc %%edi \n\t" /* move Dest pointer to the next pixel */
4131  /* --- */
4132  "dec %%ecx \n\t" /* decrease loop counter COLUMNS */
4133  "jnz .L10322 \n\t" /* check loop termination, proceed if required */
4134  "add $2, %%esi \n\t" /* move to the next row in Src */
4135  "add $2, %%edi \n\t" /* move to the next row in Dest */
4136  "dec %%edx \n\t" /* decrease loop counter ROWS */
4137  "jnz .L10320 \n\t" /* check loop termination, proceed if required */
4138  /* --- */
4139  "emms \n\t" /* exit MMX state */
4140  "popa \n\t":"=m" (Dest) /* %0 */
4141  :"m"(Src), /* %1 */
4142  "m"(rows), /* %2 */
4143  "m"(columns), /* %3 */
4144  "m"(Kernel), /* %4 */
4145  "m"(Divisor) /* %5 */
4146  );
4147 #endif
4148 #endif
4149  return (0);
4150  } else {
4151  /* No non-MMX implementation yet */
4152  return (-1);
4153  }
4154 }
4155 
4170 int SDL_imageFilterConvolveKernel5x5Divide(unsigned char *Src, unsigned char *Dest, int rows, int columns,
4171  signed short *Kernel, unsigned char Divisor)
4172 {
4173  /* Validate input parameters */
4174  if ((Src == NULL) || (Dest == NULL) || (Kernel == NULL))
4175  return(-1);
4176 
4177  if ((columns < 5) || (rows < 5) || (Divisor == 0))
4178  return (-1);
4179 
4180  if ((SDL_imageFilterMMXdetect())) {
4181 //#ifdef USE_MMX
4182 #if defined(USE_MMX) && defined(i386)
4183 #if !defined(GCC__)
4184  __asm
4185  {
4186  pusha
4187  pxor mm0, mm0 /* zero MM0 */
4188  xor ebx, ebx /* zero EBX */
4189  mov bl, Divisor /* load Divisor into BL */
4190  movd mm5, ebx /* copy Divisor into MM5 */
4191  mov edx, Kernel /* load Kernel address into EDX */
4192  mov esi, Src /* load Src address to ESI */
4193  mov edi, Dest /* load Dest address to EDI */
4194  add edi, 2 /* 2 column offset from the left edge */
4195  mov eax, columns /* load columns into EAX */
4196  shl eax, 1 /* EAX = columns * 2 */
4197  add edi, eax /* 2 row offset from the top edge */
4198  shr eax, 1 /* EAX = columns */
4199  mov ebx, rows /* initialize ROWS counter */
4200  sub ebx, 4 /* do not use first 2 and last 2 rows */
4201  /* ---, */
4202 L10330:
4203  mov ecx, eax /* initialize COLUMNS counter */
4204  sub ecx, 4 /* do not use first 2 and last 2 columns */
4205  align 16 /* 16 byte alignment of the loop entry */
4206 L10332:
4207  pxor mm7, mm7 /* zero MM7 (accumulator) */
4208  movd mm6, esi /* save ESI in MM6 */
4209  /* --- 1 */
4210  movq mm1, [esi] /* load 8 bytes of the Src */
4211  movq mm2, mm1 /* copy MM1 into MM2 */
4212  add esi, eax /* move Src pointer 1 row below */
4213  movq mm3, [edx] /* load 4 words of Kernel */
4214  add edx, 8 /* move pointer to other 4 words */
4215  movq mm4, [edx] /* load 4 words of Kernel */
4216  add edx, 8 /* move pointer to other 4 words */
4217  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
4218  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
4219  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
4220  pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */
4221  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
4222  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
4223  /* --- 2 */
4224  movq mm1, [esi] /* load 8 bytes of the Src */
4225  movq mm2, mm1 /* copy MM1 into MM2 */
4226  add esi, eax /* move Src pointer 1 row below */
4227  movq mm3, [edx] /* load 4 words of Kernel */
4228  add edx, 8 /* move pointer to other 4 words */
4229  movq mm4, [edx] /* load 4 words of Kernel */
4230  add edx, 8 /* move pointer to other 4 words */
4231  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
4232  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
4233  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
4234  pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */
4235  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
4236  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
4237  /* --- 3 */
4238  movq mm1, [esi] /* load 8 bytes of the Src */
4239  movq mm2, mm1 /* copy MM1 into MM2 */
4240  add esi, eax /* move Src pointer 1 row below */
4241  movq mm3, [edx] /* load 4 words of Kernel */
4242  add edx, 8 /* move pointer to other 4 words */
4243  movq mm4, [edx] /* load 4 words of Kernel */
4244  add edx, 8 /* move pointer to other 4 words */
4245  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
4246  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
4247  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
4248  pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */
4249  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
4250  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
4251  /* --- 4 */
4252  movq mm1, [esi] /* load 8 bytes of the Src */
4253  movq mm2, mm1 /* copy MM1 into MM2 */
4254  add esi, eax /* move Src pointer 1 row below */
4255  movq mm3, [edx] /* load 4 words of Kernel */
4256  add edx, 8 /* move pointer to other 4 words */
4257  movq mm4, [edx] /* load 4 words of Kernel */
4258  add edx, 8 /* move pointer to other 4 words */
4259  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
4260  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
4261  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
4262  pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */
4263  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
4264  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
4265  /* --- 5 */
4266  movq mm1, [esi] /* load 8 bytes of the Src */
4267  movq mm2, mm1 /* copy MM1 into MM2 */
4268  movq mm3, [edx] /* load 4 words of Kernel */
4269  add edx, 8 /* move pointer to other 4 words */
4270  movq mm4, [edx] /* load 4 words of Kernel */
4271  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
4272  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
4273  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
4274  pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */
4275  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
4276  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
4277  /* ---, */
4278  movq mm3, mm7 /* copy MM7 into MM3 */
4279  psrlq mm7, 32 /* shift 2 left words to the right */
4280  paddsw mm7, mm3 /* add 2 left and 2 right result words */
4281  movq mm2, mm7 /* copy MM7 into MM2 */
4282  psrlq mm7, 16 /* shift 1 left word to the right */
4283  paddsw mm7, mm2 /* add 1 left and 1 right result words */
4284  /* ---, */
4285  movd mm1, eax /* save EDX in MM1 */
4286  movd mm2, ebx /* save EDX in MM2 */
4287  movd mm3, edx /* save EDX in MM3 */
4288  movd eax, mm7 /* load summation result into EAX */
4289  psraw mm7, 15 /* spread sign bit of the result */
4290  movd ebx, mm5 /* load Divisor into EBX */
4291  movd edx, mm7 /* fill EDX with a sign bit */
4292  idiv bx /* IDIV - VERY EXPENSIVE */
4293  movd mm7, eax /* move result of division into MM7 */
4294  packuswb mm7, mm0 /* pack division result with saturation */
4295  movd eax, mm7 /* copy saturated result into EAX */
4296  mov [edi], al /* copy a byte result into Dest */
4297  movd edx, mm3 /* restore saved EDX */
4298  movd ebx, mm2 /* restore saved EBX */
4299  movd eax, mm1 /* restore saved EAX */
4300  /* --, */
4301  movd esi, mm6 /* move Src pointer to the top pixel */
4302  sub edx, 72 /* EDX = Kernel address */
4303  inc esi /* move Src pointer to the next pixel */
4304  inc edi /* move Dest pointer to the next pixel */
4305  /* ---, */
4306  dec ecx /* decrease loop counter COLUMNS */
4307  jnz L10332 /* check loop termination, proceed if required */
4308  add esi, 4 /* move to the next row in Src */
4309  add edi, 4 /* move to the next row in Dest */
4310  dec ebx /* decrease loop counter ROWS */
4311  jnz L10330 /* check loop termination, proceed if required */
4312  /* ---, */
4313  emms /* exit MMX state */
4314  popa
4315  }
4316 #else
4317  asm volatile
4318  ("pusha \n\t" "pxor %%mm0, %%mm0 \n\t" /* zero MM0 */
4319  "xor %%ebx, %%ebx \n\t" /* zero EBX */
4320  "mov %5, %%bl \n\t" /* load Divisor into BL */
4321  "movd %%ebx, %%mm5 \n\t" /* copy Divisor into MM5 */
4322  "mov %4, %%edx \n\t" /* load Kernel address into EDX */
4323  "mov %1, %%esi \n\t" /* load Src address to ESI */
4324  "mov %0, %%edi \n\t" /* load Dest address to EDI */
4325  "add $2, %%edi \n\t" /* 2 column offset from the left edge */
4326  "mov %3, %%eax \n\t" /* load columns into EAX */
4327  "shl $1, %%eax \n\t" /* EAX = columns * 2 */
4328  "add %%eax, %%edi \n\t" /* 2 row offset from the top edge */
4329  "shr $1, %%eax \n\t" /* EAX = columns */
4330  "mov %2, %%ebx \n\t" /* initialize ROWS counter */
4331  "sub $4, %%ebx \n\t" /* do not use first 2 and last 2 rows */
4332  /* --- */
4333  ".L10330: \n\t" "mov %%eax, %%ecx \n\t" /* initialize COLUMNS counter */
4334  "sub $4, %%ecx \n\t" /* do not use first 2 and last 2 columns */
4335  ".align 16 \n\t" /* 16 byte alignment of the loop entry */
4336  ".L10332: \n\t" "pxor %%mm7, %%mm7 \n\t" /* zero MM7 (accumulator) */
4337  "movd %%esi, %%mm6 \n\t" /* save ESI in MM6 */
4338  /* --- 1 */
4339  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
4340  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
4341  "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
4342  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
4343  "add $8, %%edx \n\t" /* move pointer to other 4 words */
4344  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
4345  "add $8, %%edx \n\t" /* move pointer to other 4 words */
4346  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
4347  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
4348  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
4349  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
4350  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
4351  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
4352  /* --- 2 */
4353  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
4354  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
4355  "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
4356  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
4357  "add $8, %%edx \n\t" /* move pointer to other 4 words */
4358  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
4359  "add $8, %%edx \n\t" /* move pointer to other 4 words */
4360  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
4361  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
4362  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
4363  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
4364  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
4365  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
4366  /* --- 3 */
4367  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
4368  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
4369  "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
4370  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
4371  "add $8, %%edx \n\t" /* move pointer to other 4 words */
4372  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
4373  "add $8, %%edx \n\t" /* move pointer to other 4 words */
4374  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
4375  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
4376  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
4377  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
4378  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
4379  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
4380  /* --- 4 */
4381  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
4382  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
4383  "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
4384  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
4385  "add $8, %%edx \n\t" /* move pointer to other 4 words */
4386  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
4387  "add $8, %%edx \n\t" /* move pointer to other 4 words */
4388  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
4389  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
4390  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
4391  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
4392  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
4393  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
4394  /* --- 5 */
4395  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
4396  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
4397  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
4398  "add $8, %%edx \n\t" /* move pointer to other 4 words */
4399  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
4400  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
4401  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
4402  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
4403  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
4404  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
4405  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
4406  /* --- */
4407  "movq %%mm7, %%mm3 \n\t" /* copy MM7 into MM3 */
4408  "psrlq $32, %%mm7 \n\t" /* shift 2 left words to the right */
4409  "paddsw %%mm3, %%mm7 \n\t" /* add 2 left and 2 right result words */
4410  "movq %%mm7, %%mm2 \n\t" /* copy MM7 into MM2 */
4411  "psrlq $16, %%mm7 \n\t" /* shift 1 left word to the right */
4412  "paddsw %%mm2, %%mm7 \n\t" /* add 1 left and 1 right result words */
4413  /* --- */
4414  "movd %%eax, %%mm1 \n\t" /* save EDX in MM1 */
4415  "movd %%ebx, %%mm2 \n\t" /* save EDX in MM2 */
4416  "movd %%edx, %%mm3 \n\t" /* save EDX in MM3 */
4417  "movd %%mm7, %%eax \n\t" /* load summation result into EAX */
4418  "psraw $15, %%mm7 \n\t" /* spread sign bit of the result */
4419  "movd %%mm5, %%ebx \n\t" /* load Divisor into EBX */
4420  "movd %%mm7, %%edx \n\t" /* fill EDX with a sign bit */
4421  "idivw %%bx \n\t" /* IDIV - VERY EXPENSIVE */
4422  "movd %%eax, %%mm7 \n\t" /* move result of division into MM7 */
4423  "packuswb %%mm0, %%mm7 \n\t" /* pack division result with saturation */
4424  "movd %%mm7, %%eax \n\t" /* copy saturated result into EAX */
4425  "mov %%al, (%%edi) \n\t" /* copy a byte result into Dest */
4426  "movd %%mm3, %%edx \n\t" /* restore saved EDX */
4427  "movd %%mm2, %%ebx \n\t" /* restore saved EBX */
4428  "movd %%mm1, %%eax \n\t" /* restore saved EAX */
4429  /* -- */
4430  "movd %%mm6, %%esi \n\t" /* move Src pointer to the top pixel */
4431  "sub $72, %%edx \n\t" /* EDX = Kernel address */
4432  "inc %%esi \n\t" /* move Src pointer to the next pixel */
4433  "inc %%edi \n\t" /* move Dest pointer to the next pixel */
4434  /* --- */
4435  "dec %%ecx \n\t" /* decrease loop counter COLUMNS */
4436  "jnz .L10332 \n\t" /* check loop termination, proceed if required */
4437  "add $4, %%esi \n\t" /* move to the next row in Src */
4438  "add $4, %%edi \n\t" /* move to the next row in Dest */
4439  "dec %%ebx \n\t" /* decrease loop counter ROWS */
4440  "jnz .L10330 \n\t" /* check loop termination, proceed if required */
4441  /* --- */
4442  "emms \n\t" /* exit MMX state */
4443  "popa \n\t":"=m" (Dest) /* %0 */
4444  :"m"(Src), /* %1 */
4445  "m"(rows), /* %2 */
4446  "m"(columns), /* %3 */
4447  "m"(Kernel), /* %4 */
4448  "m"(Divisor) /* %5 */
4449  );
4450 #endif
4451 #endif
4452  return (0);
4453  } else {
4454  /* No non-MMX implementation yet */
4455  return (-1);
4456  }
4457 }
4458 
4473 int SDL_imageFilterConvolveKernel7x7Divide(unsigned char *Src, unsigned char *Dest, int rows, int columns,
4474  signed short *Kernel, unsigned char Divisor)
4475 {
4476  /* Validate input parameters */
4477  if ((Src == NULL) || (Dest == NULL) || (Kernel == NULL))
4478  return(-1);
4479 
4480  if ((columns < 7) || (rows < 7) || (Divisor == 0))
4481  return (-1);
4482 
4483  if ((SDL_imageFilterMMXdetect())) {
4484 //#ifdef USE_MMX
4485 #if defined(USE_MMX) && defined(i386)
4486 #if !defined(GCC__)
4487  __asm
4488  {
4489  pusha
4490  pxor mm0, mm0 /* zero MM0 */
4491  xor ebx, ebx /* zero EBX */
4492  mov bl, Divisor /* load Divisor into BL */
4493  movd mm5, ebx /* copy Divisor into MM5 */
4494  mov edx, Kernel /* load Kernel address into EDX */
4495  mov esi, Src /* load Src address to ESI */
4496  mov edi, Dest /* load Dest address to EDI */
4497  add edi, 3 /* 3 column offset from the left edge */
4498  mov eax, columns /* load columns into EAX */
4499  add edi, eax /* 3 row offset from the top edge */
4500  add edi, eax
4501  add edi, eax
4502  mov ebx, rows /* initialize ROWS counter */
4503  sub ebx, 6 /* do not use first 3 and last 3 rows */
4504  /* ---, */
4505 L10340:
4506  mov ecx, eax /* initialize COLUMNS counter */
4507  sub ecx, 6 /* do not use first 3 and last 3 columns */
4508  align 16 /* 16 byte alignment of the loop entry */
4509 L10342:
4510  pxor mm7, mm7 /* zero MM7 (accumulator) */
4511  movd mm6, esi /* save ESI in MM6 */
4512  /* --- 1 */
4513  movq mm1, [esi] /* load 8 bytes of the Src */
4514  movq mm2, mm1 /* copy MM1 into MM2 */
4515  add esi, eax /* move Src pointer 1 row below */
4516  movq mm3, [edx] /* load 4 words of Kernel */
4517  add edx, 8 /* move pointer to other 4 words */
4518  movq mm4, [edx] /* load 4 words of Kernel */
4519  add edx, 8 /* move pointer to other 4 words */
4520  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
4521  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
4522  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
4523  pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */
4524  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
4525  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
4526  /* --- 2 */
4527  movq mm1, [esi] /* load 8 bytes of the Src */
4528  movq mm2, mm1 /* copy MM1 into MM2 */
4529  add esi, eax /* move Src pointer 1 row below */
4530  movq mm3, [edx] /* load 4 words of Kernel */
4531  add edx, 8 /* move pointer to other 4 words */
4532  movq mm4, [edx] /* load 4 words of Kernel */
4533  add edx, 8 /* move pointer to other 4 words */
4534  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
4535  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
4536  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
4537  pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */
4538  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
4539  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
4540  /* --- 3 */
4541  movq mm1, [esi] /* load 8 bytes of the Src */
4542  movq mm2, mm1 /* copy MM1 into MM2 */
4543  add esi, eax /* move Src pointer 1 row below */
4544  movq mm3, [edx] /* load 4 words of Kernel */
4545  add edx, 8 /* move pointer to other 4 words */
4546  movq mm4, [edx] /* load 4 words of Kernel */
4547  add edx, 8 /* move pointer to other 4 words */
4548  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
4549  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
4550  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
4551  pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */
4552  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
4553  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
4554  /* --- 4 */
4555  movq mm1, [esi] /* load 8 bytes of the Src */
4556  movq mm2, mm1 /* copy MM1 into MM2 */
4557  add esi, eax /* move Src pointer 1 row below */
4558  movq mm3, [edx] /* load 4 words of Kernel */
4559  add edx, 8 /* move pointer to other 4 words */
4560  movq mm4, [edx] /* load 4 words of Kernel */
4561  add edx, 8 /* move pointer to other 4 words */
4562  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
4563  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
4564  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
4565  pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */
4566  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
4567  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
4568  /* --- 5 */
4569  movq mm1, [esi] /* load 8 bytes of the Src */
4570  movq mm2, mm1 /* copy MM1 into MM2 */
4571  add esi, eax /* move Src pointer 1 row below */
4572  movq mm3, [edx] /* load 4 words of Kernel */
4573  add edx, 8 /* move pointer to other 4 words */
4574  movq mm4, [edx] /* load 4 words of Kernel */
4575  add edx, 8 /* move pointer to other 4 words */
4576  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
4577  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
4578  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
4579  pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */
4580  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
4581  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
4582  /* --- 6 */
4583  movq mm1, [esi] /* load 8 bytes of the Src */
4584  movq mm2, mm1 /* copy MM1 into MM2 */
4585  add esi, eax /* move Src pointer 1 row below */
4586  movq mm3, [edx] /* load 4 words of Kernel */
4587  add edx, 8 /* move pointer to other 4 words */
4588  movq mm4, [edx] /* load 4 words of Kernel */
4589  add edx, 8 /* move pointer to other 4 words */
4590  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
4591  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
4592  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
4593  pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */
4594  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
4595  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
4596  /* --- 7 */
4597  movq mm1, [esi] /* load 8 bytes of the Src */
4598  movq mm2, mm1 /* copy MM1 into MM2 */
4599  movq mm3, [edx] /* load 4 words of Kernel */
4600  add edx, 8 /* move pointer to other 4 words */
4601  movq mm4, [edx] /* load 4 words of Kernel */
4602  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
4603  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
4604  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
4605  pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */
4606  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
4607  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
4608  /* ---, */
4609  movq mm3, mm7 /* copy MM7 into MM3 */
4610  psrlq mm7, 32 /* shift 2 left words to the right */
4611  paddsw mm7, mm3 /* add 2 left and 2 right result words */
4612  movq mm2, mm7 /* copy MM7 into MM2 */
4613  psrlq mm7, 16 /* shift 1 left word to the right */
4614  paddsw mm7, mm2 /* add 1 left and 1 right result words */
4615  /* ---, */
4616  movd mm1, eax /* save EDX in MM1 */
4617  movd mm2, ebx /* save EDX in MM2 */
4618  movd mm3, edx /* save EDX in MM3 */
4619  movd eax, mm7 /* load summation result into EAX */
4620  psraw mm7, 15 /* spread sign bit of the result */
4621  movd ebx, mm5 /* load Divisor into EBX */
4622  movd edx, mm7 /* fill EDX with a sign bit */
4623  idiv bx /* IDIV - VERY EXPENSIVE */
4624  movd mm7, eax /* move result of division into MM7 */
4625  packuswb mm7, mm0 /* pack division result with saturation */
4626  movd eax, mm7 /* copy saturated result into EAX */
4627  mov [edi], al /* copy a byte result into Dest */
4628  movd edx, mm3 /* restore saved EDX */
4629  movd ebx, mm2 /* restore saved EBX */
4630  movd eax, mm1 /* restore saved EAX */
4631  /* --, */
4632  movd esi, mm6 /* move Src pointer to the top pixel */
4633  sub edx, 104 /* EDX = Kernel address */
4634  inc esi /* move Src pointer to the next pixel */
4635  inc edi /* move Dest pointer to the next pixel */
4636  /* ---, */
4637  dec ecx /* decrease loop counter COLUMNS */
4638  jnz L10342 /* check loop termination, proceed if required */
4639  add esi, 6 /* move to the next row in Src */
4640  add edi, 6 /* move to the next row in Dest */
4641  dec ebx /* decrease loop counter ROWS */
4642  jnz L10340 /* check loop termination, proceed if required */
4643  /* ---, */
4644  emms /* exit MMX state */
4645  popa
4646  }
4647 #else
4648  asm volatile
4649  ("pusha \n\t" "pxor %%mm0, %%mm0 \n\t" /* zero MM0 */
4650  "xor %%ebx, %%ebx \n\t" /* zero EBX */
4651  "mov %5, %%bl \n\t" /* load Divisor into BL */
4652  "movd %%ebx, %%mm5 \n\t" /* copy Divisor into MM5 */
4653  "mov %4, %%edx \n\t" /* load Kernel address into EDX */
4654  "mov %1, %%esi \n\t" /* load Src address to ESI */
4655  "mov %0, %%edi \n\t" /* load Dest address to EDI */
4656  "add $3, %%edi \n\t" /* 3 column offset from the left edge */
4657  "mov %3, %%eax \n\t" /* load columns into EAX */
4658  "add %%eax, %%edi \n\t" /* 3 row offset from the top edge */
4659  "add %%eax, %%edi \n\t" "add %%eax, %%edi \n\t" "mov %2, %%ebx \n\t" /* initialize ROWS counter */
4660  "sub $6, %%ebx \n\t" /* do not use first 3 and last 3 rows */
4661  /* --- */
4662  ".L10340: \n\t" "mov %%eax, %%ecx \n\t" /* initialize COLUMNS counter */
4663  "sub $6, %%ecx \n\t" /* do not use first 3 and last 3 columns */
4664  ".align 16 \n\t" /* 16 byte alignment of the loop entry */
4665  ".L10342: \n\t" "pxor %%mm7, %%mm7 \n\t" /* zero MM7 (accumulator) */
4666  "movd %%esi, %%mm6 \n\t" /* save ESI in MM6 */
4667  /* --- 1 */
4668  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
4669  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
4670  "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
4671  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
4672  "add $8, %%edx \n\t" /* move pointer to other 4 words */
4673  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
4674  "add $8, %%edx \n\t" /* move pointer to other 4 words */
4675  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
4676  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
4677  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
4678  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
4679  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
4680  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
4681  /* --- 2 */
4682  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
4683  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
4684  "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
4685  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
4686  "add $8, %%edx \n\t" /* move pointer to other 4 words */
4687  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
4688  "add $8, %%edx \n\t" /* move pointer to other 4 words */
4689  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
4690  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
4691  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
4692  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
4693  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
4694  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
4695  /* --- 3 */
4696  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
4697  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
4698  "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
4699  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
4700  "add $8, %%edx \n\t" /* move pointer to other 4 words */
4701  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
4702  "add $8, %%edx \n\t" /* move pointer to other 4 words */
4703  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
4704  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
4705  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
4706  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
4707  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
4708  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
4709  /* --- 4 */
4710  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
4711  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
4712  "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
4713  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
4714  "add $8, %%edx \n\t" /* move pointer to other 4 words */
4715  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
4716  "add $8, %%edx \n\t" /* move pointer to other 4 words */
4717  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
4718  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
4719  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
4720  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
4721  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
4722  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
4723  /* --- 5 */
4724  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
4725  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
4726  "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
4727  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
4728  "add $8, %%edx \n\t" /* move pointer to other 4 words */
4729  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
4730  "add $8, %%edx \n\t" /* move pointer to other 4 words */
4731  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
4732  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
4733  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
4734  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
4735  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
4736  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
4737  /* --- 6 */
4738  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
4739  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
4740  "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
4741  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
4742  "add $8, %%edx \n\t" /* move pointer to other 4 words */
4743  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
4744  "add $8, %%edx \n\t" /* move pointer to other 4 words */
4745  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
4746  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
4747  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
4748  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
4749  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
4750  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
4751  /* --- 7 */
4752  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
4753  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
4754  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
4755  "add $8, %%edx \n\t" /* move pointer to other 4 words */
4756  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
4757  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
4758  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
4759  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
4760  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
4761  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
4762  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
4763  /* --- */
4764  "movq %%mm7, %%mm3 \n\t" /* copy MM7 into MM3 */
4765  "psrlq $32, %%mm7 \n\t" /* shift 2 left words to the right */
4766  "paddsw %%mm3, %%mm7 \n\t" /* add 2 left and 2 right result words */
4767  "movq %%mm7, %%mm2 \n\t" /* copy MM7 into MM2 */
4768  "psrlq $16, %%mm7 \n\t" /* shift 1 left word to the right */
4769  "paddsw %%mm2, %%mm7 \n\t" /* add 1 left and 1 right result words */
4770  /* --- */
4771  "movd %%eax, %%mm1 \n\t" /* save EDX in MM1 */
4772  "movd %%ebx, %%mm2 \n\t" /* save EDX in MM2 */
4773  "movd %%edx, %%mm3 \n\t" /* save EDX in MM3 */
4774  "movd %%mm7, %%eax \n\t" /* load summation result into EAX */
4775  "psraw $15, %%mm7 \n\t" /* spread sign bit of the result */
4776  "movd %%mm5, %%ebx \n\t" /* load Divisor into EBX */
4777  "movd %%mm7, %%edx \n\t" /* fill EDX with a sign bit */
4778  "idivw %%bx \n\t" /* IDIV - VERY EXPENSIVE */
4779  "movd %%eax, %%mm7 \n\t" /* move result of division into MM7 */
4780  "packuswb %%mm0, %%mm7 \n\t" /* pack division result with saturation */
4781  "movd %%mm7, %%eax \n\t" /* copy saturated result into EAX */
4782  "mov %%al, (%%edi) \n\t" /* copy a byte result into Dest */
4783  "movd %%mm3, %%edx \n\t" /* restore saved EDX */
4784  "movd %%mm2, %%ebx \n\t" /* restore saved EBX */
4785  "movd %%mm1, %%eax \n\t" /* restore saved EAX */
4786  /* -- */
4787  "movd %%mm6, %%esi \n\t" /* move Src pointer to the top pixel */
4788  "sub $104, %%edx \n\t" /* EDX = Kernel address */
4789  "inc %%esi \n\t" /* move Src pointer to the next pixel */
4790  "inc %%edi \n\t" /* move Dest pointer to the next pixel */
4791  /* --- */
4792  "dec %%ecx \n\t" /* decrease loop counter COLUMNS */
4793  "jnz .L10342 \n\t" /* check loop termination, proceed if required */
4794  "add $6, %%esi \n\t" /* move to the next row in Src */
4795  "add $6, %%edi \n\t" /* move to the next row in Dest */
4796  "dec %%ebx \n\t" /* decrease loop counter ROWS */
4797  "jnz .L10340 \n\t" /* check loop termination, proceed if required */
4798  /* --- */
4799  "emms \n\t" /* exit MMX state */
4800  "popa \n\t":"=m" (Dest) /* %0 */
4801  :"m"(Src), /* %1 */
4802  "m"(rows), /* %2 */
4803  "m"(columns), /* %3 */
4804  "m"(Kernel), /* %4 */
4805  "m"(Divisor) /* %5 */
4806  );
4807 #endif
4808 #endif
4809  return (0);
4810  } else {
4811  /* No non-MMX implementation yet */
4812  return (-1);
4813  }
4814 }
4815 
4830 int SDL_imageFilterConvolveKernel9x9Divide(unsigned char *Src, unsigned char *Dest, int rows, int columns,
4831  signed short *Kernel, unsigned char Divisor)
4832 {
4833  /* Validate input parameters */
4834  if ((Src == NULL) || (Dest == NULL) || (Kernel == NULL))
4835  return(-1);
4836 
4837  if ((columns < 9) || (rows < 9) || (Divisor == 0))
4838  return (-1);
4839 
4840  if ((SDL_imageFilterMMXdetect())) {
4841 //#ifdef USE_MMX
4842 #if defined(USE_MMX) && defined(i386)
4843 #if !defined(GCC__)
4844  __asm
4845  {
4846  pusha
4847  pxor mm0, mm0 /* zero MM0 */
4848  xor ebx, ebx /* zero EBX */
4849  mov bl, Divisor /* load Divisor into BL */
4850  movd mm5, ebx /* copy Divisor into MM5 */
4851  mov edx, Kernel /* load Kernel address into EDX */
4852  mov esi, Src /* load Src address to ESI */
4853  mov edi, Dest /* load Dest address to EDI */
4854  add edi, 4 /* 4 column offset from the left edge */
4855  mov eax, columns /* load columns into EAX */
4856  add edi, eax /* 4 row offset from the top edge */
4857  add edi, eax
4858  add edi, eax
4859  add edi, eax
4860  mov ebx, rows /* initialize ROWS counter */
4861  sub ebx, 8 /* do not use first 4 and last 4 rows */
4862  /* ---, */
4863 L10350:
4864  mov ecx, eax /* initialize COLUMNS counter */
4865  sub ecx, 8 /* do not use first 4 and last 4 columns */
4866  align 16 /* 16 byte alignment of the loop entry */
4867 L10352:
4868  pxor mm7, mm7 /* zero MM7 (accumulator) */
4869  movd mm6, esi /* save ESI in MM6 */
4870  /* --- 1 */
4871  movq mm1, [esi] /* load 8 bytes of the Src */
4872  movq mm2, mm1 /* copy MM1 into MM2 */
4873  inc esi /* move pointer to the next 8 bytes of Src */
4874  movq mm3, [edx] /* load 4 words of Kernel */
4875  add edx, 8 /* move pointer to other 4 words */
4876  movq mm4, [edx] /* load 4 words of Kernel */
4877  add edx, 8 /* move pointer to other 4 words */
4878  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
4879  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
4880  pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */
4881  pmullw mm2, mm4 /* mult. 4 high words of Src and Kernel */
4882  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
4883  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
4884  movq mm1, [esi] /* load 8 bytes of the Src */
4885  dec esi
4886  add esi, eax /* move Src pointer 1 row below */
4887  movq mm3, [edx] /* load 4 words of Kernel */
4888  add edx, 8 /* move pointer to other 4 words */
4889  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
4890  pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */
4891  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
4892  /* --- 2 */
4893  movq mm1, [esi] /* load 8 bytes of the Src */
4894  movq mm2, mm1 /* copy MM1 into MM2 */
4895  inc esi /* move pointer to the next 8 bytes of Src */
4896  movq mm3, [edx] /* load 4 words of Kernel */
4897  add edx, 8 /* move pointer to other 4 words */
4898  movq mm4, [edx] /* load 4 words of Kernel */
4899  add edx, 8 /* move pointer to other 4 words */
4900  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
4901  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
4902  pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */
4903  pmullw mm2, mm4 /* mult. 4 high words of Src and Kernel */
4904  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
4905  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
4906  movq mm1, [esi] /* load 8 bytes of the Src */
4907  dec esi
4908  add esi, eax /* move Src pointer 1 row below */
4909  movq mm3, [edx] /* load 4 words of Kernel */
4910  add edx, 8 /* move pointer to other 4 words */
4911  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
4912  pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */
4913  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
4914  /* --- 3 */
4915  movq mm1, [esi] /* load 8 bytes of the Src */
4916  movq mm2, mm1 /* copy MM1 into MM2 */
4917  inc esi /* move pointer to the next 8 bytes of Src */
4918  movq mm3, [edx] /* load 4 words of Kernel */
4919  add edx, 8 /* move pointer to other 4 words */
4920  movq mm4, [edx] /* load 4 words of Kernel */
4921  add edx, 8 /* move pointer to other 4 words */
4922  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
4923  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
4924  pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */
4925  pmullw mm2, mm4 /* mult. 4 high words of Src and Kernel */
4926  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
4927  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
4928  movq mm1, [esi] /* load 8 bytes of the Src */
4929  dec esi
4930  add esi, eax /* move Src pointer 1 row below */
4931  movq mm3, [edx] /* load 4 words of Kernel */
4932  add edx, 8 /* move pointer to other 4 words */
4933  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
4934  pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */
4935  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
4936  /* --- 4 */
4937  movq mm1, [esi] /* load 8 bytes of the Src */
4938  movq mm2, mm1 /* copy MM1 into MM2 */
4939  inc esi /* move pointer to the next 8 bytes of Src */
4940  movq mm3, [edx] /* load 4 words of Kernel */
4941  add edx, 8 /* move pointer to other 4 words */
4942  movq mm4, [edx] /* load 4 words of Kernel */
4943  add edx, 8 /* move pointer to other 4 words */
4944  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
4945  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
4946  pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */
4947  pmullw mm2, mm4 /* mult. 4 high words of Src and Kernel */
4948  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
4949  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
4950  movq mm1, [esi] /* load 8 bytes of the Src */
4951  dec esi
4952  add esi, eax /* move Src pointer 1 row below */
4953  movq mm3, [edx] /* load 4 words of Kernel */
4954  add edx, 8 /* move pointer to other 4 words */
4955  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
4956  pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */
4957  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
4958  /* --- 5 */
4959  movq mm1, [esi] /* load 8 bytes of the Src */
4960  movq mm2, mm1 /* copy MM1 into MM2 */
4961  inc esi /* move pointer to the next 8 bytes of Src */
4962  movq mm3, [edx] /* load 4 words of Kernel */
4963  add edx, 8 /* move pointer to other 4 words */
4964  movq mm4, [edx] /* load 4 words of Kernel */
4965  add edx, 8 /* move pointer to other 4 words */
4966  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
4967  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
4968  pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */
4969  pmullw mm2, mm4 /* mult. 4 high words of Src and Kernel */
4970  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
4971  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
4972  movq mm1, [esi] /* load 8 bytes of the Src */
4973  dec esi
4974  add esi, eax /* move Src pointer 1 row below */
4975  movq mm3, [edx] /* load 4 words of Kernel */
4976  add edx, 8 /* move pointer to other 4 words */
4977  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
4978  pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */
4979  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
4980  /* --- 6 */
4981  movq mm1, [esi] /* load 8 bytes of the Src */
4982  movq mm2, mm1 /* copy MM1 into MM2 */
4983  inc esi /* move pointer to the next 8 bytes of Src */
4984  movq mm3, [edx] /* load 4 words of Kernel */
4985  add edx, 8 /* move pointer to other 4 words */
4986  movq mm4, [edx] /* load 4 words of Kernel */
4987  add edx, 8 /* move pointer to other 4 words */
4988  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
4989  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
4990  pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */
4991  pmullw mm2, mm4 /* mult. 4 high words of Src and Kernel */
4992  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
4993  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
4994  movq mm1, [esi] /* load 8 bytes of the Src */
4995  dec esi
4996  add esi, eax /* move Src pointer 1 row below */
4997  movq mm3, [edx] /* load 4 words of Kernel */
4998  add edx, 8 /* move pointer to other 4 words */
4999  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
5000  pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */
5001  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
5002  /* --- 7 */
5003  movq mm1, [esi] /* load 8 bytes of the Src */
5004  movq mm2, mm1 /* copy MM1 into MM2 */
5005  inc esi /* move pointer to the next 8 bytes of Src */
5006  movq mm3, [edx] /* load 4 words of Kernel */
5007  add edx, 8 /* move pointer to other 4 words */
5008  movq mm4, [edx] /* load 4 words of Kernel */
5009  add edx, 8 /* move pointer to other 4 words */
5010  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
5011  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
5012  pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */
5013  pmullw mm2, mm4 /* mult. 4 high words of Src and Kernel */
5014  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
5015  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
5016  movq mm1, [esi] /* load 8 bytes of the Src */
5017  dec esi
5018  add esi, eax /* move Src pointer 1 row below */
5019  movq mm3, [edx] /* load 4 words of Kernel */
5020  add edx, 8 /* move pointer to other 4 words */
5021  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
5022  pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */
5023  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
5024  /* --- 8 */
5025  movq mm1, [esi] /* load 8 bytes of the Src */
5026  movq mm2, mm1 /* copy MM1 into MM2 */
5027  inc esi /* move pointer to the next 8 bytes of Src */
5028  movq mm3, [edx] /* load 4 words of Kernel */
5029  add edx, 8 /* move pointer to other 4 words */
5030  movq mm4, [edx] /* load 4 words of Kernel */
5031  add edx, 8 /* move pointer to other 4 words */
5032  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
5033  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
5034  pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */
5035  pmullw mm2, mm4 /* mult. 4 high words of Src and Kernel */
5036  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
5037  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
5038  movq mm1, [esi] /* load 8 bytes of the Src */
5039  dec esi
5040  add esi, eax /* move Src pointer 1 row below */
5041  movq mm3, [edx] /* load 4 words of Kernel */
5042  add edx, 8 /* move pointer to other 4 words */
5043  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
5044  pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */
5045  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
5046  /* --- 9 */
5047  movq mm1, [esi] /* load 8 bytes of the Src */
5048  movq mm2, mm1 /* copy MM1 into MM2 */
5049  inc esi /* move pointer to the next 8 bytes of Src */
5050  movq mm3, [edx] /* load 4 words of Kernel */
5051  add edx, 8 /* move pointer to other 4 words */
5052  movq mm4, [edx] /* load 4 words of Kernel */
5053  add edx, 8 /* move pointer to other 4 words */
5054  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
5055  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
5056  pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */
5057  pmullw mm2, mm4 /* mult. 4 high words of Src and Kernel */
5058  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
5059  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
5060  movq mm1, [esi] /* load 8 bytes of the Src */
5061  movq mm3, [edx] /* load 4 words of Kernel */
5062  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
5063  pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */
5064  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
5065  /* ---, */
5066  movq mm3, mm7 /* copy MM7 into MM3 */
5067  psrlq mm7, 32 /* shift 2 left words to the right */
5068  paddsw mm7, mm3 /* add 2 left and 2 right result words */
5069  movq mm2, mm7 /* copy MM7 into MM2 */
5070  psrlq mm7, 16 /* shift 1 left word to the right */
5071  paddsw mm7, mm2 /* add 1 left and 1 right result words */
5072  /* ---, */
5073  movd mm1, eax /* save EDX in MM1 */
5074  movd mm2, ebx /* save EDX in MM2 */
5075  movd mm3, edx /* save EDX in MM3 */
5076  movd eax, mm7 /* load summation result into EAX */
5077  psraw mm7, 15 /* spread sign bit of the result */
5078  movd ebx, mm5 /* load Divisor into EBX */
5079  movd edx, mm7 /* fill EDX with a sign bit */
5080  idiv bx /* IDIV - VERY EXPENSIVE */
5081  movd mm7, eax /* move result of division into MM7 */
5082  packuswb mm7, mm0 /* pack division result with saturation */
5083  movd eax, mm7 /* copy saturated result into EAX */
5084  mov [edi], al /* copy a byte result into Dest */
5085  movd edx, mm3 /* restore saved EDX */
5086  movd ebx, mm2 /* restore saved EBX */
5087  movd eax, mm1 /* restore saved EAX */
5088  /* --, */
5089  movd esi, mm6 /* move Src pointer to the top pixel */
5090  sub edx, 208 /* EDX = Kernel address */
5091  inc esi /* move Src pointer to the next pixel */
5092  inc edi /* move Dest pointer to the next pixel */
5093  /* ---, */
5094  dec ecx /* decrease loop counter COLUMNS */
5095  jnz L10352 /* check loop termination, proceed if required */
5096  add esi, 8 /* move to the next row in Src */
5097  add edi, 8 /* move to the next row in Dest */
5098  dec ebx /* decrease loop counter ROWS */
5099  jnz L10350 /* check loop termination, proceed if required */
5100  /* ---, */
5101  emms /* exit MMX state */
5102  popa
5103  }
5104 #else
5105  asm volatile
5106  ("pusha \n\t" "pxor %%mm0, %%mm0 \n\t" /* zero MM0 */
5107  "xor %%ebx, %%ebx \n\t" /* zero EBX */
5108  "mov %5, %%bl \n\t" /* load Divisor into BL */
5109  "movd %%ebx, %%mm5 \n\t" /* copy Divisor into MM5 */
5110  "mov %4, %%edx \n\t" /* load Kernel address into EDX */
5111  "mov %1, %%esi \n\t" /* load Src address to ESI */
5112  "mov %0, %%edi \n\t" /* load Dest address to EDI */
5113  "add $4, %%edi \n\t" /* 4 column offset from the left edge */
5114  "mov %3, %%eax \n\t" /* load columns into EAX */
5115  "add %%eax, %%edi \n\t" /* 4 row offset from the top edge */
5116  "add %%eax, %%edi \n\t" "add %%eax, %%edi \n\t" "add %%eax, %%edi \n\t" "mov %2, %%ebx \n\t" /* initialize ROWS counter */
5117  "sub $8, %%ebx \n\t" /* do not use first 4 and last 4 rows */
5118  /* --- */
5119  ".L10350: \n\t" "mov %%eax, %%ecx \n\t" /* initialize COLUMNS counter */
5120  "sub $8, %%ecx \n\t" /* do not use first 4 and last 4 columns */
5121  ".align 16 \n\t" /* 16 byte alignment of the loop entry */
5122  ".L10352: \n\t" "pxor %%mm7, %%mm7 \n\t" /* zero MM7 (accumulator) */
5123  "movd %%esi, %%mm6 \n\t" /* save ESI in MM6 */
5124  /* --- 1 */
5125  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
5126  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
5127  "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */
5128  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
5129  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5130  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
5131  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5132  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
5133  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
5134  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
5135  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
5136  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
5137  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
5138  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
5139  "dec %%esi \n\t" "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
5140  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
5141  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5142  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
5143  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
5144  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
5145  /* --- 2 */
5146  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
5147  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
5148  "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */
5149  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
5150  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5151  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
5152  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5153  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
5154  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
5155  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
5156  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
5157  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
5158  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
5159  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
5160  "dec %%esi \n\t" "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
5161  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
5162  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5163  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
5164  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
5165  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
5166  /* --- 3 */
5167  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
5168  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
5169  "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */
5170  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
5171  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5172  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
5173  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5174  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
5175  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
5176  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
5177  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
5178  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
5179  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
5180  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
5181  "dec %%esi \n\t" "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
5182  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
5183  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5184  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
5185  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
5186  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
5187  /* --- 4 */
5188  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
5189  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
5190  "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */
5191  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
5192  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5193  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
5194  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5195  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
5196  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
5197  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
5198  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
5199  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
5200  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
5201  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
5202  "dec %%esi \n\t" "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
5203  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
5204  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5205  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
5206  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
5207  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
5208  /* --- 5 */
5209  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
5210  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
5211  "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */
5212  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
5213  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5214  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
5215  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5216  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
5217  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
5218  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
5219  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
5220  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
5221  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
5222  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
5223  "dec %%esi \n\t" "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
5224  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
5225  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5226  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
5227  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
5228  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
5229  /* --- 6 */
5230  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
5231  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
5232  "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */
5233  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
5234  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5235  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
5236  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5237  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
5238  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
5239  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
5240  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
5241  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
5242  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
5243  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
5244  "dec %%esi \n\t" "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
5245  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
5246  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5247  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
5248  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
5249  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
5250  /* --- 7 */
5251  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
5252  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
5253  "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */
5254  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
5255  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5256  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
5257  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5258  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
5259  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
5260  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
5261  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
5262  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
5263  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
5264  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
5265  "dec %%esi \n\t" "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
5266  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
5267  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5268  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
5269  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
5270  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
5271  /* --- 8 */
5272  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
5273  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
5274  "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */
5275  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
5276  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5277  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
5278  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5279  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
5280  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
5281  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
5282  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
5283  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
5284  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
5285  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
5286  "dec %%esi \n\t" "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
5287  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
5288  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5289  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
5290  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
5291  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
5292  /* --- 9 */
5293  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
5294  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
5295  "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */
5296  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
5297  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5298  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
5299  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5300  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
5301  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
5302  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
5303  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
5304  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
5305  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
5306  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
5307  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
5308  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
5309  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
5310  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
5311  /* --- */
5312  "movq %%mm7, %%mm3 \n\t" /* copy MM7 into MM3 */
5313  "psrlq $32, %%mm7 \n\t" /* shift 2 left words to the right */
5314  "paddsw %%mm3, %%mm7 \n\t" /* add 2 left and 2 right result words */
5315  "movq %%mm7, %%mm2 \n\t" /* copy MM7 into MM2 */
5316  "psrlq $16, %%mm7 \n\t" /* shift 1 left word to the right */
5317  "paddsw %%mm2, %%mm7 \n\t" /* add 1 left and 1 right result words */
5318  /* --- */
5319  "movd %%eax, %%mm1 \n\t" /* save EDX in MM1 */
5320  "movd %%ebx, %%mm2 \n\t" /* save EDX in MM2 */
5321  "movd %%edx, %%mm3 \n\t" /* save EDX in MM3 */
5322  "movd %%mm7, %%eax \n\t" /* load summation result into EAX */
5323  "psraw $15, %%mm7 \n\t" /* spread sign bit of the result */
5324  "movd %%mm5, %%ebx \n\t" /* load Divisor into EBX */
5325  "movd %%mm7, %%edx \n\t" /* fill EDX with a sign bit */
5326  "idivw %%bx \n\t" /* IDIV - VERY EXPENSIVE */
5327  "movd %%eax, %%mm7 \n\t" /* move result of division into MM7 */
5328  "packuswb %%mm0, %%mm7 \n\t" /* pack division result with saturation */
5329  "movd %%mm7, %%eax \n\t" /* copy saturated result into EAX */
5330  "mov %%al, (%%edi) \n\t" /* copy a byte result into Dest */
5331  "movd %%mm3, %%edx \n\t" /* restore saved EDX */
5332  "movd %%mm2, %%ebx \n\t" /* restore saved EBX */
5333  "movd %%mm1, %%eax \n\t" /* restore saved EAX */
5334  /* -- */
5335  "movd %%mm6, %%esi \n\t" /* move Src pointer to the top pixel */
5336  "sub $208, %%edx \n\t" /* EDX = Kernel address */
5337  "inc %%esi \n\t" /* move Src pointer to the next pixel */
5338  "inc %%edi \n\t" /* move Dest pointer to the next pixel */
5339  /* --- */
5340  "dec %%ecx \n\t" /* decrease loop counter COLUMNS */
5341  "jnz .L10352 \n\t" /* check loop termination, proceed if required */
5342  "add $8, %%esi \n\t" /* move to the next row in Src */
5343  "add $8, %%edi \n\t" /* move to the next row in Dest */
5344  "dec %%ebx \n\t" /* decrease loop counter ROWS */
5345  "jnz .L10350 \n\t" /* check loop termination, proceed if required */
5346  /* --- */
5347  "emms \n\t" /* exit MMX state */
5348  "popa \n\t":"=m" (Dest) /* %0 */
5349  :"m"(Src), /* %1 */
5350  "m"(rows), /* %2 */
5351  "m"(columns), /* %3 */
5352  "m"(Kernel), /* %4 */
5353  "m"(Divisor) /* %5 */
5354  );
5355 #endif
5356 #endif
5357  return (0);
5358  } else {
5359  /* No non-MMX implementation yet */
5360  return (-1);
5361  }
5362 }
5363 
5378 int SDL_imageFilterConvolveKernel3x3ShiftRight(unsigned char *Src, unsigned char *Dest, int rows, int columns,
5379  signed short *Kernel, unsigned char NRightShift)
5380 {
5381  /* Validate input parameters */
5382  if ((Src == NULL) || (Dest == NULL) || (Kernel == NULL))
5383  return(-1);
5384 
5385  if ((columns < 3) || (rows < 3) || (NRightShift > 7))
5386  return (-1);
5387 
5388  if ((SDL_imageFilterMMXdetect())) {
5389 //#ifdef USE_MMX
5390 #if defined(USE_MMX) && defined(i386)
5391 #if !defined(GCC__)
5392  __asm
5393  {
5394  pusha
5395  pxor mm0, mm0 /* zero MM0 */
5396  xor ebx, ebx /* zero EBX */
5397  mov bl, NRightShift /* load NRightShift into BL */
5398  movd mm4, ebx /* copy NRightShift into MM4 */
5399  mov edx, Kernel /* load Kernel address into EDX */
5400  movq mm5, [edx] /* MM5 = {0,K2,K1,K0} */
5401  add edx, 8 /* second row |K0 K1 K2 0| */
5402  movq mm6, [edx] /* MM6 = {0,K5,K4,K3} K = |K3 K4 K5 0| */
5403  add edx, 8 /* third row |K6 K7 K8 0| */
5404  movq mm7, [edx] /* MM7 = {0,K8,K7,K6} */
5405  /* ---, */
5406  mov eax, columns /* load columns into EAX */
5407  mov esi, Src /* ESI = Src row 0 address */
5408  mov edi, Dest /* load Dest address to EDI */
5409  add edi, eax /* EDI = EDI + columns */
5410  inc edi /* 1 byte offset from the left edge */
5411  mov edx, rows /* initialize ROWS counter */
5412  sub edx, 2 /* do not use first and last row */
5413  /* ---, */
5414 L10360:
5415  mov ecx, eax /* initialize COLUMS counter */
5416  sub ecx, 2 /* do not use first and last column */
5417  align 16 /* 16 byte alignment of the loop entry */
5418 L10362:
5419  /* ---, */
5420  movq mm1, [esi] /* load 8 bytes of the image first row */
5421  add esi, eax /* move one row below */
5422  movq mm2, [esi] /* load 8 bytes of the image second row */
5423  add esi, eax /* move one row below */
5424  movq mm3, [esi] /* load 8 bytes of the image third row */
5425  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
5426  punpcklbw mm2, mm0 /* unpack first 4 bytes into words */
5427  punpcklbw mm3, mm0 /* unpack first 4 bytes into words */
5428  psrlw mm1, mm4 /* shift right each pixel NshiftRight times */
5429  psrlw mm2, mm4 /* shift right each pixel NshiftRight times */
5430  psrlw mm3, mm4 /* shift right each pixel NshiftRight times */
5431  pmullw mm1, mm5 /* multiply words first row image*Kernel */
5432  pmullw mm2, mm6 /* multiply words second row image*Kernel */
5433  pmullw mm3, mm7 /* multiply words third row image*Kernel */
5434  paddsw mm1, mm2 /* add 4 words of the first and second rows */
5435  paddsw mm1, mm3 /* add 4 words of the third row and result */
5436  movq mm2, mm1 /* copy MM1 into MM2 */
5437  psrlq mm1, 32 /* shift 2 left words to the right */
5438  paddsw mm1, mm2 /* add 2 left and 2 right result words */
5439  movq mm3, mm1 /* copy MM1 into MM3 */
5440  psrlq mm1, 16 /* shift 1 left word to the right */
5441  paddsw mm1, mm3 /* add 1 left and 1 right result words */
5442  packuswb mm1, mm0 /* pack shift result with saturation */
5443  movd ebx, mm1 /* copy saturated result into EBX */
5444  mov [edi], bl /* copy a byte result into Dest */
5445  /* --, */
5446  sub esi, eax /* move two rows up */
5447  sub esi, eax
5448  inc esi /* move Src pointer to the next pixel */
5449  inc edi /* move Dest pointer to the next pixel */
5450  /* ---, */
5451  dec ecx /* decrease loop counter COLUMNS */
5452  jnz L10362 /* check loop termination, proceed if required */
5453  add esi, 2 /* move to the next row in Src */
5454  add edi, 2 /* move to the next row in Dest */
5455  dec edx /* decrease loop counter ROWS */
5456  jnz L10360 /* check loop termination, proceed if required */
5457  /* ---, */
5458  emms /* exit MMX state */
5459  popa
5460  }
5461 #else
5462  asm volatile
5463  ("pusha \n\t" "pxor %%mm0, %%mm0 \n\t" /* zero MM0 */
5464  "xor %%ebx, %%ebx \n\t" /* zero EBX */
5465  "mov %5, %%bl \n\t" /* load NRightShift into BL */
5466  "movd %%ebx, %%mm4 \n\t" /* copy NRightShift into MM4 */
5467  "mov %4, %%edx \n\t" /* load Kernel address into EDX */
5468  "movq (%%edx), %%mm5 \n\t" /* MM5 = {0,K2,K1,K0} */
5469  "add $8, %%edx \n\t" /* second row |K0 K1 K2 0| */
5470  "movq (%%edx), %%mm6 \n\t" /* MM6 = {0,K5,K4,K3} K = |K3 K4 K5 0| */
5471  "add $8, %%edx \n\t" /* third row |K6 K7 K8 0| */
5472  "movq (%%edx), %%mm7 \n\t" /* MM7 = {0,K8,K7,K6} */
5473  /* --- */
5474  "mov %3, %%eax \n\t" /* load columns into EAX */
5475  "mov %1, %%esi \n\t" /* ESI = Src row 0 address */
5476  "mov %0, %%edi \n\t" /* load Dest address to EDI */
5477  "add %%eax, %%edi \n\t" /* EDI = EDI + columns */
5478  "inc %%edi \n\t" /* 1 byte offset from the left edge */
5479  "mov %2, %%edx \n\t" /* initialize ROWS counter */
5480  "sub $2, %%edx \n\t" /* do not use first and last row */
5481  /* --- */
5482  ".L10360: \n\t" "mov %%eax, %%ecx \n\t" /* initialize COLUMS counter */
5483  "sub $2, %%ecx \n\t" /* do not use first and last column */
5484  ".align 16 \n\t" /* 16 byte alignment of the loop entry */
5485  ".L10362: \n\t"
5486  /* --- */
5487  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the image first row */
5488  "add %%eax, %%esi \n\t" /* move one row below */
5489  "movq (%%esi), %%mm2 \n\t" /* load 8 bytes of the image second row */
5490  "add %%eax, %%esi \n\t" /* move one row below */
5491  "movq (%%esi), %%mm3 \n\t" /* load 8 bytes of the image third row */
5492  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
5493  "punpcklbw %%mm0, %%mm2 \n\t" /* unpack first 4 bytes into words */
5494  "punpcklbw %%mm0, %%mm3 \n\t" /* unpack first 4 bytes into words */
5495  "psrlw %%mm4, %%mm1 \n\t" /* shift right each pixel NshiftRight times */
5496  "psrlw %%mm4, %%mm2 \n\t" /* shift right each pixel NshiftRight times */
5497  "psrlw %%mm4, %%mm3 \n\t" /* shift right each pixel NshiftRight times */
5498  "pmullw %%mm5, %%mm1 \n\t" /* multiply words first row image*Kernel */
5499  "pmullw %%mm6, %%mm2 \n\t" /* multiply words second row image*Kernel */
5500  "pmullw %%mm7, %%mm3 \n\t" /* multiply words third row image*Kernel */
5501  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the first and second rows */
5502  "paddsw %%mm3, %%mm1 \n\t" /* add 4 words of the third row and result */
5503  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
5504  "psrlq $32, %%mm1 \n\t" /* shift 2 left words to the right */
5505  "paddsw %%mm2, %%mm1 \n\t" /* add 2 left and 2 right result words */
5506  "movq %%mm1, %%mm3 \n\t" /* copy MM1 into MM3 */
5507  "psrlq $16, %%mm1 \n\t" /* shift 1 left word to the right */
5508  "paddsw %%mm3, %%mm1 \n\t" /* add 1 left and 1 right result words */
5509  "packuswb %%mm0, %%mm1 \n\t" /* pack shift result with saturation */
5510  "movd %%mm1, %%ebx \n\t" /* copy saturated result into EBX */
5511  "mov %%bl, (%%edi) \n\t" /* copy a byte result into Dest */
5512  /* -- */
5513  "sub %%eax, %%esi \n\t" /* move two rows up */
5514  "sub %%eax, %%esi \n\t" "inc %%esi \n\t" /* move Src pointer to the next pixel */
5515  "inc %%edi \n\t" /* move Dest pointer to the next pixel */
5516  /* --- */
5517  "dec %%ecx \n\t" /* decrease loop counter COLUMNS */
5518  "jnz .L10362 \n\t" /* check loop termination, proceed if required */
5519  "add $2, %%esi \n\t" /* move to the next row in Src */
5520  "add $2, %%edi \n\t" /* move to the next row in Dest */
5521  "dec %%edx \n\t" /* decrease loop counter ROWS */
5522  "jnz .L10360 \n\t" /* check loop termination, proceed if required */
5523  /* --- */
5524  "emms \n\t" /* exit MMX state */
5525  "popa \n\t":"=m" (Dest) /* %0 */
5526  :"m"(Src), /* %1 */
5527  "m"(rows), /* %2 */
5528  "m"(columns), /* %3 */
5529  "m"(Kernel), /* %4 */
5530  "m"(NRightShift) /* %5 */
5531  );
5532 #endif
5533 #endif
5534  return (0);
5535  } else {
5536  /* No non-MMX implementation yet */
5537  return (-1);
5538  }
5539 }
5540 
5555 int SDL_imageFilterConvolveKernel5x5ShiftRight(unsigned char *Src, unsigned char *Dest, int rows, int columns,
5556  signed short *Kernel, unsigned char NRightShift)
5557 {
5558  /* Validate input parameters */
5559  if ((Src == NULL) || (Dest == NULL) || (Kernel == NULL))
5560  return(-1);
5561 
5562  if ((columns < 5) || (rows < 5) || (NRightShift > 7))
5563  return (-1);
5564 
5565  if ((SDL_imageFilterMMXdetect())) {
5566 //#ifdef USE_MMX
5567 #if defined(USE_MMX) && defined(i386)
5568 #if !defined(GCC__)
5569  __asm
5570  {
5571  pusha
5572  pxor mm0, mm0 /* zero MM0 */
5573  xor ebx, ebx /* zero EBX */
5574  mov bl, NRightShift /* load NRightShift into BL */
5575  movd mm5, ebx /* copy NRightShift into MM5 */
5576  mov edx, Kernel /* load Kernel address into EDX */
5577  mov esi, Src /* load Src address to ESI */
5578  mov edi, Dest /* load Dest address to EDI */
5579  add edi, 2 /* 2 column offset from the left edge */
5580  mov eax, columns /* load columns into EAX */
5581  shl eax, 1 /* EAX = columns * 2 */
5582  add edi, eax /* 2 row offset from the top edge */
5583  shr eax, 1 /* EAX = columns */
5584  mov ebx, rows /* initialize ROWS counter */
5585  sub ebx, 4 /* do not use first 2 and last 2 rows */
5586  /* ---, */
5587 L10370:
5588  mov ecx, eax /* initialize COLUMNS counter */
5589  sub ecx, 4 /* do not use first 2 and last 2 columns */
5590  align 16 /* 16 byte alignment of the loop entry */
5591 L10372:
5592  pxor mm7, mm7 /* zero MM7 (accumulator) */
5593  movd mm6, esi /* save ESI in MM6 */
5594  /* --- 1 */
5595  movq mm1, [esi] /* load 8 bytes of the Src */
5596  movq mm2, mm1 /* copy MM1 into MM2 */
5597  add esi, eax /* move Src pointer 1 row below */
5598  movq mm3, [edx] /* load 4 words of Kernel */
5599  add edx, 8 /* move pointer to other 4 words */
5600  movq mm4, [edx] /* load 4 words of Kernel */
5601  add edx, 8 /* move pointer to other 4 words */
5602  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
5603  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
5604  psrlw mm1, mm5 /* shift right each pixel NshiftRight times */
5605  psrlw mm2, mm5 /* shift right each pixel NshiftRight times */
5606  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
5607  pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */
5608  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
5609  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
5610  /* --- 2 */
5611  movq mm1, [esi] /* load 8 bytes of the Src */
5612  movq mm2, mm1 /* copy MM1 into MM2 */
5613  add esi, eax /* move Src pointer 1 row below */
5614  movq mm3, [edx] /* load 4 words of Kernel */
5615  add edx, 8 /* move pointer to other 4 words */
5616  movq mm4, [edx] /* load 4 words of Kernel */
5617  add edx, 8 /* move pointer to other 4 words */
5618  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
5619  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
5620  psrlw mm1, mm5 /* shift right each pixel NshiftRight times */
5621  psrlw mm2, mm5 /* shift right each pixel NshiftRight times */
5622  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
5623  pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */
5624  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
5625  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
5626  /* --- 3 */
5627  movq mm1, [esi] /* load 8 bytes of the Src */
5628  movq mm2, mm1 /* copy MM1 into MM2 */
5629  add esi, eax /* move Src pointer 1 row below */
5630  movq mm3, [edx] /* load 4 words of Kernel */
5631  add edx, 8 /* move pointer to other 4 words */
5632  movq mm4, [edx] /* load 4 words of Kernel */
5633  add edx, 8 /* move pointer to other 4 words */
5634  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
5635  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
5636  psrlw mm1, mm5 /* shift right each pixel NshiftRight times */
5637  psrlw mm2, mm5 /* shift right each pixel NshiftRight times */
5638  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
5639  pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */
5640  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
5641  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
5642  /* --- 4 */
5643  movq mm1, [esi] /* load 8 bytes of the Src */
5644  movq mm2, mm1 /* copy MM1 into MM2 */
5645  add esi, eax /* move Src pointer 1 row below */
5646  movq mm3, [edx] /* load 4 words of Kernel */
5647  add edx, 8 /* move pointer to other 4 words */
5648  movq mm4, [edx] /* load 4 words of Kernel */
5649  add edx, 8 /* move pointer to other 4 words */
5650  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
5651  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
5652  psrlw mm1, mm5 /* shift right each pixel NshiftRight times */
5653  psrlw mm2, mm5 /* shift right each pixel NshiftRight times */
5654  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
5655  pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */
5656  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
5657  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
5658  /* --- 5 */
5659  movq mm1, [esi] /* load 8 bytes of the Src */
5660  movq mm2, mm1 /* copy MM1 into MM2 */
5661  movq mm3, [edx] /* load 4 words of Kernel */
5662  add edx, 8 /* move pointer to other 4 words */
5663  movq mm4, [edx] /* load 4 words of Kernel */
5664  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
5665  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
5666  psrlw mm1, mm5 /* shift right each pixel NshiftRight times */
5667  psrlw mm2, mm5 /* shift right each pixel NshiftRight times */
5668  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
5669  pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */
5670  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
5671  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
5672  /* ---, */
5673  movq mm3, mm7 /* copy MM7 into MM3 */
5674  psrlq mm7, 32 /* shift 2 left words to the right */
5675  paddsw mm7, mm3 /* add 2 left and 2 right result words */
5676  movq mm2, mm7 /* copy MM7 into MM2 */
5677  psrlq mm7, 16 /* shift 1 left word to the right */
5678  paddsw mm7, mm2 /* add 1 left and 1 right result words */
5679  movd mm1, eax /* save EAX in MM1 */
5680  packuswb mm7, mm0 /* pack division result with saturation */
5681  movd eax, mm7 /* copy saturated result into EAX */
5682  mov [edi], al /* copy a byte result into Dest */
5683  movd eax, mm1 /* restore saved EAX */
5684  /* --, */
5685  movd esi, mm6 /* move Src pointer to the top pixel */
5686  sub edx, 72 /* EDX = Kernel address */
5687  inc esi /* move Src pointer to the next pixel */
5688  inc edi /* move Dest pointer to the next pixel */
5689  /* ---, */
5690  dec ecx /* decrease loop counter COLUMNS */
5691  jnz L10372 /* check loop termination, proceed if required */
5692  add esi, 4 /* move to the next row in Src */
5693  add edi, 4 /* move to the next row in Dest */
5694  dec ebx /* decrease loop counter ROWS */
5695  jnz L10370 /* check loop termination, proceed if required */
5696  /* ---, */
5697  emms /* exit MMX state */
5698  popa
5699  }
5700 #else
5701  asm volatile
5702  ("pusha \n\t" "pxor %%mm0, %%mm0 \n\t" /* zero MM0 */
5703  "xor %%ebx, %%ebx \n\t" /* zero EBX */
5704  "mov %5, %%bl \n\t" /* load NRightShift into BL */
5705  "movd %%ebx, %%mm5 \n\t" /* copy NRightShift into MM5 */
5706  "mov %4, %%edx \n\t" /* load Kernel address into EDX */
5707  "mov %1, %%esi \n\t" /* load Src address to ESI */
5708  "mov %0, %%edi \n\t" /* load Dest address to EDI */
5709  "add $2, %%edi \n\t" /* 2 column offset from the left edge */
5710  "mov %3, %%eax \n\t" /* load columns into EAX */
5711  "shl $1, %%eax \n\t" /* EAX = columns * 2 */
5712  "add %%eax, %%edi \n\t" /* 2 row offset from the top edge */
5713  "shr $1, %%eax \n\t" /* EAX = columns */
5714  "mov %2, %%ebx \n\t" /* initialize ROWS counter */
5715  "sub $4, %%ebx \n\t" /* do not use first 2 and last 2 rows */
5716  /* --- */
5717  ".L10370: \n\t" "mov %%eax, %%ecx \n\t" /* initialize COLUMNS counter */
5718  "sub $4, %%ecx \n\t" /* do not use first 2 and last 2 columns */
5719  ".align 16 \n\t" /* 16 byte alignment of the loop entry */
5720  ".L10372: \n\t" "pxor %%mm7, %%mm7 \n\t" /* zero MM7 (accumulator) */
5721  "movd %%esi, %%mm6 \n\t" /* save ESI in MM6 */
5722  /* --- 1 */
5723  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
5724  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
5725  "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
5726  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
5727  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5728  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
5729  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5730  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
5731  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
5732  "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */
5733  "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */
5734  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
5735  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
5736  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
5737  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
5738  /* --- 2 */
5739  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
5740  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
5741  "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
5742  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
5743  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5744  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
5745  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5746  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
5747  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
5748  "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */
5749  "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */
5750  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
5751  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
5752  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
5753  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
5754  /* --- 3 */
5755  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
5756  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
5757  "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
5758  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
5759  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5760  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
5761  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5762  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
5763  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
5764  "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */
5765  "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */
5766  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
5767  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
5768  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
5769  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
5770  /* --- 4 */
5771  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
5772  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
5773  "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
5774  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
5775  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5776  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
5777  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5778  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
5779  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
5780  "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */
5781  "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */
5782  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
5783  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
5784  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
5785  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
5786  /* --- 5 */
5787  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
5788  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
5789  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
5790  "add $8, %%edx \n\t" /* move pointer to other 4 words */
5791  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
5792  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
5793  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
5794  "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */
5795  "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */
5796  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
5797  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
5798  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
5799  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
5800  /* --- */
5801  "movq %%mm7, %%mm3 \n\t" /* copy MM7 into MM3 */
5802  "psrlq $32, %%mm7 \n\t" /* shift 2 left words to the right */
5803  "paddsw %%mm3, %%mm7 \n\t" /* add 2 left and 2 right result words */
5804  "movq %%mm7, %%mm2 \n\t" /* copy MM7 into MM2 */
5805  "psrlq $16, %%mm7 \n\t" /* shift 1 left word to the right */
5806  "paddsw %%mm2, %%mm7 \n\t" /* add 1 left and 1 right result words */
5807  "movd %%eax, %%mm1 \n\t" /* save EAX in MM1 */
5808  "packuswb %%mm0, %%mm7 \n\t" /* pack division result with saturation */
5809  "movd %%mm7, %%eax \n\t" /* copy saturated result into EAX */
5810  "mov %%al, (%%edi) \n\t" /* copy a byte result into Dest */
5811  "movd %%mm1, %%eax \n\t" /* restore saved EAX */
5812  /* -- */
5813  "movd %%mm6, %%esi \n\t" /* move Src pointer to the top pixel */
5814  "sub $72, %%edx \n\t" /* EDX = Kernel address */
5815  "inc %%esi \n\t" /* move Src pointer to the next pixel */
5816  "inc %%edi \n\t" /* move Dest pointer to the next pixel */
5817  /* --- */
5818  "dec %%ecx \n\t" /* decrease loop counter COLUMNS */
5819  "jnz .L10372 \n\t" /* check loop termination, proceed if required */
5820  "add $4, %%esi \n\t" /* move to the next row in Src */
5821  "add $4, %%edi \n\t" /* move to the next row in Dest */
5822  "dec %%ebx \n\t" /* decrease loop counter ROWS */
5823  "jnz .L10370 \n\t" /* check loop termination, proceed if required */
5824  /* --- */
5825  "emms \n\t" /* exit MMX state */
5826  "popa \n\t":"=m" (Dest) /* %0 */
5827  :"m"(Src), /* %1 */
5828  "m"(rows), /* %2 */
5829  "m"(columns), /* %3 */
5830  "m"(Kernel), /* %4 */
5831  "m"(NRightShift) /* %5 */
5832  );
5833 #endif
5834 #endif
5835  return (0);
5836  } else {
5837  /* No non-MMX implementation yet */
5838  return (-1);
5839  }
5840 }
5841 
5856 int SDL_imageFilterConvolveKernel7x7ShiftRight(unsigned char *Src, unsigned char *Dest, int rows, int columns,
5857  signed short *Kernel, unsigned char NRightShift)
5858 {
5859  /* Validate input parameters */
5860  if ((Src == NULL) || (Dest == NULL) || (Kernel == NULL))
5861  return(-1);
5862 
5863  if ((columns < 7) || (rows < 7) || (NRightShift > 7))
5864  return (-1);
5865 
5866  if ((SDL_imageFilterMMXdetect())) {
5867 //#ifdef USE_MMX
5868 #if defined(USE_MMX) && defined(i386)
5869 #if !defined(GCC__)
5870  __asm
5871  {
5872  pusha
5873  pxor mm0, mm0 /* zero MM0 */
5874  xor ebx, ebx /* zero EBX */
5875  mov bl, NRightShift /* load NRightShift into BL */
5876  movd mm5, ebx /* copy NRightShift into MM5 */
5877  mov edx, Kernel /* load Kernel address into EDX */
5878  mov esi, Src /* load Src address to ESI */
5879  mov edi, Dest /* load Dest address to EDI */
5880  add edi, 3 /* 3 column offset from the left edge */
5881  mov eax, columns /* load columns into EAX */
5882  add edi, eax /* 3 row offset from the top edge */
5883  add edi, eax
5884  add edi, eax
5885  mov ebx, rows /* initialize ROWS counter */
5886  sub ebx, 6 /* do not use first 3 and last 3 rows */
5887  /* ---, */
5888 L10380:
5889  mov ecx, eax /* initialize COLUMNS counter */
5890  sub ecx, 6 /* do not use first 3 and last 3 columns */
5891  align 16 /* 16 byte alignment of the loop entry */
5892 L10382:
5893  pxor mm7, mm7 /* zero MM7 (accumulator) */
5894  movd mm6, esi /* save ESI in MM6 */
5895  /* --- 1 */
5896  movq mm1, [esi] /* load 8 bytes of the Src */
5897  movq mm2, mm1 /* copy MM1 into MM2 */
5898  add esi, eax /* move Src pointer 1 row below */
5899  movq mm3, [edx] /* load 4 words of Kernel */
5900  add edx, 8 /* move pointer to other 4 words */
5901  movq mm4, [edx] /* load 4 words of Kernel */
5902  add edx, 8 /* move pointer to other 4 words */
5903  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
5904  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
5905  psrlw mm1, mm5 /* shift right each pixel NshiftRight times */
5906  psrlw mm2, mm5 /* shift right each pixel NshiftRight times */
5907  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
5908  pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */
5909  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
5910  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
5911  /* --- 2 */
5912  movq mm1, [esi] /* load 8 bytes of the Src */
5913  movq mm2, mm1 /* copy MM1 into MM2 */
5914  add esi, eax /* move Src pointer 1 row below */
5915  movq mm3, [edx] /* load 4 words of Kernel */
5916  add edx, 8 /* move pointer to other 4 words */
5917  movq mm4, [edx] /* load 4 words of Kernel */
5918  add edx, 8 /* move pointer to other 4 words */
5919  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
5920  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
5921  psrlw mm1, mm5 /* shift right each pixel NshiftRight times */
5922  psrlw mm2, mm5 /* shift right each pixel NshiftRight times */
5923  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
5924  pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */
5925  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
5926  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
5927  /* --- 3 */
5928  movq mm1, [esi] /* load 8 bytes of the Src */
5929  movq mm2, mm1 /* copy MM1 into MM2 */
5930  add esi, eax /* move Src pointer 1 row below */
5931  movq mm3, [edx] /* load 4 words of Kernel */
5932  add edx, 8 /* move pointer to other 4 words */
5933  movq mm4, [edx] /* load 4 words of Kernel */
5934  add edx, 8 /* move pointer to other 4 words */
5935  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
5936  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
5937  psrlw mm1, mm5 /* shift right each pixel NshiftRight times */
5938  psrlw mm2, mm5 /* shift right each pixel NshiftRight times */
5939  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
5940  pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */
5941  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
5942  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
5943  /* --- 4 */
5944  movq mm1, [esi] /* load 8 bytes of the Src */
5945  movq mm2, mm1 /* copy MM1 into MM2 */
5946  add esi, eax /* move Src pointer 1 row below */
5947  movq mm3, [edx] /* load 4 words of Kernel */
5948  add edx, 8 /* move pointer to other 4 words */
5949  movq mm4, [edx] /* load 4 words of Kernel */
5950  add edx, 8 /* move pointer to other 4 words */
5951  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
5952  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
5953  psrlw mm1, mm5 /* shift right each pixel NshiftRight times */
5954  psrlw mm2, mm5 /* shift right each pixel NshiftRight times */
5955  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
5956  pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */
5957  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
5958  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
5959  /* --- 5 */
5960  movq mm1, [esi] /* load 8 bytes of the Src */
5961  movq mm2, mm1 /* copy MM1 into MM2 */
5962  add esi, eax /* move Src pointer 1 row below */
5963  movq mm3, [edx] /* load 4 words of Kernel */
5964  add edx, 8 /* move pointer to other 4 words */
5965  movq mm4, [edx] /* load 4 words of Kernel */
5966  add edx, 8 /* move pointer to other 4 words */
5967  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
5968  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
5969  psrlw mm1, mm5 /* shift right each pixel NshiftRight times */
5970  psrlw mm2, mm5 /* shift right each pixel NshiftRight times */
5971  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
5972  pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */
5973  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
5974  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
5975  /* --- 6 */
5976  movq mm1, [esi] /* load 8 bytes of the Src */
5977  movq mm2, mm1 /* copy MM1 into MM2 */
5978  add esi, eax /* move Src pointer 1 row below */
5979  movq mm3, [edx] /* load 4 words of Kernel */
5980  add edx, 8 /* move pointer to other 4 words */
5981  movq mm4, [edx] /* load 4 words of Kernel */
5982  add edx, 8 /* move pointer to other 4 words */
5983  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
5984  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
5985  psrlw mm1, mm5 /* shift right each pixel NshiftRight times */
5986  psrlw mm2, mm5 /* shift right each pixel NshiftRight times */
5987  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
5988  pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */
5989  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
5990  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
5991  /* --- 7 */
5992  movq mm1, [esi] /* load 8 bytes of the Src */
5993  movq mm2, mm1 /* copy MM1 into MM2 */
5994  movq mm3, [edx] /* load 4 words of Kernel */
5995  add edx, 8 /* move pointer to other 4 words */
5996  movq mm4, [edx] /* load 4 words of Kernel */
5997  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
5998  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
5999  psrlw mm1, mm5 /* shift right each pixel NshiftRight times */
6000  psrlw mm2, mm5 /* shift right each pixel NshiftRight times */
6001  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
6002  pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */
6003  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
6004  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
6005  /* ---, */
6006  movq mm3, mm7 /* copy MM7 into MM3 */
6007  psrlq mm7, 32 /* shift 2 left words to the right */
6008  paddsw mm7, mm3 /* add 2 left and 2 right result words */
6009  movq mm2, mm7 /* copy MM7 into MM2 */
6010  psrlq mm7, 16 /* shift 1 left word to the right */
6011  paddsw mm7, mm2 /* add 1 left and 1 right result words */
6012  movd mm1, eax /* save EAX in MM1 */
6013  packuswb mm7, mm0 /* pack division result with saturation */
6014  movd eax, mm7 /* copy saturated result into EAX */
6015  mov [edi], al /* copy a byte result into Dest */
6016  movd eax, mm1 /* restore saved EAX */
6017  /* --, */
6018  movd esi, mm6 /* move Src pointer to the top pixel */
6019  sub edx, 104 /* EDX = Kernel address */
6020  inc esi /* move Src pointer to the next pixel */
6021  inc edi /* move Dest pointer to the next pixel */
6022  /* ---, */
6023  dec ecx /* decrease loop counter COLUMNS */
6024  jnz L10382 /* check loop termination, proceed if required */
6025  add esi, 6 /* move to the next row in Src */
6026  add edi, 6 /* move to the next row in Dest */
6027  dec ebx /* decrease loop counter ROWS */
6028  jnz L10380 /* check loop termination, proceed if required */
6029  /* ---, */
6030  emms /* exit MMX state */
6031  popa
6032  }
6033 #else
6034  asm volatile
6035  ("pusha \n\t" "pxor %%mm0, %%mm0 \n\t" /* zero MM0 */
6036  "xor %%ebx, %%ebx \n\t" /* zero EBX */
6037  "mov %5, %%bl \n\t" /* load NRightShift into BL */
6038  "movd %%ebx, %%mm5 \n\t" /* copy NRightShift into MM5 */
6039  "mov %4, %%edx \n\t" /* load Kernel address into EDX */
6040  "mov %1, %%esi \n\t" /* load Src address to ESI */
6041  "mov %0, %%edi \n\t" /* load Dest address to EDI */
6042  "add $3, %%edi \n\t" /* 3 column offset from the left edge */
6043  "mov %3, %%eax \n\t" /* load columns into EAX */
6044  "add %%eax, %%edi \n\t" /* 3 row offset from the top edge */
6045  "add %%eax, %%edi \n\t" "add %%eax, %%edi \n\t" "mov %2, %%ebx \n\t" /* initialize ROWS counter */
6046  "sub $6, %%ebx \n\t" /* do not use first 3 and last 3 rows */
6047  /* --- */
6048  ".L10380: \n\t" "mov %%eax, %%ecx \n\t" /* initialize COLUMNS counter */
6049  "sub $6, %%ecx \n\t" /* do not use first 3 and last 3 columns */
6050  ".align 16 \n\t" /* 16 byte alignment of the loop entry */
6051  ".L10382: \n\t" "pxor %%mm7, %%mm7 \n\t" /* zero MM7 (accumulator) */
6052  "movd %%esi, %%mm6 \n\t" /* save ESI in MM6 */
6053  /* --- 1 */
6054  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
6055  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
6056  "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
6057  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
6058  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6059  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
6060  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6061  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
6062  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
6063  "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */
6064  "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */
6065  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
6066  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
6067  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
6068  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
6069  /* --- 2 */
6070  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
6071  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
6072  "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
6073  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
6074  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6075  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
6076  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6077  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
6078  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
6079  "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */
6080  "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */
6081  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
6082  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
6083  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
6084  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
6085  /* --- 3 */
6086  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
6087  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
6088  "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
6089  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
6090  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6091  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
6092  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6093  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
6094  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
6095  "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */
6096  "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */
6097  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
6098  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
6099  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
6100  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
6101  /* --- 4 */
6102  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
6103  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
6104  "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
6105  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
6106  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6107  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
6108  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6109  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
6110  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
6111  "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */
6112  "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */
6113  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
6114  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
6115  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
6116  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
6117  /* --- 5 */
6118  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
6119  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
6120  "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
6121  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
6122  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6123  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
6124  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6125  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
6126  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
6127  "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */
6128  "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */
6129  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
6130  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
6131  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
6132  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
6133  /* --- 6 */
6134  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
6135  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
6136  "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
6137  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
6138  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6139  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
6140  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6141  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
6142  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
6143  "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */
6144  "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */
6145  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
6146  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
6147  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
6148  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
6149  /* --- 7 */
6150  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
6151  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
6152  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
6153  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6154  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
6155  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
6156  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
6157  "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */
6158  "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */
6159  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
6160  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
6161  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
6162  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
6163  /* --- */
6164  "movq %%mm7, %%mm3 \n\t" /* copy MM7 into MM3 */
6165  "psrlq $32, %%mm7 \n\t" /* shift 2 left words to the right */
6166  "paddsw %%mm3, %%mm7 \n\t" /* add 2 left and 2 right result words */
6167  "movq %%mm7, %%mm2 \n\t" /* copy MM7 into MM2 */
6168  "psrlq $16, %%mm7 \n\t" /* shift 1 left word to the right */
6169  "paddsw %%mm2, %%mm7 \n\t" /* add 1 left and 1 right result words */
6170  "movd %%eax, %%mm1 \n\t" /* save EAX in MM1 */
6171  "packuswb %%mm0, %%mm7 \n\t" /* pack division result with saturation */
6172  "movd %%mm7, %%eax \n\t" /* copy saturated result into EAX */
6173  "mov %%al, (%%edi) \n\t" /* copy a byte result into Dest */
6174  "movd %%mm1, %%eax \n\t" /* restore saved EAX */
6175  /* -- */
6176  "movd %%mm6, %%esi \n\t" /* move Src pointer to the top pixel */
6177  "sub $104, %%edx \n\t" /* EDX = Kernel address */
6178  "inc %%esi \n\t" /* move Src pointer to the next pixel */
6179  "inc %%edi \n\t" /* move Dest pointer to the next pixel */
6180  /* --- */
6181  "dec %%ecx \n\t" /* decrease loop counter COLUMNS */
6182  "jnz .L10382 \n\t" /* check loop termination, proceed if required */
6183  "add $6, %%esi \n\t" /* move to the next row in Src */
6184  "add $6, %%edi \n\t" /* move to the next row in Dest */
6185  "dec %%ebx \n\t" /* decrease loop counter ROWS */
6186  "jnz .L10380 \n\t" /* check loop termination, proceed if required */
6187  /* --- */
6188  "emms \n\t" /* exit MMX state */
6189  "popa \n\t":"=m" (Dest) /* %0 */
6190  :"m"(Src), /* %1 */
6191  "m"(rows), /* %2 */
6192  "m"(columns), /* %3 */
6193  "m"(Kernel), /* %4 */
6194  "m"(NRightShift) /* %5 */
6195  );
6196 #endif
6197 #endif
6198  return (0);
6199  } else {
6200  /* No non-MMX implementation yet */
6201  return (-1);
6202  }
6203 }
6204 
6219 int SDL_imageFilterConvolveKernel9x9ShiftRight(unsigned char *Src, unsigned char *Dest, int rows, int columns,
6220  signed short *Kernel, unsigned char NRightShift)
6221 {
6222  /* Validate input parameters */
6223  if ((Src == NULL) || (Dest == NULL) || (Kernel == NULL))
6224  return(-1);
6225 
6226  if ((columns < 9) || (rows < 9) || (NRightShift > 7))
6227  return (-1);
6228 
6229  if ((SDL_imageFilterMMXdetect())) {
6230 //#ifdef USE_MMX
6231 #if defined(USE_MMX) && defined(i386)
6232 #if !defined(GCC__)
6233  __asm
6234  {
6235  pusha
6236  pxor mm0, mm0 /* zero MM0 */
6237  xor ebx, ebx /* zero EBX */
6238  mov bl, NRightShift /* load NRightShift into BL */
6239  movd mm5, ebx /* copy NRightShift into MM5 */
6240  mov edx, Kernel /* load Kernel address into EDX */
6241  mov esi, Src /* load Src address to ESI */
6242  mov edi, Dest /* load Dest address to EDI */
6243  add edi, 4 /* 4 column offset from the left edge */
6244  mov eax, columns /* load columns into EAX */
6245  add edi, eax /* 4 row offset from the top edge */
6246  add edi, eax
6247  add edi, eax
6248  add edi, eax
6249  mov ebx, rows /* initialize ROWS counter */
6250  sub ebx, 8 /* do not use first 4 and last 4 rows */
6251  /* ---, */
6252 L10390:
6253  mov ecx, eax /* initialize COLUMNS counter */
6254  sub ecx, 8 /* do not use first 4 and last 4 columns */
6255  align 16 /* 16 byte alignment of the loop entry */
6256 L10392:
6257  pxor mm7, mm7 /* zero MM7 (accumulator) */
6258  movd mm6, esi /* save ESI in MM6 */
6259  /* --- 1 */
6260  movq mm1, [esi] /* load 8 bytes of the Src */
6261  movq mm2, mm1 /* copy MM1 into MM2 */
6262  inc esi /* move pointer to the next 8 bytes of Src */
6263  movq mm3, [edx] /* load 4 words of Kernel */
6264  add edx, 8 /* move pointer to other 4 words */
6265  movq mm4, [edx] /* load 4 words of Kernel */
6266  add edx, 8 /* move pointer to other 4 words */
6267  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
6268  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
6269  psrlw mm1, mm5 /* shift right each pixel NshiftRight times */
6270  psrlw mm2, mm5 /* shift right each pixel NshiftRight times */
6271  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
6272  pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */
6273  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
6274  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
6275  movq mm1, [esi] /* load 8 bytes of the Src */
6276  dec esi
6277  add esi, eax /* move Src pointer 1 row below */
6278  movq mm3, [edx] /* load 4 words of Kernel */
6279  add edx, 8 /* move pointer to other 4 words */
6280  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
6281  psrlw mm1, mm5 /* shift right each pixel NshiftRight times */
6282  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
6283  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
6284  /* --- 2 */
6285  movq mm1, [esi] /* load 8 bytes of the Src */
6286  movq mm2, mm1 /* copy MM1 into MM2 */
6287  inc esi /* move pointer to the next 8 bytes of Src */
6288  movq mm3, [edx] /* load 4 words of Kernel */
6289  add edx, 8 /* move pointer to other 4 words */
6290  movq mm4, [edx] /* load 4 words of Kernel */
6291  add edx, 8 /* move pointer to other 4 words */
6292  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
6293  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
6294  psrlw mm1, mm5 /* shift right each pixel NshiftRight times */
6295  psrlw mm2, mm5 /* shift right each pixel NshiftRight times */
6296  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
6297  pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */
6298  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
6299  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
6300  movq mm1, [esi] /* load 8 bytes of the Src */
6301  dec esi
6302  add esi, eax /* move Src pointer 1 row below */
6303  movq mm3, [edx] /* load 4 words of Kernel */
6304  add edx, 8 /* move pointer to other 4 words */
6305  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
6306  psrlw mm1, mm5 /* shift right each pixel NshiftRight times */
6307  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
6308  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
6309  /* --- 3 */
6310  movq mm1, [esi] /* load 8 bytes of the Src */
6311  movq mm2, mm1 /* copy MM1 into MM2 */
6312  inc esi /* move pointer to the next 8 bytes of Src */
6313  movq mm3, [edx] /* load 4 words of Kernel */
6314  add edx, 8 /* move pointer to other 4 words */
6315  movq mm4, [edx] /* load 4 words of Kernel */
6316  add edx, 8 /* move pointer to other 4 words */
6317  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
6318  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
6319  psrlw mm1, mm5 /* shift right each pixel NshiftRight times */
6320  psrlw mm2, mm5 /* shift right each pixel NshiftRight times */
6321  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
6322  pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */
6323  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
6324  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
6325  movq mm1, [esi] /* load 8 bytes of the Src */
6326  dec esi
6327  add esi, eax /* move Src pointer 1 row below */
6328  movq mm3, [edx] /* load 4 words of Kernel */
6329  add edx, 8 /* move pointer to other 4 words */
6330  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
6331  psrlw mm1, mm5 /* shift right each pixel NshiftRight times */
6332  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
6333  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
6334  /* --- 4 */
6335  movq mm1, [esi] /* load 8 bytes of the Src */
6336  movq mm2, mm1 /* copy MM1 into MM2 */
6337  inc esi /* move pointer to the next 8 bytes of Src */
6338  movq mm3, [edx] /* load 4 words of Kernel */
6339  add edx, 8 /* move pointer to other 4 words */
6340  movq mm4, [edx] /* load 4 words of Kernel */
6341  add edx, 8 /* move pointer to other 4 words */
6342  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
6343  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
6344  psrlw mm1, mm5 /* shift right each pixel NshiftRight times */
6345  psrlw mm2, mm5 /* shift right each pixel NshiftRight times */
6346  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
6347  pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */
6348  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
6349  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
6350  movq mm1, [esi] /* load 8 bytes of the Src */
6351  dec esi
6352  add esi, eax /* move Src pointer 1 row below */
6353  movq mm3, [edx] /* load 4 words of Kernel */
6354  add edx, 8 /* move pointer to other 4 words */
6355  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
6356  psrlw mm1, mm5 /* shift right each pixel NshiftRight times */
6357  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
6358  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
6359  /* --- 5 */
6360  movq mm1, [esi] /* load 8 bytes of the Src */
6361  movq mm2, mm1 /* copy MM1 into MM2 */
6362  inc esi /* move pointer to the next 8 bytes of Src */
6363  movq mm3, [edx] /* load 4 words of Kernel */
6364  add edx, 8 /* move pointer to other 4 words */
6365  movq mm4, [edx] /* load 4 words of Kernel */
6366  add edx, 8 /* move pointer to other 4 words */
6367  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
6368  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
6369  psrlw mm1, mm5 /* shift right each pixel NshiftRight times */
6370  psrlw mm2, mm5 /* shift right each pixel NshiftRight times */
6371  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
6372  pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */
6373  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
6374  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
6375  movq mm1, [esi] /* load 8 bytes of the Src */
6376  dec esi
6377  add esi, eax /* move Src pointer 1 row below */
6378  movq mm3, [edx] /* load 4 words of Kernel */
6379  add edx, 8 /* move pointer to other 4 words */
6380  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
6381  psrlw mm1, mm5 /* shift right each pixel NshiftRight times */
6382  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
6383  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
6384  /* --- 6 */
6385  movq mm1, [esi] /* load 8 bytes of the Src */
6386  movq mm2, mm1 /* copy MM1 into MM2 */
6387  inc esi /* move pointer to the next 8 bytes of Src */
6388  movq mm3, [edx] /* load 4 words of Kernel */
6389  add edx, 8 /* move pointer to other 4 words */
6390  movq mm4, [edx] /* load 4 words of Kernel */
6391  add edx, 8 /* move pointer to other 4 words */
6392  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
6393  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
6394  psrlw mm1, mm5 /* shift right each pixel NshiftRight times */
6395  psrlw mm2, mm5 /* shift right each pixel NshiftRight times */
6396  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
6397  pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */
6398  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
6399  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
6400  movq mm1, [esi] /* load 8 bytes of the Src */
6401  dec esi
6402  add esi, eax /* move Src pointer 1 row below */
6403  movq mm3, [edx] /* load 4 words of Kernel */
6404  add edx, 8 /* move pointer to other 4 words */
6405  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
6406  psrlw mm1, mm5 /* shift right each pixel NshiftRight times */
6407  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
6408  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
6409  /* --- 7 */
6410  movq mm1, [esi] /* load 8 bytes of the Src */
6411  movq mm2, mm1 /* copy MM1 into MM2 */
6412  inc esi /* move pointer to the next 8 bytes of Src */
6413  movq mm3, [edx] /* load 4 words of Kernel */
6414  add edx, 8 /* move pointer to other 4 words */
6415  movq mm4, [edx] /* load 4 words of Kernel */
6416  add edx, 8 /* move pointer to other 4 words */
6417  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
6418  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
6419  psrlw mm1, mm5 /* shift right each pixel NshiftRight times */
6420  psrlw mm2, mm5 /* shift right each pixel NshiftRight times */
6421  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
6422  pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */
6423  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
6424  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
6425  movq mm1, [esi] /* load 8 bytes of the Src */
6426  dec esi
6427  add esi, eax /* move Src pointer 1 row below */
6428  movq mm3, [edx] /* load 4 words of Kernel */
6429  add edx, 8 /* move pointer to other 4 words */
6430  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
6431  psrlw mm1, mm5 /* shift right each pixel NshiftRight times */
6432  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
6433  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
6434  /* --- 8 */
6435  movq mm1, [esi] /* load 8 bytes of the Src */
6436  movq mm2, mm1 /* copy MM1 into MM2 */
6437  inc esi /* move pointer to the next 8 bytes of Src */
6438  movq mm3, [edx] /* load 4 words of Kernel */
6439  add edx, 8 /* move pointer to other 4 words */
6440  movq mm4, [edx] /* load 4 words of Kernel */
6441  add edx, 8 /* move pointer to other 4 words */
6442  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
6443  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
6444  psrlw mm1, mm5 /* shift right each pixel NshiftRight times */
6445  psrlw mm2, mm5 /* shift right each pixel NshiftRight times */
6446  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
6447  pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */
6448  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
6449  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
6450  movq mm1, [esi] /* load 8 bytes of the Src */
6451  dec esi
6452  add esi, eax /* move Src pointer 1 row below */
6453  movq mm3, [edx] /* load 4 words of Kernel */
6454  add edx, 8 /* move pointer to other 4 words */
6455  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
6456  psrlw mm1, mm5 /* shift right each pixel NshiftRight times */
6457  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
6458  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
6459  /* --- 9 */
6460  movq mm1, [esi] /* load 8 bytes of the Src */
6461  movq mm2, mm1 /* copy MM1 into MM2 */
6462  inc esi /* move pointer to the next 8 bytes of Src */
6463  movq mm3, [edx] /* load 4 words of Kernel */
6464  add edx, 8 /* move pointer to other 4 words */
6465  movq mm4, [edx] /* load 4 words of Kernel */
6466  add edx, 8 /* move pointer to other 4 words */
6467  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
6468  punpckhbw mm2, mm0 /* unpack second 4 bytes into words */
6469  psrlw mm1, mm5 /* shift right each pixel NshiftRight times */
6470  psrlw mm2, mm5 /* shift right each pixel NshiftRight times */
6471  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
6472  pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */
6473  paddsw mm1, mm2 /* add 4 words of the high and low bytes */
6474  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
6475  movq mm1, [esi] /* load 8 bytes of the Src */
6476  movq mm3, [edx] /* load 4 words of Kernel */
6477  punpcklbw mm1, mm0 /* unpack first 4 bytes into words */
6478  psrlw mm1, mm5 /* shift right each pixel NshiftRight times */
6479  pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */
6480  paddsw mm7, mm1 /* add MM1 to accumulator MM7 */
6481  /* ---, */
6482  movq mm3, mm7 /* copy MM7 into MM3 */
6483  psrlq mm7, 32 /* shift 2 left words to the right */
6484  paddsw mm7, mm3 /* add 2 left and 2 right result words */
6485  movq mm2, mm7 /* copy MM7 into MM2 */
6486  psrlq mm7, 16 /* shift 1 left word to the right */
6487  paddsw mm7, mm2 /* add 1 left and 1 right result words */
6488  movd mm1, eax /* save EAX in MM1 */
6489  packuswb mm7, mm0 /* pack division result with saturation */
6490  movd eax, mm7 /* copy saturated result into EAX */
6491  mov [edi], al /* copy a byte result into Dest */
6492  movd eax, mm1 /* restore saved EAX */
6493  /* --, */
6494  movd esi, mm6 /* move Src pointer to the top pixel */
6495  sub edx, 208 /* EDX = Kernel address */
6496  inc esi /* move Src pointer to the next pixel */
6497  inc edi /* move Dest pointer to the next pixel */
6498  /* ---, */
6499  dec ecx /* decrease loop counter COLUMNS */
6500  jnz L10392 /* check loop termination, proceed if required */
6501  add esi, 8 /* move to the next row in Src */
6502  add edi, 8 /* move to the next row in Dest */
6503  dec ebx /* decrease loop counter ROWS */
6504  jnz L10390 /* check loop termination, proceed if required */
6505  /* ---, */
6506  emms /* exit MMX state */
6507  popa
6508  }
6509 #else
6510  asm volatile
6511  ("pusha \n\t" "pxor %%mm0, %%mm0 \n\t" /* zero MM0 */
6512  "xor %%ebx, %%ebx \n\t" /* zero EBX */
6513  "mov %5, %%bl \n\t" /* load NRightShift into BL */
6514  "movd %%ebx, %%mm5 \n\t" /* copy NRightShift into MM5 */
6515  "mov %4, %%edx \n\t" /* load Kernel address into EDX */
6516  "mov %1, %%esi \n\t" /* load Src address to ESI */
6517  "mov %0, %%edi \n\t" /* load Dest address to EDI */
6518  "add $4, %%edi \n\t" /* 4 column offset from the left edge */
6519  "mov %3, %%eax \n\t" /* load columns into EAX */
6520  "add %%eax, %%edi \n\t" /* 4 row offset from the top edge */
6521  "add %%eax, %%edi \n\t" "add %%eax, %%edi \n\t" "add %%eax, %%edi \n\t" "mov %2, %%ebx \n\t" /* initialize ROWS counter */
6522  "sub $8, %%ebx \n\t" /* do not use first 4 and last 4 rows */
6523  /* --- */
6524  ".L10390: \n\t" "mov %%eax, %%ecx \n\t" /* initialize COLUMNS counter */
6525  "sub $8, %%ecx \n\t" /* do not use first 4 and last 4 columns */
6526  ".align 16 \n\t" /* 16 byte alignment of the loop entry */
6527  ".L10392: \n\t" "pxor %%mm7, %%mm7 \n\t" /* zero MM7 (accumulator) */
6528  "movd %%esi, %%mm6 \n\t" /* save ESI in MM6 */
6529  /* --- 1 */
6530  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
6531  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
6532  "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */
6533  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
6534  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6535  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
6536  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6537  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
6538  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
6539  "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */
6540  "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */
6541  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
6542  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
6543  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
6544  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
6545  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
6546  "dec %%esi \n\t" "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
6547  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
6548  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6549  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
6550  "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */
6551  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
6552  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
6553  /* --- 2 */
6554  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
6555  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
6556  "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */
6557  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
6558  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6559  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
6560  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6561  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
6562  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
6563  "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */
6564  "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */
6565  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
6566  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
6567  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
6568  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
6569  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
6570  "dec %%esi \n\t" "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
6571  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
6572  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6573  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
6574  "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */
6575  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
6576  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
6577  /* --- 3 */
6578  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
6579  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
6580  "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */
6581  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
6582  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6583  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
6584  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6585  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
6586  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
6587  "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */
6588  "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */
6589  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
6590  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
6591  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
6592  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
6593  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
6594  "dec %%esi \n\t" "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
6595  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
6596  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6597  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
6598  "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */
6599  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
6600  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
6601  /* --- 4 */
6602  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
6603  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
6604  "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */
6605  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
6606  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6607  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
6608  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6609  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
6610  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
6611  "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */
6612  "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */
6613  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
6614  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
6615  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
6616  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
6617  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
6618  "dec %%esi \n\t" "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
6619  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
6620  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6621  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
6622  "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */
6623  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
6624  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
6625  /* --- 5 */
6626  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
6627  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
6628  "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */
6629  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
6630  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6631  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
6632  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6633  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
6634  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
6635  "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */
6636  "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */
6637  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
6638  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
6639  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
6640  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
6641  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
6642  "dec %%esi \n\t" "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
6643  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
6644  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6645  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
6646  "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */
6647  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
6648  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
6649  /* --- 6 */
6650  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
6651  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
6652  "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */
6653  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
6654  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6655  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
6656  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6657  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
6658  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
6659  "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */
6660  "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */
6661  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
6662  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
6663  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
6664  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
6665  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
6666  "dec %%esi \n\t" "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
6667  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
6668  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6669  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
6670  "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */
6671  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
6672  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
6673  /* --- 7 */
6674  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
6675  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
6676  "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */
6677  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
6678  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6679  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
6680  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6681  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
6682  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
6683  "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */
6684  "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */
6685  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
6686  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
6687  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
6688  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
6689  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
6690  "dec %%esi \n\t" "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
6691  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
6692  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6693  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
6694  "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */
6695  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
6696  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
6697  /* --- 8 */
6698  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
6699  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
6700  "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */
6701  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
6702  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6703  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
6704  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6705  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
6706  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
6707  "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */
6708  "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */
6709  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
6710  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
6711  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
6712  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
6713  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
6714  "dec %%esi \n\t" "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */
6715  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
6716  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6717  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
6718  "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */
6719  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
6720  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
6721  /* --- 9 */
6722  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
6723  "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */
6724  "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */
6725  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
6726  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6727  "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */
6728  "add $8, %%edx \n\t" /* move pointer to other 4 words */
6729  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
6730  "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */
6731  "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */
6732  "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */
6733  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
6734  "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */
6735  "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */
6736  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
6737  "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */
6738  "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */
6739  "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */
6740  "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */
6741  "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */
6742  "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */
6743  /* --- */
6744  "movq %%mm7, %%mm3 \n\t" /* copy MM7 into MM3 */
6745  "psrlq $32, %%mm7 \n\t" /* shift 2 left words to the right */
6746  "paddsw %%mm3, %%mm7 \n\t" /* add 2 left and 2 right result words */
6747  "movq %%mm7, %%mm2 \n\t" /* copy MM7 into MM2 */
6748  "psrlq $16, %%mm7 \n\t" /* shift 1 left word to the right */
6749  "paddsw %%mm2, %%mm7 \n\t" /* add 1 left and 1 right result words */
6750  "movd %%eax, %%mm1 \n\t" /* save EAX in MM1 */
6751  "packuswb %%mm0, %%mm7 \n\t" /* pack division result with saturation */
6752  "movd %%mm7, %%eax \n\t" /* copy saturated result into EAX */
6753  "mov %%al, (%%edi) \n\t" /* copy a byte result into Dest */
6754  "movd %%mm1, %%eax \n\t" /* restore saved EAX */
6755  /* -- */
6756  "movd %%mm6, %%esi \n\t" /* move Src pointer to the top pixel */
6757  "sub $208, %%edx \n\t" /* EDX = Kernel address */
6758  "inc %%esi \n\t" /* move Src pointer to the next pixel */
6759  "inc %%edi \n\t" /* move Dest pointer to the next pixel */
6760  /* --- */
6761  "dec %%ecx \n\t" /* decrease loop counter COLUMNS */
6762  "jnz .L10392 \n\t" /* check loop termination, proceed if required */
6763  "add $8, %%esi \n\t" /* move to the next row in Src */
6764  "add $8, %%edi \n\t" /* move to the next row in Dest */
6765  "dec %%ebx \n\t" /* decrease loop counter ROWS */
6766  "jnz .L10390 \n\t" /* check loop termination, proceed if required */
6767  /* --- */
6768  "emms \n\t" /* exit MMX state */
6769  "popa \n\t":"=m" (Dest) /* %0 */
6770  :"m"(Src), /* %1 */
6771  "m"(rows), /* %2 */
6772  "m"(columns), /* %3 */
6773  "m"(Kernel), /* %4 */
6774  "m"(NRightShift) /* %5 */
6775  );
6776 #endif
6777 #endif
6778  return (0);
6779  } else {
6780  /* No non-MMX implementation yet */
6781  return (-1);
6782  }
6783 }
6784 
6785 /* ------------------------------------------------------------------------------------ */
6786 
6799 int SDL_imageFilterSobelX(unsigned char *Src, unsigned char *Dest, int rows, int columns)
6800 {
6801  /* Validate input parameters */
6802  if ((Src == NULL) || (Dest == NULL))
6803  return(-1);
6804 
6805  if ((columns < 8) || (rows < 3))
6806  return (-1);
6807 
6808  if ((SDL_imageFilterMMXdetect())) {
6809 //#ifdef USE_MMX
6810 #if defined(USE_MMX) && defined(i386)
6811 #if !defined(GCC__)
6812  __asm
6813  {
6814  pusha
6815  pxor mm0, mm0 /* zero MM0 */
6816  mov eax, columns /* load columns into EAX */
6817  /* ---, */
6818  mov esi, Src /* ESI = Src row 0 address */
6819  mov edi, Dest /* load Dest address to EDI */
6820  add edi, eax /* EDI = EDI + columns */
6821  inc edi /* 1 byte offset from the left edge */
6822  mov edx, rows /* initialize ROWS counter */
6823  sub edx, 2 /* do not use first and last rows */
6824  /* ---, */
6825 L10400:
6826  mov ecx, eax /* initialize COLUMS counter */
6827  shr ecx, 3 /* EBX/8 (MMX loads 8 bytes at a time) */
6828  mov ebx, esi /* save ESI in EBX */
6829  movd mm1, edi /* save EDI in MM1 */
6830  align 16 /* 16 byte alignment of the loop entry */
6831 L10402:
6832  /* ---, */
6833  movq mm4, [esi] /* load 8 bytes from Src */
6834  movq mm5, mm4 /* save MM4 in MM5 */
6835  add esi, 2 /* move ESI pointer 2 bytes right */
6836  punpcklbw mm4, mm0 /* unpack 4 low bytes into words */
6837  punpckhbw mm5, mm0 /* unpack 4 high bytes into words */
6838  movq mm6, [esi] /* load 8 bytes from Src */
6839  movq mm7, mm6 /* save MM6 in MM7 */
6840  sub esi, 2 /* move ESI pointer back 2 bytes left */
6841  punpcklbw mm6, mm0 /* unpack 4 low bytes into words */
6842  punpckhbw mm7, mm0 /* unpack 4 high bytes into words */
6843  add esi, eax /* move to the next row of Src */
6844  movq mm2, [esi] /* load 8 bytes from Src */
6845  movq mm3, mm2 /* save MM2 in MM3 */
6846  add esi, 2 /* move ESI pointer 2 bytes right */
6847  punpcklbw mm2, mm0 /* unpack 4 low bytes into words */
6848  punpckhbw mm3, mm0 /* unpack 4 high bytes into words */
6849  paddw mm4, mm2 /* add 4 low bytes to accumolator MM4 */
6850  paddw mm5, mm3 /* add 4 high bytes to accumolator MM5 */
6851  paddw mm4, mm2 /* add 4 low bytes to accumolator MM4 */
6852  paddw mm5, mm3 /* add 4 high bytes to accumolator MM5 */
6853  movq mm2, [esi] /* load 8 bytes from Src */
6854  movq mm3, mm2 /* save MM2 in MM3 */
6855  sub esi, 2 /* move ESI pointer back 2 bytes left */
6856  punpcklbw mm2, mm0 /* unpack 4 low bytes into words */
6857  punpckhbw mm3, mm0 /* unpack 4 high bytes into words */
6858  paddw mm6, mm2 /* add 4 low bytes to accumolator MM6 */
6859  paddw mm7, mm3 /* add 4 high bytes to accumolator MM7 */
6860  paddw mm6, mm2 /* add 4 low bytes to accumolator MM6 */
6861  paddw mm7, mm3 /* add 4 high bytes to accumolator MM7 */
6862  add esi, eax /* move to the next row of Src */
6863  movq mm2, [esi] /* load 8 bytes from Src */
6864  movq mm3, mm2 /* save MM2 in MM3 */
6865  add esi, 2 /* move ESI pointer 2 bytes right */
6866  punpcklbw mm2, mm0 /* unpack 4 low bytes into words */
6867  punpckhbw mm3, mm0 /* unpack 4 high bytes into words */
6868  paddw mm4, mm2 /* add 4 low bytes to accumolator MM4 */
6869  paddw mm5, mm3 /* add 4 high bytes to accumolator MM5 */
6870  movq mm2, [esi] /* load 8 bytes from Src */
6871  movq mm3, mm2 /* save MM2 in MM3 */
6872  sub esi, 2 /* move ESI pointer back 2 bytes left */
6873  punpcklbw mm2, mm0 /* unpack 4 low bytes into words */
6874  punpckhbw mm3, mm0 /* unpack 4 high bytes into words */
6875  paddw mm6, mm2 /* add 4 low bytes to accumolator MM6 */
6876  paddw mm7, mm3 /* add 4 high bytes to accumolator MM7 */
6877  /* ---, */
6878  movq mm2, mm4 /* copy MM4 into MM2 */
6879  psrlq mm4, 32 /* shift 2 left words to the right */
6880  psubw mm4, mm2 /* MM4 = MM4 - MM2 */
6881  movq mm3, mm6 /* copy MM6 into MM3 */
6882  psrlq mm6, 32 /* shift 2 left words to the right */
6883  psubw mm6, mm3 /* MM6 = MM6 - MM3 */
6884  punpckldq mm4, mm6 /* combine 2 words of MM6 and 2 words of MM4 */
6885  movq mm2, mm5 /* copy MM6 into MM2 */
6886  psrlq mm5, 32 /* shift 2 left words to the right */
6887  psubw mm5, mm2 /* MM5 = MM5 - MM2 */
6888  movq mm3, mm7 /* copy MM7 into MM3 */
6889  psrlq mm7, 32 /* shift 2 left words to the right */
6890  psubw mm7, mm3 /* MM7 = MM7 - MM3 */
6891  punpckldq mm5, mm7 /* combine 2 words of MM7 and 2 words of MM5 */
6892  /* Take abs values of MM4 and MM5 */
6893  movq mm6, mm4 /* copy MM4 into MM6 */
6894  movq mm7, mm5 /* copy MM5 into MM7 */
6895  psraw mm6, 15 /* fill MM6 words with word sign bit */
6896  psraw mm7, 15 /* fill MM7 words with word sign bit */
6897  pxor mm4, mm6 /* take 1's compliment of only neg words */
6898  pxor mm5, mm7 /* take 1's compliment of only neg words */
6899  psubsw mm4, mm6 /* add 1 to only neg words, W-(-1) or W-0 */
6900  psubsw mm5, mm7 /* add 1 to only neg words, W-(-1) or W-0 */
6901  packuswb mm4, mm5 /* combine and pack/saturate MM5 and MM4 */
6902  movq [edi], mm4 /* store result in Dest */
6903  /* ---, */
6904  sub esi, eax /* move to the current top row in Src */
6905  sub esi, eax
6906  add esi, 8 /* move Src pointer to the next 8 pixels */
6907  add edi, 8 /* move Dest pointer to the next 8 pixels */
6908  /* ---, */
6909  dec ecx /* decrease loop counter COLUMNS */
6910  jnz L10402 /* check loop termination, proceed if required */
6911  mov esi, ebx /* restore most left current row Src address */
6912  movd edi, mm1 /* restore most left current row Dest address */
6913  add esi, eax /* move to the next row in Src */
6914  add edi, eax /* move to the next row in Dest */
6915  dec edx /* decrease loop counter ROWS */
6916  jnz L10400 /* check loop termination, proceed if required */
6917  /* ---, */
6918  emms /* exit MMX state */
6919  popa
6920  }
6921 #else
6922  asm volatile
6923  ("pusha \n\t" "pxor %%mm0, %%mm0 \n\t" /* zero MM0 */
6924  "mov %3, %%eax \n\t" /* load columns into EAX */
6925  /* --- */
6926  "mov %1, %%esi \n\t" /* ESI = Src row 0 address */
6927  "mov %0, %%edi \n\t" /* load Dest address to EDI */
6928  "add %%eax, %%edi \n\t" /* EDI = EDI + columns */
6929  "inc %%edi \n\t" /* 1 byte offset from the left edge */
6930  "mov %2, %%edx \n\t" /* initialize ROWS counter */
6931  "sub $2, %%edx \n\t" /* do not use first and last rows */
6932  /* --- */
6933  ".L10400: \n\t" "mov %%eax, %%ecx \n\t" /* initialize COLUMS counter */
6934  "shr $3, %%ecx \n\t" /* EBX/8 (MMX loads 8 bytes at a time) */
6935  "mov %%esi, %%ebx \n\t" /* save ESI in EBX */
6936  "movd %%edi, %%mm1 \n\t" /* save EDI in MM1 */
6937  ".align 16 \n\t" /* 16 byte alignment of the loop entry */
6938  ".L10402: \n\t"
6939  /* --- */
6940  "movq (%%esi), %%mm4 \n\t" /* load 8 bytes from Src */
6941  "movq %%mm4, %%mm5 \n\t" /* save MM4 in MM5 */
6942  "add $2, %%esi \n\t" /* move ESI pointer 2 bytes right */
6943  "punpcklbw %%mm0, %%mm4 \n\t" /* unpack 4 low bytes into words */
6944  "punpckhbw %%mm0, %%mm5 \n\t" /* unpack 4 high bytes into words */
6945  "movq (%%esi), %%mm6 \n\t" /* load 8 bytes from Src */
6946  "movq %%mm6, %%mm7 \n\t" /* save MM6 in MM7 */
6947  "sub $2, %%esi \n\t" /* move ESI pointer back 2 bytes left */
6948  "punpcklbw %%mm0, %%mm6 \n\t" /* unpack 4 low bytes into words */
6949  "punpckhbw %%mm0, %%mm7 \n\t" /* unpack 4 high bytes into words */
6950  "add %%eax, %%esi \n\t" /* move to the next row of Src */
6951  "movq (%%esi), %%mm2 \n\t" /* load 8 bytes from Src */
6952  "movq %%mm2, %%mm3 \n\t" /* save MM2 in MM3 */
6953  "add $2, %%esi \n\t" /* move ESI pointer 2 bytes right */
6954  "punpcklbw %%mm0, %%mm2 \n\t" /* unpack 4 low bytes into words */
6955  "punpckhbw %%mm0, %%mm3 \n\t" /* unpack 4 high bytes into words */
6956  "paddw %%mm2, %%mm4 \n\t" /* add 4 low bytes to accumolator MM4 */
6957  "paddw %%mm3, %%mm5 \n\t" /* add 4 high bytes to accumolator MM5 */
6958  "paddw %%mm2, %%mm4 \n\t" /* add 4 low bytes to accumolator MM4 */
6959  "paddw %%mm3, %%mm5 \n\t" /* add 4 high bytes to accumolator MM5 */
6960  "movq (%%esi), %%mm2 \n\t" /* load 8 bytes from Src */
6961  "movq %%mm2, %%mm3 \n\t" /* save MM2 in MM3 */
6962  "sub $2, %%esi \n\t" /* move ESI pointer back 2 bytes left */
6963  "punpcklbw %%mm0, %%mm2 \n\t" /* unpack 4 low bytes into words */
6964  "punpckhbw %%mm0, %%mm3 \n\t" /* unpack 4 high bytes into words */
6965  "paddw %%mm2, %%mm6 \n\t" /* add 4 low bytes to accumolator MM6 */
6966  "paddw %%mm3, %%mm7 \n\t" /* add 4 high bytes to accumolator MM7 */
6967  "paddw %%mm2, %%mm6 \n\t" /* add 4 low bytes to accumolator MM6 */
6968  "paddw %%mm3, %%mm7 \n\t" /* add 4 high bytes to accumolator MM7 */
6969  "add %%eax, %%esi \n\t" /* move to the next row of Src */
6970  "movq (%%esi), %%mm2 \n\t" /* load 8 bytes from Src */
6971  "movq %%mm2, %%mm3 \n\t" /* save MM2 in MM3 */
6972  "add $2, %%esi \n\t" /* move ESI pointer 2 bytes right */
6973  "punpcklbw %%mm0, %%mm2 \n\t" /* unpack 4 low bytes into words */
6974  "punpckhbw %%mm0, %%mm3 \n\t" /* unpack 4 high bytes into words */
6975  "paddw %%mm2, %%mm4 \n\t" /* add 4 low bytes to accumolator MM4 */
6976  "paddw %%mm3, %%mm5 \n\t" /* add 4 high bytes to accumolator MM5 */
6977  "movq (%%esi), %%mm2 \n\t" /* load 8 bytes from Src */
6978  "movq %%mm2, %%mm3 \n\t" /* save MM2 in MM3 */
6979  "sub $2, %%esi \n\t" /* move ESI pointer back 2 bytes left */
6980  "punpcklbw %%mm0, %%mm2 \n\t" /* unpack 4 low bytes into words */
6981  "punpckhbw %%mm0, %%mm3 \n\t" /* unpack 4 high bytes into words */
6982  "paddw %%mm2, %%mm6 \n\t" /* add 4 low bytes to accumolator MM6 */
6983  "paddw %%mm3, %%mm7 \n\t" /* add 4 high bytes to accumolator MM7 */
6984  /* --- */
6985  "movq %%mm4, %%mm2 \n\t" /* copy MM4 into MM2 */
6986  "psrlq $32, %%mm4 \n\t" /* shift 2 left words to the right */
6987  "psubw %%mm2, %%mm4 \n\t" /* MM4 = MM4 - MM2 */
6988  "movq %%mm6, %%mm3 \n\t" /* copy MM6 into MM3 */
6989  "psrlq $32, %%mm6 \n\t" /* shift 2 left words to the right */
6990  "psubw %%mm3, %%mm6 \n\t" /* MM6 = MM6 - MM3 */
6991  "punpckldq %%mm6, %%mm4 \n\t" /* combine 2 words of MM6 and 2 words of MM4 */
6992  "movq %%mm5, %%mm2 \n\t" /* copy MM6 into MM2 */
6993  "psrlq $32, %%mm5 \n\t" /* shift 2 left words to the right */
6994  "psubw %%mm2, %%mm5 \n\t" /* MM5 = MM5 - MM2 */
6995  "movq %%mm7, %%mm3 \n\t" /* copy MM7 into MM3 */
6996  "psrlq $32, %%mm7 \n\t" /* shift 2 left words to the right */
6997  "psubw %%mm3, %%mm7 \n\t" /* MM7 = MM7 - MM3 */
6998  "punpckldq %%mm7, %%mm5 \n\t" /* combine 2 words of MM7 and 2 words of MM5 */
6999  /* Take abs values of MM4 and MM5 */
7000  "movq %%mm4, %%mm6 \n\t" /* copy MM4 into MM6 */
7001  "movq %%mm5, %%mm7 \n\t" /* copy MM5 into MM7 */
7002  "psraw $15, %%mm6 \n\t" /* fill MM6 words with word sign bit */
7003  "psraw $15, %%mm7 \n\t" /* fill MM7 words with word sign bit */
7004  "pxor %%mm6, %%mm4 \n\t" /* take 1's compliment of only neg. words */
7005  "pxor %%mm7, %%mm5 \n\t" /* take 1's compliment of only neg. words */
7006  "psubsw %%mm6, %%mm4 \n\t" /* add 1 to only neg. words, W-(-1) or W-0 */
7007  "psubsw %%mm7, %%mm5 \n\t" /* add 1 to only neg. words, W-(-1) or W-0 */
7008  "packuswb %%mm5, %%mm4 \n\t" /* combine and pack/saturate MM5 and MM4 */
7009  "movq %%mm4, (%%edi) \n\t" /* store result in Dest */
7010  /* --- */
7011  "sub %%eax, %%esi \n\t" /* move to the current top row in Src */
7012  "sub %%eax, %%esi \n\t" "add $8, %%esi \n\t" /* move Src pointer to the next 8 pixels */
7013  "add $8, %%edi \n\t" /* move Dest pointer to the next 8 pixels */
7014  /* --- */
7015  "dec %%ecx \n\t" /* decrease loop counter COLUMNS */
7016  "jnz .L10402 \n\t" /* check loop termination, proceed if required */
7017  "mov %%ebx, %%esi \n\t" /* restore most left current row Src address */
7018  "movd %%mm1, %%edi \n\t" /* restore most left current row Dest address */
7019  "add %%eax, %%esi \n\t" /* move to the next row in Src */
7020  "add %%eax, %%edi \n\t" /* move to the next row in Dest */
7021  "dec %%edx \n\t" /* decrease loop counter ROWS */
7022  "jnz .L10400 \n\t" /* check loop termination, proceed if required */
7023  /* --- */
7024  "emms \n\t" /* exit MMX state */
7025  "popa \n\t":"=m" (Dest) /* %0 */
7026  :"m"(Src), /* %1 */
7027  "m"(rows), /* %2 */
7028  "m"(columns) /* %3 */
7029  );
7030 #endif
7031 #endif
7032  return (0);
7033  } else {
7034  /* No non-MMX implementation yet */
7035  return (-1);
7036  }
7037 }
7038 
7052 int SDL_imageFilterSobelXShiftRight(unsigned char *Src, unsigned char *Dest, int rows, int columns,
7053  unsigned char NRightShift)
7054 {
7055  /* Validate input parameters */
7056  if ((Src == NULL) || (Dest == NULL))
7057  return(-1);
7058  if ((columns < 8) || (rows < 3) || (NRightShift > 7))
7059  return (-1);
7060 
7061  if ((SDL_imageFilterMMXdetect())) {
7062 //#ifdef USE_MMX
7063 #if defined(USE_MMX) && defined(i386)
7064 #if !defined(GCC__)
7065  __asm
7066  {
7067  pusha
7068  pxor mm0, mm0 /* zero MM0 */
7069  mov eax, columns /* load columns into EAX */
7070  xor ebx, ebx /* zero EBX */
7071  mov bl, NRightShift /* load NRightShift into BL */
7072  movd mm1, ebx /* copy NRightShift into MM1 */
7073  /* ---, */
7074  mov esi, Src /* ESI = Src row 0 address */
7075  mov edi, Dest /* load Dest address to EDI */
7076  add edi, eax /* EDI = EDI + columns */
7077  inc edi /* 1 byte offset from the left edge */
7078  /* initialize ROWS counter */
7079  sub rows, 2 /* do not use first and last rows */
7080  /* ---, */
7081 L10410:
7082  mov ecx, eax /* initialize COLUMS counter */
7083  shr ecx, 3 /* EBX/8 (MMX loads 8 bytes at a time) */
7084  mov ebx, esi /* save ESI in EBX */
7085  mov edx, edi /* save EDI in EDX */
7086  align 16 /* 16 byte alignment of the loop entry */
7087 L10412:
7088  /* ---, */
7089  movq mm4, [esi] /* load 8 bytes from Src */
7090  movq mm5, mm4 /* save MM4 in MM5 */
7091  add esi, 2 /* move ESI pointer 2 bytes right */
7092  punpcklbw mm4, mm0 /* unpack 4 low bytes into words */
7093  punpckhbw mm5, mm0 /* unpack 4 high bytes into words */
7094  psrlw mm4, mm1 /* shift right each pixel NshiftRight times */
7095  psrlw mm5, mm1 /* shift right each pixel NshiftRight times */
7096  movq mm6, [esi] /* load 8 bytes from Src */
7097  movq mm7, mm6 /* save MM6 in MM7 */
7098  sub esi, 2 /* move ESI pointer back 2 bytes left */
7099  punpcklbw mm6, mm0 /* unpack 4 low bytes into words */
7100  punpckhbw mm7, mm0 /* unpack 4 high bytes into words */
7101  psrlw mm6, mm1 /* shift right each pixel NshiftRight times */
7102  psrlw mm7, mm1 /* shift right each pixel NshiftRight times */
7103  add esi, eax /* move to the next row of Src */
7104  movq mm2, [esi] /* load 8 bytes from Src */
7105  movq mm3, mm2 /* save MM2 in MM3 */
7106  add esi, 2 /* move ESI pointer 2 bytes right */
7107  punpcklbw mm2, mm0 /* unpack 4 low bytes into words */
7108  punpckhbw mm3, mm0 /* unpack 4 high bytes into words */
7109  psrlw mm2, mm1 /* shift right each pixel NshiftRight times */
7110  psrlw mm3, mm1 /* shift right each pixel NshiftRight times */
7111  paddw mm4, mm2 /* add 4 low bytes to accumolator MM4 */
7112  paddw mm5, mm3 /* add 4 high bytes to accumolator MM5 */
7113  paddw mm4, mm2 /* add 4 low bytes to accumolator MM4 */
7114  paddw mm5, mm3 /* add 4 high bytes to accumolator MM5 */
7115  movq mm2, [esi] /* load 8 bytes from Src */
7116  movq mm3, mm2 /* save MM2 in MM3 */
7117  sub esi, 2 /* move ESI pointer back 2 bytes left */
7118  punpcklbw mm2, mm0 /* unpack 4 low bytes into words */
7119  punpckhbw mm3, mm0 /* unpack 4 high bytes into words */
7120  psrlw mm2, mm1 /* shift right each pixel NshiftRight times */
7121  psrlw mm3, mm1 /* shift right each pixel NshiftRight times */
7122  paddw mm6, mm2 /* add 4 low bytes to accumolator MM6 */
7123  paddw mm7, mm3 /* add 4 high bytes to accumolator MM7 */
7124  paddw mm6, mm2 /* add 4 low bytes to accumolator MM6 */
7125  paddw mm7, mm3 /* add 4 high bytes to accumolator MM7 */
7126  add esi, eax /* move to the next row of Src */
7127  movq mm2, [esi] /* load 8 bytes from Src */
7128  movq mm3, mm2 /* save MM2 in MM3 */
7129  add esi, 2 /* move ESI pointer 2 bytes right */
7130  punpcklbw mm2, mm0 /* unpack 4 low bytes into words */
7131  punpckhbw mm3, mm0 /* unpack 4 high bytes into words */
7132  psrlw mm2, mm1 /* shift right each pixel NshiftRight times */
7133  psrlw mm3, mm1 /* shift right each pixel NshiftRight times */
7134  paddw mm4, mm2 /* add 4 low bytes to accumolator MM4 */
7135  paddw mm5, mm3 /* add 4 high bytes to accumolator MM5 */
7136  movq mm2, [esi] /* load 8 bytes from Src */
7137  movq mm3, mm2 /* save MM2 in MM3 */
7138  sub esi, 2 /* move ESI pointer back 2 bytes left */
7139  punpcklbw mm2, mm0 /* unpack 4 low bytes into words */
7140  punpckhbw mm3, mm0 /* unpack 4 high bytes into words */
7141  psrlw mm2, mm1 /* shift right each pixel NshiftRight times */
7142  psrlw mm3, mm1 /* shift right each pixel NshiftRight times */
7143  paddw mm6, mm2 /* add 4 low bytes to accumolator MM6 */
7144  paddw mm7, mm3 /* add 4 high bytes to accumolator MM7 */
7145  /* ---, */
7146  movq mm2, mm4 /* copy MM4 into MM2 */
7147  psrlq mm4, 32 /* shift 2 left words to the right */
7148  psubw mm4, mm2 /* MM4 = MM4 - MM2 */
7149  movq mm3, mm6 /* copy MM6 into MM3 */
7150  psrlq mm6, 32 /* shift 2 left words to the right */
7151  psubw mm6, mm3 /* MM6 = MM6 - MM3 */
7152  punpckldq mm4, mm6 /* combine 2 words of MM6 and 2 words of MM4 */
7153  movq mm2, mm5 /* copy MM6 into MM2 */
7154  psrlq mm5, 32 /* shift 2 left words to the right */
7155  psubw mm5, mm2 /* MM5 = MM5 - MM2 */
7156  movq mm3, mm7 /* copy MM7 into MM3 */
7157  psrlq mm7, 32 /* shift 2 left words to the right */
7158  psubw mm7, mm3 /* MM7 = MM7 - MM3 */
7159  punpckldq mm5, mm7 /* combine 2 words of MM7 and 2 words of MM5 */
7160  /* Take abs values of MM4 and MM5 */
7161  movq mm6, mm4 /* copy MM4 into MM6 */
7162  movq mm7, mm5 /* copy MM5 into MM7 */
7163  psraw mm6, 15 /* fill MM6 words with word sign bit */
7164  psraw mm7, 15 /* fill MM7 words with word sign bit */
7165  pxor mm4, mm6 /* take 1's compliment of only neg words */
7166  pxor mm5, mm7 /* take 1's compliment of only neg words */
7167  psubsw mm4, mm6 /* add 1 to only neg words, W-(-1) or W-0 */
7168  psubsw mm5, mm7 /* add 1 to only neg words, W-(-1) or W-0 */
7169  packuswb mm4, mm5 /* combine and pack/saturate MM5 and MM4 */
7170  movq [edi], mm4 /* store result in Dest */
7171  /* ---, */
7172  sub esi, eax /* move to the current top row in Src */
7173  sub esi, eax
7174  add esi, 8 /* move Src pointer to the next 8 pixels */
7175  add edi, 8 /* move Dest pointer to the next 8 pixels */
7176  /* ---, */
7177  dec ecx /* decrease loop counter COLUMNS */
7178  jnz L10412 /* check loop termination, proceed if required */
7179  mov esi, ebx /* restore most left current row Src address */
7180  mov edi, edx /* restore most left current row Dest address */
7181  add esi, eax /* move to the next row in Src */
7182  add edi, eax /* move to the next row in Dest */
7183  dec rows /* decrease loop counter ROWS */
7184  jnz L10410 /* check loop termination, proceed if required */
7185  /* ---, */
7186  emms /* exit MMX state */
7187  popa
7188  }
7189 #else
7190  asm volatile
7191  ("pusha \n\t" "pxor %%mm0, %%mm0 \n\t" /* zero MM0 */
7192  "mov %3, %%eax \n\t" /* load columns into EAX */
7193  "xor %%ebx, %%ebx \n\t" /* zero EBX */
7194  "mov %4, %%bl \n\t" /* load NRightShift into BL */
7195  "movd %%ebx, %%mm1 \n\t" /* copy NRightShift into MM1 */
7196  /* --- */
7197  "mov %1, %%esi \n\t" /* ESI = Src row 0 address */
7198  "mov %0, %%edi \n\t" /* load Dest address to EDI */
7199  "add %%eax, %%edi \n\t" /* EDI = EDI + columns */
7200  "inc %%edi \n\t" /* 1 byte offset from the left edge */
7201  /* initialize ROWS counter */
7202  "subl $2, %2 \n\t" /* do not use first and last rows */
7203  /* --- */
7204  ".L10410: \n\t" "mov %%eax, %%ecx \n\t" /* initialize COLUMS counter */
7205  "shr $3, %%ecx \n\t" /* EBX/8 (MMX loads 8 bytes at a time) */
7206  "mov %%esi, %%ebx \n\t" /* save ESI in EBX */
7207  "mov %%edi, %%edx \n\t" /* save EDI in EDX */
7208  ".align 16 \n\t" /* 16 byte alignment of the loop entry */
7209  ".L10412: \n\t"
7210  /* --- */
7211  "movq (%%esi), %%mm4 \n\t" /* load 8 bytes from Src */
7212  "movq %%mm4, %%mm5 \n\t" /* save MM4 in MM5 */
7213  "add $2, %%esi \n\t" /* move ESI pointer 2 bytes right */
7214  "punpcklbw %%mm0, %%mm4 \n\t" /* unpack 4 low bytes into words */
7215  "punpckhbw %%mm0, %%mm5 \n\t" /* unpack 4 high bytes into words */
7216  "psrlw %%mm1, %%mm4 \n\t" /* shift right each pixel NshiftRight times */
7217  "psrlw %%mm1, %%mm5 \n\t" /* shift right each pixel NshiftRight times */
7218  "movq (%%esi), %%mm6 \n\t" /* load 8 bytes from Src */
7219  "movq %%mm6, %%mm7 \n\t" /* save MM6 in MM7 */
7220  "sub $2, %%esi \n\t" /* move ESI pointer back 2 bytes left */
7221  "punpcklbw %%mm0, %%mm6 \n\t" /* unpack 4 low bytes into words */
7222  "punpckhbw %%mm0, %%mm7 \n\t" /* unpack 4 high bytes into words */
7223  "psrlw %%mm1, %%mm6 \n\t" /* shift right each pixel NshiftRight times */
7224  "psrlw %%mm1, %%mm7 \n\t" /* shift right each pixel NshiftRight times */
7225  "add %%eax, %%esi \n\t" /* move to the next row of Src */
7226  "movq (%%esi), %%mm2 \n\t" /* load 8 bytes from Src */
7227  "movq %%mm2, %%mm3 \n\t" /* save MM2 in MM3 */
7228  "add $2, %%esi \n\t" /* move ESI pointer 2 bytes right */
7229  "punpcklbw %%mm0, %%mm2 \n\t" /* unpack 4 low bytes into words */
7230  "punpckhbw %%mm0, %%mm3 \n\t" /* unpack 4 high bytes into words */
7231  "psrlw %%mm1, %%mm2 \n\t" /* shift right each pixel NshiftRight times */
7232  "psrlw %%mm1, %%mm3 \n\t" /* shift right each pixel NshiftRight times */
7233  "paddw %%mm2, %%mm4 \n\t" /* add 4 low bytes to accumolator MM4 */
7234  "paddw %%mm3, %%mm5 \n\t" /* add 4 high bytes to accumolator MM5 */
7235  "paddw %%mm2, %%mm4 \n\t" /* add 4 low bytes to accumolator MM4 */
7236  "paddw %%mm3, %%mm5 \n\t" /* add 4 high bytes to accumolator MM5 */
7237  "movq (%%esi), %%mm2 \n\t" /* load 8 bytes from Src */
7238  "movq %%mm2, %%mm3 \n\t" /* save MM2 in MM3 */
7239  "sub $2, %%esi \n\t" /* move ESI pointer back 2 bytes left */
7240  "punpcklbw %%mm0, %%mm2 \n\t" /* unpack 4 low bytes into words */
7241  "punpckhbw %%mm0, %%mm3 \n\t" /* unpack 4 high bytes into words */
7242  "psrlw %%mm1, %%mm2 \n\t" /* shift right each pixel NshiftRight times */
7243  "psrlw %%mm1, %%mm3 \n\t" /* shift right each pixel NshiftRight times */
7244  "paddw %%mm2, %%mm6 \n\t" /* add 4 low bytes to accumolator MM6 */
7245  "paddw %%mm3, %%mm7 \n\t" /* add 4 high bytes to accumolator MM7 */
7246  "paddw %%mm2, %%mm6 \n\t" /* add 4 low bytes to accumolator MM6 */
7247  "paddw %%mm3, %%mm7 \n\t" /* add 4 high bytes to accumolator MM7 */
7248  "add %%eax, %%esi \n\t" /* move to the next row of Src */
7249  "movq (%%esi), %%mm2 \n\t" /* load 8 bytes from Src */
7250  "movq %%mm2, %%mm3 \n\t" /* save MM2 in MM3 */
7251  "add $2, %%esi \n\t" /* move ESI pointer 2 bytes right */
7252  "punpcklbw %%mm0, %%mm2 \n\t" /* unpack 4 low bytes into words */
7253  "punpckhbw %%mm0, %%mm3 \n\t" /* unpack 4 high bytes into words */
7254  "psrlw %%mm1, %%mm2 \n\t" /* shift right each pixel NshiftRight times */
7255  "psrlw %%mm1, %%mm3 \n\t" /* shift right each pixel NshiftRight times */
7256  "paddw %%mm2, %%mm4 \n\t" /* add 4 low bytes to accumolator MM4 */
7257  "paddw %%mm3, %%mm5 \n\t" /* add 4 high bytes to accumolator MM5 */
7258  "movq (%%esi), %%mm2 \n\t" /* load 8 bytes from Src */
7259  "movq %%mm2, %%mm3 \n\t" /* save MM2 in MM3 */
7260  "sub $2, %%esi \n\t" /* move ESI pointer back 2 bytes left */
7261  "punpcklbw %%mm0, %%mm2 \n\t" /* unpack 4 low bytes into words */
7262  "punpckhbw %%mm0, %%mm3 \n\t" /* unpack 4 high bytes into words */
7263  "psrlw %%mm1, %%mm2 \n\t" /* shift right each pixel NshiftRight times */
7264  "psrlw %%mm1, %%mm3 \n\t" /* shift right each pixel NshiftRight times */
7265  "paddw %%mm2, %%mm6 \n\t" /* add 4 low bytes to accumolator MM6 */
7266  "paddw %%mm3, %%mm7 \n\t" /* add 4 high bytes to accumolator MM7 */
7267  /* --- */
7268  "movq %%mm4, %%mm2 \n\t" /* copy MM4 into MM2 */
7269  "psrlq $32, %%mm4 \n\t" /* shift 2 left words to the right */
7270  "psubw %%mm2, %%mm4 \n\t" /* MM4 = MM4 - MM2 */
7271  "movq %%mm6, %%mm3 \n\t" /* copy MM6 into MM3 */
7272  "psrlq $32, %%mm6 \n\t" /* shift 2 left words to the right */
7273  "psubw %%mm3, %%mm6 \n\t" /* MM6 = MM6 - MM3 */
7274  "punpckldq %%mm6, %%mm4 \n\t" /* combine 2 words of MM6 and 2 words of MM4 */
7275  "movq %%mm5, %%mm2 \n\t" /* copy MM6 into MM2 */
7276  "psrlq $32, %%mm5 \n\t" /* shift 2 left words to the right */
7277  "psubw %%mm2, %%mm5 \n\t" /* MM5 = MM5 - MM2 */
7278  "movq %%mm7, %%mm3 \n\t" /* copy MM7 into MM3 */
7279  "psrlq $32, %%mm7 \n\t" /* shift 2 left words to the right */
7280  "psubw %%mm3, %%mm7 \n\t" /* MM7 = MM7 - MM3 */
7281  "punpckldq %%mm7, %%mm5 \n\t" /* combine 2 words of MM7 and 2 words of MM5 */
7282  /* Take abs values of MM4 and MM5 */
7283  "movq %%mm4, %%mm6 \n\t" /* copy MM4 into MM6 */
7284  "movq %%mm5, %%mm7 \n\t" /* copy MM5 into MM7 */
7285  "psraw $15, %%mm6 \n\t" /* fill MM6 words with word sign bit */
7286  "psraw $15, %%mm7 \n\t" /* fill MM7 words with word sign bit */
7287  "pxor %%mm6, %%mm4 \n\t" /* take 1's compliment of only neg. words */
7288  "pxor %%mm7, %%mm5 \n\t" /* take 1's compliment of only neg. words */
7289  "psubsw %%mm6, %%mm4 \n\t" /* add 1 to only neg. words, W-(-1) or W-0 */
7290  "psubsw %%mm7, %%mm5 \n\t" /* add 1 to only neg. words, W-(-1) or W-0 */
7291  "packuswb %%mm5, %%mm4 \n\t" /* combine and pack/saturate MM5 and MM4 */
7292  "movq %%mm4, (%%edi) \n\t" /* store result in Dest */
7293  /* --- */
7294  "sub %%eax, %%esi \n\t" /* move to the current top row in Src */
7295  "sub %%eax, %%esi \n\t" "add $8, %%esi \n\t" /* move Src pointer to the next 8 pixels */
7296  "add $8, %%edi \n\t" /* move Dest pointer to the next 8 pixels */
7297  /* --- */
7298  "dec %%ecx \n\t" /* decrease loop counter COLUMNS */
7299  "jnz .L10412 \n\t" /* check loop termination, proceed if required */
7300  "mov %%ebx, %%esi \n\t" /* restore most left current row Src address */
7301  "mov %%edx, %%edi \n\t" /* restore most left current row Dest address */
7302  "add %%eax, %%esi \n\t" /* move to the next row in Src */
7303  "add %%eax, %%edi \n\t" /* move to the next row in Dest */
7304  "decl %2 \n\t" /* decrease loop counter ROWS */
7305  "jnz .L10410 \n\t" /* check loop termination, proceed if required */
7306  /* --- */
7307  "emms \n\t" /* exit MMX state */
7308  "popa \n\t":"=m" (Dest) /* %0 */
7309  :"m"(Src), /* %1 */
7310  "m"(rows), /* %2 */
7311  "m"(columns), /* %3 */
7312  "m"(NRightShift) /* %4 */
7313  );
7314 #endif
7315 #endif
7316  return (0);
7317  } else {
7318  /* No non-MMX implementation yet */
7319  return (-1);
7320  }
7321 }
7322 
7327 {
7328 #ifdef USE_MMX
7329 #if !defined(GCC__)
7330  __asm
7331  { /* --- stack alignment --- */
7332  mov ebx, esp /* load ESP into EBX */
7333  sub ebx, 4 /* reserve space on stack for old value of ESP */
7334  and ebx, -32 /* align EBX along a 32 byte boundary */
7335  mov [ebx], esp /* save old value of ESP in stack, behind the bndry */
7336  mov esp, ebx /* align ESP along a 32 byte boundary */
7337  }
7338 #else
7339  asm volatile
7340  ( /* --- stack alignment --- */
7341  "mov %%esp, %%ebx \n\t" /* load ESP into EBX */
7342  "sub $4, %%ebx \n\t" /* reserve space on stack for old value of ESP */
7343  "and $-32, %%ebx \n\t" /* align EBX along a 32 byte boundary */
7344  "mov %%esp, (%%ebx) \n\t" /* save old value of ESP in stack, behind the bndry */
7345  "mov %%ebx, %%esp \n\t" /* align ESP along a 32 byte boundary */
7346  ::);
7347 #endif
7348 #endif
7349 }
7350 
7355 {
7356 #ifdef USE_MMX
7357 #if !defined(GCC__)
7358  __asm
7359  { /* --- restoring old stack --- */
7360  mov ebx, [esp] /* load old value of ESP */
7361  mov esp, ebx /* restore old value of ESP */
7362  }
7363 #else
7364  asm volatile
7365  ( /* --- restoring old stack --- */
7366  "mov (%%esp), %%ebx \n\t" /* load old value of ESP */
7367  "mov %%ebx, %%esp \n\t" /* restore old value of ESP */
7368  ::);
7369 #endif
7370 #endif
7371 }
int SDL_imageFilterShiftLeftByte(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
Filter using ShiftLeftByte: D = (S << N)
int SDL_imageFilterSobelXShiftRight(unsigned char *Src, unsigned char *Dest, int rows, int columns, unsigned char NRightShift)
Filter using SobelXShiftRight: Dij = saturation255( ... )
void SDL_imageFilterMMXon()
Enable MMX check for filter functions and use MMX code if available.
int SDL_imageFilterAddUint(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned int C)
Filter using AddUint: D = saturation255((S[i] + Cs[i % 4]), Cs=Swap32((uint)C)
int SDL_imageFilterConvolveKernel3x3ShiftRight(unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char NRightShift)
Filter using ConvolveKernel3x3ShiftRight: Dij = saturation0and255( ... )
int SDL_imageFilterDiv(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
Filter using Div: D = S1 / S2.
int SDL_imageFilterConvolveKernel5x5Divide(unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char Divisor)
Filter using ConvolveKernel5x5Divide: Dij = saturation0and255( ... )
int SDL_imageFilterMean(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
Filter using Mean: D = S1/2 + S2/2.
int SDL_imageFilterClipToRange(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char Tmin, unsigned char Tmax)
Filter using ClipToRange: D = (S >= Tmin) & (S <= Tmax) S:Tmin | Tmax.
int SDL_imageFilterSubByte(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C)
Filter using SubByte: D = saturation0(S - C)
int SDL_imageFilterShiftRight(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
Filter using ShiftRight: D = saturation0(S >> N)
int SDL_imageFilterConvolveKernel7x7Divide(unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char Divisor)
Filter using ConvolveKernel7x7Divide: Dij = saturation0and255( ... )
int SDL_imageFilterSubUint(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned int C)
Filter using SubUint: D = saturation0(S[i] - Cs[i % 4]), Cs=Swap32((uint)C)
int SDL_imageFilterConvolveKernel9x9Divide(unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char Divisor)
Filter using ConvolveKernel9x9Divide: Dij = saturation0and255( ... )
int SDL_imageFilterMultDivby4(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
Filter using MultDivby4: D = saturation255(S1/2 * S2/2)
int SDL_imageFilterMultNorASM(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength)
Internal ASM Filter using MultNor: D = S1 * S2.
#define SWAP_32(x)
Swaps the byte order in a 32bit integer (LSB becomes MSB, etc.).
int SDL_imageFilterBinarizeUsingThreshold(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char T)
Filter using BinarizeUsingThreshold: D = (S >= T) ? 255:0.
int SDL_imageFilterMultByByte(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C)
Filter using MultByByte: D = saturation255(S * C)
int SDL_imageFilterMultNor(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
Filter using MultNor: D = S1 * S2.
int SDL_imageFilterAbsDiff(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
Filter using AbsDiff: D = | S1 - S2 |.
int SDL_imageFilterBitOr(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
Filter using BitOr: D = S1 | S2.
int SDL_imageFilterAdd(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
Filter using Add: D = saturation255(S1 + S2)
int SDL_imageFilterMultDivby2(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
Filter using MultDivby2: D = saturation255(S1/2 * S2)
void SDL_imageFilterMMXoff()
Disable MMX check for filter functions and and force to use non-MMX C based code. ...
int SDL_imageFilterBitAnd(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
Filter using BitAnd: D = S1 & S2.
int SDL_imageFilterShiftRightUint(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
Filter using ShiftRightUint: D = saturation0((uint)S[i] >> N)
int SDL_imageFilterShiftLeft(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
Filter ShiftLeft: D = saturation255(S << N)
int SDL_imageFilterMult(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
Filter using Mult: D = saturation255(S1 * S2)
int SDL_imageFilterSub(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
Filter using Sub: D = saturation0(S1 - S2)
int SDL_imageFilterAddByteToHalf(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C)
Filter using AddByteToHalf: D = saturation255(S/2 + C)
int SDL_imageFilterSobelX(unsigned char *Src, unsigned char *Dest, int rows, int columns)
Filter using SobelX: Dij = saturation255( ... )
int SDL_imageFilterNormalizeLinear(unsigned char *Src, unsigned char *Dest, unsigned int length, int Cmin, int Cmax, int Nmin, int Nmax)
Filter using NormalizeLinear: D = saturation255((Nmax - Nmin)/(Cmax - Cmin)*(S - Cmin) + Nmin) ...
int SDL_imageFilterMMXdetect(void)
MMX detection routine (with override flag).
int SDL_imageFilterShiftLeftUint(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
Filter using ShiftLeftUint: D = ((uint)S << N)
int SDL_imageFilterSubByteMMX(unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char C)
Internal MMX Filter using SubByte: D = saturation0(S - C)
int SDL_imageFilterConvolveKernel7x7ShiftRight(unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char NRightShift)
Filter using ConvolveKernel7x7ShiftRight: Dij = saturation0and255( ... )
int SDL_imageFilterBitNegation(unsigned char *Src1, unsigned char *Dest, unsigned int length)
Filter using BitNegation: D = !S.
int SDL_imageFilterConvolveKernel5x5ShiftRight(unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char NRightShift)
Filter using ConvolveKernel5x5ShiftRight: Dij = saturation0and255( ... )
int SDL_imageFilterShiftRightAndMultByByte(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N, unsigned char C)
Filter using ShiftRightAndMultByByte: D = saturation255((S >> N) * C)
int SDL_imageFilterAddByte(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C)
Filter using AddByte: D = saturation255(S + C)
int SDL_imageFilterConvolveKernel3x3Divide(unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char Divisor)
Filter using ConvolveKernel3x3Divide: Dij = saturation0and255( ... )
void SDL_imageFilterRestoreStack(void)
Restore previously aligned stack.
void SDL_imageFilterAlignStack(void)
Align stack to 32 byte boundary,.
int SDL_imageFilterConvolveKernel9x9ShiftRight(unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char NRightShift)
Filter using ConvolveKernel9x9ShiftRight: Dij = saturation255( ... )
SDL2_gfx-1.0.4/Docs/html/_s_d_l2__image_filter_8h.html100777 0 0 253533 12632323332 15545 0 SDL2_gfx: /cygdrive/i/Sources/sdl2gfx/SDL2_imageFilter.h File Reference
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
/cygdrive/i/Sources/sdl2gfx/SDL2_imageFilter.h File Reference

Go to the source code of this file.

Macros

#define SDL2_IMAGEFILTER_SCOPE   extern
 

Functions

SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterMMXdetect (void)
 MMX detection routine (with override flag). More...
 
SDL2_IMAGEFILTER_SCOPE void SDL_imageFilterMMXoff (void)
 Disable MMX check for filter functions and and force to use non-MMX C based code. More...
 
SDL2_IMAGEFILTER_SCOPE void SDL_imageFilterMMXon (void)
 Enable MMX check for filter functions and use MMX code if available. More...
 
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterAdd (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
 Filter using Add: D = saturation255(S1 + S2) More...
 
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterMean (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
 Filter using Mean: D = S1/2 + S2/2. More...
 
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterSub (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
 Filter using Sub: D = saturation0(S1 - S2) More...
 
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterAbsDiff (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
 Filter using AbsDiff: D = | S1 - S2 |. More...
 
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterMult (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
 Filter using Mult: D = saturation255(S1 * S2) More...
 
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterMultNor (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
 Filter using MultNor: D = S1 * S2. More...
 
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterMultDivby2 (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
 Filter using MultDivby2: D = saturation255(S1/2 * S2) More...
 
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterMultDivby4 (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
 Filter using MultDivby4: D = saturation255(S1/2 * S2/2) More...
 
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterBitAnd (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
 Filter using BitAnd: D = S1 & S2. More...
 
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterBitOr (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
 Filter using BitOr: D = S1 | S2. More...
 
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterDiv (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
 Filter using Div: D = S1 / S2. More...
 
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterBitNegation (unsigned char *Src1, unsigned char *Dest, unsigned int length)
 Filter using BitNegation: D = !S. More...
 
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterAddByte (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C)
 Filter using AddByte: D = saturation255(S + C) More...
 
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterAddUint (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned int C)
 Filter using AddUint: D = saturation255((S[i] + Cs[i % 4]), Cs=Swap32((uint)C) More...
 
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterAddByteToHalf (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C)
 Filter using AddByteToHalf: D = saturation255(S/2 + C) More...
 
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterSubByte (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C)
 Filter using SubByte: D = saturation0(S - C) More...
 
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterSubUint (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned int C)
 Filter using SubUint: D = saturation0(S[i] - Cs[i % 4]), Cs=Swap32((uint)C) More...
 
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterShiftRight (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
 Filter using ShiftRight: D = saturation0(S >> N) More...
 
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterShiftRightUint (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
 Filter using ShiftRightUint: D = saturation0((uint)S[i] >> N) More...
 
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterMultByByte (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C)
 Filter using MultByByte: D = saturation255(S * C) More...
 
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterShiftRightAndMultByByte (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N, unsigned char C)
 Filter using ShiftRightAndMultByByte: D = saturation255((S >> N) * C) More...
 
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterShiftLeftByte (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
 Filter using ShiftLeftByte: D = (S << N) More...
 
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterShiftLeftUint (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
 Filter using ShiftLeftUint: D = ((uint)S << N) More...
 
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterShiftLeft (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
 Filter ShiftLeft: D = saturation255(S << N) More...
 
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterBinarizeUsingThreshold (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char T)
 Filter using BinarizeUsingThreshold: D = (S >= T) ? 255:0. More...
 
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterClipToRange (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char Tmin, unsigned char Tmax)
 Filter using ClipToRange: D = (S >= Tmin) & (S <= Tmax) S:Tmin | Tmax. More...
 
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterNormalizeLinear (unsigned char *Src, unsigned char *Dest, unsigned int length, int Cmin, int Cmax, int Nmin, int Nmax)
 Filter using NormalizeLinear: D = saturation255((Nmax - Nmin)/(Cmax - Cmin)*(S - Cmin) + Nmin) More...
 

Macro Definition Documentation

#define SDL2_IMAGEFILTER_SCOPE   extern

Definition at line 50 of file SDL2_imageFilter.h.

Function Documentation

SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterAbsDiff ( unsigned char *  Src1,
unsigned char *  Src2,
unsigned char *  Dest,
unsigned int  length 
)

Filter using AbsDiff: D = | S1 - S2 |.

Parameters
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
Returns
Returns 0 for success or -1 for error.

Definition at line 542 of file SDL2_imageFilter.c.

SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterAdd ( unsigned char *  Src1,
unsigned char *  Src2,
unsigned char *  Dest,
unsigned int  length 
)

Filter using Add: D = saturation255(S1 + S2)

Parameters
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
Returns
Returns 0 for success or -1 for error.

Definition at line 173 of file SDL2_imageFilter.c.

SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterAddByte ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  length,
unsigned char  C 
)

Filter using AddByte: D = saturation255(S + C)

Parameters
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
CConstant value to add (C).
Returns
Returns 0 for success or -1 for error.

Definition at line 1791 of file SDL2_imageFilter.c.

SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterAddByteToHalf ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  length,
unsigned char  C 
)

Filter using AddByteToHalf: D = saturation255(S/2 + C)

Parameters
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
CConstant to add (C).
Returns
Returns 0 for success or -1 for error.

Definition at line 2068 of file SDL2_imageFilter.c.

SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterAddUint ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  length,
unsigned int  C 
)

Filter using AddUint: D = saturation255((S[i] + Cs[i % 4]), Cs=Swap32((uint)C)

Parameters
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
CConstant to add (C).
Returns
Returns 0 for success or -1 for error.

Definition at line 1919 of file SDL2_imageFilter.c.

SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterBinarizeUsingThreshold ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  length,
unsigned char  T 
)

Filter using BinarizeUsingThreshold: D = (S >= T) ? 255:0.

Parameters
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
TThe threshold boundary (inclusive).
Returns
Returns 0 for success or -1 for error.

Definition at line 3534 of file SDL2_imageFilter.c.

SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterBitAnd ( unsigned char *  Src1,
unsigned char *  Src2,
unsigned char *  Dest,
unsigned int  length 
)

Filter using BitAnd: D = S1 & S2.

Parameters
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
Returns
Returns 0 for success or -1 for error.

Definition at line 1278 of file SDL2_imageFilter.c.

SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterBitNegation ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  length 
)

Filter using BitNegation: D = !S.

Parameters
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
Returns
Returns 0 for success or -1 for error.

Definition at line 1671 of file SDL2_imageFilter.c.

SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterBitOr ( unsigned char *  Src1,
unsigned char *  Src2,
unsigned char *  Dest,
unsigned int  length 
)

Filter using BitOr: D = S1 | S2.

Parameters
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
Returns
Returns 0 for success or -1 for error.

Definition at line 1392 of file SDL2_imageFilter.c.

SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterClipToRange ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  length,
unsigned char  Tmin,
unsigned char  Tmax 
)

Filter using ClipToRange: D = (S >= Tmin) & (S <= Tmax) S:Tmin | Tmax.

Parameters
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
TminLower (inclusive) boundary of the clipping range.
TmaxUpper (inclusive) boundary of the clipping range.
Returns
Returns 0 for success or -1 for error.

Definition at line 3691 of file SDL2_imageFilter.c.

SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterDiv ( unsigned char *  Src1,
unsigned char *  Src2,
unsigned char *  Dest,
unsigned int  length 
)

Filter using Div: D = S1 / S2.

Parameters
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
Returns
Returns 0 for success or -1 for error.

Definition at line 1549 of file SDL2_imageFilter.c.

SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterMean ( unsigned char *  Src1,
unsigned char *  Src2,
unsigned char *  Dest,
unsigned int  length 
)

Filter using Mean: D = S1/2 + S2/2.

Parameters
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
Returns
Returns 0 for success or -1 for error.

Definition at line 308 of file SDL2_imageFilter.c.

SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterMMXdetect ( void  )

MMX detection routine (with override flag).

Returns
1 of MMX was detected, 0 otherwise.

Definition at line 80 of file SDL2_imageFilter.c.

SDL2_IMAGEFILTER_SCOPE void SDL_imageFilterMMXoff ( void  )

Disable MMX check for filter functions and and force to use non-MMX C based code.

Definition at line 93 of file SDL2_imageFilter.c.

SDL2_IMAGEFILTER_SCOPE void SDL_imageFilterMMXon ( void  )

Enable MMX check for filter functions and use MMX code if available.

Definition at line 101 of file SDL2_imageFilter.c.

SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterMult ( unsigned char *  Src1,
unsigned char *  Src2,
unsigned char *  Dest,
unsigned int  length 
)

Filter using Mult: D = saturation255(S1 * S2)

Parameters
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
Returns
Returns 0 for success or -1 for error.

Definition at line 729 of file SDL2_imageFilter.c.

SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterMultByByte ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  length,
unsigned char  C 
)

Filter using MultByByte: D = saturation255(S * C)

Parameters
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
CConstant to multiply with (C).
Returns
Returns 0 for success or -1 for error.

Definition at line 2790 of file SDL2_imageFilter.c.

SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterMultDivby2 ( unsigned char *  Src1,
unsigned char *  Src2,
unsigned char *  Dest,
unsigned int  length 
)

Filter using MultDivby2: D = saturation255(S1/2 * S2)

Parameters
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
Returns
Returns 0 for success or -1 for error.

Definition at line 1000 of file SDL2_imageFilter.c.

SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterMultDivby4 ( unsigned char *  Src1,
unsigned char *  Src2,
unsigned char *  Dest,
unsigned int  length 
)

Filter using MultDivby4: D = saturation255(S1/2 * S2/2)

Parameters
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
Returns
Returns 0 for success or -1 for error.

Definition at line 1141 of file SDL2_imageFilter.c.

SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterMultNor ( unsigned char *  Src1,
unsigned char *  Src2,
unsigned char *  Dest,
unsigned int  length 
)

Filter using MultNor: D = S1 * S2.

Parameters
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
Returns
Returns 0 for success or -1 for error.

Definition at line 862 of file SDL2_imageFilter.c.

SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterNormalizeLinear ( unsigned char *  Src,
unsigned char *  Dest,
unsigned int  length,
int  Cmin,
int  Cmax,
int  Nmin,
int  Nmax 
)

Filter using NormalizeLinear: D = saturation255((Nmax - Nmin)/(Cmax - Cmin)*(S - Cmin) + Nmin)

Parameters
SrcPointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
CminNormalization constant.
CmaxNormalization constant.
NminNormalization constant.
NmaxNormalization constant.
Returns
Returns 0 for success or -1 for error.

Definition at line 3909 of file SDL2_imageFilter.c.

SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterShiftLeft ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  length,
unsigned char  N 
)

Filter ShiftLeft: D = saturation255(S << N)

Parameters
Src1Pointer to the start of the source byte array (S1).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
NNumber of bit-positions to shift (N). Valid range is 0 to 8.
Returns
Returns 0 for success or -1 for error.

Definition at line 3393 of file SDL2_imageFilter.c.

SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterShiftLeftByte ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  length,
unsigned char  N 
)

Filter using ShiftLeftByte: D = (S << N)

Parameters
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
NNumber of bit-positions to shift (N). Valid range is 0 to 8.
Returns
Returns 0 for success or -1 for error.

Definition at line 3093 of file SDL2_imageFilter.c.

SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterShiftLeftUint ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  length,
unsigned char  N 
)

Filter using ShiftLeftUint: D = ((uint)S << N)

Parameters
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
NNumber of bit-positions to shift (N). Valid range is 0 to 32.
Returns
Returns 0 for success or -1 for error.

Definition at line 3210 of file SDL2_imageFilter.c.

SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterShiftRight ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  length,
unsigned char  N 
)

Filter using ShiftRight: D = saturation0(S >> N)

Parameters
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
NNumber of bit-positions to shift (N). Valid range is 0 to 8.
Returns
Returns 0 for success or -1 for error.

Definition at line 2476 of file SDL2_imageFilter.c.

SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterShiftRightAndMultByByte ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  length,
unsigned char  N,
unsigned char  C 
)

Filter using ShiftRightAndMultByByte: D = saturation255((S >> N) * C)

Parameters
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
NNumber of bit-positions to shift (N). Valid range is 0 to 8.
CConstant to multiply with (C).
Returns
Returns 0 for success or -1 for error.

Definition at line 2943 of file SDL2_imageFilter.c.

SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterShiftRightUint ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  length,
unsigned char  N 
)

Filter using ShiftRightUint: D = saturation0((uint)S[i] >> N)

Parameters
Src1Pointer to the start of the source byte array (S1).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
NNumber of bit-positions to shift (N). Valid range is 0 to 32.
Returns
Returns 0 for success or -1 for error.

Definition at line 2594 of file SDL2_imageFilter.c.

SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterSub ( unsigned char *  Src1,
unsigned char *  Src2,
unsigned char *  Dest,
unsigned int  length 
)

Filter using Sub: D = saturation0(S1 - S2)

Parameters
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
Returns
Returns 0 for success or -1 for error.

Definition at line 422 of file SDL2_imageFilter.c.

SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterSubByte ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  length,
unsigned char  C 
)

Filter using SubByte: D = saturation0(S - C)

Parameters
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
CConstant to subtract (C).
Returns
Returns 0 for success or -1 for error.

Definition at line 2196 of file SDL2_imageFilter.c.

SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterSubUint ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  length,
unsigned int  C 
)

Filter using SubUint: D = saturation0(S[i] - Cs[i % 4]), Cs=Swap32((uint)C)

Parameters
Src1Pointer to the start of the source byte array (S1).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
CConstant to subtract (C).
Returns
Returns 0 for success or -1 for error.

Definition at line 2325 of file SDL2_imageFilter.c.

SDL2_gfx-1.0.4/Docs/html/_s_d_l2__image_filter_8h_source.html100777 0 0 163041 12632323332 17117 0 SDL2_gfx: /cygdrive/i/Sources/sdl2gfx/SDL2_imageFilter.h Source File
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
/cygdrive/i/Sources/sdl2gfx/SDL2_imageFilter.h
Go to the documentation of this file.
1 /*
2 
3 SDL2_imageFilter.h: byte-image "filter" routines
4 
5 Copyright (C) 2012-2014 Andreas Schiffler
6 
7 This software is provided 'as-is', without any express or implied
8 warranty. In no event will the authors be held liable for any damages
9 arising from the use of this software.
10 
11 Permission is granted to anyone to use this software for any purpose,
12 including commercial applications, and to alter it and redistribute it
13 freely, subject to the following restrictions:
14 
15 1. The origin of this software must not be misrepresented; you must not
16 claim that you wrote the original software. If you use this software
17 in a product, an acknowledgment in the product documentation would be
18 appreciated but is not required.
19 
20 2. Altered source versions must be plainly marked as such, and must not be
21 misrepresented as being the original software.
22 
23 3. This notice may not be removed or altered from any source
24 distribution.
25 
26 Andreas Schiffler -- aschiffler at ferzkopp dot net
27 
28 */
29 
30 #ifndef _SDL2_imageFilter_h
31 #define _SDL2_imageFilter_h
32 
33 /* Set up for C function definitions, even when using C++ */
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38  /* ---- Function Prototypes */
39 
40 #ifdef _MSC_VER
41 # if defined(DLL_EXPORT) && !defined(LIBSDL2_GFX_DLL_IMPORT)
42 # define SDL2_IMAGEFILTER_SCOPE __declspec(dllexport)
43 # else
44 # ifdef LIBSDL2_GFX_DLL_IMPORT
45 # define SDL2_IMAGEFILTER_SCOPE __declspec(dllimport)
46 # endif
47 # endif
48 #endif
49 #ifndef SDL2_IMAGEFILTER_SCOPE
50 # define SDL2_IMAGEFILTER_SCOPE extern
51 #endif
52 
53  /* Comments: */
54  /* 1.) MMX functions work best if all data blocks are aligned on a 32 bytes boundary. */
55  /* 2.) Data that is not within an 8 byte boundary is processed using the C routine. */
56  /* 3.) Convolution routines do not have C routines at this time. */
57 
58  // Detect MMX capability in CPU
60 
61  // Force use of MMX off (or turn possible use back on)
64 
65  //
66  // All routines return:
67  // 0 OK
68  // -1 Error (internal error, parameter error)
69  //
70 
71  // SDL_imageFilterAdd: D = saturation255(S1 + S2)
72  SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterAdd(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length);
73 
74  // SDL_imageFilterMean: D = S1/2 + S2/2
75  SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterMean(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length);
76 
77  // SDL_imageFilterSub: D = saturation0(S1 - S2)
78  SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterSub(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length);
79 
80  // SDL_imageFilterAbsDiff: D = | S1 - S2 |
81  SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterAbsDiff(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length);
82 
83  // SDL_imageFilterMult: D = saturation(S1 * S2)
84  SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterMult(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length);
85 
86  // SDL_imageFilterMultNor: D = S1 * S2 (non-MMX)
87  SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterMultNor(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length);
88 
89  // SDL_imageFilterMultDivby2: D = saturation255(S1/2 * S2)
90  SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterMultDivby2(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest,
91  unsigned int length);
92 
93  // SDL_imageFilterMultDivby4: D = saturation255(S1/2 * S2/2)
94  SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterMultDivby4(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest,
95  unsigned int length);
96 
97  // SDL_imageFilterBitAnd: D = S1 & S2
98  SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterBitAnd(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length);
99 
100  // SDL_imageFilterBitOr: D = S1 | S2
101  SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterBitOr(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length);
102 
103  // SDL_imageFilterDiv: D = S1 / S2 (non-MMX)
104  SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterDiv(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length);
105 
106  // SDL_imageFilterBitNegation: D = !S
107  SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterBitNegation(unsigned char *Src1, unsigned char *Dest, unsigned int length);
108 
109  // SDL_imageFilterAddByte: D = saturation255(S + C)
110  SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterAddByte(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C);
111 
112  // SDL_imageFilterAddUint: D = saturation255(S + (uint)C)
113  SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterAddUint(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned int C);
114 
115  // SDL_imageFilterAddByteToHalf: D = saturation255(S/2 + C)
116  SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterAddByteToHalf(unsigned char *Src1, unsigned char *Dest, unsigned int length,
117  unsigned char C);
118 
119  // SDL_imageFilterSubByte: D = saturation0(S - C)
120  SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterSubByte(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C);
121 
122  // SDL_imageFilterSubUint: D = saturation0(S - (uint)C)
123  SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterSubUint(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned int C);
124 
125  // SDL_imageFilterShiftRight: D = saturation0(S >> N)
126  SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterShiftRight(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N);
127 
128  // SDL_imageFilterShiftRightUint: D = saturation0((uint)S >> N)
129  SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterShiftRightUint(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N);
130 
131  // SDL_imageFilterMultByByte: D = saturation255(S * C)
132  SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterMultByByte(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C);
133 
134  // SDL_imageFilterShiftRightAndMultByByte: D = saturation255((S >> N) * C)
135  SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterShiftRightAndMultByByte(unsigned char *Src1, unsigned char *Dest, unsigned int length,
136  unsigned char N, unsigned char C);
137 
138  // SDL_imageFilterShiftLeftByte: D = (S << N)
139  SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterShiftLeftByte(unsigned char *Src1, unsigned char *Dest, unsigned int length,
140  unsigned char N);
141 
142  // SDL_imageFilterShiftLeftUint: D = ((uint)S << N)
143  SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterShiftLeftUint(unsigned char *Src1, unsigned char *Dest, unsigned int length,
144  unsigned char N);
145 
146  // SDL_imageFilterShiftLeft: D = saturation255(S << N)
147  SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterShiftLeft(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N);
148 
149  // SDL_imageFilterBinarizeUsingThreshold: D = S >= T ? 255:0
150  SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterBinarizeUsingThreshold(unsigned char *Src1, unsigned char *Dest, unsigned int length,
151  unsigned char T);
152 
153  // SDL_imageFilterClipToRange: D = (S >= Tmin) & (S <= Tmax) 255:0
154  SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterClipToRange(unsigned char *Src1, unsigned char *Dest, unsigned int length,
155  unsigned char Tmin, unsigned char Tmax);
156 
157  // SDL_imageFilterNormalizeLinear: D = saturation255((Nmax - Nmin)/(Cmax - Cmin)*(S - Cmin) + Nmin)
158  SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterNormalizeLinear(unsigned char *Src, unsigned char *Dest, unsigned int length, int Cmin,
159  int Cmax, int Nmin, int Nmax);
160 
161  /* Ends C function definitions when using C++ */
162 #ifdef __cplusplus
163 }
164 #endif
165 
166 #endif /* _SDL_imageFilter_h */
SDL2_IMAGEFILTER_SCOPE void SDL_imageFilterMMXoff(void)
Disable MMX check for filter functions and and force to use non-MMX C based code. ...
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterMultNor(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
Filter using MultNor: D = S1 * S2.
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterMultByByte(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C)
Filter using MultByByte: D = saturation255(S * C)
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterShiftRightUint(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
Filter using ShiftRightUint: D = saturation0((uint)S[i] >> N)
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterBitNegation(unsigned char *Src1, unsigned char *Dest, unsigned int length)
Filter using BitNegation: D = !S.
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterShiftLeft(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
Filter ShiftLeft: D = saturation255(S << N)
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterMean(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
Filter using Mean: D = S1/2 + S2/2.
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterShiftLeftByte(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
Filter using ShiftLeftByte: D = (S << N)
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterBitOr(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
Filter using BitOr: D = S1 | S2.
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterAdd(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
Filter using Add: D = saturation255(S1 + S2)
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterSubByte(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C)
Filter using SubByte: D = saturation0(S - C)
SDL2_IMAGEFILTER_SCOPE void SDL_imageFilterMMXon(void)
Enable MMX check for filter functions and use MMX code if available.
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterMultDivby4(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
Filter using MultDivby4: D = saturation255(S1/2 * S2/2)
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterShiftRightAndMultByByte(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N, unsigned char C)
Filter using ShiftRightAndMultByByte: D = saturation255((S >> N) * C)
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterAddByte(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C)
Filter using AddByte: D = saturation255(S + C)
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterAbsDiff(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
Filter using AbsDiff: D = | S1 - S2 |.
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterShiftLeftUint(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
Filter using ShiftLeftUint: D = ((uint)S << N)
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterClipToRange(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char Tmin, unsigned char Tmax)
Filter using ClipToRange: D = (S >= Tmin) & (S <= Tmax) S:Tmin | Tmax.
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterDiv(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
Filter using Div: D = S1 / S2.
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterAddByteToHalf(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C)
Filter using AddByteToHalf: D = saturation255(S/2 + C)
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterAddUint(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned int C)
Filter using AddUint: D = saturation255((S[i] + Cs[i % 4]), Cs=Swap32((uint)C)
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterMultDivby2(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
Filter using MultDivby2: D = saturation255(S1/2 * S2)
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterMMXdetect(void)
MMX detection routine (with override flag).
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterShiftRight(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
Filter using ShiftRight: D = saturation0(S >> N)
#define SDL2_IMAGEFILTER_SCOPE
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterSub(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
Filter using Sub: D = saturation0(S1 - S2)
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterBitAnd(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
Filter using BitAnd: D = S1 & S2.
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterBinarizeUsingThreshold(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char T)
Filter using BinarizeUsingThreshold: D = (S >= T) ? 255:0.
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterMult(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
Filter using Mult: D = saturation255(S1 * S2)
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterNormalizeLinear(unsigned char *Src, unsigned char *Dest, unsigned int length, int Cmin, int Cmax, int Nmin, int Nmax)
Filter using NormalizeLinear: D = saturation255((Nmax - Nmin)/(Cmax - Cmin)*(S - Cmin) + Nmin) ...
SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterSubUint(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned int C)
Filter using SubUint: D = saturation0(S[i] - Cs[i % 4]), Cs=Swap32((uint)C)
SDL2_gfx-1.0.4/Docs/html/_s_d_l2__rotozoom_8c.html100777 0 0 166206 12632323332 15001 0 SDL2_gfx: /cygdrive/i/Sources/sdl2gfx/SDL2_rotozoom.c File Reference
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
/cygdrive/i/Sources/sdl2gfx/SDL2_rotozoom.c File Reference
#include <stdlib.h>
#include <string.h>
#include "SDL2_rotozoom.h"

Go to the source code of this file.

Data Structures

struct  tColorRGBA
 A 32 bit RGBA pixel. More...
 
struct  tColorY
 A 8bit Y/palette pixel. More...
 

Macros

#define MAX(a, b)    (((a) > (b)) ? (a) : (b))
 Returns maximum of two numbers a and b. More...
 
#define GUARD_ROWS   (2)
 Number of guard rows added to destination surfaces. More...
 
#define VALUE_LIMIT   0.001
 Lower limit of absolute zoom factor or rotation degrees. More...
 

Typedefs

typedef struct tColorRGBA tColorRGBA
 A 32 bit RGBA pixel. More...
 
typedef struct tColorY tColorY
 A 8bit Y/palette pixel. More...
 

Functions

Uint32 _colorkey (SDL_Surface *src)
 Returns colorkey info for a surface. More...
 
int _shrinkSurfaceRGBA (SDL_Surface *src, SDL_Surface *dst, int factorx, int factory)
 Internal 32 bit integer-factor averaging Shrinker. More...
 
int _shrinkSurfaceY (SDL_Surface *src, SDL_Surface *dst, int factorx, int factory)
 Internal 8 bit integer-factor averaging shrinker. More...
 
int _zoomSurfaceRGBA (SDL_Surface *src, SDL_Surface *dst, int flipx, int flipy, int smooth)
 Internal 32 bit Zoomer with optional anti-aliasing by bilinear interpolation. More...
 
int _zoomSurfaceY (SDL_Surface *src, SDL_Surface *dst, int flipx, int flipy)
 Internal 8 bit Zoomer without smoothing. More...
 
void _transformSurfaceRGBA (SDL_Surface *src, SDL_Surface *dst, int cx, int cy, int isin, int icos, int flipx, int flipy, int smooth)
 Internal 32 bit rotozoomer with optional anti-aliasing. More...
 
void transformSurfaceY (SDL_Surface *src, SDL_Surface *dst, int cx, int cy, int isin, int icos, int flipx, int flipy)
 Rotates and zooms 8 bit palette/Y 'src' surface to 'dst' surface without smoothing. More...
 
SDL_Surface * rotateSurface90Degrees (SDL_Surface *src, int numClockwiseTurns)
 Rotates a 8/16/24/32 bit surface in increments of 90 degrees. More...
 
void _rotozoomSurfaceSizeTrig (int width, int height, double angle, double zoomx, double zoomy, int *dstwidth, int *dstheight, double *canglezoom, double *sanglezoom)
 Internal target surface sizing function for rotozooms with trig result return. More...
 
void rotozoomSurfaceSizeXY (int width, int height, double angle, double zoomx, double zoomy, int *dstwidth, int *dstheight)
 Returns the size of the resulting target surface for a rotozoomSurfaceXY() call. More...
 
void rotozoomSurfaceSize (int width, int height, double angle, double zoom, int *dstwidth, int *dstheight)
 Returns the size of the resulting target surface for a rotozoomSurface() call. More...
 
SDL_Surface * rotozoomSurface (SDL_Surface *src, double angle, double zoom, int smooth)
 Rotates and zooms a surface and optional anti-aliasing. More...
 
SDL_Surface * rotozoomSurfaceXY (SDL_Surface *src, double angle, double zoomx, double zoomy, int smooth)
 Rotates and zooms a surface with different horizontal and vertival scaling factors and optional anti-aliasing. More...
 
void zoomSurfaceSize (int width, int height, double zoomx, double zoomy, int *dstwidth, int *dstheight)
 Calculates the size of the target surface for a zoomSurface() call. More...
 
SDL_Surface * zoomSurface (SDL_Surface *src, double zoomx, double zoomy, int smooth)
 Zoom a surface by independent horizontal and vertical factors with optional smoothing. More...
 
SDL_Surface * shrinkSurface (SDL_Surface *src, int factorx, int factory)
 Shrink a surface by an integer ratio using averaging. More...
 

Macro Definition Documentation

#define GUARD_ROWS   (2)

Number of guard rows added to destination surfaces.

This is a simple but effective workaround for observed issues. These rows allocate extra memory and are then hidden from the surface. Rows are added to the end of destination surfaces when they are allocated. This catches any potential overflows which seem to happen with just the right src image dimensions and scale/rotation and can lead to a situation where the program can segfault.

Definition at line 73 of file SDL2_rotozoom.c.

#define MAX (   a,
 
)    (((a) > (b)) ? (a) : (b))

Returns maximum of two numbers a and b.

Definition at line 61 of file SDL2_rotozoom.c.

#define VALUE_LIMIT   0.001

Lower limit of absolute zoom factor or rotation degrees.

Definition at line 78 of file SDL2_rotozoom.c.

Typedef Documentation

typedef struct tColorRGBA tColorRGBA

A 32 bit RGBA pixel.

typedef struct tColorY tColorY

A 8bit Y/palette pixel.

Function Documentation

Uint32 _colorkey ( SDL_Surface *  src)

Returns colorkey info for a surface.

Definition at line 83 of file SDL2_rotozoom.c.

void _rotozoomSurfaceSizeTrig ( int  width,
int  height,
double  angle,
double  zoomx,
double  zoomy,
int *  dstwidth,
int *  dstheight,
double *  canglezoom,
double *  sanglezoom 
)

Internal target surface sizing function for rotozooms with trig result return.

Parameters
widthThe source surface width.
heightThe source surface height.
angleThe angle to rotate in degrees.
zoomxThe horizontal scaling factor.
zoomyThe vertical scaling factor.
dstwidthThe calculated width of the destination surface.
dstheightThe calculated height of the destination surface.
canglezoomThe sine of the angle adjusted by the zoom factor.
sanglezoomThe cosine of the angle adjusted by the zoom factor.

Definition at line 954 of file SDL2_rotozoom.c.

int _shrinkSurfaceRGBA ( SDL_Surface *  src,
SDL_Surface *  dst,
int  factorx,
int  factory 
)

Internal 32 bit integer-factor averaging Shrinker.

Shrinks 32 bit RGBA/ABGR 'src' surface to 'dst' surface. Averages color and alpha values values of src pixels to calculate dst pixels. Assumes src and dst surfaces are of 32 bit depth. Assumes dst surface was allocated with the correct dimensions.

Parameters
srcThe surface to shrink (input).
dstThe shrunken surface (output).
factorxThe horizontal shrinking ratio.
factoryThe vertical shrinking ratio.
Returns
0 for success or -1 for error.

Definition at line 106 of file SDL2_rotozoom.c.

int _shrinkSurfaceY ( SDL_Surface *  src,
SDL_Surface *  dst,
int  factorx,
int  factory 
)

Internal 8 bit integer-factor averaging shrinker.

Shrinks 8bit Y 'src' surface to 'dst' surface. Averages color (brightness) values values of src pixels to calculate dst pixels. Assumes src and dst surfaces are of 8 bit depth. Assumes dst surface was allocated with the correct dimensions.

Parameters
srcThe surface to shrink (input).
dstThe shrunken surface (output).
factorxThe horizontal shrinking ratio.
factoryThe vertical shrinking ratio.
Returns
0 for success or -1 for error.

Definition at line 194 of file SDL2_rotozoom.c.

void _transformSurfaceRGBA ( SDL_Surface *  src,
SDL_Surface *  dst,
int  cx,
int  cy,
int  isin,
int  icos,
int  flipx,
int  flipy,
int  smooth 
)

Internal 32 bit rotozoomer with optional anti-aliasing.

Rotates and zooms 32 bit RGBA/ABGR 'src' surface to 'dst' surface based on the control parameters by scanning the destination surface and applying optionally anti-aliasing by bilinear interpolation. Assumes src and dst surfaces are of 32 bit depth. Assumes dst surface was allocated with the correct dimensions.

Parameters
srcSource surface.
dstDestination surface.
cxHorizontal center coordinate.
cyVertical center coordinate.
isinInteger version of sine of angle.
icosInteger version of cosine of angle.
flipxFlag indicating horizontal mirroring should be applied.
flipyFlag indicating vertical mirroring should be applied.
smoothFlag indicating anti-aliasing should be used.

Definition at line 629 of file SDL2_rotozoom.c.

int _zoomSurfaceRGBA ( SDL_Surface *  src,
SDL_Surface *  dst,
int  flipx,
int  flipy,
int  smooth 
)

Internal 32 bit Zoomer with optional anti-aliasing by bilinear interpolation.

Zooms 32 bit RGBA/ABGR 'src' surface to 'dst' surface. Assumes src and dst surfaces are of 32 bit depth. Assumes dst surface was allocated with the correct dimensions.

Parameters
srcThe surface to zoom (input).
dstThe zoomed surface (output).
flipxFlag indicating if the image should be horizontally flipped.
flipyFlag indicating if the image should be vertically flipped.
smoothAntialiasing flag; set to SMOOTHING_ON to enable.
Returns
0 for success or -1 for error.

Definition at line 277 of file SDL2_rotozoom.c.

int _zoomSurfaceY ( SDL_Surface *  src,
SDL_Surface *  dst,
int  flipx,
int  flipy 
)

Internal 8 bit Zoomer without smoothing.

Zooms 8bit palette/Y 'src' surface to 'dst' surface. Assumes src and dst surfaces are of 8 bit depth. Assumes dst surface was allocated with the correct dimensions.

Parameters
srcThe surface to zoom (input).
dstThe zoomed surface (output).
flipxFlag indicating if the image should be horizontally flipped.
flipyFlag indicating if the image should be vertically flipped.
Returns
0 for success or -1 for error.

Definition at line 510 of file SDL2_rotozoom.c.

SDL_Surface* rotateSurface90Degrees ( SDL_Surface *  src,
int  numClockwiseTurns 
)

Rotates a 8/16/24/32 bit surface in increments of 90 degrees.

Specialized 90 degree rotator which rotates a 'src' surface in 90 degree increments clockwise returning a new surface. Faster than rotozoomer since no scanning or interpolation takes place. Input surface must be 8/16/24/32 bit. (code contributed by J. Schiller, improved by C. Allport and A. Schiffler)

Parameters
srcSource surface to rotate.
numClockwiseTurnsNumber of clockwise 90 degree turns to apply to the source.
Returns
The new, rotated surface; or NULL for surfaces with incorrect input format.

Definition at line 803 of file SDL2_rotozoom.c.

SDL_Surface* rotozoomSurface ( SDL_Surface *  src,
double  angle,
double  zoom,
int  smooth 
)

Rotates and zooms a surface and optional anti-aliasing.

Rotates and zoomes a 32bit or 8bit 'src' surface to newly created 'dst' surface. 'angle' is the rotation in degrees and 'zoom' a scaling factor. If 'smooth' is set then the destination 32bit surface is anti-aliased. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly.

Parameters
srcThe surface to rotozoom.
angleThe angle to rotate in degrees.
zoomThe scaling factor.
smoothAntialiasing flag; set to SMOOTHING_ON to enable.
Returns
The new rotozoomed surface.

Definition at line 1035 of file SDL2_rotozoom.c.

void rotozoomSurfaceSize ( int  width,
int  height,
double  angle,
double  zoom,
int *  dstwidth,
int *  dstheight 
)

Returns the size of the resulting target surface for a rotozoomSurface() call.

Parameters
widthThe source surface width.
heightThe source surface height.
angleThe angle to rotate in degrees.
zoomThe scaling factor.
dstwidthThe calculated width of the rotozoomed destination surface.
dstheightThe calculated height of the rotozoomed destination surface.

Definition at line 1013 of file SDL2_rotozoom.c.

void rotozoomSurfaceSizeXY ( int  width,
int  height,
double  angle,
double  zoomx,
double  zoomy,
int *  dstwidth,
int *  dstheight 
)

Returns the size of the resulting target surface for a rotozoomSurfaceXY() call.

Parameters
widthThe source surface width.
heightThe source surface height.
angleThe angle to rotate in degrees.
zoomxThe horizontal scaling factor.
zoomyThe vertical scaling factor.
dstwidthThe calculated width of the rotozoomed destination surface.
dstheightThe calculated height of the rotozoomed destination surface.

Definition at line 996 of file SDL2_rotozoom.c.

SDL_Surface* rotozoomSurfaceXY ( SDL_Surface *  src,
double  angle,
double  zoomx,
double  zoomy,
int  smooth 
)

Rotates and zooms a surface with different horizontal and vertival scaling factors and optional anti-aliasing.

Rotates and zooms a 32bit or 8bit 'src' surface to newly created 'dst' surface. 'angle' is the rotation in degrees, 'zoomx and 'zoomy' scaling factors. If 'smooth' is set then the destination 32bit surface is anti-aliased. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly.

Parameters
srcThe surface to rotozoom.
angleThe angle to rotate in degrees.
zoomxThe horizontal scaling factor.
zoomyThe vertical scaling factor.
smoothAntialiasing flag; set to SMOOTHING_ON to enable.
Returns
The new rotozoomed surface.

Definition at line 1056 of file SDL2_rotozoom.c.

SDL_Surface* shrinkSurface ( SDL_Surface *  src,
int  factorx,
int  factory 
)

Shrink a surface by an integer ratio using averaging.

Shrinks a 32bit or 8bit 'src' surface to a newly created 'dst' surface. 'factorx' and 'factory' are the shrinking ratios (i.e. 2=1/2 the size, 3=1/3 the size, etc.) The destination surface is antialiased by averaging the source box RGBA or Y information. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly. The input surface is not modified. The output surface is newly allocated.

Parameters
srcThe surface to shrink.
factorxThe horizontal shrinking ratio.
factoryThe vertical shrinking ratio.
Returns
The new, shrunken surface.

Definition at line 1512 of file SDL2_rotozoom.c.

void transformSurfaceY ( SDL_Surface *  src,
SDL_Surface *  dst,
int  cx,
int  cy,
int  isin,
int  icos,
int  flipx,
int  flipy 
)

Rotates and zooms 8 bit palette/Y 'src' surface to 'dst' surface without smoothing.

Rotates and zooms 8 bit RGBA/ABGR 'src' surface to 'dst' surface based on the control parameters by scanning the destination surface. Assumes src and dst surfaces are of 8 bit depth. Assumes dst surface was allocated with the correct dimensions.

Parameters
srcSource surface.
dstDestination surface.
cxHorizontal center coordinate.
cyVertical center coordinate.
isinInteger version of sine of angle.
icosInteger version of cosine of angle.
flipxFlag indicating horizontal mirroring should be applied.
flipyFlag indicating vertical mirroring should be applied.

Definition at line 746 of file SDL2_rotozoom.c.

SDL_Surface* zoomSurface ( SDL_Surface *  src,
double  zoomx,
double  zoomy,
int  smooth 
)

Zoom a surface by independent horizontal and vertical factors with optional smoothing.

Zooms a 32bit or 8bit 'src' surface to newly created 'dst' surface. 'zoomx' and 'zoomy' are scaling factors for width and height. If 'smooth' is on then the destination 32bit surface is anti-aliased. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly. If zoom factors are negative, the image is flipped on the axes.

Parameters
srcThe surface to zoom.
zoomxThe horizontal zoom factor.
zoomyThe vertical zoom factor.
smoothAntialiasing flag; set to SMOOTHING_ON to enable.
Returns
The new, zoomed surface.

Definition at line 1361 of file SDL2_rotozoom.c.

void zoomSurfaceSize ( int  width,
int  height,
double  zoomx,
double  zoomy,
int *  dstwidth,
int *  dstheight 
)

Calculates the size of the target surface for a zoomSurface() call.

The minimum size of the target surface is 1. The input factors can be positive or negative.

Parameters
widthThe width of the source surface to zoom.
heightThe height of the source surface to zoom.
zoomxThe horizontal zoom factor.
zoomyThe vertical zoom factor.
dstwidthPointer to an integer to store the calculated width of the zoomed target surface.
dstheightPointer to an integer to store the calculated height of the zoomed target surface.

Definition at line 1311 of file SDL2_rotozoom.c.

SDL2_gfx-1.0.4/Docs/html/_s_d_l2__rotozoom_8c_source.html100777 0 0 664345 12632323332 16370 0 SDL2_gfx: /cygdrive/i/Sources/sdl2gfx/SDL2_rotozoom.c Source File
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
/cygdrive/i/Sources/sdl2gfx/SDL2_rotozoom.c
Go to the documentation of this file.
1 /*
2 
3 SDL2_rotozoom.c: rotozoomer, zoomer and shrinker for 32bit or 8bit surfaces
4 
5 Copyright (C) 2012-2014 Andreas Schiffler
6 
7 This software is provided 'as-is', without any express or implied
8 warranty. In no event will the authors be held liable for any damages
9 arising from the use of this software.
10 
11 Permission is granted to anyone to use this software for any purpose,
12 including commercial applications, and to alter it and redistribute it
13 freely, subject to the following restrictions:
14 
15 1. The origin of this software must not be misrepresented; you must not
16 claim that you wrote the original software. If you use this software
17 in a product, an acknowledgment in the product documentation would be
18 appreciated but is not required.
19 
20 2. Altered source versions must be plainly marked as such, and must not be
21 misrepresented as being the original software.
22 
23 3. This notice may not be removed or altered from any source
24 distribution.
25 
26 Andreas Schiffler -- aschiffler at ferzkopp dot net
27 
28 */
29 
30 #ifdef WIN32
31 #include <windows.h>
32 #endif
33 
34 #include <stdlib.h>
35 #include <string.h>
36 
37 #include "SDL2_rotozoom.h"
38 
39 /* ---- Internally used structures */
40 
44 typedef struct tColorRGBA {
45  Uint8 r;
46  Uint8 g;
47  Uint8 b;
48  Uint8 a;
49 } tColorRGBA;
50 
54 typedef struct tColorY {
55  Uint8 y;
56 } tColorY;
57 
61 #define MAX(a,b) (((a) > (b)) ? (a) : (b))
62 
73 #define GUARD_ROWS (2)
74 
78 #define VALUE_LIMIT 0.001
79 
83 Uint32 _colorkey(SDL_Surface *src)
84 {
85  Uint32 key = 0;
86  SDL_GetColorKey(src, &key);
87  return key;
88 }
89 
90 
106 int _shrinkSurfaceRGBA(SDL_Surface * src, SDL_Surface * dst, int factorx, int factory)
107 {
108  int x, y, dx, dy, dgap, ra, ga, ba, aa;
109  int n_average;
110  tColorRGBA *sp, *osp, *oosp;
111  tColorRGBA *dp;
112 
113  /*
114  * Averaging integer shrink
115  */
116 
117  /* Precalculate division factor */
118  n_average = factorx*factory;
119 
120  /*
121  * Scan destination
122  */
123  sp = (tColorRGBA *) src->pixels;
124 
125  dp = (tColorRGBA *) dst->pixels;
126  dgap = dst->pitch - dst->w * 4;
127 
128  for (y = 0; y < dst->h; y++) {
129 
130  osp=sp;
131  for (x = 0; x < dst->w; x++) {
132 
133  /* Trace out source box and accumulate */
134  oosp=sp;
135  ra=ga=ba=aa=0;
136  for (dy=0; dy < factory; dy++) {
137  for (dx=0; dx < factorx; dx++) {
138  ra += sp->r;
139  ga += sp->g;
140  ba += sp->b;
141  aa += sp->a;
142 
143  sp++;
144  }
145  /* src dx loop */
146  sp = (tColorRGBA *)((Uint8*)sp + (src->pitch - 4*factorx)); // next y
147  }
148  /* src dy loop */
149 
150  /* next box-x */
151  sp = (tColorRGBA *)((Uint8*)oosp + 4*factorx);
152 
153  /* Store result in destination */
154  dp->r = ra/n_average;
155  dp->g = ga/n_average;
156  dp->b = ba/n_average;
157  dp->a = aa/n_average;
158 
159  /*
160  * Advance destination pointer
161  */
162  dp++;
163  }
164  /* dst x loop */
165 
166  /* next box-y */
167  sp = (tColorRGBA *)((Uint8*)osp + src->pitch*factory);
168 
169  /*
170  * Advance destination pointers
171  */
172  dp = (tColorRGBA *) ((Uint8 *) dp + dgap);
173  }
174  /* dst y loop */
175 
176  return (0);
177 }
178 
194 int _shrinkSurfaceY(SDL_Surface * src, SDL_Surface * dst, int factorx, int factory)
195 {
196  int x, y, dx, dy, dgap, a;
197  int n_average;
198  Uint8 *sp, *osp, *oosp;
199  Uint8 *dp;
200 
201  /*
202  * Averaging integer shrink
203  */
204 
205  /* Precalculate division factor */
206  n_average = factorx*factory;
207 
208  /*
209  * Scan destination
210  */
211  sp = (Uint8 *) src->pixels;
212 
213  dp = (Uint8 *) dst->pixels;
214  dgap = dst->pitch - dst->w;
215 
216  for (y = 0; y < dst->h; y++) {
217 
218  osp=sp;
219  for (x = 0; x < dst->w; x++) {
220 
221  /* Trace out source box and accumulate */
222  oosp=sp;
223  a=0;
224  for (dy=0; dy < factory; dy++) {
225  for (dx=0; dx < factorx; dx++) {
226  a += (*sp);
227  /* next x */
228  sp++;
229  }
230  /* end src dx loop */
231  /* next y */
232  sp = (Uint8 *)((Uint8*)sp + (src->pitch - factorx));
233  }
234  /* end src dy loop */
235 
236  /* next box-x */
237  sp = (Uint8 *)((Uint8*)oosp + factorx);
238 
239  /* Store result in destination */
240  *dp = a/n_average;
241 
242  /*
243  * Advance destination pointer
244  */
245  dp++;
246  }
247  /* end dst x loop */
248 
249  /* next box-y */
250  sp = (Uint8 *)((Uint8*)osp + src->pitch*factory);
251 
252  /*
253  * Advance destination pointers
254  */
255  dp = (Uint8 *)((Uint8 *)dp + dgap);
256  }
257  /* end dst y loop */
258 
259  return (0);
260 }
261 
277 int _zoomSurfaceRGBA(SDL_Surface * src, SDL_Surface * dst, int flipx, int flipy, int smooth)
278 {
279  int x, y, sx, sy, ssx, ssy, *sax, *say, *csax, *csay, *salast, csx, csy, ex, ey, cx, cy, sstep, sstepx, sstepy;
280  tColorRGBA *c00, *c01, *c10, *c11;
281  tColorRGBA *sp, *csp, *dp;
282  int spixelgap, spixelw, spixelh, dgap, t1, t2;
283 
284  /*
285  * Allocate memory for row/column increments
286  */
287  if ((sax = (int *) malloc((dst->w + 1) * sizeof(Uint32))) == NULL) {
288  return (-1);
289  }
290  if ((say = (int *) malloc((dst->h + 1) * sizeof(Uint32))) == NULL) {
291  free(sax);
292  return (-1);
293  }
294 
295  /*
296  * Precalculate row increments
297  */
298  spixelw = (src->w - 1);
299  spixelh = (src->h - 1);
300  if (smooth) {
301  sx = (int) (65536.0 * (float) spixelw / (float) (dst->w - 1));
302  sy = (int) (65536.0 * (float) spixelh / (float) (dst->h - 1));
303  } else {
304  sx = (int) (65536.0 * (float) (src->w) / (float) (dst->w));
305  sy = (int) (65536.0 * (float) (src->h) / (float) (dst->h));
306  }
307 
308  /* Maximum scaled source size */
309  ssx = (src->w << 16) - 1;
310  ssy = (src->h << 16) - 1;
311 
312  /* Precalculate horizontal row increments */
313  csx = 0;
314  csax = sax;
315  for (x = 0; x <= dst->w; x++) {
316  *csax = csx;
317  csax++;
318  csx += sx;
319 
320  /* Guard from overflows */
321  if (csx > ssx) {
322  csx = ssx;
323  }
324  }
325 
326  /* Precalculate vertical row increments */
327  csy = 0;
328  csay = say;
329  for (y = 0; y <= dst->h; y++) {
330  *csay = csy;
331  csay++;
332  csy += sy;
333 
334  /* Guard from overflows */
335  if (csy > ssy) {
336  csy = ssy;
337  }
338  }
339 
340  sp = (tColorRGBA *) src->pixels;
341  dp = (tColorRGBA *) dst->pixels;
342  dgap = dst->pitch - dst->w * 4;
343  spixelgap = src->pitch/4;
344 
345  if (flipx) sp += spixelw;
346  if (flipy) sp += (spixelgap * spixelh);
347 
348  /*
349  * Switch between interpolating and non-interpolating code
350  */
351  if (smooth) {
352 
353  /*
354  * Interpolating Zoom
355  */
356  csay = say;
357  for (y = 0; y < dst->h; y++) {
358  csp = sp;
359  csax = sax;
360  for (x = 0; x < dst->w; x++) {
361  /*
362  * Setup color source pointers
363  */
364  ex = (*csax & 0xffff);
365  ey = (*csay & 0xffff);
366  cx = (*csax >> 16);
367  cy = (*csay >> 16);
368  sstepx = cx < spixelw;
369  sstepy = cy < spixelh;
370  c00 = sp;
371  c01 = sp;
372  c10 = sp;
373  if (sstepy) {
374  if (flipy) {
375  c10 -= spixelgap;
376  } else {
377  c10 += spixelgap;
378  }
379  }
380  c11 = c10;
381  if (sstepx) {
382  if (flipx) {
383  c01--;
384  c11--;
385  } else {
386  c01++;
387  c11++;
388  }
389  }
390 
391  /*
392  * Draw and interpolate colors
393  */
394  t1 = ((((c01->r - c00->r) * ex) >> 16) + c00->r) & 0xff;
395  t2 = ((((c11->r - c10->r) * ex) >> 16) + c10->r) & 0xff;
396  dp->r = (((t2 - t1) * ey) >> 16) + t1;
397  t1 = ((((c01->g - c00->g) * ex) >> 16) + c00->g) & 0xff;
398  t2 = ((((c11->g - c10->g) * ex) >> 16) + c10->g) & 0xff;
399  dp->g = (((t2 - t1) * ey) >> 16) + t1;
400  t1 = ((((c01->b - c00->b) * ex) >> 16) + c00->b) & 0xff;
401  t2 = ((((c11->b - c10->b) * ex) >> 16) + c10->b) & 0xff;
402  dp->b = (((t2 - t1) * ey) >> 16) + t1;
403  t1 = ((((c01->a - c00->a) * ex) >> 16) + c00->a) & 0xff;
404  t2 = ((((c11->a - c10->a) * ex) >> 16) + c10->a) & 0xff;
405  dp->a = (((t2 - t1) * ey) >> 16) + t1;
406  /*
407  * Advance source pointer x
408  */
409  salast = csax;
410  csax++;
411  sstep = (*csax >> 16) - (*salast >> 16);
412  if (flipx) {
413  sp -= sstep;
414  } else {
415  sp += sstep;
416  }
417 
418  /*
419  * Advance destination pointer x
420  */
421  dp++;
422  }
423  /*
424  * Advance source pointer y
425  */
426  salast = csay;
427  csay++;
428  sstep = (*csay >> 16) - (*salast >> 16);
429  sstep *= spixelgap;
430  if (flipy) {
431  sp = csp - sstep;
432  } else {
433  sp = csp + sstep;
434  }
435 
436  /*
437  * Advance destination pointer y
438  */
439  dp = (tColorRGBA *) ((Uint8 *) dp + dgap);
440  }
441  } else {
442  /*
443  * Non-Interpolating Zoom
444  */
445  csay = say;
446  for (y = 0; y < dst->h; y++) {
447  csp = sp;
448  csax = sax;
449  for (x = 0; x < dst->w; x++) {
450  /*
451  * Draw
452  */
453  *dp = *sp;
454 
455  /*
456  * Advance source pointer x
457  */
458  salast = csax;
459  csax++;
460  sstep = (*csax >> 16) - (*salast >> 16);
461  if (flipx) sstep = -sstep;
462  sp += sstep;
463 
464  /*
465  * Advance destination pointer x
466  */
467  dp++;
468  }
469  /*
470  * Advance source pointer y
471  */
472  salast = csay;
473  csay++;
474  sstep = (*csay >> 16) - (*salast >> 16);
475  sstep *= spixelgap;
476  if (flipy) sstep = -sstep;
477  sp = csp + sstep;
478 
479  /*
480  * Advance destination pointer y
481  */
482  dp = (tColorRGBA *) ((Uint8 *) dp + dgap);
483  }
484  }
485 
486  /*
487  * Remove temp arrays
488  */
489  free(sax);
490  free(say);
491 
492  return (0);
493 }
494 
510 int _zoomSurfaceY(SDL_Surface * src, SDL_Surface * dst, int flipx, int flipy)
511 {
512  int x, y;
513  Uint32 *sax, *say, *csax, *csay;
514  int csx, csy;
515  Uint8 *sp, *dp, *csp;
516  int dgap;
517 
518  /*
519  * Allocate memory for row increments
520  */
521  if ((sax = (Uint32 *) malloc((dst->w + 1) * sizeof(Uint32))) == NULL) {
522  return (-1);
523  }
524  if ((say = (Uint32 *) malloc((dst->h + 1) * sizeof(Uint32))) == NULL) {
525  free(sax);
526  return (-1);
527  }
528 
529  /*
530  * Pointer setup
531  */
532  sp = csp = (Uint8 *) src->pixels;
533  dp = (Uint8 *) dst->pixels;
534  dgap = dst->pitch - dst->w;
535 
536  if (flipx) csp += (src->w-1);
537  if (flipy) csp = ( (Uint8*)csp + src->pitch*(src->h-1) );
538 
539  /*
540  * Precalculate row increments
541  */
542  csx = 0;
543  csax = sax;
544  for (x = 0; x < dst->w; x++) {
545  csx += src->w;
546  *csax = 0;
547  while (csx >= dst->w) {
548  csx -= dst->w;
549  (*csax)++;
550  }
551  (*csax) = (*csax) * (flipx ? -1 : 1);
552  csax++;
553  }
554  csy = 0;
555  csay = say;
556  for (y = 0; y < dst->h; y++) {
557  csy += src->h;
558  *csay = 0;
559  while (csy >= dst->h) {
560  csy -= dst->h;
561  (*csay)++;
562  }
563  (*csay) = (*csay) * (flipy ? -1 : 1);
564  csay++;
565  }
566 
567  /*
568  * Draw
569  */
570  csay = say;
571  for (y = 0; y < dst->h; y++) {
572  csax = sax;
573  sp = csp;
574  for (x = 0; x < dst->w; x++) {
575  /*
576  * Draw
577  */
578  *dp = *sp;
579  /*
580  * Advance source pointers
581  */
582  sp += (*csax);
583  csax++;
584  /*
585  * Advance destination pointer
586  */
587  dp++;
588  }
589  /*
590  * Advance source pointer (for row)
591  */
592  csp += ((*csay) * src->pitch);
593  csay++;
594 
595  /*
596  * Advance destination pointers
597  */
598  dp += dgap;
599  }
600 
601  /*
602  * Remove temp arrays
603  */
604  free(sax);
605  free(say);
606 
607  return (0);
608 }
609 
629 void _transformSurfaceRGBA(SDL_Surface * src, SDL_Surface * dst, int cx, int cy, int isin, int icos, int flipx, int flipy, int smooth)
630 {
631  int x, y, t1, t2, dx, dy, xd, yd, sdx, sdy, ax, ay, ex, ey, sw, sh;
632  tColorRGBA c00, c01, c10, c11, cswap;
633  tColorRGBA *pc, *sp;
634  int gap;
635 
636  /*
637  * Variable setup
638  */
639  xd = ((src->w - dst->w) << 15);
640  yd = ((src->h - dst->h) << 15);
641  ax = (cx << 16) - (icos * cx);
642  ay = (cy << 16) - (isin * cx);
643  sw = src->w - 1;
644  sh = src->h - 1;
645  pc = (tColorRGBA*) dst->pixels;
646  gap = dst->pitch - dst->w * 4;
647 
648  /*
649  * Switch between interpolating and non-interpolating code
650  */
651  if (smooth) {
652  for (y = 0; y < dst->h; y++) {
653  dy = cy - y;
654  sdx = (ax + (isin * dy)) + xd;
655  sdy = (ay - (icos * dy)) + yd;
656  for (x = 0; x < dst->w; x++) {
657  dx = (sdx >> 16);
658  dy = (sdy >> 16);
659  if (flipx) dx = sw - dx;
660  if (flipy) dy = sh - dy;
661  if ((dx > -1) && (dy > -1) && (dx < (src->w-1)) && (dy < (src->h-1))) {
662  sp = (tColorRGBA *)src->pixels;;
663  sp += ((src->pitch/4) * dy);
664  sp += dx;
665  c00 = *sp;
666  sp += 1;
667  c01 = *sp;
668  sp += (src->pitch/4);
669  c11 = *sp;
670  sp -= 1;
671  c10 = *sp;
672  if (flipx) {
673  cswap = c00; c00=c01; c01=cswap;
674  cswap = c10; c10=c11; c11=cswap;
675  }
676  if (flipy) {
677  cswap = c00; c00=c10; c10=cswap;
678  cswap = c01; c01=c11; c11=cswap;
679  }
680  /*
681  * Interpolate colors
682  */
683  ex = (sdx & 0xffff);
684  ey = (sdy & 0xffff);
685  t1 = ((((c01.r - c00.r) * ex) >> 16) + c00.r) & 0xff;
686  t2 = ((((c11.r - c10.r) * ex) >> 16) + c10.r) & 0xff;
687  pc->r = (((t2 - t1) * ey) >> 16) + t1;
688  t1 = ((((c01.g - c00.g) * ex) >> 16) + c00.g) & 0xff;
689  t2 = ((((c11.g - c10.g) * ex) >> 16) + c10.g) & 0xff;
690  pc->g = (((t2 - t1) * ey) >> 16) + t1;
691  t1 = ((((c01.b - c00.b) * ex) >> 16) + c00.b) & 0xff;
692  t2 = ((((c11.b - c10.b) * ex) >> 16) + c10.b) & 0xff;
693  pc->b = (((t2 - t1) * ey) >> 16) + t1;
694  t1 = ((((c01.a - c00.a) * ex) >> 16) + c00.a) & 0xff;
695  t2 = ((((c11.a - c10.a) * ex) >> 16) + c10.a) & 0xff;
696  pc->a = (((t2 - t1) * ey) >> 16) + t1;
697  }
698  sdx += icos;
699  sdy += isin;
700  pc++;
701  }
702  pc = (tColorRGBA *) ((Uint8 *) pc + gap);
703  }
704  } else {
705  for (y = 0; y < dst->h; y++) {
706  dy = cy - y;
707  sdx = (ax + (isin * dy)) + xd;
708  sdy = (ay - (icos * dy)) + yd;
709  for (x = 0; x < dst->w; x++) {
710  dx = (short) (sdx >> 16);
711  dy = (short) (sdy >> 16);
712  if (flipx) dx = (src->w-1)-dx;
713  if (flipy) dy = (src->h-1)-dy;
714  if ((dx >= 0) && (dy >= 0) && (dx < src->w) && (dy < src->h)) {
715  sp = (tColorRGBA *) ((Uint8 *) src->pixels + src->pitch * dy);
716  sp += dx;
717  *pc = *sp;
718  }
719  sdx += icos;
720  sdy += isin;
721  pc++;
722  }
723  pc = (tColorRGBA *) ((Uint8 *) pc + gap);
724  }
725  }
726 }
727 
746 void transformSurfaceY(SDL_Surface * src, SDL_Surface * dst, int cx, int cy, int isin, int icos, int flipx, int flipy)
747 {
748  int x, y, dx, dy, xd, yd, sdx, sdy, ax, ay;
749  tColorY *pc, *sp;
750  int gap;
751 
752  /*
753  * Variable setup
754  */
755  xd = ((src->w - dst->w) << 15);
756  yd = ((src->h - dst->h) << 15);
757  ax = (cx << 16) - (icos * cx);
758  ay = (cy << 16) - (isin * cx);
759  pc = (tColorY*) dst->pixels;
760  gap = dst->pitch - dst->w;
761  /*
762  * Clear surface to colorkey
763  */
764  memset(pc, (int)(_colorkey(src) & 0xff), dst->pitch * dst->h);
765  /*
766  * Iterate through destination surface
767  */
768  for (y = 0; y < dst->h; y++) {
769  dy = cy - y;
770  sdx = (ax + (isin * dy)) + xd;
771  sdy = (ay - (icos * dy)) + yd;
772  for (x = 0; x < dst->w; x++) {
773  dx = (short) (sdx >> 16);
774  dy = (short) (sdy >> 16);
775  if (flipx) dx = (src->w-1)-dx;
776  if (flipy) dy = (src->h-1)-dy;
777  if ((dx >= 0) && (dy >= 0) && (dx < src->w) && (dy < src->h)) {
778  sp = (tColorY *) (src->pixels);
779  sp += (src->pitch * dy + dx);
780  *pc = *sp;
781  }
782  sdx += icos;
783  sdy += isin;
784  pc++;
785  }
786  pc += gap;
787  }
788 }
789 
803 SDL_Surface* rotateSurface90Degrees(SDL_Surface* src, int numClockwiseTurns)
804 {
805  int row, col, newWidth, newHeight;
806  int bpp, bpr;
807  SDL_Surface* dst;
808  Uint8* srcBuf;
809  Uint8* dstBuf;
810  int normalizedClockwiseTurns;
811 
812  /* Has to be a valid surface pointer and be a Nbit surface where n is divisible by 8 */
813  if (!src ||
814  !src->format) {
815  SDL_SetError("NULL source surface or source surface format");
816  return NULL;
817  }
818 
819  if ((src->format->BitsPerPixel % 8) != 0) {
820  SDL_SetError("Invalid source surface bit depth");
821  return NULL;
822  }
823 
824  /* normalize numClockwiseTurns */
825  normalizedClockwiseTurns = (numClockwiseTurns % 4);
826  if (normalizedClockwiseTurns < 0) {
827  normalizedClockwiseTurns += 4;
828  }
829 
830  /* If turns are even, our new width/height will be the same as the source surface */
831  if (normalizedClockwiseTurns % 2) {
832  newWidth = src->h;
833  newHeight = src->w;
834  } else {
835  newWidth = src->w;
836  newHeight = src->h;
837  }
838 
839  dst = SDL_CreateRGBSurface( src->flags, newWidth, newHeight, src->format->BitsPerPixel,
840  src->format->Rmask,
841  src->format->Gmask,
842  src->format->Bmask,
843  src->format->Amask);
844  if(!dst) {
845  SDL_SetError("Could not create destination surface");
846  return NULL;
847  }
848 
849  if (SDL_MUSTLOCK(src)) {
850  SDL_LockSurface(src);
851  }
852  if (SDL_MUSTLOCK(dst)) {
853  SDL_LockSurface(dst);
854  }
855 
856  /* Calculate byte-per-pixel */
857  bpp = src->format->BitsPerPixel / 8;
858 
859  switch(normalizedClockwiseTurns) {
860  case 0: /* Make a copy of the surface */
861  {
862  /* Unfortunately SDL_BlitSurface cannot be used to make a copy of the surface
863  since it does not preserve alpha. */
864 
865  if (src->pitch == dst->pitch) {
866  /* If the pitch is the same for both surfaces, the memory can be copied all at once. */
867  memcpy(dst->pixels, src->pixels, (src->h * src->pitch));
868  }
869  else
870  {
871  /* If the pitch differs, copy each row separately */
872  srcBuf = (Uint8*)(src->pixels);
873  dstBuf = (Uint8*)(dst->pixels);
874  bpr = src->w * bpp;
875  for (row = 0; row < src->h; row++) {
876  memcpy(dstBuf, srcBuf, bpr);
877  srcBuf += src->pitch;
878  dstBuf += dst->pitch;
879  }
880  }
881  }
882  break;
883 
884  /* rotate clockwise */
885  case 1: /* rotated 90 degrees clockwise */
886  {
887  for (row = 0; row < src->h; ++row) {
888  srcBuf = (Uint8*)(src->pixels) + (row * src->pitch);
889  dstBuf = (Uint8*)(dst->pixels) + (dst->w - row - 1) * bpp;
890  for (col = 0; col < src->w; ++col) {
891  memcpy (dstBuf, srcBuf, bpp);
892  srcBuf += bpp;
893  dstBuf += dst->pitch;
894  }
895  }
896  }
897  break;
898 
899  case 2: /* rotated 180 degrees clockwise */
900  {
901  for (row = 0; row < src->h; ++row) {
902  srcBuf = (Uint8*)(src->pixels) + (row * src->pitch);
903  dstBuf = (Uint8*)(dst->pixels) + ((dst->h - row - 1) * dst->pitch) + (dst->w - 1) * bpp;
904  for (col = 0; col < src->w; ++col) {
905  memcpy (dstBuf, srcBuf, bpp);
906  srcBuf += bpp;
907  dstBuf -= bpp;
908  }
909  }
910  }
911  break;
912 
913  case 3: /* rotated 270 degrees clockwise */
914  {
915  for (row = 0; row < src->h; ++row) {
916  srcBuf = (Uint8*)(src->pixels) + (row * src->pitch);
917  dstBuf = (Uint8*)(dst->pixels) + (row * bpp) + (dst->h * dst->pitch);
918  for (col = 0; col < src->w; ++col) {
919  memcpy (dstBuf, srcBuf, bpp);
920  srcBuf += bpp;
921  dstBuf -= dst->pitch;
922  }
923  }
924  }
925  break;
926  }
927  /* end switch */
928 
929  if (SDL_MUSTLOCK(src)) {
930  SDL_UnlockSurface(src);
931  }
932  if (SDL_MUSTLOCK(dst)) {
933  SDL_UnlockSurface(dst);
934  }
935 
936  return dst;
937 }
938 
939 
954 void _rotozoomSurfaceSizeTrig(int width, int height, double angle, double zoomx, double zoomy,
955  int *dstwidth, int *dstheight,
956  double *canglezoom, double *sanglezoom)
957 {
958  double x, y, cx, cy, sx, sy;
959  double radangle;
960  int dstwidthhalf, dstheighthalf;
961 
962  /*
963  * Determine destination width and height by rotating a centered source box
964  */
965  radangle = angle * (M_PI / 180.0);
966  *sanglezoom = sin(radangle);
967  *canglezoom = cos(radangle);
968  *sanglezoom *= zoomx;
969  *canglezoom *= zoomx;
970  x = (double)(width / 2);
971  y = (double)(height / 2);
972  cx = *canglezoom * x;
973  cy = *canglezoom * y;
974  sx = *sanglezoom * x;
975  sy = *sanglezoom * y;
976 
977  dstwidthhalf = MAX((int)
978  ceil(MAX(MAX(MAX(fabs(cx + sy), fabs(cx - sy)), fabs(-cx + sy)), fabs(-cx - sy))), 1);
979  dstheighthalf = MAX((int)
980  ceil(MAX(MAX(MAX(fabs(sx + cy), fabs(sx - cy)), fabs(-sx + cy)), fabs(-sx - cy))), 1);
981  *dstwidth = 2 * dstwidthhalf;
982  *dstheight = 2 * dstheighthalf;
983 }
984 
996 void rotozoomSurfaceSizeXY(int width, int height, double angle, double zoomx, double zoomy, int *dstwidth, int *dstheight)
997 {
998  double dummy_sanglezoom, dummy_canglezoom;
999 
1000  _rotozoomSurfaceSizeTrig(width, height, angle, zoomx, zoomy, dstwidth, dstheight, &dummy_sanglezoom, &dummy_canglezoom);
1001 }
1002 
1013 void rotozoomSurfaceSize(int width, int height, double angle, double zoom, int *dstwidth, int *dstheight)
1014 {
1015  double dummy_sanglezoom, dummy_canglezoom;
1016 
1017  _rotozoomSurfaceSizeTrig(width, height, angle, zoom, zoom, dstwidth, dstheight, &dummy_sanglezoom, &dummy_canglezoom);
1018 }
1019 
1035 SDL_Surface *rotozoomSurface(SDL_Surface * src, double angle, double zoom, int smooth)
1036 {
1037  return rotozoomSurfaceXY(src, angle, zoom, zoom, smooth);
1038 }
1039 
1056 SDL_Surface *rotozoomSurfaceXY(SDL_Surface * src, double angle, double zoomx, double zoomy, int smooth)
1057 {
1058  SDL_Surface *rz_src;
1059  SDL_Surface *rz_dst;
1060  double zoominv;
1061  double sanglezoom, canglezoom, sanglezoominv, canglezoominv;
1062  int dstwidthhalf, dstwidth, dstheighthalf, dstheight;
1063  int is32bit;
1064  int i, src_converted;
1065  int flipx,flipy;
1066 
1067  /*
1068  * Sanity check
1069  */
1070  if (src == NULL) {
1071  return (NULL);
1072  }
1073 
1074  /*
1075  * Determine if source surface is 32bit or 8bit
1076  */
1077  is32bit = (src->format->BitsPerPixel == 32);
1078  if ((is32bit) || (src->format->BitsPerPixel == 8)) {
1079  /*
1080  * Use source surface 'as is'
1081  */
1082  rz_src = src;
1083  src_converted = 0;
1084  } else {
1085  /*
1086  * New source surface is 32bit with a defined RGBA ordering
1087  */
1088  rz_src =
1089  SDL_CreateRGBSurface(SDL_SWSURFACE, src->w, src->h, 32,
1090 #if SDL_BYTEORDER == SDL_LIL_ENDIAN
1091  0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000
1092 #else
1093  0xff000000, 0x00ff0000, 0x0000ff00, 0x000000ff
1094 #endif
1095  );
1096 
1097  SDL_BlitSurface(src, NULL, rz_src, NULL);
1098 
1099  src_converted = 1;
1100  is32bit = 1;
1101  }
1102 
1103  /*
1104  * Sanity check zoom factor
1105  */
1106  flipx = (zoomx<0.0);
1107  if (flipx) zoomx=-zoomx;
1108  flipy = (zoomy<0.0);
1109  if (flipy) zoomy=-zoomy;
1110  if (zoomx < VALUE_LIMIT) zoomx = VALUE_LIMIT;
1111  if (zoomy < VALUE_LIMIT) zoomy = VALUE_LIMIT;
1112  zoominv = 65536.0 / (zoomx * zoomx);
1113 
1114  /*
1115  * Check if we have a rotozoom or just a zoom
1116  */
1117  if (fabs(angle) > VALUE_LIMIT) {
1118 
1119  /*
1120  * Angle!=0: full rotozoom
1121  */
1122  /*
1123  * -----------------------
1124  */
1125 
1126  /* Determine target size */
1127  _rotozoomSurfaceSizeTrig(rz_src->w, rz_src->h, angle, zoomx, zoomy, &dstwidth, &dstheight, &canglezoom, &sanglezoom);
1128 
1129  /*
1130  * Calculate target factors from sin/cos and zoom
1131  */
1132  sanglezoominv = sanglezoom;
1133  canglezoominv = canglezoom;
1134  sanglezoominv *= zoominv;
1135  canglezoominv *= zoominv;
1136 
1137  /* Calculate half size */
1138  dstwidthhalf = dstwidth / 2;
1139  dstheighthalf = dstheight / 2;
1140 
1141  /*
1142  * Alloc space to completely contain the rotated surface
1143  */
1144  rz_dst = NULL;
1145  if (is32bit) {
1146  /*
1147  * Target surface is 32bit with source RGBA/ABGR ordering
1148  */
1149  rz_dst =
1150  SDL_CreateRGBSurface(SDL_SWSURFACE, dstwidth, dstheight + GUARD_ROWS, 32,
1151  rz_src->format->Rmask, rz_src->format->Gmask,
1152  rz_src->format->Bmask, rz_src->format->Amask);
1153  } else {
1154  /*
1155  * Target surface is 8bit
1156  */
1157  rz_dst = SDL_CreateRGBSurface(SDL_SWSURFACE, dstwidth, dstheight + GUARD_ROWS, 8, 0, 0, 0, 0);
1158  }
1159 
1160  /* Check target */
1161  if (rz_dst == NULL)
1162  return NULL;
1163 
1164  /* Adjust for guard rows */
1165  rz_dst->h = dstheight;
1166 
1167  /*
1168  * Lock source surface
1169  */
1170  if (SDL_MUSTLOCK(rz_src)) {
1171  SDL_LockSurface(rz_src);
1172  }
1173 
1174  /*
1175  * Check which kind of surface we have
1176  */
1177  if (is32bit) {
1178  /*
1179  * Call the 32bit transformation routine to do the rotation (using alpha)
1180  */
1181  _transformSurfaceRGBA(rz_src, rz_dst, dstwidthhalf, dstheighthalf,
1182  (int) (sanglezoominv), (int) (canglezoominv),
1183  flipx, flipy,
1184  smooth);
1185  } else {
1186  /*
1187  * Copy palette and colorkey info
1188  */
1189  for (i = 0; i < rz_src->format->palette->ncolors; i++) {
1190  rz_dst->format->palette->colors[i] = rz_src->format->palette->colors[i];
1191  }
1192  rz_dst->format->palette->ncolors = rz_src->format->palette->ncolors;
1193  /*
1194  * Call the 8bit transformation routine to do the rotation
1195  */
1196  transformSurfaceY(rz_src, rz_dst, dstwidthhalf, dstheighthalf,
1197  (int) (sanglezoominv), (int) (canglezoominv),
1198  flipx, flipy);
1199  }
1200  /*
1201  * Unlock source surface
1202  */
1203  if (SDL_MUSTLOCK(rz_src)) {
1204  SDL_UnlockSurface(rz_src);
1205  }
1206 
1207  } else {
1208 
1209  /*
1210  * Angle=0: Just a zoom
1211  */
1212  /*
1213  * --------------------
1214  */
1215 
1216  /*
1217  * Calculate target size
1218  */
1219  zoomSurfaceSize(rz_src->w, rz_src->h, zoomx, zoomy, &dstwidth, &dstheight);
1220 
1221  /*
1222  * Alloc space to completely contain the zoomed surface
1223  */
1224  rz_dst = NULL;
1225  if (is32bit) {
1226  /*
1227  * Target surface is 32bit with source RGBA/ABGR ordering
1228  */
1229  rz_dst =
1230  SDL_CreateRGBSurface(SDL_SWSURFACE, dstwidth, dstheight + GUARD_ROWS, 32,
1231  rz_src->format->Rmask, rz_src->format->Gmask,
1232  rz_src->format->Bmask, rz_src->format->Amask);
1233  } else {
1234  /*
1235  * Target surface is 8bit
1236  */
1237  rz_dst = SDL_CreateRGBSurface(SDL_SWSURFACE, dstwidth, dstheight + GUARD_ROWS, 8, 0, 0, 0, 0);
1238  }
1239 
1240  /* Check target */
1241  if (rz_dst == NULL)
1242  return NULL;
1243 
1244  /* Adjust for guard rows */
1245  rz_dst->h = dstheight;
1246 
1247  /*
1248  * Lock source surface
1249  */
1250  if (SDL_MUSTLOCK(rz_src)) {
1251  SDL_LockSurface(rz_src);
1252  }
1253 
1254  /*
1255  * Check which kind of surface we have
1256  */
1257  if (is32bit) {
1258  /*
1259  * Call the 32bit transformation routine to do the zooming (using alpha)
1260  */
1261  _zoomSurfaceRGBA(rz_src, rz_dst, flipx, flipy, smooth);
1262 
1263  } else {
1264  /*
1265  * Copy palette and colorkey info
1266  */
1267  for (i = 0; i < rz_src->format->palette->ncolors; i++) {
1268  rz_dst->format->palette->colors[i] = rz_src->format->palette->colors[i];
1269  }
1270  rz_dst->format->palette->ncolors = rz_src->format->palette->ncolors;
1271 
1272  /*
1273  * Call the 8bit transformation routine to do the zooming
1274  */
1275  _zoomSurfaceY(rz_src, rz_dst, flipx, flipy);
1276  }
1277 
1278  /*
1279  * Unlock source surface
1280  */
1281  if (SDL_MUSTLOCK(rz_src)) {
1282  SDL_UnlockSurface(rz_src);
1283  }
1284  }
1285 
1286  /*
1287  * Cleanup temp surface
1288  */
1289  if (src_converted) {
1290  SDL_FreeSurface(rz_src);
1291  }
1292 
1293  /*
1294  * Return destination surface
1295  */
1296  return (rz_dst);
1297 }
1298 
1311 void zoomSurfaceSize(int width, int height, double zoomx, double zoomy, int *dstwidth, int *dstheight)
1312 {
1313  /*
1314  * Make zoom factors positive
1315  */
1316  int flipx, flipy;
1317  flipx = (zoomx<0.0);
1318  if (flipx) zoomx = -zoomx;
1319  flipy = (zoomy<0.0);
1320  if (flipy) zoomy = -zoomy;
1321 
1322  /*
1323  * Sanity check zoom factors
1324  */
1325  if (zoomx < VALUE_LIMIT) {
1326  zoomx = VALUE_LIMIT;
1327  }
1328  if (zoomy < VALUE_LIMIT) {
1329  zoomy = VALUE_LIMIT;
1330  }
1331 
1332  /*
1333  * Calculate target size
1334  */
1335  *dstwidth = (int) floor(((double) width * zoomx) + 0.5);
1336  *dstheight = (int) floor(((double) height * zoomy) + 0.5);
1337  if (*dstwidth < 1) {
1338  *dstwidth = 1;
1339  }
1340  if (*dstheight < 1) {
1341  *dstheight = 1;
1342  }
1343 }
1344 
1361 SDL_Surface *zoomSurface(SDL_Surface * src, double zoomx, double zoomy, int smooth)
1362 {
1363  SDL_Surface *rz_src;
1364  SDL_Surface *rz_dst;
1365  int dstwidth, dstheight;
1366  int is32bit;
1367  int i, src_converted;
1368  int flipx, flipy;
1369 
1370  /*
1371  * Sanity check
1372  */
1373  if (src == NULL)
1374  return (NULL);
1375 
1376  /*
1377  * Determine if source surface is 32bit or 8bit
1378  */
1379  is32bit = (src->format->BitsPerPixel == 32);
1380  if ((is32bit) || (src->format->BitsPerPixel == 8)) {
1381  /*
1382  * Use source surface 'as is'
1383  */
1384  rz_src = src;
1385  src_converted = 0;
1386  } else {
1387  /*
1388  * New source surface is 32bit with a defined RGBA ordering
1389  */
1390  rz_src =
1391  SDL_CreateRGBSurface(SDL_SWSURFACE, src->w, src->h, 32,
1392 #if SDL_BYTEORDER == SDL_LIL_ENDIAN
1393  0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000
1394 #else
1395  0xff000000, 0x00ff0000, 0x0000ff00, 0x000000ff
1396 #endif
1397  );
1398  if (rz_src == NULL) {
1399  return NULL;
1400  }
1401  SDL_BlitSurface(src, NULL, rz_src, NULL);
1402  src_converted = 1;
1403  is32bit = 1;
1404  }
1405 
1406  flipx = (zoomx<0.0);
1407  if (flipx) zoomx = -zoomx;
1408  flipy = (zoomy<0.0);
1409  if (flipy) zoomy = -zoomy;
1410 
1411  /* Get size if target */
1412  zoomSurfaceSize(rz_src->w, rz_src->h, zoomx, zoomy, &dstwidth, &dstheight);
1413 
1414  /*
1415  * Alloc space to completely contain the zoomed surface
1416  */
1417  rz_dst = NULL;
1418  if (is32bit) {
1419  /*
1420  * Target surface is 32bit with source RGBA/ABGR ordering
1421  */
1422  rz_dst =
1423  SDL_CreateRGBSurface(SDL_SWSURFACE, dstwidth, dstheight + GUARD_ROWS, 32,
1424  rz_src->format->Rmask, rz_src->format->Gmask,
1425  rz_src->format->Bmask, rz_src->format->Amask);
1426  } else {
1427  /*
1428  * Target surface is 8bit
1429  */
1430  rz_dst = SDL_CreateRGBSurface(SDL_SWSURFACE, dstwidth, dstheight + GUARD_ROWS, 8, 0, 0, 0, 0);
1431  }
1432 
1433  /* Check target */
1434  if (rz_dst == NULL) {
1435  /*
1436  * Cleanup temp surface
1437  */
1438  if (src_converted) {
1439  SDL_FreeSurface(rz_src);
1440  }
1441  return NULL;
1442  }
1443 
1444  /* Adjust for guard rows */
1445  rz_dst->h = dstheight;
1446 
1447  /*
1448  * Lock source surface
1449  */
1450  if (SDL_MUSTLOCK(rz_src)) {
1451  SDL_LockSurface(rz_src);
1452  }
1453 
1454  /*
1455  * Check which kind of surface we have
1456  */
1457  if (is32bit) {
1458  /*
1459  * Call the 32bit transformation routine to do the zooming (using alpha)
1460  */
1461  _zoomSurfaceRGBA(rz_src, rz_dst, flipx, flipy, smooth);
1462  } else {
1463  /*
1464  * Copy palette and colorkey info
1465  */
1466  for (i = 0; i < rz_src->format->palette->ncolors; i++) {
1467  rz_dst->format->palette->colors[i] = rz_src->format->palette->colors[i];
1468  }
1469  rz_dst->format->palette->ncolors = rz_src->format->palette->ncolors;
1470  /*
1471  * Call the 8bit transformation routine to do the zooming
1472  */
1473  _zoomSurfaceY(rz_src, rz_dst, flipx, flipy);
1474  }
1475  /*
1476  * Unlock source surface
1477  */
1478  if (SDL_MUSTLOCK(rz_src)) {
1479  SDL_UnlockSurface(rz_src);
1480  }
1481 
1482  /*
1483  * Cleanup temp surface
1484  */
1485  if (src_converted) {
1486  SDL_FreeSurface(rz_src);
1487  }
1488 
1489  /*
1490  * Return destination surface
1491  */
1492  return (rz_dst);
1493 }
1494 
1511 /*@null@*/
1512 SDL_Surface *shrinkSurface(SDL_Surface *src, int factorx, int factory)
1513 {
1514  int result;
1515  SDL_Surface *rz_src;
1516  SDL_Surface *rz_dst = NULL;
1517  int dstwidth, dstheight;
1518  int is32bit;
1519  int i, src_converted;
1520  int haveError = 0;
1521 
1522  /*
1523  * Sanity check
1524  */
1525  if (src == NULL) {
1526  return (NULL);
1527  }
1528 
1529  /*
1530  * Determine if source surface is 32bit or 8bit
1531  */
1532  is32bit = (src->format->BitsPerPixel == 32);
1533  if ((is32bit) || (src->format->BitsPerPixel == 8)) {
1534  /*
1535  * Use source surface 'as is'
1536  */
1537  rz_src = src;
1538  src_converted = 0;
1539  } else {
1540  /*
1541  * New source surface is 32bit with a defined RGBA ordering
1542  */
1543  rz_src = SDL_CreateRGBSurface(SDL_SWSURFACE, src->w, src->h, 32,
1544 #if SDL_BYTEORDER == SDL_LIL_ENDIAN
1545  0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000
1546 #else
1547  0xff000000, 0x00ff0000, 0x0000ff00, 0x000000ff
1548 #endif
1549  );
1550  if (rz_src==NULL) {
1551  haveError = 1;
1552  goto exitShrinkSurface;
1553  }
1554 
1555  SDL_BlitSurface(src, NULL, rz_src, NULL);
1556  src_converted = 1;
1557  is32bit = 1;
1558  }
1559 
1560  /*
1561  * Lock the surface
1562  */
1563  if (SDL_MUSTLOCK(rz_src)) {
1564  if (SDL_LockSurface(rz_src) < 0) {
1565  haveError = 1;
1566  goto exitShrinkSurface;
1567  }
1568  }
1569 
1570  /* Get size for target */
1571  dstwidth=rz_src->w/factorx;
1572  while (dstwidth*factorx>rz_src->w) { dstwidth--; }
1573  dstheight=rz_src->h/factory;
1574  while (dstheight*factory>rz_src->h) { dstheight--; }
1575 
1576  /*
1577  * Alloc space to completely contain the shrunken surface
1578  * (with added guard rows)
1579  */
1580  if (is32bit==1) {
1581  /*
1582  * Target surface is 32bit with source RGBA/ABGR ordering
1583  */
1584  rz_dst =
1585  SDL_CreateRGBSurface(SDL_SWSURFACE, dstwidth, dstheight + GUARD_ROWS, 32,
1586  rz_src->format->Rmask, rz_src->format->Gmask,
1587  rz_src->format->Bmask, rz_src->format->Amask);
1588  } else {
1589  /*
1590  * Target surface is 8bit
1591  */
1592  rz_dst = SDL_CreateRGBSurface(SDL_SWSURFACE, dstwidth, dstheight + GUARD_ROWS, 8, 0, 0, 0, 0);
1593  }
1594 
1595  /* Check target */
1596  if (rz_dst == NULL) {
1597  haveError = 1;
1598  goto exitShrinkSurface;
1599  }
1600 
1601  /* Adjust for guard rows */
1602  rz_dst->h = dstheight;
1603 
1604  /*
1605  * Check which kind of surface we have
1606  */
1607  if (is32bit==1) {
1608  /*
1609  * Call the 32bit transformation routine to do the shrinking (using alpha)
1610  */
1611  result = _shrinkSurfaceRGBA(rz_src, rz_dst, factorx, factory);
1612  if ((result!=0) || (rz_dst==NULL)) {
1613  haveError = 1;
1614  goto exitShrinkSurface;
1615  }
1616  } else {
1617  /*
1618  * Copy palette and colorkey info
1619  */
1620  for (i = 0; i < rz_src->format->palette->ncolors; i++) {
1621  rz_dst->format->palette->colors[i] = rz_src->format->palette->colors[i];
1622  }
1623  rz_dst->format->palette->ncolors = rz_src->format->palette->ncolors;
1624  /*
1625  * Call the 8bit transformation routine to do the shrinking
1626  */
1627  result = _shrinkSurfaceY(rz_src, rz_dst, factorx, factory);
1628  if (result!=0) {
1629  haveError = 1;
1630  goto exitShrinkSurface;
1631  }
1632  }
1633 
1634 exitShrinkSurface:
1635  if (rz_src!=NULL) {
1636  /*
1637  * Unlock source surface
1638  */
1639  if (SDL_MUSTLOCK(rz_src)) {
1640  SDL_UnlockSurface(rz_src);
1641  }
1642 
1643  /*
1644  * Cleanup temp surface
1645  */
1646  if (src_converted==1) {
1647  SDL_FreeSurface(rz_src);
1648  }
1649  }
1650 
1651  /* Check error state; maybe need to cleanup destination */
1652  if (haveError==1) {
1653  if (rz_dst!=NULL) {
1654  SDL_FreeSurface(rz_dst);
1655  }
1656  rz_dst=NULL;
1657  }
1658 
1659  /*
1660  * Return destination surface
1661  */
1662  return (rz_dst);
1663 }
void transformSurfaceY(SDL_Surface *src, SDL_Surface *dst, int cx, int cy, int isin, int icos, int flipx, int flipy)
Rotates and zooms 8 bit palette/Y 'src' surface to 'dst' surface without smoothing.
SDL_Surface * rotozoomSurface(SDL_Surface *src, double angle, double zoom, int smooth)
Rotates and zooms a surface and optional anti-aliasing.
void rotozoomSurfaceSize(int width, int height, double angle, double zoom, int *dstwidth, int *dstheight)
Returns the size of the resulting target surface for a rotozoomSurface() call.
int _zoomSurfaceY(SDL_Surface *src, SDL_Surface *dst, int flipx, int flipy)
Internal 8 bit Zoomer without smoothing.
struct tColorY tColorY
A 8bit Y/palette pixel.
void rotozoomSurfaceSizeXY(int width, int height, double angle, double zoomx, double zoomy, int *dstwidth, int *dstheight)
Returns the size of the resulting target surface for a rotozoomSurfaceXY() call.
Uint8 y
Definition: SDL2_rotozoom.c:55
struct tColorRGBA tColorRGBA
A 32 bit RGBA pixel.
SDL_Surface * rotozoomSurfaceXY(SDL_Surface *src, double angle, double zoomx, double zoomy, int smooth)
Rotates and zooms a surface with different horizontal and vertival scaling factors and optional anti-...
#define MAX(a, b)
Returns maximum of two numbers a and b.
Definition: SDL2_rotozoom.c:61
Uint32 _colorkey(SDL_Surface *src)
Returns colorkey info for a surface.
Definition: SDL2_rotozoom.c:83
int _shrinkSurfaceRGBA(SDL_Surface *src, SDL_Surface *dst, int factorx, int factory)
Internal 32 bit integer-factor averaging Shrinker.
int _zoomSurfaceRGBA(SDL_Surface *src, SDL_Surface *dst, int flipx, int flipy, int smooth)
Internal 32 bit Zoomer with optional anti-aliasing by bilinear interpolation.
SDL_Surface * zoomSurface(SDL_Surface *src, double zoomx, double zoomy, int smooth)
Zoom a surface by independent horizontal and vertical factors with optional smoothing.
void zoomSurfaceSize(int width, int height, double zoomx, double zoomy, int *dstwidth, int *dstheight)
Calculates the size of the target surface for a zoomSurface() call.
#define GUARD_ROWS
Number of guard rows added to destination surfaces.
Definition: SDL2_rotozoom.c:73
void _rotozoomSurfaceSizeTrig(int width, int height, double angle, double zoomx, double zoomy, int *dstwidth, int *dstheight, double *canglezoom, double *sanglezoom)
Internal target surface sizing function for rotozooms with trig result return.
void _transformSurfaceRGBA(SDL_Surface *src, SDL_Surface *dst, int cx, int cy, int isin, int icos, int flipx, int flipy, int smooth)
Internal 32 bit rotozoomer with optional anti-aliasing.
#define VALUE_LIMIT
Lower limit of absolute zoom factor or rotation degrees.
Definition: SDL2_rotozoom.c:78
int _shrinkSurfaceY(SDL_Surface *src, SDL_Surface *dst, int factorx, int factory)
Internal 8 bit integer-factor averaging shrinker.
A 32 bit RGBA pixel.
Definition: SDL2_rotozoom.c:44
#define M_PI
SDL_Surface * shrinkSurface(SDL_Surface *src, int factorx, int factory)
Shrink a surface by an integer ratio using averaging.
A 8bit Y/palette pixel.
Definition: SDL2_rotozoom.c:54
SDL_Surface * rotateSurface90Degrees(SDL_Surface *src, int numClockwiseTurns)
Rotates a 8/16/24/32 bit surface in increments of 90 degrees.
SDL2_gfx-1.0.4/Docs/html/_s_d_l2__rotozoom_8h.html100777 0 0 101606 12632323332 14777 0 SDL2_gfx: /cygdrive/i/Sources/sdl2gfx/SDL2_rotozoom.h File Reference
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
/cygdrive/i/Sources/sdl2gfx/SDL2_rotozoom.h File Reference
#include <math.h>
#include "SDL.h"

Go to the source code of this file.

Macros

#define M_PI   3.1415926535897932384626433832795
 
#define SMOOTHING_OFF   0
 Disable anti-aliasing (no smoothing). More...
 
#define SMOOTHING_ON   1
 Enable anti-aliasing (smoothing). More...
 
#define SDL2_ROTOZOOM_SCOPE   extern
 

Functions

SDL2_ROTOZOOM_SCOPE SDL_Surface * rotozoomSurface (SDL_Surface *src, double angle, double zoom, int smooth)
 Rotates and zooms a surface and optional anti-aliasing. More...
 
SDL2_ROTOZOOM_SCOPE SDL_Surface * rotozoomSurfaceXY (SDL_Surface *src, double angle, double zoomx, double zoomy, int smooth)
 Rotates and zooms a surface with different horizontal and vertival scaling factors and optional anti-aliasing. More...
 
SDL2_ROTOZOOM_SCOPE void rotozoomSurfaceSize (int width, int height, double angle, double zoom, int *dstwidth, int *dstheight)
 Returns the size of the resulting target surface for a rotozoomSurface() call. More...
 
SDL2_ROTOZOOM_SCOPE void rotozoomSurfaceSizeXY (int width, int height, double angle, double zoomx, double zoomy, int *dstwidth, int *dstheight)
 Returns the size of the resulting target surface for a rotozoomSurfaceXY() call. More...
 
SDL2_ROTOZOOM_SCOPE SDL_Surface * zoomSurface (SDL_Surface *src, double zoomx, double zoomy, int smooth)
 Zoom a surface by independent horizontal and vertical factors with optional smoothing. More...
 
SDL2_ROTOZOOM_SCOPE void zoomSurfaceSize (int width, int height, double zoomx, double zoomy, int *dstwidth, int *dstheight)
 Calculates the size of the target surface for a zoomSurface() call. More...
 
SDL2_ROTOZOOM_SCOPE SDL_Surface * shrinkSurface (SDL_Surface *src, int factorx, int factory)
 Shrink a surface by an integer ratio using averaging. More...
 
SDL2_ROTOZOOM_SCOPE SDL_Surface * rotateSurface90Degrees (SDL_Surface *src, int numClockwiseTurns)
 Rotates a 8/16/24/32 bit surface in increments of 90 degrees. More...
 

Macro Definition Documentation

#define M_PI   3.1415926535897932384626433832795

Definition at line 41 of file SDL2_rotozoom.h.

#define SDL2_ROTOZOOM_SCOPE   extern

Definition at line 70 of file SDL2_rotozoom.h.

#define SMOOTHING_OFF   0

Disable anti-aliasing (no smoothing).

Definition at line 51 of file SDL2_rotozoom.h.

#define SMOOTHING_ON   1

Enable anti-aliasing (smoothing).

Definition at line 56 of file SDL2_rotozoom.h.

Function Documentation

SDL2_ROTOZOOM_SCOPE SDL_Surface* rotateSurface90Degrees ( SDL_Surface *  src,
int  numClockwiseTurns 
)

Rotates a 8/16/24/32 bit surface in increments of 90 degrees.

Specialized 90 degree rotator which rotates a 'src' surface in 90 degree increments clockwise returning a new surface. Faster than rotozoomer since no scanning or interpolation takes place. Input surface must be 8/16/24/32 bit. (code contributed by J. Schiller, improved by C. Allport and A. Schiffler)

Parameters
srcSource surface to rotate.
numClockwiseTurnsNumber of clockwise 90 degree turns to apply to the source.
Returns
The new, rotated surface; or NULL for surfaces with incorrect input format.

Definition at line 803 of file SDL2_rotozoom.c.

SDL2_ROTOZOOM_SCOPE SDL_Surface* rotozoomSurface ( SDL_Surface *  src,
double  angle,
double  zoom,
int  smooth 
)

Rotates and zooms a surface and optional anti-aliasing.

Rotates and zoomes a 32bit or 8bit 'src' surface to newly created 'dst' surface. 'angle' is the rotation in degrees and 'zoom' a scaling factor. If 'smooth' is set then the destination 32bit surface is anti-aliased. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly.

Parameters
srcThe surface to rotozoom.
angleThe angle to rotate in degrees.
zoomThe scaling factor.
smoothAntialiasing flag; set to SMOOTHING_ON to enable.
Returns
The new rotozoomed surface.

Definition at line 1035 of file SDL2_rotozoom.c.

SDL2_ROTOZOOM_SCOPE void rotozoomSurfaceSize ( int  width,
int  height,
double  angle,
double  zoom,
int *  dstwidth,
int *  dstheight 
)

Returns the size of the resulting target surface for a rotozoomSurface() call.

Parameters
widthThe source surface width.
heightThe source surface height.
angleThe angle to rotate in degrees.
zoomThe scaling factor.
dstwidthThe calculated width of the rotozoomed destination surface.
dstheightThe calculated height of the rotozoomed destination surface.

Definition at line 1013 of file SDL2_rotozoom.c.

SDL2_ROTOZOOM_SCOPE void rotozoomSurfaceSizeXY ( int  width,
int  height,
double  angle,
double  zoomx,
double  zoomy,
int *  dstwidth,
int *  dstheight 
)

Returns the size of the resulting target surface for a rotozoomSurfaceXY() call.

Parameters
widthThe source surface width.
heightThe source surface height.
angleThe angle to rotate in degrees.
zoomxThe horizontal scaling factor.
zoomyThe vertical scaling factor.
dstwidthThe calculated width of the rotozoomed destination surface.
dstheightThe calculated height of the rotozoomed destination surface.

Definition at line 996 of file SDL2_rotozoom.c.

SDL2_ROTOZOOM_SCOPE SDL_Surface* rotozoomSurfaceXY ( SDL_Surface *  src,
double  angle,
double  zoomx,
double  zoomy,
int  smooth 
)

Rotates and zooms a surface with different horizontal and vertival scaling factors and optional anti-aliasing.

Rotates and zooms a 32bit or 8bit 'src' surface to newly created 'dst' surface. 'angle' is the rotation in degrees, 'zoomx and 'zoomy' scaling factors. If 'smooth' is set then the destination 32bit surface is anti-aliased. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly.

Parameters
srcThe surface to rotozoom.
angleThe angle to rotate in degrees.
zoomxThe horizontal scaling factor.
zoomyThe vertical scaling factor.
smoothAntialiasing flag; set to SMOOTHING_ON to enable.
Returns
The new rotozoomed surface.

Definition at line 1056 of file SDL2_rotozoom.c.

SDL2_ROTOZOOM_SCOPE SDL_Surface* shrinkSurface ( SDL_Surface *  src,
int  factorx,
int  factory 
)

Shrink a surface by an integer ratio using averaging.

Shrinks a 32bit or 8bit 'src' surface to a newly created 'dst' surface. 'factorx' and 'factory' are the shrinking ratios (i.e. 2=1/2 the size, 3=1/3 the size, etc.) The destination surface is antialiased by averaging the source box RGBA or Y information. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly. The input surface is not modified. The output surface is newly allocated.

Parameters
srcThe surface to shrink.
factorxThe horizontal shrinking ratio.
factoryThe vertical shrinking ratio.
Returns
The new, shrunken surface.

Definition at line 1512 of file SDL2_rotozoom.c.

SDL2_ROTOZOOM_SCOPE SDL_Surface* zoomSurface ( SDL_Surface *  src,
double  zoomx,
double  zoomy,
int  smooth 
)

Zoom a surface by independent horizontal and vertical factors with optional smoothing.

Zooms a 32bit or 8bit 'src' surface to newly created 'dst' surface. 'zoomx' and 'zoomy' are scaling factors for width and height. If 'smooth' is on then the destination 32bit surface is anti-aliased. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly. If zoom factors are negative, the image is flipped on the axes.

Parameters
srcThe surface to zoom.
zoomxThe horizontal zoom factor.
zoomyThe vertical zoom factor.
smoothAntialiasing flag; set to SMOOTHING_ON to enable.
Returns
The new, zoomed surface.

Definition at line 1361 of file SDL2_rotozoom.c.

SDL2_ROTOZOOM_SCOPE void zoomSurfaceSize ( int  width,
int  height,
double  zoomx,
double  zoomy,
int *  dstwidth,
int *  dstheight 
)

Calculates the size of the target surface for a zoomSurface() call.

The minimum size of the target surface is 1. The input factors can be positive or negative.

Parameters
widthThe width of the source surface to zoom.
heightThe height of the source surface to zoom.
zoomxThe horizontal zoom factor.
zoomyThe vertical zoom factor.
dstwidthPointer to an integer to store the calculated width of the zoomed target surface.
dstheightPointer to an integer to store the calculated height of the zoomed target surface.

Definition at line 1311 of file SDL2_rotozoom.c.

SDL2_gfx-1.0.4/Docs/html/_s_d_l2__rotozoom_8h_source.html100777 0 0 61742 12632323332 16345 0 SDL2_gfx: /cygdrive/i/Sources/sdl2gfx/SDL2_rotozoom.h Source File
SDL2_gfx  1.0.2
GraphicsprimitivesandsurfacefunctionsforSDL2
/cygdrive/i/Sources/sdl2gfx/SDL2_rotozoom.h
Go to the documentation of this file.
1 /*
2 
3 SDL2_rotozoom.c: rotozoomer, zoomer and shrinker for 32bit or 8bit surfaces
4 
5 Copyright (C) 2012-2014 Andreas Schiffler
6 
7 This software is provided 'as-is', without any express or implied
8 warranty. In no event will the authors be held liable for any damages
9 arising from the use of this software.
10 
11 Permission is granted to anyone to use this software for any purpose,
12 including commercial applications, and to alter it and redistribute it
13 freely, subject to the following restrictions:
14 
15 1. The origin of this software must not be misrepresented; you must not
16 claim that you wrote the original software. If you use this software
17 in a product, an acknowledgment in the product documentation would be
18 appreciated but is not required.
19 
20 2. Altered source versions must be plainly marked as such, and must not be
21 misrepresented as being the original software.
22 
23 3. This notice may not be removed or altered from any source
24 distribution.
25 
26 Andreas Schiffler -- aschiffler at ferzkopp dot net
27 
28 */
29 
30 #ifndef _SDL2_rotozoom_h
31 #define _SDL2_rotozoom_h
32 
33 #include <math.h>
34 
35 /* Set up for C function definitions, even when using C++ */
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 #ifndef M_PI
41 #define M_PI 3.1415926535897932384626433832795
42 #endif
43 
44 #include "SDL.h"
45 
46  /* ---- Defines */
47 
51 #define SMOOTHING_OFF 0
52 
56 #define SMOOTHING_ON 1
57 
58  /* ---- Function Prototypes */
59 
60 #ifdef _MSC_VER
61 # if defined(DLL_EXPORT) && !defined(LIBSDL2_GFX_DLL_IMPORT)
62 # define SDL2_ROTOZOOM_SCOPE __declspec(dllexport)
63 # else
64 # ifdef LIBSDL2_GFX_DLL_IMPORT
65 # define SDL2_ROTOZOOM_SCOPE __declspec(dllimport)
66 # endif
67 # endif
68 #endif
69 #ifndef SDL2_ROTOZOOM_SCOPE
70 # define SDL2_ROTOZOOM_SCOPE extern
71 #endif
72 
73  /*
74 
75  Rotozoom functions
76 
77  */
78 
79  SDL2_ROTOZOOM_SCOPE SDL_Surface *rotozoomSurface(SDL_Surface * src, double angle, double zoom, int smooth);
80 
82  (SDL_Surface * src, double angle, double zoomx, double zoomy, int smooth);
83 
84 
85  SDL2_ROTOZOOM_SCOPE void rotozoomSurfaceSize(int width, int height, double angle, double zoom, int *dstwidth,
86  int *dstheight);
87 
89  (int width, int height, double angle, double zoomx, double zoomy,
90  int *dstwidth, int *dstheight);
91 
92  /*
93 
94  Zooming functions
95 
96  */
97 
98  SDL2_ROTOZOOM_SCOPE SDL_Surface *zoomSurface(SDL_Surface * src, double zoomx, double zoomy, int smooth);
99 
100  SDL2_ROTOZOOM_SCOPE void zoomSurfaceSize(int width, int height, double zoomx, double zoomy, int *dstwidth, int *dstheight);
101 
102  /*
103 
104  Shrinking functions
105 
106  */
107 
108  SDL2_ROTOZOOM_SCOPE SDL_Surface *shrinkSurface(SDL_Surface * src, int factorx, int factory);
109 
110  /*
111 
112  Specialized rotation functions
113 
114  */
115 
116  SDL2_ROTOZOOM_SCOPE SDL_Surface* rotateSurface90Degrees(SDL_Surface* src, int numClockwiseTurns);
117 
118  /* Ends C function definitions when using C++ */
119 #ifdef __cplusplus
120 }
121 #endif
122 
123 #endif /* _SDL2_rotozoom_h */
SDL2_ROTOZOOM_SCOPE SDL_Surface * rotateSurface90Degrees(SDL_Surface *src, int numClockwiseTurns)
Rotates a 8/16/24/32 bit surface in increments of 90 degrees.
SDL2_ROTOZOOM_SCOPE SDL_Surface * rotozoomSurfaceXY(SDL_Surface *src, double angle, double zoomx, double zoomy, int smooth)
Rotates and zooms a surface with different horizontal and vertival scaling factors and optional anti-...
#define SDL2_ROTOZOOM_SCOPE
Definition: SDL2_rotozoom.h:70
SDL2_ROTOZOOM_SCOPE SDL_Surface * rotozoomSurface(SDL_Surface *src, double angle, double zoom, int smooth)
Rotates and zooms a surface and optional anti-aliasing.
SDL2_ROTOZOOM_SCOPE SDL_Surface * shrinkSurface(SDL_Surface *src, int factorx, int factory)
Shrink a surface by an integer ratio using averaging.
SDL2_ROTOZOOM_SCOPE void rotozoomSurfaceSize(int width, int height, double angle, double zoom, int *dstwidth, int *dstheight)
Returns the size of the resulting target surface for a rotozoomSurface() call.
SDL2_ROTOZOOM_SCOPE void rotozoomSurfaceSizeXY(int width, int height, double angle, double zoomx, double zoomy, int *dstwidth, int *dstheight)
Returns the size of the resulting target surface for a rotozoomSurfaceXY() call.
SDL2_ROTOZOOM_SCOPE SDL_Surface * zoomSurface(SDL_Surface *src, double zoomx, double zoomy, int smooth)
Zoom a surface by independent horizontal and vertical factors with optional smoothing.
SDL2_ROTOZOOM_SCOPE void zoomSurfaceSize(int width, int height, double zoomx, double zoomy, int *dstwidth, int *dstheight)
Calculates the size of the target surface for a zoomSurface() call.
SDL2_gfx-1.0.4/INSTALL100777 0 0 20 12347407505 7173 0See README file.SDL2_gfx-1.0.4/install-sh100777 0 0 33256 12021530027 10225 0#!/bin/sh # install - install a program, script, or datafile scriptversion=2011-01-19.21; # 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. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # 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_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= 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 the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -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 " 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 *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 # Protect names problematic for `test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done 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 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=$? 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; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/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-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob 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=$dstdir/_inst.$$_ rmtmp=$dstdir/_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 && $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` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # 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 -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$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 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: SDL2_gfx-1.0.4/ltmain.sh100777 0 0 1053774 12217637577 10145 0 # libtool (GNU libtool) 2.4 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009, 2010 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages # --version print version information # -h, --help, --help-all print short, long, or detailed help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. When passed as first option, # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.4 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . # GNU libtool home page: . # General help using GNU software: . PROGRAM=libtool PACKAGE=libtool VERSION=2.4 TIMESTAMP="" package_revision=1.3294 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # NLS nuisances: We save the old values to restore during execute mode. lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL $lt_unset CDPATH # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${EGREP="/usr/bin/grep -E"} : ${FGREP="/usr/bin/grep -F"} : ${GREP="/usr/bin/grep"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SED="/usr/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_dirname may be replaced by extended shell implementation # func_basename file func_basename () { func_basename_result=`$ECHO "${1}" | $SED "$basename"` } # func_basename may be replaced by extended shell implementation # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` } # func_dirname_and_basename may be replaced by extended shell implementation # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname may be replaced by extended shell implementation # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' pathcdr='s,^/[^/]*,,' removedotparts=':dotsl s@/\./@/@g t dotsl s,/\.$,/,' collapseslashes='s@/\{1,\}@/@g' finalslash='s,/*$,/,' # func_normal_abspath PATH # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. # value returned in "$func_normal_abspath_result" func_normal_abspath () { # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` while :; do # Processed it all yet? if test "$func_normal_abspath_tpath" = / ; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result" ; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_relative_path SRCDIR DSTDIR # generates a relative path from SRCDIR to DSTDIR, with a trailing # slash if non-empty, suitable for immediately appending a filename # without needing to append a separator. # value returned in "$func_relative_path_result" func_relative_path () { func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=${func_dirname_result} if test "x$func_relative_path_tlibdir" = x ; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test "x$func_stripname_result" != x ; then func_relative_path_result=${func_relative_path_result}/${func_stripname_result} fi # Normalisation. If bindir is libdir, return empty string, # else relative path ending with a slash; either way, target # file name can be directly appended. if test ! -z "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result/" func_relative_path_result=$func_stripname_result fi } # The name of this program: func_dirname_and_basename "$progpath" progname=$func_basename_result # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=: for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' # Sed substitution that converts a w32 file name or path # which contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "$my_tmpdir" } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_tr_sh # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_version # Echo version message to standard output and exit. func_version () { $opt_debug $SED -n '/(C)/!b go :more /\./!{ N s/\n# / / b more } :go /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $opt_debug $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" echo $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help [NOEXIT] # Echo long help message to standard output and exit, # unless 'noexit' is passed as argument. func_help () { $opt_debug $SED -n '/^# Usage:/,/# Report bugs to/ { :print s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ p d } /^# .* home page:/b print /^# General help using/b print ' < "$progpath" ret=$? if test -z "$1"; then exit $ret fi } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $opt_debug func_error "missing argument for $1." exit_cmd=exit } # func_split_short_opt shortopt # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. func_split_short_opt () { my_sed_short_opt='1s/^\(..\).*$/\1/;q' my_sed_short_rest='1s/^..\(.*\)$/\1/;q' func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` } # func_split_short_opt may be replaced by extended shell implementation # func_split_long_opt longopt # Set func_split_long_opt_name and func_split_long_opt_arg shell # variables after splitting LONGOPT at the `=' sign. func_split_long_opt () { my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^--[^=]*=//' func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` } # func_split_long_opt may be replaced by extended shell implementation exit_cmd=: magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. nonopt= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "${1}=\$${1}\${2}" } # func_append may be replaced by extended shell implementation # func_append_quoted var value # Quote VALUE and append to the end of shell variable VAR, separated # by a space. func_append_quoted () { func_quote_for_eval "${2}" eval "${1}=\$${1}\\ \$func_quote_for_eval_result" } # func_append_quoted may be replaced by extended shell implementation # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "${@}"` } # func_arith may be replaced by extended shell implementation # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` } # func_len may be replaced by extended shell implementation # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` } # func_lo2o may be replaced by extended shell implementation # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` } # func_xform may be replaced by extended shell implementation # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_error ${1+"$@"} func_error "See the $PACKAGE documentation for more information." func_fatal_error "Fatal configuration error." } # func_config # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # Display the features supported by this script. func_features () { echo "host: $host" if test "$build_libtool_libs" = yes; then echo "enable shared libraries" else echo "disable shared libraries" fi if test "$build_old_libs" = yes; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag tagname # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname="$1" re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf="/$re_begincf/,/$re_endcf/p" # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Option defaults: opt_debug=: opt_dry_run=false opt_config=false opt_preserve_dup_deps=false opt_features=false opt_finish=false opt_help=false opt_help_all=false opt_silent=: opt_verbose=: opt_silent=false opt_verbose=false # Parse options once, thoroughly. This comes as soon as possible in the # script to make things like `--version' happen as quickly as we can. { # this just eases exit handling while test $# -gt 0; do opt="$1" shift case $opt in --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" $opt_debug ;; --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) opt_config=: func_config ;; --dlopen|-dlopen) optarg="$1" opt_dlopen="${opt_dlopen+$opt_dlopen }$optarg" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) opt_features=: func_features ;; --finish) opt_finish=: set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help_all=: opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_mode="$optarg" case $optarg in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_silent=false func_append preserve_args " $opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" ;; --silent|--quiet) opt_silent=: func_append preserve_args " $opt" opt_verbose=false ;; --verbose|-v) opt_verbose=: func_append preserve_args " $opt" opt_silent=false ;; --tag) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_tag="$optarg" func_append preserve_args " $opt $optarg" func_enable_tag "$optarg" shift ;; -\?|-h) func_usage ;; --help) func_help ;; --version) func_version ;; # Separate optargs to long options: --*=*) func_split_long_opt "$opt" set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-n*|-v*) func_split_short_opt "$opt" set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done # Validate options: # save first non-option argument if test "$#" -gt 0; then nonopt="$opt" shift fi # preserve --debug test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test "$opt_mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$opt_mode' for more information." } # Bail if the options were screwed $exit_cmd $EXIT_FAILURE } ## ----------- ## ## Main. ## ## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case "$lt_sysroot:$1" in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result="=$func_stripname_result" ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$lt_sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $opt_debug # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result="" if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result" ; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $opt_debug if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $opt_debug # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $opt_debug if test -z "$2" && test -n "$1" ; then func_error "Could not determine host file name corresponding to" func_error " \`$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result="$1" fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $opt_debug if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " \`$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result="$3" fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $opt_debug case $4 in $1 ) func_to_host_path_result="$3$func_to_host_path_result" ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via `$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $opt_debug $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $opt_debug case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result="$1" } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result="$func_convert_core_msys_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via `$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $opt_debug if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd="func_convert_path_${func_stripname_result}" fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $opt_debug func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result="$1" } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_msys_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_mode_compile arg... func_mode_compile () { $opt_debug # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify \`-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with \`-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj="$func_basename_result" } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac echo $ECHO "Try \`$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test "$opt_help" = :; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | sed '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "\`$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument \`$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and \`=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the \`-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the \`$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test "x$prev" = x-m && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename="" if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname" ; then func_basename "$dlprefile_dlname" dlprefile_dlbasename="$func_basename_result" else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename" ; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $opt_debug sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $opt_debug match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive which possess that section. Heuristic: eliminate # all those which have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $opt_debug if func_cygming_gnu_implib_p "$1" ; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1" ; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result="" fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" if test "$lock_old_archive_extraction" = yes; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test "$lock_old_archive_extraction" = yes; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ which is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options which match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include /* declarations of non-ANSI functions */ #if defined(__MINGW32__) # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined(__CYGWIN__) # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined (other platforms) ... */ #endif /* portability defines, excluding path handling macros */ #if defined(_MSC_VER) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC # ifndef _INTPTR_T_DEFINED # define _INTPTR_T_DEFINED # define intptr_t int # endif #elif defined(__MINGW32__) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined(__CYGWIN__) # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined (other platforms) ... */ #endif #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #if defined(LT_DEBUGWRAPPER) static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -e 's/\([\\"]\)/\\\1/g' \ -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_emit_exe_manifest # emit a Win32 UAC manifest for executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_exe_manifest () { cat < EOF } # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $opt_debug case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir="$arg" prev= continue ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization # -{shared,static}-libgcc, -static-{libgfortran|libstdc++} # link against specified runtime library # -fstack-protector* stack protector flags for GCC -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-flto*|-fwhopr*|-fuse-linker-plugin| \ -shared-libgcc|-static-libgcc|-static-libgfortran|-static-libstdc++| \ -fstack-protector*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps ; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." else echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test "$prefer_static_libs" = yes || test "$prefer_static_libs,$installed" = "built,no"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib="$l" done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$lt_sysroot$libdir" absdir="$lt_sysroot$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later func_append notinst_path " $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi case "$host" in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then echo if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system can not link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs="$temp_deplibs" fi func_append newlib_search_path " $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. func_append verstring ":${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$opt_mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test "X$deplibs_check_method" = "Xnone"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$opt_mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_apped perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd1 in $cmds; do IFS="$save_ifs" # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test "$try_normal_branch" = yes \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=${output_objdir}/${output_la}.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " ${wl}-bind_at_load" func_append finalize_command " ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=no ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper $cwrapper.manifest; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then # Create the UAC manifests first if necessary (but the # manifest files must have executable permission regardless). case $output_name in *instal*|*patch*|*setup*|*update*) func_emit_exe_manifest > $cwrapper.manifest func_emit_exe_manifest > $output_path/$objdir/$output_name.exe.manifest chmod +x $cwrapper.manifest chmod +x $output_path/$objdir/$output_name.exe.manifest ;; esac $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test "x$bindir" != x ; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) func_append RM " $arg"; rmforce=yes ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then odir="$objdir" else odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" test "$opt_mode" = uninstall && odir="$dir" # Remember odir for removal later, being careful to avoid duplicates if test "$opt_mode" = clean; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case "$opt_mode" in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.${objext}" func_append rmfiles " ${name}.manifest $objdir/${name}.manifest" if test "$fast_install" = yes && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name $objdir/lt-${name}.manifest" fi if test "X$noexename" != "X$name" ; then func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 SDL2_gfx-1.0.4/Makefile.am100777 0 0 1532 12345353754 10253 0# Makefile.am for the SDL2_gfx library lib_LTLIBRARIES = libSDL2_gfx.la libSDL2_gfxincludedir = \ $(includedir)/SDL2 libSDL2_gfxinclude_HEADERS = \ SDL2_framerate.h \ SDL2_gfxPrimitives.h \ SDL2_imageFilter.h \ SDL2_rotozoom.h libSDL2_gfx_la_SOURCES = \ SDL2_framerate.c \ SDL2_gfxPrimitives.c \ SDL2_imageFilter.c \ SDL2_rotozoom.c EXTRA_DIST = \ autogen.sh libSDL2_gfx_la_LDFLAGS = \ -no-undefined \ -release $(LT_RELEASE) \ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) %.o : %.rc $(WINDRES) $< $@ # Rule to build tar-gzipped distribution package $(PACKAGE)-$(VERSION).tar.gz: distcheck pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = SDL2_gfx.pc # Additional cleanup rules DISTCLEANFILES = \ *~ \ SDL2_gfx.sdf \ SDL2_gfx.suo \ SDL2_gfx.vcxproj.user \ autom4te.cache/* \ Win32/Debug/* \ Win32/Release/* SDL2_gfx-1.0.4/Makefile.in100777 0 0 65530 12345353754 10314 0# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ # Makefile.am for the SDL2_gfx library VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } 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@ subdir = . DIST_COMMON = README $(am__configure_deps) \ $(libSDL2_gfxinclude_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/SDL2_gfx.pc.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ config.guess config.sub depcomp install-sh ltmain.sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude/libtool.m4 \ $(top_srcdir)/acinclude/ltoptions.m4 \ $(top_srcdir)/acinclude/ltsugar.m4 \ $(top_srcdir)/acinclude/ltversion.m4 \ $(top_srcdir)/acinclude/lt~obsolete.m4 \ $(top_srcdir)/acinclude/pkg.m4 $(top_srcdir)/acinclude/sdl2.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = SDL2_gfx.pc CONFIG_CLEAN_VPATH_FILES = 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; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \ "$(DESTDIR)$(libSDL2_gfxincludedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libSDL2_gfx_la_LIBADD = am_libSDL2_gfx_la_OBJECTS = SDL2_framerate.lo SDL2_gfxPrimitives.lo \ SDL2_imageFilter.lo SDL2_rotozoom.lo libSDL2_gfx_la_OBJECTS = $(am_libSDL2_gfx_la_OBJECTS) libSDL2_gfx_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libSDL2_gfx_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libSDL2_gfx_la_SOURCES) DIST_SOURCES = $(libSDL2_gfx_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(pkgconfig_DATA) HEADERS = $(libSDL2_gfxinclude_HEADERS) ETAGS = etags CTAGS = ctags 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 DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best 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@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BINARY_AGE = @BINARY_AGE@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERFACE_AGE = @INTERFACE_AGE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAJOR_VERSION = @MAJOR_VERSION@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MICRO_VERSION = @MICRO_VERSION@ MINOR_VERSION = @MINOR_VERSION@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ 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@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ SDL_VERSION = @SDL_VERSION@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ 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@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ 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@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ 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@ lib_LTLIBRARIES = libSDL2_gfx.la libSDL2_gfxincludedir = \ $(includedir)/SDL2 libSDL2_gfxinclude_HEADERS = \ SDL2_framerate.h \ SDL2_gfxPrimitives.h \ SDL2_imageFilter.h \ SDL2_rotozoom.h libSDL2_gfx_la_SOURCES = \ SDL2_framerate.c \ SDL2_gfxPrimitives.c \ SDL2_imageFilter.c \ SDL2_rotozoom.c EXTRA_DIST = \ autogen.sh libSDL2_gfx_la_LDFLAGS = \ -no-undefined \ -release $(LT_RELEASE) \ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = SDL2_gfx.pc # Additional cleanup rules DISTCLEANFILES = \ *~ \ SDL2_gfx.sdf \ SDL2_gfx.suo \ SDL2_gfx.vcxproj.user \ autom4te.cache/* \ Win32/Debug/* \ Win32/Release/* all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj 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) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: 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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ 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): SDL2_gfx.pc: $(top_builddir)/config.status $(srcdir)/SDL2_gfx.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libSDL2_gfx.la: $(libSDL2_gfx_la_OBJECTS) $(libSDL2_gfx_la_DEPENDENCIES) $(EXTRA_libSDL2_gfx_la_DEPENDENCIES) $(libSDL2_gfx_la_LINK) -rpath $(libdir) $(libSDL2_gfx_la_OBJECTS) $(libSDL2_gfx_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SDL2_framerate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SDL2_gfxPrimitives.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SDL2_imageFilter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SDL2_rotozoom.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) install-libSDL2_gfxincludeHEADERS: $(libSDL2_gfxinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(libSDL2_gfxinclude_HEADERS)'; test -n "$(libSDL2_gfxincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(libSDL2_gfxincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libSDL2_gfxincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libSDL2_gfxincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(libSDL2_gfxincludedir)" || exit $$?; \ done uninstall-libSDL2_gfxincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(libSDL2_gfxinclude_HEADERS)'; test -n "$(libSDL2_gfxincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(libSDL2_gfxincludedir)'; $(am__uninstall_files_from_dir) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(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) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__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*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(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*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod u+w $(distdir) mkdir $(distdir)/_build mkdir $(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 \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(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__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 check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(libSDL2_gfxincludedir)"; 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: 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) 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-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-libSDL2_gfxincludeHEADERS \ install-pkgconfigDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: 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 -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES \ uninstall-libSDL2_gfxincludeHEADERS uninstall-pkgconfigDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ clean-generic clean-libLTLIBRARIES clean-libtool ctags dist \ dist-all dist-bzip2 dist-gzip dist-lzip dist-lzma dist-shar \ dist-tarZ dist-xz dist-zip distcheck distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ 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-libLTLIBRARIES \ install-libSDL2_gfxincludeHEADERS install-man install-pdf \ install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-libLTLIBRARIES uninstall-libSDL2_gfxincludeHEADERS \ uninstall-pkgconfigDATA %.o : %.rc $(WINDRES) $< $@ # Rule to build tar-gzipped distribution package $(PACKAGE)-$(VERSION).tar.gz: distcheck # 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: SDL2_gfx-1.0.4/missing100777 0 0 24152 12021530027 7613 0#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2012-01-06.13; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. # Originally 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 run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file yacc create \`y.tab.[ch]', if possible, from existing .[ch] 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 # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG=\${$#} case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG=\${$#} case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: SDL2_gfx-1.0.4/NEWS100777 0 0 16 12021530027 6627 0SDL2_gfx NEWS SDL2_gfx-1.0.4/README100777 0 0 6143 13052746432 7075 0/*! \mainpage SDL2_gfx - Graphics primitives and surface functions for SDL2 \section contact_sec Contact and License Email aschiffler at ferzkopp dot net to contact the author or better check author's homepage at http://www.ferzkopp.net for the most up-to-date contact information. This library is licenced under the zlib License, see the file LICENSE for details. \section intro_sec Introduction The SDL2_gfx library provides the basic drawing functions such as lines, circles or polygons provided by SDL_gfx on SDL2 against renderers of SDL2. The current components of the SDL2_gfx library are: - Graphic Primitives (SDL2_gfxPrimitives.h, SDL2_gfxPrimitives.c) - Surface Rotozoomer (SDL2_rotozoom.h, SDL2_rotozoom.c) - Framerate control (SDL2_framerate.h, SDL2_framerate.c) - MMX image filters (SDL2_imageFilter.h, SDL2_imageFilter.c) - Build-in 8x8 Font (SDL2_gfxPrimitives_font.h) Note that SDL2_gfx is compatible with SDL version 2.0 (not SDL 1.2). \section install_sec Installation \subsection unix Unix/Linux Use the standard autoconf/automake sequence to compile and install the library. \verbatim ./autogen.sh # (optional, recommended) ./configure make make install \endverbatim \\subsubsection nommx Linker Configuration The default location for the installation is /usr/local/lib and /usr/local/include. This libary path may need to be added to the file the linker configuration file: \verbatim vi /etc/ld.so.conf ldconfig \endverbatim \\subsubsection nommx Non-MMX Platforms To build without MMX code enabled (i.e. ARM, PPC, AMD64 architectures): \verbatim ./configure --disable-mmx make make install \endverbatim \subsection visualstudio Windows (VS2015) Open the SDL2_gfx.sln solution file, right click on the solution and choose 'Rebuild'. The SDL2-2.0.5 folder must be placed in a directory alongside SDL2_gfx (or sdl2gfx-code) and build in the same configuration, i.e. Debug or Release, beforehand so the referenced SDL2.lib file can be found. \subsection platformosx Mac OSX The usual autotools build chain should be used. MacPorts or fink may be required. Xcode is supported via templates. See Xcode.zip - this template only supports SDL2_gfx and not the tests. For this template, the Deployment Target (the lowest version to run on) is set to 10.11 and expects the SDL2.framework preinstalled in the default location: /Library/Frameworks. \section test_sec Test Programs Change to the ./test directory and run \verbatim ./autogen.sh ./configure make \endverbatim to create several test programs for the libraries functions. This requires the SDL2_gfx library to be previously compiled and installed. See the source in the test/*.c files for some sample code and implementation hints. \section documentation_sec Documentation Please refer to the Doxygen-generated API documentation found in the Docs/html folder as well as the test programs in the test folder. \section changelog_sec Change Log \verbinclude ChangeLog */ SDL2_gfx-1.0.4/Screenshots/ 40777 0 0 0 13240160030 10370 5SDL2_gfx-1.0.4/Screenshots/FilledCircle.jpg100777 0 0 214734 12355420160 13577 0JFIF``ExifMM*;Ji\$ >Andreas Schiffler1818 2014:06:16 07:44:562014:06:16 07:44:56Andreas Schiffler $http://ns.adobe.com/xap/1.0/ 2014-06-16T07:44:56.176Andreas Schiffler C   '!%"."%()+,+ /3/*2'*+*C  ***************************************************" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?((( B|AzM$p:ƑF,BV dԊ5 QZLB"K*}TGPkc~&4]w@֢3\1,h$ʬB8e$ 1ΦO i7l5ӵk0o)&&>Hu  TbaVIBV]m}KJ-0W^ l"Z-W kyɰh!* ..>loN6:xNH,aѐI$EFms9cqn^e.wkmu,oWxKئ&Oq}iomoDkgkrC#\hc8[gw:NaŅ\i 2gTjr{mk,mZI-}qʋzX“ɬK/>noiGmBtGC3a|/ZQYzѺoCV4lv,>nL>#R-Z|Muj)hռOX`Pm0yq_w#dU}kB|?z$2Ȓ*JU$d>xIη>nr,U2K 1Χ~' KUM\ikc !#۽Zğh861o,#3%O;t/: op[H`bz+I4OFrWE_SʭkƯ+S$N9f ($޴4 B QwtH2Pؓv0ٮ6L7XZ[ Z{{x[q#nS"b6&.}}-͞ Jo3+21\q9'ƺrr6_OCg71A^WI5r@QH5̰Hcg1EI2{A]tWcԼA< wl]2.\ݫ}]cƖsмU7tմ!.i_tkDt.2QAnxc7eHQ5x!kkx܉/,;XL:.:^EM8-NkKm sHY .]>W*B wYC|99V0t禖oE4;Kϲ+ HaR웼rnF*;Sz--#QuGqÒ08bF3[VC~Cc='%￳?dy6y~˝>l dbx{ۛhpxoTIpF5Qr־DƃRAMs'g"7:^sG]ZLMIVGG}g>̞w7f3os͏ᮃG^*A|#Z,%n-/ӻ>Z$ BSSVjK[Z F/v5PFcW)EA'{[_{ɧlԬ3F.ث%S❅:{KK]sMx \31q"4=~&h__Ax~ThY\ۨ; |ؼf>Rh[lݸKX8=Kz[ڔr2$rEwP{vу0k> l9F1Ȳ) RCpH=5ßmWHYNxfX;m.RI-h?=#/>Ѫ]k|qgi<ԙiv\䟗oS]V[jQOsIҮZLR9.˅$"ݗs2zN42}ou=F wO3w %Xz;;y|]\|Lе۫VL+Owqo xprUJH w`%EKvwm7d+鵃=?P+>?*ghJ8 8?mJWo 0a+qm|nj獶%fԐA r~;:b8 v0h Rؐx|V"_gRtmZRWL袮iƓri#"+AeVkЗ5R tUOTծV{#u@ZYlV(H2<[Sմ qkPC>ת꯳o޽:-vK\VW>$6\NK ?nW>URLEY$kjSG?RDWm1^78mˀA9>շTrǹzZI-}qʋzX“ɪv5PFcW)EA'{^ev;׭Rx 5Nfl1/v\tWcԼA< wl]2.\ݧV1\Ԭn?_^seC-2xZѲ^tBe H'x(;r"Ş6#i$mo\cse.T3;d*T-J.*6}RZ3WV??a_Cyp:~Q܎FqYovc85|6N;n}\Yrd u0GA c]ZùWM7-E2v04Z=$`B45PÑQ/>|~Oٶ_݌[?o&κ{h"wva.U(͏ܓƾ7>#4˻6}E$P* #! xZ' wj4+'hZRVd&WYXe]IWSꤌ:Fj>%֠tK\nީj<phֿ/֫ `yd!<%oy MIM;~/--(']wFs]jbSRͤݽ/D9:+4hk5m-c_J-IcpX>5u+?eӭ&P_I᧐1rp(T*M.Ov$7e5`d7$ePI89<㡨 QZLB"K*}TGPksž$t xȻ m-D4- cg@Cy1ϊ}9 X]]Ϣhum d6$RFX9``/5\f.'R/=ۻn^Fx(#1"ƠY =w +z4д#]8猫$ݰ)9k||ojV0ocS"2F!X+ HÿTA d(Zk>,CGhRѳ84ƘYbh̨Mai3TtK[+#O.nT/AO|wK-3v@͉<ɝy8o`e@ra]ݗ[3\-S$ki,Cڼˇ"06Yq4 i+܉5#Z{7 {g=W w$ѻ;eh6/ϋ99n@v0 ʜ䨫ݴzkg IQ_[1e 0T(o|'YwgO\_E|֐owyh2 cr/iqx?iia56/$D(ڙ`W <+x7ӥ[&2\<;P6Pv N3Ė:N5ͺi2$R\>kH@5&8IJ L6 Eu`W =u4AB[nP?i~״Koj:-gGN&Q#.;h~WKsi&ԵIԘ#'˻1;p8vz/aKe HnG`Fir vPEl3P EzmZi-;Kk{XDf&7^CFByß)5Z^imj{H}6(q!BȳyabVFwpVߊt|?hwWvQ^sc%t(ЎC@Ġ((((((((ǍM hq|AǍM hq|AǍM hq|AǍM hq|AǍM hq|AǍM hq|AǍM hq|A렻/,|/n#$HwtFeFQ(VdOW77+ǍM k᷊mncW[E!N-ÙPNAE &s5gOW]";+^(>]ŵr&A $} G9Z].7m&g(ۻPy$@sF^-it;T5՟nB]ANFiEZYWLzK{4>U$okk?Cwy7vOawlz ( LFuxmM]$Y\6Qj }kr̸GeI8J?\x&i^5ևxMt1vW0) %@8¢>LOx-mq!$~@8/h|#3Mtm.#b&m“B2s^]Kuy?Oq3%]6vybW$rI\x&(q|A?\x&nmx{T1\G:K fRӎ}Mt)Ѽay|߱ZCm7m8}Mq4P[+.Xş.9 Ud>9O{o[?Ywӎ@#a?e~^8RŢZYWLzK{4>UQ@Z/Ũ5x4G kԷH|n#^ QGϊq_Ex.a kt$hʨ Ev|S?cwzYMmu}mgn6}8I .-AXW=뛠J鮴=ŚmáI*@8'#a?e~^8\MŢZYWLzK{4>UZ LFuxmM]$Y\6\mחR^xOēLIeMF'%$j/W77+n?\x&W77+n촯 LnC []͹8lFjைگQ}w.<ˋ $|Y ᷊mncW[E!N-ÙPNAßxzK-S|kV~r wA 94/||ZH-ul0V#n q5wH?:74?o+[|͹g8ϩ I7Jh0FwE !n`PFr3?@Z/Ũ5x4G kԷH|n#^ DZ/Ũ5x4G kԷH|n#^ \% }kr̸GeI8u],h S*on6A?x#C /XJd}_/o_Gn[i~ Ѽ;7-%&4h翸ry]QFw3s/xnG @>#k_֮uh/5KOXG[[FHka| R ~Zՠo-=b;mnqv M2H5/xnG @{&sCa%iᙢA鲄DGcf\B$}޵nG GۼB?}!ww{J-no.|eS*O(P Jx6 >A?x#CD>,bO &ph?˧jIZP0r&I?Qo?sT?>^3wl5f/xnG @+šË iyRY[}Y+I9]QõH[Ox#C{>Ox#C{>Ox#C{>Ox#C{>Ox#C{>Ox#C{>%O\z'<|J-ծEB6JbSֹx#Cn>A?x#Cn>A?x#Cn>A?x#Cn>A?x#Cn>A?x#CD>6i/ 7/ۏ#WL}7w߷x#C{>>/zݾp&t^(Ť#X|썸C[egG|#%nV=۳sYw?^:>A?:o4iAqrms9R<̮m(c#;95W:PG{-#S}$ Z\)f߷x#C{>x otx=Z4i> v0_ N5 L {>w?^: k懨bKM[E]>3DOe #o4̸NHj+Vkukuo{.U}YBp_ @DSxW нAt}/xsuş IwӴ.|-Yt-]Y|)+J&Qם/xnG @_ߨkmj|fn>ju^~]VMcʒozt7ZI|ȥ@/нAt}/xv'p/g kMCL"?R%Y1!2rjOTv4uK9c宒Ɨ,۠< o `IF   \'ۼB?}!нAt]'ۼB?}!нAt]'ۼB?}!нAt]'ۼB?}!нAt]'ۼB?}!нAt]'ۼB?}!нAt]'ۼB?}!нAt֍^%ŵ;[Qw>՝]χ5mulGׯ+uI+꼙2Fvs}c|*\oўMN ?Wmo471)'m9P:r[$N1u~Hd:5 >¹JWG%rqUYv&g_]]@~IT+r :)֚vh>+?'&bg_]}EB;V~.OLҏ^.'IɘU ;Krj6>L#<15OP}ƽkGpעo\u~Қb3?_P}ƺ+^T/c?_?C 8?j|;cDJvs?v5nO U'Vit3=L&[ ~G ?x?<U{ _޿ǡy|><4̏ºOb/*]m=ƴkeU廷C`!Jvڋ/@swq2}DXt_[Iq־2uLlecXԯ;I$su%yt v |OKx\~NC]}:0@)kamY;T| ?ɸ??P7_OQO_pt¡n.>Wgu@?O{[;˚3CcP>}~ʿVtp+VtV R'J3G5.???#'^r:*ekOͫҭ:qJɵף<w|2TϏFO*BJe#CQ~>?? (ҭ~?X3̢^4V*:1xZ|.QGŽPu_,B K.kU&2s2|U I'nQ^^MXtmEaW|FQ_5+qQvGfx:xJʝ6j%O\pI)5,OLWCJ5yޙa+FǮ MJ՞_S94-FC}ƦO kgeqMk6i)aq+G9Uy~ tcf|JziWGVv3#?*//]7#WZ0sI-7sm^1^#1 I[JgsuN=O o\)N3nki6z8:3OyO]?#GRDt^1ZhܮWGe#Ҏ jM3&"oLEW"l৽c,{ XV HКeU`jΧxzYT?#'^"l *jJZ6 NJɵ?S #GR q޸qXS/r%4G|IK[KR!&9X/̓8={y{mPjY]/2aGxϣrܫe c\t^0+I~A:3嚳)QEt6 xrF+b$5:L gWK\͠`O8=Glq]D3Gq F ;3py(O[EWJ<(&t?02ɵ B8v#clL1c|EqpB#SF9?#*)Il,LwU.^/k0HH@)AG ~ g5e \G+kk gٟ< 6;h8(*amuDy-ߜqbtΤ`}¼sG_9 DHr09NO]獴xKYREFqAGj4[gglZ0U[Y&)ӛ*mibB< @3sV2T6־J{ΣZ=QEbxE5XYe9O&WeF.NWflְ%*Y-Թ23c}+w^- -عקjY> TܲO_2R8Qϧ4KY9fnһr¤5ճ܇8*Ϸݹ]JQnRDk¯:^g^.>w'(z/_:OTWakDsv?:J5yޮxt!'JF簭h>h qZ&cy5rV/DV70Zn'kXP1ҹ 1RbǧABe)|*Gu*(XnؓsT&=Χq*Ԁ䞠R<șj-mٙwኣު(Zr JF6wZu!mƄ tmzUyP8hEvG3u UONi u9ާE]}V\ꏠSQC6Uh,  2M\ ôs]lSh"w[>R="%HP{?x G,*"V> v%ŲzR0 [px?hUԳJ)3Ұ";(L&1zS}LM$+w7֘DO);EӌU=}3^ujHJ9=W}V8ۊW#B]n흉7:1.& &8D"!H1,{ ޹VxrvEZLHTn?.FzZZxPop6Ńv?ӯO\Ջ 𯇞l)HG7s]Iqu!YYveٕYBJ1J=dY':EngxR[jU\3ϥf\')+Ԭ,n{hm![D죯>eH!ye;R5,i+f[NtYafOLOLj㱑Wugk.qłUAȭ<-xE?ʎU8 p28:<#q*J'8 pN='OTnqL3.y.e_kQVD>OR~nN*ԅ}Z),o#hH9dr诇q>' {J#QZGZGkfABtƭhz}yü^FghiLJ&Ĩ'<\]}ơ$1@0/@~s8Ɣ料>x,cߛ>dp'@2o`36׽||N2YvyC?d,>PH9IQP=PmӥAV,EG8aq5>Q{]h_{qM"BQ[P܅L2p8ϥ_qcFwhzi提eԥ\vК͸Bg#=9N4 vqݍNYI95r մ }EŝQq늮תo\}Y$-4,dE˯+ϫ|O"C8o3+gIJ5yަФƗO5*~+z439u;7dw8([=yZ笤ު$PjGbevˉVF8?ڵl '&sZS9EMS֡'Eө} 0Ȩd8J9zt@p ^VG\cPnAZ6MgLOu̇* ݴTt1&SJNPWe\BPHb0Et]  ' LU5s1wgzog4FK]00:c[~S0*0|tWOP{ZZ $hU,p&&)bjk K-R^O玞'+П[I=Y/@Z},v屑+>,jh$iRF[G `ȯ/5)ڍr<=9?hhZC=41+Kʸ=@?{w\KJW|?3zyq Wjso{%͜l2*H ={0z?ѫ/g[QF[^۩ۜajG~p+< Clwq;e r} YUMZ!6re\jEh:^ϴ[*S>8bs5ÄYjJS 'Mi(4w|A3 \.:Hz@tj~)}Jo~DgI>rXI/Fz-aըk/mY唩P)+4f. p`kYUԫErZ֋q:T;`wa'w͝`kVkRW[42dj8 ĻmuGE9Ux֩]UeXjquZz(F?E:/Ef0~G+K"Ƭ28I{ uI)! p a*~%mm-4*H-:1 g:u)K}mI8K6{x p;-NhW]`ygIֿaa:u=DWG#I{Vu| ` {WW w6A2T(d+|C͢j I^БNdg20}:g...\=[\b.]?1^}_g1 |G ^h 63rG ^Dbl'ֺNs Zݲv5onMnYzdvzJ wߵZ&y;gQmw`~jA*T3Sj=9wL}0R6ws[ o&!~N}+HN:TJ+]Ji*&ֽ?x#KCHWx;\unsk(yZs8|8'Ҳ-ؘw3f}*pBsy&ZKɐ| 1>pp=MF$1d'gޜWRGiƭ[O%w9x \Skz\ S!d[{*JO j993ܲLy.zqq+G$fb龅yTuݽ{T"mpMg_,֝*M,Ѷ1y '...6S&_8cWٺ/#|rI<}_CQ=mze8RԷkOs6皠:֡Yp@۰q8Hd=xs*јVJ7w J?ک%`ˣҨ1na_G`FQՒs`p}WPHȹ1S s+t^WXАcpp+Dpp#?'zj:ʜВ=JP9ӖVxعf˥=uv1RG8nWG[%@#P8zBpNQVkRWFldMVوul ` {W^* LR# kGIu #[32g7K-3RU=@E-[Iv³-UlwW={ֆkQҮy'ı=3UUF%knv݀ºC d{;y+J^J]^\z#]~y; Fꭂ?ΰJG1\nzEԍDS]cM~~\ 'Xs}pD󻪑wAI,5*P*}4*G ?$Ppwn9"IQ[d Csմmcbk8>^T#*jDmJ}O޾޹㌡b]I-I.A14Qgؤ8׏׸M}$f6˟_Ur~g%pQ{d6z{_-𘊉~*`j:wyr`84#sLnH''Ms.eQߨ Fr9ӑ⹧g667iI_3BpyLNf~ozcLk#]L'$+mr5YHk* ڶbot / 烻0)Ə6>}Zj9+}#Z\06}*T`ooxkXe麢\\,MkBιW8Rppqg*YWxgӽideZZ:+woN;+nQ|ʏ+迅M4m+<=wQ+Gc瀤^߃#+ѼU&ۦ\]{j kvN±\vܠ3sۦ+̯4˽&qkUPppA#_]JY_ YFR_eu歪j橏k ??ўk]*ctWZ _瑾);N8`?,vKNku3$.vW?rz/ \!(;('nVQbE& iNrKp8`1|oZ F>b]>bwg<~9S yaEk]wmu Oޯ-~'ic g; 뷚5RM? tq:TƩ{rT1 0@5hc#QUkQEӧW1u9i$$uepG5DYķD;#O#ɧ,$7j}ڳrzQ_(HR2#񯇇I%Lo2Q ߋqaxKyܘc(J!Cp㩩$>o,TfY<-V8:8LFA??}WvG.TCsfhwwMGWUWkk6oKҒ0@ G\Um/씔iE.|G ^~RtH[B5S??jG[4n9$~f)GV0J袏=+J#*٪Vs>u7F8s$cf` *HsY0FMI 7Zf}sYPpsV>пg wl?h%cr@5z5\ :ȠUe1Œ~yZiWmʹo`TO:̕vV^5 am>dՓcՕF[V?4t[K )G,;)⮈UHePY"a#ģ. c2?Z+hV+x(jWOİw71'^75+`Aܪ8*NsQ֖[09bF1y&3W+kmlc s]L]pVl=Z~άV?ȭ%ALr0}={ekVzVdL88qZZ u3h?)L׏PX7}~+ſ'%F_+pqH񤋇Ua3_%QG0"Xd{^IhS ͌ I9ֽm2@P¼^iƤt!'>(k*WQoFs⠹9cIqu}'C$X >Ӽ'_VdyВdl#ڣbkX \ǧvO;!0>޸Z 2N>_魞}ImsΕ_&W]O-?܂ t/<ְCwUX&'= W"^(Y%i ? ׇ8wj.kňmf]6ז.ib}cgaXCFeAd`z/ƺZx58O{Ur<:ׯV7IkE+P$X`ۧ^X]4 ?^FX+4 :~ (Huo5 *kȬ]2ƿ[ ڦ. V~M `cBMYK_#j9WRT7px}kx0wi Cs<-PQ""짿$W8Pꭕ} keb Wm趆ȴD=aiW敳|eYs[]KF$)JTWWWZߺ1^+SF`W5xof ;_u5jBpyW0JQ~:9>+j:+gT 嚺. =C 4~P`Ҵ9/7ꎋm=ROSu ZgcX~\eŽָz u19 VOJiIi&cC0M$ߣ}Γ??jG;DVkv~#S_?{՟ǝ.'{43ѣiXïdvX+B55iI<M[GdiҚ(QҢ/Gqpfa/( 4jzj[Wf`ƤS"tˉ95;X4LDincH3JL㷵>Ojp/-Y*#?]Yr+5=`Ts]t<gw6nbY[Ўd;fae|@t=ߌ>VkFXOm"q4|۫S2U~by}O{Rg>A=0+\."Di[eNH sǭo0 n-7 ntJioT3VЭ3ִQsȪp0m`V/w1Ҽ"<e7  ҤʻL0W+3BuvZ?ihZD*e) ·CZ`WYf~g;^N⏗=f5[_ݳ8 eH3ҮU;e(#QT{8xhdBpqԎ{k<7 _:n8_3zW,OqV\ؼ]hғ>/̩bƢ2jZb#n*ӎ y3u|U+8!1$FbtepzXXLֆ"kgt #&,NIOgY=ٶt~@G#s*iH0+xt,Wl t*X`sǫͪ$bpfMZnWC9b9YbkTljO֬糕CPz>88tK9WJ׊QTٰRχeUo51x;^(H9<זTvRmg~ʴ+U#2{WQTQʹ?R2m;$/I I[+20zƱJ1VXG W6=U|mR:9$>އX:/4WPp~135׋#~Ա-^0my&ɪUQQ,|8R#yT$^FX^jմm[yU1TSo%a~FMr9WbbK#^yT3Gr9teR'QEE'mXL)8&7Or=&2Xqιjh;>7 UJP Q!NaYQՒzk­gT"[1Ƀ׭T685`ۑұ\TJjěݞf026W$瞔!kN&4.bJYw/,x?{G+ME9T>Hyy YBP=F"yyQF1+R$1Tܚg})`GJHܬ ;ֽhnUhND:W1Y339 V O^/"{ic$B>ecb>KtJ|.4s+1IbNHMYbXA涝XKN vG|M#<ġOSPaV*wvGbJlɟB{LJɚIT@$gM7 q鎋Ma)JsӗSbO<r= gIIy9`<S]+W?'-…71W4dYp>AuGQLdKc*rmJq:93'տMK b]_rRBPj9u$C8sUȯ&-Y^V{[njI995" F{׭r]&}T'++Kvj:U|`k#/RVvg3?IlrWu|yly^_]w<=NPh ؾ|37+ۥӤg۳P`tQ EwQVvGƤig-l>@I;2v;" gh ^^kaW[^OV|B\zW=|X֥-,ad#`渰ٽ,K%n[ U1rnӻعAhhZ^%شfDuf'8s\5JыW/0 ?U[Q7Ou$Yo;Tpgfx4Al[Ucϧ韴pU57+9aKߑM.Nkޣj^L|susº*e^eVjlCjp`zTTg*!~}lX-c;p=듮浫_M^m*4T6O?^\}6#rDj@ ;VnzI |c~_HWgݟfORkߙs#RЖC5,r7R>V>N[|IK8󮎵)m0bT6܂8d(=CW=:rK>|sT8i~b]x{"\`r;c?皂 ;7P>aݍpz}_[K|.\JIY1T)N?~z(maEQav)(>ME6˺yj +ҧR4[;crrZ> ׭| 8qTۯ^8pTۯ]M;1"v#?:AtWˋn>kY C7~z8%~v $x]4]?dkibsv!G%P\qݗ)1%W==OoOz}A5)\Y gc$~UjɴV| ,y\crF>YG8Tݿ>jWR*vܪXbS ;ٵNe7'g=znѣˏ~U:-=Ȁ'\c deˇqzRmz6ݾrž*'ߎ,Aw?NҮM0ǃ5nkՕ^1+(*݃bG\uJ`ǶR3Rh "2:^)^^=Ґ1=qּ +aidU[t:OTWaON{8fG ^/ .t~xFX{1V\evA8ӳw7w.|S* ݈*Y 4٥1ӺrɁ,qUVY%=~PJ75]>4-l* 3ukJYxw'oc< kNݔ@=Ub0\Je^}fܝLMNFE2Ppz1QZ>%$ʬ Pvd"3EES̾AS1?ݬϟx98?ˠ[x{;77##V\~j*un-USO >j?="Fx}>|P;Ҿ_c74V3ȣ#<{.1sl/֩›ۚ)~R4׻4MRX{#p;(T袴cY##*1VHе[;MyUuu,W.zNk-6z+u.M+R=;H+}GC_tT\vݝC\Dγn#Pk8v/¥qD>6P^B%eCON3ySNIIaRz$QT5R+R9&z{%vz{[`lgcQIrjЮCnrګvwsv;7>Q ]uC̞}Lۨ$I!ל*uF@G],Q=AuaY _Ɋ˰RiV\HPR9$צZckK1*/oT|?}oy;cU=r?kRkTM<]T((%~o 4K#ʙ|uq`⹺t;Ë;o/ Ǡjq %#9=}zdt[`yCq^]*_4Xo'2 &U#bKc#8ϧ4%=zdhh%8Y'1Z~,ŴBcsZm4[KeLWa8dH3qOdt0/=1YIv"k 6 ڪ2N=pzt&kwK(h¢+ H"!IoHn&'(9ǭp,I'+w{URJ:oݧfYb|` Oz>n㳮m Gxf.c.?һIN^XO{Kkh@UEHB>p=9*dGoq"Ej]v dO@z#7̺BN;|-xᶱ^+ 29k~Kai ~b[`BTQ«-7w0Tʞ516upmwqXS:|nixMf c'd}d+6 $Xw>6ݣĎ:iŖ `U$P>g.Iuѯ-SՎuD\g}qojxeت@1S\.OW]Oh(.q֭qCu^_QH+|i'f{OҧԮ<i &IJф&H<ȁs8_'ƉnS&tƱH/s򌛙(# >lGƷ2^eY%ؼ`OHۓ;I?o@sGOyo;q?ڻ>kDϪ]xMҵeGM6QWc7;$4u J61sբϗnaP TKTct"M ",q}S>܈NbQ&G>Ρl4[OWnc9&ݝuɇ,pk?(?D?*wakZXuVbx "$(@~NkiӅ5h$ңJyiEEy+~Gk~su |z B/<9A@zo{C m$ {%xg|dWʓi &2_jz6ZΪ<Qw;ʠ5#'nj&? ߷l&6wZv4t9BnL^O/X[e cˠe\FTkw5ǀ6gjV{+[B[*Iʍ5W>*,-s}o2Gܜ rO|I ͫms3T]$rH۴Oʟ 񝾏[.k'PCk;ݼSvvsx bK;aywj5ռ$)%2ԜN+?5qg^/_mߟ3g1joxJ$-+ y(V"#0jMlsB;HEW LsjfeʑH2B;Wױ<[m ^J9:68siWM03Nyv@#v"͊G,%h^oi j(HiD<4՝e&oҦQTۺ.@5z۸[Rd8ҥ~mag`B5Z${N)U@F8KEŚl9\U%TF#6j7PWJ[E#=+.Izr[2QWt+5̉(7:?.RݝDn,R H" s7Zs(=sQqwRDҜ(ϩ)kFʍ@qL(s뒆4jxe!K1p&Db(c{W[4E);Ea{r@hQWlt4˔  |zW?αdW򮆽ZO vI:xK(ܘ8_\E Jꊀ,pQ;ۡw~gk@%\~_vh,j0eakM>lTnG>zI$F$*68?J^__39aֿ97VSއIt ~UVJ|G X908`[N0?zTzݝėY@epVʱEv]]:foJo v5vg$Tޡ`fSKo5(YiIZFe OfLy-IjK=j& e Z?F|^i͹yMq*l+:t$fk5d^GK09oڼֽ -3]8V/[I΋z__ioӊooΛExr{'T46Y0l?U+mBy<#\̗pE\?Zv&hȹcHo~~u+nN:ƻm#NywG5jX灑8랟ZEӴ;i. Ry@qWSMLe7ݏ_VB4)l| |ZM- o[2U[jΙ$Yhx|kfRNKki+s.R.巼#׏,A9:{ ɴ;xgL`t<_>IϲN.ܷ*~F@Bt@|8ry=㧽eֵ,a@p0~9#`׏7e<:0SKK}}{P\In!!U pX䓍vi Y'X7MN=GG=O|p+;~-Pӣy`yG1߶9`ԧII譿 *>ϑOGC7IEQS8_UӮfXfG2V(Z0+QGX0Wo{v[]Ņ2$gdA@*վqORjN2= tjBo$|zg'8z?KmX"13dG?xc8U,&eNZK~?PY•m"2wrʉ|?t3ۮz~O%[?姯>\{x|8TjYLk%RܿSo|g^,Ӵ׊?8<$ tr@9Isp2p=x7+͝0P\6[<ž.|]旋HI`,Ho^y&U΍[j|W3[f9p=G' Ӭʮwc\u"%|BO=9kƴg ^#tZ+q BЍO3d 7mρt-nȫN8#省!N00|A:57~jtݰ};֗ !gha$4B;Hݵ[g6x{Ft[HmSd08QשI$I$h{(: `i)>zFtH5ڙۍcO\wv~Ayk-1o2T )*A_->FMҁ]:24hŔ$,v$( ( oGo¸f5~8KMiN\Li]< JDG~*kX'kk'(kreEgL(\Z\mxenR2Vml'q=+tǪ ᕔTxJq!6SG,d?S%CFEiê>Rn:rj)B饋Eh],w;^sRz=ظ$/./](O1z6R8Դ?={oʹ?%E9O@jTAP0i֧Mho<Eh>֭VK_uZY$h##= oNko 6hIGbFG\:9jjcBD,Xd̺%Y8><ҧQ7n|aVcOH%|#8==Tn<-Kz.bώ|^g>͇ı?dq;_Jmρ#X|G8FSmomfD/t_I|h6)(T╬yRRrw9-Nm> IVc}AH'Һ_ Pq\*Oʭ9cEU*𶦟/Xmbe iUAQ< f\% ^bOa^= ]{RX-vDھZdЕx(ǹP{="c$-֡$T#HV_j&.ZPkq»ZX<uq1rM.ֿ-:}pM7y5kq{/Woa_r3;Y!I n:2_kPJ QyG*ͧ{eٿv8z{e/:0gJrzEy?& G& [XOܿOq*v5QxİX-O?^/&ʙSn1vUdTWO?^/&X)Kj2N捵5v _MI +ſhiUi?{]GSTk~=|uimXnJ$ՎmR]Mx8-l*o{NurEHoמ&o$&8^M޾ .̬w/<y=y7&h]M8aVR,+ZtZ_PjfSߑ^Y ???0 ]RT9;r9_*\}l,JTXg#*M|A??&O4tDMcE)쏇 ںi=\7֝^ b/N _M}sjV?*F.9^]yZzj-4`,NI>&x _M9~%x#V٢OQk:m0$\?e o9AǮp?/? G%jfXZPP]1*Ey%h\MkC?̯k4W6vd0e;3# &YjzcrMkAr̛XfuH!p``}((+~p)mo; Z!5fsy֡V P}M4'~Ȁ:X o3#q!1]0mr\R׍tM/'$@+Xb9&Ow>>1@~( j]nNN*PG;T^~ ^/&|{SR5Q}:)Un9]QWwLK Gо;.Q5B'N\8z9fwlwev^6|{CR4ψj95F8*ӓOEgN~3F<׉k/?&|G nQ*ޢY6dWaytt?:Eb8>//Ų.ղ?/" _M*RdTe(%=d{yZ#4+Ń5hR׳e fXcFn_;.5o|LpWVD(r_zغufXF=WP*bY??&NGA]PyRO4R4Wu??:M? ]fghzm}?Cш,HːqGk?:M>&j^oc8E41)bk;u=Odկ`)̟h?}*.D©WGpđC,qT[+p/YW?&rgys2y־_Ujʥ$۱4e7'=NKɷuGEgT:LjG~2,W8Ƕk2׿ ;?tqe !SӭaO895cRP-5nT:G_(WYPygWM|Ⱦ n*NIΓ}#ߍCh_HPZ4:OE?~5E}#ߍCk:OE?~5E}#ߍCk:OE?~5E}#ߍCk:OE?~5E}#ߍCk:OE?~5E}#ߍCk῅4mWA?ڌ#c`3F1ð rjmߙR@<}#ߍCh_HPZo i$,>;(.lEkcIsff1?.~9<ʹwRC$XB 0A}#ߍCh_HPZCAN[kM$0;cL.C\g+Q!vZޙM~iSl=ܴ夶+!7#c?{?E?~5Eh?ߘ#Icȕnlê>Q#kI%hM@{4º˷3%E*NY<N9E?~5E}#ߍCk9k>I7$7R3/䬈 !x|cr]o4=_ZHRQ+[54n 22_=jG"G~"xnVwy5k}IⲶ'xDsI~g*?6='sʚ?~g*?6='sʚ?~g*?6='sʚ?~g*?6=[[=_4u]In]Vu|;l ОKsʚ#S_?{7@?WMؿ 3{TכQ@?WMؿ 3{TכQ@?WMEYN@Ӵ]5/#L` 5tPIC߇ơȴ/-stPIC߇ơȴ/-stPIC߇ơȴ/-zVp6WV~d77$I ca*j_,¿W_~0/yooj_HPZ??{?'^i=+^-4X8)Ѽay|߱ZCm7m8}Mq4PWO~8~*n;ws%֯ J*V>j0%@' Vmπ|}yu-I=dYtbrY\I&j(HJ׊,nϗqmaqA*2 CW~-Aͫx=Ns^ؚEgq*OJ(ϊ0ywgn/^tb~-Aͫx=Ns^ؚEgq*OJ( 7 !Y'0 =b¸ \MstP[+.Xş.9 Ud>EZYWLzK{4>UQ@okk?Cwy7vOawlz ?&]k#WjFE֙IDYIovЅLm]m01t/O~?xs➝\i~ M>wiE.ې 6Tr9 &s5uڿOZцuxm1Q#R[ݴ!SWap6 qQ9O0/__wں?hwp[r?d1ϧE#}?+kQG+3d cHOG#GW֢Vg˿?Ƒ>ƏF4ȯ5EXaψ1#'#}?+i_kZ>['.cFO#GW??"ֵ}b?N]>!6 F>cp: ᏄN\\~Q!R>uUPsucW5?|MK:y~ >4*Q攒V&Ogw?YxG?3/G+/'&e뫢~i'g) ? ə?YxG?3/]]}?e?;Or#@2uG_0OS2u^8𶛡ȱd²{dO*O_4 "|ÏֿGUq߲rI/ynmm[lXe\_,JJvn o>m<V(윻|Cs'ܯ o>m<V('.cA'ܯ o>m<V('.cA'ܯ o>m<V('.cA'ܡwiVaZͭb. 0Q\$˱ۇmSe#޽a+Փ^cڵe#޽a+R3_ӊfsJO"YEC>52X6sOƥ VlXeaݧBHy>OӇX?TqԨ ֭Q¾xuDN!}6[{mWhϯ8L2*+4cGo:>kIJ}jHLp^{O^UU܌˝ T4{~\ ǿ~jaŻgkCPD`z?U1*}>_qRi!i@G՛iȻM`Ԫ2O[•#ϩZ$|i5eN1qUa2,:qwG˩*)) Ϸ ӭp)Jh\L  [q Ҵk~4 j;V隰 N*n2~ra- ii^Ѯ4л$+`τB-u|UMS&iQ:3ڼ\Nq?bz#(?CTY=|@#?[,4 XZ_2?YgODt1S# Ú"/Gc=|3T%ϗEB1֔6=),5_r/cƛ ~#oO_v߈뷶3gKM"J?+gSkj܉i{Xպ۔4/AM,0R CV>R||4a^qihǗ8&W_O֦vp:Q7N(u꯴d%WjBrri e{$kxr*r/_ўTMj(((((({Wk5 r {0>ڼutb!ֺ32,Zp0fQy t?y,/i~bnm]+)%K&-7ME":ȊCG-xN.(QEQEQEU _ZPcIH8Q>XKGE[e##`:\#gH=YkMizq7e˒_- q.| uq[%c"0#a:ߚ.5KY< A6{cJ{kV$bp1>pu^Zi+[GmX'6dtQE~{EPEPEP{bfbw/*ǭXUڣo\Pn Tֽ5k3ErePPj1@;w>rII_sgL/T04MA+؂VL1nԬ=鰜1M.q븼N/"!:?Fa>՝_ss7Lʧ5{PMS": GiJRIҕa-֚N[L⾟QAr3٣R* #n cտG >== **ճw8?Z-&FD2Y #gitZVv &Ǐb/IO-W)O@@ݫ˭EJq<u"(r S&G><35f3rRz: ;reW}s~ FŨ<c淥YC Wӹ]H#2pj帒YFؖҴ.u Q˙H~yϷJΗsosF#-8(#3ys+9c-+T52G|''`+Q|6kRW_zSۅ< %VD!S)LpA]OQ|vԑDHsTdҼ6Q pV0p[>:+ϭP,>yZ |9}oϔ)fmX\E&u-,Wn{5P646Vٌܒ`}yueձ)>W~e4hSU\nKWCU*jZסٙ+^]B(NPG>ޕa?O1#2CCӰ׭\K F''95br*I4k\qf቗ܥʕ]ʓz[vŠ(CB(((#QeRB.2$ HQM;;ڇI]Ij< Ep0>&kGе7x^TP#?P}5'3{{n3,h>Vb7 ^$4$HYKԓχmQj܌cYk{GxN&.s$?6(ϣ ( ( ( (+nj[7'cWk#R;2^jjU~2^jjOҫ>Nߛ6Qt ޳`pPn8"/0y]GߊeֵvlVRYLx r]{J2HFx<ԁ'GюMl?ޣ;pM.pJϞswGt%rxZݲ 1湟3wEk{Lsm+#ֹwdW9lɮaU Jʞ'9V8rEiOl;ޠd2mpKdG%Ӽ /~ ݟ2#tsJ+p <4,} *@qKB ~z~J ȹkyz?\fl+eWgD֢+?[ ( ( ( ( }UIp b#`AԟdOlpK,ev.g6|_Sb "mH*p)g$T+aEPHQEQEQEQErqxm"N&)Bg JgXִUyY[twtaž <6ƙ>F`C.x((((2~V5lnj_qaH|xG{W5G[Z?kU;1<+&V^љ^oѻJzWm7PN-2kS QB(=Izirl=d ~2LOVjT֜jIZA,dg5I#+U JVF𜢯-GADvhc$c8L%}RJzU7VTʟig zgAig3ۮp5m;Zv;F}{WhS*wD)=J<ޫZV$^jT}kҔ:hfDBʊ~m=rj`;wՠgʗS5oZx` W3fJcJϥFZ+WQrtG'"f`}jixȬ޽@"29XӛPOVmCM Cr;=W}kIwUg\dc8%b_J] 8*a@*}GASs'V)RK=Ha*oy'[ΖH#QV ڥM{NxyH\e99<]o`0 ?Q^LrUi4ՑߊingF+6PE&CM:$9#i縯e 꽶.XV0 qNp)v>51xt)'bh۬1,2텱{`ϡǗnxAsBUdյkg_tgڸs>]`.cy6jʳC(ܮHޞo,&mibn7)pNQztmN80Q M.238첶naQMyAh-S/!n5HYNX`^Y:!M$+D\bF [iS=I^Φߗ_:c`jz\oo%.1d 8ޝfcS[-A? ןWcE_k̿F#Q5Š((((GgإjhIpnw܌&usw+ /n[ s4N*eb9 aަg]4ʬɄV)8EB !YEXԻ$x50`֩QJ[rI+*; 7̼LYbǀ7m絸J=IMlLjJQe!xAdAgྐྵC٧g{qV>?Yh |ׇnW?M ;QY-Y12/`p;97jƛO>r ȹk{W_c??*&Q^QEQEQEQE[I4|<;^י_XIft?QE՗V xX#'QX+|6*q^'kkOWzE柍Q@Q@Q@Q@Q@^[r]^Jwn}ח 껭lmŨp,H*:yO↰<[d_>cp yGe8/87 ,3lt9'x'Kgnukh}It&{zC,# XP@8S%Ii#;u8q*vIj:+駗ݷOMAEU(((2~V5lnj_qaH|G{W5>=rjߌz׿%qZ:5gu>s 3Sn)=i`;n^hr_EChkp6O=Jܷ͜U;RKSQ`1X䚮[:\fl%e뚖O8ȪEqR+y7ZzX¥ sH}0e뎟lET;BsW.mH`:R( +Ϋ)Ҵ4ƬPw[X㎕A7>ܩbXZz4/޶=9jC938T$] SԎTc%~:cg T5q*9Kɥ?(8*v[b+=FkkIr})ѬFwˎ{Ί01ެFwc^-ZTypKsj_uqXwH."&!xiċ1e<6 zn疰oC >Q;g@-VRqqr3)ڎFIf4;/uĸTzzcփtwfQFuF5׆v{Vec$.rOƻTG}g 9('rwt`q؛]62iw<9<$3|\qqt5ƙ%XAy8,!sg$q1:rufX-=(5<*iÝђyל|Dv_ƸL á'ԃCux0Mx-&X.#&u 0Rx=yrbbscAiȏ+ 2Mvǃ-t 2u! wdGDšr+i_ѭ CBHyt~zfm_U5XmO{UՃvI'eyz?\f.Z3Sz8+F3ҢkQEQ@Q@Q@Q@ihZUM Yy'Ё3К͢pSgc,%L%^Vu=:5HFG>5yڊ_+i,XN<1<3(K" *q|&;'DcImsP.AkZvεc} qc0UH+~c(T7.O2ƣ%ZΑy28S,F.Xf7dRXk ɻ%'sc(TaT =* OJ%!]q;qRj~Oisw_nɓS|d%ҾQJ$} Qf+QiwV1HTpSV]]zh<9mni //n$.p>kzQ1kʳ^,mL|}DZhaW1ʭTRkM:'8  ȹkyz?\f2 #Q5Š(((((KbӬ|7rjQ5HK%y))}|ڞ6>3 ng}QPyEPEPEPEF5ew˳{mB:`A=l08uOe)״SnRRiŷ婵E`oC/&gO23.G\N=)X Nxq:׽ Sk[^K-שּׂM9f2if'S -5h)́s^/V-RW7ZK]0yu :jd<9r+4*4:*R${Wx S 'v U4h&z7mFY1)DbyĒC#?]|'9֫xqN2==oIej@k2e\cs&^tnꞦ(eg8UgV~)TaҰ+ w7L /$DWV`x}G*p+)V;ԇccƄ!={ FF*ǃ]vSBIwCU$㧽6WӒ+k(y"2GS܏˨ikc%I[͙$X.c+M!w9?ʨA$̬dFtf'upNW[GcL6N-K$Q6Hĉjf\(jers4fE1sM\L}+y?q%Ԓ)LLqEZR#>/;FTGgE1QS^Yo1{KՁW.S2_N.Z3^}^-̿F}TMj((((((K$ !upGV$/˒vMH2AުR[5R8Kfmz7t^~0f1JDzcԚ4}1%0Ā2ÂxlŠU]/n3:fsZ'5}.QE埅Q@Q@T].5q.>P5n֝jVvv")F$i4OFUCW|AZ/ 0*\C۴郐^rHl^ϩ/p> g+B(Ն(6 ( ( (+nj[7'cWk#R;1]jhq]n?cU[B'ןξ| /l[Rd'!*PH&/[Y6$cޥ sT1;e(^'{, 7d vÌ\ӯuBq.p{3q'c_hyZѝ ,ڼ('=+B;mU8XpG5SM9]299LY284s;Shz}f}qޚG=gj.ܟj{]D. ޸ĵ&XU =قVR3 Y=8 f`Vm;zgxY5@fԣ#e|Wj0~9G9>ŜwQlaUk"MlW<+hn崒A0=ZZsr\غ}շc?)!GJa9h+CČ[FGqen6vP8'^YHz̵˒31g-D1Ԇ뀅Lv-ԀFvs1asTQ_yf[hR(앂(@(((2~V5lnj_qaH|xGw71Auo?ξ*1"&_?ҷMX~5 Cz*AҢZ3CN2=k?lw&*UV-WIٓM]**cnS]'mɶ%Ԓ1Vc+sӠ6͑LdwQc7:3bVQ=qOXKrT~4ԻQR&>qW 1ҭZwUslsԒk( 6s}>?.'bOO³G+VխozWNfsCQd1q_ r;sU$0\rkJcX[?ֶ,6VdsGݤdGio@ Jcltq{ J('Tyn3JmؕHGNܟ¸ $.eiI铚bDgȟ:;#VS ^(Ժq7=L&O:kw'kb4LAgQ}zdҺ-%Lo+ҡ$fLjEzU+z?F9s~ܒ旈=sR(a/wQlfTabw+LEu8~^_o=N-IXG Ű^#Vω4Mjbf{Bsg; gWͼJv 8ԍW)o++D!Y$SA= kVi[MBy˘u?¦]Ӯ~{^!hٝ߶O$u}1\ոntS9a LV6dc\^֫}BݱL*#4Իq۩F6GdpZi@GSUv) 5 A/d3xQ,DgcQk&=zGLS:P^[ZSԟOkv`㈏%D}ΏĚ:dXt'>bBu ig?!_WQP/=|._Bt+~^->A? .e3JEW~QEQEQEQEQEt> F:[X`~θ ߵrc"6QO -V'xK}EhH(UQ`KEyvQE(((*+[wpIɩZ^ V9DQ9cdzgwzجm,>s}vNX~*2kf/X#r SE<&>Uni;^?gMB۫݅Q]fEPEPEP{bf־>J>cڥ9c۵bЕ.@=EVsWb8 e"z:֔fS# ޠ2οI3n{W\KhtT9OC3IP8֬<uJ4)]nJ"#>]m]ՈNHAXGty ӷlHq))b! cpgTyf%Qh%1Xu1eHc{jU)j˯N՘k7NI^[i4F ;ԲrwsHk,LK(~'\& r__j/fW⍗\ךǃiYNB~u3!b(6z}6װE!2srV=*kzC5*+C'%7>,h>J˵F̼(3N?^^Br:t >A.uvZY:_Udt9@ÊVNM(ag^MFҵjTc/@eZ,fʯ;Rwu[[Oo*5FJW/s]\\;.0Tp8*x9 6v'+ +vڥs#=? X%xWmr^*D8?O5e;[2Ϲv9gzO+5HQʿz2sǨKjo#Dmvx'l{k8㜨U6R_cG ?i.Wggwq{SsإIY!` ~+e 8Yif`x86cMvx l;sk->kdD\'sRjK R<2b{G<#h VR >jG$`v략⾷+JoMVjnQpZgSvb{z㨯6׏,#++euj)6յt5IOOB>?hE?_?(H^}Eٴ{ut#'?!?Q >? ¼?h$>GOB}#~yf1H}AHG$G' (ͣc >? IOQG??\!K= ;R<ȟ@Z_"YKKWQa?_z T??'|#Aoo-O޿?,_,[%( 䴿E|EK"} 7?i?fG-/_?Gi}R<ȟ@Z_"փ yWɑpXg%Gr+ɨG+(x-A^'g?o5E~?_}Z:h}McQG$>Ah?o5Ecՠlz㦏Ot5C$Vo>m=?XQ?_}Zں#00}k6+sLҶiYVi[Ko}͡d{׌?w?#q"sZ^0\jjMJ)3}ZR]٨5stNU '^MbFiZ,cZ;%|Ώb7R6e7[+5`ݛʵeэb?&d=~F 0F٧Iݥ˫Xٲ3S`:˚aᆌv:VcY_]@!Pu3\6 0}V-쵏xIj?K4Xcw1?pkxѱ1R=GuPK-Koi}OVDO㛯Oo鳢X#>Ɛ6#OvG5{FxO&Y'pfVKA;t6{~?vg_{\6 a* tY5 Z<ʭX+?_=RoxsQ$djK?OטUONsԣ񞆽o/oΡdkhfz|mj0kUzxy?MIm~7M0I݇J+*xܺ׏,ұrxJWK̻f>SrOMH^}EmcN,ItoKC!K Koi)<7czҟh>y{~ێלUUV:j\ڞaxit|mfb%$eW8ߚG;Gm$q$PHPA'?b2j8I;,-_+s^",0 * since SDL_GetTicks may not have incremented yet and * return 0 depending on the timing of the calls. */ if (ticks == 0) { return 1; } else { return ticks; } } /*! \brief Initialize the framerate manager. Initialize the framerate manager, set default framerate of 30Hz and reset delay interpolation. \param manager Pointer to the framerate manager. */ void SDL_initFramerate(FPSmanager * manager) { /* * Store some sane values */ manager->framecount = 0; manager->rate = FPS_DEFAULT; manager->rateticks = (1000.0f / (float) FPS_DEFAULT); manager->baseticks = _getTicks(); manager->lastticks = manager->baseticks; } /*! \brief Set the framerate in Hz Sets a new framerate for the manager and reset delay interpolation. Rate values must be between FPS_LOWER_LIMIT and FPS_UPPER_LIMIT inclusive to be accepted. \param manager Pointer to the framerate manager. \param rate The new framerate in Hz (frames per second). \return 0 for sucess and -1 for error. */ int SDL_setFramerate(FPSmanager * manager, Uint32 rate) { if ((rate >= FPS_LOWER_LIMIT) && (rate <= FPS_UPPER_LIMIT)) { manager->framecount = 0; manager->rate = rate; manager->rateticks = (1000.0f / (float) rate); return (0); } else { return (-1); } } /*! \brief Return the current target framerate in Hz Get the currently set framerate of the manager. \param manager Pointer to the framerate manager. \return Current framerate in Hz or -1 for error. */ int SDL_getFramerate(FPSmanager * manager) { if (manager == NULL) { return (-1); } else { return ((int)manager->rate); } } /*! \brief Return the current framecount. Get the current framecount from the framerate manager. A frame is counted each time SDL_framerateDelay is called. \param manager Pointer to the framerate manager. \return Current frame count or -1 for error. */ int SDL_getFramecount(FPSmanager * manager) { if (manager == NULL) { return (-1); } else { return ((int)manager->framecount); } } /*! \brief Delay execution to maintain a constant framerate and calculate fps. Generate a delay to accomodate currently set framerate. Call once in the graphics/rendering loop. If the computer cannot keep up with the rate (i.e. drawing too slow), the delay is zero and the delay interpolation is reset. \param manager Pointer to the framerate manager. \return The time that passed since the last call to the function in ms. May return 0. */ Uint32 SDL_framerateDelay(FPSmanager * manager) { Uint32 current_ticks; Uint32 target_ticks; Uint32 the_delay; Uint32 time_passed = 0; /* * No manager, no delay */ if (manager == NULL) { return 0; } /* * Initialize uninitialized manager */ if (manager->baseticks == 0) { SDL_initFramerate(manager); } /* * Next frame */ manager->framecount++; /* * Get/calc ticks */ current_ticks = _getTicks(); time_passed = current_ticks - manager->lastticks; manager->lastticks = current_ticks; target_ticks = manager->baseticks + (Uint32) ((float) manager->framecount * manager->rateticks); if (current_ticks <= target_ticks) { the_delay = target_ticks - current_ticks; SDL_Delay(the_delay); } else { manager->framecount = 0; manager->baseticks = _getTicks(); } return time_passed; } SDL2_gfx-1.0.4/SDL2_framerate.h100777 0 0 5076 12360250626 11120 0/* SDL2_framerate.h: framerate manager Copyright (C) 2012-2014 Andreas Schiffler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. Andreas Schiffler -- aschiffler at ferzkopp dot net */ #ifndef _SDL2_framerate_h #define _SDL2_framerate_h /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus extern "C" { #endif /* --- */ #include "SDL.h" /* --------- Definitions */ /*! \brief Highest possible rate supported by framerate controller in Hz (1/s). */ #define FPS_UPPER_LIMIT 200 /*! \brief Lowest possible rate supported by framerate controller in Hz (1/s). */ #define FPS_LOWER_LIMIT 1 /*! \brief Default rate of framerate controller in Hz (1/s). */ #define FPS_DEFAULT 30 /*! \brief Structure holding the state and timing information of the framerate controller. */ typedef struct { Uint32 framecount; float rateticks; Uint32 baseticks; Uint32 lastticks; Uint32 rate; } FPSmanager; /* ---- Function Prototypes */ #ifdef _MSC_VER # if defined(DLL_EXPORT) && !defined(LIBSDL2_GFX_DLL_IMPORT) # define SDL2_FRAMERATE_SCOPE __declspec(dllexport) # else # ifdef LIBSDL2_GFX_DLL_IMPORT # define SDL2_FRAMERATE_SCOPE __declspec(dllimport) # endif # endif #endif #ifndef SDL2_FRAMERATE_SCOPE # define SDL2_FRAMERATE_SCOPE extern #endif /* Functions return 0 or value for sucess and -1 for error */ SDL2_FRAMERATE_SCOPE void SDL_initFramerate(FPSmanager * manager); SDL2_FRAMERATE_SCOPE int SDL_setFramerate(FPSmanager * manager, Uint32 rate); SDL2_FRAMERATE_SCOPE int SDL_getFramerate(FPSmanager * manager); SDL2_FRAMERATE_SCOPE int SDL_getFramecount(FPSmanager * manager); SDL2_FRAMERATE_SCOPE Uint32 SDL_framerateDelay(FPSmanager * manager); /* --- */ /* Ends C function definitions when using C++ */ #ifdef __cplusplus } #endif #endif /* _SDL2_framerate_h */ SDL2_gfx-1.0.4/SDL2_gfx.pc.in100777 0 0 414 12342730154 10464 0prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: SDL2_gfx Description: drawing and graphical effects extension for SDL Version: @VERSION@ Requires: sdl2 >= @SDL_VERSION@ Libs: -L${libdir} -lSDL2_gfx Cflags: -I${includedir}/SDL2 SDL2_gfx-1.0.4/SDL2_gfx.sln100777 0 0 5274 12360531107 10277 0 Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2_gfx", "SDL2_gfx.vcxproj", "{AE22EFD3-6E6D-48C0-AF3D-EF190406BEDC}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestGfx", "test\TestGfx.vcxproj", "{AE22EFD3-6F6D-48C0-AF3D-EF190406BEDC}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestImageFilter", "test\TestImageFilter.vcxproj", "{AE22EFD3-6F6D-48C0-CCCA-EF190406BEDC}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestRotozoom", "test\TestRotozoom.vcxproj", "{AE22EFD3-CCCA-48C0-AF3D-EF190406BEDC}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestFramerate", "test\TestFramerate.vcxproj", "{AE22EFD3-6F6D-21C0-AF2D-EF190406BEDC}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {AE22EFD3-6E6D-48C0-AF3D-EF190406BEDC}.Debug|Win32.ActiveCfg = Debug|Win32 {AE22EFD3-6E6D-48C0-AF3D-EF190406BEDC}.Debug|Win32.Build.0 = Debug|Win32 {AE22EFD3-6E6D-48C0-AF3D-EF190406BEDC}.Release|Win32.ActiveCfg = Release|Win32 {AE22EFD3-6E6D-48C0-AF3D-EF190406BEDC}.Release|Win32.Build.0 = Release|Win32 {AE22EFD3-6F6D-48C0-AF3D-EF190406BEDC}.Debug|Win32.ActiveCfg = Debug|Win32 {AE22EFD3-6F6D-48C0-AF3D-EF190406BEDC}.Debug|Win32.Build.0 = Debug|Win32 {AE22EFD3-6F6D-48C0-AF3D-EF190406BEDC}.Release|Win32.ActiveCfg = Release|Win32 {AE22EFD3-6F6D-48C0-AF3D-EF190406BEDC}.Release|Win32.Build.0 = Release|Win32 {AE22EFD3-6F6D-48C0-CCCA-EF190406BEDC}.Debug|Win32.ActiveCfg = Debug|Win32 {AE22EFD3-6F6D-48C0-CCCA-EF190406BEDC}.Debug|Win32.Build.0 = Debug|Win32 {AE22EFD3-6F6D-48C0-CCCA-EF190406BEDC}.Release|Win32.ActiveCfg = Release|Win32 {AE22EFD3-6F6D-48C0-CCCA-EF190406BEDC}.Release|Win32.Build.0 = Release|Win32 {AE22EFD3-CCCA-48C0-AF3D-EF190406BEDC}.Debug|Win32.ActiveCfg = Debug|Win32 {AE22EFD3-CCCA-48C0-AF3D-EF190406BEDC}.Debug|Win32.Build.0 = Debug|Win32 {AE22EFD3-CCCA-48C0-AF3D-EF190406BEDC}.Release|Win32.ActiveCfg = Release|Win32 {AE22EFD3-CCCA-48C0-AF3D-EF190406BEDC}.Release|Win32.Build.0 = Release|Win32 {AE22EFD3-6F6D-21C0-AF2D-EF190406BEDC}.Debug|Win32.ActiveCfg = Debug|Win32 {AE22EFD3-6F6D-21C0-AF2D-EF190406BEDC}.Debug|Win32.Build.0 = Debug|Win32 {AE22EFD3-6F6D-21C0-AF2D-EF190406BEDC}.Release|Win32.ActiveCfg = Release|Win32 {AE22EFD3-6F6D-21C0-AF2D-EF190406BEDC}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal SDL2_gfx-1.0.4/SDL2_gfx.vcxproj100777 0 0 15721 13132500573 11215 0 Debug Win32 Release Win32 {AE22EFD3-6E6D-48C0-AF3D-EF190406BEDC} SDL2_gfx Win32Proj 10.0.14393.0 DynamicLibrary Unicode true v141 DynamicLibrary Unicode v141 <_ProjectFileVersion>10.0.30319.1 $(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ true $(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ false Disabled ..\SDL2-2.0.5\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_USRDLL;DLL_EXPORT;USE_MMX;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL Level3 EditAndContinue SDL2.lib;%(AdditionalDependencies) ..\SDL2-2.0.5\VisualC\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories) true Windows false MachineX86 MaxSpeed ..\SDL2-2.0.5\include;%(AdditionalIncludeDirectories) true WIN32;_DEBUG;_WINDOWS;_USRDLL;DLL_EXPORT;%(PreprocessorDefinitions) MultiThreadedDLL true Level3 ProgramDatabase SDL2.lib;%(AdditionalDependencies) ..\SDL2-2.0.5\VisualC\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories) true Windows true true MachineX86 Document true Document true SDL2_gfx-1.0.4/SDL2_gfxPrimitives.c100777 0 0 313614 13240160377 12046 0/* SDL2_gfxPrimitives.c: graphics primitives for SDL2 renderers Copyright (C) 2012-2014 Andreas Schiffler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. Andreas Schiffler -- aschiffler at ferzkopp dot net */ #include #include #include #include #include "SDL2_gfxPrimitives.h" #include "SDL2_rotozoom.h" #include "SDL2_gfxPrimitives_font.h" /* ---- Structures */ /*! \brief The structure passed to the internal Bresenham iterator. */ typedef struct { Sint16 x, y; int dx, dy, s1, s2, swapdir, error; Uint32 count; } SDL2_gfxBresenhamIterator; /*! \brief The structure passed to the internal Murphy iterator. */ typedef struct { SDL_Renderer *renderer; int u, v; /* delta x , delta y */ int ku, kt, kv, kd; /* loop constants */ int oct2; int quad4; Sint16 last1x, last1y, last2x, last2y, first1x, first1y, first2x, first2y, tempx, tempy; } SDL2_gfxMurphyIterator; /* ---- Pixel */ /*! \brief Draw pixel in currently set color. \param renderer The renderer to draw on. \param x X (horizontal) coordinate of the pixel. \param y Y (vertical) coordinate of the pixel. \returns Returns 0 on success, -1 on failure. */ int pixel(SDL_Renderer *renderer, Sint16 x, Sint16 y) { return SDL_RenderDrawPoint(renderer, x, y); } /*! \brief Draw pixel with blending enabled if a<255. \param renderer The renderer to draw on. \param x X (horizontal) coordinate of the pixel. \param y Y (vertical) coordinate of the pixel. \param color The color value of the pixel to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int pixelColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Uint32 color) { Uint8 *c = (Uint8 *)&color; return pixelRGBA(renderer, x, y, c[0], c[1], c[2], c[3]); } /*! \brief Draw pixel with blending enabled if a<255. \param renderer The renderer to draw on. \param x X (horizontal) coordinate of the pixel. \param y Y (vertical) coordinate of the pixel. \param r The red color value of the pixel to draw. \param g The green color value of the pixel to draw. \param b The blue color value of the pixel to draw. \param a The alpha value of the pixel to draw. \returns Returns 0 on success, -1 on failure. */ int pixelRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { int result = 0; result |= SDL_SetRenderDrawBlendMode(renderer, (a == 255) ? SDL_BLENDMODE_NONE : SDL_BLENDMODE_BLEND); result |= SDL_SetRenderDrawColor(renderer, r, g, b, a); result |= SDL_RenderDrawPoint(renderer, x, y); return result; } /*! \brief Draw pixel with blending enabled and using alpha weight on color. \param renderer The renderer to draw on. \param x The horizontal coordinate of the pixel. \param y The vertical position of the pixel. \param r The red color value of the pixel to draw. \param g The green color value of the pixel to draw. \param b The blue color value of the pixel to draw. \param a The alpha value of the pixel to draw. \param weight The weight multiplied into the alpha value of the pixel. \returns Returns 0 on success, -1 on failure. */ int pixelRGBAWeight(SDL_Renderer * renderer, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a, Uint32 weight) { /* * Modify Alpha by weight */ Uint32 ax = a; ax = ((ax * weight) >> 8); if (ax > 255) { a = 255; } else { a = (Uint8)(ax & 0x000000ff); } return pixelRGBA(renderer, x, y, r, g, b, a); } /* ---- Hline */ /*! \brief Draw horizontal line in currently set color \param renderer The renderer to draw on. \param x1 X coordinate of the first point (i.e. left) of the line. \param x2 X coordinate of the second point (i.e. right) of the line. \param y Y coordinate of the points of the line. \returns Returns 0 on success, -1 on failure. */ int hline(SDL_Renderer * renderer, Sint16 x1, Sint16 x2, Sint16 y) { return SDL_RenderDrawLine(renderer, x1, y, x2, y);; } /*! \brief Draw horizontal line with blending. \param renderer The renderer to draw on. \param x1 X coordinate of the first point (i.e. left) of the line. \param x2 X coordinate of the second point (i.e. right) of the line. \param y Y coordinate of the points of the line. \param color The color value of the line to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int hlineColor(SDL_Renderer * renderer, Sint16 x1, Sint16 x2, Sint16 y, Uint32 color) { Uint8 *c = (Uint8 *)&color; return hlineRGBA(renderer, x1, x2, y, c[0], c[1], c[2], c[3]); } /*! \brief Draw horizontal line with blending. \param renderer The renderer to draw on. \param x1 X coordinate of the first point (i.e. left) of the line. \param x2 X coordinate of the second point (i.e. right) of the line. \param y Y coordinate of the points of the line. \param r The red value of the line to draw. \param g The green value of the line to draw. \param b The blue value of the line to draw. \param a The alpha value of the line to draw. \returns Returns 0 on success, -1 on failure. */ int hlineRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 x2, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { int result = 0; result |= SDL_SetRenderDrawBlendMode(renderer, (a == 255) ? SDL_BLENDMODE_NONE : SDL_BLENDMODE_BLEND); result |= SDL_SetRenderDrawColor(renderer, r, g, b, a); result |= SDL_RenderDrawLine(renderer, x1, y, x2, y); return result; } /* ---- Vline */ /*! \brief Draw vertical line in currently set color \param renderer The renderer to draw on. \param x X coordinate of points of the line. \param y1 Y coordinate of the first point (i.e. top) of the line. \param y2 Y coordinate of the second point (i.e. bottom) of the line. \returns Returns 0 on success, -1 on failure. */ int vline(SDL_Renderer * renderer, Sint16 x, Sint16 y1, Sint16 y2) { return SDL_RenderDrawLine(renderer, x, y1, x, y2);; } /*! \brief Draw vertical line with blending. \param renderer The renderer to draw on. \param x X coordinate of the points of the line. \param y1 Y coordinate of the first point (i.e. top) of the line. \param y2 Y coordinate of the second point (i.e. bottom) of the line. \param color The color value of the line to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int vlineColor(SDL_Renderer * renderer, Sint16 x, Sint16 y1, Sint16 y2, Uint32 color) { Uint8 *c = (Uint8 *)&color; return vlineRGBA(renderer, x, y1, y2, c[0], c[1], c[2], c[3]); } /*! \brief Draw vertical line with blending. \param renderer The renderer to draw on. \param x X coordinate of the points of the line. \param y1 Y coordinate of the first point (i.e. top) of the line. \param y2 Y coordinate of the second point (i.e. bottom) of the line. \param r The red value of the line to draw. \param g The green value of the line to draw. \param b The blue value of the line to draw. \param a The alpha value of the line to draw. \returns Returns 0 on success, -1 on failure. */ int vlineRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y1, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { int result = 0; result |= SDL_SetRenderDrawBlendMode(renderer, (a == 255) ? SDL_BLENDMODE_NONE : SDL_BLENDMODE_BLEND); result |= SDL_SetRenderDrawColor(renderer, r, g, b, a); result |= SDL_RenderDrawLine(renderer, x, y1, x, y2); return result; } /* ---- Rectangle */ /*! \brief Draw rectangle with blending. \param renderer The renderer to draw on. \param x1 X coordinate of the first point (i.e. top right) of the rectangle. \param y1 Y coordinate of the first point (i.e. top right) of the rectangle. \param x2 X coordinate of the second point (i.e. bottom left) of the rectangle. \param y2 Y coordinate of the second point (i.e. bottom left) of the rectangle. \param color The color value of the rectangle to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int rectangleColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color) { Uint8 *c = (Uint8 *)&color; return rectangleRGBA(renderer, x1, y1, x2, y2, c[0], c[1], c[2], c[3]); } /*! \brief Draw rectangle with blending. \param renderer The renderer to draw on. \param x1 X coordinate of the first point (i.e. top right) of the rectangle. \param y1 Y coordinate of the first point (i.e. top right) of the rectangle. \param x2 X coordinate of the second point (i.e. bottom left) of the rectangle. \param y2 Y coordinate of the second point (i.e. bottom left) of the rectangle. \param r The red value of the rectangle to draw. \param g The green value of the rectangle to draw. \param b The blue value of the rectangle to draw. \param a The alpha value of the rectangle to draw. \returns Returns 0 on success, -1 on failure. */ int rectangleRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { int result; Sint16 tmp; SDL_Rect rect; /* * Test for special cases of straight lines or single point */ if (x1 == x2) { if (y1 == y2) { return (pixelRGBA(renderer, x1, y1, r, g, b, a)); } else { return (vlineRGBA(renderer, x1, y1, y2, r, g, b, a)); } } else { if (y1 == y2) { return (hlineRGBA(renderer, x1, x2, y1, r, g, b, a)); } } /* * Swap x1, x2 if required */ if (x1 > x2) { tmp = x1; x1 = x2; x2 = tmp; } /* * Swap y1, y2 if required */ if (y1 > y2) { tmp = y1; y1 = y2; y2 = tmp; } /* * Create destination rect */ rect.x = x1; rect.y = y1; rect.w = x2 - x1; rect.h = y2 - y1; /* * Draw */ result = 0; result |= SDL_SetRenderDrawBlendMode(renderer, (a == 255) ? SDL_BLENDMODE_NONE : SDL_BLENDMODE_BLEND); result |= SDL_SetRenderDrawColor(renderer, r, g, b, a); result |= SDL_RenderDrawRect(renderer, &rect); return result; } /* ---- Rounded Rectangle */ /*! \brief Draw rounded-corner rectangle with blending. \param renderer The renderer to draw on. \param x1 X coordinate of the first point (i.e. top right) of the rectangle. \param y1 Y coordinate of the first point (i.e. top right) of the rectangle. \param x2 X coordinate of the second point (i.e. bottom left) of the rectangle. \param y2 Y coordinate of the second point (i.e. bottom left) of the rectangle. \param rad The radius of the corner arc. \param color The color value of the rectangle to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int roundedRectangleColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint32 color) { Uint8 *c = (Uint8 *)&color; return roundedRectangleRGBA(renderer, x1, y1, x2, y2, rad, c[0], c[1], c[2], c[3]); } /*! \brief Draw rounded-corner rectangle with blending. \param renderer The renderer to draw on. \param x1 X coordinate of the first point (i.e. top right) of the rectangle. \param y1 Y coordinate of the first point (i.e. top right) of the rectangle. \param x2 X coordinate of the second point (i.e. bottom left) of the rectangle. \param y2 Y coordinate of the second point (i.e. bottom left) of the rectangle. \param rad The radius of the corner arc. \param r The red value of the rectangle to draw. \param g The green value of the rectangle to draw. \param b The blue value of the rectangle to draw. \param a The alpha value of the rectangle to draw. \returns Returns 0 on success, -1 on failure. */ int roundedRectangleRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { int result = 0; Sint16 tmp; Sint16 w, h; Sint16 xx1, xx2; Sint16 yy1, yy2; /* * Check renderer */ if (renderer == NULL) { return -1; } /* * Check radius vor valid range */ if (rad < 0) { return -1; } /* * Special case - no rounding */ if (rad <= 1) { return rectangleRGBA(renderer, x1, y1, x2, y2, r, g, b, a); } /* * Test for special cases of straight lines or single point */ if (x1 == x2) { if (y1 == y2) { return (pixelRGBA(renderer, x1, y1, r, g, b, a)); } else { return (vlineRGBA(renderer, x1, y1, y2, r, g, b, a)); } } else { if (y1 == y2) { return (hlineRGBA(renderer, x1, x2, y1, r, g, b, a)); } } /* * Swap x1, x2 if required */ if (x1 > x2) { tmp = x1; x1 = x2; x2 = tmp; } /* * Swap y1, y2 if required */ if (y1 > y2) { tmp = y1; y1 = y2; y2 = tmp; } /* * Calculate width&height */ w = x2 - x1; h = y2 - y1; /* * Maybe adjust radius */ if ((rad * 2) > w) { rad = w / 2; } if ((rad * 2) > h) { rad = h / 2; } /* * Draw corners */ xx1 = x1 + rad; xx2 = x2 - rad; yy1 = y1 + rad; yy2 = y2 - rad; result |= arcRGBA(renderer, xx1, yy1, rad, 180, 270, r, g, b, a); result |= arcRGBA(renderer, xx2, yy1, rad, 270, 360, r, g, b, a); result |= arcRGBA(renderer, xx1, yy2, rad, 90, 180, r, g, b, a); result |= arcRGBA(renderer, xx2, yy2, rad, 0, 90, r, g, b, a); /* * Draw lines */ if (xx1 <= xx2) { result |= hlineRGBA(renderer, xx1, xx2, y1, r, g, b, a); result |= hlineRGBA(renderer, xx1, xx2, y2, r, g, b, a); } if (yy1 <= yy2) { result |= vlineRGBA(renderer, x1, yy1, yy2, r, g, b, a); result |= vlineRGBA(renderer, x2, yy1, yy2, r, g, b, a); } return result; } /* ---- Rounded Box */ /*! \brief Draw rounded-corner box (filled rectangle) with blending. \param renderer The renderer to draw on. \param x1 X coordinate of the first point (i.e. top right) of the box. \param y1 Y coordinate of the first point (i.e. top right) of the box. \param x2 X coordinate of the second point (i.e. bottom left) of the box. \param y2 Y coordinate of the second point (i.e. bottom left) of the box. \param rad The radius of the corner arcs of the box. \param color The color value of the box to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int roundedBoxColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint32 color) { Uint8 *c = (Uint8 *)&color; return roundedBoxRGBA(renderer, x1, y1, x2, y2, rad, c[0], c[1], c[2], c[3]); } /*! \brief Draw rounded-corner box (filled rectangle) with blending. \param renderer The renderer to draw on. \param x1 X coordinate of the first point (i.e. top right) of the box. \param y1 Y coordinate of the first point (i.e. top right) of the box. \param x2 X coordinate of the second point (i.e. bottom left) of the box. \param y2 Y coordinate of the second point (i.e. bottom left) of the box. \param rad The radius of the corner arcs of the box. \param r The red value of the box to draw. \param g The green value of the box to draw. \param b The blue value of the box to draw. \param a The alpha value of the box to draw. \returns Returns 0 on success, -1 on failure. */ int roundedBoxRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { int result; Sint16 w, h, r2, tmp; Sint16 cx = 0; Sint16 cy = rad; Sint16 ocx = (Sint16) 0xffff; Sint16 ocy = (Sint16) 0xffff; Sint16 df = 1 - rad; Sint16 d_e = 3; Sint16 d_se = -2 * rad + 5; Sint16 xpcx, xmcx, xpcy, xmcy; Sint16 ypcy, ymcy, ypcx, ymcx; Sint16 x, y, dx, dy; /* * Check destination renderer */ if (renderer == NULL) { return -1; } /* * Check radius vor valid range */ if (rad < 0) { return -1; } /* * Special case - no rounding */ if (rad <= 1) { return boxRGBA(renderer, x1, y1, x2, y2, r, g, b, a); } /* * Test for special cases of straight lines or single point */ if (x1 == x2) { if (y1 == y2) { return (pixelRGBA(renderer, x1, y1, r, g, b, a)); } else { return (vlineRGBA(renderer, x1, y1, y2, r, g, b, a)); } } else { if (y1 == y2) { return (hlineRGBA(renderer, x1, x2, y1, r, g, b, a)); } } /* * Swap x1, x2 if required */ if (x1 > x2) { tmp = x1; x1 = x2; x2 = tmp; } /* * Swap y1, y2 if required */ if (y1 > y2) { tmp = y1; y1 = y2; y2 = tmp; } /* * Calculate width&height */ w = x2 - x1 + 1; h = y2 - y1 + 1; /* * Maybe adjust radius */ r2 = rad + rad; if (r2 > w) { rad = w / 2; r2 = rad + rad; } if (r2 > h) { rad = h / 2; } /* Setup filled circle drawing for corners */ x = x1 + rad; y = y1 + rad; dx = x2 - x1 - rad - rad; dy = y2 - y1 - rad - rad; /* * Set color */ result = 0; result |= SDL_SetRenderDrawBlendMode(renderer, (a == 255) ? SDL_BLENDMODE_NONE : SDL_BLENDMODE_BLEND); result |= SDL_SetRenderDrawColor(renderer, r, g, b, a); /* * Draw corners */ do { xpcx = x + cx; xmcx = x - cx; xpcy = x + cy; xmcy = x - cy; if (ocy != cy) { if (cy > 0) { ypcy = y + cy; ymcy = y - cy; result |= hline(renderer, xmcx, xpcx + dx, ypcy + dy); result |= hline(renderer, xmcx, xpcx + dx, ymcy); } else { result |= hline(renderer, xmcx, xpcx + dx, y); } ocy = cy; } if (ocx != cx) { if (cx != cy) { if (cx > 0) { ypcx = y + cx; ymcx = y - cx; result |= hline(renderer, xmcy, xpcy + dx, ymcx); result |= hline(renderer, xmcy, xpcy + dx, ypcx + dy); } else { result |= hline(renderer, xmcy, xpcy + dx, y); } } ocx = cx; } /* * Update */ if (df < 0) { df += d_e; d_e += 2; d_se += 2; } else { df += d_se; d_e += 2; d_se += 4; cy--; } cx++; } while (cx <= cy); /* Inside */ if (dx > 0 && dy > 0) { result |= boxRGBA(renderer, x1, y1 + rad + 1, x2, y2 - rad, r, g, b, a); } return (result); } /* ---- Box */ /*! \brief Draw box (filled rectangle) with blending. \param renderer The renderer to draw on. \param x1 X coordinate of the first point (i.e. top right) of the box. \param y1 Y coordinate of the first point (i.e. top right) of the box. \param x2 X coordinate of the second point (i.e. bottom left) of the box. \param y2 Y coordinate of the second point (i.e. bottom left) of the box. \param color The color value of the box to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int boxColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color) { Uint8 *c = (Uint8 *)&color; return boxRGBA(renderer, x1, y1, x2, y2, c[0], c[1], c[2], c[3]); } /*! \brief Draw box (filled rectangle) with blending. \param renderer The renderer to draw on. \param x1 X coordinate of the first point (i.e. top right) of the box. \param y1 Y coordinate of the first point (i.e. top right) of the box. \param x2 X coordinate of the second point (i.e. bottom left) of the box. \param y2 Y coordinate of the second point (i.e. bottom left) of the box. \param r The red value of the box to draw. \param g The green value of the box to draw. \param b The blue value of the box to draw. \param a The alpha value of the box to draw. \returns Returns 0 on success, -1 on failure. */ int boxRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { int result; Sint16 tmp; SDL_Rect rect; /* * Test for special cases of straight lines or single point */ if (x1 == x2) { if (y1 == y2) { return (pixelRGBA(renderer, x1, y1, r, g, b, a)); } else { return (vlineRGBA(renderer, x1, y1, y2, r, g, b, a)); } } else { if (y1 == y2) { return (hlineRGBA(renderer, x1, x2, y1, r, g, b, a)); } } /* * Swap x1, x2 if required */ if (x1 > x2) { tmp = x1; x1 = x2; x2 = tmp; } /* * Swap y1, y2 if required */ if (y1 > y2) { tmp = y1; y1 = y2; y2 = tmp; } /* * Create destination rect */ rect.x = x1; rect.y = y1; rect.w = x2 - x1 + 1; rect.h = y2 - y1 + 1; /* * Draw */ result = 0; result |= SDL_SetRenderDrawBlendMode(renderer, (a == 255) ? SDL_BLENDMODE_NONE : SDL_BLENDMODE_BLEND); result |= SDL_SetRenderDrawColor(renderer, r, g, b, a); result |= SDL_RenderFillRect(renderer, &rect); return result; } /* ----- Line */ /*! \brief Draw line with alpha blending using the currently set color. \param renderer The renderer to draw on. \param x1 X coordinate of the first point of the line. \param y1 Y coordinate of the first point of the line. \param x2 X coordinate of the second point of the line. \param y2 Y coordinate of the second point of the line. \returns Returns 0 on success, -1 on failure. */ int line(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2) { /* * Draw */ return SDL_RenderDrawLine(renderer, x1, y1, x2, y2); } /*! \brief Draw line with alpha blending. \param renderer The renderer to draw on. \param x1 X coordinate of the first point of the line. \param y1 Y coordinate of the first point of the line. \param x2 X coordinate of the second point of the line. \param y2 Y coordinate of the seond point of the line. \param color The color value of the line to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int lineColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color) { Uint8 *c = (Uint8 *)&color; return lineRGBA(renderer, x1, y1, x2, y2, c[0], c[1], c[2], c[3]); } /*! \brief Draw line with alpha blending. \param renderer The renderer to draw on. \param x1 X coordinate of the first point of the line. \param y1 Y coordinate of the first point of the line. \param x2 X coordinate of the second point of the line. \param y2 Y coordinate of the second point of the line. \param r The red value of the line to draw. \param g The green value of the line to draw. \param b The blue value of the line to draw. \param a The alpha value of the line to draw. \returns Returns 0 on success, -1 on failure. */ int lineRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ int result = 0; result |= SDL_SetRenderDrawBlendMode(renderer, (a == 255) ? SDL_BLENDMODE_NONE : SDL_BLENDMODE_BLEND); result |= SDL_SetRenderDrawColor(renderer, r, g, b, a); result |= SDL_RenderDrawLine(renderer, x1, y1, x2, y2); return result; } /* ---- AA Line */ #define AAlevels 256 #define AAbits 8 /*! \brief Internal function to draw anti-aliased line with alpha blending and endpoint control. This implementation of the Wu antialiasing code is based on Mike Abrash's DDJ article which was reprinted as Chapter 42 of his Graphics Programming Black Book, but has been optimized to work with SDL and utilizes 32-bit fixed-point arithmetic by A. Schiffler. The endpoint control allows the supression to draw the last pixel useful for rendering continous aa-lines with alpha<255. \param renderer The renderer to draw on. \param x1 X coordinate of the first point of the aa-line. \param y1 Y coordinate of the first point of the aa-line. \param x2 X coordinate of the second point of the aa-line. \param y2 Y coordinate of the second point of the aa-line. \param r The red value of the aa-line to draw. \param g The green value of the aa-line to draw. \param b The blue value of the aa-line to draw. \param a The alpha value of the aa-line to draw. \param draw_endpoint Flag indicating if the endpoint should be drawn; draw if non-zero. \returns Returns 0 on success, -1 on failure. */ int _aalineRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a, int draw_endpoint) { Sint32 xx0, yy0, xx1, yy1; int result; Uint32 intshift, erracc, erradj; Uint32 erracctmp, wgt, wgtcompmask; int dx, dy, tmp, xdir, y0p1, x0pxdir; /* * Keep on working with 32bit numbers */ xx0 = x1; yy0 = y1; xx1 = x2; yy1 = y2; /* * Reorder points to make dy positive */ if (yy0 > yy1) { tmp = yy0; yy0 = yy1; yy1 = tmp; tmp = xx0; xx0 = xx1; xx1 = tmp; } /* * Calculate distance */ dx = xx1 - xx0; dy = yy1 - yy0; /* * Adjust for negative dx and set xdir */ if (dx >= 0) { xdir = 1; } else { xdir = -1; dx = (-dx); } /* * Check for special cases */ if (dx == 0) { /* * Vertical line */ if (draw_endpoint) { return (vlineRGBA(renderer, x1, y1, y2, r, g, b, a)); } else { if (dy > 0) { return (vlineRGBA(renderer, x1, yy0, yy0+dy, r, g, b, a)); } else { return (pixelRGBA(renderer, x1, y1, r, g, b, a)); } } } else if (dy == 0) { /* * Horizontal line */ if (draw_endpoint) { return (hlineRGBA(renderer, x1, x2, y1, r, g, b, a)); } else { if (dx > 0) { return (hlineRGBA(renderer, xx0, xx0+(xdir*dx), y1, r, g, b, a)); } else { return (pixelRGBA(renderer, x1, y1, r, g, b, a)); } } } else if ((dx == dy) && (draw_endpoint)) { /* * Diagonal line (with endpoint) */ return (lineRGBA(renderer, x1, y1, x2, y2, r, g, b, a)); } /* * Line is not horizontal, vertical or diagonal (with endpoint) */ result = 0; /* * Zero accumulator */ erracc = 0; /* * # of bits by which to shift erracc to get intensity level */ intshift = 32 - AAbits; /* * Mask used to flip all bits in an intensity weighting */ wgtcompmask = AAlevels - 1; /* * Draw the initial pixel in the foreground color */ result |= pixelRGBA(renderer, x1, y1, r, g, b, a); /* * x-major or y-major? */ if (dy > dx) { /* * y-major. Calculate 16-bit fixed point fractional part of a pixel that * X advances every time Y advances 1 pixel, truncating the result so that * we won't overrun the endpoint along the X axis */ /* * Not-so-portable version: erradj = ((Uint64)dx << 32) / (Uint64)dy; */ erradj = ((dx << 16) / dy) << 16; /* * draw all pixels other than the first and last */ x0pxdir = xx0 + xdir; while (--dy) { erracctmp = erracc; erracc += erradj; if (erracc <= erracctmp) { /* * rollover in error accumulator, x coord advances */ xx0 = x0pxdir; x0pxdir += xdir; } yy0++; /* y-major so always advance Y */ /* * the AAbits most significant bits of erracc give us the intensity * weighting for this pixel, and the complement of the weighting for * the paired pixel. */ wgt = (erracc >> intshift) & 255; result |= pixelRGBAWeight (renderer, xx0, yy0, r, g, b, a, 255 - wgt); result |= pixelRGBAWeight (renderer, x0pxdir, yy0, r, g, b, a, wgt); } } else { /* * x-major line. Calculate 16-bit fixed-point fractional part of a pixel * that Y advances each time X advances 1 pixel, truncating the result so * that we won't overrun the endpoint along the X axis. */ /* * Not-so-portable version: erradj = ((Uint64)dy << 32) / (Uint64)dx; */ erradj = ((dy << 16) / dx) << 16; /* * draw all pixels other than the first and last */ y0p1 = yy0 + 1; while (--dx) { erracctmp = erracc; erracc += erradj; if (erracc <= erracctmp) { /* * Accumulator turned over, advance y */ yy0 = y0p1; y0p1++; } xx0 += xdir; /* x-major so always advance X */ /* * the AAbits most significant bits of erracc give us the intensity * weighting for this pixel, and the complement of the weighting for * the paired pixel. */ wgt = (erracc >> intshift) & 255; result |= pixelRGBAWeight (renderer, xx0, yy0, r, g, b, a, 255 - wgt); result |= pixelRGBAWeight (renderer, xx0, y0p1, r, g, b, a, wgt); } } /* * Do we have to draw the endpoint */ if (draw_endpoint) { /* * Draw final pixel, always exactly intersected by the line and doesn't * need to be weighted. */ result |= pixelRGBA (renderer, x2, y2, r, g, b, a); } return (result); } /*! \brief Draw anti-aliased line with alpha blending. \param renderer The renderer to draw on. \param x1 X coordinate of the first point of the aa-line. \param y1 Y coordinate of the first point of the aa-line. \param x2 X coordinate of the second point of the aa-line. \param y2 Y coordinate of the second point of the aa-line. \param color The color value of the aa-line to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int aalineColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color) { Uint8 *c = (Uint8 *)&color; return _aalineRGBA(renderer, x1, y1, x2, y2, c[0], c[1], c[2], c[3], 1); } /*! \brief Draw anti-aliased line with alpha blending. \param renderer The renderer to draw on. \param x1 X coordinate of the first point of the aa-line. \param y1 Y coordinate of the first point of the aa-line. \param x2 X coordinate of the second point of the aa-line. \param y2 Y coordinate of the second point of the aa-line. \param r The red value of the aa-line to draw. \param g The green value of the aa-line to draw. \param b The blue value of the aa-line to draw. \param a The alpha value of the aa-line to draw. \returns Returns 0 on success, -1 on failure. */ int aalineRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { return _aalineRGBA(renderer, x1, y1, x2, y2, r, g, b, a, 1); } /* ----- Circle */ /*! \brief Draw circle with blending. \param renderer The renderer to draw on. \param x X coordinate of the center of the circle. \param y Y coordinate of the center of the circle. \param rad Radius in pixels of the circle. \param color The color value of the circle to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int circleColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Uint32 color) { Uint8 *c = (Uint8 *)&color; return ellipseRGBA(renderer, x, y, rad, rad, c[0], c[1], c[2], c[3]); } /*! \brief Draw circle with blending. \param renderer The renderer to draw on. \param x X coordinate of the center of the circle. \param y Y coordinate of the center of the circle. \param rad Radius in pixels of the circle. \param r The red value of the circle to draw. \param g The green value of the circle to draw. \param b The blue value of the circle to draw. \param a The alpha value of the circle to draw. \returns Returns 0 on success, -1 on failure. */ int circleRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { return ellipseRGBA(renderer, x, y, rad, rad, r, g, b, a); } /* ----- Arc */ /*! \brief Arc with blending. \param renderer The renderer to draw on. \param x X coordinate of the center of the arc. \param y Y coordinate of the center of the arc. \param rad Radius in pixels of the arc. \param start Starting radius in degrees of the arc. 0 degrees is down, increasing counterclockwise. \param end Ending radius in degrees of the arc. 0 degrees is down, increasing counterclockwise. \param color The color value of the arc to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int arcColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color) { Uint8 *c = (Uint8 *)&color; return arcRGBA(renderer, x, y, rad, start, end, c[0], c[1], c[2], c[3]); } /*! \brief Arc with blending. \param renderer The renderer to draw on. \param x X coordinate of the center of the arc. \param y Y coordinate of the center of the arc. \param rad Radius in pixels of the arc. \param start Starting radius in degrees of the arc. 0 degrees is down, increasing counterclockwise. \param end Ending radius in degrees of the arc. 0 degrees is down, increasing counterclockwise. \param r The red value of the arc to draw. \param g The green value of the arc to draw. \param b The blue value of the arc to draw. \param a The alpha value of the arc to draw. \returns Returns 0 on success, -1 on failure. */ /* TODO: rewrite algorithm; arc endpoints are not always drawn */ int arcRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { int result; Sint16 cx = 0; Sint16 cy = rad; Sint16 df = 1 - rad; Sint16 d_e = 3; Sint16 d_se = -2 * rad + 5; Sint16 xpcx, xmcx, xpcy, xmcy; Sint16 ypcy, ymcy, ypcx, ymcx; Uint8 drawoct; int startoct, endoct, oct, stopval_start = 0, stopval_end = 0; double dstart, dend, temp = 0.; /* * Sanity check radius */ if (rad < 0) { return (-1); } /* * Special case for rad=0 - draw a point */ if (rad == 0) { return (pixelRGBA(renderer, x, y, r, g, b, a)); } /* Octant labeling \ 5 | 6 / \ | / 4 \ | / 7 \|/ ------+------ +x /|\ 3 / | \ 0 / | \ / 2 | 1 \ +y Initially reset bitmask to 0x00000000 the set whether or not to keep drawing a given octant. For example: 0x00111100 means we're drawing in octants 2-5 */ drawoct = 0; /* * Fixup angles */ start %= 360; end %= 360; /* 0 <= start & end < 360; note that sometimes start > end - if so, arc goes back through 0. */ while (start < 0) start += 360; while (end < 0) end += 360; start %= 360; end %= 360; /* now, we find which octants we're drawing in. */ startoct = start / 45; endoct = end / 45; oct = startoct - 1; /* stopval_start, stopval_end; what values of cx to stop at. */ do { oct = (oct + 1) % 8; if (oct == startoct) { /* need to compute stopval_start for this octant. Look at picture above if this is unclear */ dstart = (double)start; switch (oct) { case 0: case 3: temp = sin(dstart * M_PI / 180.); break; case 1: case 6: temp = cos(dstart * M_PI / 180.); break; case 2: case 5: temp = -cos(dstart * M_PI / 180.); break; case 4: case 7: temp = -sin(dstart * M_PI / 180.); break; } temp *= rad; stopval_start = (int)temp; /* This isn't arbitrary, but requires graph paper to explain well. The basic idea is that we're always changing drawoct after we draw, so we stop immediately after we render the last sensible pixel at x = ((int)temp). and whether to draw in this octant initially */ if (oct % 2) drawoct |= (1 << oct); /* this is basically like saying drawoct[oct] = true, if drawoct were a bool array */ else drawoct &= 255 - (1 << oct); /* this is basically like saying drawoct[oct] = false */ } if (oct == endoct) { /* need to compute stopval_end for this octant */ dend = (double)end; switch (oct) { case 0: case 3: temp = sin(dend * M_PI / 180); break; case 1: case 6: temp = cos(dend * M_PI / 180); break; case 2: case 5: temp = -cos(dend * M_PI / 180); break; case 4: case 7: temp = -sin(dend * M_PI / 180); break; } temp *= rad; stopval_end = (int)temp; /* and whether to draw in this octant initially */ if (startoct == endoct) { /* note: we start drawing, stop, then start again in this case */ /* otherwise: we only draw in this octant, so initialize it to false, it will get set back to true */ if (start > end) { /* unfortunately, if we're in the same octant and need to draw over the whole circle, */ /* we need to set the rest to true, because the while loop will end at the bottom. */ drawoct = 255; } else { drawoct &= 255 - (1 << oct); } } else if (oct % 2) drawoct &= 255 - (1 << oct); else drawoct |= (1 << oct); } else if (oct != startoct) { /* already verified that it's != endoct */ drawoct |= (1 << oct); /* draw this entire segment */ } } while (oct != endoct); /* so now we have what octants to draw and when to draw them. all that's left is the actual raster code. */ /* * Set color */ result = 0; result |= SDL_SetRenderDrawBlendMode(renderer, (a == 255) ? SDL_BLENDMODE_NONE : SDL_BLENDMODE_BLEND); result |= SDL_SetRenderDrawColor(renderer, r, g, b, a); /* * Draw arc */ do { ypcy = y + cy; ymcy = y - cy; if (cx > 0) { xpcx = x + cx; xmcx = x - cx; /* always check if we're drawing a certain octant before adding a pixel to that octant. */ if (drawoct & 4) result |= pixel(renderer, xmcx, ypcy); if (drawoct & 2) result |= pixel(renderer, xpcx, ypcy); if (drawoct & 32) result |= pixel(renderer, xmcx, ymcy); if (drawoct & 64) result |= pixel(renderer, xpcx, ymcy); } else { if (drawoct & 96) result |= pixel(renderer, x, ymcy); if (drawoct & 6) result |= pixel(renderer, x, ypcy); } xpcy = x + cy; xmcy = x - cy; if (cx > 0 && cx != cy) { ypcx = y + cx; ymcx = y - cx; if (drawoct & 8) result |= pixel(renderer, xmcy, ypcx); if (drawoct & 1) result |= pixel(renderer, xpcy, ypcx); if (drawoct & 16) result |= pixel(renderer, xmcy, ymcx); if (drawoct & 128) result |= pixel(renderer, xpcy, ymcx); } else if (cx == 0) { if (drawoct & 24) result |= pixel(renderer, xmcy, y); if (drawoct & 129) result |= pixel(renderer, xpcy, y); } /* * Update whether we're drawing an octant */ if (stopval_start == cx) { /* works like an on-off switch. */ /* This is just in case start & end are in the same octant. */ if (drawoct & (1 << startoct)) drawoct &= 255 - (1 << startoct); else drawoct |= (1 << startoct); } if (stopval_end == cx) { if (drawoct & (1 << endoct)) drawoct &= 255 - (1 << endoct); else drawoct |= (1 << endoct); } /* * Update pixels */ if (df < 0) { df += d_e; d_e += 2; d_se += 2; } else { df += d_se; d_e += 2; d_se += 4; cy--; } cx++; } while (cx <= cy); return (result); } /* ----- AA Circle */ /*! \brief Draw anti-aliased circle with blending. \param renderer The renderer to draw on. \param x X coordinate of the center of the aa-circle. \param y Y coordinate of the center of the aa-circle. \param rad Radius in pixels of the aa-circle. \param color The color value of the aa-circle to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int aacircleColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Uint32 color) { Uint8 *c = (Uint8 *)&color; return aaellipseRGBA(renderer, x, y, rad, rad, c[0], c[1], c[2], c[3]); } /*! \brief Draw anti-aliased circle with blending. \param renderer The renderer to draw on. \param x X coordinate of the center of the aa-circle. \param y Y coordinate of the center of the aa-circle. \param rad Radius in pixels of the aa-circle. \param r The red value of the aa-circle to draw. \param g The green value of the aa-circle to draw. \param b The blue value of the aa-circle to draw. \param a The alpha value of the aa-circle to draw. \returns Returns 0 on success, -1 on failure. */ int aacircleRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { /* * Draw */ return aaellipseRGBA(renderer, x, y, rad, rad, r, g, b, a); } /* ----- Ellipse */ /*! \brief Internal function to draw pixels or lines in 4 quadrants. \param renderer The renderer to draw on. \param x X coordinate of the center of the quadrant. \param y Y coordinate of the center of the quadrant. \param dx X offset in pixels of the corners of the quadrant. \param dy Y offset in pixels of the corners of the quadrant. \param f Flag indicating if the quadrant should be filled (1) or not (0). \returns Returns 0 on success, -1 on failure. */ int _drawQuadrants(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 dx, Sint16 dy, Sint32 f) { int result = 0; Sint16 xpdx, xmdx; Sint16 ypdy, ymdy; if (dx == 0) { if (dy == 0) { result |= pixel(renderer, x, y); } else { ypdy = y + dy; ymdy = y - dy; if (f) { result |= vline(renderer, x, ymdy, ypdy); } else { result |= pixel(renderer, x, ypdy); result |= pixel(renderer, x, ymdy); } } } else { xpdx = x + dx; xmdx = x - dx; ypdy = y + dy; ymdy = y - dy; if (f) { result |= vline(renderer, xpdx, ymdy, ypdy); result |= vline(renderer, xmdx, ymdy, ypdy); } else { result |= pixel(renderer, xpdx, ypdy); result |= pixel(renderer, xmdx, ypdy); result |= pixel(renderer, xpdx, ymdy); result |= pixel(renderer, xmdx, ymdy); } } return result; } /*! \brief Internal function to draw ellipse or filled ellipse with blending. \param renderer The renderer to draw on. \param x X coordinate of the center of the ellipse. \param y Y coordinate of the center of the ellipse. \param rx Horizontal radius in pixels of the ellipse. \param ry Vertical radius in pixels of the ellipse. \param r The red value of the ellipse to draw. \param g The green value of the ellipse to draw. \param b The blue value of the ellipse to draw. \param a The alpha value of the ellipse to draw. \param f Flag indicating if the ellipse should be filled (1) or not (0). \returns Returns 0 on success, -1 on failure. */ #define DEFAULT_ELLIPSE_OVERSCAN 4 int _ellipseRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a, Sint32 f) { int result; Sint32 rxi, ryi; Sint32 rx2, ry2, rx22, ry22; Sint32 error; Sint32 curX, curY, curXp1, curYm1; Sint32 scrX, scrY, oldX, oldY; Sint32 deltaX, deltaY; Sint32 ellipseOverscan; /* * Sanity check radii */ if ((rx < 0) || (ry < 0)) { return (-1); } /* * Set color */ result = 0; result |= SDL_SetRenderDrawBlendMode(renderer, (a == 255) ? SDL_BLENDMODE_NONE : SDL_BLENDMODE_BLEND); result |= SDL_SetRenderDrawColor(renderer, r, g, b, a); /* * Special cases for rx=0 and/or ry=0: draw a hline/vline/pixel */ if (rx == 0) { if (ry == 0) { return (pixel(renderer, x, y)); } else { return (vline(renderer, x, y - ry, y + ry)); } } else { if (ry == 0) { return (hline(renderer, x - rx, x + rx, y)); } } /* * Adjust overscan */ rxi = rx; ryi = ry; if (rxi >= 512 || ryi >= 512) { ellipseOverscan = DEFAULT_ELLIPSE_OVERSCAN / 4; } else if (rxi >= 256 || ryi >= 256) { ellipseOverscan = DEFAULT_ELLIPSE_OVERSCAN / 2; } else { ellipseOverscan = DEFAULT_ELLIPSE_OVERSCAN / 1; } /* * Top/bottom center points. */ oldX = scrX = 0; oldY = scrY = ryi; result |= _drawQuadrants(renderer, x, y, 0, ry, f); /* Midpoint ellipse algorithm with overdraw */ rxi *= ellipseOverscan; ryi *= ellipseOverscan; rx2 = rxi * rxi; rx22 = rx2 + rx2; ry2 = ryi * ryi; ry22 = ry2 + ry2; curX = 0; curY = ryi; deltaX = 0; deltaY = rx22 * curY; /* Points in segment 1 */ error = ry2 - rx2 * ryi + rx2 / 4; while (deltaX <= deltaY) { curX++; deltaX += ry22; error += deltaX + ry2; if (error >= 0) { curY--; deltaY -= rx22; error -= deltaY; } scrX = curX / ellipseOverscan; scrY = curY / ellipseOverscan; if ((scrX != oldX && scrY == oldY) || (scrX != oldX && scrY != oldY)) { result |= _drawQuadrants(renderer, x, y, scrX, scrY, f); oldX = scrX; oldY = scrY; } } /* Points in segment 2 */ if (curY > 0) { curXp1 = curX + 1; curYm1 = curY - 1; error = ry2 * curX * curXp1 + ((ry2 + 3) / 4) + rx2 * curYm1 * curYm1 - rx2 * ry2; while (curY > 0) { curY--; deltaY -= rx22; error += rx2; error -= deltaY; if (error <= 0) { curX++; deltaX += ry22; error += deltaX; } scrX = curX / ellipseOverscan; scrY = curY / ellipseOverscan; if ((scrX != oldX && scrY == oldY) || (scrX != oldX && scrY != oldY)) { oldY--; for (;oldY >= scrY; oldY--) { result |= _drawQuadrants(renderer, x, y, scrX, oldY, f); /* prevent overdraw */ if (f) { oldY = scrY - 1; } } oldX = scrX; oldY = scrY; } } /* Remaining points in vertical */ if (!f) { oldY--; for (;oldY >= 0; oldY--) { result |= _drawQuadrants(renderer, x, y, scrX, oldY, f); } } } return (result); } /*! \brief Draw ellipse with blending. \param renderer The renderer to draw on. \param x X coordinate of the center of the ellipse. \param y Y coordinate of the center of the ellipse. \param rx Horizontal radius in pixels of the ellipse. \param ry Vertical radius in pixels of the ellipse. \param color The color value of the ellipse to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int ellipseColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color) { Uint8 *c = (Uint8 *)&color; return _ellipseRGBA(renderer, x, y, rx, ry, c[0], c[1], c[2], c[3], 0); } /*! \brief Draw ellipse with blending. \param renderer The renderer to draw on. \param x X coordinate of the center of the ellipse. \param y Y coordinate of the center of the ellipse. \param rx Horizontal radius in pixels of the ellipse. \param ry Vertical radius in pixels of the ellipse. \param r The red value of the ellipse to draw. \param g The green value of the ellipse to draw. \param b The blue value of the ellipse to draw. \param a The alpha value of the ellipse to draw. \returns Returns 0 on success, -1 on failure. */ int ellipseRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { return _ellipseRGBA(renderer, x, y, rx, ry, r, g, b, a, 0); } /* ----- Filled Circle */ /*! \brief Draw filled circle with blending. \param renderer The renderer to draw on. \param x X coordinate of the center of the filled circle. \param y Y coordinate of the center of the filled circle. \param rad Radius in pixels of the filled circle. \param color The color value of the filled circle to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int filledCircleColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Uint32 color) { Uint8 *c = (Uint8 *)&color; return filledEllipseRGBA(renderer, x, y, rad, rad, c[0], c[1], c[2], c[3]); } /*! \brief Draw filled circle with blending. \param renderer The renderer to draw on. \param x X coordinate of the center of the filled circle. \param y Y coordinate of the center of the filled circle. \param rad Radius in pixels of the filled circle. \param r The red value of the filled circle to draw. \param g The green value of the filled circle to draw. \param b The blue value of the filled circle to draw. \param a The alpha value of the filled circle to draw. \returns Returns 0 on success, -1 on failure. */ int filledCircleRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { return _ellipseRGBA(renderer, x, y, rad, rad, r, g ,b, a, 1); } /* ----- AA Ellipse */ /* Windows targets do not have lrint, so provide a local inline version */ #if defined(_MSC_VER) /* Detect 64bit and use intrinsic version */ #ifdef _M_X64 #include static __inline long lrint(float f) { return _mm_cvtss_si32(_mm_load_ss(&f)); } #elif defined(_M_IX86) __inline long int lrint (double flt) { int intgr; _asm { fld flt fistp intgr }; return intgr; } #elif defined(_M_ARM) #include #pragma warning(push) #pragma warning(disable: 4716) __declspec(naked) long int lrint (double flt) { __emit(0xEC410B10); // fmdrr d0, r0, r1 __emit(0xEEBD0B40); // ftosid s0, d0 __emit(0xEE100A10); // fmrs r0, s0 __emit(0xE12FFF1E); // bx lr } #pragma warning(pop) #else #error lrint needed for MSVC on non X86/AMD64/ARM targets. #endif #endif /*! \brief Draw anti-aliased ellipse with blending. \param renderer The renderer to draw on. \param x X coordinate of the center of the aa-ellipse. \param y Y coordinate of the center of the aa-ellipse. \param rx Horizontal radius in pixels of the aa-ellipse. \param ry Vertical radius in pixels of the aa-ellipse. \param color The color value of the aa-ellipse to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int aaellipseColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color) { Uint8 *c = (Uint8 *)&color; return aaellipseRGBA(renderer, x, y, rx, ry, c[0], c[1], c[2], c[3]); } /*! \brief Draw anti-aliased ellipse with blending. \param renderer The renderer to draw on. \param x X coordinate of the center of the aa-ellipse. \param y Y coordinate of the center of the aa-ellipse. \param rx Horizontal radius in pixels of the aa-ellipse. \param ry Vertical radius in pixels of the aa-ellipse. \param r The red value of the aa-ellipse to draw. \param g The green value of the aa-ellipse to draw. \param b The blue value of the aa-ellipse to draw. \param a The alpha value of the aa-ellipse to draw. \returns Returns 0 on success, -1 on failure. */ int aaellipseRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { int result; int i; int a2, b2, ds, dt, dxt, t, s, d; Sint16 xp, yp, xs, ys, dyt, od, xx, yy, xc2, yc2; float cp; double sab; Uint8 weight, iweight; /* * Sanity check radii */ if ((rx < 0) || (ry < 0)) { return (-1); } /* * Special cases for rx=0 and/or ry=0: draw a hline/vline/pixel */ if (rx == 0) { if (ry == 0) { return (pixelRGBA(renderer, x, y, r, g, b, a)); } else { return (vlineRGBA(renderer, x, y - ry, y + ry, r, g, b, a)); } } else { if (ry == 0) { return (hlineRGBA(renderer, x - rx, x + rx, y, r, g, b, a)); } } /* Variable setup */ a2 = rx * rx; b2 = ry * ry; ds = 2 * a2; dt = 2 * b2; xc2 = 2 * x; yc2 = 2 * y; sab = sqrt((double)(a2 + b2)); od = (Sint16)lrint(sab*0.01) + 1; /* introduce some overdraw */ dxt = (Sint16)lrint((double)a2 / sab) + od; t = 0; s = -2 * a2 * ry; d = 0; xp = x; yp = y - ry; /* Draw */ result = 0; result |= SDL_SetRenderDrawBlendMode(renderer, (a == 255) ? SDL_BLENDMODE_NONE : SDL_BLENDMODE_BLEND); /* "End points" */ result |= pixelRGBA(renderer, xp, yp, r, g, b, a); result |= pixelRGBA(renderer, xc2 - xp, yp, r, g, b, a); result |= pixelRGBA(renderer, xp, yc2 - yp, r, g, b, a); result |= pixelRGBA(renderer, xc2 - xp, yc2 - yp, r, g, b, a); for (i = 1; i <= dxt; i++) { xp--; d += t - b2; if (d >= 0) ys = yp - 1; else if ((d - s - a2) > 0) { if ((2 * d - s - a2) >= 0) ys = yp + 1; else { ys = yp; yp++; d -= s + a2; s += ds; } } else { yp++; ys = yp + 1; d -= s + a2; s += ds; } t -= dt; /* Calculate alpha */ if (s != 0) { cp = (float) abs(d) / (float) abs(s); if (cp > 1.0) { cp = 1.0; } } else { cp = 1.0; } /* Calculate weights */ weight = (Uint8) (cp * 255); iweight = 255 - weight; /* Upper half */ xx = xc2 - xp; result |= pixelRGBAWeight(renderer, xp, yp, r, g, b, a, iweight); result |= pixelRGBAWeight(renderer, xx, yp, r, g, b, a, iweight); result |= pixelRGBAWeight(renderer, xp, ys, r, g, b, a, weight); result |= pixelRGBAWeight(renderer, xx, ys, r, g, b, a, weight); /* Lower half */ yy = yc2 - yp; result |= pixelRGBAWeight(renderer, xp, yy, r, g, b, a, iweight); result |= pixelRGBAWeight(renderer, xx, yy, r, g, b, a, iweight); yy = yc2 - ys; result |= pixelRGBAWeight(renderer, xp, yy, r, g, b, a, weight); result |= pixelRGBAWeight(renderer, xx, yy, r, g, b, a, weight); } /* Replaces original approximation code dyt = abs(yp - yc); */ dyt = (Sint16)lrint((double)b2 / sab ) + od; for (i = 1; i <= dyt; i++) { yp++; d -= s + a2; if (d <= 0) xs = xp + 1; else if ((d + t - b2) < 0) { if ((2 * d + t - b2) <= 0) xs = xp - 1; else { xs = xp; xp--; d += t - b2; t -= dt; } } else { xp--; xs = xp - 1; d += t - b2; t -= dt; } s += ds; /* Calculate alpha */ if (t != 0) { cp = (float) abs(d) / (float) abs(t); if (cp > 1.0) { cp = 1.0; } } else { cp = 1.0; } /* Calculate weight */ weight = (Uint8) (cp * 255); iweight = 255 - weight; /* Left half */ xx = xc2 - xp; yy = yc2 - yp; result |= pixelRGBAWeight(renderer, xp, yp, r, g, b, a, iweight); result |= pixelRGBAWeight(renderer, xx, yp, r, g, b, a, iweight); result |= pixelRGBAWeight(renderer, xp, yy, r, g, b, a, iweight); result |= pixelRGBAWeight(renderer, xx, yy, r, g, b, a, iweight); /* Right half */ xx = xc2 - xs; result |= pixelRGBAWeight(renderer, xs, yp, r, g, b, a, weight); result |= pixelRGBAWeight(renderer, xx, yp, r, g, b, a, weight); result |= pixelRGBAWeight(renderer, xs, yy, r, g, b, a, weight); result |= pixelRGBAWeight(renderer, xx, yy, r, g, b, a, weight); } return (result); } /* ---- Filled Ellipse */ /*! \brief Draw filled ellipse with blending. \param renderer The renderer to draw on. \param x X coordinate of the center of the filled ellipse. \param y Y coordinate of the center of the filled ellipse. \param rx Horizontal radius in pixels of the filled ellipse. \param ry Vertical radius in pixels of the filled ellipse. \param color The color value of the filled ellipse to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int filledEllipseColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color) { Uint8 *c = (Uint8 *)&color; return _ellipseRGBA(renderer, x, y, rx, ry, c[0], c[1], c[2], c[3], 1); } /*! \brief Draw filled ellipse with blending. \param renderer The renderer to draw on. \param x X coordinate of the center of the filled ellipse. \param y Y coordinate of the center of the filled ellipse. \param rx Horizontal radius in pixels of the filled ellipse. \param ry Vertical radius in pixels of the filled ellipse. \param r The red value of the filled ellipse to draw. \param g The green value of the filled ellipse to draw. \param b The blue value of the filled ellipse to draw. \param a The alpha value of the filled ellipse to draw. \returns Returns 0 on success, -1 on failure. */ int filledEllipseRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { return _ellipseRGBA(renderer, x, y, rx, ry, r, g, b, a, 1); } /* ----- Pie */ /*! \brief Internal float (low-speed) pie-calc implementation by drawing polygons. Note: Determines vertex array and uses polygon or filledPolygon drawing routines to render. \param renderer The renderer to draw on. \param x X coordinate of the center of the pie. \param y Y coordinate of the center of the pie. \param rad Radius in pixels of the pie. \param start Starting radius in degrees of the pie. \param end Ending radius in degrees of the pie. \param r The red value of the pie to draw. \param g The green value of the pie to draw. \param b The blue value of the pie to draw. \param a The alpha value of the pie to draw. \param filled Flag indicating if the pie should be filled (=1) or not (=0). \returns Returns 0 on success, -1 on failure. */ /* TODO: rewrite algorithm; pie is not always accurate */ int _pieRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a, Uint8 filled) { int result; double angle, start_angle, end_angle; double deltaAngle; double dr; int numpoints, i; Sint16 *vx, *vy; /* * Sanity check radii */ if (rad < 0) { return (-1); } /* * Fixup angles */ start = start % 360; end = end % 360; /* * Special case for rad=0 - draw a point */ if (rad == 0) { return (pixelRGBA(renderer, x, y, r, g, b, a)); } /* * Variable setup */ dr = (double) rad; deltaAngle = 3.0 / dr; start_angle = (double) start *(2.0 * M_PI / 360.0); end_angle = (double) end *(2.0 * M_PI / 360.0); if (start > end) { end_angle += (2.0 * M_PI); } /* We will always have at least 2 points */ numpoints = 2; /* Count points (rather than calculating it) */ angle = start_angle; while (angle < end_angle) { angle += deltaAngle; numpoints++; } /* Allocate combined vertex array */ vx = vy = (Sint16 *) malloc(2 * sizeof(Uint16) * numpoints); if (vx == NULL) { return (-1); } /* Update point to start of vy */ vy += numpoints; /* Center */ vx[0] = x; vy[0] = y; /* First vertex */ angle = start_angle; vx[1] = x + (int) (dr * cos(angle)); vy[1] = y + (int) (dr * sin(angle)); if (numpoints<3) { result = lineRGBA(renderer, vx[0], vy[0], vx[1], vy[1], r, g, b, a); } else { /* Calculate other vertices */ i = 2; angle = start_angle; while (angle < end_angle) { angle += deltaAngle; if (angle>end_angle) { angle = end_angle; } vx[i] = x + (int) (dr * cos(angle)); vy[i] = y + (int) (dr * sin(angle)); i++; } /* Draw */ if (filled) { result = filledPolygonRGBA(renderer, vx, vy, numpoints, r, g, b, a); } else { result = polygonRGBA(renderer, vx, vy, numpoints, r, g, b, a); } } /* Free combined vertex array */ free(vx); return (result); } /*! \brief Draw pie (outline) with alpha blending. \param renderer The renderer to draw on. \param x X coordinate of the center of the pie. \param y Y coordinate of the center of the pie. \param rad Radius in pixels of the pie. \param start Starting radius in degrees of the pie. \param end Ending radius in degrees of the pie. \param color The color value of the pie to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int pieColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color) { Uint8 *c = (Uint8 *)&color; return _pieRGBA(renderer, x, y, rad, start, end, c[0], c[1], c[2], c[3], 0); } /*! \brief Draw pie (outline) with alpha blending. \param renderer The renderer to draw on. \param x X coordinate of the center of the pie. \param y Y coordinate of the center of the pie. \param rad Radius in pixels of the pie. \param start Starting radius in degrees of the pie. \param end Ending radius in degrees of the pie. \param r The red value of the pie to draw. \param g The green value of the pie to draw. \param b The blue value of the pie to draw. \param a The alpha value of the pie to draw. \returns Returns 0 on success, -1 on failure. */ int pieRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { return _pieRGBA(renderer, x, y, rad, start, end, r, g, b, a, 0); } /*! \brief Draw filled pie with alpha blending. \param renderer The renderer to draw on. \param x X coordinate of the center of the filled pie. \param y Y coordinate of the center of the filled pie. \param rad Radius in pixels of the filled pie. \param start Starting radius in degrees of the filled pie. \param end Ending radius in degrees of the filled pie. \param color The color value of the filled pie to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int filledPieColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color) { Uint8 *c = (Uint8 *)&color; return _pieRGBA(renderer, x, y, rad, start, end, c[0], c[1], c[2], c[3], 1); } /*! \brief Draw filled pie with alpha blending. \param renderer The renderer to draw on. \param x X coordinate of the center of the filled pie. \param y Y coordinate of the center of the filled pie. \param rad Radius in pixels of the filled pie. \param start Starting radius in degrees of the filled pie. \param end Ending radius in degrees of the filled pie. \param r The red value of the filled pie to draw. \param g The green value of the filled pie to draw. \param b The blue value of the filled pie to draw. \param a The alpha value of the filled pie to draw. \returns Returns 0 on success, -1 on failure. */ int filledPieRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { return _pieRGBA(renderer, x, y, rad, start, end, r, g, b, a, 1); } /* ------ Trigon */ /*! \brief Draw trigon (triangle outline) with alpha blending. Note: Creates vertex array and uses polygon routine to render. \param renderer The renderer to draw on. \param x1 X coordinate of the first point of the trigon. \param y1 Y coordinate of the first point of the trigon. \param x2 X coordinate of the second point of the trigon. \param y2 Y coordinate of the second point of the trigon. \param x3 X coordinate of the third point of the trigon. \param y3 Y coordinate of the third point of the trigon. \param color The color value of the trigon to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int trigonColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color) { Sint16 vx[3]; Sint16 vy[3]; vx[0]=x1; vx[1]=x2; vx[2]=x3; vy[0]=y1; vy[1]=y2; vy[2]=y3; return(polygonColor(renderer,vx,vy,3,color)); } /*! \brief Draw trigon (triangle outline) with alpha blending. \param renderer The renderer to draw on. \param x1 X coordinate of the first point of the trigon. \param y1 Y coordinate of the first point of the trigon. \param x2 X coordinate of the second point of the trigon. \param y2 Y coordinate of the second point of the trigon. \param x3 X coordinate of the third point of the trigon. \param y3 Y coordinate of the third point of the trigon. \param r The red value of the trigon to draw. \param g The green value of the trigon to draw. \param b The blue value of the trigon to draw. \param a The alpha value of the trigon to draw. \returns Returns 0 on success, -1 on failure. */ int trigonRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { Sint16 vx[3]; Sint16 vy[3]; vx[0]=x1; vx[1]=x2; vx[2]=x3; vy[0]=y1; vy[1]=y2; vy[2]=y3; return(polygonRGBA(renderer,vx,vy,3,r,g,b,a)); } /* ------ AA-Trigon */ /*! \brief Draw anti-aliased trigon (triangle outline) with alpha blending. Note: Creates vertex array and uses aapolygon routine to render. \param renderer The renderer to draw on. \param x1 X coordinate of the first point of the aa-trigon. \param y1 Y coordinate of the first point of the aa-trigon. \param x2 X coordinate of the second point of the aa-trigon. \param y2 Y coordinate of the second point of the aa-trigon. \param x3 X coordinate of the third point of the aa-trigon. \param y3 Y coordinate of the third point of the aa-trigon. \param color The color value of the aa-trigon to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int aatrigonColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color) { Sint16 vx[3]; Sint16 vy[3]; vx[0]=x1; vx[1]=x2; vx[2]=x3; vy[0]=y1; vy[1]=y2; vy[2]=y3; return(aapolygonColor(renderer,vx,vy,3,color)); } /*! \brief Draw anti-aliased trigon (triangle outline) with alpha blending. \param renderer The renderer to draw on. \param x1 X coordinate of the first point of the aa-trigon. \param y1 Y coordinate of the first point of the aa-trigon. \param x2 X coordinate of the second point of the aa-trigon. \param y2 Y coordinate of the second point of the aa-trigon. \param x3 X coordinate of the third point of the aa-trigon. \param y3 Y coordinate of the third point of the aa-trigon. \param r The red value of the aa-trigon to draw. \param g The green value of the aa-trigon to draw. \param b The blue value of the aa-trigon to draw. \param a The alpha value of the aa-trigon to draw. \returns Returns 0 on success, -1 on failure. */ int aatrigonRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { Sint16 vx[3]; Sint16 vy[3]; vx[0]=x1; vx[1]=x2; vx[2]=x3; vy[0]=y1; vy[1]=y2; vy[2]=y3; return(aapolygonRGBA(renderer,vx,vy,3,r,g,b,a)); } /* ------ Filled Trigon */ /*! \brief Draw filled trigon (triangle) with alpha blending. Note: Creates vertex array and uses aapolygon routine to render. \param renderer The renderer to draw on. \param x1 X coordinate of the first point of the filled trigon. \param y1 Y coordinate of the first point of the filled trigon. \param x2 X coordinate of the second point of the filled trigon. \param y2 Y coordinate of the second point of the filled trigon. \param x3 X coordinate of the third point of the filled trigon. \param y3 Y coordinate of the third point of the filled trigon. \param color The color value of the filled trigon to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int filledTrigonColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color) { Sint16 vx[3]; Sint16 vy[3]; vx[0]=x1; vx[1]=x2; vx[2]=x3; vy[0]=y1; vy[1]=y2; vy[2]=y3; return(filledPolygonColor(renderer,vx,vy,3,color)); } /*! \brief Draw filled trigon (triangle) with alpha blending. Note: Creates vertex array and uses aapolygon routine to render. \param renderer The renderer to draw on. \param x1 X coordinate of the first point of the filled trigon. \param y1 Y coordinate of the first point of the filled trigon. \param x2 X coordinate of the second point of the filled trigon. \param y2 Y coordinate of the second point of the filled trigon. \param x3 X coordinate of the third point of the filled trigon. \param y3 Y coordinate of the third point of the filled trigon. \param r The red value of the filled trigon to draw. \param g The green value of the filled trigon to draw. \param b The blue value of the filled trigon to draw. \param a The alpha value of the filled trigon to draw. \returns Returns 0 on success, -1 on failure. */ int filledTrigonRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { Sint16 vx[3]; Sint16 vy[3]; vx[0]=x1; vx[1]=x2; vx[2]=x3; vy[0]=y1; vy[1]=y2; vy[2]=y3; return(filledPolygonRGBA(renderer,vx,vy,3,r,g,b,a)); } /* ---- Polygon */ /*! \brief Draw polygon with alpha blending. \param renderer The renderer to draw on. \param vx Vertex array containing X coordinates of the points of the polygon. \param vy Vertex array containing Y coordinates of the points of the polygon. \param n Number of points in the vertex array. Minimum number is 3. \param color The color value of the polygon to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int polygonColor(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n, Uint32 color) { Uint8 *c = (Uint8 *)&color; return polygonRGBA(renderer, vx, vy, n, c[0], c[1], c[2], c[3]); } /*! \brief Draw polygon with the currently set color and blend mode. \param renderer The renderer to draw on. \param vx Vertex array containing X coordinates of the points of the polygon. \param vy Vertex array containing Y coordinates of the points of the polygon. \param n Number of points in the vertex array. Minimum number is 3. \returns Returns 0 on success, -1 on failure. */ int polygon(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n) { /* * Draw */ int result = 0; int i, nn; SDL_Point* points; /* * Vertex array NULL check */ if (vx == NULL) { return (-1); } if (vy == NULL) { return (-1); } /* * Sanity check */ if (n < 3) { return (-1); } /* * Create array of points */ nn = n + 1; points = (SDL_Point*)malloc(sizeof(SDL_Point) * nn); if (points == NULL) { return -1; } for (i=0; ib. */ int _gfxPrimitivesCompareInt(const void *a, const void *b) { return (*(const int *) a) - (*(const int *) b); } /*! \brief Global vertex array to use if optional parameters are not given in filledPolygonMT calls. Note: Used for non-multithreaded (default) operation of filledPolygonMT. */ static int *gfxPrimitivesPolyIntsGlobal = NULL; /*! \brief Flag indicating if global vertex array was already allocated. Note: Used for non-multithreaded (default) operation of filledPolygonMT. */ static int gfxPrimitivesPolyAllocatedGlobal = 0; /*! \brief Draw filled polygon with alpha blending (multi-threaded capable). Note: The last two parameters are optional; but are required for multithreaded operation. \param renderer The renderer to draw on. \param vx Vertex array containing X coordinates of the points of the filled polygon. \param vy Vertex array containing Y coordinates of the points of the filled polygon. \param n Number of points in the vertex array. Minimum number is 3. \param r The red value of the filled polygon to draw. \param g The green value of the filled polygon to draw. \param b The blue value of the filled polygon to draw. \param a The alpha value of the filled polygon to draw. \param polyInts Preallocated, temporary vertex array used for sorting vertices. Required for multithreaded operation; set to NULL otherwise. \param polyAllocated Flag indicating if temporary vertex array was allocated. Required for multithreaded operation; set to NULL otherwise. \returns Returns 0 on success, -1 on failure. */ int filledPolygonRGBAMT(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a, int **polyInts, int *polyAllocated) { int result; int i; int y, xa, xb; int miny, maxy; int x1, y1; int x2, y2; int ind1, ind2; int ints; int *gfxPrimitivesPolyInts = NULL; int *gfxPrimitivesPolyIntsNew = NULL; int gfxPrimitivesPolyAllocated = 0; /* * Vertex array NULL check */ if (vx == NULL) { return (-1); } if (vy == NULL) { return (-1); } /* * Sanity check number of edges */ if (n < 3) { return -1; } /* * Map polygon cache */ if ((polyInts==NULL) || (polyAllocated==NULL)) { /* Use global cache */ gfxPrimitivesPolyInts = gfxPrimitivesPolyIntsGlobal; gfxPrimitivesPolyAllocated = gfxPrimitivesPolyAllocatedGlobal; } else { /* Use local cache */ gfxPrimitivesPolyInts = *polyInts; gfxPrimitivesPolyAllocated = *polyAllocated; } /* * Allocate temp array, only grow array */ if (!gfxPrimitivesPolyAllocated) { gfxPrimitivesPolyInts = (int *) malloc(sizeof(int) * n); gfxPrimitivesPolyAllocated = n; } else { if (gfxPrimitivesPolyAllocated < n) { gfxPrimitivesPolyIntsNew = (int *) realloc(gfxPrimitivesPolyInts, sizeof(int) * n); if (!gfxPrimitivesPolyIntsNew) { if (!gfxPrimitivesPolyInts) { free(gfxPrimitivesPolyInts); gfxPrimitivesPolyInts = NULL; } gfxPrimitivesPolyAllocated = 0; } else { gfxPrimitivesPolyInts = gfxPrimitivesPolyIntsNew; gfxPrimitivesPolyAllocated = n; } } } /* * Check temp array */ if (gfxPrimitivesPolyInts==NULL) { gfxPrimitivesPolyAllocated = 0; } /* * Update cache variables */ if ((polyInts==NULL) || (polyAllocated==NULL)) { gfxPrimitivesPolyIntsGlobal = gfxPrimitivesPolyInts; gfxPrimitivesPolyAllocatedGlobal = gfxPrimitivesPolyAllocated; } else { *polyInts = gfxPrimitivesPolyInts; *polyAllocated = gfxPrimitivesPolyAllocated; } /* * Check temp array again */ if (gfxPrimitivesPolyInts==NULL) { return(-1); } /* * Determine Y maxima */ miny = vy[0]; maxy = vy[0]; for (i = 1; (i < n); i++) { if (vy[i] < miny) { miny = vy[i]; } else if (vy[i] > maxy) { maxy = vy[i]; } } /* * Draw, scanning y */ result = 0; for (y = miny; (y <= maxy); y++) { ints = 0; for (i = 0; (i < n); i++) { if (!i) { ind1 = n - 1; ind2 = 0; } else { ind1 = i - 1; ind2 = i; } y1 = vy[ind1]; y2 = vy[ind2]; if (y1 < y2) { x1 = vx[ind1]; x2 = vx[ind2]; } else if (y1 > y2) { y2 = vy[ind1]; y1 = vy[ind2]; x2 = vx[ind1]; x1 = vx[ind2]; } else { continue; } if ( ((y >= y1) && (y < y2)) || ((y == maxy) && (y > y1) && (y <= y2)) ) { gfxPrimitivesPolyInts[ints++] = ((65536 * (y - y1)) / (y2 - y1)) * (x2 - x1) + (65536 * x1); } } qsort(gfxPrimitivesPolyInts, ints, sizeof(int), _gfxPrimitivesCompareInt); /* * Set color */ result = 0; result |= SDL_SetRenderDrawBlendMode(renderer, (a == 255) ? SDL_BLENDMODE_NONE : SDL_BLENDMODE_BLEND); result |= SDL_SetRenderDrawColor(renderer, r, g, b, a); for (i = 0; (i < ints); i += 2) { xa = gfxPrimitivesPolyInts[i] + 1; xa = (xa >> 16) + ((xa & 32768) >> 15); xb = gfxPrimitivesPolyInts[i+1] - 1; xb = (xb >> 16) + ((xb & 32768) >> 15); result |= hline(renderer, xa, xb, y); } } return (result); } /*! \brief Draw filled polygon with alpha blending. \param renderer The renderer to draw on. \param vx Vertex array containing X coordinates of the points of the filled polygon. \param vy Vertex array containing Y coordinates of the points of the filled polygon. \param n Number of points in the vertex array. Minimum number is 3. \param color The color value of the filled polygon to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int filledPolygonColor(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n, Uint32 color) { Uint8 *c = (Uint8 *)&color; return filledPolygonRGBAMT(renderer, vx, vy, n, c[0], c[1], c[2], c[3], NULL, NULL); } /*! \brief Draw filled polygon with alpha blending. \param renderer The renderer to draw on. \param vx Vertex array containing X coordinates of the points of the filled polygon. \param vy Vertex array containing Y coordinates of the points of the filled polygon. \param n Number of points in the vertex array. Minimum number is 3. \param r The red value of the filled polygon to draw. \param g The green value of the filled polygon to draw. \param b The blue value of the filed polygon to draw. \param a The alpha value of the filled polygon to draw. \returns Returns 0 on success, -1 on failure. */ int filledPolygonRGBA(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { return filledPolygonRGBAMT(renderer, vx, vy, n, r, g, b, a, NULL, NULL); } /* ---- Textured Polygon */ /*! \brief Internal function to draw a textured horizontal line. \param renderer The renderer to draw on. \param x1 X coordinate of the first point (i.e. left) of the line. \param x2 X coordinate of the second point (i.e. right) of the line. \param y Y coordinate of the points of the line. \param texture The texture to retrieve color information from. \param texture_w The width of the texture. \param texture_h The height of the texture. \param texture_dx The X offset for the texture lookup. \param texture_dy The Y offset for the textured lookup. \returns Returns 0 on success, -1 on failure. */ int _HLineTextured(SDL_Renderer *renderer, Sint16 x1, Sint16 x2, Sint16 y, SDL_Texture *texture, int texture_w, int texture_h, int texture_dx, int texture_dy) { Sint16 w; Sint16 xtmp; int result = 0; int texture_x_walker; int texture_y_start; SDL_Rect source_rect,dst_rect; int pixels_written,write_width; /* * Swap x1, x2 if required to ensure x1<=x2 */ if (x1 > x2) { xtmp = x1; x1 = x2; x2 = xtmp; } /* * Calculate width to draw */ w = x2 - x1 + 1; /* * Determine where in the texture we start drawing */ texture_x_walker = (x1 - texture_dx) % texture_w; if (texture_x_walker < 0){ texture_x_walker = texture_w + texture_x_walker ; } texture_y_start = (y + texture_dy) % texture_h; if (texture_y_start < 0){ texture_y_start = texture_h + texture_y_start; } /* setup the source rectangle; we are only drawing one horizontal line */ source_rect.y = texture_y_start; source_rect.x = texture_x_walker; source_rect.h = 1; /* we will draw to the current y */ dst_rect.y = y; dst_rect.h = 1; /* if there are enough pixels left in the current row of the texture */ /* draw it all at once */ if (w <= texture_w -texture_x_walker){ source_rect.w = w; source_rect.x = texture_x_walker; dst_rect.x= x1; dst_rect.w = source_rect.w; result = (SDL_RenderCopy(renderer, texture, &source_rect, &dst_rect) == 0); } else { /* we need to draw multiple times */ /* draw the first segment */ pixels_written = texture_w - texture_x_walker; source_rect.w = pixels_written; source_rect.x = texture_x_walker; dst_rect.x= x1; dst_rect.w = source_rect.w; result |= (SDL_RenderCopy(renderer, texture, &source_rect, &dst_rect) == 0); write_width = texture_w; /* now draw the rest */ /* set the source x to 0 */ source_rect.x = 0; while (pixels_written < w){ if (write_width >= w - pixels_written) { write_width = w - pixels_written; } source_rect.w = write_width; dst_rect.x = x1 + pixels_written; dst_rect.w = source_rect.w; result |= (SDL_RenderCopy(renderer, texture, &source_rect, &dst_rect) == 0); pixels_written += write_width; } } return result; } /*! \brief Draws a polygon filled with the given texture (Multi-Threading Capable). \param renderer The renderer to draw on. \param vx array of x vector components \param vy array of x vector components \param n the amount of vectors in the vx and vy array \param texture the sdl surface to use to fill the polygon \param texture_dx the offset of the texture relative to the screeen. If you move the polygon 10 pixels to the left and want the texture to apear the same you need to increase the texture_dx value \param texture_dy see texture_dx \param polyInts Preallocated temp array storage for vertex sorting (used for multi-threaded operation) \param polyAllocated Flag indicating oif the temp array was allocated (used for multi-threaded operation) \returns Returns 0 on success, -1 on failure. */ int texturedPolygonMT(SDL_Renderer *renderer, const Sint16 * vx, const Sint16 * vy, int n, SDL_Surface * texture, int texture_dx, int texture_dy, int **polyInts, int *polyAllocated) { int result; int i; int y, xa, xb; int minx,maxx,miny, maxy; int x1, y1; int x2, y2; int ind1, ind2; int ints; int *gfxPrimitivesPolyInts = NULL; int *gfxPrimitivesPolyIntsTemp = NULL; int gfxPrimitivesPolyAllocated = 0; SDL_Texture *textureAsTexture = NULL; /* * Sanity check number of edges */ if (n < 3) { return -1; } /* * Map polygon cache */ if ((polyInts==NULL) || (polyAllocated==NULL)) { /* Use global cache */ gfxPrimitivesPolyInts = gfxPrimitivesPolyIntsGlobal; gfxPrimitivesPolyAllocated = gfxPrimitivesPolyAllocatedGlobal; } else { /* Use local cache */ gfxPrimitivesPolyInts = *polyInts; gfxPrimitivesPolyAllocated = *polyAllocated; } /* * Allocate temp array, only grow array */ if (!gfxPrimitivesPolyAllocated) { gfxPrimitivesPolyInts = (int *) malloc(sizeof(int) * n); gfxPrimitivesPolyAllocated = n; } else { if (gfxPrimitivesPolyAllocated < n) { gfxPrimitivesPolyIntsTemp = (int *) realloc(gfxPrimitivesPolyInts, sizeof(int) * n); if (gfxPrimitivesPolyIntsTemp == NULL) { /* Realloc failed - keeps original memory block, but fails this operation */ return(-1); } gfxPrimitivesPolyInts = gfxPrimitivesPolyIntsTemp; gfxPrimitivesPolyAllocated = n; } } /* * Check temp array */ if (gfxPrimitivesPolyInts==NULL) { gfxPrimitivesPolyAllocated = 0; } /* * Update cache variables */ if ((polyInts==NULL) || (polyAllocated==NULL)) { gfxPrimitivesPolyIntsGlobal = gfxPrimitivesPolyInts; gfxPrimitivesPolyAllocatedGlobal = gfxPrimitivesPolyAllocated; } else { *polyInts = gfxPrimitivesPolyInts; *polyAllocated = gfxPrimitivesPolyAllocated; } /* * Check temp array again */ if (gfxPrimitivesPolyInts==NULL) { return(-1); } /* * Determine X,Y minima,maxima */ miny = vy[0]; maxy = vy[0]; minx = vx[0]; maxx = vx[0]; for (i = 1; (i < n); i++) { if (vy[i] < miny) { miny = vy[i]; } else if (vy[i] > maxy) { maxy = vy[i]; } if (vx[i] < minx) { minx = vx[i]; } else if (vx[i] > maxx) { maxx = vx[i]; } } /* Create texture for drawing */ textureAsTexture = SDL_CreateTextureFromSurface(renderer, texture); if (textureAsTexture == NULL) { return -1; } SDL_SetTextureBlendMode(textureAsTexture, SDL_BLENDMODE_BLEND); /* * Draw, scanning y */ result = 0; for (y = miny; (y <= maxy); y++) { ints = 0; for (i = 0; (i < n); i++) { if (!i) { ind1 = n - 1; ind2 = 0; } else { ind1 = i - 1; ind2 = i; } y1 = vy[ind1]; y2 = vy[ind2]; if (y1 < y2) { x1 = vx[ind1]; x2 = vx[ind2]; } else if (y1 > y2) { y2 = vy[ind1]; y1 = vy[ind2]; x2 = vx[ind1]; x1 = vx[ind2]; } else { continue; } if ( ((y >= y1) && (y < y2)) || ((y == maxy) && (y > y1) && (y <= y2)) ) { gfxPrimitivesPolyInts[ints++] = ((65536 * (y - y1)) / (y2 - y1)) * (x2 - x1) + (65536 * x1); } } qsort(gfxPrimitivesPolyInts, ints, sizeof(int), _gfxPrimitivesCompareInt); for (i = 0; (i < ints); i += 2) { xa = gfxPrimitivesPolyInts[i] + 1; xa = (xa >> 16) + ((xa & 32768) >> 15); xb = gfxPrimitivesPolyInts[i+1] - 1; xb = (xb >> 16) + ((xb & 32768) >> 15); result |= _HLineTextured(renderer, xa, xb, y, textureAsTexture, texture->w, texture->h, texture_dx, texture_dy); } } SDL_RenderPresent(renderer); SDL_DestroyTexture(textureAsTexture); return (result); } /*! \brief Draws a polygon filled with the given texture. This standard version is calling multithreaded versions with NULL cache parameters. \param renderer The renderer to draw on. \param vx array of x vector components \param vy array of x vector components \param n the amount of vectors in the vx and vy array \param texture the sdl surface to use to fill the polygon \param texture_dx the offset of the texture relative to the screeen. if you move the polygon 10 pixels to the left and want the texture to apear the same you need to increase the texture_dx value \param texture_dy see texture_dx \returns Returns 0 on success, -1 on failure. */ int texturedPolygon(SDL_Renderer *renderer, const Sint16 * vx, const Sint16 * vy, int n, SDL_Surface *texture, int texture_dx, int texture_dy) { /* * Draw */ return (texturedPolygonMT(renderer, vx, vy, n, texture, texture_dx, texture_dy, NULL, NULL)); } /* ---- Character */ /*! \brief Global cache for NxM pixel font textures created at runtime. */ static SDL_Texture *gfxPrimitivesFont[256]; /*! \brief Pointer to the current font data. Default is a 8x8 pixel internal font. */ static const unsigned char *currentFontdata = gfxPrimitivesFontdata; /*! \brief Width of the current font. Default is 8. */ static Uint32 charWidth = 8; /*! \brief Height of the current font. Default is 8. */ static Uint32 charHeight = 8; /*! \brief Width for rendering. Autocalculated. */ static Uint32 charWidthLocal = 8; /*! \brief Height for rendering. Autocalculated. */ static Uint32 charHeightLocal = 8; /*! \brief Pitch of the current font in bytes. Default is 1. */ static Uint32 charPitch = 1; /*! \brief Characters 90deg clockwise rotations. Default is 0. Max is 3. */ static Uint32 charRotation = 0; /*! \brief Character data size in bytes of the current font. Default is 8. */ static Uint32 charSize = 8; /*! \brief Sets or resets the current global font data. The font data array is organized in follows: [fontdata] = [character 0][character 1]...[character 255] where [character n] = [byte 1 row 1][byte 2 row 1]...[byte {pitch} row 1][byte 1 row 2] ...[byte {pitch} row height] where [byte n] = [bit 0]...[bit 7] where [bit n] = [0 for transparent pixel|1 for colored pixel] \param fontdata Pointer to array of font data. Set to NULL, to reset global font to the default 8x8 font. \param cw Width of character in bytes. Ignored if fontdata==NULL. \param ch Height of character in bytes. Ignored if fontdata==NULL. */ void gfxPrimitivesSetFont(const void *fontdata, Uint32 cw, Uint32 ch) { int i; if ((fontdata) && (cw) && (ch)) { currentFontdata = (unsigned char *)fontdata; charWidth = cw; charHeight = ch; } else { currentFontdata = gfxPrimitivesFontdata; charWidth = 8; charHeight = 8; } charPitch = (charWidth+7)/8; charSize = charPitch * charHeight; /* Maybe flip width/height for rendering */ if ((charRotation==1) || (charRotation==3)) { charWidthLocal = charHeight; charHeightLocal = charWidth; } else { charWidthLocal = charWidth; charHeightLocal = charHeight; } /* Clear character cache */ for (i = 0; i < 256; i++) { if (gfxPrimitivesFont[i]) { SDL_DestroyTexture(gfxPrimitivesFont[i]); gfxPrimitivesFont[i] = NULL; } } } /*! \brief Sets current global font character rotation steps. Default is 0 (no rotation). 1 = 90deg clockwise. 2 = 180deg clockwise. 3 = 270deg clockwise. Changing the rotation, will reset the character cache. \param rotation Number of 90deg clockwise steps to rotate */ void gfxPrimitivesSetFontRotation(Uint32 rotation) { int i; rotation = rotation & 3; if (charRotation != rotation) { /* Store rotation */ charRotation = rotation; /* Maybe flip width/height for rendering */ if ((charRotation==1) || (charRotation==3)) { charWidthLocal = charHeight; charHeightLocal = charWidth; } else { charWidthLocal = charWidth; charHeightLocal = charHeight; } /* Clear character cache */ for (i = 0; i < 256; i++) { if (gfxPrimitivesFont[i]) { SDL_DestroyTexture(gfxPrimitivesFont[i]); gfxPrimitivesFont[i] = NULL; } } } } /*! \brief Draw a character of the currently set font. \param renderer The Renderer to draw on. \param x X (horizontal) coordinate of the upper left corner of the character. \param y Y (vertical) coordinate of the upper left corner of the character. \param c The character to draw. \param r The red value of the character to draw. \param g The green value of the character to draw. \param b The blue value of the character to draw. \param a The alpha value of the character to draw. \returns Returns 0 on success, -1 on failure. */ int characterRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, char c, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { SDL_Rect srect; SDL_Rect drect; int result; Uint32 ix, iy; const unsigned char *charpos; Uint8 *curpos; Uint8 patt, mask; Uint8 *linepos; Uint32 pitch; SDL_Surface *character; SDL_Surface *rotatedCharacter; Uint32 ci; /* * Setup source rectangle */ srect.x = 0; srect.y = 0; srect.w = charWidthLocal; srect.h = charHeightLocal; /* * Setup destination rectangle */ drect.x = x; drect.y = y; drect.w = charWidthLocal; drect.h = charHeightLocal; /* Character index in cache */ ci = (unsigned char) c; /* * Create new charWidth x charHeight bitmap surface if not already present. * Might get rotated later. */ if (gfxPrimitivesFont[ci] == NULL) { /* * Redraw character into surface */ character = SDL_CreateRGBSurface(SDL_SWSURFACE, charWidth, charHeight, 32, 0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF); if (character == NULL) { return (-1); } charpos = currentFontdata + ci * charSize; linepos = (Uint8 *)character->pixels; pitch = character->pitch; /* * Drawing loop */ patt = 0; for (iy = 0; iy < charHeight; iy++) { mask = 0x00; curpos = linepos; for (ix = 0; ix < charWidth; ix++) { if (!(mask >>= 1)) { patt = *charpos++; mask = 0x80; } if (patt & mask) { *(Uint32 *)curpos = 0xffffffff; } else { *(Uint32 *)curpos = 0; } curpos += 4; } linepos += pitch; } /* Maybe rotate and replace cached image */ if (charRotation>0) { rotatedCharacter = rotateSurface90Degrees(character, charRotation); SDL_FreeSurface(character); character = rotatedCharacter; } /* Convert temp surface into texture */ gfxPrimitivesFont[ci] = SDL_CreateTextureFromSurface(renderer, character); SDL_FreeSurface(character); /* * Check pointer */ if (gfxPrimitivesFont[ci] == NULL) { return (-1); } } /* * Set color */ result = 0; result |= SDL_SetTextureColorMod(gfxPrimitivesFont[ci], r, g, b); result |= SDL_SetTextureAlphaMod(gfxPrimitivesFont[ci], a); /* * Draw texture onto destination */ result |= SDL_RenderCopy(renderer, gfxPrimitivesFont[ci], &srect, &drect); return (result); } /*! \brief Draw a character of the currently set font. \param renderer The renderer to draw on. \param x X (horizontal) coordinate of the upper left corner of the character. \param y Y (vertical) coordinate of the upper left corner of the character. \param c The character to draw. \param color The color value of the character to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int characterColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, char c, Uint32 color) { Uint8 *co = (Uint8 *)&color; return characterRGBA(renderer, x, y, c, co[0], co[1], co[2], co[3]); } /*! \brief Draw a string in the currently set font. The spacing between consequtive characters in the string is the fixed number of pixels of the character width of the current global font. \param renderer The renderer to draw on. \param x X (horizontal) coordinate of the upper left corner of the string. \param y Y (vertical) coordinate of the upper left corner of the string. \param s The string to draw. \param color The color value of the string to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int stringColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, const char *s, Uint32 color) { Uint8 *c = (Uint8 *)&color; return stringRGBA(renderer, x, y, s, c[0], c[1], c[2], c[3]); } /*! \brief Draw a string in the currently set font. \param renderer The renderer to draw on. \param x X (horizontal) coordinate of the upper left corner of the string. \param y Y (vertical) coordinate of the upper left corner of the string. \param s The string to draw. \param r The red value of the string to draw. \param g The green value of the string to draw. \param b The blue value of the string to draw. \param a The alpha value of the string to draw. \returns Returns 0 on success, -1 on failure. */ int stringRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, const char *s, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { int result = 0; Sint16 curx = x; Sint16 cury = y; const char *curchar = s; while (*curchar && !result) { result |= characterRGBA(renderer, curx, cury, *curchar, r, g, b, a); switch (charRotation) { case 0: curx += charWidthLocal; break; case 2: curx -= charWidthLocal; break; case 1: cury += charHeightLocal; break; case 3: cury -= charHeightLocal; break; } curchar++; } return (result); } /* ---- Bezier curve */ /*! \brief Internal function to calculate bezier interpolator of data array with ndata values at position 't'. \param data Array of values. \param ndata Size of array. \param t Position for which to calculate interpolated value. t should be between [0, ndata]. \returns Interpolated value at position t, value[0] when t<0, value[n-1] when t>n. */ double _evaluateBezier (double *data, int ndata, double t) { double mu, result; int n,k,kn,nn,nkn; double blend,muk,munk; /* Sanity check bounds */ if (t<0.0) { return(data[0]); } if (t>=(double)ndata) { return(data[ndata-1]); } /* Adjust t to the range 0.0 to 1.0 */ mu=t/(double)ndata; /* Calculate interpolate */ n=ndata-1; result=0.0; muk = 1; munk = pow(1-mu,(double)n); for (k=0;k<=n;k++) { nn = n; kn = k; nkn = n - k; blend = muk * munk; muk *= mu; munk /= (1-mu); while (nn >= 1) { blend *= nn; nn--; if (kn > 1) { blend /= (double)kn; kn--; } if (nkn > 1) { blend /= (double)nkn; nkn--; } } result += data[k] * blend; } return (result); } /*! \brief Draw a bezier curve with alpha blending. \param renderer The renderer to draw on. \param vx Vertex array containing X coordinates of the points of the bezier curve. \param vy Vertex array containing Y coordinates of the points of the bezier curve. \param n Number of points in the vertex array. Minimum number is 3. \param s Number of steps for the interpolation. Minimum number is 2. \param color The color value of the bezier curve to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int bezierColor(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n, int s, Uint32 color) { Uint8 *c = (Uint8 *)&color; return bezierRGBA(renderer, vx, vy, n, s, c[0], c[1], c[2], c[3]); } /*! \brief Draw a bezier curve with alpha blending. \param renderer The renderer to draw on. \param vx Vertex array containing X coordinates of the points of the bezier curve. \param vy Vertex array containing Y coordinates of the points of the bezier curve. \param n Number of points in the vertex array. Minimum number is 3. \param s Number of steps for the interpolation. Minimum number is 2. \param r The red value of the bezier curve to draw. \param g The green value of the bezier curve to draw. \param b The blue value of the bezier curve to draw. \param a The alpha value of the bezier curve to draw. \returns Returns 0 on success, -1 on failure. */ int bezierRGBA(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n, int s, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { int result; int i; double *x, *y, t, stepsize; Sint16 x1, y1, x2, y2; /* * Sanity check */ if (n < 3) { return (-1); } if (s < 2) { return (-1); } /* * Variable setup */ stepsize=(double)1.0/(double)s; /* Transfer vertices into float arrays */ if ((x=(double *)malloc(sizeof(double)*(n+1)))==NULL) { return(-1); } if ((y=(double *)malloc(sizeof(double)*(n+1)))==NULL) { free(x); return(-1); } for (i=0; i0. \param color The color value of the line to draw (0xRRGGBBAA). \returns Returns 0 on success, -1 on failure. */ int thickLineColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 width, Uint32 color) { Uint8 *c = (Uint8 *)&color; return thickLineRGBA(renderer, x1, y1, x2, y2, width, c[0], c[1], c[2], c[3]); } /*! \brief Draw a thick line with alpha blending. \param renderer The renderer to draw on. \param x1 X coordinate of the first point of the line. \param y1 Y coordinate of the first point of the line. \param x2 X coordinate of the second point of the line. \param y2 Y coordinate of the second point of the line. \param width Width of the line in pixels. Must be >0. \param r The red value of the character to draw. \param g The green value of the character to draw. \param b The blue value of the character to draw. \param a The alpha value of the character to draw. \returns Returns 0 on success, -1 on failure. */ int thickLineRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 width, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { int wh; double dx, dy, dx1, dy1, dx2, dy2; double l, wl2, nx, ny, ang, adj; Sint16 px[4], py[4]; if (renderer == NULL) { return -1; } if (width < 1) { return -1; } /* Special case: thick "point" */ if ((x1 == x2) && (y1 == y2)) { wh = width / 2; return boxRGBA(renderer, x1 - wh, y1 - wh, x2 + width, y2 + width, r, g, b, a); } /* Special case: width == 1 */ if (width == 1) { return lineRGBA(renderer, x1, y1, x2, y2, r, g, b, a); } /* Calculate offsets for sides */ dx = (double)(x2 - x1); dy = (double)(y2 - y1); l = SDL_sqrt(dx*dx + dy*dy); ang = SDL_atan2(dx, dy); adj = 0.1 + 0.9 * SDL_fabs(SDL_cos(2.0 * ang)); wl2 = ((double)width - adj)/(2.0 * l); nx = dx * wl2; ny = dy * wl2; /* Build polygon */ dx1 = (double)x1; dy1 = (double)y1; dx2 = (double)x2; dy2 = (double)y2; px[0] = (Sint16)(dx1 + ny); px[1] = (Sint16)(dx1 - ny); px[2] = (Sint16)(dx2 - ny); px[3] = (Sint16)(dx2 + ny); py[0] = (Sint16)(dy1 - nx); py[1] = (Sint16)(dy1 + nx); py[2] = (Sint16)(dy2 + nx); py[3] = (Sint16)(dy2 - nx); /* Draw polygon */ return filledPolygonRGBA(renderer, px, py, 4, r, g, b, a); } SDL2_gfx-1.0.4/SDL2_gfxPrimitives.h100777 0 0 25016 13240111126 12013 0/* SDL2_gfxPrimitives.h: graphics primitives for SDL Copyright (C) 2012-2014 Andreas Schiffler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. Andreas Schiffler -- aschiffler at ferzkopp dot net */ #ifndef _SDL2_gfxPrimitives_h #define _SDL2_gfxPrimitives_h #include #ifndef M_PI #define M_PI 3.1415926535897932384626433832795 #endif #include "SDL.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus extern "C" { #endif /* ----- Versioning */ #define SDL2_GFXPRIMITIVES_MAJOR 1 #define SDL2_GFXPRIMITIVES_MINOR 0 #define SDL2_GFXPRIMITIVES_MICRO 4 /* ---- Function Prototypes */ #ifdef _MSC_VER # if defined(DLL_EXPORT) && !defined(LIBSDL2_GFX_DLL_IMPORT) # define SDL2_GFXPRIMITIVES_SCOPE __declspec(dllexport) # else # ifdef LIBSDL2_GFX_DLL_IMPORT # define SDL2_GFXPRIMITIVES_SCOPE __declspec(dllimport) # endif # endif #endif #ifndef SDL2_GFXPRIMITIVES_SCOPE # define SDL2_GFXPRIMITIVES_SCOPE extern #endif /* Note: all ___Color routines expect the color to be in format 0xRRGGBBAA */ /* Pixel */ SDL2_GFXPRIMITIVES_SCOPE int pixelColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Uint32 color); SDL2_GFXPRIMITIVES_SCOPE int pixelRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Horizontal line */ SDL2_GFXPRIMITIVES_SCOPE int hlineColor(SDL_Renderer * renderer, Sint16 x1, Sint16 x2, Sint16 y, Uint32 color); SDL2_GFXPRIMITIVES_SCOPE int hlineRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 x2, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Vertical line */ SDL2_GFXPRIMITIVES_SCOPE int vlineColor(SDL_Renderer * renderer, Sint16 x, Sint16 y1, Sint16 y2, Uint32 color); SDL2_GFXPRIMITIVES_SCOPE int vlineRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y1, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Rectangle */ SDL2_GFXPRIMITIVES_SCOPE int rectangleColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color); SDL2_GFXPRIMITIVES_SCOPE int rectangleRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Rounded-Corner Rectangle */ SDL2_GFXPRIMITIVES_SCOPE int roundedRectangleColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint32 color); SDL2_GFXPRIMITIVES_SCOPE int roundedRectangleRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Filled rectangle (Box) */ SDL2_GFXPRIMITIVES_SCOPE int boxColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color); SDL2_GFXPRIMITIVES_SCOPE int boxRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Rounded-Corner Filled rectangle (Box) */ SDL2_GFXPRIMITIVES_SCOPE int roundedBoxColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint32 color); SDL2_GFXPRIMITIVES_SCOPE int roundedBoxRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Line */ SDL2_GFXPRIMITIVES_SCOPE int lineColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color); SDL2_GFXPRIMITIVES_SCOPE int lineRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* AA Line */ SDL2_GFXPRIMITIVES_SCOPE int aalineColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color); SDL2_GFXPRIMITIVES_SCOPE int aalineRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Thick Line */ SDL2_GFXPRIMITIVES_SCOPE int thickLineColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 width, Uint32 color); SDL2_GFXPRIMITIVES_SCOPE int thickLineRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 width, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Circle */ SDL2_GFXPRIMITIVES_SCOPE int circleColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Uint32 color); SDL2_GFXPRIMITIVES_SCOPE int circleRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Arc */ SDL2_GFXPRIMITIVES_SCOPE int arcColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color); SDL2_GFXPRIMITIVES_SCOPE int arcRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* AA Circle */ SDL2_GFXPRIMITIVES_SCOPE int aacircleColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Uint32 color); SDL2_GFXPRIMITIVES_SCOPE int aacircleRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Filled Circle */ SDL2_GFXPRIMITIVES_SCOPE int filledCircleColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 r, Uint32 color); SDL2_GFXPRIMITIVES_SCOPE int filledCircleRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Ellipse */ SDL2_GFXPRIMITIVES_SCOPE int ellipseColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color); SDL2_GFXPRIMITIVES_SCOPE int ellipseRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* AA Ellipse */ SDL2_GFXPRIMITIVES_SCOPE int aaellipseColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color); SDL2_GFXPRIMITIVES_SCOPE int aaellipseRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Filled Ellipse */ SDL2_GFXPRIMITIVES_SCOPE int filledEllipseColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color); SDL2_GFXPRIMITIVES_SCOPE int filledEllipseRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Pie */ SDL2_GFXPRIMITIVES_SCOPE int pieColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color); SDL2_GFXPRIMITIVES_SCOPE int pieRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Filled Pie */ SDL2_GFXPRIMITIVES_SCOPE int filledPieColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color); SDL2_GFXPRIMITIVES_SCOPE int filledPieRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Trigon */ SDL2_GFXPRIMITIVES_SCOPE int trigonColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color); SDL2_GFXPRIMITIVES_SCOPE int trigonRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* AA-Trigon */ SDL2_GFXPRIMITIVES_SCOPE int aatrigonColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color); SDL2_GFXPRIMITIVES_SCOPE int aatrigonRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Filled Trigon */ SDL2_GFXPRIMITIVES_SCOPE int filledTrigonColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color); SDL2_GFXPRIMITIVES_SCOPE int filledTrigonRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Polygon */ SDL2_GFXPRIMITIVES_SCOPE int polygonColor(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n, Uint32 color); SDL2_GFXPRIMITIVES_SCOPE int polygonRGBA(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* AA-Polygon */ SDL2_GFXPRIMITIVES_SCOPE int aapolygonColor(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n, Uint32 color); SDL2_GFXPRIMITIVES_SCOPE int aapolygonRGBA(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Filled Polygon */ SDL2_GFXPRIMITIVES_SCOPE int filledPolygonColor(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n, Uint32 color); SDL2_GFXPRIMITIVES_SCOPE int filledPolygonRGBA(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Textured Polygon */ SDL2_GFXPRIMITIVES_SCOPE int texturedPolygon(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n, SDL_Surface * texture,int texture_dx,int texture_dy); /* Bezier */ SDL2_GFXPRIMITIVES_SCOPE int bezierColor(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n, int s, Uint32 color); SDL2_GFXPRIMITIVES_SCOPE int bezierRGBA(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n, int s, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Characters/Strings */ SDL2_GFXPRIMITIVES_SCOPE void gfxPrimitivesSetFont(const void *fontdata, Uint32 cw, Uint32 ch); SDL2_GFXPRIMITIVES_SCOPE void gfxPrimitivesSetFontRotation(Uint32 rotation); SDL2_GFXPRIMITIVES_SCOPE int characterColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, char c, Uint32 color); SDL2_GFXPRIMITIVES_SCOPE int characterRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, char c, Uint8 r, Uint8 g, Uint8 b, Uint8 a); SDL2_GFXPRIMITIVES_SCOPE int stringColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, const char *s, Uint32 color); SDL2_GFXPRIMITIVES_SCOPE int stringRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, const char *s, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /* Ends C function definitions when using C++ */ #ifdef __cplusplus } #endif #endif /* _SDL2_gfxPrimitives_h */ SDL2_gfx-1.0.4/SDL2_gfxPrimitives_font.h100777 0 0 156731 12360250626 13105 0/* SDL2_gfxPrimitives_font.h: 8x8 font definition Copyright (C) 2012-2014 Andreas Schiffler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. Andreas Schiffler -- aschiffler at ferzkopp dot net */ #define GFX_FONTDATAMAX (8*256) static unsigned char gfxPrimitivesFontdata[GFX_FONTDATAMAX] = { /* * 0 0x00 '^@' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 1 0x01 '^A' */ 0x7e, /* 01111110 */ 0x81, /* 10000001 */ 0xa5, /* 10100101 */ 0x81, /* 10000001 */ 0xbd, /* 10111101 */ 0x99, /* 10011001 */ 0x81, /* 10000001 */ 0x7e, /* 01111110 */ /* * 2 0x02 '^B' */ 0x7e, /* 01111110 */ 0xff, /* 11111111 */ 0xdb, /* 11011011 */ 0xff, /* 11111111 */ 0xc3, /* 11000011 */ 0xe7, /* 11100111 */ 0xff, /* 11111111 */ 0x7e, /* 01111110 */ /* * 3 0x03 '^C' */ 0x6c, /* 01101100 */ 0xfe, /* 11111110 */ 0xfe, /* 11111110 */ 0xfe, /* 11111110 */ 0x7c, /* 01111100 */ 0x38, /* 00111000 */ 0x10, /* 00010000 */ 0x00, /* 00000000 */ /* * 4 0x04 '^D' */ 0x10, /* 00010000 */ 0x38, /* 00111000 */ 0x7c, /* 01111100 */ 0xfe, /* 11111110 */ 0x7c, /* 01111100 */ 0x38, /* 00111000 */ 0x10, /* 00010000 */ 0x00, /* 00000000 */ /* * 5 0x05 '^E' */ 0x38, /* 00111000 */ 0x7c, /* 01111100 */ 0x38, /* 00111000 */ 0xfe, /* 11111110 */ 0xfe, /* 11111110 */ 0xd6, /* 11010110 */ 0x10, /* 00010000 */ 0x38, /* 00111000 */ /* * 6 0x06 '^F' */ 0x10, /* 00010000 */ 0x38, /* 00111000 */ 0x7c, /* 01111100 */ 0xfe, /* 11111110 */ 0xfe, /* 11111110 */ 0x7c, /* 01111100 */ 0x10, /* 00010000 */ 0x38, /* 00111000 */ /* * 7 0x07 '^G' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 8 0x08 '^H' */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xe7, /* 11100111 */ 0xc3, /* 11000011 */ 0xc3, /* 11000011 */ 0xe7, /* 11100111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ /* * 9 0x09 '^I' */ 0x00, /* 00000000 */ 0x3c, /* 00111100 */ 0x66, /* 01100110 */ 0x42, /* 01000010 */ 0x42, /* 01000010 */ 0x66, /* 01100110 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 10 0x0a '^J' */ 0xff, /* 11111111 */ 0xc3, /* 11000011 */ 0x99, /* 10011001 */ 0xbd, /* 10111101 */ 0xbd, /* 10111101 */ 0x99, /* 10011001 */ 0xc3, /* 11000011 */ 0xff, /* 11111111 */ /* * 11 0x0b '^K' */ 0x0f, /* 00001111 */ 0x07, /* 00000111 */ 0x0f, /* 00001111 */ 0x7d, /* 01111101 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0x78, /* 01111000 */ /* * 12 0x0c '^L' */ 0x3c, /* 00111100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ 0x7e, /* 01111110 */ 0x18, /* 00011000 */ /* * 13 0x0d '^M' */ 0x3f, /* 00111111 */ 0x33, /* 00110011 */ 0x3f, /* 00111111 */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0x70, /* 01110000 */ 0xf0, /* 11110000 */ 0xe0, /* 11100000 */ /* * 14 0x0e '^N' */ 0x7f, /* 01111111 */ 0x63, /* 01100011 */ 0x7f, /* 01111111 */ 0x63, /* 01100011 */ 0x63, /* 01100011 */ 0x67, /* 01100111 */ 0xe6, /* 11100110 */ 0xc0, /* 11000000 */ /* * 15 0x0f '^O' */ 0x18, /* 00011000 */ 0xdb, /* 11011011 */ 0x3c, /* 00111100 */ 0xe7, /* 11100111 */ 0xe7, /* 11100111 */ 0x3c, /* 00111100 */ 0xdb, /* 11011011 */ 0x18, /* 00011000 */ /* * 16 0x10 '^P' */ 0x80, /* 10000000 */ 0xe0, /* 11100000 */ 0xf8, /* 11111000 */ 0xfe, /* 11111110 */ 0xf8, /* 11111000 */ 0xe0, /* 11100000 */ 0x80, /* 10000000 */ 0x00, /* 00000000 */ /* * 17 0x11 '^Q' */ 0x02, /* 00000010 */ 0x0e, /* 00001110 */ 0x3e, /* 00111110 */ 0xfe, /* 11111110 */ 0x3e, /* 00111110 */ 0x0e, /* 00001110 */ 0x02, /* 00000010 */ 0x00, /* 00000000 */ /* * 18 0x12 '^R' */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x7e, /* 01111110 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x7e, /* 01111110 */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ /* * 19 0x13 '^S' */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x00, /* 00000000 */ 0x66, /* 01100110 */ 0x00, /* 00000000 */ /* * 20 0x14 '^T' */ 0x7f, /* 01111111 */ 0xdb, /* 11011011 */ 0xdb, /* 11011011 */ 0x7b, /* 01111011 */ 0x1b, /* 00011011 */ 0x1b, /* 00011011 */ 0x1b, /* 00011011 */ 0x00, /* 00000000 */ /* * 21 0x15 '^U' */ 0x3e, /* 00111110 */ 0x61, /* 01100001 */ 0x3c, /* 00111100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x3c, /* 00111100 */ 0x86, /* 10000110 */ 0x7c, /* 01111100 */ /* * 22 0x16 '^V' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0x7e, /* 01111110 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ /* * 23 0x17 '^W' */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x7e, /* 01111110 */ 0x18, /* 00011000 */ 0x7e, /* 01111110 */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ 0xff, /* 11111111 */ /* * 24 0x18 '^X' */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x7e, /* 01111110 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ /* * 25 0x19 '^Y' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x7e, /* 01111110 */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ /* * 26 0x1a '^Z' */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x0c, /* 00001100 */ 0xfe, /* 11111110 */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 27 0x1b '^[' */ 0x00, /* 00000000 */ 0x30, /* 00110000 */ 0x60, /* 01100000 */ 0xfe, /* 11111110 */ 0x60, /* 01100000 */ 0x30, /* 00110000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 28 0x1c '^\' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 29 0x1d '^]' */ 0x00, /* 00000000 */ 0x24, /* 00100100 */ 0x66, /* 01100110 */ 0xff, /* 11111111 */ 0x66, /* 01100110 */ 0x24, /* 00100100 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 30 0x1e '^^' */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x7e, /* 01111110 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 31 0x1f '^_' */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0x7e, /* 01111110 */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 32 0x20 ' ' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 33 0x21 '!' */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ /* * 34 0x22 '"' */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x24, /* 00100100 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 35 0x23 '#' */ 0x6c, /* 01101100 */ 0x6c, /* 01101100 */ 0xfe, /* 11111110 */ 0x6c, /* 01101100 */ 0xfe, /* 11111110 */ 0x6c, /* 01101100 */ 0x6c, /* 01101100 */ 0x00, /* 00000000 */ /* * 36 0x24 '$' */ 0x18, /* 00011000 */ 0x3e, /* 00111110 */ 0x60, /* 01100000 */ 0x3c, /* 00111100 */ 0x06, /* 00000110 */ 0x7c, /* 01111100 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ /* * 37 0x25 '%' */ 0x00, /* 00000000 */ 0xc6, /* 11000110 */ 0xcc, /* 11001100 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x66, /* 01100110 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ /* * 38 0x26 '&' */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0x38, /* 00111000 */ 0x76, /* 01110110 */ 0xdc, /* 11011100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 39 0x27 ''' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 40 0x28 '(' */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x0c, /* 00001100 */ 0x00, /* 00000000 */ /* * 41 0x29 ')' */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x0c, /* 00001100 */ 0x0c, /* 00001100 */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x00, /* 00000000 */ /* * 42 0x2a '*' */ 0x00, /* 00000000 */ 0x66, /* 01100110 */ 0x3c, /* 00111100 */ 0xff, /* 11111111 */ 0x3c, /* 00111100 */ 0x66, /* 01100110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 43 0x2b '+' */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x7e, /* 01111110 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 44 0x2c ',' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ /* * 45 0x2d '-' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 46 0x2e '.' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ /* * 47 0x2f '/' */ 0x06, /* 00000110 */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x60, /* 01100000 */ 0xc0, /* 11000000 */ 0x80, /* 10000000 */ 0x00, /* 00000000 */ /* * 48 0x30 '0' */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0xc6, /* 11000110 */ 0xd6, /* 11010110 */ 0xc6, /* 11000110 */ 0x6c, /* 01101100 */ 0x38, /* 00111000 */ 0x00, /* 00000000 */ /* * 49 0x31 '1' */ 0x18, /* 00011000 */ 0x38, /* 00111000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ /* * 50 0x32 '2' */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0x06, /* 00000110 */ 0x1c, /* 00011100 */ 0x30, /* 00110000 */ 0x66, /* 01100110 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ /* * 51 0x33 '3' */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0x06, /* 00000110 */ 0x3c, /* 00111100 */ 0x06, /* 00000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 52 0x34 '4' */ 0x1c, /* 00011100 */ 0x3c, /* 00111100 */ 0x6c, /* 01101100 */ 0xcc, /* 11001100 */ 0xfe, /* 11111110 */ 0x0c, /* 00001100 */ 0x1e, /* 00011110 */ 0x00, /* 00000000 */ /* * 53 0x35 '5' */ 0xfe, /* 11111110 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0xfc, /* 11111100 */ 0x06, /* 00000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 54 0x36 '6' */ 0x38, /* 00111000 */ 0x60, /* 01100000 */ 0xc0, /* 11000000 */ 0xfc, /* 11111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 55 0x37 '7' */ 0xfe, /* 11111110 */ 0xc6, /* 11000110 */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0x00, /* 00000000 */ /* * 56 0x38 '8' */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 57 0x39 '9' */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7e, /* 01111110 */ 0x06, /* 00000110 */ 0x0c, /* 00001100 */ 0x78, /* 01111000 */ 0x00, /* 00000000 */ /* * 58 0x3a ':' */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ /* * 59 0x3b ';' */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ /* * 60 0x3c '<' */ 0x06, /* 00000110 */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x0c, /* 00001100 */ 0x06, /* 00000110 */ 0x00, /* 00000000 */ /* * 61 0x3d '=' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 62 0x3e '>' */ 0x60, /* 01100000 */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x60, /* 01100000 */ 0x00, /* 00000000 */ /* * 63 0x3f '?' */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ /* * 64 0x40 '@' */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xde, /* 11011110 */ 0xde, /* 11011110 */ 0xde, /* 11011110 */ 0xc0, /* 11000000 */ 0x78, /* 01111000 */ 0x00, /* 00000000 */ /* * 65 0x41 'A' */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ /* * 66 0x42 'B' */ 0xfc, /* 11111100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x7c, /* 01111100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0xfc, /* 11111100 */ 0x00, /* 00000000 */ /* * 67 0x43 'C' */ 0x3c, /* 00111100 */ 0x66, /* 01100110 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0x66, /* 01100110 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 68 0x44 'D' */ 0xf8, /* 11111000 */ 0x6c, /* 01101100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x6c, /* 01101100 */ 0xf8, /* 11111000 */ 0x00, /* 00000000 */ /* * 69 0x45 'E' */ 0xfe, /* 11111110 */ 0x62, /* 01100010 */ 0x68, /* 01101000 */ 0x78, /* 01111000 */ 0x68, /* 01101000 */ 0x62, /* 01100010 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ /* * 70 0x46 'F' */ 0xfe, /* 11111110 */ 0x62, /* 01100010 */ 0x68, /* 01101000 */ 0x78, /* 01111000 */ 0x68, /* 01101000 */ 0x60, /* 01100000 */ 0xf0, /* 11110000 */ 0x00, /* 00000000 */ /* * 71 0x47 'G' */ 0x3c, /* 00111100 */ 0x66, /* 01100110 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0xce, /* 11001110 */ 0x66, /* 01100110 */ 0x3a, /* 00111010 */ 0x00, /* 00000000 */ /* * 72 0x48 'H' */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ /* * 73 0x49 'I' */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 74 0x4a 'J' */ 0x1e, /* 00011110 */ 0x0c, /* 00001100 */ 0x0c, /* 00001100 */ 0x0c, /* 00001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0x78, /* 01111000 */ 0x00, /* 00000000 */ /* * 75 0x4b 'K' */ 0xe6, /* 11100110 */ 0x66, /* 01100110 */ 0x6c, /* 01101100 */ 0x78, /* 01111000 */ 0x6c, /* 01101100 */ 0x66, /* 01100110 */ 0xe6, /* 11100110 */ 0x00, /* 00000000 */ /* * 76 0x4c 'L' */ 0xf0, /* 11110000 */ 0x60, /* 01100000 */ 0x60, /* 01100000 */ 0x60, /* 01100000 */ 0x62, /* 01100010 */ 0x66, /* 01100110 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ /* * 77 0x4d 'M' */ 0xc6, /* 11000110 */ 0xee, /* 11101110 */ 0xfe, /* 11111110 */ 0xfe, /* 11111110 */ 0xd6, /* 11010110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ /* * 78 0x4e 'N' */ 0xc6, /* 11000110 */ 0xe6, /* 11100110 */ 0xf6, /* 11110110 */ 0xde, /* 11011110 */ 0xce, /* 11001110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ /* * 79 0x4f 'O' */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 80 0x50 'P' */ 0xfc, /* 11111100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x7c, /* 01111100 */ 0x60, /* 01100000 */ 0x60, /* 01100000 */ 0xf0, /* 11110000 */ 0x00, /* 00000000 */ /* * 81 0x51 'Q' */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xce, /* 11001110 */ 0x7c, /* 01111100 */ 0x0e, /* 00001110 */ /* * 82 0x52 'R' */ 0xfc, /* 11111100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x7c, /* 01111100 */ 0x6c, /* 01101100 */ 0x66, /* 01100110 */ 0xe6, /* 11100110 */ 0x00, /* 00000000 */ /* * 83 0x53 'S' */ 0x3c, /* 00111100 */ 0x66, /* 01100110 */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x0c, /* 00001100 */ 0x66, /* 01100110 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 84 0x54 'T' */ 0x7e, /* 01111110 */ 0x7e, /* 01111110 */ 0x5a, /* 01011010 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 85 0x55 'U' */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 86 0x56 'V' */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x6c, /* 01101100 */ 0x38, /* 00111000 */ 0x00, /* 00000000 */ /* * 87 0x57 'W' */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xd6, /* 11010110 */ 0xd6, /* 11010110 */ 0xfe, /* 11111110 */ 0x6c, /* 01101100 */ 0x00, /* 00000000 */ /* * 88 0x58 'X' */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x6c, /* 01101100 */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ /* * 89 0x59 'Y' */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 90 0x5a 'Z' */ 0xfe, /* 11111110 */ 0xc6, /* 11000110 */ 0x8c, /* 10001100 */ 0x18, /* 00011000 */ 0x32, /* 00110010 */ 0x66, /* 01100110 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ /* * 91 0x5b '[' */ 0x3c, /* 00111100 */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 92 0x5c '\' */ 0xc0, /* 11000000 */ 0x60, /* 01100000 */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x0c, /* 00001100 */ 0x06, /* 00000110 */ 0x02, /* 00000010 */ 0x00, /* 00000000 */ /* * 93 0x5d ']' */ 0x3c, /* 00111100 */ 0x0c, /* 00001100 */ 0x0c, /* 00001100 */ 0x0c, /* 00001100 */ 0x0c, /* 00001100 */ 0x0c, /* 00001100 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 94 0x5e '^' */ 0x10, /* 00010000 */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 95 0x5f '_' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ /* * 96 0x60 '`' */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x0c, /* 00001100 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 97 0x61 'a' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x78, /* 01111000 */ 0x0c, /* 00001100 */ 0x7c, /* 01111100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 98 0x62 'b' */ 0xe0, /* 11100000 */ 0x60, /* 01100000 */ 0x7c, /* 01111100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0xdc, /* 11011100 */ 0x00, /* 00000000 */ /* * 99 0x63 'c' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc0, /* 11000000 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 100 0x64 'd' */ 0x1c, /* 00011100 */ 0x0c, /* 00001100 */ 0x7c, /* 01111100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 101 0x65 'e' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0xc0, /* 11000000 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 102 0x66 'f' */ 0x3c, /* 00111100 */ 0x66, /* 01100110 */ 0x60, /* 01100000 */ 0xf8, /* 11111000 */ 0x60, /* 01100000 */ 0x60, /* 01100000 */ 0xf0, /* 11110000 */ 0x00, /* 00000000 */ /* * 103 0x67 'g' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x76, /* 01110110 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0x7c, /* 01111100 */ 0x0c, /* 00001100 */ 0xf8, /* 11111000 */ /* * 104 0x68 'h' */ 0xe0, /* 11100000 */ 0x60, /* 01100000 */ 0x6c, /* 01101100 */ 0x76, /* 01110110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0xe6, /* 11100110 */ 0x00, /* 00000000 */ /* * 105 0x69 'i' */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x38, /* 00111000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 106 0x6a 'j' */ 0x06, /* 00000110 */ 0x00, /* 00000000 */ 0x06, /* 00000110 */ 0x06, /* 00000110 */ 0x06, /* 00000110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x3c, /* 00111100 */ /* * 107 0x6b 'k' */ 0xe0, /* 11100000 */ 0x60, /* 01100000 */ 0x66, /* 01100110 */ 0x6c, /* 01101100 */ 0x78, /* 01111000 */ 0x6c, /* 01101100 */ 0xe6, /* 11100110 */ 0x00, /* 00000000 */ /* * 108 0x6c 'l' */ 0x38, /* 00111000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 109 0x6d 'm' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xec, /* 11101100 */ 0xfe, /* 11111110 */ 0xd6, /* 11010110 */ 0xd6, /* 11010110 */ 0xd6, /* 11010110 */ 0x00, /* 00000000 */ /* * 110 0x6e 'n' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xdc, /* 11011100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x00, /* 00000000 */ /* * 111 0x6f 'o' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 112 0x70 'p' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xdc, /* 11011100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x7c, /* 01111100 */ 0x60, /* 01100000 */ 0xf0, /* 11110000 */ /* * 113 0x71 'q' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x76, /* 01110110 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0x7c, /* 01111100 */ 0x0c, /* 00001100 */ 0x1e, /* 00011110 */ /* * 114 0x72 'r' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xdc, /* 11011100 */ 0x76, /* 01110110 */ 0x60, /* 01100000 */ 0x60, /* 01100000 */ 0xf0, /* 11110000 */ 0x00, /* 00000000 */ /* * 115 0x73 's' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0xc0, /* 11000000 */ 0x7c, /* 01111100 */ 0x06, /* 00000110 */ 0xfc, /* 11111100 */ 0x00, /* 00000000 */ /* * 116 0x74 't' */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0xfc, /* 11111100 */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0x36, /* 00110110 */ 0x1c, /* 00011100 */ 0x00, /* 00000000 */ /* * 117 0x75 'u' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 118 0x76 'v' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x6c, /* 01101100 */ 0x38, /* 00111000 */ 0x00, /* 00000000 */ /* * 119 0x77 'w' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xc6, /* 11000110 */ 0xd6, /* 11010110 */ 0xd6, /* 11010110 */ 0xfe, /* 11111110 */ 0x6c, /* 01101100 */ 0x00, /* 00000000 */ /* * 120 0x78 'x' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xc6, /* 11000110 */ 0x6c, /* 01101100 */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ /* * 121 0x79 'y' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7e, /* 01111110 */ 0x06, /* 00000110 */ 0xfc, /* 11111100 */ /* * 122 0x7a 'z' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0x4c, /* 01001100 */ 0x18, /* 00011000 */ 0x32, /* 00110010 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ /* * 123 0x7b '{' */ 0x0e, /* 00001110 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x70, /* 01110000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x0e, /* 00001110 */ 0x00, /* 00000000 */ /* * 124 0x7c '|' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ /* * 125 0x7d '}' */ 0x70, /* 01110000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x0e, /* 00001110 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x70, /* 01110000 */ 0x00, /* 00000000 */ /* * 126 0x7e '~' */ 0x76, /* 01110110 */ 0xdc, /* 11011100 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 127 0x7f '' */ 0x00, /* 00000000 */ 0x10, /* 00010000 */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ /* * 128 0x80 '' */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x0c, /* 00001100 */ 0x78, /* 01111000 */ /* * 129 0x81 '' */ 0xcc, /* 11001100 */ 0x00, /* 00000000 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 130 0x82 '' */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0xc0, /* 11000000 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 131 0x83 '' */ 0x7c, /* 01111100 */ 0x82, /* 10000010 */ 0x78, /* 01111000 */ 0x0c, /* 00001100 */ 0x7c, /* 01111100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 132 0x84 '' */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ 0x78, /* 01111000 */ 0x0c, /* 00001100 */ 0x7c, /* 01111100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 133 0x85 '' */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x78, /* 01111000 */ 0x0c, /* 00001100 */ 0x7c, /* 01111100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 134 0x86 '' */ 0x30, /* 00110000 */ 0x30, /* 00110000 */ 0x78, /* 01111000 */ 0x0c, /* 00001100 */ 0x7c, /* 01111100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 135 0x87 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0x7e, /* 01111110 */ 0x0c, /* 00001100 */ 0x38, /* 00111000 */ /* * 136 0x88 '' */ 0x7c, /* 01111100 */ 0x82, /* 10000010 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0xc0, /* 11000000 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 137 0x89 '' */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0xc0, /* 11000000 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 138 0x8a '' */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0xc0, /* 11000000 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 139 0x8b '' */ 0x66, /* 01100110 */ 0x00, /* 00000000 */ 0x38, /* 00111000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 140 0x8c '' */ 0x7c, /* 01111100 */ 0x82, /* 10000010 */ 0x38, /* 00111000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 141 0x8d '' */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x38, /* 00111000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 142 0x8e '' */ 0xc6, /* 11000110 */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ /* * 143 0x8f '' */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ /* * 144 0x90 '' */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0xfe, /* 11111110 */ 0xc0, /* 11000000 */ 0xf8, /* 11111000 */ 0xc0, /* 11000000 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ /* * 145 0x91 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0x18, /* 00011000 */ 0x7e, /* 01111110 */ 0xd8, /* 11011000 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ /* * 146 0x92 '' */ 0x3e, /* 00111110 */ 0x6c, /* 01101100 */ 0xcc, /* 11001100 */ 0xfe, /* 11111110 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xce, /* 11001110 */ 0x00, /* 00000000 */ /* * 147 0x93 '' */ 0x7c, /* 01111100 */ 0x82, /* 10000010 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 148 0x94 '' */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 149 0x95 '' */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 150 0x96 '' */ 0x78, /* 01111000 */ 0x84, /* 10000100 */ 0x00, /* 00000000 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 151 0x97 '' */ 0x60, /* 01100000 */ 0x30, /* 00110000 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 152 0x98 '' */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7e, /* 01111110 */ 0x06, /* 00000110 */ 0xfc, /* 11111100 */ /* * 153 0x99 '' */ 0xc6, /* 11000110 */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x6c, /* 01101100 */ 0x38, /* 00111000 */ 0x00, /* 00000000 */ /* * 154 0x9a '' */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 155 0x9b '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x7e, /* 01111110 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0x7e, /* 01111110 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 156 0x9c '' */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0x64, /* 01100100 */ 0xf0, /* 11110000 */ 0x60, /* 01100000 */ 0x66, /* 01100110 */ 0xfc, /* 11111100 */ 0x00, /* 00000000 */ /* * 157 0x9d '' */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x3c, /* 00111100 */ 0x7e, /* 01111110 */ 0x18, /* 00011000 */ 0x7e, /* 01111110 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 158 0x9e '' */ 0xf8, /* 11111000 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xfa, /* 11111010 */ 0xc6, /* 11000110 */ 0xcf, /* 11001111 */ 0xc6, /* 11000110 */ 0xc7, /* 11000111 */ /* * 159 0x9f '' */ 0x0e, /* 00001110 */ 0x1b, /* 00011011 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ 0xd8, /* 11011000 */ 0x70, /* 01110000 */ 0x00, /* 00000000 */ /* * 160 0xa0 '' */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x78, /* 01111000 */ 0x0c, /* 00001100 */ 0x7c, /* 01111100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 161 0xa1 '' */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x38, /* 00111000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 162 0xa2 '' */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ /* * 163 0xa3 '' */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 164 0xa4 '' */ 0x76, /* 01110110 */ 0xdc, /* 11011100 */ 0x00, /* 00000000 */ 0xdc, /* 11011100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x00, /* 00000000 */ /* * 165 0xa5 '' */ 0x76, /* 01110110 */ 0xdc, /* 11011100 */ 0x00, /* 00000000 */ 0xe6, /* 11100110 */ 0xf6, /* 11110110 */ 0xde, /* 11011110 */ 0xce, /* 11001110 */ 0x00, /* 00000000 */ /* * 166 0xa6 '' */ 0x3c, /* 00111100 */ 0x6c, /* 01101100 */ 0x6c, /* 01101100 */ 0x3e, /* 00111110 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 167 0xa7 '' */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0x6c, /* 01101100 */ 0x38, /* 00111000 */ 0x00, /* 00000000 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 168 0xa8 '' */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x63, /* 01100011 */ 0x3e, /* 00111110 */ 0x00, /* 00000000 */ /* * 169 0xa9 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xfe, /* 11111110 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 170 0xaa '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xfe, /* 11111110 */ 0x06, /* 00000110 */ 0x06, /* 00000110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 171 0xab '' */ 0x63, /* 01100011 */ 0xe6, /* 11100110 */ 0x6c, /* 01101100 */ 0x7e, /* 01111110 */ 0x33, /* 00110011 */ 0x66, /* 01100110 */ 0xcc, /* 11001100 */ 0x0f, /* 00001111 */ /* * 172 0xac '' */ 0x63, /* 01100011 */ 0xe6, /* 11100110 */ 0x6c, /* 01101100 */ 0x7a, /* 01111010 */ 0x36, /* 00110110 */ 0x6a, /* 01101010 */ 0xdf, /* 11011111 */ 0x06, /* 00000110 */ /* * 173 0xad '' */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ /* * 174 0xae '' */ 0x00, /* 00000000 */ 0x33, /* 00110011 */ 0x66, /* 01100110 */ 0xcc, /* 11001100 */ 0x66, /* 01100110 */ 0x33, /* 00110011 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 175 0xaf '' */ 0x00, /* 00000000 */ 0xcc, /* 11001100 */ 0x66, /* 01100110 */ 0x33, /* 00110011 */ 0x66, /* 01100110 */ 0xcc, /* 11001100 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 176 0xb0 '' */ 0x22, /* 00100010 */ 0x88, /* 10001000 */ 0x22, /* 00100010 */ 0x88, /* 10001000 */ 0x22, /* 00100010 */ 0x88, /* 10001000 */ 0x22, /* 00100010 */ 0x88, /* 10001000 */ /* * 177 0xb1 '' */ 0x55, /* 01010101 */ 0xaa, /* 10101010 */ 0x55, /* 01010101 */ 0xaa, /* 10101010 */ 0x55, /* 01010101 */ 0xaa, /* 10101010 */ 0x55, /* 01010101 */ 0xaa, /* 10101010 */ /* * 178 0xb2 '' */ 0x77, /* 01110111 */ 0xdd, /* 11011101 */ 0x77, /* 01110111 */ 0xdd, /* 11011101 */ 0x77, /* 01110111 */ 0xdd, /* 11011101 */ 0x77, /* 01110111 */ 0xdd, /* 11011101 */ /* * 179 0xb3 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 180 0xb4 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0xf8, /* 11111000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 181 0xb5 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0xf8, /* 11111000 */ 0x18, /* 00011000 */ 0xf8, /* 11111000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 182 0xb6 '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0xf6, /* 11110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 183 0xb7 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xfe, /* 11111110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 184 0xb8 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xf8, /* 11111000 */ 0x18, /* 00011000 */ 0xf8, /* 11111000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 185 0xb9 '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0xf6, /* 11110110 */ 0x06, /* 00000110 */ 0xf6, /* 11110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 186 0xba '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 187 0xbb '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xfe, /* 11111110 */ 0x06, /* 00000110 */ 0xf6, /* 11110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 188 0xbc '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0xf6, /* 11110110 */ 0x06, /* 00000110 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 189 0xbd '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 190 0xbe '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0xf8, /* 11111000 */ 0x18, /* 00011000 */ 0xf8, /* 11111000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 191 0xbf '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xf8, /* 11111000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 192 0xc0 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x1f, /* 00011111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 193 0xc1 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 194 0xc2 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 195 0xc3 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x1f, /* 00011111 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 196 0xc4 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 197 0xc5 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0xff, /* 11111111 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 198 0xc6 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x1f, /* 00011111 */ 0x18, /* 00011000 */ 0x1f, /* 00011111 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 199 0xc7 '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x37, /* 00110111 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 200 0xc8 '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x37, /* 00110111 */ 0x30, /* 00110000 */ 0x3f, /* 00111111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 201 0xc9 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x3f, /* 00111111 */ 0x30, /* 00110000 */ 0x37, /* 00110111 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 202 0xca '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0xf7, /* 11110111 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 203 0xcb '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0xf7, /* 11110111 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 204 0xcc '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x37, /* 00110111 */ 0x30, /* 00110000 */ 0x37, /* 00110111 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 205 0xcd '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 206 0xce '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0xf7, /* 11110111 */ 0x00, /* 00000000 */ 0xf7, /* 11110111 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 207 0xcf '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 208 0xd0 '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 209 0xd1 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 210 0xd2 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 211 0xd3 '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x3f, /* 00111111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 212 0xd4 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x1f, /* 00011111 */ 0x18, /* 00011000 */ 0x1f, /* 00011111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 213 0xd5 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x1f, /* 00011111 */ 0x18, /* 00011000 */ 0x1f, /* 00011111 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 214 0xd6 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x3f, /* 00111111 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 215 0xd7 '' */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0xff, /* 11111111 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ /* * 216 0xd8 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0xff, /* 11111111 */ 0x18, /* 00011000 */ 0xff, /* 11111111 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 217 0xd9 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0xf8, /* 11111000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 218 0xda '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x1f, /* 00011111 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 219 0xdb '' */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ /* * 220 0xdc '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ /* * 221 0xdd '' */ 0xf0, /* 11110000 */ 0xf0, /* 11110000 */ 0xf0, /* 11110000 */ 0xf0, /* 11110000 */ 0xf0, /* 11110000 */ 0xf0, /* 11110000 */ 0xf0, /* 11110000 */ 0xf0, /* 11110000 */ /* * 222 0xde '' */ 0x0f, /* 00001111 */ 0x0f, /* 00001111 */ 0x0f, /* 00001111 */ 0x0f, /* 00001111 */ 0x0f, /* 00001111 */ 0x0f, /* 00001111 */ 0x0f, /* 00001111 */ 0x0f, /* 00001111 */ /* * 223 0xdf '' */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 224 0xe0 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x76, /* 01110110 */ 0xdc, /* 11011100 */ 0xc8, /* 11001000 */ 0xdc, /* 11011100 */ 0x76, /* 01110110 */ 0x00, /* 00000000 */ /* * 225 0xe1 '' */ 0x78, /* 01111000 */ 0xcc, /* 11001100 */ 0xcc, /* 11001100 */ 0xd8, /* 11011000 */ 0xcc, /* 11001100 */ 0xc6, /* 11000110 */ 0xcc, /* 11001100 */ 0x00, /* 00000000 */ /* * 226 0xe2 '' */ 0xfe, /* 11111110 */ 0xc6, /* 11000110 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0xc0, /* 11000000 */ 0x00, /* 00000000 */ /* * 227 0xe3 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xfe, /* 11111110 */ 0x6c, /* 01101100 */ 0x6c, /* 01101100 */ 0x6c, /* 01101100 */ 0x6c, /* 01101100 */ 0x00, /* 00000000 */ /* * 228 0xe4 '' */ 0xfe, /* 11111110 */ 0xc6, /* 11000110 */ 0x60, /* 01100000 */ 0x30, /* 00110000 */ 0x60, /* 01100000 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ /* * 229 0xe5 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0xd8, /* 11011000 */ 0xd8, /* 11011000 */ 0xd8, /* 11011000 */ 0x70, /* 01110000 */ 0x00, /* 00000000 */ /* * 230 0xe6 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x7c, /* 01111100 */ 0xc0, /* 11000000 */ /* * 231 0xe7 '' */ 0x00, /* 00000000 */ 0x76, /* 01110110 */ 0xdc, /* 11011100 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ /* * 232 0xe8 '' */ 0x7e, /* 01111110 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x3c, /* 00111100 */ 0x18, /* 00011000 */ 0x7e, /* 01111110 */ /* * 233 0xe9 '' */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0xc6, /* 11000110 */ 0xfe, /* 11111110 */ 0xc6, /* 11000110 */ 0x6c, /* 01101100 */ 0x38, /* 00111000 */ 0x00, /* 00000000 */ /* * 234 0xea '' */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x6c, /* 01101100 */ 0x6c, /* 01101100 */ 0xee, /* 11101110 */ 0x00, /* 00000000 */ /* * 235 0xeb '' */ 0x0e, /* 00001110 */ 0x18, /* 00011000 */ 0x0c, /* 00001100 */ 0x3e, /* 00111110 */ 0x66, /* 01100110 */ 0x66, /* 01100110 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ /* * 236 0xec '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0xdb, /* 11011011 */ 0xdb, /* 11011011 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 237 0xed '' */ 0x06, /* 00000110 */ 0x0c, /* 00001100 */ 0x7e, /* 01111110 */ 0xdb, /* 11011011 */ 0xdb, /* 11011011 */ 0x7e, /* 01111110 */ 0x60, /* 01100000 */ 0xc0, /* 11000000 */ /* * 238 0xee '' */ 0x1e, /* 00011110 */ 0x30, /* 00110000 */ 0x60, /* 01100000 */ 0x7e, /* 01111110 */ 0x60, /* 01100000 */ 0x30, /* 00110000 */ 0x1e, /* 00011110 */ 0x00, /* 00000000 */ /* * 239 0xef '' */ 0x00, /* 00000000 */ 0x7c, /* 01111100 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ /* * 240 0xf0 '' */ 0x00, /* 00000000 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ 0xfe, /* 11111110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 241 0xf1 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x7e, /* 01111110 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ /* * 242 0xf2 '' */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ /* * 243 0xf3 '' */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x18, /* 00011000 */ 0x0c, /* 00001100 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ /* * 244 0xf4 '' */ 0x0e, /* 00001110 */ 0x1b, /* 00011011 */ 0x1b, /* 00011011 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ /* * 245 0xf5 '' */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0xd8, /* 11011000 */ 0xd8, /* 11011000 */ 0x70, /* 01110000 */ /* * 246 0xf6 '' */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 247 0xf7 '' */ 0x00, /* 00000000 */ 0x76, /* 01110110 */ 0xdc, /* 11011100 */ 0x00, /* 00000000 */ 0x76, /* 01110110 */ 0xdc, /* 11011100 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 248 0xf8 '' */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0x6c, /* 01101100 */ 0x38, /* 00111000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 249 0xf9 '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 250 0xfa '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 251 0xfb '' */ 0x0f, /* 00001111 */ 0x0c, /* 00001100 */ 0x0c, /* 00001100 */ 0x0c, /* 00001100 */ 0xec, /* 11101100 */ 0x6c, /* 01101100 */ 0x3c, /* 00111100 */ 0x1c, /* 00011100 */ /* * 252 0xfc '' */ 0x6c, /* 01101100 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 253 0xfd '' */ 0x78, /* 01111000 */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ 0x7c, /* 01111100 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 254 0xfe '' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x3c, /* 00111100 */ 0x3c, /* 00111100 */ 0x3c, /* 00111100 */ 0x3c, /* 00111100 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ /* * 255 0xff ' ' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ }; SDL2_gfx-1.0.4/SDL2_imageFilter.c100777 0 0 1140643 12360250626 11456 0/* SDL2_imageFilter.c: byte-image "filter" routines Copyright (C) 2012-2014 Andreas Schiffler Copyright (C) 2013 Sylvain Beucler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. Andreas Schiffler -- aschiffler at ferzkopp dot net */ /* Note: Uses inline x86 MMX or ASM optimizations if available and enabled. Note: Most of the MMX code is based on published routines by Vladimir Kravtchenko at vk@cs.ubc.ca - credits go to him for his work. */ #include #include #include #include "SDL.h" /* Use GCC intrinsics if available: they support both i386 and x86_64, provide ASM-grade performances, and lift the PUSHA/POPA issues. */ #ifdef __GNUC__ # ifdef USE_MMX # include # endif # include #endif #include "SDL2_imageFilter.h" /*! \brief Swaps the byte order in a 32bit integer (LSB becomes MSB, etc.). */ #define SWAP_32(x) (((x) >> 24) | (((x) & 0x00ff0000) >> 8) | (((x) & 0x0000ff00) << 8) | ((x) << 24)) /* ------ Static variables ----- */ /*! \brief Static state which enables the use of the MMX routines. Enabled by default */ static int SDL_imageFilterUseMMX = 1; /* Detect GCC */ #if defined(__GNUC__) #define GCC__ #endif /*! \brief MMX detection routine (with override flag). \returns 1 of MMX was detected, 0 otherwise. */ int SDL_imageFilterMMXdetect(void) { /* Check override flag */ if (SDL_imageFilterUseMMX == 0) { return (0); } return SDL_HasMMX(); } /*! \brief Disable MMX check for filter functions and and force to use non-MMX C based code. */ void SDL_imageFilterMMXoff() { SDL_imageFilterUseMMX = 0; } /*! \brief Enable MMX check for filter functions and use MMX code if available. */ void SDL_imageFilterMMXon() { SDL_imageFilterUseMMX = 1; } /* ------------------------------------------------------------------------------------ */ /*! \brief Internal MMX Filter using Add: D = saturation255(S1 + S2) \param Src1 Pointer to the start of the first source byte array (S1). \param Src2 Pointer to the start of the second source byte array (S2). \param Dest Pointer to the start of the destination byte array (D). \param SrcLength The number of bytes in the source arrays. \return Returns 0 for success or -1 for error. */ static int SDL_imageFilterAddMMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength) { #ifdef USE_MMX #if !defined(GCC__) __asm { pusha mov eax, Src1 /* load Src1 address into eax */ mov ebx, Src2 /* load Src2 address into ebx */ mov edi, Dest /* load Dest address into edi */ mov ecx, SrcLength /* load loop counter (SIZE) into ecx */ shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */ align 16 /* 16 byte alignment of the loop entry */ L1010: movq mm1, [eax] /* load 8 bytes from Src1 into mm1 */ paddusb mm1, [ebx] /* mm1=Src1+Src2 (add 8 bytes with saturation) */ movq [edi], mm1 /* store result in Dest */ add eax, 8 /* increase Src1, Src2 and Dest */ add ebx, 8 /* register pointers by 8 */ add edi, 8 dec ecx /* decrease loop counter */ jnz L1010 /* check loop termination, proceed if required */ emms /* exit MMX state */ popa } #else /* i386 and x86_64 */ __m64 *mSrc1 = (__m64*)Src1; __m64 *mSrc2 = (__m64*)Src2; __m64 *mDest = (__m64*)Dest; int i; for (i = 0; i < SrcLength/8; i++) { *mDest = _m_paddusb(*mSrc1, *mSrc2); /* Src1+Src2 (add 8 bytes with saturation) */ mSrc1++; mSrc2++; mDest++; } _m_empty(); /* clean MMX state */ #endif return (0); #else return (-1); #endif } /*! \brief Filter using Add: D = saturation255(S1 + S2) \param Src1 Pointer to the start of the first source byte array (S1). \param Src2 Pointer to the start of the second source byte array (S2). \param Dest Pointer to the start of the destination byte array (D). \param length The number of bytes in the source arrays. \return Returns 0 for success or -1 for error. */ int SDL_imageFilterAdd(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length) { unsigned int i, istart; unsigned char *cursrc1, *cursrc2, *curdst; int result; /* Validate input parameters */ if ((Src1 == NULL) || (Src2 == NULL) || (Dest == NULL)) return(-1); if (length == 0) return(0); if ((SDL_imageFilterMMXdetect()) && (length > 7)) { /* Use MMX assembly routine */ SDL_imageFilterAddMMX(Src1, Src2, Dest, length); /* Check for unaligned bytes */ if ((length & 7) > 0) { /* Setup to process unaligned bytes */ istart = length & 0xfffffff8; cursrc1 = &Src1[istart]; cursrc2 = &Src2[istart]; curdst = &Dest[istart]; } else { /* No unaligned bytes - we are done */ return (0); } } else { /* Setup to process whole image */ istart = 0; cursrc1 = Src1; cursrc2 = Src2; curdst = Dest; } /* C routine to process image */ for (i = istart; i < length; i++) { result = (int) *cursrc1 + (int) *cursrc2; if (result > 255) result = 255; *curdst = (unsigned char) result; /* Advance pointers */ cursrc1++; cursrc2++; curdst++; } return (0); } /*! \brief Internal MMX Filter using Mean: D = S1/2 + S2/2 \param Src1 Pointer to the start of the first source byte array (S1). \param Src2 Pointer to the start of the second source byte array (S2). \param Dest Pointer to the start of the destination byte array (D). \param SrcLength The number of bytes in the source arrays. \param Mask Mask array containing 8 bytes with 0x7F value. ] \return Returns 0 for success or -1 for error. */ static int SDL_imageFilterMeanMMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength, unsigned char *Mask) { #ifdef USE_MMX #if !defined(GCC__) __asm { pusha mov edx, Mask /* load Mask address into edx */ movq mm0, [edx] /* load Mask into mm0 */ mov eax, Src1 /* load Src1 address into eax */ mov ebx, Src2 /* load Src2 address into ebx */ mov edi, Dest /* load Dest address into edi */ mov ecx, SrcLength /* load loop counter (SIZE) into ecx */ shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */ align 16 /* 16 byte alignment of the loop entry */ L21011: movq mm1, [eax] /* load 8 bytes from Src1 into mm1 */ movq mm2, [ebx] /* load 8 bytes from Src2 into mm2 */ /* --- Byte shift via Word shift --- */ psrlw mm1, 1 /* shift 4 WORDS of mm1 1 bit to the right */ psrlw mm2, 1 /* shift 4 WORDS of mm2 1 bit to the right */ pand mm1, mm0 // apply Mask to 8 BYTES of mm1 */ /* byte 0x0f, 0xdb, 0xc8 */ pand mm2, mm0 // apply Mask to 8 BYTES of mm2 */ /* byte 0x0f, 0xdb, 0xd0 */ paddusb mm1, mm2 /* mm1=mm1+mm2 (add 8 bytes with saturation) */ movq [edi], mm1 /* store result in Dest */ add eax, 8 /* increase Src1, Src2 and Dest */ add ebx, 8 /* register pointers by 8 */ add edi, 8 dec ecx /* decrease loop counter */ jnz L21011 /* check loop termination, proceed if required */ emms /* exit MMX state */ popa } #else /* i386 and x86_64 */ __m64 *mSrc1 = (__m64*)Src1; __m64 *mSrc2 = (__m64*)Src2; __m64 *mDest = (__m64*)Dest; __m64 *mMask = (__m64*)Mask; int i; for (i = 0; i < SrcLength/8; i++) { __m64 mm1 = *mSrc1, mm2 = *mSrc2; mm1 = _m_psrlwi(mm1, 1); /* shift 4 WORDS of mm1 1 bit to the right */ mm2 = _m_psrlwi(mm2, 1); /* shift 4 WORDS of mm2 1 bit to the right */ mm1 = _m_pand(mm1, *mMask); /* apply Mask to 8 BYTES of mm1 */ mm2 = _m_pand(mm2, *mMask); /* apply Mask to 8 BYTES of mm2 */ *mDest = _m_paddusb(mm1, mm2); /* mm1+mm2 (add 8 bytes with saturation) */ mSrc1++; mSrc2++; mDest++; } _m_empty(); /* clean MMX state */ #endif return (0); #else return (-1); #endif } /*! \brief Filter using Mean: D = S1/2 + S2/2 \param Src1 Pointer to the start of the first source byte array (S1). \param Src2 Pointer to the start of the second source byte array (S2). \param Dest Pointer to the start of the destination byte array (D). \param length The number of bytes in the source arrays. \return Returns 0 for success or -1 for error. */ int SDL_imageFilterMean(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length) { static unsigned char Mask[8] = { 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F }; unsigned int i, istart; unsigned char *cursrc1, *cursrc2, *curdst; int result; /* Validate input parameters */ if ((Src1 == NULL) || (Src2 == NULL) || (Dest == NULL)) return(-1); if (length == 0) return(0); if ((SDL_imageFilterMMXdetect()) && (length > 7)) { /* MMX routine */ SDL_imageFilterMeanMMX(Src1, Src2, Dest, length, Mask); /* Check for unaligned bytes */ if ((length & 7) > 0) { /* Setup to process unaligned bytes */ istart = length & 0xfffffff8; cursrc1 = &Src1[istart]; cursrc2 = &Src2[istart]; curdst = &Dest[istart]; } else { /* No unaligned bytes - we are done */ return (0); } } else { /* Setup to process whole image */ istart = 0; cursrc1 = Src1; cursrc2 = Src2; curdst = Dest; } /* C routine to process image */ for (i = istart; i < length; i++) { result = (int) *cursrc1 / 2 + (int) *cursrc2 / 2; *curdst = (unsigned char) result; /* Advance pointers */ cursrc1++; cursrc2++; curdst++; } return (0); } /*! \brief Internal MMX Filter using Sub: D = saturation0(S1 - S2) \param Src1 Pointer to the start of the first source byte array (S1). \param Src2 Pointer to the start of the second source byte array (S2). \param Dest Pointer to the start of the destination byte array (D). \param SrcLength The number of bytes in the source arrays. \return Returns 0 for success or -1 for error. */ static int SDL_imageFilterSubMMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength) { #ifdef USE_MMX #if !defined(GCC__) __asm { pusha mov eax, Src1 /* load Src1 address into eax */ mov ebx, Src2 /* load Src2 address into ebx */ mov edi, Dest /* load Dest address into edi */ mov ecx, SrcLength /* load loop counter (SIZE) into ecx */ shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */ align 16 /* 16 byte alignment of the loop entry */ L1012: movq mm1, [eax] /* load 8 bytes from Src1 into mm1 */ psubusb mm1, [ebx] /* mm1=Src1-Src2 (sub 8 bytes with saturation) */ movq [edi], mm1 /* store result in Dest */ add eax, 8 /* increase Src1, Src2 and Dest */ add ebx, 8 /* register pointers by 8 */ add edi, 8 dec ecx /* decrease loop counter */ jnz L1012 /* check loop termination, proceed if required */ emms /* exit MMX state */ popa } #else /* i386 and x86_64 */ __m64 *mSrc1 = (__m64*)Src1; __m64 *mSrc2 = (__m64*)Src2; __m64 *mDest = (__m64*)Dest; int i; for (i = 0; i < SrcLength/8; i++) { *mDest = _m_psubusb(*mSrc1, *mSrc2); /* Src1-Src2 (sub 8 bytes with saturation) */ mSrc1++; mSrc2++; mDest++; } _m_empty(); /* clean MMX state */ #endif return (0); #else return (-1); #endif } /*! \brief Filter using Sub: D = saturation0(S1 - S2) \param Src1 Pointer to the start of the first source byte array (S1). \param Src2 Pointer to the start of the second source byte array (S2). \param Dest Pointer to the start of the destination byte array (D). \param length The number of bytes in the source arrays. \return Returns 0 for success or -1 for error. */ int SDL_imageFilterSub(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length) { unsigned int i, istart; unsigned char *cursrc1, *cursrc2, *curdst; int result; /* Validate input parameters */ if ((Src1 == NULL) || (Src2 == NULL) || (Dest == NULL)) return(-1); if (length == 0) return(0); if ((SDL_imageFilterMMXdetect()) && (length > 7)) { /* MMX routine */ SDL_imageFilterSubMMX(Src1, Src2, Dest, length); /* Check for unaligned bytes */ if ((length & 7) > 0) { /* Setup to process unaligned bytes */ istart = length & 0xfffffff8; cursrc1 = &Src1[istart]; cursrc2 = &Src2[istart]; curdst = &Dest[istart]; } else { /* No unaligned bytes - we are done */ return (0); } } else { /* Setup to process whole image */ istart = 0; cursrc1 = Src1; cursrc2 = Src2; curdst = Dest; } /* C routine to process image */ for (i = istart; i < length; i++) { result = (int) *cursrc1 - (int) *cursrc2; if (result < 0) result = 0; *curdst = (unsigned char) result; /* Advance pointers */ cursrc1++; cursrc2++; curdst++; } return (0); } /*! \brief Internal MMX Filter using AbsDiff: D = | S1 - S2 | \param Src1 Pointer to the start of the first source byte array (S1). \param Src2 Pointer to the start of the second source byte array (S2). \param Dest Pointer to the start of the destination byte array (D). \param SrcLength The number of bytes in the source arrays. \return Returns 0 for success or -1 for error. */ static int SDL_imageFilterAbsDiffMMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength) { #ifdef USE_MMX #if !defined(GCC__) __asm { pusha mov eax, Src1 /* load Src1 address into eax */ mov ebx, Src2 /* load Src2 address into ebx */ mov edi, Dest /* load Dest address into edi */ mov ecx, SrcLength /* load loop counter (SIZE) into ecx */ shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */ align 16 /* 16 byte alignment of the loop entry */ L1013: movq mm1, [eax] /* load 8 bytes from Src1 into mm1 */ movq mm2, [ebx] /* load 8 bytes from Src2 into mm2 */ psubusb mm1, [ebx] /* mm1=Src1-Src2 (sub 8 bytes with saturation) */ psubusb mm2, [eax] /* mm2=Src2-Src1 (sub 8 bytes with saturation) */ por mm1, mm2 /* combine both mm2 and mm1 results */ movq [edi], mm1 /* store result in Dest */ add eax, 8 /* increase Src1, Src2 and Dest */ add ebx, 8 /* register pointers by 8 */ add edi, 8 dec ecx /* decrease loop counter */ jnz L1013 /* check loop termination, proceed if required */ emms /* exit MMX state */ popa } #else /* i386 and x86_64 */ __m64 *mSrc1 = (__m64*)Src1; __m64 *mSrc2 = (__m64*)Src2; __m64 *mDest = (__m64*)Dest; int i; for (i = 0; i < SrcLength/8; i++) { __m64 mm1 = _m_psubusb(*mSrc2, *mSrc1); /* Src1-Src2 (sub 8 bytes with saturation) */ __m64 mm2 = _m_psubusb(*mSrc1, *mSrc2); /* Src2-Src1 (sub 8 bytes with saturation) */ *mDest = _m_por(mm1, mm2); /* combine both mm2 and mm1 results */ mSrc1++; mSrc2++; mDest++; } _m_empty(); /* clean MMX state */ #endif return (0); #else return (-1); #endif } /*! \brief Filter using AbsDiff: D = | S1 - S2 | \param Src1 Pointer to the start of the first source byte array (S1). \param Src2 Pointer to the start of the second source byte array (S2). \param Dest Pointer to the start of the destination byte array (D). \param length The number of bytes in the source arrays. \return Returns 0 for success or -1 for error. */ int SDL_imageFilterAbsDiff(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length) { unsigned int i, istart; unsigned char *cursrc1, *cursrc2, *curdst; int result; /* Validate input parameters */ if ((Src1 == NULL) || (Src2 == NULL) || (Dest == NULL)) return(-1); if (length == 0) return(0); if ((SDL_imageFilterMMXdetect()) && (length > 7)) { /* MMX routine */ SDL_imageFilterAbsDiffMMX(Src1, Src2, Dest, length); /* Check for unaligned bytes */ if ((length & 7) > 0) { /* Setup to process unaligned bytes */ istart = length & 0xfffffff8; cursrc1 = &Src1[istart]; cursrc2 = &Src2[istart]; curdst = &Dest[istart]; } else { /* No unaligned bytes - we are done */ return (0); } } else { /* Setup to process whole image */ istart = 0; cursrc1 = Src1; cursrc2 = Src2; curdst = Dest; } /* C routine to process image */ for (i = istart; i < length; i++) { result = abs((int) *cursrc1 - (int) *cursrc2); *curdst = (unsigned char) result; /* Advance pointers */ cursrc1++; cursrc2++; curdst++; } return (0); } /*! \brief Internal MMX Filter using Mult: D = saturation255(S1 * S2) \param Src1 Pointer to the start of the first source byte array (S1). \param Src2 Pointer to the start of the second source byte array (S2). \param Dest Pointer to the start of the destination byte array (D). \param SrcLength The number of bytes in the source arrays. \return Returns 0 for success or -1 for error. */ static int SDL_imageFilterMultMMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength) { #ifdef USE_MMX #if !defined(GCC__) __asm { pusha mov eax, Src1 /* load Src1 address into eax */ mov ebx, Src2 /* load Src2 address into ebx */ mov edi, Dest /* load Dest address into edi */ mov ecx, SrcLength /* load loop counter (SIZE) into ecx */ shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */ pxor mm0, mm0 /* zero mm0 register */ align 16 /* 16 byte alignment of the loop entry */ L1014: movq mm1, [eax] /* load 8 bytes from Src1 into mm1 */ movq mm3, [ebx] /* load 8 bytes from Src2 into mm3 */ movq mm2, mm1 /* copy mm1 into mm2 */ movq mm4, mm3 /* copy mm3 into mm4 */ punpcklbw mm1, mm0 /* unpack low bytes of Src1 into words */ punpckhbw mm2, mm0 /* unpack high bytes of Src1 into words */ punpcklbw mm3, mm0 /* unpack low bytes of Src2 into words */ punpckhbw mm4, mm0 /* unpack high bytes of Src2 into words */ pmullw mm1, mm3 /* mul low bytes of Src1 and Src2 */ pmullw mm2, mm4 /* mul high bytes of Src1 and Src2 */ /* Take abs value of the results (signed words) */ movq mm5, mm1 /* copy mm1 into mm5 */ movq mm6, mm2 /* copy mm2 into mm6 */ psraw mm5, 15 /* fill mm5 words with word sign bit */ psraw mm6, 15 /* fill mm6 words with word sign bit */ pxor mm1, mm5 /* take 1's compliment of only neg. words */ pxor mm2, mm6 /* take 1's compliment of only neg. words */ psubsw mm1, mm5 /* add 1 to only neg. words, W-(-1) or W-0 */ psubsw mm2, mm6 /* add 1 to only neg. words, W-(-1) or W-0 */ packuswb mm1, mm2 /* pack words back into bytes with saturation */ movq [edi], mm1 /* store result in Dest */ add eax, 8 /* increase Src1, Src2 and Dest */ add ebx, 8 /* register pointers by 8 */ add edi, 8 dec ecx /* decrease loop counter */ jnz L1014 /* check loop termination, proceed if required */ emms /* exit MMX state */ popa } #else /* i386 ASM with constraints: */ /* asm volatile ( */ /* "shr $3, %%ecx \n\t" /\* counter/8 (MMX loads 8 bytes at a time) *\/ */ /* "pxor %%mm0, %%mm0 \n\t" /\* zero mm0 register *\/ */ /* ".align 16 \n\t" /\* 16 byte alignment of the loop entry *\/ */ /* "1: movq (%%eax), %%mm1 \n\t" /\* load 8 bytes from Src1 into mm1 *\/ */ /* "movq (%%ebx), %%mm3 \n\t" /\* load 8 bytes from Src2 into mm3 *\/ */ /* "movq %%mm1, %%mm2 \n\t" /\* copy mm1 into mm2 *\/ */ /* "movq %%mm3, %%mm4 \n\t" /\* copy mm3 into mm4 *\/ */ /* "punpcklbw %%mm0, %%mm1 \n\t" /\* unpack low bytes of Src1 into words *\/ */ /* "punpckhbw %%mm0, %%mm2 \n\t" /\* unpack high bytes of Src1 into words *\/ */ /* "punpcklbw %%mm0, %%mm3 \n\t" /\* unpack low bytes of Src2 into words *\/ */ /* "punpckhbw %%mm0, %%mm4 \n\t" /\* unpack high bytes of Src2 into words *\/ */ /* "pmullw %%mm3, %%mm1 \n\t" /\* mul low bytes of Src1 and Src2 *\/ */ /* "pmullw %%mm4, %%mm2 \n\t" /\* mul high bytes of Src1 and Src2 *\/ */ /* /\* Take abs value of the results (signed words) *\/ */ /* "movq %%mm1, %%mm5 \n\t" /\* copy mm1 into mm5 *\/ */ /* "movq %%mm2, %%mm6 \n\t" /\* copy mm2 into mm6 *\/ */ /* "psraw $15, %%mm5 \n\t" /\* fill mm5 words with word sign bit *\/ */ /* "psraw $15, %%mm6 \n\t" /\* fill mm6 words with word sign bit *\/ */ /* "pxor %%mm5, %%mm1 \n\t" /\* take 1's compliment of only neg. words *\/ */ /* "pxor %%mm6, %%mm2 \n\t" /\* take 1's compliment of only neg. words *\/ */ /* "psubsw %%mm5, %%mm1 \n\t" /\* add 1 to only neg. words, W-(-1) or W-0 *\/ */ /* "psubsw %%mm6, %%mm2 \n\t" /\* add 1 to only neg. words, W-(-1) or W-0 *\/ */ /* "packuswb %%mm2, %%mm1 \n\t" /\* pack words back into bytes with saturation *\/ */ /* "movq %%mm1, (%%edi) \n\t" /\* store result in Dest *\/ */ /* "add $8, %%eax \n\t" /\* increase Src1, Src2 and Dest *\/ */ /* "add $8, %%ebx \n\t" /\* register pointers by 8 *\/ */ /* "add $8, %%edi \n\t" */ /* "dec %%ecx \n\t" /\* decrease loop counter *\/ */ /* "jnz 1b \n\t" /\* check loop termination, proceed if required *\/ */ /* "emms \n\t" /\* exit MMX state *\/ */ /* : "+a" (Src1), /\* load Src1 address into rax, modified by the loop *\/ */ /* "+b" (Src2), /\* load Src2 address into rbx, modified by the loop *\/ */ /* "+c" (SrcLength), /\* load loop counter (SIZE) into rcx, modified by the loop *\/ */ /* "+D" (Dest) /\* load Dest address into rdi, modified by the loop *\/ */ /* : */ /* : "memory", /\* *Dest is modified *\/ */ /* "mm0","mm1","mm2","mm3","mm4","mm5","mm6" /\* registers modified *\/ */ /* ); */ /* i386 and x86_64 */ __m64 *mSrc1 = (__m64*)Src1; __m64 *mSrc2 = (__m64*)Src2; __m64 *mDest = (__m64*)Dest; __m64 mm0 = _m_from_int(0); /* zero mm0 register */ int i; for (i = 0; i < SrcLength/8; i++) { __m64 mm1, mm2, mm3, mm4, mm5, mm6; mm1 = _m_punpcklbw(*mSrc1, mm0); /* unpack low bytes of Src1 into words */ mm2 = _m_punpckhbw(*mSrc1, mm0); /* unpack high bytes of Src1 into words */ mm3 = _m_punpcklbw(*mSrc2, mm0); /* unpack low bytes of Src2 into words */ mm4 = _m_punpckhbw(*mSrc2, mm0); /* unpack high bytes of Src2 into words */ mm1 = _m_pmullw(mm1, mm3); /* mul low bytes of Src1 and Src2 */ mm2 = _m_pmullw(mm2, mm4); /* mul high bytes of Src1 and Src2 */ mm5 = _m_psrawi(mm1, 15); /* fill mm5 words with word sign bit */ mm6 = _m_psrawi(mm2, 15); /* fill mm6 words with word sign bit */ mm1 = _m_pxor(mm1, mm5); /* take 1's compliment of only neg. words */ mm2 = _m_pxor(mm2, mm6); /* take 1's compliment of only neg. words */ mm1 = _m_psubsw(mm1, mm5); /* add 1 to only neg. words, W-(-1) or W-0 */ mm2 = _m_psubsw(mm2, mm6); /* add 1 to only neg. words, W-(-1) or W-0 */ *mDest = _m_packuswb(mm1, mm2); /* pack words back into bytes with saturation */ mSrc1++; mSrc2++; mDest++; } _m_empty(); /* clean MMX state */ #endif return (0); #else return (-1); #endif } /*! \brief Filter using Mult: D = saturation255(S1 * S2) \param Src1 Pointer to the start of the first source byte array (S1). \param Src2 Pointer to the start of the second source byte array (S2). \param Dest Pointer to the start of the destination byte array (D). \param length The number of bytes in the source arrays. \return Returns 0 for success or -1 for error. */ int SDL_imageFilterMult(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length) { unsigned int i, istart; unsigned char *cursrc1, *cursrc2, *curdst; int result; /* Validate input parameters */ if ((Src1 == NULL) || (Src2 == NULL) || (Dest == NULL)) return(-1); if (length == 0) return(0); if ((SDL_imageFilterMMXdetect()) && (length > 7)) { /* MMX routine */ SDL_imageFilterMultMMX(Src1, Src2, Dest, length); /* Check for unaligned bytes */ if ((length & 7) > 0) { /* Setup to process unaligned bytes */ istart = length & 0xfffffff8; cursrc1 = &Src1[istart]; cursrc2 = &Src2[istart]; curdst = &Dest[istart]; } else { /* No unaligned bytes - we are done */ return (0); } } else { /* Setup to process whole image */ istart = 0; cursrc1 = Src1; cursrc2 = Src2; curdst = Dest; } /* C routine to process image */ for (i = istart; i < length; i++) { /* NOTE: this is probably wrong - dunno what the MMX code does */ result = (int) *cursrc1 * (int) *cursrc2; if (result > 255) result = 255; *curdst = (unsigned char) result; /* Advance pointers */ cursrc1++; cursrc2++; curdst++; } return (0); } /*! \brief Internal ASM Filter using MultNor: D = S1 * S2 \param Src1 Pointer to the start of the first source byte array (S1). \param Src2 Pointer to the start of the second source byte array (S2). \param Dest Pointer to the start of the destination byte array (D). \param SrcLength The number of bytes in the source arrays. \return Returns 0 for success or -1 for error. */ int SDL_imageFilterMultNorASM(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength) { #ifdef USE_MMX #if !defined(GCC__) __asm { pusha mov edx, Src1 /* load Src1 address into edx */ mov esi, Src2 /* load Src2 address into esi */ mov edi, Dest /* load Dest address into edi */ mov ecx, SrcLength /* load loop counter (SIZE) into ecx */ align 16 /* 16 byte alignment of the loop entry */ L10141: mov al, [edx] /* load a byte from Src1 */ mul [esi] /* mul with a byte from Src2 */ mov [edi], al /* move a byte result to Dest */ inc edx /* increment Src1, Src2, Dest */ inc esi /* pointer registers by one */ inc edi dec ecx /* decrease loop counter */ jnz L10141 /* check loop termination, proceed if required */ popa } #else /* Note: ~5% gain on i386, less efficient than C on x86_64 */ /* Also depends on whether this function is static (?!) */ asm volatile ( ".align 16 \n\t" /* 16 byte alignment of the loop entry */ # if defined(i386) "1:mov (%%edx), %%al \n\t" /* load a byte from Src1 */ "mulb (%%esi) \n\t" /* mul with a byte from Src2 */ "mov %%al, (%%edi) \n\t" /* move a byte result to Dest */ "inc %%edx \n\t" /* increment Src1, Src2, Dest */ "inc %%esi \n\t" /* pointer registers by one */ "inc %%edi \n\t" "dec %%ecx \n\t" /* decrease loop counter */ # elif defined(__x86_64__) "1:mov (%%rdx), %%al \n\t" /* load a byte from Src1 */ "mulb (%%rsi) \n\t" /* mul with a byte from Src2 */ "mov %%al, (%%rdi) \n\t" /* move a byte result to Dest */ "inc %%rdx \n\t" /* increment Src1, Src2, Dest */ "inc %%rsi \n\t" /* pointer registers by one */ "inc %%rdi \n\t" "dec %%rcx \n\t" /* decrease loop counter */ # endif "jnz 1b \n\t" /* check loop termination, proceed if required */ : "+d" (Src1), /* load Src1 address into edx */ "+S" (Src2), /* load Src2 address into esi */ "+c" (SrcLength), /* load loop counter (SIZE) into ecx */ "+D" (Dest) /* load Dest address into edi */ : : "memory", "rax" ); #endif return (0); #else return (-1); #endif } /*! \brief Filter using MultNor: D = S1 * S2 \param Src1 Pointer to the start of the first source byte array (S1). \param Src2 Pointer to the start of the second source byte array (S2). \param Dest Pointer to the start of the destination byte array (D). \param length The number of bytes in the source arrays. \return Returns 0 for success or -1 for error. */ int SDL_imageFilterMultNor(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length) { unsigned int i, istart; unsigned char *cursrc1, *cursrc2, *curdst; /* Validate input parameters */ if ((Src1 == NULL) || (Src2 == NULL) || (Dest == NULL)) return(-1); if (length == 0) return(0); if (SDL_imageFilterMMXdetect()) { if (length > 0) { /* ASM routine */ SDL_imageFilterMultNorASM(Src1, Src2, Dest, length); /* Check for unaligned bytes */ if ((length & 7) > 0) { /* Setup to process unaligned bytes */ istart = length & 0xfffffff8; cursrc1 = &Src1[istart]; cursrc2 = &Src2[istart]; curdst = &Dest[istart]; } else { /* No unaligned bytes - we are done */ return (0); } } else { /* No bytes - we are done */ return (0); } } else { /* Setup to process whole image */ istart = 0; cursrc1 = Src1; cursrc2 = Src2; curdst = Dest; } /* C routine to process image */ for (i = istart; i < length; i++) { *curdst = (int)*cursrc1 * (int)*cursrc2; // (int) for efficiency /* Advance pointers */ cursrc1++; cursrc2++; curdst++; } return (0); } /*! \brief Internal MMX Filter using MultDivby2: D = saturation255(S1/2 * S2) \param Src1 Pointer to the start of the first source byte array (S1). \param Src2 Pointer to the start of the second source byte array (S2). \param Dest Pointer to the start of the destination byte array (D). \param SrcLength The number of bytes in the source arrays. \return Returns 0 for success or -1 for error. */ static int SDL_imageFilterMultDivby2MMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength) { #ifdef USE_MMX #if !defined(GCC__) __asm { pusha mov eax, Src1 /* load Src1 address into eax */ mov ebx, Src2 /* load Src2 address into ebx */ mov edi, Dest /* load Dest address into edi */ mov ecx, SrcLength /* load loop counter (SIZE) into ecx */ shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */ pxor mm0, mm0 /* zero mm0 register */ align 16 /* 16 byte alignment of the loop entry */ L1015: movq mm1, [eax] /* load 8 bytes from Src1 into mm1 */ movq mm3, [ebx] /* load 8 bytes from Src2 into mm3 */ movq mm2, mm1 /* copy mm1 into mm2 */ movq mm4, mm3 /* copy mm3 into mm4 */ punpcklbw mm1, mm0 /* unpack low bytes of Src1 into words */ punpckhbw mm2, mm0 /* unpack high bytes of Src1 into words */ punpcklbw mm3, mm0 /* unpack low bytes of Src2 into words */ punpckhbw mm4, mm0 /* unpack high bytes of Src2 into words */ psrlw mm1, 1 /* divide mm1 words by 2, Src1 low bytes */ psrlw mm2, 1 /* divide mm2 words by 2, Src1 high bytes */ pmullw mm1, mm3 /* mul low bytes of Src1 and Src2 */ pmullw mm2, mm4 /* mul high bytes of Src1 and Src2 */ packuswb mm1, mm2 /* pack words back into bytes with saturation */ movq [edi], mm1 /* store result in Dest */ add eax, 8 /* increase Src1, Src2 and Dest */ add ebx, 8 /* register pointers by 8 */ add edi, 8 dec ecx /* decrease loop counter */ jnz L1015 /* check loop termination, proceed if required */ emms /* exit MMX state */ popa } #else /* i386 and x86_64 */ __m64 *mSrc1 = (__m64*)Src1; __m64 *mSrc2 = (__m64*)Src2; __m64 *mDest = (__m64*)Dest; __m64 mm0 = _m_from_int(0); /* zero mm0 register */ int i; for (i = 0; i < SrcLength/8; i++) { __m64 mm1, mm2, mm3, mm4, mm5, mm6; mm1 = _m_punpcklbw(*mSrc1, mm0); /* unpack low bytes of Src1 into words */ mm2 = _m_punpckhbw(*mSrc1, mm0); /* unpack high bytes of Src1 into words */ mm3 = _m_punpcklbw(*mSrc2, mm0); /* unpack low bytes of Src2 into words */ mm4 = _m_punpckhbw(*mSrc2, mm0); /* unpack high bytes of Src2 into words */ mm1 = _m_psrlwi(mm1, 1); /* divide mm1 words by 2, Src1 low bytes */ mm2 = _m_psrlwi(mm2, 1); /* divide mm2 words by 2, Src1 high bytes */ mm1 = _m_pmullw(mm1, mm3); /* mul low bytes of Src1 and Src2 */ mm2 = _m_pmullw(mm2, mm4); /* mul high bytes of Src1 and Src2 */ *mDest = _m_packuswb(mm1, mm2); /* pack words back into bytes with saturation */ mSrc1++; mSrc2++; mDest++; } _m_empty(); /* clean MMX state */ #endif return (0); #else return (-1); #endif } /*! \brief Filter using MultDivby2: D = saturation255(S1/2 * S2) \param Src1 Pointer to the start of the first source byte array (S1). \param Src2 Pointer to the start of the second source byte array (S2). \param Dest Pointer to the start of the destination byte array (D). \param length The number of bytes in the source arrays. \return Returns 0 for success or -1 for error. */ int SDL_imageFilterMultDivby2(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length) { unsigned int i, istart; unsigned char *cursrc1, *cursrc2, *curdst; int result; /* Validate input parameters */ if ((Src1 == NULL) || (Src2 == NULL) || (Dest == NULL)) return(-1); if (length == 0) return(0); if ((SDL_imageFilterMMXdetect()) && (length > 7)) { /* MMX routine */ SDL_imageFilterMultDivby2MMX(Src1, Src2, Dest, length); /* Check for unaligned bytes */ if ((length & 7) > 0) { /* Setup to process unaligned bytes */ istart = length & 0xfffffff8; cursrc1 = &Src1[istart]; cursrc2 = &Src2[istart]; curdst = &Dest[istart]; } else { /* No unaligned bytes - we are done */ return (0); } } else { /* Setup to process whole image */ istart = 0; cursrc1 = Src1; cursrc2 = Src2; curdst = Dest; } /* C routine to process image */ for (i = istart; i < length; i++) { result = ((int) *cursrc1 / 2) * (int) *cursrc2; if (result > 255) result = 255; *curdst = (unsigned char) result; /* Advance pointers */ cursrc1++; cursrc2++; curdst++; } return (0); } /*! \brief Internal MMX Filter using MultDivby4: D = saturation255(S1/2 * S2/2) \param Src1 Pointer to the start of the first source byte array (S1). \param Src2 Pointer to the start of the second source byte array (S2). \param Dest Pointer to the start of the destination byte array (D). \param SrcLength The number of bytes in the source arrays. \return Returns 0 for success or -1 for error. */ static int SDL_imageFilterMultDivby4MMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength) { #ifdef USE_MMX #if !defined(GCC__) __asm { pusha mov eax, Src1 /* load Src1 address into eax */ mov ebx, Src2 /* load Src2 address into ebx */ mov edi, Dest /* load Dest address into edi */ mov ecx, SrcLength /* load loop counter (SIZE) into ecx */ shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */ pxor mm0, mm0 /* zero mm0 register */ align 16 /* 16 byte alignment of the loop entry */ L1016: movq mm1, [eax] /* load 8 bytes from Src1 into mm1 */ movq mm3, [ebx] /* load 8 bytes from Src2 into mm3 */ movq mm2, mm1 /* copy mm1 into mm2 */ movq mm4, mm3 /* copy mm3 into mm4 */ punpcklbw mm1, mm0 /* unpack low bytes of Src1 into words */ punpckhbw mm2, mm0 /* unpack high bytes of Src1 into words */ punpcklbw mm3, mm0 /* unpack low bytes of Src2 into words */ punpckhbw mm4, mm0 /* unpack high bytes of Src2 into words */ psrlw mm1, 1 /* divide mm1 words by 2, Src1 low bytes */ psrlw mm2, 1 /* divide mm2 words by 2, Src1 high bytes */ psrlw mm3, 1 /* divide mm3 words by 2, Src2 low bytes */ psrlw mm4, 1 /* divide mm4 words by 2, Src2 high bytes */ pmullw mm1, mm3 /* mul low bytes of Src1 and Src2 */ pmullw mm2, mm4 /* mul high bytes of Src1 and Src2 */ packuswb mm1, mm2 /* pack words back into bytes with saturation */ movq [edi], mm1 /* store result in Dest */ add eax, 8 /* increase Src1, Src2 and Dest */ add ebx, 8 /* register pointers by 8 */ add edi, 8 dec ecx /* decrease loop counter */ jnz L1016 /* check loop termination, proceed if required */ emms /* exit MMX state */ popa } #else /* i386 and x86_64 */ __m64 *mSrc1 = (__m64*)Src1; __m64 *mSrc2 = (__m64*)Src2; __m64 *mDest = (__m64*)Dest; __m64 mm0 = _m_from_int(0); /* zero mm0 register */ int i; for (i = 0; i < SrcLength/8; i++) { __m64 mm1, mm2, mm3, mm4, mm5, mm6; mm1 = _m_punpcklbw(*mSrc1, mm0); /* unpack low bytes of Src1 into words */ mm2 = _m_punpckhbw(*mSrc1, mm0); /* unpack high bytes of Src1 into words */ mm3 = _m_punpcklbw(*mSrc2, mm0); /* unpack low bytes of Src2 into words */ mm4 = _m_punpckhbw(*mSrc2, mm0); /* unpack high bytes of Src2 into words */ mm1 = _m_psrlwi(mm1, 1); /* divide mm1 words by 2, Src1 low bytes */ mm2 = _m_psrlwi(mm2, 1); /* divide mm2 words by 2, Src1 high bytes */ mm3 = _m_psrlwi(mm3, 1); /* divide mm3 words by 2, Src2 low bytes */ mm4 = _m_psrlwi(mm4, 1); /* divide mm4 words by 2, Src2 high bytes */ mm1 = _m_pmullw(mm1, mm3); /* mul low bytes of Src1 and Src2 */ mm2 = _m_pmullw(mm2, mm4); /* mul high bytes of Src1 and Src2 */ *mDest = _m_packuswb(mm1, mm2); /* pack words back into bytes with saturation */ mSrc1++; mSrc2++; mDest++; } _m_empty(); /* clean MMX state */ #endif return (0); #else return (-1); #endif } /*! \brief Filter using MultDivby4: D = saturation255(S1/2 * S2/2) \param Src1 Pointer to the start of the first source byte array (S1). \param Src2 Pointer to the start of the second source byte array (S2). \param Dest Pointer to the start of the destination byte array (D). \param length The number of bytes in the source arrays. \return Returns 0 for success or -1 for error. */ int SDL_imageFilterMultDivby4(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length) { unsigned int i, istart; unsigned char *cursrc1, *cursrc2, *curdst; int result; /* Validate input parameters */ if ((Src1 == NULL) || (Src2 == NULL) || (Dest == NULL)) return(-1); if (length == 0) return(0); if ((SDL_imageFilterMMXdetect()) && (length > 7)) { /* MMX routine */ SDL_imageFilterMultDivby4MMX(Src1, Src2, Dest, length); /* Check for unaligned bytes */ if ((length & 7) > 0) { /* Setup to process unaligned bytes */ istart = length & 0xfffffff8; cursrc1 = &Src1[istart]; cursrc2 = &Src2[istart]; curdst = &Dest[istart]; } else { /* No unaligned bytes - we are done */ return (0); } } else { /* Setup to process whole image */ istart = 0; cursrc1 = Src1; cursrc2 = Src2; curdst = Dest; } /* C routine to process image */ for (i = istart; i < length; i++) { result = ((int) *cursrc1 / 2) * ((int) *cursrc2 / 2); if (result > 255) result = 255; *curdst = (unsigned char) result; /* Advance pointers */ cursrc1++; cursrc2++; curdst++; } return (0); } /*! \brief Internal MMX Filter using BitAnd: D = S1 & S2 \param Src1 Pointer to the start of the first source byte array (S1). \param Src2 Pointer to the start of the second source byte array (S2). \param Dest Pointer to the start of the destination byte array (D). \param SrcLength The number of bytes in the source arrays. \return Returns 0 for success or -1 for error. */ static int SDL_imageFilterBitAndMMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength) { #ifdef USE_MMX #if !defined(GCC__) __asm { pusha mov eax, Src1 /* load Src1 address into eax */ mov ebx, Src2 /* load Src2 address into ebx */ mov edi, Dest /* load Dest address into edi */ mov ecx, SrcLength /* load loop counter (SIZE) into ecx */ shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */ align 16 /* 16 byte alignment of the loop entry */ L1017: movq mm1, [eax] /* load 8 bytes from Src1 into mm1 */ pand mm1, [ebx] /* mm1=Src1&Src2 */ movq [edi], mm1 /* store result in Dest */ add eax, 8 /* increase Src1, Src2 and Dest */ add ebx, 8 /* register pointers by 8 */ add edi, 8 dec ecx /* decrease loop counter */ jnz L1017 /* check loop termination, proceed if required */ emms /* exit MMX state */ popa } #else /* x86_64 ASM with constraints: */ /* asm volatile ( */ /* "shr $3, %%rcx \n\t" /\* counter/8 (MMX loads 8 bytes at a time) *\/ */ /* ".align 16 \n\t" /\* 16 byte alignment of the loop entry *\/ */ /* "1: movq (%%rax), %%mm1 \n\t" /\* load 8 bytes from Src1 into mm1 *\/ */ /* "pand (%%rbx), %%mm1 \n\t" /\* mm1=Src1&Src2 *\/ */ /* "movq %%mm1, (%%rdi) \n\t" /\* store result in Dest *\/ */ /* "add $8, %%rax \n\t" /\* increase Src1, Src2 and Dest *\/ */ /* "add $8, %%rbx \n\t" /\* register pointers by 8 *\/ */ /* "add $8, %%rdi \n\t" */ /* "dec %%rcx \n\t" /\* decrease loop counter *\/ */ /* "jnz 1b \n\t" /\* check loop termination, proceed if required *\/ */ /* "emms \n\t" /\* exit MMX state *\/ */ /* : "+a" (Src1), /\* load Src1 address into rax, modified by the loop *\/ */ /* "+b" (Src2), /\* load Src2 address into rbx, modified by the loop *\/ */ /* "+c" (SrcLength), /\* load loop counter (SIZE) into rcx, modified by the loop *\/ */ /* "+D" (Dest) /\* load Dest address into rdi, modified by the loop *\/ */ /* : */ /* : "memory", /\* *Dest is modified *\/ */ /* "mm1" /\* register mm1 modified *\/ */ /* ); */ /* i386 and x86_64 */ __m64 *mSrc1 = (__m64*)Src1; __m64 *mSrc2 = (__m64*)Src2; __m64 *mDest = (__m64*)Dest; int i; for (i = 0; i < SrcLength/8; i++) { *mDest = _m_pand(*mSrc1, *mSrc2); /* Src1&Src2 */ mSrc1++; mSrc2++; mDest++; } _m_empty(); /* clean MMX state */ #endif return (0); #else return (-1); #endif } /*! \brief Filter using BitAnd: D = S1 & S2 \param Src1 Pointer to the start of the first source byte array (S1). \param Src2 Pointer to the start of the second source byte array (S2). \param Dest Pointer to the start of the destination byte array (D). \param length The number of bytes in the source arrays. \return Returns 0 for success or -1 for error. */ int SDL_imageFilterBitAnd(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length) { unsigned int i, istart; unsigned char *cursrc1, *cursrc2, *curdst; /* Validate input parameters */ if ((Src1 == NULL) || (Src2 == NULL) || (Dest == NULL)) return(-1); if (length == 0) return(0); if ((SDL_imageFilterMMXdetect()>0) && (length>7)) { /* if (length > 7) { */ /* Call MMX routine */ SDL_imageFilterBitAndMMX(Src1, Src2, Dest, length); /* Check for unaligned bytes */ if ((length & 7) > 0) { /* Setup to process unaligned bytes */ istart = length & 0xfffffff8; cursrc1 = &Src1[istart]; cursrc2 = &Src2[istart]; curdst = &Dest[istart]; } else { /* No unaligned bytes - we are done */ return (0); } } else { /* Setup to process whole image */ istart = 0; cursrc1 = Src1; cursrc2 = Src2; curdst = Dest; } /* C routine to process image */ for (i = istart; i < length; i++) { *curdst = (*cursrc1) & (*cursrc2); /* Advance pointers */ cursrc1++; cursrc2++; curdst++; } return (0); } /*! \brief Internal MMX Filter using BitOr: D = S1 | S2 \param Src1 Pointer to the start of the first source byte array (S1). \param Src2 Pointer to the start of the second source byte array (S2). \param Dest Pointer to the start of the destination byte array (D). \param SrcLength The number of bytes in the source arrays. \return Returns 0 for success or -1 for error. */ static int SDL_imageFilterBitOrMMX(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength) { #ifdef USE_MMX #if !defined(GCC__) __asm { pusha mov eax, Src1 /* load Src1 address into eax */ mov ebx, Src2 /* load Src2 address into ebx */ mov edi, Dest /* load Dest address into edi */ mov ecx, SrcLength /* load loop counter (SIZE) into ecx */ shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */ align 16 /* 16 byte alignment of the loop entry */ L91017: movq mm1, [eax] /* load 8 bytes from Src1 into mm1 */ por mm1, [ebx] /* mm1=Src1|Src2 */ movq [edi], mm1 /* store result in Dest */ add eax, 8 /* increase Src1, Src2 and Dest */ add ebx, 8 /* register pointers by 8 */ add edi, 8 dec ecx /* decrease loop counter */ jnz L91017 /* check loop termination, proceed if required */ emms /* exit MMX state */ popa } #else /* i386 and x86_64 */ __m64 *mSrc1 = (__m64*)Src1; __m64 *mSrc2 = (__m64*)Src2; __m64 *mDest = (__m64*)Dest; int i; for (i = 0; i < SrcLength/8; i++) { *mDest = _m_por(*mSrc1, *mSrc2); /* Src1|Src2 */ mSrc1++; mSrc2++; mDest++; } _m_empty(); /* clean MMX state */ #endif return (0); #else return (-1); #endif } /*! \brief Filter using BitOr: D = S1 | S2 \param Src1 Pointer to the start of the first source byte array (S1). \param Src2 Pointer to the start of the second source byte array (S2). \param Dest Pointer to the start of the destination byte array (D). \param length The number of bytes in the source arrays. \return Returns 0 for success or -1 for error. */ int SDL_imageFilterBitOr(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length) { unsigned int i, istart; unsigned char *cursrc1, *cursrc2, *curdst; /* Validate input parameters */ if ((Src1 == NULL) || (Src2 == NULL) || (Dest == NULL)) return(-1); if (length == 0) return(0); if ((SDL_imageFilterMMXdetect()) && (length > 7)) { /* MMX routine */ SDL_imageFilterBitOrMMX(Src1, Src2, Dest, length); /* Check for unaligned bytes */ if ((length & 7) > 0) { /* Setup to process unaligned bytes */ istart = length & 0xfffffff8; cursrc1 = &Src1[istart]; cursrc2 = &Src2[istart]; curdst = &Dest[istart]; } else { /* No unaligned bytes - we are done */ return (0); } } else { /* Setup to process whole image */ istart = 0; cursrc1 = Src1; cursrc2 = Src2; curdst = Dest; } /* C routine to process image */ for (i = istart; i < length; i++) { *curdst = *cursrc1 | *cursrc2; /* Advance pointers */ cursrc1++; cursrc2++; curdst++; } return (0); } /*! \brief Internal ASM Filter using Div: D = S1 / S2 \param Src1 Pointer to the start of the first source byte array (S1). \param Src2 Pointer to the start of the second source byte array (S2). \param Dest Pointer to the start of the destination byte array (D). \param SrcLength The number of bytes in the source arrays. \return Returns 0 for success or -1 for error. */ static int SDL_imageFilterDivASM(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength) { #ifdef USE_MMX #if !defined(GCC__) __asm { pusha mov edx, Src1 /* load Src1 address into edx */ mov esi, Src2 /* load Src2 address into esi */ mov edi, Dest /* load Dest address into edi */ mov ecx, SrcLength /* load loop counter (SIZE) into ecx */ align 16 /* 16 byte alignment of the loop entry */ L10191: mov bl, [esi] /* load a byte from Src2 */ cmp bl, 0 /* check if it zero */ jnz L10192 mov [edi], 255 /* division by zero = 255 !!! */ jmp L10193 L10192: xor ah, ah /* prepare AX, zero AH register */ mov al, [edx] /* load a byte from Src1 into AL */ div bl /* divide AL by BL */ mov [edi], al /* move a byte result to Dest */ L10193: inc edx /* increment Src1, Src2, Dest */ inc esi /* pointer registers by one */ inc edi dec ecx /* decrease loop counter */ jnz L10191 /* check loop termination, proceed if required */ popa } #else /* Note: ~15% gain on i386, less efficient than C on x86_64 */ /* Also depends on whether the function is static (?!) */ /* Also depends on whether we work on malloc() or static char[] */ asm volatile ( # if defined(i386) "pushl %%ebx \n\t" /* %ebx may be the PIC register. */ ".align 16 \n\t" /* 16 byte alignment of the loop entry */ "1: mov (%%esi), %%bl \n\t" /* load a byte from Src2 */ "cmp $0, %%bl \n\t" /* check if it zero */ "jnz 2f \n\t" "movb $255, (%%edi) \n\t" /* division by zero = 255 !!! */ "jmp 3f \n\t" "2: xor %%ah, %%ah \n\t" /* prepare AX, zero AH register */ "mov (%%edx), %%al \n\t" /* load a byte from Src1 into AL */ "div %%bl \n\t" /* divide AL by BL */ "mov %%al, (%%edi) \n\t" /* move a byte result to Dest */ "3: inc %%edx \n\t" /* increment Src1, Src2, Dest */ "inc %%esi \n\t" /* pointer registers by one */ "inc %%edi \n\t" "dec %%ecx \n\t" /* decrease loop counter */ "jnz 1b \n\t" /* check loop termination, proceed if required */ "popl %%ebx \n\t" /* restore %ebx */ : "+d" (Src1), /* load Src1 address into edx */ "+S" (Src2), /* load Src2 address into esi */ "+c" (SrcLength), /* load loop counter (SIZE) into ecx */ "+D" (Dest) /* load Dest address into edi */ : : "memory", "rax" # elif defined(__x86_64__) ".align 16 \n\t" /* 16 byte alignment of the loop entry */ "1: mov (%%rsi), %%bl \n\t" /* load a byte from Src2 */ "cmp $0, %%bl \n\t" /* check if it zero */ "jnz 2f \n\t" "movb $255, (%%rdi) \n\t" /* division by zero = 255 !!! */ "jmp 3f \n\t" "2: xor %%ah, %%ah \n\t" /* prepare AX, zero AH register */ "mov (%%rdx), %%al \n\t" /* load a byte from Src1 into AL */ "div %%bl \n\t" /* divide AL by BL */ "mov %%al, (%%rdi) \n\t" /* move a byte result to Dest */ "3: inc %%rdx \n\t" /* increment Src1, Src2, Dest */ "inc %%rsi \n\t" /* pointer registers by one */ "inc %%rdi \n\t" "dec %%rcx \n\t" /* decrease loop counter */ "jnz 1b \n\t" /* check loop termination, proceed if required */ : "+d" (Src1), /* load Src1 address into edx */ "+S" (Src2), /* load Src2 address into esi */ "+c" (SrcLength), /* load loop counter (SIZE) into ecx */ "+D" (Dest) /* load Dest address into edi */ : : "memory", "rax", "rbx" # endif ); #endif return (0); #else return (-1); #endif } /*! \brief Filter using Div: D = S1 / S2 \param Src1 Pointer to the start of the first source byte array (S1). \param Src2 Pointer to the start of the second source byte array (S2). \param Dest Pointer to the start of the destination byte array (D). \param length The number of bytes in the source arrays. \return Returns 0 for success or -1 for error. */ int SDL_imageFilterDiv(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length) { unsigned int i, istart; unsigned char *cursrc1, *cursrc2, *curdst; /* Validate input parameters */ if ((Src1 == NULL) || (Src2 == NULL) || (Dest == NULL)) return(-1); if (length == 0) return(0); if (SDL_imageFilterMMXdetect()) { if (length > 0) { /* Call ASM routine */ SDL_imageFilterDivASM(Src1, Src2, Dest, length); /* Never unaligned bytes - we are done */ return (0); } else { return (-1); } } /* Setup to process whole image */ istart = 0; cursrc1 = Src1; cursrc2 = Src2; curdst = Dest; /* C routine to process image */ /* for (i = istart; i < length; i++) { */ /* if (*cursrc2 == 0) { */ /* *curdst = 255; */ /* } else { */ /* result = (int) *cursrc1 / (int) *cursrc2; */ /* *curdst = (unsigned char) result; */ /* } */ /* /\* Advance pointers *\/ */ /* cursrc1++; */ /* cursrc2++; */ /* curdst++; */ /* } */ for (i = istart; i < length; i++) { if (*cursrc2 == 0) { *curdst = 255; } else { *curdst = (int)*cursrc1 / (int)*cursrc2; // (int) for efficiency } /* Advance pointers */ cursrc1++; cursrc2++; curdst++; } return (0); } /* ------------------------------------------------------------------------------------ */ /*! \brief Internal MMX Filter using BitNegation: D = !S \param Src1 Pointer to the start of the source byte array (S1). \param Dest Pointer to the start of the destination byte array (D). \param SrcLength The number of bytes in the source array. \return Returns 0 for success or -1 for error. */ static int SDL_imageFilterBitNegationMMX(unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength) { #ifdef USE_MMX #if !defined(GCC__) __asm { pusha pcmpeqb mm1, mm1 /* generate all 1's in mm1 */ mov eax, Src1 /* load Src1 address into eax */ mov edi, Dest /* load Dest address into edi */ mov ecx, SrcLength /* load loop counter (SIZE) into ecx */ shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */ align 16 /* 16 byte alignment of the loop entry */ L91117: movq mm0, [eax] /* load 8 bytes from Src1 into mm1 */ pxor mm0, mm1 /* negate mm0 by xoring with mm1 */ movq [edi], mm0 /* store result in Dest */ add eax, 8 /* increase Src1, Src2 and Dest */ add edi, 8 dec ecx /* decrease loop counter */ jnz L91117 /* check loop termination, proceed if required */ emms /* exit MMX state */ popa } #else /* i386 and x86_64 */ __m64 *mSrc1 = (__m64*)Src1; __m64 *mDest = (__m64*)Dest; __m64 mm1; mm1 = _m_pcmpeqb(mm1, mm1); /* generate all 1's in mm1 */ int i; for (i = 0; i < SrcLength/8; i++) { *mDest = _m_pxor(*mSrc1, mm1); /* negate mm0 by xoring with mm1 */ mSrc1++; mDest++; } _m_empty(); /* clean MMX state */ #endif return (0); #else return (-1); #endif } /*! \brief Filter using BitNegation: D = !S \param Src1 Pointer to the start of the source byte array (S). \param Dest Pointer to the start of the destination byte array (D). \param length The number of bytes in the source array. \return Returns 0 for success or -1 for error. */ int SDL_imageFilterBitNegation(unsigned char *Src1, unsigned char *Dest, unsigned int length) { unsigned int i, istart; unsigned char *cursrc1, *curdst; /* Validate input parameters */ if ((Src1 == NULL) || (Dest == NULL)) return(-1); if (length == 0) return(0); if ((SDL_imageFilterMMXdetect()) && (length > 7)) { /* MMX routine */ SDL_imageFilterBitNegationMMX(Src1, Dest, length); /* Check for unaligned bytes */ if ((length & 7) > 0) { /* Setup to process unaligned bytes */ istart = length & 0xfffffff8; cursrc1 = &Src1[istart]; curdst = &Dest[istart]; } else { /* No unaligned bytes - we are done */ return (0); } } else { /* Setup to process whole image */ istart = 0; cursrc1 = Src1; curdst = Dest; } /* C routine to process image */ for (i = istart; i < length; i++) { *curdst = ~(*cursrc1); /* Advance pointers */ cursrc1++; curdst++; } return (0); } /*! \brief Internal MMX Filter using AddByte: D = saturation255(S + C) \param Src1 Pointer to the start of the source byte array (S). \param Dest Pointer to the start of the destination byte array (D). \param SrcLength The number of bytes in the source array. \param C Constant value to add (C). \return Returns 0 for success or -1 for error. */ static int SDL_imageFilterAddByteMMX(unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char C) { #ifdef USE_MMX #if !defined(GCC__) __asm { pusha /* ** Duplicate C in 8 bytes of MM1 ** */ mov al, C /* load C into AL */ mov ah, al /* copy AL into AH */ mov bx, ax /* copy AX into BX */ shl eax, 16 /* shift 2 bytes of EAX left */ mov ax, bx /* copy BX into AX */ movd mm1, eax /* copy EAX into MM1 */ movd mm2, eax /* copy EAX into MM2 */ punpckldq mm1, mm2 /* fill higher bytes of MM1 with C */ mov eax, Src1 /* load Src1 address into eax */ mov edi, Dest /* load Dest address into edi */ mov ecx, SrcLength /* load loop counter (SIZE) into ecx */ shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */ align 16 /* 16 byte alignment of the loop entry */ L1021: movq mm0, [eax] /* load 8 bytes from Src1 into MM0 */ paddusb mm0, mm1 /* MM0=SrcDest+C (add 8 bytes with saturation) */ movq [edi], mm0 /* store result in Dest */ add eax, 8 /* increase Dest register pointer by 8 */ add edi, 8 /* increase Dest register pointer by 8 */ dec ecx /* decrease loop counter */ jnz L1021 /* check loop termination, proceed if required */ emms /* exit MMX state */ popa } #else /* i386 and x86_64 */ __m64 *mSrc1 = (__m64*)Src1; __m64 *mDest = (__m64*)Dest; /* Duplicate C in 8 bytes of MM1 */ int i; memset(&i, C, 4); __m64 mm1 = _m_from_int(i); __m64 mm2 = _m_from_int(i); mm1 = _m_punpckldq(mm1, mm2); /* fill higher bytes of MM1 with C */ //__m64 mm1 = _m_from_int64(lli); // x86_64 only for (i = 0; i < SrcLength/8; i++) { *mDest = _m_paddusb(*mSrc1, mm1); /* Src1+C (add 8 bytes with saturation) */ mSrc1++; mDest++; } _m_empty(); /* clean MMX state */ #endif return (0); #else return (-1); #endif } /*! \brief Filter using AddByte: D = saturation255(S + C) \param Src1 Pointer to the start of the source byte array (S). \param Dest Pointer to the start of the destination byte array (D). \param length The number of bytes in the source array. \param C Constant value to add (C). \return Returns 0 for success or -1 for error. */ int SDL_imageFilterAddByte(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C) { unsigned int i, istart; int iC; unsigned char *cursrc1, *curdest; int result; /* Validate input parameters */ if ((Src1 == NULL) || (Dest == NULL)) return(-1); if (length == 0) return(0); /* Special case: C==0 */ if (C == 0) { memcpy(Src1, Dest, length); return (0); } if ((SDL_imageFilterMMXdetect()) && (length > 7)) { /* MMX routine */ SDL_imageFilterAddByteMMX(Src1, Dest, length, C); /* Check for unaligned bytes */ if ((length & 7) > 0) { /* Setup to process unaligned bytes */ istart = length & 0xfffffff8; cursrc1 = &Src1[istart]; curdest = &Dest[istart]; } else { /* No unaligned bytes - we are done */ return (0); } } else { /* Setup to process whole image */ istart = 0; cursrc1 = Src1; curdest = Dest; } /* C routine to process image */ iC = (int) C; for (i = istart; i < length; i++) { result = (int) *cursrc1 + iC; if (result > 255) result = 255; *curdest = (unsigned char) result; /* Advance pointers */ cursrc1++; curdest++; } return (0); } /*! \brief Internal MMX Filter using AddUint: D = saturation255((S[i] + Cs[i % 4]), Cs=Swap32((uint)C) \param Src1 Pointer to the start of the source byte array (S). \param Dest Pointer to the start of the destination byte array (D). \param SrcLength The number of bytes in the source array. \param C Constant to add (C). \param D Byteorder-swapped constant to add (Cs). \return Returns 0 for success or -1 for error. */ static int SDL_imageFilterAddUintMMX(unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned int C, unsigned int D) { #ifdef USE_MMX #if !defined(GCC__) __asm { pusha /* ** Duplicate (int)C in 8 bytes of MM1 ** */ mov eax, C /* load C into EAX */ movd mm1, eax /* copy EAX into MM1 */ mov eax, D /* load D into EAX */ movd mm2, eax /* copy EAX into MM2 */ punpckldq mm1, mm2 /* fill higher bytes of MM1 with C */ mov eax, Src1 /* load Src1 address into eax */ mov edi, Dest /* load Dest address into edi */ mov ecx, SrcLength /* load loop counter (SIZE) into ecx */ shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */ align 16 /* 16 byte alignment of the loop entry */ L11023: movq mm0, [eax] /* load 8 bytes from SrcDest into MM0 */ paddusb mm0, mm1 /* MM0=SrcDest+C (add 8 bytes with saturation) */ movq [edi], mm0 /* store result in SrcDest */ add eax, 8 /* increase Src1 register pointer by 8 */ add edi, 8 /* increase Dest register pointer by 8 */ dec ecx /* decrease loop counter */ jnz L11023 /* check loop termination, proceed if required */ emms /* exit MMX state */ popa } #else /* i386 and x86_64 */ __m64 *mSrc1 = (__m64*)Src1; __m64 *mDest = (__m64*)Dest; /* Duplicate (int)C in 8 bytes of MM1 */ __m64 mm1 = _m_from_int(C); __m64 mm2 = _m_from_int(C); mm1 = _m_punpckldq(mm1, mm2); /* fill higher bytes of MM1 with C */ //__m64 mm1 = _m_from_int64(lli); // x86_64 only int i; for (i = 0; i < SrcLength/8; i++) { *mDest = _m_paddusb(*mSrc1, mm1); /* Src1+C (add 8 bytes with saturation) */ mSrc1++; mDest++; } _m_empty(); /* clean MMX state */ #endif return (0); #else return (-1); #endif } /*! \brief Filter using AddUint: D = saturation255((S[i] + Cs[i % 4]), Cs=Swap32((uint)C) \param Src1 Pointer to the start of the source byte array (S). \param Dest Pointer to the start of the destination byte array (D). \param length The number of bytes in the source array. \param C Constant to add (C). \return Returns 0 for success or -1 for error. */ int SDL_imageFilterAddUint(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned int C) { unsigned int i, j, istart, D; int iC[4]; unsigned char *cursrc1; unsigned char *curdest; int result; /* Validate input parameters */ if ((Src1 == NULL) || (Dest == NULL)) return(-1); if (length == 0) return(0); /* Special case: C==0 */ if (C == 0) { memcpy(Src1, Dest, length); return (0); } if ((SDL_imageFilterMMXdetect()) && (length > 7)) { /* MMX routine */ D=SWAP_32(C); SDL_imageFilterAddUintMMX(Src1, Dest, length, C, D); /* Check for unaligned bytes */ if ((length & 7) > 0) { /* Setup to process unaligned bytes */ istart = length & 0xfffffff8; cursrc1 = &Src1[istart]; curdest = &Dest[istart]; } else { /* No unaligned bytes - we are done */ return (0); } } else { /* Setup to process whole image */ istart = 0; cursrc1 = Src1; curdest = Dest; } /* C routine to process bytes */ iC[3] = (int) ((C >> 24) & 0xff); iC[2] = (int) ((C >> 16) & 0xff); iC[1] = (int) ((C >> 8) & 0xff); iC[0] = (int) ((C >> 0) & 0xff); for (i = istart; i < length; i += 4) { for (j = 0; j < 4; j++) { if ((i+j) 255) result = 255; *curdest = (unsigned char) result; /* Advance pointers */ cursrc1++; curdest++; } } } return (0); } /*! \brief Internal MMX Filter using AddByteToHalf: D = saturation255(S/2 + C) \param Src1 Pointer to the start of the source byte array (S). \param Dest Pointer to the start of the destination byte array (D). \param SrcLength The number of bytes in the source array. \param C Constant to add (C). \param Mask Pointer to 8 mask bytes of value 0x7F. \return Returns 0 for success or -1 for error. */ static int SDL_imageFilterAddByteToHalfMMX(unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char C, unsigned char *Mask) { #ifdef USE_MMX #if !defined(GCC__) __asm { pusha /* ** Duplicate C in 8 bytes of MM1 ** */ mov al, C /* load C into AL */ mov ah, al /* copy AL into AH */ mov bx, ax /* copy AX into BX */ shl eax, 16 /* shift 2 bytes of EAX left */ mov ax, bx /* copy BX into AX */ movd mm1, eax /* copy EAX into MM1 */ movd mm2, eax /* copy EAX into MM2 */ punpckldq mm1, mm2 /* fill higher bytes of MM1 with C */ mov edx, Mask /* load Mask address into edx */ movq mm0, [edx] /* load Mask into mm0 */ mov eax, Src1 /* load Src1 address into eax */ mov edi, Dest /* load Dest address into edi */ mov ecx, SrcLength /* load loop counter (SIZE) into ecx */ shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */ align 16 /* 16 byte alignment of the loop entry */ L1022: movq mm2, [eax] /* load 8 bytes from Src1 into MM2 */ psrlw mm2, 1 /* shift 4 WORDS of MM2 1 bit to the right */ pand mm2, mm0 // apply Mask to 8 BYTES of MM2 */ paddusb mm2, mm1 /* MM2=SrcDest+C (add 8 bytes with saturation) */ movq [edi], mm2 /* store result in Dest */ add eax, 8 /* increase Src1 register pointer by 8 */ add edi, 8 /* increase Dest register pointer by 8 */ dec ecx /* decrease loop counter */ jnz L1022 /* check loop termination, proceed if required */ emms /* exit MMX state */ popa } #else /* i386 and x86_64 */ __m64 *mSrc1 = (__m64*)Src1; __m64 *mDest = (__m64*)Dest; __m64 *mMask = (__m64*)Mask; /* Duplicate C in 8 bytes of MM1 */ int i; memset(&i, C, 4); __m64 mm1 = _m_from_int(i); __m64 mm2 = _m_from_int(i); mm1 = _m_punpckldq(mm1, mm2); /* fill higher bytes of MM1 with C */ //__m64 mm1 = _m_from_int64(lli); // x86_64 only for (i = 0; i < SrcLength/8; i++) { __m64 mm2 = _m_psrlwi(*mSrc1, 1); /* shift 4 WORDS of MM2 1 bit to the right */ mm2 = _m_pand(mm2, *mMask); /* apply Mask to 8 BYTES of MM2 */ /* byte 0x0f, 0xdb, 0xd0 */ *mDest = _m_paddusb(mm1, mm2); /* Src1+C (add 8 bytes with saturation) */ mSrc1++; mDest++; } _m_empty(); /* clean MMX state */ #endif return (0); #else return (-1); #endif } /*! \brief Filter using AddByteToHalf: D = saturation255(S/2 + C) \param Src1 Pointer to the start of the source byte array (S). \param Dest Pointer to the start of the destination byte array (D). \param length The number of bytes in the source array. \param C Constant to add (C). \return Returns 0 for success or -1 for error. */ int SDL_imageFilterAddByteToHalf(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C) { static unsigned char Mask[8] = { 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F }; unsigned int i, istart; int iC; unsigned char *cursrc1; unsigned char *curdest; int result; /* Validate input parameters */ if ((Src1 == NULL) || (Dest == NULL)) return(-1); if (length == 0) return(0); if ((SDL_imageFilterMMXdetect()) && (length > 7)) { /* MMX routine */ SDL_imageFilterAddByteToHalfMMX(Src1, Dest, length, C, Mask); /* Check for unaligned bytes */ if ((length & 7) > 0) { /* Setup to process unaligned bytes */ istart = length & 0xfffffff8; cursrc1 = &Src1[istart]; curdest = &Dest[istart]; } else { /* No unaligned bytes - we are done */ return (0); } } else { /* Setup to process whole image */ istart = 0; cursrc1 = Src1; curdest = Dest; } /* C routine to process image */ iC = (int) C; for (i = istart; i < length; i++) { result = (int) (*cursrc1 / 2) + iC; if (result > 255) result = 255; *curdest = (unsigned char) result; /* Advance pointers */ cursrc1++; curdest++; } return (0); } /*! \brief Internal MMX Filter using SubByte: D = saturation0(S - C) \param Src1 Pointer to the start of the source byte array (S). \param Dest Pointer to the start of the destination byte array (D). \param SrcLength The number of bytes in the source array. \param C Constant to subtract (C). \return Returns 0 for success or -1 for error. */ int SDL_imageFilterSubByteMMX(unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char C) { #ifdef USE_MMX #if !defined(GCC__) __asm { pusha /* ** Duplicate C in 8 bytes of MM1 ** */ mov al, C /* load C into AL */ mov ah, al /* copy AL into AH */ mov bx, ax /* copy AX into BX */ shl eax, 16 /* shift 2 bytes of EAX left */ mov ax, bx /* copy BX into AX */ movd mm1, eax /* copy EAX into MM1 */ movd mm2, eax /* copy EAX into MM2 */ punpckldq mm1, mm2 /* fill higher bytes of MM1 with C */ mov eax, Src1 /* load Src1 address into eax */ mov edi, Dest /* load Dest address into edi */ mov ecx, SrcLength /* load loop counter (SIZE) into ecx */ shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */ align 16 /* 16 byte alignment of the loop entry */ L1023: movq mm0, [eax] /* load 8 bytes from SrcDest into MM0 */ psubusb mm0, mm1 /* MM0=SrcDest-C (sub 8 bytes with saturation) */ movq [edi], mm0 /* store result in SrcDest */ add eax, 8 /* increase Src1 register pointer by 8 */ add edi, 8 /* increase Dest register pointer by 8 */ dec ecx /* decrease loop counter */ jnz L1023 /* check loop termination, proceed if required */ emms /* exit MMX state */ popa } #else /* i386 and x86_64 */ __m64 *mSrc1 = (__m64*)Src1; __m64 *mDest = (__m64*)Dest; /* Duplicate C in 8 bytes of MM1 */ int i; memset(&i, C, 4); __m64 mm1 = _m_from_int(i); __m64 mm2 = _m_from_int(i); mm1 = _m_punpckldq(mm1, mm2); /* fill higher bytes of MM1 with C */ //__m64 mm1 = _m_from_int64(lli); // x86_64 only for (i = 0; i < SrcLength/8; i++) { *mDest = _m_psubusb(*mSrc1, mm1); /* Src1-C (sub 8 bytes with saturation) */ mSrc1++; mDest++; } _m_empty(); /* clean MMX state */ #endif return (0); #else return (-1); #endif } /*! \brief Filter using SubByte: D = saturation0(S - C) \param Src1 Pointer to the start of the source byte array (S). \param Dest Pointer to the start of the destination byte array (D). \param length The number of bytes in the source arrays. \param C Constant to subtract (C). \return Returns 0 for success or -1 for error. */ int SDL_imageFilterSubByte(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C) { unsigned int i, istart; int iC; unsigned char *cursrc1; unsigned char *curdest; int result; /* Validate input parameters */ if ((Src1 == NULL) || (Dest == NULL)) return(-1); if (length == 0) return(0); /* Special case: C==0 */ if (C == 0) { memcpy(Src1, Dest, length); return (0); } if ((SDL_imageFilterMMXdetect()) && (length > 7)) { /* MMX routine */ SDL_imageFilterSubByteMMX(Src1, Dest, length, C); /* Check for unaligned bytes */ if ((length & 7) > 0) { /* Setup to process unaligned bytes */ istart = length & 0xfffffff8; cursrc1 = &Src1[istart]; curdest = &Dest[istart]; } else { /* No unaligned bytes - we are done */ return (0); } } else { /* Setup to process whole image */ istart = 0; cursrc1 = Src1; curdest = Dest; } /* C routine to process image */ iC = (int) C; for (i = istart; i < length; i++) { result = (int) *cursrc1 - iC; if (result < 0) result = 0; *curdest = (unsigned char) result; /* Advance pointers */ cursrc1++; curdest++; } return (0); } /*! \brief Internal MMX Filter using SubUint: D = saturation0(S[i] - Cs[i % 4]), Cs=Swap32((uint)C) \param Src1 Pointer to the start of the source byte array (S). \param Dest Pointer to the start of the destination byte array (D). \param SrcLength The number of bytes in the source array. \param C Constant to subtract (C). \param D Byteorder-swapped constant to subtract (Cs). \return Returns 0 for success or -1 for error. */ static int SDL_imageFilterSubUintMMX(unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned int C, unsigned int D) { #ifdef USE_MMX #if !defined(GCC__) __asm { pusha /* ** Duplicate (int)C in 8 bytes of MM1 ** */ mov eax, C /* load C into EAX */ movd mm1, eax /* copy EAX into MM1 */ mov eax, D /* load D into EAX */ movd mm2, eax /* copy EAX into MM2 */ punpckldq mm1, mm2 /* fill higher bytes of MM1 with C */ mov eax, Src1 /* load Src1 address into eax */ mov edi, Dest /* load Dest address into edi */ mov ecx, SrcLength /* load loop counter (SIZE) into ecx */ shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */ align 16 /* 16 byte alignment of the loop entry */ L11024: movq mm0, [eax] /* load 8 bytes from SrcDest into MM0 */ psubusb mm0, mm1 /* MM0=SrcDest-C (sub 8 bytes with saturation) */ movq [edi], mm0 /* store result in SrcDest */ add eax, 8 /* increase Src1 register pointer by 8 */ add edi, 8 /* increase Dest register pointer by 8 */ dec ecx /* decrease loop counter */ jnz L11024 /* check loop termination, proceed if required */ emms /* exit MMX state */ popa } #else /* i386 and x86_64 */ __m64 *mSrc1 = (__m64*)Src1; __m64 *mDest = (__m64*)Dest; /* Duplicate (int)C in 8 bytes of MM1 */ __m64 mm1 = _m_from_int(C); __m64 mm2 = _m_from_int(C); mm1 = _m_punpckldq(mm1, mm2); /* fill higher bytes of MM1 with C */ //__m64 mm1 = _m_from_int64(lli); // x86_64 only int i; for (i = 0; i < SrcLength/8; i++) { *mDest = _m_psubusb(*mSrc1, mm1); /* Src1-C (sub 8 bytes with saturation) */ mSrc1++; mDest++; } _m_empty(); /* clean MMX state */ #endif return (0); #else return (-1); #endif } /*! \brief Filter using SubUint: D = saturation0(S[i] - Cs[i % 4]), Cs=Swap32((uint)C) \param Src1 Pointer to the start of the source byte array (S1). \param Dest Pointer to the start of the destination byte array (D). \param length The number of bytes in the source array. \param C Constant to subtract (C). \return Returns 0 for success or -1 for error. */ int SDL_imageFilterSubUint(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned int C) { unsigned int i, j, istart, D; int iC[4]; unsigned char *cursrc1; unsigned char *curdest; int result; /* Validate input parameters */ if ((Src1 == NULL) || (Dest == NULL)) return(-1); if (length == 0) return(0); /* Special case: C==0 */ if (C == 0) { memcpy(Src1, Dest, length); return (0); } if ((SDL_imageFilterMMXdetect()) && (length > 7)) { /* MMX routine */ D=SWAP_32(C); SDL_imageFilterSubUintMMX(Src1, Dest, length, C, D); /* Check for unaligned bytes */ if ((length & 7) > 0) { /* Setup to process unaligned bytes */ istart = length & 0xfffffff8; cursrc1 = &Src1[istart]; curdest = &Dest[istart]; } else { /* No unaligned bytes - we are done */ return (0); } } else { /* Setup to process whole image */ istart = 0; cursrc1 = Src1; curdest = Dest; } /* C routine to process image */ iC[3] = (int) ((C >> 24) & 0xff); iC[2] = (int) ((C >> 16) & 0xff); iC[1] = (int) ((C >> 8) & 0xff); iC[0] = (int) ((C >> 0) & 0xff); for (i = istart; i < length; i += 4) { for (j = 0; j < 4; j++) { if ((i+j)> N) \param Src1 Pointer to the start of the source byte array (S). \param Dest Pointer to the start of the destination byte array (D). \param SrcLength The number of bytes in the source array. \param N Number of bit-positions to shift (N). Valid range is 0 to 8. \param Mask Byte array containing 8 bytes with 0x7F value. \return Returns 0 for success or -1 for error. */ static int SDL_imageFilterShiftRightMMX(unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char N, unsigned char *Mask) { #ifdef USE_MMX #if !defined(GCC__) __asm { pusha mov edx, Mask /* load Mask address into edx */ movq mm0, [edx] /* load Mask into mm0 */ xor ecx, ecx /* zero ECX */ mov cl, N /* load loop counter (N) into CL */ movd mm3, ecx /* copy (N) into MM3 */ pcmpeqb mm1, mm1 /* generate all 1's in mm1 */ L10240: /* ** Prepare proper bit-Mask in MM1 ** */ psrlw mm1, 1 /* shift 4 WORDS of MM1 1 bit to the right */ pand mm1, mm0 // apply Mask to 8 BYTES of MM1 */ /* byte 0x0f, 0xdb, 0xc8 */ dec cl /* decrease loop counter */ jnz L10240 /* check loop termination, proceed if required */ /* ** Shift all bytes of the image ** */ mov eax, Src1 /* load Src1 address into eax */ mov edi, Dest /* load Dest address into edi */ mov ecx, SrcLength /* load loop counter (SIZE) into ecx */ shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */ align 16 /* 16 byte alignment of the loop entry */ L10241: movq mm0, [eax] /* load 8 bytes from SrcDest into MM0 */ psrlw mm0, mm3 /* shift 4 WORDS of MM0 (N) bits to the right */ pand mm0, mm1 // apply proper bit-Mask to 8 BYTES of MM0 */ /* byte 0x0f, 0xdb, 0xc1 */ movq [edi], mm0 /* store result in SrcDest */ add eax, 8 /* increase Src1 register pointer by 8 */ add edi, 8 /* increase Dest register pointer by 8 */ dec ecx /* decrease loop counter */ jnz L10241 /* check loop termination, proceed if required */ emms /* exit MMX state */ popa } #else /* i386 and x86_64 */ __m64 *mSrc1 = (__m64*)Src1; __m64 *mDest = (__m64*)Dest; __m64 *mMask = (__m64*)Mask; __m64 mm1; int i; mm1 = _m_pcmpeqb(mm1, mm1); /* generate all 1's in mm1 */ /* Prepare proper bit-Mask in MM1 */ for (i = 0; i < N; i++) { mm1 = _m_psrlwi(mm1, 1); /* shift 4 WORDS of MM1 1 bit to the right */ mm1 = _m_pand(mm1, *mMask); /* apply Mask to 8 BYTES of MM1 */ } /* Shift all bytes of the image */ for (i = 0; i < SrcLength/8; i++) { __m64 mm0 = _m_psrlwi(*mSrc1, N); /* shift 4 WORDS of MM0 (N) bits to the right */ *mDest = _m_pand(mm0, mm1); /* apply proper bit-Mask to 8 BYTES of MM0 */ mSrc1++; mDest++; } _m_empty(); /* clean MMX state */ #endif return (0); #else return (-1); #endif } /*! \brief Filter using ShiftRight: D = saturation0(S >> N) \param Src1 Pointer to the start of the source byte array (S). \param Dest Pointer to the start of the destination byte array (D). \param length The number of bytes in the source array. \param N Number of bit-positions to shift (N). Valid range is 0 to 8. \return Returns 0 for success or -1 for error. */ int SDL_imageFilterShiftRight(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N) { static unsigned char Mask[8] = { 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F }; unsigned int i, istart; unsigned char *cursrc1; unsigned char *curdest; /* Validate input parameters */ if ((Src1 == NULL) || (Dest == NULL)) return(-1); if (length == 0) return(0); /* Check shift */ if (N > 8) { return (-1); } /* Special case: N==0 */ if (N == 0) { memcpy(Src1, Dest, length); return (0); } if ((SDL_imageFilterMMXdetect()) && (length > 7)) { /* MMX routine */ SDL_imageFilterShiftRightMMX(Src1, Dest, length, N, Mask); /* Check for unaligned bytes */ if ((length & 7) > 0) { /* Setup to process unaligned bytes */ istart = length & 0xfffffff8; cursrc1 = &Src1[istart]; curdest = &Dest[istart]; } else { /* No unaligned bytes - we are done */ return (0); } } else { /* Setup to process whole image */ istart = 0; cursrc1 = Src1; curdest = Dest; } /* C routine to process image */ for (i = istart; i < length; i++) { *curdest = (unsigned char) *cursrc1 >> N; /* Advance pointers */ cursrc1++; curdest++; } return (0); } /*! \brief Internal MMX Filter using ShiftRightUint: D = saturation0((uint)S[i] >> N) \param Src1 Pointer to the start of the source byte array (S1). \param Dest Pointer to the start of the destination byte array (D). \param SrcLength The number of bytes in the source array. \param N Number of bit-positions to shift (N). \return Returns 0 for success or -1 for error. */ static int SDL_imageFilterShiftRightUintMMX(unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char N) { #ifdef USE_MMX #if !defined(GCC__) __asm { pusha mov eax, Src1 /* load Src1 address into eax */ mov edi, Dest /* load Dest address into edi */ mov ecx, SrcLength /* load loop counter (SIZE) into ecx */ shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */ align 16 /* 16 byte alignment of the loop entry */ L13023: movq mm0, [eax] /* load 8 bytes from SrcDest into MM0 */ psrld mm0, N movq [edi], mm0 /* store result in SrcDest */ add eax, 8 /* increase Src1 register pointer by 8 */ add edi, 8 /* increase Dest register pointer by 8 */ dec ecx /* decrease loop counter */ jnz L13023 /* check loop termination, proceed if required */ emms /* exit MMX state */ popa } #else /* i386 and x86_64 */ __m64 *mSrc1 = (__m64*)Src1; __m64 *mDest = (__m64*)Dest; int i; for (i = 0; i < SrcLength/8; i++) { *mDest = _m_psrldi(*mSrc1, N); mSrc1++; mDest++; } _m_empty(); /* clean MMX state */ #endif return (0); #else return (-1); #endif } /*! \brief Filter using ShiftRightUint: D = saturation0((uint)S[i] >> N) \param Src1 Pointer to the start of the source byte array (S1). \param Dest Pointer to the start of the destination byte array (D). \param length The number of bytes in the source array. \param N Number of bit-positions to shift (N). Valid range is 0 to 32. \return Returns 0 for success or -1 for error. */ int SDL_imageFilterShiftRightUint(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N) { unsigned int i, istart; unsigned char *cursrc1, *curdest; unsigned int *icursrc1, *icurdest; unsigned int result; /* Validate input parameters */ if ((Src1 == NULL) || (Dest == NULL)) return(-1); if (length == 0) return(0); if (N > 32) { return (-1); } /* Special case: N==0 */ if (N == 0) { memcpy(Src1, Dest, length); return (0); } if ((SDL_imageFilterMMXdetect()) && (length > 7)) { SDL_imageFilterShiftRightUintMMX(Src1, Dest, length, N); /* Check for unaligned bytes */ if ((length & 7) > 0) { /* Setup to process unaligned bytes */ istart = length & 0xfffffff8; cursrc1 = &Src1[istart]; curdest = &Dest[istart]; } else { /* No unaligned bytes - we are done */ return (0); } } else { /* Setup to process whole image */ istart = 0; cursrc1 = Src1; curdest = Dest; } /* C routine to process image */ icursrc1=(unsigned int *)cursrc1; icurdest=(unsigned int *)curdest; for (i = istart; i < length; i += 4) { if ((i+4)> N); *icurdest = result; } /* Advance pointers */ icursrc1++; icurdest++; } return (0); } /*! \brief Internal MMX Filter using MultByByte: D = saturation255(S * C) \param Src1 Pointer to the start of the source byte array (S). \param Dest Pointer to the start of the destination byte array (D). \param SrcLength The number of bytes in the source array. \param C Constant to multiply with (C). \return Returns 0 for success or -1 for error. */ static int SDL_imageFilterMultByByteMMX(unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char C) { #ifdef USE_MMX #if !defined(GCC__) __asm { pusha /* ** Duplicate C in 4 words of MM1 ** */ mov al, C /* load C into AL */ xor ah, ah /* zero AH */ mov bx, ax /* copy AX into BX */ shl eax, 16 /* shift 2 bytes of EAX left */ mov ax, bx /* copy BX into AX */ movd mm1, eax /* copy EAX into MM1 */ movd mm2, eax /* copy EAX into MM2 */ punpckldq mm1, mm2 /* fill higher words of MM1 with C */ pxor mm0, mm0 /* zero MM0 register */ mov eax, Src1 /* load Src1 address into eax */ mov edi, Dest /* load Dest address into edi */ mov ecx, SrcLength /* load loop counter (SIZE) into ecx */ shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */ cmp al, 128 /* if (C <= 128) execute more efficient code */ jg L10251 align 16 /* 16 byte alignment of the loop entry */ L10250: movq mm3, [eax] /* load 8 bytes from Src1 into MM3 */ movq mm4, mm3 /* copy MM3 into MM4 */ punpcklbw mm3, mm0 /* unpack low bytes of SrcDest into words */ punpckhbw mm4, mm0 /* unpack high bytes of SrcDest into words */ pmullw mm3, mm1 /* mul low bytes of SrcDest and MM1 */ pmullw mm4, mm1 /* mul high bytes of SrcDest and MM1 */ packuswb mm3, mm4 /* pack words back into bytes with saturation */ movq [edi], mm3 /* store result in Dest */ add eax, 8 /* increase Src1 register pointer by 8 */ add edi, 8 /* increase Dest register pointer by 8 */ dec ecx /* decrease loop counter */ jnz L10250 /* check loop termination, proceed if required */ jmp L10252 align 16 /* 16 byte alignment of the loop entry */ L10251: movq mm3, [eax] /* load 8 bytes from Src1 into MM3 */ movq mm4, mm3 /* copy MM3 into MM4 */ punpcklbw mm3, mm0 /* unpack low bytes of SrcDest into words */ punpckhbw mm4, mm0 /* unpack high bytes of SrcDest into words */ pmullw mm3, mm1 /* mul low bytes of SrcDest and MM1 */ pmullw mm4, mm1 /* mul high bytes of SrcDest and MM1 */ /* ** Take abs value of the results (signed words) ** */ movq mm5, mm3 /* copy mm3 into mm5 */ movq mm6, mm4 /* copy mm4 into mm6 */ psraw mm5, 15 /* fill mm5 words with word sign bit */ psraw mm6, 15 /* fill mm6 words with word sign bit */ pxor mm3, mm5 /* take 1's compliment of only neg words */ pxor mm4, mm6 /* take 1's compliment of only neg words */ psubsw mm3, mm5 /* add 1 to only neg words, W-(-1) or W-0 */ psubsw mm4, mm6 /* add 1 to only neg words, W-(-1) or W-0 */ packuswb mm3, mm4 /* pack words back into bytes with saturation */ movq [edi], mm3 /* store result in Dest */ add eax, 8 /* increase Src1 register pointer by 8 */ add edi, 8 /* increase Dest register pointer by 8 */ dec ecx /* decrease loop counter */ jnz L10251 /* check loop termination, proceed if required */ L10252: emms /* exit MMX state */ popa } #else /* i386 and x86_64 */ __m64 *mSrc1 = (__m64*)Src1; __m64 *mDest = (__m64*)Dest; __m64 mm0 = _m_from_int(0); /* zero mm0 register */ /* Duplicate C in 4 words of MM1 */ int i; i = C | C<<16; __m64 mm1 = _m_from_int(i); __m64 mm2 = _m_from_int(i); mm1 = _m_punpckldq(mm1, mm2); /* fill higher words of MM1 with C */ // long long lli = C | C<<16 | (long long)C<<32 | (long long)C<<48; //__m64 mm1 = _m_from_int64(lli); // x86_64 only if (C <= 128) { /* if (C <= 128) execute more efficient code */ for (i = 0; i < SrcLength/8; i++) { __m64 mm3, mm4; mm3 = _m_punpcklbw(*mSrc1, mm0); /* unpack low bytes of Src1 into words */ mm4 = _m_punpckhbw(*mSrc1, mm0); /* unpack high bytes of Src1 into words */ mm3 = _m_pmullw(mm3, mm1); /* mul low bytes of Src1 and MM1 */ mm4 = _m_pmullw(mm4, mm1); /* mul high bytes of Src1 and MM1 */ *mDest = _m_packuswb(mm3, mm4); /* pack words back into bytes with saturation */ mSrc1++; mDest++; } } else { for (i = 0; i < SrcLength/8; i++) { __m64 mm3, mm4, mm5, mm6; mm3 = _m_punpcklbw(*mSrc1, mm0); /* unpack low bytes of Src1 into words */ mm4 = _m_punpckhbw(*mSrc1, mm0); /* unpack high bytes of Src1 into words */ mm3 = _m_pmullw(mm3, mm1); /* mul low bytes of Src1 and MM1 */ mm4 = _m_pmullw(mm4, mm1); /* mul high bytes of Src1 and MM1 */ /* Take abs value of the results (signed words) */ mm5 = _m_psrawi(mm3, 15); /* fill mm5 words with word sign bit */ mm6 = _m_psrawi(mm4, 15); /* fill mm6 words with word sign bit */ mm3 = _m_pxor(mm3, mm5); /* take 1's compliment of only neg. words */ mm4 = _m_pxor(mm4, mm6); /* take 1's compliment of only neg. words */ mm3 = _m_psubsw(mm3, mm5); /* add 1 to only neg. words, W-(-1) or W-0 */ mm4 = _m_psubsw(mm4, mm6); /* add 1 to only neg. words, W-(-1) or W-0 */ *mDest = _m_packuswb(mm3, mm4); /* pack words back into bytes with saturation */ mSrc1++; mDest++; } } _m_empty(); /* clean MMX state */ #endif return (0); #else return (-1); #endif } /*! \brief Filter using MultByByte: D = saturation255(S * C) \param Src1 Pointer to the start of the source byte array (S). \param Dest Pointer to the start of the destination byte array (D). \param length The number of bytes in the source arrays. \param C Constant to multiply with (C). \return Returns 0 for success or -1 for error. */ int SDL_imageFilterMultByByte(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C) { unsigned int i, istart; int iC; unsigned char *cursrc1; unsigned char *curdest; int result; /* Validate input parameters */ if ((Src1 == NULL) || (Dest == NULL)) return(-1); if (length == 0) return(0); /* Special case: C==1 */ if (C == 1) { memcpy(Src1, Dest, length); return (0); } if ((SDL_imageFilterMMXdetect()) && (length > 7)) { SDL_imageFilterMultByByteMMX(Src1, Dest, length, C); /* Check for unaligned bytes */ if ((length & 7) > 0) { /* Setup to process unaligned bytes */ istart = length & 0xfffffff8; cursrc1 = &Src1[istart]; curdest = &Dest[istart]; } else { /* No unaligned bytes - we are done */ return (0); } } else { /* Setup to process whole image */ istart = 0; cursrc1 = Src1; curdest = Dest; } /* C routine to process image */ iC = (int) C; for (i = istart; i < length; i++) { result = (int) *cursrc1 * iC; if (result > 255) result = 255; *curdest = (unsigned char) result; /* Advance pointers */ cursrc1++; curdest++; } return (0); } /*! \brief Internal MMX Filter using ShiftRightAndMultByByteMMX: D = saturation255((S >> N) * C) \param Src1 Pointer to the start of the source byte array (S). \param Dest Pointer to the start of the destination byte array (D). \param SrcLength The number of bytes in the source array. \param N Number of bit-positions to shift (N). Valid range is 0 to 8. \param C Constant to multiply with (C). \return Returns 0 for success or -1 for error. */ static int SDL_imageFilterShiftRightAndMultByByteMMX(unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char N, unsigned char C) { #ifdef USE_MMX #if !defined(GCC__) __asm { pusha /* ** Duplicate C in 4 words of MM1 ** */ mov al, C /* load C into AL */ xor ah, ah /* zero AH */ mov bx, ax /* copy AX into BX */ shl eax, 16 /* shift 2 bytes of EAX left */ mov ax, bx /* copy BX into AX */ movd mm1, eax /* copy EAX into MM1 */ movd mm2, eax /* copy EAX into MM2 */ punpckldq mm1, mm2 /* fill higher words of MM1 with C */ xor ecx, ecx /* zero ECX */ mov cl, N /* load N into CL */ movd mm7, ecx /* copy N into MM7 */ pxor mm0, mm0 /* zero MM0 register */ mov eax, Src1 /* load Src1 address into eax */ mov edi, Dest /* load Dest address into edi */ mov ecx, SrcLength /* load loop counter (SIZE) into ecx */ shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */ align 16 /* 16 byte alignment of the loop entry */ L1026: movq mm3, [eax] /* load 8 bytes from Src1 into MM3 */ movq mm4, mm3 /* copy MM3 into MM4 */ punpcklbw mm3, mm0 /* unpack low bytes of SrcDest into words */ punpckhbw mm4, mm0 /* unpack high bytes of SrcDest into words */ psrlw mm3, mm7 /* shift 4 WORDS of MM3 (N) bits to the right */ psrlw mm4, mm7 /* shift 4 WORDS of MM4 (N) bits to the right */ pmullw mm3, mm1 /* mul low bytes of SrcDest by MM1 */ pmullw mm4, mm1 /* mul high bytes of SrcDest by MM1 */ packuswb mm3, mm4 /* pack words back into bytes with saturation */ movq [edi], mm3 /* store result in Dest */ add eax, 8 /* increase Src1 register pointer by 8 */ add edi, 8 /* increase Dest register pointer by 8 */ dec ecx /* decrease loop counter */ jnz L1026 /* check loop termination, proceed if required */ emms /* exit MMX state */ popa } #else /* i386 and x86_64 */ __m64 *mSrc1 = (__m64*)Src1; __m64 *mDest = (__m64*)Dest; __m64 mm0 = _m_from_int(0); /* zero mm0 register */ /* Duplicate C in 4 words of MM1 */ int i; i = (C<<16)|C; __m64 mm1 = _m_from_int(i); __m64 mm2 = _m_from_int(i); mm1 = _m_punpckldq(mm1, mm2); /* fill higher words of MM1 with C */ for (i = 0; i < SrcLength/8; i++) { __m64 mm3, mm4, mm5, mm6; mm3 = _m_punpcklbw(*mSrc1, mm0); /* unpack low bytes of Src1 into words */ mm4 = _m_punpckhbw(*mSrc1, mm0); /* unpack high bytes of Src1 into words */ mm3 = _m_psrlwi(mm3, N); /* shift 4 WORDS of MM3 (N) bits to the right */ mm4 = _m_psrlwi(mm4, N); /* shift 4 WORDS of MM4 (N) bits to the right */ mm3 = _m_pmullw(mm3, mm1); /* mul low bytes of Src1 and MM1 */ mm4 = _m_pmullw(mm4, mm1); /* mul high bytes of Src1 and MM1 */ *mDest = _m_packuswb(mm3, mm4); /* pack words back into bytes with saturation */ mSrc1++; mDest++; } _m_empty(); /* clean MMX state */ #endif return (0); #else return (-1); #endif } /*! \brief Filter using ShiftRightAndMultByByte: D = saturation255((S >> N) * C) \param Src1 Pointer to the start of the source byte array (S). \param Dest Pointer to the start of the destination byte array (D). \param length The number of bytes in the source array. \param N Number of bit-positions to shift (N). Valid range is 0 to 8. \param C Constant to multiply with (C). \return Returns 0 for success or -1 for error. */ int SDL_imageFilterShiftRightAndMultByByte(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N, unsigned char C) { unsigned int i, istart; int iC; unsigned char *cursrc1; unsigned char *curdest; int result; /* Validate input parameters */ if ((Src1 == NULL) || (Dest == NULL)) return(-1); if (length == 0) return(0); /* Check shift */ if (N > 8) { return (-1); } /* Special case: N==0 && C==1 */ if ((N == 0) && (C == 1)) { memcpy(Src1, Dest, length); return (0); } if ((SDL_imageFilterMMXdetect()) && (length > 7)) { SDL_imageFilterShiftRightAndMultByByteMMX(Src1, Dest, length, N, C); /* Check for unaligned bytes */ if ((length & 7) > 0) { /* Setup to process unaligned bytes */ istart = length & 0xfffffff8; cursrc1 = &Src1[istart]; curdest = &Dest[istart]; } else { /* No unaligned bytes - we are done */ return (0); } } else { /* Setup to process whole image */ istart = 0; cursrc1 = Src1; curdest = Dest; } /* C routine to process image */ iC = (int) C; for (i = istart; i < length; i++) { result = (int) (*cursrc1 >> N) * iC; if (result > 255) result = 255; *curdest = (unsigned char) result; /* Advance pointers */ cursrc1++; curdest++; } return (0); } /*! \brief Internal MMX Filter using ShiftLeftByte: D = (S << N) \param Src1 Pointer to the start of the source byte array (S). \param Dest Pointer to the start of the destination byte array (D). \param SrcLength The number of bytes in the source arrays. \param N Number of bit-positions to shift (N). Valid range is 0 to 8. \param Mask Byte array containing 8 bytes of 0xFE value. \return Returns 0 for success or -1 for error. */ static int SDL_imageFilterShiftLeftByteMMX(unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char N, unsigned char *Mask) { #ifdef USE_MMX #if !defined(GCC__) __asm { pusha mov edx, Mask /* load Mask address into edx */ movq mm0, [edx] /* load Mask into mm0 */ xor ecx, ecx /* zero ECX */ mov cl, N /* load loop counter (N) into CL */ movd mm3, ecx /* copy (N) into MM3 */ pcmpeqb mm1, mm1 /* generate all 1's in mm1 */ L10270: /* ** Prepare proper bit-Mask in MM1 ** */ psllw mm1, 1 /* shift 4 WORDS of MM1 1 bit to the left */ pand mm1, mm0 // apply Mask to 8 BYTES of MM1 */ /* byte 0x0f, 0xdb, 0xc8 */ dec cl /* decrease loop counter */ jnz L10270 /* check loop termination, proceed if required */ /* ** Shift all bytes of the image ** */ mov eax, Src1 /* load Src1 address into eax */ mov edi, Dest /* load SrcDest address into edi */ mov ecx, SrcLength /* load loop counter (SIZE) into ecx */ shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */ align 16 /* 16 byte alignment of the loop entry */ L10271: movq mm0, [eax] /* load 8 bytes from Src1 into MM0 */ psllw mm0, mm3 /* shift 4 WORDS of MM0 (N) bits to the left */ pand mm0, mm1 // apply proper bit-Mask to 8 BYTES of MM0 */ /* byte 0x0f, 0xdb, 0xc1 */ movq [edi], mm0 /* store result in Dest */ add eax, 8 /* increase Src1 register pointer by 8 */ add edi, 8 /* increase Dest register pointer by 8 */ dec ecx /* decrease loop counter */ jnz L10271 /* check loop termination, proceed if required */ emms /* exit MMX state */ popa } #else /* i386 and x86_64 */ __m64 *mSrc1 = (__m64*)Src1; __m64 *mDest = (__m64*)Dest; __m64 *mMask = (__m64*)Mask; __m64 mm1; int i; mm1 = _m_pcmpeqb(mm1, mm1); /* generate all 1's in mm1 */ /* Prepare proper bit-Mask in MM1 */ for (i = 0; i < N; i++) { mm1 = _m_psllwi(mm1, 1); /* shift 4 WORDS of MM1 1 bit to the left */ mm1 = _m_pand(mm1, *mMask); /* apply Mask to 8 BYTES of MM1 */ } /* ** Shift all bytes of the image ** */ for (i = 0; i < SrcLength/8; i++) { __m64 mm0 = _m_psllwi(*mSrc1, N); /* shift 4 WORDS of MM0 (N) bits to the left */ *mDest = _m_pand(mm0, mm1); /* apply proper bit-Mask to 8 BYTES of MM0 */ mSrc1++; mDest++; } _m_empty(); /* clean MMX state */ #endif return (0); #else return (-1); #endif } /*! \brief Filter using ShiftLeftByte: D = (S << N) \param Src1 Pointer to the start of the source byte array (S). \param Dest Pointer to the start of the destination byte array (D). \param length The number of bytes in the source arrays. \param N Number of bit-positions to shift (N). Valid range is 0 to 8. \return Returns 0 for success or -1 for error. */ int SDL_imageFilterShiftLeftByte(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N) { static unsigned char Mask[8] = { 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE }; unsigned int i, istart; unsigned char *cursrc1, *curdest; int result; /* Validate input parameters */ if ((Src1 == NULL) || (Dest == NULL)) return(-1); if (length == 0) return(0); if (N > 8) { return (-1); } /* Special case: N==0 */ if (N == 0) { memcpy(Src1, Dest, length); return (0); } if ((SDL_imageFilterMMXdetect()) && (length > 7)) { SDL_imageFilterShiftLeftByteMMX(Src1, Dest, length, N, Mask); /* Check for unaligned bytes */ if ((length & 7) > 0) { /* Setup to process unaligned bytes */ istart = length & 0xfffffff8; cursrc1 = &Src1[istart]; curdest = &Dest[istart]; } else { /* No unaligned bytes - we are done */ return (0); } } else { /* Setup to process whole image */ istart = 0; cursrc1 = Src1; curdest = Dest; } /* C routine to process image */ for (i = istart; i < length; i++) { result = ((int) *cursrc1 << N) & 0xff; *curdest = (unsigned char) result; /* Advance pointers */ cursrc1++; curdest++; } return (0); } /*! \brief Internal MMX Filter using ShiftLeftUint: D = ((uint)S << N) \param Src1 Pointer to the start of the source byte array (S). \param Dest Pointer to the start of the destination byte array (D). \param SrcLength The number of bytes in the source array. \param N Number of bit-positions to shift (N). Valid range is 0 to 32. \return Returns 0 for success or -1 for error. */ static int SDL_imageFilterShiftLeftUintMMX(unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char N) { #ifdef USE_MMX #if !defined(GCC__) __asm { pusha mov eax, Src1 /* load Src1 address into eax */ mov edi, Dest /* load Dest address into edi */ mov ecx, SrcLength /* load loop counter (SIZE) into ecx */ shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */ align 16 /* 16 byte alignment of the loop entry */ L12023: movq mm0, [eax] /* load 8 bytes from SrcDest into MM0 */ pslld mm0, N /* MM0=SrcDest+C (add 8 bytes with saturation) */ movq [edi], mm0 /* store result in SrcDest */ add eax, 8 /* increase Src1 register pointer by 8 */ add edi, 8 /* increase Dest register pointer by 8 */ dec ecx /* decrease loop counter */ jnz L12023 /* check loop termination, proceed if required */ emms /* exit MMX state */ popa } #else /* i386 and x86_64 */ __m64 *mSrc1 = (__m64*)Src1; __m64 *mDest = (__m64*)Dest; int i; for (i = 0; i < SrcLength/8; i++) { *mDest = _m_pslldi(*mSrc1, N); /* Src1+C (add 8 bytes with saturation) */ mSrc1++; mDest++; } _m_empty(); /* clean MMX state */ #endif return (0); #else return (-1); #endif } /*! \brief Filter using ShiftLeftUint: D = ((uint)S << N) \param Src1 Pointer to the start of the source byte array (S). \param Dest Pointer to the start of the destination byte array (D). \param length The number of bytes in the source array. \param N Number of bit-positions to shift (N). Valid range is 0 to 32. \return Returns 0 for success or -1 for error. */ int SDL_imageFilterShiftLeftUint(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N) { unsigned int i, istart; unsigned char *cursrc1, *curdest; unsigned int *icursrc1, *icurdest; unsigned int result; /* Validate input parameters */ if ((Src1 == NULL) || (Dest == NULL)) return(-1); if (length == 0) return(0); if (N > 32) { return (-1); } /* Special case: N==0 */ if (N == 0) { memcpy(Src1, Dest, length); return (0); } if ((SDL_imageFilterMMXdetect()) && (length > 7)) { SDL_imageFilterShiftLeftUintMMX(Src1, Dest, length, N); /* Check for unaligned bytes */ if ((length & 7) > 0) { /* Setup to process unaligned bytes */ istart = length & 0xfffffff8; cursrc1 = &Src1[istart]; curdest = &Dest[istart]; } else { /* No unaligned bytes - we are done */ return (0); } } else { /* Setup to process whole image */ istart = 0; cursrc1 = Src1; curdest = Dest; } /* C routine to process image */ icursrc1=(unsigned int *)cursrc1; icurdest=(unsigned int *)curdest; for (i = istart; i < length; i += 4) { if ((i+4) 8) { return (-1); } /* Special case: N==0 */ if (N == 0) { memcpy(Src1, Dest, length); return (0); } if ((SDL_imageFilterMMXdetect()) && (length > 7)) { SDL_imageFilterShiftLeftMMX(Src1, Dest, length, N); /* Check for unaligned bytes */ if ((length & 7) > 0) { /* Setup to process unaligned bytes */ istart = length & 0xfffffff8; cursrc1 = &Src1[istart]; curdest = &Dest[istart]; } else { /* No unaligned bytes - we are done */ return (0); } } else { /* Setup to process whole image */ istart = 0; cursrc1 = Src1; curdest = Dest; } /* C routine to process image */ for (i = istart; i < length; i++) { result = (int) *cursrc1 << N; if (result > 255) result = 255; *curdest = (unsigned char) result; /* Advance pointers */ cursrc1++; curdest++; } return (0); } /*! \brief MMX BinarizeUsingThreshold: D = (S >= T) ? 255:0 \param Src1 Pointer to the start of the source byte array (S). \param Dest Pointer to the start of the destination byte array (D). \param SrcLength The number of bytes in the source array. \param T The threshold boundary (inclusive). \return Returns 0 for success or -1 for error. */ static int SDL_imageFilterBinarizeUsingThresholdMMX(unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char T) { #ifdef USE_MMX #if !defined(GCC__) __asm { pusha /* ** Duplicate T in 8 bytes of MM3 ** */ pcmpeqb mm1, mm1 /* generate all 1's in mm1 */ pcmpeqb mm2, mm2 /* generate all 1's in mm2 */ mov al, T /* load T into AL */ mov ah, al /* copy AL into AH */ mov bx, ax /* copy AX into BX */ shl eax, 16 /* shift 2 bytes of EAX left */ mov ax, bx /* copy BX into AX */ movd mm3, eax /* copy EAX into MM3 */ movd mm4, eax /* copy EAX into MM4 */ punpckldq mm3, mm4 /* fill higher bytes of MM3 with T */ psubusb mm2, mm3 /* store 0xFF - T in MM2 */ mov eax, Src1 /* load Src1 address into eax */ mov edi, Dest /* load Dest address into edi */ mov ecx, SrcLength /* load loop counter (SIZE) into ecx */ shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */ align 16 /* 16 byte alignment of the loop entry */ L1029: movq mm0, [eax] /* load 8 bytes from SrcDest into MM0 */ paddusb mm0, mm2 /* MM0=SrcDest+(0xFF-T) (add 8 bytes with saturation) */ pcmpeqb mm0, mm1 /* binarize 255:0, comparing to 255 */ movq [edi], mm0 /* store result in SrcDest */ add eax, 8 /* increase Src1 register pointer by 8 */ add edi, 8 /* increase Dest register pointer by 8 */ dec ecx /* decrease loop counter */ jnz L1029 /* check loop termination, proceed if required */ emms /* exit MMX state */ popa } #else /* i386 and x86_64 */ __m64 *mSrc1 = (__m64*)Src1; __m64 *mDest = (__m64*)Dest; /* Duplicate T in 8 bytes of MM3 */ __m64 mm1 = _m_pcmpeqb(mm1, mm1); /* generate all 1's in mm1 */ __m64 mm2 = _m_pcmpeqb(mm2, mm2); /* generate all 1's in mm1 */ int i; memset(&i, T, 4); __m64 mm3 = _m_from_int(i); __m64 mm4 = _m_from_int(i); mm3 = _m_punpckldq(mm3, mm4); /* fill higher bytes of MM3 with T */ mm2 = _m_psubusb(mm2, mm3); /* store 0xFF - T in MM2 */ //__m64 mm3 = _m_from_int64(lli); // x86_64 only for (i = 0; i < SrcLength/8; i++) { __m64 mm0 = _m_paddusb(*mSrc1, mm2); /* Src1+(0xFF-T) (add 8 bytes with saturation) */ *mDest = _m_pcmpeqb(mm0, mm1); /* binarize 255:0, comparing to 255 */ mSrc1++; mDest++; } _m_empty(); /* clean MMX state */ #endif return (0); #else return (-1); #endif } /*! \brief Filter using BinarizeUsingThreshold: D = (S >= T) ? 255:0 \param Src1 Pointer to the start of the source byte array (S). \param Dest Pointer to the start of the destination byte array (D). \param length The number of bytes in the source array. \param T The threshold boundary (inclusive). \return Returns 0 for success or -1 for error. */ int SDL_imageFilterBinarizeUsingThreshold(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char T) { unsigned int i, istart; unsigned char *cursrc1; unsigned char *curdest; /* Validate input parameters */ if ((Src1 == NULL) || (Dest == NULL)) return(-1); if (length == 0) return(0); /* Special case: T==0 */ if (T == 0) { memset(Dest, 255, length); return (0); } if ((SDL_imageFilterMMXdetect()) && (length > 7)) { SDL_imageFilterBinarizeUsingThresholdMMX(Src1, Dest, length, T); /* Check for unaligned bytes */ if ((length & 7) > 0) { /* Setup to process unaligned bytes */ istart = length & 0xfffffff8; cursrc1 = &Src1[istart]; curdest = &Dest[istart]; } else { /* No unaligned bytes - we are done */ return (0); } } else { /* Setup to process whole image */ istart = 0; cursrc1 = Src1; curdest = Dest; } /* C routine to process image */ for (i = istart; i < length; i++) { *curdest = (unsigned char)(((unsigned char)*cursrc1 >= T) ? 255 : 0); /* Advance pointers */ cursrc1++; curdest++; } return (0); } /*! \brief Internal MMX Filter using ClipToRange: D = (S >= Tmin) & (S <= Tmax) S:Tmin | Tmax \param Src1 Pointer to the start of the source byte array (S). \param Dest Pointer to the start of the destination byte array (D). \param SrcLength The number of bytes in the source array. \param Tmin Lower (inclusive) boundary of the clipping range. \param Tmax Upper (inclusive) boundary of the clipping range. \return Returns 0 for success or -1 for error. */ static int SDL_imageFilterClipToRangeMMX(unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char Tmin, unsigned char Tmax) { #ifdef USE_MMX #if !defined(GCC__) __asm { pusha pcmpeqb mm1, mm1 /* generate all 1's in mm1 */ /* ** Duplicate Tmax in 8 bytes of MM3 ** */ mov al, Tmax /* load Tmax into AL */ mov ah, al /* copy AL into AH */ mov bx, ax /* copy AX into BX */ shl eax, 16 /* shift 2 bytes of EAX left */ mov ax, bx /* copy BX into AX */ movd mm3, eax /* copy EAX into MM3 */ movd mm4, eax /* copy EAX into MM4 */ punpckldq mm3, mm4 /* fill higher bytes of MM3 with Tmax */ psubusb mm1, mm3 /* store 0xFF - Tmax in MM1 */ /* ** Duplicate Tmin in 8 bytes of MM5 ** */ mov al, Tmin /* load Tmin into AL */ mov ah, al /* copy AL into AH */ mov bx, ax /* copy AX into BX */ shl eax, 16 /* shift 2 bytes of EAX left */ mov ax, bx /* copy BX into AX */ movd mm5, eax /* copy EAX into MM5 */ movd mm4, eax /* copy EAX into MM4 */ punpckldq mm5, mm4 /* fill higher bytes of MM5 with Tmin */ movq mm7, mm5 /* copy MM5 into MM7 */ paddusb mm7, mm1 /* store 0xFF - Tmax + Tmin in MM7 */ mov eax, Src1 /* load Src1 address into eax */ mov edi, Dest /* load Dest address into edi */ mov ecx, SrcLength /* load loop counter (SIZE) into ecx */ shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */ align 16 /* 16 byte alignment of the loop entry */ L1030: movq mm0, [eax] /* load 8 bytes from Src1 into MM0 */ paddusb mm0, mm1 /* MM0=SrcDest+(0xFF-Tmax) */ psubusb mm0, mm7 /* MM0=MM0-(0xFF-Tmax+Tmin) */ paddusb mm0, mm5 /* MM0=MM0+Tmin */ movq [edi], mm0 /* store result in Dest */ add eax, 8 /* increase Src1 register pointer by 8 */ add edi, 8 /* increase Dest register pointer by 8 */ dec ecx /* decrease loop counter */ jnz L1030 /* check loop termination, proceed if required */ emms /* exit MMX state */ popa } #else /* i386 and x86_64 */ __m64 *mSrc1 = (__m64*)Src1; __m64 *mDest = (__m64*)Dest; __m64 mm1 = _m_pcmpeqb(mm1, mm1); /* generate all 1's in mm1 */ int i; /* Duplicate Tmax in 8 bytes of MM3 */ __m64 mm3, mm4; memset(&i, Tmax, 4); mm3 = _m_from_int(i); mm4 = _m_from_int(i); mm3 = _m_punpckldq(mm3, mm4); /* fill higher bytes of MM3 with Tmax */ mm1 = _m_psubusb(mm1, mm3); /* store 0xFF - Tmax in MM1 */ //__m64 mm3 = _m_from_int64(lli); // x86_64 only /* Duplicate Tmax in 8 bytes of MM3 */ __m64 mm5, mm7; memset(&i, Tmin, 4); mm5 = _m_from_int(i); mm4 = _m_from_int(i); mm5 = _m_punpckldq(mm5, mm4); /* fill higher bytes of MM5 with Tmin */ mm7 = _m_paddusb(mm5, mm1); /* store 0xFF - Tmax + Tmin in MM7 */ for (i = 0; i < SrcLength/8; i++) { __m64 mm0; mm0 = _m_paddusb(*mSrc1, mm1); /* MM0=Src1+(0xFF-Tmax) */ mm0 = _m_psubusb(mm0, mm7); /* MM0=MM0-(0xFF-Tmax+Tmin) */ *mDest = _m_paddusb(mm0, mm5); /* MM0+Tmin */ mSrc1++; mDest++; } _m_empty(); /* clean MMX state */ #endif return (0); #else return (-1); #endif } /*! \brief Filter using ClipToRange: D = (S >= Tmin) & (S <= Tmax) S:Tmin | Tmax \param Src1 Pointer to the start of the source byte array (S). \param Dest Pointer to the start of the destination byte array (D). \param length The number of bytes in the source array. \param Tmin Lower (inclusive) boundary of the clipping range. \param Tmax Upper (inclusive) boundary of the clipping range. \return Returns 0 for success or -1 for error. */ int SDL_imageFilterClipToRange(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char Tmin, unsigned char Tmax) { unsigned int i, istart; unsigned char *cursrc1; unsigned char *curdest; /* Validate input parameters */ if ((Src1 == NULL) || (Dest == NULL)) return(-1); if (length == 0) return(0); /* Special case: Tmin==0 && Tmax = 255 */ if ((Tmin == 0) && (Tmax == 25)) { memcpy(Src1, Dest, length); return (0); } if ((SDL_imageFilterMMXdetect()) && (length > 7)) { SDL_imageFilterClipToRangeMMX(Src1, Dest, length, Tmin, Tmax); /* Check for unaligned bytes */ if ((length & 7) > 0) { /* Setup to process unaligned bytes */ istart = length & 0xfffffff8; cursrc1 = &Src1[istart]; curdest = &Dest[istart]; } else { /* No unaligned bytes - we are done */ return (0); } } else { /* Setup to process whole image */ istart = 0; cursrc1 = Src1; curdest = Dest; } /* C routine to process image */ for (i = istart; i < length; i++) { if (*cursrc1 < Tmin) { *curdest = Tmin; } else if (*cursrc1 > Tmax) { *curdest = Tmax; } else { *curdest = *cursrc1; } /* Advance pointers */ cursrc1++; curdest++; } return (0); } /*! \brief Internal MMX Filter using NormalizeLinear: D = saturation255((Nmax - Nmin)/(Cmax - Cmin)*(S - Cmin) + Nmin) \param Src1 Pointer to the start of the source byte array (S). \param Dest Pointer to the start of the destination byte array (D). \param SrcLength The number of bytes in the source array. \param Cmin Normalization constant (Cmin). \param Cmax Normalization constant (Cmax). \param Nmin Normalization constant (Nmin). \param Nmax Normalization constant (Nmax). \return Returns 0 for success or -1 for error. */ static int SDL_imageFilterNormalizeLinearMMX(unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, int Cmin, int Cmax, int Nmin, int Nmax) { #ifdef USE_MMX #if !defined(GCC__) __asm { pusha mov ax, WORD PTR Nmax /* load Nmax in AX */ mov bx, WORD PTR Cmax /* load Cmax in BX */ sub ax, WORD PTR Nmin /* AX = Nmax - Nmin */ sub bx, WORD PTR Cmin /* BX = Cmax - Cmin */ jz L10311 /* check division by zero */ xor dx, dx /* prepare for division, zero DX */ div bx /* AX = AX/BX */ jmp L10312 L10311: mov ax, 255 /* if div by zero, assume result max byte value */ L10312: /* ** Duplicate AX in 4 words of MM0 ** */ mov bx, ax /* copy AX into BX */ shl eax, 16 /* shift 2 bytes of EAX left */ mov ax, bx /* copy BX into AX */ movd mm0, eax /* copy EAX into MM0 */ movd mm1, eax /* copy EAX into MM1 */ punpckldq mm0, mm1 /* fill higher words of MM0 with AX */ /* ** Duplicate Cmin in 4 words of MM1 ** */ mov ax, WORD PTR Cmin /* load Cmin into AX */ mov bx, ax /* copy AX into BX */ shl eax, 16 /* shift 2 bytes of EAX left */ mov ax, bx /* copy BX into AX */ movd mm1, eax /* copy EAX into MM1 */ movd mm2, eax /* copy EAX into MM2 */ punpckldq mm1, mm2 /* fill higher words of MM1 with Cmin */ /* ** Duplicate Nmin in 4 words of MM2 ** */ mov ax, WORD PTR Nmin /* load Nmin into AX */ mov bx, ax /* copy AX into BX */ shl eax, 16 /* shift 2 bytes of EAX left */ mov ax, bx /* copy BX into AX */ movd mm2, eax /* copy EAX into MM2 */ movd mm3, eax /* copy EAX into MM3 */ punpckldq mm2, mm3 /* fill higher words of MM2 with Nmin */ pxor mm7, mm7 /* zero MM7 register */ mov eax, Src1 /* load Src1 address into eax */ mov edi, Dest /* load Dest address into edi */ mov ecx, SrcLength /* load loop counter (SIZE) into ecx */ shr ecx, 3 /* counter/8 (MMX loads 8 bytes at a time) */ align 16 /* 16 byte alignment of the loop entry */ L1031: movq mm3, [eax] /* load 8 bytes from Src1 into MM3 */ movq mm4, mm3 /* copy MM3 into MM4 */ punpcklbw mm3, mm7 /* unpack low bytes of SrcDest into words */ punpckhbw mm4, mm7 /* unpack high bytes of SrcDest into words */ psubusb mm3, mm1 /* S-Cmin, low bytes */ psubusb mm4, mm1 /* S-Cmin, high bytes */ pmullw mm3, mm0 /* MM0*(S-Cmin), low bytes */ pmullw mm4, mm0 /* MM0*(S-Cmin), high bytes */ paddusb mm3, mm2 /* MM0*(S-Cmin)+Nmin, low bytes */ paddusb mm4, mm2 /* MM0*(S-Cmin)+Nmin, high bytes */ /* ** Take abs value of the signed words ** */ movq mm5, mm3 /* copy mm3 into mm5 */ movq mm6, mm4 /* copy mm4 into mm6 */ psraw mm5, 15 /* fill mm5 words with word sign bit */ psraw mm6, 15 /* fill mm6 words with word sign bit */ pxor mm3, mm5 /* take 1's compliment of only neg words */ pxor mm4, mm6 /* take 1's compliment of only neg words */ psubsw mm3, mm5 /* add 1 to only neg words, W-(-1) or W-0 */ psubsw mm4, mm6 /* add 1 to only neg words, W-(-1) or W-0 */ packuswb mm3, mm4 /* pack words back into bytes with saturation */ movq [edi], mm3 /* store result in Dest */ add eax, 8 /* increase Src1 register pointer by 8 */ add edi, 8 /* increase Dest register pointer by 8 */ dec ecx /* decrease loop counter */ jnz L1031 /* check loop termination, proceed if required */ emms /* exit MMX state */ popa } #else /* i386 and x86_64 */ __m64 *mSrc1 = (__m64*)Src1; __m64 *mDest = (__m64*)Dest; __m64 mm0, mm1, mm2, mm3; int i; /* Duplicate (Nmax-Nmin)/(Cmax-Cmin) in 4 words of MM0 */ unsigned short a = Nmax - Nmin; unsigned short b = Cmax - Cmin; if (b == 0) { a = 255; } else { a /= b; } i = (a<<16)|a; mm0 = _m_from_int(i); mm1 = _m_from_int(i); mm0 = _m_punpckldq(mm0, mm1); /* fill higher words of MM0 with AX */ /* Duplicate Cmin in 4 words of MM1 */ i = (Cmin<<16)|(short)Cmin; mm1 = _m_from_int(i); mm2 = _m_from_int(i); mm1 = _m_punpckldq(mm1, mm2); /* fill higher words of MM1 with Cmin */ /* Duplicate Nmin in 4 words of MM2 */ i = (Nmin<<16)|(short)Nmin; mm2 = _m_from_int(i); mm3 = _m_from_int(i); mm2 = _m_punpckldq(mm2, mm3); /* fill higher words of MM2 with Nmin */ __m64 mm7 = _m_from_int(0); /* zero mm0 register */ for (i = 0; i < SrcLength/8; i++) { __m64 mm3, mm4, mm5, mm6; mm3 = _m_punpcklbw(*mSrc1, mm7); /* unpack low bytes of Src1 into words */ mm4 = _m_punpckhbw(*mSrc1, mm7); /* unpack high bytes of Src1 into words */ mm3 = _m_psubusb(mm3, mm1); /* S-Cmin, low bytes */ mm4 = _m_psubusb(mm4, mm1); /* S-Cmin, high bytes */ mm3 = _m_pmullw(mm3, mm0); /* MM0*(S-Cmin), low bytes */ mm4 = _m_pmullw(mm4, mm0); /* MM0*(S-Cmin), high bytes */ mm3 = _m_paddusb(mm3, mm2); /* MM0*(S-Cmin)+Nmin, low bytes */ mm4 = _m_paddusb(mm4, mm2); /* MM0*(S-Cmin)+Nmin, high bytes */ /* Take abs value of the signed words */ mm5 = _m_psrawi(mm3, 15); /* fill mm5 words with word sign bit */ mm6 = _m_psrawi(mm4, 15); /* fill mm6 words with word sign bit */ mm3 = _m_pxor(mm3, mm5); /* take 1's compliment of only neg. words */ mm4 = _m_pxor(mm4, mm6); /* take 1's compliment of only neg. words */ mm3 = _m_psubsw(mm3, mm5); /* add 1 to only neg. words, W-(-1) or W-0 */ mm4 = _m_psubsw(mm4, mm6); /* add 1 to only neg. words, W-(-1) or W-0 */ *mDest = _m_packuswb(mm3, mm4); /* pack words back into bytes with saturation */ mSrc1++; mDest++; } _m_empty(); /* clean MMX state */ #endif return (0); #else return (-1); #endif } /*! \brief Filter using NormalizeLinear: D = saturation255((Nmax - Nmin)/(Cmax - Cmin)*(S - Cmin) + Nmin) \param Src Pointer to the start of the source byte array (S). \param Dest Pointer to the start of the destination byte array (D). \param length The number of bytes in the source array. \param Cmin Normalization constant. \param Cmax Normalization constant. \param Nmin Normalization constant. \param Nmax Normalization constant. \return Returns 0 for success or -1 for error. */ int SDL_imageFilterNormalizeLinear(unsigned char *Src, unsigned char *Dest, unsigned int length, int Cmin, int Cmax, int Nmin, int Nmax) { unsigned int i, istart; unsigned char *cursrc; unsigned char *curdest; int dN, dC, factor; int result; /* Validate input parameters */ if ((Src == NULL) || (Dest == NULL)) return(-1); if (length == 0) return(0); if ((SDL_imageFilterMMXdetect()) && (length > 7)) { SDL_imageFilterNormalizeLinearMMX(Src, Dest, length, Cmin, Cmax, Nmin, Nmax); /* Check for unaligned bytes */ if ((length & 7) > 0) { /* Setup to process unaligned bytes */ istart = length & 0xfffffff8; cursrc = &Src[istart]; curdest = &Dest[istart]; } else { /* No unaligned bytes - we are done */ return (0); } } else { /* Setup to process whole image */ istart = 0; cursrc = Src; curdest = Dest; } /* C routine to process image */ dC = Cmax - Cmin; if (dC == 0) return (0); dN = Nmax - Nmin; factor = dN / dC; for (i = istart; i < length; i++) { result = factor * ((int) (*cursrc) - Cmin) + Nmin; if (result > 255) result = 255; *curdest = (unsigned char) result; /* Advance pointers */ cursrc++; curdest++; } return (0); } /* ------------------------------------------------------------------------------------ */ /*! \brief Filter using ConvolveKernel3x3Divide: Dij = saturation0and255( ... ) \param Src The source 2D byte array to convolve. Should be different from destination. \param Dest The destination 2D byte array to store the result in. Should be different from source. \param rows Number of rows in source/destination array. Must be >2. \param columns Number of columns in source/destination array. Must be >2. \param Kernel The 2D convolution kernel of size 3x3. \param Divisor The divisor of the convolution sum. Must be >0. Note: Non-MMX implementation not available for this function. \return Returns 1 if filter was applied, 0 otherwise. */ int SDL_imageFilterConvolveKernel3x3Divide(unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char Divisor) { /* Validate input parameters */ if ((Src == NULL) || (Dest == NULL) || (Kernel == NULL)) return(-1); if ((columns < 3) || (rows < 3) || (Divisor == 0)) return (-1); if ((SDL_imageFilterMMXdetect())) { //#ifdef USE_MMX #if defined(USE_MMX) && defined(i386) #if !defined(GCC__) __asm { pusha pxor mm0, mm0 /* zero MM0 */ xor ebx, ebx /* zero EBX */ mov bl, Divisor /* load Divisor into BL */ mov edx, Kernel /* load Kernel address into EDX */ movq mm5, [edx] /* MM5 = {0,K2,K1,K0} */ add edx, 8 /* second row |K0 K1 K2 0| */ movq mm6, [edx] /* MM6 = {0,K5,K4,K3} K = |K3 K4 K5 0| */ add edx, 8 /* third row |K6 K7 K8 0| */ movq mm7, [edx] /* MM7 = {0,K8,K7,K6} */ /* ---, */ mov eax, columns /* load columns into EAX */ mov esi, Src /* ESI = Src row 0 address */ mov edi, Dest /* load Dest address to EDI */ add edi, eax /* EDI = EDI + columns */ inc edi /* 1 byte offset from the left edge */ mov edx, rows /* initialize ROWS counter */ sub edx, 2 /* do not use first and last row */ /* ---, */ L10320: mov ecx, eax /* initialize COLUMS counter */ sub ecx, 2 /* do not use first and last column */ align 16 /* 16 byte alignment of the loop entry */ L10322: /* ---, */ movq mm1, [esi] /* load 8 bytes of the image first row */ add esi, eax /* move one row below */ movq mm2, [esi] /* load 8 bytes of the image second row */ add esi, eax /* move one row below */ movq mm3, [esi] /* load 8 bytes of the image third row */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpcklbw mm2, mm0 /* unpack first 4 bytes into words */ punpcklbw mm3, mm0 /* unpack first 4 bytes into words */ pmullw mm1, mm5 /* multiply words first row image*Kernel */ pmullw mm2, mm6 /* multiply words second row image*Kernel */ pmullw mm3, mm7 /* multiply words third row image*Kernel */ paddsw mm1, mm2 /* add 4 words of the first and second rows */ paddsw mm1, mm3 /* add 4 words of the third row and result */ movq mm2, mm1 /* copy MM1 into MM2 */ psrlq mm1, 32 /* shift 2 left words to the right */ paddsw mm1, mm2 /* add 2 left and 2 right result words */ movq mm3, mm1 /* copy MM1 into MM3 */ psrlq mm1, 16 /* shift 1 left word to the right */ paddsw mm1, mm3 /* add 1 left and 1 right result words */ /* --, */ movd mm2, eax /* save EAX in MM2 */ movd mm3, edx /* save EDX in MM3 */ movd eax, mm1 /* copy MM1 into EAX */ psraw mm1, 15 /* spread sign bit of the result */ movd edx, mm1 /* fill EDX with a sign bit */ idiv bx /* IDIV - VERY EXPENSIVE */ movd mm1, eax /* move result of division into MM1 */ packuswb mm1, mm0 /* pack division result with saturation */ movd eax, mm1 /* copy saturated result into EAX */ mov [edi], al /* copy a byte result into Dest */ movd edx, mm3 /* restore saved EDX */ movd eax, mm2 /* restore saved EAX */ /* --, */ sub esi, eax /* move two rows up */ sub esi, eax /* */ inc esi /* move Src pointer to the next pixel */ inc edi /* move Dest pointer to the next pixel */ /* ---, */ dec ecx /* decrease loop counter COLUMNS */ jnz L10322 /* check loop termination, proceed if required */ add esi, 2 /* move to the next row in Src */ add edi, 2 /* move to the next row in Dest */ dec edx /* decrease loop counter ROWS */ jnz L10320 /* check loop termination, proceed if required */ /* ---, */ emms /* exit MMX state */ popa } #else asm volatile ("pusha \n\t" "pxor %%mm0, %%mm0 \n\t" /* zero MM0 */ "xor %%ebx, %%ebx \n\t" /* zero EBX */ "mov %5, %%bl \n\t" /* load Divisor into BL */ "mov %4, %%edx \n\t" /* load Kernel address into EDX */ "movq (%%edx), %%mm5 \n\t" /* MM5 = {0,K2,K1,K0} */ "add $8, %%edx \n\t" /* second row |K0 K1 K2 0| */ "movq (%%edx), %%mm6 \n\t" /* MM6 = {0,K5,K4,K3} K = |K3 K4 K5 0| */ "add $8, %%edx \n\t" /* third row |K6 K7 K8 0| */ "movq (%%edx), %%mm7 \n\t" /* MM7 = {0,K8,K7,K6} */ /* --- */ "mov %3, %%eax \n\t" /* load columns into EAX */ "mov %1, %%esi \n\t" /* ESI = Src row 0 address */ "mov %0, %%edi \n\t" /* load Dest address to EDI */ "add %%eax, %%edi \n\t" /* EDI = EDI + columns */ "inc %%edi \n\t" /* 1 byte offset from the left edge */ "mov %2, %%edx \n\t" /* initialize ROWS counter */ "sub $2, %%edx \n\t" /* do not use first and last row */ /* --- */ ".L10320: \n\t" "mov %%eax, %%ecx \n\t" /* initialize COLUMS counter */ "sub $2, %%ecx \n\t" /* do not use first and last column */ ".align 16 \n\t" /* 16 byte alignment of the loop entry */ ".L10322: \n\t" /* --- */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the image first row */ "add %%eax, %%esi \n\t" /* move one row below */ "movq (%%esi), %%mm2 \n\t" /* load 8 bytes of the image second row */ "add %%eax, %%esi \n\t" /* move one row below */ "movq (%%esi), %%mm3 \n\t" /* load 8 bytes of the image third row */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpcklbw %%mm0, %%mm2 \n\t" /* unpack first 4 bytes into words */ "punpcklbw %%mm0, %%mm3 \n\t" /* unpack first 4 bytes into words */ "pmullw %%mm5, %%mm1 \n\t" /* multiply words first row image*Kernel */ "pmullw %%mm6, %%mm2 \n\t" /* multiply words second row image*Kernel */ "pmullw %%mm7, %%mm3 \n\t" /* multiply words third row image*Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the first and second rows */ "paddsw %%mm3, %%mm1 \n\t" /* add 4 words of the third row and result */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "psrlq $32, %%mm1 \n\t" /* shift 2 left words to the right */ "paddsw %%mm2, %%mm1 \n\t" /* add 2 left and 2 right result words */ "movq %%mm1, %%mm3 \n\t" /* copy MM1 into MM3 */ "psrlq $16, %%mm1 \n\t" /* shift 1 left word to the right */ "paddsw %%mm3, %%mm1 \n\t" /* add 1 left and 1 right result words */ /* -- */ "movd %%eax, %%mm2 \n\t" /* save EAX in MM2 */ "movd %%edx, %%mm3 \n\t" /* save EDX in MM3 */ "movd %%mm1, %%eax \n\t" /* copy MM1 into EAX */ "psraw $15, %%mm1 \n\t" /* spread sign bit of the result */ "movd %%mm1, %%edx \n\t" /* fill EDX with a sign bit */ "idivw %%bx \n\t" /* IDIV - VERY EXPENSIVE */ "movd %%eax, %%mm1 \n\t" /* move result of division into MM1 */ "packuswb %%mm0, %%mm1 \n\t" /* pack division result with saturation */ "movd %%mm1, %%eax \n\t" /* copy saturated result into EAX */ "mov %%al, (%%edi) \n\t" /* copy a byte result into Dest */ "movd %%mm3, %%edx \n\t" /* restore saved EDX */ "movd %%mm2, %%eax \n\t" /* restore saved EAX */ /* -- */ "sub %%eax, %%esi \n\t" /* move two rows up */ "sub %%eax, %%esi \n\t" /* */ "inc %%esi \n\t" /* move Src pointer to the next pixel */ "inc %%edi \n\t" /* move Dest pointer to the next pixel */ /* --- */ "dec %%ecx \n\t" /* decrease loop counter COLUMNS */ "jnz .L10322 \n\t" /* check loop termination, proceed if required */ "add $2, %%esi \n\t" /* move to the next row in Src */ "add $2, %%edi \n\t" /* move to the next row in Dest */ "dec %%edx \n\t" /* decrease loop counter ROWS */ "jnz .L10320 \n\t" /* check loop termination, proceed if required */ /* --- */ "emms \n\t" /* exit MMX state */ "popa \n\t":"=m" (Dest) /* %0 */ :"m"(Src), /* %1 */ "m"(rows), /* %2 */ "m"(columns), /* %3 */ "m"(Kernel), /* %4 */ "m"(Divisor) /* %5 */ ); #endif #endif return (0); } else { /* No non-MMX implementation yet */ return (-1); } } /*! \brief Filter using ConvolveKernel5x5Divide: Dij = saturation0and255( ... ) \param Src The source 2D byte array to convolve. Should be different from destination. \param Dest The destination 2D byte array to store the result in. Should be different from source. \param rows Number of rows in source/destination array. Must be >4. \param columns Number of columns in source/destination array. Must be >4. \param Kernel The 2D convolution kernel of size 5x5. \param Divisor The divisor of the convolution sum. Must be >0. Note: Non-MMX implementation not available for this function. \return Returns 1 if filter was applied, 0 otherwise. */ int SDL_imageFilterConvolveKernel5x5Divide(unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char Divisor) { /* Validate input parameters */ if ((Src == NULL) || (Dest == NULL) || (Kernel == NULL)) return(-1); if ((columns < 5) || (rows < 5) || (Divisor == 0)) return (-1); if ((SDL_imageFilterMMXdetect())) { //#ifdef USE_MMX #if defined(USE_MMX) && defined(i386) #if !defined(GCC__) __asm { pusha pxor mm0, mm0 /* zero MM0 */ xor ebx, ebx /* zero EBX */ mov bl, Divisor /* load Divisor into BL */ movd mm5, ebx /* copy Divisor into MM5 */ mov edx, Kernel /* load Kernel address into EDX */ mov esi, Src /* load Src address to ESI */ mov edi, Dest /* load Dest address to EDI */ add edi, 2 /* 2 column offset from the left edge */ mov eax, columns /* load columns into EAX */ shl eax, 1 /* EAX = columns * 2 */ add edi, eax /* 2 row offset from the top edge */ shr eax, 1 /* EAX = columns */ mov ebx, rows /* initialize ROWS counter */ sub ebx, 4 /* do not use first 2 and last 2 rows */ /* ---, */ L10330: mov ecx, eax /* initialize COLUMNS counter */ sub ecx, 4 /* do not use first 2 and last 2 columns */ align 16 /* 16 byte alignment of the loop entry */ L10332: pxor mm7, mm7 /* zero MM7 (accumulator) */ movd mm6, esi /* save ESI in MM6 */ /* --- 1 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 2 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 3 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 4 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 5 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* ---, */ movq mm3, mm7 /* copy MM7 into MM3 */ psrlq mm7, 32 /* shift 2 left words to the right */ paddsw mm7, mm3 /* add 2 left and 2 right result words */ movq mm2, mm7 /* copy MM7 into MM2 */ psrlq mm7, 16 /* shift 1 left word to the right */ paddsw mm7, mm2 /* add 1 left and 1 right result words */ /* ---, */ movd mm1, eax /* save EDX in MM1 */ movd mm2, ebx /* save EDX in MM2 */ movd mm3, edx /* save EDX in MM3 */ movd eax, mm7 /* load summation result into EAX */ psraw mm7, 15 /* spread sign bit of the result */ movd ebx, mm5 /* load Divisor into EBX */ movd edx, mm7 /* fill EDX with a sign bit */ idiv bx /* IDIV - VERY EXPENSIVE */ movd mm7, eax /* move result of division into MM7 */ packuswb mm7, mm0 /* pack division result with saturation */ movd eax, mm7 /* copy saturated result into EAX */ mov [edi], al /* copy a byte result into Dest */ movd edx, mm3 /* restore saved EDX */ movd ebx, mm2 /* restore saved EBX */ movd eax, mm1 /* restore saved EAX */ /* --, */ movd esi, mm6 /* move Src pointer to the top pixel */ sub edx, 72 /* EDX = Kernel address */ inc esi /* move Src pointer to the next pixel */ inc edi /* move Dest pointer to the next pixel */ /* ---, */ dec ecx /* decrease loop counter COLUMNS */ jnz L10332 /* check loop termination, proceed if required */ add esi, 4 /* move to the next row in Src */ add edi, 4 /* move to the next row in Dest */ dec ebx /* decrease loop counter ROWS */ jnz L10330 /* check loop termination, proceed if required */ /* ---, */ emms /* exit MMX state */ popa } #else asm volatile ("pusha \n\t" "pxor %%mm0, %%mm0 \n\t" /* zero MM0 */ "xor %%ebx, %%ebx \n\t" /* zero EBX */ "mov %5, %%bl \n\t" /* load Divisor into BL */ "movd %%ebx, %%mm5 \n\t" /* copy Divisor into MM5 */ "mov %4, %%edx \n\t" /* load Kernel address into EDX */ "mov %1, %%esi \n\t" /* load Src address to ESI */ "mov %0, %%edi \n\t" /* load Dest address to EDI */ "add $2, %%edi \n\t" /* 2 column offset from the left edge */ "mov %3, %%eax \n\t" /* load columns into EAX */ "shl $1, %%eax \n\t" /* EAX = columns * 2 */ "add %%eax, %%edi \n\t" /* 2 row offset from the top edge */ "shr $1, %%eax \n\t" /* EAX = columns */ "mov %2, %%ebx \n\t" /* initialize ROWS counter */ "sub $4, %%ebx \n\t" /* do not use first 2 and last 2 rows */ /* --- */ ".L10330: \n\t" "mov %%eax, %%ecx \n\t" /* initialize COLUMNS counter */ "sub $4, %%ecx \n\t" /* do not use first 2 and last 2 columns */ ".align 16 \n\t" /* 16 byte alignment of the loop entry */ ".L10332: \n\t" "pxor %%mm7, %%mm7 \n\t" /* zero MM7 (accumulator) */ "movd %%esi, %%mm6 \n\t" /* save ESI in MM6 */ /* --- 1 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 2 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 3 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 4 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 5 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- */ "movq %%mm7, %%mm3 \n\t" /* copy MM7 into MM3 */ "psrlq $32, %%mm7 \n\t" /* shift 2 left words to the right */ "paddsw %%mm3, %%mm7 \n\t" /* add 2 left and 2 right result words */ "movq %%mm7, %%mm2 \n\t" /* copy MM7 into MM2 */ "psrlq $16, %%mm7 \n\t" /* shift 1 left word to the right */ "paddsw %%mm2, %%mm7 \n\t" /* add 1 left and 1 right result words */ /* --- */ "movd %%eax, %%mm1 \n\t" /* save EDX in MM1 */ "movd %%ebx, %%mm2 \n\t" /* save EDX in MM2 */ "movd %%edx, %%mm3 \n\t" /* save EDX in MM3 */ "movd %%mm7, %%eax \n\t" /* load summation result into EAX */ "psraw $15, %%mm7 \n\t" /* spread sign bit of the result */ "movd %%mm5, %%ebx \n\t" /* load Divisor into EBX */ "movd %%mm7, %%edx \n\t" /* fill EDX with a sign bit */ "idivw %%bx \n\t" /* IDIV - VERY EXPENSIVE */ "movd %%eax, %%mm7 \n\t" /* move result of division into MM7 */ "packuswb %%mm0, %%mm7 \n\t" /* pack division result with saturation */ "movd %%mm7, %%eax \n\t" /* copy saturated result into EAX */ "mov %%al, (%%edi) \n\t" /* copy a byte result into Dest */ "movd %%mm3, %%edx \n\t" /* restore saved EDX */ "movd %%mm2, %%ebx \n\t" /* restore saved EBX */ "movd %%mm1, %%eax \n\t" /* restore saved EAX */ /* -- */ "movd %%mm6, %%esi \n\t" /* move Src pointer to the top pixel */ "sub $72, %%edx \n\t" /* EDX = Kernel address */ "inc %%esi \n\t" /* move Src pointer to the next pixel */ "inc %%edi \n\t" /* move Dest pointer to the next pixel */ /* --- */ "dec %%ecx \n\t" /* decrease loop counter COLUMNS */ "jnz .L10332 \n\t" /* check loop termination, proceed if required */ "add $4, %%esi \n\t" /* move to the next row in Src */ "add $4, %%edi \n\t" /* move to the next row in Dest */ "dec %%ebx \n\t" /* decrease loop counter ROWS */ "jnz .L10330 \n\t" /* check loop termination, proceed if required */ /* --- */ "emms \n\t" /* exit MMX state */ "popa \n\t":"=m" (Dest) /* %0 */ :"m"(Src), /* %1 */ "m"(rows), /* %2 */ "m"(columns), /* %3 */ "m"(Kernel), /* %4 */ "m"(Divisor) /* %5 */ ); #endif #endif return (0); } else { /* No non-MMX implementation yet */ return (-1); } } /*! \brief Filter using ConvolveKernel7x7Divide: Dij = saturation0and255( ... ) \param Src The source 2D byte array to convolve. Should be different from destination. \param Dest The destination 2D byte array to store the result in. Should be different from source. \param rows Number of rows in source/destination array. Must be >6. \param columns Number of columns in source/destination array. Must be >6. \param Kernel The 2D convolution kernel of size 7x7. \param Divisor The divisor of the convolution sum. Must be >0. Note: Non-MMX implementation not available for this function. \return Returns 1 if filter was applied, 0 otherwise. */ int SDL_imageFilterConvolveKernel7x7Divide(unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char Divisor) { /* Validate input parameters */ if ((Src == NULL) || (Dest == NULL) || (Kernel == NULL)) return(-1); if ((columns < 7) || (rows < 7) || (Divisor == 0)) return (-1); if ((SDL_imageFilterMMXdetect())) { //#ifdef USE_MMX #if defined(USE_MMX) && defined(i386) #if !defined(GCC__) __asm { pusha pxor mm0, mm0 /* zero MM0 */ xor ebx, ebx /* zero EBX */ mov bl, Divisor /* load Divisor into BL */ movd mm5, ebx /* copy Divisor into MM5 */ mov edx, Kernel /* load Kernel address into EDX */ mov esi, Src /* load Src address to ESI */ mov edi, Dest /* load Dest address to EDI */ add edi, 3 /* 3 column offset from the left edge */ mov eax, columns /* load columns into EAX */ add edi, eax /* 3 row offset from the top edge */ add edi, eax add edi, eax mov ebx, rows /* initialize ROWS counter */ sub ebx, 6 /* do not use first 3 and last 3 rows */ /* ---, */ L10340: mov ecx, eax /* initialize COLUMNS counter */ sub ecx, 6 /* do not use first 3 and last 3 columns */ align 16 /* 16 byte alignment of the loop entry */ L10342: pxor mm7, mm7 /* zero MM7 (accumulator) */ movd mm6, esi /* save ESI in MM6 */ /* --- 1 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 2 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 3 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 4 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 5 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 6 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 7 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* ---, */ movq mm3, mm7 /* copy MM7 into MM3 */ psrlq mm7, 32 /* shift 2 left words to the right */ paddsw mm7, mm3 /* add 2 left and 2 right result words */ movq mm2, mm7 /* copy MM7 into MM2 */ psrlq mm7, 16 /* shift 1 left word to the right */ paddsw mm7, mm2 /* add 1 left and 1 right result words */ /* ---, */ movd mm1, eax /* save EDX in MM1 */ movd mm2, ebx /* save EDX in MM2 */ movd mm3, edx /* save EDX in MM3 */ movd eax, mm7 /* load summation result into EAX */ psraw mm7, 15 /* spread sign bit of the result */ movd ebx, mm5 /* load Divisor into EBX */ movd edx, mm7 /* fill EDX with a sign bit */ idiv bx /* IDIV - VERY EXPENSIVE */ movd mm7, eax /* move result of division into MM7 */ packuswb mm7, mm0 /* pack division result with saturation */ movd eax, mm7 /* copy saturated result into EAX */ mov [edi], al /* copy a byte result into Dest */ movd edx, mm3 /* restore saved EDX */ movd ebx, mm2 /* restore saved EBX */ movd eax, mm1 /* restore saved EAX */ /* --, */ movd esi, mm6 /* move Src pointer to the top pixel */ sub edx, 104 /* EDX = Kernel address */ inc esi /* move Src pointer to the next pixel */ inc edi /* move Dest pointer to the next pixel */ /* ---, */ dec ecx /* decrease loop counter COLUMNS */ jnz L10342 /* check loop termination, proceed if required */ add esi, 6 /* move to the next row in Src */ add edi, 6 /* move to the next row in Dest */ dec ebx /* decrease loop counter ROWS */ jnz L10340 /* check loop termination, proceed if required */ /* ---, */ emms /* exit MMX state */ popa } #else asm volatile ("pusha \n\t" "pxor %%mm0, %%mm0 \n\t" /* zero MM0 */ "xor %%ebx, %%ebx \n\t" /* zero EBX */ "mov %5, %%bl \n\t" /* load Divisor into BL */ "movd %%ebx, %%mm5 \n\t" /* copy Divisor into MM5 */ "mov %4, %%edx \n\t" /* load Kernel address into EDX */ "mov %1, %%esi \n\t" /* load Src address to ESI */ "mov %0, %%edi \n\t" /* load Dest address to EDI */ "add $3, %%edi \n\t" /* 3 column offset from the left edge */ "mov %3, %%eax \n\t" /* load columns into EAX */ "add %%eax, %%edi \n\t" /* 3 row offset from the top edge */ "add %%eax, %%edi \n\t" "add %%eax, %%edi \n\t" "mov %2, %%ebx \n\t" /* initialize ROWS counter */ "sub $6, %%ebx \n\t" /* do not use first 3 and last 3 rows */ /* --- */ ".L10340: \n\t" "mov %%eax, %%ecx \n\t" /* initialize COLUMNS counter */ "sub $6, %%ecx \n\t" /* do not use first 3 and last 3 columns */ ".align 16 \n\t" /* 16 byte alignment of the loop entry */ ".L10342: \n\t" "pxor %%mm7, %%mm7 \n\t" /* zero MM7 (accumulator) */ "movd %%esi, %%mm6 \n\t" /* save ESI in MM6 */ /* --- 1 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 2 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 3 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 4 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 5 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 6 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 7 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- */ "movq %%mm7, %%mm3 \n\t" /* copy MM7 into MM3 */ "psrlq $32, %%mm7 \n\t" /* shift 2 left words to the right */ "paddsw %%mm3, %%mm7 \n\t" /* add 2 left and 2 right result words */ "movq %%mm7, %%mm2 \n\t" /* copy MM7 into MM2 */ "psrlq $16, %%mm7 \n\t" /* shift 1 left word to the right */ "paddsw %%mm2, %%mm7 \n\t" /* add 1 left and 1 right result words */ /* --- */ "movd %%eax, %%mm1 \n\t" /* save EDX in MM1 */ "movd %%ebx, %%mm2 \n\t" /* save EDX in MM2 */ "movd %%edx, %%mm3 \n\t" /* save EDX in MM3 */ "movd %%mm7, %%eax \n\t" /* load summation result into EAX */ "psraw $15, %%mm7 \n\t" /* spread sign bit of the result */ "movd %%mm5, %%ebx \n\t" /* load Divisor into EBX */ "movd %%mm7, %%edx \n\t" /* fill EDX with a sign bit */ "idivw %%bx \n\t" /* IDIV - VERY EXPENSIVE */ "movd %%eax, %%mm7 \n\t" /* move result of division into MM7 */ "packuswb %%mm0, %%mm7 \n\t" /* pack division result with saturation */ "movd %%mm7, %%eax \n\t" /* copy saturated result into EAX */ "mov %%al, (%%edi) \n\t" /* copy a byte result into Dest */ "movd %%mm3, %%edx \n\t" /* restore saved EDX */ "movd %%mm2, %%ebx \n\t" /* restore saved EBX */ "movd %%mm1, %%eax \n\t" /* restore saved EAX */ /* -- */ "movd %%mm6, %%esi \n\t" /* move Src pointer to the top pixel */ "sub $104, %%edx \n\t" /* EDX = Kernel address */ "inc %%esi \n\t" /* move Src pointer to the next pixel */ "inc %%edi \n\t" /* move Dest pointer to the next pixel */ /* --- */ "dec %%ecx \n\t" /* decrease loop counter COLUMNS */ "jnz .L10342 \n\t" /* check loop termination, proceed if required */ "add $6, %%esi \n\t" /* move to the next row in Src */ "add $6, %%edi \n\t" /* move to the next row in Dest */ "dec %%ebx \n\t" /* decrease loop counter ROWS */ "jnz .L10340 \n\t" /* check loop termination, proceed if required */ /* --- */ "emms \n\t" /* exit MMX state */ "popa \n\t":"=m" (Dest) /* %0 */ :"m"(Src), /* %1 */ "m"(rows), /* %2 */ "m"(columns), /* %3 */ "m"(Kernel), /* %4 */ "m"(Divisor) /* %5 */ ); #endif #endif return (0); } else { /* No non-MMX implementation yet */ return (-1); } } /*! \brief Filter using ConvolveKernel9x9Divide: Dij = saturation0and255( ... ) \param Src The source 2D byte array to convolve. Should be different from destination. \param Dest The destination 2D byte array to store the result in. Should be different from source. \param rows Number of rows in source/destination array. Must be >8. \param columns Number of columns in source/destination array. Must be >8. \param Kernel The 2D convolution kernel of size 9x9. \param Divisor The divisor of the convolution sum. Must be >0. Note: Non-MMX implementation not available for this function. \return Returns 1 if filter was applied, 0 otherwise. */ int SDL_imageFilterConvolveKernel9x9Divide(unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char Divisor) { /* Validate input parameters */ if ((Src == NULL) || (Dest == NULL) || (Kernel == NULL)) return(-1); if ((columns < 9) || (rows < 9) || (Divisor == 0)) return (-1); if ((SDL_imageFilterMMXdetect())) { //#ifdef USE_MMX #if defined(USE_MMX) && defined(i386) #if !defined(GCC__) __asm { pusha pxor mm0, mm0 /* zero MM0 */ xor ebx, ebx /* zero EBX */ mov bl, Divisor /* load Divisor into BL */ movd mm5, ebx /* copy Divisor into MM5 */ mov edx, Kernel /* load Kernel address into EDX */ mov esi, Src /* load Src address to ESI */ mov edi, Dest /* load Dest address to EDI */ add edi, 4 /* 4 column offset from the left edge */ mov eax, columns /* load columns into EAX */ add edi, eax /* 4 row offset from the top edge */ add edi, eax add edi, eax add edi, eax mov ebx, rows /* initialize ROWS counter */ sub ebx, 8 /* do not use first 4 and last 4 rows */ /* ---, */ L10350: mov ecx, eax /* initialize COLUMNS counter */ sub ecx, 8 /* do not use first 4 and last 4 columns */ align 16 /* 16 byte alignment of the loop entry */ L10352: pxor mm7, mm7 /* zero MM7 (accumulator) */ movd mm6, esi /* save ESI in MM6 */ /* --- 1 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ inc esi /* move pointer to the next 8 bytes of Src */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult. 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ movq mm1, [esi] /* load 8 bytes of the Src */ dec esi add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 2 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ inc esi /* move pointer to the next 8 bytes of Src */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult. 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ movq mm1, [esi] /* load 8 bytes of the Src */ dec esi add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 3 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ inc esi /* move pointer to the next 8 bytes of Src */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult. 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ movq mm1, [esi] /* load 8 bytes of the Src */ dec esi add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 4 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ inc esi /* move pointer to the next 8 bytes of Src */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult. 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ movq mm1, [esi] /* load 8 bytes of the Src */ dec esi add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 5 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ inc esi /* move pointer to the next 8 bytes of Src */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult. 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ movq mm1, [esi] /* load 8 bytes of the Src */ dec esi add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 6 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ inc esi /* move pointer to the next 8 bytes of Src */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult. 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ movq mm1, [esi] /* load 8 bytes of the Src */ dec esi add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 7 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ inc esi /* move pointer to the next 8 bytes of Src */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult. 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ movq mm1, [esi] /* load 8 bytes of the Src */ dec esi add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 8 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ inc esi /* move pointer to the next 8 bytes of Src */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult. 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ movq mm1, [esi] /* load 8 bytes of the Src */ dec esi add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 9 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ inc esi /* move pointer to the next 8 bytes of Src */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult. 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm3, [edx] /* load 4 words of Kernel */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ pmullw mm1, mm3 /* mult. 4 low words of Src and Kernel */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* ---, */ movq mm3, mm7 /* copy MM7 into MM3 */ psrlq mm7, 32 /* shift 2 left words to the right */ paddsw mm7, mm3 /* add 2 left and 2 right result words */ movq mm2, mm7 /* copy MM7 into MM2 */ psrlq mm7, 16 /* shift 1 left word to the right */ paddsw mm7, mm2 /* add 1 left and 1 right result words */ /* ---, */ movd mm1, eax /* save EDX in MM1 */ movd mm2, ebx /* save EDX in MM2 */ movd mm3, edx /* save EDX in MM3 */ movd eax, mm7 /* load summation result into EAX */ psraw mm7, 15 /* spread sign bit of the result */ movd ebx, mm5 /* load Divisor into EBX */ movd edx, mm7 /* fill EDX with a sign bit */ idiv bx /* IDIV - VERY EXPENSIVE */ movd mm7, eax /* move result of division into MM7 */ packuswb mm7, mm0 /* pack division result with saturation */ movd eax, mm7 /* copy saturated result into EAX */ mov [edi], al /* copy a byte result into Dest */ movd edx, mm3 /* restore saved EDX */ movd ebx, mm2 /* restore saved EBX */ movd eax, mm1 /* restore saved EAX */ /* --, */ movd esi, mm6 /* move Src pointer to the top pixel */ sub edx, 208 /* EDX = Kernel address */ inc esi /* move Src pointer to the next pixel */ inc edi /* move Dest pointer to the next pixel */ /* ---, */ dec ecx /* decrease loop counter COLUMNS */ jnz L10352 /* check loop termination, proceed if required */ add esi, 8 /* move to the next row in Src */ add edi, 8 /* move to the next row in Dest */ dec ebx /* decrease loop counter ROWS */ jnz L10350 /* check loop termination, proceed if required */ /* ---, */ emms /* exit MMX state */ popa } #else asm volatile ("pusha \n\t" "pxor %%mm0, %%mm0 \n\t" /* zero MM0 */ "xor %%ebx, %%ebx \n\t" /* zero EBX */ "mov %5, %%bl \n\t" /* load Divisor into BL */ "movd %%ebx, %%mm5 \n\t" /* copy Divisor into MM5 */ "mov %4, %%edx \n\t" /* load Kernel address into EDX */ "mov %1, %%esi \n\t" /* load Src address to ESI */ "mov %0, %%edi \n\t" /* load Dest address to EDI */ "add $4, %%edi \n\t" /* 4 column offset from the left edge */ "mov %3, %%eax \n\t" /* load columns into EAX */ "add %%eax, %%edi \n\t" /* 4 row offset from the top edge */ "add %%eax, %%edi \n\t" "add %%eax, %%edi \n\t" "add %%eax, %%edi \n\t" "mov %2, %%ebx \n\t" /* initialize ROWS counter */ "sub $8, %%ebx \n\t" /* do not use first 4 and last 4 rows */ /* --- */ ".L10350: \n\t" "mov %%eax, %%ecx \n\t" /* initialize COLUMNS counter */ "sub $8, %%ecx \n\t" /* do not use first 4 and last 4 columns */ ".align 16 \n\t" /* 16 byte alignment of the loop entry */ ".L10352: \n\t" "pxor %%mm7, %%mm7 \n\t" /* zero MM7 (accumulator) */ "movd %%esi, %%mm6 \n\t" /* save ESI in MM6 */ /* --- 1 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "dec %%esi \n\t" "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 2 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "dec %%esi \n\t" "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 3 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "dec %%esi \n\t" "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 4 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "dec %%esi \n\t" "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 5 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "dec %%esi \n\t" "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 6 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "dec %%esi \n\t" "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 7 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "dec %%esi \n\t" "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 8 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "dec %%esi \n\t" "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 9 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- */ "movq %%mm7, %%mm3 \n\t" /* copy MM7 into MM3 */ "psrlq $32, %%mm7 \n\t" /* shift 2 left words to the right */ "paddsw %%mm3, %%mm7 \n\t" /* add 2 left and 2 right result words */ "movq %%mm7, %%mm2 \n\t" /* copy MM7 into MM2 */ "psrlq $16, %%mm7 \n\t" /* shift 1 left word to the right */ "paddsw %%mm2, %%mm7 \n\t" /* add 1 left and 1 right result words */ /* --- */ "movd %%eax, %%mm1 \n\t" /* save EDX in MM1 */ "movd %%ebx, %%mm2 \n\t" /* save EDX in MM2 */ "movd %%edx, %%mm3 \n\t" /* save EDX in MM3 */ "movd %%mm7, %%eax \n\t" /* load summation result into EAX */ "psraw $15, %%mm7 \n\t" /* spread sign bit of the result */ "movd %%mm5, %%ebx \n\t" /* load Divisor into EBX */ "movd %%mm7, %%edx \n\t" /* fill EDX with a sign bit */ "idivw %%bx \n\t" /* IDIV - VERY EXPENSIVE */ "movd %%eax, %%mm7 \n\t" /* move result of division into MM7 */ "packuswb %%mm0, %%mm7 \n\t" /* pack division result with saturation */ "movd %%mm7, %%eax \n\t" /* copy saturated result into EAX */ "mov %%al, (%%edi) \n\t" /* copy a byte result into Dest */ "movd %%mm3, %%edx \n\t" /* restore saved EDX */ "movd %%mm2, %%ebx \n\t" /* restore saved EBX */ "movd %%mm1, %%eax \n\t" /* restore saved EAX */ /* -- */ "movd %%mm6, %%esi \n\t" /* move Src pointer to the top pixel */ "sub $208, %%edx \n\t" /* EDX = Kernel address */ "inc %%esi \n\t" /* move Src pointer to the next pixel */ "inc %%edi \n\t" /* move Dest pointer to the next pixel */ /* --- */ "dec %%ecx \n\t" /* decrease loop counter COLUMNS */ "jnz .L10352 \n\t" /* check loop termination, proceed if required */ "add $8, %%esi \n\t" /* move to the next row in Src */ "add $8, %%edi \n\t" /* move to the next row in Dest */ "dec %%ebx \n\t" /* decrease loop counter ROWS */ "jnz .L10350 \n\t" /* check loop termination, proceed if required */ /* --- */ "emms \n\t" /* exit MMX state */ "popa \n\t":"=m" (Dest) /* %0 */ :"m"(Src), /* %1 */ "m"(rows), /* %2 */ "m"(columns), /* %3 */ "m"(Kernel), /* %4 */ "m"(Divisor) /* %5 */ ); #endif #endif return (0); } else { /* No non-MMX implementation yet */ return (-1); } } /*! \brief Filter using ConvolveKernel3x3ShiftRight: Dij = saturation0and255( ... ) \param Src The source 2D byte array to convolve. Should be different from destination. \param Dest The destination 2D byte array to store the result in. Should be different from source. \param rows Number of rows in source/destination array. Must be >2. \param columns Number of columns in source/destination array. Must be >2. \param Kernel The 2D convolution kernel of size 3x3. \param NRightShift The number of right bit shifts to apply to the convolution sum. Must be <7. Note: Non-MMX implementation not available for this function. \return Returns 1 if filter was applied, 0 otherwise. */ int SDL_imageFilterConvolveKernel3x3ShiftRight(unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char NRightShift) { /* Validate input parameters */ if ((Src == NULL) || (Dest == NULL) || (Kernel == NULL)) return(-1); if ((columns < 3) || (rows < 3) || (NRightShift > 7)) return (-1); if ((SDL_imageFilterMMXdetect())) { //#ifdef USE_MMX #if defined(USE_MMX) && defined(i386) #if !defined(GCC__) __asm { pusha pxor mm0, mm0 /* zero MM0 */ xor ebx, ebx /* zero EBX */ mov bl, NRightShift /* load NRightShift into BL */ movd mm4, ebx /* copy NRightShift into MM4 */ mov edx, Kernel /* load Kernel address into EDX */ movq mm5, [edx] /* MM5 = {0,K2,K1,K0} */ add edx, 8 /* second row |K0 K1 K2 0| */ movq mm6, [edx] /* MM6 = {0,K5,K4,K3} K = |K3 K4 K5 0| */ add edx, 8 /* third row |K6 K7 K8 0| */ movq mm7, [edx] /* MM7 = {0,K8,K7,K6} */ /* ---, */ mov eax, columns /* load columns into EAX */ mov esi, Src /* ESI = Src row 0 address */ mov edi, Dest /* load Dest address to EDI */ add edi, eax /* EDI = EDI + columns */ inc edi /* 1 byte offset from the left edge */ mov edx, rows /* initialize ROWS counter */ sub edx, 2 /* do not use first and last row */ /* ---, */ L10360: mov ecx, eax /* initialize COLUMS counter */ sub ecx, 2 /* do not use first and last column */ align 16 /* 16 byte alignment of the loop entry */ L10362: /* ---, */ movq mm1, [esi] /* load 8 bytes of the image first row */ add esi, eax /* move one row below */ movq mm2, [esi] /* load 8 bytes of the image second row */ add esi, eax /* move one row below */ movq mm3, [esi] /* load 8 bytes of the image third row */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpcklbw mm2, mm0 /* unpack first 4 bytes into words */ punpcklbw mm3, mm0 /* unpack first 4 bytes into words */ psrlw mm1, mm4 /* shift right each pixel NshiftRight times */ psrlw mm2, mm4 /* shift right each pixel NshiftRight times */ psrlw mm3, mm4 /* shift right each pixel NshiftRight times */ pmullw mm1, mm5 /* multiply words first row image*Kernel */ pmullw mm2, mm6 /* multiply words second row image*Kernel */ pmullw mm3, mm7 /* multiply words third row image*Kernel */ paddsw mm1, mm2 /* add 4 words of the first and second rows */ paddsw mm1, mm3 /* add 4 words of the third row and result */ movq mm2, mm1 /* copy MM1 into MM2 */ psrlq mm1, 32 /* shift 2 left words to the right */ paddsw mm1, mm2 /* add 2 left and 2 right result words */ movq mm3, mm1 /* copy MM1 into MM3 */ psrlq mm1, 16 /* shift 1 left word to the right */ paddsw mm1, mm3 /* add 1 left and 1 right result words */ packuswb mm1, mm0 /* pack shift result with saturation */ movd ebx, mm1 /* copy saturated result into EBX */ mov [edi], bl /* copy a byte result into Dest */ /* --, */ sub esi, eax /* move two rows up */ sub esi, eax inc esi /* move Src pointer to the next pixel */ inc edi /* move Dest pointer to the next pixel */ /* ---, */ dec ecx /* decrease loop counter COLUMNS */ jnz L10362 /* check loop termination, proceed if required */ add esi, 2 /* move to the next row in Src */ add edi, 2 /* move to the next row in Dest */ dec edx /* decrease loop counter ROWS */ jnz L10360 /* check loop termination, proceed if required */ /* ---, */ emms /* exit MMX state */ popa } #else asm volatile ("pusha \n\t" "pxor %%mm0, %%mm0 \n\t" /* zero MM0 */ "xor %%ebx, %%ebx \n\t" /* zero EBX */ "mov %5, %%bl \n\t" /* load NRightShift into BL */ "movd %%ebx, %%mm4 \n\t" /* copy NRightShift into MM4 */ "mov %4, %%edx \n\t" /* load Kernel address into EDX */ "movq (%%edx), %%mm5 \n\t" /* MM5 = {0,K2,K1,K0} */ "add $8, %%edx \n\t" /* second row |K0 K1 K2 0| */ "movq (%%edx), %%mm6 \n\t" /* MM6 = {0,K5,K4,K3} K = |K3 K4 K5 0| */ "add $8, %%edx \n\t" /* third row |K6 K7 K8 0| */ "movq (%%edx), %%mm7 \n\t" /* MM7 = {0,K8,K7,K6} */ /* --- */ "mov %3, %%eax \n\t" /* load columns into EAX */ "mov %1, %%esi \n\t" /* ESI = Src row 0 address */ "mov %0, %%edi \n\t" /* load Dest address to EDI */ "add %%eax, %%edi \n\t" /* EDI = EDI + columns */ "inc %%edi \n\t" /* 1 byte offset from the left edge */ "mov %2, %%edx \n\t" /* initialize ROWS counter */ "sub $2, %%edx \n\t" /* do not use first and last row */ /* --- */ ".L10360: \n\t" "mov %%eax, %%ecx \n\t" /* initialize COLUMS counter */ "sub $2, %%ecx \n\t" /* do not use first and last column */ ".align 16 \n\t" /* 16 byte alignment of the loop entry */ ".L10362: \n\t" /* --- */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the image first row */ "add %%eax, %%esi \n\t" /* move one row below */ "movq (%%esi), %%mm2 \n\t" /* load 8 bytes of the image second row */ "add %%eax, %%esi \n\t" /* move one row below */ "movq (%%esi), %%mm3 \n\t" /* load 8 bytes of the image third row */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpcklbw %%mm0, %%mm2 \n\t" /* unpack first 4 bytes into words */ "punpcklbw %%mm0, %%mm3 \n\t" /* unpack first 4 bytes into words */ "psrlw %%mm4, %%mm1 \n\t" /* shift right each pixel NshiftRight times */ "psrlw %%mm4, %%mm2 \n\t" /* shift right each pixel NshiftRight times */ "psrlw %%mm4, %%mm3 \n\t" /* shift right each pixel NshiftRight times */ "pmullw %%mm5, %%mm1 \n\t" /* multiply words first row image*Kernel */ "pmullw %%mm6, %%mm2 \n\t" /* multiply words second row image*Kernel */ "pmullw %%mm7, %%mm3 \n\t" /* multiply words third row image*Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the first and second rows */ "paddsw %%mm3, %%mm1 \n\t" /* add 4 words of the third row and result */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "psrlq $32, %%mm1 \n\t" /* shift 2 left words to the right */ "paddsw %%mm2, %%mm1 \n\t" /* add 2 left and 2 right result words */ "movq %%mm1, %%mm3 \n\t" /* copy MM1 into MM3 */ "psrlq $16, %%mm1 \n\t" /* shift 1 left word to the right */ "paddsw %%mm3, %%mm1 \n\t" /* add 1 left and 1 right result words */ "packuswb %%mm0, %%mm1 \n\t" /* pack shift result with saturation */ "movd %%mm1, %%ebx \n\t" /* copy saturated result into EBX */ "mov %%bl, (%%edi) \n\t" /* copy a byte result into Dest */ /* -- */ "sub %%eax, %%esi \n\t" /* move two rows up */ "sub %%eax, %%esi \n\t" "inc %%esi \n\t" /* move Src pointer to the next pixel */ "inc %%edi \n\t" /* move Dest pointer to the next pixel */ /* --- */ "dec %%ecx \n\t" /* decrease loop counter COLUMNS */ "jnz .L10362 \n\t" /* check loop termination, proceed if required */ "add $2, %%esi \n\t" /* move to the next row in Src */ "add $2, %%edi \n\t" /* move to the next row in Dest */ "dec %%edx \n\t" /* decrease loop counter ROWS */ "jnz .L10360 \n\t" /* check loop termination, proceed if required */ /* --- */ "emms \n\t" /* exit MMX state */ "popa \n\t":"=m" (Dest) /* %0 */ :"m"(Src), /* %1 */ "m"(rows), /* %2 */ "m"(columns), /* %3 */ "m"(Kernel), /* %4 */ "m"(NRightShift) /* %5 */ ); #endif #endif return (0); } else { /* No non-MMX implementation yet */ return (-1); } } /*! \brief Filter using ConvolveKernel5x5ShiftRight: Dij = saturation0and255( ... ) \param Src The source 2D byte array to convolve. Should be different from destination. \param Dest The destination 2D byte array to store the result in. Should be different from source. \param rows Number of rows in source/destination array. Must be >4. \param columns Number of columns in source/destination array. Must be >4. \param Kernel The 2D convolution kernel of size 5x5. \param NRightShift The number of right bit shifts to apply to the convolution sum. Must be <7. Note: Non-MMX implementation not available for this function. \return Returns 1 if filter was applied, 0 otherwise. */ int SDL_imageFilterConvolveKernel5x5ShiftRight(unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char NRightShift) { /* Validate input parameters */ if ((Src == NULL) || (Dest == NULL) || (Kernel == NULL)) return(-1); if ((columns < 5) || (rows < 5) || (NRightShift > 7)) return (-1); if ((SDL_imageFilterMMXdetect())) { //#ifdef USE_MMX #if defined(USE_MMX) && defined(i386) #if !defined(GCC__) __asm { pusha pxor mm0, mm0 /* zero MM0 */ xor ebx, ebx /* zero EBX */ mov bl, NRightShift /* load NRightShift into BL */ movd mm5, ebx /* copy NRightShift into MM5 */ mov edx, Kernel /* load Kernel address into EDX */ mov esi, Src /* load Src address to ESI */ mov edi, Dest /* load Dest address to EDI */ add edi, 2 /* 2 column offset from the left edge */ mov eax, columns /* load columns into EAX */ shl eax, 1 /* EAX = columns * 2 */ add edi, eax /* 2 row offset from the top edge */ shr eax, 1 /* EAX = columns */ mov ebx, rows /* initialize ROWS counter */ sub ebx, 4 /* do not use first 2 and last 2 rows */ /* ---, */ L10370: mov ecx, eax /* initialize COLUMNS counter */ sub ecx, 4 /* do not use first 2 and last 2 columns */ align 16 /* 16 byte alignment of the loop entry */ L10372: pxor mm7, mm7 /* zero MM7 (accumulator) */ movd mm6, esi /* save ESI in MM6 */ /* --- 1 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ psrlw mm1, mm5 /* shift right each pixel NshiftRight times */ psrlw mm2, mm5 /* shift right each pixel NshiftRight times */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 2 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ psrlw mm1, mm5 /* shift right each pixel NshiftRight times */ psrlw mm2, mm5 /* shift right each pixel NshiftRight times */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 3 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ psrlw mm1, mm5 /* shift right each pixel NshiftRight times */ psrlw mm2, mm5 /* shift right each pixel NshiftRight times */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 4 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ psrlw mm1, mm5 /* shift right each pixel NshiftRight times */ psrlw mm2, mm5 /* shift right each pixel NshiftRight times */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 5 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ psrlw mm1, mm5 /* shift right each pixel NshiftRight times */ psrlw mm2, mm5 /* shift right each pixel NshiftRight times */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* ---, */ movq mm3, mm7 /* copy MM7 into MM3 */ psrlq mm7, 32 /* shift 2 left words to the right */ paddsw mm7, mm3 /* add 2 left and 2 right result words */ movq mm2, mm7 /* copy MM7 into MM2 */ psrlq mm7, 16 /* shift 1 left word to the right */ paddsw mm7, mm2 /* add 1 left and 1 right result words */ movd mm1, eax /* save EAX in MM1 */ packuswb mm7, mm0 /* pack division result with saturation */ movd eax, mm7 /* copy saturated result into EAX */ mov [edi], al /* copy a byte result into Dest */ movd eax, mm1 /* restore saved EAX */ /* --, */ movd esi, mm6 /* move Src pointer to the top pixel */ sub edx, 72 /* EDX = Kernel address */ inc esi /* move Src pointer to the next pixel */ inc edi /* move Dest pointer to the next pixel */ /* ---, */ dec ecx /* decrease loop counter COLUMNS */ jnz L10372 /* check loop termination, proceed if required */ add esi, 4 /* move to the next row in Src */ add edi, 4 /* move to the next row in Dest */ dec ebx /* decrease loop counter ROWS */ jnz L10370 /* check loop termination, proceed if required */ /* ---, */ emms /* exit MMX state */ popa } #else asm volatile ("pusha \n\t" "pxor %%mm0, %%mm0 \n\t" /* zero MM0 */ "xor %%ebx, %%ebx \n\t" /* zero EBX */ "mov %5, %%bl \n\t" /* load NRightShift into BL */ "movd %%ebx, %%mm5 \n\t" /* copy NRightShift into MM5 */ "mov %4, %%edx \n\t" /* load Kernel address into EDX */ "mov %1, %%esi \n\t" /* load Src address to ESI */ "mov %0, %%edi \n\t" /* load Dest address to EDI */ "add $2, %%edi \n\t" /* 2 column offset from the left edge */ "mov %3, %%eax \n\t" /* load columns into EAX */ "shl $1, %%eax \n\t" /* EAX = columns * 2 */ "add %%eax, %%edi \n\t" /* 2 row offset from the top edge */ "shr $1, %%eax \n\t" /* EAX = columns */ "mov %2, %%ebx \n\t" /* initialize ROWS counter */ "sub $4, %%ebx \n\t" /* do not use first 2 and last 2 rows */ /* --- */ ".L10370: \n\t" "mov %%eax, %%ecx \n\t" /* initialize COLUMNS counter */ "sub $4, %%ecx \n\t" /* do not use first 2 and last 2 columns */ ".align 16 \n\t" /* 16 byte alignment of the loop entry */ ".L10372: \n\t" "pxor %%mm7, %%mm7 \n\t" /* zero MM7 (accumulator) */ "movd %%esi, %%mm6 \n\t" /* save ESI in MM6 */ /* --- 1 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */ "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 2 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */ "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 3 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */ "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 4 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */ "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 5 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */ "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- */ "movq %%mm7, %%mm3 \n\t" /* copy MM7 into MM3 */ "psrlq $32, %%mm7 \n\t" /* shift 2 left words to the right */ "paddsw %%mm3, %%mm7 \n\t" /* add 2 left and 2 right result words */ "movq %%mm7, %%mm2 \n\t" /* copy MM7 into MM2 */ "psrlq $16, %%mm7 \n\t" /* shift 1 left word to the right */ "paddsw %%mm2, %%mm7 \n\t" /* add 1 left and 1 right result words */ "movd %%eax, %%mm1 \n\t" /* save EAX in MM1 */ "packuswb %%mm0, %%mm7 \n\t" /* pack division result with saturation */ "movd %%mm7, %%eax \n\t" /* copy saturated result into EAX */ "mov %%al, (%%edi) \n\t" /* copy a byte result into Dest */ "movd %%mm1, %%eax \n\t" /* restore saved EAX */ /* -- */ "movd %%mm6, %%esi \n\t" /* move Src pointer to the top pixel */ "sub $72, %%edx \n\t" /* EDX = Kernel address */ "inc %%esi \n\t" /* move Src pointer to the next pixel */ "inc %%edi \n\t" /* move Dest pointer to the next pixel */ /* --- */ "dec %%ecx \n\t" /* decrease loop counter COLUMNS */ "jnz .L10372 \n\t" /* check loop termination, proceed if required */ "add $4, %%esi \n\t" /* move to the next row in Src */ "add $4, %%edi \n\t" /* move to the next row in Dest */ "dec %%ebx \n\t" /* decrease loop counter ROWS */ "jnz .L10370 \n\t" /* check loop termination, proceed if required */ /* --- */ "emms \n\t" /* exit MMX state */ "popa \n\t":"=m" (Dest) /* %0 */ :"m"(Src), /* %1 */ "m"(rows), /* %2 */ "m"(columns), /* %3 */ "m"(Kernel), /* %4 */ "m"(NRightShift) /* %5 */ ); #endif #endif return (0); } else { /* No non-MMX implementation yet */ return (-1); } } /*! \brief Filter using ConvolveKernel7x7ShiftRight: Dij = saturation0and255( ... ) \param Src The source 2D byte array to convolve. Should be different from destination. \param Dest The destination 2D byte array to store the result in. Should be different from source. \param rows Number of rows in source/destination array. Must be >6. \param columns Number of columns in source/destination array. Must be >6. \param Kernel The 2D convolution kernel of size 7x7. \param NRightShift The number of right bit shifts to apply to the convolution sum. Must be <7. Note: Non-MMX implementation not available for this function. \return Returns 1 if filter was applied, 0 otherwise. */ int SDL_imageFilterConvolveKernel7x7ShiftRight(unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char NRightShift) { /* Validate input parameters */ if ((Src == NULL) || (Dest == NULL) || (Kernel == NULL)) return(-1); if ((columns < 7) || (rows < 7) || (NRightShift > 7)) return (-1); if ((SDL_imageFilterMMXdetect())) { //#ifdef USE_MMX #if defined(USE_MMX) && defined(i386) #if !defined(GCC__) __asm { pusha pxor mm0, mm0 /* zero MM0 */ xor ebx, ebx /* zero EBX */ mov bl, NRightShift /* load NRightShift into BL */ movd mm5, ebx /* copy NRightShift into MM5 */ mov edx, Kernel /* load Kernel address into EDX */ mov esi, Src /* load Src address to ESI */ mov edi, Dest /* load Dest address to EDI */ add edi, 3 /* 3 column offset from the left edge */ mov eax, columns /* load columns into EAX */ add edi, eax /* 3 row offset from the top edge */ add edi, eax add edi, eax mov ebx, rows /* initialize ROWS counter */ sub ebx, 6 /* do not use first 3 and last 3 rows */ /* ---, */ L10380: mov ecx, eax /* initialize COLUMNS counter */ sub ecx, 6 /* do not use first 3 and last 3 columns */ align 16 /* 16 byte alignment of the loop entry */ L10382: pxor mm7, mm7 /* zero MM7 (accumulator) */ movd mm6, esi /* save ESI in MM6 */ /* --- 1 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ psrlw mm1, mm5 /* shift right each pixel NshiftRight times */ psrlw mm2, mm5 /* shift right each pixel NshiftRight times */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 2 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ psrlw mm1, mm5 /* shift right each pixel NshiftRight times */ psrlw mm2, mm5 /* shift right each pixel NshiftRight times */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 3 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ psrlw mm1, mm5 /* shift right each pixel NshiftRight times */ psrlw mm2, mm5 /* shift right each pixel NshiftRight times */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 4 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ psrlw mm1, mm5 /* shift right each pixel NshiftRight times */ psrlw mm2, mm5 /* shift right each pixel NshiftRight times */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 5 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ psrlw mm1, mm5 /* shift right each pixel NshiftRight times */ psrlw mm2, mm5 /* shift right each pixel NshiftRight times */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 6 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ psrlw mm1, mm5 /* shift right each pixel NshiftRight times */ psrlw mm2, mm5 /* shift right each pixel NshiftRight times */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 7 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ psrlw mm1, mm5 /* shift right each pixel NshiftRight times */ psrlw mm2, mm5 /* shift right each pixel NshiftRight times */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* ---, */ movq mm3, mm7 /* copy MM7 into MM3 */ psrlq mm7, 32 /* shift 2 left words to the right */ paddsw mm7, mm3 /* add 2 left and 2 right result words */ movq mm2, mm7 /* copy MM7 into MM2 */ psrlq mm7, 16 /* shift 1 left word to the right */ paddsw mm7, mm2 /* add 1 left and 1 right result words */ movd mm1, eax /* save EAX in MM1 */ packuswb mm7, mm0 /* pack division result with saturation */ movd eax, mm7 /* copy saturated result into EAX */ mov [edi], al /* copy a byte result into Dest */ movd eax, mm1 /* restore saved EAX */ /* --, */ movd esi, mm6 /* move Src pointer to the top pixel */ sub edx, 104 /* EDX = Kernel address */ inc esi /* move Src pointer to the next pixel */ inc edi /* move Dest pointer to the next pixel */ /* ---, */ dec ecx /* decrease loop counter COLUMNS */ jnz L10382 /* check loop termination, proceed if required */ add esi, 6 /* move to the next row in Src */ add edi, 6 /* move to the next row in Dest */ dec ebx /* decrease loop counter ROWS */ jnz L10380 /* check loop termination, proceed if required */ /* ---, */ emms /* exit MMX state */ popa } #else asm volatile ("pusha \n\t" "pxor %%mm0, %%mm0 \n\t" /* zero MM0 */ "xor %%ebx, %%ebx \n\t" /* zero EBX */ "mov %5, %%bl \n\t" /* load NRightShift into BL */ "movd %%ebx, %%mm5 \n\t" /* copy NRightShift into MM5 */ "mov %4, %%edx \n\t" /* load Kernel address into EDX */ "mov %1, %%esi \n\t" /* load Src address to ESI */ "mov %0, %%edi \n\t" /* load Dest address to EDI */ "add $3, %%edi \n\t" /* 3 column offset from the left edge */ "mov %3, %%eax \n\t" /* load columns into EAX */ "add %%eax, %%edi \n\t" /* 3 row offset from the top edge */ "add %%eax, %%edi \n\t" "add %%eax, %%edi \n\t" "mov %2, %%ebx \n\t" /* initialize ROWS counter */ "sub $6, %%ebx \n\t" /* do not use first 3 and last 3 rows */ /* --- */ ".L10380: \n\t" "mov %%eax, %%ecx \n\t" /* initialize COLUMNS counter */ "sub $6, %%ecx \n\t" /* do not use first 3 and last 3 columns */ ".align 16 \n\t" /* 16 byte alignment of the loop entry */ ".L10382: \n\t" "pxor %%mm7, %%mm7 \n\t" /* zero MM7 (accumulator) */ "movd %%esi, %%mm6 \n\t" /* save ESI in MM6 */ /* --- 1 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */ "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 2 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */ "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 3 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */ "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 4 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */ "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 5 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */ "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 6 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */ "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 7 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */ "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- */ "movq %%mm7, %%mm3 \n\t" /* copy MM7 into MM3 */ "psrlq $32, %%mm7 \n\t" /* shift 2 left words to the right */ "paddsw %%mm3, %%mm7 \n\t" /* add 2 left and 2 right result words */ "movq %%mm7, %%mm2 \n\t" /* copy MM7 into MM2 */ "psrlq $16, %%mm7 \n\t" /* shift 1 left word to the right */ "paddsw %%mm2, %%mm7 \n\t" /* add 1 left and 1 right result words */ "movd %%eax, %%mm1 \n\t" /* save EAX in MM1 */ "packuswb %%mm0, %%mm7 \n\t" /* pack division result with saturation */ "movd %%mm7, %%eax \n\t" /* copy saturated result into EAX */ "mov %%al, (%%edi) \n\t" /* copy a byte result into Dest */ "movd %%mm1, %%eax \n\t" /* restore saved EAX */ /* -- */ "movd %%mm6, %%esi \n\t" /* move Src pointer to the top pixel */ "sub $104, %%edx \n\t" /* EDX = Kernel address */ "inc %%esi \n\t" /* move Src pointer to the next pixel */ "inc %%edi \n\t" /* move Dest pointer to the next pixel */ /* --- */ "dec %%ecx \n\t" /* decrease loop counter COLUMNS */ "jnz .L10382 \n\t" /* check loop termination, proceed if required */ "add $6, %%esi \n\t" /* move to the next row in Src */ "add $6, %%edi \n\t" /* move to the next row in Dest */ "dec %%ebx \n\t" /* decrease loop counter ROWS */ "jnz .L10380 \n\t" /* check loop termination, proceed if required */ /* --- */ "emms \n\t" /* exit MMX state */ "popa \n\t":"=m" (Dest) /* %0 */ :"m"(Src), /* %1 */ "m"(rows), /* %2 */ "m"(columns), /* %3 */ "m"(Kernel), /* %4 */ "m"(NRightShift) /* %5 */ ); #endif #endif return (0); } else { /* No non-MMX implementation yet */ return (-1); } } /*! \brief Filter using ConvolveKernel9x9ShiftRight: Dij = saturation255( ... ) \param Src The source 2D byte array to convolve. Should be different from destination. \param Dest The destination 2D byte array to store the result in. Should be different from source. \param rows Number of rows in source/destination array. Must be >8. \param columns Number of columns in source/destination array. Must be >8. \param Kernel The 2D convolution kernel of size 9x9. \param NRightShift The number of right bit shifts to apply to the convolution sum. Must be <7. Note: Non-MMX implementation not available for this function. \return Returns 1 if filter was applied, 0 otherwise. */ int SDL_imageFilterConvolveKernel9x9ShiftRight(unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char NRightShift) { /* Validate input parameters */ if ((Src == NULL) || (Dest == NULL) || (Kernel == NULL)) return(-1); if ((columns < 9) || (rows < 9) || (NRightShift > 7)) return (-1); if ((SDL_imageFilterMMXdetect())) { //#ifdef USE_MMX #if defined(USE_MMX) && defined(i386) #if !defined(GCC__) __asm { pusha pxor mm0, mm0 /* zero MM0 */ xor ebx, ebx /* zero EBX */ mov bl, NRightShift /* load NRightShift into BL */ movd mm5, ebx /* copy NRightShift into MM5 */ mov edx, Kernel /* load Kernel address into EDX */ mov esi, Src /* load Src address to ESI */ mov edi, Dest /* load Dest address to EDI */ add edi, 4 /* 4 column offset from the left edge */ mov eax, columns /* load columns into EAX */ add edi, eax /* 4 row offset from the top edge */ add edi, eax add edi, eax add edi, eax mov ebx, rows /* initialize ROWS counter */ sub ebx, 8 /* do not use first 4 and last 4 rows */ /* ---, */ L10390: mov ecx, eax /* initialize COLUMNS counter */ sub ecx, 8 /* do not use first 4 and last 4 columns */ align 16 /* 16 byte alignment of the loop entry */ L10392: pxor mm7, mm7 /* zero MM7 (accumulator) */ movd mm6, esi /* save ESI in MM6 */ /* --- 1 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ inc esi /* move pointer to the next 8 bytes of Src */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ psrlw mm1, mm5 /* shift right each pixel NshiftRight times */ psrlw mm2, mm5 /* shift right each pixel NshiftRight times */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ movq mm1, [esi] /* load 8 bytes of the Src */ dec esi add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ psrlw mm1, mm5 /* shift right each pixel NshiftRight times */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 2 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ inc esi /* move pointer to the next 8 bytes of Src */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ psrlw mm1, mm5 /* shift right each pixel NshiftRight times */ psrlw mm2, mm5 /* shift right each pixel NshiftRight times */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ movq mm1, [esi] /* load 8 bytes of the Src */ dec esi add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ psrlw mm1, mm5 /* shift right each pixel NshiftRight times */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 3 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ inc esi /* move pointer to the next 8 bytes of Src */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ psrlw mm1, mm5 /* shift right each pixel NshiftRight times */ psrlw mm2, mm5 /* shift right each pixel NshiftRight times */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ movq mm1, [esi] /* load 8 bytes of the Src */ dec esi add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ psrlw mm1, mm5 /* shift right each pixel NshiftRight times */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 4 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ inc esi /* move pointer to the next 8 bytes of Src */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ psrlw mm1, mm5 /* shift right each pixel NshiftRight times */ psrlw mm2, mm5 /* shift right each pixel NshiftRight times */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ movq mm1, [esi] /* load 8 bytes of the Src */ dec esi add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ psrlw mm1, mm5 /* shift right each pixel NshiftRight times */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 5 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ inc esi /* move pointer to the next 8 bytes of Src */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ psrlw mm1, mm5 /* shift right each pixel NshiftRight times */ psrlw mm2, mm5 /* shift right each pixel NshiftRight times */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ movq mm1, [esi] /* load 8 bytes of the Src */ dec esi add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ psrlw mm1, mm5 /* shift right each pixel NshiftRight times */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 6 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ inc esi /* move pointer to the next 8 bytes of Src */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ psrlw mm1, mm5 /* shift right each pixel NshiftRight times */ psrlw mm2, mm5 /* shift right each pixel NshiftRight times */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ movq mm1, [esi] /* load 8 bytes of the Src */ dec esi add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ psrlw mm1, mm5 /* shift right each pixel NshiftRight times */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 7 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ inc esi /* move pointer to the next 8 bytes of Src */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ psrlw mm1, mm5 /* shift right each pixel NshiftRight times */ psrlw mm2, mm5 /* shift right each pixel NshiftRight times */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ movq mm1, [esi] /* load 8 bytes of the Src */ dec esi add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ psrlw mm1, mm5 /* shift right each pixel NshiftRight times */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 8 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ inc esi /* move pointer to the next 8 bytes of Src */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ psrlw mm1, mm5 /* shift right each pixel NshiftRight times */ psrlw mm2, mm5 /* shift right each pixel NshiftRight times */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ movq mm1, [esi] /* load 8 bytes of the Src */ dec esi add esi, eax /* move Src pointer 1 row below */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ psrlw mm1, mm5 /* shift right each pixel NshiftRight times */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* --- 9 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm2, mm1 /* copy MM1 into MM2 */ inc esi /* move pointer to the next 8 bytes of Src */ movq mm3, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ movq mm4, [edx] /* load 4 words of Kernel */ add edx, 8 /* move pointer to other 4 words */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ punpckhbw mm2, mm0 /* unpack second 4 bytes into words */ psrlw mm1, mm5 /* shift right each pixel NshiftRight times */ psrlw mm2, mm5 /* shift right each pixel NshiftRight times */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ pmullw mm2, mm4 /* mult 4 high words of Src and Kernel */ paddsw mm1, mm2 /* add 4 words of the high and low bytes */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ movq mm1, [esi] /* load 8 bytes of the Src */ movq mm3, [edx] /* load 4 words of Kernel */ punpcklbw mm1, mm0 /* unpack first 4 bytes into words */ psrlw mm1, mm5 /* shift right each pixel NshiftRight times */ pmullw mm1, mm3 /* mult 4 low words of Src and Kernel */ paddsw mm7, mm1 /* add MM1 to accumulator MM7 */ /* ---, */ movq mm3, mm7 /* copy MM7 into MM3 */ psrlq mm7, 32 /* shift 2 left words to the right */ paddsw mm7, mm3 /* add 2 left and 2 right result words */ movq mm2, mm7 /* copy MM7 into MM2 */ psrlq mm7, 16 /* shift 1 left word to the right */ paddsw mm7, mm2 /* add 1 left and 1 right result words */ movd mm1, eax /* save EAX in MM1 */ packuswb mm7, mm0 /* pack division result with saturation */ movd eax, mm7 /* copy saturated result into EAX */ mov [edi], al /* copy a byte result into Dest */ movd eax, mm1 /* restore saved EAX */ /* --, */ movd esi, mm6 /* move Src pointer to the top pixel */ sub edx, 208 /* EDX = Kernel address */ inc esi /* move Src pointer to the next pixel */ inc edi /* move Dest pointer to the next pixel */ /* ---, */ dec ecx /* decrease loop counter COLUMNS */ jnz L10392 /* check loop termination, proceed if required */ add esi, 8 /* move to the next row in Src */ add edi, 8 /* move to the next row in Dest */ dec ebx /* decrease loop counter ROWS */ jnz L10390 /* check loop termination, proceed if required */ /* ---, */ emms /* exit MMX state */ popa } #else asm volatile ("pusha \n\t" "pxor %%mm0, %%mm0 \n\t" /* zero MM0 */ "xor %%ebx, %%ebx \n\t" /* zero EBX */ "mov %5, %%bl \n\t" /* load NRightShift into BL */ "movd %%ebx, %%mm5 \n\t" /* copy NRightShift into MM5 */ "mov %4, %%edx \n\t" /* load Kernel address into EDX */ "mov %1, %%esi \n\t" /* load Src address to ESI */ "mov %0, %%edi \n\t" /* load Dest address to EDI */ "add $4, %%edi \n\t" /* 4 column offset from the left edge */ "mov %3, %%eax \n\t" /* load columns into EAX */ "add %%eax, %%edi \n\t" /* 4 row offset from the top edge */ "add %%eax, %%edi \n\t" "add %%eax, %%edi \n\t" "add %%eax, %%edi \n\t" "mov %2, %%ebx \n\t" /* initialize ROWS counter */ "sub $8, %%ebx \n\t" /* do not use first 4 and last 4 rows */ /* --- */ ".L10390: \n\t" "mov %%eax, %%ecx \n\t" /* initialize COLUMNS counter */ "sub $8, %%ecx \n\t" /* do not use first 4 and last 4 columns */ ".align 16 \n\t" /* 16 byte alignment of the loop entry */ ".L10392: \n\t" "pxor %%mm7, %%mm7 \n\t" /* zero MM7 (accumulator) */ "movd %%esi, %%mm6 \n\t" /* save ESI in MM6 */ /* --- 1 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */ "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "dec %%esi \n\t" "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 2 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */ "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "dec %%esi \n\t" "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 3 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */ "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "dec %%esi \n\t" "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 4 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */ "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "dec %%esi \n\t" "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 5 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */ "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "dec %%esi \n\t" "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 6 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */ "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "dec %%esi \n\t" "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 7 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */ "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "dec %%esi \n\t" "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 8 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */ "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "dec %%esi \n\t" "add %%eax, %%esi \n\t" /* move Src pointer 1 row below */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- 9 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq %%mm1, %%mm2 \n\t" /* copy MM1 into MM2 */ "inc %%esi \n\t" /* move pointer to the next 8 bytes of Src */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "movq (%%edx), %%mm4 \n\t" /* load 4 words of Kernel */ "add $8, %%edx \n\t" /* move pointer to other 4 words */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "punpckhbw %%mm0, %%mm2 \n\t" /* unpack second 4 bytes into words */ "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */ "psrlw %%mm5, %%mm2 \n\t" /* shift right each pixel NshiftRight times */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "pmullw %%mm4, %%mm2 \n\t" /* mult. 4 high words of Src and Kernel */ "paddsw %%mm2, %%mm1 \n\t" /* add 4 words of the high and low bytes */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ "movq (%%esi), %%mm1 \n\t" /* load 8 bytes of the Src */ "movq (%%edx), %%mm3 \n\t" /* load 4 words of Kernel */ "punpcklbw %%mm0, %%mm1 \n\t" /* unpack first 4 bytes into words */ "psrlw %%mm5, %%mm1 \n\t" /* shift right each pixel NshiftRight times */ "pmullw %%mm3, %%mm1 \n\t" /* mult. 4 low words of Src and Kernel */ "paddsw %%mm1, %%mm7 \n\t" /* add MM1 to accumulator MM7 */ /* --- */ "movq %%mm7, %%mm3 \n\t" /* copy MM7 into MM3 */ "psrlq $32, %%mm7 \n\t" /* shift 2 left words to the right */ "paddsw %%mm3, %%mm7 \n\t" /* add 2 left and 2 right result words */ "movq %%mm7, %%mm2 \n\t" /* copy MM7 into MM2 */ "psrlq $16, %%mm7 \n\t" /* shift 1 left word to the right */ "paddsw %%mm2, %%mm7 \n\t" /* add 1 left and 1 right result words */ "movd %%eax, %%mm1 \n\t" /* save EAX in MM1 */ "packuswb %%mm0, %%mm7 \n\t" /* pack division result with saturation */ "movd %%mm7, %%eax \n\t" /* copy saturated result into EAX */ "mov %%al, (%%edi) \n\t" /* copy a byte result into Dest */ "movd %%mm1, %%eax \n\t" /* restore saved EAX */ /* -- */ "movd %%mm6, %%esi \n\t" /* move Src pointer to the top pixel */ "sub $208, %%edx \n\t" /* EDX = Kernel address */ "inc %%esi \n\t" /* move Src pointer to the next pixel */ "inc %%edi \n\t" /* move Dest pointer to the next pixel */ /* --- */ "dec %%ecx \n\t" /* decrease loop counter COLUMNS */ "jnz .L10392 \n\t" /* check loop termination, proceed if required */ "add $8, %%esi \n\t" /* move to the next row in Src */ "add $8, %%edi \n\t" /* move to the next row in Dest */ "dec %%ebx \n\t" /* decrease loop counter ROWS */ "jnz .L10390 \n\t" /* check loop termination, proceed if required */ /* --- */ "emms \n\t" /* exit MMX state */ "popa \n\t":"=m" (Dest) /* %0 */ :"m"(Src), /* %1 */ "m"(rows), /* %2 */ "m"(columns), /* %3 */ "m"(Kernel), /* %4 */ "m"(NRightShift) /* %5 */ ); #endif #endif return (0); } else { /* No non-MMX implementation yet */ return (-1); } } /* ------------------------------------------------------------------------------------ */ /*! \brief Filter using SobelX: Dij = saturation255( ... ) \param Src The source 2D byte array to sobel-filter. Should be different from destination. \param Dest The destination 2D byte array to store the result in. Should be different from source. \param rows Number of rows in source/destination array. Must be >2. \param columns Number of columns in source/destination array. Must be >7. Note: Non-MMX implementation not available for this function. \return Returns 1 if filter was applied, 0 otherwise. */ int SDL_imageFilterSobelX(unsigned char *Src, unsigned char *Dest, int rows, int columns) { /* Validate input parameters */ if ((Src == NULL) || (Dest == NULL)) return(-1); if ((columns < 8) || (rows < 3)) return (-1); if ((SDL_imageFilterMMXdetect())) { //#ifdef USE_MMX #if defined(USE_MMX) && defined(i386) #if !defined(GCC__) __asm { pusha pxor mm0, mm0 /* zero MM0 */ mov eax, columns /* load columns into EAX */ /* ---, */ mov esi, Src /* ESI = Src row 0 address */ mov edi, Dest /* load Dest address to EDI */ add edi, eax /* EDI = EDI + columns */ inc edi /* 1 byte offset from the left edge */ mov edx, rows /* initialize ROWS counter */ sub edx, 2 /* do not use first and last rows */ /* ---, */ L10400: mov ecx, eax /* initialize COLUMS counter */ shr ecx, 3 /* EBX/8 (MMX loads 8 bytes at a time) */ mov ebx, esi /* save ESI in EBX */ movd mm1, edi /* save EDI in MM1 */ align 16 /* 16 byte alignment of the loop entry */ L10402: /* ---, */ movq mm4, [esi] /* load 8 bytes from Src */ movq mm5, mm4 /* save MM4 in MM5 */ add esi, 2 /* move ESI pointer 2 bytes right */ punpcklbw mm4, mm0 /* unpack 4 low bytes into words */ punpckhbw mm5, mm0 /* unpack 4 high bytes into words */ movq mm6, [esi] /* load 8 bytes from Src */ movq mm7, mm6 /* save MM6 in MM7 */ sub esi, 2 /* move ESI pointer back 2 bytes left */ punpcklbw mm6, mm0 /* unpack 4 low bytes into words */ punpckhbw mm7, mm0 /* unpack 4 high bytes into words */ add esi, eax /* move to the next row of Src */ movq mm2, [esi] /* load 8 bytes from Src */ movq mm3, mm2 /* save MM2 in MM3 */ add esi, 2 /* move ESI pointer 2 bytes right */ punpcklbw mm2, mm0 /* unpack 4 low bytes into words */ punpckhbw mm3, mm0 /* unpack 4 high bytes into words */ paddw mm4, mm2 /* add 4 low bytes to accumolator MM4 */ paddw mm5, mm3 /* add 4 high bytes to accumolator MM5 */ paddw mm4, mm2 /* add 4 low bytes to accumolator MM4 */ paddw mm5, mm3 /* add 4 high bytes to accumolator MM5 */ movq mm2, [esi] /* load 8 bytes from Src */ movq mm3, mm2 /* save MM2 in MM3 */ sub esi, 2 /* move ESI pointer back 2 bytes left */ punpcklbw mm2, mm0 /* unpack 4 low bytes into words */ punpckhbw mm3, mm0 /* unpack 4 high bytes into words */ paddw mm6, mm2 /* add 4 low bytes to accumolator MM6 */ paddw mm7, mm3 /* add 4 high bytes to accumolator MM7 */ paddw mm6, mm2 /* add 4 low bytes to accumolator MM6 */ paddw mm7, mm3 /* add 4 high bytes to accumolator MM7 */ add esi, eax /* move to the next row of Src */ movq mm2, [esi] /* load 8 bytes from Src */ movq mm3, mm2 /* save MM2 in MM3 */ add esi, 2 /* move ESI pointer 2 bytes right */ punpcklbw mm2, mm0 /* unpack 4 low bytes into words */ punpckhbw mm3, mm0 /* unpack 4 high bytes into words */ paddw mm4, mm2 /* add 4 low bytes to accumolator MM4 */ paddw mm5, mm3 /* add 4 high bytes to accumolator MM5 */ movq mm2, [esi] /* load 8 bytes from Src */ movq mm3, mm2 /* save MM2 in MM3 */ sub esi, 2 /* move ESI pointer back 2 bytes left */ punpcklbw mm2, mm0 /* unpack 4 low bytes into words */ punpckhbw mm3, mm0 /* unpack 4 high bytes into words */ paddw mm6, mm2 /* add 4 low bytes to accumolator MM6 */ paddw mm7, mm3 /* add 4 high bytes to accumolator MM7 */ /* ---, */ movq mm2, mm4 /* copy MM4 into MM2 */ psrlq mm4, 32 /* shift 2 left words to the right */ psubw mm4, mm2 /* MM4 = MM4 - MM2 */ movq mm3, mm6 /* copy MM6 into MM3 */ psrlq mm6, 32 /* shift 2 left words to the right */ psubw mm6, mm3 /* MM6 = MM6 - MM3 */ punpckldq mm4, mm6 /* combine 2 words of MM6 and 2 words of MM4 */ movq mm2, mm5 /* copy MM6 into MM2 */ psrlq mm5, 32 /* shift 2 left words to the right */ psubw mm5, mm2 /* MM5 = MM5 - MM2 */ movq mm3, mm7 /* copy MM7 into MM3 */ psrlq mm7, 32 /* shift 2 left words to the right */ psubw mm7, mm3 /* MM7 = MM7 - MM3 */ punpckldq mm5, mm7 /* combine 2 words of MM7 and 2 words of MM5 */ /* Take abs values of MM4 and MM5 */ movq mm6, mm4 /* copy MM4 into MM6 */ movq mm7, mm5 /* copy MM5 into MM7 */ psraw mm6, 15 /* fill MM6 words with word sign bit */ psraw mm7, 15 /* fill MM7 words with word sign bit */ pxor mm4, mm6 /* take 1's compliment of only neg words */ pxor mm5, mm7 /* take 1's compliment of only neg words */ psubsw mm4, mm6 /* add 1 to only neg words, W-(-1) or W-0 */ psubsw mm5, mm7 /* add 1 to only neg words, W-(-1) or W-0 */ packuswb mm4, mm5 /* combine and pack/saturate MM5 and MM4 */ movq [edi], mm4 /* store result in Dest */ /* ---, */ sub esi, eax /* move to the current top row in Src */ sub esi, eax add esi, 8 /* move Src pointer to the next 8 pixels */ add edi, 8 /* move Dest pointer to the next 8 pixels */ /* ---, */ dec ecx /* decrease loop counter COLUMNS */ jnz L10402 /* check loop termination, proceed if required */ mov esi, ebx /* restore most left current row Src address */ movd edi, mm1 /* restore most left current row Dest address */ add esi, eax /* move to the next row in Src */ add edi, eax /* move to the next row in Dest */ dec edx /* decrease loop counter ROWS */ jnz L10400 /* check loop termination, proceed if required */ /* ---, */ emms /* exit MMX state */ popa } #else asm volatile ("pusha \n\t" "pxor %%mm0, %%mm0 \n\t" /* zero MM0 */ "mov %3, %%eax \n\t" /* load columns into EAX */ /* --- */ "mov %1, %%esi \n\t" /* ESI = Src row 0 address */ "mov %0, %%edi \n\t" /* load Dest address to EDI */ "add %%eax, %%edi \n\t" /* EDI = EDI + columns */ "inc %%edi \n\t" /* 1 byte offset from the left edge */ "mov %2, %%edx \n\t" /* initialize ROWS counter */ "sub $2, %%edx \n\t" /* do not use first and last rows */ /* --- */ ".L10400: \n\t" "mov %%eax, %%ecx \n\t" /* initialize COLUMS counter */ "shr $3, %%ecx \n\t" /* EBX/8 (MMX loads 8 bytes at a time) */ "mov %%esi, %%ebx \n\t" /* save ESI in EBX */ "movd %%edi, %%mm1 \n\t" /* save EDI in MM1 */ ".align 16 \n\t" /* 16 byte alignment of the loop entry */ ".L10402: \n\t" /* --- */ "movq (%%esi), %%mm4 \n\t" /* load 8 bytes from Src */ "movq %%mm4, %%mm5 \n\t" /* save MM4 in MM5 */ "add $2, %%esi \n\t" /* move ESI pointer 2 bytes right */ "punpcklbw %%mm0, %%mm4 \n\t" /* unpack 4 low bytes into words */ "punpckhbw %%mm0, %%mm5 \n\t" /* unpack 4 high bytes into words */ "movq (%%esi), %%mm6 \n\t" /* load 8 bytes from Src */ "movq %%mm6, %%mm7 \n\t" /* save MM6 in MM7 */ "sub $2, %%esi \n\t" /* move ESI pointer back 2 bytes left */ "punpcklbw %%mm0, %%mm6 \n\t" /* unpack 4 low bytes into words */ "punpckhbw %%mm0, %%mm7 \n\t" /* unpack 4 high bytes into words */ "add %%eax, %%esi \n\t" /* move to the next row of Src */ "movq (%%esi), %%mm2 \n\t" /* load 8 bytes from Src */ "movq %%mm2, %%mm3 \n\t" /* save MM2 in MM3 */ "add $2, %%esi \n\t" /* move ESI pointer 2 bytes right */ "punpcklbw %%mm0, %%mm2 \n\t" /* unpack 4 low bytes into words */ "punpckhbw %%mm0, %%mm3 \n\t" /* unpack 4 high bytes into words */ "paddw %%mm2, %%mm4 \n\t" /* add 4 low bytes to accumolator MM4 */ "paddw %%mm3, %%mm5 \n\t" /* add 4 high bytes to accumolator MM5 */ "paddw %%mm2, %%mm4 \n\t" /* add 4 low bytes to accumolator MM4 */ "paddw %%mm3, %%mm5 \n\t" /* add 4 high bytes to accumolator MM5 */ "movq (%%esi), %%mm2 \n\t" /* load 8 bytes from Src */ "movq %%mm2, %%mm3 \n\t" /* save MM2 in MM3 */ "sub $2, %%esi \n\t" /* move ESI pointer back 2 bytes left */ "punpcklbw %%mm0, %%mm2 \n\t" /* unpack 4 low bytes into words */ "punpckhbw %%mm0, %%mm3 \n\t" /* unpack 4 high bytes into words */ "paddw %%mm2, %%mm6 \n\t" /* add 4 low bytes to accumolator MM6 */ "paddw %%mm3, %%mm7 \n\t" /* add 4 high bytes to accumolator MM7 */ "paddw %%mm2, %%mm6 \n\t" /* add 4 low bytes to accumolator MM6 */ "paddw %%mm3, %%mm7 \n\t" /* add 4 high bytes to accumolator MM7 */ "add %%eax, %%esi \n\t" /* move to the next row of Src */ "movq (%%esi), %%mm2 \n\t" /* load 8 bytes from Src */ "movq %%mm2, %%mm3 \n\t" /* save MM2 in MM3 */ "add $2, %%esi \n\t" /* move ESI pointer 2 bytes right */ "punpcklbw %%mm0, %%mm2 \n\t" /* unpack 4 low bytes into words */ "punpckhbw %%mm0, %%mm3 \n\t" /* unpack 4 high bytes into words */ "paddw %%mm2, %%mm4 \n\t" /* add 4 low bytes to accumolator MM4 */ "paddw %%mm3, %%mm5 \n\t" /* add 4 high bytes to accumolator MM5 */ "movq (%%esi), %%mm2 \n\t" /* load 8 bytes from Src */ "movq %%mm2, %%mm3 \n\t" /* save MM2 in MM3 */ "sub $2, %%esi \n\t" /* move ESI pointer back 2 bytes left */ "punpcklbw %%mm0, %%mm2 \n\t" /* unpack 4 low bytes into words */ "punpckhbw %%mm0, %%mm3 \n\t" /* unpack 4 high bytes into words */ "paddw %%mm2, %%mm6 \n\t" /* add 4 low bytes to accumolator MM6 */ "paddw %%mm3, %%mm7 \n\t" /* add 4 high bytes to accumolator MM7 */ /* --- */ "movq %%mm4, %%mm2 \n\t" /* copy MM4 into MM2 */ "psrlq $32, %%mm4 \n\t" /* shift 2 left words to the right */ "psubw %%mm2, %%mm4 \n\t" /* MM4 = MM4 - MM2 */ "movq %%mm6, %%mm3 \n\t" /* copy MM6 into MM3 */ "psrlq $32, %%mm6 \n\t" /* shift 2 left words to the right */ "psubw %%mm3, %%mm6 \n\t" /* MM6 = MM6 - MM3 */ "punpckldq %%mm6, %%mm4 \n\t" /* combine 2 words of MM6 and 2 words of MM4 */ "movq %%mm5, %%mm2 \n\t" /* copy MM6 into MM2 */ "psrlq $32, %%mm5 \n\t" /* shift 2 left words to the right */ "psubw %%mm2, %%mm5 \n\t" /* MM5 = MM5 - MM2 */ "movq %%mm7, %%mm3 \n\t" /* copy MM7 into MM3 */ "psrlq $32, %%mm7 \n\t" /* shift 2 left words to the right */ "psubw %%mm3, %%mm7 \n\t" /* MM7 = MM7 - MM3 */ "punpckldq %%mm7, %%mm5 \n\t" /* combine 2 words of MM7 and 2 words of MM5 */ /* Take abs values of MM4 and MM5 */ "movq %%mm4, %%mm6 \n\t" /* copy MM4 into MM6 */ "movq %%mm5, %%mm7 \n\t" /* copy MM5 into MM7 */ "psraw $15, %%mm6 \n\t" /* fill MM6 words with word sign bit */ "psraw $15, %%mm7 \n\t" /* fill MM7 words with word sign bit */ "pxor %%mm6, %%mm4 \n\t" /* take 1's compliment of only neg. words */ "pxor %%mm7, %%mm5 \n\t" /* take 1's compliment of only neg. words */ "psubsw %%mm6, %%mm4 \n\t" /* add 1 to only neg. words, W-(-1) or W-0 */ "psubsw %%mm7, %%mm5 \n\t" /* add 1 to only neg. words, W-(-1) or W-0 */ "packuswb %%mm5, %%mm4 \n\t" /* combine and pack/saturate MM5 and MM4 */ "movq %%mm4, (%%edi) \n\t" /* store result in Dest */ /* --- */ "sub %%eax, %%esi \n\t" /* move to the current top row in Src */ "sub %%eax, %%esi \n\t" "add $8, %%esi \n\t" /* move Src pointer to the next 8 pixels */ "add $8, %%edi \n\t" /* move Dest pointer to the next 8 pixels */ /* --- */ "dec %%ecx \n\t" /* decrease loop counter COLUMNS */ "jnz .L10402 \n\t" /* check loop termination, proceed if required */ "mov %%ebx, %%esi \n\t" /* restore most left current row Src address */ "movd %%mm1, %%edi \n\t" /* restore most left current row Dest address */ "add %%eax, %%esi \n\t" /* move to the next row in Src */ "add %%eax, %%edi \n\t" /* move to the next row in Dest */ "dec %%edx \n\t" /* decrease loop counter ROWS */ "jnz .L10400 \n\t" /* check loop termination, proceed if required */ /* --- */ "emms \n\t" /* exit MMX state */ "popa \n\t":"=m" (Dest) /* %0 */ :"m"(Src), /* %1 */ "m"(rows), /* %2 */ "m"(columns) /* %3 */ ); #endif #endif return (0); } else { /* No non-MMX implementation yet */ return (-1); } } /*! \brief Filter using SobelXShiftRight: Dij = saturation255( ... ) \param Src The source 2D byte array to sobel-filter. Should be different from destination. \param Dest The destination 2D byte array to store the result in. Should be different from source. \param rows Number of rows in source/destination array. Must be >2. \param columns Number of columns in source/destination array. Must be >8. \param NRightShift The number of right bit shifts to apply to the filter sum. Must be <7. Note: Non-MMX implementation not available for this function. \return Returns 1 if filter was applied, 0 otherwise. */ int SDL_imageFilterSobelXShiftRight(unsigned char *Src, unsigned char *Dest, int rows, int columns, unsigned char NRightShift) { /* Validate input parameters */ if ((Src == NULL) || (Dest == NULL)) return(-1); if ((columns < 8) || (rows < 3) || (NRightShift > 7)) return (-1); if ((SDL_imageFilterMMXdetect())) { //#ifdef USE_MMX #if defined(USE_MMX) && defined(i386) #if !defined(GCC__) __asm { pusha pxor mm0, mm0 /* zero MM0 */ mov eax, columns /* load columns into EAX */ xor ebx, ebx /* zero EBX */ mov bl, NRightShift /* load NRightShift into BL */ movd mm1, ebx /* copy NRightShift into MM1 */ /* ---, */ mov esi, Src /* ESI = Src row 0 address */ mov edi, Dest /* load Dest address to EDI */ add edi, eax /* EDI = EDI + columns */ inc edi /* 1 byte offset from the left edge */ /* initialize ROWS counter */ sub rows, 2 /* do not use first and last rows */ /* ---, */ L10410: mov ecx, eax /* initialize COLUMS counter */ shr ecx, 3 /* EBX/8 (MMX loads 8 bytes at a time) */ mov ebx, esi /* save ESI in EBX */ mov edx, edi /* save EDI in EDX */ align 16 /* 16 byte alignment of the loop entry */ L10412: /* ---, */ movq mm4, [esi] /* load 8 bytes from Src */ movq mm5, mm4 /* save MM4 in MM5 */ add esi, 2 /* move ESI pointer 2 bytes right */ punpcklbw mm4, mm0 /* unpack 4 low bytes into words */ punpckhbw mm5, mm0 /* unpack 4 high bytes into words */ psrlw mm4, mm1 /* shift right each pixel NshiftRight times */ psrlw mm5, mm1 /* shift right each pixel NshiftRight times */ movq mm6, [esi] /* load 8 bytes from Src */ movq mm7, mm6 /* save MM6 in MM7 */ sub esi, 2 /* move ESI pointer back 2 bytes left */ punpcklbw mm6, mm0 /* unpack 4 low bytes into words */ punpckhbw mm7, mm0 /* unpack 4 high bytes into words */ psrlw mm6, mm1 /* shift right each pixel NshiftRight times */ psrlw mm7, mm1 /* shift right each pixel NshiftRight times */ add esi, eax /* move to the next row of Src */ movq mm2, [esi] /* load 8 bytes from Src */ movq mm3, mm2 /* save MM2 in MM3 */ add esi, 2 /* move ESI pointer 2 bytes right */ punpcklbw mm2, mm0 /* unpack 4 low bytes into words */ punpckhbw mm3, mm0 /* unpack 4 high bytes into words */ psrlw mm2, mm1 /* shift right each pixel NshiftRight times */ psrlw mm3, mm1 /* shift right each pixel NshiftRight times */ paddw mm4, mm2 /* add 4 low bytes to accumolator MM4 */ paddw mm5, mm3 /* add 4 high bytes to accumolator MM5 */ paddw mm4, mm2 /* add 4 low bytes to accumolator MM4 */ paddw mm5, mm3 /* add 4 high bytes to accumolator MM5 */ movq mm2, [esi] /* load 8 bytes from Src */ movq mm3, mm2 /* save MM2 in MM3 */ sub esi, 2 /* move ESI pointer back 2 bytes left */ punpcklbw mm2, mm0 /* unpack 4 low bytes into words */ punpckhbw mm3, mm0 /* unpack 4 high bytes into words */ psrlw mm2, mm1 /* shift right each pixel NshiftRight times */ psrlw mm3, mm1 /* shift right each pixel NshiftRight times */ paddw mm6, mm2 /* add 4 low bytes to accumolator MM6 */ paddw mm7, mm3 /* add 4 high bytes to accumolator MM7 */ paddw mm6, mm2 /* add 4 low bytes to accumolator MM6 */ paddw mm7, mm3 /* add 4 high bytes to accumolator MM7 */ add esi, eax /* move to the next row of Src */ movq mm2, [esi] /* load 8 bytes from Src */ movq mm3, mm2 /* save MM2 in MM3 */ add esi, 2 /* move ESI pointer 2 bytes right */ punpcklbw mm2, mm0 /* unpack 4 low bytes into words */ punpckhbw mm3, mm0 /* unpack 4 high bytes into words */ psrlw mm2, mm1 /* shift right each pixel NshiftRight times */ psrlw mm3, mm1 /* shift right each pixel NshiftRight times */ paddw mm4, mm2 /* add 4 low bytes to accumolator MM4 */ paddw mm5, mm3 /* add 4 high bytes to accumolator MM5 */ movq mm2, [esi] /* load 8 bytes from Src */ movq mm3, mm2 /* save MM2 in MM3 */ sub esi, 2 /* move ESI pointer back 2 bytes left */ punpcklbw mm2, mm0 /* unpack 4 low bytes into words */ punpckhbw mm3, mm0 /* unpack 4 high bytes into words */ psrlw mm2, mm1 /* shift right each pixel NshiftRight times */ psrlw mm3, mm1 /* shift right each pixel NshiftRight times */ paddw mm6, mm2 /* add 4 low bytes to accumolator MM6 */ paddw mm7, mm3 /* add 4 high bytes to accumolator MM7 */ /* ---, */ movq mm2, mm4 /* copy MM4 into MM2 */ psrlq mm4, 32 /* shift 2 left words to the right */ psubw mm4, mm2 /* MM4 = MM4 - MM2 */ movq mm3, mm6 /* copy MM6 into MM3 */ psrlq mm6, 32 /* shift 2 left words to the right */ psubw mm6, mm3 /* MM6 = MM6 - MM3 */ punpckldq mm4, mm6 /* combine 2 words of MM6 and 2 words of MM4 */ movq mm2, mm5 /* copy MM6 into MM2 */ psrlq mm5, 32 /* shift 2 left words to the right */ psubw mm5, mm2 /* MM5 = MM5 - MM2 */ movq mm3, mm7 /* copy MM7 into MM3 */ psrlq mm7, 32 /* shift 2 left words to the right */ psubw mm7, mm3 /* MM7 = MM7 - MM3 */ punpckldq mm5, mm7 /* combine 2 words of MM7 and 2 words of MM5 */ /* Take abs values of MM4 and MM5 */ movq mm6, mm4 /* copy MM4 into MM6 */ movq mm7, mm5 /* copy MM5 into MM7 */ psraw mm6, 15 /* fill MM6 words with word sign bit */ psraw mm7, 15 /* fill MM7 words with word sign bit */ pxor mm4, mm6 /* take 1's compliment of only neg words */ pxor mm5, mm7 /* take 1's compliment of only neg words */ psubsw mm4, mm6 /* add 1 to only neg words, W-(-1) or W-0 */ psubsw mm5, mm7 /* add 1 to only neg words, W-(-1) or W-0 */ packuswb mm4, mm5 /* combine and pack/saturate MM5 and MM4 */ movq [edi], mm4 /* store result in Dest */ /* ---, */ sub esi, eax /* move to the current top row in Src */ sub esi, eax add esi, 8 /* move Src pointer to the next 8 pixels */ add edi, 8 /* move Dest pointer to the next 8 pixels */ /* ---, */ dec ecx /* decrease loop counter COLUMNS */ jnz L10412 /* check loop termination, proceed if required */ mov esi, ebx /* restore most left current row Src address */ mov edi, edx /* restore most left current row Dest address */ add esi, eax /* move to the next row in Src */ add edi, eax /* move to the next row in Dest */ dec rows /* decrease loop counter ROWS */ jnz L10410 /* check loop termination, proceed if required */ /* ---, */ emms /* exit MMX state */ popa } #else asm volatile ("pusha \n\t" "pxor %%mm0, %%mm0 \n\t" /* zero MM0 */ "mov %3, %%eax \n\t" /* load columns into EAX */ "xor %%ebx, %%ebx \n\t" /* zero EBX */ "mov %4, %%bl \n\t" /* load NRightShift into BL */ "movd %%ebx, %%mm1 \n\t" /* copy NRightShift into MM1 */ /* --- */ "mov %1, %%esi \n\t" /* ESI = Src row 0 address */ "mov %0, %%edi \n\t" /* load Dest address to EDI */ "add %%eax, %%edi \n\t" /* EDI = EDI + columns */ "inc %%edi \n\t" /* 1 byte offset from the left edge */ /* initialize ROWS counter */ "subl $2, %2 \n\t" /* do not use first and last rows */ /* --- */ ".L10410: \n\t" "mov %%eax, %%ecx \n\t" /* initialize COLUMS counter */ "shr $3, %%ecx \n\t" /* EBX/8 (MMX loads 8 bytes at a time) */ "mov %%esi, %%ebx \n\t" /* save ESI in EBX */ "mov %%edi, %%edx \n\t" /* save EDI in EDX */ ".align 16 \n\t" /* 16 byte alignment of the loop entry */ ".L10412: \n\t" /* --- */ "movq (%%esi), %%mm4 \n\t" /* load 8 bytes from Src */ "movq %%mm4, %%mm5 \n\t" /* save MM4 in MM5 */ "add $2, %%esi \n\t" /* move ESI pointer 2 bytes right */ "punpcklbw %%mm0, %%mm4 \n\t" /* unpack 4 low bytes into words */ "punpckhbw %%mm0, %%mm5 \n\t" /* unpack 4 high bytes into words */ "psrlw %%mm1, %%mm4 \n\t" /* shift right each pixel NshiftRight times */ "psrlw %%mm1, %%mm5 \n\t" /* shift right each pixel NshiftRight times */ "movq (%%esi), %%mm6 \n\t" /* load 8 bytes from Src */ "movq %%mm6, %%mm7 \n\t" /* save MM6 in MM7 */ "sub $2, %%esi \n\t" /* move ESI pointer back 2 bytes left */ "punpcklbw %%mm0, %%mm6 \n\t" /* unpack 4 low bytes into words */ "punpckhbw %%mm0, %%mm7 \n\t" /* unpack 4 high bytes into words */ "psrlw %%mm1, %%mm6 \n\t" /* shift right each pixel NshiftRight times */ "psrlw %%mm1, %%mm7 \n\t" /* shift right each pixel NshiftRight times */ "add %%eax, %%esi \n\t" /* move to the next row of Src */ "movq (%%esi), %%mm2 \n\t" /* load 8 bytes from Src */ "movq %%mm2, %%mm3 \n\t" /* save MM2 in MM3 */ "add $2, %%esi \n\t" /* move ESI pointer 2 bytes right */ "punpcklbw %%mm0, %%mm2 \n\t" /* unpack 4 low bytes into words */ "punpckhbw %%mm0, %%mm3 \n\t" /* unpack 4 high bytes into words */ "psrlw %%mm1, %%mm2 \n\t" /* shift right each pixel NshiftRight times */ "psrlw %%mm1, %%mm3 \n\t" /* shift right each pixel NshiftRight times */ "paddw %%mm2, %%mm4 \n\t" /* add 4 low bytes to accumolator MM4 */ "paddw %%mm3, %%mm5 \n\t" /* add 4 high bytes to accumolator MM5 */ "paddw %%mm2, %%mm4 \n\t" /* add 4 low bytes to accumolator MM4 */ "paddw %%mm3, %%mm5 \n\t" /* add 4 high bytes to accumolator MM5 */ "movq (%%esi), %%mm2 \n\t" /* load 8 bytes from Src */ "movq %%mm2, %%mm3 \n\t" /* save MM2 in MM3 */ "sub $2, %%esi \n\t" /* move ESI pointer back 2 bytes left */ "punpcklbw %%mm0, %%mm2 \n\t" /* unpack 4 low bytes into words */ "punpckhbw %%mm0, %%mm3 \n\t" /* unpack 4 high bytes into words */ "psrlw %%mm1, %%mm2 \n\t" /* shift right each pixel NshiftRight times */ "psrlw %%mm1, %%mm3 \n\t" /* shift right each pixel NshiftRight times */ "paddw %%mm2, %%mm6 \n\t" /* add 4 low bytes to accumolator MM6 */ "paddw %%mm3, %%mm7 \n\t" /* add 4 high bytes to accumolator MM7 */ "paddw %%mm2, %%mm6 \n\t" /* add 4 low bytes to accumolator MM6 */ "paddw %%mm3, %%mm7 \n\t" /* add 4 high bytes to accumolator MM7 */ "add %%eax, %%esi \n\t" /* move to the next row of Src */ "movq (%%esi), %%mm2 \n\t" /* load 8 bytes from Src */ "movq %%mm2, %%mm3 \n\t" /* save MM2 in MM3 */ "add $2, %%esi \n\t" /* move ESI pointer 2 bytes right */ "punpcklbw %%mm0, %%mm2 \n\t" /* unpack 4 low bytes into words */ "punpckhbw %%mm0, %%mm3 \n\t" /* unpack 4 high bytes into words */ "psrlw %%mm1, %%mm2 \n\t" /* shift right each pixel NshiftRight times */ "psrlw %%mm1, %%mm3 \n\t" /* shift right each pixel NshiftRight times */ "paddw %%mm2, %%mm4 \n\t" /* add 4 low bytes to accumolator MM4 */ "paddw %%mm3, %%mm5 \n\t" /* add 4 high bytes to accumolator MM5 */ "movq (%%esi), %%mm2 \n\t" /* load 8 bytes from Src */ "movq %%mm2, %%mm3 \n\t" /* save MM2 in MM3 */ "sub $2, %%esi \n\t" /* move ESI pointer back 2 bytes left */ "punpcklbw %%mm0, %%mm2 \n\t" /* unpack 4 low bytes into words */ "punpckhbw %%mm0, %%mm3 \n\t" /* unpack 4 high bytes into words */ "psrlw %%mm1, %%mm2 \n\t" /* shift right each pixel NshiftRight times */ "psrlw %%mm1, %%mm3 \n\t" /* shift right each pixel NshiftRight times */ "paddw %%mm2, %%mm6 \n\t" /* add 4 low bytes to accumolator MM6 */ "paddw %%mm3, %%mm7 \n\t" /* add 4 high bytes to accumolator MM7 */ /* --- */ "movq %%mm4, %%mm2 \n\t" /* copy MM4 into MM2 */ "psrlq $32, %%mm4 \n\t" /* shift 2 left words to the right */ "psubw %%mm2, %%mm4 \n\t" /* MM4 = MM4 - MM2 */ "movq %%mm6, %%mm3 \n\t" /* copy MM6 into MM3 */ "psrlq $32, %%mm6 \n\t" /* shift 2 left words to the right */ "psubw %%mm3, %%mm6 \n\t" /* MM6 = MM6 - MM3 */ "punpckldq %%mm6, %%mm4 \n\t" /* combine 2 words of MM6 and 2 words of MM4 */ "movq %%mm5, %%mm2 \n\t" /* copy MM6 into MM2 */ "psrlq $32, %%mm5 \n\t" /* shift 2 left words to the right */ "psubw %%mm2, %%mm5 \n\t" /* MM5 = MM5 - MM2 */ "movq %%mm7, %%mm3 \n\t" /* copy MM7 into MM3 */ "psrlq $32, %%mm7 \n\t" /* shift 2 left words to the right */ "psubw %%mm3, %%mm7 \n\t" /* MM7 = MM7 - MM3 */ "punpckldq %%mm7, %%mm5 \n\t" /* combine 2 words of MM7 and 2 words of MM5 */ /* Take abs values of MM4 and MM5 */ "movq %%mm4, %%mm6 \n\t" /* copy MM4 into MM6 */ "movq %%mm5, %%mm7 \n\t" /* copy MM5 into MM7 */ "psraw $15, %%mm6 \n\t" /* fill MM6 words with word sign bit */ "psraw $15, %%mm7 \n\t" /* fill MM7 words with word sign bit */ "pxor %%mm6, %%mm4 \n\t" /* take 1's compliment of only neg. words */ "pxor %%mm7, %%mm5 \n\t" /* take 1's compliment of only neg. words */ "psubsw %%mm6, %%mm4 \n\t" /* add 1 to only neg. words, W-(-1) or W-0 */ "psubsw %%mm7, %%mm5 \n\t" /* add 1 to only neg. words, W-(-1) or W-0 */ "packuswb %%mm5, %%mm4 \n\t" /* combine and pack/saturate MM5 and MM4 */ "movq %%mm4, (%%edi) \n\t" /* store result in Dest */ /* --- */ "sub %%eax, %%esi \n\t" /* move to the current top row in Src */ "sub %%eax, %%esi \n\t" "add $8, %%esi \n\t" /* move Src pointer to the next 8 pixels */ "add $8, %%edi \n\t" /* move Dest pointer to the next 8 pixels */ /* --- */ "dec %%ecx \n\t" /* decrease loop counter COLUMNS */ "jnz .L10412 \n\t" /* check loop termination, proceed if required */ "mov %%ebx, %%esi \n\t" /* restore most left current row Src address */ "mov %%edx, %%edi \n\t" /* restore most left current row Dest address */ "add %%eax, %%esi \n\t" /* move to the next row in Src */ "add %%eax, %%edi \n\t" /* move to the next row in Dest */ "decl %2 \n\t" /* decrease loop counter ROWS */ "jnz .L10410 \n\t" /* check loop termination, proceed if required */ /* --- */ "emms \n\t" /* exit MMX state */ "popa \n\t":"=m" (Dest) /* %0 */ :"m"(Src), /* %1 */ "m"(rows), /* %2 */ "m"(columns), /* %3 */ "m"(NRightShift) /* %4 */ ); #endif #endif return (0); } else { /* No non-MMX implementation yet */ return (-1); } } /*! \brief Align stack to 32 byte boundary, */ void SDL_imageFilterAlignStack(void) { #ifdef USE_MMX #if !defined(GCC__) __asm { /* --- stack alignment --- */ mov ebx, esp /* load ESP into EBX */ sub ebx, 4 /* reserve space on stack for old value of ESP */ and ebx, -32 /* align EBX along a 32 byte boundary */ mov [ebx], esp /* save old value of ESP in stack, behind the bndry */ mov esp, ebx /* align ESP along a 32 byte boundary */ } #else asm volatile ( /* --- stack alignment --- */ "mov %%esp, %%ebx \n\t" /* load ESP into EBX */ "sub $4, %%ebx \n\t" /* reserve space on stack for old value of ESP */ "and $-32, %%ebx \n\t" /* align EBX along a 32 byte boundary */ "mov %%esp, (%%ebx) \n\t" /* save old value of ESP in stack, behind the bndry */ "mov %%ebx, %%esp \n\t" /* align ESP along a 32 byte boundary */ ::); #endif #endif } /*! \brief Restore previously aligned stack. */ void SDL_imageFilterRestoreStack(void) { #ifdef USE_MMX #if !defined(GCC__) __asm { /* --- restoring old stack --- */ mov ebx, [esp] /* load old value of ESP */ mov esp, ebx /* restore old value of ESP */ } #else asm volatile ( /* --- restoring old stack --- */ "mov (%%esp), %%ebx \n\t" /* load old value of ESP */ "mov %%ebx, %%esp \n\t" /* restore old value of ESP */ ::); #endif #endif } SDL2_gfx-1.0.4/SDL2_imageFilter.h100777 0 0 16704 12360250626 11422 0/* SDL2_imageFilter.h: byte-image "filter" routines Copyright (C) 2012-2014 Andreas Schiffler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. Andreas Schiffler -- aschiffler at ferzkopp dot net */ #ifndef _SDL2_imageFilter_h #define _SDL2_imageFilter_h /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus extern "C" { #endif /* ---- Function Prototypes */ #ifdef _MSC_VER # if defined(DLL_EXPORT) && !defined(LIBSDL2_GFX_DLL_IMPORT) # define SDL2_IMAGEFILTER_SCOPE __declspec(dllexport) # else # ifdef LIBSDL2_GFX_DLL_IMPORT # define SDL2_IMAGEFILTER_SCOPE __declspec(dllimport) # endif # endif #endif #ifndef SDL2_IMAGEFILTER_SCOPE # define SDL2_IMAGEFILTER_SCOPE extern #endif /* Comments: */ /* 1.) MMX functions work best if all data blocks are aligned on a 32 bytes boundary. */ /* 2.) Data that is not within an 8 byte boundary is processed using the C routine. */ /* 3.) Convolution routines do not have C routines at this time. */ // Detect MMX capability in CPU SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterMMXdetect(void); // Force use of MMX off (or turn possible use back on) SDL2_IMAGEFILTER_SCOPE void SDL_imageFilterMMXoff(void); SDL2_IMAGEFILTER_SCOPE void SDL_imageFilterMMXon(void); // // All routines return: // 0 OK // -1 Error (internal error, parameter error) // // SDL_imageFilterAdd: D = saturation255(S1 + S2) SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterAdd(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length); // SDL_imageFilterMean: D = S1/2 + S2/2 SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterMean(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length); // SDL_imageFilterSub: D = saturation0(S1 - S2) SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterSub(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length); // SDL_imageFilterAbsDiff: D = | S1 - S2 | SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterAbsDiff(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length); // SDL_imageFilterMult: D = saturation(S1 * S2) SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterMult(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length); // SDL_imageFilterMultNor: D = S1 * S2 (non-MMX) SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterMultNor(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length); // SDL_imageFilterMultDivby2: D = saturation255(S1/2 * S2) SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterMultDivby2(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length); // SDL_imageFilterMultDivby4: D = saturation255(S1/2 * S2/2) SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterMultDivby4(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length); // SDL_imageFilterBitAnd: D = S1 & S2 SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterBitAnd(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length); // SDL_imageFilterBitOr: D = S1 | S2 SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterBitOr(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length); // SDL_imageFilterDiv: D = S1 / S2 (non-MMX) SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterDiv(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length); // SDL_imageFilterBitNegation: D = !S SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterBitNegation(unsigned char *Src1, unsigned char *Dest, unsigned int length); // SDL_imageFilterAddByte: D = saturation255(S + C) SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterAddByte(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C); // SDL_imageFilterAddUint: D = saturation255(S + (uint)C) SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterAddUint(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned int C); // SDL_imageFilterAddByteToHalf: D = saturation255(S/2 + C) SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterAddByteToHalf(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C); // SDL_imageFilterSubByte: D = saturation0(S - C) SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterSubByte(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C); // SDL_imageFilterSubUint: D = saturation0(S - (uint)C) SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterSubUint(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned int C); // SDL_imageFilterShiftRight: D = saturation0(S >> N) SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterShiftRight(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N); // SDL_imageFilterShiftRightUint: D = saturation0((uint)S >> N) SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterShiftRightUint(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N); // SDL_imageFilterMultByByte: D = saturation255(S * C) SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterMultByByte(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C); // SDL_imageFilterShiftRightAndMultByByte: D = saturation255((S >> N) * C) SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterShiftRightAndMultByByte(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N, unsigned char C); // SDL_imageFilterShiftLeftByte: D = (S << N) SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterShiftLeftByte(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N); // SDL_imageFilterShiftLeftUint: D = ((uint)S << N) SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterShiftLeftUint(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N); // SDL_imageFilterShiftLeft: D = saturation255(S << N) SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterShiftLeft(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N); // SDL_imageFilterBinarizeUsingThreshold: D = S >= T ? 255:0 SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterBinarizeUsingThreshold(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char T); // SDL_imageFilterClipToRange: D = (S >= Tmin) & (S <= Tmax) 255:0 SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterClipToRange(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char Tmin, unsigned char Tmax); // SDL_imageFilterNormalizeLinear: D = saturation255((Nmax - Nmin)/(Cmax - Cmin)*(S - Cmin) + Nmin) SDL2_IMAGEFILTER_SCOPE int SDL_imageFilterNormalizeLinear(unsigned char *Src, unsigned char *Dest, unsigned int length, int Cmin, int Cmax, int Nmin, int Nmax); /* Ends C function definitions when using C++ */ #ifdef __cplusplus } #endif #endif /* _SDL_imageFilter_h */ SDL2_gfx-1.0.4/SDL2_rotozoom.c100777 0 0 117260 13240161677 11101 0/* SDL2_rotozoom.c: rotozoomer, zoomer and shrinker for 32bit or 8bit surfaces Copyright (C) 2012-2014 Andreas Schiffler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. Andreas Schiffler -- aschiffler at ferzkopp dot net */ #ifdef WIN32 #include #endif #include #include #include "SDL2_rotozoom.h" /* ---- Internally used structures */ /*! \brief A 32 bit RGBA pixel. */ typedef struct tColorRGBA { Uint8 r; Uint8 g; Uint8 b; Uint8 a; } tColorRGBA; /*! \brief A 8bit Y/palette pixel. */ typedef struct tColorY { Uint8 y; } tColorY; /*! \brief Returns maximum of two numbers a and b. */ #define MAX(a,b) (((a) > (b)) ? (a) : (b)) /*! \brief Number of guard rows added to destination surfaces. This is a simple but effective workaround for observed issues. These rows allocate extra memory and are then hidden from the surface. Rows are added to the end of destination surfaces when they are allocated. This catches any potential overflows which seem to happen with just the right src image dimensions and scale/rotation and can lead to a situation where the program can segfault. */ #define GUARD_ROWS (2) /*! \brief Lower limit of absolute zoom factor or rotation degrees. */ #define VALUE_LIMIT 0.001 /*! \brief Returns colorkey info for a surface */ Uint32 _colorkey(SDL_Surface *src) { Uint32 key = 0; SDL_GetColorKey(src, &key); return key; } /*! \brief Internal 32 bit integer-factor averaging Shrinker. Shrinks 32 bit RGBA/ABGR 'src' surface to 'dst' surface. Averages color and alpha values values of src pixels to calculate dst pixels. Assumes src and dst surfaces are of 32 bit depth. Assumes dst surface was allocated with the correct dimensions. \param src The surface to shrink (input). \param dst The shrunken surface (output). \param factorx The horizontal shrinking ratio. \param factory The vertical shrinking ratio. \return 0 for success or -1 for error. */ int _shrinkSurfaceRGBA(SDL_Surface * src, SDL_Surface * dst, int factorx, int factory) { int x, y, dx, dy, dgap, ra, ga, ba, aa; int n_average; tColorRGBA *sp, *osp, *oosp; tColorRGBA *dp; /* * Averaging integer shrink */ /* Precalculate division factor */ n_average = factorx*factory; /* * Scan destination */ sp = (tColorRGBA *) src->pixels; dp = (tColorRGBA *) dst->pixels; dgap = dst->pitch - dst->w * 4; for (y = 0; y < dst->h; y++) { osp=sp; for (x = 0; x < dst->w; x++) { /* Trace out source box and accumulate */ oosp=sp; ra=ga=ba=aa=0; for (dy=0; dy < factory; dy++) { for (dx=0; dx < factorx; dx++) { ra += sp->r; ga += sp->g; ba += sp->b; aa += sp->a; sp++; } /* src dx loop */ sp = (tColorRGBA *)((Uint8*)sp + (src->pitch - 4*factorx)); // next y } /* src dy loop */ /* next box-x */ sp = (tColorRGBA *)((Uint8*)oosp + 4*factorx); /* Store result in destination */ dp->r = ra/n_average; dp->g = ga/n_average; dp->b = ba/n_average; dp->a = aa/n_average; /* * Advance destination pointer */ dp++; } /* dst x loop */ /* next box-y */ sp = (tColorRGBA *)((Uint8*)osp + src->pitch*factory); /* * Advance destination pointers */ dp = (tColorRGBA *) ((Uint8 *) dp + dgap); } /* dst y loop */ return (0); } /*! \brief Internal 8 bit integer-factor averaging shrinker. Shrinks 8bit Y 'src' surface to 'dst' surface. Averages color (brightness) values values of src pixels to calculate dst pixels. Assumes src and dst surfaces are of 8 bit depth. Assumes dst surface was allocated with the correct dimensions. \param src The surface to shrink (input). \param dst The shrunken surface (output). \param factorx The horizontal shrinking ratio. \param factory The vertical shrinking ratio. \return 0 for success or -1 for error. */ int _shrinkSurfaceY(SDL_Surface * src, SDL_Surface * dst, int factorx, int factory) { int x, y, dx, dy, dgap, a; int n_average; Uint8 *sp, *osp, *oosp; Uint8 *dp; /* * Averaging integer shrink */ /* Precalculate division factor */ n_average = factorx*factory; /* * Scan destination */ sp = (Uint8 *) src->pixels; dp = (Uint8 *) dst->pixels; dgap = dst->pitch - dst->w; for (y = 0; y < dst->h; y++) { osp=sp; for (x = 0; x < dst->w; x++) { /* Trace out source box and accumulate */ oosp=sp; a=0; for (dy=0; dy < factory; dy++) { for (dx=0; dx < factorx; dx++) { a += (*sp); /* next x */ sp++; } /* end src dx loop */ /* next y */ sp = (Uint8 *)((Uint8*)sp + (src->pitch - factorx)); } /* end src dy loop */ /* next box-x */ sp = (Uint8 *)((Uint8*)oosp + factorx); /* Store result in destination */ *dp = a/n_average; /* * Advance destination pointer */ dp++; } /* end dst x loop */ /* next box-y */ sp = (Uint8 *)((Uint8*)osp + src->pitch*factory); /* * Advance destination pointers */ dp = (Uint8 *)((Uint8 *)dp + dgap); } /* end dst y loop */ return (0); } /*! \brief Internal 32 bit Zoomer with optional anti-aliasing by bilinear interpolation. Zooms 32 bit RGBA/ABGR 'src' surface to 'dst' surface. Assumes src and dst surfaces are of 32 bit depth. Assumes dst surface was allocated with the correct dimensions. \param src The surface to zoom (input). \param dst The zoomed surface (output). \param flipx Flag indicating if the image should be horizontally flipped. \param flipy Flag indicating if the image should be vertically flipped. \param smooth Antialiasing flag; set to SMOOTHING_ON to enable. \return 0 for success or -1 for error. */ int _zoomSurfaceRGBA(SDL_Surface * src, SDL_Surface * dst, int flipx, int flipy, int smooth) { int x, y, sx, sy, ssx, ssy, *sax, *say, *csax, *csay, *salast, csx, csy, ex, ey, cx, cy, sstep, sstepx, sstepy; tColorRGBA *c00, *c01, *c10, *c11; tColorRGBA *sp, *csp, *dp; int spixelgap, spixelw, spixelh, dgap, t1, t2; /* * Allocate memory for row/column increments */ if ((sax = (int *) malloc((dst->w + 1) * sizeof(Uint32))) == NULL) { return (-1); } if ((say = (int *) malloc((dst->h + 1) * sizeof(Uint32))) == NULL) { free(sax); return (-1); } /* * Precalculate row increments */ spixelw = (src->w - 1); spixelh = (src->h - 1); if (smooth) { sx = (int) (65536.0 * (float) spixelw / (float) (dst->w - 1)); sy = (int) (65536.0 * (float) spixelh / (float) (dst->h - 1)); } else { sx = (int) (65536.0 * (float) (src->w) / (float) (dst->w)); sy = (int) (65536.0 * (float) (src->h) / (float) (dst->h)); } /* Maximum scaled source size */ ssx = (src->w << 16) - 1; ssy = (src->h << 16) - 1; /* Precalculate horizontal row increments */ csx = 0; csax = sax; for (x = 0; x <= dst->w; x++) { *csax = csx; csax++; csx += sx; /* Guard from overflows */ if (csx > ssx) { csx = ssx; } } /* Precalculate vertical row increments */ csy = 0; csay = say; for (y = 0; y <= dst->h; y++) { *csay = csy; csay++; csy += sy; /* Guard from overflows */ if (csy > ssy) { csy = ssy; } } sp = (tColorRGBA *) src->pixels; dp = (tColorRGBA *) dst->pixels; dgap = dst->pitch - dst->w * 4; spixelgap = src->pitch/4; if (flipx) sp += spixelw; if (flipy) sp += (spixelgap * spixelh); /* * Switch between interpolating and non-interpolating code */ if (smooth) { /* * Interpolating Zoom */ csay = say; for (y = 0; y < dst->h; y++) { csp = sp; csax = sax; for (x = 0; x < dst->w; x++) { /* * Setup color source pointers */ ex = (*csax & 0xffff); ey = (*csay & 0xffff); cx = (*csax >> 16); cy = (*csay >> 16); sstepx = cx < spixelw; sstepy = cy < spixelh; c00 = sp; c01 = sp; c10 = sp; if (sstepy) { if (flipy) { c10 -= spixelgap; } else { c10 += spixelgap; } } c11 = c10; if (sstepx) { if (flipx) { c01--; c11--; } else { c01++; c11++; } } /* * Draw and interpolate colors */ t1 = ((((c01->r - c00->r) * ex) >> 16) + c00->r) & 0xff; t2 = ((((c11->r - c10->r) * ex) >> 16) + c10->r) & 0xff; dp->r = (((t2 - t1) * ey) >> 16) + t1; t1 = ((((c01->g - c00->g) * ex) >> 16) + c00->g) & 0xff; t2 = ((((c11->g - c10->g) * ex) >> 16) + c10->g) & 0xff; dp->g = (((t2 - t1) * ey) >> 16) + t1; t1 = ((((c01->b - c00->b) * ex) >> 16) + c00->b) & 0xff; t2 = ((((c11->b - c10->b) * ex) >> 16) + c10->b) & 0xff; dp->b = (((t2 - t1) * ey) >> 16) + t1; t1 = ((((c01->a - c00->a) * ex) >> 16) + c00->a) & 0xff; t2 = ((((c11->a - c10->a) * ex) >> 16) + c10->a) & 0xff; dp->a = (((t2 - t1) * ey) >> 16) + t1; /* * Advance source pointer x */ salast = csax; csax++; sstep = (*csax >> 16) - (*salast >> 16); if (flipx) { sp -= sstep; } else { sp += sstep; } /* * Advance destination pointer x */ dp++; } /* * Advance source pointer y */ salast = csay; csay++; sstep = (*csay >> 16) - (*salast >> 16); sstep *= spixelgap; if (flipy) { sp = csp - sstep; } else { sp = csp + sstep; } /* * Advance destination pointer y */ dp = (tColorRGBA *) ((Uint8 *) dp + dgap); } } else { /* * Non-Interpolating Zoom */ csay = say; for (y = 0; y < dst->h; y++) { csp = sp; csax = sax; for (x = 0; x < dst->w; x++) { /* * Draw */ *dp = *sp; /* * Advance source pointer x */ salast = csax; csax++; sstep = (*csax >> 16) - (*salast >> 16); if (flipx) sstep = -sstep; sp += sstep; /* * Advance destination pointer x */ dp++; } /* * Advance source pointer y */ salast = csay; csay++; sstep = (*csay >> 16) - (*salast >> 16); sstep *= spixelgap; if (flipy) sstep = -sstep; sp = csp + sstep; /* * Advance destination pointer y */ dp = (tColorRGBA *) ((Uint8 *) dp + dgap); } } /* * Remove temp arrays */ free(sax); free(say); return (0); } /*! \brief Internal 8 bit Zoomer without smoothing. Zooms 8bit palette/Y 'src' surface to 'dst' surface. Assumes src and dst surfaces are of 8 bit depth. Assumes dst surface was allocated with the correct dimensions. \param src The surface to zoom (input). \param dst The zoomed surface (output). \param flipx Flag indicating if the image should be horizontally flipped. \param flipy Flag indicating if the image should be vertically flipped. \return 0 for success or -1 for error. */ int _zoomSurfaceY(SDL_Surface * src, SDL_Surface * dst, int flipx, int flipy) { int x, y; Uint32 *sax, *say, *csax, *csay; int csx, csy; Uint8 *sp, *dp, *csp; int dgap; /* * Allocate memory for row increments */ if ((sax = (Uint32 *) malloc((dst->w + 1) * sizeof(Uint32))) == NULL) { return (-1); } if ((say = (Uint32 *) malloc((dst->h + 1) * sizeof(Uint32))) == NULL) { free(sax); return (-1); } /* * Pointer setup */ sp = csp = (Uint8 *) src->pixels; dp = (Uint8 *) dst->pixels; dgap = dst->pitch - dst->w; if (flipx) csp += (src->w-1); if (flipy) csp = ( (Uint8*)csp + src->pitch*(src->h-1) ); /* * Precalculate row increments */ csx = 0; csax = sax; for (x = 0; x < dst->w; x++) { csx += src->w; *csax = 0; while (csx >= dst->w) { csx -= dst->w; (*csax)++; } (*csax) = (*csax) * (flipx ? -1 : 1); csax++; } csy = 0; csay = say; for (y = 0; y < dst->h; y++) { csy += src->h; *csay = 0; while (csy >= dst->h) { csy -= dst->h; (*csay)++; } (*csay) = (*csay) * (flipy ? -1 : 1); csay++; } /* * Draw */ csay = say; for (y = 0; y < dst->h; y++) { csax = sax; sp = csp; for (x = 0; x < dst->w; x++) { /* * Draw */ *dp = *sp; /* * Advance source pointers */ sp += (*csax); csax++; /* * Advance destination pointer */ dp++; } /* * Advance source pointer (for row) */ csp += ((*csay) * src->pitch); csay++; /* * Advance destination pointers */ dp += dgap; } /* * Remove temp arrays */ free(sax); free(say); return (0); } /*! \brief Internal 32 bit rotozoomer with optional anti-aliasing. Rotates and zooms 32 bit RGBA/ABGR 'src' surface to 'dst' surface based on the control parameters by scanning the destination surface and applying optionally anti-aliasing by bilinear interpolation. Assumes src and dst surfaces are of 32 bit depth. Assumes dst surface was allocated with the correct dimensions. \param src Source surface. \param dst Destination surface. \param cx Horizontal center coordinate. \param cy Vertical center coordinate. \param isin Integer version of sine of angle. \param icos Integer version of cosine of angle. \param flipx Flag indicating horizontal mirroring should be applied. \param flipy Flag indicating vertical mirroring should be applied. \param smooth Flag indicating anti-aliasing should be used. */ void _transformSurfaceRGBA(SDL_Surface * src, SDL_Surface * dst, int cx, int cy, int isin, int icos, int flipx, int flipy, int smooth) { int x, y, t1, t2, dx, dy, xd, yd, sdx, sdy, ax, ay, ex, ey, sw, sh; tColorRGBA c00, c01, c10, c11, cswap; tColorRGBA *pc, *sp; int gap; /* * Variable setup */ xd = ((src->w - dst->w) << 15); yd = ((src->h - dst->h) << 15); ax = (cx << 16) - (icos * cx); ay = (cy << 16) - (isin * cx); sw = src->w - 1; sh = src->h - 1; pc = (tColorRGBA*) dst->pixels; gap = dst->pitch - dst->w * 4; /* * Switch between interpolating and non-interpolating code */ if (smooth) { for (y = 0; y < dst->h; y++) { dy = cy - y; sdx = (ax + (isin * dy)) + xd; sdy = (ay - (icos * dy)) + yd; for (x = 0; x < dst->w; x++) { dx = (sdx >> 16); dy = (sdy >> 16); if (flipx) dx = sw - dx; if (flipy) dy = sh - dy; if ((dx > -1) && (dy > -1) && (dx < (src->w-1)) && (dy < (src->h-1))) { sp = (tColorRGBA *)src->pixels;; sp += ((src->pitch/4) * dy); sp += dx; c00 = *sp; sp += 1; c01 = *sp; sp += (src->pitch/4); c11 = *sp; sp -= 1; c10 = *sp; if (flipx) { cswap = c00; c00=c01; c01=cswap; cswap = c10; c10=c11; c11=cswap; } if (flipy) { cswap = c00; c00=c10; c10=cswap; cswap = c01; c01=c11; c11=cswap; } /* * Interpolate colors */ ex = (sdx & 0xffff); ey = (sdy & 0xffff); t1 = ((((c01.r - c00.r) * ex) >> 16) + c00.r) & 0xff; t2 = ((((c11.r - c10.r) * ex) >> 16) + c10.r) & 0xff; pc->r = (((t2 - t1) * ey) >> 16) + t1; t1 = ((((c01.g - c00.g) * ex) >> 16) + c00.g) & 0xff; t2 = ((((c11.g - c10.g) * ex) >> 16) + c10.g) & 0xff; pc->g = (((t2 - t1) * ey) >> 16) + t1; t1 = ((((c01.b - c00.b) * ex) >> 16) + c00.b) & 0xff; t2 = ((((c11.b - c10.b) * ex) >> 16) + c10.b) & 0xff; pc->b = (((t2 - t1) * ey) >> 16) + t1; t1 = ((((c01.a - c00.a) * ex) >> 16) + c00.a) & 0xff; t2 = ((((c11.a - c10.a) * ex) >> 16) + c10.a) & 0xff; pc->a = (((t2 - t1) * ey) >> 16) + t1; } sdx += icos; sdy += isin; pc++; } pc = (tColorRGBA *) ((Uint8 *) pc + gap); } } else { for (y = 0; y < dst->h; y++) { dy = cy - y; sdx = (ax + (isin * dy)) + xd; sdy = (ay - (icos * dy)) + yd; for (x = 0; x < dst->w; x++) { dx = (short) (sdx >> 16); dy = (short) (sdy >> 16); if (flipx) dx = (src->w-1)-dx; if (flipy) dy = (src->h-1)-dy; if ((dx >= 0) && (dy >= 0) && (dx < src->w) && (dy < src->h)) { sp = (tColorRGBA *) ((Uint8 *) src->pixels + src->pitch * dy); sp += dx; *pc = *sp; } sdx += icos; sdy += isin; pc++; } pc = (tColorRGBA *) ((Uint8 *) pc + gap); } } } /*! \brief Rotates and zooms 8 bit palette/Y 'src' surface to 'dst' surface without smoothing. Rotates and zooms 8 bit RGBA/ABGR 'src' surface to 'dst' surface based on the control parameters by scanning the destination surface. Assumes src and dst surfaces are of 8 bit depth. Assumes dst surface was allocated with the correct dimensions. \param src Source surface. \param dst Destination surface. \param cx Horizontal center coordinate. \param cy Vertical center coordinate. \param isin Integer version of sine of angle. \param icos Integer version of cosine of angle. \param flipx Flag indicating horizontal mirroring should be applied. \param flipy Flag indicating vertical mirroring should be applied. */ void transformSurfaceY(SDL_Surface * src, SDL_Surface * dst, int cx, int cy, int isin, int icos, int flipx, int flipy) { int x, y, dx, dy, xd, yd, sdx, sdy, ax, ay; tColorY *pc, *sp; int gap; /* * Variable setup */ xd = ((src->w - dst->w) << 15); yd = ((src->h - dst->h) << 15); ax = (cx << 16) - (icos * cx); ay = (cy << 16) - (isin * cx); pc = (tColorY*) dst->pixels; gap = dst->pitch - dst->w; /* * Clear surface to colorkey */ memset(pc, (int)(_colorkey(src) & 0xff), dst->pitch * dst->h); /* * Iterate through destination surface */ for (y = 0; y < dst->h; y++) { dy = cy - y; sdx = (ax + (isin * dy)) + xd; sdy = (ay - (icos * dy)) + yd; for (x = 0; x < dst->w; x++) { dx = (short) (sdx >> 16); dy = (short) (sdy >> 16); if (flipx) dx = (src->w-1)-dx; if (flipy) dy = (src->h-1)-dy; if ((dx >= 0) && (dy >= 0) && (dx < src->w) && (dy < src->h)) { sp = (tColorY *) (src->pixels); sp += (src->pitch * dy + dx); *pc = *sp; } sdx += icos; sdy += isin; pc++; } pc += gap; } } /*! \brief Rotates a 8/16/24/32 bit surface in increments of 90 degrees. Specialized 90 degree rotator which rotates a 'src' surface in 90 degree increments clockwise returning a new surface. Faster than rotozoomer since no scanning or interpolation takes place. Input surface must be 8/16/24/32 bit. (code contributed by J. Schiller, improved by C. Allport and A. Schiffler) \param src Source surface to rotate. \param numClockwiseTurns Number of clockwise 90 degree turns to apply to the source. \returns The new, rotated surface; or NULL for surfaces with incorrect input format. */ SDL_Surface* rotateSurface90Degrees(SDL_Surface* src, int numClockwiseTurns) { int row, col, newWidth, newHeight; int bpp, bpr; SDL_Surface* dst; Uint8* srcBuf; Uint8* dstBuf; int normalizedClockwiseTurns; /* Has to be a valid surface pointer and be a Nbit surface where n is divisible by 8 */ if (!src || !src->format) { SDL_SetError("NULL source surface or source surface format"); return NULL; } if ((src->format->BitsPerPixel % 8) != 0) { SDL_SetError("Invalid source surface bit depth"); return NULL; } /* normalize numClockwiseTurns */ normalizedClockwiseTurns = (numClockwiseTurns % 4); if (normalizedClockwiseTurns < 0) { normalizedClockwiseTurns += 4; } /* If turns are even, our new width/height will be the same as the source surface */ if (normalizedClockwiseTurns % 2) { newWidth = src->h; newHeight = src->w; } else { newWidth = src->w; newHeight = src->h; } dst = SDL_CreateRGBSurface( src->flags, newWidth, newHeight, src->format->BitsPerPixel, src->format->Rmask, src->format->Gmask, src->format->Bmask, src->format->Amask); if(!dst) { SDL_SetError("Could not create destination surface"); return NULL; } if (SDL_MUSTLOCK(src)) { SDL_LockSurface(src); } if (SDL_MUSTLOCK(dst)) { SDL_LockSurface(dst); } /* Calculate byte-per-pixel */ bpp = src->format->BitsPerPixel / 8; switch(normalizedClockwiseTurns) { case 0: /* Make a copy of the surface */ { /* Unfortunately SDL_BlitSurface cannot be used to make a copy of the surface since it does not preserve alpha. */ if (src->pitch == dst->pitch) { /* If the pitch is the same for both surfaces, the memory can be copied all at once. */ memcpy(dst->pixels, src->pixels, (src->h * src->pitch)); } else { /* If the pitch differs, copy each row separately */ srcBuf = (Uint8*)(src->pixels); dstBuf = (Uint8*)(dst->pixels); bpr = src->w * bpp; for (row = 0; row < src->h; row++) { memcpy(dstBuf, srcBuf, bpr); srcBuf += src->pitch; dstBuf += dst->pitch; } } } break; /* rotate clockwise */ case 1: /* rotated 90 degrees clockwise */ { for (row = 0; row < src->h; ++row) { srcBuf = (Uint8*)(src->pixels) + (row * src->pitch); dstBuf = (Uint8*)(dst->pixels) + (dst->w - row - 1) * bpp; for (col = 0; col < src->w; ++col) { memcpy (dstBuf, srcBuf, bpp); srcBuf += bpp; dstBuf += dst->pitch; } } } break; case 2: /* rotated 180 degrees clockwise */ { for (row = 0; row < src->h; ++row) { srcBuf = (Uint8*)(src->pixels) + (row * src->pitch); dstBuf = (Uint8*)(dst->pixels) + ((dst->h - row - 1) * dst->pitch) + (dst->w - 1) * bpp; for (col = 0; col < src->w; ++col) { memcpy (dstBuf, srcBuf, bpp); srcBuf += bpp; dstBuf -= bpp; } } } break; case 3: /* rotated 270 degrees clockwise */ { for (row = 0; row < src->h; ++row) { srcBuf = (Uint8*)(src->pixels) + (row * src->pitch); dstBuf = (Uint8*)(dst->pixels) + (row * bpp) + ((dst->h - 1) * dst->pitch); for (col = 0; col < src->w; ++col) { memcpy (dstBuf, srcBuf, bpp); srcBuf += bpp; dstBuf -= dst->pitch; } } } break; } /* end switch */ if (SDL_MUSTLOCK(src)) { SDL_UnlockSurface(src); } if (SDL_MUSTLOCK(dst)) { SDL_UnlockSurface(dst); } return dst; } /*! \brief Internal target surface sizing function for rotozooms with trig result return. \param width The source surface width. \param height The source surface height. \param angle The angle to rotate in degrees. \param zoomx The horizontal scaling factor. \param zoomy The vertical scaling factor. \param dstwidth The calculated width of the destination surface. \param dstheight The calculated height of the destination surface. \param canglezoom The sine of the angle adjusted by the zoom factor. \param sanglezoom The cosine of the angle adjusted by the zoom factor. */ void _rotozoomSurfaceSizeTrig(int width, int height, double angle, double zoomx, double zoomy, int *dstwidth, int *dstheight, double *canglezoom, double *sanglezoom) { double x, y, cx, cy, sx, sy; double radangle; int dstwidthhalf, dstheighthalf; /* * Determine destination width and height by rotating a centered source box */ radangle = angle * (M_PI / 180.0); *sanglezoom = sin(radangle); *canglezoom = cos(radangle); *sanglezoom *= zoomx; *canglezoom *= zoomy; x = (double)(width / 2); y = (double)(height / 2); cx = *canglezoom * x; cy = *canglezoom * y; sx = *sanglezoom * x; sy = *sanglezoom * y; dstwidthhalf = MAX((int) ceil(MAX(MAX(MAX(fabs(cx + sy), fabs(cx - sy)), fabs(-cx + sy)), fabs(-cx - sy))), 1); dstheighthalf = MAX((int) ceil(MAX(MAX(MAX(fabs(sx + cy), fabs(sx - cy)), fabs(-sx + cy)), fabs(-sx - cy))), 1); *dstwidth = 2 * dstwidthhalf; *dstheight = 2 * dstheighthalf; } /*! \brief Returns the size of the resulting target surface for a rotozoomSurfaceXY() call. \param width The source surface width. \param height The source surface height. \param angle The angle to rotate in degrees. \param zoomx The horizontal scaling factor. \param zoomy The vertical scaling factor. \param dstwidth The calculated width of the rotozoomed destination surface. \param dstheight The calculated height of the rotozoomed destination surface. */ void rotozoomSurfaceSizeXY(int width, int height, double angle, double zoomx, double zoomy, int *dstwidth, int *dstheight) { double dummy_sanglezoom, dummy_canglezoom; _rotozoomSurfaceSizeTrig(width, height, angle, zoomx, zoomy, dstwidth, dstheight, &dummy_sanglezoom, &dummy_canglezoom); } /*! \brief Returns the size of the resulting target surface for a rotozoomSurface() call. \param width The source surface width. \param height The source surface height. \param angle The angle to rotate in degrees. \param zoom The scaling factor. \param dstwidth The calculated width of the rotozoomed destination surface. \param dstheight The calculated height of the rotozoomed destination surface. */ void rotozoomSurfaceSize(int width, int height, double angle, double zoom, int *dstwidth, int *dstheight) { double dummy_sanglezoom, dummy_canglezoom; _rotozoomSurfaceSizeTrig(width, height, angle, zoom, zoom, dstwidth, dstheight, &dummy_sanglezoom, &dummy_canglezoom); } /*! \brief Rotates and zooms a surface and optional anti-aliasing. Rotates and zoomes a 32bit or 8bit 'src' surface to newly created 'dst' surface. 'angle' is the rotation in degrees and 'zoom' a scaling factor. If 'smooth' is set then the destination 32bit surface is anti-aliased. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly. \param src The surface to rotozoom. \param angle The angle to rotate in degrees. \param zoom The scaling factor. \param smooth Antialiasing flag; set to SMOOTHING_ON to enable. \return The new rotozoomed surface. */ SDL_Surface *rotozoomSurface(SDL_Surface * src, double angle, double zoom, int smooth) { return rotozoomSurfaceXY(src, angle, zoom, zoom, smooth); } /*! \brief Rotates and zooms a surface with different horizontal and vertival scaling factors and optional anti-aliasing. Rotates and zooms a 32bit or 8bit 'src' surface to newly created 'dst' surface. 'angle' is the rotation in degrees, 'zoomx and 'zoomy' scaling factors. If 'smooth' is set then the destination 32bit surface is anti-aliased. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly. \param src The surface to rotozoom. \param angle The angle to rotate in degrees. \param zoomx The horizontal scaling factor. \param zoomy The vertical scaling factor. \param smooth Antialiasing flag; set to SMOOTHING_ON to enable. \return The new rotozoomed surface. */ SDL_Surface *rotozoomSurfaceXY(SDL_Surface * src, double angle, double zoomx, double zoomy, int smooth) { SDL_Surface *rz_src; SDL_Surface *rz_dst; double zoominv; double sanglezoom, canglezoom, sanglezoominv, canglezoominv; int dstwidthhalf, dstwidth, dstheighthalf, dstheight; int is32bit; int i, src_converted; int flipx,flipy; /* * Sanity check */ if (src == NULL) { return (NULL); } /* * Determine if source surface is 32bit or 8bit */ is32bit = (src->format->BitsPerPixel == 32); if ((is32bit) || (src->format->BitsPerPixel == 8)) { /* * Use source surface 'as is' */ rz_src = src; src_converted = 0; } else { /* * New source surface is 32bit with a defined RGBA ordering */ rz_src = SDL_CreateRGBSurface(SDL_SWSURFACE, src->w, src->h, 32, #if SDL_BYTEORDER == SDL_LIL_ENDIAN 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000 #else 0xff000000, 0x00ff0000, 0x0000ff00, 0x000000ff #endif ); SDL_BlitSurface(src, NULL, rz_src, NULL); src_converted = 1; is32bit = 1; } /* * Sanity check zoom factor */ flipx = (zoomx<0.0); if (flipx) zoomx=-zoomx; flipy = (zoomy<0.0); if (flipy) zoomy=-zoomy; if (zoomx < VALUE_LIMIT) zoomx = VALUE_LIMIT; if (zoomy < VALUE_LIMIT) zoomy = VALUE_LIMIT; zoominv = 65536.0 / (zoomx * zoomx); /* * Check if we have a rotozoom or just a zoom */ if (fabs(angle) > VALUE_LIMIT) { /* * Angle!=0: full rotozoom */ /* * ----------------------- */ /* Determine target size */ _rotozoomSurfaceSizeTrig(rz_src->w, rz_src->h, angle, zoomx, zoomy, &dstwidth, &dstheight, &canglezoom, &sanglezoom); /* * Calculate target factors from sin/cos and zoom */ sanglezoominv = sanglezoom; canglezoominv = canglezoom; sanglezoominv *= zoominv; canglezoominv *= zoominv; /* Calculate half size */ dstwidthhalf = dstwidth / 2; dstheighthalf = dstheight / 2; /* * Alloc space to completely contain the rotated surface */ rz_dst = NULL; if (is32bit) { /* * Target surface is 32bit with source RGBA/ABGR ordering */ rz_dst = SDL_CreateRGBSurface(SDL_SWSURFACE, dstwidth, dstheight + GUARD_ROWS, 32, rz_src->format->Rmask, rz_src->format->Gmask, rz_src->format->Bmask, rz_src->format->Amask); } else { /* * Target surface is 8bit */ rz_dst = SDL_CreateRGBSurface(SDL_SWSURFACE, dstwidth, dstheight + GUARD_ROWS, 8, 0, 0, 0, 0); } /* Check target */ if (rz_dst == NULL) return NULL; /* Adjust for guard rows */ rz_dst->h = dstheight; /* * Lock source surface */ if (SDL_MUSTLOCK(rz_src)) { SDL_LockSurface(rz_src); } /* * Check which kind of surface we have */ if (is32bit) { /* * Call the 32bit transformation routine to do the rotation (using alpha) */ _transformSurfaceRGBA(rz_src, rz_dst, dstwidthhalf, dstheighthalf, (int) (sanglezoominv), (int) (canglezoominv), flipx, flipy, smooth); } else { /* * Copy palette and colorkey info */ for (i = 0; i < rz_src->format->palette->ncolors; i++) { rz_dst->format->palette->colors[i] = rz_src->format->palette->colors[i]; } rz_dst->format->palette->ncolors = rz_src->format->palette->ncolors; /* * Call the 8bit transformation routine to do the rotation */ transformSurfaceY(rz_src, rz_dst, dstwidthhalf, dstheighthalf, (int) (sanglezoominv), (int) (canglezoominv), flipx, flipy); } /* * Unlock source surface */ if (SDL_MUSTLOCK(rz_src)) { SDL_UnlockSurface(rz_src); } } else { /* * Angle=0: Just a zoom */ /* * -------------------- */ /* * Calculate target size */ zoomSurfaceSize(rz_src->w, rz_src->h, zoomx, zoomy, &dstwidth, &dstheight); /* * Alloc space to completely contain the zoomed surface */ rz_dst = NULL; if (is32bit) { /* * Target surface is 32bit with source RGBA/ABGR ordering */ rz_dst = SDL_CreateRGBSurface(SDL_SWSURFACE, dstwidth, dstheight + GUARD_ROWS, 32, rz_src->format->Rmask, rz_src->format->Gmask, rz_src->format->Bmask, rz_src->format->Amask); } else { /* * Target surface is 8bit */ rz_dst = SDL_CreateRGBSurface(SDL_SWSURFACE, dstwidth, dstheight + GUARD_ROWS, 8, 0, 0, 0, 0); } /* Check target */ if (rz_dst == NULL) return NULL; /* Adjust for guard rows */ rz_dst->h = dstheight; /* * Lock source surface */ if (SDL_MUSTLOCK(rz_src)) { SDL_LockSurface(rz_src); } /* * Check which kind of surface we have */ if (is32bit) { /* * Call the 32bit transformation routine to do the zooming (using alpha) */ _zoomSurfaceRGBA(rz_src, rz_dst, flipx, flipy, smooth); } else { /* * Copy palette and colorkey info */ for (i = 0; i < rz_src->format->palette->ncolors; i++) { rz_dst->format->palette->colors[i] = rz_src->format->palette->colors[i]; } rz_dst->format->palette->ncolors = rz_src->format->palette->ncolors; /* * Call the 8bit transformation routine to do the zooming */ _zoomSurfaceY(rz_src, rz_dst, flipx, flipy); } /* * Unlock source surface */ if (SDL_MUSTLOCK(rz_src)) { SDL_UnlockSurface(rz_src); } } /* * Cleanup temp surface */ if (src_converted) { SDL_FreeSurface(rz_src); } /* * Return destination surface */ return (rz_dst); } /*! \brief Calculates the size of the target surface for a zoomSurface() call. The minimum size of the target surface is 1. The input factors can be positive or negative. \param width The width of the source surface to zoom. \param height The height of the source surface to zoom. \param zoomx The horizontal zoom factor. \param zoomy The vertical zoom factor. \param dstwidth Pointer to an integer to store the calculated width of the zoomed target surface. \param dstheight Pointer to an integer to store the calculated height of the zoomed target surface. */ void zoomSurfaceSize(int width, int height, double zoomx, double zoomy, int *dstwidth, int *dstheight) { /* * Make zoom factors positive */ int flipx, flipy; flipx = (zoomx<0.0); if (flipx) zoomx = -zoomx; flipy = (zoomy<0.0); if (flipy) zoomy = -zoomy; /* * Sanity check zoom factors */ if (zoomx < VALUE_LIMIT) { zoomx = VALUE_LIMIT; } if (zoomy < VALUE_LIMIT) { zoomy = VALUE_LIMIT; } /* * Calculate target size */ *dstwidth = (int) floor(((double) width * zoomx) + 0.5); *dstheight = (int) floor(((double) height * zoomy) + 0.5); if (*dstwidth < 1) { *dstwidth = 1; } if (*dstheight < 1) { *dstheight = 1; } } /*! \brief Zoom a surface by independent horizontal and vertical factors with optional smoothing. Zooms a 32bit or 8bit 'src' surface to newly created 'dst' surface. 'zoomx' and 'zoomy' are scaling factors for width and height. If 'smooth' is on then the destination 32bit surface is anti-aliased. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly. If zoom factors are negative, the image is flipped on the axes. \param src The surface to zoom. \param zoomx The horizontal zoom factor. \param zoomy The vertical zoom factor. \param smooth Antialiasing flag; set to SMOOTHING_ON to enable. \return The new, zoomed surface. */ SDL_Surface *zoomSurface(SDL_Surface * src, double zoomx, double zoomy, int smooth) { SDL_Surface *rz_src; SDL_Surface *rz_dst; int dstwidth, dstheight; int is32bit; int i, src_converted; int flipx, flipy; /* * Sanity check */ if (src == NULL) return (NULL); /* * Determine if source surface is 32bit or 8bit */ is32bit = (src->format->BitsPerPixel == 32); if ((is32bit) || (src->format->BitsPerPixel == 8)) { /* * Use source surface 'as is' */ rz_src = src; src_converted = 0; } else { /* * New source surface is 32bit with a defined RGBA ordering */ rz_src = SDL_CreateRGBSurface(SDL_SWSURFACE, src->w, src->h, 32, #if SDL_BYTEORDER == SDL_LIL_ENDIAN 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000 #else 0xff000000, 0x00ff0000, 0x0000ff00, 0x000000ff #endif ); if (rz_src == NULL) { return NULL; } SDL_BlitSurface(src, NULL, rz_src, NULL); src_converted = 1; is32bit = 1; } flipx = (zoomx<0.0); if (flipx) zoomx = -zoomx; flipy = (zoomy<0.0); if (flipy) zoomy = -zoomy; /* Get size if target */ zoomSurfaceSize(rz_src->w, rz_src->h, zoomx, zoomy, &dstwidth, &dstheight); /* * Alloc space to completely contain the zoomed surface */ rz_dst = NULL; if (is32bit) { /* * Target surface is 32bit with source RGBA/ABGR ordering */ rz_dst = SDL_CreateRGBSurface(SDL_SWSURFACE, dstwidth, dstheight + GUARD_ROWS, 32, rz_src->format->Rmask, rz_src->format->Gmask, rz_src->format->Bmask, rz_src->format->Amask); } else { /* * Target surface is 8bit */ rz_dst = SDL_CreateRGBSurface(SDL_SWSURFACE, dstwidth, dstheight + GUARD_ROWS, 8, 0, 0, 0, 0); } /* Check target */ if (rz_dst == NULL) { /* * Cleanup temp surface */ if (src_converted) { SDL_FreeSurface(rz_src); } return NULL; } /* Adjust for guard rows */ rz_dst->h = dstheight; /* * Lock source surface */ if (SDL_MUSTLOCK(rz_src)) { SDL_LockSurface(rz_src); } /* * Check which kind of surface we have */ if (is32bit) { /* * Call the 32bit transformation routine to do the zooming (using alpha) */ _zoomSurfaceRGBA(rz_src, rz_dst, flipx, flipy, smooth); } else { /* * Copy palette and colorkey info */ for (i = 0; i < rz_src->format->palette->ncolors; i++) { rz_dst->format->palette->colors[i] = rz_src->format->palette->colors[i]; } rz_dst->format->palette->ncolors = rz_src->format->palette->ncolors; /* * Call the 8bit transformation routine to do the zooming */ _zoomSurfaceY(rz_src, rz_dst, flipx, flipy); } /* * Unlock source surface */ if (SDL_MUSTLOCK(rz_src)) { SDL_UnlockSurface(rz_src); } /* * Cleanup temp surface */ if (src_converted) { SDL_FreeSurface(rz_src); } /* * Return destination surface */ return (rz_dst); } /*! \brief Shrink a surface by an integer ratio using averaging. Shrinks a 32bit or 8bit 'src' surface to a newly created 'dst' surface. 'factorx' and 'factory' are the shrinking ratios (i.e. 2=1/2 the size, 3=1/3 the size, etc.) The destination surface is antialiased by averaging the source box RGBA or Y information. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly. The input surface is not modified. The output surface is newly allocated. \param src The surface to shrink. \param factorx The horizontal shrinking ratio. \param factory The vertical shrinking ratio. \return The new, shrunken surface. */ /*@null@*/ SDL_Surface *shrinkSurface(SDL_Surface *src, int factorx, int factory) { int result; SDL_Surface *rz_src; SDL_Surface *rz_dst = NULL; int dstwidth, dstheight; int is32bit; int i, src_converted; int haveError = 0; /* * Sanity check */ if (src == NULL) { return (NULL); } /* * Determine if source surface is 32bit or 8bit */ is32bit = (src->format->BitsPerPixel == 32); if ((is32bit) || (src->format->BitsPerPixel == 8)) { /* * Use source surface 'as is' */ rz_src = src; src_converted = 0; } else { /* * New source surface is 32bit with a defined RGBA ordering */ rz_src = SDL_CreateRGBSurface(SDL_SWSURFACE, src->w, src->h, 32, #if SDL_BYTEORDER == SDL_LIL_ENDIAN 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000 #else 0xff000000, 0x00ff0000, 0x0000ff00, 0x000000ff #endif ); if (rz_src==NULL) { haveError = 1; goto exitShrinkSurface; } SDL_BlitSurface(src, NULL, rz_src, NULL); src_converted = 1; is32bit = 1; } /* * Lock the surface */ if (SDL_MUSTLOCK(rz_src)) { if (SDL_LockSurface(rz_src) < 0) { haveError = 1; goto exitShrinkSurface; } } /* Get size for target */ dstwidth=rz_src->w/factorx; while (dstwidth*factorx>rz_src->w) { dstwidth--; } dstheight=rz_src->h/factory; while (dstheight*factory>rz_src->h) { dstheight--; } /* * Alloc space to completely contain the shrunken surface * (with added guard rows) */ if (is32bit==1) { /* * Target surface is 32bit with source RGBA/ABGR ordering */ rz_dst = SDL_CreateRGBSurface(SDL_SWSURFACE, dstwidth, dstheight + GUARD_ROWS, 32, rz_src->format->Rmask, rz_src->format->Gmask, rz_src->format->Bmask, rz_src->format->Amask); } else { /* * Target surface is 8bit */ rz_dst = SDL_CreateRGBSurface(SDL_SWSURFACE, dstwidth, dstheight + GUARD_ROWS, 8, 0, 0, 0, 0); } /* Check target */ if (rz_dst == NULL) { haveError = 1; goto exitShrinkSurface; } /* Adjust for guard rows */ rz_dst->h = dstheight; /* * Check which kind of surface we have */ if (is32bit==1) { /* * Call the 32bit transformation routine to do the shrinking (using alpha) */ result = _shrinkSurfaceRGBA(rz_src, rz_dst, factorx, factory); if ((result!=0) || (rz_dst==NULL)) { haveError = 1; goto exitShrinkSurface; } } else { /* * Copy palette and colorkey info */ for (i = 0; i < rz_src->format->palette->ncolors; i++) { rz_dst->format->palette->colors[i] = rz_src->format->palette->colors[i]; } rz_dst->format->palette->ncolors = rz_src->format->palette->ncolors; /* * Call the 8bit transformation routine to do the shrinking */ result = _shrinkSurfaceY(rz_src, rz_dst, factorx, factory); if (result!=0) { haveError = 1; goto exitShrinkSurface; } } exitShrinkSurface: if (rz_src!=NULL) { /* * Unlock source surface */ if (SDL_MUSTLOCK(rz_src)) { SDL_UnlockSurface(rz_src); } /* * Cleanup temp surface */ if (src_converted==1) { SDL_FreeSurface(rz_src); } } /* Check error state; maybe need to cleanup destination */ if (haveError==1) { if (rz_dst!=NULL) { SDL_FreeSurface(rz_dst); } rz_dst=NULL; } /* * Return destination surface */ return (rz_dst); } SDL2_gfx-1.0.4/SDL2_rotozoom.h100777 0 0 5670 12360250626 11042 0/* SDL2_rotozoom.c: rotozoomer, zoomer and shrinker for 32bit or 8bit surfaces Copyright (C) 2012-2014 Andreas Schiffler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. Andreas Schiffler -- aschiffler at ferzkopp dot net */ #ifndef _SDL2_rotozoom_h #define _SDL2_rotozoom_h #include /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus extern "C" { #endif #ifndef M_PI #define M_PI 3.1415926535897932384626433832795 #endif #include "SDL.h" /* ---- Defines */ /*! \brief Disable anti-aliasing (no smoothing). */ #define SMOOTHING_OFF 0 /*! \brief Enable anti-aliasing (smoothing). */ #define SMOOTHING_ON 1 /* ---- Function Prototypes */ #ifdef _MSC_VER # if defined(DLL_EXPORT) && !defined(LIBSDL2_GFX_DLL_IMPORT) # define SDL2_ROTOZOOM_SCOPE __declspec(dllexport) # else # ifdef LIBSDL2_GFX_DLL_IMPORT # define SDL2_ROTOZOOM_SCOPE __declspec(dllimport) # endif # endif #endif #ifndef SDL2_ROTOZOOM_SCOPE # define SDL2_ROTOZOOM_SCOPE extern #endif /* Rotozoom functions */ SDL2_ROTOZOOM_SCOPE SDL_Surface *rotozoomSurface(SDL_Surface * src, double angle, double zoom, int smooth); SDL2_ROTOZOOM_SCOPE SDL_Surface *rotozoomSurfaceXY (SDL_Surface * src, double angle, double zoomx, double zoomy, int smooth); SDL2_ROTOZOOM_SCOPE void rotozoomSurfaceSize(int width, int height, double angle, double zoom, int *dstwidth, int *dstheight); SDL2_ROTOZOOM_SCOPE void rotozoomSurfaceSizeXY (int width, int height, double angle, double zoomx, double zoomy, int *dstwidth, int *dstheight); /* Zooming functions */ SDL2_ROTOZOOM_SCOPE SDL_Surface *zoomSurface(SDL_Surface * src, double zoomx, double zoomy, int smooth); SDL2_ROTOZOOM_SCOPE void zoomSurfaceSize(int width, int height, double zoomx, double zoomy, int *dstwidth, int *dstheight); /* Shrinking functions */ SDL2_ROTOZOOM_SCOPE SDL_Surface *shrinkSurface(SDL_Surface * src, int factorx, int factory); /* Specialized rotation functions */ SDL2_ROTOZOOM_SCOPE SDL_Surface* rotateSurface90Degrees(SDL_Surface* src, int numClockwiseTurns); /* Ends C function definitions when using C++ */ #ifdef __cplusplus } #endif #endif /* _SDL2_rotozoom_h */ SDL2_gfx-1.0.4/test/ 40777 0 0 0 13240163214 7056 5SDL2_gfx-1.0.4/test/acinclude.m4100777 0 0 30166 12021530027 11371 0# Configure paths for SDL # Sam Lantinga 9/21/99 # stolen from Manish Singh # stolen back from Frank Belew # stolen from Manish Singh # Shamelessly stolen from Owen Taylor # serial 1 dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS dnl AC_DEFUN([AM_PATH_SDL2], [dnl dnl Get the cflags and libraries from the sdl2-config script dnl AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)], sdl_prefix="$withval", sdl_prefix="") AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)], sdl_exec_prefix="$withval", sdl_exec_prefix="") AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program], , enable_sdltest=yes) min_sdl_version=ifelse([$1], ,0.9.0,$1) if test "x$sdl_prefix$sdl_exec_prefix" = x ; then PKG_CHECK_MODULES([SDL], [sdl2 >= $min_sdl_version], [sdl_pc=yes], [sdl_pc=no]) else sdl_pc=no if test x$sdl_exec_prefix != x ; then sdl_config_args="$sdl_config_args --exec-prefix=$sdl_exec_prefix" if test x${SDL_CONFIG+set} != xset ; then SDL_CONFIG=$sdl_exec_prefix/bin/sdl2-config fi fi if test x$sdl_prefix != x ; then sdl_config_args="$sdl_config_args --prefix=$sdl_prefix" if test x${SDL_CONFIG+set} != xset ; then SDL_CONFIG=$sdl_prefix/bin/sdl2-config fi fi fi if test "x$sdl_pc" = xyes ; then no_sdl="" SDL_CONFIG="pkg-config sdl2" else as_save_PATH="$PATH" if test "x$prefix" != xNONE && test "$cross_compiling" != yes; then PATH="$prefix/bin:$prefix/usr/bin:$PATH" fi AC_PATH_PROG(SDL_CONFIG, sdl2-config, no, [$PATH]) PATH="$as_save_PATH" AC_MSG_CHECKING(for SDL - version >= $min_sdl_version) no_sdl="" if test "$SDL_CONFIG" = "no" ; then no_sdl=yes else SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags` SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs` sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` if test "x$enable_sdltest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_CXXFLAGS="$CXXFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $SDL_CFLAGS" CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" LIBS="$LIBS $SDL_LIBS" dnl dnl Now check if the installed SDL is sufficiently new. (Also sanity dnl checks the results of sdl2-config to some extent dnl rm -f conf.sdltest AC_TRY_RUN([ #include #include #include #include "SDL.h" char* my_strdup (char *str) { char *new_str; if (str) { new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); strcpy (new_str, str); } else new_str = NULL; return new_str; } int main (int argc, char *argv[]) { int major, minor, micro; char *tmp_version; /* This hangs on some systems (?) system ("touch conf.sdltest"); */ { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); } /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = my_strdup("$min_sdl_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_sdl_version"); exit(1); } if (($sdl_major_version > major) || (($sdl_major_version == major) && ($sdl_minor_version > minor)) || (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro))) { return 0; } else { printf("\n*** 'sdl2-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version); printf("*** of SDL required is %d.%d.%d. If sdl2-config is correct, then it is\n", major, minor, micro); printf("*** best to upgrade to the required version.\n"); printf("*** If sdl2-config was wrong, set the environment variable SDL_CONFIG\n"); printf("*** to point to the correct copy of sdl2-config, and remove the file\n"); printf("*** config.cache before re-running configure\n"); return 1; } } ],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" CXXFLAGS="$ac_save_CXXFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_sdl" = x ; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi fi if test "x$no_sdl" = x ; then ifelse([$2], , :, [$2]) else if test "$SDL_CONFIG" = "no" ; then echo "*** The sdl2-config script installed by SDL could not be found" echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the SDL_CONFIG environment variable to the" echo "*** full path to sdl2-config." else if test -f conf.sdltest ; then : else echo "*** Could not run SDL test program, checking why..." CFLAGS="$CFLAGS $SDL_CFLAGS" CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" LIBS="$LIBS $SDL_LIBS" AC_TRY_LINK([ #include #include "SDL.h" int main(int argc, char *argv[]) { return 0; } #undef main #define main K_and_R_C_main ], [ return 0; ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding SDL or finding the wrong" echo "*** version of SDL. If it is not finding SDL, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means SDL was incorrectly installed" echo "*** or that you have moved SDL since it was installed. In the latter case, you" echo "*** may want to edit the sdl2-config script: $SDL_CONFIG" ]) CFLAGS="$ac_save_CFLAGS" CXXFLAGS="$ac_save_CXXFLAGS" LIBS="$ac_save_LIBS" fi fi SDL_CFLAGS="" SDL_LIBS="" ifelse([$3], , :, [$3]) fi AC_SUBST(SDL_CFLAGS) AC_SUBST(SDL_LIBS) rm -f conf.sdltest ]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # # 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # 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. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 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 ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) # only at the first occurence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # 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]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- 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`], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- 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 ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # 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 "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$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 ])# PKG_CHECK_MODULES SDL2_gfx-1.0.4/test/aclocal.m4100777 0 0 30166 12021530027 11040 0# Configure paths for SDL # Sam Lantinga 9/21/99 # stolen from Manish Singh # stolen back from Frank Belew # stolen from Manish Singh # Shamelessly stolen from Owen Taylor # serial 1 dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS dnl AC_DEFUN([AM_PATH_SDL2], [dnl dnl Get the cflags and libraries from the sdl2-config script dnl AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)], sdl_prefix="$withval", sdl_prefix="") AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)], sdl_exec_prefix="$withval", sdl_exec_prefix="") AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program], , enable_sdltest=yes) min_sdl_version=ifelse([$1], ,0.9.0,$1) if test "x$sdl_prefix$sdl_exec_prefix" = x ; then PKG_CHECK_MODULES([SDL], [sdl2 >= $min_sdl_version], [sdl_pc=yes], [sdl_pc=no]) else sdl_pc=no if test x$sdl_exec_prefix != x ; then sdl_config_args="$sdl_config_args --exec-prefix=$sdl_exec_prefix" if test x${SDL_CONFIG+set} != xset ; then SDL_CONFIG=$sdl_exec_prefix/bin/sdl2-config fi fi if test x$sdl_prefix != x ; then sdl_config_args="$sdl_config_args --prefix=$sdl_prefix" if test x${SDL_CONFIG+set} != xset ; then SDL_CONFIG=$sdl_prefix/bin/sdl2-config fi fi fi if test "x$sdl_pc" = xyes ; then no_sdl="" SDL_CONFIG="pkg-config sdl2" else as_save_PATH="$PATH" if test "x$prefix" != xNONE && test "$cross_compiling" != yes; then PATH="$prefix/bin:$prefix/usr/bin:$PATH" fi AC_PATH_PROG(SDL_CONFIG, sdl2-config, no, [$PATH]) PATH="$as_save_PATH" AC_MSG_CHECKING(for SDL - version >= $min_sdl_version) no_sdl="" if test "$SDL_CONFIG" = "no" ; then no_sdl=yes else SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags` SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs` sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` if test "x$enable_sdltest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_CXXFLAGS="$CXXFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $SDL_CFLAGS" CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" LIBS="$LIBS $SDL_LIBS" dnl dnl Now check if the installed SDL is sufficiently new. (Also sanity dnl checks the results of sdl2-config to some extent dnl rm -f conf.sdltest AC_TRY_RUN([ #include #include #include #include "SDL.h" char* my_strdup (char *str) { char *new_str; if (str) { new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); strcpy (new_str, str); } else new_str = NULL; return new_str; } int main (int argc, char *argv[]) { int major, minor, micro; char *tmp_version; /* This hangs on some systems (?) system ("touch conf.sdltest"); */ { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); } /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = my_strdup("$min_sdl_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_sdl_version"); exit(1); } if (($sdl_major_version > major) || (($sdl_major_version == major) && ($sdl_minor_version > minor)) || (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro))) { return 0; } else { printf("\n*** 'sdl2-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version); printf("*** of SDL required is %d.%d.%d. If sdl2-config is correct, then it is\n", major, minor, micro); printf("*** best to upgrade to the required version.\n"); printf("*** If sdl2-config was wrong, set the environment variable SDL_CONFIG\n"); printf("*** to point to the correct copy of sdl2-config, and remove the file\n"); printf("*** config.cache before re-running configure\n"); return 1; } } ],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" CXXFLAGS="$ac_save_CXXFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_sdl" = x ; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi fi if test "x$no_sdl" = x ; then ifelse([$2], , :, [$2]) else if test "$SDL_CONFIG" = "no" ; then echo "*** The sdl2-config script installed by SDL could not be found" echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the SDL_CONFIG environment variable to the" echo "*** full path to sdl2-config." else if test -f conf.sdltest ; then : else echo "*** Could not run SDL test program, checking why..." CFLAGS="$CFLAGS $SDL_CFLAGS" CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" LIBS="$LIBS $SDL_LIBS" AC_TRY_LINK([ #include #include "SDL.h" int main(int argc, char *argv[]) { return 0; } #undef main #define main K_and_R_C_main ], [ return 0; ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding SDL or finding the wrong" echo "*** version of SDL. If it is not finding SDL, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means SDL was incorrectly installed" echo "*** or that you have moved SDL since it was installed. In the latter case, you" echo "*** may want to edit the sdl2-config script: $SDL_CONFIG" ]) CFLAGS="$ac_save_CFLAGS" CXXFLAGS="$ac_save_CXXFLAGS" LIBS="$ac_save_LIBS" fi fi SDL_CFLAGS="" SDL_LIBS="" ifelse([$3], , :, [$3]) fi AC_SUBST(SDL_CFLAGS) AC_SUBST(SDL_LIBS) rm -f conf.sdltest ]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # # 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # 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. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 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 ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) # only at the first occurence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # 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]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- 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`], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- 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 ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # 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 "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$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 ])# PKG_CHECK_MODULES SDL2_gfx-1.0.4/test/autogen.sh100777 0 0 464 12021530027 11134 0#!/bin/sh # # Regenerate configuration files cp acinclude.m4 aclocal.m4 found=false for autoconf in autoconf autoconf259 autoconf-2.59 do if which $autoconf >/dev/null 2>&1; then $autoconf && found=true; break; fi done if test x$found = xfalse; then echo "Couldn't find autoconf, aborting" exit 1 fi SDL2_gfx-1.0.4/test/config.guess100777 0 0 127161 12021530027 11537 0#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012 Free Software Foundation, Inc. timestamp='2012-01-01' # 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 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., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # 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. # Originally written by Per Bothner. Please send patches (context # diff format) to and include a ChangeLog # entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -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 (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 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 trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # 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". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-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. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $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 # 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/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) 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. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; 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'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > 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:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $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; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $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 echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 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 [ -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 [ "${HP_ARCH}" = "" ]; then eval $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 [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # 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 echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $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; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; 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*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` 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="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-gnueabi else echo ${UNAME_MACHINE}-unknown-linux-gnueabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/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 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; 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 configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) 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*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in i386) eval $set_cc_for_build if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then UNAME_PROCESSOR="x86_64" fi fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #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 (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #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 printf ("vax-dec-ultrix\n"); exit (0); # 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; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp 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` /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 exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: SDL2_gfx-1.0.4/test/config.sub100777 0 0 103036 12021530027 11175 0#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. timestamp='2009-10-07' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # 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 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., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # 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. # Please send patches to . Submit a context # diff and a properly formatted GNU ChangeLog entry. # # 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: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # 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. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -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 (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 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" 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 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | picochip) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze) basic_machine=microblaze-xilinx ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $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 ;; -mvs* | -opened*) vendor=ibm ;; -os400*) 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 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: SDL2_gfx-1.0.4/test/configure100777 0 0 440142 12343105602 11127 0#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69. # # # Copyright (C) 1992-1996, 1998-2012 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 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # 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 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. 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'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(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 exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || 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" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS 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'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi 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_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=`$as_echo "$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 || $as_echo 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_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_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # 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 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$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 || $as_echo 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" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # 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 } 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 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= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= PACKAGE_URL= ac_unique_file="README" ac_subst_vars='LTLIBOBJS LIBOBJS XLIB GLES2LIB GLESLIB GLLIB CPP XMKMF SDL_CONFIG SDL_LIBS SDL_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG MATHLIB EXE OSMESA_CONFIG OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC host_os host_vendor host_cpu host build_os build_vendor build_cpu build 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 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' ac_subst_files='' ac_user_opts=' enable_option_checking with_sdl_prefix with_sdl_exec_prefix enable_sdltest with_x ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR SDL_CFLAGS SDL_LIBS XMKMF CPP' # 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' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' 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 # Accept the important Cygnus configure options, so we can diagnose typos. 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=`$as_echo "$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=`$as_echo "$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 ;; -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=`$as_echo "$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=`$as_echo "$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. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$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" ;; *) $as_echo "$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 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 || $as_echo 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 this package 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] --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/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF X features: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR 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 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] --disable-sdltest Do not try to compile and run a test SDL program Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-sdl-prefix=PFX Prefix where SDL is installed (optional) --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional) --with-x use the X Window System 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 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 SDL_CFLAGS C compiler flags for SDL, overriding pkg-config SDL_LIBS linker flags for SDL, overriding pkg-config XMKMF Path to xmkmf, Makefile generator for X Window System CPP C preprocessor 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 the package provider. _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=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 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 guested configure. 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 $as_echo "$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 configure generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF 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 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\"" $as_echo "$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 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$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_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&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 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$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_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\"" $as_echo "$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 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$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 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 $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _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 test -z "$as_dir" && as_dir=. $as_echo "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=`$as_echo "$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=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## 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_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( 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 $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && 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 $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } 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 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file 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,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) 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 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## 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_aux_dir= for ac_dir in $srcdir/.; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in $srcdir/." "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; 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 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; 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\"" $as_echo "$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 $as_echo "$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 () { ; 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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" 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\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. 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+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # 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 ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; 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_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { 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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 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\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; 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\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; 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.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" 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 test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi case "$host" in *-*-cygwin* | *-*-mingw32*) EXE=".exe" MATHLIB="" SYS_GL_LIBS="-lopengl32" ;; *-*-beos* | *-*-haiku*) EXE="" MATHLIB="" SYS_GL_LIBS="-lGL" ;; *-*-darwin* ) EXE="" MATHLIB="" SYS_GL_LIBS="-Wl,-framework,OpenGL" ;; *-*-aix*) EXE="" if test x$ac_cv_c_compiler_gnu = xyes; then CFLAGS="-mthreads" fi SYS_GL_LIBS="" ;; *-*-mint*) EXE="" MATHLIB="" # Extract the first word of "osmesa-config", so it can be a program name with args. set dummy osmesa-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_OSMESA_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $OSMESA_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_OSMESA_CONFIG="$OSMESA_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 test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_OSMESA_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_OSMESA_CONFIG" && ac_cv_path_OSMESA_CONFIG="no" ;; esac fi OSMESA_CONFIG=$ac_cv_path_OSMESA_CONFIG if test -n "$OSMESA_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OSMESA_CONFIG" >&5 $as_echo "$OSMESA_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$OSMESA_CONFIG" = "xyes"; then OSMESA_CFLAGS=`$OSMESA_CONFIG --cflags` OSMESA_LIBS=`$OSMESA_CONFIG --libs` CFLAGS="$CFLAGS $OSMESA_CFLAGS" SYS_GL_LIBS="$OSMESA_LIBS" else SYS_GL_LIBS="-lOSMesa" fi ;; *-*-qnx*) EXE="" MATHLIB="" SYS_GL_LIBS="-lGLES_CM" ;; *) EXE="" MATHLIB="-lm" SYS_GL_LIBS="-lGL" ;; esac SDL_VERSION=2.0.0 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi # Check whether --with-sdl-prefix was given. if test "${with_sdl_prefix+set}" = set; then : withval=$with_sdl_prefix; sdl_prefix="$withval" else sdl_prefix="" fi # Check whether --with-sdl-exec-prefix was given. if test "${with_sdl_exec_prefix+set}" = set; then : withval=$with_sdl_exec_prefix; sdl_exec_prefix="$withval" else sdl_exec_prefix="" fi # Check whether --enable-sdltest was given. if test "${enable_sdltest+set}" = set; then : enableval=$enable_sdltest; else enable_sdltest=yes fi min_sdl_version=$SDL_VERSION if test "x$sdl_prefix$sdl_exec_prefix" = x ; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SDL" >&5 $as_echo_n "checking for SDL... " >&6; } if test -n "$SDL_CFLAGS"; then pkg_cv_SDL_CFLAGS="$SDL_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sdl2 >= \$min_sdl_version\""; } >&5 ($PKG_CONFIG --exists --print-errors "sdl2 >= $min_sdl_version") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SDL_CFLAGS=`$PKG_CONFIG --cflags "sdl2 >= $min_sdl_version" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$SDL_LIBS"; then pkg_cv_SDL_LIBS="$SDL_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sdl2 >= \$min_sdl_version\""; } >&5 ($PKG_CONFIG --exists --print-errors "sdl2 >= $min_sdl_version") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SDL_LIBS=`$PKG_CONFIG --libs "sdl2 >= $min_sdl_version" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 SDL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "sdl2 >= $min_sdl_version" 2>&1` else SDL_PKG_ERRORS=`$PKG_CONFIG --print-errors "sdl2 >= $min_sdl_version" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$SDL_PKG_ERRORS" >&5 sdl_pc=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } sdl_pc=no else SDL_CFLAGS=$pkg_cv_SDL_CFLAGS SDL_LIBS=$pkg_cv_SDL_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } sdl_pc=yes fi else sdl_pc=no if test x$sdl_exec_prefix != x ; then sdl_config_args="$sdl_config_args --exec-prefix=$sdl_exec_prefix" if test x${SDL_CONFIG+set} != xset ; then SDL_CONFIG=$sdl_exec_prefix/bin/sdl2-config fi fi if test x$sdl_prefix != x ; then sdl_config_args="$sdl_config_args --prefix=$sdl_prefix" if test x${SDL_CONFIG+set} != xset ; then SDL_CONFIG=$sdl_prefix/bin/sdl2-config fi fi fi if test "x$sdl_pc" = xyes ; then no_sdl="" SDL_CONFIG="pkg-config sdl2" else as_save_PATH="$PATH" if test "x$prefix" != xNONE && test "$cross_compiling" != yes; then PATH="$prefix/bin:$prefix/usr/bin:$PATH" fi # Extract the first word of "sdl2-config", so it can be a program name with args. set dummy sdl2-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_SDL_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $SDL_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_SDL_CONFIG="$SDL_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 test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SDL_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no" ;; esac fi SDL_CONFIG=$ac_cv_path_SDL_CONFIG if test -n "$SDL_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDL_CONFIG" >&5 $as_echo "$SDL_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi PATH="$as_save_PATH" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SDL - version >= $min_sdl_version" >&5 $as_echo_n "checking for SDL - version >= $min_sdl_version... " >&6; } no_sdl="" if test "$SDL_CONFIG" = "no" ; then no_sdl=yes else SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags` SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs` sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` if test "x$enable_sdltest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_CXXFLAGS="$CXXFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $SDL_CFLAGS" CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" LIBS="$LIBS $SDL_LIBS" rm -f conf.sdltest if test "$cross_compiling" = yes; then : echo $ac_n "cross compiling; assumed OK... $ac_c" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include "SDL.h" char* my_strdup (char *str) { char *new_str; if (str) { new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); strcpy (new_str, str); } else new_str = NULL; return new_str; } int main (int argc, char *argv[]) { int major, minor, micro; char *tmp_version; /* This hangs on some systems (?) system ("touch conf.sdltest"); */ { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); } /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = my_strdup("$min_sdl_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_sdl_version"); exit(1); } if (($sdl_major_version > major) || (($sdl_major_version == major) && ($sdl_minor_version > minor)) || (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro))) { return 0; } else { printf("\n*** 'sdl2-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version); printf("*** of SDL required is %d.%d.%d. If sdl2-config is correct, then it is\n", major, minor, micro); printf("*** best to upgrade to the required version.\n"); printf("*** If sdl2-config was wrong, set the environment variable SDL_CONFIG\n"); printf("*** to point to the correct copy of sdl2-config, and remove the file\n"); printf("*** config.cache before re-running configure\n"); return 1; } } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else no_sdl=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi CFLAGS="$ac_save_CFLAGS" CXXFLAGS="$ac_save_CXXFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_sdl" = x ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test "x$no_sdl" = x ; then : else if test "$SDL_CONFIG" = "no" ; then echo "*** The sdl2-config script installed by SDL could not be found" echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the SDL_CONFIG environment variable to the" echo "*** full path to sdl2-config." else if test -f conf.sdltest ; then : else echo "*** Could not run SDL test program, checking why..." CFLAGS="$CFLAGS $SDL_CFLAGS" CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" LIBS="$LIBS $SDL_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include "SDL.h" int main(int argc, char *argv[]) { return 0; } #undef main #define main K_and_R_C_main int main () { return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding SDL or finding the wrong" echo "*** version of SDL. If it is not finding SDL, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" else echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means SDL was incorrectly installed" echo "*** or that you have moved SDL since it was installed. In the latter case, you" echo "*** may want to edit the sdl2-config script: $SDL_CONFIG" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" CXXFLAGS="$ac_save_CXXFLAGS" LIBS="$ac_save_LIBS" fi fi SDL_CFLAGS="" SDL_LIBS="" as_fn_error $? "*** SDL version $SDL_VERSION not found!" "$LINENO" 5 fi rm -f conf.sdltest CFLAGS="$CFLAGS $SDL_CFLAGS" LIBS="$LIBS -lSDL2_test $SDL_LIBS" 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # 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 # 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # 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 # 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_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 $as_echo_n "checking for X... " >&6; } # Check whether --with-x was given. if test "${with_x+set}" = set; then : withval=$with_x; fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else case $x_includes,$x_libraries in #( *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : $as_echo_n "(cached) " >&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no rm -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir cat >Imakefile <<'_ACEOF' incroot: @echo incroot='${INCROOT}' usrlibdir: @echo usrlibdir='${USRLIBDIR}' libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl dylib la dll; do if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && test -f "$ac_im_libdir/libX11.$ac_extension"; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in /usr/include) ac_x_includes= ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in /usr/lib | /usr/lib64 | /lib | /lib64) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. rm -f -r conftest.dir fi # Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include /usr/X11R7/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 /usr/include/X11R7 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include /usr/local/X11R7/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 /usr/local/include/X11R7 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 /usr/X386/include /usr/x386/include /usr/XFree86/include/X11 /usr/include /usr/local/include /usr/unsupported/include /usr/athena/include /usr/local/x11r5/include /usr/lpp/Xamples/include /usr/openwin/include /usr/openwin/share/include' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # We can compile using X headers with no special include directory. ac_x_includes= else for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest.err conftest.i conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { XrmInitialize () ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else LIBS=$ac_save_LIBS for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl dylib la dll; do if test -r "$ac_dir/libX11.$ac_extension"; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no case $ac_x_includes,$ac_x_libraries in #( no,* | *,no | *\'*) # Didn't find X, or a directory has "'" in its name. ac_cv_have_x="have_x=no";; #( *) # Record where we found X for the cache. ac_cv_have_x="have_x=yes\ ac_x_includes='$ac_x_includes'\ ac_x_libraries='$ac_x_libraries'" esac fi ;; #( *) have_x=yes;; esac eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 $as_echo "$have_x" >&6; } no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes\ ac_x_includes='$x_includes'\ ac_x_libraries='$x_libraries'" { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 $as_echo "libraries $x_libraries, headers $x_includes" >&6; } fi if test x$have_x = xyes; then if test x$ac_x_includes = xno || test "x$ac_x_includes" = xNone || test "x$ac_x_includes" = x; then : else CFLAGS="$CFLAGS -I$ac_x_includes" fi if test x$ac_x_libraries = xno || test "x$ac_x_libraries" = xNone; then : else if test "x$ac_x_libraries" = x; then XPATH="" XLIB="-lX11" else XPATH="-L$ac_x_libraries" XLIB="-L$ac_x_libraries -lX11" fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenGL support" >&5 $as_echo_n "checking for OpenGL support... " >&6; } have_opengl=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "SDL_opengl.h" int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : have_opengl=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_opengl" >&5 $as_echo "$have_opengl" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenGL ES support" >&5 $as_echo_n "checking for OpenGL ES support... " >&6; } have_opengles=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined (__IPHONEOS__) #include #else #include #endif /* __QNXNTO__ */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : have_opengles=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_opengles" >&5 $as_echo "$have_opengles" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenGL ES2 support" >&5 $as_echo_n "checking for OpenGL ES2 support... " >&6; } have_opengles2=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined (__IPHONEOS__) #include #include #else #include #include #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : have_opengles2=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_opengles2" >&5 $as_echo "$have_opengles2" >&6; } GLLIB="" GLESLIB="" GLES2LIB="" if test x$have_opengles = xyes; then CFLAGS="$CFLAGS -DHAVE_OPENGLES" GLESLIB="$XPATH -lGLESv1_CM" fi if test x$have_opengles2 = xyes; then CFLAGS="$CFLAGS -DHAVE_OPENGLES2" #GLES2LIB="$XPATH -lGLESv2" fi if test x$have_opengl = xyes; then CFLAGS="$CFLAGS -DHAVE_OPENGL" GLLIB="$XPATH $SYS_GL_LIBS" fi have_sdlgfx=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pixelColor in -lSDL2_gfx" >&5 $as_echo_n "checking for pixelColor in -lSDL2_gfx... " >&6; } if ${ac_cv_lib_SDL2_gfx_pixelColor_+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lSDL2_gfx $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pixelColor (); int main () { return pixelColor (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_SDL2_gfx_pixelColor_=yes else ac_cv_lib_SDL2_gfx_pixelColor_=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SDL2_gfx_pixelColor_" >&5 $as_echo "$ac_cv_lib_SDL2_gfx_pixelColor_" >&6; } if test "x$ac_cv_lib_SDL2_gfx_pixelColor_" = xyes; then : have_sdlgfx=yes fi if test x$have_sdlgfx = xyes; then LIBS="$LIBS -lSDL2_gfx" else as_fn_error $? " *** Unable to find SDL2_gfx library " "$LINENO" 5 fi ac_config_files="$ac_config_files Makefile" 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_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( 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+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.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=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # 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 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # 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 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # 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 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$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_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_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 || $as_echo 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 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 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=`$as_echo "$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 || $as_echo 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 $as_me, which was generated by GNU Autoconf 2.69. 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 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" _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 Configuration files: $config_files Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' 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 ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_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 \$as_echo "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 $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _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 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) 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+set}" = set || CONFIG_FILES=$config_files 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" eval set X " :F $CONFIG_FILES " 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=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$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 || $as_echo 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=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 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 # _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@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' 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 $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"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" 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 ;; 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 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi SDL2_gfx-1.0.4/test/configure.in100777 0 0 7151 12343105602 11473 0dnl Process this file with autoconf to produce a configure script. AC_INIT(README) dnl Detect the canonical build and host environments AC_CONFIG_AUX_DIRS($srcdir/.) AC_CANONICAL_HOST dnl Check for tools AC_PROG_CC dnl Check for compiler environment AC_C_CONST dnl Figure out which math library to use case "$host" in *-*-cygwin* | *-*-mingw32*) EXE=".exe" MATHLIB="" SYS_GL_LIBS="-lopengl32" ;; *-*-beos* | *-*-haiku*) EXE="" MATHLIB="" SYS_GL_LIBS="-lGL" ;; *-*-darwin* ) EXE="" MATHLIB="" SYS_GL_LIBS="-Wl,-framework,OpenGL" ;; *-*-aix*) EXE="" if test x$ac_cv_prog_gcc = xyes; then CFLAGS="-mthreads" fi SYS_GL_LIBS="" ;; *-*-mint*) EXE="" MATHLIB="" AC_PATH_PROG(OSMESA_CONFIG, osmesa-config, no) if test "x$OSMESA_CONFIG" = "xyes"; then OSMESA_CFLAGS=`$OSMESA_CONFIG --cflags` OSMESA_LIBS=`$OSMESA_CONFIG --libs` CFLAGS="$CFLAGS $OSMESA_CFLAGS" SYS_GL_LIBS="$OSMESA_LIBS" else SYS_GL_LIBS="-lOSMesa" fi ;; *-*-qnx*) EXE="" MATHLIB="" SYS_GL_LIBS="-lGLES_CM" ;; *) EXE="" MATHLIB="-lm" SYS_GL_LIBS="-lGL" ;; esac AC_SUBST(EXE) AC_SUBST(MATHLIB) dnl Check for SDL SDL_VERSION=2.0.0 AM_PATH_SDL2($SDL_VERSION, :, AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) ) CFLAGS="$CFLAGS $SDL_CFLAGS" LIBS="$LIBS -lSDL2_test $SDL_LIBS" dnl Check for X11 path, needed for OpenGL on some systems AC_PATH_X if test x$have_x = xyes; then if test x$ac_x_includes = xno || test "x$ac_x_includes" = xNone || test "x$ac_x_includes" = x; then : else CFLAGS="$CFLAGS -I$ac_x_includes" fi if test x$ac_x_libraries = xno || test "x$ac_x_libraries" = xNone; then : else if test "x$ac_x_libraries" = x; then XPATH="" XLIB="-lX11" else XPATH="-L$ac_x_libraries" XLIB="-L$ac_x_libraries -lX11" fi fi fi dnl Check for OpenGL AC_MSG_CHECKING(for OpenGL support) have_opengl=no AC_TRY_COMPILE([ #include "SDL_opengl.h" ],[ ],[ have_opengl=yes ]) AC_MSG_RESULT($have_opengl) dnl Check for OpenGL ES AC_MSG_CHECKING(for OpenGL ES support) have_opengles=no AC_TRY_COMPILE([ #if defined (__IPHONEOS__) #include #else #include #endif /* __QNXNTO__ */ ],[ ],[ have_opengles=yes ]) AC_MSG_RESULT($have_opengles) dnl Check for OpenGL ES2 AC_MSG_CHECKING(for OpenGL ES2 support) have_opengles2=no AC_TRY_COMPILE([ #if defined (__IPHONEOS__) #include #include #else #include #include #endif ],[ ],[ have_opengles2=yes ]) AC_MSG_RESULT($have_opengles2) GLLIB="" GLESLIB="" GLES2LIB="" if test x$have_opengles = xyes; then CFLAGS="$CFLAGS -DHAVE_OPENGLES" GLESLIB="$XPATH -lGLESv1_CM" fi if test x$have_opengles2 = xyes; then CFLAGS="$CFLAGS -DHAVE_OPENGLES2" #GLES2LIB="$XPATH -lGLESv2" fi if test x$have_opengl = xyes; then CFLAGS="$CFLAGS -DHAVE_OPENGL" GLLIB="$XPATH $SYS_GL_LIBS" fi AC_SUBST(GLLIB) AC_SUBST(GLESLIB) AC_SUBST(GLES2LIB) AC_SUBST(XLIB) dnl Check for the SDL2_gfx lib have_sdlgfx=no AC_CHECK_LIB(SDL2_gfx, pixelColor , have_sdlgfx=yes) if test x$have_sdlgfx = xyes; then LIBS="$LIBS -lSDL2_gfx" else AC_MSG_ERROR([ *** Unable to find SDL2_gfx library ]) fi dnl Finally create all the generated files AC_OUTPUT([Makefile]) SDL2_gfx-1.0.4/test/install-sh100777 0 0 33256 12021530027 11204 0#!/bin/sh # install - install a program, script, or datafile scriptversion=2011-01-19.21; # 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. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # 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_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= 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 the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -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 " 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 *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 # Protect names problematic for `test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done 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 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=$? 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; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/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-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob 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=$dstdir/_inst.$$_ rmtmp=$dstdir/_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 && $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` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # 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 -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$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 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: SDL2_gfx-1.0.4/test/Makefile.in100777 0 0 1617 12360531107 11232 0# Makefile to build the SDL2_gfx tests srcdir = @srcdir@ CC = @CC@ EXE = @EXE@ CFLAGS = @CFLAGS@ -g LIBS = @LIBS@ TARGETS = \ testgfx$(EXE) \ testrotozoom$(EXE) \ testimagefilter$(EXE) \ testframerate$(EXE) \ all: Makefile $(TARGETS) Makefile: $(srcdir)/Makefile.in $(SHELL) config.status $@ testgfx$(EXE): $(srcdir)/testgfx.c $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@ testrotozoom$(EXE): $(srcdir)/testrotozoom.c $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@ testimagefilter$(EXE): $(srcdir)/testimagefilter.c $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@ testframerate$(EXE): $(srcdir)/testframerate.c $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@ clean: rm -f $(TARGETS) rm -f *~ rm -f *.user rm -f *.stackdump distclean: clean rm -f Makefile rm -f config.status config.cache config.log rm -rf $(srcdir)/autom4te* rm -rf TestGfx TestRotozoom TestImageFilter TestFramerate Win32 SDL2_gfx-1.0.4/test/README100777 0 0 37 12021530027 7772 0SDL2_gfx Test Programs README SDL2_gfx-1.0.4/test/sample16x16.bmp100777 0 0 1466 12217637577 11701 0BM66(  4SrvW9 4SrvW9 4SrvW9 4SrvW9 6UtpS6    /////;/Y/~w/d/J/0// / / / /OOOO"O?O\OozOXOAO*OOOOOOooo o'oDos`o_}oLo8o$oooooo,rHadP@/ӏ xk1]LOgA4&ԯ ~sh]S6HQ=k2'YRJB":<3U+o# 51,'("AZr  . F^v4Kbz #9Pg}SDL2_gfx-1.0.4/test/sample24-box.bmp100777 0 0 3000066 12217637577 12205 0BM6 6(   4444685778:=@BBBDFF H!G G H!H" F F EDDDCB@@@?>>=<>=<::::::::::;<<>?@>??> B M! P" P" N"N!N"O#O#P#R%!V)%X+'Y,(^0,b40d62f80h91g80f5-h4-k5.l5.n3-o0*n.*n.*p0*p0*q1,r2-s4.r40q40p3/p2.p2.p2.p2.p2.o2.n2.n0,m0,n2.n2.n2.n2.p2.o2.o2.o2.l0,l0,l0,l0,j1,i1,j2,k3.j2.k3.l4/m40q40p2.n2.o3/l2.n4/l4/k2.p3/r3/r40r40r40r40r40s40v62v62w73x84w73w73w73w73}:4~:4~:4|:4|;6|<6{<7{=7z<8|>:|>:|@<|@:u=8v=8v<8r:6o83k60j60h4.f4.f2,e1+`.(_-'`0*_/)^0)]/(^+(]*']*'\)&Y&#X&"X$"V%!S'$R'$P&$O&#N($N($L'#K'#F& E%F$F$G#H"F F EEEEDDDDDDDF EF F G!J$ J$ L&"M'#L&"N($P*&P*&R,*V,*X.,Z.-^20_10a32d64b41d73h84h84j:6k;7m:7l96h84g73f62d51a2.[.*W*&U)%R$ O"N L!L"H FB?><:9654466655555555555555555566::;<55556868:;>@BDDBCDF G!EF F G!CBA@AAAA<>><<<;:<;98::::::::;<<=>@@@D!C"D"F" N R" R" P P R$T&U(!V*&W-(\0,_2.f73g84g84f73d3-f4.h5/i5/k4/l4.j0,h-(n0,m.*m.*n0,l.*m.*n0,p1-l2-k1,j0,j0+j0+j0+j0+j0+m3.l2.l2,k1,l2-l2-l2-l2-m3.m3.m3.m3.n4/n4/n4/n4/l50k4/l50n72m61n72n82o83s:5r94r:4s;6s;6t<7s<7r;6v=8x=8w<8w<8v<7v<7v<7w<7y:6z;7{<8|<8z;7z;7z;7z;7~<6<6<6<6<8=8>9?:~=8>9>9?:@:A;BD?E@D>|D>zD<:87466655555555555555554566678866666788=>>ABBDEEEEEF DCBBBA@BA@@<;::98879876888878:;<=?@ACEEG G!G!H!O P Q!T$"W($Z,%\.'\.(\1,^4/d73h95f84f62f40e2/h41j52j52k41i2/i2/h0.i/-l20k0.j/-h.,j0.j0.j0.j0.k2.j3.k3.k4.j2-j3.k3.l4/l4/l4/l4/l4/n61n61n61n61p83p83q:4r:5t<7t<7t<7t<7r<7q=7r>8r>8t@:t@:uA;vBzD>zC>|D?~FAHB~FAGBHBHCHDHDJDJDJFJFIEIEHDHDHDHDF@F@E@D@C>AB=B=C>B>D@FAFAFAHBIDJEKEJDIBHB~F?zC8q;4m82j5/g2-h3-f2,e0+d0*c.)b.+^,)[*&Z*&Y+'W*%T(#Q&!P(#N("N'"N'"L&!L&!K% J$ J$H"F DDDDDDCBBBBBBCBBACBBCD!E"H" H" N'%P'%Q(&R)&T*&V,(Y/*]0,^0,`0,b2.c3/d40e51f62f62d40c3/b0-a.+^*(\)&X($W'#W($T&"P$ N"H!F ECA><:544454435555555555555555333355668:<=?@@ABDDEDB B B BAAB@??>>=<<::98876666667788::<=>@ACH" H" H I M" L! N LN P"!S&#W*'Z,(\0*_3,`4-a84d:5f84d51b2.e2/h20i30i41j52j52i41i41i52j63k63h40h30h30h40j42i41i41h40l71l71k61k60m82l82k61k60l72l72l72l72k60k60k60k60j60j5/i4.h3.h3-h3-h3-h2-i2-j2.j4.k4/k4/l40l50m61k60k71n62n62o72q83s94t:5v<8w=8x>9y?:}C>~D?E@F@FAHCJEKFOJPLSNTOTNUNVPVPRLRLPJNHJCJDKDLEHBHAG@E?C=D>F@HAHBHBHBHBKDMFNGPHRKRJQIQHPIKD}E>zB;t<6s:4p81n60l40j1/g0.g0.b.*a,)\*&Z(%X($V($T'#R&"R(#Q(#R)$R)$L&!J$ H"G!EDDDBBBBBBBB@@?>@>>@>=@ADF G H!J"L$P& Q'"U($X*&Z+'[,(].*^.*_/+`0,b/,a.+c.+b-*b,*`,(^*'\*&[*'Y)%V'#T&"P%#N$"K#!I" ECA>87656544555555555555555533336688;=>>A@@ACDFFBBBBA@@A>=<<::9887664566666688::=>@@BC D"F" L#"M"!N! N OR V##W%$R$$R&$U*'X.*[1,_5.b82d:3b:4c94b51b2.a/,e0-h1.j2/g31g42f42e31c20d20d31d42f64f64f64g64g64f64e42d41j72j60i5/h4.f2,f2,e1+d0*b.(b.(b.(b.(b.(b.(b.(b.(c/)c/)b.(a-'d0*d0*d0*d0*g/*h0+h0,i1,j2,j2.k3.k4.l40k4/l4/l4.m3.o2.p2.q2.r40r62t73v95x;7z<8{>:|@>><<=::=>@ACDFH I!L"N N!R#S$ V&"V'#X($Z($^)&_*'a*'b+(d-*d-*b,*`,)]*'Z*&Y)%X($T(%R'$P&"M%"J$ H"F"D <:8766545555555555555554211189;<>>=<?@BCBDFFBAAAC @?>:8777655766434456789:;<>?ACDE F"H#!J$"M!O! R! T"!W##X$$Y&%Y'&T*(T*(U,)W.,Z2.^70c;5e=5b94_50`40f74g52i52l42k52h64h86i86g64h86f85d74b64b52a41`2/_0.`1.^0-\.+\,*_.)^,&\+%Z*$[*$\+%\,&],&^.(^.(^.(_-(_-(_-(_-'_-'_.(`/)a0*a0*b0*b0*b0*d0*h/*j0+k1,k1,n4/n50o60o61p85q84p73q62p2.q2.r2.r2.q4/r61u84x:6z<8|>9~A|F@}GBHCJDNHOJPLRLVMXP\T^V`Yd\d\`ZXRRLOHPIRJWPZSXRRLLGIDJFKFLHMINJQLPKOIMHPJQKRMTNVQZV]X]X^Z^Z^Y^YVRPLJFHC@<}?:{<8w;6q85n63k40h2/d0,`.+\,(Y*&R*$P)$P($P($O'%N&$L$#J""G" E BBBBBB@@><;:;;778:<>?BCDEGFHK M!Q#R$ T$ V%!Y%"\&#`(%a)'b,)b,)b,)`,)`-*`,*]-)\-)Z-*X,)V*(S)&N&"L&"J$ H#@! >;9866555555555555555542222;<>@A @ @?@@@@?ACD A@>=>=;:98765556;:::8866468;<<=@CGI!H H J MN L"R# X$$\$(\)*X.,N.(L2*Q.(T,(N$#R*,R01W64b86i74g:4f:6d88b68d8:d87f84e82`72a50d2.g0.e.+^-)Y-(V.)Y,&Z,&[+'\*'[)'Z'%\&%^)(Y,'X+'X,(Z.*W+'X,'X,(Z,)\,,\-.\.,_.-a1.b0.c1.c2.b40a40_50_50_2.`0,`/,b/,h-(j.*i0,i2-l40l50n72p74t44t34q22p20q40s71u92t:1p>3r@5uC8xE:|H=J@MCNDQJQJTMWPXRYRYSZTZOXOWOVNRKPKNJLHMKLJMJPJRJPDN@OALCLEMFLELFOIQJRKULUMRKNGNGQITLVNVQUQXT\Wa\c\d\d\h`jaf]_VYPPHI@G?D<|@8~?:~=8}<8t62n4/h1,`/-\+)\+)[*(W(&V(&U)&S*'F'!E'"F% F"FEDDHE@;6644(*.489::::<=?@BCGJ K L P" S$"V&$X(&Z)&\*'^,)^-*]-)^.*`0,a1-`/+^/+\.*Y-)V,(S+&P(#L&"K#!H!FB@=9766655332555555554444>?@A A @ @?BBBBBBBA>><;:9877555322366665445::<?AABDH H!H!I K" M! N NO'$U(&Z)(\*,X+*T-(V0&U/$M( L'"DG&%F()N..\21d31c4.d41b22`/3^.0]..^.+].)Z,)[*(\)'\(&Z$#V$"V%#U($W($W($X($X($[+)Z*(Z)'Z*(Y*(X)'Y*(Z+)Z*(Z+)[,*\,*Z,-[,.\.-]/.\/,^0-`1-a2.c2.d2.e2/f30e0-e.,e.+g.,l4.k3.j3.j3.i5/h4.f3-f2,q41t54v86x:7z<8}@<~D>F?G?H@LCMDNEOGOFNFMFKDJDKDHBGAF@E@HBFBE@C@CADBDBDBDEDBFCHDHBHAI@JAIAJBJDLENGNHNHMFNFOHOHNHRLTNVOXQVQWRXT\V]WaZf^iah`f^iaofqikb`XZRWNNHJEHDE@B?B>z<8s86n32m21i/.d**a*)^*(\*(R*%R*%P($P%"N$"L""I F:9852)" *.26999:8:<<>@@BBBDFH J"N$"R&#V'#X($X*&Z+'\,(].*^/+`0,`0,_0,^/+\.*Y/*V.(T,&P*%O&$N$"H" F D @=;::875433555555555555@@@@ A @ @?BBBBBA?>;:886666644400/.01122456<>?>ACDEF FFI KL O#"P%$P)(T**V,-U..Q.*U.%i4(k+R)J( <:>""H('S,*Z-*\-)],*\+*[)+W$'V%%U%"U%"X%$V%$T%$P%$P%$S$#V$$Y&&X($X)%W*&X+'U*&U*&T)$P'"V'&T&$T%$U&%T%$U&%V'&V'&V')W(*W+*X-,Z0.Z1.[2.\2-`-*d-*f.,h.,j0.j/-j/-k1/f0+f2,g3-h4.h60h82k;5m=7t=6x?:|B>~F@HCGEFCCAB>A>@<@<~@<~@<|>:y<8z?9x=7y<6{=7~@:~>9~>8~<8:9<;=>>@?A@AA@@@>A>C@CBECGEGDHBHBJDLGNIPKRMRMNJOKSNVPUPVQVRXSZT]U_X`XbZd\g^h`gca^a\farlxssnd``Z^XZUQLOKMHLHGBBA~<;{:8v65p20n0.l.,h,*b,)_-)]+(X(&T'&R%$N"$J!"<DHL H 5 '0336:::;7668:<>>99<<@BF!H" N# Q$"R&"T'$V)&W*(X,)Z-*\.*].*\.*\/+Z0,X0+V.*V.(S*(R(&L&$K$"H" F!CA>=;96555555555555555@???A @ @?>>>><<;;9865666666520.,++,-/1378:::9:<> @@ADK M! N"!M$"M&$K'(P(*R*,L.,J1)]6+{oujVKB404@F# F#J$!M$!N#"N! P#"N#!L# J"P"#L"$F$$C$$C$$E""J "O !N!N" O$"O&#L& M&"J&G"L$#J""I!"I!"L$$L$$L$%M%&S'(U)*X,+X.,W0,T.*R.(R,'V($[)&^*'b+(d,)c,)c,*d.,f5/l:4r@:xD>vC=qB;l@8i>6m<1o<2p<5r<6r:8r98n55l12l..m//n21n42p65p65m54j42g4/i5/n61s94s84u95t:5t;6|<={<>z=>x?>xA@zA@{B@}B@z><|@?}CBEEEE|DDtC?rB>vD@{IELHMILHJGHGHGKH~PLPMPNONONTNYRZTZTXQZT^V_Ya_bbfdhekhpmkha_XT[Wa^b^[WTPRLOIIGBA~?>w:8t97r64o31n0.f-(c.(],(W+&Q*&N(&M(&M'&R&d'&f\كrkXp1"; .10..24662/../26822458;>A H!J"L# M$!N&"P'$Q(%S)&V,'W,(X.)X.*Z0+W/*W/*V.)V-+T+)R)'P'%M%#J#!H!FB@>;8666555555555555@@?>A @@?==<;;:865555456655520/+)---/2047673-,/99:>AKN L G H$"E$#O'(Q((E&#=(N*zmrfƁtL1*2;>;; < ? E"D!@ ;; <=;" 6 0/;>DGI I"I#K&J&H%@!=<<? B#"D%$D$$O'(P&'R*(V.,T-)W0,S,'N'"K'!N'"V*&[,(c2.b3/^3.f;7j<6o>8s?9s=8l82d4.\0)T+#X, \/$`0(b0*f2.f/.e,,b*+]**^,+`.-b21d32f66b22]/-W1+Z2-`2.c2.h74g62e83c62f34f57c65]42Z40^60b70d70Y0+V-(X.*\2/\10^0/`12\//U.)V/*T-(\3.`82a61d62`1-b/._/.^21^64`97`54e54l:8l=6n@8o@8n@8n>6q?8wD<~IC~GG}GGvDCxJHzML~QPPO}MKMKRPYV^[\XVPRJRJLHFBv?:n:5n;5q<6r:6r83l3.f1,[.'N*$H("F($J+&J'&V#(x:8ӆz|hnX}ll7-A/)%'*,.0('$$&*/0,++/147:BDEEH" I#!K%#L&#P($R*$R*%R*&U-(U-(V,(V,(U,*W+*V*)U)(S'&Q&%P#"N! H FC@><97666666665555A A @?@>>>887665436666788876653/300 2 3/1204;4/,(23;>!;EDLJG"=?#H NF"6 ?f\kbzc&:.6@>55 7?!@@:2.3302042.>BFH!M$P'N%N%D#><>>C"F&"G&#J#$I!"L#!P&%U*'S&$V*&W*&J+$G& X1,^1-`0,[/+T-(O*$\/(d2,h0*i/*i0+\(#O"O&O'T*"Y-&\.(a2,a.+^)%V# N&"S+(T+(]30`42\/,^/,Z.,H*#E%P)$Y.)Z,(X/*Q+&N*%U*)R)*I&#F("H,"L,!R+R(C#@!>E"L'"T+'N$ O" G"DH"N'"N&!R("T*%P&!H!K$"O%$P$#P$#P&%N&$K$!U% Z+$[.'T("X+$X*#]+%b.(_.,^/,[.+[0,b63b42g64i64g53p:8DBKHPLWPTMPGMGC=p:4i91j;3q>7v?8x=7r60j4-\/(P+#G& H)"L)%N)&I&$N& j\aNV" `MŒM0$ !!).64,%  )00($&(-/46=>?@B D"E" H$!J&!L&!M'"M'"R*%R*%T*&U+&W+*W+*V*)X*)W)(V'&V%$T$#N"$J "H EA?<:655466665555@ @?><<<:87664444678:99::44564:7 :< <7 ;732- < A63/ 5DF9;?FJF?:4GYH29 JBsnzq?4@ 5;G>-26=FA;3,+2;> @9 1 .:@EK"U($T%Z* Z(M!HEFJO$!Q&#M" H""G!!K#!R&%Z*(b.,b,*\(%J& I$Z+'Z&"\'$T#JK#U& _*$l0,k,(f'#]& U%J!J%O($U-(Y/(\.(\,%Y( V$K%M(#S+&]0,^.*b/+_(%U >D!JT#!Y&$S# L"I$ R%$L" I&!@">H#S$T!A<ADP#PTLBGGJ N#N O"K 6:FRSF98NU OP$N"P"S!T T'#M"J"J!P$ Z*&]&$`(&V'&\,*o64@~94n2,h1*l70v>7D>FA@F7. /% ,13 8 '(&'-.36:;<<<=>@ C"D"G#I#N&!O'"R(#S)$T('U)(W)(Z*(X((Y''Y&&X%%R$&O#$L!"I DC@>865444445555>>=<;::84322444478:;89:93224=Hi93ZUkeib^Wb2,@4&@ XRe^m81@ : _0)_XUOL)$:8XVYWo<8;14|F6 j&zi_i_^SngWUh.-@208X$[T]V`,(7 30 ]/)ZVa_JHW : 4<?F! N$!rB=ZSWMVKNIOJLH}FBr96f+'a$ c($T,*M((L%$T$#OLolTPb%!HJXTebJFZ!P KR$_,&l.(GAd_lfUN\0*J&"P*'V0*_2+NFkbla~MCT) N&Y/&^,%MHokWRh,'BZ1-TPOLSPTQZ,)L c-+[($@D$fB4n<.A3PBxOL^86AN`%TJi^ZQn:1EDFT#VLf^{F?: 3 b.)c`ZV_/(4 4j0,kfYT`-(EEl40hcYPU-#@M!VMmeF?\IN])&p4.JCkblai^a[]XXRVO[Ve`\WFAOIphibz?9]("\#URkgRI\,$H% F&!V,%JA|qxg6,/ 02@X! NJb\XU`1-7 4 0 V-)^ZRNA" ! #& +,.3778989;<>@BD I#K$ O&"P'#Q%$R&%U'&X(&X&&Y&%Z&$Z%$U$&P#$N "J HFDB;:8644445555;::9875434464566::::;:::<2-9 ]'o`ߌ~pbv@4gC4yl\U4#~A:~riZ鐀_R? \(܉y}hZP4&h^vntB !>j_xl_AOևxVA}tIF_F@}qx\OG! <ZQsdxlx@66i4)~utk~ukhzKG=F@"D% Z(&LHfZꎀscyl^aVshԒن|uhJ;n,&N(&A [}eWs~p`& Nhcyp~i.E G $B"N/"SBqudӁpth}wWKX-#T*`Pzh|jrvp~rn>/W5"j:*y`_|uÍf,&`4*bRԌ|qXK\2)\($؅}slU#/'jZJɃv}orj`^83>_"zlpbԀxmjyrmkB 3ZHuch^∄yhJcZpe}kČvZ:+@pepa|kԇzp60Xyok\pwkB26(riTݏ~\TGHS$ \-'wB9k^vzkzjՃqfVdXzt燂܃xE4}qgZ~p܌UNr6-ynXrqb^/+V*)V5)TCyjhZof8(=_vrrh̃rrgvf[:+J#ߎ~~iXI& , & '06788::::::<>BDH! I"!K!O$!P%"R%"T$!U& V&!X'!V"!T!!R P N LHEB@<;66432464:888654334686788::::::9:;30<~F8؏l`d P>'I$~rtiZJ.s82{qugM>dVnD=H~nn\uk@ $ H=ti|^*-<j`bTyNA~ZR@ pboWK %\ }npb[W. 8 `ThYv~,!xlV,#tkbXzlo-3 H$"lkKDI<#>#W&%^$!i.$|naS{8*X&N#m4-rjrgykSLX"C"R|fZ}l?.kbX(!JDwlpJ5L(@"F$"P(yjfX~l>,L!Z1(vkTJ^2&փtXI~kp6'Rr90yU4$i:+wb_yrh2 xtP* L"sctf]#N"i0.x{sJB83 LBwlwjKB==G=vjmaWPLA TNnoStf[Kyb,#d;-pbXRkdxr-|nJh\qar3$wll6.ށv]PxgY(m_B8wkzhVDXNzVR7H M% X+#j+ l^fZtc\KQ%H"_XT␅N>{cRs|4&kdLF|gSkU\Lb`R('X8-bRuij^~veC67!G G@rnof[H:BSGla0C~pp\zk0" , % &23445666689:<<>@BGL M"O"P"R$S%T% V""V""T""S""P"!O! KIDCA>;85445656664544456887899:::::988:79Cj5.֛h3+LQ !,@&wcfUЄu> RwldpaK#uJF=dXk`{d0$/ b)tviXL:2 rjh^zE jJD>SGu^~t|40'6SDxm~|h,+6v;,xlwlE9T.$l>8tkbW|lV * 9Y&$^YD5 9 S$'c,,m4-mbe[{B7S'@"M"u.'piWNg^SLAL f^i`|l+~RHP( z70xrbhTK&>! ? ](#{s_U|ng)K(N"_*!f_f4,zYPtU&Z%!X&"}OH\Ra4(ulb^|r4#p>9bC:G&cV̀uj0&].(EB~qPH{v`&Ex0(yjbd[@3\Tkbwn:2C, >WSr,&k`dVtZ0B |J@a]URzqB2d2*\-.H>tdrB4b;.hE9ـvZP|jG D%piTM]RseHgNH6=F$"P*$g.%NDzph^j\N$<"N#h'$vobVzfRyx6%p2+xvXQZNsc2$YXX22Y8-k]rhwOEtS&P&]RlgleA/<= AZQP.*Ci^hXzI  '" %2000122224678;=>>AFGIJ M N"P"S"!S""S#"S#"R$"P""L K H FCB?<9865455443666698866788::::9887:>DJX'%J%"<4/a&nWF~pW#?tme_ۄwC"<0pD;tpogYO: H xin`~sQ/ LFtj~e,$+ , f5,ڂme]f`.*\)ހvebjb2K!{lao`5 D|qQEdWxibYd75PNC6!<#"X(.j46l94ZRwppj]TL 3@ _!GDwrPD|`0(BH?oh}tK>H A!b&weV؃oT(A$ :"Y& xsTOdZpbU~?:k#d&"b)%}zYTt]1"Y&"V(&^.+`4-h:.`VslvkUDW(#D,$E+ NDّz@6r>6^YqeD;ojc\R"m0'~y`^~vJ6!SJmfVPwnbzL?`'SP!]Ola|qH;B HieUTjdXLD 8^+zgZaS< 2zr\Vz[+0CRHsgzo70"!$  -,--.///024468::<>ABDFIJ K N O! P"!P""Q#"P"!L K J!"H !FDB?;9:6671234668887666688::88679::AHLO#$`::?A"0W#`ZVLJ>~rG@XPidz_6'@0J' |zXP}u\* = \Mi[yn@93`$usfUL2 , O!tRKxP+&2yndZvH$6|sh[׊wBHbZj`uhB5cZˍwsH=S&F*$G('`,1e.0`/+B:zd]rkP!8 9Rv'$rlZKrj\W@q1'~wldh\P%B$X$leeXup8(J$= T%g`f`wnG:k`݉}vFCn*'plb[uxE6c0)\.+h-+j1,i6*@4yvjn]`,'D-$C, t<2ՐVKz?4nfi\ujIB֌vD=p:0ztd`|p8.>(u?7xle^SVJ҆~݇}aQ]2v>/xe`jaS"J&=7xu^VzmC3B|neXrD0TLhb|oJ>6 >!vnZR|~3*.)49A" J b"܂}_V~U -*8I"W*"TEzkrebU\3'R5*ned\zm^RR-)\3/d6)~pg^xo=2VM~>.H5}td^`RPKzΈz\Ua%">k8*snbe[* (&  ,,-.0/00122446688<=?@ADFGHJL M! L M! Q#"R$#L"#L"#J""G DB?>;:872468666766556688<:8689;<<EM L #H"#BN X |E?snWU1.mgNEB;r6*vviXIH*>qpXMXPWPD ~7'sUId[AL}ko_{q?0BxnPIYNbR0 BbWdTpn=->f^hWxc. E31zt{oSC\.!VO{u~rTKR*"V*'d(*h,/_.*{7.~u^Vx_$>8N d$ YPo[^TvvK Mwli_܃ud*D%P$\UnasabPh,"e-$^+L@xnzoXK|/!WL~rzvRMZRth}ldSu>2p=4>891x;-:+xh[ql.(P1'L0"l3(φ|cVA2}pbVzv/$`X|t}@6l`oe{pPEM/'f7.|rh]vF9PItvcub~5+kigbx@1]2&l.%{t`Uއx[)"89aTnayg2$;f+"{rl[vjJ"6!I>GWjcbUu~>41 %+9G"b+"wng]|pc0$C(E8{nh[shX+$Z*!n4$qdX~tj4+{4,o`z<'tlc~r/)>1ԂrqhuoD(T.t`Q΄vP(> ? . *-/01222330224466678:;>@BCDEHI KL P"!P""M!"L"#L""H !F EC@>><;5678666555666688:998:;=>@ H L!"J"$A M$ `!XStjLDNJtrSPR@4X(qiY|nL-=]ZhZf]WRvJ>e"{mznNBfcLiSjXzW*8Gd\cYuf]L|KIQ XPm[ydVJF"LFxdiK>FLe`{oɄth4&6-}pq^|ob,!b*%p)*n,,d2*u4)ukbX{}6.LDJ],$~B6jSMz[%#D"cSn`x>3V1&T/&B9tXF|jRHjb|m~E2~mrdvP>O=tlhـ{L>݃qvexVFTD|pwfVUB}nl`|SLrH=lG9H}d{mMHP&`+ugZzmHBFD>F R RHp`m_[P= - *2<JD<|p}qYOb"i(׃mfYՄxg0&^$>*odWujq6,u2)|s|L5ZH}q{PH@.cNxl|hF8X.|leSvddV?5wjTE::66666655002244443477:;?@@ADFJJN O! L !N""L"#K!"I!"H !EDA@>>866566446678668989:<=>@@B$H!J !E "B$!O"PHrk4,TLuns:4FE>6$mB0zii[~rX(( W,(]Ysdx;4aVn_ykrfZNg;8zlu`iVun:.>d2,i`nbm}C3]]lqpjaP~jD;X.-u>6noXj^E" +#^*#qh݉}h\7,zgzaoal,#n-(x,,t/.j5.q2&_Tn`znMDW!J K#Q(j;,pPL{t33gF9fUvd}jaXe:0iD;^Tusap`{nkzmr^H4zjyt`M7{irlvpmH6R=|jtp]XEt|nweWCn^nbxnf^RFyM?F9k\ڐ}bLta]ypgF9zJBje䊂udxhZ~tn>7^;1t>0n\w|pjbtf{fߊunejj{tttrfaTaSzjvfi_d*(`70NBunamda'!K#P*`Dp冁LDr2"vdl]zb3(KP!L G!FM~;0mdTthE/ , 27FIP@΁txMFo&nTj\~z<1SFr]}hqcl_r2*x8/x|qt`C/dV|́uT>eMr{uF9VEtfubzhn`|l`ȁsW$O@=<<888710021344445868;=<?ACEHLN K L""M"#L"#K#$J"#H !F CB@?777788654467:::::<?ADDIK" B%L" T#N$G `)"qf[PTNg^Q&6@Y!P!J+_SqgzsՋf;10tFHflwp͆}bXMRFuψ~=4Dk80nh́{rl^' NRKne~rʇz_Sd$VNрw؀vm_v0)[($a0(؄waVy[*%B(#N($d-(\V΂z݊~se~?8h-'o3/o1-p1-r40p0,NH~rneicg'$L&"M.)V.*{>9r]T~{44^Zynm؋vsjh2({FPDsiш~䎄ڊ~ÀpXFvdvbYLE{хxrhH=WMYLzliad\v70xB@ACDFG I" J#!L#!M"!L! J D D B@777788664467:;;:>@BEGJ!N"!K" A"K!T$P!&I$"V"wl_T{r*;"-?vnhC62!1 N\ ZC, .=NOP"DDJTM>IV`%!QGGS!\&W Z&f0'f/&k.&t0)x1*p,!l*$h40g6-sfj_~z=4E(!G& W,&f0*q2*}90>4y2(n3.q94q72t:5z<8x84z<8A<|dXzt0)\0*X1+g60AH@JBJCF?KBJ@QGTJOFUNXO^R\M\K\LYKvlbvL@ODPF[R싀od`StjYP;4}C=LFh_q`Wxlfc^hbvkxКݜݘ҈zӃvׁuynwmvlxmzkۀmtf]lb_UTHTDN=ZJB8~B/?.C3;.8/z6/c4,^1,X+(Z,+V'&T&$Q%S!r`^Vza1#"4A4<@H IR!Y&a)Y T SV"\(Z%a-$\(c/'`0*c1+f.)u95u94u:6zB=v@:EF>{?6F>z5.92w4,l0(^,"V* U$#P"!H A;:;:64444555555555559:;<>>@ADEH!H" M$"L$"N"!L" I" I" G!E7777886656698;;>>@BEK" L#!N""L! E!L!R $M#%G%"P$RG}qxr/"J$E"W Ć~WJ4 / @ YPvbX9 40=:;9:;?D:!AMJB>D J!V)#U'!Y.'Z.(^.)\($e-)j/+j2(n50h74l:2dUsd~rMBM.#M/&T0(]1*l:3p:3t;4s:4t=:t>:zB@|CA|B@DBHFB>|lhY|y2&h3(^,#m.'f`thvB>o86k75z93UIu}tF;_1$\3(`1*m61l30r;7s92u=4o:2s@7rB8o>5r@6zE<~@8~B:|F<OExJ@}KBPGUMYPZP^R[NYKREg\߄xdXSGWKXMwaV:/vUKH@PH]V^U{saB@BFJJN"DG$F"BE"H&L)"J& N,&R.(T-(Z/*`40`40^40c:5n=6vCxCzF>vC9wB9x@7q8/p8/d3*Y0%W1'X(%V%#O"H DBA@:86655555555555589::;<>>@CEG I" K" L" N"!L$"L$"K" I 777788665689:<>>BCF H!N$"K" L L! I#L" N!"H!"D%!H!i-#lbzh^n,"p*"`Z߇f^A 6 O ㅀb_䆂b ?4691148>>5>HIG"D$H$ N&"R&$Z.,V*(W*(X*(Y)(`.-f31d:0k:6l=;qA8N>qn^n`X0$R0%[6,_4.e84l<9n>vC@t@>r=:p:7p96m53D@~mtcكsl]PAXLul܆}sIAn50X-+_1/l.*lenfvn`W`."U0&[0+b/-j02i/0d1+f3-i92h92j93l<6p@9r@:C>E@HB~ICPISNPLOJQJPHNFMDOFTISHUJjabXXM\PdXzmccZ~odtitl{r~syvbTvj䒆ϏĊˆʐ̖ҚΒӎԈވ艄tvfxezfs|mqd{{m~o钁}kl[؈|zophg_e\bY]URJJCD>@@x;@?@;>>>;:99< 9>"A$"B% D'"H)$L+&O+'Q-)T0,W2.a62b41d63j:7m=:m=:rB?o>;tD>n;5r>8q:5l82f6/\2+W0(^-*\)'V%#R# N"K HE@<::875555555555777778:;?@DEFG J!J" N""N""M! J777788888:99=?BDDG!I#!J#!J!J!L L K L! L"#H$#E%!L'!V&h*"LFypĄ{˅}toVQc#E3Fb_元wtZ5 .464348<;5<FJDE$!N'%T&%U&(T%'T$&T#%Z(*\+-`.0`22W8/d;8d88[Tăsy}ńtg7.a6.d92f95f:8f89f68e47`52^40^1.]/-_0-b1/j86njserbparbvfpd^VB;vB>xDAEDFDFDFDFDGECBDBJEKFLINITO]V^Tf\keiakanbτx݄{y{tzrf^j`j`g^g\bVyjrރûvǃzmigfhfnlnjnjnkolnlnlnlnjofshvfrvt~tjzpۂu݊zᗈޠܤԙƇvpmhiea\\VSLJFCCBB~@By@@r> ; 5' (1 P"< 0  -122444318BDAA! F!!M !J !K "N!#R"$U&'U()V*,S-,H3+U20V/1X:4rG8J:XL`Vc4.\/*V-)R*(O''P&(R&(R%*K'$K($L*%O*&N*&P)&O(%P&"V%Y#X!R L"HRXJGB>@R"!Qf# r%"YS$K$R$"\$(`(+`+.[0._2/e53i75m98k97i86i86l65n87r;:u=p?=m@;b6.d2'f,"b$X!QMB8::9620.-///10000344468<@@@D H!L#"P$#S&%V&&W'%Y'%Y(&Z(&Y'%X&$X'%W'%X*&Z+'\*'^(&Z&#X&"S$ N!LHE@=:7644445555444464469:<>BCFG H I J!J!77778888::<?BDHI !I#!J$"J$"K$"L$"L$"N""N""P"$L#$G$"H$ J!J J"D>:/,% %         #&(()(&'&.65106>9<@DF!D"@# <% 5'E$#I&*:($A)V'S"D%"F!A>:;<@A=!< :;994427=;44:@45:<<A<?H><C$ L#!R$#R'&N*(J-*L-)P,)T*)S('T+)V/-X20_86c97g;:j<;l>=n=rFAmF@tHCxDAFD~GFxHEzKH|LJ~NLPNPNQOSPSQRSVUXT[RcXeZf^gbcchihhjgpjmflasf}n}zvkjjj\ZQLSJNHIG{DBp::j87a41_4.`80_5.T0*H)"E!D?986532.-**(&&&&&&&(&%$%).0*+/258<>ABCDCFHI O& U)"\,&`,&`,&\+%X*#S&!R""P "LFB>:8444455554444644677:<>ACDDEF G!67778888;:>ADFI !J"#K%#L&$L&$K$"N%#N%#O$#P$#O"$J"#E# F"JJA@JD6+ * $ " $+ &   $ &    "    ! ',($")2.058841-. :8))98*21.+./12,*** ,+ -,&*0.(*-4(*188902424!: D F B"=$7$<&!D'$I)&P.,P.+L.+L.*L.+L,*L+(M)&J%"L'$J&#M'%N#$N'(L)(F(%F)$L+'R-(Q*'O+0M+.M-*L.'J+$I)$G'$H%&M#%I""J&"L%!P$ M#D$=%G F""?"B#I$ I"B";#<'">'"B($D($I(%N)&Q*(T++P+0S,0Z22X62R80Q:1X:5_;9_?@cBDeCFjHImHHxRP|VR{YRl\NlZPrXRyUSSSOMvF@wF=zD>u?@BD H# I$"N'%N&$M&$L%#L&$L%#L$"L$"J" H!EDA@AG^PD? @ < 0 & 110/34444 4 5 5 7 9 ;=:;<>=?BEEDFFFDDDBDDA@B@@FDA?><: 9 << < = ????@@BB@?@?;=@DHJNPRRTTVXY Z"#\&&\&']&'^'(V V V V WVTTV!"U""U""T""X"#Y"#X"#X"#X""V VTSRPOPPPPQPPQOONMPPQRRRROLLLNRTVVV W X !X!!X!!X""[$$]%&_',`(-b*/c+0h/4j05l27n47s75v86y:8{;:z:9};:=<>=:<:<:<:<~89x44s00n..i*,h-.g,.d(*`"$ZSPIEA??<::9 : : 8 4 4 2 2 0 0 0 2 3 6788 8 8 8 9 : ; = B ;8 B P G -@N$ V($_0,a0-d0.c/,b.*\*(Y(&T%"P$ L IFD:975888:76666666555579;<?@@A65668:;;<>@AC D"F$ H%"O(&N'%M&$M&$K$"J#!I" H!F D@>@@?Ct'*"&!($$$$ !"!"!" ""$"$"$"$"%#%#&$&$&$&$&$&"%"&$'$(%(&(&(&($($($($("&#&#&#&$'$'$'$'%&$&#$"$#$"#!" ""%!&!&!&"&"&"&"&$%$%$%$%$%#$"$"##$$%%&%'')')'*'*&(&((*(*+-+-,.,.*,),(*'))+)+)+(+),),),),*,*,*,+,********)*()''&')+(+&*&)&*&*&*&*&*&*&*&*&)&)&)&)$&%'&('('('('(&(&(&(%(%($($($($(%(&(&(&(%(&((*(+&*'+(,)-*.*.+/,0..//00113222322343434343543220200/22332222..**((()')'('(%&$$#$"#!$!$!$"$""" " " "##$$&%$$$$$$ % &"$$"%!#!"$!%hKJR%!W*&`0,e2/h30i2/h1.`.*\,(X)%V'#R&"P#L"H ><9::99;877777775555678:>>?@66688;<?@ABB E"F# G$!H%"M&$L%#L%#K$"I" H FD@@@@??=AwB?\^ehdfffgfffkclclclclclclclcmdmdmdmdkbjbjbiajbjbjbjbhahahbibjbjbjbjbkckckckcjbjbjbjbi`i`i`iakcjbjbjakbkbjbjbjdjdjdjdhbhbhbhbjbjbjbjbjbiai`h`jaiajajakbjbiajai`j`kakbmclclblbh`iajbkcibibibibjcjcjcjckckckckcjcjcjcjcjcibibhbidhdhdhchdhdhdhdhdhdhdhdhdhdhdhcf`hahbhbhbhbhbibiajaiaiakckckcjcjbjbibibiaiaibibiajbjbjbiaiajbjbi^j_j_k`nbncnbmbkbjbkbkbh_g^g^h`h`ibjbjcjbjbjclejbjbkclckclckbkbjajajajakbkbkbkblalakbjbjdieheiehchchchchcidjdjdiajak`iahdOPhR!V'#Z+'b0,h20k41l31l30d3/a1-^.*Z,(X($S&"O"J!CA>=<:9:7777777755556666<=>>5689:=?@DDEF H" I#!I#!J$"J$"J" I" H" G FCA@>><<:9=X :2kkxy||{}z~v~v~v~vwwwwtttttuuvvvvvvvvvwwwwwwwwvvvvvvvvwwxxxxxx~x~x~x~xxxxxyyyyxxw~vxxw~w~v~wxxxxyz~vvwxxw~w~v~v~v~v~v}u}u}u}u~v~v~v~vwwwwxxxx~w~wwxxxxxxxxx~v~v~v~v~vvwwxxxxxxxxxxxxyyx~wxxxxttt~suuuuvwvv|s}t~vwwwwwvutvxv~v~vx~v~u~vx~x~v~vxxxxuuuuvvvvuvvwxxyyxwww~vvxxvvvw{ufd11rV"X($\,(c0-g1.k20n31m31j62f40a1-_/+\.*Y*&S&"P$H!FCA@<:977777777555555559::;888:=?BDEF F G!I#!I#!I#!I#!H!I" I" FDCA?@?=<:::=V-8(6*6,6)6&6(3)2)2*3)2)2*3*4*0*0+1,1,2,2,2-4,4+3*3*2,3,3,3,3*2*2+2+2,3,3+2+2-2-2-2-2,1+1+1+2,4,5+4*4*3*4*4*4.6,4+3,4,4,5,4*3*4*4)3)3+5)3(2*4(2&1(2)3,6+5*4)4'1(2*4+5*4*4(3(2)3)3*4*3)3)2)2)2*4*3(2(2*4*4*3*3+4,5,5,5*3*3*2)2*2*1*1*2-4,4,3,3,4+2(/)0,2,2+2+2,2,2*0*0+1+1*0*0,2+2+1*1)0*1,2-3*3*4+4+5)2)3)3*4+1+1+1+1+1+1*0*1*3(2(1(2+4*4*4*4*2+2+3,3)1*2+3,4)2)3)3*4*4*4*4*4)4*4*4)3*4,5+5*3-3,2+2+1,2,2,1,1,1,2,3,4+3+4+5*6*4*4+5+5*4*4*4*4*1,1,2,2)2*6&6&\"!V($]-)b0,f2/j30l42n42j41g41f30c2/`0,\-)X*&V'#P$"L" HDB><8656766665555666688::8::<>ACEFF H H!J" J" J" J" I" H!FC@ABB<:8888874Ljtplqyruvttvy{|!"| "| "| "| "z xxx w u tsqqqponnp mjgfimprtvwsvxz| $!%"" $%)).04384826276;>BCHEJ?D8=5926261504040527385:5:494958698;:=@C@D@DAD>B?B@CAD?B>B>B?C>BA7:26-0),#&!$}!zutspmlkkffeeeeefoswzxvw q$P!P% V)%[,(`0,c0-g2/i30j52j42h41f40b2.`0,\-)Z+'V'&R%$N"!I D@<:87676666555566666688<<<>ACGI FF H H!H" H" H" H" G DBABA@>9877888849:;8600JQRORT X$"Z&$X%$W$#V""U"!T! PNLGEDB@>><<::9666688:<>BDFKLQV Z"!Z^c%$n-*j)%h'#j)%p.*v51~=9B@AB>@@BGHTV[\[]UVGIAB9:|56z45x56v66v66x98x::z<<{=<{=<|==|>=|>=z@>z?>z?>y>>~CBDCFDFEFEGFHGHGKKLLMMNNRQTRVUXVYXZX[Z\Z[V^Xb\d_c^c^b]b]b^ZW[XYVYVURSPSPUPRMNIKFIDFAC>A<=8;7:5:4~:4}:5|<6{<7t97r76o43m22k00j/.g,+e**d*)d()b'(b&'`%%^#$\!!Z V!!T TU T V""Y$$Z'&V($Y,&]/*a1-e2.j62p:6t<:x?>|BAGFJJLLONSRUTXXZZ\\\[YXVUPNJIDDy>?p78k22b*+^''X#"T NKHD@><:76544443/3;??BFHH"L$ P(#U*&X+'\,(`/,c0-i30h30h40g41f20b2.`0,^.*X((V&%P#"L" F C><;9888888555566666688<<>>BDGJ !HH J J!J!J!J!J!DAABA@?=76666667=539HOJDJ!FCBF"I$M& P("F"D!BA><:94420.-++*(% " "   ! $ ( - 368<AF N"W'"^+&`+&b*"d*#l2*t;3zB:G?G?|B;GBLHVR`\^\XUNKGD?>y86n0.f,)d+(b,(b-*b.*]0*]2,_3-_4._4.`4.`5/b60c4/e60f61g82d50f72g83h:4j<6j;6i:4j94p=8r=9v?;w@=wA>xB?zD@zDA{EB|FC~HEJFICLEOHQKUPZUb\fagbifxtytto~y}xqktmnhhac\aZ^WYRVOPHMEI@F=D;D:}B8{A8uBj@;f:7b64[1.X.+R)&L&#H"D>:40.*)&&%#" " " " " $.6:<@GPE F"J% N&"R(#V*&[-)^/+e0-g1.g2/h20e2/c1.b0,`/,],*Z*)U'%P%#I" E @==;888888555566665667<>@BDEF G L" M! M! K" H FCA@BAB>=:978899888:87=HJD?LG>9 ;$?"G"D544235666 < A D LLI F @@8.(          ), *.8CQ#!\&$_%#c&#j,(t83|?;E?I@F=F;eB?dB?gD@oCAnA?qB@tDB~LKSRVVPPQPZY_\\Yfarkwnɂzጅ䒉ٔܛʆ|Ɂwskoje`a[\VTMOHKDNGJFIEFA{E@vB! < 861,*'&#!           ! (06:@BCD G!H"N&!R("T*%W+&]-'`/)c1+e3-f2,g2,f0+d/*`/+]-*Y*'T)%M&!I% E"B!B@><8866666666666666=>ABEEF G K L J J FD@>BB?<:88888999888;::=DIE >=BGFB8,%8@KZk&!.(8+D@D>E?KC\TbY`UXOPHLFJDLIGF8!A"B% D'"A&!A("A("@&!D% E&!A$>!>#:!:!>#F"H" G" E!D"F$!C"B"D)%C)%D*&F-(D+&F.*J3.U<8b?><97530.,* ( & "      %,48==BBEF J"L$P&!S'#Z+%\,&_/)b0*d0*d0*f/*d.)a-*^,)[+'W*&Q'"L& H$G"DAB=;966666666666666>?BCF F G!H!K I HD??@?@?<:8866::999888<<>?@DFDDEB@BCG V| *)6*:,>)?(@(@,B-D,C*B,D.F0H/H0J.H/H2J2I7M9N8L:K4C%1"V :*   (08@ F*$O3.h:6n;8v@;JFVPb\^WYQSJJCG@JDNIJIKLHODL@H:>:>:>;=<>=?=?AC@BBCDEDFCEBDACCDDEDECD@BCEGHIJFHGGGGGHJLJLIKGH<>~:;t01l,,P L!H D>= <$;$B(%D($J.)T40V4/_:4pHBzQK[Rrh„|Ԏ䚓霖좛㚓ܥ赪ܓ֋xrlhb\WZT^V`XXPPEyH?r?6p82_Ydaca\\\Z[XYVZVZVZVZVZW\Z\Z][^\^\^\][][_\`\b^b^d`fbfbhdjfjfkhkhkhlililimgmgngngmgmgmfnglflflflfmgmglflfmfmfngohphpkoh4  # *16:<=@BDEHK"O$ V($X)%[,(]-)_,)`.*c.+b-*b,*`,(^+([*&V($S&"O$ L#GDC@=:98666666666666?@CEG H H!I" I HDC??>?>=:88789;::99888<>A?? CNVVWX\u'0&:&=&>&>%>&?&@'A(B(A*D,E,F-G.H.I.H0H1I2J2J6M6L6L7M4L7N:O=PBP4=r!E'  *:J X&&V.)d84wGCXR^ZYTUQOIIBICJELHMHJJSW[dVgUgWhZiYhZiZj\j\j]j^l_l`m_lanbodqdqererfrhtjvjvmylxlxnyq|r}r}r|t~uut~x{xy~zpvhl\_KN<>b!"EABCC I*&L.*N3.\D8mLBzME]WgbvqӒ࢜ż墘ߒފzrnfjakaj_`VTJLCԑ¿ļļƽȾǽȾtWO ! (/488;<@ADF J"L# R%"T'#W)%Z+'[+']-)`-*`-*b,)b+(b+(^*'Z(%X'#T$ Q#H EEB@=:8666666666666DFHHHI HFEB@@C?;9;:8777668999999:?CFB =!BZq!~%&-"6 78: ;:<">">$?&@(@(A(B(C(C*D*D*D+F,F0G0H2H2I3J4K6L8N7M8N8N9OOL+&^:6rJEOKMHOLJFFBHAICLFLHPLLMUZU`TdTdVfWfXfZhZiZh\h\h^j^j`k`lalbmcnepfpephrhrjsjtjtltlvmvnwoxpxpyp|p|r~r~stvvvyzz~큇ꂈ܀bgEIn,.I>;77'F0(R2,lF@TP^Znj|wzrҋ颚ȼ꺮Ĵź䘏ڍvrjunvmjb嘐úĺźƻǼȼɾʾʜ|q $ ,2689:>AACEFK"N$ Q&#T($V(&Y)'[+)],*`+(b,)b,)b-*\(%Z'$X%"V%!L! J!F ECA=:886666666666DFGGGHGEBAAB?<:8;9868666899999::<FKF" = Jp$ ,4 8 9878:;:"<$>$>%?&@&@'A)B,B,D.D-D.D.F.F1G1H2H2I3J4J6L7M8M8N8N8O9P:P'#O4.X62f<8wB@HDIFKHUMTMWP\Va[ff[aZeVdVdXfXfXfZh[iZh]g^h`h`iajbjcldldlfngofnipjqkrkrlsltntnupvpvrxrxr|r|t~t~vvwxwyzz}~₇vyXZi01LBC$ F)%I,(Q40bD@xWTjgÂzԋ،ݑ㜓榜̾Ŷل}ׂ|ڄ~ùĺĺŻǼȼȾɾʭ  $*0469:;>@ADDFJ L" O$!R'$U(%V*&X*(\*'^+(`,)`-*\*&\)&Z'$X&#P""K" I FDB@;986666666666GHIHHHGE@AB@<:769988886689999:;<<IP G"@"W## (#3757:78:; :#<$>$>%?&@&@'A&A(B*D,E+D+D,F,F2F3F4H4H4H5I6J8L8L9L:N:N:O;P986666666666HIHGFGFD@B@>98659:89866888999;=>?K!P! F F%"^'''#3!866678: ;:!<$>$>%?&@)@)A%@'B+D-F,D+D,F,F0F0G2H2H1G2H4J5K6L7L9N;NP>P>QBPCT>S?UF[BSz'1E++9"H'#Z1.l?;PK`Zkbh`aXZQVNRPVZ[dWbWbXdXdXdZfZgZf]g^h^h`iajbjblcldlfnfofngohphpiqksltlumvnvowpxqxqzrzr|s|t}u~v~wy{|z{||}뇑ӀUZX22D*)L32P33aA@jTFcVrgz֖ݙ墚➖훙쪦¸¸úĺļżƽǾȾɿ>0-$*0457799;<?ABDG I" J!K" O#"Q$#U($X*&\,(].*_/+^.*\,(Z+'T(&Q%$M! I FD@>986666666666KJJGHDAB@>:97889999999996768;@CDF"H"J"H#N)$[)&x)+)0234588; < < >"?"> @&C*B*B,A-B.B-A.B.B.D/D1F2H2H2J4I4F5F7H7M6L;P:NR@TATDUIW09hHC~KGNJPKPLUPYROLTT[^W_V`VaXb\f[fZfXe\h\h\i^j`j`j`l`lcndndoepfpfphrhrgpltmwp|mynxqyqvpwt{rzryt|t|xt}uwxx||~|POP+&C2*<4*P<8fNLc`wrΪ䵵夤¸Ķü¼ýýĽľƿ`LF  ,452788889;==>CEG H!L#!M$"R$#T&$V)&Z*(].*_/)^.(^-'X*&V)%R&$N$ J EB?;:8764456666JJGFDCBC><:8889:999999997789?BEJ!J#J L"N'"P+&\,(r-,+0224588;; < >"?">"A&@)<&yr q"o"n r!z$& (%0.91@6F6E7H8J7N6L9OR@TATEVCRHUBJf=.6"K$ Z+(f74{B>OJOJHB>:94=:EC@CBFEJHNKPNSZa`i\h\h\i]i`j`j`l_lbncndodofpfphrhripmtqxltfnntuxyzy|uxwzv{vzx}v|zv}y|}||}~⏎{wd:3H,$G42M;8^JHzb^}x֬躳ǻᄏøĸ¼¼ľƿ̎xp  ,564888889:;<>@CFFJ!K" N""P$#T'$X(&[,(^.(^.(^.(Z,(X*&S(%P%"M$"H!EB><9866446666JGFDBBCB<:9889::99999999789<@AGL" O"P T# T*&T.(]0,p10.1 224577::!< >"?">"@*@ X = >CEFILNQVaq&*26@:H9L:M7L7L9N;N=O>P?R>Q>R@T@SBSFWGVGWBNj( EW !R,)`62d62g5/q83x:4~;4z6.x2*w/,}.-.-/.{-+0.46Z^]g\g[h\h_j`j`l_lambmcndnfpfphrhrltovOSl"$r22DDWTjh{{숉|~z|z{{y{{||~猍ٍOL> 2<,&D3.\D>ZVjhƆꮤƽݔtA>^63[;8]:8l>>vB?yG@xI@MFOHRKTMZS]VaZd]b\g`~xʾ̷ +4758:::8899:=>@BDFG L N"!P%"T&$X)%[-&^.(^0)[.*Z-)V*(S(%M$"I" FC@<:676648888GFDCBDB>98879::;9999999988<>@GK" P#!QX"Z&#X+&U/*\3.k4101#224567::!<> ?">$A*C0 5:@CFJNQ RQ! Q# T#!^#!n%"**.16B=L:L8L8M9NR=Q>R@TATBTBTDUDVFXCN^..6>F"V+&d/,n2.p2-m2,d0(c6+a4-g3-m2.k3.h4/n72t2.AA^f\g[h\h^j`j`l`l`lbmbncnfpfphrhrjrlt^cVP.+dC>\V|wڈ瓎܆ق}{wpmkhgdjkqrz|}||||}~hhL! 56"?+$V50zHFWVngłyҒڣ䲦纮Ƚ详f>;! %4CL"N&U%Z("_-'b0*f2,k50q:5u>8|B>E?|@:TKԙ#   *5769:::88889::=@ADEHJ!N# R%"T'#Z,%^0(_1*\/+\/+W,)T*&P'%L%#I!"F B@<977668888FDDDDA@>7889;;;;999999997:<?CK" L O V"\$"`(&_.+Z2-[3.f30z11$004678:; <<>!>#>"- $,4:= @!C"G" U!!T"!N$!L'#R+&`3,f-(q.+24>DAKR>R?S@TBTCUGUDTHZ>L\ .>K Z$!j+*o0,m3.d3,^6,[5-b5.h60h71e81g81q7376Ya\g[h[h^i_j_j_k`lblbncneofpfpgqdokvjqd(,J/-VA;{QK^Yf_hbe_e``[`[]XYUTSQQTThjy|{}~|쎒vx\%$86:!S2/j?@ABFH K"O$!S)$W+$\.'_1*]0,]0,Z/,X-*R*(N'%J"$H !DB>;96687777DDCEB><<889:;;;;99999999:;>@GN"!N P! W$"`(%e+)b0,\2-Z3.d2/t00'013467:: <<>">$>"&  *4<@ C D" E$ I$"G" J%!T)&a0,i0*o.*}85E@HECF>GR>R?S@TBTCTGSHUEYDY<;:9999678:<>?ADFJ!L# Q'"V*"Y-&[/(]0,^1-\1.Z/,W.,R+)N&&J"#F DA>:9787777BCDBA<;989::;;;;99999999<>ABK" O#"O! S#!W'$`+(f.,c/,\2-\2-d1.q/.&-043669: <<>">$>"+ '2>FLO P! N#!E&#H$"T(%d-,m-,r-*|52B@NGKFCC@D@I=JR?R@S@TBTBTDRFTCTDXL]0<4  '3?L'$V,'`0,e1+h4.g60n61u73s84p94q83~96=QLZUa\icpnyt΂{َޖ梙쮨ʾϜ.   +;AD!D!G"J$ N$!S&$Z*(\+)b/,f4.n81v:4x91y;3Ϙ͔tq &4;<>=<:99985578;=>?BDF J!M% Q' V*$Y-&[.*]0,[0-Z/,X/-T-+P()N&&J$"H!D?>:9:7777DEC?><889::;;;;:999999::?ABDN$"P$"P! T$"V'#^,(f.+b-*_1-^1-d0-n.-%)/545689<<>">$>"/  *6?F I!I# J$"Q%#Z'&h+*q//p+*s40~E@PJKEJFDBBDEKBL?L>M

P>R?R@S@TBTBT@PCSIXHXFZH^z&  $,:"K*&X0*a0+l3.l61r72w84w95t94A?><;99984567:;>>@CF I K#P& S)#U+%X,(Z-*Z.,Y.+V,*T,)R**R)(M&$J#!EA@=:97777FD@?<:8:8888::::9:8::<=>CDH M"R$!Q!T"X&$W($\,(b.,d0-e0,d.,e,*d*(h&%,24468:89 : ;"<"  #-9BJ"P$"S&"T% _("g.(m1,k.(p4/zB;PINGLDLDD>LJLLEL=K8MP@R?R@R@TATBTDUFVDWDXHYBJJ ( &D T&$V1-^50r75v84|:6}83<8F@GAKDb]ih^b^f[f]g^h_j^l^j_j`lalcndnfpfpfpjtjsZbO4' T52CEWRketmxr|uzt|s|s}tՁx؄{؄zv|szqvmqn}|نT "( &8R(&c20q>:wGAzNFTMZS_Ve\lcphtlvnunqjrl~x댆]2,  $4=D DDF G K" N#"R%$T(&W*&],(e0,l3.n60zE=ùٺ, ",8@BB@?::7689998::<@ADEJ!M" Q&$U*(V,*X-+X.*W,)X,(W,&X+&W*&N(%K%#F"C ?<879999DC@<<88:8888::::9:8:;=>?DFK!P#S$ R"V# \($\+(^.*b0,e0-d.,e.+b(&Z# _" *33468988 : ;!<"  %.;D M"S$"V&"X'"c*%k1+j.(n2,y?9HBTNMGQIICHDJHIHDI?L;PC=\Tnfvoqpeh]c]h\g^h_j^l^j^j`lalcndnfpfpeomvltmtZ@2*`D@_aܪƺɽƺ걥笠頖艄쀀E "0<M'#\2-f:6nB:vF?KDNHTKVNXP[R\S_Y`[e`plzvބ~ꗐUN!  #4<DDDF G J!L#!P$#Q%$U(%Z+'a-*f0+j2-f0*Р@*!  "-;BDCB@<:7799998::<?@CDHJ P$"T('T+)V,*X,*V+(X+'X,%Y+$X*$N($K%#H" D!B=889999@@><:8688888::::9:8:<>?@EH M#S&"S$ T!Y$!^*&^-*a.+b.,c.+a,)a*'^&$Z# c(&*31468988 : ;!<"" '0>H!Q$!U$"X($\*&j0*n2,m1+x<6HBUONHSMPIF@HDIGLJGJAL=P;OQ?R@R@TATAUDVFVFWEXFYLZFO>   8Q%"W0,d51{76:6C?D?MFiatltl⒊ln^dZe]g]h^j^l^j^j`lalcndnfpfpfqktgoow~89L81\B>]]}tӣ贩ķĸöƸƸʼʽ뗒셄著ln5& (*6!E(#X0+g73o=7vB<::6688888::::9:8:<>?AFJ P#W($T$ T"Z%"b+(`,)b-*b,*`+(^)&[&#[&#`*'_'$$13468988 : ; <"$ (2@ K" T$"W$"\($b,(p4.o1+t82~D>NHSNNIVQMHHDIEOLTQMNDLP?R@R@TATBUDVFVFWFXCVJ[IXq"("2O%"Z.,h5276D@E@WPphsk̂xeg^dYd]g]h^j^l^j^j`lalcndnfpfpfphrhqmvADM0*[B>a`{v؛覡꣜㗐蛔ڎ҇}׎ڑޔِڑ䚒Ὦķž䈄蔗ab4 ($5#L)$b0.g50l82o83v<6y<5?7B9B:B=JFPLWR^Yhdwr͜%  $4<BDDF G I J!L M! P$#S&#W'%Z)&`.*b.(xD>ːtl( (3?F!FEDC@=;:9999::::<>ABBDJ N$"R(&S*(U*'T(&W*&V*$X*#V(#N&$L&$K$"I#!F!B><9999=<:977669999::::9:8:;>@BJ J R&"W($U"X$ ^'$b*(b+(b,)`,(^)&Z&"](%^*&])&]&#z 02568868 ::">") " *7D N"!X&$](&b,(j2.r2.p1,y<6JDXRMHRNYUQLQMXTWSVPTTDKQ>Q>R@R@SATBTEVEVGXEXFXI[9C8 1M# \-*q86A@E@^Xsktl֊|~{rtY^[f\f\h]h\k]i^j`j`kcndneofpdpgphqjtLQM%"G.*k>D"H" H" G!G HHJM! L#!O#"Q%$T'$V&"`,)h1,ݨʸ, 09C!G!K#!J!FEA?<<::::9999:9<@BDG I" N&$P'%S(%R'$U($U)"W)"V(#Q'$N&$L$"J#!H" F!A>988:=::786659999::::9:8:<?@BKN!V'#X($V# Y$!^'$b)'d+)b+(`)&\'$[&#\)&\)&X&"X# c .3458757:: <", %0<I" T$$[&%^&%g.,p62t1-y94F@RLXRNITPZWZTWRSMXR\VJI=D>N:MQ>Q>R@R@SBTBTDVDVFXFXFXGZGWL #2M!_,*{>:D?KFRNVS斒P2- '6>C"H" H" G!H!I HJL K!"L"#N%#O&#Q$!^+(a)&|x༶:6>G$!L&$P%$M$"J!FD@><::::9999989=BCF H!N%#P&$R($R'$T($T("V("V("R&$N&$N$"J#!H!F D?:99:;:8788669999::::9:8:<@ACKO"X($X($Y$!\$"^&$a(&b)'`(&^'$\'$^)&\)&W'#T"T!R )344765699;$2 +4>I" S##^'&b)(n42q52u1-?:KEWQVQNIRPVTTMRL^V\VPI665<Q>Q>R@R@SBTBTBVCVEWEVFXHZK^l*1O!m64{;:\\slsk㚑玄y|`e[fZeZf[gZj]i^j`j`kbmcmdndncofogpgrbkM0B(#X71iC>}RKXR^VaW_U`V^V`VaXaX`WaXbYcZaYbZd[d]hbhh~𑕰qp6( ,;IV%$\)'`,*c.+f/*h0*k1+m2,v3.z83z:5~?:E@MIPLԄﶱtTO  '6>B"I#!I#!H" H" J!H JKJ H !J"#L$"P%"[)'`'$JFɿX41>CK%#O(&T*(R&%M$"J!EB>=::::9999668<?BEG M$"O&$R&$Q&#T&"T( V( T'"S&$P$$N$"L#!H!H!EA=:9:;:8786679999::::9:9:>ABEKR# Z*&Z'$Z%"\%"`&$b(&a&#^%"^&#_)&`-*Z($S#R#P"H!%034664688!=(8.9B N$"W&%`)(h-,s85n1.|83FAOI]WWQNHPMQNXP^WZSNGv>8+*7>?P:M;N

Q>Q>R@R@SBTBTBVBVDWEVFWGYEZ+5/ 2W&$l21POqpvo嚒䏆{{glZdYdZfZfZi]i^j_j`kalbmdndnbneofpfrnw^ 1:$X/+p?<}HCNINIRLRJTLVNVNVOVOYRYRZRZSZQ[R]S\TZTYVce└vB@1 /8DR" X&$]*(a,)d-(e.(f/(h/(q/,s40t62x:6{<8D@JHljvq" '4>D"J$"J#!I" I" K" H IIFG H"!J#!L" T" ]$$e+'칰ǁZWK$#M&%P)'T,*X,+U)(P$$L#!F C><;:::9999658:>@DF L$!N&#P&#P&"S&"S' U' T&!S'$P%#P$"L#!H!H!F C><:9888899999999::::;9:>BFIJ L R$#Z*([&%\$"`&!c%!e&"a)"^'_)"b.([*$T$ Q"N$ :% L" |!224566668$:(?'!@!K$!S($Y*&a+&k2,v:4p0,:4JCYPbX[PUKVNZR`ZZVKH}=9q1-,,=F:J:N9M:NP>R?R@S@TBTBUDVDVDVFYDY6B4 ?X&%|DBhbrjғ}y~rs[cYhXiZj\h\h^j_k_j`k`lblbmdqerfqfpmt~.06,J*%_52t@=JFOHSJXL[OYP]U`X`YbZbZhaf_b[c\d\^U^W\VXUxwӆG*,:K U%$_*)d+*h-+i.)h.)h.)g0-h1/l42o53r75@??>[Yȕ, % +?P!"P$"O$#N$"L" J" F EDEF H"K#N% Q&!U'#V(#ůz\,)\,)]-+_0-^0.[-,T('N$"HD@?:88799999999;<?B G$K&!N'"O'"P&"R%!T&"V($R'!P& N$K#K"H"F D@<:7888899999999::::::;@DGJ L L S%$Z*(['%_'$a'"d%!d$ ^& a*$c-&`,&X("T$ P"N# H" Vz/34568689(=,cJ!K"P&"X)%\*&d.(q5/v83t3.@9NFZRdZ`V\S`Xb[VSFBt>8d0*q,),0>J7J9N9M:NP>R?R@S@TBTBUDVDVDVFXDX>G=D^,+YVjb̂z|}썃zz_gXiXjZj]h\h^j_k^j`k`lblbmcrerfqgpio?C8(D%!\30vA>LHWQ^WeZj_mfmfunxpzsx~v~wҀyԂ{ρz΂zwpoieafb򚘕\Z4*5GS%$^+)e,,h-+h.(g-(e-(c-*e.+g0-j0.o42v:8{>@ E#J& L&!N&!P&!R$ T%!V'#S' R&N$L#K"H"F D@<:7888899999999::::::<BDHK L !M! S%$[+)Z(&_(&`(#b&"b&"_' d.'c.)\*$U%!S$ P# O"N Pb%)***,+,.#.x%VF" R%"W(&]*'b+(j0,y94x61y61F>PHZRd\f^f^bZTNHFp<9V.*_,(}!$7B8K6L9N9M:NP>R?R@S@TBTBUDVDVDVFXFYDNBFp<;a\ne莄~|鍄蛎ZbXiXjZj^h]h^j_k^j`k`lblbmbrfrfqgpjqUZ>'D$ a63KI\Xe`ibrhnfokrnsnۋԈ|vƂ{DŽ|ʆ~̊ܡןқ֛ܛؑ܆ꃄ׎N"!-*BP$#^,*f..h0.j0+h.*e.(d.+f/,g0-i0.l31p64x<:~?<ސN(#( *:J R$"R$#Q$"N" L#!J FFEEF HL"M"Q$!R%"d6.xpyx}||}|ytn74k41h0/g/.b0.`/-Z,*T)&M$!G!B?::9899999999:<>@D!H#J$ L$ O$!P$ T$"U&#S' R&P$M#K"J F DA=:8888899999999::::::=CEHL M!"P"!T&%\,*Z)'['$_(#a(#b)$b+&e/*`-'Y&#R#R$!O# L" D" P>R?R@S@TBTBUDVDVDVFXEXGOIT&&LJ_YĎ~~瑉Ǹ퇆`iXiXj[j^h]h^j_k^j`k`lblbmbrfrgqgpir^dJ0N*'j<:PNa^garjznИѤƻ滰ʻއ󘘢ff3(=L$"[.+d1/j41k3.i1,h0*d.*e.+f.,f0,h0.k20o74w;8}ztJF,-;I R$"T$#R$"N" N""K!I I EEEGK L!P# Q$!R& Z,%^0)k;5k93j60l60o83r93w>8z@:x?:w<:r86n22k10e0/b0.^-+X+(O&#H"C@;::9999999999;>?B G"I#L" O$!P# S#!T%"U&!T&P$N#M"J H FB >;99999::889999:::::9<AEHJ K T&$W)(\,*^-+\)&])#_)$b,&h1,a-'\(%X'$R#!P"!N"!J" F";"0$/$3875;>@B D H" L$"P&%Y)&^,*d.+h-+t51~;6|40<8GCPKWQYRYPxQGkG=^80_'%^x"1>3H1J4J8L8L8L:N:N;O

P>Q?R@R@TATBUDVDVEWFYFOLf54QNnf賦ꒋ괤ْ焂_fXhVhZh]g[f\h]i\h`k`lblbmaqdpfpfohrfob!%4P)&l=:NKjd̗麮칮ᄇ¶ǹοݒP(&,8H$"W.+d31i41m60l4.h0+g0-f/,f/,e.+h1.i20l63q:6fckg0-7I""S$#V&%T%$P"!P""L H I FDDHKKN P#!Q&"V)%^0,e51k74l62m42p62u;5y?9}C=~D>z?=v;9p44l00f.,b.*`-*[,(T*%L&!D!?<:9999999999;:<>D!F H!K" N"!P""S#"T$"T% T&S&P"N"L H F?><:9999::889999:::::9<BFHK L S%$Y)(\,*_.,\,(_-'b/)e2,d/,`+(Z($V&$R$"O""L""L "SJ>!;!>@>:;=@C H O! V$#Z&&Z)'^,*d.,h.,t51};6y2.:6FCLHOIuNFmIAd=5a2+_#l%,5C6J/H0J5J:L8L8L:N:N;O

P>Q?R@R@TATBUDVDVEWEW?ETvDBWT|~땋֒х|\YX^YhWhZh\gZf\h]i\h`k`lblbmaqdpfpfofrhrx046J+'jC@plקǷﮦ脂Ղ{҂|Ѕ}χՒ֖ڝ筢뒑^]54@!R-)b42l96p94n61j2-j0.i0.g0-f/,f1.f2/h42m84OJ. 07G"#T$$X&&V&%S#"P""M JJ FDDHJJN O" P&"T*%\/+e51j52l31n31r52r83y?9E?FBFD|A?t88l00i.,f-+a,)\,(V+&N(#G$@ =;9999999999;:<>D F H!J!N" P"!S#"S#"T$ U%T&R"O"L JH?><:9999::889999::::::>DF I L !L !T$#X((]-+_/-`0,b2,b2,c2,`,)\)&X&$V&$R$#O#$K!"I !PIABFGB<46: > A"F$!J&$N(&X*(]-+b0,h/-u84|<7v3.94B>zF@jE=^A8`:2h+'p-:6I0G.H0I3J5L6L8L8L:N:N;O

P>Q?R@R@TATBUDVDVEWJX49b,+NL`\ޠĶ~ꕉ쪣ߐ؆z]USPTXZhXhYh[gZf\h]i\h`k`lblbm`qdphpfofrhtAF7J92}d^涯ꮥܢ⦚嗑Ոwqlgickeoinhpjtmwp}v̈́|ыՒז섅ړK5:K($^30l;7r;6p:4n60l31k20h1.d/,d0.c1.d40h61|<8죟Ԡ:,5G$$V&&Y''X&&U%$R""N JJFDDHIIM N!!N$"Q(%[.+d31h20j10m11q43o71xA:HAHCGE~ECv=<::99999999;:<>CEG J M!"O "R!#R""T$ U%T$R"P!N JH?><:9999::889999::::9:?F G J L !M!"T$"X(']-+`0.b2.d4.b2,a0*]*'Z(&V&$T%$S%$N$$J "F @ :!5!8 >@<5:=BEH!I$"L'$M)'W,(]-+b0,f0-o61u94o.)v40o84f:6Z61X0+`$# $/:2B0D/H.H/H3I6J4K4L7L8L:N:N;OQ?R@R@TATCUDVDVEWGU(.s>;XTpl촪ږ⋇bZXRRNSV\hYhXhZgZf\h]i\h`k`lblbm`pdpgpgodqgtSYH-,OKB{meÎҎ皔⊃vrfcc_fbhbjbhajblckblcneneoesitjtprq}~攓JG97D% Y0,i84p;5r:6p83n62l41h2.d0-c0-a1-b2.e40r4/ݗ鳯L*%' 5F$$X''Z((Z((V&%R""N LLFDDHHIL M L$!P'$Z.+c20e0.h0/n00p32p93yC<HB~FA{C@|DByA?r:8l0-h/*b,&[*$V*#N( H$B"?<;;99999999;:<>BEF H L !O "R "R""U$ U% T$ R"P!N LI?><:9999;::99999::::9:@EG J "N"#O##U%"X)%]-)`0,d2/e2/c/,a,*\*&X($V&$T&#R%$N$"H "E A >=<<<;::>D H!J!L$"P&$S)'Z/+_/,d/,b0,`3/d72`)&f*(Z.,`))t & **9-B/F,E/F0F0G2G3H4I4J5J8L8L8L:N:N;O

R?R>R>SATGVETEWDXGTz$(JHb\ń{촪헋ސ暓f`[VWPXRVV\cXdXdZhZfZf\h\h_k`lalbmblbmemfofsivel\30PKBrZRc^zvѐЎwojcf_f`fahbjbndndndl`i^g^bZc\a\`]`]\X^[b`sqE;<$L,'c40u<7x;7r94n82j5.d2+c1+b1.a1-`0.d20r60}xkD;.0? T*)Z,*X('X&&U$$P" J H EEEEEFH J"L&"P(#X.)b3/e2.f0-j0.m42p<6zC>|C>|>:{=9~@<|A@B D G I L P" R#"T$"T$#T$#R$"P"!M JF><:99999;::99999::::9:@EH !K!"N"$P$$U&"X)%\,(_/+d1.f1.c.+`+(\)&X($V&$T'$Q%$N$"H "E B @>==<<;:>B F H!J$"N&$R)'^,*f,*j*)c*(W*&U0+J& Oo"+,94F2G,C*D.G/F0F0F2G3H4H4J5J8L8L8L:N:N:NR>R>S@SBSFVCUDV@BC FI L P" Q#"T$#U%$U%$R$#N""M! H F@><;9999;::99999::::9:@EH "L""O#$Q$$V&#X($[+'_,)b0,d/,b,*`*'\(%X($V&$U(%Q%$N$"H "E B @>==<<;<>@B D"G$"K'$O)'X,)_,*_*(W%#S#!Xe &+<-A,A*A*C+D,E-E/F0F0F2G3H4H4J5J7K6J8L9M9M:NQ?R?R?T@SDUIV,2z55nhxp壚콲·ż◒ꖐd\\UXP^U\TLJRVXdWcZhZfZf\h\h^j^j`k`lbkakbldnererlv~??D.(`?:VT]Z^Xb\ldqjtnwr}wʃzˆ~ƈ~|tzopeg^`XWQRNLIJGJDHDJHpqPO==#I,'Z0+l61t84u<7p:3j60h4,d2,d0.a1-b0.d20i/)QL|0 06L&$V,*X+*Z*(T$$O" J H EEEEEDF H"K% Q)$W-(^.*b.,c.+i0.m42s=8zC>y>9u62w73t51u84x>9t<9h20a-*Z(%W($T&"N$ L#D @>;97769999;:<>?ABFI L P" Q#"U%$V&%T&%R%$O#"L" I F@><;9999;::99999::::9:@EI!"L"#P$$R%%V&#X($\*&^+(d.,e.+b+(_(&['$W'#V&$V)&Q%$N$"H "E B @>==<<;>>>? @"D$"I($L*'D*$J+&N&"Sf!*(8(>$>'A'B*D+F*D+D-D/F0F0F2G3H4H4J5J7K6J7K8L8L:N;OQ@R>R>T@SHV;B13D@}tʀx쨞ݹݨ卵ك|bZXP_V`VYPEBMPZdVbXgZfZf\h\h]i^j`j`kbj`kbldmeqdrjuKNM,)d@9曗Ԥ4/5H$"T,*X,+X*)T$$P" K I EEEEEDF H"J$ Q)$W-(\,(`-*b-*h0.m42w@;y@<97769999;:<>>ABEI L P" Q#"T&$T&&T&&R&$N%#L#!H FB@>=::::9887777788:::<@F I!"L"$R&&T''X&$Z($\(&_*'c,)b+(b*(b*'\(%Y)%X(&V)&R&%N&$J""F!!C!@ ><::::A?>>!@#F%"J$"L%#?'"N! j%):(>%@ >$?%@&@&A(D)C*D,E-D.D0F2G2G2H4H4I6J6J6J8L9M:N:N;O:v=8s51v62z64v41r3/q50p85l84c/,\*&W($S&"N$ L#D B>;:887::::;<<=>@BEJ L P"!Q#"T&$S'&T((R('N%#J" F DB><=::::9887777788:::<@F I!"L"$R&&T''X&$\($^(&a*'b+(c*(b)'a)&\(&Z*&X(&V*&R&%N&$J""F!!C!@ ><<<<<@>>= B"H!R#"U X#!3#<:"=&?&>&?&@'@'A*D)C*D,E,D.D0F2G2G2H4H4I6J6J6J8L9M:N:N;O:s84s40z84|84x52t40r40n64m85d0-\*&V'#R&"N$L"D B>;:887::::;<<=>@BEI L P""R$#T('U)(T*(S*(L&$J#!F DB@>?::::9887777788:::<@F I!"L"$R&&T''Z&$\($^(&a*'b*(b)'c(&b(&^*&Z*&Z*(X*(R&%N&$J""F!!C!@ ><<<<<@>==AM V`)%; <>=!>$@&A&?&@'@(A*D*C*D,E-D.D0F2G2G2H4H4I6J6J6J8L9M:N:N;O=O>Q>R@QGR;?}88GDJCZOsh왎j`aYf[h^]TJC?<66Y_XcVfYf\h\h\h\h\h^j`jbj`j`ldmepftbqfqh04I'&T84rKGb_ro|w|ˆ~Ί؊ۋԇ|uvprli_`VYOTJQINELDMEMFRLSMTRqq򖜔QTB5G.&\5.h60l50p60n4.j2,h0+f.,d.,d.,d.,g0*n2,lgﶯ\W++8D%"P+(U,*V('R$$N" K GFDDFFH J# M'"R*$V,&Z+'^,(c.+j1/t;9u<8q51u62{85~86|74v52q2.l42n86e1.\*'V&"R%!N$K"D B>;:887::::;<<=>@BEI M! R$#T&%U)(T*(S*(P)'M&$J$"G!DB@>?::::9887777788:::<@F I!"L"$R&&T''Y&$\($`(&a*'b)'b(&c(&a'%^*'[+'Z*(X+(R&%N&$J""F!!C!@ ><::::<<;=BR`%-"<< "> @ B$?%@&@'A*D*C*D-E-D.E/F1G2G2H4H4I6J6J7J9L9M:N:N;OQCP6<|98{FDNJMD_Sh\nb_Xlbkb]VIC@>88QVZdSdYf\h\h\h\h\h^j`jcj`j`ldmfqdrbqfr{;@H&&N74pPL_]olvpzrxnunnifbb^a\`]\Y\SXNSHRHPHNFLENFRJUNVPZXjirt<1C+$Z4.g50k4/o5/n4.i2+g/*e.+e.+d.,d.,g1+r60TP𶯣|v) +4@"M)&T,*V((S%$P" L! HFEDFFG J# N(#R*$V+&Y*&^+(d.,l31w=;t84r40x84z74}96}96x62r2.k31n96f2/\*&U&"R$ M#J D B>:9887::::;<<=?@BEI M! S%$U'&S('T)(R(&N&$N'%K$"F" D CA?@::888866666678899:?B H""J""O%&S)(V(%\*&`*'b(&e)'f)'d)'c)'`,)]-)[+)V*&S'&P&$K#$H""D @>><<<:046<Ju/!888:: ">#>$>&@&@(B(B)B+D+F+F,F,G/H1H4H6I1H4H7J8J:M9L8L:O:LAPAI02p1-tB>?BDBFJO#"V(&V('V'&V'&T'&R'&R*(L&$H" D ><:;::888866666678899:> B H""J""O%&R)(V)&[*'`*(c)'f)'f)'e*(c+(a-*^.*\,*W*'T(&P'%L$$I##D @>><<<:67@Nn"0#9888:: < <">">#>$>&@&@(B(B(B+D+G,H-F.G0H2H4H4H2H4H5J4J2H9NNBL4:%'m&$j4/uB&$R.+b/.j2/j2-i1,h0*f.*e-(e-(f.)h0+f6.p92D@敓鰪;"-:H$$P'(Q%&R"$P"$M!"MJHGFF F# J&"P)#T*#W+$Z*$^+%i2-r84q61u2.y74z;7x;7w:6x84w52t2.i0,i3.f3-[)&T#!P" KHD@<8368:899;;>>?BDCHKP$#U'&T&&V&$V&$T&$R&$Q(&L&$H" C ><::::888866666678899:> B H""J""O%&R)(V*&[,(`,(b*(d)'e*(f+)d,*b.+_/+\,*X+(T('P(&L$%J$$D @>><<<<8<Nr,#:7788:: < <">">#>$>&@&@(B(B(B+D,G,H/F0G1G1G2G2H4H4H3J2J6N6J@N:ADY`VcVdXfYfZf\h\h^j^j`k`lblbmbldndngpcg_:6RJCnNMTU\\db`^a\_Z]X^W^W]V\T\S[T[T\T\U\T\T]T\T\Ufangql{v脄똖V($0:" N*(^.,g1.j2,h0,g/*f.)f.)f.)h0+j3.j91x@9D?ԆW0+' )5C!!L$%P%&P$$N"$L!"L JHHG F I#!L&$Q*#S)"V*#[*$b-'n61r83p2.v41z:6{=9w<8v<7x:6v62t2/f.*f2,e2,Z*&R# N"JFD@<8368:899;;>>?BDDJ M! P$#T&%S%$R""R""P""N""N%#L%#H" B><::::888866666678899:> B H""J""O%&R)(V+'[,(`,)c+(d)'e*(e,*e.+b.+_/+\,*X,(U)(Q(&L$&J$$D @>><<<<:G`(476888:: < <">">#>$>&@&@(B(B(B*D+G,H.F0G0F0G0F0G3H4H6J6J7I:G)0lS"S&[*$`+%k3.s83}@>?ADEJ" N""Q%$T&$R$"Q! Q! O! M! L#!L%#H" B><::999988666666777778<@F J""N$&Q('T*&X*&_-*d.+e,*e,*f-+e/,d0-a1-_/-Z.*V*)R(&L$&I##E"@@>><<9:P 477777889 < "=">$>%?(B(B)C*D)F*F,E-F.E0G0F.F1G6HTK`VdZbZgbzvº뤚|n}r|tc\RLHCHIU[ZfWdXdXeZf\h\h]i^j^j^j`kalbmbndneogpv66H:4hWT{ɦາ߬Ԙ֗̋zrxprkpjnhohslrkunvnw}uؓ⧛沦딓~NJ.5I'$X+(b0,f/*g0+g0+h1,j3.k4/n72s<7u@9zA:>9_[rn) %+9D""J$$J#$I""H""FG H H!J#!M$"N$"N%"S'"V*"Z*$^+%i2-p62n1-s40{;7z<8y>:yA;8579:899;;>>?BCEI O#"P$$R$#O! Q! Q! O! M! M$"K$"H" B<:89:99888666666777768<?F J""N$&Q('R*&X+&^-*d.+g.,h/-h0.f1.d1.b2.`0.[.+V**R)'M%&J$$F" AA?><<:>f,266777889 < $>%?(B(B)C)C(F)F+E+E.E/E1E4G9K1>&,fVPN"I"V"\$b&"f'#j*&l.*r61x<7F>WObZf^d^leኃ迷֕uӈvn[UOJLMV[XcWdWdXeYe\h\h]i]i^j^j_k`kblbmcncnht=@;'"N>;z`[ؿƸԨ௣䯤ס˜͠Ҥܭ彰ɼ쐎~VS01E$!T)&_.*c0*d0*f2,f2,j60l82p<6t@:s<5w<6@;TP+ ! (6@ F##H""F""F""F F G!H" M$"M$"P$#P%#S'!V(!\,&f2,l4/n1-r40w73{;7~@<}D?{C>x@:s94s51p2.b-(^.(`0*T&"N"J FDB>;8579:899;;>>?BDF J" Q%$P$#P" MR" Q! O! L L#!J$"H" B<:89::8888666666777768;>F J""N$&Q('R*&V+&].*b.+f/,f0,g0-f1.e2/c3/`0.\/,W+*S*(N&'J$$F# BB@><<;I4145677889;; $>%?'A'A(B)B)E*E*D+D,B4H7F3@"*| a R$ I L L!O% W$Z$\&!^("e+&l-)t2.|63>:HCVNh^pge^ndޔͿږ҅~ݍnhXSQQW\ZdVcVcWdXd[g[g\h\h]i]i^j^jalalbmbndrPT6C.,eD@oi{Μ⽯ʶĸ볧ﴪ⢘蟘툈a]0/B"R(%].*d1+f2,h4.j60n:4p<6s?9t?:w?8y>8KFLHܫ4 $1<C!!F""D""D""D"E"H" I" N$"P$#Q%$S&$V("X)"`/)k61k3.n1-t51z:6}>:~B>~E@{D>w@;q94q40l0,_-']-'^0)R&"L"H DBB>;8579:899;;>>?BEH" M$"Q%$N""N MR""R" N L J!I" G!B<:89;:8788666666777757:>F J""N$&Q('Q*&V+&\.*a.+g1.h2/h30h30e2/c3/`0.]/,X,*T*(O'&L%$G$!DCA><<>[*2334677889:; < <"=">$>%?&@'A(B(B*C*D,D-D0B/>*3"(m$$]%"S'"N#R"W"SS$ S%R& R("V(#^*&h*(v.,~1054>9JBXOh_rhrhxkښȼƼ皓؋kf]\\_ZbUbVcVdXdZf[g\h\h\h]i^j^j_kalblbmbo^c7:!Y30|LHjeʄ}ԊЇؓ䦝Ǽ¶咽靕씒fb/0B# R)&]/+f4.h5/k82n:4r<7t>8t>8r;6v<6LEGBLGސ鶲F$  #/:B B D"!D""D"F" H" J#!N%#P$$Q%$T&$V("\,&e2,l50h/*s62t51{;7B>~A=zB;8689:899;;>>@CFJ#!O&$O#"L N O! S#"R" N KH H" G!B =:89><<:::887777788879<@AF J$"N'$R+$U-&Z0(_2+c3-g4.i5/h4.e40d40b3/`2.\/+Y,)V,(O'#F# H GA;8<J14424657889:: ">$?*B*B(B'C(B,D1C7C6=36m00g0.j+&d*$\(!T& R&"R&!S$"S#!R"!S$"T'%U(&W'&`))k,-r/0x20}85>:FBRJe_vpxqzp䛒۠覝֎jbhdZ\TbUbVdXdYeZfZfZg\h\h^j^j`k`lblbmfpdlM(6*$f86PLf_woy{uplmiplxtր|َޖݙܝ؞ա͜ɚ̖˔ʎ̇}փ|偀d`15D! R'%\0,a6/f:3j;4r>8w<8z:6z84>:J@H?NGXR߇wKE "+:@ E"F#F# D""F""J$$K#$N$%P$%S$&W&'Z*&b0*j60g0+l3.s51y95B>A={<8x<8y?:x@:o83i3.b.(Z*&^/+Y*'Q$!LIGD><:::;;;8899:<?ADK!"P$&P$%N!O "R "R!#T""R" P KHI" G!C<:::><<:::887777788989:>@DH" M&#R*$T-%Y/(]1*a3,f4.g5/h5/e40d40c3/b3/^0,[.*X.)R)$G$!I!JD;:?R$12124657889:: $>$?$>&@(A(A/A1@6B>DAD{<:IDI?OFYQ`[ڂ~ﴫja $*2=B!F#H#F""F""J$$L#$P$%R"$T#%V%&]-(f4.f2,h1,n4/w:6|<8@<{;7w84v95x>:v>:m72g3-_-'Z*&].*W'%P# JIFD<:::;;::8899;>@BH L""N"#M!"O "O "R!#R"$T""R" N KHH" F @<:::><<:::8877777889899<>DH" K$"O)$S+&X.)\0,`1-d40h42h52e51e51d40b40`3/]0,Z0+T+&K%#L" KF>>EY-01124657889:: %>$?">&A+B.?5<=@FHMLNLGE~><{86s1-n0*d,&])#Y($X($V&$U&$R%$P%$K%"I$"H%"J&$M(%Q(&a*(l.,u0-64:8@;HAZRneԊԑ̒ûntVbUbWdXdYeZfZfZg\h\h^j^j`k`lblbmclir68+/#V,)s;7zNFZObXf]h``Z[VWRWRQLUPXS^Xb\ph{s̅|Ȃ|ȃzˆ|Ԉك|肀񕔗^\46G&"W0,b61j:3n<5o:2s:3{;6GBJFJDTJ\Tg`nirn!  )0;@ G"I#H" H" J$"N$"P$#T$#W&&Z)(e3.d0*e.)p82v<7|?;z;7v84v84t51t83w>8t=8j60d1+\,&Z+'[,(R%"N!JFEC::::;:98999;<>@CL#!L#!M! L P" P"!S#"S#"S#"Q" N JH H!D ><:::><<:::8877777889888;=BF J# N($P*&V.(Z0+^0,c3/f62h62f62e51d40c40b51_2.\2-V-(L&$N#"MGBBLc1/1224657889:: %>$?">(@.>09>>JHRPSPURNLCB:9x50q2,i-'b*%^)&[(%Y(&X'%R$#N"!H!E @>== @%J("X(%j-(y51<7E@JBWN`Zwp唏❙䳬ߘXbVbWdXdYeZfZf[g\h\h^j^j`k`lblbmgpepGL51 T,(r=8|PHZPbXbZ_XYTTPRMRMVO[S`Wi`ulwzyԇ׈ֈօ|ሁ넂}񒔑XW38L)%Z2,d70n:1r:1v:2B:IBF@JCWP`Wmengb]qlۢ( $,8?H"J# J" J" M#"P#"R#"V%$]**c/.e0,d0*l60o72x>8x>:u84t62w84s62r83t<7r<7h5/b0*Z+%Y+'W*&P# K HFB@98::;:8799;;>ABDL#!K" L M! P"!P""S#"T$#S#"P" M J G F!B ;<:::??<:::8877776688799;=AEH!I$ N($T-)Y.+^1.d42d31f42h84h84g73d51c62b40\2-X.*Q)'N"!O! HBFRr.0022244666888::<:$@$=*@*:*2x::IFRMVPZTZTTOJF@<|:5v50p0+j-)f,*`+(^,*Y(&Z$$V PJC>:6$&5G"[)#p40@;JESLSNYUhc|yYcT`WcVbXdXdZfZf[g\h\h]i^j`lalaldldpZaF5 R-)p=8}OHZPYQZSVQTOWSZVb^nfvmĀwȆ}ȈȈʌώׅ䐊藏~~ꍐON4>O)%^1*h7/r8/~?7HAF?F?TNYSf_nfkdg`ztԃ~묦F)(  )4>F L"M$ O$!N"T$"W&$]*(f0/d.-e.*j2.p82w?:t<7s94s94w=8w:6q62p61s<7n94e2,\+%X*#Y,(Q'"K GEBB@:999:988:::<@BFJ""L#!J J L!R$"R%"T$"R" Q#"O! JFF D!@<;;;;@@=:::8877776688688:<@CFI$ M($S-)W.+[0-a41c31f42h84h84h84f62d62c62^4/[1,T+)R$$Q"!JGIY~.0022244666888::< >">&=*8|"(m66pECOJVQZT^W^W\URLHB@;|:6w50r1.m.,f.+c.-Z+(Q+)H" G >6.' # ! $&0A X*#o3/>:LFVP]Xb^lhsnۋX`XdVbWcWdXdZfZf[g\h\h]i^j`lalalemdpbkX :!Q-)n>9RJ]Vf`ojtoytց|چ݋ᎈᏈߌ㐉㐊閐~萔w@A6B T($f2+w>6F>F=G>PH[S^Wohkdf^tmՇ䖐^>= (0>G N# N"Q$!R" V&$]*(f0/f.-e,+j1-n61x@:t<6p83s;6w?:x@:9999988:<=?BDG H! J J M"N$ R$"R%"T$"Q" O"!L IEE C!@:;;;;A@>;::8877776688688:<?ACE!K%#P*(T,*Y-,`21b22e54h74h84i95h84e84e84a72^4/X.,U'&S$#M JN` .0022244666888::!<<#>);s"S-+_<:}JIUP\V_Xb[`Z`ZYSNHD@?:}73x30r00k0.f10`.,]((Z"#TLD = 65@8- ( 0B [+%s72A9H@PHZSb\mfyr⍄夘˾cjZdS^WcWdXdZfZf[g\h\h]i^j`lalaldlcqitp.1O30fD@^Yyrӏᘒ䘒癔昒ᗐܗ❖턃{甘`,,8F"b1-x<6D:9998877<=>ADG J !HH K#O% P& R$ R%!T$ P"N" K GDCB =8;;;;A@><::88777766885779;>@ABF" M&$P(&X,+_10b21e54g74i95j:6i:6f95f95d84b62\0.Y)(U&$N! IQd .0022244666888::!:!<'?"L>1+cC?LLXR`XbZb\e^f``ZTPJFD?<8~84z75t64n86n32-6:F6B4B2?1=1=2=8@:@N% & 4K&g3-w?6J@RHZRcZng~xꌃ꟔Ķw}XbP\WdWdXdZfZf[g\h\h]i^j`lalalbjdqju>BM.+aB=_Z~vғ棜︮ƻ韙Ӊ֋xpb\킂~|JD V.*m74C8r83v;6yAABFJ!"J "HK"N$ P%!N$R$!R%!R$!P"N! J EBBA<9:;;;E"D A?><;;67647777777778<?BEK" Q&%V,(]0-_2.d62g73i95l<8l<8l<8l<8i:6f73`3/\,(Z(%P%!I#LZx,.00223466789:: :"8!9%7` 9I*&h=9}PI\SbXc\e^f_e`fbZUPKHBB<<694~;4z=6x612;;L9N9L9x@;v>9n61j4.k61f2/],)W)&S&$R'$K# DC><::888887778?@CGJ L M N P" R$"S$#Q$"R$#O#"O#"M"!J" HEDBA=:9999F# D!B@?=;;78757777777778:=BDJ M$"T(&Y.+^2.d73h84j:6k;7k;7l<8l<8k;7h95d62_/+]+(T(#L% M!Xt,.002233667789:: 8$;+K -C$!f31wE@TL^Xe_kdhbiekgb]YTPJICB<=7>7A9<66>9J8M8L:N9N;P>P@O@R&0 .:}@<}@9v>9r:5j2.j4/g4._-*Y(&R%"T('P%$I!BB><::8::::99:;>BEJ JJN N S#"T$#V&$R$$P$$P$"L$"L" J!HDDB><;9999H%"F# D!B@><<888677777777789;@BDJ N$"U*'X.*`3/g73i95k;7l<8m=9n>:m=9k<8h:6d2/c/,Z+'N&"P$Vl+.//112255668899 8%<#9!< a+*v96FARL\Vd^jdlfjfe`]XTONIHBB=B:C7I8M8L;N9N;P>P?O>R6B-'6M%"\.&b4,g6.o82w;5<7>:A=KF[UrkȂ{ԕ뱪ત`hTbWdXdWdXfZfZfZf[g\h\h^j`j`jcj^h`l`hT;!M/*r@=QM^Zd`e`eaf`f_g^aZf`d^\UZSWPPIJCHAF?C<;8ef~{|~~OMg2,pA9UNe^smԅ~ގ؈yrzs}v|u|txpvnlfunԆvqa_܆촱_;:  ,@P#"Y+'_,&c/)e1+m61r:4p83t:5y?:}?;}@<}@8u=8t<7m50j4.k71d1+\+'U&$P# R&%L" F@A=<::8::::9:;=@DG I IKO! P"!T$#V&%T&&T&%Q%$N%#L#!K" G ECBB<:99999I&#G$!D"C @>==898677777777788:>@CEK"P&$S)$X-(d40i95m=9n>:m=9n>:o?;m>:l<8h62h2._.*U,'U)%Z# j*-..012245667889 9#:".2Z""p..|:7DBLITO[Va\d]d^`YXRTNOIG@F?JBHB=G6H7L8L;N9N;P>P>N=Q@P< "4D!T% Z*$_,&f.*l0,r1-y42:7@7;9xzzy{~~ߊ~:7n82YRnfɁy΄|̀xсz~xЀz}v|uvoxqvooftlτ|rl^XTQ{y򴱅ZX -AO# Z*&^+%h2,n62t<8p84t:6x>:|B=B>B>|B=z@;u=8t<8q:5h2,h4.g4.\*$X)%R%"Q&#L" H D?@<<::8<<<<;<>?DG H!GKL Q#"S%$T&$U'&V('S'&Q'%N&$J" H!F DBB@:789999I&#H%"F$ E"B@><:986777788887777;>ADG!L# N&"U,'\,(c3/j:6l<8o?;p@:l>:m:7l42d0-Z.)V+&Z&"f $/.0.022444666889#<%.*Od%%u32<;DAJHPLWPZR^V^X\VVPRLKFJDOHOJ@J7J6L8K:N8M9N=PRAS]  "6?"N"W'#['$a)&d)'i,*n0/r31z84?PITNXRUPTMPHMDNJLIKGIELHJFHDFBF>}@7<5TT|zz{~~}z~?:UNh_rjzsv͂xx|ux|uyrwprkohwnwld[TVPZXdbvs#  ,@O#Y*$h2,n82s;6q94z@:z@<~A=B>~D?F@}C>v>:u>8r<6i2-f2,e2,`.(Y)#T&"R&#N# HCB@@=;998<<<<==@D H!G H K" L N" R$$T&&V('U)(T('Q'&O&$K$"H" G D@A@<:879999J&$H&"G$!F# C A?=::87777788887777;;=BF H"L$R)$X)%^.*d40h84n>:o?;p@:p;8o64h2/^0,Y.)Z(%c$"$--0.022444666888!=.8  $BR"!e+*q22z98?;{FBNHTM[Ug`rodiT`VbWcVdVdXeYeZfZf[g\h^j_j_ici`j_nbqGOBE% Y1,tE>TM_Y_Xa[b[bZaX\V\V[UZTZTXQUNSLQILEB=rszyz{~~[WD<\Tldqjumrjrhslvozsxpvoohnhyrzrd\YQZSTMKHIF˓*   +=P$`1*k4/p83u=8z@;{A<~A=~B>B>|B>}C>x@;u=8s<7m83h4.h5/a/)X("T$R%!O$ K!EBA@?<;998<===@ACEFFF K" L N""T&%V('T('T((R(&P'%L%#J#!G!ED>@=:8779999J'$I&#H$"F$ E"C A?;:887777888877778:;?BF F L% X($[+'`0,d40i95l<8n>:n?;m>:q<9r86l42b40]2-\-)b)&v%*-/.022444666889:6B   0<W'&f0.r64=9?:F@JBOFOHRJTNTNSMSMZT]XBO6J5K9L;N8M8N=P:L V$"[$#`'&`'&`('^*(\+)h./l43k65n=9tD>zH@KDRIZVY^T_VaXcVdVdYeYeZfZf[g\h^j_j_ici`j^naqV_T$#O,(d=8ZTb[famgplohjcf^`Z^X]V\U\T\TZRZQRKMGWS|~zx{|~~݀A:KCOH\T\U\V]TdYlewowoqiogum|tkdZRXQZRRKIBB>:6䔓誧: (@U*$b2+o83t<7{A<~D?D@B>~?;{=9y@;v>:t<8r:6n72h4.g3-c1+Z)#T$P"Q$ K GB@@?><;998;=>?BDEEFFH!L$"P$#Q%$T&&V(&S'&R(&Q(&M&$J#!G!EC@>@:66669999K(%J&$H%"H$!G" E!BA<;9877777778777787:;ACCI"T$ V%"Z*&`/+f40i84m<8n=9n?;r=:t97p64f63b40`/,b,)h#%'-..02244466688:9&@\  % 0IZ('g1/v:6@:E?G@JBNEQHTLTMXP^Vf^d_DQ6J5K9L;N8M8NO"Y&$^&%b((d*)b**\,*\,*h--j11h10f40j83m<6r?6vC:|GBJMS]U`XcVdWdYeYeZfZf[g\h^j_j_ici`j^napenb--]:6oKEf`Ȉ֋쓍ވ~vzqvnrjofqhndj_f\]WRN{zx{xx{|~~򎎳YX{81F>WOZS\VXR]Tmcvoumnfqiyqtl_WUM\TUMLDE=@:z72z30ˁR/* *>S)#d4-s;6yA<D?~B>|>:}>:|>:|?;x>:t<7q94p94h4.f2,d2,[)#V&!T$Q$O#GC@>@>>;;998>@BCDG G FH I!L$!P&$T)'T(&T'%T&$R'&Q(&P(&M&$I" F B@>>>:56669999L&$L&$L&$J#!K#!J" IFB@<:8754245668::9999:<@DO V"![&$`)(f.+j0,n40r72r:5u<7v<7s:4q83p61l1,f-(b,( &(,.02322445667::$@%, 7 EKP&"Z1,j:4~@:F@LFTLXQYT^Yd_lflgcb>M5H6J9M8L7L8L:O8P9NeZynԐ駱쇃ցzzpti``ruy~xwxz{{|}~퇈~}63@8OFXP[T[Tb[ngtmnhnhvpxrb\UOWQWQPHJBD=u<6p62m0-x87kjZP$$7N)$d3/s>8x?:x;6z:6y85x:6x>:yB==<<;:;;<>@CEDGHHN"N#R&"W*&T&#R$!Q$ R$!N""P$$O$#K" H!FB@>><999899999K%#L&$L&$K$"M$"K" KIDA?;;854044668::9999:;>BLQW$"[%$b*(e-(k1,o4/q72t:5u;6s94t73s62p3/j0,`0)|%$&,..122244566788;$;g "  "4H"X($h0,s73~@;FBJHMLRRZY][]\Z\8r92h0+m50m31j.,NNtn( (8M'$a0.l4/r51r2.u2/x41w84v;6v=8t;9l42j2/e/,f1._+(X%"U$ N#"K$"H!C@>=<=<<;;<=>@DEDFHI L R$!T&"T($T&"S&"Q$ P$ Q$ N""P$#M$"J!FEB?>=;999999999J$"L&$L&$L%#M$"L#!M! L! FDA?=:85246668889999::<?GLP T!Z&#_)$d-(h0*j2.o72r:4r84t73t84u62q40f2-m,($'+,.02224456677:8:"7X    -BNS#"Q,)U50k61|<8A>HFPLWS_]bd;K6H7J6J8L8L8L:O9PuEAxEBvB?q@=l=9h<7f92f81f6/f30h2/g0.h/.f//V/*p((>FVdScTdUdVeWdXdXfZfZf\h]i]hbiaj`j`ldo?DJ@$Z.)p=9HDNJUQXR^W\VWVTRUP~RK}NH~>:>>fix}x~v}xwxz{z|}~fd74HCNG^Vjcqkmgqjxrslb\WQ[UZSQJJBC;|?6x94m2,h1,f3-b0,]+'X$"p76윚ʔ4-5@O#"_(&f,*h*)k,+q10r43q75o74m64h1.e0-c.+_,)V&"R"R#M"!H!D@@=<<=<<;;=?@BEFCI J!N"!P$"R&"T'#R&"P$ R%!P$ P"P#O#"N%#L" FDBA>=;9999999999I#!L&$L&$M&$N%#M$"O#"N"!H EB@@<86466666667777778;BFJNT# X& ^*$b,'f0*l40p83r83u84x95x84w73q4.l4.r/,%(+,/022445667798; <3U " 0 ;BDJ##U*'b2.m85tA=xJFPMUTTW:J6H7J5I8L8L9L@BEEDGJ!N" P$#T&$R%!P"O"P$ R$ P#O"O#N$"N$"I" EA@>==:8999999999G!H" J$"L%#N%#N%#P$"M! I HDC?>:9644665556777788:@BFJ O"R$V& \*$b.(d0*j2-n40r51u62v62z63~4/p5/j3,**(,./2234566778 8:: < 5w ,   %7ABI#S*'U/+Z62e96t55.36F6I5H6J8L8L:M;N9N:O;PKb]jelihfb_ZWURTNNJICxD>j?8Y60N0*A+#1* J"z!$YbTbTcTdUfWdXdXeZfZf\h]i\h_h`h`j_kbn\`;"*7% >$ B& E&!B$A#EOl#'LTpzro|t}t|u~v~wxy{zz|}}~|{MKTQc_hbpixptlib]VYRYQTLLHGCD?~>9t:4j4.d3+d4,a6/[2+P,'E(!: 53;zxߪR..$ "#':<=?@ A!H&"M*&W*&X*&W($T'"L"N#L$J"HDB@?<<;<;;>?@C E"DEI J!O#"T&%S%$P" R$!S&"S&"R%!R%!P#P#Q&!M%#J#!FC>=<;999999999999F G!I#!J$"M$"N%#P$"N"!L I GDB@>;9776553455555668;>ADHJP"T&Z)#_-'g0+l4/r40u62y63|6350y70q6.{1.)-",..1233456666 8 8<<#@&>*i 9  %&(9 Mv &3D4H5I7L7L8L9M:M9N8N;P>Q;Hd#$F4-lC?VOe_idjfhfeb_]\YXRTNRLICu@:a4-R)$C"7!K!%U`TbSbTdTeVdWdXeYeZf\h\h\h^h_hajak_kfmV"$,/4<>9 BHv:9X\nwtmzp~q}t|t|v~v~w~xyyzz|}~~~~XV\Xc_rnupoh]U]VWPYQPHNDJBHC~=9u73m3.j3.i5/g60e6/\2-P(#H& =6346eb[\. !'&- ...059? P&!P&!N$J"K$J#G"DFBA@?=<<>=>?@@ABH K" N%#R&%T&%R$#R"!R" T'$U($U($S&"Q$ P#P#P$ K#!H!DB=<;;999999999999DEG!I" L#!N$"P$#O#"N" M! I HDC@?;:87533245555667;<?BDGL"R&U%[)#b-'h0+o1-s2.x40|62z7.|70{80w61{3.,.%--0122445555689:> =#;)>"2 S 5 $ $ & ) * 2@ c/;4G5J2H3H6K6K8L9L9L8M;N=PAO9:^NEb\xҜ誤ꜚՆ~xtngb[XDA10o" d[xISSbQaRbTdTdVcVcWdXdYe[g\h[g\h_hbjakbpbn>?@A@AABDJ" L#!P$#R&$Q#"T$#V&$X(&V)&V)%U($S&"O"P#P#N#FDB>=;99999999999999CDF H!K" N$"P$#P$#P#"O"!M J GEBA<:8854424444446678:=BDJ N$T%W'!]*$c+&j.)o/+u1.v3/s6,z7.~70t80l92v7313*3/012344445678 : :#>$;$;&=*@&>'="60'(() /!4'>2L0E4I4H5J4J6K7L8L9K8L:N>?@C D CBDF"H#!O&$R%$Q$#R$#U&$Y)(Z*(W'%V)%V)%T'#Q$ N!P#P#M!BA>=;;99999999999999ACFJM! O"!P"!Q#"T""T""R! P! N JECA><9:766443233348::;=@DG! P"T$!X'$^)&b*(f-(k/+n2,v50z61}84}:5z:4~<6<8:8.5&20224566667 8"8$:$;!:!<"<#=&?&@'B(A*A,A-C.D.E.F-H-H0F1F2H3H5J6J7L8L:M:N:N;P@MORd^mb|ݟùźooPYKYK\L^N_P]P\P^P^Q_R`S`TaUbVbVdWdXeZfZf[g\g^h_h_i`j`kbldlfkflhlhljnkolplqjujvkxlxnzp|q|p|r|s|t~t~vuxwvx||턅yy^]QOSPURWSUPPKJFHDE@A;;6{93v60p3,m2+l4.j5.j6/j60k70l81j6/g3,n60܈򺶍da* +/=DG"F!CB@?BA@@ABDEF DDFGJ L!"P$$R$ U%"V'#X($Z*&Z)&X(%X($X)"Y*$U' O Q$ M"K H>:89988799999999::::@AEGL L O! Q"!T""T!!S!!R" O! KIECA><;:876544444489::<>ADLR" W&$\)&`+(d-(i1,n3.t4/w61{94};6>9@;B=A=>=48'40014566779: :!;;< MSX}}΋żɼmnMVJYJ\K^L_N^N^P`P`QaRbRbScTdUdVfWfXgXhZh[h\h]h^j_j`kalblcmelflgmhnjpjplqlrktktlvmvnxpzrzqzrzrzs|t|v~v~xu}zx~}{|hgTRRPPMNKLHJFJFHBB<::76544444789::<>@FLP" U$"Y'$^*&e/*i2,q5/t82y;5|=8@D?D?~C>?<79.8 01126678:: < < ; B>D>D>>;7628)6!436889<">!;"<#<$=&?&@(@)@)@*@*B*C+E,F,H,H1H2H2H2I2K2L2L4M6K9L=M@NCJJLgfو嚑螕㚏朐ppPVLXKYLZM\L^M_N`NaPbPbRcRdSeTeUfUgVhXhYiZj\j\j^l^l_m`n`naobpbpdrergthtivjujtltmtnupvrxryrxrysztzv{w{{~{~rtbbQPHFFCHDIDHBF@@;>9|;6x94x:4s60n4.n4.p4.n2,l0*k0*l2,i/)h.(k1+n3-o3-p4.p5/u93v:4v:4?:円db<7=@ABDAAAADEFG DFG H!K" N$"N%#O#"P$"U'&Y)(Z*(Y*&Y*&Y*&Y*&Y*&X*&X($V($O$ N$L"J FDA>8::9988799999999<::89<<>BEGHLN P"!S#"S#"R""R" P! N! L HEDCB@<988766566666568=>BFHN T%!X($\*'`-*f1.l31t86y:8}<:?B:A2=%95 7 989 : ;!<"<"=#>$>%?&@&@*@*@*@*@+C.F.I.I,F.G0H1J0H3J6L7M?L8y;5|>8~@:~?9{=7A;D?JF拊ig@=>ABBBBBCDGFFDFHJ!L#!N%"N%"P%"R&"W*'Y)'Y)'Y)'V*&X+'X*&V($T'#U($U($R%!L$J"I FB@==998688889999:<<::886:::<@AEFJKO! P" R""R"!S!!R! Q"!N LIHGEC@=<<:987544443469:>BDHL O!S%!V($\+(b.*j2/o42v65|97<8>8B:D>IDJFJIHIFJ:A2<)7"4!6 7 9!"?#@#@$@(@)@*C,D*C.F/H/H+E-F1G5H7G7D1<)2,0|-0x22t76yB<JC~HB~E>JDXRkd}v҃|Ԇ|؋ڋsrVXSVTXX\Z_Z_X^Y^[`]b`dae_c^b_c[``fZ_\b^d^e_e`gcidjfkglglflhnfmflgnhojqlrlqmplnlnkmjlfg_`[[XVTPPLPJPJNHLDIBGBD?B=C=A;~@:|@:z>8z<6z<6x:4x:4z<6z<6{<7{=7z=7{>8}?9~@:}=8>:?:>:AE@Ղꔒ혖ꕓ떔떔얔뗔ꗔꘕ똖Ꙗ蘕ꛘ띚Ꝛ힜띜Ꝝ렞렞ꡞꡞ裠椠椠夠䤠䦢姣䨤ਢ姣ꧤ䨦fbB"> >DDDDF EDDEFGHM$"M$"N%#N&$O$!Q&#S(%V)&Z*(Z*(Z*(Z*(X*&X*&V)%T($U($T'#R$ N"J"G!DB=:9:89868888:::::::9789:8::<=?ABFIKN R" S!!U!!U""R"!Q! P N M JIFC?>>::9844444346569>ABEHL"P$"V(&\+)d.,j00r44w76|>5@8E=HBOJQLTOUPSMKGDB9&?&@&@(A(A(C*C,E.E-F-D7J1B(7"/}"*j&\ $Y$&\(']+)`0,b40f60n<5r=6x?9y>;}?C>B=B=AD?D>D?D?D@FBFBGCGCFBGBFAD?FAKFNITOXTVSVSQNJFJFIFIFHDGCGCFBFBHCLGRMNLHEB?@=|:7~>:~?;}>:v:6r94p82n72k5/h3-d0*`.(T*&[*&`*'^+(L'#@DFILQ! R V""V""U""T!!R" R! P! M L J E B@@;::843332224446:<@BEFJ"P&"W(&^*(e-,m21n64gC6qF:JBLFOKTPVQSNPHLDHBA<<8:67442+4*5*6*7*8*9*9*:-8,7*6*5'2&0#-z )_[ Z"Y!$S "P!#O#$N&%N'$Q)&V,'Z+'`.(h2,l3-r62n75p76t54|66;8EBPL^Yhbphpimgqkys玅锉䏄⑅虌wvpmgicjdpiumypzpvlrknfibg`g_f^e\bZ]VZSVOSLNGNFMFLEKELELEMFNFNELDLCIDJEJEHCGBGBFBGCGBGBHBHBJDJFLHNILGKFIDGCHDD@GCNJLGOKRNTOTPRMKFKFHDC>HCB>FBEAD@D?D?B=@;?:A|=;v75q32p42r64q85m42g.,a-*^+(Z(%X&#S$ R"N!KB"H!N"M"D$?%< B!EEEEDEF G N#!O$"P$#Q%$O#!Q$#T'%V)'W)&X*'Z,(\,)[,(\,(\,(\,(X-(S)$Q&"Q'"N$K!J J"E @=9978:89868888;;;;:7569::;6666679;ACEJLP S" T" X" Y$"X%"V%"U%"R$ O"M!J"G DB@>;:6553422256788:<==A!F$!L&$R*(X,*_/.d22f;6n@:zFAJEIELFLFIDHCGBD?FAD?G@GAFACB@@<=::{66v32s22m0.g,*f+)d)'`'&_&'\&&Y$'V#&T$$R$"P$"O""L#!L$"L$"L%#M&!N&!O'"Q(#S)$V+&Y.([0+`1-d2/f30j2/n42r32w86?:998888;;;;9:;;:86456688:=?44445679?ADFJP R" S" W" Y$"X%"V%"V&"T&"Q$ P$M$J"H EBA?<:8665323456688:;:=B!G" M&$R(&Y+*\.,^1.d51l:6t>8z>:@:@<@tA;l<6d81a6/^2.[0,Y/,X-,V+*U*)T'&T&%Q%$P$#M$"N$"L%#L&"K% L& L&!L&"N("O)$Q+&T,(Y-)\/*^/+`.*d0,f-+h-+j0,j2,p81y>8GAMHRNSOUQ\TYR\Ub\f`mhupxtxryr~x}vـx㋄⋄⍆ꔋ蓉璈针ꑇ玄挂獄߆؁{|vwqhad]h`h`d]b[`X^V\T[T\T\T\T[SZRZRWOVNUMTLRNSOTPUQRNRNQMPLVRWSXTZV^ZZVYUZVWRUPSNRMNIMHLGKFNILFKEKEHBHBHBHBF@D?D>C>D>D>B=@:C=JDJDD>z?9t:4n70n70n53o64l52g1.`,(`+(]*'[*&T$#R"!N LJJH H F"F"E!D E!D CBEGH J!M$"N%#O&$O&$O'"R($T*&X+'[,(\,([+'\*&Z((Z((Z((Z*(Y*)X*)U)(S'&R&%O#"L" L#!FEB@:7788998;;;;:;<<887689::??@@33335567<=ADIM P!Q!T# W%"V&"V&"V($V($T'#T'#Q'"P&!M$J"FDB@=<:87666456678::;=A D!F K" O%#R&%U*'Z,*a0,g2/n4/s40z83;6?:E?KESMXR\U`XaZ]Z[XZVXTWRQLNH|HBtF>nC7d:5_61\40X1.V/,Y,*X,(T)&S(%R(&Q(%O(%N($M'"M'"L&"L&!M'"N(#O)$P*%Q*%S+&V,(W+&X*&[*&]*'_,(`-&d/(e/(l4-r60|>9D>JDFAJFOJQMQMOKPMTP\V^Yhbhcmhkfpklfphqivn|tzs~wځzځz~xՀzԀzՂ{Մ}рy҂z~xztyrwpvoslslslslrjqiphphldkch`g`d`dadaeb`]`]_\_\[WXTVRTPTPRNQMPLRMPKOJNINILGJFIDFBGBICKEHBHBHBHBF@F@E?D>A;A;D>ICJDF@z>8s93p71o81o82p:3k41f/,b,)a-*`,)\*&X'#T$ P P MLJJHHF F EEF F EFJ L!N" O$!Q&#Q&#R'$S(%U*&W*&X,(\,([,([+'Z*&Y)%Z((Z((X((X((W)(U)(S'&P$#P$"K" I H!DB@<86689::9;;;;;:::6788::;<>>>>333344448:>AEJM!O!R$ U&"U&"T&"X)%X)%V)%V)%V)%T'#Q%!N$J!H FC@?=<98776678689:9<>@BDH I" N#"Q&#W(%\)&b+(f,(l0,u51;6A=HDRMYT]Xb\d^c^d_e`f`e_`Z^XYRULQHJDzF?uB@;?:>8>9>9>:~>8~>9~@:C=F@F@F@F@D>C=B=>>?>>?@3221221046:=ADHK!O#Q$ S&"T'#T'#X($Y*&Z+'[+'Y*&V($T'#R&!O$ L"J FDB@?=;:77778666::;<>?BDFI P" S$"W$"\'$b+&g.)r5/z<6B=LFRLYR]Wc]gbjenhpjnhmhhdd_aY[SVOTMQLLGGCD@u?B>B>B?B?FBHDLGNJPKPLPMRNVPUOUOUOVPTNRLQKRLRLRLQLNHNHMHMHOHNGLEKDLEKDJCJCHDGCFBFBC?D@D@D@C?A=@<@<>:>:>:@;>9=8=8~<8|:4|:6|:5z84{;6@:D>E?GAGAE?|B<~BGAKEF@~B@@@@@@@@43222211257:=@DFJ"L#N$ P& T'#W($Y*&Z+'^+(]+(Z*&Y*&V'#S&"P$ N"J H GDCA@>:9888666::;;:<=?BFHMO S#X&#\(%d.)k50p:5zC>~HBNIRMXR`Xh`pgqhkbe^]WXSXPXPUMRJPJNGJEFBDB{@>x@=t;8o85n64j52h41c2.b1-`/,^-*_.*^-*],(\+(X*&V*%T(#S'"U(#T&"T&"S%!U%!U%!V&"V&"W'#W'#X($X)%V)(W*)X,+Z.,^21`42b65d86_83`84c94g84m<8p<9s<:v<:w96x:6{:7|;8<9<9<:<9C>D?FAFBGCHCHDHDHCHCHDHDJFIDHDGBFBFAD@D?E@D@D>C>B=B=B>D?A<@;=8<7;6}94}94;6}94}94~:4~:4~<7};6|:5|:5~<7|:5};6>9B=E@GAF@E?D>E?E?ICHBC=x<6w;5r60t82s82m53i30e/,a,*`,)],([+'Z*&V&"T$ Q"N!M K J ILMLLHJJ K"N"P#R%!T&"S&"S&"T&"T'#Y)%Z*&\,(]-)]-)Z*&X($V%!\'$[&#Y&"X%"V&"V&"V'#W($V'&V(&T&%P$#L#!K" G F G EA?::9:88::998899887788>?@BAAAAAA@@2210110002568;@BDF I!L"R%!U&"V($X($_*(]*'\*&[*&Y)%W($V'#T&"P$$N"$M""J !F FDB><::866699:::889@CFGIMR"T$ Z*$`.(d2,l:4p=7vC={GANGRK^Uh^i`bZZTWSYU[R^S^V^T\T]TZSWPQNMIJGFBA={?:v:6q83k41j30h2/h1.f/,d.+b,)a*(_*'^(&['$Z&#Y'$X&#X&"X&"Z'%Y&$W&$V&$V%#V&$V&$W'%X)&Y*'Z+(Z,*\.+]0-_2/`41^41^41_30`20d31e42h42i53n85o85p85r86q64q53r43r42r71s82v:4y:5y94z94};6~<6{<7|>8}?9~@:B=B8z>8y<6x<6x<6x:4z;6{;6|<7}=8~>8?:A@:<7|84{72x4/z61}94;6{94|:5};6};6~<8Bw=7s93r82t:4r82r82r82j2,e.,c-,`-+_,*[*(X'%T$"R" R"O"M K K!I H HLNN N L M! L$"O%"U'#U&"T&"T&"U&"W($Z+'\-)`.(_-']+%\*$Z("Z("Y'!Z'!^'$]&$[&#Z%"X%"W'#X($W($T&$T&$O#"K! J G EDBA?<:88888::8877788888:;ABBBBBBBC BA@43223221112458<>ACFJ N"P"R$ U&"\(%\(%\(&\(&Z*&Z*&Y*&Y)&U&&S&&P$$N##K!!I !H F @ ><;8666:9::6665=>@ACDIJQ#U'#X*&`0-b2.h84n<9tB>~I@PGZQ_V\VSNQNVS_Ud[pexo~tvv{stpnllhgda^\XTPOJKHFD|A?w=;t:8r86o64m42h/-g.,d,*c,)b,*b,*a,(`+(\*([)'Z(&Z(&X(&Y(&Y)'Z*(Z)&]*'_,)_/+`0,`0,`1-a2.c31b20a1/a0.b/-c0.d0.e1/d30f41i62k63l63l52l41k30i2-i2-j2-l1,n2.p2.p2.p2.l2-l4.n50o61o61p72r94s:5t<8u=8u=8v=8u<8t<7t;6t:6t82u82t71s60w:4z<6}@:B<~<7|:5y72y72~<7}<7};6|:6=8@;D?FAFBE@C>C>D?IDKFICHBz>8r82r82q92r93r93p81n5/i0*h/(d,&`+(\*([)'Y)&T$!R# Q" O"N"N!M!K!K#J"H"H!N P! Q#"R$#R&%R&$P&$R&$X(%Z*&[+'\,(]-)\,(\,(\+']*$^*$])#])#\("\("\("\'"\$"[$!Z# W# W%"X(%X)&V($Q%$P$#M" H HECA?><:788988::887689:;:<>@ABBBDDDDE!C B@4444665444555666<@BFG J L"O#V&!X'!Z)#\*$\*$^+%^+%`,&\+$Z*#X)$V($V)&R'&N$%L"$F# D!A?<<88<::78666::<=@@ABG J" M%#R(&U+)Z-+_21f75l:4uA;~GANIRNNKNLPNSP]Zlh~yχă|y}wxvzwyuvqtnpjkch`d`a^^Z\WUPRNNJKFHD}F@xB8}>8{<6z94|94|:5};6|<7|<7~?:C=E?FBFBFBFBEAGCIEKGHE@>|;7y:6s73s:4s:6p:4l61j4/f1+d.)e/*c.(`+%^)$V*#T)"R' Q&P%P%P%O%L$L$L$L$L$L$ M% N& M% O&!Q'"R($T($W($Y)&Z*'^+(_,)_,)`,*]*'\)&[(%Y&#])#_+%`,&b*&a*%b+&a)$^&!X$!X$!V$"V$"W'&V&%T%&R%%J" H!FEEDB@9888999988885556:<=>@@@@>@ABDCBBECCD55557665555566669;?@DEI K"S% T&V(!X("[*$\*$_,&`,&`/'^/'^.(\.*[.+X+*T((Q''L$"J" G EBA>=>>;:9877::<<<==>BDH!J#!N%#R&%V*)Z.,^0*f60n:4x@;E@GCHEGDHFQN^[nj{w|xxszŁ|ʂ~Ȁzztwpumrjogkgiefbd`b^`[\XZUWSTPQLNJJEJD~HBzFAtB>r@=p>;o=:n<8n;8l:6k96h95g84f73g84e62d51d40d40e4.f4.e3-d2,h60h60h60h60g60g5/g4.h3.j3.k2-j1,l0,l0,l0,l0,l0,l0,l0,l0,l0,n3.o4/p40p40t84t94v:6v;6r<4r<4s;4t;4v:4x:4x:4x94=8=8=8=8~<7{94|:5=8>9@;C>E@HCHBGAF@GCHDJFJFHDD@~?;z;7z84z84x84t73v<7n72g3-e2,c1+a/)^,&\*$],&\*$Z("X'!R( Q' P&O%N$N$N$N$P% P% P% P% T($T($S(#R'"S($T($U)%W)%Z+'\,(_,)`-*`,*^+(]*'\)&[(%]*'_,)a.+b.(d0*d0*d0*b+&a*%]'"Z$W$!V&"W&$X(&V&&S%$P"$L!"G ECB@@>=9888888888888888=>>?@@@@?@ABBBA@CB@B555576655555666678;<ACEFM"O$R%!T&"X)%Z*&\,(^-)b2,b2,b2.a2.`1/]0-Z-,X+*V&$S%#P# M"K H FD@@?=<;::::<<:;<<>@DEJ" L#!O&$R(&T*%Y.*^0,e40n85w><|@>}><>:B>JFVQgbtosnto~vx{srjogoendnflfjehbgad^b\_Y]X^Z[XXTUQRNPLNILHLHJFHCEAFAD@B>|A8p>8o=7n<6o94p94n82n72n82n82n82o82n4/n3.l2.n2-o2.p1-o0,o0,s3/s3/s3/s3/v62v62v62v62x84x84z96z:6z:6{:7|;8|;8z>8z>8|>8|>8?:?:@:@;>9>9>9>9C>FBHCFALFJFIDHCHBJDLFNHIEFB~A={>:x:6w:6v84u84x;7v:6r83n61g3-b0*^.(^.(^0)].([,&Y+$X)"W("V' U& S' R& R&R&R&R&R&R&W($X'$X'$X'$X($X($Y(%Y)%Y*&\,(^/+a0,^,)^+(^*&^(&]*'^+(_,)`-*`-*`-*`,*_,)b,*b.*b-*`,(^)&['$X%"X%"W&"V'#U&$T'$Q#"N" K HDCA@>>=<88888888777789:<?@@@BBBBAABBBA@@B@@@5555766544446666678:=?BCH!J"M$O% T($W*&Z,(^.*b2.b2.d40d40b3/`0.^.,\,*]('\&%X$#V#!R!Q NLDCB@>><<::<<;<<=<>@BF F H I# L&"P*$R*%X-(^/+d30j84n86s84t94w;6B>JFVRc`hdmdukvmpfkblcndpfsjwn|tހxۀw~v|tzstnqlmhjdhbd^`Z\VYTVRSOQLNJLHJEHCGAD>C8|>8z<7z<7z<6z<6z<6z<6z94|:5};6};6~<6<8=8>8?:?:?:?:>:>:>:>:>9>9?:@:@:?:?:?:@<@<@<@B>HDJFKGLHKGJFJFLGMHNHNIPJKEGA|B8v95v95v95v95y<8x:6u84s83n72g2,c.)a/)`/)`1*_1*]/(Z-&X,%W+$V*#U)"T(!T(!S' V( V( V(!V(!V("V("V("W("\(%\(%\(%\(%\(%^*'a,*c.,a.+`,*^+(^*'](%^*&a,)b-*b.,a.+a.+`-*`,*_,)_,)^,(^+(_,)^+(\)&X'#U%!T&"V'#V'#T&"P$!N# JIHE@?=<<<<<88887777::::;<>?@AABDDDDBBBBA@@?>=<=444466662111222266677:>AD G"H#J$ N&#R(&V,*\0-`/-a0.c20d40c3/b2.b1-c0-c+(b*'`(%]&$Z$!W"T PJHGFDBA@=======<:::<@BEF E"F#J%!L&"R(&V*'Z-*_0.e40f41j42l42r86z=;HGTR`XbZe\ldjbg]d\kcndwlւwۆ|څz؂x|rxnunvoyrwptnrloimgjdjehce_e_b\_X^W\U[TYRXQUNTLRKPJOJNJMHLGKGKFJFJEHDHDGCFBFBEAEAD@D@D@D@EAD@D@EAEAD@D@C?B>EAEAFBFBJFJFLHOKLHLHOKOJOJOJNJNJOJOJNHMHFAC>~@:z=7z>8w=7v<6v<6v<6v<7t:6q72p61n4/j0+g.)a/)`/)`/)_/)_0*^0(\.'X,&X,%X,%W+$V*#X,$W+$W+$W*$[+%[*$Z*$Z*$X'!Y("[*$],&a+(c,)d-*e.+f/,d.*b,(`*'`*(a,)c.+d/,d/,b/,b0,b/,b/,c0-f20b/,b.,_,)^+(^+(`-+\)'W&$U$"T%"T&$R($T(&P% N$J GFDB@>=<<999988887777:;<<>>?@ABBCCDEF CBBAA@>==<<;4444666621112222444647:<>@B D I$ L'#P*&T,)\-,^.,`0.b0.b/,b/,d0*d/*f+)e*(d)'b)'a(&_(%]&#Z$"R"!O! N LJHFD?>>>===<::::<=@ABC D!G"I#J$ N&"S)&X.*Z.*^/+a0,g2/j20p64u:8}FAQJUOVO\UaY_X]VcXg[rf~rфx~svkqf|s拂|zptkriogpgpjoimgkdlekdhaf_d\b[`Y^W]V\TZSYRXRXRVPTNRLRLPJPJQKPJPJOIOIPHOHNGMFLFLELENHOHOHOHQJQJRKRLRLSLTMUNQMPLNJOKUQTNUPSNTOQLMHKFB>A<>9}<7}>9}?9|?9{?9x>8v<6t=6s<5p61o50l2-j0*f,'g-(h.)g.*a2+`2+`2+`2+`2*^0*^/(].(].(\.'\.'[-&[,&Z,%Z+$Z*$\)#^*$_+%`,&b.(b/)d0*e1+f/,d.*b,(b+(d,*d-*d-*d.*d/,d0-d1.d2/c2.c40d51e62g52f30f30b/,^*(`,*`-*_,)Z&$W%#T$"S$"S(%P'$N'#M&"H H FEDB?>:988777777778888=>?@?@AABCDDF F F F BBA@@>=<::98666666660///000000024578:<?@ C F" J$"L&$V&(X('[))^+)`+(`,&b,&c,&g,'i,(h.)h.)e-(c,'b+&`*&Y('W'&T%$R$"Q$"N"!L H D C BA???>:88::;==AACDF G I" L%"N($R(%V*'Y,)[+)_,*c.,f0.j20q:6y@=JFLGQLUO[T\RYO[Q`Vjasjwntkqfzoڀvshh^oetjukrkohmfmdjamdnemcoepepfpfmblbj`i`icgbf`d`fad`b^a\a\a[`Z`Zc]c\b\b[aZ`Y_X^WZTYRXQVPXRXQXQXP\U\U[TZSXTUQSORNNIIDGBC>A<~@;~@:|>9~@:~@:}?9~?9}?9|>8x<6v<6r82n80l6.k4-h0,f.)d,'d,'f.)e-(d,(d,'^/(^.(^.(^.(^.(^.(^-'^,&\+%]+%],&^,&]+%^,&`/)b0*g3-f2,d0*c/)b.(b.(b.(b.(c,)d-*f/,g0-i2/j30k41l52j64j74h84h95f95f:5e:5f:6g62d1.c0-`-*^+(_,)\*&Z&$Z&&V$$U$$T&%O&$L$"H# F"G!F F D ?>:998777777888889:<@ABBABBCDDEF F F F F BA@@<<<<:988666666660///0000//01144567:;>BD!G" P!"R"#U$$X%#](%`)$b*$b+%g,(g.)i0+j2,j2-h1,h1,f1,b1/a..],,[+*Z+*V)(S'&P%$J%#I$"G" F!DCB B 9::<<===BCCCBCDF G!K"M$!Q&#S&$W(&X(&Y(&^&'a**c.,i20p:8xA>zEAIDLEPHRJQJRKVP_Xg`ncnbmbshrhjaj`ofnhkdiajbvn~uނz܄zԆz҄yρvszoynxlvlrlqlojnijfhdfad_e`e_d^d^d^d]d]c\hbg`f^d]e^d]b[aZ]V[UXRWPSLPJMFJCC?A=?;?:A<@;B>B}C=z@:x>8v=6v;5v;5u:4t:4r93n5/k4-h2*f0)f.)d,&d,'f.)d,'d,&c+&c,&^.(^.(^.(`.(`.(`.(b.(c/)d0*e1+f2,g3-g3-f2,e1+d0*c-(c.(d.(d.)f1+f0+f0+f0*g2/i41k63l84l74l74l74l74i84h84h84f84d:5b94_72^60b0-^,(^,(^+(Z($X&"W&"Y'$Z&&V%$S$#P%$I F D BF!EB@=:8787665555::::9:<?CDDEDFFF EF F G!F EDC@@?>::::8665<;986643111122103334444412689<>AHLN!R!X"![$"_&$a(&`*(b,*f0,h2.l42n42p64p75l74j53f41c2/`1.]0,X.)W,(V('U&&R%$O$#L$"I" F D@@AACCCCCCAAB B @ @ FH I" K#!L$"M%#M%#N&$N$#O&$R'&V('[)(a..k55q::u@=wB>}D@HBHDJDLENFRJ\SbZbZc\ibkdf`d^f`gag`hbqj{tڀy҄{~uzqzqzqulqhpfjeidhcjdjdnhslwpwnyqxpunqjlehbb\`X`X]VZTWQTNQLOJIDEAB=A{E>yC8t=6s<5r<5r;4q:4q:4q:4q:4n62l60l50l40j3.j2.h2,h1,i2-i2-h2,h2,g4.h4.i5/i5/j60i5/i5/h4.j3.h2,f0*e.)d-(e.)f0*f1,d2,e4.g60h71j93j93j82j82m63n53m63m63i41h30g41h52d62f84f95f:6e84a51]1,Z.*],(\*&X($V&"U&"W($V($S&"N#"M"!I!H H!F BA?><;<<<<86655668=>@@@@ABHHGGH H" H" F I!"H !H !G G FFD=;:888886666>=<:87643222221144444444214669:<BCHKQ T! Y$"\%$\)&^,(d/,g2/m63n84q86s:8r:8o:7n96k96f62c40`2._1-]-,Z,+X*)U)(R(&N&$K$"I#!F# G!F EEFEEC@@>@>>>@CDE E F F!G" J$"J$"K#!N#"R$"V%$[((]**c0.f20l74q<6v>9z@:C=E>D=B9>9?:?:@:D>HBFBE@D>B=E@F@F@D>{B8v=6t:4s:4r93r82o82n82n82n82o83o83n72n62n82n82n72n72n72m61l40k4/j60i5/h4.g3-f2,f2,e1+d0*g0+h1,i2-j3.n72n72o83o94l:4l93k93k82i71h5/f4.e2,j20j20j20h20g2/f30f30f40i:6h:6g84e62`1-^/+[,(Z*&X'$W'#V&"U&"V'#S&"R$ N$K" J!FFEB@@>=<;;;;;::988:::?@AABBCDJJH H H H" H" F H""G!!F EDDCB<:9866666666B@?=<:98666655444444444421346889<>ADHLP R"!V%#Y(&^,*b0.g31j44n86q98r:8r<8q<9q<:n;8m:7j:6i95b41`30\2.[0-W.+T,)Q*&O)%M($K&"I$ H#G"F"E D D C B>>>< =@ A A B B B C"D"D"E"G!H!L#!N"!P"!P"!V&$X(&\,(`/,f4.h60l:2o<5v=8y>:|?;~?;?<@=DAGDMERKWPWPZSXRWQYSYSZT]V`Zf`ickekelfhcd_c]a[c\hamfphrlrkohg`^X[TXQUNWOVNTMMFJDGAD>B8>7>7?8B8z>8y=7y=7x<6v;5r:5q:5q:5q:5p94p94o83n82j2.j2.j4.j4.k4/j4.j3.j3.i4.i5/k71l82k71l82n:4p<6r;6q:5p94o83p84n62k4/i2-j4/i3.h2,g1,h1,h2,h2-i2-j20j20i20h20b/,f30g73g73f62f62b2.^.*]-)[+'W'#T$ X'%W&$U&$T&$R%"O$ M"L!G FDB@?><<<;;<<<<::;<<<<>?@@ADEF G J L J J H H" H" F H""F DCBA@>:98866666666DCB@>=::777765444444444420233554469<@BFH N!S$"X)'\,*_.,c1/f42j64n85n96p;8r=:t@;r>;k<:i;8h:7f86c63`41]2/\0-X.+V,)S*'Q(%O($N'#K%!I$ I#!H" D!BA ? ? @ @ @ @ @ @@A B A B!D# H$!I" I" I!I P! P!P# R%!T)$V,%Y0)]4-d42e31h42l64r:9s::u:9t98v<5x>7A;D>FAJEMINJNKNJOLPLPLPMSPVTZW\X_\c`d`d`a]]Y\V[U\V^Xb\b[e^c\d\bZ^VXRWPUNRKOHLFJCH@G@G@E>C;B:@;~>:|<7z<6z<6y=7v<6t:4x:4x:4x:4w93v82v82u71t60r84p84p84p84p83p82o72n61o72p82q94q94t<6u=8v>:x@;t<8s<7r<6r<6p94o83n72m61l60l50k4/j3.k4/k4/l40l50n62n62n61n61n60l40k3.j2-h2.h2.f2.e2.h52i95h84d40b.,`.*^+(Z($X%"X%"Z'$Z($V'%T&#P$ M"L"J I J#EDA@=<;;;;;;>>>>=>>??@@BDEFFG H H!J" L! M! K" K" H H" H" F F""D B@>>=<988855556666CDDCA?><;::99887544344441133466643448:>BGK O$"S&%V('Z+*_/.b20f41h63k:6n<8r>;u@=xB@wC@tD@sB>p?:n=:l<8l:6j84e41d2/^0,\.*Y.*W-(S*%Q($P&%O&$N&$L%#J%"H$!F" D!D" D" D" D# B B B B D# D# E# F# G$!I#!I#!J#!K L L J!J#K$ N)!O*#T)'Y*)\-,^/.^..a00d22f43h72i71j60m60t94x:6|;8<9B@CADBECHFJHJHKIKHKHKGKGMIOKQMSOWPWQXQXQVOVOUNUNVNVNVNVNXPXPWPWPXQVOTLRJRJQIOGNFLHLGLFLFLFKEICHBHBGAF@F@F@E?D>D>|B>|B={A8v<7s94s94r83q72m61m61n62n72m61n62n72o83p94p94p:4p:4o83o83o83o83p84p83o72n61k3.k3.j2-g/*g1.h30i63k85f62d40_0,\.*\,(Z*&W'#U%!X($X($W'#V&"P$"M! JGFG F CCB@=<;9:<<<<>>?@@@@@@ABCH I J J" L#!L#!L#!L#!N"!N"!L#!L#!H!F F EBA@@<<<;666666666666DFF EDBB?@?>><<;:65444444113346664444669<@DG J" N$"R&%W*)Y,+]0-`3.d62g84l;8p>;t@>tB>vB?v@=u>;t<:r86q86r75q64m42l20h0.d0,a/,^.*Z+'X*&X)(W((U'&S'&Q&$O%$M#"K"!I#!H# H" H" G" G" G" G" H" H" H" H" H" H" H" H" H !H !H!H!H"H"I"J"N$ P%"R&$S(%U*'V*(X,)Y-*]0,^0,`0,b0,e2.g2/j30m31p0/s20v43w65|:9}<;>=@>A>B>D@EBEBD@B?B>CG@HAF?HAKDMFPHPHPHPHNFNFNFNFLDLDLDLDLDJBJBH@JDJDICHBF@E?|E>|D=~C=~B<~B<}A;|@:{?9z>8z>8x>9x>9x>8w=8v<6v<6v<6v<6t:6t:5r84r83s94s94t:5u;6r:5r:5r:4q94r:5r:6t<6t<7r<6r;6r:6q:5p94p94p84o83o83n72k50j4.j3.h2,i3.m61l74h52e2/a1-\,(Z+'Y*&V)%T&"V'#V'#V($V'#T&"R$ P"J I G F DDB@@><::888=>>>>?@@BBBBDDEF J" K" L#!L$"L#!L#!L#!L#!N"!N"!K" K" F EDC@>=<::::666666666666FHF FF D D E!!B B A@>=<;765444441133466666445457;>ACI!"L"$P&&Q((R+&U-(Z0,]2.c51h95l<8o=:v>8v<8w;6x:6t62x63y74z84w51t40r3/n3.j2-g1,a/)_-(`+*]))Z''X&&X&&U%$S$#Q#"L#"L" J!J J J J J J" J" I" I" H" H" H" H" F!!F!!G!!H!K"M"M"N!N O O"P"P#R%!T*%V,'Z*([+)\,*\,*^.,^.,^.,`/-f/.f..e.-d-,g0.h10j21k32p51s62t84v84w95x:6z;7{<8z@8y@7{?6|>6@8@8?8?8?7~>6~?7|>6~@8~@8~@8~@8B:B:B:C;C;C;B:B:C=B<}A;|A;{A;yB;xB:xB:yA:y@:x?9x?8x>8v=7v=6v<6v84v95v:6w:6u84u84u84u84u84u84t84t84r51s62t73t84r:4q94r:5r:5r:5r:5s;6t<6s<7r<6q:5p:4p84n82m61l60h5/f4.e3-d2,f4.i60j71g4.d0.a.+[+'X($X)%W($U($U($T*%S($P&"O% L"K!J IEEFDB@>>>>=:::9:>>>>>>@@DDDDF G!H" I" L" N"!O#"O#"N"!N"!N"!N"!N"!M! J!I EDCB<;::8888666666666666DEEDG!!G!!G""H##F##E""D""D!!@??=8765444422344666555543349<>@BEH !I""L'"N)$R,'V.)Y/+_3/d73h95r94t84v73w62x62|7496:8<8~;8|;8z;7v:6p94l72l51l44j22h00d..`+*^**\)(Y('U'&T&%R$#P#"O" O" O" O" N! N! L" L" J!I!I!H!D!!D!!F!!H!JM P P!P P!P"Q"S$P$O#O"V&$V&$X(&X+(Z,*X,*X,*X,*\.+^.,^.,^/,_0-^/,^.,^-+e.,f.,f.,g.,j0.j0.l1/l2/l6.l7.o8/r80t6/w70z70z70x81w81u81v91u80s90s90t90v92v81v80v70v80x70x80w81r60p5/p4.n4.n4.l6.m6/l6/l6/l5.k4.j4-l6.l5.k4-k4-m1-n2.p3/p3/p3/p3/p3/p3/p2.p2.p2.p2.p2.o2.n1-n0,n3.o50r83t:5t:6u;6v<7v<8r;6q:5o83n72m72k60i4.h3-e4.e5/f60f62e50a1,^.)\,'Y'$Y($Y)%Z*&W)%U($S'#R&"L% J$H"G F H!H"I#DDBBA<<=>>====<<@@@@BC D D!H" H" H" H" J" J" K#!L$"L M! N" N"!N"!N"!M"!M"!M"!L! H GDBB@98766666666666666666>>@DG!!H""I""J"#L" L! K JGGDA?<;:866587543322222222124589<<>AG!J# L&#N'%P)'T,)X0.\30b4/f6/i60l4/p40t51z74}96{<8|>:{@;~E@}FA|GAyF@yE?|D@yB>t@9n<7l95h61f4/b20`0.\,*Z*(Y+(X*'S'$R%"V##W""V""T""Q Q N N J H H HJ!J!K L N OOOP!P!P!P Q R" S#"R$$U'&T('V*)W+*X,+X,+X,+X,+Z-,Z-,Z-,Z.,b/,b.+a-*`,*b.,b.+a-*`,*f/*g/*g/*i/*l2,o2-p3.r4/n60m60m60m60l4/l50m60n61o60q61r62r72q61q61q61q61n61n61n61n61n62n61m50l40p72o60o50p61l2.l2.m4.n4/o1-q2.q2.r3/r3/r3/r3/r3/t40s40s40s40t51r40q2.p0,p2.r40u84v<6t:5r:5r:4q94p94n72j60h4.h60f5/f5/f60e51d40b1.`/-\+*Z('X&'W&&S($R)$R($R)$R)$P(#O&!M% F F F F F!F ED@@@@>>>>?@@ABA@@BCEF DF H" I#!J" K" L" L" L M M M M!"L L "N$$J"#J""H!"H !E DBA@>><87776666666666668:::==>CE!!H""I!"J"#N"!N" M! L I J HFCB@?;:8788744422211111124567779<ADF G!H" J$"N(&Q+(X.(\0)a1*d0*i1,n1-r3/t51w:6{>:|B=HCLFNHOIMGNILGHD}GBzE@yD?xD>vB=>=<;86666666666666667888::=@CEF G !J!J!J" K" I J!J HEDBA@><<<99664443333333344554469@BCDEF J$"L&#P)$V+&Z,(]-)`,(d,)g,*i-+n20s64v;9|B@HFLIKHHEIDIDHDHCHDHCHCHC|DA|B@z@>x?=<<;:66666666666666665555778=>@BDEFI J IKKIJ I HFCB@?>>=:87553333333344444468=>>>?@B E"H"M% R(#T($W($Z(%^(&^)&b*(g.,i1/o74u<:{DAHF~GD|E@~GBJELGPJNIMHLGIGHFFEFDDCBB@??>|>>y=>BDDGJMMM L L J I I G FDDBA@><9854445443444444448::;>?ABBE H"L# P%"R&#T&$V&$X&$[(&`+*c.,f0/j54r<;wB@wD>vD>yE?~HBLGLGJEFBFBC?B?D@C@B?@>?==><=;;::~88|88|87x76p96m85l74k63h20h20h20h20b0*b0*b0*b0*c0*b0*b/)b.(c/,b/,a.+_.*^.*`0,`1-_1-].*^.*^.*^.*^/+^/+^/+^/+_0,_0,_0,_0,`0,`0,`0,`0,^.(^.(^.(`.(`-'a-'b-'c,'d.(d.(d.(d.(f0*g0+h0,h2,i2-i2-j4.k4/l50l50l50l50m50m50m50m50l4.l4/m50m50p62p61o50n4/p60o50n40n4/m50m50m60m60n62o82q94r:5q:4p83n61l50l4/l4/k3.k3.m61l60j60i60e3-a1+^.(\,&\*$\*$Y)#X("Z,$Y+$V*$V*"T&"S&"R&"R$"Q#"P" N!L IHHHI I I I HHHHGGHHHI J!J!L#!K" K" K" O$ N$ M#L"M#M#L"L S"T"T"T"V# V# V# V# V""U!!S!!R R"!P"!N"!N"!I!"H !FD@><;;;;;88886666666666666666433224468::<>ABFHKNOP!N "O "N!"L "K "J !H !G FEDB@>;::8876653333444467889:;<>@C E!H"I"J# L# P$!R$"S&#U&$X(&\+)b0.f42l=8o@:qA;r@:v@:~FAHDE@C=B=D?F@D@C?D@C@CCCDCDCD@A@@@@??~>={><::888866666666666666666666444422436688<<@BFJNPP P!Q "P!#Q#$P$$P$%N$%M#$M#$J"#I!"G!!D BA>><<998744444444667888889:=>B D E!F"H# I#!K$"M#"N"!Q$#T&&V)'X0*_6.f:4j<5n<6p<6w@;~E@B9@B@FCHEKHMJMJMJLILHKHJFIEHDFBEAC@B>C=B<~@:|?9z=7z<6y<6x;5v84u73t62r62p61p62n61m50l2.l2.l2.l2.l3.l3.l3.l3.i20i20i20i20k42k42k42k42j4/j4/k4/l4/m50n50o50n50l40l40l40l40l50m61m61n72q61r50q40p40q40q40q40q40l4/l4/l4/l4/k3.l4/n61n62p61q72r83r83t:5s94r83p72m82k71j60i5/j60j60l82l82l82k71h4.g3-f2,d0*a-'^+%\*$\*$[*$[+%Z+$X,%X,%Y,%W(!V& U' T& R&Q%O%N$M#M#L!K JJIII I I I J !J !J !J !N"!N"!N"!N"!M! N" N"!N"!R$"P""P"!O! LN O! P" R#S%U' V("V(!W)"W)"X*#X("W'!V& U%T$S#R"Q!P P O! L" J" E"B!B BA@<<:766666666666666666666666665688220244668;>ADJNQNOP!Q "S$&Q%&R&'S'(P&(P&'N&&L$&J$$I##E!!D @@@?<<<:66664444344566668888;>>?A C!F"I" G I K!L!L& N( T-%^1*d6/h60l82p83x<6|>8~>8<7:6<8>;@=C@GCLHOKPLPLPKOJKHJGHFFDFCFCFCFCFAFAFAFAE@D?D>C>@=?<?;~?;|=9|>:y=8x;7x:6x:6x:6x:6u84u84u84t84q86p86p86p86p75p75p75p75n60n60n60p60n40p40p40q40l50l50l50l50l50m61n62n72t62u51t40s40t40t40t40t40r84p84p84p84r:5q94q94p84r83q72p61p60o50p60p61o61o<6m;5k93j82h60g5/f4.d2,b0*`.(^,&[)#\*$\*$]+%]+%\,&\,&]-'\.'X*#U)"U)"T("W("W'!U' R& R&O%N$N$N$M#L"L!L L M!"M!"L""L""L""L""L"$L"$L"$L"$N""N""N""N""P$"N"!L KN O! P"!P"!R$#S%$U'&V)'Y*$Z*$[+%\,&\,&\,&Z*$Z*$X("W'!U%T$T$S#Q!P P! N K G D @<;??;:98654444555566666666666666669;=>SDL2_gfx-1.0.4/test/sample24.bmp100777 0 0 407616 12217637577 11410 0BM6(,X  4444685778:=@BBBDFF H!G G H!H" F F EDDDCB@@@?>>=<>=<::::::::::;<<>?@>??> B M! P" P" N"N!N"O#O#P#R%!V)%X+'Y,(^0,b40d62f80h91g80f5-h4-k5.l5.n3-o0*n.*n.*p0*p0*q1,r2-s4.r40q40p3/p2.p2.p2.p2.p2.o2.n2.n0,m0,n2.n2.n2.n2.p2.o2.o2.o2.l0,l0,l0,l0,j1,i1,j2,k3.j2.k3.l4/m40q40p2.n2.o3/l2.n4/l4/k2.p3/r3/r40r40r40r40r40s40v62v62w73x84w73w73w73w73}:4~:4~:4|:4|;6|<6{<7{=7z<8|>:|>:|@<|@:u=8v=8v<8r:6o83k60j60h4.f4.f2,e1+`.(_-'`0*_/)^0)]/(^+(]*']*'\)&Y&#X&"X$"V%!S'$R'$P&$O&#N($N($L'#K'#F& E%F$F$G#H"F F EEEEDDDDDDDF EF F G!J$ J$ L&"M'#L&"N($P*&P*&R,*V,*X.,Z.-^20_10a32d64b41d73h84h84j:6k;7m:7l96h84g73f62d51a2.[.*W*&U)%R$ O"N L!L"H FB?><:9654466655555555555555555566::;<55556868:;>@BDDBCDF G!EF F G!CBA@AAAA<>><<<;:<;98::::::::;<<=>@@@D!C"D"F" N R" R" P P R$T&U(!V*&W-(\0,_2.f73g84g84f73d3-f4.h5/i5/k4/l4.j0,h-(n0,m.*m.*n0,l.*m.*n0,p1-l2-k1,j0,j0+j0+j0+j0+j0+m3.l2.l2,k1,l2-l2-l2-l2-m3.m3.m3.m3.n4/n4/n4/n4/l50k4/l50n72m61n72n82o83s:5r94r:4s;6s;6t<7s<7r;6v=8x=8w<8w<8v<7v<7v<7w<7y:6z;7{<8|<8z;7z;7z;7z;7~<6<6<6<6<8=8>9?:~=8>9>9?:@:A;BD?E@D>|D>zD<:87466655555555555555554566678866666788=>>ABBDEEEEEF DCBBBA@BA@@<;::98879876888878:;<=?@ACEEG G!G!H!O P Q!T$"W($Z,%\.'\.(\1,^4/d73h95f84f62f40e2/h41j52j52k41i2/i2/h0.i/-l20k0.j/-h.,j0.j0.j0.j0.k2.j3.k3.k4.j2-j3.k3.l4/l4/l4/l4/l4/n61n61n61n61p83p83q:4r:5t<7t<7t<7t<7r<7q=7r>8r>8t@:t@:uA;vBzD>zC>|D?~FAHB~FAGBHBHCHDHDJDJDJFJFIEIEHDHDHDHDF@F@E@D@C>AB=B=C>B>D@FAFAFAHBIDJEKEJDIBHB~F?zC8q;4m82j5/g2-h3-f2,e0+d0*c.)b.+^,)[*&Z*&Y+'W*%T(#Q&!P(#N("N'"N'"L&!L&!K% J$ J$H"F DDDDDDCBBBBBBCBBACBBCD!E"H" H" N'%P'%Q(&R)&T*&V,(Y/*]0,^0,`0,b2.c3/d40e51f62f62d40c3/b0-a.+^*(\)&X($W'#W($T&"P$ N"H!F ECA><:544454435555555555555555333355668:<=?@@ABDDEDB B B BAAB@??>>=<<::98876666667788::<=>@ACH" H" H I M" L! N LN P"!S&#W*'Z,(\0*_3,`4-a84d:5f84d51b2.e2/h20i30i41j52j52i41i41i52j63k63h40h30h30h40j42i41i41h40l71l71k61k60m82l82k61k60l72l72l72l72k60k60k60k60j60j5/i4.h3.h3-h3-h3-h2-i2-j2.j4.k4/k4/l40l50m61k60k71n62n62o72q83s94t:5v<8w=8x>9y?:}C>~D?E@F@FAHCJEKFOJPLSNTOTNUNVPVPRLRLPJNHJCJDKDLEHBHAG@E?C=D>F@HAHBHBHBHBKDMFNGPHRKRJQIQHPIKD}E>zB;t<6s:4p81n60l40j1/g0.g0.b.*a,)\*&Z(%X($V($T'#R&"R(#Q(#R)$R)$L&!J$ H"G!EDDDBBBBBBBB@@?>@>>@>=@ADF G H!J"L$P& Q'"U($X*&Z+'[,(].*^.*_/+`0,b/,a.+c.+b-*b,*`,(^*'\*&[*'Y)%V'#T&"P%#N$"K#!I" ECA>87656544555555555555555533336688;=>>A@@ACDFFBBBBA@@A>=<<::9887664566666688::=>@@BC D"F" L#"M"!N! N OR V##W%$R$$R&$U*'X.*[1,_5.b82d:3b:4c94b51b2.a/,e0-h1.j2/g31g42f42e31c20d20d31d42f64f64f64g64g64f64e42d41j72j60i5/h4.f2,f2,e1+d0*b.(b.(b.(b.(b.(b.(b.(b.(c/)c/)b.(a-'d0*d0*d0*d0*g/*h0+h0,i1,j2,j2.k3.k4.l40k4/l4/l4.m3.o2.p2.q2.r40r62t73v95x;7z<8{>:|@>><<=::=>@ACDFH I!L"N N!R#S$ V&"V'#X($Z($^)&_*'a*'b+(d-*d-*b,*`,)]*'Z*&Y)%X($T(%R'$P&"M%"J$ H"F"D <:8766545555555555555554211189;<>>=<?@BCBDFFBAAAC @?>:8777655766434456789:;<>?ACDE F"H#!J$"M!O! R! T"!W##X$$Y&%Y'&T*(T*(U,)W.,Z2.^70c;5e=5b94_50`40f74g52i52l42k52h64h86i86g64h86f85d74b64b52a41`2/_0.`1.^0-\.+\,*_.)^,&\+%Z*$[*$\+%\,&],&^.(^.(^.(_-(_-(_-(_-'_-'_.(`/)a0*a0*b0*b0*b0*d0*h/*j0+k1,k1,n4/n50o60o61p85q84p73q62p2.q2.r2.r2.q4/r61u84x:6z<8|>9~A|F@}GBHCJDNHOJPLRLVMXP\T^V`Yd\d\`ZXRRLOHPIRJWPZSXRRLLGIDJFKFLHMINJQLPKOIMHPJQKRMTNVQZV]X]X^Z^Z^Y^YVRPLJFHC@<}?:{<8w;6q85n63k40h2/d0,`.+\,(Y*&R*$P)$P($P($O'%N&$L$#J""G" E BBBBBB@@><;:;;778:<>?BCDEGFHK M!Q#R$ T$ V%!Y%"\&#`(%a)'b,)b,)b,)`,)`-*`,*]-)\-)Z-*X,)V*(S)&N&"L&"J$ H#@! >;9866555555555555555542222;<>@A @ @?@@@@?ACD A@>=>=;:98765556;:::8866468;<<=@CGI!H H J MN L"R# X$$\$(\)*X.,N.(L2*Q.(T,(N$#R*,R01W64b86i74g:4f:6d88b68d8:d87f84e82`72a50d2.g0.e.+^-)Y-(V.)Y,&Z,&[+'\*'[)'Z'%\&%^)(Y,'X+'X,(Z.*W+'X,'X,(Z,)\,,\-.\.,_.-a1.b0.c1.c2.b40a40_50_50_2.`0,`/,b/,h-(j.*i0,i2-l40l50n72p74t44t34q22p20q40s71u92t:1p>3r@5uC8xE:|H=J@MCNDQJQJTMWPXRYRYSZTZOXOWOVNRKPKNJLHMKLJMJPJRJPDN@OALCLEMFLELFOIQJRKULUMRKNGNGQITLVNVQUQXT\Wa\c\d\d\h`jaf]_VYPPHI@G?D<|@8~?:~=8}<8t62n4/h1,`/-\+)\+)[*(W(&V(&U)&S*'F'!E'"F% F"FEDDHE@;6644(*.489::::<=?@BCGJ K L P" S$"V&$X(&Z)&\*'^,)^-*]-)^.*`0,a1-`/+^/+\.*Y-)V,(S+&P(#L&"K#!H!FB@=9766655332555555554444>?@A A @ @?BBBBBBBA>><;:9877555322366665445::<?AABDH H!H!I K" M! N NO'$U(&Z)(\*,X+*T-(V0&U/$M( L'"DG&%F()N..\21d31c4.d41b22`/3^.0]..^.+].)Z,)[*(\)'\(&Z$#V$"V%#U($W($W($X($X($[+)Z*(Z)'Z*(Y*(X)'Y*(Z+)Z*(Z+)[,*\,*Z,-[,.\.-]/.\/,^0-`1-a2.c2.d2.e2/f30e0-e.,e.+g.,l4.k3.j3.j3.i5/h4.f3-f2,q41t54v86x:7z<8}@<~D>F?G?H@LCMDNEOGOFNFMFKDJDKDHBGAF@E@HBFBE@C@CADBDBDBDEDBFCHDHBHAI@JAIAJBJDLENGNHNHMFNFOHOHNHRLTNVOXQVQWRXT\V]WaZf^iah`f^iaofqikb`XZRWNNHJEHDE@B?B>z<8s86n32m21i/.d**a*)^*(\*(R*%R*%P($P%"N$"L""I F:9852)" *.26999:8:<<>@@BBBDFH J"N$"R&#V'#X($X*&Z+'\,(].*^/+`0,`0,_0,^/+\.*Y/*V.(T,&P*%O&$N$"H" F D @=;::875433555555555555@@@@ A @ @?BBBBBA?>;:886666644400/.01122456<>?>ACDEF FFI KL O#"P%$P)(T**V,-U..Q.*U.%i4(k+R)J( <:>""H('S,*Z-*\-)],*\+*[)+W$'V%%U%"U%"X%$V%$T%$P%$P%$S$#V$$Y&&X($X)%W*&X+'U*&U*&T)$P'"V'&T&$T%$U&%T%$U&%V'&V'&V')W(*W+*X-,Z0.Z1.[2.\2-`-*d-*f.,h.,j0.j/-j/-k1/f0+f2,g3-h4.h60h82k;5m=7t=6x?:|B>~F@HCGEFCCAB>A>@<@<~@<~@<|>:y<8z?9x=7y<6{=7~@:~>9~>8~<8:9<;=>>@?A@AA@@@>A>C@CBECGEGDHBHBJDLGNIPKRMRMNJOKSNVPUPVQVRXSZT]U_X`XbZd\g^h`gca^a\farlxssnd``Z^XZUQLOKMHLHGBBA~<;{:8v65p20n0.l.,h,*b,)_-)]+(X(&T'&R%$N"$J!"<DHL H 5 '0336:::;7668:<>>99<<@BF!H" N# Q$"R&"T'$V)&W*(X,)Z-*\.*].*\.*\/+Z0,X0+V.*V.(S*(R(&L&$K$"H" F!CA>=;96555555555555555@???A @ @?>>>><<;;9865666666520.,++,-/1378:::9:<> @@ADK M! N"!M$"M&$K'(P(*R*,L.,J1)]6+{oujVKB404@F# F#J$!M$!N#"N! P#"N#!L# J"P"#L"$F$$C$$C$$E""J "O !N!N" O$"O&#L& M&"J&G"L$#J""I!"I!"L$$L$$L$%M%&S'(U)*X,+X.,W0,T.*R.(R,'V($[)&^*'b+(d,)c,)c,*d.,f5/l:4r@:xD>vC=qB;l@8i>6m<1o<2p<5r<6r:8r98n55l12l..m//n21n42p65p65m54j42g4/i5/n61s94s84u95t:5t;6|<={<>z=>x?>xA@zA@{B@}B@z><|@?}CBEEEE|DDtC?rB>vD@{IELHMILHJGHGHGKH~PLPMPNONONTNYRZTZTXQZT^V_Ya_bbfdhekhpmkha_XT[Wa^b^[WTPRLOIIGBA~?>w:8t97r64o31n0.f-(c.(],(W+&Q*&N(&M(&M'&R&d'&f\كrkXp1"; .10..24662/../26822458;>A H!J"L# M$!N&"P'$Q(%S)&V,'W,(X.)X.*Z0+W/*W/*V.)V-+T+)R)'P'%M%#J#!H!FB@>;8666555555555555@@?>A @@?==<;;:865555456655520/+)---/2047673-,/99:>AKN L G H$"E$#O'(Q((E&#=(N*zmrfƁtL1*2;>;; < ? E"D!@ ;; <=;" 6 0/;>DGI I"I#K&J&H%@!=<<? B#"D%$D$$O'(P&'R*(V.,T-)W0,S,'N'"K'!N'"V*&[,(c2.b3/^3.f;7j<6o>8s?9s=8l82d4.\0)T+#X, \/$`0(b0*f2.f/.e,,b*+]**^,+`.-b21d32f66b22]/-W1+Z2-`2.c2.h74g62e83c62f34f57c65]42Z40^60b70d70Y0+V-(X.*\2/\10^0/`12\//U.)V/*T-(\3.`82a61d62`1-b/._/.^21^64`97`54e54l:8l=6n@8o@8n@8n>6q?8wD<~IC~GG}GGvDCxJHzML~QPPO}MKMKRPYV^[\XVPRJRJLHFBv?:n:5n;5q<6r:6r83l3.f1,[.'N*$H("F($J+&J'&V#(x:8ӆz|hnX}ll7-A/)%'*,.0('$$&*/0,++/147:BDEEH" I#!K%#L&#P($R*$R*%R*&U-(U-(V,(V,(U,*W+*V*)U)(S'&Q&%P#"N! H FC@><97666666665555A A @?@>>>887665436666788876653/300 2 3/1204;4/,(23;>!;EDLJG"=?#H NF"6 ?f\kbzc&:.6@>55 7?!@@:2.3302042.>BFH!M$P'N%N%D#><>>C"F&"G&#J#$I!"L#!P&%U*'S&$V*&W*&J+$G& X1,^1-`0,[/+T-(O*$\/(d2,h0*i/*i0+\(#O"O&O'T*"Y-&\.(a2,a.+^)%V# N&"S+(T+(]30`42\/,^/,Z.,H*#E%P)$Y.)Z,(X/*Q+&N*%U*)R)*I&#F("H,"L,!R+R(C#@!>E"L'"T+'N$ O" G"DH"N'"N&!R("T*%P&!H!K$"O%$P$#P$#P&%N&$K$!U% Z+$[.'T("X+$X*#]+%b.(_.,^/,[.+[0,b63b42g64i64g53p:8DBKHPLWPTMPGMGC=p:4i91j;3q>7v?8x=7r60j4-\/(P+#G& H)"L)%N)&I&$N& j\aNV" `MŒM0$ !!).64,%  )00($&(-/46=>?@B D"E" H$!J&!L&!M'"M'"R*%R*%T*&U+&W+*W+*V*)X*)W)(V'&V%$T$#N"$J "H EA?<:655466665555@ @?><<<:87664444678:99::44564:7 :< <7 ;732- < A63/ 5DF9;?FJF?:4GYH29 JBsnzq?4@ 5;G>-26=FA;3,+2;> @9 1 .:@EK"U($T%Z* Z(M!HEFJO$!Q&#M" H""G!!K#!R&%Z*(b.,b,*\(%J& I$Z+'Z&"\'$T#JK#U& _*$l0,k,(f'#]& U%J!J%O($U-(Y/(\.(\,%Y( V$K%M(#S+&]0,^.*b/+_(%U >D!JT#!Y&$S# L"I$ R%$L" I&!@">H#S$T!A<ADP#PTLBGGJ N#N O"K 6:FRSF98NU OP$N"P"S!T T'#M"J"J!P$ Z*&]&$`(&V'&\,*o64@~94n2,h1*l70v>7D>FA@F7. /% ,13 8 '(&'-.36:;<<<=>@ C"D"G#I#N&!O'"R(#S)$T('U)(W)(Z*(X((Y''Y&&X%%R$&O#$L!"I DC@>865444445555>>=<;::84322444478:;89:93224=Hi93ZUkeib^Wb2,@4&@ XRe^m81@ : _0)_XUOL)$:8XVYWo<8;14|F6 j&zi_i_^SngWUh.-@208X$[T]V`,(7 30 ]/)ZVa_JHW : 4<?F! N$!rB=ZSWMVKNIOJLH}FBr96f+'a$ c($T,*M((L%$T$#OLolTPb%!HJXTebJFZ!P KR$_,&l.(GAd_lfUN\0*J&"P*'V0*_2+NFkbla~MCT) N&Y/&^,%MHokWRh,'BZ1-TPOLSPTQZ,)L c-+[($@D$fB4n<.A3PBxOL^86AN`%TJi^ZQn:1EDFT#VLf^{F?: 3 b.)c`ZV_/(4 4j0,kfYT`-(EEl40hcYPU-#@M!VMmeF?\IN])&p4.JCkblai^a[]XXRVO[Ve`\WFAOIphibz?9]("\#URkgRI\,$H% F&!V,%JA|qxg6,/ 02@X! NJb\XU`1-7 4 0 V-)^ZRNA" ! #& +,.3778989;<>@BD I#K$ O&"P'#Q%$R&%U'&X(&X&&Y&%Z&$Z%$U$&P#$N "J HFDB;:8644445555;::9875434464566::::;:::<2-9 ]'o`ߌ~pbv@4gC4yl\U4#~A:~riZ鐀_R? \(܉y}hZP4&h^vntB !>j_xl_AOևxVA}tIF_F@}qx\OG! <ZQsdxlx@66i4)~utk~ukhzKG=F@"D% Z(&LHfZꎀscyl^aVshԒن|uhJ;n,&N(&A [}eWs~p`& Nhcyp~i.E G $B"N/"SBqudӁpth}wWKX-#T*`Pzh|jrvp~rn>/W5"j:*y`_|uÍf,&`4*bRԌ|qXK\2)\($؅}slU#/'jZJɃv}orj`^83>_"zlpbԀxmjyrmkB 3ZHuch^∄yhJcZpe}kČvZ:+@pepa|kԇzp60Xyok\pwkB26(riTݏ~\TGHS$ \-'wB9k^vzkzjՃqfVdXzt燂܃xE4}qgZ~p܌UNr6-ynXrqb^/+V*)V5)TCyjhZof8(=_vrrh̃rrgvf[:+J#ߎ~~iXI& , & '06788::::::<>BDH! I"!K!O$!P%"R%"T$!U& V&!X'!V"!T!!R P N LHEB@<;66432464:888654334686788::::::9:;30<~F8؏l`d P>'I$~rtiZJ.s82{qugM>dVnD=H~nn\uk@ $ H=ti|^*-<j`bTyNA~ZR@ pboWK %\ }npb[W. 8 `ThYv~,!xlV,#tkbXzlo-3 H$"lkKDI<#>#W&%^$!i.$|naS{8*X&N#m4-rjrgykSLX"C"R|fZ}l?.kbX(!JDwlpJ5L(@"F$"P(yjfX~l>,L!Z1(vkTJ^2&փtXI~kp6'Rr90yU4$i:+wb_yrh2 xtP* L"sctf]#N"i0.x{sJB83 LBwlwjKB==G=vjmaWPLA TNnoStf[Kyb,#d;-pbXRkdxr-|nJh\qar3$wll6.ށv]PxgY(m_B8wkzhVDXNzVR7H M% X+#j+ l^fZtc\KQ%H"_XT␅N>{cRs|4&kdLF|gSkU\Lb`R('X8-bRuij^~veC67!G G@rnof[H:BSGla0C~pp\zk0" , % &23445666689:<<>@BGL M"O"P"R$S%T% V""V""T""S""P"!O! KIDCA>;85445656664544456887899:::::988:79Cj5.֛h3+LQ !,@&wcfUЄu> RwldpaK#uJF=dXk`{d0$/ b)tviXL:2 rjh^zE jJD>SGu^~t|40'6SDxm~|h,+6v;,xlwlE9T.$l>8tkbW|lV * 9Y&$^YD5 9 S$'c,,m4-mbe[{B7S'@"M"u.'piWNg^SLAL f^i`|l+~RHP( z70xrbhTK&>! ? ](#{s_U|ng)K(N"_*!f_f4,zYPtU&Z%!X&"}OH\Ra4(ulb^|r4#p>9bC:G&cV̀uj0&].(EB~qPH{v`&Ex0(yjbd[@3\Tkbwn:2C, >WSr,&k`dVtZ0B |J@a]URzqB2d2*\-.H>tdrB4b;.hE9ـvZP|jG D%piTM]RseHgNH6=F$"P*$g.%NDzph^j\N$<"N#h'$vobVzfRyx6%p2+xvXQZNsc2$YXX22Y8-k]rhwOEtS&P&]RlgleA/<= AZQP.*Ci^hXzI  '" %2000122224678;=>>AFGIJ M N"P"S"!S""S#"S#"R$"P""L K H FCB?<9865455443666698866788::::9887:>DJX'%J%"<4/a&nWF~pW#?tme_ۄwC"<0pD;tpogYO: H xin`~sQ/ LFtj~e,$+ , f5,ڂme]f`.*\)ހvebjb2K!{lao`5 D|qQEdWxibYd75PNC6!<#"X(.j46l94ZRwppj]TL 3@ _!GDwrPD|`0(BH?oh}tK>H A!b&weV؃oT(A$ :"Y& xsTOdZpbU~?:k#d&"b)%}zYTt]1"Y&"V(&^.+`4-h:.`VslvkUDW(#D,$E+ NDّz@6r>6^YqeD;ojc\R"m0'~y`^~vJ6!SJmfVPwnbzL?`'SP!]Ola|qH;B HieUTjdXLD 8^+zgZaS< 2zr\Vz[+0CRHsgzo70"!$  -,--.///024468::<>ABDFIJ K N O! P"!P""Q#"P"!L K J!"H !FDB?;9:6671234668887666688::88679::AHLO#$`::?A"0W#`ZVLJ>~rG@XPidz_6'@0J' |zXP}u\* = \Mi[yn@93`$usfUL2 , O!tRKxP+&2yndZvH$6|sh[׊wBHbZj`uhB5cZˍwsH=S&F*$G('`,1e.0`/+B:zd]rkP!8 9Rv'$rlZKrj\W@q1'~wldh\P%B$X$leeXup8(J$= T%g`f`wnG:k`݉}vFCn*'plb[uxE6c0)\.+h-+j1,i6*@4yvjn]`,'D-$C, t<2ՐVKz?4nfi\ujIB֌vD=p:0ztd`|p8.>(u?7xle^SVJ҆~݇}aQ]2v>/xe`jaS"J&=7xu^VzmC3B|neXrD0TLhb|oJ>6 >!vnZR|~3*.)49A" J b"܂}_V~U -*8I"W*"TEzkrebU\3'R5*ned\zm^RR-)\3/d6)~pg^xo=2VM~>.H5}td^`RPKzΈz\Ua%">k8*snbe[* (&  ,,-.0/00122446688<=?@ADFGHJL M! L M! Q#"R$#L"#L"#J""G DB?>;:872468666766556688<:8689;<<EM L #H"#BN X |E?snWU1.mgNEB;r6*vviXIH*>qpXMXPWPD ~7'sUId[AL}ko_{q?0BxnPIYNbR0 BbWdTpn=->f^hWxc. E31zt{oSC\.!VO{u~rTKR*"V*'d(*h,/_.*{7.~u^Vx_$>8N d$ YPo[^TvvK Mwli_܃ud*D%P$\UnasabPh,"e-$^+L@xnzoXK|/!WL~rzvRMZRth}ldSu>2p=4>891x;-:+xh[ql.(P1'L0"l3(φ|cVA2}pbVzv/$`X|t}@6l`oe{pPEM/'f7.|rh]vF9PItvcub~5+kigbx@1]2&l.%{t`Uއx[)"89aTnayg2$;f+"{rl[vjJ"6!I>GWjcbUu~>41 %+9G"b+"wng]|pc0$C(E8{nh[shX+$Z*!n4$qdX~tj4+{4,o`z<'tlc~r/)>1ԂrqhuoD(T.t`Q΄vP(> ? . *-/01222330224466678:;>@BCDEHI KL P"!P""M!"L"#L""H !F EC@>><;5678666555666688:998:;=>@ H L!"J"$A M$ `!XStjLDNJtrSPR@4X(qiY|nL-=]ZhZf]WRvJ>e"{mznNBfcLiSjXzW*8Gd\cYuf]L|KIQ XPm[ydVJF"LFxdiK>FLe`{oɄth4&6-}pq^|ob,!b*%p)*n,,d2*u4)ukbX{}6.LDJ],$~B6jSMz[%#D"cSn`x>3V1&T/&B9tXF|jRHjb|m~E2~mrdvP>O=tlhـ{L>݃qvexVFTD|pwfVUB}nl`|SLrH=lG9H}d{mMHP&`+ugZzmHBFD>F R RHp`m_[P= - *2<JD<|p}qYOb"i(׃mfYՄxg0&^$>*odWujq6,u2)|s|L5ZH}q{PH@.cNxl|hF8X.|leSvddV?5wjTE::66666655002244443477:;?@@ADFJJN O! L !N""L"#K!"I!"H !EDA@>>866566446678668989:<=>@@B$H!J !E "B$!O"PHrk4,TLuns:4FE>6$mB0zii[~rX(( W,(]Ysdx;4aVn_ykrfZNg;8zlu`iVun:.>d2,i`nbm}C3]]lqpjaP~jD;X.-u>6noXj^E" +#^*#qh݉}h\7,zgzaoal,#n-(x,,t/.j5.q2&_Tn`znMDW!J K#Q(j;,pPL{t33gF9fUvd}jaXe:0iD;^Tusap`{nkzmr^H4zjyt`M7{irlvpmH6R=|jtp]XEt|nweWCn^nbxnf^RFyM?F9k\ڐ}bLta]ypgF9zJBje䊂udxhZ~tn>7^;1t>0n\w|pjbtf{fߊunejj{tttrfaTaSzjvfi_d*(`70NBunamda'!K#P*`Dp冁LDr2"vdl]zb3(KP!L G!FM~;0mdTthE/ , 27FIP@΁txMFo&nTj\~z<1SFr]}hqcl_r2*x8/x|qt`C/dV|́uT>eMr{uF9VEtfubzhn`|l`ȁsW$O@=<<888710021344445868;=<?ACEHLN K L""M"#L"#K#$J"#H !F CB@?777788654467:::::<?ADDIK" B%L" T#N$G `)"qf[PTNg^Q&6@Y!P!J+_SqgzsՋf;10tFHflwp͆}bXMRFuψ~=4Dk80nh́{rl^' NRKne~rʇz_Sd$VNрw؀vm_v0)[($a0(؄waVy[*%B(#N($d-(\V΂z݊~se~?8h-'o3/o1-p1-r40p0,NH~rneicg'$L&"M.)V.*{>9r]T~{44^Zynm؋vsjh2({FPDsiш~䎄ڊ~ÀpXFvdvbYLE{хxrhH=WMYLzliad\v70xB@ACDFG I" J#!L#!M"!L! J D D B@777788664467:;;:>@BEGJ!N"!K" A"K!T$P!&I$"V"wl_T{r*;"-?vnhC62!1 N\ ZC, .=NOP"DDJTM>IV`%!QGGS!\&W Z&f0'f/&k.&t0)x1*p,!l*$h40g6-sfj_~z=4E(!G& W,&f0*q2*}90>4y2(n3.q94q72t:5z<8x84z<8A<|dXzt0)\0*X1+g60AH@JBJCF?KBJ@QGTJOFUNXO^R\M\K\LYKvlbvL@ODPF[R싀od`StjYP;4}C=LFh_q`Wxlfc^hbvkxКݜݘ҈zӃvׁuynwmvlxmzkۀmtf]lb_UTHTDN=ZJB8~B/?.C3;.8/z6/c4,^1,X+(Z,+V'&T&$Q%S!r`^Vza1#"4A4<@H IR!Y&a)Y T SV"\(Z%a-$\(c/'`0*c1+f.)u95u94u:6zB=v@:EF>{?6F>z5.92w4,l0(^,"V* U$#P"!H A;:;:64444555555555559:;<>>@ADEH!H" M$"L$"N"!L" I" I" G!E7777886656698;;>>@BEK" L#!N""L! E!L!R $M#%G%"P$RG}qxr/"J$E"W Ć~WJ4 / @ YPvbX9 40=:;9:;?D:!AMJB>D J!V)#U'!Y.'Z.(^.)\($e-)j/+j2(n50h74l:2dUsd~rMBM.#M/&T0(]1*l:3p:3t;4s:4t=:t>:zB@|CA|B@DBHFB>|lhY|y2&h3(^,#m.'f`thvB>o86k75z93UIu}tF;_1$\3(`1*m61l30r;7s92u=4o:2s@7rB8o>5r@6zE<~@8~B:|F<OExJ@}KBPGUMYPZP^R[NYKREg\߄xdXSGWKXMwaV:/vUKH@PH]V^U{saB@BFJJN"DG$F"BE"H&L)"J& N,&R.(T-(Z/*`40`40^40c:5n=6vCxCzF>vC9wB9x@7q8/p8/d3*Y0%W1'X(%V%#O"H DBA@:86655555555555589::;<>>@CEG I" K" L" N"!L$"L$"K" I 777788665689:<>>BCF H!N$"K" L L! I#L" N!"H!"D%!H!i-#lbzh^n,"p*"`Z߇f^A 6 O ㅀb_䆂b ?4691148>>5>HIG"D$H$ N&"R&$Z.,V*(W*(X*(Y)(`.-f31d:0k:6l=;qA8N>qn^n`X0$R0%[6,_4.e84l<9n>vC@t@>r=:p:7p96m53D@~mtcكsl]PAXLul܆}sIAn50X-+_1/l.*lenfvn`W`."U0&[0+b/-j02i/0d1+f3-i92h92j93l<6p@9r@:C>E@HB~ICPISNPLOJQJPHNFMDOFTISHUJjabXXM\PdXzmccZ~odtitl{r~syvbTvj䒆ϏĊˆʐ̖ҚΒӎԈވ艄tvfxezfs|mqd{{m~o钁}kl[؈|zophg_e\bY]URJJCD>@@x;@?@;>>>;:99< 9>"A$"B% D'"H)$L+&O+'Q-)T0,W2.a62b41d63j:7m=:m=:rB?o>;tD>n;5r>8q:5l82f6/\2+W0(^-*\)'V%#R# N"K HE@<::875555555555777778:;?@DEFG J!J" N""N""M! J777788888:99=?BDDG!I#!J#!J!J!L L K L! L"#H$#E%!L'!V&h*"LFypĄ{˅}toVQc#E3Fb_元wtZ5 .464348<;5<FJDE$!N'%T&%U&(T%'T$&T#%Z(*\+-`.0`22W8/d;8d88[Tăsy}ńtg7.a6.d92f95f:8f89f68e47`52^40^1.]/-_0-b1/j86njserbparbvfpd^VB;vB>xDAEDFDFDFDFDGECBDBJEKFLINITO]V^Tf\keiakanbτx݄{y{tzrf^j`j`g^g\bVyjrރûvǃzmigfhfnlnjnjnkolnlnlnlnjofshvfrvt~tjzpۂu݊zᗈޠܤԙƇvpmhiea\\VSLJFCCBB~@By@@r> ; 5' (1 P"< 0  -122444318BDAA! F!!M !J !K "N!#R"$U&'U()V*,S-,H3+U20V/1X:4rG8J:XL`Vc4.\/*V-)R*(O''P&(R&(R%*K'$K($L*%O*&N*&P)&O(%P&"V%Y#X!R L"HRXJGB>@R"!Qf# r%"YS$K$R$"\$(`(+`+.[0._2/e53i75m98k97i86i86l65n87r;:u=p?=m@;b6.d2'f,"b$X!QMB8::9620.-///10000344468<@@@D H!L#"P$#S&%V&&W'%Y'%Y(&Z(&Y'%X&$X'%W'%X*&Z+'\*'^(&Z&#X&"S$ N!LHE@=:7644445555444464469:<>BCFG H I J!J!77778888::<?BDHI !I#!J$"J$"K$"L$"L$"N""N""P"$L#$G$"H$ J!J J"D>:/,% %         #&(()(&'&.65106>9<@DF!D"@# <% 5'E$#I&*:($A)V'S"D%"F!A>:;<@A=!< :;994427=;44:@45:<<A<?H><C$ L#!R$#R'&N*(J-*L-)P,)T*)S('T+)V/-X20_86c97g;:j<;l>=n=rFAmF@tHCxDAFD~GFxHEzKH|LJ~NLPNPNQOSPSQRSVUXT[RcXeZf^gbcchihhjgpjmflasf}n}zvkjjj\ZQLSJNHIG{DBp::j87a41_4.`80_5.T0*H)"E!D?986532.-**(&&&&&&&(&%$%).0*+/258<>ABCDCFHI O& U)"\,&`,&`,&\+%X*#S&!R""P "LFB>:8444455554444644677:<>ACDDEF G!67778888;:>ADFI !J"#K%#L&$L&$K$"N%#N%#O$#P$#O"$J"#E# F"JJA@JD6+ * $ " $+ &   $ &    "    ! ',($")2.058841-. :8))98*21.+./12,*** ,+ -,&*0.(*-4(*188902424!: D F B"=$7$<&!D'$I)&P.,P.+L.+L.*L.+L,*L+(M)&J%"L'$J&#M'%N#$N'(L)(F(%F)$L+'R-(Q*'O+0M+.M-*L.'J+$I)$G'$H%&M#%I""J&"L%!P$ M#D$=%G F""?"B#I$ I"B";#<'">'"B($D($I(%N)&Q*(T++P+0S,0Z22X62R80Q:1X:5_;9_?@cBDeCFjHImHHxRP|VR{YRl\NlZPrXRyUSSSOMvF@wF=zD>u?@BD H# I$"N'%N&$M&$L%#L&$L%#L$"L$"J" H!EDA@AG^PD? @ < 0 & 110/34444 4 5 5 7 9 ;=:;<>=?BEEDFFFDDDBDDA@B@@FDA?><: 9 << < = ????@@BB@?@?;=@DHJNPRRTTVXY Z"#\&&\&']&'^'(V V V V WVTTV!"U""U""T""X"#Y"#X"#X"#X""V VTSRPOPPPPQPPQOONMPPQRRRROLLLNRTVVV W X !X!!X!!X""[$$]%&_',`(-b*/c+0h/4j05l27n47s75v86y:8{;:z:9};:=<>=:<:<:<:<~89x44s00n..i*,h-.g,.d(*`"$ZSPIEA??<::9 : : 8 4 4 2 2 0 0 0 2 3 6788 8 8 8 9 : ; = B ;8 B P G -@N$ V($_0,a0-d0.c/,b.*\*(Y(&T%"P$ L IFD:975888:76666666555579;<?@@A65668:;;<>@AC D"F$ H%"O(&N'%M&$M&$K$"J#!I" H!F D@>@@?Ct'*"&!($$$$ !"!"!" ""$"$"$"$"%#%#&$&$&$&$&$&"%"&$'$(%(&(&(&($($($($("&#&#&#&$'$'$'$'%&$&#$"$#$"#!" ""%!&!&!&"&"&"&"&$%$%$%$%$%#$"$"##$$%%&%'')')'*'*&(&((*(*+-+-,.,.*,),(*'))+)+)+(+),),),),*,*,*,+,********)*()''&')+(+&*&)&*&*&*&*&*&*&*&*&)&)&)&)$&%'&('('('('(&(&(&(%(%($($($($(%(&(&(&(%(&((*(+&*'+(,)-*.*.+/,0..//00113222322343434343543220200/22332222..**((()')'('(%&$$#$"#!$!$!$"$""" " " "##$$&%$$$$$$ % &"$$"%!#!"$!%hKJR%!W*&`0,e2/h30i2/h1.`.*\,(X)%V'#R&"P#L"H ><9::99;877777775555678:>>?@66688;<?@ABB E"F# G$!H%"M&$L%#L%#K$"I" H FD@@@@??=AwB?\^ehdfffgfffkclclclclclclclcmdmdmdmdkbjbjbiajbjbjbjbhahahbibjbjbjbjbkckckckcjbjbjbjbi`i`i`iakcjbjbjakbkbjbjbjdjdjdjdhbhbhbhbjbjbjbjbjbiai`h`jaiajajakbjbiajai`j`kakbmclclblbh`iajbkcibibibibjcjcjcjckckckckcjcjcjcjcjcibibhbidhdhdhchdhdhdhdhdhdhdhdhdhdhdhcf`hahbhbhbhbhbibiajaiaiakckckcjcjbjbibibiaiaibibiajbjbjbiaiajbjbi^j_j_k`nbncnbmbkbjbkbkbh_g^g^h`h`ibjbjcjbjbjclejbjbkclckclckbkbjajajajakbkbkbkblalakbjbjdieheiehchchchchcidjdjdiajak`iahdOPhR!V'#Z+'b0,h20k41l31l30d3/a1-^.*Z,(X($S&"O"J!CA>=<:9:7777777755556666<=>>5689:=?@DDEF H" I#!I#!J$"J$"J" I" H" G FCA@>><<:9=X :2kkxy||{}z~v~v~v~vwwwwtttttuuvvvvvvvvvwwwwwwwwvvvvvvvvwwxxxxxx~x~x~x~xxxxxyyyyxxw~vxxw~w~v~wxxxxyz~vvwxxw~w~v~v~v~v~v}u}u}u}u~v~v~v~vwwwwxxxx~w~wwxxxxxxxxx~v~v~v~v~vvwwxxxxxxxxxxxxyyx~wxxxxttt~suuuuvwvv|s}t~vwwwwwvutvxv~v~vx~v~u~vx~x~v~vxxxxuuuuvvvvuvvwxxyyxwww~vvxxvvvw{ufd11rV"X($\,(c0-g1.k20n31m31j62f40a1-_/+\.*Y*&S&"P$H!FCA@<:977777777555555559::;888:=?BDEF F G!I#!I#!I#!I#!H!I" I" FDCA?@?=<:::=V-8(6*6,6)6&6(3)2)2*3)2)2*3*4*0*0+1,1,2,2,2-4,4+3*3*2,3,3,3,3*2*2+2+2,3,3+2+2-2-2-2-2,1+1+1+2,4,5+4*4*3*4*4*4.6,4+3,4,4,5,4*3*4*4)3)3+5)3(2*4(2&1(2)3,6+5*4)4'1(2*4+5*4*4(3(2)3)3*4*3)3)2)2)2*4*3(2(2*4*4*3*3+4,5,5,5*3*3*2)2*2*1*1*2-4,4,3,3,4+2(/)0,2,2+2+2,2,2*0*0+1+1*0*0,2+2+1*1)0*1,2-3*3*4+4+5)2)3)3*4+1+1+1+1+1+1*0*1*3(2(1(2+4*4*4*4*2+2+3,3)1*2+3,4)2)3)3*4*4*4*4*4)4*4*4)3*4,5+5*3-3,2+2+1,2,2,1,1,1,2,3,4+3+4+5*6*4*4+5+5*4*4*4*4*1,1,2,2)2*6&6&\"!V($]-)b0,f2/j30l42n42j41g41f30c2/`0,\-)X*&V'#P$"L" HDB><8656766665555666688::8::<>ACEFF H H!J" J" J" J" I" H!FC@ABB<:8888874Ljtplqyruvttvy{|!"| "| "| "| "z xxx w u tsqqqponnp mjgfimprtvwsvxz| $!%"" $%)).04384826276;>BCHEJ?D8=5926261504040527385:5:494958698;:=@C@D@DAD>B?B@CAD?B>B>B?C>BA7:26-0),#&!$}!zutspmlkkffeeeeefoswzxvw q$P!P% V)%[,(`0,c0-g2/i30j52j42h41f40b2.`0,\-)Z+'V'&R%$N"!I D@<:87676666555566666688<<<>ACGI FF H H!H" H" H" H" G DBABA@>9877888849:;8600JQRORT X$"Z&$X%$W$#V""U"!T! PNLGEDB@>><<::9666688:<>BDFKLQV Z"!Z^c%$n-*j)%h'#j)%p.*v51~=9B@AB>@@BGHTV[\[]UVGIAB9:|56z45x56v66v66x98x::z<<{=<{=<|==|>=|>=z@>z?>z?>y>>~CBDCFDFEFEGFHGHGKKLLMMNNRQTRVUXVYXZX[Z\Z[V^Xb\d_c^c^b]b]b^ZW[XYVYVURSPSPUPRMNIKFIDFAC>A<=8;7:5:4~:4}:5|<6{<7t97r76o43m22k00j/.g,+e**d*)d()b'(b&'`%%^#$\!!Z V!!T TU T V""Y$$Z'&V($Y,&]/*a1-e2.j62p:6t<:x?>|BAGFJJLLONSRUTXXZZ\\\[YXVUPNJIDDy>?p78k22b*+^''X#"T NKHD@><:76544443/3;??BFHH"L$ P(#U*&X+'\,(`/,c0-i30h30h40g41f20b2.`0,^.*X((V&%P#"L" F C><;9888888555566666688<<>>BDGJ !HH J J!J!J!J!J!DAABA@?=76666667=539HOJDJ!FCBF"I$M& P("F"D!BA><:94420.-++*(% " "   ! $ ( - 368<AF N"W'"^+&`+&b*"d*#l2*t;3zB:G?G?|B;GBLHVR`\^\XUNKGD?>y86n0.f,)d+(b,(b-*b.*]0*]2,_3-_4._4.`4.`5/b60c4/e60f61g82d50f72g83h:4j<6j;6i:4j94p=8r=9v?;w@=wA>xB?zD@zDA{EB|FC~HEJFICLEOHQKUPZUb\fagbifxtytto~y}xqktmnhhac\aZ^WYRVOPHMEI@F=D;D:}B8{A8uBj@;f:7b64[1.X.+R)&L&#H"D>:40.*)&&%#" " " " " $.6:<@GPE F"J% N&"R(#V*&[-)^/+e0-g1.g2/h20e2/c1.b0,`/,],*Z*)U'%P%#I" E @==;888888555566665667<>@BDEF G L" M! M! K" H FCA@BAB>=:978899888:87=HJD?LG>9 ;$?"G"D544235666 < A D LLI F @@8.(          ), *.8CQ#!\&$_%#c&#j,(t83|?;E?I@F=F;eB?dB?gD@oCAnA?qB@tDB~LKSRVVPPQPZY_\\Yfarkwnɂzጅ䒉ٔܛʆ|Ɂwskoje`a[\VTMOHKDNGJFIEFA{E@vB! < 861,*'&#!           ! (06:@BCD G!H"N&!R("T*%W+&]-'`/)c1+e3-f2,g2,f0+d/*`/+]-*Y*'T)%M&!I% E"B!B@><8866666666666666=>ABEEF G K L J J FD@>BB?<:88888999888;::=DIE >=BGFB8,%8@KZk&!.(8+D@D>E?KC\TbY`UXOPHLFJDLIGF8!A"B% D'"A&!A("A("@&!D% E&!A$>!>#:!:!>#F"H" G" E!D"F$!C"B"D)%C)%D*&F-(D+&F.*J3.U<8b?><97530.,* ( & "      %,48==BBEF J"L$P&!S'#Z+%\,&_/)b0*d0*d0*f/*d.)a-*^,)[+'W*&Q'"L& H$G"DAB=;966666666666666>?BCF F G!H!K I HD??@?@?<:8866::999888<<>?@DFDDEB@BCG V| *)6*:,>)?(@(@,B-D,C*B,D.F0H/H0J.H/H2J2I7M9N8L:K4C%1"V :*   (08@ F*$O3.h:6n;8v@;JFVPb\^WYQSJJCG@JDNIJIKLHODL@H:>:>:>;=<>=?=?AC@BBCDEDFCEBDACCDDEDECD@BCEGHIJFHGGGGGHJLJLIKGH<>~:;t01l,,P L!H D>= <$;$B(%D($J.)T40V4/_:4pHBzQK[Rrh„|Ԏ䚓霖좛㚓ܥ赪ܓ֋xrlhb\WZT^V`XXPPEyH?r?6p82_Ydaca\\\Z[XYVZVZVZVZVZW\Z\Z][^\^\^\][][_\`\b^b^d`fbfbhdjfjfkhkhkhlililimgmgngngmgmgmfnglflflflfmgmglflfmfmfngohphpkoh4  # *16:<=@BDEHK"O$ V($X)%[,(]-)_,)`.*c.+b-*b,*`,(^+([*&V($S&"O$ L#GDC@=:98666666666666?@CEG H H!I" I HDC??>?>=:88789;::99888<>A?? CNVVWX\u'0&:&=&>&>%>&?&@'A(B(A*D,E,F-G.H.I.H0H1I2J2J6M6L6L7M4L7N:O=PBP4=r!E'  *:J X&&V.)d84wGCXR^ZYTUQOIIBICJELHMHJJSW[dVgUgWhZiYhZiZj\j\j]j^l_l`m_lanbodqdqererfrhtjvjvmylxlxnyq|r}r}r|t~uut~x{xy~zpvhl\_KN<>b!"EABCC I*&L.*N3.\D8mLBzME]WgbvqӒ࢜ż墘ߒފzrnfjakaj_`VTJLCԑ¿ļļƽȾǽȾtWO ! (/488;<@ADF J"L# R%"T'#W)%Z+'[+']-)`-*`-*b,)b+(b+(^*'Z(%X'#T$ Q#H EEB@=:8666666666666DFHHHI HFEB@@C?;9;:8777668999999:?CFB =!BZq!~%&-"6 78: ;:<">">$?&@(@(A(B(C(C*D*D*D+F,F0G0H2H2I3J4K6L8N7M8N8N9OOL+&^:6rJEOKMHOLJFFBHAICLFLHPLLMUZU`TdTdVfWfXfZhZiZh\h\h^j^j`k`lalbmcnepfpephrhrjsjtjtltlvmvnwoxpxpyp|p|r~r~stvvvyzz~큇ꂈ܀bgEIn,.I>;77'F0(R2,lF@TP^Znj|wzrҋ颚ȼ꺮Ĵź䘏ڍvrjunvmjb嘐úĺźƻǼȼɾʾʜ|q $ ,2689:>AACEFK"N$ Q&#T($V(&Y)'[+)],*`+(b,)b,)b-*\(%Z'$X%"V%!L! J!F ECA=:886666666666DFGGGHGEBAAB?<:8;9868666899999::<FKF" = Jp$ ,4 8 9878:;:"<$>$>%?&@&@'A)B,B,D.D-D.D.F.F1G1H2H2I3J4J6L7M8M8N8N8O9P:P'#O4.X62f<8wB@HDIFKHUMTMWP\Va[ff[aZeVdVdXfXfXfZh[iZh]g^h`h`iajbjcldldlfngofnipjqkrkrlsltntnupvpvrxrxr|r|t~t~vvwxwyzz}~₇vyXZi01LBC$ F)%I,(Q40bD@xWTjgÂzԋ،ݑ㜓榜̾Ŷل}ׂ|ڄ~ùĺĺŻǼȼȾɾʭ  $*0469:;>@ADDFJ L" O$!R'$U(%V*&X*(\*'^+(`,)`-*\*&\)&Z'$X&#P""K" I FDB@;986666666666GHIHHHGE@AB@<:769988886689999:;<<IP G"@"W## (#3757:78:; :#<$>$>%?&@&@'A&A(B*D,E+D+D,F,F2F3F4H4H4H5I6J8L8L9L:N:N:O;P986666666666HIHGFGFD@B@>98659:89866888999;=>?K!P! F F%"^'''#3!866678: ;:!<$>$>%?&@)@)A%@'B+D-F,D+D,F,F0F0G2H2H1G2H4J5K6L7L9N;NP>P>QBPCT>S?UF[BSz'1E++9"H'#Z1.l?;PK`Zkbh`aXZQVNRPVZ[dWbWbXdXdXdZfZgZf]g^h^h`iajbjblcldlfnfofngohphpiqksltlumvnvowpxqxqzrzr|s|t}u~v~wy{|z{||}뇑ӀUZX22D*)L32P33aA@jTFcVrgz֖ݙ墚➖훙쪦¸¸úĺļżƽǾȾɿ>0-$*0457799;<?ABDG I" J!K" O#"Q$#U($X*&\,(].*_/+^.*\,(Z+'T(&Q%$M! I FD@>986666666666KJJGHDAB@>:97889999999996768;@CDF"H"J"H#N)$[)&x)+)0234588; < < >"?"> @&C*B*B,A-B.B-A.B.B.D/D1F2H2H2J4I4F5F7H7M6L;P:NR@TATDUIW09hHC~KGNJPKPLUPYROLTT[^W_V`VaXb\f[fZfXe\h\h\i^j`j`j`l`lcndndoepfpfphrhrgpltmwp|mynxqyqvpwt{rzryt|t|xt}uwxx||~|POP+&C2*<4*P<8fNLc`wrΪ䵵夤¸Ķü¼ýýĽľƿ`LF  ,452788889;==>CEG H!L#!M$"R$#T&$V)&Z*(].*_/)^.(^-'X*&V)%R&$N$ J EB?;:8764456666JJGFDCBC><:8889:999999997789?BEJ!J#J L"N'"P+&\,(r-,+0224588;; < >"?">"A&@)<&yr q"o"n r!z$& (%0.91@6F6E7H8J7N6L9OR@TATEVCRHUBJf=.6"K$ Z+(f74{B>OJOJHB>:94=:EC@CBFEJHNKPNSZa`i\h\h\i]i`j`j`l_lbncndodofpfphrhripmtqxltfnntuxyzy|uxwzv{vzx}v|zv}y|}||}~⏎{wd:3H,$G42M;8^JHzb^}x֬躳ǻᄏøĸ¼¼ľƿ̎xp  ,564888889:;<>@CFFJ!K" N""P$#T'$X(&[,(^.(^.(^.(Z,(X*&S(%P%"M$"H!EB><9866446666JGFDBBCB<:9889::99999999789<@AGL" O"P T# T*&T.(]0,p10.1 224577::!< >"?">"@*@ X = >CEFILNQVaq&*26@:H9L:M7L7L9N;N=O>P?R>Q>R@T@SBSFWGVGWBNj( EW !R,)`62d62g5/q83x:4~;4z6.x2*w/,}.-.-/.{-+0.46Z^]g\g[h\h_j`j`l_lambmcndnfpfphrhrltovOSl"$r22DDWTjh{{숉|~z|z{{y{{||~猍ٍOL> 2<,&D3.\D>ZVjhƆꮤƽݔtA>^63[;8]:8l>>vB?yG@xI@MFOHRKTMZS]VaZd]b\g`~xʾ̷ +4758:::8899:=>@BDFG L N"!P%"T&$X)%[-&^.(^0)[.*Z-)V*(S(%M$"I" FC@<:676648888GFDCBDB>98879::;9999999988<>@GK" P#!QX"Z&#X+&U/*\3.k4101#224567::!<> ?">$A*C0 5:@CFJNQ RQ! Q# T#!^#!n%"**.16B=L:L8L8M9NR=Q>R@TATBTBTDUDVFXCN^..6>F"V+&d/,n2.p2-m2,d0(c6+a4-g3-m2.k3.h4/n72t2.AA^f\g[h\h^j`j`l`l`lbmbncnfpfphrhrjrlt^cVP.+dC>\V|wڈ瓎܆ق}{wpmkhgdjkqrz|}||||}~hhL! 56"?+$V50zHFWVngłyҒڣ䲦纮Ƚ详f>;! %4CL"N&U%Z("_-'b0*f2,k50q:5u>8|B>E?|@:TKԙ#   *5769:::88889::=@ADEHJ!N# R%"T'#Z,%^0(_1*\/+\/+W,)T*&P'%L%#I!"F B@<977668888FDDDDA@>7889;;;;999999997:<?CK" L O V"\$"`(&_.+Z2-[3.f30z11$004678:; <<>!>#>"- $,4:= @!C"G" U!!T"!N$!L'#R+&`3,f-(q.+24>DAKR>R?S@TBTCUGUDTHZ>L\ .>K Z$!j+*o0,m3.d3,^6,[5-b5.h60h71e81g81q7376Ya\g[h[h^i_j_j_k`lblbncneofpfpgqdokvjqd(,J/-VA;{QK^Yf_hbe_e``[`[]XYUTSQQTThjy|{}~|쎒vx\%$86:!S2/j?@ABFH K"O$!S)$W+$\.'_1*]0,]0,Z/,X-*R*(N'%J"$H !DB>;96687777DDCEB><<889:;;;;99999999:;>@GN"!N P! W$"`(%e+)b0,\2-Z3.d2/t00'013467:: <<>">$>"&  *4<@ C D" E$ I$"G" J%!T)&a0,i0*o.*}85E@HECF>GR>R?S@TBTCTGSHUEYDY<;:9999678:<>?ADFJ!L# Q'"V*"Y-&[/(]0,^1-\1.Z/,W.,R+)N&&J"#F DA>:9787777BCDBA<;989::;;;;99999999<>ABK" O#"O! S#!W'$`+(f.,c/,\2-\2-d1.q/.&-043669: <<>">$>"+ '2>FLO P! N#!E&#H$"T(%d-,m-,r-*|52B@NGKFCC@D@I=JR?R@S@TBTBTDRFTCTDXL]0<4  '3?L'$V,'`0,e1+h4.g60n61u73s84p94q83~96=QLZUa\icpnyt΂{َޖ梙쮨ʾϜ.   +;AD!D!G"J$ N$!S&$Z*(\+)b/,f4.n81v:4x91y;3Ϙ͔tq &4;<>=<:99985578;=>?BDF J!M% Q' V*$Y-&[.*]0,[0-Z/,X/-T-+P()N&&J$"H!D?>:9:7777DEC?><889::;;;;:999999::?ABDN$"P$"P! T$"V'#^,(f.+b-*_1-^1-d0-n.-%)/545689<<>">$>"/  *6?F I!I# J$"Q%#Z'&h+*q//p+*s40~E@PJKEJFDBBDEKBL?L>M

P>R?R@S@TBTBT@PCSIXHXFZH^z&  $,:"K*&X0*a0+l3.l61r72w84w95t94A?><;99984567:;>>@CF I K#P& S)#U+%X,(Z-*Z.,Y.+V,*T,)R**R)(M&$J#!EA@=:97777FD@?<:8:8888::::9:8::<=>CDH M"R$!Q!T"X&$W($\,(b.,d0-e0,d.,e,*d*(h&%,24468:89 : ;"<"  #-9BJ"P$"S&"T% _("g.(m1,k.(p4/zB;PINGLDLDD>LJLLEL=K8MP@R?R@R@TATBTDUFVDWDXHYBJJ ( &D T&$V1-^50r75v84|:6}83<8F@GAKDb]ih^b^f[f]g^h_j^l^j_j`lalcndnfpfpfpjtjsZbO4' T52CEWRketmxr|uzt|s|s}tՁx؄{؄zv|szqvmqn}|نT "( &8R(&c20q>:wGAzNFTMZS_Ve\lcphtlvnunqjrl~x댆]2,  $4=D DDF G K" N#"R%$T(&W*&],(e0,l3.n60zE=ùٺ, ",8@BB@?::7689998::<@ADEJ!M" Q&$U*(V,*X-+X.*W,)X,(W,&X+&W*&N(%K%#F"C ?<879999DC@<<88:8888::::9:8:;=>?DFK!P#S$ R"V# \($\+(^.*b0,e0-d.,e.+b(&Z# _" *33468988 : ;!<"  %.;D M"S$"V&"X'"c*%k1+j.(n2,y?9HBTNMGQIICHDJHIHDI?L;PC=\Tnfvoqpeh]c]h\g^h_j^l^j^j`lalcndnfpfpeomvltmtZ@2*`D@_aܪƺɽƺ걥笠頖艄쀀E "0<M'#\2-f:6nB:vF?KDNHTKVNXP[R\S_Y`[e`plzvބ~ꗐUN!  #4<DDDF G J!L#!P$#Q%$U(%Z+'a-*f0+j2-f0*Р@*!  "-;BDCB@<:7799998::<?@CDHJ P$"T('T+)V,*X,*V+(X+'X,%Y+$X*$N($K%#H" D!B=889999@@><:8688888::::9:8:<>?@EH M#S&"S$ T!Y$!^*&^-*a.+b.,c.+a,)a*'^&$Z# c(&*31468988 : ;!<"" '0>H!Q$!U$"X($\*&j0*n2,m1+x<6HBUONHSMPIF@HDIGLJGJAL=P;OQ?R@R@TATAUDVFVFWEXFYLZFO>   8Q%"W0,d51{76:6C?D?MFiatltl⒊ln^dZe]g]h^j^l^j^j`lalcndnfpfpfqktgoow~89L81\B>]]}tӣ贩ķĸöƸƸʼʽ뗒셄著ln5& (*6!E(#X0+g73o=7vB<::6688888::::9:8:<>?AFJ P#W($T$ T"Z%"b+(`,)b-*b,*`+(^)&[&#[&#`*'_'$$13468988 : ; <"$ (2@ K" T$"W$"\($b,(p4.o1+t82~D>NHSNNIVQMHHDIEOLTQMNDLP?R@R@TATBUDVFVFWFXCVJ[IXq"("2O%"Z.,h5276D@E@WPphsk̂xeg^dYd]g]h^j^l^j^j`lalcndnfpfpfphrhqmvADM0*[B>a`{v؛覡꣜㗐蛔ڎ҇}׎ڑޔِڑ䚒Ὦķž䈄蔗ab4 ($5#L)$b0.g50l82o83v<6y<5?7B9B:B=JFPLWR^Yhdwr͜%  $4<BDDF G I J!L M! P$#S&#W'%Z)&`.*b.(xD>ːtl( (3?F!FEDC@=;:9999::::<>ABBDJ N$"R(&S*(U*'T(&W*&V*$X*#V(#N&$L&$K$"I#!F!B><9999=<:977669999::::9:8:;>@BJ J R&"W($U"X$ ^'$b*(b+(b,)`,(^)&Z&"](%^*&])&]&#z 02568868 ::">") " *7D N"!X&$](&b,(j2.r2.p1,y<6JDXRMHRNYUQLQMXTWSVPTTDKQ>Q>R@R@SATBTEVEVGXEXFXI[9C8 1M# \-*q86A@E@^Xsktl֊|~{rtY^[f\f\h]h\k]i^j`j`kcndneofpdpgphqjtLQM%"G.*k>D"H" H" G!G HHJM! L#!O#"Q%$T'$V&"`,)h1,ݨʸ, 09C!G!K#!J!FEA?<<::::9999:9<@BDG I" N&$P'%S(%R'$U($U)"W)"V(#Q'$N&$L$"J#!H" F!A>988:=::786659999::::9:8:<?@BKN!V'#X($V# Y$!^'$b)'d+)b+(`)&\'$[&#\)&\)&X&"X# c .3458757:: <", %0<I" T$$[&%^&%g.,p62t1-y94F@RLXRNITPZWZTWRSMXR\VJI=D>N:MQ>Q>R@R@SBTBTDVDVFXFXFXGZGWL #2M!_,*{>:D?KFRNVS斒P2- '6>C"H" H" G!H!I HJL K!"L"#N%#O&#Q$!^+(a)&|x༶:6>G$!L&$P%$M$"J!FD@><::::9999989=BCF H!N%#P&$R($R'$T($T("V("V("R&$N&$N$"J#!H!F D?:99:;:8788669999::::9:8:<@ACKO"X($X($Y$!\$"^&$a(&b)'`(&^'$\'$^)&\)&W'#T"T!R )344765699;$2 +4>I" S##^'&b)(n42q52u1-?:KEWQVQNIRPVTTMRL^V\VPI665<Q>Q>R@R@SBTBTBVCVEWEVFXHZK^l*1O!m64{;:\\slsk㚑玄y|`e[fZeZf[gZj]i^j`j`kbmcmdndncofogpgrbkM0B(#X71iC>}RKXR^VaW_U`V^V`VaXaX`WaXbYcZaYbZd[d]hbhh~𑕰qp6( ,;IV%$\)'`,*c.+f/*h0*k1+m2,v3.z83z:5~?:E@MIPLԄﶱtTO  '6>B"I#!I#!H" H" J!H JKJ H !J"#L$"P%"[)'`'$JFɿX41>CK%#O(&T*(R&%M$"J!EB>=::::9999668<?BEG M$"O&$R&$Q&#T&"T( V( T'"S&$P$$N$"L#!H!H!EA=:9:;:8786679999::::9:9:>ABEKR# Z*&Z'$Z%"\%"`&$b(&a&#^%"^&#_)&`-*Z($S#R#P"H!%034664688!=(8.9B N$"W&%`)(h-,s85n1.|83FAOI]WWQNHPMQNXP^WZSNGv>8+*7>?P:M;N

Q>Q>R@R@SBTBTBVBVDWEVFWGYEZ+5/ 2W&$l21POqpvo嚒䏆{{glZdYdZfZfZi]i^j_j`kalbmdndnbneofpfrnw^ 1:$X/+p?<}HCNINIRLRJTLVNVNVOVOYRYRZRZSZQ[R]S\TZTYVce└vB@1 /8DR" X&$]*(a,)d-(e.(f/(h/(q/,s40t62x:6{<8D@JHljvq" '4>D"J$"J#!I" I" K" H IIFG H"!J#!L" T" ]$$e+'칰ǁZWK$#M&%P)'T,*X,+U)(P$$L#!F C><;:::9999658:>@DF L$!N&#P&#P&"S&"S' U' T&!S'$P%#P$"L#!H!H!F C><:9888899999999::::;9:>BFIJ L R$#Z*([&%\$"`&!c%!e&"a)"^'_)"b.([*$T$ Q"N$ :% L" |!224566668$:(?'!@!K$!S($Y*&a+&k2,v:4p0,:4JCYPbX[PUKVNZR`ZZVKH}=9q1-,,=F:J:N9M:NP>R?R@S@TBTBUDVDVDVFYDY6B4 ?X&%|DBhbrjғ}y~rs[cYhXiZj\h\h^j_k_j`k`lblbmdqerfqfpmt~.06,J*%_52t@=JFOHSJXL[OYP]U`X`YbZbZhaf_b[c\d\^U^W\VXUxwӆG*,:K U%$_*)d+*h-+i.)h.)h.)g0-h1/l42o53r75@??>[Yȕ, % +?P!"P$"O$#N$"L" J" F EDEF H"K#N% Q&!U'#V(#ůz\,)\,)]-+_0-^0.[-,T('N$"HD@?:88799999999;<?B G$K&!N'"O'"P&"R%!T&"V($R'!P& N$K#K"H"F D@<:7888899999999::::::;@DGJ L L S%$Z*(['%_'$a'"d%!d$ ^& a*$c-&`,&X("T$ P"N# H" Vz/34568689(=,cJ!K"P&"X)%\*&d.(q5/v83t3.@9NFZRdZ`V\S`Xb[VSFBt>8d0*q,),0>J7J9N9M:NP>R?R@S@TBTBUDVDVDVFXDX>G=D^,+YVjb̂z|}썃zz_gXiXjZj]h\h^j_k^j`k`lblbmcrerfqgpio?C8(D%!\30vA>LHWQ^WeZj_mfmfunxpzsx~v~wҀyԂ{ρz΂zwpoieafb򚘕\Z4*5GS%$^+)e,,h-+h.(g-(e-(c-*e.+g0-j0.o42v:8{>@ E#J& L&!N&!P&!R$ T%!V'#S' R&N$L#K"H"F D@<:7888899999999::::::<BDHK L !M! S%$[+)Z(&_(&`(#b&"b&"_' d.'c.)\*$U%!S$ P# O"N Pb%)***,+,.#.x%VF" R%"W(&]*'b+(j0,y94x61y61F>PHZRd\f^f^bZTNHFp<9V.*_,(}!$7B8K6L9N9M:NP>R?R@S@TBTBUDVDVDVFXFYDNBFp<;a\ne莄~|鍄蛎ZbXiXjZj^h]h^j_k^j`k`lblbmbrfrfqgpjqUZ>'D$ a63KI\Xe`ibrhnfokrnsnۋԈ|vƂ{DŽ|ʆ~̊ܡןқ֛ܛؑ܆ꃄ׎N"!-*BP$#^,*f..h0.j0+h.*e.(d.+f/,g0-i0.l31p64x<:~?<ސN(#( *:J R$"R$#Q$"N" L#!J FFEEF HL"M"Q$!R%"d6.xpyx}||}|ytn74k41h0/g/.b0.`/-Z,*T)&M$!G!B?::9899999999:<>@D!H#J$ L$ O$!P$ T$"U&#S' R&P$M#K"J F DA=:8888899999999::::::=CEHL M!"P"!T&%\,*Z)'['$_(#a(#b)$b+&e/*`-'Y&#R#R$!O# L" D" P>R?R@S@TBTBUDVDVDVFXEXGOIT&&LJ_YĎ~~瑉Ǹ퇆`iXiXj[j^h]h^j_k^j`k`lblbmbrfrgqgpir^dJ0N*'j<:PNa^garjznИѤƻ滰ʻއ󘘢ff3(=L$"[.+d1/j41k3.i1,h0*d.*e.+f.,f0,h0.k20o74w;8}ztJF,-;I R$"T$#R$"N" N""K!I I EEEGK L!P# Q$!R& Z,%^0)k;5k93j60l60o83r93w>8z@:x?:w<:r86n22k10e0/b0.^-+X+(O&#H"C@;::9999999999;>?B G"I#L" O$!P# S#!T%"U&!T&P$N#M"J H FB >;99999::889999:::::9<AEHJ K T&$W)(\,*^-+\)&])#_)$b,&h1,a-'\(%X'$R#!P"!N"!J" F";"0$/$3875;>@B D H" L$"P&%Y)&^,*d.+h-+t51~;6|40<8GCPKWQYRYPxQGkG=^80_'%^x"1>3H1J4J8L8L8L:N:N;O

P>Q?R@R@TATBUDVDVEWFYFOLf54QNnf賦ꒋ괤ْ焂_fXhVhZh]g[f\h]i\h`k`lblbmaqdpfpfohrfob!%4P)&l=:NKjd̗麮칮ᄇ¶ǹοݒP(&,8H$"W.+d31i41m60l4.h0+g0-f/,f/,e.+h1.i20l63q:6fckg0-7I""S$#V&%T%$P"!P""L H I FDDHKKN P#!Q&"V)%^0,e51k74l62m42p62u;5y?9}C=~D>z?=v;9p44l00f.,b.*`-*[,(T*%L&!D!?<:9999999999;:<>D!F H!K" N"!P""S#"T$"T% T&S&P"N"L H F?><:9999::889999:::::9<BFHK L S%$Y)(\,*_.,\,(_-'b/)e2,d/,`+(Z($V&$R$"O""L""L "SJ>!;!>@>:;=@C H O! V$#Z&&Z)'^,*d.,h.,t51};6y2.:6FCLHOIuNFmIAd=5a2+_#l%,5C6J/H0J5J:L8L8L:N:N;O

P>Q?R@R@TATBUDVDVEWEW?ETvDBWT|~땋֒х|\YX^YhWhZh\gZf\h]i\h`k`lblbmaqdpfpfofrhrx046J+'jC@plקǷﮦ脂Ղ{҂|Ѕ}χՒ֖ڝ筢뒑^]54@!R-)b42l96p94n61j2-j0.i0.g0-f/,f1.f2/h42m84OJ. 07G"#T$$X&&V&%S#"P""M JJ FDDHJJN O" P&"T*%\/+e51j52l31n31r52r83y?9E?FBFD|A?t88l00i.,f-+a,)\,(V+&N(#G$@ =;9999999999;:<>D F H!J!N" P"!S#"S#"T$ U%T&R"O"L JH?><:9999::889999::::::>DF I L !L !T$#X((]-+_/-`0,b2,b2,c2,`,)\)&X&$V&$R$#O#$K!"I !PIABFGB<46: > A"F$!J&$N(&X*(]-+b0,h/-u84|<7v3.94B>zF@jE=^A8`:2h+'p-:6I0G.H0I3J5L6L8L8L:N:N;O

P>Q?R@R@TATBUDVDVEWJX49b,+NL`\ޠĶ~ꕉ쪣ߐ؆z]USPTXZhXhYh[gZf\h]i\h`k`lblbm`qdphpfofrhtAF7J92}d^涯ꮥܢ⦚嗑Ոwqlgickeoinhpjtmwp}v̈́|ыՒז섅ړK5:K($^30l;7r;6p:4n60l31k20h1.d/,d0.c1.d40h61|<8죟Ԡ:,5G$$V&&Y''X&&U%$R""N JJFDDHIIM N!!N$"Q(%[.+d31h20j10m11q43o71xA:HAHCGE~ECv=<::99999999;:<>CEG J M!"O "R!#R""T$ U%T$R"P!N JH?><:9999::889999::::9:?F G J L !M!"T$"X(']-+`0.b2.d4.b2,a0*]*'Z(&V&$T%$S%$N$$J "F @ :!5!8 >@<5:=BEH!I$"L'$M)'W,(]-+b0,f0-o61u94o.)v40o84f:6Z61X0+`$# $/:2B0D/H.H/H3I6J4K4L7L8L:N:N;OQ?R@R@TATCUDVDVEWGU(.s>;XTpl촪ږ⋇bZXRRNSV\hYhXhZgZf\h]i\h`k`lblbm`pdpgpgodqgtSYH-,OKB{meÎҎ皔⊃vrfcc_fbhbjbhajblckblcneneoesitjtprq}~攓JG97D% Y0,i84p;5r:6p83n62l41h2.d0-c0-a1-b2.e40r4/ݗ鳯L*%' 5F$$X''Z((Z((V&%R""N LLFDDHHIL M L$!P'$Z.+c20e0.h0/n00p32p93yC<HB~FA{C@|DByA?r:8l0-h/*b,&[*$V*#N( H$B"?<;;99999999;:<>BEF H L !O "R "R""U$ U% T$ R"P!N LI?><:9999;::99999::::9:@EG J "N"#O##U%"X)%]-)`0,d2/e2/c/,a,*\*&X($V&$T&#R%$N$"H "E A >=<<<;::>D H!J!L$"P&$S)'Z/+_/,d/,b0,`3/d72`)&f*(Z.,`))t & **9-B/F,E/F0F0G2G3H4I4J5J8L8L8L:N:N;O

R?R>R>SATGVETEWDXGTz$(JHb\ń{촪헋ސ暓f`[VWPXRVV\cXdXdZhZfZf\h\h_k`lalbmblbmemfofsivel\30PKBrZRc^zvѐЎwojcf_f`fahbjbndndndl`i^g^bZc\a\`]`]\X^[b`sqE;<$L,'c40u<7x;7r94n82j5.d2+c1+b1.a1-`0.d20r60}xkD;.0? T*)Z,*X('X&&U$$P" J H EEEEEFH J"L&"P(#X.)b3/e2.f0-j0.m42p<6zC>|C>|>:{=9~@<|A@B D G I L P" R#"T$"T$#T$#R$"P"!M JF><:99999;::99999::::9:@EH !K!"N"$P$$U&"X)%\,(_/+d1.f1.c.+`+(\)&X($V&$T'$Q%$N$"H "E B @>==<<;:>B F H!J$"N&$R)'^,*f,*j*)c*(W*&U0+J& Oo"+,94F2G,C*D.G/F0F0F2G3H4H4J5J8L8L8L:N:N:NR>R>S@SBSFVCUDV@BC FI L P" Q#"T$#U%$U%$R$#N""M! H F@><;9999;::99999::::9:@EH "L""O#$Q$$V&#X($[+'_,)b0,d/,b,*`*'\(%X($V&$U(%Q%$N$"H "E B @>==<<;<>@B D"G$"K'$O)'X,)_,*_*(W%#S#!Xe &+<-A,A*A*C+D,E-E/F0F0F2G3H4H4J5J7K6J8L9M9M:NQ?R?R?T@SDUIV,2z55nhxp壚콲·ż◒ꖐd\\UXP^U\TLJRVXdWcZhZfZf\h\h^j^j`k`lbkakbldnererlv~??D.(`?:VT]Z^Xb\ldqjtnwr}wʃzˆ~ƈ~|tzopeg^`XWQRNLIJGJDHDJHpqPO==#I,'Z0+l61t84u<7p:3j60h4,d2,d0.a1-b0.d20i/)QL|0 06L&$V,*X+*Z*(T$$O" J H EEEEEDF H"K% Q)$W-(^.*b.,c.+i0.m42s=8zC>y>9u62w73t51u84x>9t<9h20a-*Z(%W($T&"N$ L#D @>;97769999;:<>?ABFI L P" Q#"U%$V&%T&%R%$O#"L" I F@><;9999;::99999::::9:@EI!"L"#P$$R%%V&#X($\*&^+(d.,e.+b+(_(&['$W'#V&$V)&Q%$N$"H "E B @>==<<;>>>? @"D$"I($L*'D*$J+&N&"Sf!*(8(>$>'A'B*D+F*D+D-D/F0F0F2G3H4H4J5J7K6J7K8L8L:N;OQ@R>R>T@SHV;B13D@}tʀx쨞ݹݨ卵ك|bZXP_V`VYPEBMPZdVbXgZfZf\h\h]i^j`j`kbj`kbldmeqdrjuKNM,)d@9曗Ԥ4/5H$"T,*X,+X*)T$$P" K I EEEEEDF H"J$ Q)$W-(\,(`-*b-*h0.m42w@;y@<97769999;:<>>ABEI L P" Q#"T&$T&&T&&R&$N%#L#!H FB@>=::::9887777788:::<@F I!"L"$R&&T''X&$Z($\(&_*'c,)b+(b*(b*'\(%Y)%X(&V)&R&%N&$J""F!!C!@ ><::::A?>>!@#F%"J$"L%#?'"N! j%):(>%@ >$?%@&@&A(D)C*D,E-D.D0F2G2G2H4H4I6J6J6J8L9M:N:N;O:v=8s51v62z64v41r3/q50p85l84c/,\*&W($S&"N$ L#D B>;:887::::;<<=>@BEJ L P"!Q#"T&$S'&T((R('N%#J" F DB><=::::9887777788:::<@F I!"L"$R&&T''X&$\($^(&a*'b+(c*(b)'a)&\(&Z*&X(&V*&R&%N&$J""F!!C!@ ><<<<<@>>= B"H!R#"U X#!3#<:"=&?&>&?&@'@'A*D)C*D,E,D.D0F2G2G2H4H4I6J6J6J8L9M:N:N;O:s84s40z84|84x52t40r40n64m85d0-\*&V'#R&"N$L"D B>;:887::::;<<=>@BEI L P""R$#T('U)(T*(S*(L&$J#!F DB@>?::::9887777788:::<@F I!"L"$R&&T''Z&$\($^(&a*'b*(b)'c(&b(&^*&Z*&Z*(X*(R&%N&$J""F!!C!@ ><<<<<@>==AM V`)%; <>=!>$@&A&?&@'@(A*D*C*D,E-D.D0F2G2G2H4H4I6J6J6J8L9M:N:N;O=O>Q>R@QGR;?}88GDJCZOsh왎j`aYf[h^]TJC?<66Y_XcVfYf\h\h\h\h\h^j`jbj`j`ldmepftbqfqh04I'&T84rKGb_ro|w|ˆ~Ί؊ۋԇ|uvprli_`VYOTJQINELDMEMFRLSMTRqq򖜔QTB5G.&\5.h60l50p60n4.j2,h0+f.,d.,d.,d.,g0*n2,lgﶯ\W++8D%"P+(U,*V('R$$N" K GFDDFFH J# M'"R*$V,&Z+'^,(c.+j1/t;9u<8q51u62{85~86|74v52q2.l42n86e1.\*'V&"R%!N$K"D B>;:887::::;<<=>@BEI M! R$#T&%U)(T*(S*(P)'M&$J$"G!DB@>?::::9887777788:::<@F I!"L"$R&&T''Y&$\($`(&a*'b)'b(&c(&a'%^*'[+'Z*(X+(R&%N&$J""F!!C!@ ><::::<<;=BR`%-"<< "> @ B$?%@&@'A*D*C*D-E-D.E/F1G2G2H4H4I6J6J7J9L9M:N:N;OQCP6<|98{FDNJMD_Sh\nb_Xlbkb]VIC@>88QVZdSdYf\h\h\h\h\h^j`jcj`j`ldmfqdrbqfr{;@H&&N74pPL_]olvpzrxnunnifbb^a\`]\Y\SXNSHRHPHNFLENFRJUNVPZXjirt<1C+$Z4.g50k4/o5/n4.i2+g/*e.+e.+d.,d.,g1+r60TP𶯣|v) +4@"M)&T,*V((S%$P" L! HFEDFFG J# N(#R*$V+&Y*&^+(d.,l31w=;t84r40x84z74}96}96x62r2.k31n96f2/\*&U&"R$ M#J D B>:9887::::;<<=?@BEI M! S%$U'&S('T)(R(&N&$N'%K$"F" D CA?@::888866666678899:?B H""J""O%&S)(V(%\*&`*'b(&e)'f)'d)'c)'`,)]-)[+)V*&S'&P&$K#$H""D @>><<<:046<Ju/!888:: ">#>$>&@&@(B(B)B+D+F+F,F,G/H1H4H6I1H4H7J8J:M9L8L:O:LAPAI02p1-tB>?BDBFJO#"V(&V('V'&V'&T'&R'&R*(L&$H" D ><:;::888866666678899:> B H""J""O%&R)(V)&[*'`*(c)'f)'f)'e*(c+(a-*^.*\,*W*'T(&P'%L$$I##D @>><<<:67@Nn"0#9888:: < <">">#>$>&@&@(B(B(B+D+G,H-F.G0H2H4H4H2H4H5J4J2H9NNBL4:%'m&$j4/uB&$R.+b/.j2/j2-i1,h0*f.*e-(e-(f.)h0+f6.p92D@敓鰪;"-:H$$P'(Q%&R"$P"$M!"MJHGFF F# J&"P)#T*#W+$Z*$^+%i2-r84q61u2.y74z;7x;7w:6x84w52t2.i0,i3.f3-[)&T#!P" KHD@<8368:899;;>>?BDCHKP$#U'&T&&V&$V&$T&$R&$Q(&L&$H" C ><::::888866666678899:> B H""J""O%&R)(V*&[,(`,(b*(d)'e*(f+)d,*b.+_/+\,*X+(T('P(&L$%J$$D @>><<<<8<Nr,#:7788:: < <">">#>$>&@&@(B(B(B+D,G,H/F0G1G1G2G2H4H4H3J2J6N6J@N:ADY`VcVdXfYfZf\h\h^j^j`k`lblbmbldndngpcg_:6RJCnNMTU\\db`^a\_Z]X^W^W]V\T\S[T[T\T\U\T\T]T\T\Ufangql{v脄똖V($0:" N*(^.,g1.j2,h0,g/*f.)f.)f.)h0+j3.j91x@9D?ԆW0+' )5C!!L$%P%&P$$N"$L!"L JHHG F I#!L&$Q*#S)"V*#[*$b-'n61r83p2.v41z:6{=9w<8v<7x:6v62t2/f.*f2,e2,Z*&R# N"JFD@<8368:899;;>>?BDDJ M! P$#T&%S%$R""R""P""N""N%#L%#H" B><::::888866666678899:> B H""J""O%&R)(V+'[,(`,)c+(d)'e*(e,*e.+b.+_/+\,*X,(U)(Q(&L$&J$$D @>><<<<:G`(476888:: < <">">#>$>&@&@(B(B(B*D+G,H.F0G0F0G0F0G3H4H6J6J7I:G)0lS"S&[*$`+%k3.s83}@>?ADEJ" N""Q%$T&$R$"Q! Q! O! M! L#!L%#H" B><::999988666666777778<@F J""N$&Q('T*&X*&_-*d.+e,*e,*f-+e/,d0-a1-_/-Z.*V*)R(&L$&I##E"@@>><<9:P 477777889 < "=">$>%?(B(B)C*D)F*F,E-F.E0G0F.F1G6HTK`VdZbZgbzvº뤚|n}r|tc\RLHCHIU[ZfWdXdXeZf\h\h]i^j^j^j`kalbmbndneogpv66H:4hWT{ɦາ߬Ԙ֗̋zrxprkpjnhohslrkunvnw}uؓ⧛沦딓~NJ.5I'$X+(b0,f/*g0+g0+h1,j3.k4/n72s<7u@9zA:>9_[rn) %+9D""J$$J#$I""H""FG H H!J#!M$"N$"N%"S'"V*"Z*$^+%i2-p62n1-s40{;7z<8y>:yA;8579:899;;>>?BCEI O#"P$$R$#O! Q! Q! O! M! M$"K$"H" B<:89:99888666666777768<?F J""N$&Q('R*&X+&^-*d.+g.,h/-h0.f1.d1.b2.`0.[.+V**R)'M%&J$$F" AA?><<:>f,266777889 < $>%?(B(B)C)C(F)F+E+E.E/E1E4G9K1>&,fVPN"I"V"\$b&"f'#j*&l.*r61x<7F>WObZf^d^leኃ迷֕uӈvn[UOJLMV[XcWdWdXeYe\h\h]i]i^j^j_k`kblbmcncnht=@;'"N>;z`[ؿƸԨ௣䯤ס˜͠Ҥܭ彰ɼ쐎~VS01E$!T)&_.*c0*d0*f2,f2,j60l82p<6t@:s<5w<6@;TP+ ! (6@ F##H""F""F""F F G!H" M$"M$"P$#P%#S'!V(!\,&f2,l4/n1-r40w73{;7~@<}D?{C>x@:s94s51p2.b-(^.(`0*T&"N"J FDB>;8579:899;;>>?BDF J" Q%$P$#P" MR" Q! O! L L#!J$"H" B<:89::8888666666777768;>F J""N$&Q('R*&V+&].*b.+f/,f0,g0-f1.e2/c3/`0.\/,W+*S*(N&'J$$F# BB@><<;I4145677889;; $>%?'A'A(B)B)E*E*D+D,B4H7F3@"*| a R$ I L L!O% W$Z$\&!^("e+&l-)t2.|63>:HCVNh^pge^ndޔͿږ҅~ݍnhXSQQW\ZdVcVcWdXd[g[g\h\h]i]i^j^jalalbmbndrPT6C.,eD@oi{Μ⽯ʶĸ볧ﴪ⢘蟘툈a]0/B"R(%].*d1+f2,h4.j60n:4p<6s?9t?:w?8y>8KFLHܫ4 $1<C!!F""D""D""D"E"H" I" N$"P$#Q%$S&$V("X)"`/)k61k3.n1-t51z:6}>:~B>~E@{D>w@;q94q40l0,_-']-'^0)R&"L"H DBB>;8579:899;;>>?BEH" M$"Q%$N""N MR""R" N L J!I" G!B<:89;:8788666666777757:>F J""N$&Q('Q*&V+&\.*a.+g1.h2/h30h30e2/c3/`0.]/,X,*T*(O'&L%$G$!DCA><<>[*2334677889:; < <"=">$>%?&@'A(B(B*C*D,D-D0B/>*3"(m$$]%"S'"N#R"W"SS$ S%R& R("V(#^*&h*(v.,~1054>9JBXOh_rhrhxkښȼƼ皓؋kf]\\_ZbUbVcVdXdZf[g\h\h\h]i^j^j_kalblbmbo^c7:!Y30|LHjeʄ}ԊЇؓ䦝Ǽ¶咽靕씒fb/0B# R)&]/+f4.h5/k82n:4r<7t>8t>8r;6v<6LEGBLGސ鶲F$  #/:B B D"!D""D"F" H" J#!N%#P$$Q%$T&$V("\,&e2,l50h/*s62t51{;7B>~A=zB;8689:899;;>>@CFJ#!O&$O#"L N O! S#"R" N KH H" G!B =:89><<:::887777788879<@AF J$"N'$R+$U-&Z0(_2+c3-g4.i5/h4.e40d40b3/`2.\/+Y,)V,(O'#F# H GA;8<J14424657889:: ">$?*B*B(B'C(B,D1C7C6=36m00g0.j+&d*$\(!T& R&"R&!S$"S#!R"!S$"T'%U(&W'&`))k,-r/0x20}85>:FBRJe_vpxqzp䛒۠覝֎jbhdZ\TbUbVdXdYeZfZfZg\h\h^j^j`k`lblbmfpdlM(6*$f86PLf_woy{uplmiplxtր|َޖݙܝ؞ա͜ɚ̖˔ʎ̇}փ|偀d`15D! R'%\0,a6/f:3j;4r>8w<8z:6z84>:J@H?NGXR߇wKE "+:@ E"F#F# D""F""J$$K#$N$%P$%S$&W&'Z*&b0*j60g0+l3.s51y95B>A={<8x<8y?:x@:o83i3.b.(Z*&^/+Y*'Q$!LIGD><:::;;;8899:<?ADK!"P$&P$%N!O "R "R!#T""R" P KHI" G!C<:::><<:::887777788989:>@DH" M&#R*$T-%Y/(]1*a3,f4.g5/h5/e40d40c3/b3/^0,[.*X.)R)$G$!I!JD;:?R$12124657889:: $>$?$>&@(A(A/A1@6B>DAD{<:IDI?OFYQ`[ڂ~ﴫja $*2=B!F#H#F""F""J$$L#$P$%R"$T#%V%&]-(f4.f2,h1,n4/w:6|<8@<{;7w84v95x>:v>:m72g3-_-'Z*&].*W'%P# JIFD<:::;;::8899;>@BH L""N"#M!"O "O "R!#R"$T""R" N KHH" F @<:::><<:::8877777889899<>DH" K$"O)$S+&X.)\0,`1-d40h42h52e51e51d40b40`3/]0,Z0+T+&K%#L" KF>>EY-01124657889:: %>$?">&A+B.?5<=@FHMLNLGE~><{86s1-n0*d,&])#Y($X($V&$U&$R%$P%$K%"I$"H%"J&$M(%Q(&a*(l.,u0-64:8@;HAZRneԊԑ̒ûntVbUbWdXdYeZfZfZg\h\h^j^j`k`lblbmclir68+/#V,)s;7zNFZObXf]h``Z[VWRWRQLUPXS^Xb\ph{s̅|Ȃ|ȃzˆ|Ԉك|肀񕔗^\46G&"W0,b61j:3n<5o:2s:3{;6GBJFJDTJ\Tg`nirn!  )0;@ G"I#H" H" J$"N$"P$#T$#W&&Z)(e3.d0*e.)p82v<7|?;z;7v84v84t51t83w>8t=8j60d1+\,&Z+'[,(R%"N!JFEC::::;:98999;<>@CL#!L#!M! L P" P"!S#"S#"S#"Q" N JH H!D ><:::><<:::8877777889888;=BF J# N($P*&V.(Z0+^0,c3/f62h62f62e51d40c40b51_2.\2-V-(L&$N#"MGBBLc1/1224657889:: %>$?">(@.>09>>JHRPSPURNLCB:9x50q2,i-'b*%^)&[(%Y(&X'%R$#N"!H!E @>== @%J("X(%j-(y51<7E@JBWN`Zwp唏❙䳬ߘXbVbWdXdYeZfZf[g\h\h^j^j`k`lblbmgpepGL51 T,(r=8|PHZPbXbZ_XYTTPRMRMVO[S`Wi`ulwzyԇ׈ֈօ|ሁ넂}񒔑XW38L)%Z2,d70n:1r:1v:2B:IBF@JCWP`Wmengb]qlۢ( $,8?H"J# J" J" M#"P#"R#"V%$]**c/.e0,d0*l60o72x>8x>:u84t62w84s62r83t<7r<7h5/b0*Z+%Y+'W*&P# K HFB@98::;:8799;;>ABDL#!K" L M! P"!P""S#"T$#S#"P" M J G F!B ;<:::??<:::8877776688799;=AEH!I$ N($T-)Y.+^1.d42d31f42h84h84g73d51c62b40\2-X.*Q)'N"!O! HBFRr.0022244666888::<:$@$=*@*:*2x::IFRMVPZTZTTOJF@<|:5v50p0+j-)f,*`+(^,*Y(&Z$$V PJC>:6$&5G"[)#p40@;JESLSNYUhc|yYcT`WcVbXdXdZfZf[g\h\h]i^j`lalaldldpZaF5 R-)p=8}OHZPYQZSVQTOWSZVb^nfvmĀwȆ}ȈȈʌώׅ䐊藏~~ꍐON4>O)%^1*h7/r8/~?7HAF?F?TNYSf_nfkdg`ztԃ~묦F)(  )4>F L"M$ O$!N"T$"W&$]*(f0/d.-e.*j2.p82w?:t<7s94s94w=8w:6q62p61s<7n94e2,\+%X*#Y,(Q'"K GEBB@:999:988:::<@BFJ""L#!J J L!R$"R%"T$"R" Q#"O! JFF D!@<;;;;@@=:::8877776688688:<@CFI$ M($S-)W.+[0-a41c31f42h84h84h84f62d62c62^4/[1,T+)R$$Q"!JGIY~.0022244666888::< >">&=*8|"(m66pECOJVQZT^W^W\URLHB@;|:6w50r1.m.,f.+c.-Z+(Q+)H" G >6.' # ! $&0A X*#o3/>:LFVP]Xb^lhsnۋX`XdVbWcWdXdZfZf[g\h\h]i^j`lalalemdpbkX :!Q-)n>9RJ]Vf`ojtoytց|چ݋ᎈᏈߌ㐉㐊閐~萔w@A6B T($f2+w>6F>F=G>PH[S^Wohkdf^tmՇ䖐^>= (0>G N# N"Q$!R" V&$]*(f0/f.-e,+j1-n61x@:t<6p83s;6w?:x@:9999988:<=?BDG H! J J M"N$ R$"R%"T$"Q" O"!L IEE C!@:;;;;A@>;::8877776688688:<?ACE!K%#P*(T,*Y-,`21b22e54h74h84i95h84e84e84a72^4/X.,U'&S$#M JN` .0022244666888::!<<#>);s"S-+_<:}JIUP\V_Xb[`Z`ZYSNHD@?:}73x30r00k0.f10`.,]((Z"#TLD = 65@8- ( 0B [+%s72A9H@PHZSb\mfyr⍄夘˾cjZdS^WcWdXdZfZf[g\h\h]i^j`lalaldlcqitp.1O30fD@^Yyrӏᘒ䘒癔昒ᗐܗ❖턃{甘`,,8F"b1-x<6D:9998877<=>ADG J !HH K#O% P& R$ R%!T$ P"N" K GDCB =8;;;;A@><::88777766885779;>@ABF" M&$P(&X,+_10b21e54g74i95j:6i:6f95f95d84b62\0.Y)(U&$N! IQd .0022244666888::!:!<'?"L>1+cC?LLXR`XbZb\e^f``ZTPJFD?<8~84z75t64n86n32-6:F6B4B2?1=1=2=8@:@N% & 4K&g3-w?6J@RHZRcZng~xꌃ꟔Ķw}XbP\WdWdXdZfZf[g\h\h]i^j`lalalbjdqju>BM.+aB=_Z~vғ棜︮ƻ韙Ӊ֋xpb\킂~|JD V.*m74C8r83v;6yAABFJ!"J "HK"N$ P%!N$R$!R%!R$!P"N! J EBBA<9:;;;E"D A?><;;67647777777778<?BEK" Q&%V,(]0-_2.d62g73i95l<8l<8l<8l<8i:6f73`3/\,(Z(%P%!I#LZx,.00223466789:: :"8!9%7` 9I*&h=9}PI\SbXc\e^f_e`fbZUPKHBB<<694~;4z=6x612;;L9N9L9x@;v>9n61j4.k61f2/],)W)&S&$R'$K# DC><::888887778?@CGJ L M N P" R$"S$#Q$"R$#O#"O#"M"!J" HEDBA=:9999F# D!B@?=;;78757777777778:=BDJ M$"T(&Y.+^2.d73h84j:6k;7k;7l<8l<8k;7h95d62_/+]+(T(#L% M!Xt,.002233667789:: 8$;+K -C$!f31wE@TL^Xe_kdhbiekgb]YTPJICB<=7>7A9<66>9J8M8L:N9N;P>P@O@R&0 .:}@<}@9v>9r:5j2.j4/g4._-*Y(&R%"T('P%$I!BB><::8::::99:;>BEJ JJN N S#"T$#V&$R$$P$$P$"L$"L" J!HDDB><;9999H%"F# D!B@><<888677777777789;@BDJ N$"U*'X.*`3/g73i95k;7l<8m=9n>:m=9k<8h:6d2/c/,Z+'N&"P$Vl+.//112255668899 8%<#9!< a+*v96FARL\Vd^jdlfjfe`]XTONIHBB=B:C7I8M8L;N9N;P>P?O>R6B-'6M%"\.&b4,g6.o82w;5<7>:A=KF[UrkȂ{ԕ뱪ત`hTbWdXdWdXfZfZfZf[g\h\h^j`j`jcj^h`l`hT;!M/*r@=QM^Zd`e`eaf`f_g^aZf`d^\UZSWPPIJCHAF?C<;8ef~{|~~OMg2,pA9UNe^smԅ~ގ؈yrzs}v|u|txpvnlfunԆvqa_܆촱_;:  ,@P#"Y+'_,&c/)e1+m61r:4p83t:5y?:}?;}@<}@8u=8t<7m50j4.k71d1+\+'U&$P# R&%L" F@A=<::8::::9:;=@DG I IKO! P"!T$#V&%T&&T&%Q%$N%#L#!K" G ECBB<:99999I&#G$!D"C @>==898677777777788:>@CEK"P&$S)$X-(d40i95m=9n>:m=9n>:o?;m>:l<8h62h2._.*U,'U)%Z# j*-..012245667889 9#:".2Z""p..|:7DBLITO[Va\d]d^`YXRTNOIG@F?JBHB=G6H7L8L;N9N;P>P>N=Q@P< "4D!T% Z*$_,&f.*l0,r1-y42:7@7;9xzzy{~~ߊ~:7n82YRnfɁy΄|̀xсz~xЀz}v|uvoxqvooftlτ|rl^XTQ{y򴱅ZX -AO# Z*&^+%h2,n62t<8p84t:6x>:|B=B>B>|B=z@;u=8t<8q:5h2,h4.g4.\*$X)%R%"Q&#L" H D?@<<::8<<<<;<>?DG H!GKL Q#"S%$T&$U'&V('S'&Q'%N&$J" H!F DBB@:789999I&#H%"F$ E"B@><:986777788887777;>ADG!L# N&"U,'\,(c3/j:6l<8o?;p@:l>:m:7l42d0-Z.)V+&Z&"f $/.0.022444666889#<%.*Od%%u32<;DAJHPLWPZR^V^X\VVPRLKFJDOHOJ@J7J6L8K:N8M9N=PRAS]  "6?"N"W'#['$a)&d)'i,*n0/r31z84?PITNXRUPTMPHMDNJLIKGIELHJFHDFBF>}@7<5TT|zz{~~}z~?:UNh_rjzsv͂xx|ux|uyrwprkohwnwld[TVPZXdbvs#  ,@O#Y*$h2,n82s;6q94z@:z@<~A=B>~D?F@}C>v>:u>8r<6i2-f2,e2,`.(Y)#T&"R&#N# HCB@@=;998<<<<==@D H!G H K" L N" R$$T&&V('U)(T('Q'&O&$K$"H" G D@A@<:879999J&$H&"G$!F# C A?=::87777788887777;;=BF H"L$R)$X)%^.*d40h84n>:o?;p@:p;8o64h2/^0,Y.)Z(%c$"$--0.022444666888!=.8  $BR"!e+*q22z98?;{FBNHTM[Ug`rodiT`VbWcVdVdXeYeZfZf[g\h^j_j_ici`j_nbqGOBE% Y1,tE>TM_Y_Xa[b[bZaX\V\V[UZTZTXQUNSLQILEB=rszyz{~~[WD<\Tldqjumrjrhslvozsxpvoohnhyrzrd\YQZSTMKHIF˓*   +=P$`1*k4/p83u=8z@;{A<~A=~B>B>|B>}C>x@;u=8s<7m83h4.h5/a/)X("T$R%!O$ K!EBA@?<;998<===@ACEFFF K" L N""T&%V('T('T((R(&P'%L%#J#!G!ED>@=:8779999J'$I&#H$"F$ E"C A?;:887777888877778:;?BF F L% X($[+'`0,d40i95l<8n>:n?;m>:q<9r86l42b40]2-\-)b)&v%*-/.022444666889:6B   0<W'&f0.r64=9?:F@JBOFOHRJTNTNSMSMZT]XBO6J5K9L;N8M8N=P:L V$"[$#`'&`'&`('^*(\+)h./l43k65n=9tD>zH@KDRIZVY^T_VaXcVdVdYeYeZfZf[g\h^j_j_ici`j^naqV_T$#O,(d=8ZTb[famgplohjcf^`Z^X]V\U\T\TZRZQRKMGWS|~zx{|~~݀A:KCOH\T\U\V]TdYlewowoqiogum|tkdZRXQZRRKIBB>:6䔓誧: (@U*$b2+o83t<7{A<~D?D@B>~?;{=9y@;v>:t<8r:6n72h4.g3-c1+Z)#T$P"Q$ K GB@@?><;998;=>?BDEEFFH!L$"P$#Q%$T&&V(&S'&R(&Q(&M&$J#!G!EC@>@:66669999K(%J&$H%"H$!G" E!BA<;9877777778777787:;ACCI"T$ V%"Z*&`/+f40i84m<8n=9n?;r=:t97p64f63b40`/,b,)h#%'-..02244466688:9&@\  % 0IZ('g1/v:6@:E?G@JBNEQHTLTMXP^Vf^d_DQ6J5K9L;N8M8NO"Y&$^&%b((d*)b**\,*\,*h--j11h10f40j83m<6r?6vC:|GBJMS]U`XcVdWdYeYeZfZf[g\h^j_j_ici`j^napenb--]:6oKEf`Ȉ֋쓍ވ~vzqvnrjofqhndj_f\]WRN{zx{xx{|~~򎎳YX{81F>WOZS\VXR]Tmcvoumnfqiyqtl_WUM\TUMLDE=@:z72z30ˁR/* *>S)#d4-s;6yA<D?~B>|>:}>:|>:|?;x>:t<7q94p94h4.f2,d2,[)#V&!T$Q$O#GC@>@>>;;998>@BCDG G FH I!L$!P&$T)'T(&T'%T&$R'&Q(&P(&M&$I" F B@>>>:56669999L&$L&$L&$J#!K#!J" IFB@<:8754245668::9999:<@DO V"![&$`)(f.+j0,n40r72r:5u<7v<7s:4q83p61l1,f-(b,( &(,.02322445667::$@%, 7 EKP&"Z1,j:4~@:F@LFTLXQYT^Yd_lflgcb>M5H6J9M8L7L8L:O8P9NeZynԐ駱쇃ցzzpti``ruy~xwxz{{|}~퇈~}63@8OFXP[T[Tb[ngtmnhnhvpxrb\UOWQWQPHJBD=u<6p62m0-x87kjZP$$7N)$d3/s>8x?:x;6z:6y85x:6x>:yB==<<;:;;<>@CEDGHHN"N#R&"W*&T&#R$!Q$ R$!N""P$$O$#K" H!FB@>><999899999K%#L&$L&$K$"M$"K" KIDA?;;854044668::9999:;>BLQW$"[%$b*(e-(k1,o4/q72t:5u;6s94t73s62p3/j0,`0)|%$&,..122244566788;$;g "  "4H"X($h0,s73~@;FBJHMLRRZY][]\Z\8r92h0+m50m31j.,NNtn( (8M'$a0.l4/r51r2.u2/x41w84v;6v=8t;9l42j2/e/,f1._+(X%"U$ N#"K$"H!C@>=<=<<;;<=>@DEDFHI L R$!T&"T($T&"S&"Q$ P$ Q$ N""P$#M$"J!FEB?>=;999999999J$"L&$L&$L%#M$"L#!M! L! FDA?=:85246668889999::<?GLP T!Z&#_)$d-(h0*j2.o72r:4r84t73t84u62q40f2-m,($'+,.02224456677:8:"7X    -BNS#"Q,)U50k61|<8A>HFPLWS_]bd;K6H7J6J8L8L8L:O9PuEAxEBvB?q@=l=9h<7f92f81f6/f30h2/g0.h/.f//V/*p((>FVdScTdUdVeWdXdXfZfZf\h]i]hbiaj`j`ldo?DJ@$Z.)p=9HDNJUQXR^W\VWVTRUP~RK}NH~>:>>fix}x~v}xwxz{z|}~fd74HCNG^Vjcqkmgqjxrslb\WQ[UZSQJJBC;|?6x94m2,h1,f3-b0,]+'X$"p76윚ʔ4-5@O#"_(&f,*h*)k,+q10r43q75o74m64h1.e0-c.+_,)V&"R"R#M"!H!D@@=<<=<<;;=?@BEFCI J!N"!P$"R&"T'#R&"P$ R%!P$ P"P#O#"N%#L" FDBA>=;9999999999I#!L&$L&$M&$N%#M$"O#"N"!H EB@@<86466666667777778;BFJNT# X& ^*$b,'f0*l40p83r83u84x95x84w73q4.l4.r/,%(+,/022445667798; <3U " 0 ;BDJ##U*'b2.m85tA=xJFPMUTTW:J6H7J5I8L8L9L@BEEDGJ!N" P$#T&$R%!P"O"P$ R$ P#O"O#N$"N$"I" EA@>==:8999999999G!H" J$"L%#N%#N%#P$"M! I HDC?>:9644665556777788:@BFJ O"R$V& \*$b.(d0*j2-n40r51u62v62z63~4/p5/j3,**(,./2234566778 8:: < 5w ,   %7ABI#S*'U/+Z62e96t55.36F6I5H6J8L8L:M;N9N:O;PKb]jelihfb_ZWURTNNJICxD>j?8Y60N0*A+#1* J"z!$YbTbTcTdUfWdXdXeZfZf\h]i\h_h`h`j_kbn\`;"*7% >$ B& E&!B$A#EOl#'LTpzro|t}t|u~v~wxy{zz|}}~|{MKTQc_hbpixptlib]VYRYQTLLHGCD?~>9t:4j4.d3+d4,a6/[2+P,'E(!: 53;zxߪR..$ "#':<=?@ A!H&"M*&W*&X*&W($T'"L"N#L$J"HDB@?<<;<;;>?@C E"DEI J!O#"T&%S%$P" R$!S&"S&"R%!R%!P#P#Q&!M%#J#!FC>=<;999999999999F G!I#!J$"M$"N%#P$"N"!L I GDB@>;9776553455555668;>ADHJP"T&Z)#_-'g0+l4/r40u62y63|6350y70q6.{1.)-",..1233456666 8 8<<#@&>*i 9  %&(9 Mv &3D4H5I7L7L8L9M:M9N8N;P>Q;Hd#$F4-lC?VOe_idjfhfeb_]\YXRTNRLICu@:a4-R)$C"7!K!%U`TbSbTdTeVdWdXeYeZf\h\h\h^h_hajak_kfmV"$,/4<>9 BHv:9X\nwtmzp~q}t|t|v~v~w~xyyzz|}~~~~XV\Xc_rnupoh]U]VWPYQPHNDJBHC~=9u73m3.j3.i5/g60e6/\2-P(#H& =6346eb[\. !'&- ...059? P&!P&!N$J"K$J#G"DFBA@?=<<>=>?@@ABH K" N%#R&%T&%R$#R"!R" T'$U($U($S&"Q$ P#P#P$ K#!H!DB=<;;999999999999DEG!I" L#!N$"P$#O#"N" M! I HDC@?;:87533245555667;<?BDGL"R&U%[)#b-'h0+o1-s2.x40|62z7.|70{80w61{3.,.%--0122445555689:> =#;)>"2 S 5 $ $ & ) * 2@ c/;4G5J2H3H6K6K8L9L9L8M;N=PAO9:^NEb\xҜ誤ꜚՆ~xtngb[XDA10o" d[xISSbQaRbTdTdVcVcWdXdYe[g\h[g\h_hbjakbpbn>?@A@AABDJ" L#!P$#R&$Q#"T$#V&$X(&V)&V)%U($S&"O"P#P#N#FDB>=;99999999999999CDF H!K" N$"P$#P$#P#"O"!M J GEBA<:8854424444446678:=BDJ N$T%W'!]*$c+&j.)o/+u1.v3/s6,z7.~70t80l92v7313*3/012344445678 : :#>$;$;&=*@&>'="60'(() /!4'>2L0E4I4H5J4J6K7L8L9K8L:N>?@C D CBDF"H#!O&$R%$Q$#R$#U&$Y)(Z*(W'%V)%V)%T'#Q$ N!P#P#M!BA>=;;99999999999999ACFJM! O"!P"!Q#"T""T""R! P! N JECA><9:766443233348::;=@DG! P"T$!X'$^)&b*(f-(k/+n2,v50z61}84}:5z:4~<6<8:8.5&20224566667 8"8$:$;!:!<"<#=&?&@'B(A*A,A-C.D.E.F-H-H0F1F2H3H5J6J7L8L:M:N:N;P@MORd^mb|ݟùźooPYKYK\L^N_P]P\P^P^Q_R`S`TaUbVbVdWdXeZfZf[g\g^h_h_i`j`kbldlfkflhlhljnkolplqjujvkxlxnzp|q|p|r|s|t~t~vuxwvx||턅yy^]QOSPURWSUPPKJFHDE@A;;6{93v60p3,m2+l4.j5.j6/j60k70l81j6/g3,n60܈򺶍da* +/=DG"F!CB@?BA@@ABDEF DDFGJ L!"P$$R$ U%"V'#X($Z*&Z)&X(%X($X)"Y*$U' O Q$ M"K H>:89988799999999::::@AEGL L O! Q"!T""T!!S!!R" O! KIECA><;:876544444489::<>ADLR" W&$\)&`+(d-(i1,n3.t4/w61{94};6>9@;B=A=>=48'40014566779: :!;;< MSX}}΋żɼmnMVJYJ\K^L_N^N^P`P`QaRbRbScTdUdVfWfXgXhZh[h\h]h^j_j`kalblcmelflgmhnjpjplqlrktktlvmvnxpzrzqzrzrzs|t|v~v~xu}zx~}{|hgTRRPPMNKLHJFJFHBB<::76544444789::<>@FLP" U$"Y'$^*&e/*i2,q5/t82y;5|=8@D?D?~C>?<79.8 01126678:: < < ; B>D>D>>;7628)6!436889<">!;"<#<$=&?&@(@)@)@*@*B*C+E,F,H,H1H2H2H2I2K2L2L4M6K9L=M@NCJJLgfو嚑螕㚏朐ppPVLXKYLZM\L^M_N`NaPbPbRcRdSeTeUfUgVhXhYiZj\j\j^l^l_m`n`naobpbpdrergthtivjujtltmtnupvrxryrxrysztzv{w{{~{~rtbbQPHFFCHDIDHBF@@;>9|;6x94x:4s60n4.n4.p4.n2,l0*k0*l2,i/)h.(k1+n3-o3-p4.p5/u93v:4v:4?:円db<7=@ABDAAAADEFG DFG H!K" N$"N%#O#"P$"U'&Y)(Z*(Y*&Y*&Y*&Y*&Y*&X*&X($V($O$ N$L"J FDA>8::9988799999999<::89<<>BEGHLN P"!S#"S#"R""R" P! N! L HEDCB@<988766566666568=>BFHN T%!X($\*'`-*f1.l31t86y:8}<:?B:A2=%95 7 989 : ;!<"<"=#>$>%?&@&@*@*@*@*@+C.F.I.I,F.G0H1J0H3J6L7M?L8y;5|>8~@:~?9{=7A;D?JF拊ig@=>ABBBBBCDGFFDFHJ!L#!N%"N%"P%"R&"W*'Y)'Y)'Y)'V*&X+'X*&V($T'#U($U($R%!L$J"I FB@==998688889999:<<::886:::<@AEFJKO! P" R""R"!S!!R! Q"!N LIHGEC@=<<:987544443469:>BDHL O!S%!V($\+(b.*j2/o42v65|97<8>8B:D>IDJFJIHIFJ:A2<)7"4!6 7 9!"?#@#@$@(@)@*C,D*C.F/H/H+E-F1G5H7G7D1<)2,0|-0x22t76yB<JC~HB~E>JDXRkd}v҃|Ԇ|؋ڋsrVXSVTXX\Z_Z_X^Y^[`]b`dae_c^b_c[``fZ_\b^d^e_e`gcidjfkglglflhnfmflgnhojqlrlqmplnlnkmjlfg_`[[XVTPPLPJPJNHLDIBGBD?B=C=A;~@:|@:z>8z<6z<6x:4x:4z<6z<6{<7{=7z=7{>8}?9~@:}=8>:?:>:AE@Ղꔒ혖ꕓ떔떔얔뗔ꗔꘕ똖Ꙗ蘕ꛘ띚Ꝛ힜띜Ꝝ렞렞ꡞꡞ裠椠椠夠䤠䦢姣䨤ਢ姣ꧤ䨦fbB"> >DDDDF EDDEFGHM$"M$"N%#N&$O$!Q&#S(%V)&Z*(Z*(Z*(Z*(X*&X*&V)%T($U($T'#R$ N"J"G!DB=:9:89868888:::::::9789:8::<=?ABFIKN R" S!!U!!U""R"!Q! P N M JIFC?>>::9844444346569>ABEHL"P$"V(&\+)d.,j00r44w76|>5@8E=HBOJQLTOUPSMKGDB9&?&@&@(A(A(C*C,E.E-F-D7J1B(7"/}"*j&\ $Y$&\(']+)`0,b40f60n<5r=6x?9y>;}?C>B=B=AD?D>D?D?D@FBFBGCGCFBGBFAD?FAKFNITOXTVSVSQNJFJFIFIFHDGCGCFBFBHCLGRMNLHEB?@=|:7~>:~?;}>:v:6r94p82n72k5/h3-d0*`.(T*&[*&`*'^+(L'#@DFILQ! R V""V""U""T!!R" R! P! M L J E B@@;::843332224446:<@BEFJ"P&"W(&^*(e-,m21n64gC6qF:JBLFOKTPVQSNPHLDHBA<<8:67442+4*5*6*7*8*9*9*:-8,7*6*5'2&0#-z )_[ Z"Y!$S "P!#O#$N&%N'$Q)&V,'Z+'`.(h2,l3-r62n75p76t54|66;8EBPL^Yhbphpimgqkys玅锉䏄⑅虌wvpmgicjdpiumypzpvlrknfibg`g_f^e\bZ]VZSVOSLNGNFMFLEKELELEMFNFNELDLCIDJEJEHCGBGBFBGCGBGBHBHBJDJFLHNILGKFIDGCHDD@GCNJLGOKRNTOTPRMKFKFHDC>HCB>FBEAD@D?D?B=@;?:A|=;v75q32p42r64q85m42g.,a-*^+(Z(%X&#S$ R"N!KB"H!N"M"D$?%< B!EEEEDEF G N#!O$"P$#Q%$O#!Q$#T'%V)'W)&X*'Z,(\,)[,(\,(\,(\,(X-(S)$Q&"Q'"N$K!J J"E @=9978:89868888;;;;:7569::;6666679;ACEJLP S" T" X" Y$"X%"V%"U%"R$ O"M!J"G DB@>;:6553422256788:<==A!F$!L&$R*(X,*_/.d22f;6n@:zFAJEIELFLFIDHCGBD?FAD?G@GAFACB@@<=::{66v32s22m0.g,*f+)d)'`'&_&'\&&Y$'V#&T$$R$"P$"O""L#!L$"L$"L%#M&!N&!O'"Q(#S)$V+&Y.([0+`1-d2/f30j2/n42r32w86?:998888;;;;9:;;:86456688:=?44445679?ADFJP R" S" W" Y$"X%"V%"V&"T&"Q$ P$M$J"H EBA?<:8665323456688:;:=B!G" M&$R(&Y+*\.,^1.d51l:6t>8z>:@:@<@tA;l<6d81a6/^2.[0,Y/,X-,V+*U*)T'&T&%Q%$P$#M$"N$"L%#L&"K% L& L&!L&"N("O)$Q+&T,(Y-)\/*^/+`.*d0,f-+h-+j0,j2,p81y>8GAMHRNSOUQ\TYR\Ub\f`mhupxtxryr~x}vـx㋄⋄⍆ꔋ蓉璈针ꑇ玄挂獄߆؁{|vwqhad]h`h`d]b[`X^V\T[T\T\T\T[SZRZRWOVNUMTLRNSOTPUQRNRNQMPLVRWSXTZV^ZZVYUZVWRUPSNRMNIMHLGKFNILFKEKEHBHBHBHBF@D?D>C>D>D>B=@:C=JDJDD>z?9t:4n70n70n53o64l52g1.`,(`+(]*'[*&T$#R"!N LJJH H F"F"E!D E!D CBEGH J!M$"N%#O&$O&$O'"R($T*&X+'[,(\,([+'\*&Z((Z((Z((Z*(Y*)X*)U)(S'&R&%O#"L" L#!FEB@:7788998;;;;:;<<887689::??@@33335567<=ADIM P!Q!T# W%"V&"V&"V($V($T'#T'#Q'"P&!M$J"FDB@=<:87666456678::;=A D!F K" O%#R&%U*'Z,*a0,g2/n4/s40z83;6?:E?KESMXR\U`XaZ]Z[XZVXTWRQLNH|HBtF>nC7d:5_61\40X1.V/,Y,*X,(T)&S(%R(&Q(%O(%N($M'"M'"L&"L&!M'"N(#O)$P*%Q*%S+&V,(W+&X*&[*&]*'_,(`-&d/(e/(l4-r60|>9D>JDFAJFOJQMQMOKPMTP\V^Yhbhcmhkfpklfphqivn|tzs~wځzځz~xՀzԀzՂ{Մ}рy҂z~xztyrwpvoslslslslrjqiphphldkch`g`d`dadaeb`]`]_\_\[WXTVRTPTPRNQMPLRMPKOJNINILGJFIDFBGBICKEHBHBHBHBF@F@E?D>A;A;D>ICJDF@z>8s93p71o81o82p:3k41f/,b,)a-*`,)\*&X'#T$ P P MLJJHHF F EEF F EFJ L!N" O$!Q&#Q&#R'$S(%U*&W*&X,(\,([,([+'Z*&Y)%Z((Z((X((X((W)(U)(S'&P$#P$"K" I H!DB@<86689::9;;;;;:::6788::;<>>>>333344448:>AEJM!O!R$ U&"U&"T&"X)%X)%V)%V)%V)%T'#Q%!N$J!H FC@?=<98776678689:9<>@BDH I" N#"Q&#W(%\)&b+(f,(l0,u51;6A=HDRMYT]Xb\d^c^d_e`f`e_`Z^XYRULQHJDzF?uB@;?:>8>9>9>:~>8~>9~@:C=F@F@F@F@D>C=B=>>?>>?@3221221046:=ADHK!O#Q$ S&"T'#T'#X($Y*&Z+'[+'Y*&V($T'#R&!O$ L"J FDB@?=;:77778666::;<>?BDFI P" S$"W$"\'$b+&g.)r5/z<6B=LFRLYR]Wc]gbjenhpjnhmhhdd_aY[SVOTMQLLGGCD@u?B>B>B?B?FBHDLGNJPKPLPMRNVPUOUOUOVPTNRLQKRLRLRLQLNHNHMHMHOHNGLEKDLEKDJCJCHDGCFBFBC?D@D@D@C?A=@<@<>:>:>:@;>9=8=8~<8|:4|:6|:5z84{;6@:D>E?GAGAE?|B<~BGAKEF@~B@@@@@@@@43222211257:=@DFJ"L#N$ P& T'#W($Y*&Z+'^+(]+(Z*&Y*&V'#S&"P$ N"J H GDCA@>:9888666::;;:<=?BFHMO S#X&#\(%d.)k50p:5zC>~HBNIRMXR`Xh`pgqhkbe^]WXSXPXPUMRJPJNGJEFBDB{@>x@=t;8o85n64j52h41c2.b1-`/,^-*_.*^-*],(\+(X*&V*%T(#S'"U(#T&"T&"S%!U%!U%!V&"V&"W'#W'#X($X)%V)(W*)X,+Z.,^21`42b65d86_83`84c94g84m<8p<9s<:v<:w96x:6{:7|;8<9<9<:<9C>D?FAFBGCHCHDHDHCHCHDHDJFIDHDGBFBFAD@D?E@D@D>C>B=B=B>D?A<@;=8<7;6}94}94;6}94}94~:4~:4~<7};6|:5|:5~<7|:5};6>9B=E@GAF@E?D>E?E?ICHBC=x<6w;5r60t82s82m53i30e/,a,*`,)],([+'Z*&V&"T$ Q"N!M K J ILMLLHJJ K"N"P#R%!T&"S&"S&"T&"T'#Y)%Z*&\,(]-)]-)Z*&X($V%!\'$[&#Y&"X%"V&"V&"V'#W($V'&V(&T&%P$#L#!K" G F G EA?::9:88::998899887788>?@BAAAAAA@@2210110002568;@BDF I!L"R%!U&"V($X($_*(]*'\*&[*&Y)%W($V'#T&"P$$N"$M""J !F FDB><::866699:::889@CFGIMR"T$ Z*$`.(d2,l:4p=7vC={GANGRK^Uh^i`bZZTWSYU[R^S^V^T\T]TZSWPQNMIJGFBA={?:v:6q83k41j30h2/h1.f/,d.+b,)a*(_*'^(&['$Z&#Y'$X&#X&"X&"Z'%Y&$W&$V&$V%#V&$V&$W'%X)&Y*'Z+(Z,*\.+]0-_2/`41^41^41_30`20d31e42h42i53n85o85p85r86q64q53r43r42r71s82v:4y:5y94z94};6~<6{<7|>8}?9~@:B=B8z>8y<6x<6x<6x:4z;6{;6|<7}=8~>8?:A@:<7|84{72x4/z61}94;6{94|:5};6};6~<8Bw=7s93r82t:4r82r82r82j2,e.,c-,`-+_,*[*(X'%T$"R" R"O"M K K!I H HLNN N L M! L$"O%"U'#U&"T&"T&"U&"W($Z+'\-)`.(_-']+%\*$Z("Z("Y'!Z'!^'$]&$[&#Z%"X%"W'#X($W($T&$T&$O#"K! J G EDBA?<:88888::8877788888:;ABBBBBBBC BA@43223221112458<>ACFJ N"P"R$ U&"\(%\(%\(&\(&Z*&Z*&Y*&Y)&U&&S&&P$$N##K!!I !H F @ ><;8666:9::6665=>@ACDIJQ#U'#X*&`0-b2.h84n<9tB>~I@PGZQ_V\VSNQNVS_Ud[pexo~tvv{stpnllhgda^\XTPOJKHFD|A?w=;t:8r86o64m42h/-g.,d,*c,)b,*b,*a,(`+(\*([)'Z(&Z(&X(&Y(&Y)'Z*(Z)&]*'_,)_/+`0,`0,`1-a2.c31b20a1/a0.b/-c0.d0.e1/d30f41i62k63l63l52l41k30i2-i2-j2-l1,n2.p2.p2.p2.l2-l4.n50o61o61p72r94s:5t<8u=8u=8v=8u<8t<7t;6t:6t82u82t71s60w:4z<6}@:B<~<7|:5y72y72~<7}<7};6|:6=8@;D?FAFBE@C>C>D?IDKFICHBz>8r82r82q92r93r93p81n5/i0*h/(d,&`+(\*([)'Y)&T$!R# Q" O"N"N!M!K!K#J"H"H!N P! Q#"R$#R&%R&$P&$R&$X(%Z*&[+'\,(]-)\,(\,(\+']*$^*$])#])#\("\("\("\'"\$"[$!Z# W# W%"X(%X)&V($Q%$P$#M" H HECA?><:788988::887689:;:<>@ABBBDDDDE!C B@4444665444555666<@BFG J L"O#V&!X'!Z)#\*$\*$^+%^+%`,&\+$Z*#X)$V($V)&R'&N$%L"$F# D!A?<<88<::78666::<=@@ABG J" M%#R(&U+)Z-+_21f75l:4uA;~GANIRNNKNLPNSP]Zlh~yχă|y}wxvzwyuvqtnpjkch`d`a^^Z\WUPRNNJKFHD}F@xB8}>8{<6z94|94|:5};6|<7|<7~?:C=E?FBFBFBFBEAGCIEKGHE@>|;7y:6s73s:4s:6p:4l61j4/f1+d.)e/*c.(`+%^)$V*#T)"R' Q&P%P%P%O%L$L$L$L$L$L$ M% N& M% O&!Q'"R($T($W($Y)&Z*'^+(_,)_,)`,*]*'\)&[(%Y&#])#_+%`,&b*&a*%b+&a)$^&!X$!X$!V$"V$"W'&V&%T%&R%%J" H!FEEDB@9888999988885556:<=>@@@@>@ABDCBBECCD55557665555566669;?@DEI K"S% T&V(!X("[*$\*$_,&`,&`/'^/'^.(\.*[.+X+*T((Q''L$"J" G EBA>=>>;:9877::<<<==>BDH!J#!N%#R&%V*)Z.,^0*f60n:4x@;E@GCHEGDHFQN^[nj{w|xxszŁ|ʂ~Ȁzztwpumrjogkgiefbd`b^`[\XZUWSTPQLNJJEJD~HBzFAtB>r@=p>;o=:n<8n;8l:6k96h95g84f73g84e62d51d40d40e4.f4.e3-d2,h60h60h60h60g60g5/g4.h3.j3.k2-j1,l0,l0,l0,l0,l0,l0,l0,l0,l0,n3.o4/p40p40t84t94v:6v;6r<4r<4s;4t;4v:4x:4x:4x94=8=8=8=8~<7{94|:5=8>9@;C>E@HCHBGAF@GCHDJFJFHDD@~?;z;7z84z84x84t73v<7n72g3-e2,c1+a/)^,&\*$],&\*$Z("X'!R( Q' P&O%N$N$N$N$P% P% P% P% T($T($S(#R'"S($T($U)%W)%Z+'\,(_,)`-*`,*^+(]*'\)&[(%]*'_,)a.+b.(d0*d0*d0*b+&a*%]'"Z$W$!V&"W&$X(&V&&S%$P"$L!"G ECB@@>=9888888888888888=>>?@@@@?@ABBBA@CB@B555576655555666678;<ACEFM"O$R%!T&"X)%Z*&\,(^-)b2,b2,b2.a2.`1/]0-Z-,X+*V&$S%#P# M"K H FD@@?=<;::::<<:;<<>@DEJ" L#!O&$R(&T*%Y.*^0,e40n85w><|@>}><>:B>JFVQgbtosnto~vx{srjogoendnflfjehbgad^b\_Y]X^Z[XXTUQRNPLNILHLHJFHCEAFAD@B>|A8p>8o=7n<6o94p94n82n72n82n82n82o82n4/n3.l2.n2-o2.p1-o0,o0,s3/s3/s3/s3/v62v62v62v62x84x84z96z:6z:6{:7|;8|;8z>8z>8|>8|>8?:?:@:@;>9>9>9>9C>FBHCFALFJFIDHCHBJDLFNHIEFB~A={>:x:6w:6v84u84x;7v:6r83n61g3-b0*^.(^.(^0)].([,&Y+$X)"W("V' U& S' R& R&R&R&R&R&R&W($X'$X'$X'$X($X($Y(%Y)%Y*&\,(^/+a0,^,)^+(^*&^(&]*'^+(_,)`-*`-*`-*`,*_,)b,*b.*b-*`,(^)&['$X%"X%"W&"V'#U&$T'$Q#"N" K HDCA@>>=<88888888777789:<?@@@BBBBAABBBA@@B@@@5555766544446666678:=?BCH!J"M$O% T($W*&Z,(^.*b2.b2.d40d40b3/`0.^.,\,*]('\&%X$#V#!R!Q NLDCB@>><<::<<;<<=<>@BF F H I# L&"P*$R*%X-(^/+d30j84n86s84t94w;6B>JFVRc`hdmdukvmpfkblcndpfsjwn|tހxۀw~v|tzstnqlmhjdhbd^`Z\VYTVRSOQLNJLHJEHCGAD>C8|>8z<7z<7z<6z<6z<6z<6z94|:5};6};6~<6<8=8>8?:?:?:?:>:>:>:>:>9>9?:@:@:?:?:?:@<@<@<@B>HDJFKGLHKGJFJFLGMHNHNIPJKEGA|B8v95v95v95v95y<8x:6u84s83n72g2,c.)a/)`/)`1*_1*]/(Z-&X,%W+$V*#U)"T(!T(!S' V( V( V(!V(!V("V("V("W("\(%\(%\(%\(%\(%^*'a,*c.,a.+`,*^+(^*'](%^*&a,)b-*b.,a.+a.+`-*`,*_,)_,)^,(^+(_,)^+(\)&X'#U%!T&"V'#V'#T&"P$!N# JIHE@?=<<<<<88887777::::;<>?@AABDDDDBBBBA@@?>=<=444466662111222266677:>AD G"H#J$ N&#R(&V,*\0-`/-a0.c20d40c3/b2.b1-c0-c+(b*'`(%]&$Z$!W"T PJHGFDBA@=======<:::<@BEF E"F#J%!L&"R(&V*'Z-*_0.e40f41j42l42r86z=;HGTR`XbZe\ldjbg]d\kcndwlւwۆ|څz؂x|rxnunvoyrwptnrloimgjdjehce_e_b\_X^W\U[TYRXQUNTLRKPJOJNJMHLGKGKFJFJEHDHDGCFBFBEAEAD@D@D@D@EAD@D@EAEAD@D@C?B>EAEAFBFBJFJFLHOKLHLHOKOJOJOJNJNJOJOJNHMHFAC>~@:z=7z>8w=7v<6v<6v<6v<7t:6q72p61n4/j0+g.)a/)`/)`/)_/)_0*^0(\.'X,&X,%X,%W+$V*#X,$W+$W+$W*$[+%[*$Z*$Z*$X'!Y("[*$],&a+(c,)d-*e.+f/,d.*b,(`*'`*(a,)c.+d/,d/,b/,b0,b/,b/,c0-f20b/,b.,_,)^+(^+(`-+\)'W&$U$"T%"T&$R($T(&P% N$J GFDB@>=<<999988887777:;<<>>?@ABBCCDEF CBBAA@>==<<;4444666621112222444647:<>@B D I$ L'#P*&T,)\-,^.,`0.b0.b/,b/,d0*d/*f+)e*(d)'b)'a(&_(%]&#Z$"R"!O! N LJHFD?>>>===<::::<=@ABC D!G"I#J$ N&"S)&X.*Z.*^/+a0,g2/j20p64u:8}FAQJUOVO\UaY_X]VcXg[rf~rфx~svkqf|s拂|zptkriogpgpjoimgkdlekdhaf_d\b[`Y^W]V\TZSYRXRXRVPTNRLRLPJPJQKPJPJOIOIPHOHNGMFLFLELENHOHOHOHQJQJRKRLRLSLTMUNQMPLNJOKUQTNUPSNTOQLMHKFB>A<>9}<7}>9}?9|?9{?9x>8v<6t=6s<5p61o50l2-j0*f,'g-(h.)g.*a2+`2+`2+`2+`2*^0*^/(].(].(\.'\.'[-&[,&Z,%Z+$Z*$\)#^*$_+%`,&b.(b/)d0*e1+f/,d.*b,(b+(d,*d-*d-*d.*d/,d0-d1.d2/c2.c40d51e62g52f30f30b/,^*(`,*`-*_,)Z&$W%#T$"S$"S(%P'$N'#M&"H H FEDB?>:988777777778888=>?@?@AABCDDF F F F BBA@@>=<::98666666660///000000024578:<?@ C F" J$"L&$V&(X('[))^+)`+(`,&b,&c,&g,'i,(h.)h.)e-(c,'b+&`*&Y('W'&T%$R$"Q$"N"!L H D C BA???>:88::;==AACDF G I" L%"N($R(%V*'Y,)[+)_,*c.,f0.j20q:6y@=JFLGQLUO[T\RYO[Q`Vjasjwntkqfzoڀvshh^oetjukrkohmfmdjamdnemcoepepfpfmblbj`i`icgbf`d`fad`b^a\a\a[`Z`Zc]c\b\b[aZ`Y_X^WZTYRXQVPXRXQXQXP\U\U[TZSXTUQSORNNIIDGBC>A<~@;~@:|>9~@:~@:}?9~?9}?9|>8x<6v<6r82n80l6.k4-h0,f.)d,'d,'f.)e-(d,(d,'^/(^.(^.(^.(^.(^.(^-'^,&\+%]+%],&^,&]+%^,&`/)b0*g3-f2,d0*c/)b.(b.(b.(b.(c,)d-*f/,g0-i2/j30k41l52j64j74h84h95f95f:5e:5f:6g62d1.c0-`-*^+(_,)\*&Z&$Z&&V$$U$$T&%O&$L$"H# F"G!F F D ?>:998777777888889:<@ABBABBCDDEF F F F F BA@@<<<<:988666666660///0000//01144567:;>BD!G" P!"R"#U$$X%#](%`)$b*$b+%g,(g.)i0+j2,j2-h1,h1,f1,b1/a..],,[+*Z+*V)(S'&P%$J%#I$"G" F!DCB B 9::<<===BCCCBCDF G!K"M$!Q&#S&$W(&X(&Y(&^&'a**c.,i20p:8xA>zEAIDLEPHRJQJRKVP_Xg`ncnbmbshrhjaj`ofnhkdiajbvn~uނz܄zԆz҄yρvszoynxlvlrlqlojnijfhdfad_e`e_d^d^d^d]d]c\hbg`f^d]e^d]b[aZ]V[UXRWPSLPJMFJCC?A=?;?:A<@;B>B}C=z@:x>8v=6v;5v;5u:4t:4r93n5/k4-h2*f0)f.)d,&d,'f.)d,'d,&c+&c,&^.(^.(^.(`.(`.(`.(b.(c/)d0*e1+f2,g3-g3-f2,e1+d0*c-(c.(d.(d.)f1+f0+f0+f0*g2/i41k63l84l74l74l74l74i84h84h84f84d:5b94_72^60b0-^,(^,(^+(Z($X&"W&"Y'$Z&&V%$S$#P%$I F D BF!EB@=:8787665555::::9:<?CDDEDFFF EF F G!F EDC@@?>::::8665<;986643111122103334444412689<>AHLN!R!X"![$"_&$a(&`*(b,*f0,h2.l42n42p64p75l74j53f41c2/`1.]0,X.)W,(V('U&&R%$O$#L$"I" F D@@AACCCCCCAAB B @ @ FH I" K#!L$"M%#M%#N&$N$#O&$R'&V('[)(a..k55q::u@=wB>}D@HBHDJDLENFRJ\SbZbZc\ibkdf`d^f`gag`hbqj{tڀy҄{~uzqzqzqulqhpfjeidhcjdjdnhslwpwnyqxpunqjlehbb\`X`X]VZTWQTNQLOJIDEAB=A{E>yC8t=6s<5r<5r;4q:4q:4q:4q:4n62l60l50l40j3.j2.h2,h1,i2-i2-h2,h2,g4.h4.i5/i5/j60i5/i5/h4.j3.h2,f0*e.)d-(e.)f0*f1,d2,e4.g60h71j93j93j82j82m63n53m63m63i41h30g41h52d62f84f95f:6e84a51]1,Z.*],(\*&X($V&"U&"W($V($S&"N#"M"!I!H H!F BA?><;<<<<86655668=>@@@@ABHHGGH H" H" F I!"H !H !G G FFD=;:888886666>=<:87643222221144444444214669:<BCHKQ T! Y$"\%$\)&^,(d/,g2/m63n84q86s:8r:8o:7n96k96f62c40`2._1-]-,Z,+X*)U)(R(&N&$K$"I#!F# G!F EEFEEC@@>@>>>@CDE E F F!G" J$"J$"K#!N#"R$"V%$[((]**c0.f20l74q<6v>9z@:C=E>D=B9>9?:?:@:D>HBFBE@D>B=E@F@F@D>{B8v=6t:4s:4r93r82o82n82n82n82o83o83n72n62n82n82n72n72n72m61l40k4/j60i5/h4.g3-f2,f2,e1+d0*g0+h1,i2-j3.n72n72o83o94l:4l93k93k82i71h5/f4.e2,j20j20j20h20g2/f30f30f40i:6h:6g84e62`1-^/+[,(Z*&X'$W'#V&"U&"V'#S&"R$ N$K" J!FFEB@@>=<;;;;;::988:::?@AABBCDJJH H H H" H" F H""G!!F EDDCB<:9866666666B@?=<:98666655444444444421346889<>ADHLP R"!V%#Y(&^,*b0.g31j44n86q98r:8r<8q<9q<:n;8m:7j:6i95b41`30\2.[0-W.+T,)Q*&O)%M($K&"I$ H#G"F"E D D C B>>>< =@ A A B B B C"D"D"E"G!H!L#!N"!P"!P"!V&$X(&\,(`/,f4.h60l:2o<5v=8y>:|?;~?;?<@=DAGDMERKWPWPZSXRWQYSYSZT]V`Zf`ickekelfhcd_c]a[c\hamfphrlrkohg`^X[TXQUNWOVNTMMFJDGAD>B8>7>7?8B8z>8y=7y=7x<6v;5r:5q:5q:5q:5p94p94o83n82j2.j2.j4.j4.k4/j4.j3.j3.i4.i5/k71l82k71l82n:4p<6r;6q:5p94o83p84n62k4/i2-j4/i3.h2,g1,h1,h2,h2-i2-j20j20i20h20b/,f30g73g73f62f62b2.^.*]-)[+'W'#T$ X'%W&$U&$T&$R%"O$ M"L!G FDB@?><<<;;<<<<::;<<<<>?@@ADEF G J L J J H H" H" F H""F DCBA@>:98866666666DCB@>=::777765444444444420233554469<@BFH N!S$"X)'\,*_.,c1/f42j64n85n96p;8r=:t@;r>;k<:i;8h:7f86c63`41]2/\0-X.+V,)S*'Q(%O($N'#K%!I$ I#!H" D!BA ? ? @ @ @ @ @ @@A B A B!D# H$!I" I" I!I P! P!P# R%!T)$V,%Y0)]4-d42e31h42l64r:9s::u:9t98v<5x>7A;D>FAJEMINJNKNJOLPLPLPMSPVTZW\X_\c`d`d`a]]Y\V[U\V^Xb\b[e^c\d\bZ^VXRWPUNRKOHLFJCH@G@G@E>C;B:@;~>:|<7z<6z<6y=7v<6t:4x:4x:4x:4w93v82v82u71t60r84p84p84p84p83p82o72n61o72p82q94q94t<6u=8v>:x@;t<8s<7r<6r<6p94o83n72m61l60l50k4/j3.k4/k4/l40l50n62n62n61n61n60l40k3.j2-h2.h2.f2.e2.h52i95h84d40b.,`.*^+(Z($X%"X%"Z'$Z($V'%T&#P$ M"L"J I J#EDA@=<;;;;;;>>>>=>>??@@BDEFFG H H!J" L! M! K" K" H H" H" F F""D B@>>=<988855556666CDDCA?><;::99887544344441133466643448:>BGK O$"S&%V('Z+*_/.b20f41h63k:6n<8r>;u@=xB@wC@tD@sB>p?:n=:l<8l:6j84e41d2/^0,\.*Y.*W-(S*%Q($P&%O&$N&$L%#J%"H$!F" D!D" D" D" D# B B B B D# D# E# F# G$!I#!I#!J#!K L L J!J#K$ N)!O*#T)'Y*)\-,^/.^..a00d22f43h72i71j60m60t94x:6|;8<9B@CADBECHFJHJHKIKHKHKGKGMIOKQMSOWPWQXQXQVOVOUNUNVNVNVNVNXPXPWPWPXQVOTLRJRJQIOGNFLHLGLFLFLFKEICHBHBGAF@F@F@E?D>D>|B>|B={A8v<7s94s94r83q72m61m61n62n72m61n62n72o83p94p94p:4p:4o83o83o83o83p84p83o72n61k3.k3.j2-g/*g1.h30i63k85f62d40_0,\.*\,(Z*&W'#U%!X($X($W'#V&"P$"M! JGFG F CCB@=<;9:<<<<>>?@@@@@@ABCH I J J" L#!L#!L#!L#!N"!N"!L#!L#!H!F F EBA@@<<<;666666666666DFF EDBB?@?>><<;:65444444113346664444669<@DG J" N$"R&%W*)Y,+]0-`3.d62g84l;8p>;t@>tB>vB?v@=u>;t<:r86q86r75q64m42l20h0.d0,a/,^.*Z+'X*&X)(W((U'&S'&Q&$O%$M#"K"!I#!H# H" H" G" G" G" G" H" H" H" H" H" H" H" H" H !H !H!H!H"H"I"J"N$ P%"R&$S(%U*'V*(X,)Y-*]0,^0,`0,b0,e2.g2/j30m31p0/s20v43w65|:9}<;>=@>A>B>D@EBEBD@B?B>CG@HAF?HAKDMFPHPHPHPHNFNFNFNFLDLDLDLDLDJBJBH@JDJDICHBF@E?|E>|D=~C=~B<~B<}A;|@:{?9z>8z>8x>9x>9x>8w=8v<6v<6v<6v<6t:6t:5r84r83s94s94t:5u;6r:5r:5r:4q94r:5r:6t<6t<7r<6r;6r:6q:5p94p94p84o83o83n72k50j4.j3.h2,i3.m61l74h52e2/a1-\,(Z+'Y*&V)%T&"V'#V'#V($V'#T&"R$ P"J I G F DDB@@><::888=>>>>?@@BBBBDDEF J" K" L#!L$"L#!L#!L#!L#!N"!N"!K" K" F EDC@>=<::::666666666666FHF FF D D E!!B B A@>=<;765444441133466666445457;>ACI!"L"$P&&Q((R+&U-(Z0,]2.c51h95l<8o=:v>8v<8w;6x:6t62x63y74z84w51t40r3/n3.j2-g1,a/)_-(`+*]))Z''X&&X&&U%$S$#Q#"L#"L" J!J J J J J J" J" I" I" H" H" H" H" F!!F!!G!!H!K"M"M"N!N O O"P"P#R%!T*%V,'Z*([+)\,*\,*^.,^.,^.,`/-f/.f..e.-d-,g0.h10j21k32p51s62t84v84w95x:6z;7{<8z@8y@7{?6|>6@8@8?8?8?7~>6~?7|>6~@8~@8~@8~@8B:B:B:C;C;C;B:B:C=B<}A;|A;{A;yB;xB:xB:yA:y@:x?9x?8x>8v=7v=6v<6v84v95v:6w:6u84u84u84u84u84u84t84t84r51s62t73t84r:4q94r:5r:5r:5r:5s;6t<6s<7r<6q:5p:4p84n82m61l60h5/f4.e3-d2,f4.i60j71g4.d0.a.+[+'X($X)%W($U($U($T*%S($P&"O% L"K!J IEEFDB@>>>>=:::9:>>>>>>@@DDDDF G!H" I" L" N"!O#"O#"N"!N"!N"!N"!N"!M! J!I EDCB<;::8888666666666666DEEDG!!G!!G""H##F##E""D""D!!@??=8765444422344666555543349<>@BEH !I""L'"N)$R,'V.)Y/+_3/d73h95r94t84v73w62x62|7496:8<8~;8|;8z;7v:6p94l72l51l44j22h00d..`+*^**\)(Y('U'&T&%R$#P#"O" O" O" O" N! N! L" L" J!I!I!H!D!!D!!F!!H!JM P P!P P!P"Q"S$P$O#O"V&$V&$X(&X+(Z,*X,*X,*X,*\.+^.,^.,^/,_0-^/,^.,^-+e.,f.,f.,g.,j0.j0.l1/l2/l6.l7.o8/r80t6/w70z70z70x81w81u81v91u80s90s90t90v92v81v80v70v80x70x80w81r60p5/p4.n4.n4.l6.m6/l6/l6/l5.k4.j4-l6.l5.k4-k4-m1-n2.p3/p3/p3/p3/p3/p3/p2.p2.p2.p2.p2.o2.n1-n0,n3.o50r83t:5t:6u;6v<7v<8r;6q:5o83n72m72k60i4.h3-e4.e5/f60f62e50a1,^.)\,'Y'$Y($Y)%Z*&W)%U($S'#R&"L% J$H"G F H!H"I#DDBBA<<=>>====<<@@@@BC D D!H" H" H" H" J" J" K#!L$"L M! N" N"!N"!N"!M"!M"!M"!L! H GDBB@98766666666666666666>>@DG!!H""I""J"#L" L! K JGGDA?<;:866587543322222222124589<<>AG!J# L&#N'%P)'T,)X0.\30b4/f6/i60l4/p40t51z74}96{<8|>:{@;~E@}FA|GAyF@yE?|D@yB>t@9n<7l95h61f4/b20`0.\,*Z*(Y+(X*'S'$R%"V##W""V""T""Q Q N N J H H HJ!J!K L N OOOP!P!P!P Q R" S#"R$$U'&T('V*)W+*X,+X,+X,+X,+Z-,Z-,Z-,Z.,b/,b.+a-*`,*b.,b.+a-*`,*f/*g/*g/*i/*l2,o2-p3.r4/n60m60m60m60l4/l50m60n61o60q61r62r72q61q61q61q61n61n61n61n61n62n61m50l40p72o60o50p61l2.l2.m4.n4/o1-q2.q2.r3/r3/r3/r3/r3/t40s40s40s40t51r40q2.p0,p2.r40u84v<6t:5r:5r:4q94p94n72j60h4.h60f5/f5/f60e51d40b1.`/-\+*Z('X&'W&&S($R)$R($R)$R)$P(#O&!M% F F F F F!F ED@@@@>>>>?@@ABA@@BCEF DF H" I#!J" K" L" L" L M M M M!"L L "N$$J"#J""H!"H !E DBA@>><87776666666666668:::==>CE!!H""I!"J"#N"!N" M! L I J HFCB@?;:8788744422211111124567779<ADF G!H" J$"N(&Q+(X.(\0)a1*d0*i1,n1-r3/t51w:6{>:|B=HCLFNHOIMGNILGHD}GBzE@yD?xD>vB=>=<;86666666666666667888::=@CEF G !J!J!J" K" I J!J HEDBA@><<<99664443333333344554469@BCDEF J$"L&#P)$V+&Z,(]-)`,(d,)g,*i-+n20s64v;9|B@HFLIKHHEIDIDHDHCHDHCHCHC|DA|B@z@>x?=<<;:66666666666666665555778=>@BDEFI J IKKIJ I HFCB@?>>=:87553333333344444468=>>>?@B E"H"M% R(#T($W($Z(%^(&^)&b*(g.,i1/o74u<:{DAHF~GD|E@~GBJELGPJNIMHLGIGHFFEFDDCBB@??>|>>y=>BDDGJMMM L L J I I G FDDBA@><9854445443444444448::;>?ABBE H"L# P%"R&#T&$V&$X&$[(&`+*c.,f0/j54r<;wB@wD>vD>yE?~HBLGLGJEFBFBC?B?D@C@B?@>?==><=;;::~88|88|87x76p96m85l74k63h20h20h20h20b0*b0*b0*b0*c0*b0*b/)b.(c/,b/,a.+_.*^.*`0,`1-_1-].*^.*^.*^.*^/+^/+^/+^/+_0,_0,_0,_0,`0,`0,`0,`0,^.(^.(^.(`.(`-'a-'b-'c,'d.(d.(d.(d.(f0*g0+h0,h2,i2-i2-j4.k4/l50l50l50l50m50m50m50m50l4.l4/m50m50p62p61o50n4/p60o50n40n4/m50m50m60m60n62o82q94r:5q:4p83n61l50l4/l4/k3.k3.m61l60j60i60e3-a1+^.(\,&\*$\*$Y)#X("Z,$Y+$V*$V*"T&"S&"R&"R$"Q#"P" N!L IHHHI I I I HHHHGGHHHI J!J!L#!K" K" K" O$ N$ M#L"M#M#L"L S"T"T"T"V# V# V# V# V""U!!S!!R R"!P"!N"!N"!I!"H !FD@><;;;;;88886666666666666666433224468::<>ABFHKNOP!N "O "N!"L "K "J !H !G FEDB@>;::8876653333444467889:;<>@C E!H"I"J# L# P$!R$"S&#U&$X(&\+)b0.f42l=8o@:qA;r@:v@:~FAHDE@C=B=D?F@D@C?D@C@CCCDCDCD@A@@@@??~>={><::888866666666666666666666444422436688<<@BFJNPP P!Q "P!#Q#$P$$P$%N$%M#$M#$J"#I!"G!!D BA>><<998744444444667888889:=>B D E!F"H# I#!K$"M#"N"!Q$#T&&V)'X0*_6.f:4j<5n<6p<6w@;~E@B9@B@FCHEKHMJMJMJLILHKHJFIEHDFBEAC@B>C=B<~@:|?9z=7z<6y<6x;5v84u73t62r62p61p62n61m50l2.l2.l2.l2.l3.l3.l3.l3.i20i20i20i20k42k42k42k42j4/j4/k4/l4/m50n50o50n50l40l40l40l40l50m61m61n72q61r50q40p40q40q40q40q40l4/l4/l4/l4/k3.l4/n61n62p61q72r83r83t:5s94r83p72m82k71j60i5/j60j60l82l82l82k71h4.g3-f2,d0*a-'^+%\*$\*$[*$[+%Z+$X,%X,%Y,%W(!V& U' T& R&Q%O%N$M#M#L!K JJIII I I I J !J !J !J !N"!N"!N"!N"!M! N" N"!N"!R$"P""P"!O! LN O! P" R#S%U' V("V(!W)"W)"X*#X("W'!V& U%T$S#R"Q!P P O! L" J" E"B!B BA@<<:766666666666666666666666665688220244668;>ADJNQNOP!Q "S$&Q%&R&'S'(P&(P&'N&&L$&J$$I##E!!D @@@?<<<:66664444344566668888;>>?A C!F"I" G I K!L!L& N( T-%^1*d6/h60l82p83x<6|>8~>8<7:6<8>;@=C@GCLHOKPLPLPKOJKHJGHFFDFCFCFCFCFAFAFAFAE@D?D>C>@=?<?;~?;|=9|>:y=8x;7x:6x:6x:6x:6u84u84u84t84q86p86p86p86p75p75p75p75n60n60n60p60n40p40p40q40l50l50l50l50l50m61n62n72t62u51t40s40t40t40t40t40r84p84p84p84r:5q94q94p84r83q72p61p60o50p60p61o61o<6m;5k93j82h60g5/f4.d2,b0*`.(^,&[)#\*$\*$]+%]+%\,&\,&]-'\.'X*#U)"U)"T("W("W'!U' R& R&O%N$N$N$M#L"L!L L M!"M!"L""L""L""L""L"$L"$L"$L"$N""N""N""N""P$"N"!L KN O! P"!P"!R$#S%$U'&V)'Y*$Z*$[+%\,&\,&\,&Z*$Z*$X("W'!U%T$T$S#Q!P P! N K G D @<;??;:98654444555566666666666666669;=>SDL2_gfx-1.0.4/test/sample2x2.bmp100777 0 0 106 12217637577 11475 0BMF6(   22SDL2_gfx-1.0.4/test/sample3x3.bmp100777 0 0 132 12217637577 11476 0BMZ6($  IhhlSDL2_gfx-1.0.4/test/sample8-box.bmp100777 0 0 1002066 12217637577 12127 0BM66(    !!!"""###$$$%%%&&&'''((()))***+++,,,---...///000111222333444555666777888999:::;;;<<<===>>>???@@@AAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLLMMMNNNOOOPPPQQQRRRSSSTTTUUUVVVWWWXXXYYYZZZ[[[\\\]]]^^^___```aaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxxyyyzzz{{{|||}}}~~~!!! !#$##$%##"!!! ! !!  "#%&&%$$%%&(,./379:;:7788753355679998777777755777777775555556767899778788788999999;;<=<<<<:97754103221/..-**))***)**))'&%%%$""!!!! !!!#"##$&&()(*,,/022657:8:<<>?>=<;:851-,'%#$%"  !!!! !#$"##$"!  #$$%%&&$$&(*-035:;;:6788885153353356655444447765666677778888989;:;<<>=>??@@?AAAA@@@@?@AA@@@@AAAABBCDBCCDEFGHHIJHHGED@?<:65442110..-,**)(**+*))((%$$#!!!!! !!! !""#%&()+,001445779<<:<;;:840/,*((('%#  !!""""#! !! !  !""#$$$$$%(+.0147:<;:868999775475435555777867788888::::<<>>@@@@@@AACCDEEFGHGHJLJKLLLLNNOONNMMMMKKJJHFFGFFGFHHHIHJKKKMNOONMLJFB><967543220...-+)**))(('&&$" !   !#$%%**+,-/23346789::8742/-,++)'%$#!  ! !!""""! !!  "%%##&%$#%&*./356;=;86678899889::87789888;;::<;::;;;;::::998777766688889:::::;<=>AABCGHIJJLNOSUWXXYZZVVTSOOPQNMLKIJLNNNNNPRSTWVUUTOIF@><:865520.,,+*)++,,(&$#!!!  !##$%&(*+-./1234322110...-*))(&%"! !"" !!!!!!   !"$%'&%%#%(*)*-147:<<<86346789876678::::::88;9875543111111112210333334456678888877779;<>@ACEFHKMNPSUWY[]adfe\WTSZZWSPNNPQQPPPQSTXZ[\]]][WSNJEA>=;97520.-*****)('%$#"  !!"#%#$&'**,,-./02210..-,+*)(&$$"! ""! !!! " !"#%&'%%&'()+,../159=?<87;999::<<:<<;:986454201/.--.//1111110012333333345589::==<;77779;=?ACFHJKLNRSTVXZ^`cggd]WTUW]`^YSPRSTVWYXVUWXYZ\`bbddcc[VPMEDA@=;87420-,+++*)(&%#!  ! !#$&'())+-.111011101/.,)(&%$"!""!  "#"! "$##$#$%')+.2/20/(/49<;==<;=<;;:8653100///.-,+././1.//01223545677885433135689;<;:889;==@BEGJLOPTTWZ[\]^\[[ZWVTRTSTVWTRSRSTSTWXY[[YVVXZ\]]`chihhlnjc]TMKHDDBA;853//.,,,-(('%"""  !"##$&(*,-.0112453210/-*(&$"!  !"""! !!!!!!! !"#$$#%%$#*,.0//1/))")+167787533210..-)()+++,,/.-..-././001123344566674333877787659;>?AEHJJKOPQRRQQONOLKKJMLJIJKKKLKMONNNPNOPRTUUSTUUUY[\^]^`ccfjmljmrtnd^ZSONJHGA=9850//.,,+((&#" !#%()*,-.0124432120.,)(%##!!!!"""! !!!!!  !"#""##$'),.020/6.*) !%+/1000/**))**)))()+,,-.--,*+*)*)*++,-/144551233544645679;>@@CGJLLKIGGEEEECACA@BECCBACDFEGHHGGGJJLNMLMOQSUWWTUX[Z[\^_addfhjllgeju|whdc_WUSRLIB@<864211/,+)'% !!$%&()+-./111123210-,)'%$" ! ""!   $%&')+-/016~{X"%%'''%''&%'''''%%%%&()()'$(&%%(((),.02300.+-.011138=CGFEB@>>?@?>;74589<<:988:==>>?CCDDFFGGDDDFIKKJGFHMPQPONNOSTUUUX\^^\^acghklotoe]`gha[XUOHE@><96120.-++*&-kn3 "$%&')*+,//1131100.,*(&$" !! "!!  #$$#''+,(')~z!!!$#" !!$!!#%%''&#! !#&('+*-103.)))-/666>?ABA;72--0236420/1368;733456;:;98::768993015546301/6:9944369<99>@BBB@BGMMLINQUTQRW_ec\XWRKC>>@><750,)*,**@p9!!""%&()+,,-//////.-+*'%#"""! ! " "#%$#!$kt)! "  "$')&&% $(('%&*-*--,'3442/,15434,$((,/152-')..68332+&+1/2-,.-(),,+)%" $).'&$!$)(*-)$')((*)'(.0+-,.1232398:;9?JQV]ZURG>;=ABA:71,'*+,)(j`!`"$%'(()),,-.//..-+*('%#!"! #O~D"%+(,*$ !')&&%&*.31,(&.*+'"%).51,*(#&+/11/*''*-323-$ #"'+'%&)&(""$#  %!" !"%#$"#$$"&$$$#*%$$'.+-+0;FPPUQH?64:BIKF;1-(,)+((!%#Ld !"##%%()+,,--.-,+*)(&#  <^nl`5!]i;3cZ+\^@HmI+sp`o[4(_a02_hP% $'E]ZYSSPJ>0)-/,((TuY* \kP%$"'/3MjqX3(-24QnnO+'0/Ru]14XTXY0#2,$A=CRR; )Xm^=%YjI2i`25p]18m[.#YpJ#!#-8Opqnhd]Z`kbLVvnC,([qV.'(.O8&Sg\40bW$  !!"%')*)*+,+++*)(%$"!(rtBB{cEob+_lul^NF``zC6~qN#&,Qi{ocu{P1+#m*n.!%$.T|vV.+bz>3:o05bZ3,z%#Vl:&vts#[|rxix9vv:rA:lb '0EnfeHpY9tr2.5Vqu!{th$Z!"$%%'()())*'&%$$"! Gp$%"{Z<}ReFu|L}+uhN[st#ubdo1y-zk/'qN #$+)1k;'$8xz[&$pAn+PJ("')}o@!2vU3b7<2:p2}+!vx%%5OQOJ}v^Wsze/;q_v.|mw7y9g}'mHY[X#'-.qo|`$"$`Qj7oRon]f,8d~sB!L}y]Tlw~ !$%%%&'(''''&%##!!86%"zm"wu#Mgu2+}[yrKUx:V2 $'jdW]u6(d,`pE(zZ#_+~o"qhtHf}L(++343Goz$!#.{f~b5vl%$'uo9% 'orKnM0yoF32258D~r0,*?YBtsRG==p31.5fCm3dCqyT/9rHV{w:usB32j,ew3.s|# Kz_ "#plB#.r2&Hqw-,5n79s!A~r*/d{Abpz^>{xp<5owDdvyiI2Aup%"-wl=~|s024685fxS%#%);^:Ei}g;Eczu{rJuL~~FSqYyXswlTMIodoELqzpA;?qp{ssweh|n/9Qvs+%)_P4{s4!$## ?lz!QU(mt?Vszr6A=AGm5339Grz179>?FDIPRNPMKJBJ:>84.+)&#! !"$%''&&%%$!!%&&%#%&('&W2#!#X^e! !"$,*011,1459;=h|Q./13==?>BBGHGJNHo65.2m|H=<>ZI244:8?=@=BD@BHDFHQLMSY]]`][VmiW[]kE\MTbdyGvww|s^[WVWPKEEDDA871.*%ctS ! $!%$ $'*(-0/2777=@FHFGLHIEEC;;512,)&#!  "#%%&&''%# #$(%$%%&&%'#0rn0/gkm& $%&)*2...-38;>ACQvr0076;@BEEGEA?>:IyoQZzO9153sv~e/1346546<<AAFBG>A>;9411.)'%# !""#$%&&%" !$&&$$$$$%&'')(.S~{](i!"&**+*)(.0478><]98;<>=;:875345=<<;=@BCIMSRXZXTWPLMMLJLKKLQSSQNQXVWZY[]_abcegihihilomo{uvx}oieaYMHFCCC84/($!" !#$'(*+++,,+*++-..-**'%#! "###$$ "$&'''''&&'''&$#%   "$$%&%'+((($'$!! !!""#!  &&(+-///.,.25;=?@BB<<:766988;;89>@>>ABCACCEDFFIHKHKLLOPRTTUWWW[\]dfhkinmnsolr{}opaUVRNI?=86:72*#  ! "#(+///.,)'%"  !!!#$ "$&())'(((('&%$"!  ""##$$$&)+10000.-,(*)*(+,**-/-0///,+))(&(('&%%$%#$&%$$'())*,-/016889;>BFGLLUXZYXYXWSIHHDB>873342,&$ #(.131/-)'%#"  "#!#&'*))()(''%$!    !!!#&(+,,-$$$$$$$$''''(((('%$#! !! """"$$&'''*+./12679;=>@A@ACEBBBB@;75133/)$   '+34532.,)'#"   "$&'+*))'&%$#!%3/0--------....00000112222201334444333311112222321010..000011112222210002335666446699::9876888788889889777765436644444444443334234444444434333445554577567899:;<=>?A@AABBBAB@?>?@CBAA>?ABAA@?@@AA@@@@AA??AAAAABBB@@@?@@@@CBABBA>?AAAAAA??@@??BAA@?@BCAABB@@@AAAAAAA@@A???BAAA@AAB@ABC@@@AAAAAABA@ACBACBAABAAAAABBAABA@@AA@@@@?@AA?@<+(+146899987640-*(&" !"##$%%%%%$!!" "%'+****(&&&&%$%%%%$$$#%"!"""#$"$$%%&&%',-**,16<@@>?CJPRLEA>>=<<=?@BBAA@ACEKKKLIJKLKJJKKJHHIIJJHHGGDDDDDEEAAABC>==<:987777876554332///..----,+),*+,,.0178;=BEIKQSVXUTSSVXXWUSMIB>84.,)'""! $&%(,/44689988640.+)&#!!#"##$%%%%#!!" "%)+*)''&" #%'$%+3.,.4:BHIFHO\cc]OIA=<<==?@BCCCDDEEEDIJKLKMNNQSTUWY[]^_`a_bfhggggh`a__[YY[XTQOLIGCA@???AA>=:865200.-,+)'&&%$%%'),+/256:>ADHMPRUY[_`bb_\UOJD=80-(%"  !!$'*-.03487887642-*'&#" "$"#$$$$$$ $! $&(*$#! "%*//-.5>EJJFLQ\fd^TMF>61001234666779799;8:;=?>=@@ADDFGEFHQX[VW`ebkw{ywmhcZUQTPNJIE@>941/.+&$ #%(*-//145430.*(&#"    "#$(*-.0246564331.,('$# ""##$$$$""#! !+3=AFHJKLKLOLD:4'   "(5?GIHJO`fc\URPSPD<2& !"#&('(('&'%"$!!$%%%$$&$$**+.,/4=AKXaarqzzme]WWWWSOF?:531(%   "!    !"$&)*./23333210/-*(&$! ##$$$#"!!!#/:>CCDEGHHGIKMLNLLNMQRQPH6' "+4=?DO[gc^XPNQUSWWSNHEDDDDDEFFJIJLMLKJLLLKILOQOOOORRQODA73$$#! !$$))/66BBCBDDFGFHJJKLMLMNNNRQQRPSTTUB& $+0;K\c_[UPPRTTTammlmonooqqqsstsuvxxyxy{}}|reTD( #,04CLOal{¦toomdWPW  "%&)*,./111100.,+(&#!! """#"!!! #"#&*+2:<=>@>@BBCDEFGGGIIIJKMMOOPQRTSTTUVVXX; "-<;=>@?ACCDEEEFHHIIIJJMMNNOPRSRSTTUVWXYYB# (58?GMOR[Z]bgpknkkmmmopoqrssttvvvxyxz{||}}~`6 !&*-5FYmì֬  !"$&'*,-../01.-+*'%#"! ! "$%$(-8;:;?;=>??ABBDEEFEGHJIIJJMMOOOPQSSSUUUVWWZV[X= #'7CLS\amvwtkgfkklmmopoqrrsttvvvxyyzz{|}}~~|T&%(0;BRcuϹ  !#%'()*-.021/--)'$#! ! !%%#'-,8=::;;=>??ACCDDEFDFIKIIJKMMOONOPQRSTUVWWWX[YZ_U3#)4BTdole]ZZdnkkmmmoooqrrstuuvwyyxyzz{}~~]6,56DRbsؾ0 !#%$%'(+-01320.,)%#" !    $$$%+-2799:;=<=??ABABFEEFGGFGGHIKMNOPOOQSRVTVVWXXXXZZ[]A%0?JOTUUZ^Xajhijkononqqqssstuwxxyyy{{z~V-11=Pey꺫L "#$&'(*-.1210-,*'$! !$&#%)-04799::<<=>?ABACC?)#%''%&)+.5?FMNQSSRUWUVWWYXXZ[]Y\P$"'/;GSSLD@FPMPTWY\jrpqqrssttvwxxyy{{{~zt|<,5gpppqssttuvwwyy{{~[*9K^rU"+3D]oؽE9==CFJKPRUW]`dgfjם  "#$&(*,/1210.+'%" !%'#&*.169999:;:;<=?@AAC-  !#%$%''(,3:ISSSTTUVXXY[[[[\]^T  $.37763766778;8Joppqrstutvvwyy{{||i#0E_ytpu|n%"+7L]s߲A %((+0359>BGIDW  !"$&)*.2322/-*(%#!  !%$$&)-24579779<<<=>>?@AA%  !#$%&'')-514=LTSTUUVWWYYZZ[\][`R #)15767679::;AEGDg% !#%',-033320-*'$!!!&%%)-0455677899;;<=??@AA%  "#%&'%',443>JPPQSTTUWWYYZZ\\\^_^L $.365789:<<<;;cnoqrrsttvvwxyyz{}}6#/>NX`bdc^[ZTVQRZu*#/=N[co|е "$&*+,238@AA%  #$%'('+233;IQPMOSTTUWWXYZZ\\\^\^b? !*/4479:<===?v  "$')-/133220,*'$! ! ((%(*031444416::9;;@AA%  #$&'),1629ISOPLNUVVWWXXYZZ\\Y\`__`' ",237:;=>=FKI^sqprrttuvvwxyyz}zzT%3DSclpprqoojgfcc`j++8DOYclsx}"""$%%))-1599??@$ !%()(,2629FSQOQKUWUTTWWXZYYZ[\]^^^`Q #*38<=@>BLMQitmqpqqssrstuwwyyy|{h&7K]qz|{&,6BJPW]bipuy||yz4 "!!##%'),-047:H׹! !$&*.011//..-+(%"   $&'&',/24433-((0988:;<=>?@?# #%(**.526CLXQUOORRRTVWVWYYYZ[\]]]]^c0 *29=<>FJIas||torqqssrrtuwwyyx}{"1EgƼ )5=DINRWZ]`afhmyW !!!##$&(),.1464)!!  "$(,.00...--*(%#!!"&)'%(.12320/+(-1978:;<=>?@?$ !$((,.465@LYRXUMPQTSTWVVVXYYZ[[]]^__aV (38>@IJRnyyzpoqqrsrrtuwwyyy}x~@8Cc~͞s !)2;@EFJLOQQTZaju{w!!!##$%&&)+.043vK #!! !%)-..---,,*)'%" !#&+(&)0011/-**/,+799:;==>?@?# "%(),086JK\uxspnqqrsrrtuwwyyy{z}J1Cfɐg"+49;<@@CFGIQW^eo~ !!!###$$%(*+-21Gt $"!! $(,--,--,+))'&$! ##)+&(,/010-*,.-+(68:;;;;=?>A$ #&*-0676@N\RX_XY_][]TSTVVXXXYZ[[]]___aG&1=HKdxyjpppqrqrttwwxyxyz{W(/BOd_ajib_bdghfhkmr|C&-24779;=?CHLQ\`k$%%$#"""%&')+*05֚#$&$"!!#%)*+*++++*)'&%$ !"$*,'(,.00.+*--*'%4999;;:=>>?$%)++3;7>JV\S[a`^Y]`RMUTVVXXXYZ[[]]___`Z$1DIdylppppqrrttvwxxxyzzd*8IU\_dfhghjlnoprvvz~|$!(.1444689>&%(,.9:7DO[[TZ^YXb`T?ETTVVXXXYZ[[\]^]^`b#%;Adyxqpoopprrttvvwwwxyzq)8ET[acabacddcdefggiinrw!*.1234568=?DJSWV$&&%%$#"#$$&'(-,O7"(+.*'$!"#')*))****((&$$"  !""'.+)*+-+*+.1,'&%#+6889:9<==@*#(+.3=6=KSa[SWY\c^QB3GWTUWXXXYZ[[\\]]^_^8*8Wy|xnnooprrstuvwwvxxy}&$2CLRSWVXZZ[[^^____```boG&*/0122359;?AJQtx$'&%%%#"#"#%&&&*0]'),/0-(&#"#')))))))*)(&$$#! !#$$(.+)**+-*,1-(%'%&&6799;;:;<>-"'+-/6>5@O\d\WY^d`QB66OSUTUWWXXYZZ\\]]]_]E+Imxloopqqsssttuvxyzy|7,8DOSWZ]]adeggmlhiicddb$)/02222569:B0 $%),.29=8ER^gb_dg\KB329SRTTUWWXXYZZ\\]]]_]L"1^npoopqqssrttuvxyzzxI'6EQ\cinrrz|}vnpa#)02221123559@DP$(((&%#!!!"#$'()*\ԡ655642.)$! "%((()'(*)(&&%$#!  !"$%%)/,-,+++12-)''&%!"*././10033*#%),.05>;;JT^hjjfYN@10,JRRTTUWWXXYZZ\\]]]__S Aeqkoopqqssrttuvwzzzz`&9Pbkowtwzz& (04543234558;BE*#(((&&$""!!""%%()8z}<954430,'# !#%&'''(*)('&%$#!!!!"$&&*0-+,,-/30*&(&&%#"  !#'&+.006B:>LU]gi`VJ>/+)AQQSTTUWWXXYZZ\\]]]_^U+Qbqooqqqssrttuvwzzz{k-@Uglv}Ƽɺl'269754233457<@M $(((&&%##!!!!#$'().2><9:<=BDCA=87541/)$  "$%&'''))('&%$#!"!"#$*-01-,-050,+'&&%%### !"#%'*-032:@:BMU[\[RG9,$)DNOPRSSUUVVXXYZZ[\]]^_U:Vqеonmopoqqpttuvwxyy{u),ARn쭒+'178:84544367;>ln&(*)&'$##!!!"##$'),39;:9;?CGHD@:6321/-(# ##$%&''((((%%$#! ""$$)-0200253/,*(&&%##"" !"#%)+-033:@8@MQROJ>5(!2IPMNPRSSUUVVXXYZZ[\]]^^L"H\ëӯegnnppoqqpttuvwwxyzy9-FsƲc#/8==:6555456963200.*&! ##$$&&''(((&&$"""##%%(-1345550-**((%$#"!!   !"$&)+.144=A8?GIFA;0!&@MLLMOQQSSUUVVXXYZZ[\]]^aA1Seũدc\annopoqqpttuvvwyyzzK 8d±}soquuw{}"*6??>:8763558:A'+,+)'%"#"!!"""#%(+27767:;DKLLJB:530..+'# "##$&%&'(('&%$"" $#$%&(,146753.,*))(%#""!!  !"$'*,/145:>3:<=82*+AHJMLMNOPQSSUUVWWXYZZ[\]]^]5B\vݷi_Z_nnoooqrpttuvvxxyxz]/Hlokmnomnpoprrrvwz{O&3<:96445689,',--*'%##"!!"""#$'*165569=FLJHIF?530-,)%#  !###%%&'(((&%$#"!##%''),146631.,**)(%$"!  #$$'*-23346:.02/+/?FKJLMMNOPPQSSSUUVWYYYY[][^^Y.Pgӷɗoc\]`mmmoooqqstuvvvwxz}r6HZg}qlmnooqqqnkkfhgggcgl{ $.7@@=<8545546:E#.0,+)&$#!!!!!!#%(*166559?GGCBEED;30-+*'%! !"###$&'((((&$" !#$%'(),03552/-,*+)(%$"! "#$'),010/-2(#"0>JLHHLLMMNOPPQSSSUUUWXXYYZZ]\\L0hs߹ᦣf]^a]hmmoooqqrsuuuvwwx{|>=A_z{pkmuuvxxyxvpkiea^ZZWY[($$-5=??<95465467kg!,/-,)&$#!!!!!!#%(*044459?HF???AE=40-+)'&! !!""#$&'())(&%#! !#%&((*,/0431/,,*,)(%$"! !#$'*,/1/)'$#,AFFFGHIJLMMNOPPQRQSTTUWWXXYYZZ\]9CBFFIJIIJLMMNOPPQRQRSSUVWWXYYYZ]I;I骩i_cb\LZmknooqqqrttttvvxx{T.BGRbpwxkcYTPNOMSi,49;>>:7654464C'/0.)&$#!!!!!!#%&+001159DE>::9:BDACDEEHHHJJKMNNNPPQQQSTUUVWYZYZ]X8FQټܤyhafdUINqknnqqqpprsttuvwy}]01>Lcs~֨sg\WSOONOT`'&389;;975445565+$-1.+'$#"!! "!#&(+/00129BA:;<:8:=<3.+)'&#! !!$$&'*+,,(%# !$%'*+*,-/0/..-.,-*)&%#" !$$'%!(8A?BDCDDEEHHIJIKMNNNPPQQQSTUUVWYYY[X@>KWӧqkggbRGEokonqqqpprsttuvw{yl5,:Qfwɴne]WSPQOSV[?$289::964443432?!+0.+($$"!! "!#&(+//014>;99;<4.*)'%#! !!#$'(,-.-)&#!!$%'*++,-//.--....*)&%#" ! $# ,>?@?ACDDDEFHHHJJKMNNNPPQQQSTUUVVXYXYF?LP^xӣqiikaOG@hlmnqqqpprsttuvw{ww7*9Ngx}zpg_ZWSRRRXY\{Y.799:864333346r^'./,)&$"!! "!#&),..026@A:;>?=;79=5.*(&%#! !!#%(*-.-,)'$!!$%'*++,-/.--,././*)&%#"  2?>?@@ABBDDEEHHHJJKLNNNPPQQRSTUUVUWXXC@KSScmէtgpobOHB_mjoqqqpprsttuvxywxC)8Rduz}{{vokjjfc_YXVTRSWZ\btz+698985333335:Z~$,/-)&%"!! "!#&*,.-/38B=9==??<78=6.)'&##! !!#%)+,-,)*'%#"#&&)-,./-//..01/-+*'&# !3===>>@ABBBCEEGFGIJJKKMNOPNPQQTSSUTXR;6EPVZ^gޱ{oqqbRGAYkjlnooqqrrttuvuwwyS.@Pbqswojdaba`_\[YWYXXXYaa_p)3687643101268M")-)''%#! !"#%(*-.,.1<=89>A>=:7686-('$""  "',,++++-)%#"#&&)--././//0120.,*('# 5><<<>>@@BBBCEEGFFIJKKLMNOONPPPOUVUUC0-8EPZ^\hs𵿈vsvfSKBRmllnooqqrrttuvuwwyb7FUcjnjea__^][[YYYZ]]^_b^anx(147654211248>@@BBBCEEGFFIJJKLMMNNOOPOSQUL5%,48ALYaabmϷyvymVMFNjllnooqqrrttuvuwwyn>@@BBBCEEGFFHJKKLLMMMOOQQPN7%%(-/7;7113*'$" !#'((%%%%%''%! $&),-.1334555642.,)(% 16::;;;<<=@@ABABCDFFGGHIJIKKLNRE3#!#%$&(+,/3;AJ[fkkt̘|aVWellmnnqqqqssstvvww{F'>aŨúZ&,233559;?C?@EZ#&&%%##$%''()**/5869<@EHGD=:7113)%$!  #%)(&#&%%$&'%!$&),-.1244556743/-*(%!!$959::;;<<=??@AABCDFEFGGHHIHMMG1'&'"#$('(*,/28?@@ABCDDEFFGGIIHD:/,**&&&#'()*+.059=DN\mwx|țrgjlkllmoppqqrsrsuvvvi#6Pnj%,278;=@BB?@PLR& ##%%$%%&(()*+/593;:@GFFFD<83//1($#  "&)'$$%'&%##%$" #'*-/246787886520/*%# !58869:9;==>?>@ABBBCGFFGGIIIC<650.+)))('&(+,+/369>DLWk}Ӥqtkjklmnoooqqrrttuvys)AA?>DNLT_N "$%%%%('())+.3947:>GFAACD<71.2.(#"! %))$%&&'&%#"%$!!%),.1357888876311,&$!)57568::;==>?>@ABBCCCDFFGFGJJB<931-**))())++*-0269;AFUdzŷ}rjkmmmoooqqrrttuvxz)#2EVbntvnhcbgklou}c%/7=A?>=?DOMT_gl  #%%%%(')'(*07558?AE@=>CB;60.1+'"!  #&'&%%&''&%#"%# !%'+-1348999987633.(&" 255568::;==>?>@@ABCDBEFDCHOTTMD>750,,,**))('')++/46=AFM_sФ}kklmnoooqqrrttuvvz?"/?P[dimfb^^Y]`eiuc(39=?=>@LPPXamuz "$%%%'(((+.732<@D@==:=BA94/./)%"!!&&%$&&'''&%##$##&*,0337:::9878550)'#!635668;9;==>?>@AABCDBDC>EPWWYSIA:71.-,,+(&$# !!%),2;BJN\g~kklmnoopqqrrttuvzwR /AR\dfd`[YY\`emy]+49==>FNLP]ertix !$&%%'''*/443:;BC=;=;<@@83..-'#"  "&%$%&''('&$$#$" "$&*015878<<;89751,&%"!34566788;;;==<>?@?DBE?7@NVZ]]XOF?:521/0,)%!$,9EPY[bqkilkmmoopqpqrtuuvwg!/AQ]]_][_bjszT!+39;CMKKZ_ltqm+ !"%''%(*/5326>?ABA=-93-,-)#  !#$$$%'()(&&$#!##!"!$(-/1679;<=<;;:72+($#%24566688;;;==<>?A@B@'0?OZ`cedd]SJD=97562-(! !.=<<;94-*%# !%34577688;;;==<>??AD(0ER\cefhjeZPJB>=<=9??@@?<,@R^dfhjik_VNHB?@A;BSTSUUVWXY' &3=GQZ`gmppikklmoopqqrrtutwxvV4Jhxwjf\a(5IXfosp||zvw !&(13348<>>ADEDBDB:8:60-**&! "$$$%&((((''&%"!!%#! $',15:<>??@@?<93/+'$"#02346678::;<=>???A0&8IWbiolnpg_VOHCCEBFQTSUUVWWY4 #.6>DJMRUW`tllklmnnopqqqrttuvwf#3C\xxnpjhhbd]XNaq$1J^glv}zu{ ")02017<>=ACEECBB>6871,),)$!$""$$'(*)(('&$" '%#!!$(-16;=?@ABA?=63.)'#!0234556799:;==>>>A& "0>KWaioqpjc[UOIHKIKPTSUUVWWXG (068 './24:><>CDEEDBA@98:4/*'*&! ##!#%&(*+*)(&%#! (&$" !%*,08=ABABCA@:62/,(#/122456689:;<===??% (5@JRY`gijf_[VNLOOOOSSUUVWWWT #(-/256:AGRcp}ufmmlmonoopprssttvv.*9IV\_`^[XVRQRQLOLHFCC@<\r|~|tyxd\^ &..6:@677-,))&#  #$!#$')*+,++)%$#! ('&$! !#&)/07>@CDDBA>941.*')3243567989;;;=<>@'  +9CJQV\_cec]YSQUWRQRRTTTWUXW #%++..269>EO]en{qiklllnnoopprsrttuv7"(8GTY^\ZURUSQORPNLJDA^DYkw}xu|q`\blz &-6CJRX_kxriklllmnoopprsrttuvR'3HWddghgfccb``^ZXUQI}aH`qw|xwy|~|uti^_YRP '48;764,'%'#!!""!"$'()+,+,+)&$" *)''%$! $().38<@ABA>;:731+-233566989;;;===;@ "-6?EKNQTX[\`emmYQQSUTTVTYSD &++.00003768@@><:510./2456767889;;;<?Adijkklmmnooqqqsstuu20Ef|}vj~=ES]abitztt|~h[]]TNH@;5>r[+7BC@?>?CFB?=764/(&('$ ! !""%&)-*('(&((%$"())''%#" !"$)*/158;>?=<;853..3445667889;;<=;== $,4QY^eszts|zj[_[XOIC=4984Uw *48:78:=?A@9745/)(''$ !" !"#$()+))'''&('$"!'))('&%%" !$&*-146;>=<=;961/2335667889;;<<>;=9 '/7:AGOU\fmROQQSSSUUVUY.%1NScpxtwyh]a_VNGC>6564/)< '-1027:<<;6420*&&&$ ""#$&()*)'('%&'(&"&)))(''&#!!"')-048<<=>=<8851234667889;;<<><>>5  !'-6961/,,=ijkklmmnooqqqsttuuY!-5<;:;8741+)?rES\ostz{tf]_]VMJF=8653-*%$"#()+04631130(&%&$!!!!!!$&(*(%%''&%&((%!$%'((((%#" !#%&)-1369:;;<:963125577889;;;;=>?=?7  !%-18<;9MPOQSSTUTUWXH%3ATforoi`[YTMGA81+'$+jijklmmnooqqprstsuh%%''%%",XU[imu}zoc_^YRMIC>85684.)!1 !"#(,--+*%&&$" "$ !#$'*)&())((&&)(&" #$&''((&$#!! !!%(,0489;<<;<:8655567879:;;;=>>@>CA. !+KOPRRSTTSTVWN*3FYinpolgc^ZWMD6,#!-giikklmnnoqpqrrttrt @b}`cix{tbc]^URNMB<778995*'l`  !))'$&%$!! !#%(**(&&+++)'&&'&$!!"$%&(('&%#"  !$((,1467:<;<<;9765567789::;<=>>>@@@C7#  ?MPNORRSSSTUVVAMdznbK9) %ZhhikkllmmnpppqrttwuI,)*,4??BAACEA?81)**+16@OLPPQPRRSRSUVULSbzqh][\_chegijkkllmmopoqstttuwuvyx{z|~|~{~~gc^[`bYWNNIG>;846;;:986L^bipv}r= "#%!!"#!!"%&))((*-.+,,*'$&&$ !#%&&'''&%$# "$&(+-/146:;>??ABB>:77789:<<=>?@AA?@ABDDEEGHHIJJKKMMNOQQRSSTUVV\hm|cbccdeeffhhijkklmmoopqrssttuvwwyy{{|}}}gY[\][UPNKF@>;768899:;96:g!%$ !"$! !"$&(')*,.-,,,-)#'%#!!$$%&'&&&%#!  ##&*-/1579;>@CEGGFA;76689;<<=>?@A?@@ADDEEFGHIJJKKLMOOQRSSRSTUUbȻʼ{aaccceegghiijkkmmnnopqqrstuuvwwxy{{}}}}~q\ZWUSPPMG@=:875566665421/4f!"!!!!!""#%&*)()*,-..,,,)&%%#!!"$&&&&'%$##!  "&(+.369<@BEHIIGEB?7766:;<<>?@@@@ABCDEEGGHIJKLLLMNOQQRSRSTUV]ð{_abddeffghhjjkllmnnopqqsstuuvwxyy{{|}}~~~l\QRLNMKI?A><865665213322247>f  !!!!!"%'')''*,,--..,,*&$&#"!$%%&''&%%$"! "%(-158?@A?@ABCDEFGHHHJJKKMNNOPPPQQRTUSVq}bbbcddefghhjjkklmmoopqqsstuuvwwyy{{}}}~~~lZPMNNMJEC@>?:88864463257789=>>Di!!!"# !#$%(('(+-.------,+'&%$!!"#$&'''&%%$! !$(,.158>@CEEFFFGIHD>9<>=>??@AABCDEEGGGFHJKKJLMNLOQRRMKMSQT_wzbbbbbcghffgfeioojonnprrrotstuvvxzwy{||}~}~xrhYNQQNKGFDC@?=<;;;:9999<;=>?AABBCCCDFGHJHJKKIJLMLIA7669=FMLIO]peceikkijlmpqonokqknpppqstvvvuxvvwxz{{{zzyxslgb\XWVTPNLIGHFEDBAA??AAABABDEBDDDFIKLKKHKi$"!!!!#"!! !"''()')+-....--,++*'%%#! !!#$&&&'&%$$$""!! %(,/36:=BDIMTUXYWQLE???>@ABBBCDEGGGHJJIGME:2.)'*-/479?@CCDIThr|zqmov|}ytpnmkkjhb^XSOQRTWZZVUSPNMJIJGGGGHHGGFGHIIIIJLLMMLLKIKPSZ^]]XPPPPNMMLLMQWUNHF@CDC?=<;9731-.//)" #####!! ""$&((()--,,/00//-+**'%$#!!"#%%'''&&&%$$$#!!"%),/28;CGMQUZ[WTPNHDB@=::;<=>???><;751,"$%(&&(**,/.167;<<;=ALVcmuvtxvqrw{~~zxtomlkjgc`\YTSRQQQQRRRPONOOMMMLMLLMMOPRSQPNMNJMTRUXZZXQQNINHLKJIIGEDFMNHC=9:<=931/,*'&$"##%%%&!#""""!"##'(()'(+--./0/0000,)*'$#%#  !##%&&'))))'%$$#  !#&)-037>CJNNQQOONKMKMMLJGDA=:9610.,,+*))((&&''((()+,.03467799>ENX_eijkpx|uopsororpjnjigfcb`_]]]\YYXXWXXXYXWWWVTRSPPRTVXZ\\\\USRQNNNNMLKJIIJJGDGMOJD@;:;<7520/,(&##$#%$##""!"!!!!"#&((()*+,//...../.-*+)&$#! !!"$&&')))*)'''%"! #%),/258>BCEFFILNRXZ[\ZWSPMHD?:85321/.+*)('((('(((*+-/022242256:::;:60/..(&$"""##$$#"#"! !#$'()))+-./0/.---...-+*'&&"!"$%%')**++***)&$!  "##%)*-04689=AEKQY]adfca_][URKHE@=97420/,+,++*))(()*+,,-/.-..00228:CIOKPTWWVW[cfopusxtvw|}|yyyywvuuqpmmkkklggffa^\ZZXWVWUTSSQPNKLNPLLLLKKJIFFINNJB=;;<=94110.+(%$##""""""!!""!!#$&'))*+--/0//.-------+((%#$!#$%'))),,,,,*('$"  !#%'),-015:AGNW^bgiiijjidb]XTNIEC@=97540/..,,+*++,,+--,+,+*(-,-.25@EIJKKIFFHKOJFA:<<==740--,)'%$##""""""""#$$$((((**++.//0.--,*)*,,-,+('%$%# "$&'(*+-.//.-*)'%$#"  "#$'*,29>GLRV\dlstojc_^^[XVSOLJEE@=;986531210/--+*+))())**++,,-.0268:<:;<;@@AA>?@ABBCBHIKLMNNNNNNNPONMLKJIJJIHGGHIFECA@>>@>>??A@??A?@CGJLKIHIIMLG@?:<<:84100/.*(%$###"!!"" "$%%&())))*-.011.,)+**)***++,*(&%###!   "#%()+,/...-+*)('&$#""!  !!#&(-15=@FJQVajlf`_bacdcaa_\WRPKFD?<9876431/.-+*+***,+**)**+-./024677766789:====;;::;<>?>>@AACDEGGGFCCBB@@@?@@ABCDFHEA><9;>@>?@@BGKKIFHKLNMHA=<><<<63221.+(&&%##$#"""#$%$%'(*))))+.010.-++**,+*))+,+**'%$#!  "! !#%%'),,--..--+*('%$$##"  "&*-46<@FLS]baZZ_eju}zurmgaYTPLFB?=;94311110/.-,,,,-.-.0344457654455678::;:9866657777689::;=>@AAAA@??<<;:>ADGA?<;;:87655575568876654355545678678933334444567779;<>>>>@?>==>?ACCA>>?@AADHJKKKKJLNPNG@?<>?>:85232/-,+)(''''&&&&&''(')*+++-./001.-,*,./../-*((((+**)%$"!!  !#"!!!  !#%((*+--//11112/,+'%#"! !$&(*.239=DJLNMPYet}}{xurpmkhfb_\YVSNNLJFDBA@?>=<;:;98887765999998777655555555557899==??????>??>BBBBA>?BCEHJMMKJLMOOMID@>>=<@;6542/-/-+**)('&&&&((((+++*++,,.0011/.-,.021333/.+((**,+)'&#"  !!!  !"%'(),.015565541/*)'%##! !"%&),-138=CFDDHP[lyxywuututrpokifddb^[XVSRQOMJKIGEECBBAA@?==<;<<<<877776558888;;;;==???@AABBCCDDEECCCCHLMKQPNMMNPRNKFC??==@?<:631121/-,+*)))((((((++++,,,--0240/.-./0111101210-+))***+'&$"!  !!!  $$'(+-/266886420-+)(%$"" !###&(,,027<===@GO[impxzuqsuwz~{xtqokgc_]YWTRPNLIGGGFEECCAAAAAA>?@@ABBCDDDDDDDDCCDEEDDDFFFFFGHHNPQRQPPRRSSUOKFB>>>>A?=<;6222431/.-,+**)****++++,,,,,.1321/.,.0132211000/0/-+))**)'&##"!!!!!!!!!  "$%&),03346876540/-+)&$"! !"#$%'(,-148899=CNZceiqpmkrt}~|}~|zwuqrolliedba_^[ZXVUTSRQQPPNNMLLKKJJJJKJJKKJJIHKKLLPPRURRUUTTTTTTSRKHEABA@@@@?;:8422222320/..-,.---.---*+-/0123420//0233343347330//2.*()*+,(&#!"!  !"#"!!  ""&),/124433330/..--+)&%$##"!  !"#$%&),112467;?JUY[afecgkv{v{ywwxwussromkigedca`^^\ZXXVVWVVUUUTSRQQQSTTTVVWWWXYZWVTU[YZXYVRPHFCACDCCB@@?:964012354444321100//..-,-./123442001222345667899773/110+)((+**)#""!  !!####!!  ""%')+,.0//00012210/.-+)((&$##"!  !##%(*+-0/1357>EOQVZ``]_dox|zwyov{|{xvtqtusuuvvrrpopnmkmkihhgffihggfedc_^][]]]]aa`_^[YXSNLHFEECEEDDDC@@<;97420021002111110/..//./23653211111245789:;;<<<===:541/0.++))*)'&$#""" !!"#####!  !#%&')*,-./12466555531//-+)('%$""""  !##%')*,,,,037?FIMQUWVX\emsssyyqqvwtqr~~|{yxvuromklkjjjiihmlkijigfba^\XUROIGEEFEGGJIHGDBA??>>=9753200200/011111112345665431222544468:<;;;;<<<;=<98400/,**++*()###!#! !!!"#"##$#"! !"#%%')+-/14699;<;:86531/,+)('%#!  """""#%&'(()()+,.3:@DFILMOQSWahhjprnlnoopxzvuqpopptx|{}|zvqnhddb`]ZXVQMIHIGFFJJJKJKKHHFCB@??>>>>>::98766566667788988776421245579:<<;;;:;;87899;<=;8410.,*)++)'&$#$#! "!!!#%%#%$$##"""  "$&)*-036;<=??>==:75410.-,)'&%$#""!!! ! !!###$%''&'(*-/57;@BDGIIGKQY]adgeehffilsz~|zyuqnmnox~|rfb\\\c`YTPNKIGEEFFFJNLJIGJKJHFDBA>>=<<<<<<<;:<<;;;:88987655434567;;<==<<;:87577776778==;942/.++*)*)''%$"!"!  !#"###%%#&%$#""!   "%&),0489=>?@@A?>>=87531/-+*(&%$$""#"! !!"""""#$$$$$$&&&&*,0379=?ACDDEFJMRX]]`_^``acgmprrsokighmruwwtld`]Z[[YRPMJIEBBDCCDGGFFGFFDDCBBAA@?>>>>==<<6688887788:;:;=??>=<<:8687655666777737;;::621/+(+***)'%$#" !"##$$$$#%%#&$"! "! !#%(-0258;==?ADCBB@?><:7531/-++*'&&%#!""""""""!!"#"#%'%%$#%%'(,.26879;?@@?@BFILPTUUUVWWWZ^acfjkjgcbabdhgjhhfb]\ZWTROMLLJGFECAAAA@>???>==<;=<<<<<;:;<==@ABD@@@@=<;::9878889:::::87666669=<832/,))+,+*'%%##&! ! !!"##$%%%%%#%%#%#! "" !!$(*,/368:>@BDGGHFCBA@><863110-+*))(('%#%%%%####%%%%&&&&$$$$%'*+-.133579::9:=?ABIJKLOQQRRRQQSUWY\]]][[ZZZZZZ\\\\][XVVUSRQQQPPOMLLLKKKJIHGFEEDDDDEDB@==<;:::;::;<==>><<<<<<;:776367:<:8310.+),,+*(%#!"##  !!##$%&&&&&&&&$##"!  "##"!! !  #%(*.0469;?BEFFECA==<;975432.---++*)'&&&%%%%%%%%%%%%%%$$$$$$$%'(*+-./03344668868:<@BDFGHJKKJHHHJLMKMPRTTTTRRRRPPPPPNNLOOMLJIHHGFFEDCBBBBBA@@@@?>=<==>?>>>=>>@@@?>>==<<<;98767:;9650.-,)**+*)'%$###!"!!!"#%%&'&&&&&&%%#"!! "#"$##$##"! %'*,-/358<@ABA@?;<=>;98765210.,++)(''&$$$$$$%%%%%%%%%%%$%%%$##%%&(-/./00222344325678:;==>?@ACCBBDDDDCBCBDDDDFFFGGGFFHGEEEEEEEDCCBAA@=>??========:;<=>=>>>>?@@@>><<::876579:752/,,+++-+)(%$#!!!""!!!!!#$%%&&''&&&&&%$#!!  "!%%&'&%%$ !"$&)+.026:<==<;<=?ABAA@?=;9:8630/.-+*('&&&&%%&&$$$$$$%$#$$$#$%%'&&%**,/000022234321333355679:;;:;<<<<<=<<<<=<<;<<<<:988899998879877678888887777776579<>??@A?><;;:87789:841/+,-.,+*)'&$#"#$%!!!  !"##%%%%%%&'$%&&&&&&&%#" "%&&&&%$#"" !"$&)*,/3679989:=?ACDIJKIHHFDB@=:8640./.*)('''%%$$$##"$$$$$###%%%$%&')+,./000011123211321133336789::::89::::;;::::::::::98;:9:7788677888889999:97579=@>>>==;97988998530-+++,+,,*)'####$#"!  !!  "#!#%&%%&&$$$$&$%(&&%$$#! "$&%&&&%$#$" !#$%'+.0243568:?CFLPRRPRPLKIHGECA?=;:653210.-,+(''&%%%%&%%%%%%%%&'(()*+0000000112114443000001123333667899::99::::::9887;::?=<:89987;97741-***,.+)('&%$#####"!! !!!!!!!! !!"###%%$%&'%%%%$$$$&%%&&%&% !"#$$$$%%#$$"  !"#')+./101138<@GMQPMMMLLLLLLIGEDECA?=;9875322210....++++,,,,,,-----.000000000011111233332221222201224455789:::::;::95568;>>;998788885678;<=?=<<;8899:99810/---,,-+**('%$%$$$####$##""""" !""#$%&%&''%%%&%%%%$$$$&&%$$$#"  "!"#$!##"$#""!  "$$'+++,--/36?=;9765522221111///00//010000000////1123223433333321222222343345679;:::::98888:<=;98899:8888:;=>=<:98877:97642/.,,-,-,+*(&%%$$###########"!!""""!!!!$%%&'&&%%%%%&&&&%%%%$$$$&'&#"  !"##$$$$###""  ! "$&()***-035:AGGGHLPPNKKHHJIHGFEDBA???=><;:77773333332133222444122222223333444411110010222244466688999999998899;:98:99899:::<=>><:98877::99641/--,+.--,)))('&$#""""####""""!!"""#$$&%%%''&%&&$#&&&&'''''&&%&&&&%$"" !"#$%%&%%$$#"!"! "#$%&&'(**,/48@CDCDJMIHGIKJIJJKKKKHHHFDDBA?><;;:8766543321123211112222333300002223322255557789::;;9999::::;:88889:89:;====;;:989:;;;::530---,,---,**)('&'&#"! "!!!""""""""##%&&&%$$$$&$$%&&''(((((''&&%%&'&&&%#"! !#$$%&(()(''&%%#! "#$%&&''&(+-28=>??DIGFECFGIIMORSSSRRQPONLKIHHFECAA@?=<;;:;:977777777777799998888999988889::;::999999888878:::;<<>=<;<:9899;;;:76530.---.....+)))(''&&&$#""""####$$$$&&&&%&&&('&%#$%&&')+*++,+*)('&%$$$%&%$#" !""#$%)*+,+**)('$#!!!  "#%%##%%().389;<@CCA@BEGILQTUUTTQQOMMMMMKKKKJIIHFEDDBCB@????========<<<<::::999999999::;;:999999=<<<>==<<;::9:::?><;987531/,--..//00,++++*))('&&'&%$$$&&&&&&''''&&&&(&$#$%&&()+---.///--+*(''&$#%$$##! SDL2_gfx-1.0.4/test/sample8.bmp100777 0 0 131776 12217637577 11333 0BM6(,ȯ    !!!"""###$$$%%%&&&'''((()))***+++,,,---...///000111222333444555666777888999:::;;;<<<===>>>???@@@AAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLLMMMNNNOOOPPPQQQRRRSSSTTTUUUVVVWWWXXXYYYZZZ[[[\\\]]]^^^___```aaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxxyyyzzz{{{|||}}}~~~!!! !#$##$%##"!!! ! !!  "#%&&%$$%%&(,./379:;:7788753355679998777777755777777775555556767899778788788999999;;<=<<<<:97754103221/..-**))***)**))'&%%%$""!!!! !!!#"##$&&()(*,,/022657:8:<<>?>=<;:851-,'%#$%"  !!!! !#$"##$"!  #$$%%&&$$&(*-035:;;:6788885153353356655444447765666677778888989;:;<<>=>??@@?AAAA@@@@?@AA@@@@AAAABBCDBCCDEFGHHIJHHGED@?<:65442110..-,**)(**+*))((%$$#!!!!! !!! !""#%&()+,001445779<<:<;;:840/,*((('%#  !!""""#! !! !  !""#$$$$$%(+.0147:<;:868999775475435555777867788888::::<<>>@@@@@@AACCDEEFGHGHJLJKLLLLNNOONNMMMMKKJJHFFGFFGFHHHIHJKKKMNOONMLJFB><967543220...-+)**))(('&&$" !   !#$%%**+,-/23346789::8742/-,++)'%$#!  ! !!""""! !!  "%%##&%$#%&*./356;=;86678899889::87789888;;::<;::;;;;::::998777766688889:::::;<=>AABCGHIJJLNOSUWXXYZZVVTSOOPQNMLKIJLNNNNNPRSTWVUUTOIF@><:865520.,,+*)++,,(&$#!!!  !##$%&(*+-./1234322110...-*))(&%"! !"" !!!!!!   !"$%'&%%#%(*)*-147:<<<86346789876678::::::88;9875543111111112210333334456678888877779;<>@ACEFHKMNPSUWY[]adfe\WTSZZWSPNNPQQPPPQSTXZ[\]]][WSNJEA>=;97520.-*****)('%$#"  !!"#%#$&'**,,-./02210..-,+*)(&$$"! ""! !!! " !"#%&'%%&'()+,../159=?<87;999::<<:<<;:986454201/.--.//1111110012333333345589::==<;77779;=?ACFHJKLNRSTVXZ^`cggd]WTUW]`^YSPRSTVWYXVUWXYZ\`bbddcc[VPMEDA@=;87420-,+++*)(&%#!  ! !#$&'())+-.111011101/.,)(&%$"!""!  "#"! "$##$#$%')+.2/20/(/49<;==<;=<;;:8653100///.-,+././1.//01223545677885433135689;<;:889;==@BEGJLOPTTWZ[\]^\[[ZWVTRTSTVWTRSRSTSTWXY[[YVVXZ\]]`chihhlnjc]TMKHDDBA;853//.,,,-(('%"""  !"##$&(*,-.0112453210/-*(&$"!  !"""! !!!!!!! !"#$$#%%$#*,.0//1/))")+167787533210..-)()+++,,/.-..-././001123344566674333877787659;>?AEHJJKOPQRRQQONOLKKJMLJIJKKKLKMONNNPNOPRTUUSTUUUY[\^]^`ccfjmljmrtnd^ZSONJHGA=9850//.,,+((&#" !#%()*,-.0124432120.,)(%##!!!!"""! !!!!!  !"#""##$'),.020/6.*) !%+/1000/**))**)))()+,,-.--,*+*)*)*++,-/144551233544645679;>@@CGJLLKIGGEEEECACA@BECCBACDFEGHHGGGJJLNMLMOQSUWWTUX[Z[\^_addfhjllgeju|whdc_WUSRLIB@<864211/,+)'% !!$%&()+-./111123210-,)'%$" ! ""!   $%&')+-/016~{X"%%'''%''&%'''''%%%%&()()'$(&%%(((),.02300.+-.011138=CGFEB@>>?@?>;74589<<:988:==>>?CCDDFFGGDDDFIKKJGFHMPQPONNOSTUUUX\^^\^acghklotoe]`gha[XUOHE@><96120.-++*&-kn3 "$%&')*+,//1131100.,*(&$" !! "!!  #$$#''+,(')~z!!!$#" !!$!!#%%''&#! !#&('+*-103.)))-/666>?ABA;72--0236420/1368;733456;:;98::768993015546301/6:9944369<99>@BBB@BGMMLINQUTQRW_ec\XWRKC>>@><750,)*,**@p9!!""%&()+,,-//////.-+*'%#"""! ! " "#%$#!$kt)! "  "$')&&% $(('%&*-*--,'3442/,15434,$((,/152-')..68332+&+1/2-,.-(),,+)%" $).'&$!$)(*-)$')((*)'(.0+-,.1232398:;9?JQV]ZURG>;=ABA:71,'*+,)(j`!`"$%'(()),,-.//..-+*('%#!"! #O~D"%+(,*$ !')&&%&*.31,(&.*+'"%).51,*(#&+/11/*''*-323-$ #"'+'%&)&(""$#  %!" !"%#$"#$$"&$$$#*%$$'.+-+0;FPPUQH?64:BIKF;1-(,)+((!%#Ld !"##%%()+,,--.-,+*)(&#  <^nl`5!]i;3cZ+\^@HmI+sp`o[4(_a02_hP% $'E]ZYSSPJ>0)-/,((TuY* \kP%$"'/3MjqX3(-24QnnO+'0/Ru]14XTXY0#2,$A=CRR; )Xm^=%YjI2i`25p]18m[.#YpJ#!#-8Opqnhd]Z`kbLVvnC,([qV.'(.O8&Sg\40bW$  !!"%')*)*+,+++*)(%$"!(rtBB{cEob+_lul^NF``zC6~qN#&,Qi{ocu{P1+#m*n.!%$.T|vV.+bz>3:o05bZ3,z%#Vl:&vts#[|rxix9vv:rA:lb '0EnfeHpY9tr2.5Vqu!{th$Z!"$%%'()())*'&%$$"! Gp$%"{Z<}ReFu|L}+uhN[st#ubdo1y-zk/'qN #$+)1k;'$8xz[&$pAn+PJ("')}o@!2vU3b7<2:p2}+!vx%%5OQOJ}v^Wsze/;q_v.|mw7y9g}'mHY[X#'-.qo|`$"$`Qj7oRon]f,8d~sB!L}y]Tlw~ !$%%%&'(''''&%##!!86%"zm"wu#Mgu2+}[yrKUx:V2 $'jdW]u6(d,`pE(zZ#_+~o"qhtHf}L(++343Goz$!#.{f~b5vl%$'uo9% 'orKnM0yoF32258D~r0,*?YBtsRG==p31.5fCm3dCqyT/9rHV{w:usB32j,ew3.s|# Kz_ "#plB#.r2&Hqw-,5n79s!A~r*/d{Abpz^>{xp<5owDdvyiI2Aup%"-wl=~|s024685fxS%#%);^:Ei}g;Eczu{rJuL~~FSqYyXswlTMIodoELqzpA;?qp{ssweh|n/9Qvs+%)_P4{s4!$## ?lz!QU(mt?Vszr6A=AGm5339Grz179>?FDIPRNPMKJBJ:>84.+)&#! !"$%''&&%%$!!%&&%#%&('&W2#!#X^e! !"$,*011,1459;=h|Q./13==?>BBGHGJNHo65.2m|H=<>ZI244:8?=@=BD@BHDFHQLMSY]]`][VmiW[]kE\MTbdyGvww|s^[WVWPKEEDDA871.*%ctS ! $!%$ $'*(-0/2777=@FHFGLHIEEC;;512,)&#!  "#%%&&''%# #$(%$%%&&%'#0rn0/gkm& $%&)*2...-38;>ACQvr0076;@BEEGEA?>:IyoQZzO9153sv~e/1346546<<AAFBG>A>;9411.)'%# !""#$%&&%" !$&&$$$$$%&'')(.S~{](i!"&**+*)(.0478><]98;<>=;:875345=<<;=@BCIMSRXZXTWPLMMLJLKKLQSSQNQXVWZY[]_abcegihihilomo{uvx}oieaYMHFCCC84/($!" !#$'(*+++,,+*++-..-**'%#! "###$$ "$&'''''&&'''&$#%   "$$%&%'+((($'$!! !!""#!  &&(+-///.,.25;=?@BB<<:766988;;89>@>>ABCACCEDFFIHKHKLLOPRTTUWWW[\]dfhkinmnsolr{}opaUVRNI?=86:72*#  ! "#(+///.,)'%"  !!!#$ "$&())'(((('&%$"!  ""##$$$&)+10000.-,(*)*(+,**-/-0///,+))(&(('&%%$%#$&%$$'())*,-/016889;>BFGLLUXZYXYXWSIHHDB>873342,&$ #(.131/-)'%#"  "#!#&'*))()(''%$!    !!!#&(+,,-$$$$$$$$''''(((('%$#! !! """"$$&'''*+./12679;=>@A@ACEBBBB@;75133/)$   '+34532.,)'#"   "$&'+*))'&%$#!%3/0--------....00000112222201334444333311112222321010..000011112222210002335666446699::9876888788889889777765436644444444443334234444444434333445554577567899:;<=>?A@AABBBAB@?>?@CBAA>?ABAA@?@@AA@@@@AA??AAAAABBB@@@?@@@@CBABBA>?AAAAAA??@@??BAA@?@BCAABB@@@AAAAAAA@@A???BAAA@AAB@ABC@@@AAAAAABA@ACBACBAABAAAAABBAABA@@AA@@@@?@AA?@<+(+146899987640-*(&" !"##$%%%%%$!!" "%'+****(&&&&%$%%%%$$$#%"!"""#$"$$%%&&%',-**,16<@@>?CJPRLEA>>=<<=?@BBAA@ACEKKKLIJKLKJJKKJHHIIJJHHGGDDDDDEEAAABC>==<:987777876554332///..----,+),*+,,.0178;=BEIKQSVXUTSSVXXWUSMIB>84.,)'""! $&%(,/44689988640.+)&#!!#"##$%%%%#!!" "%)+*)''&" #%'$%+3.,.4:BHIFHO\cc]OIA=<<==?@BCCCDDEEEDIJKLKMNNQSTUWY[]^_`a_bfhggggh`a__[YY[XTQOLIGCA@???AA>=:865200.-,+)'&&%$%%'),+/256:>ADHMPRUY[_`bb_\UOJD=80-(%"  !!$'*-.03487887642-*'&#" "$"#$$$$$$ $! $&(*$#! "%*//-.5>EJJFLQ\fd^TMF>61001234666779799;8:;=?>=@@ADDFGEFHQX[VW`ebkw{ywmhcZUQTPNJIE@>941/.+&$ #%(*-//145430.*(&#"    "#$(*-.0246564331.,('$# ""##$$$$""#! !+3=AFHJKLKLOLD:4'   "(5?GIHJO`fc\URPSPD<2& !"#&('(('&'%"$!!$%%%$$&$$**+.,/4=AKXaarqzzme]WWWWSOF?:531(%   "!    !"$&)*./23333210/-*(&$! ##$$$#"!!!#/:>CCDEGHHGIKMLNLLNMQRQPH6' "+4=?DO[gc^XPNQUSWWSNHEDDDDDEFFJIJLMLKJLLLKILOQOOOORRQODA73$$#! !$$))/66BBCBDDFGFHJJKLMLMNNNRQQRPSTTUB& $+0;K\c_[UPPRTTTammlmonooqqqsstsuvxxyxy{}}|reTD( #,04CLOal{¦toomdWPW  "%&)*,./111100.,+(&#!! """#"!!! #"#&*+2:<=>@>@BBCDEFGGGIIIJKMMOOPQRTSTTUVVXX; "-<;=>@?ACCDEEEFHHIIIJJMMNNOPRSRSTTUVWXYYB# (58?GMOR[Z]bgpknkkmmmopoqrssttvvvxyxz{||}}~`6 !&*-5FYmì֬  !"$&'*,-../01.-+*'%#"! ! "$%$(-8;:;?;=>??ABBDEEFEGHJIIJJMMOOOPQSSSUUUVWWZV[X= #'7CLS\amvwtkgfkklmmopoqrrsttvvvxyyzz{|}}~~|T&%(0;BRcuϹ  !#%'()*-.021/--)'$#! ! !%%#'-,8=::;;=>??ACCDDEFDFIKIIJKMMOONOPQRSTUVWWWX[YZ_U3#)4BTdole]ZZdnkkmmmoooqrrstuuvwyyxyzz{}~~]6,56DRbsؾ0 !#%$%'(+-01320.,)%#" !    $$$%+-2799:;=<=??ABABFEEFGGFGGHIKMNOPOOQSRVTVVWXXXXZZ[]A%0?JOTUUZ^Xajhijkononqqqssstuwxxyyy{{z~V-11=Pey꺫L "#$&'(*-.1210-,*'$! !$&#%)-04799::<<=>?ABACC?)#%''%&)+.5?FMNQSSRUWUVWWYXXZ[]Y\P$"'/;GSSLD@FPMPTWY\jrpqqrssttvwxxyy{{{~zt|<,5gpppqssttuvwwyy{{~[*9K^rU"+3D]oؽE9==CFJKPRUW]`dgfjם  "#$&(*,/1210.+'%" !%'#&*.169999:;:;<=?@AAC-  !#%$%''(,3:ISSSTTUVXXY[[[[\]^T  $.37763766778;8Joppqrstutvvwyy{{||i#0E_ytpu|n%"+7L]s߲A %((+0359>BGIDW  !"$&)*.2322/-*(%#!  !%$$&)-24579779<<<=>>?@AA%  !#$%&'')-514=LTSTUUVWWYYZZ[\][`R #)15767679::;AEGDg% !#%',-033320-*'$!!!&%%)-0455677899;;<=??@AA%  "#%&'%',443>JPPQSTTUWWYYZZ\\\^_^L $.365789:<<<;;cnoqrrsttvvwxyyz{}}6#/>NX`bdc^[ZTVQRZu*#/=N[co|е "$&*+,238@AA%  #$%'('+233;IQPMOSTTUWWXYZZ\\\^\^b? !*/4479:<===?v  "$')-/133220,*'$! ! ((%(*031444416::9;;@AA%  #$&'),1629ISOPLNUVVWWXXYZZ\\Y\`__`' ",237:;=>=FKI^sqprrttuvvwxyyz}zzT%3DSclpprqoojgfcc`j++8DOYclsx}"""$%%))-1599??@$ !%()(,2629FSQOQKUWUTTWWXZYYZ[\]^^^`Q #*38<=@>BLMQitmqpqqssrstuwwyyy|{h&7K]qz|{&,6BJPW]bipuy||yz4 "!!##%'),-047:H׹! !$&*.011//..-+(%"   $&'&',/24433-((0988:;<=>?@?# #%(**.526CLXQUOORRRTVWVWYYYZ[\]]]]^c0 *29=<>FJIas||torqqssrrtuwwyyx}{"1EgƼ )5=DINRWZ]`afhmyW !!!##$&(),.1464)!!  "$(,.00...--*(%#!!"&)'%(.12320/+(-1978:;<=>?@?$ !$((,.465@LYRXUMPQTSTWVVVXYYZ[[]]^__aV (38>@IJRnyyzpoqqrsrrtuwwyyy}x~@8Cc~͞s !)2;@EFJLOQQTZaju{w!!!##$%&&)+.043vK #!! !%)-..---,,*)'%" !#&+(&)0011/-**/,+799:;==>?@?# "%(),086JK\uxspnqqrsrrtuwwyyy{z}J1Cfɐg"+49;<@@CFGIQW^eo~ !!!###$$%(*+-21Gt $"!! $(,--,--,+))'&$! ##)+&(,/010-*,.-+(68:;;;;=?>A$ #&*-0676@N\RX_XY_][]TSTVVXXXYZ[[]]___aG&1=HKdxyjpppqrqrttwwxyxyz{W(/BOd_ajib_bdghfhkmr|C&-24779;=?CHLQ\`k$%%$#"""%&')+*05֚#$&$"!!#%)*+*++++*)'&%$ !"$*,'(,.00.+*--*'%4999;;:=>>?$%)++3;7>JV\S[a`^Y]`RMUTVVXXXYZ[[]]___`Z$1DIdylppppqrrttvwxxxyzzd*8IU\_dfhghjlnoprvvz~|$!(.1444689>&%(,.9:7DO[[TZ^YXb`T?ETTVVXXXYZ[[\]^]^`b#%;Adyxqpoopprrttvvwwwxyzq)8ET[acabacddcdefggiinrw!*.1234568=?DJSWV$&&%%$#"#$$&'(-,O7"(+.*'$!"#')*))****((&$$"  !""'.+)*+-+*+.1,'&%#+6889:9<==@*#(+.3=6=KSa[SWY\c^QB3GWTUWXXXYZ[[\\]]^_^8*8Wy|xnnooprrstuvwwvxxy}&$2CLRSWVXZZ[[^^____```boG&*/0122359;?AJQtx$'&%%%#"#"#%&&&*0]'),/0-(&#"#')))))))*)(&$$#! !#$$(.+)**+-*,1-(%'%&&6799;;:;<>-"'+-/6>5@O\d\WY^d`QB66OSUTUWWXXYZZ\\]]]_]E+Imxloopqqsssttuvxyzy|7,8DOSWZ]]adeggmlhiicddb$)/02222569:B0 $%),.29=8ER^gb_dg\KB329SRTTUWWXXYZZ\\]]]_]L"1^npoopqqssrttuvxyzzxI'6EQ\cinrrz|}vnpa#)02221123559@DP$(((&%#!!!"#$'()*\ԡ655642.)$! "%((()'(*)(&&%$#!  !"$%%)/,-,+++12-)''&%!"*././10033*#%),.05>;;JT^hjjfYN@10,JRRTTUWWXXYZZ\\]]]__S Aeqkoopqqssrttuvwzzzz`&9Pbkowtwzz& (04543234558;BE*#(((&&$""!!""%%()8z}<954430,'# !#%&'''(*)('&%$#!!!!"$&&*0-+,,-/30*&(&&%#"  !#'&+.006B:>LU]gi`VJ>/+)AQQSTTUWWXXYZZ\\]]]_^U+Qbqooqqqssrttuvwzzz{k-@Uglv}Ƽɺl'269754233457<@M $(((&&%##!!!!#$'().2><9:<=BDCA=87541/)$  "$%&'''))('&%$#!"!"#$*-01-,-050,+'&&%%### !"#%'*-032:@:BMU[\[RG9,$)DNOPRSSUUVVXXYZZ[\]]^_U:Vqеonmopoqqpttuvwxyy{u),ARn쭒+'178:84544367;>ln&(*)&'$##!!!"##$'),39;:9;?CGHD@:6321/-(# ##$%&''((((%%$#! ""$$)-0200253/,*(&&%##"" !"#%)+-033:@8@MQROJ>5(!2IPMNPRSSUUVVXXYZZ[\]]^^L"H\ëӯegnnppoqqpttuvwwxyzy9-FsƲc#/8==:6555456963200.*&! ##$$&&''(((&&$"""##%%(-1345550-**((%$#"!!   !"$&)+.144=A8?GIFA;0!&@MLLMOQQSSUUVVXXYZZ[\]]^aA1Seũدc\annopoqqpttuvvwyyzzK 8d±}soquuw{}"*6??>:8763558:A'+,+)'%"#"!!"""#%(+27767:;DKLLJB:530..+'# "##$&%&'(('&%$"" $#$%&(,146753.,*))(%#""!!  !"$'*,/145:>3:<=82*+AHJMLMNOPQSSUUVWWXYZZ[\]]^]5B\vݷi_Z_nnoooqrpttuvvxxyxz]/Hlokmnomnpoprrrvwz{O&3<:96445689,',--*'%##"!!"""#$'*165569=FLJHIF?530-,)%#  !###%%&'(((&%$#"!##%''),146631.,**)(%$"!  #$$'*-23346:.02/+/?FKJLMMNOPPQSSSUUVWYYYY[][^^Y.Pgӷɗoc\]`mmmoooqqstuvvvwxz}r6HZg}qlmnooqqqnkkfhgggcgl{ $.7@@=<8545546:E#.0,+)&$#!!!!!!#%(*166559?GGCBEED;30-+*'%! !"###$&'((((&$" !#$%'(),03552/-,*+)(%$"! "#$'),010/-2(#"0>JLHHLLMMNOPPQSSSUUUWXXYYZZ]\\L0hs߹ᦣf]^a]hmmoooqqrsuuuvwwx{|>=A_z{pkmuuvxxyxvpkiea^ZZWY[($$-5=??<95465467kg!,/-,)&$#!!!!!!#%(*044459?HF???AE=40-+)'&! !!""#$&'())(&%#! !#%&((*,/0431/,,*,)(%$"! !#$'*,/1/)'$#,AFFFGHIJLMMNOPPQRQSTTUWWXXYYZZ\]9CBFFIJIIJLMMNOPPQRQRSSUVWWXYYYZ]I;I骩i_cb\LZmknooqqqrttttvvxx{T.BGRbpwxkcYTPNOMSi,49;>>:7654464C'/0.)&$#!!!!!!#%&+001159DE>::9:BDACDEEHHHJJKMNNNPPQQQSTUUVWYZYZ]X8FQټܤyhafdUINqknnqqqpprsttuvwy}]01>Lcs~֨sg\WSOONOT`'&389;;975445565+$-1.+'$#"!! "!#&(+/00129BA:;<:8:=<3.+)'&#! !!$$&'*+,,(%# !$%'*+*,-/0/..-.,-*)&%#" !$$'%!(8A?BDCDDEEHHIJIKMNNNPPQQQSTUUVWYYY[X@>KWӧqkggbRGEokonqqqpprsttuvw{yl5,:Qfwɴne]WSPQOSV[?$289::964443432?!+0.+($$"!! "!#&(+//014>;99;<4.*)'%#! !!#$'(,-.-)&#!!$%'*++,-//.--....*)&%#" ! $# ,>?@?ACDDDEFHHHJJKMNNNPPQQQSTUUVVXYXYF?LP^xӣqiikaOG@hlmnqqqpprsttuvw{ww7*9Ngx}zpg_ZWSRRRXY\{Y.799:864333346r^'./,)&$"!! "!#&),..026@A:;>?=;79=5.*(&%#! !!#%(*-.-,)'$!!$%'*++,-/.--,././*)&%#"  2?>?@@ABBDDEEHHHJJKLNNNPPQQRSTUUVUWXXC@KSScmէtgpobOHB_mjoqqqpprsttuvxywxC)8Rduz}{{vokjjfc_YXVTRSWZ\btz+698985333335:Z~$,/-)&%"!! "!#&*,.-/38B=9==??<78=6.)'&##! !!#%)+,-,)*'%#"#&&)-,./-//..01/-+*'&# !3===>>@ABBBCEEGFGIJJKKMNOPNPQQTSSUTXR;6EPVZ^gޱ{oqqbRGAYkjlnooqqrrttuvuwwyS.@Pbqswojdaba`_\[YWYXXXYaa_p)3687643101268M")-)''%#! !"#%(*-.,.1<=89>A>=:7686-('$""  "',,++++-)%#"#&&)--././//0120.,*('# 5><<<>>@@BBBCEEGFFIJKKLMNOONPPPOUVUUC0-8EPZ^\hs𵿈vsvfSKBRmllnooqqrrttuvuwwyb7FUcjnjea__^][[YYYZ]]^_b^anx(147654211248>@@BBBCEEGFFIJJKLMMNNOOPOSQUL5%,48ALYaabmϷyvymVMFNjllnooqqrrttuvuwwyn>@@BBBCEEGFFHJKKLLMMMOOQQPN7%%(-/7;7113*'$" !#'((%%%%%''%! $&),-.1334555642.,)(% 16::;;;<<=@@ABABCDFFGGHIJIKKLNRE3#!#%$&(+,/3;AJ[fkkt̘|aVWellmnnqqqqssstvvww{F'>aŨúZ&,233559;?C?@EZ#&&%%##$%''()**/5869<@EHGD=:7113)%$!  #%)(&#&%%$&'%!$&),-.1244556743/-*(%!!$959::;;<<=??@AABCDFEFGGHHIHMMG1'&'"#$('(*,/28?@@ABCDDEFFGGIIHD:/,**&&&#'()*+.059=DN\mwx|țrgjlkllmoppqqrsrsuvvvi#6Pnj%,278;=@BB?@PLR& ##%%$%%&(()*+/593;:@GFFFD<83//1($#  "&)'$$%'&%##%$" #'*-/246787886520/*%# !58869:9;==>?>@ABBBCGFFGGIIIC<650.+)))('&(+,+/369>DLWk}Ӥqtkjklmnoooqqrrttuvys)AA?>DNLT_N "$%%%%('())+.3947:>GFAACD<71.2.(#"! %))$%&&'&%#"%$!!%),.1357888876311,&$!)57568::;==>?>@ABBCCCDFFGFGJJB<931-**))())++*-0269;AFUdzŷ}rjkmmmoooqqrrttuvxz)#2EVbntvnhcbgklou}c%/7=A?>=?DOMT_gl  #%%%%(')'(*07558?AE@=>CB;60.1+'"!  #&'&%%&''&%#"%# !%'+-1348999987633.(&" 255568::;==>?>@@ABCDBEFDCHOTTMD>750,,,**))('')++/46=AFM_sФ}kklmnoooqqrrttuvvz?"/?P[dimfb^^Y]`eiuc(39=?=>@LPPXamuz "$%%%'(((+.732<@D@==:=BA94/./)%"!!&&%$&&'''&%##$##&*,0337:::9878550)'#!635668;9;==>?>@AABCDBDC>EPWWYSIA:71.-,,+(&$# !!%),2;BJN\g~kklmnoopqqrrttuvzwR /AR\dfd`[YY\`emy]+49==>FNLP]ertix !$&%%'''*/443:;BC=;=;<@@83..-'#"  "&%$%&''('&$$#$" "$&*015878<<;89751,&%"!34566788;;;==<>?@?DBE?7@NVZ]]XOF?:521/0,)%!$,9EPY[bqkilkmmoopqpqrtuuvwg!/AQ]]_][_bjszT!+39;CMKKZ_ltqm+ !"%''%(*/5326>?ABA=-93-,-)#  !#$$$%'()(&&$#!##!"!$(-/1679;<=<;;:72+($#%24566688;;;==<>?A@B@'0?OZ`cedd]SJD=97562-(! !.=<<;94-*%# !%34577688;;;==<>??AD(0ER\cefhjeZPJB>=<=9??@@?<,@R^dfhjik_VNHB?@A;BSTSUUVWXY' &3=GQZ`gmppikklmoopqqrrtutwxvV4Jhxwjf\a(5IXfosp||zvw !&(13348<>>ADEDBDB:8:60-**&! "$$$%&((((''&%"!!%#! $',15:<>??@@?<93/+'$"#02346678::;<=>???A0&8IWbiolnpg_VOHCCEBFQTSUUVWWY4 #.6>DJMRUW`tllklmnnopqqqrttuvwf#3C\xxnpjhhbd]XNaq$1J^glv}zu{ ")02017<>=ACEECBB>6871,),)$!$""$$'(*)(('&$" '%#!!$(-16;=?@ABA?=63.)'#!0234556799:;==>>>A& "0>KWaioqpjc[UOIHKIKPTSUUVWWXG (068 './24:><>CDEEDBA@98:4/*'*&! ##!#%&(*+*)(&%#! (&$" !%*,08=ABABCA@:62/,(#/122456689:;<===??% (5@JRY`gijf_[VNLOOOOSSUUVWWWT #(-/256:AGRcp}ufmmlmonoopprssttvv.*9IV\_`^[XVRQRQLOLHFCC@<\r|~|tyxd\^ &..6:@677-,))&#  #$!#$')*+,++)%$#! ('&$! !#&)/07>@CDDBA>941.*')3243567989;;;=<>@'  +9CJQV\_cec]YSQUWRQRRTTTWUXW #%++..269>EO]en{qiklllnnoopprsrttuv7"(8GTY^\ZURUSQORPNLJDA^DYkw}xu|q`\blz &-6CJRX_kxriklllmnoopprsrttuvR'3HWddghgfccb``^ZXUQI}aH`qw|xwy|~|uti^_YRP '48;764,'%'#!!""!"$'()+,+,+)&$" *)''%$! $().38<@ABA>;:731+-233566989;;;===;@ "-6?EKNQTX[\`emmYQQSUTTVTYSD &++.00003768@@><:510./2456767889;;;<?Adijkklmmnooqqqsstuu20Ef|}vj~=ES]abitztt|~h[]]TNH@;5>r[+7BC@?>?CFB?=764/(&('$ ! !""%&)-*('(&((%$"())''%#" !"$)*/158;>?=<;853..3445667889;;<=;== $,4QY^eszts|zj[_[XOIC=4984Uw *48:78:=?A@9745/)(''$ !" !"#$()+))'''&('$"!'))('&%%" !$&*-146;>=<=;961/2335667889;;<<>;=9 '/7:AGOU\fmROQQSSSUUVUY.%1NScpxtwyh]a_VNGC>6564/)< '-1027:<<;6420*&&&$ ""#$&()*)'('%&'(&"&)))(''&#!!"')-048<<=>=<8851234667889;;<<><>>5  !'-6961/,,=ijkklmmnooqqqsttuuY!-5<;:;8741+)?rES\ostz{tf]_]VMJF=8653-*%$"#()+04631130(&%&$!!!!!!$&(*(%%''&%&((%!$%'((((%#" !#%&)-1369:;;<:963125577889;;;;=>?=?7  !%-18<;9MPOQSSTUTUWXH%3ATforoi`[YTMGA81+'$+jijklmmnooqqprstsuh%%''%%",XU[imu}zoc_^YRMIC>85684.)!1 !"#(,--+*%&&$" "$ !#$'*)&())((&&)(&" #$&''((&$#!! !!%(,0489;<<;<:8655567879:;;;=>>@>CA. !+KOPRRSTTSTVWN*3FYinpolgc^ZWMD6,#!-giikklmnnoqpqrrttrt @b}`cix{tbc]^URNMB<778995*'l`  !))'$&%$!! !#%(**(&&+++)'&&'&$!!"$%&(('&%#"  !$((,1467:<;<<;9765567789::;<=>>>@@@C7#  ?MPNORRSSSTUVVAMdznbK9) %ZhhikkllmmnpppqrttwuI,)*,4??BAACEA?81)**+16@OLPPQPRRSRSUVULSbzqh][\_chegijkkllmmopoqstttuwuvyx{z|~|~{~~gc^[`bYWNNIG>;846;;:986L^bipv}r= "#%!!"#!!"%&))((*-.+,,*'$&&$ !#%&&'''&%$# "$&(+-/146:;>??ABB>:77789:<<=>?@AA?@ABDDEEGHHIJJKKMMNOQQRSSTUVV\hm|cbccdeeffhhijkklmmoopqrssttuvwwyy{{|}}}gY[\][UPNKF@>;768899:;96:g!%$ !"$! !"$&(')*,.-,,,-)#'%#!!$$%&'&&&%#!  ##&*-/1579;>@CEGGFA;76689;<<=>?@A?@@ADDEEFGHIJJKKLMOOQRSSRSTUUbȻʼ{aaccceegghiijkkmmnnopqqrstuuvwwxy{{}}}}~q\ZWUSPPMG@=:875566665421/4f!"!!!!!""#%&*)()*,-..,,,)&%%#!!"$&&&&'%$##!  "&(+.369<@BEHIIGEB?7766:;<<>?@@@@ABCDEEGGHIJKLLLMNOQQRSRSTUV]ð{_abddeffghhjjkllmnnopqqsstuuvwxyy{{|}}~~~l\QRLNMKI?A><865665213322247>f  !!!!!"%'')''*,,--..,,*&$&#"!$%%&''&%%$"! "%(-158?@A?@ABCDEFGHHHJJKKMNNOPPPQQRTUSVq}bbbcddefghhjjkklmmoopqqsstuuvwwyy{{}}}~~~lZPMNNMJEC@>?:88864463257789=>>Di!!!"# !#$%(('(+-.------,+'&%$!!"#$&'''&%%$! !$(,.158>@CEEFFFGIHD>9<>=>??@AABCDEEGGGFHJKKJLMNLOQRRMKMSQT_wzbbbbbcghffgfeioojonnprrrotstuvvxzwy{||}~}~xrhYNQQNKGFDC@?=<;;;:9999<;=>?AABBCCCDFGHJHJKKIJLMLIA7669=FMLIO]peceikkijlmpqonokqknpppqstvvvuxvvwxz{{{zzyxslgb\XWVTPNLIGHFEDBAA??AAABABDEBDDDFIKLKKHKi$"!!!!#"!! !"''()')+-....--,++*'%%#! !!#$&&&'&%$$$""!! %(,/36:=BDIMTUXYWQLE???>@ABBBCDEGGGHJJIGME:2.)'*-/479?@CCDIThr|zqmov|}ytpnmkkjhb^XSOQRTWZZVUSPNMJIJGGGGHHGGFGHIIIIJLLMMLLKIKPSZ^]]XPPPPNMMLLMQWUNHF@CDC?=<;9731-.//)" #####!! ""$&((()--,,/00//-+**'%$#!!"#%%'''&&&%$$$#!!"%),/28;CGMQUZ[WTPNHDB@=::;<=>???><;751,"$%(&&(**,/.167;<<;=ALVcmuvtxvqrw{~~zxtomlkjgc`\YTSRQQQQRRRPONOOMMMLMLLMMOPRSQPNMNJMTRUXZZXQQNINHLKJIIGEDFMNHC=9:<=931/,*'&$"##%%%&!#""""!"##'(()'(+--./0/0000,)*'$#%#  !##%&&'))))'%$$#  !#&)-037>CJNNQQOONKMKMMLJGDA=:9610.,,+*))((&&''((()+,.03467799>ENX_eijkpx|uopsororpjnjigfcb`_]]]\YYXXWXXXYXWWWVTRSPPRTVXZ\\\\USRQNNNNMLKJIIJJGDGMOJD@;:;<7520/,(&##$#%$##""!"!!!!"#&((()*+,//...../.-*+)&$#! !!"$&&')))*)'''%"! #%),/258>BCEFFILNRXZ[\ZWSPMHD?:85321/.+*)('((('(((*+-/022242256:::;:60/..(&$"""##$$#"#"! !#$'()))+-./0/.---...-+*'&&"!"$%%')**++***)&$!  "##%)*-04689=AEKQY]adfca_][URKHE@=97420/,+,++*))(()*+,,-/.-..00228:CIOKPTWWVW[cfopusxtvw|}|yyyywvuuqpmmkkklggffa^\ZZXWVWUTSSQPNKLNPLLLLKKJIFFINNJB=;;<=94110.+(%$##""""""!!""!!#$&'))*+--/0//.-------+((%#$!#$%'))),,,,,*('$"  !#%'),-015:AGNW^bgiiijjidb]XTNIEC@=97540/..,,+*++,,+--,+,+*(-,-.25@EIJKKIFFHKOJFA:<<==740--,)'%$##""""""""#$$$((((**++.//0.--,*)*,,-,+('%$%# "$&'(*+-.//.-*)'%$#"  "#$'*,29>GLRV\dlstojc_^^[XVSOLJEE@=;986531210/--+*+))())**++,,-.0268:<:;<;@@AA>?@ABBCBHIKLMNNNNNNNPONMLKJIJJIHGGHIFECA@>>@>>??A@??A?@CGJLKIHIIMLG@?:<<:84100/.*(%$###"!!"" "$%%&())))*-.011.,)+**)***++,*(&%###!   "#%()+,/...-+*)('&$#""!  !!#&(-15=@FJQVajlf`_bacdcaa_\WRPKFD?<9876431/.-+*+***,+**)**+-./024677766789:====;;::;<>?>>@AACDEGGGFCCBB@@@?@@ABCDFHEA><9;>@>?@@BGKKIFHKLNMHA=<><<<63221.+(&&%##$#"""#$%$%'(*))))+.010.-++**,+*))+,+**'%$#!  "! !#%%'),,--..--+*('%$$##"  "&*-46<@FLS]baZZ_eju}zurmgaYTPLFB?=;94311110/.-,,,,-.-.0344457654455678::;:9866657777689::;=>@AAAA@??<<;:>ADGA?<;;:87655575568876654355545678678933334444567779;<>>>>@?>==>?ACCA>>?@AADHJKKKKJLNPNG@?<>?>:85232/-,+)(''''&&&&&''(')*+++-./001.-,*,./../-*((((+**)%$"!!  !#"!!!  !#%((*+--//11112/,+'%#"! !$&(*.239=DJLNMPYet}}{xurpmkhfb_\YVSNNLJFDBA@?>=<;:;98887765999998777655555555557899==??????>??>BBBBA>?BCEHJMMKJLMOOMID@>>=<@;6542/-/-+**)('&&&&((((+++*++,,.0011/.-,.021333/.+((**,+)'&#"  !!!  !"%'(),.015565541/*)'%##! !"%&),-138=CFDDHP[lyxywuututrpokifddb^[XVSRQOMJKIGEECBBAA@?==<;<<<<877776558888;;;;==???@AABBCCDDEECCCCHLMKQPNMMNPRNKFC??==@?<:631121/-,+*)))((((((++++,,,--0240/.-./0111101210-+))***+'&$"!  !!!  $$'(+-/266886420-+)(%$"" !###&(,,027<===@GO[impxzuqsuwz~{xtqokgc_]YWTRPNLIGGGFEECCAAAAAA>?@@ABBCDDDDDDDDCCDEEDDDFFFFFGHHNPQRQPPRRSSUOKFB>>>>A?=<;6222431/.-,+**)****++++,,,,,.1321/.,.0132211000/0/-+))**)'&##"!!!!!!!!!  "$%&),03346876540/-+)&$"! !"#$%'(,-148899=CNZceiqpmkrt}~|}~|zwuqrolliedba_^[ZXVUTSRQQPPNNMLLKKJJJJKJJKKJJIHKKLLPPRURRUUTTTTTTSRKHEABA@@@@?;:8422222320/..-,.---.---*+-/0123420//0233343347330//2.*()*+,(&#!"!  !"#"!!  ""&),/124433330/..--+)&%$##"!  !"#$%&),112467;?JUY[afecgkv{v{ywwxwussromkigedca`^^\ZXXVVWVVUUUTSRQQQSTTTVVWWWXYZWVTU[YZXYVRPHFCACDCCB@@?:964012354444321100//..-,-./123442001222345667899773/110+)((+**)#""!  !!####!!  ""%')+,.0//00012210/.-+)((&$##"!  !##%(*+-0/1357>EOQVZ``]_dox|zwyov{|{xvtqtusuuvvrrpopnmkmkihhgffihggfedc_^][]]]]aa`_^[YXSNLHFEECEEDDDC@@<;97420021002111110/..//./23653211111245789:;;<<<===:541/0.++))*)'&$#""" !!"#####!  !#%&')*,-./12466555531//-+)('%$""""  !##%')*,,,,037?FIMQUWVX\emsssyyqqvwtqr~~|{yxvuromklkjjjiihmlkijigfba^\XUROIGEEFEGGJIHGDBA??>>=9753200200/011111112345665431222544468:<;;;;<<<;=<98400/,**++*()###!#! !!!"#"##$#"! !"#%%')+-/14699;<;:86531/,+)('%#!  """""#%&'(()()+,.3:@DFILMOQSWahhjprnlnoopxzvuqpopptx|{}|zvqnhddb`]ZXVQMIHIGFFJJJKJKKHHFCB@??>>>>>::98766566667788988776421245579:<<;;;:;;87899;<=;8410.,*)++)'&$#$#! "!!!#%%#%$$##"""  "$&)*-036;<=??>==:75410.-,)'&%$#""!!! ! !!###$%''&'(*-/57;@BDGIIGKQY]adgeehffilsz~|zyuqnmnox~|rfb\\\c`YTPNKIGEEFFFJNLJIGJKJHFDBA>>=<<<<<<<;:<<;;;:88987655434567;;<==<<;:87577776778==;942/.++*)*)''%$"!"!  !#"###%%#&%$#""!   "%&),0489=>?@@A?>>=87531/-+*(&%$$""#"! !!"""""#$$$$$$&&&&*,0379=?ACDDEFJMRX]]`_^``acgmprrsokighmruwwtld`]Z[[YRPMJIEBBDCCDGGFFGFFDDCBBAA@?>>>>==<<6688887788:;:;=??>=<<:8687655666777737;;::621/+(+***)'%$#" !"##$$$$#%%#&$"! "! !#%(-0258;==?ADCBB@?><:7531/-++*'&&%#!""""""""!!"#"#%'%%$#%%'(,.26879;?@@?@BFILPTUUUVWWWZ^acfjkjgcbabdhgjhhfb]\ZWTROMLLJGFECAAAA@>???>==<;=<<<<<;:;<==@ABD@@@@=<;::9878889:::::87666669=<832/,))+,+*'%%##&! ! !!"##$%%%%%#%%#%#! "" !!$(*,/368:>@BDGGHFCBA@><863110-+*))(('%#%%%%####%%%%&&&&$$$$%'*+-.133579::9:=?ABIJKLOQQRRRQQSUWY\]]][[ZZZZZZ\\\\][XVVUSRQQQPPOMLLLKKKJIHGFEEDDDDEDB@==<;:::;::;<==>><<<<<<;:776367:<:8310.+),,+*(%#!"##  !!##$%&&&&&&&&$##"!  "##"!! !  #%(*.0469;?BEFFECA==<;975432.---++*)'&&&%%%%%%%%%%%%%%$$$$$$$%'(*+-./03344668868:<@BDFGHJKKJHHHJLMKMPRTTTTRRRRPPPPPNNLOOMLJIHHGFFEDCBBBBBA@@@@?>=<==>?>>>=>>@@@?>>==<<<;98767:;9650.-,)**+*)'%$###!"!!!"#%%&'&&&&&&%%#"!! "#"$##$##"! %'*,-/358<@ABA@?;<=>;98765210.,++)(''&$$$$$$%%%%%%%%%%%$%%%$##%%&(-/./00222344325678:;==>?@ACCBBDDDDCBCBDDDDFFFGGGFFHGEEEEEEEDCCBAA@=>??========:;<=>=>>>>?@@@>><<::876579:752/,,+++-+)(%$#!!!""!!!!!#$%%&&''&&&&&%$#!!  "!%%&'&%%$ !"$&)+.026:<==<;<=?ABAA@?=;9:8630/.-+*('&&&&%%&&$$$$$$%$#$$$#$%%'&&%**,/000022234321333355679:;;:;<<<<<=<<<<=<<;<<<<:988899998879877678888887777776579<>??@A?><;;:87789:841/+,-.,+*)'&$#"#$%!!!  !"##%%%%%%&'$%&&&&&&&%#" "%&&&&%$#"" !"$&)*,/3679989:=?ACDIJKIHHFDB@=:8640./.*)('''%%$$$##"$$$$$###%%%$%&')+,./000011123211321133336789::::89::::;;::::::::::98;:9:7788677888889999:97579=@>>>==;97988998530-+++,+,,*)'####$#"!  !!  "#!#%&%%&&$$$$&$%(&&%$$#! "$&%&&&%$#$" !#$%'+.0243568:?CFLPRRPRPLKIHGECA?=;:653210.-,+(''&%%%%&%%%%%%%%&'(()*+0000000112114443000001123333667899::99::::::9887;::?=<:89987;97741-***,.+)('&%$#####"!! !!!!!!!! !!"###%%$%&'%%%%$$$$&%%&&%&% !"#$$$$%%#$$"  !"#')+./101138<@GMQPMMMLLLLLLIGEDECA?=;9875322210....++++,,,,,,-----.000000000011111233332221222201224455789:::::;::95568;>>;998788885678;<=?=<<;8899:99810/---,,-+**('%$%$$$####$##""""" !""#$%&%&''%%%&%%%%$$$$&&%$$$#"  "!"#$!##"$#""!  "$$'+++,--/36?=;9765522221111///00//010000000////1123223433333321222222343345679;:::::98888:<=;98899:8888:;=>=<:98877:97642/.,,-,-,+*(&%%$$###########"!!""""!!!!$%%&'&&%%%%%&&&&%%%%$$$$&'&#"  !"##$$$$###""  ! "$&()***-035:AGGGHLPPNKKHHJIHGFEDBA???=><;:77773333332133222444122222223333444411110010222244466688999999998899;:98:99899:::<=>><:98877::99641/--,+.--,)))('&$#""""####""""!!"""#$$&%%%''&%&&$#&&&&'''''&&%&&&&%$"" !"#$%%&%%$$#"!"! "#$%&&'(**,/48@CDCDJMIHGIKJIJJKKKKHHHFDDBA?><;;:8766543321123211112222333300002223322255557789::;;9999::::;:88889:89:;====;;:989:;;;::530---,,---,**)('&'&#"! "!!!""""""""##%&&&%$$$$&$$%&&''(((((''&&%%&'&&&%#"! !#$$%&(()(''&%%#! "#$%&&''&(+-28=>??DIGFECFGIIMORSSSRRQPONLKIHHFECAA@?=<;;:;:977777777777799998888999988889::;::999999888878:::;<<>=<;<:9899;;;:76530.---.....+)))(''&&&$#""""####$$$$&&&&%&&&('&%#$%&&')+*++,+*)('&%$$$%&%$#" !""#$%)*+,+**)('$#!!!  "#%%##%%().389;<@CCA@BEGILQTUUTTQQOMMMMMKKKKJIIHFEDDBCB@????========<<<<::::999999999::;;:999999=<<<>==<<;::9:::?><;987531/,--..//00,++++*))('&&'&%$$$&&&&&&''''&&&&(&$#$%&&()+---.///--+*(''&$#%$$##! SDL2_gfx-1.0.4/test/testframerate.c100777 0 0 12403 12360531107 12212 0/* TestFramerate.c: test/sample program for framerate manager Copyright (C) 2012-2014 Andreas Schiffler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely. */ #include #include #include #include #include #include "SDL_test_common.h" #include "SDL2_gfxPrimitives.h" #include "SDL2_framerate.h" static SDLTest_CommonState *state; /* Screen size */ #define WIDTH DEFAULT_WINDOW_WIDTH #define HEIGHT DEFAULT_WINDOW_HEIGHT /* Pause flag */ int pause = 0; /* Done flag */ int done = 0; /* Current message */ char *messageText; void ClearScreen(SDL_Renderer *renderer) { SDL_SetRenderDrawColor(renderer, 0x0, 0x0, 0x0, 0xFF); SDL_RenderClear(renderer); } /* Global draw state */ int timeout = 0; int x = WIDTH / 2; int y = HEIGHT / 2; int dx = 7; int dy = 5; int r = 255; int g = 255; int b = 255; Uint32 time_passed = 0; void Draw(SDL_Renderer *renderer, FPSmanager *fpsm) { int newRate; int currentRate; /* FPSmanager: get current rate */ currentRate = SDL_getFramerate(fpsm); /* Set/switch framerate */ timeout--; if (timeout < 0) { /* New rate */ newRate = 5 + 5 * (rand() % 10); /* Update timeout */ timeout = 2 * newRate; /* New Color */ r = rand() & 255; g = rand() & 255; b = rand() & 255; /* FPSmanager: set new rate */ SDL_setFramerate(fpsm, newRate); } /* Black screen */ ClearScreen(renderer); /* Move */ x += dx; y += dy; /* Reflect */ if ((x<0) || (x>WIDTH)) { dx=-dx; } if ((y<0) || (y>HEIGHT)) { dy=-dy; } /* Draw */ filledCircleRGBA (renderer,x,y,30,r,g,b,255); circleRGBA(renderer,x,y,30,255,255,255,255); /* Report set rate and current delay (from last iteration) */ if (time_passed > 0) { SDL_snprintf(messageText, 1024, "Set rate: %4iHz Last delay=%4ims / Calc.Rate=%4iHz", currentRate, time_passed, 1000 / time_passed); stringRGBA (renderer, WIDTH/2 - 4*strlen(messageText),HEIGHT-24,messageText,255,255,255,255); } /* Simulate some random delay from drawing, business logic, network interaction, etc. */ SDL_Delay(1 + rand() % 10); /* Display */ SDL_RenderPresent(renderer); /* FPSmanager: Delay to a fixed rate */ time_passed = SDL_framerateDelay(fpsm); } /* ====== Main */ int main(int argc, char *argv[]) { int i; SDL_Event event; Uint32 then, now, frames; FPSmanager fpsm; /* Initialize test framework */ state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); if (!state) { return 1; } SDL_Log("SDL2_gfx %i.%i.%i: testframerate", SDL2_GFXPRIMITIVES_MAJOR, SDL2_GFXPRIMITIVES_MINOR, SDL2_GFXPRIMITIVES_MICRO); SDL_Log("Platform: %s", SDL_GetPlatform()); for (i = 1; i < argc;) { int consumed; consumed = SDLTest_CommonArg(state, i); if (consumed == 0) { consumed = -1; if (SDL_strcasecmp(argv[i], "--x") == 0) { if (argv[i + 1]) { x = SDL_atoi(argv[i + 1]); if (x < 0) x = 0; if (x >= WIDTH) x = WIDTH - 1; consumed = 2; } } else if (SDL_strcasecmp(argv[i], "--y") == 0) { if (argv[i + 1]) { y = SDL_atoi(argv[i + 1]); if (y < 0) y = 0; if (y >= HEIGHT) y = HEIGHT - 1; consumed = 2; } } } if (consumed < 0) { SDL_Log("Usage: %s %s [--x #] [--y #]\n", argv[0], SDLTest_CommonUsage(state)); return 1; } i += consumed; } if (!SDLTest_CommonInit(state)) { return 2; } /* Create the windows and initialize the renderers */ for (i = 0; i < state->num_windows; ++i) { SDL_Renderer *renderer = state->renderers[i]; SDL_RendererInfo info; SDL_GetRendererInfo(state->renderers[i], &info); SDL_Log("Renderer %i: %s %s", i, info.name, (info.flags | SDL_RENDERER_ACCELERATED) ? "(Accelerated)" : ""); SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF); SDL_RenderClear(renderer); } /* Initialize random number generator */ srand((unsigned int)time(NULL)); /* Create common message buffer */ messageText = (char *)SDL_malloc(1024); if (messageText == NULL) { return -1; } /* Initialize framerate manager */ SDL_initFramerate(&fpsm); /* Main render loop */ frames = 0; then = SDL_GetTicks(); done = 0; while (!done) { /* Check for events */ ++frames; while (SDL_PollEvent(&event) && !done) { SDLTest_CommonEvent(state, &event, &done); } /* Do all the drawing work */ Draw(state->renderers[0], &fpsm); } /* Print out some timing information */ now = SDL_GetTicks(); if (now > then) { double fps = ((double) frames * 1000) / (now - then); SDL_Log("%2.2f frames per second\n", fps); } /* Free common message buffer */ if (messageText) { free(messageText); } /* Shutdown SDL */ SDLTest_CommonQuit(state); return 0; } SDL2_gfx-1.0.4/test/TestFramerate.vcxproj100777 0 0 20131 13132500573 13361 0 Debug Win32 Release Win32 TestFramerate {AE22EFD3-6F6D-21C0-AF2D-EF190406BEDC} TestFramerate Win32Proj Application NotSet false v141 Application Unicode v141 <_ProjectFileVersion>10.0.30319.1 $(TargetName)\$(Platform)\$(Configuration)\ $(TargetName)\$(Platform)\$(Configuration)\ true $(TargetName)\$(Platform)\$(Configuration)\ $(TargetName)\$(Platform)\$(Configuration)\ true Disabled ..;..\..\sdl2gfx;..\..\SDL2_gfx;..\..\SDL2-2.0.5\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) false Default MultiThreadedDLL $(IntDir)$(TargetName).pch $(TargetName)\$(Platform)\$(Configuration)\ $(TargetName)\$(Platform)\$(Configuration)\ $(TargetName)\$(Platform)\$(Configuration)\ Level3 EditAndContinue Default SDL2.lib;SDL2main.lib;SDL2test.lib;SDL2_gfx.lib;%(AdditionalDependencies) $(OutDir)$(TargetName)$(TargetExt) ..\$(Platform)\$(Configuration);..\..\sdl2gfx\$(Platform)\$(Configuration);..\..\SDL2_gfx\$(Platform)\$(Configuration);..\..\SDL2-2.0.5\VisualC\$(Platform)\$(Configuration);..\..\SDL2-2.0.5\VisualC\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories) true $(TargetDir)$(TargetName).pdb Windows NotSet msvcrtd.lib;%(IgnoreSpecificDefaultLibraries) /MACHINE:X86 %(AdditionalOptions) copy /y "..\..\SDL2-2.0.5\VisualC\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetName)\$(Platform)\$(Configuration)\SDL2.dll" copy /y "..\$(Platform)\$(Configuration)\SDL2_gfx.dll" "$(TargetName)\$(Platform)\$(Configuration)\SDL2_gfx.dll" Copy SDL2 and SDL2_gfx DLLs MaxSpeed true ..;..\..\sdl2gfx;..\..\SDL2_gfx;..\..\SDL\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) MultiThreadedDLL false Level3 ProgramDatabase Default false SDL2.lib;SDL2main.lib;SDL2test.lib;SDL2_gfx.lib;%(AdditionalDependencies) ..\$(Platform)\$(Configuration);..\..\sdl2gfx\$(Platform)\$(Configuration);..\..\SDL2_gfx\$(Platform)\$(Configuration);..\..\SDL2-2.0.5\VisualC\$(Platform)\$(Configuration);..\..\SDL2-2.0.5\VisualC\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories) true Windows true true false NotSet copy /y "..\..\SDL2-2.0.5\VisualC\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetName)\$(Platform)\$(Configuration)\SDL2.dll" copy /y "..\$(Platform)\$(Configuration)\SDL2_gfx.dll" "$(TargetName)\$(Platform)\$(Configuration)\SDL2_gfx.dll" Copy SDL2 and SDL2_gfx DLLs {ae22efd3-6e6d-48c0-af3d-ef190406bedc} false SDL2_gfx-1.0.4/test/TestGfx.c100777 0 0 146321 13240161175 10761 0/* Copyright (C) 2012-2014 Andreas Schiffler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely. */ #include #include #include #include #include #include "SDL_test_common.h" #include "SDL2_gfxPrimitives.h" static SDLTest_CommonState *state; /* Screen size */ #define WIDTH DEFAULT_WINDOW_WIDTH #define HEIGHT DEFAULT_WINDOW_HEIGHT /* viewport border */ #define BORDER 10 #define NUM_RANDOM 4096 /* Coordinates */ static Sint16 rx[NUM_RANDOM], rx[NUM_RANDOM], ry[NUM_RANDOM], ry[NUM_RANDOM]; /* Triangles */ static Sint16 tx1[NUM_RANDOM][3], tx1[NUM_RANDOM][3], ty1[NUM_RANDOM][3], ty1[NUM_RANDOM][3]; /* Squares (made of 2 triangles) */ static Sint16 sx1[NUM_RANDOM][6], sx1[NUM_RANDOM][6], sy1[NUM_RANDOM][6], sy1[NUM_RANDOM][6]; /* Line widths */ static Uint8 lw[NUM_RANDOM]; /* Radii and offsets */ static Sint16 rr1[NUM_RANDOM], rr2[NUM_RANDOM]; /* Start and stop angles */ static Sint16 a1[NUM_RANDOM], a2[NUM_RANDOM]; /* RGB colors and alpha */ static char rr[NUM_RANDOM], rg[NUM_RANDOM], rb[NUM_RANDOM], ra[NUM_RANDOM]; /*! \brief Generate an array of random screen coordinates, radii and RGBA values with an offset for drawing tests. \param seed The seed for random number generation. If negative, uses current time as seed. */ void InitRandomPoints(int seed) { int i; float af; /* Initialize random number generator */ if (seed < 0) { srand((unsigned int)time(NULL)); } else { srand((unsigned int)seed); } for (i=0; i then) { double fps = ((double) numPrimitives * 1000) / (now - then); SDL_snprintf(titletext, TLEN, "Test %2i %20s: %10.1f /sec", testNum, testName, fps); textlength = (Sint16)strlen(titletext); stringRGBA (renderer, WIDTH/2-4*textlength,30-4,titletext,255,255,255,255); SDL_Log(titletext); } } /* --------------------- Tests ------------------------ */ int TestPixel(SDL_Renderer *renderer) { int i; char r,g,b; int step = 1; /* Draw A=255 */ SetViewport(renderer,0,60,WIDTH/2,60+(HEIGHT-80)/2); for (i=0; iw, picture->h, 32, rmask, gmask, bmask, amask); if (picture_again == NULL) { SDL_FreeSurface(picture); return -1; } /* Draw A=255 */ SetViewport(renderer,0,60,WIDTH/2,60+(HEIGHT-80)/2); for (i=0; iformat, 255, 0, 0)); } else if (rx[i] < (WIDTH/3) ) { SDL_FillRect(picture_again, NULL, SDL_MapRGB(picture_again->format, 0, 255, 0)); } else { SDL_FillRect(picture_again, NULL, SDL_MapRGB(picture_again->format, 0, 0, 255)); } texturedPolygon(renderer, &rx[i], &ry[i], 3, picture_again, 0, 0); } /* Clear viewport */ ClearViewport(renderer); /* Accuracy test */ ClearCenter(renderer, "3pt T poly"); rx[0] = WIDTH/2; ry[0] = HEIGHT/2; rx[1] = rx[0] + 5; ry[1] = ry[0] + 5; rx[2] = rx[0] + 10; ry[2] = ry[0] - 5; texturedPolygon(renderer, rx, ry, 3, picture_again, 0, 0); SDL_FreeSurface(picture); SDL_FreeSurface(picture_again); return (4 * NUM_RANDOM) / step; } int TestBigCircle(SDL_Renderer *renderer) { int i, j, k; Uint8 r, g, b, a; int ad; int count = 0; for (i = 0; i < 4; i++) { switch (i) { case 0: SetViewport(renderer, 0, 60, WIDTH / 2, 60 + (HEIGHT - 80) / 2); ad = 0; break; case 1: SetViewport(renderer, WIDTH / 2, 60, WIDTH, 60 + (HEIGHT - 80) / 2); ad = 1; break; case 2: SetViewport(renderer, WIDTH / 2, 80 + (HEIGHT - 80) / 2, WIDTH, HEIGHT); ad = 0; break; case 3: SetViewport(renderer, 0, 80 + (HEIGHT - 80) / 2, WIDTH / 2, HEIGHT); ad = 1; break; } /* Various radii around 255 and 511 */ for (k = 1; k <= 2; k++) { a = 255; for (j = -32; j <= 32; j++) { switch (j & 3) { case 0: r = 255; g = 0; b = 0; break; case 1: r = 0; g = 255; b = 0; break; case 2: r = 0; g = 0; b = 255; break; } circleRGBA(renderer, WIDTH / 2, HEIGHT / (2 - k + 1), (Sint16)(256 * k - 1 + 2 * j), r, g, b, a); a = a - 2 * ad; count++; } } } /* Clear viewport */ ClearViewport(renderer); return count; } int TestBigEllipse(SDL_Renderer *renderer) { int i, j, k; Uint8 r, g, b, a; Uint8 ad; int count = 0; for (i = 0; i < 4; i++) { switch (i) { case 0: SetViewport(renderer, 0, 60, WIDTH / 2, 60 + (HEIGHT - 80) / 2); ad = 0; break; case 1: SetViewport(renderer, WIDTH / 2, 60, WIDTH, 60 + (HEIGHT - 80) / 2); ad = 1; break; case 2: SetViewport(renderer, WIDTH / 2, 80 + (HEIGHT - 80) / 2, WIDTH, HEIGHT); ad = 0; break; case 3: SetViewport(renderer, 0, 80 + (HEIGHT - 80) / 2, WIDTH / 2, HEIGHT); ad = 1; break; } /* Various radii around 255 and 511 */ for (k = 1; k <= 2; k++) { a = 255; for (j = -32; j <= 32; j++) { switch (j & 3) { case 0: r = 255; g = 0; b = 0; break; case 1: r = 0; g = 255; b = 0; break; case 2: r = 0; g = 0; b = 255; break; } ellipseRGBA(renderer, WIDTH / 2, HEIGHT / 2, (Sint16)(256 * k - 1 + 2 * j), (Sint16)(256 * k - 1 - 2 * j), r, g, b, a); ellipseRGBA(renderer, WIDTH / 2, HEIGHT / 2, (Sint16)(256 * k - 1 - 2 * j), (Sint16)(256 * k - 1 + 2 * j), r, g, b, a); a = a - 2 * ad; count += 2; } } } /* Clear viewport */ ClearViewport(renderer); return count; } /* ====== Main */ int main(int argc, char *argv[]) { int i, done, drawn, test = 0; SDL_Event event; Uint32 then, now, frames; int numTests; /* Initialize test framework */ state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); if (!state) { return 1; } SDL_Log("SDL2_gfx %i.%i.%i: testgfx", SDL2_GFXPRIMITIVES_MAJOR, SDL2_GFXPRIMITIVES_MINOR, SDL2_GFXPRIMITIVES_MICRO); SDL_Log("Platform: %s", SDL_GetPlatform()); for (i = 1; i < argc;) { int consumed; consumed = SDLTest_CommonArg(state, i); if (consumed == 0) { consumed = -1; if (SDL_strcasecmp(argv[i], "--test") == 0) { if (argv[i + 1]) { test = SDL_atoi(argv[i + 1]); consumed = 2; } } } if (consumed < 0) { fprintf(stderr, "Usage: %s %s [--test N]\n", argv[0], SDLTest_CommonUsage(state)); return 1; } i += consumed; } if (!SDLTest_CommonInit(state)) { return 2; } /* Create the windows and initialize the renderers */ for (i = 0; i < state->num_windows; ++i) { SDL_Renderer *renderer = state->renderers[i]; SDL_RendererInfo info; SDL_GetRendererInfo(state->renderers[i], &info); SDL_Log("Renderer %i: %s %s", i, info.name, (info.flags | SDL_RENDERER_ACCELERATED) ? "(Accelerated)" : ""); SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF); SDL_RenderClear(renderer); } /* Main render loop */ frames = 0; then = SDL_GetTicks(); done = 0; drawn = 0; while (!done) { /* Check for events */ ++frames; while (SDL_PollEvent(&event)) { SDLTest_CommonEvent(state, &event, &done); switch (event.type) { case SDL_KEYDOWN: { switch (event.key.keysym.sym) { case SDLK_SPACE: { /* Switch to next test */ test++; drawn = 0; break; } } break; } case SDL_MOUSEBUTTONDOWN: { switch (event.button.button) { case SDL_BUTTON_LEFT: { /* Switch to next test */ test++; drawn = 0; break; } case SDL_BUTTON_RIGHT: { /* Switch to prev test */ test--; drawn = 0; break; } } break; } } } if (!drawn) { /* Set test range */ numTests = 28; if (test < 0) { test = (numTests - 1); } else { test = test % numTests; } /* Create random points */ InitRandomPoints(test); /* Draw */ for (i = 0; i < state->num_windows; ++i) { SDL_Renderer *renderer = state->renderers[i]; switch (test) { case 0: { ExecuteTest(renderer, TestPixel, test, "Pixel"); break; } case 1: { ExecuteTest(renderer, TestHline, test, "Hline"); break; } case 2: { ExecuteTest(renderer, TestVline, test, "Vline"); break; } case 3: { ExecuteTest(renderer, TestRectangle, test, "Rectangle"); break; } case 4: { ExecuteTest(renderer, TestRoundedRectangle, test, "RoundedRectangle"); break; } case 5: { ExecuteTest(renderer, TestBox, test, "Box"); break; } case 6: { ExecuteTest(renderer, TestLine, test, "Line"); break; } case 7: { ExecuteTest(renderer, TestAALine, test, "AALine"); break; } case 8: { ExecuteTest(renderer, TestCircle, test, "Circle"); break; } case 9: { ExecuteTest(renderer, TestAACircle, test, "AACircle"); break; } case 10: { ExecuteTest(renderer, TestFilledCircle, test, "FilledCircle"); break; } case 11: { ExecuteTest(renderer, TestEllipse, test, "Ellipse"); break; } case 12: { ExecuteTest(renderer, TestAAEllipse, test, "AAEllipse"); break; } case 13: { ExecuteTest(renderer, TestFilledEllipse, test, "FilledEllipse"); break; } case 14: { ExecuteTest(renderer, TestBezier, test, "Bezier"); break; } case 15: { ExecuteTest(renderer, TestPolygon, test, "Polygon"); break; } case 16: { ExecuteTest(renderer, TestAAPolygon, test, "AAPolygon"); break; } case 17: { ExecuteTest(renderer, TestFilledPolygon, test, "FilledPolygon"); break; } case 18: { ExecuteTest(renderer, TestTrigon, test, "Trigon"); break; } case 19: { ExecuteTest(renderer, TestArc, test, "Arc"); break; } case 20: { ExecuteTest(renderer, TestPie, test, "Pie"); break; } case 21: { ExecuteTest(renderer, TestFilledPie, test, "FilledPie"); break; } case 22: { ExecuteTest(renderer, TestThickLine, test, "ThickLine"); break; } case 23: { ExecuteTest(renderer, TestTexturedPolygon, test, "TexturedPolygon"); break; } case 24: { ExecuteTest(renderer, TestRoundedBox, test, "RoundedBox"); break; } case 25: { ExecuteTest(renderer, TestThickLineAccuracy, test, "ThickLine (Accuracy)"); break; } case 26: { ExecuteTest(renderer, TestBigCircle, test, "Circle (Big)"); break; } case 27: { ExecuteTest(renderer, TestBigEllipse, test, "Ellipse (Big)"); break; } default: { ClearScreen(renderer, "Unknown Test"); break; } } SDL_RenderPresent(renderer); } drawn = 1; } /* Adjust framerate */ SDL_Delay(25); } SDLTest_CommonQuit(state); /* Print out some timing information */ now = SDL_GetTicks(); if (now > then) { double fps = ((double) frames * 1000) / (now - then); printf("%2.2f frames per second\n", fps); } return 0; } SDL2_gfx-1.0.4/test/TestGfx.vcxproj100777 0 0 20112 13132500573 12176 0 Debug Win32 Release Win32 {AE22EFD3-6F6D-48C0-AF3D-EF190406BEDC} TestGfx Win32Proj Application NotSet false v141 Application Unicode v141 <_ProjectFileVersion>10.0.30319.1 $(TargetName)\$(Platform)\$(Configuration)\ $(TargetName)\$(Platform)\$(Configuration)\ true $(TargetName)\$(Platform)\$(Configuration)\ $(TargetName)\$(Platform)\$(Configuration)\ true Disabled ..;..\..\sdl2gfx;..\..\SDL2_gfx;..\..\SDL2-2.0.5\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) false Default MultiThreadedDLL $(IntDir)$(TargetName).pch $(TargetName)\$(Platform)\$(Configuration)\ $(TargetName)\$(Platform)\$(Configuration)\ $(TargetName)\$(Platform)\$(Configuration)\ Level3 EditAndContinue Default SDL2.lib;SDL2main.lib;SDL2test.lib;SDL2_gfx.lib;%(AdditionalDependencies) $(OutDir)$(TargetName)$(TargetExt) ..\$(Platform)\$(Configuration);..\..\sdl2gfx\$(Platform)\$(Configuration);..\..\SDL2_gfx\$(Platform)\$(Configuration);..\..\SDL2-2.0.5\VisualC\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories) true $(TargetDir)$(TargetName).pdb Windows NotSet msvcrtd.lib;%(IgnoreSpecificDefaultLibraries) /MACHINE:X86 %(AdditionalOptions) copy /y "..\..\SDL2-2.0.5\VisualC\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetName)\$(Platform)\$(Configuration)\SDL2.dll" copy /y "..\$(Platform)\$(Configuration)\SDL2_gfx.dll" "$(TargetName)\$(Platform)\$(Configuration)\SDL2_gfx.dll" copy /y "*.bmp" "$(TargetName)\$(Platform)\$(Configuration)\" Copy SDL2 and SDL2_gfx DLLs MaxSpeed true ..;..\..\sdl2gfx;..\..\SDL2_gfx;..\..\SDL2-2.0.5\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) MultiThreadedDLL false Level3 ProgramDatabase Default false SDL2.lib;SDL2main.lib;SDL2test.lib;SDL2_gfx.lib;%(AdditionalDependencies) ..\$(Platform)\$(Configuration);..\..\sdl2gfx\$(Platform)\$(Configuration);..\..\SDL2_gfx\$(Platform)\$(Configuration);..\..\SDL2-2.0.5\VisualC\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories) true Windows true true false NotSet copy /y "..\..\SDL2-2.0.5\VisualC\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetName)\$(Platform)\$(Configuration)\SDL2.dll" copy /y "..\$(Platform)\$(Configuration)\SDL2_gfx.dll" "$(TargetName)\$(Platform)\$(Configuration)\SDL2_gfx.dll" copy /y "*.bmp" "$(TargetName)\$(Platform)\$(Configuration)\" Copy SDL2, SDL2_gfx DLLs as well as test data {ae22efd3-6e6d-48c0-af3d-ef190406bedc} false SDL2_gfx-1.0.4/test/testimagefilter.c100777 0 0 25536 12360250626 12553 0/* TestImageFilter.c: test program for MMX filter routines (C) A. Schiffler, 2012-2014, zlib license (C) Sylvain Beucler, 2013, zlib license This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely. */ #include #include #include #include #include "SDL.h" #ifdef WIN32 #include #ifndef bcmp #define bcmp(s1, s2, n) memcmp ((s1), (s2), (n)) #endif #endif #include "SDL2_imageFilter.h" #define SRC_SIZE 23 int total_count = 0; int ok_count = 0; void setup_src(unsigned char *src1, unsigned char *src2) { int i; src1[0]=1; src1[2]=1; src1[1]=4; src1[3]=3; src1[4]=33; for (i=5; i<14; i++) src1[i]=i; src1[14]=8; for (i=15; ichar) */ t1[i] = rand(); t2[i] = rand(); d[i] = rand(); } SDL_Init(SDL_INIT_TIMER); /* SDL_imageFilter Test */ printf ("TestImageFilter\n\n"); printf ("Testing an array of 23 bytes - first 16 bytes should be processed\n"); printf ("by MMX or C code, the last 7 bytes only by C code.\n\n"); print_line(); #define TEST_C 0 #define TEST_MMX 1 { #define FUNC(f) { #f, SDL_imageFilter ## f } struct func { char* name; int (*f)(unsigned char*, unsigned char*, unsigned char*, unsigned int); }; struct func funcs[] = { FUNC(BitAnd), FUNC(BitOr), FUNC(Add), FUNC(AbsDiff), FUNC(Mean), FUNC(Sub), FUNC(Mult), FUNC(MultNor), FUNC(MultDivby2), FUNC(MultDivby4), FUNC(Div), }; int k; for (k = 0; k < sizeof(funcs)/sizeof(struct func); k++) { Uint32 start; int i; setup_src(src1, src2); SDL_imageFilterMMXon(); funcs[k].f(src1, src2, dstm, SRC_SIZE); print_result(TEST_MMX, funcs[k].name, src1, src2, dstm); start = SDL_GetTicks(); for (i = 0; i < 50; i++) { funcs[k].f(t1, t2, d, size); } printf("MMX %dx%dk: %dms\n", i, size/1024, SDL_GetTicks() - start); SDL_imageFilterMMXoff(); funcs[k].f(src1, src2, dstc, SRC_SIZE); print_result(TEST_C, funcs[k].name, src1, src2, dstc); start = SDL_GetTicks(); for (i = 0; i < 50; i++) { funcs[k].f(t1, t2, d, size); } printf(" C %dx%dk: %dms\n", i, size/1024, SDL_GetTicks() - start); print_compare(dstm,dstc); print_line(); } } /* setup_src(src1, src2); */ /* SDL_imageFilterMultNor(src1, src2, dstc, SRC_SIZE); */ /* start = SDL_GetTicks(); */ /* for (i = 0; i < 50; i++) { */ /* SDL_imageFilterMultNor(t1, t2, d, size); */ /* } */ /* printf(" C %dx%d: %dms\n", i, size, SDL_GetTicks() - start); */ /* print_result(TEST_C, "MultNor", src1, src2, dstc); */ /* { */ /* unsigned char expected[] = { 0x01, 0x0c, 0x03, 0x06, 0xac, 0x2d, 0x30, 0x31, */ /* 0x30, 0x2d, 0x28, 0x21, 0x18, 0x0d, 0x50, 0xf1, */ /* 0xe0, 0xcd, 0xb8, 0xa1, 0x88, 0x6d, 0x50 }; */ /* print_compare(dstc, expected); */ /* } */ /* print_line(); */ /* exit(0); */ { Uint32 start; int i; char call[1024]; SDL_snprintf(call, 1024, "BitNegation"); setup_src(src1, src2); SDL_imageFilterMMXon(); SDL_imageFilterBitNegation(src1, dstm, SRC_SIZE); print_result(TEST_MMX, call, src1, NULL, dstm); start = SDL_GetTicks(); for (i = 0; i < 50; i++) { SDL_imageFilterBitNegation(t1, d, size); } printf("MMX %dx%dk: %dms\n", i, size/1024, SDL_GetTicks() - start); SDL_imageFilterMMXoff(); SDL_imageFilterBitNegation(src1, dstc, SRC_SIZE); print_result(TEST_C, call, src1, NULL, dstc); start = SDL_GetTicks(); for (i = 0; i < 50; i++) { SDL_imageFilterBitNegation(t1, d, size); } printf(" C %dx%dk: %dms\n", i, size/1024, SDL_GetTicks() - start); print_compare(dstm,dstc); print_line(); } { #undef FUNC #define FUNC(f, c) { #f, SDL_imageFilter ## f, c } struct func { char* name; int (*f)(unsigned char*, unsigned char*, unsigned int, unsigned char); unsigned char arg; }; struct func funcs[] = { FUNC(AddByte, 3), FUNC(AddByteToHalf, 3), FUNC(SubByte, 3), FUNC(ShiftRight, 1), FUNC(ShiftRightUint, 4), FUNC(MultByByte, 3), FUNC(ShiftLeftByte, 3), FUNC(ShiftLeft, 3), FUNC(ShiftLeftUint, 4), FUNC(BinarizeUsingThreshold, 9), }; int k; for (k = 0; k < sizeof(funcs)/sizeof(struct func); k++) { Uint32 start; int i; char call[1024]; SDL_snprintf(call, 1024, "%s(%u)", funcs[k].name, funcs[k].arg); setup_src(src1, src2); SDL_imageFilterMMXon(); funcs[k].f(src1, dstm, SRC_SIZE, funcs[k].arg); print_result(TEST_MMX, call, src1, NULL, dstm); start = SDL_GetTicks(); for (i = 0; i < 50; i++) { funcs[k].f(t1, d, size, funcs[k].arg); } printf("MMX %dx%dk: %dms\n", i, size/1024, SDL_GetTicks() - start); SDL_imageFilterMMXoff(); funcs[k].f(src1, dstc, SRC_SIZE, funcs[k].arg); print_result(TEST_C, call, src1, NULL, dstc); start = SDL_GetTicks(); for (i = 0; i < 50; i++) { funcs[k].f(t1, d, size, funcs[k].arg); } printf(" C %dx%dk: %dms\n", i, size/1024, SDL_GetTicks() - start); print_compare(dstm,dstc); print_line(); } } { #undef FUNC #define FUNC(f, c1, c2) { #f, SDL_imageFilter ## f, c1, c2 } struct func { char* name; int (*f)(unsigned char*, unsigned char*, unsigned int, unsigned char, unsigned char); unsigned char arg1, arg2; }; struct func funcs[] = { FUNC(ShiftRightAndMultByByte, 1, 3), FUNC(ClipToRange, 3, 8), }; int k; for (k = 0; k < sizeof(funcs)/sizeof(struct func); k++) { Uint32 start; int i; char call[1024]; SDL_snprintf(call, 1024, "%s(%u,%u)", funcs[k].name, funcs[k].arg1, funcs[k].arg2); setup_src(src1, src2); SDL_imageFilterMMXon(); funcs[k].f(src1, dstm, SRC_SIZE, funcs[k].arg1, funcs[k].arg2); print_result(TEST_MMX, call, src1, NULL, dstm); start = SDL_GetTicks(); for (i = 0; i < 50; i++) { funcs[k].f(t1, d, size, funcs[k].arg1, funcs[k].arg2); } printf("MMX %dx%dk: %dms\n", i, size/1024, SDL_GetTicks() - start); SDL_imageFilterMMXoff(); funcs[k].f(src1, dstc, SRC_SIZE, funcs[k].arg1, funcs[k].arg2); print_result(TEST_C, call, src1, NULL, dstc); start = SDL_GetTicks(); for (i = 0; i < 50; i++) { funcs[k].f(t1, d, size, funcs[k].arg1, funcs[k].arg2); } printf(" C %dx%dk: %dms\n", i, size/1024, SDL_GetTicks() - start); print_compare(dstm,dstc); print_line(); } } { Uint32 start; int i; char call[1024]; SDL_snprintf(call, 1024, "NormalizeLinear(0,33,0,255)"); setup_src(src1, src2); SDL_imageFilterMMXon(); SDL_imageFilterNormalizeLinear(src1, dstm, SRC_SIZE, 0,33, 0,255); print_result(TEST_MMX, call, src1, NULL, dstm); start = SDL_GetTicks(); for (i = 0; i < 50; i++) { SDL_imageFilterNormalizeLinear(t1, d, size, 0,33, 0,255); } printf("MMX %dx%dk: %dms\n", i, size/1024, SDL_GetTicks() - start); SDL_imageFilterMMXoff(); SDL_imageFilterNormalizeLinear(src1, dstc, SRC_SIZE, 0,33, 0,255); print_result(TEST_C, call, src1, NULL, dstc); start = SDL_GetTicks(); for (i = 0; i < 50; i++) { SDL_imageFilterNormalizeLinear(t1, d, size, 0,33, 0,255); } printf(" C %dx%dk: %dms\n", i, size/1024, SDL_GetTicks() - start); print_compare(dstm,dstc); print_line(); } /* Uint functions */ /* Disabled, since broken *//* ??? */ { #undef FUNC #define FUNC(f, c) { #f, SDL_imageFilter ## f, c } struct func { char* name; int (*f)(unsigned char*, unsigned char*, unsigned int, unsigned int); unsigned int arg; }; struct func funcs[] = { FUNC(AddUint, 0x01020304), FUNC(SubUint, 0x01020304), }; int k; for (k = 0; k < sizeof(funcs)/sizeof(struct func); k++) { Uint32 start; int i; char call[1024]; SDL_snprintf(call, 1024, "%s(%u)", funcs[k].name, funcs[k].arg); setup_src(src1, src2); SDL_imageFilterMMXon(); funcs[k].f(src1, dstm, SRC_SIZE, funcs[k].arg); print_result(TEST_MMX, call, src1, NULL, dstm); start = SDL_GetTicks(); for (i = 0; i < 50; i++) { funcs[k].f(t1, d, size, funcs[k].arg); } printf("MMX %dx%dk: %dms\n", i, size/1024, SDL_GetTicks() - start); SDL_imageFilterMMXoff(); funcs[k].f(src1, dstc, SRC_SIZE, funcs[k].arg); print_result(TEST_C, call, src1, NULL, dstc); start = SDL_GetTicks(); for (i = 0; i < 50; i++) { funcs[k].f(t1, d, size, funcs[k].arg); } printf(" C %dx%dk: %dms\n", i, size/1024, SDL_GetTicks() - start); print_compare(dstm,dstc); print_line(); } } SDL_imageFilterMMXon(); if (SDL_imageFilterMMXdetect()) { printf("MMX was detected\n\n"); } else { printf("MMX was NOT detected\n\n"); } printf ("Result: %i of %i passed OK.\n", ok_count, total_count); SDL_Quit(); free(d); free(t2); free(t1); exit(0); } SDL2_gfx-1.0.4/test/TestImageFilter.vcxproj100777 0 0 20025 13132500573 13645 0 Debug Win32 Release Win32 {AE22EFD3-6F6D-48C0-CCCA-EF190406BEDC} TestImageFilter Win32Proj Application NotSet false v141 Application Unicode v141 <_ProjectFileVersion>10.0.30319.1 $(TargetName)\$(Platform)\$(Configuration)\ $(TargetName)\$(Platform)\$(Configuration)\ true $(TargetName)\$(Platform)\$(Configuration)\ $(TargetName)\$(Platform)\$(Configuration)\ true Disabled ..;..\..\sdl2gfx;..\..\SDL2_gfx;..\..\SDL2-2.0.5\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) false Default MultiThreadedDLL $(IntDir)$(TargetName).pch $(TargetName)\$(Platform)\$(Configuration)\ $(TargetName)\$(Platform)\$(Configuration)\ $(TargetName)\$(Platform)\$(Configuration)\ Level3 EditAndContinue Default SDL2.lib;SDL2main.lib;SDL2_gfx.lib;%(AdditionalDependencies) $(OutDir)$(TargetName)$(TargetExt) ..\$(Platform)\$(Configuration);..\..\sdl2gfx\$(Platform)\$(Configuration);..\..\SDL2_gfx\$(Platform)\$(Configuration);..\..\SDL2-2.0.5\VisualC\$(Platform)\$(Configuration);..\..\SDL2-2.0.5\VisualC\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories) true $(TargetDir)$(TargetName).pdb Windows NotSet msvcrtd.lib;%(IgnoreSpecificDefaultLibraries) /MACHINE:X86 %(AdditionalOptions) copy /y "..\..\SDL2-2.0.5\VisualC\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetName)\$(Platform)\$(Configuration)\SDL2.dll" copy /y "..\$(Platform)\$(Configuration)\SDL2_gfx.dll" "$(TargetName)\$(Platform)\$(Configuration)\SDL2_gfx.dll" Copy SDL2 and SDL2_gfx DLLs MaxSpeed true ..;..\..\sdl2gfx;..\..\SDL2_gfx;..\..\SDL\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) MultiThreadedDLL false Level3 ProgramDatabase Default false SDL2.lib;SDL2main.lib;SDL2_gfx.lib;%(AdditionalDependencies) ..\$(Platform)\$(Configuration);..\..\sdl2gfx\$(Platform)\$(Configuration);..\..\SDL2_gfx\$(Platform)\$(Configuration);..\..\SDL2-2.0.5\VisualC\$(Platform)\$(Configuration);..\..\SDL2-2.0.5\VisualC\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories) true Windows true true false NotSet copy /y "..\..\SDL2-2.0.5\VisualC\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetName)\$(Platform)\$(Configuration)\SDL2.dll" copy /y "..\$(Platform)\$(Configuration)\SDL2_gfx.dll" "$(TargetName)\$(Platform)\$(Configuration)\SDL2_gfx.dll" Copy SDL2 and SDL2_gfx DLLs {ae22efd3-6e6d-48c0-af3d-ef190406bedc} false SDL2_gfx-1.0.4/test/testrotozoom.c100777 0 0 71156 12360531107 12146 0/* TestRotozoom.c: test/sample program for SDL_Surface rotozoom functions Copyright (C) 2012-2014 Andreas Schiffler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely. */ #include #include #include #include #include #include "SDL_test_common.h" #include "SDL2_gfxPrimitives.h" #include "SDL2_rotozoom.h" static SDLTest_CommonState *state; /* Screen size */ #define WIDTH DEFAULT_WINDOW_WIDTH #define HEIGHT DEFAULT_WINDOW_HEIGHT /* Done flag */ int done = 0; /* Custom rotation setup */ double custom_angle=0.0; double custom_fx=1.0; double custom_fy=1.0; int custom_smooth=0; /* Delay between frames */ int delay; /* Current message */ char *messageText; #define POSITION_CENTER 1 #define POSITION_BOTTOMRIGHT 2 void RotatePicture (SDL_Surface *picture, int rotate, int flip, int smooth, int position) { SDL_Surface *rotozoom_picture; SDL_Texture *rotozoom_texture; SDL_Rect dest; int framecount, framemax, frameinc; double angle = 0.0, zoomf = 1.0, zoomfx = 1.0, zoomfy = 1.0; SDL_Renderer *renderer = state->renderers[0]; SDL_Event event; SDL_Log("%s\n", messageText); /* Rotate and display the picture */ framemax=4*360; frameinc=1; for (framecount=-360; framecount0)) { SDL_Log(" Frame: %i Rotate: angle=%.2f Zoom: x=%.2f y=%.2f\n",framecount,angle,zoomfx,zoomfy); } if ((rotozoom_picture=rotozoomSurfaceXY (picture, angle, zoomfx, zoomfy, smooth))!=NULL) { switch (position) { case POSITION_CENTER: dest.x = (DEFAULT_WINDOW_WIDTH - rotozoom_picture->w)/2; dest.y = (DEFAULT_WINDOW_HEIGHT - rotozoom_picture->h)/2; break; case POSITION_BOTTOMRIGHT: dest.x = (DEFAULT_WINDOW_WIDTH/2) - rotozoom_picture->w; dest.y = (DEFAULT_WINDOW_HEIGHT/2) - rotozoom_picture->h; break; } dest.w = rotozoom_picture->w; dest.h = rotozoom_picture->h; /* Convert to texture and draw */ rotozoom_texture = SDL_CreateTextureFromSurface(renderer, rotozoom_picture); SDL_FreeSurface(rotozoom_picture); if (!rotozoom_texture) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create texture: %s\n", SDL_GetError()); break; } SDL_RenderCopy(renderer, rotozoom_texture, NULL, &dest); SDL_DestroyTexture(rotozoom_texture); } else { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't rotozoom image\n"); } } else { angle=framecount*rotate; if ((framecount % 120)==0) { SDL_Log(" Frame: %i Rotate: angle=%.2f Zoom: f=%.2f \n",framecount,angle,zoomf); } if ((rotozoom_picture=rotozoomSurface (picture, angle, zoomf, smooth))!=NULL) { switch (position) { case POSITION_CENTER: dest.x = (DEFAULT_WINDOW_WIDTH - rotozoom_picture->w)/2; dest.y = (DEFAULT_WINDOW_HEIGHT - rotozoom_picture->h)/2; break; case POSITION_BOTTOMRIGHT: dest.x = (DEFAULT_WINDOW_WIDTH/2) - rotozoom_picture->w; dest.y = (DEFAULT_WINDOW_HEIGHT/2) - rotozoom_picture->h; break; } dest.w = rotozoom_picture->w; dest.h = rotozoom_picture->h; /* Convert to texture and draw */ rotozoom_texture = SDL_CreateTextureFromSurface(renderer, rotozoom_picture); SDL_FreeSurface(rotozoom_picture); if (!rotozoom_texture) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create texture: %s\n", SDL_GetError()); break; } SDL_RenderCopy(renderer, rotozoom_texture, NULL, &dest); SDL_DestroyTexture(rotozoom_texture); } else { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't rotozoom image\n"); } } stringRGBA(renderer, 8, 8, messageText, 255, 255, 255, 255); /* Display */ SDL_RenderPresent(renderer); /* Maybe delay */ if (delay>0) { SDL_Delay(delay); } } if (rotate) { /* Final display with angle=0 */ SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF); SDL_RenderClear(renderer); if (flip) { if ((rotozoom_picture=rotozoomSurfaceXY (picture, 0.01, zoomfx, zoomfy, smooth))!=NULL) { dest.x = (DEFAULT_WINDOW_WIDTH - rotozoom_picture->w)/2;; dest.y = (DEFAULT_WINDOW_HEIGHT - rotozoom_picture->h)/2; dest.w = rotozoom_picture->w; dest.h = rotozoom_picture->h; /* Convert to texture and draw */ rotozoom_texture = SDL_CreateTextureFromSurface(renderer, rotozoom_picture); SDL_FreeSurface(rotozoom_picture); if (!rotozoom_texture) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create texture: %s\n", SDL_GetError()); return; } SDL_RenderCopy(renderer, rotozoom_texture, NULL, &dest); SDL_DestroyTexture(rotozoom_texture); } else { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't rotozoom image\n"); } } else { if ((rotozoom_picture=rotozoomSurface (picture, 0.01, zoomf, smooth))!=NULL) { dest.x = (DEFAULT_WINDOW_WIDTH - rotozoom_picture->w)/2;; dest.y = (DEFAULT_WINDOW_HEIGHT - rotozoom_picture->h)/2; dest.w = rotozoom_picture->w; dest.h = rotozoom_picture->h; /* Convert to texture and draw */ rotozoom_texture = SDL_CreateTextureFromSurface(renderer, rotozoom_picture); SDL_FreeSurface(rotozoom_picture); if (!rotozoom_texture) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create texture: %s\n", SDL_GetError()); return; } SDL_RenderCopy(renderer, rotozoom_texture, NULL, &dest); SDL_DestroyTexture(rotozoom_texture); } else { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't rotozoom image\n"); } } stringRGBA(renderer, 8, 8, messageText, 255, 255, 255, 255); /* Display */ SDL_RenderPresent(renderer); /* Maybe delay */ if (delay>0) { SDL_Delay(delay); } } /* Pause for a sec */ SDL_Delay(1000); } void ZoomPicture (SDL_Surface *picture, int smooth) { SDL_Surface *rotozoom_picture; SDL_Texture *rotozoom_texture; SDL_Rect dest; int framecount, framemax, frameinc; double zoomxf,zoomyf; SDL_Renderer *renderer = state->renderers[0]; SDL_Event event; SDL_Log("%s\n", messageText); /* Zoom and display the picture */ framemax=4*360; frameinc=1; for (framecount=360; framecountw)/2;; dest.y = (DEFAULT_WINDOW_HEIGHT - rotozoom_picture->h)/2; dest.w = rotozoom_picture->w; dest.h = rotozoom_picture->h; /* Convert to texture and draw */ rotozoom_texture = SDL_CreateTextureFromSurface(renderer, rotozoom_picture); SDL_FreeSurface(rotozoom_picture); if (!rotozoom_texture) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create texture: %s\n", SDL_GetError()); return; } SDL_RenderCopy(renderer, rotozoom_texture, NULL, &dest); SDL_DestroyTexture(rotozoom_texture); } else { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't zoom image\n"); } stringRGBA(renderer, 8, 8, messageText, 255, 255, 255, 255); /* Display */ SDL_RenderPresent(renderer); /* Maybe delay */ if (delay>0) { SDL_Delay(delay); } } /* Pause for a sec */ SDL_Delay(1000); } void RotatePicture90Degrees (SDL_Surface *picture) { SDL_Surface *rotozoom_picture; SDL_Texture *rotozoom_texture; SDL_Rect dest; int framecount, framemax, frameinc; int numClockwiseTurns; SDL_Renderer *renderer = state->renderers[0]; SDL_Event event; SDL_Log("%s\n", messageText); /* Rotate and display the picture */ framemax = 21; frameinc = 1; numClockwiseTurns = -4; for (framecount=0; framecountw)/2;; dest.y = (DEFAULT_WINDOW_HEIGHT - rotozoom_picture->h)/2; dest.w = rotozoom_picture->w; dest.h = rotozoom_picture->h; /* Convert to texture and draw */ rotozoom_texture = SDL_CreateTextureFromSurface(renderer, rotozoom_picture); SDL_FreeSurface(rotozoom_picture); if (!rotozoom_texture) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create texture: %s\n", SDL_GetError()); return; } SDL_RenderCopy(renderer, rotozoom_texture, NULL, &dest); SDL_DestroyTexture(rotozoom_texture); } else { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't rotate image: %s\n", SDL_GetError()); } stringRGBA(renderer, 8, 8, messageText, 255, 255, 255, 255); /* Display */ SDL_RenderPresent(renderer); /* Always delay */ SDL_Delay(500); if (delay>0) { SDL_Delay(delay); } numClockwiseTurns++; } /* Pause for a sec */ SDL_Delay(1000); } #define ROTATE_OFF 0 #define ROTATE_ON 1 #define FLIP_OFF 0 #define FLIP_X 1 #define FLIP_Y 2 #define FLIP_XY 3 void CustomTest(SDL_Surface *picture, double a, double x, double y, int smooth){ SDL_Surface *rotozoom_picture; SDL_Texture *rotozoom_texture; SDL_Rect dest; SDL_Renderer *renderer = state->renderers[0]; SDL_Log("%s\n", messageText); SDL_Log(" Frame: C Rotate: angle=%.2f Zoom: fx=%.2f fy=%.2f \n",a,x,y); SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF); SDL_RenderClear(renderer); if ((rotozoom_picture=rotozoomSurfaceXY (picture, a, x, y, smooth))!=NULL) { dest.x = (DEFAULT_WINDOW_WIDTH - rotozoom_picture->w)/2;; dest.y = (DEFAULT_WINDOW_HEIGHT - rotozoom_picture->h)/2; dest.w = rotozoom_picture->w; dest.h = rotozoom_picture->h; /* Convert to texture and draw */ rotozoom_texture = SDL_CreateTextureFromSurface(renderer, rotozoom_picture); SDL_FreeSurface(rotozoom_picture); if (!rotozoom_texture) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create texture: %s\n", SDL_GetError()); return; } SDL_RenderCopy(renderer, rotozoom_texture, NULL, &dest); SDL_DestroyTexture(rotozoom_texture); } else { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't rotozoom image\n"); } /* Display */ SDL_RenderPresent(renderer); /* Maybe delay */ if (delay>0) { SDL_Delay(delay); } SDL_Delay(1000); } void Draw (int start, int end) { SDL_Surface *picture, *picture_again; char *bmpfile; SDL_Renderer *renderer = state->renderers[0]; /* Define masking bytes */ #if SDL_BYTEORDER == SDL_BIG_ENDIAN Uint32 rmask = 0xff000000; Uint32 gmask = 0x00ff0000; Uint32 bmask = 0x0000ff00; Uint32 amask = 0x000000ff; #else Uint32 amask = 0xff000000; Uint32 bmask = 0x00ff0000; Uint32 gmask = 0x0000ff00; Uint32 rmask = 0x000000ff; #endif /* --------- 8 bit tests -------- */ if (start<=6) { /* Message */ SDL_Log("8 bit tests ...\n"); /* Load the image into a surface */ bmpfile = "sample8.bmp"; SDL_Log("Loading picture: %s\n", bmpfile); picture = SDL_LoadBMP(bmpfile); if ( picture == NULL ) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,"Couldn't load %s: %s\n", bmpfile, SDL_GetError()); return; } if (start <= 1) { SDL_snprintf(messageText, 1024, "1. rotozoom: Rotating and zooming"); RotatePicture(picture,ROTATE_ON,FLIP_OFF,SMOOTHING_OFF,POSITION_CENTER); if (done) goto done8bit; } if (end == 1) goto done8bit; if (start <= 2) { SDL_snprintf(messageText, 1024, "2.a rotozoom: Just zooming (angle=0, center)"); RotatePicture(picture,ROTATE_OFF,FLIP_OFF,SMOOTHING_OFF,POSITION_CENTER); if (done) goto done8bit; SDL_snprintf(messageText, 1024, "2.b rotozoom: Just zooming (angle=0, bottomright)"); RotatePicture(picture,ROTATE_OFF,FLIP_OFF,SMOOTHING_OFF,POSITION_BOTTOMRIGHT); if (done) goto done8bit; } if (end == 2) goto done8bit; if (start <= 3) { SDL_snprintf(messageText, 1024, "3. zoom: Just zooming"); ZoomPicture(picture,SMOOTHING_OFF); if (done) goto done8bit; } if (end == 3) goto done8bit; if (start <= 4) { SDL_snprintf(messageText, 1024, "4. rotozoom: Rotating and zooming, interpolation on but unused"); RotatePicture(picture,ROTATE_ON,FLIP_OFF,SMOOTHING_ON,POSITION_CENTER); if (done) goto done8bit; } if (end == 4) goto done8bit; if (start <= 5) { SDL_snprintf(messageText, 1024, "5.a rotozoom: Just zooming (angle=0, center), interpolation on but unused"); RotatePicture(picture,ROTATE_OFF,FLIP_OFF,SMOOTHING_ON,POSITION_CENTER); if (done) goto done8bit; SDL_snprintf(messageText, 1024, "5.b rotozoom: Just zooming (angle=0, bottomright), interpolation on but unused"); RotatePicture(picture,ROTATE_OFF,FLIP_OFF,SMOOTHING_ON,POSITION_BOTTOMRIGHT); if (done) goto done8bit; } if (end == 5) goto done8bit; if (start <= 6) { SDL_snprintf(messageText, 1024, "6. zoom: Just zooming, interpolation on but unused"); ZoomPicture(picture,SMOOTHING_ON); if (done) goto done8bit; } if (end == 6) goto done8bit; done8bit: /* Free the picture */ SDL_FreeSurface(picture); if (done) return; if (end <= 6) return; } /* -------- 24 bit test --------- */ if (start<=12) { /* Message */ SDL_Log("24 bit tests ...\n"); /* Load the image into a surface */ bmpfile = "sample24.bmp"; SDL_Log("Loading picture: %s\n", bmpfile); picture = SDL_LoadBMP(bmpfile); if ( picture == NULL ) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't load %s: %s\n", bmpfile, SDL_GetError()); return; } /* Add white frame */ rectangleColor(renderer, 0, 0, picture->w-1, picture->h-1, 0xffffffff); if (start <= 7) { SDL_snprintf(messageText, 1024, "7. rotozoom: Rotating and zooming, no interpolation"); RotatePicture(picture,ROTATE_ON,FLIP_OFF,SMOOTHING_OFF,POSITION_CENTER); if (done) goto done24bit; } if (end == 7) goto done24bit; if (start <= 8) { SDL_snprintf(messageText, 1024, "8a. rotozoom: Just zooming (angle=0), no interpolation, centered"); RotatePicture(picture,ROTATE_OFF,FLIP_OFF,SMOOTHING_OFF,POSITION_CENTER); if (done) goto done24bit; SDL_snprintf(messageText, 1024, "8b. rotozoom: Just zooming (angle=0), no interpolation, corner"); RotatePicture(picture,ROTATE_OFF,FLIP_OFF,SMOOTHING_OFF,POSITION_BOTTOMRIGHT); if (done) goto done24bit; SDL_snprintf(messageText, 1024, "8c. rotozoom: Just zooming (angle=0), X flip, no interpolation, centered"); RotatePicture(picture,ROTATE_OFF,FLIP_X,SMOOTHING_OFF,POSITION_CENTER); if (done) goto done24bit; SDL_snprintf(messageText, 1024, "8d. rotozoom: Just zooming (angle=0), Y flip, no interpolation, centered"); RotatePicture(picture,ROTATE_OFF,FLIP_Y,SMOOTHING_OFF,POSITION_CENTER); if (done) goto done24bit; SDL_snprintf(messageText, 1024, "8e. rotozoom: Just zooming (angle=0), XY flip, no interpolation, centered"); RotatePicture(picture,ROTATE_OFF,FLIP_XY,SMOOTHING_OFF,POSITION_CENTER); if (done) goto done24bit; } if (end == 8) goto done24bit; if (start <= 9) { SDL_snprintf(messageText, 1024, "9. zoom: Just zooming, no interpolation"); ZoomPicture(picture,SMOOTHING_OFF); if (done) goto done24bit; } if (end == 9) goto done24bit; if (start <= 10) { SDL_snprintf(messageText, 1024, "10. rotozoom: Rotating and zooming, with interpolation"); RotatePicture(picture,ROTATE_ON,FLIP_OFF,SMOOTHING_ON,POSITION_CENTER); if (done) goto done24bit; } if (end == 10) goto done24bit; if (start <= 11) { SDL_snprintf(messageText, 1024, "11a. rotozoom: Just zooming (angle=0), with interpolation, centered"); RotatePicture(picture,ROTATE_OFF,FLIP_OFF,SMOOTHING_ON,POSITION_CENTER); if (done) goto done24bit; SDL_snprintf(messageText, 1024, "11b. rotozoom: Just zooming (angle=0), with interpolation, corner"); RotatePicture(picture,ROTATE_OFF,FLIP_OFF,SMOOTHING_ON,POSITION_BOTTOMRIGHT); if (done) goto done24bit; SDL_snprintf(messageText, 1024, "11c. rotozoom: Just zooming (angle=0), X flip, with interpolation, corner"); RotatePicture(picture,ROTATE_OFF,FLIP_X,SMOOTHING_ON,POSITION_CENTER); if (done) goto done24bit; SDL_snprintf(messageText, 1024, "11d. rotozoom: Just zooming (angle=0), Y flip, with interpolation, corner"); RotatePicture(picture,ROTATE_OFF,FLIP_Y,SMOOTHING_ON,POSITION_CENTER); if (done) goto done24bit; SDL_snprintf(messageText, 1024, "11e. rotozoom: Just zooming (angle=0), XY flip, with interpolation, corner"); RotatePicture(picture,ROTATE_OFF,FLIP_XY,SMOOTHING_ON,POSITION_CENTER); if (done) goto done24bit; } if (end == 11) goto done24bit; if (start <= 12) { SDL_snprintf(messageText, 1024, "12. zoom: Just zooming, with interpolation"); ZoomPicture(picture,SMOOTHING_ON); if (done) goto done24bit; } if (end == 12) goto done24bit; done24bit: /* Free the picture */ SDL_FreeSurface(picture); if (done) return; if (end <= 12) return; } /* -------- 32 bit test --------- */ if (start<=16) { /* Message */ SDL_Log("32 bit tests ...\n"); /* Load the image into a surface */ bmpfile = "sample24.bmp"; SDL_Log("Loading picture: %s\n", bmpfile); picture = SDL_LoadBMP(bmpfile); if ( picture == NULL ) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't load %s: %s\n", bmpfile, SDL_GetError()); return; } /* New source surface is 32bit with defined RGBA ordering */ /* Much faster to do this once rather than the routine on the fly */ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,"Converting 24bit image into 32bit RGBA surface ...\n"); picture_again = SDL_CreateRGBSurface(SDL_SWSURFACE, picture->w, picture->h, 32, rmask, gmask, bmask, amask); if (picture_again == NULL) goto done32bit; SDL_BlitSurface(picture,NULL,picture_again,NULL); if (start <= 13) { SDL_snprintf(messageText, 1024, "13. Rotating and zooming, with interpolation (RGBA source)"); RotatePicture(picture_again,ROTATE_ON,FLIP_OFF,SMOOTHING_ON,POSITION_CENTER); if (done) goto done32bit; } if (end == 13) goto done32bit; if (start <= 14) { SDL_snprintf(messageText, 1024, "14.a Just zooming (angle=0, center), with interpolation (RGBA source)"); RotatePicture(picture_again,ROTATE_OFF,FLIP_OFF,SMOOTHING_ON,POSITION_CENTER); if (done) goto done32bit; SDL_snprintf(messageText, 1024, "14.b Just zooming (angle=0, bottomright), with interpolation (RGBA source)"); RotatePicture(picture_again,ROTATE_OFF,FLIP_OFF,SMOOTHING_ON,POSITION_BOTTOMRIGHT); if (done) goto done32bit; } if (end == 14) goto done32bit; SDL_FreeSurface(picture_again); picture_again=NULL; /* New source surface is 32bit with defined ABGR ordering */ /* Much faster to do this once rather than the routine on the fly */ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,"Converting 24bit image into 32bit ABGR surface ...\n"); picture_again = SDL_CreateRGBSurface(SDL_SWSURFACE, picture->w, picture->h, 32, amask, bmask, gmask, rmask); if (picture_again == NULL) goto done32bit; SDL_BlitSurface(picture,NULL,picture_again,NULL); if (start <= 15) { SDL_snprintf(messageText, 1024, "15. Rotating and zooming, with interpolation (ABGR source)"); RotatePicture(picture_again,ROTATE_ON,FLIP_OFF,SMOOTHING_ON,POSITION_CENTER); if (done) goto done32bit; } if (end == 15) goto done32bit; if (start <= 16) { SDL_snprintf(messageText, 1024, "16.a Just zooming (angle=0,center), with interpolation (ABGR source)"); RotatePicture(picture_again,ROTATE_OFF,FLIP_OFF,SMOOTHING_ON,POSITION_CENTER); if (done) goto done32bit; SDL_snprintf(messageText, 1024, "16.b Just zooming (angle=0,bottomright), with interpolation (ABGR source)"); RotatePicture(picture_again,ROTATE_OFF,FLIP_OFF,SMOOTHING_ON,POSITION_BOTTOMRIGHT); if (done) goto done32bit; } if (end == 16) goto done32bit; done32bit: /* Free the picture */ SDL_FreeSurface(picture); if (picture_again) SDL_FreeSurface(picture_again); if (done) return; if (end <= 16) return; } /* -------- 32 bit flip test --------- */ if (start<=22) { /* Message */ SDL_Log("32 bit flip tests ...\n"); /* Load the image into a surface */ bmpfile = "sample24.bmp"; SDL_Log("Loading picture: %s\n", bmpfile); picture = SDL_LoadBMP(bmpfile); if ( picture == NULL ) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't load %s: %s\n", bmpfile, SDL_GetError()); return; } /* Excercise flipping functions on 32bit RGBA */ SDL_Log("Converting 24bit image into 32bit RGBA surface ...\n"); picture_again = SDL_CreateRGBSurface(SDL_SWSURFACE, picture->w, picture->h, 32, rmask, gmask, bmask, amask); if (picture_again == NULL) goto doneflip; SDL_BlitSurface(picture,NULL,picture_again,NULL); if (start <= 17) { SDL_snprintf(messageText, 1024, "17. Rotating with x-flip, no interpolation (RGBA source)"); RotatePicture(picture_again,ROTATE_ON,FLIP_X,SMOOTHING_OFF,POSITION_CENTER); if (done) goto doneflip; } if (end == 17) goto doneflip; if (start <= 18) { SDL_snprintf(messageText, 1024, "18. Rotating with y-flip, no interpolation"); RotatePicture(picture_again,ROTATE_ON,FLIP_Y,SMOOTHING_OFF,POSITION_CENTER); if (done) goto doneflip; } if (end == 18) goto doneflip; if (start <= 19) { SDL_snprintf(messageText, 1024, "19. Rotating with xy-flip, no interpolation"); RotatePicture(picture_again,ROTATE_ON,FLIP_XY,SMOOTHING_OFF,POSITION_CENTER); if (done) goto doneflip; } if (end == 19) goto doneflip; if (start <= 20) { SDL_snprintf(messageText, 1024, "20. Rotating with x-flip, with interpolation"); RotatePicture(picture_again,ROTATE_ON,FLIP_X,SMOOTHING_ON,POSITION_CENTER); if (done) goto doneflip; } if (end == 20) goto doneflip; if (start <= 21) { SDL_snprintf(messageText, 1024, "21. Rotating with y-flip, with interpolation"); RotatePicture(picture_again,ROTATE_ON,FLIP_Y,SMOOTHING_ON,POSITION_CENTER); if (done) goto doneflip; } if (end == 21) goto doneflip; if (start <= 22) { SDL_snprintf(messageText, 1024, "22. Rotating with xy-flip, with interpolation"); RotatePicture(picture_again,ROTATE_ON,FLIP_XY,SMOOTHING_ON,POSITION_CENTER); if (done) goto doneflip; } if (end == 22) goto doneflip; doneflip: /* Free the pictures */ SDL_FreeSurface(picture); if (picture_again) SDL_FreeSurface(picture_again); if (done) return; if (end <= 22) return; } if (start<=24) { /* Message */ SDL_Log("Loading 24bit image\n"); /* Load the image into a surface */ bmpfile = "sample24.bmp"; SDL_Log("Loading picture: %s\n", bmpfile); picture = SDL_LoadBMP(bmpfile); if ( picture == NULL ) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't load %s: %s\n", bmpfile, SDL_GetError()); return; } /* Excercise flipping functions on 32bit RGBA */ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,"Converting 24bit image into 32bit RGBA surface ...\n"); picture_again = SDL_CreateRGBSurface(SDL_SWSURFACE, picture->w, picture->h, 32, rmask, gmask, bmask, amask); if (picture_again == NULL) goto donecustom32bit; SDL_BlitSurface(picture,NULL,picture_again,NULL); SDL_snprintf(messageText, 1024, "23. CustomTest, values from commandline (32bit)"); CustomTest(picture_again, custom_angle, custom_fx, custom_fy, custom_smooth); donecustom32bit: /* Free the picture */ SDL_FreeSurface(picture); if (picture_again) SDL_FreeSurface(picture_again); if (done) return; /* Message */ SDL_Log("Loading 8bit image\n"); /* Load the image into a surface */ bmpfile = "sample8.bmp"; SDL_Log("Loading picture: %s\n", bmpfile); picture = SDL_LoadBMP(bmpfile); if (picture == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't load %s: %s\n", bmpfile, SDL_GetError()); return; } SDL_snprintf(messageText, 1024, "24. CustomTest, values from commandline (8bit)"); CustomTest(picture, custom_angle, custom_fx, custom_fy, custom_smooth); /* Free the picture */ SDL_FreeSurface(picture); if (done) return; if (end <= 24) return; } if (start<=25) { /* Message */ SDL_Log("Loading 24bit image\n"); /* Load the image into a surface */ bmpfile = "sample24.bmp"; SDL_Log("Loading picture: %s\n", bmpfile); picture = SDL_LoadBMP(bmpfile); if ( picture == NULL ) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't load %s: %s\n", bmpfile, SDL_GetError()); return; } /* New source surface is 32bit with defined RGBA ordering */ SDL_Log("Converting 24bit image into 32bit RGBA surface ...\n"); picture_again = SDL_CreateRGBSurface(SDL_SWSURFACE, picture->w, picture->h, 32, rmask, gmask, bmask, amask); if (picture_again == NULL) goto donerotate90; SDL_BlitSurface(picture,NULL,picture_again,NULL); /* Excercise rotate90 function on 32bit RGBA */ SDL_snprintf(messageText, 1024, "25. rotate90: Rotate 90 degrees clockwise (32bit)"); RotatePicture90Degrees(picture_again); donerotate90: /* Free the pictures */ SDL_FreeSurface(picture); if (picture_again) SDL_FreeSurface(picture_again); if (done) return; if (end <= 25) return; } return; } /* ====== Main */ int main(int argc, char *argv[]) { int i; int testStart = 0; int testEnd = 25; SDL_Event event; Uint32 then, now, frames; /* Initialize test framework */ state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); if (!state) { return 1; } SDL_Log("SDL2_gfx %i.%i.%i: testrotozoom", SDL2_GFXPRIMITIVES_MAJOR, SDL2_GFXPRIMITIVES_MINOR, SDL2_GFXPRIMITIVES_MICRO); SDL_Log("Platform: %s", SDL_GetPlatform()); for (i = 1; i < argc;) { int consumed; consumed = SDLTest_CommonArg(state, i); if (consumed == 0) { consumed = -1; if (SDL_strcasecmp(argv[i], "--start") == 0) { if (argv[i + 1]) { testStart = SDL_atoi(argv[i + 1]); if (testStart < 0) testStart = 0; consumed = 2; } } else if (SDL_strcasecmp(argv[i], "--end") == 0) { if (argv[i + 1]) { testEnd = SDL_atoi(argv[i + 1]); if (testEnd < 0) testEnd = 0; consumed = 2; } } } if (consumed < 0) { SDL_Log("Usage: %s %s [--start #] [--end #]\n", argv[0], SDLTest_CommonUsage(state)); return 1; } i += consumed; } if (!SDLTest_CommonInit(state)) { return 2; } /* Create the windows and initialize the renderers */ for (i = 0; i < state->num_windows; ++i) { SDL_Renderer *renderer = state->renderers[i]; SDL_RendererInfo info; SDL_GetRendererInfo(state->renderers[i], &info); SDL_Log("Renderer %i: %s %s", i, info.name, (info.flags | SDL_RENDERER_ACCELERATED) ? "(Accelerated)" : ""); SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF); SDL_RenderClear(renderer); } /* Initialize random number generator */ srand((unsigned int)time(NULL)); /* Create common message buffer */ messageText = (char *)SDL_malloc(1024); if (messageText == NULL) { return -1; } /* Main render loop */ frames = 0; then = SDL_GetTicks(); done = 0; while (!done) { /* Check for events */ ++frames; while (SDL_PollEvent(&event) && !done) { SDLTest_CommonEvent(state, &event, &done); } /* Do all the drawing work */ Draw(testStart, testEnd); } /* Print out some timing information */ now = SDL_GetTicks(); if (now > then) { double fps = ((double) frames * 1000) / (now - then); SDL_Log("%2.2f frames per second\n", fps); } /* Free common message buffer */ if (messageText) { free(messageText); } /* Shutdown SDL */ SDLTest_CommonQuit(state); return 0; } SDL2_gfx-1.0.4/test/TestRotozoom.vcxproj100777 0 0 20170 13132500573 13306 0 Debug Win32 Release Win32 {AE22EFD3-CCCA-48C0-AF3D-EF190406BEDC} TestRotozoom Win32Proj Application NotSet false v141 Application Unicode v141 <_ProjectFileVersion>10.0.30319.1 $(TargetName)\$(Platform)\$(Configuration)\ $(TargetName)\$(Platform)\$(Configuration)\ true $(TargetName)\$(Platform)\$(Configuration)\ $(TargetName)\$(Platform)\$(Configuration)\ true Disabled ..\;..\..\sdl2gfx;..\..\SDL2_gfx;..\..\SDL2-2.0.5\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) false Default MultiThreadedDLL $(IntDir)$(TargetName).pch $(TargetName)\$(Platform)\$(Configuration)\ $(TargetName)\$(Platform)\$(Configuration)\ $(TargetName)\$(Platform)\$(Configuration)\ Level3 EditAndContinue Default SDL2.lib;SDL2main.lib;SDL2test.lib;SDL2_gfx.lib;%(AdditionalDependencies) $(OutDir)$(TargetName)$(TargetExt) ..\$(Platform)\$(Configuration);..\..\sdl2gfx\$(Platform)\$(Configuration);..\..\SDL2_gfx\$(Platform)\$(Configuration);..\..\SDL2-2.0.5\VisualC\$(Platform)\$(Configuration);..\..\SDL2-2.0.5\VisualC\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories) true $(TargetDir)$(TargetName).pdb Windows NotSet msvcrtd.lib;%(IgnoreSpecificDefaultLibraries) /MACHINE:X86 %(AdditionalOptions) copy /y "..\..\SDL2-2.0.5\VisualC\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetName)\$(Platform)\$(Configuration)\SDL2.dll" copy /y "..\$(Platform)\$(Configuration)\SDL2_gfx.dll" "$(TargetName)\$(Platform)\$(Configuration)\SDL2_gfx.dll" copy /y ".\sample*.bmp" "$(TargetDir) Copy SDL2 and SDL2_gfx DLLs MaxSpeed true ..;..\..\sdl2gfx;..\..\SDL2_gfx;..\..\SDL\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) MultiThreadedDLL false Level3 ProgramDatabase Default false SDL2.lib;SDL2main.lib;SDL2test.lib;SDL2_gfx.lib;%(AdditionalDependencies) ..\$(Platform)\$(Configuration);..\..\sdl2gfx\$(Platform)\$(Configuration);..\..\SDL2_gfx\$(Platform)\$(Configuration);..\..\SDL2-2.0.5\VisualC\$(Platform)\$(Configuration);..\..\SDL2-2.0.5\VisualC\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories) true Windows true true false NotSet copy /y "..\..\SDL2-2.0.5\VisualC\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetName)\$(Platform)\$(Configuration)\SDL2.dll" copy /y "..\$(Platform)\$(Configuration)\SDL2_gfx.dll" "$(TargetName)\$(Platform)\$(Configuration)\SDL2_gfx.dll" copy /y ".\sample*.bmp" "$(TargetDir) Copy SDL2 and SDL2_gfx DLLs {ae22efd3-6e6d-48c0-af3d-ef190406bedc} false SDL2_gfx-1.0.4/XCode.zip100777 0 0 257035 12632323332 10004 0PK WGXCode/UX RiV8LiVPK[GXCode/.DS_StoreUX RiVRiVJ@@ĨSQAq3[*.ֺS(DZD&$ځ&J)tg௸2i.\Ù+LGBb%}>LzmTjmI~Q0OVd]#Qaac{Fo6] ۱0^2K|׸iӪ5 M9T݊lUbbEaʦJ (Z2=,a W'v[gui,_ZXt-s}`OL뙇~=sd4<K$/g0:!H~ :`VSuut71r ZES4Cs&I PCsWH X~H$b>< /FT,/өtr# |PK^PK I[G __MACOSX/UX JSiVJSiVPK I[G__MACOSX/XCode/UX JSiVJSiVPK[G__MACOSX/XCode/._.DS_StoreUX RiVRiVc`cg`b`MLVVP'@W!8A0]PK׼4xPK E[GXCode/SDL2_gfx/UX RiVASiVPKG[GXCode/SDL2_gfx/.DS_StoreUX RiVFSiVo0ǟSC+RIn+*el JZH]7Uz ~"F`#9_q,v(/B4L*L^;L}AaJ%>Ag,>-ԉR j5磣-ԉR*UT UG5P[> j> poC?AJO7x*LTϝV%kv?$ϧ%.滎;QaO_ߊBOr{<'(e J JR )=UjOn,JIM|c1у/QlR-p,tZpџoV@/0\nM^}Wj5!g'JpM LG1}r:aIXrQ#hLdE&D4)s/q .對kfzA/R+nU1LnͪWԏcLS 9)]֪`U|y; *&DihmS/'=JI âm+~5ʊAӘ kbA{W]]ae<5K\z;45^|ZN,)&lOZ;))wo޾;ޭ;L&Ic%աq[KmTPtH^c؂"A/1lmK5r嫱OS!W7)%b&5^Ow.n$^]5kZYȻG:0v*YޱYXYuOhHHx~L|jU]RA;RѽXқqO32hF@jm.CitƓbE.@Y2kӸ?f^F3^m7?PkX9;+?v&VE>PZun]5WRRpWOGX):;DeUHc'v*Kq[OnDYi^E tZtchfTqGR_ڽCы2+Y ^lj6!۴f7mSl/W֧~P=^tQM(o&L/wF'Km'-Rm:؏GHBPKZPKj%A3__MACOSX/XCode/SDL2_gfx/SDL2_gfx/._SDL2_framerate.cUX .SiVFPc`cg`b`MLVVP'q!!AP&H @SˆMK,(I+,M,J+Ke(700065337IL4NLK,ʴfPKi0D+cPKXG(XCode/SDL2_gfx/SDL2_gfx/SDL2_framerate.hUX .SiVNiVVmO#G CoGU)@{*E]ovv^rڳIx ܋H$cc/GB/IdNlas4rNN=tMPzg* f7m!u\{ JHzցj0 6  8GIk%M EI$o踁)$^wGfP#RSRnL˥ q|7gcaeX%*iVS5;pxHl/w+JGBXNJCNJ4D:i E4IE\Jp<97) h¼OǺ.chMeGc³e=9{mWGhԻ Vs|,.ë?B< H ȨC/z!A 88H:_ OHU| ij0|16ح:պU&vFV6Ѱ[gZ}+׹z=Hk h_YN˯rܝѻ;hp8}]]wf}> . {Aw}~ӛWE5f9tZIn=6MB/Gh,~&(!(Hg#^BcokFPHOyͥͻ+YS'4/[s ݇F_W0H$ mx$;i~b(lf\duco>RaPK L> PKXG3__MACOSX/XCode/SDL2_gfx/SDL2_gfx/._SDL2_framerate.hUX .SiVNiVc`cg`b`MLVVP'q%!!AP&H GSˆOK,(I I(qKOKJZX[ZPKp]PKBYG,XCode/SDL2_gfx/SDL2_gfx/SDL2_gfxPrimitives.cUX .SiV{OiV}m۶g@SWڕv%qȻqͽqmzS=HHVdy@ok;'Y 03`08;GG^|3EO/>}."ggXd1#EyQ|t<\gHDyO7X-|EGG?,X<:'|?9[?YD8A&tyq,B^{#'HSu Px7^@R$ O8(bꉅtwK]g\y\y&D8G}GGyʏc? WX35 Xx%b&Z?rb}p,͜`}`}M=\?N"IWpW}F ??:{މ&N :yk;8YߏfKG,9 o0f }_)O )hY:KϽZw)s7m0#r"ЇhAD#6>!77@tv X95d 7#)o!~t-ޕ)F*HqDyH%#=TU1@ ܋{׀+hOŅvI\tW߁2Ur f::;A^% -gǿ;49ṕ8 > LYx)b#֞ 0ߣ+(2z,Ҿ&Gx.h-87߱|܏8?Jl|Ⱦ}@I d?i͌?f7KjY-#ID5G7 i+rۓwk1iC[Ϫuݒ ?S+={T]3ŌPnZk(R;U%w*if&|[5Y'jwƍ)kFfN쑚'CvBAKII!ZG`LlĔR28[iln̂8D]R*g elhXqld :k7   =G{W:CЙ:#S@EX^<B ۡQM{ix2'V;C#/۾Xo)):I?!MCMZw#WV4T?wAE}$& g{*Tze(!s1]'Z:f"utfKeN61AGqfUDu!=!$ A؊31.zfƅhjRVRH`&0Vm焌Y#WAȋHEɰ/C@MT=A _){BC a! b2HTq^[%H\>E+S}FmɲR[jEDQXזʢPr0mB_ӝ(BBE4N9t+ЄK! 5p( (׸zfu=o|LQp2Œ2wb2s2}[(_vmd/BiRVdJHYtYgw_GZR$?4bLO@^'3cݶ 6Vw=93Vq/tbf˃lÈL4ۆ,~w_U,1 K?Nٹ,WzHxܰ,ykjZW0k!ÙLQӑv\VSPU}'!EH>~R P(#nU$k;()a45PLTJw  B H Xi8ITXTg_`}#LԀpѠs'es˽c2׷c8+:ߤW0c 7*(a8tM&8C=U0eB:1L*oyH\k.Ji|z\=H<] !=,`w (GK{F78<{+p9>?{n@=6~'w$75,?p1k Ibx щd<$m4Ap.ERE FNS|F?[ ꫈C>cX_UD a^_,ٵ" tAFurm]sOa8FU/k,S  kw=v"ȹyViKQ[qo(sbO'0|5 X8΀94\k,<@,K!KŢ5YfCDזҵju*/Z:Wn8@> K > `_/ .}O}MffW#醹o`O @fsp:,b{ПYZzbǴ<)E͆k5憔ykAk!bׇc%"جՆ};'a T:}ڎeUӹInӊadbeXjƜqfeMMradJ[!0U{lm+b+V0TZw-IZn2,0P,1FUj ,I RFc`5*jN%E{` [7+dv?LHJ+l$In)K(w. @ n@jI|J)~F+PA,|е=0X^(|TxV'#K%, %I?)P`Sw* =zj 5W*Ss5PqXYt$G7(c/"(i:u%`ƌ` -ak ~ *Hhe(Bk9";m 4()I{4QS 8:-hF Ίgħ21pɫX*1a38:t:r0pVI /?Od!: %ՆS h\ο¿t.zHdV` +7O7û5yz-֏s4/ٍoFJUxK* J*l+"-k!-=}N)j[V\`*??n#?*Bhe޴T@~"g*\y>hn>1!B@8cA'N5%39~RIHK7ܠՕHt }xC-~?5;;n1|z@S{><tD~MW|&tV`HE<gG8֥ }"Mcp?$~??b@tFp31z'kޑ\fHSi+U]U7dNv}2BZԉxL ┊~yAvC`(?Q﫢>a#zpZI ᶏFٹ_x[ᧈS ŀģ,"|fdGܱP9N,:qc c7Ys,~x}´E<@܌a6 ]ȓ܊.`?'eGdIDAHa4o {y_Ҡ߄5pgx \ `ᐅUªGdoAw-@!3\?>ǎj0sw%c'Sy} D`[`faq3 `?8r8mPc5" sE70Q%#9L "'؅W{Aq v֬uzznAj(3Ở/dݳ*%~9[f>Ym= H_<$SFv1 hf1; ZI%XNf'5ELm=DEՌƝ\nRݦ@$X( 2(LO#4av0vps; ;Xy'F>\|2Χ0=1}Fl=9 >r[ 8WB컂C;︆cEe„AQg_rI^g9^P53J*P&L6 1>#,vVP:oH.¥ QYҁ"QMy͜MIΝt?ev AX %2DĪ+B#jDQt￳T ]=9^nMBOcf&##e)Á:@3{JDWYdtt\'Hq9bEPad`uEtv*J/glIԺ@QMMXFRRJXל%űG/OqS8.WO=UBMxPMeeMeуig겏5][eK_7iF)SPa3' nh_3r]s׍wf%:ՅOvYؐ3CFwxpɇԥԌOVFl4>:f p># a/DN@ji]p*' qsjBc3"MY1mhіVWljg7)*ƌC5;C {ܠv{R(ܻޅ |@'ǹ{7Odoh(C-):*z-z?|qd8}U^\]K4JB!w* '_޹TF6VO \QVNV~/r| ㏌nZE(# M!aRTD^Y^zCLq2ݡT*#-Ө*ݩ*BGBzOaeumbkK鯵j5bۑjU\0~&_oBŮ !%B8{,pI+7i%[5~ (oѠkVڤ_@gޙj 4δB묌ԧՀJmBf6aQlBVфPDX?:X'S*b?i!H;+W9xji͖>~DR˦;>"7J/.cޡ䬘L{X VR5]h4( A/Lv/M\)UuR՗ XuA*`R6X]sYWW!w$Z@Il ۾ĶcMo$hl~3$>ߴiz+maĶ_6\ i"Is^tľʡ|Jܝx^<#x^o~Ҝ~Ior* TK*5 CfH[\vٞ ߴ7%*DhBZb:Bc{!hkҌ4u\ma}%l#j ?V/ޑ]3Tr%FE\apK'^ Yp~9 D7Nh³_ 81u\u&^Jc8ţ?/7[b n\{noGOF/FC(hL/_zz?4ahϞ|X) \~]ާmq7*pTla(&6p&8vO{S`GƶB >5* ݖ>M:㾘.4#)A'ƾ-*v* U c&p'Zzţ*/|~tm:ODc#+rDkX->Yuciu.ҷ pG#p6aϣnWHȓ9!^6F,$.wǐSl.RV=fDK]094iqP < HcN^M,Rx8OM3i'vOzT!;d`dǧ9 st-BG5ϖ SF&l N7Fq+ FN dJ9($j|M=hD/]ަ{#a4lM? _KW]vbZjOA00#)WVȅu.nӇ=vKꊕ:~2IɦH1iͺ|?'7}!OWz9u]%0>U)`r=ww"j#L{P ]ط0 oiP`壁x!mmi *#RZnƍCuxUZu}h*Y@/ɯlf[-)vwsO >LP-/Tml_߹ĭE]x{]s3=[*nO7ڱɽЯ(t[~gC_C% rڡMy2(KƣJ{s訒EwLǕ5Vz_r\Ye:ae 6NW(tb-QY#^bRab`$_ޏ<)3y:1<>T6l,0٘!C0_w%`!}nQ/3ѯjfK}Z̔ufɺ3dXx0+ s۞_GO[o(̉ٳAk~|q r=dIEIEͭ%JEŭJ쮠b~v 9VzjVVް,P!vsy-9yBMZӅ5˓@ 3H8[]9@TC4iAkSӀB|{i?`g{QXzDu;*J+O*BɊYQܤtR 1C?; 7jK-jg2Ք%԰ڬЧ sxiFng̩3 N#e>z=tu~G-C6M]nhQ{jx+R*}/Б{y,LWr6q^ҫ<`˙^%@<K%GAN hnt)yʕXQ>Ԟ;qm·? 8 ?OɥP'VrFΜV5@2uARk~~cs6su%j] ԻJN5+{ϐܾk?Tw3S)ݦuSm;mr|vyr?]O剎gBM5q*[>]QGPJFVGյ W3Ab),%9O.|0Bz%%C 䢒/DsgU靬b89?Gr >=Y|<^oSݗW_Qyf{.MQ̯S'{,"pp `65\0wB"F!GgA>6r_@ØǹG,a `:/zs)"/#ɛ0)`1X;᪢[Ħe‘w׍R/kWwe8?iQ?.5o7sx6,nJ7~${o\w߯b#4P{)8bvyrkɈ; E}xu9Qf3F ~uD$nz@rFpȵOS2@r.qc5Bf%/xA I}rR  ڹPbHE!; <ޝz}Co^:>haW*K+ Kgt4aTz~ p\-@N ( Fü<*fb~l8bɦu-Z)zg;lbpc`/3VRJklWjB` Ґ!2F&I^Ң5U L:JTgpBBǒ%wdw-DE?ykSSe]WHch s#4Ňɋʪ-]Ԭ g]3zLTvg4:¹1)9@GMLHqhx5 ]+ OB8)ƒr)q羠Y[5VA ޟ9iYA`||zLDF;5 _KPh;Y]߁)jfyR^#&NۑLb =Fmd]# GF9P(nԡ !JF50\\{gxT68wE^MZ 03s^|ɧb}gQbdNDdcR.hӹQO#B:n Qֲ.@`m촕=O1rRN<"(W^\#o?#5N^k^|]kVlK+ !mS4}m'}cb .+?`2}>)V;5ݑan!7nSWx/-v~ xYv_^ͻ9OSI=m0nƪRf7uP=їwDR!GXrK "JO ʺKvuS#䛣U#Xf].Qsuo谩(CM)3}$q,,j.W7-g 4AjzbZlFkN/ڋ&HSvIь,qfe}7NAY5<>E$0ڶΚpt1$==O:ŵR*Xnt {޴66EDwqoy1]G֓QN4C+"1p=!W* s;) ]/2hĢU؆X'%R?n$Lj\R En#O}! :u63GjTmgY[I]+Dw'ytJ0p(;jBȡWࢭؖ|cD%Fǃv>bh"I bt ±NU!̘ĵ4{`J @qTypknc)@ؠ .єϮwm׾%v,.1zg6w_C}fƙ4ʠꄓi2Q>0d8mOV\Td7"cn*9tLTRX`jXP˿X}nD}I?о4J0 }Z',i Nk垳 +gr)XSJ)ѧ4}6|M""t˪PlY _ z^p*,܈UxYg-FC%͏d$p=YyR 5? 6}jl,]\r,"z<(B_aUWkNhgR֎U:^XVn_Ib;پY~'.i9O5ZE;NXA8q6x>n:dɑkT8.c [`r\ۍl6jvKPf7V/*]"t6In u=,*qrq%xƨ c](Bݮ`x*^:)T,(Jg!s"BEFw~`J?41>9)gO]NW>rϧCXnOs4ӽ6^FOOOgm##5 1]k~7B !|ke"ע2{lJ黬OT,@ #rUJ#ˈɄZuPx1啞 a*?|g{qN%F]ɱW5ПF 0D̞ 0%S(ߪ`쫻Df[Ѳ|$xoe4d7lRd-lMkoC~RDULEN; (/~~dS`ϥfgEdfʠć=i1(urSɍAJH*g ];suhQY_^"2w\**z[U5K`c\S;/F'ԇ:s! i6%>{ƳRͽY#$"{S|ԏ/k^ݹC Kygy/0|c;Xkoν,v1~\SU1Z ,3ez&X\ ВvF"˱n kƇta jv7so(R&^їVPwxٳf%}aq+z a[7$[!b*־O$%7V2 Bn;5Qoͱjjc]rq旴Lr'j>5నX9kmATԞ5UOw_yW] f A#fjjG`oI+(_={eߚFᘾӯҿ!3g|@fW 'xLYOz54_̃Q+1ZG/2 %2Iw\il<<odrVR -x҇w 7˺Ğ@ $ T3(< + Z:L`nIU0'Qo\5ƌA[/WaB2PeEBOR_/b&Y䋯 1%qsu, PE}- QTs}]dqMMI= Ҏh*5fctxeV׮O^U !!q6z r%_ܺ ;U|ς}oR9ԫN<kҶ 7nGwC>$+6 /7^;37-.P~nޭT@cy!T8mvR {mvPq?G{]naB̴L|t=CU!<Ԙ w Z %lRZy3@ 5(SԬ \8N~@Njuk'Ǝ`-m,X)3t~. )jޥs3%zG*{[KRyoya|ر >Z=7э޽>!)$46Lɹ(82S\Pgjgsa$+ G^w f y 8R",]脞8佯KNJ qUR0ċ 7SK3DL?AGM6}Jп_FvBWk?P4nwʠC(G[]3Ba&粹%);Rg *V*Äڜ'gpeKjup.k˜s:AXp u `r |5>gׁtW\`Eǂܡj1_3^> Q J|1`J/tNAN\sh,]%U4ʾͅ,&A*(OԔ,7f(M%Ȼz0xkQ9v)ܩ̐25ܜ_V CvJ_E-bu}sZ%ح@|vu2JFϣ̛F8ï|1n7vT:xƐC QlT449Ok}+R\S`lh_1_~ge g.uo [i?y'ە932O` cDihwuұ_ъ~BgtQdڡ,֭_ 5lD.l\)k2HqxܧRfwlD+/@:c`0e0B M}~1sT2N.:5}0@!2LSSL"𴊶v՗ڳ̿OIGVgAFVs NVéPdEóB3L7|\q}f.!EWi4)UxY~$+.T ss9LO8 akTjDSo^j`̘ʌ-UWCl5Rp/`쌰ņn<]D9I.#5nXQ Q"wЩj`.XpzUi9h(ȸMlcar0XȪj DX'`+BcD{c~/skF-9@ё*KӲ/7z]r]PKf{4 `Hc<8wIî6HzcI E4Yf5uM!xd-HFSBɾ5H8]'g5daTeG7{).+Nh 7ƜI:GFdUL{lUtqPdUnmOBwG+L_ ѴLNP1W˹ƭ`[jVVjT"+jd6"Z̐o(2ml}7U*g4;Hү J6O( 0IC+Bh1 pq^s>.dFmnZ?=z ~&]YSotH& h;rNf^)蠹eV̗72 >Рfe[]c&?fQįLQUݴwl&9IRzLYȲc)r&k"{؇|`*/Z|Ek0@W("Psg,/B~%@yha mtqeyǨb36+2S3@ha.e{NpݢDroF:.ŐX?JyV47 5[&Hl|$xfV,:4{ ?|a,G|Io2Qa"?;e2+65_{S0j^hV2,VxA΅\h>̌E'S+TFwꜩSA-(ІQق KLa"^DQl)t BPTUvBD5w KSՙf>8X`(;ԃj& <];-Ӹ6 Л bd) h1zb?j=3NL9Ձ,>{[yLOV@@Ck@s%֜M7yw};וM96̢"S& TXK_9v)@c] ;8 O$ٖBVU&sKYN[5P égB/dڒ3[ وpԴ P44wj:]G?& r_ia։YPsc R6Smԧ)-_oчTm7B$VЛ{(RV㖅չ[TmI 5[cy~Tm!S!ddލoԥzgOK<3ŰA* hL A{s tgw-eCtӌֱUذn)@^UZh:b. }U;>\{~# ﱥ!荮@[퇓i$E~|rPϦ;zcmЎ_#Nkm~tGtPK~HծPKBYG7__MACOSX/XCode/SDL2_gfx/SDL2_gfx/._SDL2_gfxPrimitives.cUX .SiV{OiVc`cg`b`MLVVP'q%!!AP&H GSˆOK,(I I(qKOKJZX[ZPKp]PKYG,XCode/SDL2_gfx/SDL2_gfx/SDL2_gfxPrimitives.hUX .SiV OiV͚mS8_OWfZ<4I I Lu.rñ|wP \3^dt>_W}lRy| q\ qq|.`@Nc*UH ǹ }5"Ӿyԃ7D0fFLL/}Ӣbd QQC,8 z1)j\u,.HX8ݸݾhi-6az ZLQ~{$}aE ?Uzv?i_87y7F6wq)y!*ЦŒ*fu*oaƽ%٧ClQώ8.V/nXTTZОƼxv48?ImHܶtmLd ek;[[+d 40d)ti@0k ╥uBQK|Ԡtaǻx{|K6gW8|DF17*fҊ$6lHl%ztm-TRz9 A/`}Y`Tpl쭻Ѵ'%:&JKdO'c&5tݽ@^Rx8c <*SiQ=(?Ux4#zۣ"dӰ •Ȳq(9͗a3ӱJD)x*X9x؟'yuЋa 9CQ֩2#**Qw/rp:T]H=OxD)Ѵ%l6O߭xWyKܒ2X{6B\&g3F^ٚN.㘖_*E|U,e>>vPKlp*PKYG7__MACOSX/XCode/SDL2_gfx/SDL2_gfx/._SDL2_gfxPrimitives.hUX .SiV OiVc`cg`b`MLVVP'q%!!AP&H GSˆOK,(I I(qKOKJZX[ZPKp]PKД%A1XCode/SDL2_gfx/SDL2_gfx/SDL2_gfxPrimitives_font.hUX .SiVGPݝF? 61I"i 8$6j  !{{{9&{4;^c]Ifym:?P*w5ɋ}7w?AO?1ǷnŕVu]{.u֙矲g::ll88:w`}o]Q:{Uܵ]dtpt qiuvlضiuu:e'[mcm:G~Z[|*,"a,%"(G) fhV?ay|uYxSa]օŠbz#?G'Yyzt<)by*HXnW M/_LʴS$"cv5j*v9@X:SF 3;O83Oݶ\cg^$"kv96j=Y+O<瞵sy2b}8Ϯ_ov<,g$"sva!+?ٖW1HDpK0q$"{h[^]g ;*UgʘAȟ]lg2q#Mu B%<`tyL;^;2fgwv ۡ\c'e .5+g 'mA;^;3m̴sS Br2;5ۭY!ر}m ֌۬Gtlxk><ٱͳ5KvaVgޣ"[ƪ1y4F fD0;yhȣ-,Ҏ%jaDh ֖v54Yt6/ e04(76,d35Ffk[kS-6MQ{1h}Oua|~1"@CR.l=͝'pyF%eքի0"vDi}!S-6'ƈ<`iKY(~VmK8`;a -1حAv?U53yn[|./ c⶜N_6ZmW`EKAf[b">I& }l5q 1G~liK0ˆU-U'|-& Fч;LqWސة2wzxNC G~lSWjaD}D{(dyĮ2_pyN3XㇶK1yMeꨐ >/[˜<Ğ2m׌mVkCjaLcbKe]EW#  hk?v”&QIJpWYG|; Dҽet"c?vԘD[l&c?vn S"ykǫK<cr+ Ro%[ J<cf"~y]5y ./L# vp0"waOvωbXbb69b*}dWPgJknuZh=RG S=43b4Tu?bM{^{K,Zve?[*c/ 3cvyі: pfW\ .˙2je3>we5iT ovu@n 1*qיB6)$pgz pG$=T 4?;U5+op'9MAr#,/~Z1Hv Y<9LΓ&g׮l"NrӿF"Nr42b^ͷF]h #W~Ӝ}G4?N(S0[Do^ݭhy1'\& 9N#Nr]/}սA3}2h5Ty~K߬yvL٠$? k_36{Ke )Իo[9i @Dc9cINS[c:}pT*ZQψg6/Rsg9M>ʈAR{5UF Ÿ=,8)4V,zʈARA36gX!2fGAS3٣+Q֜'';MT3cVXNVs]:*c?{9[2fǹgA*#Ÿ=~ڸex6Ed b]qR*^x2b!Z֟S֑* ʈAgO GWa9*2b!SUetTek4\?ygt4$]9vʼnOgOwg9ęOgGWafs9י ,YAT lw"\L"VA.tݝuѱΘAϞkNBfy;Oxd|t%橵/Zza;yrzs gsS^n,s^ד9 Խ&ܠdNePF 2?{4HV Hz΃:?{ tm#Y1|}-d -/^/\B22jnʘA^%X_ijFm_mo5_)*)AʘA^]T&۔uH<~"<@$<:.1&`Q*^q:kW+Rr~~ :2_wjݟܔ^_*5gJgΰӑR1 `L9rwzZ_*#ßQqRSƢdg_4_Ke c7mUcWu pʴ1ʈAgoqWf{*\52b1Hٳ2b1ݕik$ßý5jK AZ^*c?{ a3fwl6먜0QQgmMY3ςD}N? $?`֨(A25=+#>|yn Gg$? l[WH }, 'Ou; WPݩ2O+Dy]yR3OGNUea+~iN]Γ}jfyړ\g g´Ff0Y z1G (#}~敮1ͳ~yR'g_ ȍANϾ<{VF 2?{k\K<g*Ag 5=+#}т.I}xY -Gi-[|NϾgr|Rg^!Ðe ;뺜'?K{R1H%Rgw85g>A1H3I<?Xz)<?) Sg'?3{Ȳ\6ڪQL>ʘA-hWyfs1/ܑ/`ĸZ_.\w|[Cj;\0x<W!l! XONO|'6ߢI~ ^%doF@ VýO w2!rҡc 1cߡC<^Kwf9F\߯c?K >s89w~1xf7CywL8NO,nC%PaA߇yM1 ƞ?p_@gʝ5 `x4C4Xb_al^щr^ˑ7;V~4^3x&<Xǿc@S'x2:2lyF& #C]c {k.$&el?.?|ϗ%Fr#'r^Y<ux\&2!9#d#Qga8_yK0Zm:|`/s6L?#[-g/ݏQ+LXwz`Tx?MU*oӮ7qh\^6򸊔/UE TɊtd>ҧeP0?s7b%|NG e'_d>b1|N]lڣ(FNo% xBU`kEX,@GXr ߄9Ak,ah{wTC ]\{>ixPYFʧ7rz;IIU"p"{tLҨ>BD)bϠ?>~"qED=ؠՔnrڝ2LdB ut: TAh?&b8 ~%C v˗3$T. p@?Aa8YI`ӹxb;Dp:լ PX(>OӑyW`F| ,'y- ;NedaO>l'qiP > I`.- F= h@Wz x!=$I|N@zP&L_qEUuÇ?&>ۿ%1Gtp_3xHb@[8b Gi1ZYɠYV[ itAl6̹"PCޟ[Њ[?F`cGVY#5вeVof>dW7?!! I;c,o:Mx Am"Il0Ac/g 8b*'8gË[Q9e$ #> 5Sa=_?O#wii?AdՈ&o-A]s ܝL|[7+Mlއw{>L YT!Ws[G% [W yEHcP>L>0QX0lA~?'<w2_}~`.%tctP`xyOވ~D``32BnA`ٓcJ _P(§Lr_Mgr a;Dl2 :[`2{R N  ~ͻ:wW&M[ԫ&N@# i>"n5 ip]MD <<$v'"OlTK)#=z3@Ks bc-#~owQ M  | ]C`q 0iW3P+EibB_ lBI4X\@3 bWlfj-XJ8`Xkt ~/=F+3~53O` 7s;)XQo[;PѬ;Dם+h 黾E!/(mwSºj/VS_j䰱 UAv3GV=~5AW3|⣛?6ۡ2N(N(Fwr)+OT{B'!-q-ҡ-AW` /ň}dLQb|M$m?p,L@PS?Xs'ӜxDs >uĺTWM0 wC~7= IIX$L,NgjYtzآT-^YU[-![Y`OXas F=%h\^2'U3q',rEi8"|: +eÑPNj5M&7 e7l^[27e%`GL Poeak/ϭA<6|F[?GٚɡmUX Tr ʇ`P[o5+I3SX\~εu鬧 T C}{;; ۙI7̡f x<J"$R>ݞ`l[wgyvFNmhaӰyjˁڻ3b}"~CyJHd*H`ֶ)/! G? C240s>l2M2c!2^z)_I)SԡХD'N9LjP8\'%oV ;l+"ڪzQØUwU˭ҽýGd+<ֻv]ra(o ( JeS7D3i 41>.6$ L X]L@lZ$cߒO_mHk͕j:5\K1DFl`%ᄮgXI RdgxE+(QSbD0g&,R@JiK0 [raˢQab*/r':]HD lC_;T$d"]i7 7+@?0/ԱL9-S㑼p=A}7O{4DЄ-LiSCq_*qA`:]>T|h'Y1~k0B^hk!m6hliߝ*Ⓨ\Tg ,?Afc1>WӽطB#ߗ{3_C`ϣGd7# P H܄8T"TTP"^b!p 8Ė0čI9hctmK{V%USnA^ dž8VQ:FN1tCe6 1qg6D2Đi'CwV.lfG?Ë%^G_;y4Ю->zh"Ոcr0##f#*64D0Ɇ7̄sG"t; 3"…Js];f9%WP=m'bmVk{ᦪpFޥGg TAZC Cj!H+bj cխ 8&{&uNfb Pp?xA?u7_E~’G+؜c-p2-}#9qg=:Btq !Ixa'@L' I<( FB Zr:Lu_K sRQBul+#:H/E^t:޿yF>^̰ۏ~Nm@Uܑ>bx/o~7?쾗7K~;^r^j +\)m@OX OE(OU 0_RfEwy!Y Aė1MnQ PJj'=YƆy>,pI 7 z0>Eׂ؟1Qهo\ Ow^>SﯨKZE9RS!m V /}J LQ )vHYi7=Q<1&H6nPVb,]L@i@q!,b݅X< Ⱦ }!9lYvx$7,^hM&7עE yo2[e͔& hH6Q) q d@q :c LS10H<T@` B vzޕo}:f3qݹ;&F_/-"VaiG[g^XG(s~Vm-V?HuN'ͅWcWAOEr~(L ٬#09 aPAvxXs!Q XdqS͕ Lw\Z4FL)m ν Q*gcij D=(DlѤD_fC9 :y`#OĘ:xDDۓڱ[A>o(KcQEvI4CäDSٔh,FVXϬ<5 8sZLK}оw"o汖xrkۢ6nAfotoYoo@-diऐ%ֲmrk[[ Mnmkr&x~%_^y˗QͽݺbZ׶g][ʾޚ"z`Ư&<ǖZ_GmMg5DLMÅZ0aT=CB&@ LB_Gk~uQuV*V`oO&Q`Rf-0Q5nW> ˃:NoɔBq\f3XNmo z99PjYM+)]E0}p4|F>~?kY] kرLO};1L;box?{ l/$RJ}lAS~36gMh vc~-~rU|} $p^K+;Q2NZD @=g^> WHJI) \n8>xUٿdGxGdS-ITꫯ8 Ңu`ѿ |AFV茚#Q^˃vf='W7 Fqo?P2jCp  )A=H '|)!"xαuO]b!t<ݖ)&M呣~8d\H $xpFb<֍hbԆ1. (x%Y58TNF86/s$1z!S?a{ׄdx<+MJk^8گW'1=,9 ^yKC|˥?n0b_R]yowwoNjKoL aK2]Eɡ4N3])*9+M-5D)DJPE).%5ܜo):{<A}O fN|wYi r~M'~阾T-&K)<8 tە؃ut|/=,ˤT"tT:dRsQ"Sgh|>MR+ ݡFC,jӓFݩ`f85tz)sU d;eL4~>OuF͞PP-oRcMrw7=B?T*+i*;r {0>VL{߀B kSB Oϯԏ s$*doҒ?)גrҪ%SSʨrAWURTxʯgm5Z(գ8 z{ޟ3Haz+9?w@yGjª'" -?[j%pCiƢLF#[!#!,rF;( /?ҁxK.TP8E2ՉL/D||KWWM7G~8k99I0./=3}o GO}%|703I&aAYo tqXx fO"qӸߣ£ᶓ;Ԏ"rQ,d1hy-oyȆ[6(V*bC*BʪS-IB>j`>kT.KeW?\)mt5J-la-E-`~ [8uN1+nជ-X<>r9!הEݡcNNw})S}НP>x:ξ6i/)NAw(Hm3nh{Q!llȽ +֝+Vws߾ʫ2,S!mֆj cby/Gm=0"t$%gOebto{'nY9Qa)&v66X_czMҹD `6>U0A08T&J'XUr˛SAWFGiL=޷jT wZpk7uǏяZ,pDŽ&.?xX65QMds &*^sMb&)+y*J`l)ZYREV3ZY(K[GtnTǐqPs(j9Pk S.6s 2[A >ty?[0-ح(/Ps"v^X>g2D27{;:栞 (`/%XMl6{$kYfUSx UPPb̔V"{W<!:6vp؂rW> H(Km{+^;JD-"4aP:}IEfjs1)Ǜ9ۊS;iK}T,MW{'*^;[Sq򇊊y{`$./$ Ymt=[rfMsdMsm4Jh"[|"@ MG'sBpM'ОH݋xTź;\}KӗߢB ,)i*j+KsЦm!K `LekYH+yu(I!'"`0@i`9I?!wjksJk<Ε=ཷY{2~:Im 6=RGI6-Ȏ*8P~jZ~?у_x>{V*A\rB:]gٻmn_)fGNEi؈^nv͘o@p6%NĐHۓui:M8mjCЪLaC! "+asKؼQek6`BogנغP;~1`EԪ.ְ2h&XK` &jEdm$0VFfQzkuE;/I+JvVvRh'R0*7vY_'q,qX֕lH7XrxC Fa =B zۃ)k:3X+ͪfdAhm%jcJ+ ղX6v#CO>qu2ᮣ㮓wF10, ~Ġmc3P86ah9)F7xm/H˒d2=pGxͱ`3(^Yy'O%,'O_wZR^  d# +g-i 㬘l&lT@[&6Ƨn<-&xUŨ/ע sFrJ?§xbCyLU~'L) c/A b|D!z.A=zNj"U3)|<%bL7=xx|}[ 'C$;KbS)kڶV W&J'AWD`(oSI\y<>M-!4欈1oS-^I^<t2 ƭOL-C6j)`}i. 4bFLy=kZke#ِMuͩhLR5KE)Sc_$AYe,{m,c/dm&;1?W^Zh/})4ž YwO4ʲ.[ڥ(SvD\H&un8a0mB}j\nIJ\s# R"VO#&4m'4zŞ-m~^`'y&ы39&.IDIy{0U5fA~yZz PO/?ZCY}нFahtjEFt*@7tW5?G2胗SC9]ZQZ6|Ew+{Y nHGO [8I m65Sn7XUč=VZavuED !RH *V@!EocoE7EDDQ>we ~,nw"t<Ľ1nwrT贆.C}RtY5NOqO7ə|G|tjpD?lܣsMcg.u pJΖ1u.<]CF%OYQ o3<ŵ绑qf Le/_Y2<]2]vJeb N4/P6#|L(EE10Hzc"3ag`C'x '=\nw1NE|ç-#|+p!h[hH~7ž7 @ݨ9fE &^Ō6謉U겾:v3Y Y'ra:;{墳Xǵ^gJ7*`8xKJ O{z cn"-c,M`9 ${ۛ)2]cuS?7 F뽥G~PL$4ьH>]z &q'C ]ᄅOx;sTS-ȯ됺:Q(0t!cx3'mgcﭕutpEE;P_Yo]҃zR,}Yሾ@L0$CFx`.w,eI|3V4p4k5",!pŘWfOL 2yʬ) am?z-@8f8 ٌ'H5aZԑG9Ɯ_p5D!dUrG8A3HCG 3'ǘiĬ.K maEaw>{ߧ/Q ϣGD?$o JA:~(?Pc<u`;mI_my@;S!mt~F>yT|}A4+"8 y\=q\:yZdH}u"Qq42h*J`ZN2h}zdiJUh {[OHz4GLU(p!Ɔu^〇,Gf8:-8B@=`clTh.l$?#Y 4GJ3 U>5[a+N5qmRoZW[&\ӦI?`h3ͨ+Zi(RpM uQՁjJBO:S>^`FtSɶv!3-G=!<pzUK)1t>K7M4S|[kU[Ek*cc\WGϷ iI&.YJΡΘ]+Wľ;x8U`}ȜGBiow:LqWII|hp{|ز|hmíag||X>|hp{|6<Ya7RNeST c+0xV[a|/zQH;ee嘅w.oe{;E޹|l^vw.w;}ru(a]-)e'xFdȲp6@ r$f {_|/D͜rf۽%]>-=;ř rE^~լyN[(}P#s"%'F̩5kg/Z`;~>5Y9Y髫e}ujgY Bg:kNA39nEg=tvS{ޏkgYr7FO cnu&܄VoO'-q%tKw(դ{_X%MwSG_M?+Wñ[Э]z+FT)/F"((DjMN[+mo!#SjF&GҾ+VF@nxTs?897q5 N@Zk*p2`F']qRfJp*0Mj(Q5WjNJ8~L_KlQOTrzjOjHMYOT?O2OQ|rpM4T|rd]H6*]^(W#{^ű[HGG[+_M] [ 7mDWcۡ-2Y?),evJơơleBQ:7.]X(J;{( ^"QCEH(3&#v;EHf nw^Q+ Ŀ6ܝߝƹ̼)Ism bۅ0A hƚ ]Ub7zc7[dtP]TGFp0 a8a}*gK7{?mTLGYϼya8o;>"ӥņ=LzеRN$mAaC=B\S}!D6w "؊`+VDէ"؊`+"XwWԊ`+"؊`E]}Z+"؊`+|w"؊`+VDէ"؊`+"XV[lEVoK?"؊`+wZ`+e<e<忌i^~hFe<%e-n>vOXl>[n>en>vSf|c7l>[Sn>en>vZSf|c7l>v󱛏|c7|n>vl>饺Q(4G99 j98ҕQ2N']ATE+."OٍJB3#*3IWrDNg,?r_A2$2T%I¬Gj@/O$T s3n5h%ޘ &1ATP*tS29Pzva30y4V71RiфA"z'f4IXjDzvp29@@C <5LL*ģA8I_(o7BY:V}w:.{{ )4w{_pAPaz& e̻u ևM|>Eo?^1 ˿>C?0 TEB(=&YZ ]f%-/ #tq5[GX奻//##P>4t@/3T8_MxC>bo~IG `!JH})HP.ijyr5R|'7w̧|>Q 52vlF~&.>N1 /s )`}jaѿ8cǤ{ ~@;{d8߾ϟ)OWP`8_cڈ  2KpYVCx#?_1]zx&x济UW~'`=R #R(,ͦe"EȑP(@QχI532|M6#-Act-XWX=!(hb5)C'm ykU~XV hMŹ#+%uJ DpBuζ:'zԂkFTs6nfĒ #]Dݱ9ZC]+X R)g~̸l7.Ve*x?k-̸%%T~Q(GlUkuWWtrw[W6* *i}߇b7"t1u#Kw+8!n(ьl2#-p@clwK0?]'-ԓ1#cEc#̀@ahO  m=:v=g}FjM7tđBC`Ao6{ɍB%`_>r>8oQXE1PwDHjC / 40my(=1;u"+IID^V%_Py 3_Jl\p NpD*:Y*G}o7)bXhMy79i1ؖj$z3PQQ?U|MZ5ۍQSFQ!@ s Sg7&:S{5E?wzTvVL*1bd,j! Ho9B˪KnbYyaIZ`Z6%z**:,LVB+^|؛ń$͡8Ҍn.,Bk#{b1J7c[&{Y1*6= e^ 'b8Z,Ip,D+BPP-۳J:mP܆ٿLTͲeY^GeEe %+6c|T6J; nbTf|34y5Y\v[v6=)7aCx0,xbZ8lWCY6۬΍ 3vT+&GOk<ۂ!zL0i}!APƑ"MWurCȱi8gN\VpRjP'RQ;O'Bc+h:d|?oZZNo Nd +chSiRv)BuSR IKǹ{mb$ċap`LgrJ|>|ʲp$)?!S#>W#76 D>-=Ĥ!KKwv0I/@]LH GFSDPZ+miK4;˜| ZjڬT1Ƥ,e,:OŭOZV4OT?[ m٬Of%h++rg3lƟڌ?g3J,C))E?ɯi.A_Bx`#u5+Ea䌮^7'SY&uq@cG,ľ;lCqYdMSæ;˼C}3"z; ͈pl^dQyƕ\i-;=jy6o y6o ߃f N]>XE1'kX{ j,ƀ&n^[q I0X,bWdAI ;tPKEfRPKXG5__MACOSX/XCode/SDL2_gfx/SDL2_gfx/._SDL2_imageFilter.cUX .SiVNiVc`cg`b`MLVVP'q%!!AP&H GSˆOK,(I I(qKOKJZX[ZPKp]PK6C*XCode/SDL2_gfx/SDL2_gfx/SDL2_imageFilter.hUX .SiV??RYmS8~fڄi;sC_ns Io-rÑ|HoWNB C&b[>ϾH m:VO@ @D߃s'XA-Ckooon&2Sa&҂ձFόHDۆvV1kA,"bhhr]8U4P\"hm,$" #N4,FZ=vc|;.cW R+ v@1V L+A,7bIyDB= JϐPb\_ 6"jXlH;`"tBu[BGpy!߅.>טan*H+$ii-{|)wNx2r)_H8e;CGt7Jߦ" ) '+ aN>pse_0PRŒvDV&0h BH6C>*Ð\j0)r0' QZ$s9uސEDx*C=B*IpJ(,*b=h40"ۍ2 C&c[2V{ شXs:A Ε$FrRnp7P5[,-0q 6Mm ɘ Lѯg8J&{NmȸADYu/_‹#O9=k&~>>9=_:10kQyCZQ!(VTslxafo&&Y,ǣO;,AFrVŒ4f,vfqwo,(j oZ~ӹ>n!tl;4P gv-%Mv \o:jSu{Z,-iN=N ݄p4Ig/S4カ/lcA$A|4ߘyH˨@?4&[q 5Zcc%mzc5/tJ%^q겪{hEyEc/A"5 章ȸCAQ؅ك,GG~h{Wk Q>BreB n`cx|f&B \2#WEfGlU*XcP=QUfZc؇}M;L Xgq{6]UlZsLNj]^SZ5pXT}[VH6]*3e}JsI2oJH:< ϊ%^%|u/{{p/YYg+W 1]DSQ/]}߉#EgpU'H4OSx4ݮ xjjxyʹ*ZcՓ3{HÇe*n r6? fM<ʛfyk#VaN?ЅU;:)ETf]}%P:~W6r>C{}SL*M頻@{< \f-(.N7^ł*:lQyeY!Zxx"""?/Y<$Qy/gq.tR,ҷq{q~븘.EYfQc|QA_e_/"hQ@$, jgGb%HbD:6s YNjdHx{/Q6aMlʖiux$ 95DKPv%DcI zϢ0΋, UM(J.`}((<>I$]c+(Pzް/^B~ /jU^  2p$t cĒ_P$eƘ8PRWA~f(q!%D+L'uG -}8 A*t" * "6ps v Y$(ρE G{=7CCsT͢y@!0jڪ beޤ% @ .2X)p2! )HiogO_}Ӄ 6^LRS ;, U USq<{+T]q aqf7u乔b r4O徐:6?6}8nppü84xFE Lr拷~4~`4? CJp@{2Z2XcOj _B [{D p{aC@Ued"[5`+'%W)p 7)!nF]ó.Xyᄢ/qB˦?cO)z Kx;Ѕ6Th mѩȗوS:e*S:e,S|FDZ=3-j2Ҵ*e7@\(Pz =ٶ$gR6KY֚+[[cұN,]o(]_H$M%%d^yTӬ=B'8?$ׂnKIx)amhrѭ,]&cDWL:C%Z$Y~R>,*S$S@_WIUM=]"8]]qObܼJ&`'1l&aXGm<ˍ!߆F;!@AϤ_II5tZ*mIIvy"ȷ#gpDO?gO.~~חڛ4X#^9K _~>,`" 0)߲by8li—Iǵz)^@ʼn%sP'Z@\ ЏPCCF]hy$m~.J'-v6mqz*zb!n~b#!VDQ?`QJ!0L M1S$$W;MoMԇ$@(as|^^L7p)@E]f@$gmtkVvp*I DbM%&iYN1|"#V4<47": 6R''/h8EŸ!j.5Ai qHRIC*G5M!4RTC*iHC*iHT#[کu{ց|ؽVB@a*UV4Qmk|(Zت8"iY;Pj3Whl%8t~ArW(ΥtjJ}=h +7'  /*YUC\2ݪbDzE,"Rgdk6߆vM 5!2d !+$ѪRG <9<kK{/Keڶ|fGanK(ݑ[wr{{ġ>SNk*5Nj6һΤK*!P:d.ݾ+p_miz$L_m_LvI&؍PA),j~U~Ѫ<:dgqIhٽAuNaRXe ZN7Oe]붩9CS(k(8f[@zeuGQQq ckC~ZS1RSEvP#խJBnՓ$SU5$0"n%%9Ur0f̲q_oh4l[z4ʮȧ/6⽻nc )E&#% a2ݗˤB ؤtvD"׈ RW<VeY5rrDo/grpӇil;6H*?_Zf*e&Sk4+>P{bsHc!,qۄ/-<eG{llq+P`f9!4-Cy.n_8*Ӷի߶b={j3 ~PʊaCۺ*:Y n Xa)tSbC,6bC,6t]ݔ 5vэt$9a47H2XWGXR_5veأW/MU` yC.eģ^!3B(xG Bh:WEvhG1wA(cMUա;.үE̚$JD7Sf)swK{dd0d1/[jTdvI{f,NvIͶfbu[z=l}xNhU :^g[cl3ŴMѠ-֣=/JGq;Gsr QC[84"ݵ騁~a tMFF]%*+JAyZL;2j>$- _dVQ>܊L$bU *yQܝ 5t+$ NHߞ= bנ$;:[2݅+ߠeSų: @Yxiq Z #w/f[F (72f1,R{-OKpBӥ(Is@3/ȒY\! 0X*^ #C\@傽&Sٕ!<aUWatJNd,1j KtdǏRZNx]8,fc:/]碝d:n51ׅCn'tts]5q]M|,}\\w/x}F)sOT|rIѪR3Q1S]Wwqe ?1: S'O~)L7P52>5 Rڭql-L+H+xyyu o0#;|J7^d֙F魽AH$ ;&i]X_˲VZ7Vᅴs'QCsMyZ늭E)og>ZJ0'unGV IYh6ӫ/诤N^$)`Hop*!d͕0P#`\Qoe=DL5.ȁ('VJ"0 NA`B"$>ūtZ6i. e ["-` ӈoC+˲_oWZotS[Q6i9FT(rC4ȕP]ʓf02ƻ`( ˲ei]Qէtuۨ^D=X]SK20.`;Y:Ր][h;N5vM 6>(ެ3#YWJLGð]4R%A(9X@ 愹~OXgo9GIYi;}犈癋>R:Er-fR !D=WnT42&Dݣ*w+M2Fj/I*+vR&iq.HNN*OZ[%?@F .l撀>3*2CI4`jAD@=Մ3.4^wdO@1s.O4;oF'yf.E^rYǙt(uhr:Pt41(эt+,1o F:7C%MsO&]3ujÏ11GٓX@"ZI$ xU @#Z?]r8><ƆjWhZع0nUsʘToixLѽm1,:4(-:&#i'n2JDq`?Inwzz|;K@ u&~>q4j>B \B;a9-g̖6q^6_K :@BgM:}׭637}ZS̶¤ܚ6 WyyܖR̢%U$2 ŀaqV{o~?T <@צOXۓ2jJ۲_7tP2EmG"Z't[crw零 )R_!!:y GW{`u.WNCq?a6% d]Ðjdvp+yjQ_Ao!4{KVQi 0Xr֞w];v{'I Kciok"dUU 1rV6k;7a.Lx;Lz+>Y*bjcKkE*2i[3|ZI[wW̄PpvW]T96EL NuPZ|ˌ1NJc~ =\1H(e6(R/4E]ڠ}Ws F= 0]nu1'[yOMv4KEn:UL *7n>I4k&/IjqkUIEj*niᘞi ){粕m 71J0ZFgKdר,½ 2 5VB?2q*.޵䍻`q?VLzpڑ[w^-v9p9p;p-ZrԒLc|{>!(w:*"(ڒo%rQ.k{ !|C\p3b+Ba\Gꧣw:Njp.'K}ߤjZqzj/x{t1]z-VRk{j3qoR6~ͩ:A"d.$ū=?Tm˿b^Y]&bo_>G}qr:hX׻̻&U 3FX ͳMxLju5=IL3޷JWT0ލɟiq|; 6ƱkgӝJjEV7{4ab$ kqXn/:>g`vm5,%6#M[*?l/,;=2in ea`YڡE*A=4<]sJjV&@}yU#s@ĥuU8-N\H6Y&gI6g:Vy/l C9k:%aIVEr[CFZЮkb7e Gh6ޔjԊ$;,7GMۙfꯘ6Jie}YRia̓WNgRѧE{Gbc@nihN + 6-*PK\7J!PKIBD2__MACOSX/XCode/SDL2_gfx/SDL2_gfx/._SDL2_rotozoom.cUX .SiVJRc`cg`b`MLVVP'q!!AP&H @SˆMK,(I+,M,J+Ke(700065337IL4NLK,ʴfPKi0D+cPKXG'XCode/SDL2_gfx/SDL2_gfx/SDL2_rotozoom.hUX .SiVNiVVoHFj  ItR$=DzIc׷!7 !a{͛>18jvQ~3:wlbdvGX=&BBtu>3r8v}xj[mOYd00 DZ:v sn0mHS]8?| ZIe+ Gdnք^̑R oca@`Qie6A) TZ+u`':tĞkndyarm.d"|NP Gmݳa#cq+'bfu~'zSN\yC~Մ!=:b1WTA0U )}22ղd zyF qw;*BBez0Az!yLuA }Du݄OL"X] 7ЖQ9Փ#3R-¤ )b#Ӽt!:wHR4-5{ ˜c(Ųb=[;hzyyN\dtBؓqa 5>JJS,A Ƚ r.Z^{0MR}AFa TuoY$PG7%<T:Q}r9>={iwNN'Gix%;u@B4>eXyW_|?_~M۰7 oh\P" 1FJ>^,% J2@9|o\.R[j| ,MgYdS  3j3k:-ʢDr>u\dGJekS!kU%eςku_L/]qI,K~vj 5 / T6]!ԕ6ӏ_t7i/?}? Ù-Ϳr\Ӷ7p]/ ̋ξ>Tǟ=0wۚy\ xƧF]L^].;K sUN<X 8uL׀?K\7 z\rOM\$yr=R֙*"< kRΩ?e&:8ڳzx%:$: c"CK"3 )Bo*8NWKMH;@bkӃtjЫH]].薩 dx'gu=GͿ׋\ ryȩmY{ڮŐ_JU伺SrbuMw4Sv~1y(&sy焆uMv TRx˫$ݭM{% cBu~<.zk~z" hbdIcR-9QU0,':>>{88;4`_or(GGN?B$0bqoc!497:1"aH ȕ W 1/T1o{R&ٻе1]ƿ)b9 =Vxro~({&7fSȲ1d&6.eӰȬJR?%ԉ9z0+XXpLDNt򨤽)_O Ƅ K6L5n>Ja yb[:σPK?i :JPK WG6XCode/SDL2_gfx/SDL2_gfx.xcodeproj/project.xcworkspace/UX JSiV9LiVPKWGNXCode/SDL2_gfx/SDL2_gfx.xcodeproj/project.xcworkspace/contents.xcworkspacedataUX !SiV9LiVQ(K-*ϳU23PRHKOKU qӵP /..HLNRP)WUkٸe@XUSfcVW4<(? Oh>;.PK>tPK WGAXCode/SDL2_gfx/SDL2_gfx.xcodeproj/project.xcworkspace/xcuserdata/UX RiV9LiVPK B[GYXCode/SDL2_gfx/SDL2_gfx.xcodeproj/project.xcworkspace/xcuserdata/kesenheimer.xcuserdatad/UX RiVu;r!$(Js682F{MwxMSF; /tf VKէchPv6:YRԩgdPxnG4GgtI9^6]=|otkDh¿kԮFVjF{uS\])7(GWj}5] C7s|cD\xGv[>*єuqS]_%;Tx.> dQ]LWȪ'iߴ?&x<ERvx <փ (!ҳ)K{ST`<^{c3n8ySn{ WfowLu44y<-XE *w4`S>Js(jsVS`қk,)r,#PI,VTLkN7\etzŢjv:榇^U݅+}-7-3 9@ 0Uv /+i~NxBp8,#` &h&X G2X&h5n+z|o1OS= NN*Qr/U\[nt*%=^o]5;xq⩰myllx8T ')|BT<<y3>P;mհQ=GP@TTj48"buNG뛜6+R7Y'~^8Yp6T1x΁.8r j^e8 ".w{RԀQrf4{}~yQ fa=Vs^5#?_Zs-: Ònٕ|5wzj\8+31ېDw{=oCjh(e3ULG8bZʍ 5lNWᦍN[։ٗ;eƹ ~wvG$ݽ)tW }y4->n{CJo]Q ).D-;z!?%2 G0n;U䷑g]) 8sY-3.|?_V~*,1J4ۆ"Og?Ho̞ޗYmWX^rl7&zBkX[_PUZ\T^QU_T1 hdI ƕ攔=a4,OmDg nj%h݅{XMIr`|dL-y~K!D̃ᎽGD!?w,!VBm%: XVu;$ҀxD5!BKzmD MD:A ([V mu^n->)hpֳ~(kQtc;VҵsCh7Rh` l=û6njq; g띾J_{m5ad^<1,*SF\k:z}/!pPv'Юv_EO7â^"('♖4*z,CF6w]NoӍ XM!J=x &SX~'*EOvAOgг:c əˍg\{rG3|1bp_4j<@4 Mxhڏ_.`|ϨG&y1@ :^`Ge=.!}/qq?:cxq~X&ְZ>2W AR4ϖ #EOHLg; }w"q X=,oq8jgC"z)I6i$⡾(xLIyɋ!\ .~xn/wq`u z~gMb|(_4cE/q"Y2IAM,h0cYK0r!WD$L4hַF.d֖鵽J$,)6c-Ngp\^A hAP \`0,qvN6vl'q>ε7T5'q0jâE8 *h8w-p\Wp?<qR&`ݾq/n!$Y׎X_%Zr Ljlj*b z ^قC;،?۱8^Eϓ=]10+(?{g7gH3n<=^Vn}>y&z30mӠzr>[nLQ-gUV @$ƽliU'q"C#^$'W4:΢sV #^#^u [=>F;P,(w^Tr5TEb@O![ęnu {5vq^6]Oѝ3Z]E_1VvEؽ Cg(4鵺I+ZBCa^>ߪ|Zչ]ܹFcG,OG3?:2?X'>%gėWyq}>BOЧ39}~?DB! 00Cz < lą9n|kfg="r<)vD{[:q=EH9ۢᳳ ,w~ê VRw^A"& I$IIGE EwzOtI>) ? LaFVyE,'zGt"dr,ZvRd :RF =@Qqw4ub[fs? 3rUXl%ZILbGZ-(DATbՐ@N&)dc{FwF]u41Ɯlm<;lG!WA ҂vi#"lr 9L搹: @V2, ! @'?DVXGš ]^\&wK -> Z?#/W0 /*vkBtD=\1KMޫ$r2[ed ``TʭKكtulك$.W~:IWGalb  f*f 0jG5n&,u.\Nqd0r!\L.!&a녷$&wJ&>F]FTQSc:>20a @Q(-ps8Sf{_M^v10O\AMͳz|'>m'a dqH!*Qֻ4 |JNw[Gs_g}p8D(F6Ww6o]M*Vn[Xt5|@"B.NJŇ 3@M>=^)iF101 쿉||h'1pI& øbG>W9r3dg}߆|K(y|S ^>PuNeA YЦ@;p$O5RMjfPnCye`1p88% Lj5CͥQwQ82:` \Vngn QJjK;zXj=\fj!9.yomPo ܦ=}oKK-}rjB*Q fBր`=0D mV3Ύ>cj vuԹ(8`O5 \ŀ°cG>^ OtT;Rm l61pr4x ԄV JhCp0X)l KQJ-GOGcjTzz)w e F+{b2k(dԙιqzW{ԇG' g NNc 4ظk7X3Bo6!K.v|)lT(:td{ "l(Rl0|ې LtF؀5_4 ?5{E7.lO&U=FUQw[oPQשߨMO/ '80@l`La60pi4-p>ws Z,/Chfv4{8!{\}Y ;}RT\3}ً x{Rtgdmn7a#*Q?2w}h)#(r-M"v/)M,)s4yvGSo*ݟ%o;t,-c}.x O+:1p(e.e sC&*Z]YR2ڀw$J2;@fv8ޡtm8.[mt:E \ZWQIymwۛ8'9G[LA%MjL|78뛸Ɛo l.†8m/t+-M5b у^hуA9:Χ 0˅z(]x7Av ^1=CwܹGҥU[Dhi;=.c  b/}HuQ6Twy?S tJPt t5Wҵ \J;.Fz&&j%LϠݴ-4o}A>@j)EL+ EI*w@F}E:>|MF n 8 sck}5wK u o9$P툣j:Jj[gH^3fفٙu".8EԏmR,_qD_ yCyxŘR^7777ffBbݼyy;xO J 2ق 4>hbЁW^ z=>}r)3Ϯ>sѾƾ־>/_Z?}m귥߶ W?:xm͐>!!a!!Ґe*D2$)ΐM!B y)T!C~|_%WI|5s#SNt~#ş/?o? 9w_//JJA K0P0X+ F  f ```Ղ 6 ^-8#8'xW W󂋂K˂B #haa0I& 4^), ' ' FK8Cg >v'{O  <"<&<.|Im'o "*&"E(HWT/BbrJ*уEE?CGN ֆօN 3tqB }<-tSНBw =z&Z>b8Z,ljbX#NqTpK{׆?X[÷?/@YDJDj.2M["EtijG04V$UI5tIjfJB$4 G")K K+kJ7H7Jۤ/K_.=%}[zFZdPdH~0242,21+q]w3ϸa$>">2>:~@<^Wǧħď??~Yc/W߈P(ttQaQd*9hXEbZQWLS4(VQTVSx_q^qUqMw@HHL0$ LLhLX57>L*|ńK &\K-f_ obH0141>11QILI4&&%OX86q|ĪD{[w$Jܝx(ÉG?LQI(C ܯ|QyB;I$e*)9IdJ*NTԜ.icITTL/` G2_V糿.+ײod((8p56v=PK~,aKPK WG-XCode/SDL2_gfx/SDL2_gfx.xcodeproj/xcuserdata/UX RiV9LiVPK WGEXCode/SDL2_gfx/SDL2_gfx.xcodeproj/xcuserdata/kesenheimer.xcuserdatad/UX RiV9LiVPK WGOXCode/SDL2_gfx/SDL2_gfx.xcodeproj/xcuserdata/kesenheimer.xcuserdatad/xcschemes/UX RiV:LiVPKWG`XCode/SDL2_gfx/SDL2_gfx.xcodeproj/xcuserdata/kesenheimer.xcuserdatad/xcschemes/SDL2_gfx.xcschemeUX #SiV:LiVWmO0ί}}H)M:Z˧$ؑ픖_sMӭ-Hcȗ(wϝ}wϝb0gRQv:CQw:Eț8C]Kk;nrznȼ~FY 5*7>)1`r%g`{JRFC}HG5u kREXE.1-T1])Bd@g;Q[y̍a s=>KN)i|&D.e:AڃYi:In_.wM0G<7%OB>~Mre4\r9kSΔ&U Ԕ(0)3It>gq( fiK(w5CkH2]^ 2)Z;z2VպzJKvGWףwy9M Y?s`y&+j}&<%\߯>Uੳye%T=^/iGFyܮ%[?U WU3Li|Sk (fI1ԍ(ۘhaZUld0KWmGt9,;'X4a܄&[f26o"{Ƀ=zl@rP2VV؁wuz {!څY)x5%̀dL8 UpucشPK8#JPKWGgXCode/SDL2_gfx/SDL2_gfx.xcodeproj/xcuserdata/kesenheimer.xcuserdatad/xcschemes/xcschememanagement.plistUX #SiV9LiVn0E+\ɄDR 4<,)u]W\|_ dM=#Ӣ)Xu83ܻ%H_IE/B KӐ$r=SBJngfeMՁp밡0 UP})FGw +xV+\K+)tk3sm7<=vN`# OV?;ܠ,ntZJ鷬,jr]Ι3 Q0ro[M/G.XÕ-urdgr_\y7PKoGM%:PK WGXCode/SDL2_gfx/SDL2_gfxTests/UX RiV8LiVPKWG'XCode/SDL2_gfx/SDL2_gfxTests/Info.plistUX *SiV8LiV}]O0ݯz1ce.!AFF1z cd@I>v^59{NSsr( zccTH*{ t\!!Ӻ.) <7H3a>FxTL~7HDy6$ZOÆ`*z̙+>MDYsm@aK26Z%ux e۱$[ݳwD|j{lO_CM|f9#jKݙj%.kIJ};Qߏ?|H'8W[ﳅk!%hxRtaUʫL=2ћQLrF PK˟NPKWG,XCode/SDL2_gfx/SDL2_gfxTests/SDL2_gfxTests.mUX *SiV8LiVRjAWxу3م\qI AI7t]5,72{vla`zU]tp;)RU&ePydxCLё(C8nq΄4nv?hqG^ !@cȊ5rA<Ø⤛?{4/}=:4 '0WI(R<a{SxN>a5OT*-ORi,L-\80dA PR>eq>SƁ/NU& sa>K7qki_P[пZ^#9|ŒZ/FJ!S4E,it.tTu:uQuv4I lҔ% cNv2s&LFLAFr{?B!O^d|?K磞6z(EίPK6߶PK I[G&__MACOSX/XCode/SDL2_gfx/SDL2_gfxTests/UX JSiVJSiVPKWG7__MACOSX/XCode/SDL2_gfx/SDL2_gfxTests/._SDL2_gfxTests.mUX *SiV8LiVc`cg`b`MLVVP'q%!!AP&H GSˆOK,(I I(qKOKJZX[ZPKp]PK WG @AXCode/UXRiV8LiVPK[G^ @4XCode/.DS_StoreUXRiVRiVPK I[G @A*__MACOSX/UXJSiVJSiVPK I[G @Aa__MACOSX/XCode/UXJSiVJSiVPK[G׼4x @__MACOSX/XCode/._.DS_StoreUXRiVRiVPK E[G @A*XCode/SDL2_gfx/UXRiVASiVPKG[G"  @gXCode/SDL2_gfx/.DS_StoreUXRiVFSiVPK I[G @A__MACOSX/XCode/SDL2_gfx/UXJSiVJSiVPKG[G׼4x# @__MACOSX/XCode/SDL2_gfx/._.DS_StoreUXRiVFSiVPK BYG @AXCode/SDL2_gfx/SDL2_gfx/UXRiV{OiVPKXGZ" @XCode/SDL2_gfx/SDL2_gfx/Info.plistUX ( @XCode/SDL2_gfx/SDL2_gfx/SDL2_framerate.hUX.SiVNiVPKXGp]3 @{__MACOSX/XCode/SDL2_gfx/SDL2_gfx/._SDL2_framerate.hUX.SiVNiVPKBYG~Hծ, @IXCode/SDL2_gfx/SDL2_gfx/SDL2_gfxPrimitives.cUX.SiV{OiVPKBYGp]7 @u`__MACOSX/XCode/SDL2_gfx/SDL2_gfx/._SDL2_gfxPrimitives.cUX.SiV{OiVPKYGlp*, @GaXCode/SDL2_gfx/SDL2_gfx/SDL2_gfxPrimitives.hUX.SiV OiVPKYGp]7 @h__MACOSX/XCode/SDL2_gfx/SDL2_gfx/._SDL2_gfxPrimitives.hUX.SiV OiVPKД%A@q `1 @biXCode/SDL2_gfx/SDL2_gfx/SDL2_gfxPrimitives_font.hUX.SiVGPPKД%Ai0D+c< @|__MACOSX/XCode/SDL2_gfx/SDL2_gfx/._SDL2_gfxPrimitives_font.hUX.SiVGPPKXGEfR* @}XCode/SDL2_gfx/SDL2_gfx/SDL2_imageFilter.cUX.SiVNiVPKXGp]5 @__MACOSX/XCode/SDL2_gfx/SDL2_gfx/._SDL2_imageFilter.cUX.SiVNiVPK6C%* @XCode/SDL2_gfx/SDL2_gfx/SDL2_imageFilter.hUX.SiV??RPK6Ci0D+c5 @__MACOSX/XCode/SDL2_gfx/SDL2_gfx/._SDL2_imageFilter.hUX.SiV??RPKCGZx*+ @kXCode/SDL2_gfx/SDL2_gfx/SDL2_imageFilter.loUXRiVDgVPKIBD\7J!' @큇XCode/SDL2_gfx/SDL2_gfx/SDL2_rotozoom.cUX.SiVJRPKIBDi0D+c2 @6__MACOSX/XCode/SDL2_gfx/SDL2_gfx/._SDL2_rotozoom.cUX.SiVJRPKXG_ ' @ XCode/SDL2_gfx/SDL2_gfx/SDL2_rotozoom.hUX.SiVNiVPKXGp]2 @__MACOSX/XCode/SDL2_gfx/SDL2_gfx/._SDL2_rotozoom.hUX.SiVNiVPK ZG" @AXCode/SDL2_gfx/SDL2_gfx.xcodeproj/UXJSiVRiVPKZG?i :J1 @XCode/SDL2_gfx/SDL2_gfx.xcodeproj/project.pbxprojUX!SiVRiVPK WG6 @A XCode/SDL2_gfx/SDL2_gfx.xcodeproj/project.xcworkspace/UXJSiV9LiVPKWG>tN @qXCode/SDL2_gfx/SDL2_gfx.xcodeproj/project.xcworkspace/contents.xcworkspacedataUX!SiV9LiVPK WGA @AqXCode/SDL2_gfx/SDL2_gfx.xcodeproj/project.xcworkspace/xcuserdata/UXRiV9LiVPK B[GY @AXCode/SDL2_gfx/SDL2_gfx.xcodeproj/project.xcworkspace/xcuserdata/kesenheimer.xcuserdatad/UXRiVXCode/SDL2_gfx/SDL2_gfx.xcodeproj/xcuserdata/UXRiV9LiVPK WGE @A}>XCode/SDL2_gfx/SDL2_gfx.xcodeproj/xcuserdata/kesenheimer.xcuserdatad/UXRiV9LiVPK WGO @A>XCode/SDL2_gfx/SDL2_gfx.xcodeproj/xcuserdata/kesenheimer.xcuserdatad/xcschemes/UXRiV:LiVPKWG8#J` @m?XCode/SDL2_gfx/SDL2_gfx.xcodeproj/xcuserdata/kesenheimer.xcuserdatad/xcschemes/SDL2_gfx.xcschemeUX#SiV:LiVPKWGoGM%:g @BXCode/SDL2_gfx/SDL2_gfx.xcodeproj/xcuserdata/kesenheimer.xcuserdatad/xcschemes/xcschememanagement.plistUX#SiV9LiVPK WG @ADXCode/SDL2_gfx/SDL2_gfxTests/UXRiV8LiVPKWG˟N' @EXCode/SDL2_gfx/SDL2_gfxTests/Info.plistUX*SiV8LiVPKWG6߶, @FXCode/SDL2_gfx/SDL2_gfxTests/SDL2_gfxTests.mUX*SiV8LiVPK I[G& @AH__MACOSX/XCode/SDL2_gfx/SDL2_gfxTests/UXJSiVJSiVPKWGp]7 @)I__MACOSX/XCode/SDL2_gfx/SDL2_gfxTests/._SDL2_gfxTests.mUX*SiV8LiVPK11 I